@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
SparqlService
parseQuery
in interface SparqlService
language
- languagequery
- queryorg.openrdf.repository.RepositoryException
org.openrdf.query.MalformedQueryException
public QueryType getQueryType(org.openrdf.query.QueryLanguage language, String query) throws org.openrdf.query.MalformedQueryException
SparqlService
getQueryType
in interface SparqlService
org.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
SparqlService
query
in interface SparqlService
org.apache.marmotta.platform.core.exception.MarmottaException
org.openrdf.query.MalformedQueryException
org.openrdf.query.QueryEvaluationException
TimeoutException
@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
SparqlService
query
in interface SparqlService
org.apache.marmotta.platform.core.exception.MarmottaException
org.openrdf.query.MalformedQueryException
org.openrdf.query.QueryEvaluationException
TimeoutException
public 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
SparqlService
query
in interface SparqlService
query
- queryoutput
- strem to writeformat
- mimetypeorg.apache.marmotta.platform.core.exception.MarmottaException
TimeoutException
org.openrdf.query.MalformedQueryException
public 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 SparqlService
queryLanguage
- the query language to usequery
- the SPARQL query to evaluate in SPARQL 1.1 syntaxorg.apache.marmotta.platform.core.exception.MarmottaException
public void update(org.openrdf.query.QueryLanguage queryLanguage, String query) throws org.apache.marmotta.platform.core.exception.MarmottaException
update
in interface SparqlService
queryLanguage
- query
- a string representing the update query in SPARQL Update 1.1 syntaxException
org.apache.marmotta.platform.core.exception.MarmottaException
public boolean ask(org.openrdf.query.QueryLanguage queryLanguage, String query) throws org.apache.marmotta.platform.core.exception.MarmottaException
SparqlService
ask
in interface SparqlService
queryLanguage
- 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
SparqlService
RDFWriter
.createServiceDescription
in interface SparqlService
writer
- 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.RDFHandlerException
http://www.w3.org/TR/sparql11-service-description/
Copyright © 2012–2018 The Apache Software Foundation. All rights reserved.