Modifier | Constructor and Description |
---|---|
protected |
Models() |
Modifier and Type | Method and Description |
---|---|
static Value |
anyObject(Model m)
Retrieves any object value from the given model.
|
static Literal |
anyObjectLiteral(Model m)
Retrieves any object Literal value from the given model.
|
static Resource |
anyObjectResource(Model m)
Retrieves any object Resource value from the given model.
|
static URI |
anyObjectURI(Model m)
Retrieves any object URI value from the given model.
|
static URI |
anyPredicate(Model m)
Retrieves any predicate from the given model.
|
static Resource |
anySubject(Model m)
Retrieves any subject from the given model.
|
static BNode |
anySubjectBNode(Model m)
Retrieves any subject BNode from the given model.
|
static URI |
anySubjectURI(Model m)
Retrieves any subject URI from the given model.
|
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 contain
isomorphic graphs.
|
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 Model |
setProperty(Model m,
Resource subject,
URI 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.
|
public static Value anyObject(Model m)
m
- the model from which to retrieve an object value.null
if no
such value exists.Model.objectValue()
public static Literal anyObjectLiteral(Model m)
m
- the model from which to retrieve an object Literal value.null
if no such value exists.Model.objectLiteral()
public static Resource anyObjectResource(Model m)
m
- the model from which to retrieve an object Resource value.null
if no such value exists.Model.objectResource()
public static URI anyObjectURI(Model m)
m
- the model from which to retrieve an object URI value.null
if
no such value exists.Model.objectURI()
public static Resource anySubject(Model m)
m
- the model from which to retrieve a subject value.null
if no
such value exists.Model.subjectResource()
public static URI anySubjectURI(Model m)
m
- the model from which to retrieve a subject URI value.null
if
no such value exists.Model.subjectURI()
public static BNode anySubjectBNode(Model m)
m
- the model from which to retrieve a subject BNode value.null
if no such value exists.Model.subjectBNode()
public static URI anyPredicate(Model m)
m
- the model from which to retrieve a predicate value.null
if no
such value exists.public static Model setProperty(Model m, Resource subject, URI 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)
@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)
Copyright © 2001-2016 Aduna. All Rights Reserved.