public class LanguageFilteringRDFService extends Object implements RDFService
RDFService.ModelSerializationFormat, RDFService.ResultFormat, RDFService.SPARQLQueryType| Constructor and Description |
|---|
LanguageFilteringRDFService(RDFService service,
List<String> langs) |
| 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
|
public LanguageFilteringRDFService(RDFService service, List<String> langs)
public boolean changeSetUpdate(ChangeSet changeSet) throws RDFServiceException
RDFServicechangeSetUpdate in interface RDFServicechangeSet - - a set of changes to be performed on the RDF store.RDFServiceExceptionpublic void newIndividual(String individualURI, String individualTypeURI) throws RDFServiceException
RDFServicenewIndividual in interface RDFServiceindividualURI - - URI of the individual to be addedindividualTypeURI - - URI of the type for the individualRDFServiceExceptionpublic void newIndividual(String individualURI, String individualTypeURI, String graphURI) throws RDFServiceException
RDFServicenewIndividual in interface RDFServiceindividualURI - - URI of the individual to be addedindividualTypeURI - - URI of the type for the individualgraphURI - - URI of the graph to which to add the individualRDFServiceExceptionpublic InputStream sparqlConstructQuery(String query, RDFService.ModelSerializationFormat resultFormat) throws RDFServiceException
RDFServicesparqlConstructQuery in interface RDFServicequery - - 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 RDFServicequery - - 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 RDFServicequery - - 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
RDFServicesparqlSelectQuery in interface RDFServicequery - - 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 RDFServicequery - - 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 RDFServicequery - - the SPARQL ASK query to be executed against the RDF storeRDFServiceExceptionpublic List<String> getGraphURIs() throws RDFServiceException
RDFServicegetGraphURIs in interface RDFServiceRDFServiceExceptionpublic void getGraphMetadata()
throws RDFServiceException
RDFServicegetGraphMetadata in interface RDFServiceRDFServiceExceptionpublic String getDefaultWriteGraphURI() throws RDFServiceException
RDFServicegetDefaultWriteGraphURI in interface RDFServiceRDFServiceExceptionpublic void serializeAll(OutputStream outputStream) throws RDFServiceException
RDFServiceserializeAll in interface RDFServiceoutputStream - - receives the serialized result.RDFServiceExceptionpublic void serializeGraph(String graphURI, OutputStream outputStream) throws RDFServiceException
RDFServiceserializeGraph in interface RDFServicegraphURI - - 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
RDFServiceisEquivalentGraph in interface RDFServicegraphURI - - 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
RDFServiceisEquivalentGraph in interface RDFServicegraphURI - - 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 void registerListener(ChangeListener changeListener) throws RDFServiceException
RDFServiceregisterListener in interface RDFServicechangeListener - - the change listenerRDFServiceExceptionpublic void unregisterListener(ChangeListener changeListener) throws RDFServiceException
RDFServiceunregisterListener in interface RDFServicechangeListener - - the change listenerRDFServiceExceptionpublic void registerJenaModelChangedListener(org.apache.jena.rdf.model.ModelChangedListener changeListener)
throws RDFServiceException
RDFServiceregisterJenaModelChangedListener in interface RDFServicechangeListener - - the change listenerRDFServiceExceptionpublic void unregisterJenaModelChangedListener(org.apache.jena.rdf.model.ModelChangedListener changeListener)
throws RDFServiceException
RDFServiceunregisterJenaModelChangedListener in interface RDFServicechangeListener - - the change listenerRDFServiceExceptionpublic ChangeSet manufactureChangeSet()
RDFServicemanufactureChangeSet in interface RDFServicepublic 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 RDFServiceRDFServiceExceptionpublic 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 RDFServiceRDFServiceExceptionpublic boolean preferPreciseOptionals()
preferPreciseOptionals in interface RDFServicepublic void close()
RDFServiceclose in interface RDFServicepublic void setVitroRequest(VitroRequest vitroRequest)
RDFServicesetVitroRequest in interface RDFServicepublic VitroRequest getVitroRequest()
getVitroRequest in interface RDFServiceCopyright © 2021. All rights reserved.