public interface RDFModel extends BaseRDFTripleModel, SPARQLQueryModel
TripleQueryModel which allows for more flexible management of
query parameters| Modifier and Type | Method and Description |
|---|---|
void |
addInstance(String uri,
ARTResource cls,
ARTResource... graphs)
adds a resource with uri=
uri to the specified graphsThe resource is automatically typized with class cls |
void |
addProperty(String propertyURI,
ARTURIResource superProperty,
ARTResource... graphs)
adds a resource with uri=
propertyURI as an rdf:PropertyThe new property is defined as subproperty of suprtProperty (unless this last is
null) |
void |
addType(ARTResource res,
ARTResource cls,
ARTResource... graphs)
adds a type to resource
res |
void |
deleteProperty(ARTURIResource property,
ARTResource... graphs)
deletes a property
|
void |
deleteResource(ARTResource resource,
ARTResource... graphs)
remove
resource and all information about it from graphs graphs |
boolean |
existsResource(ARTResource res,
ARTResource... graphs) |
boolean |
hasType(ARTResource res,
ARTResource type,
boolean inferred,
ARTResource... graphs)
checks if resource
type is a type for resource res |
void |
instantiatePropertyWithPlainLiteral(ARTResource subject,
ARTURIResource predicate,
String value,
ARTResource... graphs)
creates a triple for the given
subject, predicate and valueby using a plain literal with no language tag as the object |
void |
instantiatePropertyWithPlainLiteral(ARTResource subject,
ARTURIResource predicate,
String value,
String lang,
ARTResource... graphs)
creates a triple for the given
subject, predicate and valueby using a plain literal with a language tag as the object |
void |
instantiatePropertyWithResource(ARTResource subject,
ARTURIResource predicate,
ARTResource object,
ARTResource... graphs)
creates a triple for the given
subject, predicate and objectjust a mere rewriting of addTriple with the object constrained to be a Resource |
void |
instantiatePropertyWithTypedLiteral(ARTResource subject,
ARTURIResource property,
String value,
ARTURIResource datatype,
ARTResource... graphs)
creates a triple for the given
subject, predicate and object, which is
described by its label (value) and (datatype) |
boolean |
isLocallyDefined(ARTResource res,
ARTResource... graphs)
Checks whether there exists an explicit triple in any of the
provided graphs the subject of which is the provided resource
res.
|
boolean |
isProperty(ARTResource prop,
ARTResource... graphs)
checks that resource
prop is a propertyIf available, reasoning is activated by default, so all kind of properties should be properly checked by this method |
ARTResourceIterator |
listInstances(ARTResource type,
boolean inferred,
ARTResource... graphs)
retrieves all instances of class
type |
ARTURIResourceIterator |
listNamedInstances(ARTResource... graphs) |
ARTURIResourceIterator |
listProperties(ARTResource... graphs)
list all properties declared in graphs
graphsIf available, reasoning is activated by default, so all kind of properties should be returned by this method |
ARTResourceIterator |
listTypes(ARTResource res,
boolean inferred,
ARTResource... graphs)
retrieves all classes which are types for resource
res |
void |
removeType(ARTResource res,
ARTResource cls,
ARTResource... graphs)
removes the rdf:type relationship between
res and cls |
void |
renameProperty(ARTURIResource res,
String newLocalName,
ARTResource... graphs)
renames a property (shortcut for
renameResource(ARTURIResource, String, ARTResource...), as a
property has no restriction on where it can appear inside a triple) |
void |
renameResource(ARTURIResource res,
String newURI,
ARTResource... graphs)
renames a resource
|
ARTBNode |
retrieveBNode(String ID,
ARTResource... graphs)
Contract for this method is:
If there exist a triple in the specified graphs graphs where a blank node with id=
ID is mentioned, then return that blank node, otherwise return null |
ARTURIResource |
retrieveURIResource(String uri,
ARTResource... graphs)
Contract for this method is:
If there exist a triple in the specified graphs graphs where a resource with uri=
uri is mentioned, then return that resource, otherwise return null |
addRDF, addRDF, addStatement, addTriple, clearRDF, close, deleteStatement, deleteTriple, getBaseURI, getDefaultNamespace, hasStatement, hasTriple, listNamedGraphs, listNamespaces, listPredicatesOfSubjObjPair, listStatements, listSubjectsOfPredObjPair, listValuesOfSubjPredPair, setBaseURI, setDefaultNamespace, writeRDF, writeRDFexpandQName, getNamespacePrefixMapping, getNSForPrefix, getPrefixForNS, getQName, removeNsPrefixMapping, setNsPrefixcreateBNode, createBNode, createLiteral, createLiteral, createLiteral, createStatement, createURIResourcewriteRDF, writeRDFcreateBooleanQuery, createBooleanQuery, createBooleanQuery, createGraphQuery, createGraphQuery, createGraphQuery, createQuery, createQuery, createQuery, createTupleQuery, createTupleQuery, createTupleQuery, createUpdateQuery, createUpdateQuery, createUpdateQuerycreateBooleanQuery, createGraphQuery, createQuery, createTupleQuery, createUpdatevoid addInstance(String uri, ARTResource cls, ARTResource... graphs) throws ModelUpdateException
uri to the specified graphsclsuri - cls - graphs - ModelUpdateExceptionvoid addProperty(String propertyURI, ARTURIResource superProperty, ARTResource... graphs) throws ModelUpdateException
propertyURI as an rdf:PropertysuprtProperty (unless this last is
null)propertyURI - superProperty - graphs - ModelUpdateExceptionvoid addType(ARTResource res, ARTResource cls, ARTResource... graphs) throws ModelUpdateException
resres - cls - graphs - ModelUpdateExceptionvoid instantiatePropertyWithPlainLiteral(ARTResource subject, ARTURIResource predicate, String value, ARTResource... graphs) throws ModelUpdateException
subject, predicate and valuesubject - predicate - value - graphs - ModelUpdateExceptionvoid instantiatePropertyWithPlainLiteral(ARTResource subject, ARTURIResource predicate, String value, String lang, ARTResource... graphs) throws ModelUpdateException
subject, predicate and valuesubject - predicate - value - graphs - ModelUpdateExceptionvoid instantiatePropertyWithTypedLiteral(ARTResource subject, ARTURIResource property, String value, ARTURIResource datatype, ARTResource... graphs) throws ModelUpdateException
subject, predicate and object, which is
described by its label (value) and (datatype)subject - property - value - lang - ModelUpdateExceptionvoid instantiatePropertyWithResource(ARTResource subject, ARTURIResource predicate, ARTResource object, ARTResource... graphs) throws ModelUpdateException
subject, predicate and objectsubject - predicate - object - graphs - ModelUpdateExceptionARTURIResourceIterator listProperties(ARTResource... graphs) throws ModelAccessException
graphsgraphs - ModelAccessExceptionARTURIResource retrieveURIResource(String uri, ARTResource... graphs) throws ModelAccessException
graphs where a resource with uri=
uri is mentioned, then return that resource, otherwise return nulluri - graphs - ModelAccessExceptionboolean isLocallyDefined(ARTResource res, ARTResource... graphs) throws ModelAccessException
res - graphs - ModelAccessExceptionboolean existsResource(ARTResource res, ARTResource... graphs) throws ModelAccessException
res - graphs - ModelAccessExceptionARTBNode retrieveBNode(String ID, ARTResource... graphs) throws ModelAccessException
graphs where a blank node with id=
ID is mentioned, then return that blank node, otherwise return nulluri - graphs - ModelAccessExceptionARTResourceIterator listTypes(ARTResource res, boolean inferred, ARTResource... graphs) throws ModelAccessException
resres - inferred - graphs - ModelAccessExceptionARTResourceIterator listInstances(ARTResource type, boolean inferred, ARTResource... graphs) throws ModelAccessException
typetype - inferred - graphs - ModelAccessExceptionARTURIResourceIterator listNamedInstances(ARTResource... graphs) throws ModelAccessException
ModelAccessExceptionboolean hasType(ARTResource res, ARTResource type, boolean inferred, ARTResource... graphs) throws ModelAccessException
type is a type for resource resres - type - inferred - graphs - ModelAccessExceptionvoid removeType(ARTResource res, ARTResource cls, ARTResource... graphs) throws ModelUpdateException
res and clsres - cls - graphs - ModelUpdateExceptionboolean isProperty(ARTResource prop, ARTResource... graphs) throws ModelAccessException
prop is a propertyprop - graphs - ModelAccessExceptionvoid deleteResource(ARTResource resource, ARTResource... graphs) throws ModelUpdateException
resource and all information about it from graphs graphsresource - graphs - ModelUpdateExceptionvoid deleteProperty(ARTURIResource property, ARTResource... graphs) throws ModelUpdateException
individual - graphs - ModelUpdateExceptionvoid renameResource(ARTURIResource res, String newURI, ARTResource... graphs) throws ModelUpdateException
res - newURI - ModelUpdateExceptionvoid renameProperty(ARTURIResource res, String newLocalName, ARTResource... graphs) throws ModelUpdateException
renameResource(ARTURIResource, String, ARTResource...), as a
property has no restriction on where it can appear inside a triple)res - newLocalName - ModelUpdateExceptionCopyright © 2015 ART Group, University of Rome, Tor Vergata. All Rights Reserved.