public abstract class DicomDirectoryRecord
extends java.lang.Object
implements java.lang.Comparable, javax.swing.tree.TreeNode
Modifier and Type | Field and Description |
---|---|
protected int |
integerValue |
protected java.lang.String |
stringValue |
protected java.lang.String |
uid |
Constructor and Description |
---|
DicomDirectoryRecord(DicomDirectoryRecord p,
AttributeList l) |
Modifier and Type | Method and 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 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.
|
protected int integerValue
protected java.lang.String stringValue
protected java.lang.String uid
public DicomDirectoryRecord(DicomDirectoryRecord p, AttributeList l)
p
- directory recordl
- list of attributespublic void addChild(DicomDirectoryRecord child)
child
- child directory record to addpublic void addSibling(DicomDirectoryRecord sibling) throws DicomException
sibling
- sibling to addDicomException
- if no parentpublic java.util.Enumeration children()
children
in interface javax.swing.tree.TreeNode
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
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.
record
- the directory record to compare withmustBeSameObjectToBeEqual
- if true requires them to be the same Java object, not just the same UIDprotected 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.
record
- the directory record to compare withmustBeSameObjectToBeEqual
- if true requires them to be the same Java object, not just the same UIDpublic boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public boolean getAllowsChildren()
getAllowsChildren
in interface javax.swing.tree.TreeNode
public AttributeList getAttributeList()
public javax.swing.tree.TreeNode getChildAt(int index)
getChildAt
in interface javax.swing.tree.TreeNode
public int getChildCount()
getChildCount
in interface javax.swing.tree.TreeNode
public int getIndex(javax.swing.tree.TreeNode child)
getIndex
in interface javax.swing.tree.TreeNode
protected int getIntegerValue()
public javax.swing.tree.TreeNode getParent()
getParent
in interface javax.swing.tree.TreeNode
protected java.lang.String getStringValue()
String
describing this directory record containing identifiers, dates, etc.protected final java.lang.String getUIDForComparison()
public boolean isLeaf()
isLeaf
in interface javax.swing.tree.TreeNode
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()
.
public void removeChild(DicomDirectoryRecord child)
child
- child directory record to removepublic void setParent(DicomDirectoryRecord parent)
Set the parent node of this node.
parent
- parent directory record