public abstract class SparqlQueryApiExecutor extends Object
| Modifier and Type | Field and Description |
|---|---|
protected String |
queryString |
protected RDFService |
rdfService |
| Modifier | Constructor and Description |
|---|---|
protected |
SparqlQueryApiExecutor(RDFService rdfService,
String queryString) |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
executeAndFormat(OutputStream out)
Execute the query and write it to the output stream, in the selected
format.
|
abstract String |
getMediaType()
What media type was selected, based on the Accept header?
|
static SparqlQueryApiExecutor |
instance(RDFService rdfService,
String queryString,
String acceptHeader)
Get an instance that is appropriate to the query and the acceptable
types.
|
protected final RDFService rdfService
protected final String queryString
protected SparqlQueryApiExecutor(RDFService rdfService, String queryString)
public static SparqlQueryApiExecutor instance(RDFService rdfService, String queryString, String acceptHeader) throws NotAcceptableException, org.apache.jena.query.QueryParseException, InvalidQueryTypeException, AcceptHeaderParsingException
AcceptHeaderParsingException - if the accept header was not in a valid formatNotAcceptableException - if the accept header did not contain a content type that is
supported by the queryorg.apache.jena.query.QueryParseException - if the query was not syntactically validInvalidQueryTypeException - if the query was not SELECT, ASK, CONSTRUCT, or DESCRIBEpublic abstract String getMediaType()
public abstract void executeAndFormat(OutputStream out) throws RDFServiceException, IOException
RDFServiceExceptionIOExceptionCopyright © 2022. All rights reserved.