|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A taxonomy property. Taxonomy represents a hierarchical structure of concepts and sub-concepts (terms/sub-terms).
<
) than all its ancestors.
TreeTaxonomy
Method Summary | |
java.util.Iterator |
getAncestorIterator(java.lang.Object entry,
java.util.Comparator cmp)
Iterate over the ancestor hierarchy bottom-up in a well-defined (deterministic) order. |
java.util.Set |
getAncestors(java.lang.Object entry)
Returns ancestors of the context node. |
java.util.Set |
getChildren(java.lang.Object entry)
Returns children of the context node. |
java.util.Set |
getDescendants(java.lang.Object entry)
Returns descendants of the context node. |
java.lang.Object |
getLCA(java.lang.Object[] entries)
Least Common Ancestor (LCA). |
java.util.Set |
getParents(java.lang.Object entry)
Returns parents of the context node. |
java.lang.Object |
getRoot()
Returns the root of the taxonomy. |
boolean |
isAncestor(java.lang.Object entry,
java.lang.Object descendant)
Ancestry check. |
boolean |
isChild(java.lang.Object entry,
java.lang.Object parent)
Child check. |
boolean |
isDescendant(java.lang.Object entry,
java.lang.Object ancestor)
Descendancy check. |
boolean |
isParent(java.lang.Object entry,
java.lang.Object child)
Parent check. |
boolean |
isRoot(java.lang.Object entry)
Checks whether a given value is the taxonomy root. |
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 |
public java.lang.Object getRoot()
public java.util.Set getParents(java.lang.Object entry)
entry
- a context node to compare to
Set
of parents of the context nodepublic java.util.Set getChildren(java.lang.Object entry)
entry
- a context node to compare to
Set
of children of the context nodepublic java.util.Set getAncestors(java.lang.Object entry)
entry
- a context node to compare to
Set
of ancestors of the context nodepublic java.util.Set getDescendants(java.lang.Object entry)
entry
- a context node to compare to
Set
of descendants of the context nodepublic boolean isRoot(java.lang.Object entry)
getRoot().equals(entry)
entry
- a context node to compare to
true
if a given node is the taxonomy root, false
otherwisepublic boolean isParent(java.lang.Object entry, java.lang.Object child)
entry
- a context node to compare tochild
- a test node to compare to
true
if entry is a parent of child, false
otherwisepublic boolean isChild(java.lang.Object entry, java.lang.Object parent)
entry
- a context node to compare toparent
- a test node to compare to
true
if entry is a child of parent, false
otherwisepublic boolean isAncestor(java.lang.Object entry, java.lang.Object descendant)
isParent
relation.)
entry
- a context node to compare todescendant
- a test node to compare to
true
if entry is an ancestor of descendant, false
otherwisepublic boolean isDescendant(java.lang.Object entry, java.lang.Object ancestor)
isChild
relation.)
entry
- a context node to compare toancestor
- a test node to compare to
true
if entry is an descendant of ancestor, false
otherwisepublic java.lang.Object getLCA(java.lang.Object[] entries)
entries
- an array of nodes
public java.util.Iterator getAncestorIterator(java.lang.Object entry, java.util.Comparator cmp)
Comparator
(the secondary order)
entry
- a context node to start fromcmp
- an comparator to define the secondary order.
Iterator
RelationalOperatorsRegistry.getTotalOrder(String)
,
OrderProperty.comparator()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |