public class CodedSequenceItem extends 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(String tuple)
Construct a
CodedSequenceItem from a single string representation of the tuple enclosed in parentheses. |
CodedSequenceItem(String codeValue,
String codingSchemeDesignator,
String codeMeaning)
Construct a
CodedSequenceItem from string values for code value, scheme and meaning. |
CodedSequenceItem(String codeValue,
String codingSchemeDesignator,
String codingSchemeVersion,
String codeMeaning)
Construct a
CodedSequenceItem from string values for code value, scheme, version and meaning. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(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 . |
String |
getCodeMeaning()
Get the code meaning.
|
String |
getCodeValue()
Get the code value.
|
String |
getCodingSchemeDesignator()
Get the coding scheme designator.
|
String |
getCodingSchemeVersion()
Get the coding scheme version.
|
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() |
String |
toString()
Get a
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(String codeValue, String codingSchemeDesignator, String codeMeaning) throws DicomException
Construct a CodedSequenceItem
from string values for code value, scheme and meaning.
codeValue
- codingSchemeDesignator
- codeMeaning
- DicomException
public CodedSequenceItem(String codeValue, String codingSchemeDesignator, String codingSchemeVersion, String codeMeaning) throws DicomException
Construct a CodedSequenceItem
from string values for code value, scheme, version and meaning.
codeValue
- codingSchemeDesignator
- codingSchemeVersion
- codeMeaning
- DicomException
public CodedSequenceItem(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
- DicomException
public AttributeList getAttributeList()
Get the list of attributes in the CodedSequenceItem
.
CodedSequenceItem
public String getCodeValue()
Get the code value.
public String getCodingSchemeDesignator()
Get the coding scheme designator.
public String getCodingSchemeVersion()
Get the coding scheme version.
public String getCodeMeaning()
Get the code meaning.
public String toString()
Get a String
representation of the contents of the CodedSequenceItem
.
public 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 static CodedSequenceItem getSingleCodedSequenceItemOrNull(Attribute a)
Extract the first (hopefully only) item 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 static CodedSequenceItem[] getArrayOfCodedSequenceItemsOrNull(Attribute a)
Extract the items of a coded sequence attribute.
a
- the attribute