| Modifier | Constructor and Description |
|---|---|
protected |
Models() |
| Modifier and Type | Method and Description |
|---|---|
static Value |
anyObject(Model m)
Deprecated.
since 4.0. Use
object(Model) instead. |
static Literal |
anyObjectLiteral(Model m)
Deprecated.
since 4.0. Use
objectLiteral(Model) instead. |
static Resource |
anyObjectResource(Model m)
Deprecated.
since 4.0. Use
objectResource(Model) instead. |
static URI |
anyObjectURI(Model m)
Deprecated.
since 4.0. Use
objectIRI(Model) instead. |
static URI |
anyPredicate(Model m)
Deprecated.
since 4.0. Use
predicate(Model) instead. |
static Resource |
anySubject(Model m)
Deprecated.
since 4.0. Use
subject(Model) instead. |
static BNode |
anySubjectBNode(Model m)
Deprecated.
since 4.0. Use
subjectBNode(Model) instead. |
static URI |
anySubjectURI(Model m)
Deprecated.
since 4.0. Use
subjectIRI(Model) instead. |
static boolean |
equals(Iterable<? extends Statement> model1,
Iterable<? extends Statement> model2)
Deprecated.
since 2.8.0. Use
isomorphic(Iterable, Iterable) instead. |
static boolean |
isomorphic(Iterable<? extends Statement> model1,
Iterable<? extends Statement> model2)
Compares two RDF models, and returns true if they consist of isomorphic graphs and the
isomorphic graph identifiers map 1:1 to each other.
|
static boolean |
isSubset(Iterable<? extends Statement> model1,
Iterable<? extends Statement> model2)
Compares two RDF models, and returns true if the first model is a subset of the second model,
using graph isomorphism to map statements between models.
|
static boolean |
isSubset(Set<? extends Statement> model1,
Set<? extends Statement> model2)
Compares two RDF models, and returns true if the first model is a subset of the second model,
using graph isomorphism to map statements between models.
|
static java.util.function.Supplier<ModelException> |
modelException(String message)
Creates a
Supplier of ModelException objects that be passed to
Optional.orElseThrow(Supplier) to generate exceptions as necessary. |
static Optional<Value> |
object(Model m)
Retrieves an object
Value from the statements in the given model. |
static Optional<IRI> |
objectIRI(Model m)
Retrieves an object
IRI value from the statements in the given model. |
static Optional<Literal> |
objectLiteral(Model m)
Retrieves an object
Literal value from the statements in the given model. |
static Optional<Resource> |
objectResource(Model m)
Retrieves an object
Resource value from the statements in the given model. |
static Optional<String> |
objectString(Model m)
Retrieves an object value as a String from the statements in the given model.
|
static Optional<IRI> |
predicate(Model m)
Retrieves a predicate from the statements in the given model.
|
static Model |
setProperty(Model m,
Resource subject,
IRI property,
Value value,
Resource... contexts)
Sets the property value for the given subject to the given object value, replacing any existing
value(s) for the subject's property.
|
static Optional<Resource> |
subject(Model m)
Retrieves a subject
Resource from the statements in the given model. |
static Optional<BNode> |
subjectBNode(Model m)
Retrieves a subject
BNode from the statements in the given model. |
static Optional<IRI> |
subjectIRI(Model m)
Retrieves a subject
IRI from the statements in the given model. |
public static Optional<Value> object(Model m)
Value from the statements in the given model. If more than one possible
object value exists, any one value is picked and returned.m - the model from which to retrieve an object value.Optional.empty() if no such value exists.@Deprecated public static Value anyObject(Model m)
object(Model) instead.public static Optional<Literal> objectLiteral(Model m)
Literal value from the statements in the given model. If more than one
possible Literal value exists, any one Literal value is picked and returned.m - the model from which to retrieve an object Literal value.Optional.empty() if no such value
exists.@Deprecated public static Literal anyObjectLiteral(Model m)
objectLiteral(Model) instead.public static Optional<Resource> objectResource(Model m)
Resource value from the statements in the given model. If more than one
possible Resource value exists, any one Resource value is picked and returned.@Deprecated public static Resource anyObjectResource(Model m)
objectResource(Model) instead.public static Optional<IRI> objectIRI(Model m)
IRI value from the statements in the given model. If more than one possible
IRI value exists, any one value is picked and returned.public static Optional<String> objectString(Model m)
@Deprecated public static URI anyObjectURI(Model m)
objectIRI(Model) instead.public static Optional<Resource> subject(Model m)
Resource from the statements in the given model. If more than one possible
resource value exists, any one resource value is picked and returned.@Deprecated public static Resource anySubject(Model m)
subject(Model) instead.public static Optional<IRI> subjectIRI(Model m)
IRI from the statements in the given model. If more than one possible IRI
value exists, any one IRI value is picked and returned.@Deprecated public static URI anySubjectURI(Model m)
subjectIRI(Model) instead.public static Optional<BNode> subjectBNode(Model m)
BNode from the statements in the given model. If more than one possible
blank node value exists, any one blank node value is picked and returned.@Deprecated public static BNode anySubjectBNode(Model m)
subjectBNode(Model) instead.public static Optional<IRI> predicate(Model m)
@Deprecated public static URI anyPredicate(Model m)
predicate(Model) instead.public static Model setProperty(Model m, Resource subject, IRI property, Value value, Resource... contexts)
m - the model in which to set the property value. May not be null.subject - the subject for which to set/replace the property value. May not be null.property - the property for which to set/replace the value. May not be null.value - the value to set for the given subject and property. May not be null.contexts - the context(s) in which to set/replace the property value. Optional vararg argument. If not
specified the operations works on the entire Model.public static boolean isomorphic(Iterable<? extends Statement> model1, Iterable<? extends Statement> model2)
A Model can consist of more than one graph (denoted by context identifiers). Two models are considered isomorphic if for each of the graphs in one model, an isomorphic graph exists in the other model, and the context identifiers of these graphs are either identical or (in the case of blank nodes) map 1:1 on each other.
@Deprecated public static boolean equals(Iterable<? extends Statement> model1, Iterable<? extends Statement> model2)
isomorphic(Iterable, Iterable) instead.public static boolean isSubset(Iterable<? extends Statement> model1, Iterable<? extends Statement> model2)
public static boolean isSubset(Set<? extends Statement> model1, Set<? extends Statement> model2)
public static java.util.function.Supplier<ModelException> modelException(String message)
Supplier of ModelException objects that be passed to
Optional.orElseThrow(Supplier) to generate exceptions as necessary.message - The message to be used for the exceptionSupplier that will create ModelException objects with the given message.Copyright © 2015-2016 Eclipse Foundation. All Rights Reserved.