public interface RDFModel extends BaseRDFTripleModel, SPARQLQueryModel
TripleQueryModel
which allows for more flexible management of
query parametersModifier and Type | Method and Description |
---|---|
void |
addInstance(String uri,
ARTResource cls,
ARTResource... graphs)
adds a resource with uri=
uri to the specified graphs The 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 value by 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 value by 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 object just 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
graphs If 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, writeRDF
expandQName, getNamespacePrefixMapping, getNSForPrefix, getPrefixForNS, getQName, removeNsPrefixMapping, setNsPrefix
createBNode, createBNode, createLiteral, createLiteral, createLiteral, createStatement, createURIResource
writeRDF, writeRDF
createBooleanQuery, createBooleanQuery, createBooleanQuery, createGraphQuery, createGraphQuery, createGraphQuery, createQuery, createQuery, createQuery, createTupleQuery, createTupleQuery, createTupleQuery, createUpdateQuery, createUpdateQuery, createUpdateQuery
createBooleanQuery, createGraphQuery, createQuery, createTupleQuery, createUpdate
void addInstance(String uri, ARTResource cls, ARTResource... graphs) throws ModelUpdateException
uri
to the specified graphs
cls
uri
- cls
- graphs
- ModelUpdateException
void addProperty(String propertyURI, ARTURIResource superProperty, ARTResource... graphs) throws ModelUpdateException
propertyURI
as an rdf:PropertysuprtProperty
(unless this last is
null
)propertyURI
- superProperty
- graphs
- ModelUpdateException
void addType(ARTResource res, ARTResource cls, ARTResource... graphs) throws ModelUpdateException
res
res
- cls
- graphs
- ModelUpdateException
void instantiatePropertyWithPlainLiteral(ARTResource subject, ARTURIResource predicate, String value, ARTResource... graphs) throws ModelUpdateException
subject
, predicate
and value
subject
- predicate
- value
- graphs
- ModelUpdateException
void instantiatePropertyWithPlainLiteral(ARTResource subject, ARTURIResource predicate, String value, String lang, ARTResource... graphs) throws ModelUpdateException
subject
, predicate
and value
subject
- predicate
- value
- graphs
- ModelUpdateException
void 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
- ModelUpdateException
void instantiatePropertyWithResource(ARTResource subject, ARTURIResource predicate, ARTResource object, ARTResource... graphs) throws ModelUpdateException
subject
, predicate
and object
subject
- predicate
- object
- graphs
- ModelUpdateException
ARTURIResourceIterator listProperties(ARTResource... graphs) throws ModelAccessException
graphs
graphs
- ModelAccessException
ARTURIResource retrieveURIResource(String uri, ARTResource... graphs) throws ModelAccessException
graphs
where a resource with uri=
uri
is mentioned, then return that resource, otherwise return null
uri
- graphs
- ModelAccessException
boolean isLocallyDefined(ARTResource res, ARTResource... graphs) throws ModelAccessException
res
- graphs
- ModelAccessException
boolean existsResource(ARTResource res, ARTResource... graphs) throws ModelAccessException
res
- graphs
- ModelAccessException
ARTBNode retrieveBNode(String ID, ARTResource... graphs) throws ModelAccessException
graphs
where a blank node with id=
ID
is mentioned, then return that blank node, otherwise return null
uri
- graphs
- ModelAccessException
ARTResourceIterator listTypes(ARTResource res, boolean inferred, ARTResource... graphs) throws ModelAccessException
res
res
- inferred
- graphs
- ModelAccessException
ARTResourceIterator listInstances(ARTResource type, boolean inferred, ARTResource... graphs) throws ModelAccessException
type
type
- inferred
- graphs
- ModelAccessException
ARTURIResourceIterator listNamedInstances(ARTResource... graphs) throws ModelAccessException
ModelAccessException
boolean hasType(ARTResource res, ARTResource type, boolean inferred, ARTResource... graphs) throws ModelAccessException
type
is a type for resource res
res
- type
- inferred
- graphs
- ModelAccessException
void removeType(ARTResource res, ARTResource cls, ARTResource... graphs) throws ModelUpdateException
res
and cls
res
- cls
- graphs
- ModelUpdateException
boolean isProperty(ARTResource prop, ARTResource... graphs) throws ModelAccessException
prop
is a propertyprop
- graphs
- ModelAccessException
void deleteResource(ARTResource resource, ARTResource... graphs) throws ModelUpdateException
resource
and all information about it from graphs graphs
resource
- graphs
- ModelUpdateException
void deleteProperty(ARTURIResource property, ARTResource... graphs) throws ModelUpdateException
individual
- graphs
- ModelUpdateException
void renameResource(ARTURIResource res, String newURI, ARTResource... graphs) throws ModelUpdateException
res
- newURI
- ModelUpdateException
void 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
- ModelUpdateException
Copyright © 2015 ART Group, University of Rome, Tor Vergata. All Rights Reserved.