|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.dllearner.algorithms.el.ELDescriptionNode
public class ELDescriptionNode
Represents an EL description tree, which corresponds to a description in the EL description logic. Note that an EL description tree can be a subtree of another EL description tree. In general, an EL description tree is a tree where the node label is a set of named classes and the edges are labelled with a property. In the documentation below "this node" refers to the root node of this EL description (sub-)tree. One tree cannot be reused, i.e. used as subtree in several description trees, as some of the associated variables (level, simulation) depend on the overall tree.
| Constructor Summary | |
|---|---|
ELDescriptionNode(ELDescriptionNode parentNode,
ObjectProperty parentProperty,
NamedClass... label)
|
|
ELDescriptionNode(ELDescriptionNode parentNode,
ObjectProperty parentProperty,
Set<NamedClass> label)
|
|
ELDescriptionNode(ELDescriptionTree tree)
Constructs an EL description tree with empty root label. |
|
ELDescriptionNode(ELDescriptionTree tree,
NamedClass... label)
|
|
ELDescriptionNode(ELDescriptionTree tree,
TreeSet<NamedClass> label)
Constructs an EL description tree given its root label. |
|
| Method Summary | |
|---|---|
int |
computeLevel()
Traverses the tree until the root node and counts how many edges are traversed. |
void |
extendLabel(NamedClass newClass)
Adds an entry to the node label. |
int[] |
getCurrentPosition()
Gets a list describing the position of this node within the tree. |
List<ELDescriptionEdge> |
getEdges()
Gets the edges of this node. |
Set<ELDescriptionNode> |
getIn()
|
Set<ELDescriptionNode> |
getInSC1()
|
Set<ELDescriptionNode> |
getInSC2()
|
NavigableSet<NamedClass> |
getLabel()
Gets the label of this node. |
int |
getLevel()
Gets the level (distance from root) of this node. |
Set<ELDescriptionNode> |
getOut()
|
Set<ELDescriptionNode> |
getOutSC1()
|
Set<ELDescriptionNode> |
getOutSC2()
|
ELDescriptionNode |
getParent()
|
ELDescriptionEdge |
getParentEdge()
|
ELDescriptionNode |
getRoot()
Traverses the EL description tree upwards until it finds the root and returns it. |
ELDescriptionTree |
getTree()
|
boolean |
isRoot()
Checks whether this node has a parent. |
void |
refineEdge(int edgeNumber,
ObjectProperty op)
|
void |
replaceInLabel(NamedClass oldClass,
NamedClass newClass)
Replaces an entry in the node label. |
String |
toDescriptionString()
|
String |
toSimulationString()
|
String |
toSimulationString(Map<ELDescriptionNode,String> nodeNames)
|
String |
toString()
|
static String |
toString(Set<ELDescriptionNode> nodes,
Map<ELDescriptionNode,String> nodeNames)
A convenience method (for debugging purposes) to get a comma separated list of nodes, where the nodes are given names (to make them readable). |
Description |
transformToDescription()
This method transform the tree to an EL description. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ELDescriptionNode(ELDescriptionTree tree)
public ELDescriptionNode(ELDescriptionTree tree,
NamedClass... label)
public ELDescriptionNode(ELDescriptionTree tree,
TreeSet<NamedClass> label)
label - Label of the root node.
public ELDescriptionNode(ELDescriptionNode parentNode,
ObjectProperty parentProperty,
NamedClass... label)
public ELDescriptionNode(ELDescriptionNode parentNode,
ObjectProperty parentProperty,
Set<NamedClass> label)
| Method Detail |
|---|
public boolean isRoot()
public ELDescriptionNode getRoot()
public int computeLevel()
getLevel() to get the
level of the tree.
public Description transformToDescription()
Intersection
of NamedClass. Each edge is transformed to an
ObjectSomeRestriction, where the property is the edge
label and the child description the subtree the edge points
to. Edges are also added to the intersection. If the intersection
is empty, Thing is returned.
public int[] getCurrentPosition()
public void replaceInLabel(NamedClass oldClass,
NamedClass newClass)
oldClass - Class to remove from label.newClass - Class to add to label.public void extendLabel(NamedClass newClass)
newClass - Class to add to label.
public void refineEdge(int edgeNumber,
ObjectProperty op)
public NavigableSet<NamedClass> getLabel()
public List<ELDescriptionEdge> getEdges()
public int getLevel()
public String toString()
toString in class Objectpublic String toDescriptionString()
public String toSimulationString()
public static String toString(Set<ELDescriptionNode> nodes,
Map<ELDescriptionNode,String> nodeNames)
nodes - The node objects.nodeNames - A mapping to node names.
public String toSimulationString(Map<ELDescriptionNode,String> nodeNames)
public ELDescriptionNode getParent()
public ELDescriptionEdge getParentEdge()
public Set<ELDescriptionNode> getIn()
public Set<ELDescriptionNode> getInSC1()
public Set<ELDescriptionNode> getInSC2()
public Set<ELDescriptionNode> getOut()
public Set<ELDescriptionNode> getOutSC1()
public Set<ELDescriptionNode> getOutSC2()
public ELDescriptionTree getTree()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||