Package com.stardog.stark
Class Statements
- java.lang.Object
-
- com.stardog.stark.Statements
-
public final class Statements extends java.lang.ObjectUtilities for working with
Statement.- Since:
- 1.0
- Version:
- 1.0
- Author:
- Michael Grove
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.function.BiFunction<Statement,Resource,Statement>APPLY_CONTEXT
-
Constructor Summary
Constructors Constructor Description Statements()No instances
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.function.Function<Statement,Statement>applyContext(Resource theContext)static StatementapplyContext(Statement stmt, Resource context)static java.util.function.Predicate<Statement>matches(Resource theSubject, IRI thePredicate, Value theObject, Resource... theContexts)Provide aPredicatethat can filter a graph based on which statements match the given SPOC pattern.
-
-
-
Method Detail
-
matches
@Nonnull public static java.util.function.Predicate<Statement> matches(@Nullable Resource theSubject, @Nullable IRI thePredicate, @Nullable Value theObject, @Nullable Resource... theContexts)
Provide aPredicatethat can filter a graph based on which statements match the given SPOC pattern. All arguments accept `null` as a wildcard argument to indicate that the results _should not_ be filtered on that attribute.- Parameters:
theSubject- the subject to matchthePredicate- the predicate to matchtheObject- the object to matchtheContexts- the contexts to match- Returns:
- a predicate can be used for matching
-
applyContext
public static Statement applyContext(@Nonnull Statement stmt, @Nonnull Resource context)
-
-