com.bigdata.rdf.spo
Class NamedGraphSolutionExpander

java.lang.Object
  extended by com.bigdata.rdf.spo.NamedGraphSolutionExpander
All Implemented Interfaces:
ISolutionExpander<ISPO>, Serializable

public class NamedGraphSolutionExpander
extends Object
implements ISolutionExpander<ISPO>

Solution expander provides an efficient merged access path for SPARQL named graphs. The expander applies the access path to the graph associated with each specified URI, visiting the all (s,p,o,c) quads found in those graph(s).

Version:
$Id: NamedGraphSolutionExpander.java 2265 2009-10-26 12:51:06Z thompsonbry $ FIXME See notes on the DefaultGraphSolutionExpander concerning scale-out joins.
Author:
Bryan Thompson
See Also:
Serialized Form

Field Summary
protected static org.apache.log4j.Logger log
           
 
Constructor Summary
NamedGraphSolutionExpander(Iterable<? extends URI> namedGraphs)
          If the caller can identify that some graph URIs are not known to the database, then they may be safely removed from the namedGraphs (and query will proceed as if they had been removed).
 
Method Summary
 boolean backchain()
          Add the backchainer on top of the expander.
 IAccessPath<ISPO> getAccessPath(IAccessPath<ISPO> accessPath1)
          Return the IAccessPath that will be used to evaluate the IPredicate.
 boolean runFirst()
          If true, the predicate for this expander will be given priority in the join order.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static transient org.apache.log4j.Logger log
Constructor Detail

NamedGraphSolutionExpander

public NamedGraphSolutionExpander(Iterable<? extends URI> namedGraphs)
If the caller can identify that some graph URIs are not known to the database, then they may be safely removed from the namedGraphs (and query will proceed as if they had been removed). If this leaves an empty set, then no query against the default graph can yield any data.

Parameters:
namedGraphs - The set of named graphs in the SPARQL DATASET (optional). A runtime exception will be thrown during evaluation of the if the URIs are not BigdataURIs. If this is null, then the set of named graphs is understood to be ALL graphs in the quad store.
Method Detail

backchain

public boolean backchain()
Description copied from interface: ISolutionExpander
Add the backchainer on top of the expander.

Specified by:
backchain in interface ISolutionExpander<ISPO>
Returns:
true if the backchainer should run

runFirst

public boolean runFirst()
Description copied from interface: ISolutionExpander
If true, the predicate for this expander will be given priority in the join order.

Specified by:
runFirst in interface ISolutionExpander<ISPO>
Returns:
true if the predicate should be run first

getAccessPath

public IAccessPath<ISPO> getAccessPath(IAccessPath<ISPO> accessPath1)
Description copied from interface: ISolutionExpander
Return the IAccessPath that will be used to evaluate the IPredicate.

Specified by:
getAccessPath in interface ISolutionExpander<ISPO>
Parameters:
accessPath1 - The IAccessPath that will be used by default.
Returns:
The IAccessPath that will be used. You can return the given accessPath or you can layer additional semantics onto or otherwise override the given IAccessPath.


Copyright © 2006-2009 SYSTAP, LLC. All Rights Reserved.