org.semanticweb.elk.reasoner.taxonomy
Class SingletoneInstanceTaxonomy<T extends ElkObject,I extends ElkObject,N extends OrphanTypeNode<T,I>>

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

public class SingletoneInstanceTaxonomy<T extends ElkObject,I extends ElkObject,N extends OrphanTypeNode<T,I>>
extends SingletoneTaxonomy<T,N>
implements InstanceTaxonomy<T,I>

An InstanceTaxonomy consisting of a single TypeNode = top node = bottom node, which has a single InstanceNode. Typically, this is used to represent an inconsistent InstanceTaxonomy.

Author:
"Yevgeny Kazakov", "Yevgeny Kazakov"

Constructor Summary
SingletoneInstanceTaxonomy(N node)
           
 
Method Summary
 TypeNode<T,I> getBottomNode()
           
 InstanceNode<T,I> getInstanceNode(I elkObject)
           
 Set<? extends InstanceNode<T,I>> getInstanceNodes()
          Obtain an unmodifiable Set of all instance nodes in this taxonomy.
 TypeNode<T,I> getTopNode()
           
 TypeNode<T,I> getTypeNode(T elkObject)
           
 Set<? extends TypeNode<T,I>> getTypeNodes()
          Obtain an unmodifiable Set of all type nodes in this taxonomy.
 
Methods inherited from class org.semanticweb.elk.reasoner.taxonomy.SingletoneTaxonomy
getNode, getNodes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.semanticweb.elk.reasoner.taxonomy.model.Taxonomy
getNode, getNodes
 

Constructor Detail

SingletoneInstanceTaxonomy

public SingletoneInstanceTaxonomy(N node)
Method Detail

getTopNode

public TypeNode<T,I> getTopNode()
Specified by:
getTopNode in interface InstanceTaxonomy<T extends ElkObject,I extends ElkObject>
Specified by:
getTopNode in interface Taxonomy<T extends ElkObject>
Overrides:
getTopNode in class SingletoneTaxonomy<T extends ElkObject,N extends OrphanTypeNode<T,I>>
Returns:
the node of this taxonomy that has no parent nodes

getBottomNode

public TypeNode<T,I> getBottomNode()
Specified by:
getBottomNode in interface InstanceTaxonomy<T extends ElkObject,I extends ElkObject>
Specified by:
getBottomNode in interface Taxonomy<T extends ElkObject>
Overrides:
getBottomNode in class SingletoneTaxonomy<T extends ElkObject,N extends OrphanTypeNode<T,I>>
Returns:
the node of this taxonomy that has no child nodes

getTypeNode

public TypeNode<T,I> getTypeNode(T elkObject)
Specified by:
getTypeNode in interface InstanceTaxonomy<T extends ElkObject,I extends ElkObject>
Parameters:
elkObject - ElkObject for which the TypeNode to be computed
Returns:
the TypeNode containing the given ElkObject as a member, or null if the input does not occur in the taxonomy

getTypeNodes

public Set<? extends TypeNode<T,I>> getTypeNodes()
Description copied from interface: InstanceTaxonomy
Obtain an unmodifiable Set of all type nodes in this taxonomy.

Specified by:
getTypeNodes in interface InstanceTaxonomy<T extends ElkObject,I extends ElkObject>
Returns:
an unmodifiable Set

getInstanceNode

public InstanceNode<T,I> getInstanceNode(I elkObject)
Specified by:
getInstanceNode in interface InstanceTaxonomy<T extends ElkObject,I extends ElkObject>
Parameters:
elkObject - ElkObject for which the InstanceNode to be computed
Returns:
the InstanceNode containing the given ElkObject as a member, or null if the input does not occur in the taxonomy

getInstanceNodes

public Set<? extends InstanceNode<T,I>> getInstanceNodes()
Description copied from interface: InstanceTaxonomy
Obtain an unmodifiable Set of all instance nodes in this taxonomy.

Specified by:
getInstanceNodes in interface InstanceTaxonomy<T extends ElkObject,I extends ElkObject>
Returns:
an unmodifiable Set


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