com.pixelmed.dicom

## Class ContentItemFactory.NumericContentItem

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

All Implemented Interfaces:
  javax.swing.tree.TreeNode

Enclosing class:
  ContentItemFactory

    public class ContentItemFactory.NumericContentItem
    extends ContentItemWithValue

### Field Summary

Fields
`protected java.lang.Double` `floatingPointValue`
`protected java.lang.String` `numericValue`
`protected CodedSequenceItem` `qualifier`
`protected java.lang.Long` `rationalDenominatorValue`
`protected java.lang.Integer` `rationalNumeratorValue`
`protected CodedSequenceItem` `units`

### 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.NumericContentItem(ContentItem parent, AttributeList list)`
`ContentItemFactory.NumericContentItem(ContentItem parent, boolean isNotSR, java.lang.String relationshipType, CodedSequenceItem conceptName, CodedSequenceItem qualifier)` Construct numeric content item with empty `MeasuredValueSequence` with qualifier explaining why it is empty.
`ContentItemFactory.NumericContentItem(ContentItem parent, boolean isNotSR, java.lang.String relationshipType, CodedSequenceItem conceptName, double floatingPointValue, CodedSequenceItem units)`
`ContentItemFactory.NumericContentItem(ContentItem parent, boolean isNotSR, java.lang.String relationshipType, CodedSequenceItem conceptName, int numerator, long denominator, CodedSequenceItem units)`
`ContentItemFactory.NumericContentItem(ContentItem parent, boolean isNotSR, java.lang.String relationshipType, CodedSequenceItem conceptName, java.lang.String numericValue, CodedSequenceItem units, CodedSequenceItem qualifier)`
`ContentItemFactory.NumericContentItem(ContentItem parent, boolean isNotSR, java.lang.String relationshipType, CodedSequenceItem conceptName, java.lang.String numericValue, java.lang.Double floatingPointValue, java.lang.Integer rationalNumeratorValue, java.lang.Long rationalDenominatorValue, CodedSequenceItem units, CodedSequenceItem qualifier)`
`ContentItemFactory.NumericContentItem(ContentItem parent, java.lang.String relationshipType, CodedSequenceItem conceptName, CodedSequenceItem qualifier)` Construct SR numeric content item with empty `MeasuredValueSequence` with qualifier explaining why it is empty.
`ContentItemFactory.NumericContentItem(ContentItem parent, java.lang.String relationshipType, CodedSequenceItem conceptName, double floatingPointValue, CodedSequenceItem units)`
`ContentItemFactory.NumericContentItem(ContentItem parent, java.lang.String relationshipType, CodedSequenceItem conceptName, int numerator, long denominator, CodedSequenceItem units)`
`ContentItemFactory.NumericContentItem(ContentItem parent, java.lang.String relationshipType, CodedSequenceItem conceptName, java.lang.String numericValue, CodedSequenceItem units)`
`ContentItemFactory.NumericContentItem(ContentItem parent, java.lang.String relationshipType, CodedSequenceItem conceptName, java.lang.String numericValue, CodedSequenceItem units, CodedSequenceItem qualifier)`
`ContentItemFactory.NumericContentItem(ContentItem parent, java.lang.String relationshipType, CodedSequenceItem conceptName, java.lang.String numericValue, java.lang.Double floatingPointValue, java.lang.Integer rationalNumeratorValue, java.lang.Long rationalDenominatorValue, CodedSequenceItem units, CodedSequenceItem qualifier)`

### Method Summary

Methods
`protected void` `constructOnlyQualifier(CodedSequenceItem qualifier)`
`protected void` `doCommonConstructorStuff(java.lang.String numericValue, CodedSequenceItem units, CodedSequenceItem qualifier, java.lang.Double floatingPointValue, java.lang.Integer rationalNumeratorValue, java.lang.Long rationalDenominatorValue)`
`java.lang.String` `getConceptNameAndValue()` Get a string representation of the concept name and the value of the concept.
`java.lang.String` `getConceptValue()` Get a string representation of the value of the concept.
`double` `getFloatingPointValue()`
`java.lang.String` `getNumericValue()`
`CodedSequenceItem` `getQualifier()`
`long` `getRationalDenominatorValue()`
`int` `getRationalNumeratorValue()`
`CodedSequenceItem` `getUnits()`
`boolean` `hasFloatingPointValue()`
`boolean` `hasRationalValue()`
`java.lang.String` `toString()` Get a human-readable string representation of the content item.

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

