@ApplicationScoped public class SparqlServiceImpl extends Object implements SparqlService
| Constructor and Description |
|---|
SparqlServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
ask(org.openrdf.query.QueryLanguage queryLanguage,
String query)
Evaluate a SPARQL ASK query on the KiWi TripleStore
see http://www.w3.org/TR/sparql11-query/
|
void |
createServiceDescription(org.openrdf.rio.RDFWriter writer,
String requestURL,
boolean isUpdate)
Write a SparqlServiceDescription of the Service to the provided
RDFWriter. |
QueryType |
getQueryType(org.openrdf.query.QueryLanguage language,
String query)
Parse and return the concrete query type
|
void |
initialize() |
org.openrdf.query.Query |
parseQuery(org.openrdf.query.QueryLanguage language,
String query)
Parse query
|
List<Map<String,org.openrdf.model.Value>> |
query(org.openrdf.query.QueryLanguage queryLanguage,
String query)
Evaluate a SPARQL query on the LMF TripleStore.
|
void |
query(org.openrdf.query.QueryLanguage language,
String query,
OutputStream output,
String format,
int timeoutInSeconds)
Evaluate a SPARQL query on the KiWi TripleStore.
|
void |
query(org.openrdf.query.QueryLanguage queryLanguage,
String query,
org.openrdf.query.resultio.QueryResultWriter writer,
int timeoutInSeconds)
Deprecated.
|
void |
query(org.openrdf.query.QueryLanguage queryLanguage,
String query,
org.openrdf.query.resultio.TupleQueryResultWriter tupleWriter,
org.openrdf.query.resultio.BooleanQueryResultWriter booleanWriter,
SPARQLGraphResultWriter graphWriter,
int timeoutInSeconds)
Deprecated.
|
void |
update(org.openrdf.query.QueryLanguage queryLanguage,
String query)
Execute a SPARQL update on the LMF TripleStore.
|
@PostConstruct public void initialize()
public org.openrdf.query.Query parseQuery(org.openrdf.query.QueryLanguage language,
String query)
throws org.openrdf.repository.RepositoryException,
org.openrdf.query.MalformedQueryException
SparqlServiceparseQuery in interface SparqlServicelanguage - languagequery - queryorg.openrdf.repository.RepositoryExceptionorg.openrdf.query.MalformedQueryExceptionpublic QueryType getQueryType(org.openrdf.query.QueryLanguage language, String query) throws org.openrdf.query.MalformedQueryException
SparqlServicegetQueryType in interface SparqlServiceorg.openrdf.query.MalformedQueryException@Deprecated public void query(org.openrdf.query.QueryLanguage queryLanguage, String query, org.openrdf.query.resultio.TupleQueryResultWriter tupleWriter, org.openrdf.query.resultio.BooleanQueryResultWriter booleanWriter, SPARQLGraphResultWriter graphWriter, int timeoutInSeconds) throws org.apache.marmotta.platform.core.exception.MarmottaException, org.openrdf.query.MalformedQueryException, org.openrdf.query.QueryEvaluationException, TimeoutException
SparqlServicequery in interface SparqlServiceorg.apache.marmotta.platform.core.exception.MarmottaExceptionorg.openrdf.query.MalformedQueryExceptionorg.openrdf.query.QueryEvaluationExceptionTimeoutException@Deprecated public void query(org.openrdf.query.QueryLanguage queryLanguage, String query, org.openrdf.query.resultio.QueryResultWriter writer, int timeoutInSeconds) throws org.apache.marmotta.platform.core.exception.MarmottaException, org.openrdf.query.MalformedQueryException, org.openrdf.query.QueryEvaluationException, TimeoutException
SparqlServicequery in interface SparqlServiceorg.apache.marmotta.platform.core.exception.MarmottaExceptionorg.openrdf.query.MalformedQueryExceptionorg.openrdf.query.QueryEvaluationExceptionTimeoutExceptionpublic void query(org.openrdf.query.QueryLanguage language,
String query,
OutputStream output,
String format,
int timeoutInSeconds)
throws org.apache.marmotta.platform.core.exception.MarmottaException,
TimeoutException,
org.openrdf.query.MalformedQueryException
SparqlServicequery in interface SparqlServicequery - queryoutput - strem to writeformat - mimetypeorg.apache.marmotta.platform.core.exception.MarmottaExceptionTimeoutExceptionorg.openrdf.query.MalformedQueryExceptionpublic List<Map<String,org.openrdf.model.Value>> query(org.openrdf.query.QueryLanguage queryLanguage, String query) throws org.apache.marmotta.platform.core.exception.MarmottaException
query in interface SparqlServicequeryLanguage - the query language to usequery - the SPARQL query to evaluate in SPARQL 1.1 syntaxorg.apache.marmotta.platform.core.exception.MarmottaExceptionpublic void update(org.openrdf.query.QueryLanguage queryLanguage,
String query)
throws org.apache.marmotta.platform.core.exception.MarmottaException
update in interface SparqlServicequeryLanguage - query - a string representing the update query in SPARQL Update 1.1 syntaxExceptionorg.apache.marmotta.platform.core.exception.MarmottaExceptionpublic boolean ask(org.openrdf.query.QueryLanguage queryLanguage,
String query)
throws org.apache.marmotta.platform.core.exception.MarmottaException
SparqlServiceask in interface SparqlServicequeryLanguage - the query language to usequery - the SPARQL query to evaluate in SPARQL 1.1 syntaxorg.apache.marmotta.platform.core.exception.MarmottaException - if the query evaluation failspublic void createServiceDescription(org.openrdf.rio.RDFWriter writer,
String requestURL,
boolean isUpdate)
throws org.openrdf.rio.RDFHandlerException
SparqlServiceRDFWriter.createServiceDescription in interface SparqlServicewriter - the RDFWriter to write the description torequestURL - the URI of the SPARQL EndpointisUpdate - if the endpoint is a update or select/query endpointorg.openrdf.rio.RDFHandlerExceptionhttp://www.w3.org/TR/sparql11-service-description/Copyright © 2012–2018 The Apache Software Foundation. All rights reserved.