com.pixelmed.dicom
Class CodedSequenceItem

java.lang.Object
  extended by com.pixelmed.dicom.CodedSequenceItem

public class CodedSequenceItem
extends Object

A class to encapsulate the attributes contained within a Sequence Item that represents a Coded Sequence item.


Field Summary
protected  AttributeList list
           
 
Constructor Summary
CodedSequenceItem(AttributeList l)
          Construct a CodedSequenceItem from a list of attributes.
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.
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

list

protected AttributeList list
Constructor Detail

CodedSequenceItem

public CodedSequenceItem(AttributeList l)

Construct a CodedSequenceItem from a list of attributes.

Parameters:
l - the list of attributes to include in the item

CodedSequenceItem

public CodedSequenceItem(String codeValue,
                         String codingSchemeDesignator,
                         String codeMeaning)
                  throws DicomException

Construct a CodedSequenceItem from string values for code value, scheme and meaning.

Parameters:
codeValue -
codingSchemeDesignator -
codeMeaning -
Throws:
DicomException

CodedSequenceItem

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.

Parameters:
codeValue -
codingSchemeDesignator -
codingSchemeVersion -
codeMeaning -
Throws:
DicomException
Method Detail

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

getAttributeList

public AttributeList getAttributeList()

Get the list of attributes in the CodedSequenceItem.

Returns:
all the attributes in the CodedSequenceItem

getCodeValue

public String getCodeValue()

Get the code value.

Returns:
a string containing the code value, or an empty string if none

getCodingSchemeDesignator

public String getCodingSchemeDesignator()

Get the coding scheme designator.

Returns:
a string containing the coding scheme designator, or an empty string if none

getCodingSchemeVersion

public String getCodingSchemeVersion()

Get the coding scheme version.

Returns:
a string containing the coding scheme version, or an empty string if none

getCodeMeaning

public String getCodeMeaning()

Get the code meaning.

Returns:
a string containing the code meaning, or an empty string if none

toString

public String toString()

Get a String representation of the contents of the CodedSequenceItem.

Overrides:
toString in class Object
Returns:
a string containing the code value, coding scheme designator, coding scheme version (if present) and code meaning values

getSingleCodedSequenceItemOrNull

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.

Parameters:
list - the list in which to look for the Sequence attribute
tag - the tag of the Sequence attribute to extract
Returns:
the (first) coded sequence item if found, otherwise null

getSingleCodedSequenceItemOrNull

public static CodedSequenceItem getSingleCodedSequenceItemOrNull(Attribute a)

Extract the first (hopefully only) item of a coded sequence attribute.

Parameters:
a - the attribute
Returns:
the (first) coded sequence item if found, otherwise null

getArrayOfCodedSequenceItemsOrNull

public static CodedSequenceItem[] getArrayOfCodedSequenceItemsOrNull(AttributeList list,
                                                                     AttributeTag tag)

Extract the items of a coded sequence attribute contained within a list of attributes.

Parameters:
list - the list in which to look for the Sequence attribute
tag - the tag of the Sequence attribute to extract
Returns:
the coded sequence items if found, otherwise null

getArrayOfCodedSequenceItemsOrNull

public static CodedSequenceItem[] getArrayOfCodedSequenceItemsOrNull(Attribute a)

Extract the items of a coded sequence attribute.

Parameters:
a - the attribute
Returns:
the coded sequence items if found, otherwise null