|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.pixelmed.query.QueryTreeRecord
public class QueryTreeRecord
Instances of the QueryTreeRecord class represent
nodes in a tree of the QueryTreeModel class, which in
turn is used by the QueryTreeBrowser class.
This class is publically visible primarily so that selection change listeners can be
constructed for QueryTreeBrowser, since
the user's selection is returned as a path of QueryTreeRecord
instances, which need to be cast accordingly.
| Nested Class Summary | |
|---|---|
protected class |
QueryTreeRecord.OurResponseIdentifierHandler
|
| Field Summary | |
|---|---|
protected AttributeList |
allAttributesReturnedInIdentifier
|
protected List |
children
|
protected boolean |
childrenPopulated
|
protected int |
debugLevel
|
protected AttributeList |
filter
|
protected InformationEntity |
ie
|
protected int |
numberOfChildren
|
protected QueryTreeRecord |
parent
|
protected QueryInformationModel |
q
|
protected Attribute |
uniqueKey
|
protected AttributeList |
uniqueKeys
|
protected String |
value
|
| Constructor Summary | |
|---|---|
QueryTreeRecord(QueryInformationModel q,
AttributeList filter,
QueryTreeRecord parent,
String value,
InformationEntity ie,
Attribute uniqueKey,
AttributeList allAttributesReturnedInIdentifier,
int debugLevel)
Make a new node in a tree. |
|
| Method Summary | |
|---|---|
void |
addChild(QueryTreeRecord child)
Add a child to this nodes sorted collection of children. |
void |
addSibling(QueryTreeRecord sibling)
Add a sibling to this node, that is add a child to this node's parent's sorted collection of children. |
Enumeration |
children()
Returns the children of this node as an Enumeration. |
int |
compareTo(Object o)
Compare nodes based on the lexicographic order of their string values. |
boolean |
equals(Object o)
|
AttributeList |
getAllAttributesReturnedInIdentifier()
Get the list of all the DICOM attributes from the query response for this level of the query. |
boolean |
getAllowsChildren()
Always returns true, since children may always be added. |
TreeNode |
getChildAt(int index)
Returns the child at the specified index. |
int |
getChildCount()
Return the number of children that this node contains. |
int |
getIndex(TreeNode child)
Returns the index of the specified child from amongst this node's children, if present. |
InformationEntity |
getInformationEntity()
Get the information entity that this node represents. |
TreeNode |
getParent()
Returns the parent node of this node. |
protected InformationEntity |
getQueryLevelToPopulateChildren()
|
Attribute |
getUniqueKey()
Get the DICOM attribute that is the unique key at the level of this record. |
AttributeList |
getUniqueKeys()
Get the list of DICOM attributes, one for each unique key of each parent of this level as well as this level itself. |
String |
getValue()
Get the string value of the node which is used for sorting and human-readable rendering. |
boolean |
isLeaf()
Returns true if the receiver is a leaf (has no children). |
protected void |
populateChildren()
|
protected void |
populateChildrenIfRequired()
|
String |
toString()
Dump the string value of the node. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected QueryInformationModel q
protected AttributeList filter
protected int debugLevel
protected QueryTreeRecord parent
protected List children
protected InformationEntity ie
protected Attribute uniqueKey
protected AttributeList uniqueKeys
protected AttributeList allAttributesReturnedInIdentifier
protected String value
protected boolean childrenPopulated
protected int numberOfChildren
| Constructor Detail |
|---|
public QueryTreeRecord(QueryInformationModel q,
AttributeList filter,
QueryTreeRecord parent,
String value,
InformationEntity ie,
Attribute uniqueKey,
AttributeList allAttributesReturnedInIdentifier,
int debugLevel)
Make a new node in a tree.
q - the query information model to build the tree fromfilter - the query request identifier as a list of DICOM attributesparent - the parent of this nodevalue - a string value which is used primarily to sort siblings into lexicographic orderie - the entity in the DICOM information model that the constructed node is an instance ofuniqueKey - the DICOM attribute which is the unique key at the level of this recordallAttributesReturnedInIdentifier - a list of all the DICOM attributes from the query response for this level of a querydebugLevel - 0 is no debugging (silent), > 0 more verbose levels of debugging| Method Detail |
|---|
public String toString()
Dump the string value of the node.
toString in class Objectpublic int compareTo(Object o)
Compare nodes based on the lexicographic order of their string values.
Note that the comparison is more complex than a simple lexicographic comparison
of strings (as described in the definition of java.lang.String.compareTo(String)
but rather accounts for embedded non-zero padded integers. See com.pixelmed.utils.compareStringsWithEmbeddedNonZeroPaddedIntegers(String,String)
If the string values are equal but they do not have the same unique key, then an arbitrary but consistent order is return.
compareTo in interface Comparableo - the QueryTreeRecord
to compare this QueryTreeRecord against
public boolean equals(Object o)
equals in class Objecto - public TreeNode getParent()
Returns the parent node of this node.
getParent in interface TreeNodepublic TreeNode getChildAt(int index)
Returns the child at the specified index.
getChildAt in interface TreeNodeindex - the index of the child to be returned, numbered from 0
TreeNode at the specified indexpublic int getIndex(TreeNode child)
Returns the index of the specified child from amongst this node's children, if present.
getIndex in interface TreeNodechild - the child to search for amongst this node's children
public boolean getAllowsChildren()
Always returns true, since children may always be added.
getAllowsChildren in interface TreeNodepublic boolean isLeaf()
Returns true if the receiver is a leaf (has no children).
isLeaf in interface TreeNodeprotected void populateChildrenIfRequired()
public int getChildCount()
Return the number of children that this node contains.
getChildCount in interface TreeNodepublic Enumeration children()
Returns the children of this node as an Enumeration.
children in interface TreeNodeprotected InformationEntity getQueryLevelToPopulateChildren()
protected void populateChildren()
public void addChild(QueryTreeRecord child)
Add a child to this nodes sorted collection of children.
child - the child node to be added
public void addSibling(QueryTreeRecord sibling)
throws DicomException
Add a sibling to this node, that is add a child to this node's parent's sorted collection of children.
sibling - the sibling node to be added
DicomException - thrown if this node has no parentpublic String getValue()
Get the string value of the node which is used for sorting and human-readable rendering.
public InformationEntity getInformationEntity()
Get the information entity that this node represents.
public AttributeList getUniqueKeys()
Get the list of DICOM attributes, one for each unique key of each parent of this level as well as this level itself.
public Attribute getUniqueKey()
Get the DICOM attribute that is the unique key at the level of this record.
public AttributeList getAllAttributesReturnedInIdentifier()
Get the list of all the DICOM attributes from the query response for this level of the query.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||