public class Bridge extends BridgeBase
Constructor and Description |
---|
Bridge() |
Modifier and Type | Method and Description |
---|---|
static boolean |
addValue(Model model,
Resource o,
URI propertyURI,
Object value)
Add a value to the property of an object after checking if the object
already had the property with the same value.
|
static boolean |
containsInstance(Model model,
URI classURI)
Check if the model contains an instance of the given RDFS/OWL schema
class.
|
static Iterator<? extends Object> |
getSparqlSelectSingleVariable(Model m,
Class<?> returnType,
String sparqlSelectQuery)
Use a SPARQL query on the model and wrap the result in a
SparlSingleVariableIterator, to ensure that only single elements are
included in the result.
|
static boolean |
isInstanceOf(Model model,
Resource instanceID,
URI classURI)
Check if a resource is an instance of a given RDFS/OWL class.
|
static void |
setAllValue(Model model,
Resource subject,
URI prop,
Object[] o)
Set the value of a property from a resource after removing all existing
values of the property from that resource.
|
static void |
setValue(Model model,
Resource resourceObject,
URI propertyURI,
Object value)
Set the value(s) of a property of an object, after removing all values of
the property from the object
|
static boolean |
updateValue(Model model,
BlankNode blankNode,
URI propertyURI,
Object _old,
Object _new)
Update the value of a property from a resource.
|
static Boolean |
updateValue(Model model,
Resource resourceIdentifier,
URI propertyURI,
Object _old,
Object _new)
Update the value of a property from a resource.
|
add, containsGivenValue, getAllInstances, getAllValues_asSet, getAllValues_Inverse, getAllValues, getSparqlSelect, getValue, removeAllValues
public static boolean addValue(Model model, Resource o, URI propertyURI, Object value) throws ModelRuntimeException
model
- - the underlying RDF2Go modelo
- - URI or BlankNode identifying the resourcepropertyURI
- - URI of the propertyvalue
- - value of the propertyModelRuntimeException
- ...public static void setValue(Model model, Resource resourceObject, URI propertyURI, Object value)
model
- - the underlying RDF2Go modelresourceObject
- - URI or BlankNode identifying the objectpropertyURI
- - URI of the resourcevalue
- - value(s) of the property, may be an arrayModelRuntimeException
- ...public static void setAllValue(Model model, Resource subject, URI prop, Object[] o) throws ModelRuntimeException
model
- - the underlying RDF2Go modelsubject
- - URI or BlankNode identifying the resourceprop
- - URI of the propertyo
- - value of the propertyModelRuntimeException
- ...public static Boolean updateValue(Model model, Resource resourceIdentifier, URI propertyURI, Object _old, Object _new) throws ModelRuntimeException
model
- - the underlying RDF2Go modelresourceIdentifier
- - URI or BlankNode identifying the resourcepropertyURI
- - URI of the property_old
- - old value of the property_new
- - new value of the propertyModelRuntimeException
- ...public static boolean updateValue(Model model, BlankNode blankNode, URI propertyURI, Object _old, Object _new) throws ModelRuntimeException
model
- the underlying RDF2Go modelblankNode
- BlankNode identifying the resourcepropertyURI
- URI of the property_old
- old value of the property_new
- new value of the propertyModelRuntimeException
- ...public static boolean containsInstance(Model model, URI classURI)
model
- - the underlying RDF2Go modelclassURI
- - URI of the RDFS/OWL schema classpublic static boolean isInstanceOf(Model model, Resource instanceID, URI classURI) throws ModelRuntimeException
model
- - the underlying RDF2Go modelinstanceID
- - URI or BlankNode of the instanceclassURI
- - URI of the RDFS/OWL classModelRuntimeException
- ...public static Iterator<? extends Object> getSparqlSelectSingleVariable(Model m, Class<?> returnType, String sparqlSelectQuery) throws ModelRuntimeException
m
- - the underlying RDF2Go modelreturnType
- - the desired Java return typesparqlSelectQuery
- - the SPARQL query stringModelRuntimeException
- ...Copyright © 2005–2016 IT-Consulting Dr. Max V?lkel | Project started at FZI Forschungszentrum Informatik, www.fzi.de. All rights reserved.