org.openanzo.model.impl.query
Class BasicGraphSolutionGenerator
java.lang.Object
org.openanzo.model.impl.query.CoreSolutionGenerator
org.openanzo.model.impl.query.BasicGraphSolutionGenerator
- All Implemented Interfaces:
- SolutionGenerator
public class BasicGraphSolutionGenerator
- extends CoreSolutionGenerator
BasicGraphSolutionGenerator solves only TriplePatternNode patterns using NamedGraphs retrieved from the EngineConfig's
dataset.
- Author:
- Matthew Roy ( mroy@cambridgesemantics.com )
| Methods inherited from class org.openanzo.model.impl.query.CoreSolutionGenerator |
canBindGraphVariables, canHandleSimultaneousRequests, cleanup, getQueryExecutionPlan, getQueryExecutionServices, getQueryInformation, getRDFDataset, initialize, setIncludeInferredTriples, setOntology, setQueryExecutionPlan, setQueryExecutionServices, setQueryInformation, sortedSolutions, usesRequiredBindings, willHandleFilters |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BasicGraphSolutionGenerator
public BasicGraphSolutionGenerator(IDataset iDataset)
- Create new BasicGraphSolutionGenerator in order to solve TriplePatternNode patterns within query
- Parameters:
iDataset - Source of default and named graphs
generateSolutions
public SolutionSet generateSolutions(TreeNode node,
IRIReference namedGraph,
Variable namedGraphVariable,
SolutionSet requiredBindings)
throws CannotGenerateSolutionsException
- Parameters:
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.
- Returns:
- A list of bindings (for variables and blank nodes) that satisfy
the given tree node, or null if this pattern doesn't match.
- Throws:
CannotGenerateSolutionsException - if the SolutionGenerator does not
wish to handle this tree node.
setRDFDataset
public void setRDFDataset(RDFDataset<?> dataset)
- Specified by:
setRDFDataset in interface SolutionGenerator- Overrides:
setRDFDataset in class CoreSolutionGenerator
- Parameters:
dataset - The RDFDataset against which the query is being executed.
Copyright © 2007 Cambridge Semantics Inc.. All Rights Reserved.