Package com.stardog.stark.query
Class BindingSets
java.lang.Object
com.stardog.stark.query.BindingSets
Utilities for working with BindingSet
- Since:
- 1.0
- Version:
- 1.0
- Author:
- Michael Grove
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic BindingSets.Builderbuilder()Return a newBindingSets.Builderfor aBindingSetstatic booleancompatible(BindingSet bs1, BindingSet bs2) Check whether twoBindingSets are compatible.static BindingSetempty()Return an emptyBindingSetstatic BindingSetCreate aBindingSetcomprised if the given bindingsstatic BindingSetCreate aBindingSetcomprised if the given bindingstatic Function<BindingSet, Value> Function to select the values for the given variable in a series ofbindingsstatic Function<BindingSet, Statement> static BindingSetunion(BindingSet theBindings1, BindingSet theBindings2)
-
Method Details
-
empty
Return an emptyBindingSet- Returns:
- empty bindings
-
union
@Nonnull public static BindingSet union(@Nonnull BindingSet theBindings1, @Nonnull BindingSet theBindings2) -
toStatement
Return aFunctionthat will transform aBindingSetinto aStatement. This assumes that the `BindingSet`s will have the variables, `s`, `p`, `o`, and optionally, `g`, corresponding to the `SPOC` of the `Statement` to be created. If `g` is not bound, the `Statement` will use the default graph as its context.- Returns:
- the function to use for xform
-
of
@Nonnull public static BindingSet of(@Nonnull Binding theBinding, @Nonnull Binding... theOtherBindings) Create aBindingSetcomprised if the given bindings- Parameters:
theBinding- a bindingtheOtherBindings- additional bindings- Returns:
- the new `BindingSet`
-
of
Create aBindingSetcomprised if the given binding- Parameters:
theVar- the variabletheValue- the bound value- Returns:
- the new `BindingSet`
-
select
Function to select the values for the given variable in a series ofbindings- Parameters:
theVar- the variable to select- Returns:
- the function
-
compatible
Check whether twoBindingSets are compatible. Two binding sets are compatible if they have equal values for each binding name that occurs in both binding sets. -
builder
Return a newBindingSets.Builderfor aBindingSet- Returns:
- a new `Builder`
-