|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface SolutionGenerator
A SolutionGenerator is a backend to the Glitter engine that knows how to generate a specific
type of bindings.
| 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)
|
QueryExecutionPlan |
getQueryExecutionPlan()
|
QueryExecutionServices |
getQueryExecutionServices()
Deprecated. |
QueryInformation |
getQueryInformation()
|
RDFDataset<?> |
getRDFDataset()
|
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)
Deprecated. |
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. |
| Method Detail |
|---|
void setRDFDataset(RDFDataset<?> dataset)
dataset - The RDFDataset against which the query is being executed.void setQueryInformation(QueryInformation queryInformation)
queryInformation - Information on the parsed and prepared query.void setQueryExecutionPlan(QueryExecutionPlan plan)
plan - The execution plan in use.void setQueryExecutionServices(QueryExecutionServices services)
services - void setIncludeInferredTriples(boolean includeInferredTriples)
includeInferredTriples - Whether or not inferred triples should contribute to bindings.void setOntology(java.net.URI ontology)
ontology - The ontology in effect for inferred triples.RDFDataset<?> getRDFDataset()
QueryInformation getQueryInformation()
QueryExecutionPlan getQueryExecutionPlan()
QueryExecutionServices getQueryExecutionServices()
SolutionSet generateSolutions(TreeNode node,
IRIReference namedGraph,
Variable namedGraphVariable,
SolutionSet requiredBindings)
throws GlitterException
node - 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.
GlitterException
CannotGenerateSolutionsException - if the SolutionGenerator does not
wish to handle this tree node.
void initialize()
throws GlitterException
GlitterException
void cleanup()
throws GlitterException
GlitterExceptionboolean usesRequiredBindings()
boolean canHandleSimultaneousRequests()
boolean canBindGraphVariables()
RDFDatasetboolean willHandleFilters(java.util.Set<Expression> filters)
filters -
boolean sortedSolutions()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||