public class RDFServiceTDB extends RDFServiceJena
RDFService.ModelSerializationFormat, RDFService.ResultFormat, RDFService.SPARQLQueryTyperebuildGraphURICacheBNODE_ROOT_QUERY, defaultWriteGraphURI, registeredJenaListeners, registeredListeners| Constructor and Description |
|---|
RDFServiceTDB(String directoryPath) |
| 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) |
protected DatasetWrapper |
getDatasetWrapper() |
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) |
boolean |
isEquivalentGraph(String graphURI,
InputStream serializedGraph,
RDFService.ModelSerializationFormat serializationFormat)
TDB has a bug: if given a literal of type xsd:nonNegativeInteger, it
stores a literal of type xsd:integer.
|
boolean |
isEquivalentGraph(String graphURI,
org.apache.jena.rdf.model.Model graph)
TDB has a bug: if given a literal of type xsd:nonNegativeInteger, it
stores a literal of type xsd:integer.
|
boolean |
preferPreciseOptionals() |
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.
|
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)
TODO Is there a way to accomplish this without buffering the entire result?
|
void |
sparqlSelectQuery(String query,
ResultSetConsumer consumer)
Performs a SPARQL select query against the knowledge base.
|
applyChangeSetToModel, createQueryExecution, getGraphMetadata, getVitroRequest, insureThatInputStreamsAreResettable, notifyListenersOfPostChangeEvents, notifyListenersOfPreChangeEvents, operateOnModel, setVitroRequestcreateQuery, getDefaultWriteGraphURI, getRegisteredJenaModelChangedListeners, getRegisteredListeners, getSerializationFormatString, isPreconditionSatisfied, manufactureChangeSet, newIndividual, newIndividual, notifyListeners, notifyListenersOfChanges, notifyListenersOfEvent, pyString, registerJenaModelChangedListener, registerListener, separateStatementsWithBlankNodes, sparqlNode, sparqlNodeUpdate, sparqlSelectQueryHasResults, sparqlTriple, toString, unregisterJenaModelChangedListener, unregisterListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetDefaultWriteGraphURI, manufactureChangeSet, newIndividual, newIndividual, registerJenaModelChangedListener, registerListener, unregisterJenaModelChangedListener, unregisterListenerpublic RDFServiceTDB(String directoryPath) throws IOException
IOExceptionprotected DatasetWrapper getDatasetWrapper()
getDatasetWrapper in class RDFServiceJenapublic boolean changeSetUpdate(ChangeSet changeSet) throws RDFServiceException
RDFServicechangeSetUpdate in interface RDFServicechangeSetUpdate in class RDFServiceJenachangeSet - - a set of changes to be performed on the RDF store.RDFServiceExceptionpublic boolean preferPreciseOptionals()
preferPreciseOptionals in interface RDFServicepreferPreciseOptionals in class RDFServiceJenapublic void close()
RDFServiceclose in interface RDFServiceclose in class RDFServiceJenapublic InputStream sparqlConstructQuery(String query, RDFService.ModelSerializationFormat resultFormat) throws RDFServiceException
RDFServicesparqlConstructQuery in interface RDFServicesparqlConstructQuery in class RDFServiceJenaquery - - the SPARQL query to be executed against the RDF storeresultFormat - - type of serialization for RDF result of the SPARQL queryRDFServiceExceptionpublic void sparqlConstructQuery(String query, org.apache.jena.rdf.model.Model model) throws RDFServiceException
RDFServicesparqlConstructQuery in interface RDFServicesparqlConstructQuery in class RDFServiceJenaquery - - the SPARQL query to be executed against the RDF storemodel - - the Model to add the statements toRDFServiceExceptionpublic InputStream sparqlDescribeQuery(String query, RDFService.ModelSerializationFormat resultFormat) throws RDFServiceException
RDFServicesparqlDescribeQuery in interface RDFServicesparqlDescribeQuery in class RDFServiceJenaquery - - the SPARQL query to be executed against the RDF storeresultFormat - - type of serialization for RDF result of the SPARQL queryRDFServiceExceptionpublic InputStream sparqlSelectQuery(String query, RDFService.ResultFormat resultFormat) throws RDFServiceException
RDFServiceJenasparqlSelectQuery in interface RDFServicesparqlSelectQuery in class RDFServiceJenaquery - - the SPARQL query to be executed against the RDF storeresultFormat - - format for the result of the Select queryRDFServiceExceptionpublic void sparqlSelectQuery(String query, ResultSetConsumer consumer) throws RDFServiceException
RDFServicesparqlSelectQuery in interface RDFServicesparqlSelectQuery in class RDFServiceJenaquery - - the SPARQL query to be executed against the RDF storeconsumer - - the class to consume the results of the queryRDFServiceExceptionpublic boolean sparqlAskQuery(String query) throws RDFServiceException
RDFServicesparqlAskQuery in interface RDFServicesparqlAskQuery in class RDFServiceJenaquery - - the SPARQL ASK query to be executed against the RDF storeRDFServiceExceptionpublic List<String> getGraphURIs() throws RDFServiceException
RDFServicegetGraphURIs in interface RDFServicegetGraphURIs in class RDFServiceJenaRDFServiceExceptionpublic void serializeAll(OutputStream outputStream) throws RDFServiceException
RDFServiceserializeAll in interface RDFServiceserializeAll in class RDFServiceJenaoutputStream - - receives the serialized result.RDFServiceExceptionpublic void serializeGraph(String graphURI, OutputStream outputStream) throws RDFServiceException
RDFServiceserializeGraph in interface RDFServiceserializeGraph in class RDFServiceJenagraphURI - - the URI of the desired graph. May not be null.outputStream - - receives the serialized result.RDFServiceExceptionpublic boolean isEquivalentGraph(String graphURI, InputStream serializedGraph, RDFService.ModelSerializationFormat serializationFormat) throws RDFServiceException
isEquivalentGraph in interface RDFServiceisEquivalentGraph in class RDFServiceJenagraphURI - - 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.RDFServiceExceptionpublic boolean isEquivalentGraph(String graphURI, org.apache.jena.rdf.model.Model graph) throws RDFServiceException
isEquivalentGraph in interface RDFServiceisEquivalentGraph in class RDFServiceJenagraphURI - - 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.RDFServiceExceptionpublic 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
countTriples in interface RDFServicecountTriples in class RDFServiceJenaRDFServiceExceptionpublic 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)
throws RDFServiceException
getTriples in interface RDFServicegetTriples in class RDFServiceJenaRDFServiceExceptionCopyright © 2021. All rights reserved.