org.mindswap.pellet
Class Node

java.lang.Object
  extended by org.mindswap.pellet.Node
Direct Known Subclasses:
Individual, Literal

public abstract class Node
extends java.lang.Object

Author:
Evren Sirin

Field Summary
static int ALL
           
static int ATOM
           
static int BLOCKABLE
           
static int CHANGED
           
static java.util.logging.Logger log
           
static int MAX
           
static int MIN
           
static int NOM
           
static int NOMINAL
           
static int OR
           
static int SOME
           
static int TYPES
           
static int UNCHANGED
           
 
Method Summary
 void addType(aterm.ATermAppl c, DependencySet ds)
           
abstract  Node copyTo(ABox abox)
           
 ABox getABox()
          getABox
 java.util.Map<Node,DependencySet> getAllMerged()
           
 java.util.Map<aterm.ATermAppl,DependencySet> getDepends()
           
 DependencySet getDepends(aterm.ATerm c)
           
 DependencySet getDifferenceDependency(Node node)
           
 java.util.Set<Node> getDifferents()
           
 EdgeList getInEdges()
           
 java.util.Set<Node> getMerged()
           
 DependencySet getMergeDependency(boolean all)
          Get the dependency if this node is merged to another node.
 Node getMergedTo()
           
 aterm.ATermAppl getName()
           
 java.lang.String getNameStr()
           
abstract  DependencySet getNodeDepends()
           
abstract  int getNominalLevel()
           
 java.util.List<aterm.ATermAppl> getPath()
          A string that identifies this node either using its name or the path of individuals that comes to this node.
 DependencySet getPruned()
           
 Node getSame()
           
abstract  aterm.ATermAppl getTerm()
           
 java.util.Set<aterm.ATermAppl> getTypes()
           
 Bool hasObviousType(aterm.ATermAppl c)
           
 boolean hasObviousType(java.util.Collection<aterm.ATermAppl> coll)
           
abstract  boolean hasSuccessor(Node x)
           
 boolean hasType(aterm.ATerm c)
           
 void inheritDifferents(Node y, DependencySet ds)
           
abstract  boolean isBlockable()
           
 boolean isBnode()
           
 boolean isConceptRoot()
          Returns true if this is the node created for the concept satisfiability check.
 boolean isDifferent(Node node)
           
abstract  boolean isIndividual()
           
abstract  boolean isLeaf()
           
abstract  boolean isLiteral()
           
 boolean isMerged()
           
 boolean isNamedIndividual()
           
abstract  boolean isNominal()
           
 boolean isPruned()
           
 boolean isRoot()
           
 boolean isRootNominal()
           
 boolean isSame(Node node)
           
 int mergedAt()
           
abstract  void prune(DependencySet ds)
           
 int prunedAt()
           
 boolean removeInEdge(Edge edge)
           
 void removeInEdges()
           
 boolean removeType(aterm.ATermAppl c)
           
 void removeTypes()
           
 void reset(boolean onlyApplyTypes)
           
 boolean restore(int branch)
           
 java.lang.Boolean restorePruned(int branch)
           
 void setChanged(int type)
          Indicates that node has been changed in a way that requires us to recheck the concepts of given type.
 void setConceptRoot(boolean isConceptRoot)
           
 void setDifferent(Node node, DependencySet ds)
           
 void setSame(Node node, DependencySet ds)
           
 java.lang.String toString()
           
 void undoSetSame()
           
 void unprune(int branch)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

public static final java.util.logging.Logger log

BLOCKABLE

public static final int BLOCKABLE
See Also:
Constant Field Values

NOMINAL

public static final int NOMINAL
See Also:
Constant Field Values

CHANGED

public static final int CHANGED
See Also:
Constant Field Values

UNCHANGED

public static final int UNCHANGED
See Also:
Constant Field Values

ATOM

public static final int ATOM
See Also:
Constant Field Values

OR

public static final int OR
See Also:
Constant Field Values

SOME

public static final int SOME
See Also:
Constant Field Values

ALL

public static final int ALL
See Also:
Constant Field Values

MIN

