it.unibz.inf.ontop.rdf4j.predefined.OntopRDF4JPredefinedQueryEngine Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ontop-rdf4j Show documentation
Show all versions of ontop-rdf4j Show documentation
This is the rdf4j API implementation based on Ontop
The newest version!
package it.unibz.inf.ontop.rdf4j.predefined;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import org.eclipse.rdf4j.query.GraphQueryResult;
import org.eclipse.rdf4j.query.QueryEvaluationException;
import java.io.OutputStream;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
/**
* TODO: find a better name
*/
public interface OntopRDF4JPredefinedQueryEngine {
/**
* Streaming mode
*
* acceptMediaTypes are expected to be sorted by decreasing importance and having no quality parameter
*
* May throw a LateEvaluationOrConversionException when executing the query.
* Problems occurring before query execution are handled by standard HTTP mechanisms (status code + error message).
*
*/
void evaluate(String queryId,
ImmutableMap bindings,
ImmutableList acceptMediaTypes,
ImmutableMap httpHeaders,
Consumer httpStatusSetter,
BiConsumer httpHeaderSetter,
OutputStream outputStream) throws LateEvaluationOrConversionException;
/**
* Same, without streaming
*/
String evaluate(String queryId,
ImmutableMap bindings,
ImmutableList acceptMediaTypes,
ImmutableMap httpHeaders,
Consumer httpStatusSetter,
BiConsumer httpHeaderSetter);
boolean shouldStream(String queryId);
GraphQueryResult evaluateGraph(String queryId, ImmutableMap bindings) throws QueryEvaluationException;
// TODO: add methods for select and ask
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy