public class CodedSequenceItem
extends java.lang.Object
A class to encapsulate the attributes contained within a Sequence Item that represents a Coded Sequence item.
Modifier and Type | Field and Description |
---|---|
protected AttributeList |
list |
Constructor and Description |
---|
CodedSequenceItem(AttributeList l)
Construct a
CodedSequenceItem from a list of attributes. |
CodedSequenceItem(java.lang.String tuple)
Construct a
CodedSequenceItem from a single string representation of the tuple enclosed in parentheses. |
CodedSequenceItem(java.lang.String codeValue,
java.lang.String codingSchemeDesignator,
java.lang.String codeMeaning)
Construct a
CodedSequenceItem from string values for code value, scheme and meaning. |
CodedSequenceItem(java.lang.String codeValue,
java.lang.String codingSchemeDesignator,
java.lang.String codingSchemeVersion,
java.lang.String codeMeaning)
Construct a
CodedSequenceItem from string values for code value, scheme, version and meaning. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
static CodedSequenceItem[] |
getArrayOfCodedSequenceItemsOrNull(Attribute a)
Extract the items of a coded sequence attribute.
|
static CodedSequenceItem[] |
getArrayOfCodedSequenceItemsOrNull(AttributeList list,
AttributeTag tag)
Extract the items of a coded sequence attribute contained
within a list of attributes.
|
AttributeList |
getAttributeList()
Get the list of attributes in the
CodedSequenceItem . |
java.lang.String |
getCodeMeaning()
Get the code meaning.
|
java.lang.String |
getCodeValue()
Get the code value.
|
java.lang.String |
getCodingSchemeDesignator()
Get the coding scheme designator.
|
java.lang.String |
getCodingSchemeVersion()
Get the coding scheme version.
|
static int |
getItemNumberContainingCodeSequence(AttributeList list,
AttributeTag sequenceAttributeTag,
AttributeTag codedSequenceItemTag,
CodedSequenceItem wanted)
Find the item of a SequenceAttribute in an AttributeList that contains a coded sequence attribute with a specified value.
|
static int |
getItemNumberContainingCodeSequence(SequenceAttribute a,
AttributeTag codedSequenceItemTag,
CodedSequenceItem wanted)
Find the item of a SequenceAttribute that contains a coded sequence attribute with a specified value.
|
static CodedSequenceItem |
getSingleCodedSequenceItemOrNull(Attribute a)
Extract the first (hopefully only) item of a coded sequence attribute.
|
static CodedSequenceItem |
getSingleCodedSequenceItemOrNull(AttributeList list,
AttributeTag tag)
Extract the first (hopefully only) item of a coded sequence attribute contained
within a list of attributes.
|
int |
hashCode() |
static SequenceAttribute |
newCodedSequenceAttribute(AttributeTag tag,
CodedSequenceItem csi)
Create a single item coded sequence attribute.
|
static SequenceAttribute |
putSingleCodedSequenceAttribute(AttributeList list,
AttributeTag tag,
CodedSequenceItem csi)
Create a single item coded sequence attribute and add it to the list.
|
static void |
putSingleCodedSequenceItem(AttributeList list,
AttributeTag tag,
java.lang.String codeValue,
java.lang.String codingSchemeDesignator,
java.lang.String codeMeaning)
Create a single item coded sequence attribute and add it to the list.
|
java.lang.String |
toString()
Get a
String representation of the contents of the CodedSequenceItem . |
java.lang.String |
toTabDelimitedString()
Get a tab-delimited
String representation of the contents of the CodedSequenceItem . |
protected AttributeList list
public CodedSequenceItem(AttributeList l)
Construct a CodedSequenceItem
from a list of attributes.
l
- the list of attributes to include in the itempublic CodedSequenceItem(java.lang.String tuple) throws DicomException
Construct a CodedSequenceItem
from a single string representation of the tuple enclosed in parentheses.
I.e., "(cv,csd,cm)" or "(cv,csd,csv,cm)".
The supplied tuple is expected to be enclosed in parentheses.
Any items of the tuple may be enclosed in double quotes.
White space is ignored (outside quoted strings".
tuple
- single string representation of the tuple enclosed in parentheses.DicomException
- if error in DICOM encodingpublic CodedSequenceItem(java.lang.String codeValue, java.lang.String codingSchemeDesignator, java.lang.String codeMeaning) throws DicomException
Construct a CodedSequenceItem
from string values for code value, scheme and meaning.
codeValue
- the code valuecodingSchemeDesignator
- the coding scheme designatorcodeMeaning
- the code meaningDicomException
- if error in DICOM encodingpublic CodedSequenceItem(java.lang.String codeValue, java.lang.String codingSchemeDesignator, java.lang.String codingSchemeVersion, java.lang.String codeMeaning) throws DicomException
Construct a CodedSequenceItem
from string values for code value, scheme, version and meaning.
codeValue
- the code valuecodingSchemeDesignator
- the coding scheme designatorcodingSchemeVersion
- the coding scheme versioncodeMeaning
- the code meaningDicomException
- if error in DICOM encodingpublic boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public static CodedSequenceItem[] getArrayOfCodedSequenceItemsOrNull(Attribute a)
Extract the items of a coded sequence attribute.
a
- the attributepublic static CodedSequenceItem[] getArrayOfCodedSequenceItemsOrNull(AttributeList list, AttributeTag tag)
Extract the items of a coded sequence attribute contained within a list of attributes.
list
- the list in which to look for the Sequence attributetag
- the tag of the Sequence attribute to extractpublic AttributeList getAttributeList()
Get the list of attributes in the CodedSequenceItem
.
CodedSequenceItem
public java.lang.String getCodeMeaning()
Get the code meaning.
public java.lang.String getCodeValue()
Get the code value.
public java.lang.String getCodingSchemeDesignator()
Get the coding scheme designator.
public java.lang.String getCodingSchemeVersion()
Get the coding scheme version.
public static int getItemNumberContainingCodeSequence(AttributeList list, AttributeTag sequenceAttributeTag, AttributeTag codedSequenceItemTag, CodedSequenceItem wanted)
Find the item of a SequenceAttribute in an AttributeList that contains a coded sequence attribute with a specified value.
list
- the AttributeList in which to look for the SequenceAttributesequenceAttributeTag
- the SequenceAttribute whose items are to be searchedcodedSequenceItemTag
- the CodedSequenceItem Attribute wantedwanted
- the value of the CodedSequenceItem wantedpublic static int getItemNumberContainingCodeSequence(SequenceAttribute a, AttributeTag codedSequenceItemTag, CodedSequenceItem wanted)
Find the item of a SequenceAttribute that contains a coded sequence attribute with a specified value.
a
- the SequenceAttribute whose items are to be searchedcodedSequenceItemTag
- the CodedSequenceItem Attribute wantedwanted
- the value of the CodedSequenceItem wantedpublic static CodedSequenceItem getSingleCodedSequenceItemOrNull(Attribute a)
Extract the first (hopefully only) item of a coded sequence attribute.
a
- the attributepublic static CodedSequenceItem getSingleCodedSequenceItemOrNull(AttributeList list, AttributeTag tag)
Extract the first (hopefully only) item of a coded sequence attribute contained within a list of attributes.
list
- the list in which to look for the Sequence attributetag
- the tag of the Sequence attribute to extractpublic int hashCode()
hashCode
in class java.lang.Object
public static SequenceAttribute newCodedSequenceAttribute(AttributeTag tag, CodedSequenceItem csi)
Create a single item coded sequence attribute.
tag
- the AttributeTag of the SequenceAttribute to createcsi
- the coded sequence itempublic static SequenceAttribute putSingleCodedSequenceAttribute(AttributeList list, AttributeTag tag, CodedSequenceItem csi)
Create a single item coded sequence attribute and add it to the list.
list
- the AttributeList to which to add the new SequenceAttributetag
- the AttributeTag of the SequenceAttribute to createcsi
- the coded sequence itempublic static void putSingleCodedSequenceItem(AttributeList list, AttributeTag tag, java.lang.String codeValue, java.lang.String codingSchemeDesignator, java.lang.String codeMeaning) throws DicomException
Create a single item coded sequence attribute and add it to the list.
list
- the AttributeList to which to add the new SequenceAttributetag
- the AttributeTag of the SequenceAttribute to createcodeValue
- the code valuecodingSchemeDesignator
- the coding scheme designatorcodeMeaning
- the code meaningDicomException
- if error in DICOM encodingpublic java.lang.String toString()
Get a String
representation of the contents of the CodedSequenceItem
.
toString
in class java.lang.Object
public java.lang.String toTabDelimitedString()
Get a tab-delimited String
representation of the contents of the CodedSequenceItem
.