Package com.stardog.stark.query
Interface Binding
-
- All Superinterfaces:
java.util.function.Supplier<Value>
public interface Binding extends java.util.function.Supplier<Value>
A variable binding in a single
solution
to aselect query
.- Since:
- 1.0
- Version:
- 1.0
- Author:
- Michael Grove
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default java.util.Optional<BNode>
bnode()
Return the value of the binding, optionally, as a bnodedefault Value
get()
default java.util.Optional<IRI>
iri()
Return the value of the binding, optionally, as a IRIdefault java.util.Optional<Literal>
literal()
Return the value of the binding, optionally, as a literaljava.lang.String
name()
Return the name of the variable the value is bound todefault java.util.Optional<Resource>
resource()
Return the value of the binding, optionally, as a resource (bnode or iri)default java.util.Optional<Statement>
statement()
Return the value of the binding, optionally, as a statementValue
value()
Return the value of the binding
-
-
-
Method Detail
-
name
@Nonnull java.lang.String name()
Return the name of the variable the value is bound to- Returns:
- the variable name
-
value
@Nonnull Value value()
Return the value of the binding- Returns:
- the value
-
literal
default java.util.Optional<Literal> literal()
Return the value of the binding, optionally, as a literal- Returns:
- the value as a literal, or an empty optional if the value is not a literal
-
resource
default java.util.Optional<Resource> resource()
Return the value of the binding, optionally, as a resource (bnode or iri)- Returns:
- the value as a resource, or an empty optional if the value is not a resource
-
iri
default java.util.Optional<IRI> iri()
Return the value of the binding, optionally, as a IRI- Returns:
- the value as a IRI, or an empty optional if the value is not a IRI
-
bnode
default java.util.Optional<BNode> bnode()
Return the value of the binding, optionally, as a bnode- Returns:
- the value as a bnode, or an empty optional if the value is not a bnode
-
statement
default java.util.Optional<Statement> statement()
Return the value of the binding, optionally, as a statement- Returns:
- the value as a statement, or an empty optional if the value is not a statement
-
-