Class OpUtils
java.lang.Object
se.liu.ida.hefquin.jenaext.sparql.algebra.OpUtils
This class provides useful functionality related to Jena's
Op
interface and the classes that implement it.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic 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).
-
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).
-