org.openanzo.model.impl.query
Class CoreSolutionGenerator

java.lang.Object
  extended by org.openanzo.model.impl.query.CoreSolutionGenerator
All Implemented Interfaces:
SolutionGenerator
Direct Known Subclasses:
BasicGraphSolutionGenerator, ContainerSolutionGenerator

public abstract class CoreSolutionGenerator
extends java.lang.Object
implements SolutionGenerator

CoreSolutionGenerator solves only TriplePatternNode patterns using subclasses implementation of generateSolutions

Author:
Matthew Roy ( mroy@cambridgesemantics.com )

Constructor Summary
CoreSolutionGenerator()
           
 
Method Summary
 boolean canBindGraphVariables()
          Informative method.
 boolean canHandleSimultaneousRequests()
          Informative method.
 void cleanup()
          Called after all calls to generateSolutions.
 QueryExecutionPlan getQueryExecutionPlan()
           
 QueryExecutionServices getQueryExecutionServices()
           
 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)
           
 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
 
Methods inherited from interface org.openanzo.glitter.query.SolutionGenerator
generateSolutions
 

Constructor Detail

CoreSolutionGenerator

public CoreSolutionGenerator()
Method Detail

canHandleSimultaneousRequests

public boolean canHandleSimultaneousRequests()
Description copied from interface: SolutionGenerator
Informative method.

Specified by:
canHandleSimultaneousRequests in interface SolutionGenerator
Returns:
Whether or not this backend can handle multiple requests in parallel.

canBindGraphVariables

public boolean canBindGraphVariables()
Description copied from interface: SolutionGenerator
Informative method.

Specified by:
canBindGraphVariables in interface SolutionGenerator
Returns:
Whether or not this backend can range over a graph variable and bind the variable to the appropriate graphs from the named graph part of the RDFDataset

setQueryInformation

public void setQueryInformation(QueryInformation queryInformation)
Specified by:
setQueryInformation in interface SolutionGenerator
Parameters:
queryInformation - Information on the parsed and prepared query.

setRDFDataset

public void setRDFDataset(RDFDataset<?> dataset)
Specified by:
setRDFDataset in interface SolutionGenerator
Parameters:
dataset - The RDFDataset against which the query is being executed.

setQueryExecutionServices

public void setQueryExecutionServices(QueryExecutionServices services)
Specified by:
setQueryExecutionServices in interface SolutionGenerator

getQueryExecutionPlan

public QueryExecutionPlan getQueryExecutionPlan()
Specified by:
getQueryExecutionPlan in interface SolutionGenerator
Returns:
Accessor to the execution plan

getQueryExecutionServices

public QueryExecutionServices getQueryExecutionServices()
Specified by:
getQueryExecutionServices in interface SolutionGenerator
Returns:
QueryExecutionServices for this SolutionGenerator

getQueryInformation

public QueryInformation getQueryInformation()
Specified by:
getQueryInformation in interface SolutionGenerator
Returns:
Accessor to the parsed query

getRDFDataset

public RDFDataset<?> getRDFDataset()
Specified by:
getRDFDataset in interface SolutionGenerator
Returns:
Accessor to the dataset

sortedSolutions

public boolean sortedSolutions()
Specified by:
sortedSolutions in interface SolutionGenerator
Returns:
whether or not the generator sorts returned solutions as per any ORDER BY information

usesRequiredBindings

public boolean usesRequiredBindings()
Description copied from interface: SolutionGenerator
Informative method.

Specified by:
usesRequiredBindings in interface SolutionGenerator
Returns:
Whether or not this backend makes use of known constraints passed in when generating solutions.

setQueryExecutionPlan

public void setQueryExecutionPlan(QueryExecutionPlan plan)
Specified by:
setQueryExecutionPlan in interface SolutionGenerator
Parameters:
plan - The execution plan in use.

willHandleFilters

public boolean willHandleFilters(java.util.Set<Expression> filters)
Description copied from interface: SolutionGenerator
Many backends do not implement filters, in which case Glitter will filter results even if the solution generator handles a node which subsumes filters. (Other than an OPTIONAL -- a solution generator should only handle an OPTIONAL that includes a filter if it can handle the filter.)

Specified by:
willHandleFilters in interface SolutionGenerator
Returns:
true if the solution generator will take care of these filters on any nodes that it sees, false if Glitter should handle the filters.

cleanup

public void cleanup()
             throws GlitterException
Description copied from interface: SolutionGenerator
Called after all calls to generateSolutions.

Specified by:
cleanup in interface SolutionGenerator
Throws:
GlitterException

initialize

public void initialize()
                throws GlitterException
Description copied from interface: SolutionGenerator
Called before any calls to generateSolutions but after all calls to set*.

Specified by:
initialize in interface SolutionGenerator
Throws:
GlitterException

setIncludeInferredTriples

public void setIncludeInferredTriples(boolean includeInferredTriples)
Specified by:
setIncludeInferredTriples in interface SolutionGenerator
Parameters:
includeInferredTriples - Whether or not inferred triples should contribute to bindings.

setOntology

public void setOntology(java.net.URI ontology)
Specified by:
setOntology in interface SolutionGenerator
Parameters:
ontology - The ontology in effect for inferred triples.


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