Package openllet.core.boxes.abox
Class Node
- java.lang.Object
-
- openllet.core.boxes.abox.Node
-
- Direct Known Subclasses:
Individual
,Literal
public abstract class Node extends java.lang.Object
FIXME : many many data-structures that doesn't support concurrency are use in concurrent context here.- Author:
- Evren Sirin
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addType(openllet.aterm.ATermAppl c, DependencySet ds)
abstract Node
copyTo(ABoxImpl abox)
boolean
equals(java.lang.Object obj)
ABox
getABox()
java.util.Map<Node,DependencySet>
getAllMerged()
java.util.Map<openllet.aterm.ATermAppl,DependencySet>
getDepends()
DependencySet
getDepends(openllet.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()
openllet.aterm.ATermAppl
getName()
java.lang.String
getNameStr()
abstract DependencySet
getNodeDepends()
abstract int
getNominalLevel()
java.util.List<openllet.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 openllet.aterm.ATermAppl
getTerm()
java.util.Set<openllet.aterm.ATermAppl>
getTypes()
int
hashCode()
boolean
hasObviousType(java.util.Collection<openllet.aterm.ATermAppl> coll)
Bool
hasObviousType(openllet.aterm.ATermAppl c)
abstract boolean
hasSuccessor(Node x)
boolean
hasType(openllet.aterm.ATerm c)
void
inheritDifferents(Node y, DependencySet ds)
abstract boolean
isBlockable()
boolean
isBnode()
boolean
isConceptRoot()
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)
abstract void
prune(DependencySet ds)
boolean
removeInEdge(Edge edge)
boolean
removeType(openllet.aterm.ATermAppl c)
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)
boolean
setDifferent(Node node, DependencySet dsParam)
boolean
setSame(Node node, DependencySet ds)
java.lang.String
toString()
java.util.stream.Stream<openllet.aterm.ATermAppl>
types()
void
undoSetSame()
void
unprune(int branch)
-
-
-
Field Detail
-
_logger
public static final java.util.logging.Logger _logger
-
BLOCKABLE
public static final int BLOCKABLE
- See Also:
- Constant Field Values
-
NOMINAL
public static final int NOMINAL
- 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
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
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.
-
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()
-
getInEdges
public EdgeList getInEdges()
-
removeInEdge
public boolean removeInEdge(Edge edge)
-
reset
public void reset(boolean onlyApplyTypes)
-
restorePruned
public java.lang.Boolean restorePruned(int branch)
-
restore
public boolean restore(int branch)
-
addType
public void addType(openllet.aterm.ATermAppl c, DependencySet ds)
-
removeType
public boolean removeType(openllet.aterm.ATermAppl c)
-
hasType
public boolean hasType(openllet.aterm.ATerm c)
-
hasObviousType
public Bool hasObviousType(openllet.aterm.ATermAppl c)
-
hasObviousType
public boolean hasObviousType(java.util.Collection<openllet.aterm.ATermAppl> coll)
-
hasSuccessor
public abstract boolean hasSuccessor(Node x)
-
getNodeDepends
public abstract DependencySet getNodeDepends()
-
getDepends
public DependencySet getDepends(openllet.aterm.ATerm c)
-
getDepends
public java.util.Map<openllet.aterm.ATermAppl,DependencySet> getDepends()
-
getTypes
public java.util.Set<openllet.aterm.ATermAppl> getTypes()
-
types
public java.util.stream.Stream<openllet.aterm.ATermAppl> types()
-
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()
-
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.- Parameters:
all
-- Returns:
- the dependency set resulting of the merge
-
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 boolean 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 boolean setDifferent(Node node, DependencySet dsParam)
-
inheritDifferents
public void inheritDifferents(Node y, DependencySet ds)
-
getName
public openllet.aterm.ATermAppl getName()
-
getTerm
public abstract openllet.aterm.ATermAppl getTerm()
-
getNameStr
public java.lang.String getNameStr()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getPath
public java.util.List<openllet.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:
- the path as terms
-
getABox
public ABox getABox()
-
-