Name
- The type for nominals and valuesKlass
- The type for DL classesRole
- The type for properties (roles)public interface IABoxNode<Name extends Comparable<? super Name>,Klass extends Comparable<? super Klass>,Role extends Comparable<? super Role>> extends Comparable<IABoxNode<Name,Klass,Role>>, de.dhke.projects.cutil.collections.immutable.IImmutable<IABoxNode<Name,Klass,Role>>
IABoxNode
s are the representation of individuals in a description logic tableaux.
Nodes are either associated with named individuals or not. If a node is associated with at least one individual, it
is called a named node. The set of named individuals is available via getNames()
.
If a node is named, one of the names is the getPrimaryName()
. By convention the primary name is the first
name in the sorted list of node names.
Every ABox node has a set of (possibly complex) concepts (available via getTerms()
. The individual represented by the ABox node is an instance of these concepts.
Additionally, ABox nodes may be linked by #getSuccessors()
. and the predecessor map (available via #getPredecessors()
.
Note: Successor and predecessor lists refer to NodeID
s and not IABoxNode
s. This
simplifies internal handling, but also represents a leaky abstraction.
A node also maintains a list of blocked nodes and conversely also a potential reference to a blocking node. These are used by DL reasoners.
Modifier and Type | Method and Description |
---|---|
NodeMergeInfo<Name,Klass,Role> |
addUnfoldedDescription(IDLRestriction<Name,Klass,Role> desc)
Add the specified description to the current node.
|
NodeMergeInfo<Name,Klass,Role> |
addUnfoldedDescriptions(Iterable<? extends IDLRestriction<Name,Klass,Role>> descs)
Add the specified descriptions to the current node.
|
IABoxNode<Name,Klass,Role> |
clone(IABox<Name,Klass,Role> newABox)
Create a copy of the current Node in the target ABox.
|
boolean |
deepEquals(Object obj)
Compare two
IABoxNode es through deep inspection
Contrary to #equals(java.lang.Object) , this compares two nodes through deep inspection. |
int |
deepHashCode()
Calculate the hashcode of the current node by deep inspection of the node's contents.
|
IABox<Name,Klass,Role> |
getABox() |
IABoxNode<Name,Klass,Role> |
getImmutable() |
SortedSet<Name> |
getNames() |
NodeID |
getNodeID() |
Name |
getPrimaryName() |
IRABox<Name,Klass,Role> |
getRABox()
The RABox the role associations between nodes.
|
Collection<TermEntry<Name,Klass,Role>> |
getTermEntries()
Get a collection of
TermEntry representing the terms from the node's term set. |
ITermSet<Name,Klass,Role> |
getTerms()
Every ABox individual (named or anonymous) is an instance of one or more concepts.
|
boolean |
isAnonymous() |
boolean |
isDatatypeNode()
Check, if the current node is a datatype node and thus cannot have successors.
|
String |
toString(String prefix) |
compareTo
SortedSet<Name> getNames()
Name getPrimaryName()
boolean isAnonymous()
ITermSet<Name,Klass,Role> getTerms()
Every ABox individual (named or anonymous) is an instance of one or more concepts.
Collection<TermEntry<Name,Klass,Role>> getTermEntries()
Get a collection of TermEntry
representing the terms from the node's term set.
TermEntries
representing the terms of the current node.getTerms()
IRABox<Name,Klass,Role> getRABox()
The RABox the role associations between nodes.
IRABox
NodeMergeInfo<Name,Klass,Role> addUnfoldedDescription(IDLRestriction<Name,Klass,Role> desc) throws ENodeMergeException
Add the specified description to the current node.
When the description list contains nominals, the current node may have to be joined with other nodes in the ABox.
The method thus returns an appropriate NodeMergeInfo
object describing any eventual merge operation.
After a merge operation, only the target node of the returned NodeMergeInfo
is a valid node of the
current IABox
. All other nodes have been merged away.
desc
- A description to add to the current node.NodeMergeInfo
indicating the progress of the operation.ENodeMergeException
- A node merge was required but failed.NodeMergeInfo<Name,Klass,Role> addUnfoldedDescriptions(Iterable<? extends IDLRestriction<Name,Klass,Role>> descs) throws ENodeMergeException
Add the specified descriptions to the current node.
When the description list contains nominals, the current node may have to be joined with other nodes in the ABox.
The method thus returns an appropriate NodeMergeInfo
object describing any eventual merge operation.
After a merge operation, only the target node of the returned NodeMergeInfo
is a valid node of the
current IABox
. All other nodes have been merged away.
descs
- Sequence of descriptions to add to the current node.NodeMergeInfo
indicating the ID of the target node containing the unfoldings and information,
if the target node was modified.ENodeMergeException
- A node merge was required but failed.IABoxNode<Name,Klass,Role> clone(IABox<Name,Klass,Role> newABox)
newABox
- The ABox to create the cloned node in.int deepHashCode()
Calculate the hashcode of the current node by deep inspection of the node's contents.
Contrary to #hashCode()
, the node's contents are taken into account and not only the node ID.
boolean deepEquals(Object obj)
Compare two IABoxNode
es through deep inspection
Contrary to #equals(java.lang.Object)
, this compares two nodes through deep inspection.
obj
- The target node to compare toboolean isDatatypeNode()
IABoxNode<Name,Klass,Role> getImmutable()
getImmutable
in interface de.dhke.projects.cutil.collections.immutable.IImmutable<IABoxNode<Name extends Comparable<? super Name>,Klass extends Comparable<? super Klass>,Role extends Comparable<? super Role>>>
Copyright © 2013. All Rights Reserved.