public interface RDFService
| Modifier and Type | Interface and Description |
|---|---|
static class |
RDFService.ModelSerializationFormat |
static class |
RDFService.ResultFormat |
static class |
RDFService.SPARQLQueryType |
| Modifier and Type | Method and Description |
|---|---|
boolean |
changeSetUpdate(ChangeSet changeSet)
Performs a series of additions to and or removals from specified graphs
in the RDF store.
|
void |
close()
Frees any resources held by this RDFService object
The implementation of this method should be idempotent so that
multiple invocations do not cause an error.
|
long |
countTriples(org.apache.jena.rdf.model.RDFNode subject,
org.apache.jena.rdf.model.RDFNode predicate,
org.apache.jena.rdf.model.RDFNode object) |
String |
getDefaultWriteGraphURI()
Returns the URI of the default write graph
|
void |
getGraphMetadata()
To be determined.
|
List<String> |
getGraphURIs()
Returns a list of all the graph URIs in the RDF store.
|
org.apache.jena.rdf.model.Model |
getTriples(org.apache.jena.rdf.model.RDFNode subject,
org.apache.jena.rdf.model.RDFNode predicate,
org.apache.jena.rdf.model.RDFNode object,
long limit,
long offset) |
VitroRequest |
getVitroRequest() |
boolean |
isEquivalentGraph(String graphURI,
InputStream serializedGraph,
RDFService.ModelSerializationFormat serializationFormat)
Tests to see whether the supplied serialization is equivalent to the
named graph, as it exists in the store.
|
boolean |
isEquivalentGraph(String graphURI,
org.apache.jena.rdf.model.Model graph)
Tests to see whether the supplied serialization is equivalent to the
named graph, as it exists in the store.
|
ChangeSet |
manufactureChangeSet()
Creates a ChangeSet object
|
void |
newIndividual(String individualURI,
String individualTypeURI)
If the given individual already exists in the default write graph, throws an
RDFServiceException, otherwise adds one type assertion to the default write
graph.
|
void |
newIndividual(String individualURI,
String individualTypeURI,
String graphURI)
If the given individual already exists in the given graph, throws an
RDFServiceException, otherwise adds one type assertion to the given
graph.
|
boolean |
preferPreciseOptionals() |
void |
registerJenaModelChangedListener(org.apache.jena.rdf.model.ModelChangedListener changeListener)
Registers a Jena listener to listen to changes in any graph in
the RDF store.
|
void |
registerListener(ChangeListener changeListener)
Registers a listener to listen to changes in any graph in
the RDF store.
|
void |
serializeAll(OutputStream outputStream)
Serializes the union of all named and unnamed graphs in the store to the
supplied OutputStream, in N-Quads format.
|
void |
serializeGraph(String graphURI,
OutputStream outputStream)
Serializes the contents of the named graph to the supplied OutputStream,
in N-Triples format.
|
void |
setVitroRequest(VitroRequest vitroRequest)
UQAM-Bug-Correction Useful among other things to transport the linguistic context in the service
|
boolean |
sparqlAskQuery(String query)
Performs a SPARQL ASK query against the knowledge base.
|
void |
sparqlConstructQuery(String query,
org.apache.jena.rdf.model.Model model)
Performs a SPARQL construct query against the knowledge base.
|
InputStream |
sparqlConstructQuery(String query,
RDFService.ModelSerializationFormat resultFormat)
Performs a SPARQL construct query against the knowledge base.
|
InputStream |
sparqlDescribeQuery(String query,
RDFService.ModelSerializationFormat resultFormat)
Performs a SPARQL describe query against the knowledge base.
|
InputStream |
sparqlSelectQuery(String query,
RDFService.ResultFormat resultFormat)
Performs a SPARQL select query against the knowledge base.
|
void |
sparqlSelectQuery(String query,
ResultSetConsumer consumer)
Performs a SPARQL select query against the knowledge base.
|
void |
unregisterJenaModelChangedListener(org.apache.jena.rdf.model.ModelChangedListener changeListener)
Unregisters a Jena listener from listening to changes in
any graph in the RDF store
|
void |
unregisterListener(ChangeListener changeListener)
Unregisters a listener from listening to changes in
any graph in the RDF store
|
boolean changeSetUpdate(ChangeSet changeSet) throws RDFServiceException
changeSet - - a set of changes to be performed on the RDF store.RDFServiceExceptionvoid newIndividual(String individualURI, String individualTypeURI) throws RDFServiceException
individualURI - - URI of the individual to be addedindividualTypeURI - - URI of the type for the individualRDFServiceExceptionvoid newIndividual(String individualURI, String individualTypeURI, String graphURI) throws RDFServiceException
individualURI - - URI of the individual to be addedindividualTypeURI - - URI of the type for the individualgraphURI - - URI of the graph to which to add the individualRDFServiceExceptionInputStream sparqlConstructQuery(String query, RDFService.ModelSerializationFormat resultFormat) throws RDFServiceException
query - - the SPARQL query to be executed against the RDF storeresultFormat - - type of serialization for RDF result of the SPARQL queryRDFServiceExceptionvoid sparqlConstructQuery(String query, org.apache.jena.rdf.model.Model model) throws RDFServiceException
query - - the SPARQL query to be executed against the RDF storemodel - - the Model to add the statements toRDFServiceExceptionInputStream sparqlDescribeQuery(String query, RDFService.ModelSerializationFormat resultFormat) throws RDFServiceException
query - - the SPARQL query to be executed against the RDF storeresultFormat - - type of serialization for RDF result of the SPARQL queryRDFServiceExceptionInputStream sparqlSelectQuery(String query, RDFService.ResultFormat resultFormat) throws RDFServiceException
query - - the SPARQL query to be executed against the RDF storeresultFormat - - format for the result of the Select queryRDFServiceExceptionvoid sparqlSelectQuery(String query, ResultSetConsumer consumer) throws RDFServiceException
query - - the SPARQL query to be executed against the RDF storeconsumer - - the class to consume the results of the queryRDFServiceExceptionboolean sparqlAskQuery(String query) throws RDFServiceException
query - - the SPARQL ASK query to be executed against the RDF storeRDFServiceExceptionList<String> getGraphURIs() throws RDFServiceException
RDFServiceExceptionvoid getGraphMetadata()
throws RDFServiceException
RDFServiceExceptionString getDefaultWriteGraphURI() throws RDFServiceException
RDFServiceExceptionvoid serializeAll(OutputStream outputStream) throws RDFServiceException
outputStream - - receives the serialized result.RDFServiceExceptionvoid serializeGraph(String graphURI, OutputStream outputStream) throws RDFServiceException
graphURI - - the URI of the desired graph. May not be null.outputStream - - receives the serialized result.RDFServiceExceptionboolean isEquivalentGraph(String graphURI, InputStream serializedGraph, RDFService.ModelSerializationFormat serializationFormat) throws RDFServiceException
graphURI - - the URI of the graph to test against. May not be null.serializedGraph - - the contents to be compared with the existing graph. May not be null.serializationFormat - - May not be null.RDFServiceExceptionboolean isEquivalentGraph(String graphURI, org.apache.jena.rdf.model.Model graph) throws RDFServiceException
graphURI - - the URI of the graph to test against. May not be null.graph - - the contents to be compared with the existing graph. May not be null.RDFServiceExceptionvoid registerJenaModelChangedListener(org.apache.jena.rdf.model.ModelChangedListener changeListener)
throws RDFServiceException
changeListener - - the change listenerRDFServiceExceptionvoid unregisterJenaModelChangedListener(org.apache.jena.rdf.model.ModelChangedListener changeListener)
throws RDFServiceException
changeListener - - the change listenerRDFServiceExceptionvoid registerListener(ChangeListener changeListener) throws RDFServiceException
changeListener - - the change listenerRDFServiceExceptionvoid unregisterListener(ChangeListener changeListener) throws RDFServiceException
changeListener - - the change listenerRDFServiceExceptionChangeSet manufactureChangeSet()
long countTriples(org.apache.jena.rdf.model.RDFNode subject,
org.apache.jena.rdf.model.RDFNode predicate,
org.apache.jena.rdf.model.RDFNode object)
throws RDFServiceException
RDFServiceExceptionorg.apache.jena.rdf.model.Model getTriples(org.apache.jena.rdf.model.RDFNode subject,
org.apache.jena.rdf.model.RDFNode predicate,
org.apache.jena.rdf.model.RDFNode object,
long limit,
long offset)
throws RDFServiceException
RDFServiceExceptionboolean preferPreciseOptionals()
void close()
void setVitroRequest(VitroRequest vitroRequest)
vitroRequest - VitroRequest getVitroRequest()
Copyright © 2021. All rights reserved.