com.pixelmed.dicom
Class DicomDirectoryRecord

java.lang.Object
  extended by com.pixelmed.dicom.DicomDirectoryRecord
All Implemented Interfaces:
Comparable, TreeNode
Direct Known Subclasses:
DicomDirectoryRecordFactory.ConcatenationDirectoryRecord, DicomDirectoryRecordFactory.EncapsulatedDocumentDirectoryRecord, DicomDirectoryRecordFactory.FiducialDirectoryRecord, DicomDirectoryRecordFactory.HL7StructuredDocumentDirectoryRecord, DicomDirectoryRecordFactory.ImageDirectoryRecord, DicomDirectoryRecordFactory.KODocumentDirectoryRecord, DicomDirectoryRecordFactory.PatientDirectoryRecord, DicomDirectoryRecordFactory.PresentationStateDirectoryRecord, DicomDirectoryRecordFactory.RawDataDirectoryRecord, DicomDirectoryRecordFactory.RealWorldValueMappingDirectoryRecord, DicomDirectoryRecordFactory.RegistrationDirectoryRecord, DicomDirectoryRecordFactory.RTDoseDirectoryRecord, DicomDirectoryRecordFactory.RTPlanDirectoryRecord, DicomDirectoryRecordFactory.RTStructureSetDirectoryRecord, DicomDirectoryRecordFactory.RTTreatmentRecordDirectoryRecord, DicomDirectoryRecordFactory.SeriesDirectoryRecord, DicomDirectoryRecordFactory.SpectroscopyDirectoryRecord, DicomDirectoryRecordFactory.SRDocumentDirectoryRecord, DicomDirectoryRecordFactory.StereometricRelationshipDirectoryRecord, DicomDirectoryRecordFactory.StudyDirectoryRecord, DicomDirectoryRecordFactory.TopDirectoryRecord, DicomDirectoryRecordFactory.UnrecognizedDirectoryRecord, DicomDirectoryRecordFactory.WaveformDirectoryRecord

public abstract class DicomDirectoryRecord
extends Object
implements Comparable, TreeNode


Field Summary
protected  int integerValue
           
protected  String stringValue
           
protected  String uid
           
 
Constructor Summary
DicomDirectoryRecord(DicomDirectoryRecord p, AttributeList l)
           
 
Method Summary
 void addChild(DicomDirectoryRecord child)
           
 void addSibling(DicomDirectoryRecord sibling)
           
 Enumeration children()
          Returns the children of this node as an Enumeration.
 int compareTo(Object o)
           
protected  int compareToByIntegerValue(DicomDirectoryRecord record, boolean mustBeSameObjectToBeEqual)
           
protected  int compareToByStringValue(DicomDirectoryRecord record, boolean mustBeSameObjectToBeEqual)
           
 boolean equals(Object o)
           
 boolean getAllowsChildren()
           Always returns true, since children may always be added.
 AttributeList getAttributeList()
           
 TreeNode getChildAt(int index)
          Returns the child at the specified index.
 int getChildCount()
          Return the number of children that this node contains.
 int getIndex(TreeNode child)
          Returns the index of the specified child from amongst this node's children, if present.
protected  int getIntegerValue()
           
 TreeNode getParent()
          Returns the parent node of this node.
protected  String getStringValue()
           
protected  String getUIDForComparison()
           
 boolean isLeaf()
           Returns true if the receiver is a leaf (has no children).
protected abstract  void makeIntegerValue()
           
protected abstract  void makeStringValue()
           
 void removeChild(DicomDirectoryRecord child)
           
 void setParent(DicomDirectoryRecord parent)
          Set the parent node of this node.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

uid

protected String uid

stringValue

protected String stringValue

integerValue

protected int integerValue
Constructor Detail

DicomDirectoryRecord

public DicomDirectoryRecord(DicomDirectoryRecord p,
                            AttributeList l)
Parameters:
p -
l -
Method Detail

compareTo

public int compareTo(Object o)
Specified by:
compareTo in interface Comparable
Parameters:
o -

equals

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

makeStringValue

protected abstract void makeStringValue()

makeIntegerValue

protected abstract void makeIntegerValue()

getStringValue

protected String getStringValue()

getIntegerValue

protected int getIntegerValue()

getUIDForComparison

protected final String getUIDForComparison()

compareToByStringValue

protected final int compareToByStringValue(DicomDirectoryRecord record,
                                           boolean mustBeSameObjectToBeEqual)
Parameters:
record -

compareToByIntegerValue

protected final int compareToByIntegerValue(DicomDirectoryRecord record,
                                            boolean mustBeSameObjectToBeEqual)
Parameters:
record -

getParent

public TreeNode getParent()

Returns the parent node of this node.

Specified by:
getParent in interface TreeNode
Returns:
the parent node, or null if the root

getChildAt

public TreeNode getChildAt(int index)

Returns the child at the specified index.

Specified by:
getChildAt in interface TreeNode
Parameters:
index - the index of the child to be returned, numbered from 0
Returns:
the child TreeNode at the specified index

getIndex

public int getIndex(TreeNode child)

Returns the index of the specified child from amongst this node's children, if present.

Specified by:
getIndex in interface TreeNode
Parameters:
child - the child to search for amongst this node's children
Returns:
the index of the child, or -1 if not present

getAllowsChildren

public boolean getAllowsChildren()

Always returns true, since children may always be added.

Specified by:
getAllowsChildren in interface TreeNode
Returns:
always true

isLeaf

public boolean isLeaf()

Returns true if the receiver is a leaf (has no children).

Specified by:
isLeaf in interface TreeNode
Returns:
true if the receiver is a leaf

getChildCount

public int getChildCount()

Return the number of children that this node contains.

Specified by:
getChildCount in interface TreeNode
Returns:
the number of children, 0 if none

children

public Enumeration children()

Returns the children of this node as an Enumeration.

Specified by:
children in interface TreeNode
Returns:
the children of this node

addChild

public void addChild(DicomDirectoryRecord child)
Parameters:
child -

removeChild

public void removeChild(DicomDirectoryRecord child)
Parameters:
child -

addSibling

public void addSibling(DicomDirectoryRecord sibling)
                throws DicomException
Parameters:
sibling -
Throws:
DicomException

setParent

public void setParent(DicomDirectoryRecord parent)

Set the parent node of this node.

Parameters:
parent -

getAttributeList

public AttributeList getAttributeList()