Package com.pixelmed.dicom
Class DicomDirectoryRecord
java.lang.Object
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
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addChild
(DicomDirectoryRecord child) void
addSibling
(DicomDirectoryRecord sibling) children()
int
protected final int
compareToByIntegerValue
(DicomDirectoryRecord record, boolean mustBeSameObjectToBeEqual) Compares this object with the specified directory record for order based on integer value.protected final int
compareToByStringValue
(DicomDirectoryRecord record, boolean mustBeSameObjectToBeEqual) Compares this object with the specified directory record for order based on string value.boolean
boolean
getChildAt
(int index) int
int
protected int
protected String
protected final String
boolean
isLeaf()
protected abstract void
Make the value that will be retured on a call togetIntegerValue()
.protected abstract void
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.
-
Field Details
-
uid
-
stringValue
-
integerValue
protected int integerValue
-
-
Constructor Details
-
DicomDirectoryRecord
- Parameters:
p
- directory recordl
- list of attributes
-
-
Method Details
-
compareTo
- Specified by:
compareTo
in interfaceComparable
-
equals
-
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
- 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
- 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
-
getChildAt
- Specified by:
getChildAt
in interfaceTreeNode
-
getIndex
-
getAllowsChildren
public boolean getAllowsChildren()- Specified by:
getAllowsChildren
in interfaceTreeNode
-
isLeaf
public boolean isLeaf() -
getChildCount
public int getChildCount()- Specified by:
getChildCount
in interfaceTreeNode
-
children
-
addChild
- Parameters:
child
- child directory record to add
-
removeChild
- Parameters:
child
- child directory record to remove
-
addSibling
- Parameters:
sibling
- sibling to add- Throws:
DicomException
- if no parent
-
setParent
Set the parent node of this node.
- Parameters:
parent
- parent directory record
-
getAttributeList
- Returns:
- a list of attributes for this directory record
-