org.semanticweb.HermiT.tableau
Class Node

java.lang.Object
  extended by org.semanticweb.HermiT.tableau.Node
All Implemented Interfaces:
java.io.Serializable

public final class Node
extends java.lang.Object
implements java.io.Serializable

Represents a node in the tableau. Nodes are initially active, but can be set to merged or pruned at a later stage, which does not delete, but marks them as inactive.

See Also:
Serialized Form

Nested Class Summary
static class Node.NodeState
           
 
Field Summary
protected  Node m_blocker
           
protected  java.lang.Object m_blockingCargo
           
protected  java.lang.Object m_blockingObject
           
protected  boolean m_directlyBlocked
           
protected  int m_firstGraphOccurrenceNode
           
protected  Node m_mergedInto
           
protected  PermanentDependencySet m_mergedIntoDependencySet
           
protected  Node m_nextTableauNode
           
protected  int m_nodeID
           
protected  Node.NodeState m_nodeState
           
protected  NodeType m_nodeType
           
protected  int m_numberOfNegatedAtomicConcepts
           
protected  int m_numberOfNegatedRoleAssertions
           
protected  int m_numberOfPositiveAtomicConcepts
           
protected  Node m_parent
           
protected  Node m_previousMergedOrPrunedNode
           
protected  Node m_previousTableauNode
           
protected  Tableau m_tableau
           
protected  int m_treeDepth
           
protected  java.util.List<ExistentialConcept> m_unprocessedExistentials
           
static Node SIGNATURE_CACHE_BLOCKER
           
 
Constructor Summary
Node(Tableau tableau)
           
 
Method Summary
 PermanentDependencySet addCanonicalNodeDependencySet(DependencySet dependencySet)
           
protected  void addToUnprocessedExistentials(ExistentialConcept existentialConcept)
           
protected  void destroy()
           
 Node getBlocker()
           
 java.lang.Object getBlockingCargo()
           
 java.lang.Object getBlockingObject()
           
 Node getCanonicalNode()
           
 PermanentDependencySet getCanonicalNodeDependencySet()
           
 Node getClusterAnchor()
           
 Node getMergedInto()
           
 PermanentDependencySet getMergedIntoDependencySet()
           
 Node getNextTableauNode()
           
 int getNodeID()
           
 NodeType getNodeType()
           
 int getNumberOfPositiveAtomicConcepts()
           
 Node getParent()
           
 Node getPreviousTableauNode()
           
 ExistentialConcept getSomeUnprocessedExistential()
           
 Tableau getTableau()
           
 int getTreeDepth()
           
 java.util.Collection<ExistentialConcept> getUnprocessedExistentials()
           
 boolean hasUnprocessedExistentials()
           
protected  void initialize(int nodeID, Node parent, NodeType nodeType, int treeDepth)
           
 boolean isActive()
           
 boolean isAncestorOf(Node potendialDescendant)
           
 boolean isBlocked()
           
 boolean isDirectlyBlocked()
           
 boolean isIndirectlyBlocked()
           
 boolean isMerged()
           
 boolean isParentOf(Node potentialChild)
           
 boolean isPruned()
           
 boolean isRootNode()
           
protected  void removeFromUnprocessedExistentials(ExistentialConcept existentialConcept)
           
 void setBlocked(Node blocker, boolean directlyBlocked)
           
 void setBlockingCargo(java.lang.Object blockingCargo)
           
 void setBlockingObject(java.lang.Object blockingObject)
          Stores a blocking object (PairwiseBlockingObject or SingleBlockingObject) for this node that stores blocking relevant information of a node such as is label.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SIGNATURE_CACHE_BLOCKER

public static final Node SIGNATURE_CACHE_BLOCKER

m_tableau

protected final Tableau m_tableau

m_nodeID

protected int m_nodeID

m_nodeState

protected Node.NodeState m_nodeState

m_parent

protected Node m_parent

m_nodeType

protected NodeType m_nodeType

m_treeDepth

protected int m_treeDepth

m_numberOfPositiveAtomicConcepts

protected int m_numberOfPositiveAtomicConcepts

