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.ObjectFIXME : 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 voidaddType(openllet.aterm.ATermAppl c, DependencySet ds)abstract NodecopyTo(ABoxImpl abox)booleanequals(java.lang.Object obj)ABoxgetABox()java.util.Map<Node,DependencySet>getAllMerged()java.util.Map<openllet.aterm.ATermAppl,DependencySet>getDepends()DependencySetgetDepends(openllet.aterm.ATerm c)DependencySetgetDifferenceDependency(Node node)java.util.Set<Node>getDifferents()EdgeListgetInEdges()java.util.Set<Node>getMerged()DependencySetgetMergeDependency(boolean all)Get the dependency if this node is merged to another node.NodegetMergedTo()openllet.aterm.ATermApplgetName()java.lang.StringgetNameStr()abstract DependencySetgetNodeDepends()abstract intgetNominalLevel()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.DependencySetgetPruned()NodegetSame()abstract openllet.aterm.ATermApplgetTerm()java.util.Set<openllet.aterm.ATermAppl>getTypes()inthashCode()booleanhasObviousType(java.util.Collection<openllet.aterm.ATermAppl> coll)BoolhasObviousType(openllet.aterm.ATermAppl c)abstract booleanhasSuccessor(Node x)booleanhasType(openllet.aterm.ATerm c)voidinheritDifferents(Node y, DependencySet ds)abstract booleanisBlockable()booleanisBnode()booleanisConceptRoot()booleanisDifferent(Node node)abstract booleanisIndividual()abstract booleanisLeaf()abstract booleanisLiteral()booleanisMerged()booleanisNamedIndividual()abstract booleanisNominal()booleanisPruned()booleanisRoot()booleanisRootNominal()booleanisSame(Node node)abstract voidprune(DependencySet ds)booleanremoveInEdge(Edge edge)booleanremoveType(openllet.aterm.ATermAppl c)voidreset(boolean onlyApplyTypes)booleanrestore(int branch)java.lang.BooleanrestorePruned(int branch)voidsetChanged(int type)Indicates that _node has been changed in a way that requires us to recheck the concepts of given type.voidsetConceptRoot(boolean isConceptRoot)booleansetDifferent(Node node, DependencySet dsParam)booleansetSame(Node node, DependencySet ds)java.lang.StringtoString()java.util.stream.Stream<openllet.aterm.ATermAppl>types()voidundoSetSame()voidunprune(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:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin 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:
toStringin 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()
-
-