public class BridgeBase extends Object
| Constructor and Description |
|---|
BridgeBase() |
| Modifier and Type | Method and Description |
|---|---|
static void |
add(Model model,
Resource subject,
URI property,
Object object)
Add a value to a property of a resource.
|
static boolean |
containsGivenValue(Model model,
Resource resource,
URI propertyURI,
Object value)
Check if the resource identified by resourceID, has a property
identidified by propertyURI which has the given value among its values.
|
static Object[] |
getAllInstances(Model model,
Class<?> javaClass)
Get all instances of the class in the model.
|
static Set<Object> |
getAllValues_asSet(Model model,
Resource resource,
URI propertyURI,
Class<?> returnType)
Return a Set with all x matching (resourceObject, propertyURI, x) in the
given model.
|
static Object[] |
getAllValues_Inverse(Model model,
URI propertyURI,
Node objectNode,
Class<?> returnType)
Get all resources having the given property and value.
|
static Object[] |
getAllValues(Model model,
Resource resource,
URI propertyURI,
Class<?> returnType)
Get all values for the given resource and property.
|
static OOQueryResultTable |
getSparqlSelect(Model model,
Map<String,Class<?>> returnTypes,
String sparqlSelectQuery)
Query the model with a SPARQL query.
|
static Object |
getValue(Model model,
Resource resourceSubject,
URI propertyURI,
Class<?> returnType)
Return the first x with matching statement (resourceObject, propertyURI,
x) from the given model.
|
static boolean |
removeAllValues(Model model,
Resource r,
URI p)
Remove all values of a property from a resource.
|
public static boolean containsGivenValue(Model model, Resource resource, URI propertyURI, Object value) throws ModelRuntimeException
model - -
the underlying RDF2Go modelresource - -
must be an URI or a BlankNodepropertyURI - -
URI of the propertyvalue - -
look for this value of the propertyExceptionModelRuntimeExceptionpublic static Object getValue(Model model, Resource resourceSubject, URI propertyURI, Class<?> returnType) throws RDFDataException, ModelRuntimeException
model - -
the underlying RDF2Go modelresourceSubject - -
the URI or BlankNode of the resourcepropertyURI - -
the URI of the propertyreturnType - -
return the value from the statement as the given Java TypeRDFDataException - if more then one value was foundModelRuntimeExceptionpublic static Set<Object> getAllValues_asSet(Model model, Resource resource, URI propertyURI, Class<?> returnType)
model - -
the underlying modelresource - -
URI or BlankNode of the resourcepropertyURI - -
URI of the propertyreturnType - -
return the found values as the given Java TypeExceptionpublic static Object[] getAllValues(Model model, Resource resource, URI propertyURI, Class<?> returnType)
model - -
the underlying RDF2Go modelresource - -
URI or BlankNode of the resourcepropertyURI - -
URI of the propertyreturnType - -
return the values typed as returnTypeExceptionpublic static Object[] getAllValues_Inverse(Model model, URI propertyURI, Node objectNode, Class<?> returnType) throws ModelRuntimeException
model - -
the underlying RDF2Go modelpropertyURI - -
URI of the propertyobjectNode - -
predicate/value of the propertyreturnType - -
return the values typed as returnTypeExceptionModelRuntimeExceptionpublic static OOQueryResultTable getSparqlSelect(Model model, Map<String,Class<?>> returnTypes, String sparqlSelectQuery) throws ModelRuntimeException
model - -
the underlying RDF2GO modelreturnTypes - -
cast the values to the types in returnTypes[]sparqlSelectQuery - -
the SPARQL queryExceptionModelRuntimeExceptionpublic static void add(Model model, Resource subject, URI property, Object object) throws ModelRuntimeException
model - -
the underlying RDF2Go modelsubject - -
URI or BlankNode representing the resourceproperty - -
URI of the propertyobject - -
value of the property which is to be added to the resourceExceptionModelRuntimeExceptionpublic static Object[] getAllInstances(Model model, Class<?> javaClass)
model - -
the underlying RDF2Go classjavaClass - -
the requested Java classpublic static boolean removeAllValues(Model model, Resource r, URI p) throws ModelRuntimeException
model - -
the underlying RDF2Go modelresourceObject - -
URI or BlankNode of the resourcepropertyURI - -
URI of the propertyExceptionModelRuntimeExceptionCopyright © 2005–2016 IT-Consulting Dr. Max V?lkel | Project started at FZI Forschungszentrum Informatik, www.fzi.de. All rights reserved.