Package openllet.core.tableau.blocking
Class BlockingContext
- java.lang.Object
-
- openllet.core.tableau.blocking.BlockingContext
-
public final class BlockingContext extends java.lang.Object
A class to keep track of the _current _individual being tested for blocking conditions. Current context stores the _blocker candidate and caches the incoming edges to the (possibly) blocked individual since multiple blocking conditions need to access that information.- Author:
- Evren Sirin
-
-
Field Summary
Fields Modifier and Type Field Description Individual
_blocked
Individual
_blocker
-
Constructor Summary
Constructors Constructor Description BlockingContext(Individual blocked)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.util.Set<Role>
getIncomingRoles(Individual ind)
Returns the roles that points to the given _individual from its parent.boolean
isInvSuccessor()
Returns if the role from the parent of _blocked candidate has any inverse super properties.boolean
isRSuccessor(Role r)
Returns if the _blocked _node is an r-successor of its parent.boolean
moveBlockerDown(Node child)
Sets the _blocker to the specified child of the _current _blocker and returns if the new _blocker candidate is allowed to block.boolean
moveBlockerUp()
Sets the _blocker to the parent of _current _blocker and checks if if the new _blocker candidate is allowed to block.java.lang.String
toString()
-
-
-
Field Detail
-
_blocked
public final Individual _blocked
-
_blocker
public volatile Individual _blocker
-
-
Constructor Detail
-
BlockingContext
public BlockingContext(Individual blocked)
-
-
Method Detail
-
moveBlockerUp
public boolean moveBlockerUp()
Sets the _blocker to the parent of _current _blocker and checks if if the new _blocker candidate is allowed to block. Root _nodes are not allowed to block.- Returns:
true
if the new _blocker candidate is allowed to block
-
moveBlockerDown
public boolean moveBlockerDown(Node child)
Sets the _blocker to the specified child of the _current _blocker and returns if the new _blocker candidate is allowed to block. The child is not allowed to block if it is a literal, or a root, or pruned/merged, or is _blocked itself.- Parameters:
child
- child of the _current _blocker- Returns:
true
if the new _blocker candidate is allowed to block
-
isRSuccessor
public boolean isRSuccessor(Role r)
Returns if the _blocked _node is an r-successor of its parent.- Parameters:
r
- the property to check for r-successor relation- Returns:
if the _blocked _node is an r-successor of its parent.
-
isInvSuccessor
public boolean isInvSuccessor()
Returns if the role from the parent of _blocked candidate has any inverse super properties.- Returns:
- if the role from the parent of _blocked candidate has any inverse super properties
-
getIncomingRoles
public static java.util.Set<Role> getIncomingRoles(Individual ind)
Returns the roles that points to the given _individual from its parent.- Parameters:
ind
- _individual to check- Returns:
- the roles that points to the given _individual from its parent
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-