public class QueryManager extends Object
Constructor and Description |
---|
QueryManager() |
Modifier and Type | Method and Description |
---|---|
void |
abortQuery(QueryInfo queryInfo) |
void |
addPrefixDeclaration(String prefix,
String namespace)
Register a prefix declaration to be used during query evaluation.
|
protected static Set<String> |
findQueryPrefixes(String queryString)
Find all prefixes declared in the query
|
void |
finishQuery(QueryInfo queryInfo) |
BigInteger |
getNextQueryId()
Computes the (incremental) next query identifier.
|
int |
getNumberOfRunningQueries() |
protected String |
getPrefixDeclarations()
Get the prefix declarations that have to be prepended to the query.
|
protected String |
getPrefixDeclarationsCheck(String queryString)
Get the prefix declarations that have to be added while considering prefixes that are already declared in the
query.
|
String |
getQueryPlan(String queryString)
Retrieve the query plan for the given query string.
|
Set<QueryInfo> |
getRunningQueries() |
void |
init(FedXRepository repo,
FederationContext federationContext) |
boolean |
isRunning(QueryInfo queryInfo) |
BooleanQuery |
prepareBooleanQuery(String queryString)
Prepare a boolean query which uses the underlying federation to evaluate the query.
|
GraphQuery |
prepareGraphQuery(String queryString)
Prepare a tuple query which uses the underlying federation to evaluate the query.
|
Query |
prepareQuery(String queryString)
Prepare a
Query which uses the underlying federation to evaluate the SPARQL query. |
TupleQuery |
prepareTupleQuery(String queryString)
Prepare a tuple query which uses the underlying federation to evaluate the query.
|
void |
registerQuery(QueryInfo queryInfo)
Add the query to the set of running queries, queries are identified via a unique id
|
void |
shutdown() |
public void init(FedXRepository repo, FederationContext federationContext)
public void shutdown()
public void registerQuery(QueryInfo queryInfo)
queryInfo
- public int getNumberOfRunningQueries()
public void abortQuery(QueryInfo queryInfo)
public void finishQuery(QueryInfo queryInfo)
public boolean isRunning(QueryInfo queryInfo)
public void addPrefixDeclaration(String prefix, String namespace)
prefix
- a common prefix, e.g. rdfnamespace
- the corresponding namespace, e.g. "http://www.w3.org/1999/02/22-rdf-syntax-ns#"public TupleQuery prepareTupleQuery(String queryString) throws MalformedQueryException
The queryString is modified to use the declared PREFIX declarations, see
FedXConfig.getPrefixDeclarations()
for details.
queryString
- MalformedQueryException
public GraphQuery prepareGraphQuery(String queryString) throws MalformedQueryException
The queryString is modified to use the declared PREFIX declarations, see
FedXConfig.getPrefixDeclarations()
for details.
queryString
- MalformedQueryException
public BooleanQuery prepareBooleanQuery(String queryString) throws MalformedQueryException
The queryString is modified to use the declared PREFIX declarations, see
FedXConfig.getPrefixDeclarations()
for details.
queryString
- BooleanQuery
MalformedQueryException
public Query prepareQuery(String queryString) throws MalformedQueryException
Query
which uses the underlying federation to evaluate the SPARQL query.
The queryString is modified to use the declared PREFIX declarations, see
FedXConfig.getPrefixDeclarations()
for details.
queryString
- Query
MalformedQueryException
public String getQueryPlan(String queryString) throws MalformedQueryException, FedXException
queryString
- MalformedQueryException
FedXException
public BigInteger getNextQueryId()
protected String getPrefixDeclarations()
protected String getPrefixDeclarationsCheck(String queryString)
queryString
- Copyright © 2015-2022 Eclipse Foundation. All Rights Reserved.