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
`protected int` `integerValue`
`protected java.lang.String` `stringValue`
`protected java.lang.String` `uid`

### Constructor Summary

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

### Method Summary

Methods
`void` `addChild(DicomDirectoryRecord child)`
`void` `addSibling(DicomDirectoryRecord sibling)`
`java.util.Enumeration` `children()` Returns the children of this node as an `Enumeration`.
`int` `compareTo(java.lang.Object o)`
`protected int` `compareToByIntegerValue(DicomDirectoryRecord record, boolean mustBeSameObjectToBeEqual)`
`protected int` `compareToByStringValue(DicomDirectoryRecord record, boolean mustBeSameObjectToBeEqual)`
`boolean` `equals(java.lang.Object o)`
`boolean` `getAllowsChildren()` Always returns true, since children may always be added.
`AttributeList` `getAttributeList()`
`javax.swing.tree.TreeNode` `getChildAt(int index)` Returns the child at the specified index.
`int` `getChildCount()` Return the number of children that this node contains.
`int` `getIndex(javax.swing.tree.TreeNode child)` Returns the index of the specified child from amongst this node's children, if present.
`protected int` `getIntegerValue()`
`javax.swing.tree.TreeNode` `getParent()` Returns the parent node of this node.
`protected java.lang.String` `getStringValue()`
`protected java.lang.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 java.lang.String uid

#### stringValue

    protected java.lang.String stringValue

#### integerValue

    protected int integerValue

### Constructor Detail

#### DicomDirectoryRecord

    public DicomDirectoryRecord(DicomDirectoryRecord p,
                        AttributeList l)

Parameters:
  `p` -
  `l` -

### Method Detail

#### compareTo

    public int compareTo(java.lang.Object o)

Specified by:
  `compareTo` in interface `java.lang.Comparable`
Parameters:
  `o` -

#### equals

    public boolean equals(java.lang.Object o)

Overrides:
  `equals` in class `java.lang.Object`
Parameters:
  `o` -

#### makeStringValue

    protected abstract void makeStringValue()

#### makeIntegerValue

    protected abstract void makeIntegerValue()

#### getStringValue

    protected java.lang.String getStringValue()

#### getIntegerValue

    protected int getIntegerValue()

#### getUIDForComparison

    protected final java.lang.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 javax.swing.tree.TreeNode getParent()

Returns the parent node of this node.

Specified by:
  `getParent` in interface `javax.swing.tree.TreeNode`
Returns:
  the parent node, or null if the root

#### getChildAt

    public javax.swing.tree.TreeNode getChildAt(int index)

Returns the child at the specified index.

Specified by:
  `getChildAt` in interface `javax.swing.tree.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(javax.swing.tree.TreeNode child)

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

Specified by:
  `getIndex` in interface `javax.swing.tree.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 `javax.swing.tree.TreeNode`
Returns:
  always true

#### isLeaf

    public boolean isLeaf()

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

Specified by:
  `isLeaf` in interface `javax.swing.tree.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 `javax.swing.tree.TreeNode`
Returns:
  the number of children, 0 if none

#### children

    public java.util.Enumeration children()

Returns the children of this node as an `Enumeration`.

Specified by:
  `children` in interface `javax.swing.tree.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()