com.saelist.stx.operators
Class SelectOperator
java.lang.Object
com.saelist.stx.operators.AbstractOperator
com.saelist.stx.operators.SelectOperator
- All Implemented Interfaces:
- Operator
- public class SelectOperator
- extends AbstractOperator
See Operator for general description of the Operator
concept in stx. SelectOperator removes all siblings of each visited pair
from the parent aswell as the pair it self and promotes the children
for the pair up one level. A typecal use case is to select a language
version. For example select on "//de" will transform the structure
subject
en=English subject.
de=Deutsches Subjekt.
dk=Danskt subjekt.
message
en
This is the english
message.
de
Das ist die deutsche
Nachricht.
dk
Det er det danske
beskjed.
into
subject=Deutsches Subjekt.
message
Das ist die deutsche
Nachricht.
|
Method Summary |
void |
init()
Descendants should overide this if they vant to cache elements
of config in member variables or do some other inital setup. |
void |
operate(Pair pair)
Performs the select operation on the given pair. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SelectOperator
public SelectOperator()
init
public void init()
- Description copied from class:
AbstractOperator
- Descendants should overide this if they vant to cache elements
of config in member variables or do some other inital setup.
- Overrides:
init in class AbstractOperator
operate
public void operate(Pair pair)
- Performs the select operation on the given pair.
- Specified by:
operate in interface Operator- Specified by:
operate in class AbstractOperator
- Throws:
java.lang.IllegalStateException - if this hasn't been initialized.