`contentItemNameMatchesCodeValueAndCodingSchemeDesignator, getConceptName, 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

#### numericValue

    protected java.lang.String numericValue

#### floatingPointValue

    protected java.lang.Double floatingPointValue

#### rationalNumeratorValue

    protected java.lang.Integer rationalNumeratorValue

#### rationalDenominatorValue

    protected java.lang.Long rationalDenominatorValue

#### units

    protected CodedSequenceItem units

#### qualifier

    protected CodedSequenceItem qualifier

### Constructor Detail

#### ContentItemFactory.NumericContentItem

    public ContentItemFactory.NumericContentItem(ContentItem parent,
                                         AttributeList list)
                                          throws DicomException

Parameters:
  `parent` -
  `list` -
Throws:
  `DicomException`

#### ContentItemFactory.NumericContentItem

    public ContentItemFactory.NumericContentItem(ContentItem parent,
                                         boolean isNotSR,
                                         java.lang.String relationshipType,
                                         CodedSequenceItem conceptName,
                                         double floatingPointValue,
                                         CodedSequenceItem units)
                                          throws DicomException

Parameters:
  `parent` -
  `isNotSR` - affects whether value type is NUM (false) or NUMERIC (true)
  `relationshipType` -
  `conceptName` -
  `floatingPointValue` - will be converted to string
  `units` -
Throws:
  `DicomException`

#### ContentItemFactory.NumericContentItem

    public ContentItemFactory.NumericContentItem(ContentItem parent,
                                         java.lang.String relationshipType,
                                         CodedSequenceItem conceptName,
                                         double floatingPointValue,
                                         CodedSequenceItem units)
                                          throws DicomException

Parameters:
  `parent` -
  `relationshipType` -
  `conceptName` -
  `floatingPointValue` - will be converted to string
  `units` -
Throws:
  `DicomException`

#### ContentItemFactory.NumericContentItem

    public ContentItemFactory.NumericContentItem(ContentItem parent,
                                         boolean isNotSR,
                                         java.lang.String relationshipType,
                                         CodedSequenceItem conceptName,
                                         int numerator,
                                         long denominator,
                                         CodedSequenceItem units)
                                          throws DicomException

Parameters:
  `parent` -
  `isNotSR` - affects whether value type is NUM (false) or NUMERIC (true)
  `relationshipType` -
  `conceptName` -
  `numerator` -
  `denominator` -
  `units` -
Throws:
  `DicomException`

#### ContentItemFactory.NumericContentItem

    public ContentItemFactory.NumericContentItem(ContentItem parent,
                                         java.lang.String relationshipType,
                                         CodedSequenceItem conceptName,
                                         int numerator,
                                         long denominator,
                                         CodedSequenceItem units)
                                          throws DicomException

Parameters:
  `parent` -
  `relationshipType` -
  `conceptName` -
  `numerator` -
  `denominator` -
  `units` -
Throws:
  `DicomException`

#### ContentItemFactory.NumericContentItem

    public ContentItemFactory.NumericContentItem(ContentItem parent,
                                         boolean isNotSR,
                                         java.lang.String relationshipType,
                                         CodedSequenceItem conceptName,
                                         java.lang.String numericValue,
                                         CodedSequenceItem units,
                                         CodedSequenceItem qualifier)
                                          throws DicomException

Parameters:
  `parent` -
  `isNotSR` - affects whether value type is NUM (false) or NUMERIC (true)
  `relationshipType` -
  `conceptName` -
  `numericValue` -
  `units` -
  `qualifier` -
Throws:
  `DicomException`

#### ContentItemFactory.NumericContentItem

    public ContentItemFactory.NumericContentItem(ContentItem parent,
                                         java.lang.String relationshipType,
                                         CodedSequenceItem conceptName,
                                         java.lang.String numericValue,
                                         CodedSequenceItem units)
                                          throws DicomException

Parameters:
  `parent` -
  `relationshipType` -
  `conceptName` -
  `numericValue` -
  `units` -
Throws:
  `DicomException`

#### ContentItemFactory.NumericContentItem

    public ContentItemFactory.NumericContentItem(ContentItem parent,
                                         java.lang.String relationshipType,
                                         CodedSequenceItem conceptName,
                                         java.lang.String numericValue,
                                         CodedSequenceItem units,
                                         CodedSequenceItem qualifier)
                                          throws DicomException

Parameters:
  `parent` -
  `relationshipType` -
  `conceptName` -
  `numericValue` -
  `units` -
  `qualifier` -
Throws:
  `DicomException`

#### ContentItemFactory.NumericContentItem

    public ContentItemFactory.NumericContentItem(ContentItem parent,
                                         boolean isNotSR,
                                         java.lang.String relationshipType,
                                         CodedSequenceItem conceptName,
                                         java.lang.String numericValue,
                                         java.lang.Double floatingPointValue,
                                         java.lang.Integer rationalNumeratorValue,
                                         java.lang.Long rationalDenominatorValue,
                                         CodedSequenceItem units,
                                         CodedSequenceItem qualifier)
                                          throws DicomException

Parameters:
  `parent` -
  `isNotSR` - affects whether value type is NUM (false) or NUMERIC (true)
  `relationshipType` -
  `conceptName` -
  `numericValue` -
  `floatingPointValue` -
  `rationalNumeratorValue` -
  `rationalDenominatorValue` -
  `units` -
  `qualifier` -
Throws:
  `DicomException`

#### ContentItemFactory.NumericContentItem

    public ContentItemFactory.NumericContentItem(ContentItem parent,
                                         java.lang.String relationshipType,
                                         CodedSequenceItem conceptName,
                                         java.lang.String numericValue,
                                         java.lang.Double floatingPointValue,
                                         java.lang.Integer rationalNumeratorValue,
                                         java.lang.Long rationalDenominatorValue,
                                         CodedSequenceItem units,
                                         CodedSequenceItem qualifier)
                                          throws DicomException

Parameters:
  `parent` -
  `relationshipType` -
  `conceptName` -
  `numericValue` -
  `floatingPointValue` -
  `rationalNumeratorValue` -
  `rationalDenominatorValue` -
  `units` -
  `qualifier` -
Throws:
  `DicomException`

#### ContentItemFactory.NumericContentItem

    public ContentItemFactory.NumericContentItem(ContentItem parent,
                                         boolean isNotSR,
                                         java.lang.String relationshipType,
                                         CodedSequenceItem conceptName,
                                         CodedSequenceItem qualifier)
                                          throws DicomException

Construct numeric content item with empty `MeasuredValueSequence` with qualifier explaining why it is empty.

Parameters:
  `parent` -
  `isNotSR` - affects whether value type is NUM (false) or NUMERIC (true)
  `relationshipType` -
  `conceptName` -
  `qualifier` -
Throws:
  `DicomException`

#### ContentItemFactory.NumericContentItem

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

Construct SR numeric content item with empty `MeasuredValueSequence` with qualifier explaining why it is empty.

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

### Method Detail

#### doCommonConstructorStuff

    protected void doCommonConstructorStuff(java.lang.String numericValue,
                                CodedSequenceItem units,
                                CodedSequenceItem qualifier,
                                java.lang.Double floatingPointValue,
                                java.lang.Integer rationalNumeratorValue,
                                java.lang.Long rationalDenominatorValue)
                                     throws DicomException

Throws:
  `DicomException`

#### constructOnlyQualifier

    protected void constructOnlyQualifier(CodedSequenceItem qualifier)

#### getQualifier

    public CodedSequenceItem getQualifier()

#### getUnits

    public CodedSequenceItem getUnits()

#### getNumericValue

    public java.lang.String getNumericValue()

#### hasFloatingPointValue

    public boolean hasFloatingPointValue()

#### getFloatingPointValue

    public double getFloatingPointValue()

#### hasRationalValue

    public boolean hasRationalValue()

#### getRationalNumeratorValue

    public int getRationalNumeratorValue()

#### getRationalDenominatorValue

    public long getRationalDenominatorValue()

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

#### getConceptNameAndValue

    public java.lang.String getConceptNameAndValue()

Description copied from class: `ContentItemWithValue`

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