|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openanzo.server.repository.query.ServerSolutionGenerator
public class ServerSolutionGenerator
ServerSolutionGenerator implements the core of the Anzo backend for glitter queries; it translates SPARQL queries into SQL queries against the Anzo temporal RDF store schema.
| Constructor Summary | |
|---|---|
ServerSolutionGenerator(RepositoryConnection connection,
java.lang.Long transactionTime,
IndexerFactoryBase indexQueryApi,
boolean includeInferredStatements)
Create a new ServerSolutionGenerator |
|
| Method Summary | |
|---|---|
boolean |
canBindGraphVariables()
Informative method. |
boolean |
canHandleSimultaneousRequests()
Informative method. |
void |
cleanup()
Called after all calls to generateSolutions. |
SolutionSet |
generateSolutions(TreeNode node,
IRIReference namedGraph,
Variable namedGraphVariable,
SolutionSet requiredBindings)
|
RepositoryConnection |
getConnection()
|
QueryExecutionPlan |
getQueryExecutionPlan()
|
QueryExecutionServices |
getQueryExecutionServices()
|
QueryInformation |
getQueryInformation()
|
RDFDataset<?> |
getRDFDataset()
|
long |
getUserId()
|
void |
initialize()
Called before any calls to generateSolutions but after all calls to set*. |
void |
setIncludeInferredTriples(boolean includeInferredTriples)
|
void |
setOntology(java.net.URI ontology)
|
void |
setQueryExecutionPlan(QueryExecutionPlan plan)
|
void |
setQueryExecutionServices(QueryExecutionServices services)
|
void |
setQueryInformation(QueryInformation queryInformation)
|
void |
setRDFDataset(RDFDataset<?> dataset)
|
boolean |
sortedSolutions()
|
boolean |
usesRequiredBindings()
Informative method. |
boolean |
willHandleFilters(java.util.Set<Expression> filters)
Many backends do not implement filters, in which case Glitter will filter results even if the solution generator handles a node which subsumes filters. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ServerSolutionGenerator(RepositoryConnection connection,
java.lang.Long transactionTime,
IndexerFactoryBase indexQueryApi,
boolean includeInferredStatements)
connection - connection to the databasetransactionTime - timestamp of last transaction to include in queriesindexQueryApi - reference to the indexer api, in order to do textMatch special predicate searchesincludeInferredStatements - include inferred statements in query results| Method Detail |
|---|
public void initialize()
throws GlitterException
SolutionGenerator
initialize in interface SolutionGeneratorGlitterException
public void cleanup()
throws GlitterException
SolutionGenerator
cleanup in interface SolutionGeneratorGlitterException
public SolutionSet generateSolutions(TreeNode node,
IRIReference namedGraph,
Variable namedGraphVariable,
SolutionSet requiredBindings)
throws CannotGenerateSolutionsException
generateSolutions in interface SolutionGeneratornode - The node in the tree for which bindings are desired.namedGraph - If not null, the solutions should be generated by
matching against this graph from the named graph part of the RDF
dataSet. Otherwise, the solutions should be generated from the default
graph. (i.e., if not null, treat this graph as the default graph)namedGraphVariable - If not null and this SolutionGenerator returns
true for canBindGraphVariables(), then this is the variable that should be
bound to the named graph IRI from which solutions are found.requiredBindings - Known bindings at this point in the AST.
Every returned solution should be a superset of one solution from the
required bindings. (That is, unbound variables can be bound, but all
bound variables must remain bound to the same value.) Note that Glitter
enforces this constraint when combining pattern solutions.
In general, if generateSolutions returns a value (null or otherwise), then
the SolutionGenerator will not be called again for any descendants of
node. If an exception is thrown, then generateSolution may be called for
descendant (simpler) nodes.
CannotGenerateSolutionsException - if the SolutionGenerator does not
wish to handle this tree node.public void setQueryExecutionPlan(QueryExecutionPlan plan)
setQueryExecutionPlan in interface SolutionGeneratorplan - The execution plan in use.public void setQueryInformation(QueryInformation queryInformation)
setQueryInformation in interface SolutionGeneratorqueryInformation - Information on the parsed and prepared query.public void setQueryExecutionServices(QueryExecutionServices services)
setQueryExecutionServices in interface SolutionGeneratorpublic void setRDFDataset(RDFDataset<?> dataset)
setRDFDataset in interface SolutionGeneratordataset - The RDFDataset against which the query is being executed.public boolean sortedSolutions()
sortedSolutions in interface SolutionGeneratorpublic boolean canHandleSimultaneousRequests()
SolutionGenerator
canHandleSimultaneousRequests in interface SolutionGeneratorpublic boolean canBindGraphVariables()
SolutionGenerator
canBindGraphVariables in interface SolutionGeneratorRDFDatasetpublic boolean usesRequiredBindings()
SolutionGenerator
usesRequiredBindings in interface SolutionGeneratorpublic boolean willHandleFilters(java.util.Set<Expression> filters)
SolutionGenerator
willHandleFilters in interface SolutionGeneratorpublic QueryExecutionPlan getQueryExecutionPlan()
getQueryExecutionPlan in interface SolutionGeneratorpublic QueryExecutionServices getQueryExecutionServices()
getQueryExecutionServices in interface SolutionGeneratorpublic QueryInformation getQueryInformation()
getQueryInformation in interface SolutionGeneratorpublic RDFDataset<?> getRDFDataset()
getRDFDataset in interface SolutionGeneratorpublic RepositoryConnection getConnection()
public long getUserId()
public void setIncludeInferredTriples(boolean includeInferredTriples)
setIncludeInferredTriples in interface SolutionGeneratorincludeInferredTriples - Whether or not inferred triples should contribute to bindings.public void setOntology(java.net.URI ontology)
setOntology in interface SolutionGeneratorontology - The ontology in effect for inferred triples.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||