public abstract class DicomDirectoryRecord extends Object implements Comparable, TreeNode
Modifier and Type | Field and Description |
---|---|
protected int |
integerValue |
protected String |
stringValue |
protected String |
uid |
Constructor and Description |
---|
DicomDirectoryRecord(DicomDirectoryRecord p,
AttributeList l) |
Modifier and Type | Method and Description |
---|---|
void |
addChild(DicomDirectoryRecord child) |
void |
addSibling(DicomDirectoryRecord sibling) |
Enumeration |
children() |
int |
compareTo(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(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 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 String stringValue
protected 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 Enumeration children()
public int compareTo(Object o)
compareTo
in interface 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 getAllowsChildren()
getAllowsChildren
in interface TreeNode
public AttributeList getAttributeList()
public TreeNode getChildAt(int index)
getChildAt
in interface TreeNode
public int getChildCount()
getChildCount
in interface TreeNode
protected int getIntegerValue()
protected String getStringValue()
String
describing this directory record containing identifiers, dates, etc.protected final String getUIDForComparison()
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