Class ContentItemWithValue
- All Implemented Interfaces:
TreeNode
- Direct Known Subclasses:
ContentItemFactory.CodeContentItem
,ContentItemFactory.CompositeContentItem
,ContentItemFactory.ContainerContentItem
,ContentItemFactory.NumericContentItem
,ContentItemFactory.SpatialCoordinates3DContentItem
,ContentItemFactory.SpatialCoordinatesContentItem
,ContentItemFactory.StringContentItem
,ContentItemFactory.TemporalCoordinatesContentItem
,ContentItemFactory.UnrecognizedContentItem
An abstract class for representing a node in an internal representation of a structured reporting
tree (an instance of StructuredReport
).
The constructor is protected. Instances of specific types of content items should normally be created by using
the ContentItemFactory
.
- See Also:
-
ContentItem
ContentItemFactory
ContentItemWithReference
StructuredReport
StructuredReportBrowser
-
Field Summary
FieldsFields inherited from class com.pixelmed.dicom.ContentItem
observationDateTime, observationUID, relationshipType
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Construct a content item for a list of attributes, and add it as a child of the specified parent.protected
ContentItemWithValue
(ContentItem p, String valueType, String relationshipType, CodedSequenceItem conceptName) Construct a content item of a specified type and relationship, creating a newAttributeList
, and add it as a child of the specified parent.protected
ContentItemWithValue
(ContentItem p, String valueType, String relationshipType, CodedSequenceItem conceptName, String observationDateTime, String observationUID) Construct a content item of a specified type and relationship, creating a newAttributeList
, and add it as a child of the specified parent. -
Method Summary
Modifier and TypeMethodDescriptionboolean
contentItemNameMatchesCodeValueAndCodingSchemeDesignator
(String cvWanted, String csdWanted) Test if the coded concept name of the content item matches the specified code value and coding scheme designator.Get the Concept Name.Get a string representation of the concept name and the value of the concept.Get the value of the code meaning of the Concept Name as a string, if present and applicable.Get the value of the code value of the Concept Name as a string, if present and applicable.Get the value of the coding scheme designator of the Concept Name as a string, if present and applicable.abstract String
Get a string representation of the value of the concept.Get the value type of this content item.toString()
Get a human-readable string representation of the content item.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
-
Field Details
-
valueType
-
conceptName
-
referencedContentItemIdentifier
-
-
Constructor Details
-
ContentItemWithValue
Construct a content item for a list of attributes, and add it as a child of the specified parent.
The constructor is protected. Instances of specific types of content items should normally be created by using the
ContentItemFactory
.- Parameters:
p
- the parentl
- the list of attributes
-
ContentItemWithValue
protected ContentItemWithValue(ContentItem p, String valueType, String relationshipType, CodedSequenceItem conceptName, String observationDateTime, String observationUID) throws DicomException Construct a content item of a specified type and relationship, creating a new
AttributeList
, and add it as a child of the specified parent.The constructor is protected. Instances of specific types of content items should normally be created by using the
ContentItemFactory
.- Parameters:
p
- the parentvalueType
- value typerelationshipType
- added only if not null or zero lengthconceptName
- coded concept nameobservationDateTime
- Observation DateTime, if anyobservationUID
- Observation UID, if any- Throws:
DicomException
- if error in DICOM encoding
-
ContentItemWithValue
protected ContentItemWithValue(ContentItem p, String valueType, String relationshipType, CodedSequenceItem conceptName) throws DicomException Construct a content item of a specified type and relationship, creating a new
AttributeList
, and add it as a child of the specified parent.The constructor is protected. Instances of specific types of content items should normally be created by using the
ContentItemFactory
.- Parameters:
p
- the parentvalueType
- value typerelationshipType
- added only if not null or zero lengthconceptName
- coded concept name- Throws:
DicomException
- if error in DICOM encoding
-
-
Method Details
-
getValueType
Get the value type of this content item.
- Overrides:
getValueType
in classContentItem
- Returns:
- the value type (the string used in the DICOM standard in the Value Type attribute)
-
getConceptNameAndValue
Get a string representation of the concept name and the value of the concept.
The exact form of the returned string is specific to the type of ContentItem.
- Overrides:
getConceptNameAndValue
in classContentItem
- Returns:
- a String representation of the name and value, or an empty string
-
getConceptValue
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 classContentItem
- Returns:
- a String representation of the name and value, or an empty string
-
getConceptName
Get the Concept Name.
- Overrides:
getConceptName
in classContentItem
- Returns:
- the Concept Name
-
getConceptNameCodeMeaning
Get the value of the code meaning of the Concept Name as a string, if present and applicable.
- Overrides:
getConceptNameCodeMeaning
in classContentItem
- Returns:
- the code meaning of the Concept Name, or an empty string
-
getConceptNameCodeValue
Get the value of the code value of the Concept Name as a string, if present and applicable.
- Overrides:
getConceptNameCodeValue
in classContentItem
- Returns:
- the code value of the Concept Name, or an empty string
-
getConceptNameCodingSchemeDesignator
Get the value of the coding scheme designator of the Concept Name as a string, if present and applicable.
- Overrides:
getConceptNameCodingSchemeDesignator
in classContentItem
- Returns:
- the coding scheme designator of the Concept Name, or an empty string
-
toString
Get a human-readable string representation of the content item.
-
contentItemNameMatchesCodeValueAndCodingSchemeDesignator
public boolean contentItemNameMatchesCodeValueAndCodingSchemeDesignator(String cvWanted, String csdWanted) Description copied from class:ContentItem
Test if the coded concept name of the content item matches the specified code value and coding scheme designator. This is more robust than checking code meaning, which may have synomyms, and there is no need to also test code meaning. Does NOT follow references.- Specified by:
contentItemNameMatchesCodeValueAndCodingSchemeDesignator
in classContentItem
- Parameters:
cvWanted
- the code value wantedcsdWanted
- the coding scheme designator wanted- Returns:
- true if matches
-