com.bigdata.relation.rule
Class DefaultSolutionExpander

java.lang.Object
  extended by com.bigdata.relation.rule.DefaultSolutionExpander
All Implemented Interfaces:
ISolutionExpander, Serializable

public class DefaultSolutionExpander
extends Object
implements ISolutionExpander

A base class for ISolutionExpander implementations. The base class provides various helper methods designed to make it easier to override the evaluation behavior of an IPredicate during IRule evaluation.

Version:
$Id: DefaultSolutionExpander.java 2265 2009-10-26 12:51:06Z thompsonbry $
Author:
Bryan Thompson
See Also:
Serialized Form

Constructor Summary
DefaultSolutionExpander()
           
 
Method Summary
 boolean backchain()
          Default to true for backchaining.
 void expand(IJoinNexus joinNexus, IBindingSet bindingSet, IPredicate predicate, boolean isSolution)
           
 IAccessPath getAccessPath(IAccessPath accessPath)
          Returns the given IAccessPath.
 long rangeCount(IAccessPath accessPath)
          Returns the approximate range count for the given IAccessPath.
 boolean runFirst()
          Default to false for run first.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultSolutionExpander

public DefaultSolutionExpander()
Method Detail

expand

public void expand(IJoinNexus joinNexus,
                   IBindingSet bindingSet,
                   IPredicate predicate,
                   boolean isSolution)

getAccessPath

public IAccessPath getAccessPath(IAccessPath accessPath)
Returns the given IAccessPath.

Specified by:
getAccessPath in interface ISolutionExpander
Parameters:
accessPath - 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.

rangeCount

public long rangeCount(IAccessPath accessPath)
Returns the approximate range count for the given IAccessPath.


backchain

public boolean backchain()
Default to true for backchaining.

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

runFirst

public boolean runFirst()
Default to false for run first.

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


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