public class ELDescriptionNode extends Object
Modifier and Type | Field and Description |
---|---|
static org.semanticweb.owlapi.model.OWLDataFactory |
df |
Constructor and Description |
---|
ELDescriptionNode(ELDescriptionNode parentNode,
org.semanticweb.owlapi.model.OWLDataProperty parentProperty,
org.semanticweb.owlapi.model.OWLDataRange dataRange) |
ELDescriptionNode(ELDescriptionNode parentNode,
org.semanticweb.owlapi.model.OWLObjectProperty parentProperty,
org.semanticweb.owlapi.model.OWLClass... label) |
ELDescriptionNode(ELDescriptionNode parentNode,
org.semanticweb.owlapi.model.OWLObjectProperty parentProperty,
Set<org.semanticweb.owlapi.model.OWLClass> label) |
ELDescriptionNode(ELDescriptionTree tree)
Constructs an EL OWLClassExpression tree with empty root label.
|
ELDescriptionNode(ELDescriptionTree tree,
org.semanticweb.owlapi.model.OWLClass... label) |
ELDescriptionNode(ELDescriptionTree tree,
org.semanticweb.owlapi.model.OWLDataRange dataRange)
Constructs an EL description tree node given a description tree and the data range.
|
ELDescriptionNode(ELDescriptionTree tree,
TreeSet<org.semanticweb.owlapi.model.OWLClass> label)
Constructs an EL OWLClassExpression tree given its root label.
|
Modifier and Type | Method and Description |
---|---|
int |
computeLevel()
Traverses the tree until the root node and counts how
many edges are traversed.
|
void |
extendLabel(org.semanticweb.owlapi.model.OWLClass newClass)
Adds an entry to the node label.
|
int[] |
getCurrentPosition()
Gets a list describing the position of this node within the
tree.
|
org.semanticweb.owlapi.model.OWLDataRange |
getDataRange() |
List<ELDescriptionEdge> |
getEdges()
Gets the edges of this node.
|
Set<ELDescriptionNode> |
getIn() |
Set<ELDescriptionNode> |
getInSC1() |
Set<ELDescriptionNode> |
getInSC2() |
NavigableSet<org.semanticweb.owlapi.model.OWLClass> |
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 OWLClassExpression tree upwards until it finds
the root and returns it.
|
ELDescriptionTree |
getTree() |
boolean |
isClassNode() |
boolean |
isRoot()
Checks whether this node has a parent.
|
void |
refineEdge(int edgeNumber,
org.semanticweb.owlapi.model.OWLProperty op) |
void |
replaceInLabel(org.semanticweb.owlapi.model.OWLClass oldClass,
org.semanticweb.owlapi.model.OWLClass 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).
|
org.semanticweb.owlapi.model.OWLClassExpression |
transformToDescription()
This method transform the tree to an EL description.
|
public static final org.semanticweb.owlapi.model.OWLDataFactory df
public ELDescriptionNode(ELDescriptionTree tree)
public ELDescriptionNode(ELDescriptionTree tree, org.semanticweb.owlapi.model.OWLClass... label)
public ELDescriptionNode(ELDescriptionTree tree, TreeSet<org.semanticweb.owlapi.model.OWLClass> label)
label
- Label of the root node.public ELDescriptionNode(ELDescriptionTree tree, org.semanticweb.owlapi.model.OWLDataRange dataRange)
tree
- the description treedataRange
- the data rangepublic ELDescriptionNode(ELDescriptionNode parentNode, org.semanticweb.owlapi.model.OWLObjectProperty parentProperty, org.semanticweb.owlapi.model.OWLClass... label)
public ELDescriptionNode(ELDescriptionNode parentNode, org.semanticweb.owlapi.model.OWLObjectProperty parentProperty, Set<org.semanticweb.owlapi.model.OWLClass> label)
public ELDescriptionNode(ELDescriptionNode parentNode, org.semanticweb.owlapi.model.OWLDataProperty parentProperty, org.semanticweb.owlapi.model.OWLDataRange dataRange)
public boolean isClassNode()
public org.semanticweb.owlapi.model.OWLDataRange getDataRange()
public boolean isRoot()
public ELDescriptionNode getRoot()
public int computeLevel()
getLevel()
to get the
level of the tree.public org.semanticweb.owlapi.model.OWLClassExpression transformToDescription()
OWLObjectIntersectionOf
of OWLClass
. Each edge is transformed to an
OWLObjectSomeValuesFrom
, 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, OWLDataFactory.getOWLThing()
is returned.public int[] getCurrentPosition()
public void replaceInLabel(org.semanticweb.owlapi.model.OWLClass oldClass, org.semanticweb.owlapi.model.OWLClass newClass)
oldClass
- Class to remove from label.newClass
- Class to add to label.public void extendLabel(org.semanticweb.owlapi.model.OWLClass newClass)
newClass
- Class to add to label.public void refineEdge(int edgeNumber, org.semanticweb.owlapi.model.OWLProperty op)
public NavigableSet<org.semanticweb.owlapi.model.OWLClass> getLabel()
public List<ELDescriptionEdge> getEdges()
public int getLevel()
public 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()
DL-Learner is licenced under the terms of the GNU General Public License.
Copyright © 2007-2019 Jens Lehmann