Class OpUtils

java.lang.Object
se.liu.ida.hefquin.jenaext.sparql.algebra.OpUtils

public class OpUtils extends Object
This class provides useful functionality related to Jena's Op interface and the classes that implement it.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    addVariablesFromPattern(Set<org.apache.jena.sparql.core.Var> acc, org.apache.jena.sparql.algebra.Op op)
    Adds all variables mentioned in the graph pattern represented by the given operator to the given set of variables, except for the variables that occur only in expressions (in FILTER or in BIND).
    static void
    addVariablesFromPattern(Set<org.apache.jena.sparql.core.Var> acc, org.apache.jena.sparql.algebra.op.Op2 op)
    Adds all variables mentioned in the graph pattern represented by the given operator to the given set of variables, except for the variables that occur only in expressions (in FILTER or in BIND).
    static int
    getNumberOfTermMentions(org.apache.jena.sparql.algebra.Op op)
    Returns the number of times any RDF term is mentioned in the graph pattern represented by the given operator (if the same term is mentioned multiple times, then each of these mentions is counted), but ignores terms mentioned in expressions (in FILTER or in BIND).
    static int
    getNumberOfTermMentions(org.apache.jena.sparql.algebra.op.Op2 op)
    Returns the number of times any RDF term is mentioned in the graph pattern represented by the given operator (if the same term is mentioned multiple times, then each of these mentions is counted), but ignores terms mentioned in expressions (in FILTER or in BIND).
    static int
    getNumberOfVarMentions(org.apache.jena.sparql.algebra.Op op)
    Returns the number of times any variable is mentioned in the graph pattern represented by the given operator (if the same variable is mentioned multiple times, then each of these mentions is counted), but ignores variable mentions in expressions (in FILTER or in BIND).
    static int
    getNumberOfVarMentions(org.apache.jena.sparql.algebra.op.Op2 op)
    Returns the number of times any variable is mentioned in the graph pattern represented by the given operator (if the same variable is mentioned multiple times, then each of these mentions is counted), but ignores variable mentions in expressions (in FILTER or in BIND).
    static Set<org.apache.jena.sparql.core.Var>
    getVariablesInPattern(org.apache.jena.sparql.algebra.Op op)
    Returns the set of all variables mentioned in the graph pattern represented by the given operator, except for the variables that occur only in expressions (in FILTER or in BIND).

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • OpUtils

      public OpUtils()
  • Method Details

    • getVariablesInPattern

      public static Set<org.apache.jena.sparql.core.Var> getVariablesInPattern(org.apache.jena.sparql.algebra.Op op)
      Returns the set of all variables mentioned in the graph pattern represented by the given operator, except for the variables that occur only in expressions (in FILTER or in BIND).
    • addVariablesFromPattern

      public static void addVariablesFromPattern(Set<org.apache.jena.sparql.core.Var> acc, org.apache.jena.sparql.algebra.Op op)
      Adds all variables mentioned in the graph pattern represented by the given operator to the given set of variables, except for the variables that occur only in expressions (in FILTER or in BIND).
    • addVariablesFromPattern

      public static void addVariablesFromPattern(Set<org.apache.jena.sparql.core.Var> acc, org.apache.jena.sparql.algebra.op.Op2 op)
      Adds all variables mentioned in the graph pattern represented by the given operator to the given set of variables, except for the variables that occur only in expressions (in FILTER or in BIND).
    • getNumberOfVarMentions

      public static int getNumberOfVarMentions(org.apache.jena.sparql.algebra.Op op)
      Returns the number of times any variable is mentioned in the graph pattern represented by the given operator (if the same variable is mentioned multiple times, then each of these mentions is counted), but ignores variable mentions in expressions (in FILTER or in BIND).
    • getNumberOfVarMentions

      public static int getNumberOfVarMentions(org.apache.jena.sparql.algebra.op.Op2 op)
      Returns the number of times any variable is mentioned in the graph pattern represented by the given operator (if the same variable is mentioned multiple times, then each of these mentions is counted), but ignores variable mentions in expressions (in FILTER or in BIND).
    • getNumberOfTermMentions

      public static int getNumberOfTermMentions(org.apache.jena.sparql.algebra.Op op)
      Returns the number of times any RDF term is mentioned in the graph pattern represented by the given operator (if the same term is mentioned multiple times, then each of these mentions is counted), but ignores terms mentioned in expressions (in FILTER or in BIND).
    • getNumberOfTermMentions

      public static int getNumberOfTermMentions(org.apache.jena.sparql.algebra.op.Op2 op)
      Returns the number of times any RDF term is mentioned in the graph pattern represented by the given operator (if the same term is mentioned multiple times, then each of these mentions is counted), but ignores terms mentioned in expressions (in FILTER or in BIND).