Class 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
    • Method Summary

      Modifier and Type Method Description
      java.lang.String elementString()
      Same as Element.toString() except for the top element, expressed as T(X)
      java.util.Set<MatchTreeNode> getChildren()
      The nodes under this node
      java.util.Set<org.apache.jena.sparql.core.Var> getD()
      D : the set of variable introduced by e
      java.util.Set<org.apache.jena.sparql.core.Var> getDelta()
      Δ : the sub-domain of variables useful to this node's parent
      org.apache.jena.sparql.syntax.Element getElement()
      e : the Element defined by this node
      org.apache.jena.sparql.algebra.Table getMatchSet()
      M : the match-set
      java.util.Set<org.apache.jena.sparql.core.Var> getVarE()
      var(e) : the variables mentioned by e
      void insert()
      Indicates that the node has been inserted somewhere in the tree
      boolean isInserted()
      Whether the node has been inserted somewhere in the tree
      void replace​(MatchTreeNode child, MatchTreeNode other)
      Replaces one child node by a new node in this node's children
      java.lang.String toString()  
      java.lang.String toString​(int tab)
      Visualization of the tree using indentation Still has a few issues
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • 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 node
        colmd - The graph to work in
        varPprime - 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 as Element.toString() except for the top element, expressed as T(X)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.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 remove
        other - Usually a slightly modified copy of child