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

java.lang.Object
  extended by org.semanticweb.elk.reasoner.taxonomy.OrphanNode<T>
Type Parameters:
T - the type of objects stored in the nodes
All Implemented Interfaces:
Node<T>, TaxonomyNode<T>
Direct Known Subclasses:
OrphanInstanceNode, OrphanTypeNode

public class OrphanNode<T extends ElkObject>
extends Object
implements TaxonomyNode<T>

A TaxonomyNode that does not have any super nodes or sub nodes.

Author:
"Yevgeny Kazakov"
See Also:
SingletoneTaxonomy

Constructor Summary
OrphanNode(Set<T> members, T canonical)
           
 
Method Summary
 Set<? extends TaxonomyNode<T>> getAllSubNodes()
          Computes an unmodifiable set of nodes for ElkObjects that are (possibly indirect) sub-objects of members of this Node.
 Set<? extends TaxonomyNode<T>> getAllSuperNodes()
          Computes an unmodifiable set of nodes for ElkObjects that are (possibly indirect) super-objects of members of this Node.
 T getCanonicalMember()
          Get one object to canonically represent the classes in this Node.
 Set<? extends TaxonomyNode<T>> getDirectSubNodes()
          Get an unmodifiable set of nodes for ElkObjects that are direct sub-objects of this Node.
 Set<? extends TaxonomyNode<T>> getDirectSuperNodes()
          Get an unmodifiable set of nodes for ElkObjects that are direct super-objects of this Node.
 Set<T> getMembers()
          Get an unmodifiable set of objects that this Node represents.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OrphanNode

public OrphanNode(Set<T> members,
                  T canonical)
Method Detail

getMembers

public Set<T> getMembers()
Description copied from interface: Node
Get an unmodifiable set of objects that this Node represents. The membership in this set is checked using the structural equality.

Specified by:
getMembers in interface Node<T extends ElkObject>
Returns:
collection of logically equivalent objects

getCanonicalMember

public T getCanonicalMember()
Description copied from interface: Node
Get one object to canonically represent the classes in this Node. It is guaranteed that the least object is the least one according to the ordering defined by PredefinedElkIri.compare(). TODO The above remark is a bit mysterious. Does the interface really make such guarantees?

Specified by:
getCanonicalMember in interface Node<T extends ElkObject>
Returns:
canonical object

getDirectSuperNodes

public Set<? extends TaxonomyNode<T>> getDirectSuperNodes()
Description copied from interface: TaxonomyNode
Get an unmodifiable set of nodes for ElkObjects that are direct super-objects of this Node.

Specified by:
getDirectSuperNodes in interface TaxonomyNode<T extends ElkObject>
Returns:
list of nodes for direct super-objects of this node's members

getAllSuperNodes

public Set<? extends TaxonomyNode<T>> getAllSuperNodes()
Description copied from interface: TaxonomyNode
Computes an unmodifiable set of nodes for ElkObjects that are (possibly indirect) super-objects of members of this Node. This is the smallest set of nodes that contains all direct super-nodes of this node, and all direct super-nodes of every node in this set.

Specified by:
getAllSuperNodes in interface TaxonomyNode<T extends ElkObject>
Returns:
set of nodes for sub-objects of this node's members

getDirectSubNodes

public Set<? extends TaxonomyNode<T>> getDirectSubNodes()
Description copied from interface: TaxonomyNode
Get an unmodifiable set of nodes for ElkObjects that are direct sub-objects of this Node.

Specified by:
getDirectSubNodes in interface TaxonomyNode<T extends ElkObject>
Returns:
list of nodes for direct sub-objects of this node's members

getAllSubNodes

public Set<? extends TaxonomyNode<T>> getAllSubNodes()
Description copied from interface: TaxonomyNode
Computes an unmodifiable set of nodes for ElkObjects that are (possibly indirect) sub-objects of members of this Node. This is the smallest set of nodes that contains all direct sub-nodes of this node, and all direct sub-nodes of every node in this set.

Specified by:
getAllSubNodes in interface TaxonomyNode<T extends ElkObject>
Returns:
set of nodes for sub-objects of this node's members


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