Package com.pixelmed.dicom
Class DicomDirectoryRecord
- java.lang.Object
-
- com.pixelmed.dicom.DicomDirectoryRecord
-
- All Implemented Interfaces:
java.lang.Comparable
,javax.swing.tree.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 java.lang.Object implements java.lang.Comparable, javax.swing.tree.TreeNode
-
-
Field Summary
Fields Modifier and Type Field Description protected int
integerValue
protected java.lang.String
stringValue
protected java.lang.String
uid
-
Constructor Summary
Constructors Constructor Description DicomDirectoryRecord(DicomDirectoryRecord p, AttributeList l)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addChild(DicomDirectoryRecord child)
void
addSibling(DicomDirectoryRecord sibling)
java.util.Enumeration
children()
int
compareTo(java.lang.Object o)
protected int
compareToByIntegerValue(DicomDirectoryRecord record, boolean mustBeSameObjectToBeEqual)
Compares this object with the specified directory record for order based on integer value.protected int
compareToByStringValue(DicomDirectoryRecord record, boolean mustBeSameObjectToBeEqual)
Compares this object with the specified directory record for order based on string value.boolean
equals(java.lang.Object o)
boolean
getAllowsChildren()
AttributeList
getAttributeList()
javax.swing.tree.TreeNode
getChildAt(int index)
int
getChildCount()
int
getIndex(javax.swing.tree.TreeNode child)
protected int
getIntegerValue()
javax.swing.tree.TreeNode
getParent()
protected java.lang.String
getStringValue()
protected java.lang.String
getUIDForComparison()
boolean
isLeaf()
protected abstract void
makeIntegerValue()
Make the value that will be retured on a call togetIntegerValue()
.protected abstract void
makeStringValue()
Make the value that will be retured on a call togetStringValue()
.void
removeChild(DicomDirectoryRecord child)
void
setParent(DicomDirectoryRecord parent)
Set the parent node of this node.
-
-
-
Constructor Detail
-
DicomDirectoryRecord
public DicomDirectoryRecord(DicomDirectoryRecord p, AttributeList l)
- Parameters:
p
- directory recordl
- list of attributes
-
-
Method Detail
-
compareTo
public int compareTo(java.lang.Object o)
- Specified by:
compareTo
in interfacejava.lang.Comparable
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
makeStringValue
protected abstract void makeStringValue()
Make the value that will be retured on a call to
getStringValue()
.
-
makeIntegerValue
protected abstract void makeIntegerValue()
Make the value that will be retured on a call to
getIntegerValue()
.
-
getStringValue
protected java.lang.String getStringValue()
- Returns:
- a
String
describing this directory record containing identifiers, dates, etc.
-
getIntegerValue
protected int getIntegerValue()
- Returns:
- an integer describing this directory record derived from an appropriate number for the entity that the record represents
-
getUIDForComparison
protected final java.lang.String getUIDForComparison()
- Returns:
- the uid for the entity that the directory record represents
-
compareToByStringValue
protected final int compareToByStringValue(DicomDirectoryRecord record, boolean mustBeSameObjectToBeEqual)
Compares this object with the specified directory record for order based on string value.
Considers whether same record type, same string value, and if so, orders by UID.
- Parameters:
record
- the directory record to compare withmustBeSameObjectToBeEqual
- if true requires them to be the same Java object, not just the same UID- Returns:
- a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the directory record.
-
compareToByIntegerValue
protected final int compareToByIntegerValue(DicomDirectoryRecord record, boolean mustBeSameObjectToBeEqual)
Compares this object with the specified directory record for order based on integer value.
Considers whether same record type, same integer value, and if so orders by string value, then by UID.
- Parameters:
record
- the directory record to compare withmustBeSameObjectToBeEqual
- if true requires them to be the same Java object, not just the same UID- Returns:
- a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the directory record.
-
getParent
public javax.swing.tree.TreeNode getParent()
- Specified by:
getParent
in interfacejavax.swing.tree.TreeNode
-
getChildAt
public javax.swing.tree.TreeNode getChildAt(int index)
- Specified by:
getChildAt
in interfacejavax.swing.tree.TreeNode
-
getIndex
public int getIndex(javax.swing.tree.TreeNode child)
- Specified by:
getIndex
in interfacejavax.swing.tree.TreeNode
-
getAllowsChildren
public boolean getAllowsChildren()
- Specified by:
getAllowsChildren
in interfacejavax.swing.tree.TreeNode
-
isLeaf
public boolean isLeaf()
- Specified by:
isLeaf
in interfacejavax.swing.tree.TreeNode
-
getChildCount
public int getChildCount()
- Specified by:
getChildCount
in interfacejavax.swing.tree.TreeNode
-
children
public java.util.Enumeration children()
- Specified by:
children
in interfacejavax.swing.tree.TreeNode
-
addChild
public void addChild(DicomDirectoryRecord child)
- Parameters:
child
- child directory record to add
-
removeChild
public void removeChild(DicomDirectoryRecord child)
- Parameters:
child
- child directory record to remove
-
addSibling
public void addSibling(DicomDirectoryRecord sibling) throws DicomException
- Parameters:
sibling
- sibling to add- Throws:
DicomException
- if no parent
-
setParent
public void setParent(DicomDirectoryRecord parent)
Set the parent node of this node.
- Parameters:
parent
- parent directory record
-
getAttributeList
public AttributeList getAttributeList()
- Returns:
- a list of attributes for this directory record
-
-