Package com.pixelmed.dicom
Class ContentItemFactory.StringContentItem
- java.lang.Object
-
- com.pixelmed.dicom.ContentItem
-
- com.pixelmed.dicom.ContentItemWithValue
-
- com.pixelmed.dicom.ContentItemFactory.StringContentItem
-
- All Implemented Interfaces:
javax.swing.tree.TreeNode
- Direct Known Subclasses:
ContentItemFactory.DateContentItem
,ContentItemFactory.DateTimeContentItem
,ContentItemFactory.PersonNameContentItem
,ContentItemFactory.TextContentItem
,ContentItemFactory.TimeContentItem
,ContentItemFactory.UIDContentItem
- Enclosing class:
- ContentItemFactory
protected abstract class ContentItemFactory.StringContentItem extends ContentItemWithValue
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
stringValue
-
Fields inherited from class com.pixelmed.dicom.ContentItemWithValue
conceptName, referencedContentItemIdentifier, valueType
-
Fields inherited from class com.pixelmed.dicom.ContentItem
observationDateTime, observationUID, relationshipType
-
-
Constructor Summary
Constructors Constructor Description StringContentItem(ContentItem parent, AttributeList list, AttributeTag tag)
StringContentItem(ContentItem parent, java.lang.String valueType, java.lang.String relationshipType, CodedSequenceItem conceptName, AttributeTag tagForValue, java.lang.String stringValue, java.lang.String observationDateTime, java.lang.String observationUID)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getConceptValue()
Get a string representation of the value of the concept.void
setConceptValue(AttributeTag tagForValue, java.lang.String stringValue)
java.lang.String
toString()
Get a human-readable string representation of the content item.-
Methods inherited from class com.pixelmed.dicom.ContentItemWithValue
contentItemNameMatchesCodeValueAndCodingSchemeDesignator, getConceptName, getConceptNameAndValue, getConceptNameCodeMeaning, getConceptNameCodeValue, getConceptNameCodingSchemeDesignator, getValueType
-
Methods inherited from class com.pixelmed.dicom.ContentItem
addChild, addSibling, children, contentItemNameMatchesCodeValueAndCodingSchemeDesignator, getAllowsChildren, getAttributeList, getChildAt, getChildCount, getGraphicData, getGraphicType, getIndex, getNamedChild, getNamedChild, getObservationDateTime, getObservationUID, getParent, getParentAsContentItem, getPositionInTreeToUseAsReferencedContentItemIdentifier, getReferencedContentItemIdentifier, getReferencedContentItemIdentifierArray, getReferencedSOPClassUID, getReferencedSOPInstanceUID, getRelationshipType, getSingleStringValueOrNull, getSingleStringValueOrNullOfNamedChild, getSingleStringValueOrNullOfNamedChild, isLeaf
-
-
-
-
Constructor Detail
-
StringContentItem
public StringContentItem(ContentItem parent, AttributeList list, AttributeTag tag)
- Parameters:
parent
- parent content item to add tolist
- list of attributes for this content itemtag
- tag of the attribute containing the string value of this content item
-
StringContentItem
public StringContentItem(ContentItem parent, java.lang.String valueType, java.lang.String relationshipType, CodedSequenceItem conceptName, AttributeTag tagForValue, java.lang.String stringValue, java.lang.String observationDateTime, java.lang.String observationUID) throws DicomException
- Parameters:
parent
- parent content item to add tovalueType
- the value typerelationshipType
- relationship typeconceptName
- coded concept nametagForValue
- tag of the attribute to encode the string value of this content itemstringValue
- string valueobservationDateTime
- Observation DateTime (or null or empty if none)observationUID
- Observation UID (or null or empty if none)- Throws:
DicomException
- if error in DICOM encoding
-
-
Method Detail
-
getConceptValue
public java.lang.String getConceptValue()
Description copied from class:ContentItemWithValue
Get a string representation of the value of the concept.
The exact form of the returned string is specific to the type of ContentItem.
- Specified by:
getConceptValue
in classContentItemWithValue
- Returns:
- a String representation of the name and value, or an empty string
-
setConceptValue
public void setConceptValue(AttributeTag tagForValue, java.lang.String stringValue) throws DicomException
- Parameters:
tagForValue
- tag of the attribute to encode the string value of this content itemstringValue
- if null, removes the value- Throws:
DicomException
- if error in DICOM encoding
-
toString
public java.lang.String toString()
Description copied from class:ContentItemWithValue
Get a human-readable string representation of the content item.
- Overrides:
toString
in classContentItemWithValue
- Returns:
- the string representation of the content item
-
-