org.openanzo.model.impl.query
Class ContainerSolutionGenerator

java.lang.Object
  extended by org.openanzo.model.impl.query.CoreSolutionGenerator
      extended by org.openanzo.model.impl.query.ContainerSolutionGenerator
All Implemented Interfaces:
SolutionGenerator

public class ContainerSolutionGenerator
extends CoreSolutionGenerator

ContainerSolutionGenerator solves only TriplePatternNode patterns using the IContainer to find triples

Author:
Matthew Roy ( mroy@cambridgesemantics.com )

Constructor Summary
ContainerSolutionGenerator(IContainer container)
          Create new ContainerSolutionGenerator in order to solve TriplePatternNode patterns within query
 
Method Summary
 SolutionSet generateSolutions(TreeNode node, IRIReference namedGraph, Variable namedGraphVariable, SolutionSet requiredBindings)
           
 
Methods inherited from class org.openanzo.model.impl.query.CoreSolutionGenerator
canBindGraphVariables, canHandleSimultaneousRequests, cleanup, getQueryExecutionPlan, getQueryExecutionServices, getQueryInformation, getRDFDataset, initialize, setIncludeInferredTriples, setOntology, setQueryExecutionPlan, setQueryExecutionServices, setQueryInformation, setRDFDataset, sortedSolutions, usesRequiredBindings, willHandleFilters
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContainerSolutionGenerator

public ContainerSolutionGenerator(IContainer container)
Create new ContainerSolutionGenerator in order to solve TriplePatternNode patterns within query

Parameters:
container - Source of data for queries
Method Detail

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.


Copyright © 2007 Cambridge Semantics Inc.. All Rights Reserved.