m_numberOfNegatedAtomicConcepts

protected int m_numberOfNegatedAtomicConcepts

m_numberOfNegatedRoleAssertions

protected int m_numberOfNegatedRoleAssertions

m_unprocessedExistentials

protected java.util.List<ExistentialConcept> m_unprocessedExistentials

m_previousTableauNode

protected Node m_previousTableauNode

m_nextTableauNode

protected Node m_nextTableauNode

m_previousMergedOrPrunedNode

protected Node m_previousMergedOrPrunedNode

m_mergedInto

protected Node m_mergedInto

m_mergedIntoDependencySet

protected PermanentDependencySet m_mergedIntoDependencySet

m_blocker

protected Node m_blocker

m_directlyBlocked

protected boolean m_directlyBlocked

m_blockingObject

protected java.lang.Object m_blockingObject

m_blockingCargo

protected java.lang.Object m_blockingCargo

m_firstGraphOccurrenceNode

protected int m_firstGraphOccurrenceNode
Constructor Detail

Node

public Node(Tableau tableau)
Method Detail

getTableau

public Tableau getTableau()

initialize

protected void initialize(int nodeID,
                          Node parent,
                          NodeType nodeType,
                          int treeDepth)

destroy

protected void destroy()

getNodeID

public int getNodeID()

getParent

public Node getParent()

getClusterAnchor

public Node getClusterAnchor()

isRootNode

public boolean isRootNode()

isParentOf

public boolean isParentOf(Node potentialChild)

isAncestorOf

public boolean isAncestorOf(Node potendialDescendant)

getNodeType

public NodeType getNodeType()

getTreeDepth

public int getTreeDepth()

isBlocked

public boolean isBlocked()

isDirectlyBlocked

public boolean isDirectlyBlocked()

isIndirectlyBlocked

public boolean isIndirectlyBlocked()

getBlocker

public Node getBlocker()

setBlocked

public void setBlocked(Node blocker,
                       boolean directlyBlocked)

getBlockingObject

public java.lang.Object getBlockingObject()
Returns:
a blocking object (PairwiseBlockingObject or SingleBlockingObject) that stores blocking relevant information of a node such as is label.

setBlockingObject

public void setBlockingObject(java.lang.Object blockingObject)
Stores a blocking object (PairwiseBlockingObject or SingleBlockingObject) for this node that stores blocking relevant information of a node such as is label.

Parameters:
blockingObject -

getBlockingCargo

public java.lang.Object getBlockingCargo()
Returns:
an object that should be a BlockersCache.CacheEntry and is used to remove or add the object to the blockers cache even after the hash code has changed due to label modifications

setBlockingCargo

public void setBlockingCargo(java.lang.Object blockingCargo)
Parameters:
blockingCargo - should be an object of type BlockersCache.CacheEntry

getNumberOfPositiveAtomicConcepts

public int getNumberOfPositiveAtomicConcepts()

isActive

public boolean isActive()

isMerged

public boolean isMerged()

getMergedInto

public Node getMergedInto()

getMergedIntoDependencySet

public PermanentDependencySet getMergedIntoDependencySet()

isPruned

public boolean isPruned()

getPreviousTableauNode

public Node getPreviousTableauNode()

getNextTableauNode

public Node getNextTableauNode()

getCanonicalNode

public Node getCanonicalNode()

getCanonicalNodeDependencySet

public PermanentDependencySet getCanonicalNodeDependencySet()

addCanonicalNodeDependencySet

public PermanentDependencySet addCanonicalNodeDependencySet(DependencySet dependencySet)

addToUnprocessedExistentials

protected void addToUnprocessedExistentials(ExistentialConcept existentialConcept)

removeFromUnprocessedExistentials

protected void removeFromUnprocessedExistentials(ExistentialConcept existentialConcept)

hasUnprocessedExistentials

public boolean hasUnprocessedExistentials()

getSomeUnprocessedExistential

public ExistentialConcept getSomeUnprocessedExistential()

getUnprocessedExistentials

public java.util.Collection<ExistentialConcept> getUnprocessedExistentials()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object