Class MatchTreeNode
- java.lang.Object
-
- implementation.algorithms.matchTree.MatchTreeNode
-
- Direct Known Subclasses:
MatchTreeRoot
public class MatchTreeNode extends java.lang.Object
See the article for the exact mathematical definitions of the attributes and behavior of the algorithm https://hal.archives-ouvertes.fr/hal-01945454/document Ch.6- Author:
- nk-fouque
-
-
Constructor Summary
Constructors Constructor Description MatchTreeNode()
Initialize everything to null (Needed byMatchTreeRoot(MatchTreeNode)
)} as super() constructor)MatchTreeNode(MatchTreeNode other)
Constructor by copyMatchTreeNode(org.apache.jena.sparql.syntax.Element element, CollectionsModel colmd, java.util.Set<org.apache.jena.sparql.core.Var> varPprime)
Base Constructor
-
Method Summary
Modifier and Type Method Description java.lang.String
elementString()
Same asElement.toString()
except for the top element, expressed as T(X)java.util.Set<MatchTreeNode>
getChildren()
The nodes under this nodejava.util.Set<org.apache.jena.sparql.core.Var>
getD()
D : the set of variable introduced by ejava.util.Set<org.apache.jena.sparql.core.Var>
getDelta()
Δ : the sub-domain of variables useful to this node's parentorg.apache.jena.sparql.syntax.Element
getElement()
e : the Element defined by this nodeorg.apache.jena.sparql.algebra.Table
getMatchSet()
M : the match-setjava.util.Set<org.apache.jena.sparql.core.Var>
getVarE()
var(e) : the variables mentioned by evoid
insert()
Indicates that the node has been inserted somewhere in the treeboolean
isInserted()
Whether the node has been inserted somewhere in the treevoid
replace(MatchTreeNode child, MatchTreeNode other)
Replaces one child node by a new node in this node's childrenjava.lang.String
toString()
java.lang.String
toString(int tab)
Visualization of the tree using indentation Still has a few issues
-
-
-
Constructor Detail
-
MatchTreeNode
public MatchTreeNode()
Initialize everything to null (Needed byMatchTreeRoot(MatchTreeNode)
)} as super() constructor)
-
MatchTreeNode
public MatchTreeNode(org.apache.jena.sparql.syntax.Element element, CollectionsModel colmd, java.util.Set<org.apache.jena.sparql.core.Var> varPprime)
Base Constructor- Parameters:
element
- The element defined by this nodecolmd
- The graph to work invarPprime
- The variables already defined in the cluster
-
MatchTreeNode
public MatchTreeNode(MatchTreeNode other)
Constructor by copy
-
-
Method Detail
-
getElement
public org.apache.jena.sparql.syntax.Element getElement()
e : the Element defined by this node
-
getVarE
public java.util.Set<org.apache.jena.sparql.core.Var> getVarE()
var(e) : the variables mentioned by e
-
getD
public java.util.Set<org.apache.jena.sparql.core.Var> getD()
D : the set of variable introduced by e
-
getMatchSet
public org.apache.jena.sparql.algebra.Table getMatchSet()
M : the match-set
-
getDelta
public java.util.Set<org.apache.jena.sparql.core.Var> getDelta()
Δ : the sub-domain of variables useful to this node's parent
-
getChildren
public java.util.Set<MatchTreeNode> getChildren()
The nodes under this node
-
elementString
public java.lang.String elementString()
Same asElement.toString()
except for the top element, expressed as T(X)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
toString
public java.lang.String toString(int tab)
Visualization of the tree using indentation Still has a few issues
-
insert
public void insert()
Indicates that the node has been inserted somewhere in the tree
-
isInserted
public boolean isInserted()
Whether the node has been inserted somewhere in the tree
-
replace
public void replace(MatchTreeNode child, MatchTreeNode other)
Replaces one child node by a new node in this node's children- Parameters:
child
- The child to removeother
- Usually a slightly modified copy of child
-
-