Package com.stardog.stark.query
Interface BindingSet
A set of query result bindings
- Since:
- 1.0
- Version:
- 1.0
- Author:
- Michael Grove
-
Method Summary
Modifier and TypeMethodDescriptionOptionally return the binding of the given variablebooleanReturn whether or not the variable is bound in this solutionOptionally return the value for the given variable as aBNodeGet the value for the given variable in the solution.Optionally return the value for the given variable as aIRIOptionally return the value for the given variable as aLiteralOptionally return the value for the given variable as aResourceintsize()Return the number ofbindingsin the solution.stream()Optionally return the value for the given variableReturn the set of variables associated with this `BindingSet`.Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Method Details
-
variables
Return the set of variables associated with this `BindingSet`. Minimally, this would be thenamesof all thebindings, however, it could be a superset of that and include the names of any variables whichare not bound.- Returns:
- the variable names
-
size
int size()Return the number ofbindingsin the solution.- Returns:
- the size
-
value
Optionally return the value for the given variable- Parameters:
theVar- the name of the variable whose binding should be retrieved- Returns:
- the value, or an empty optional if the var is not bound to a value or not in the solution
-
get
Get the value for the given variable in the solution.- Parameters:
theVar- the name of the variable to get- Returns:
- the value, or `null` if it is not bound
-
literal
Optionally return the value for the given variable as aLiteral- Parameters:
theVar- the name of the variable whose binding should be retrieved- Returns:
- the value as a `Literal`, or an empty optional if the var is not bound to a value or is not a `Literal`
-
iri
Optionally return the value for the given variable as aIRI- Parameters:
theVar- the name of the variable whose binding should be retrieved- Returns:
- the value as a `IRI`, or an empty optional if the var is not bound to a value or is not a `IRI`
-
bnode
Optionally return the value for the given variable as aBNode- Parameters:
theVar- the name of the variable whose binding should be retrieved- Returns:
- the value as a `BNode`, or an empty optional if the var is not bound to a value or is not a `BNode`
-
resource
Optionally return the value for the given variable as aResource- Parameters:
theVar- the name of the variable whose binding should be retrieved- Returns:
- the value as a `Resource`, or an empty optional if the var is not bound to a value or is not a `Resource`
-
binds
Return whether or not the variable is bound in this solution- Parameters:
theVar- the var- Returns:
- true if the variable is bound, false otherwise.
-
binding
Optionally return the binding of the given variable- Parameters:
theVar- the variable name- Returns:
- the binding of the var, or an empty optional if the var is not bound or not in the solution
-
stream
- Returns:
- the `Stream` of bindings*
-