|
Structured Text Toolkit | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.saelist.stx.operators.AbstractOperator
See Operator for general description of the Operator
concept in stx.
Lifecycle: Create { init(config) init() { visit(pairs) { operator(pair) } } }
Usage: Create { init(config) { visit(pairs) } }
| Field Summary | |
protected Pair |
config
|
protected Logger |
logger
|
| Constructor Summary | |
AbstractOperator()
|
|
| Method Summary | |
protected void |
init()
Descendants should overide this if they vant to cache elements of config in member variables or do some other inital setup. |
void |
init(Pair config)
Validates the configuration against the schema and stores it in config, then calls init() to allow descendants to further initialize themselves. |
abstract void |
operate(Pair pair)
Descendant classes will put the code for the actual operation here. |
void |
visit(java.util.Iterator pairs)
Visits the given pairs, typically the result of Pair.select(xpath). |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected Logger logger
protected Pair config
| Constructor Detail |
public AbstractOperator()
| Method Detail |
public void init(Pair config)
init in interface OperatorIllegalArgumentExeption - if config doesn't
validate against #getSchema. The Validator will log
warnings aswell as print linenumbers of the mismatches in both
files to the standard error.protected void init()
public final void visit(java.util.Iterator pairs)
visit in interface Operatorjava.lang.ClassCastException - if pairs contains a non-Pair.public abstract void operate(Pair pair)
operate in interface Operatorjava.lang.IllegalStateException - if this hasn't been initialized.
|
Structured Text Toolkit | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||