com.bigdata.rdf.rules
Class AbstractRuleDistinctTermScan

java.lang.Object
  extended by com.bigdata.relation.rule.Rule
      extended by com.bigdata.rdf.rules.AbstractRuleDistinctTermScan
All Implemented Interfaces:
IRule, IStep, Serializable
Direct Known Subclasses:
RuleRdf01, RuleRdfs04a, RuleRdfs04b

public abstract class AbstractRuleDistinctTermScan
extends Rule

Base class for rules having a single predicate that is none bound in the tail and a single variable in the head. These rules can be evaluated using a distinctTermScan rather than a full index scan. For example:

  rdf1:   (?u ?a ?y) -> (?a rdf:type rdf:Property)
  rdfs4a: (?u ?a ?x) -> (?u rdf:type rdfs:Resource)
  rdfs4b: (?u ?a ?v) -> (?v rdf:type rdfs:Resource)
 

Version:
$Id: AbstractRuleDistinctTermScan.java 3448 2010-08-18 20:55:58Z thompsonbry $
Author:
Bryan Thompson
See Also:
Serialized Form

Nested Class Summary
protected static class AbstractRuleDistinctTermScan.DistinctTermScan
          Selects the distinct term identifiers, substituting their binding in the sole unbound variable in the head of the rule.
 
Field Summary
 
Fields inherited from class com.bigdata.relation.rule.Rule
DEBUG, INFO, log
 
Constructor Summary
AbstractRuleDistinctTermScan(String name, SPOPredicate head, SPOPredicate[] body, IConstraint[] constraints)
           
 
Method Summary
 IRuleTaskFactory getTaskFactory()
          An optional IRuleTaskFactory that will be used in place of the default IRuleTaskFactory to evaluate this rule (optional)
 
Methods inherited from class com.bigdata.relation.rule.Rule
getConstants, getConstraint, getConstraintCount, getConstraints, getHead, getName, getQueryOptions, getRequiredVariableCount, getRequiredVariables, getSharedVars, getSharedVars, getTail, getTail, getTailCount, getVariableCount, getVariableCount, getVariables, isConsistent, isDeclared, isFullyBound, isFullyBound, isRule, specialize, specialize, toString, toString, var
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractRuleDistinctTermScan

public AbstractRuleDistinctTermScan(String name,
                                    SPOPredicate head,
                                    SPOPredicate[] body,
                                    IConstraint[] constraints)
Method Detail

getTaskFactory

public IRuleTaskFactory getTaskFactory()
Description copied from interface: IRule
An optional IRuleTaskFactory that will be used in place of the default IRuleTaskFactory to evaluate this rule (optional)

Specified by:
getTaskFactory in interface IRule
Overrides:
getTaskFactory in class Rule
Returns:
null unless custom evaluation is desired.


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