com.pixelmed.dicom

## Class ContentItemFactory.CodeContentItem

- java.lang.Object
- - com.pixelmed.dicom.ContentItem
  - - com.pixelmed.dicom.ContentItemWithValue
    - - com.pixelmed.dicom.ContentItemFactory.CodeContentItem

All Implemented Interfaces:
  javax.swing.tree.TreeNode

Enclosing class:
  ContentItemFactory

    public class ContentItemFactory.CodeContentItem
    extends ContentItemWithValue

### Field Summary

Fields
`protected CodedSequenceItem` `conceptCode`

### Fields inherited from class com.pixelmed.dicom.ContentItemWithValue

`conceptName, referencedContentItemIdentifier, valueType`

### Fields inherited from class com.pixelmed.dicom.ContentItem

`relationshipType`

### Constructor Summary

Constructors
Constructor and Description
`ContentItemFactory.CodeContentItem(ContentItem parent, AttributeList list)`
`ContentItemFactory.CodeContentItem(ContentItem parent, java.lang.String relationshipType, CodedSequenceItem conceptName, CodedSequenceItem conceptCode)`

### Method Summary

Methods
`boolean` `contentItemValueMatchesCodeValueAndCodingSchemeDesignator(java.lang.String cvWanted, java.lang.String csdWanted)` Test if the coded value of the code content item matches the specified code value and coding scheme designator.
`CodedSequenceItem` `getConceptCode()`
`java.lang.String` `getConceptValue()` Get a string representation of the value of the concept.
`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, getParent, getParentAsContentItem, getReferencedContentItemIdentifier, getReferencedContentItemIdentifierArray, getReferencedSOPClassUID, getReferencedSOPInstanceUID, getRelationshipType, getSingleStringValueOrNull, getSingleStringValueOrNullOfNamedChild, getSingleStringValueOrNullOfNamedChild, isLeaf`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Field Detail

#### conceptCode

    protected CodedSequenceItem conceptCode

### Constructor Detail

#### ContentItemFactory.CodeContentItem

    public ContentItemFactory.CodeContentItem(ContentItem parent,
                                      AttributeList list)

Parameters:
  `parent` -
  `list` -

#### ContentItemFactory.CodeContentItem

    public ContentItemFactory.CodeContentItem(ContentItem parent,
                                      java.lang.String relationshipType,
                                      CodedSequenceItem conceptName,
                                      CodedSequenceItem conceptCode)
                                       throws DicomException

Parameters:
  `parent` -
  `relationshipType` -
  `conceptName` -
  `conceptCode` -
Throws:
  `DicomException`

### 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

#### 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

#### getConceptCode

    public CodedSequenceItem getConceptCode()

#### contentItemValueMatchesCodeValueAndCodingSchemeDesignator

    public boolean contentItemValueMatchesCodeValueAndCodingSchemeDesignator(java.lang.String cvWanted,
                                                                    java.lang.String csdWanted)

Test if the coded value of the code 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.

Parameters:
  `csdWanted` -
  `cvWanted` -
Returns:
  true if matches