public final class ConstrainedModel extends DelegatingModel
A Model which has a constraint placed upon which statements can be added to the Model.
| Modifier and Type | Class and Description |
|---|---|
static class |
ConstrainedModel.StatementViolatedConstraintException
A runtime exception suitable for being thrown from a
Predicate on a Statement |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(org.openrdf.model.Resource theResource,
org.openrdf.model.IRI theURI,
org.openrdf.model.Value theValue,
org.openrdf.model.Resource... theContexts) |
boolean |
add(org.openrdf.model.Statement e) |
boolean |
addAll(Collection<? extends org.openrdf.model.Statement> c) |
static ConstrainedModel |
of(Consumer<org.openrdf.model.Statement> theConstraint)
Create a new empty, ConstrainedGraph, which will have the specified constraint place on all additions
|
static ConstrainedModel |
of(org.openrdf.model.Model theGraph,
Consumer<org.openrdf.model.Statement> theConstraint)
Create a new ConstrainedGraph which will have the specified constraint enforced on all additions.
|
static Predicate<org.openrdf.model.Statement> |
onlyValidLiterals()
|
add, clear, clear, contains, contains, contains, containsAll, contexts, equals, filter, filter, forEach, getNamespace, getNamespaces, getValueFactory, hashCode, isEmpty, iterator, match, objectIRI, objectLiteral, objectResource, objects, objectString, objectURI, objectValue, parallelStream, predicates, remove, remove, remove, removeAll, removeIf, removeNamespace, retainAll, setNamespace, setNamespace, size, spliterator, stream, subjectBNode, subjectIRI, subjectResource, subjects, subjectURI, toArray, toArray, unmodifiablepublic static ConstrainedModel of(Consumer<org.openrdf.model.Statement> theConstraint)
theConstraint - the constraint to enforcepublic static ConstrainedModel of(org.openrdf.model.Model theGraph, Consumer<org.openrdf.model.Statement> theConstraint)
theGraph - the graph to constraintheConstraint - the constraint to enforcepublic static Predicate<org.openrdf.model.Statement> onlyValidLiterals()
public boolean add(org.openrdf.model.Statement e)
add in interface Collection<org.openrdf.model.Statement>add in interface Set<org.openrdf.model.Statement>add in class DelegatingModelpublic boolean add(org.openrdf.model.Resource theResource,
org.openrdf.model.IRI theURI,
org.openrdf.model.Value theValue,
org.openrdf.model.Resource... theContexts)
add in interface org.openrdf.model.Graphadd in interface org.openrdf.model.Modeladd in class DelegatingModelpublic boolean addAll(Collection<? extends org.openrdf.model.Statement> c)
addAll in interface Collection<org.openrdf.model.Statement>addAll in interface Set<org.openrdf.model.Statement>addAll in class DelegatingModelCopyright © 2010-2016 Stardog Union. All Rights Reserved.