Class SparqlQueryApiSelectExecutor
- java.lang.Object
-
- edu.cornell.mannlib.vitro.webapp.controller.api.sparqlquery.SparqlQueryApiExecutor
-
- edu.cornell.mannlib.vitro.webapp.controller.api.sparqlquery.SparqlQueryApiSelectExecutor
-
public class SparqlQueryApiSelectExecutor extends SparqlQueryApiExecutor
Process SELECT queries.
-
-
Field Summary
Fields Modifier and Type Field Description protected ResultSetMediaTypemediaType-
Fields inherited from class edu.cornell.mannlib.vitro.webapp.controller.api.sparqlquery.SparqlQueryApiExecutor
queryString, rdfService
-
-
Constructor Summary
Constructors Constructor Description SparqlQueryApiSelectExecutor(RDFService rdfService, String queryString, String acceptHeader)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecuteAndFormat(OutputStream out)Execute the query and write it to the output stream, in the selected format.StringgetMediaType()What media type was selected, based on the Accept header?protected InputStreamgetRawResultStream()Ask the RDFService to run the query, and get the resulting stream.-
Methods inherited from class edu.cornell.mannlib.vitro.webapp.controller.api.sparqlquery.SparqlQueryApiExecutor
instance
-
-
-
-
Field Detail
-
mediaType
protected final ResultSetMediaType mediaType
-
-
Constructor Detail
-
SparqlQueryApiSelectExecutor
public SparqlQueryApiSelectExecutor(RDFService rdfService, String queryString, String acceptHeader) throws AcceptHeaderParsingException, NotAcceptableException
-
-
Method Detail
-
getRawResultStream
protected InputStream getRawResultStream() throws RDFServiceException
Ask the RDFService to run the query, and get the resulting stream.- Throws:
RDFServiceException
-
getMediaType
public String getMediaType()
Description copied from class:SparqlQueryApiExecutorWhat media type was selected, based on the Accept header?- Specified by:
getMediaTypein classSparqlQueryApiExecutor
-
executeAndFormat
public void executeAndFormat(OutputStream out) throws RDFServiceException, IOException
Description copied from class:SparqlQueryApiExecutorExecute the query and write it to the output stream, in the selected format.- Specified by:
executeAndFormatin classSparqlQueryApiExecutor- Throws:
RDFServiceExceptionIOException
-
-