public final class StatementPattern extends Object implements Statement, Predicate<Statement>
A Statement
implementation representing a Statement pattern, which is a Statement where some or all of the
SPOC elements are a wildcard.
Given a pattern of `pattern(*, :p, *)` it would match `:s :p :o` and `:foo :p :bar` but not `:s :pred :o`.
Modifier and Type | Class and Description |
---|---|
static class |
StatementPattern.Builder |
Modifier and Type | Method and Description |
---|---|
Resource |
context()
The name of the graph in which this statement appears.
|
boolean |
equals(Object theObj) |
int |
hashCode() |
static StatementPattern.Builder |
newBuilder() |
static StatementPattern |
o(Value theObject) |
Value |
object()
The object of the statement
|
static StatementPattern |
p(IRI thePredicate) |
static StatementPattern |
po(IRI thePred,
Value theObject) |
IRI |
predicate()
The predicate of the statement
|
static StatementPattern |
s(Resource theSubj) |
static StatementPattern |
sp(Resource theSubj,
IRI thePred) |
static StatementPattern |
spo(Resource theSubj,
IRI thePred,
Value theObj) |
Resource |
subject()
The subject of the statement
|
boolean |
test(Statement theStatement)
Return whether or not this pattern matches the given Statement
|
public static final IRI WILDCARD
public boolean test(@Nonnull Statement theStatement)
@Nonnull public Resource context()
context
in interface Statement
Values.DEFAULT_GRAPH
will be returned.@Nonnull public static StatementPattern.Builder newBuilder()
@Nonnull public static StatementPattern o(@Nonnull Value theObject)
@Nonnull public static StatementPattern p(@Nonnull IRI thePredicate)
@Nonnull public static StatementPattern s(@Nonnull Resource theSubj)
@Nonnull public static StatementPattern spo(@Nonnull Resource theSubj, @Nonnull IRI thePred, @Nonnull Value theObj)
Copyright © 2010-2016 Stardog Union. All Rights Reserved.