Class ContentItemFactory.StringContentItem

    • Field Detail

      • stringValue

        protected java.lang.String stringValue
    • Constructor Detail

      • StringContentItem

        public StringContentItem​(ContentItem parent,
                                 AttributeList list,
                                 AttributeTag tag)
        Parameters:
        parent - parent content item to add to
        list - list of attributes for this content item
        tag - 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)
                          throws DicomException
        Parameters:
        parent - parent content item to add to
        valueType - the value type
        relationshipType - relationship type
        conceptName - coded concept name
        tagForValue - tag of the attribute to encode the string value of this content item
        stringValue - string value
        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 class ContentItemWithValue
        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 item
        stringValue - 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 class ContentItemWithValue
        Returns:
        the string representation of the content item