org.semanticweb.elk.reasoner.taxonomy
Class SingletoneTaxonomy<T extends ElkObject,N extends OrphanNode<T>>

java.lang.Object
  extended by org.semanticweb.elk.reasoner.taxonomy.SingletoneTaxonomy<T,N>
Type Parameters:
T - the type of objects stored in this taxonomy
N - the type of the node of this taxonomy
All Implemented Interfaces:
Taxonomy<T>
Direct Known Subclasses:
SingletoneInstanceTaxonomy

public class SingletoneTaxonomy<T extends ElkObject,N extends OrphanNode<T>>
extends Object
implements Taxonomy<T>

A Taxonomy consisting of a single node = top node = bottom node. Typically, this is used to represent an inconsistent taxonomy.

Author:
"Yevgeny Kazakov"
See Also:
OrphanNode

Constructor Summary
SingletoneTaxonomy(N node)
          Constructs a SingletoneTaxonomy containing the given OrphanNode
 
Method Summary
 TaxonomyNode<T> getBottomNode()
           
 TaxonomyNode<T> getNode(T elkObject)
          Returns the TaxonomyNode containing the given ElkObject as a member or null if the input does not occur in the taxonomy.
 Set<? extends TaxonomyNode<T>> getNodes()
          Obtain an unmodifiable Set of all nodes in this taxonomy.
 TaxonomyNode<T> getTopNode()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SingletoneTaxonomy

public SingletoneTaxonomy(N node)
Constructs a SingletoneTaxonomy containing the given OrphanNode

Parameters:
node -
Method Detail

getNode

public TaxonomyNode<T> getNode(T elkObject)
Description copied from interface: Taxonomy
Returns the TaxonomyNode containing the given ElkObject as a member or null if the input does not occur in the taxonomy.

Specified by:
getNode in interface Taxonomy<T extends ElkObject>
Parameters:
elkObject - the ElkObject for which to return the TaxonomyNode
Returns:
the TaxonomyNode for the specified input ElkObject

getNodes

public Set<? extends TaxonomyNode<T>> getNodes()
Description copied from interface: Taxonomy
Obtain an unmodifiable Set of all nodes in this taxonomy.

Specified by:
getNodes in interface Taxonomy<T extends ElkObject>
Returns:
an unmodifiable Collection

getTopNode

public TaxonomyNode<T> getTopNode()
Specified by:
getTopNode in interface Taxonomy<T extends ElkObject>
Returns:
the node of this taxonomy that has no parent nodes

getBottomNode

public TaxonomyNode<T> getBottomNode()
Specified by:
getBottomNode in interface Taxonomy<T extends ElkObject>
Returns:
the node of this taxonomy that has no child nodes


Copyright © 2011-2013 Department of Computer Science, University of Oxford. All Rights Reserved.