public final class BindingSets extends Object
Utilities for working with BindingSet
Binding
,
BindingSet
Modifier and Type | Class and Description |
---|---|
static class |
BindingSets.Builder
Builder for
BindingSet |
Modifier and Type | Method and Description |
---|---|
static BindingSets.Builder |
builder()
Return a new
BindingSets.Builder for a BindingSet |
static boolean |
compatible(BindingSet bs1,
BindingSet bs2)
Check whether two
BindingSet s are compatible. |
static BindingSet |
empty()
Return an empty
BindingSet |
static BindingSet |
of(Binding theBinding,
Binding... theOtherBindings)
Create a
BindingSet comprised if the given bindings |
static BindingSet |
of(String theVar,
Value theValue)
Create a
BindingSet comprised if the given binding |
static Function<BindingSet,Value> |
select(String theVar)
Function to select the values for the given variable in a series of
bindings |
static Function<BindingSet,Statement> |
toStatement()
|
static BindingSet |
union(BindingSet theBindings1,
BindingSet theBindings2) |
@Nonnull public static BindingSet empty()
BindingSet
@Nonnull public static BindingSet union(@Nonnull BindingSet theBindings1, @Nonnull BindingSet theBindings2)
public static Function<BindingSet,Statement> toStatement()
Function
that will transform a BindingSet
into a Statement
. 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.@Nonnull public static BindingSet of(@Nonnull Binding theBinding, @Nonnull Binding... theOtherBindings)
BindingSet
comprised if the given bindingstheBinding
- a bindingtheOtherBindings
- additional bindings@Nonnull public static BindingSet of(@Nonnull String theVar, @Nonnull Value theValue)
BindingSet
comprised if the given bindingtheVar
- the variabletheValue
- the bound value@Nonnull public static Function<BindingSet,Value> select(@Nonnull String theVar)
bindings
theVar
- the variable to selectpublic static boolean compatible(@Nonnull BindingSet bs1, @Nonnull BindingSet bs2)
BindingSet
s are compatible. Two binding sets are compatible if they have
equal values for each binding name that occurs in both binding sets.@Nonnull public static BindingSets.Builder builder()
BindingSets.Builder
for a BindingSet
Copyright © 2010-2016 Stardog Union. All Rights Reserved.