Package org.aksw.jenax.arq.util.tuple
Class TupleUtils
java.lang.Object
org.aksw.jenax.arq.util.tuple.TupleUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> org.apache.jena.sparql.engine.binding.BindingtupleToBinding(org.aksw.commons.tuple.bridge.TupleBridge<T, org.apache.jena.graph.Node> accessor, T pattern, T assignment) Create a binding from two tuples, the first acting as a pattern and the second as the source of values for assignment to the pattern's variables.
-
Constructor Details
-
TupleUtils
public TupleUtils()
-
-
Method Details
-
tupleToBinding
public static <T> org.apache.jena.sparql.engine.binding.Binding tupleToBinding(org.aksw.commons.tuple.bridge.TupleBridge<T, org.apache.jena.graph.Node> accessor, T pattern, T assignment) Create a binding from two tuples, the first acting as a pattern and the second as the source of values for assignment to the pattern's variables. In essence, the resulting binding is created by pairing up the components of the tuples: binding.add(pattern[i], assigment[i]). If a concrete node of the pattern is paired with a non-equivalent node then null is returned.- Type Parameters:
T- The tuple type.- Parameters:
accessor- The tuple accessor (components must be Nodes)pattern- The tuple pattern (may contain variables)assignment- The tuple used to assign values to the variables (should not contain variables)- Returns:
- A binding or null.
-