public static final int MIN
See Also:
Constant Field Values

MAX

public static final int MAX
See Also:
Constant Field Values

NOM

public static final int NOM
See Also:
Constant Field Values

TYPES

public static final int TYPES
See Also:
Constant Field Values
Method Detail

setChanged

public void setChanged(int type)
Indicates that node has been changed in a way that requires us to recheck the concepts of given type.

Parameters:
type - type of concepts that need to be rechecked

isConceptRoot

public boolean isConceptRoot()
Returns true if this is the node created for the concept satisfiability check.

Returns:

setConceptRoot

public void setConceptRoot(boolean isConceptRoot)

isBnode

public boolean isBnode()

isNamedIndividual

public boolean isNamedIndividual()

isRoot

public boolean isRoot()

isLeaf

public abstract boolean isLeaf()

isRootNominal

public boolean isRootNominal()

copyTo

public abstract Node copyTo(ABox abox)

getInEdges

public EdgeList getInEdges()

removeInEdge

public boolean removeInEdge(Edge edge)

removeInEdges

public void removeInEdges()

reset

public void reset(boolean onlyApplyTypes)

restorePruned

public java.lang.Boolean restorePruned(int branch)

restore

public boolean restore(int branch)

addType

public void addType(aterm.ATermAppl c,
                    DependencySet ds)

removeType

public boolean removeType(aterm.ATermAppl c)

hasType

public boolean hasType(aterm.ATerm c)

hasObviousType

public Bool hasObviousType(aterm.ATermAppl c)

hasObviousType

public boolean hasObviousType(java.util.Collection<aterm.ATermAppl> coll)

hasSuccessor

public abstract boolean hasSuccessor(Node x)

getNodeDepends

public abstract DependencySet getNodeDepends()

getDepends

public DependencySet getDepends(aterm.ATerm c)

getDepends

public java.util.Map<aterm.ATermAppl,DependencySet> getDepends()

getTypes

public java.util.Set<aterm.ATermAppl> getTypes()

removeTypes

public void removeTypes()

prunedAt

public int prunedAt()

isPruned

public boolean isPruned()

getPruned

public DependencySet getPruned()

prune

public abstract void prune(DependencySet ds)

unprune

public void unprune(int branch)

getNominalLevel

public abstract int getNominalLevel()

isNominal

public abstract boolean isNominal()

isBlockable

public abstract boolean isBlockable()

isLiteral

public abstract boolean isLiteral()

isIndividual

public abstract boolean isIndividual()

mergedAt

public int mergedAt()

isMerged

public boolean isMerged()

getMergedTo

public Node getMergedTo()

getMergeDependency

public DependencySet getMergeDependency(boolean all)
Get the dependency if this node is merged to another node. This node may be merged to another node which is later merged to another node and so on. This function may return the dependency for the first step or the union of all steps.


getSame

public Node getSame()

undoSetSame

public void undoSetSame()

getMerged

public java.util.Set<Node> getMerged()

getAllMerged

public java.util.Map<Node,DependencySet> getAllMerged()

setSame

public void setSame(Node node,
                    DependencySet ds)

isSame

public boolean isSame(Node node)

isDifferent

public boolean isDifferent(Node node)

getDifferents

public java.util.Set<Node> getDifferents()

getDifferenceDependency

public DependencySet getDifferenceDependency(Node node)

setDifferent

public void setDifferent(Node node,
                         DependencySet ds)

inheritDifferents

public void inheritDifferents(Node y,
                              DependencySet ds)

getName

public aterm.ATermAppl getName()

getTerm

public abstract aterm.ATermAppl getTerm()

getNameStr

public java.lang.String getNameStr()

toString

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

getPath

public java.util.List<aterm.ATermAppl> getPath()
A string that identifies this node either using its name or the path of individuals that comes to this node. For example, a node that has been generated by the completion rules needs to be identified with respect to a named individual. Ultimately, we need the shortest path or something like that but right now we just use the first inEdge

Returns:

getABox

public ABox getABox()
getABox

Returns:


Copyright © 2004 Evren Sirin. All Rights Reserved.