public class RepositoryFederatedService extends Object implements org.eclipse.rdf4j.query.algebra.evaluation.federation.FederatedService
Repository to communicate with a SPARQL endpoint.| Modifier and Type | Field and Description |
|---|---|
protected RepositoryConnection |
conn |
protected Repository |
rep |
protected boolean |
shutDown |
| Constructor and Description |
|---|
RepositoryFederatedService(Repository repo) |
RepositoryFederatedService(Repository repo,
boolean shutDown) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
ask(org.eclipse.rdf4j.query.algebra.Service service,
org.eclipse.rdf4j.query.BindingSet bindings,
String baseUri)
Evaluate the provided sparqlQueryString at the initialized
Repository of this
FederatedService. |
org.eclipse.rdf4j.common.iteration.CloseableIteration<org.eclipse.rdf4j.query.BindingSet,org.eclipse.rdf4j.query.QueryEvaluationException> |
evaluate(org.eclipse.rdf4j.query.algebra.Service service,
org.eclipse.rdf4j.common.iteration.CloseableIteration<org.eclipse.rdf4j.query.BindingSet,org.eclipse.rdf4j.query.QueryEvaluationException> bindings,
String baseUri) |
protected org.eclipse.rdf4j.common.iteration.CloseableIteration<org.eclipse.rdf4j.query.BindingSet,org.eclipse.rdf4j.query.QueryEvaluationException> |
evaluateInternal(org.eclipse.rdf4j.query.algebra.Service service,
org.eclipse.rdf4j.common.iteration.CloseableIteration<org.eclipse.rdf4j.query.BindingSet,org.eclipse.rdf4j.query.QueryEvaluationException> bindings,
String baseUri)
Evaluate the SPARQL query that can be constructed from the SERVICE node at the initialized
Repository of this FederatedService. |
protected RepositoryConnection |
getConnection() |
void |
initialize() |
boolean |
isInitialized() |
org.eclipse.rdf4j.common.iteration.CloseableIteration<org.eclipse.rdf4j.query.BindingSet,org.eclipse.rdf4j.query.QueryEvaluationException> |
select(org.eclipse.rdf4j.query.algebra.Service service,
Set<String> projectionVars,
org.eclipse.rdf4j.query.BindingSet bindings,
String baseUri)
Evaluate the provided sparqlQueryString at the initialized
Repository of this
FederatedService. |
void |
shutdown() |
protected final Repository rep
protected boolean shutDown
protected RepositoryConnection conn
public RepositoryFederatedService(Repository repo)
repo - the repository to be usedpublic RepositoryFederatedService(Repository repo, boolean shutDown)
repo - the repository to be usedshutDown - a flag indicating whether the repository shall be closed in shutdown()public org.eclipse.rdf4j.common.iteration.CloseableIteration<org.eclipse.rdf4j.query.BindingSet,org.eclipse.rdf4j.query.QueryEvaluationException> select(org.eclipse.rdf4j.query.algebra.Service service,
Set<String> projectionVars,
org.eclipse.rdf4j.query.BindingSet bindings,
String baseUri)
throws org.eclipse.rdf4j.query.QueryEvaluationException
Repository of this
FederatedService. Insert bindings into SELECT query and evaluateselect in interface org.eclipse.rdf4j.query.algebra.evaluation.federation.FederatedServiceorg.eclipse.rdf4j.query.QueryEvaluationExceptionpublic boolean ask(org.eclipse.rdf4j.query.algebra.Service service,
org.eclipse.rdf4j.query.BindingSet bindings,
String baseUri)
throws org.eclipse.rdf4j.query.QueryEvaluationException
Repository of this
FederatedService. Insert bindings, send ask query and return final resultask in interface org.eclipse.rdf4j.query.algebra.evaluation.federation.FederatedServiceorg.eclipse.rdf4j.query.QueryEvaluationExceptionpublic org.eclipse.rdf4j.common.iteration.CloseableIteration<org.eclipse.rdf4j.query.BindingSet,org.eclipse.rdf4j.query.QueryEvaluationException> evaluate(org.eclipse.rdf4j.query.algebra.Service service,
org.eclipse.rdf4j.common.iteration.CloseableIteration<org.eclipse.rdf4j.query.BindingSet,org.eclipse.rdf4j.query.QueryEvaluationException> bindings,
String baseUri)
throws org.eclipse.rdf4j.query.QueryEvaluationException
evaluate in interface org.eclipse.rdf4j.query.algebra.evaluation.federation.FederatedServiceorg.eclipse.rdf4j.query.QueryEvaluationExceptionprotected org.eclipse.rdf4j.common.iteration.CloseableIteration<org.eclipse.rdf4j.query.BindingSet,org.eclipse.rdf4j.query.QueryEvaluationException> evaluateInternal(org.eclipse.rdf4j.query.algebra.Service service,
org.eclipse.rdf4j.common.iteration.CloseableIteration<org.eclipse.rdf4j.query.BindingSet,org.eclipse.rdf4j.query.QueryEvaluationException> bindings,
String baseUri)
throws org.eclipse.rdf4j.query.QueryEvaluationException
Repository of this FederatedService. Use specified bindings as constraints to the
query. Try to evaluate using BINDINGS clause, if this yields an exception fall back to the naive
implementation. This method deals with SILENT SERVICEs.org.eclipse.rdf4j.query.QueryEvaluationExceptionpublic void initialize()
throws org.eclipse.rdf4j.query.QueryEvaluationException
initialize in interface org.eclipse.rdf4j.query.algebra.evaluation.federation.FederatedServiceorg.eclipse.rdf4j.query.QueryEvaluationExceptionpublic boolean isInitialized()
isInitialized in interface org.eclipse.rdf4j.query.algebra.evaluation.federation.FederatedServicepublic void shutdown()
throws org.eclipse.rdf4j.query.QueryEvaluationException
shutdown in interface org.eclipse.rdf4j.query.algebra.evaluation.federation.FederatedServiceorg.eclipse.rdf4j.query.QueryEvaluationExceptionprotected RepositoryConnection getConnection() throws RepositoryException
RepositoryExceptionCopyright © 2015-2018 Eclipse Foundation. All Rights Reserved.