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`

public abstract class DicomDirectoryRecord extends Object implements Comparable, TreeNode

## Field Summary

Fields
Modifier and Type
Field
Description
`protected int`
`integerValue`
`protected String`
`stringValue`
`protected String`
`uid`

## Constructor Summary

Constructors
Constructor
Description
`DicomDirectoryRecord(DicomDirectoryRecord p, AttributeList l)`

## Method Summary

Modifier and Type
Method
Description
`void`
`addChild(DicomDirectoryRecord child)`
`void`
`addSibling(DicomDirectoryRecord sibling)`
`Enumeration`
`children()`
`int`
`compareTo(Object o)`
`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`
`equals(Object o)`
`boolean`
`getAllowsChildren()`
`AttributeList`
`getAttributeList()`
`TreeNode`
`getChildAt(int index)`
`int`
`getChildCount()`
`int`
`getIndex(TreeNode child)`
`protected int`
`getIntegerValue()`
`TreeNode`
`getParent()`
`protected String`
`getStringValue()`
`protected final String`
`getUIDForComparison()`
`boolean`
`isLeaf()`
`protected abstract void`
`makeIntegerValue()`
Make the value that will be retured on a call to `getIntegerValue()`.
`protected abstract void`
`makeStringValue()`
Make the value that will be retured on a call to `getStringValue()`.
`void`
`removeChild(DicomDirectoryRecord child)`
`void`
`setParent(DicomDirectoryRecord parent)`
Set the parent node of this node.

### Methods inherited from class java.lang.Object

`clone, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### uid

protected String uid

### stringValue

protected String stringValue

### integerValue

protected int integerValue

## Constructor Details

### DicomDirectoryRecord

public DicomDirectoryRecord(DicomDirectoryRecord p, AttributeList l)

Parameters:
  `p` - directory record
  `l` - list of attributes

## Method Details

### compareTo

public int compareTo(Object o)

Specified by:
  `compareTo` in interface `Comparable`

### equals

public boolean equals(Object o)

Overrides:
  `equals` in class `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 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 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 with
  `mustBeSameObjectToBeEqual` - 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 with
  `mustBeSameObjectToBeEqual` - 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 TreeNode getParent()

Specified by:
  `getParent` in interface `TreeNode`

### getChildAt

public TreeNode getChildAt(int index)

Specified by:
  `getChildAt` in interface `TreeNode`

### getIndex

public int getIndex(TreeNode child)

Specified by:
  `getIndex` in interface `TreeNode`

### getAllowsChildren

public boolean getAllowsChildren()

Specified by:
  `getAllowsChildren` in interface `TreeNode`

### isLeaf

public boolean isLeaf()

Specified by:
  `isLeaf` in interface `TreeNode`

### getChildCount

public int getChildCount()

Specified by:
  `getChildCount` in interface `TreeNode`

### children

public Enumeration children()

Specified by:
  `children` in interface `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