cz.cuni.versatile.api
Interface TreeTaxonomy

All Superinterfaces:
ControlledVocabulary, OrderProperty, Property, RelationalProperty, Taxonomy

public interface TreeTaxonomy
extends Taxonomy

A specialized tree taxonomy. Each node except the root has exactly one parent.

Author:
Jaroslav Gergic

Method Summary
 java.util.List getAncestorChain(java.lang.Object entry)
          Returns a list ancestors ordered bottom-up starting from the entry node.
 java.util.Iterator getAncestorIterator(java.lang.Object entry)
          Iterate over the ancestor list bottom-up starting from the entry node.
 java.lang.Object getParent(java.lang.Object entry)
          Returns the parent of the context node.
 
Methods inherited from interface cz.cuni.versatile.api.Taxonomy
getAncestorIterator, getAncestors, getChildren, getDescendants, getLCA, getParents, getRoot, isAncestor, isChild, isDescendant, isParent, isRoot
 
Methods inherited from interface cz.cuni.versatile.api.ControlledVocabulary
getValueSet, iterator
 
Methods inherited from interface cz.cuni.versatile.api.Property
getLocalName, getNamespace, getSeparator, getType, getUniqueName
 
Methods inherited from interface cz.cuni.versatile.api.OrderProperty
comparable, comparator, isPartialOrder, isStrictOrder, isTotalOrder
 
Methods inherited from interface cz.cuni.versatile.api.RelationalProperty
contains, isAntisymmetric, isAsymetric, isIrreflexive, isReflexive, isSymmetric, isTransitive
 

Method Detail

getParent

public java.lang.Object getParent(java.lang.Object entry)
Returns the parent of the context node.

Parameters:
entry - a context node to compare to
Returns:
the parent of the entry node, null in case of the root node.

getAncestorChain

public java.util.List getAncestorChain(java.lang.Object entry)
Returns a list ancestors ordered bottom-up starting from the entry node.
Remarks: the entry node is not included.

Parameters:
entry - a context node to start from
Returns:
an ancestor List ordered bottom-up starting with the entry node.

getAncestorIterator

public java.util.Iterator getAncestorIterator(java.lang.Object entry)
Iterate over the ancestor list bottom-up starting from the entry node.
Remarks: the entry node is not included.

Parameters:
entry - a context node to start from
Returns:
Iterator returning elements in bottom-up order