|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cz.cuni.amis.pogamut.shady.engine.ShadeEngine<EXECUTOR>
public class ShadeEngine<EXECUTOR extends IWorkExecutor>
This class is taking a shade plan (already parsed in form of ShadeTree
and executing it using supplied IWorkExecutor
.
Shade engine is an if-then tree like structure, that is evaluated during
every iteration. It is very simple, but it should be the advantage, not
disadvantage. Posh engine is very complicated with many features very few
know about, much less actually use.
Constructor Summary | |
---|---|
ShadeEngine(ShadeTree plan,
EXECUTOR executor)
Create new engine with set plan and executor. |
Method Summary | |
---|---|
void |
evaluate()
Take the plan evaluate it and run the target primitive. |
protected BigDecimal |
executeCall(NodeCall call)
|
protected NodeElement |
getSelectedElement(ShadeNode node)
Take the node and find which of its elements should be selected according to highest priority and enabled trigger. |
protected NodeCall |
selectCall(ShadeNode node)
Go throught the node tree and find the leaf (NodeElement) that doesn't call another {@link ShadeNode node} and return the call of the leaf. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ShadeEngine(ShadeTree plan, EXECUTOR executor)
plan
- plan that this engine will execute.executor
- executor used to execute queries and actions.Method Detail |
---|
public void evaluate() throws MissingRootException, NoEligibleElementException
MissingRootException
NoEligibleElementException
protected NodeCall selectCall(ShadeNode node) throws NoEligibleElementException
node
- node where we start the search. Node must be part
of the plan
(not checked).
NoEligibleElementException
protected NodeElement getSelectedElement(ShadeNode node) throws NoEligibleElementException
node
- node for searched elements
NoEligibleElementException
protected BigDecimal executeCall(NodeCall call)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |