| java.lang.Object com.hp.hpl.jena.graph.query.GuardArranger
GuardArranger | public class GuardArranger (Code) | | A GuardArranger is initialised with a set of triple patterns, and can
then turn a set of constraints (plus a map giving the location of
variables) into an array of guards, where the i'th element of the
array is the set of constraints that can be evaluated as soon as
the i'th triple-pattern has been processed.
|
Method Summary | |
protected boolean | canEval(Expression e, int index) Answer true iff this Expression can be evaluated after the index'th triple
has been matched, ie, all the variables of the expression have been bound. | protected Set[] | makeBoundVariables(Triple[] triples) Answer an array of sets exactly as long as the argument array of Triples. | public ValuatorSet[] | makeGuards(Mapping map, ExpressionSet constraints) | protected ValuatorSet[] | makeGuards(Mapping map, ExpressionSet constraints, int length) Answer an array of ExpressionSets exactly as long as the supplied length. | protected void | plantWhereFullyBound(Expression e, Iterator it, Mapping map, ValuatorSet[] es) Find the earliest triple index where this expression can be evaluated, add it
to the appropriate expression set, and remove it from the original via the
iterator. |
boundVariables | protected Set[] boundVariables(Code) | | |
canEval | protected boolean canEval(Expression e, int index)(Code) | | Answer true iff this Expression can be evaluated after the index'th triple
has been matched, ie, all the variables of the expression have been bound.
|
makeBoundVariables | protected Set[] makeBoundVariables(Triple[] triples)(Code) | | Answer an array of sets exactly as long as the argument array of Triples.
The i'th element of the answer is the set of all variables that have been
matched when the i'th triple has been matched.
|
makeGuards | protected ValuatorSet[] makeGuards(Mapping map, ExpressionSet constraints, int length)(Code) | | Answer an array of ExpressionSets exactly as long as the supplied length.
The i'th ExpressionSet contains the prepared [against map ]
expressions that can be evaluated as soon as the i'th triple has been matched.
By "can be evaluated as soon as" we mean that all its variables are bound.
The original ExpressionSet is updated by removing those elements that can
be so evaluated.
Parameters: map - the Mapping to prepare Expressions against Parameters: constraints - the set of constraint expressions to plant Parameters: length - the number of evaluation slots available the array of prepared ExpressionSets |
plantWhereFullyBound | protected void plantWhereFullyBound(Expression e, Iterator it, Mapping map, ValuatorSet[] es)(Code) | | Find the earliest triple index where this expression can be evaluated, add it
to the appropriate expression set, and remove it from the original via the
iterator.
|
|
|