public class EventPatternDistributor extends Object
PatternDistributor
, not the source text
is manipulated, but the explicit data relation is constructed. The intended
effect (normally: inheritance/copying of one ore more parameter values)
must be performed explicitly by the user, in some subsequent processing.
In contrast to PatternDistributor, this class extends Translet.Parser
and can be combined with other
parser classes, and must be applied in the normal parsing framework.
FIXME STIMMT NICHT !?!?!?
The parsing only memoizes the start and stop events. Afterwards the
reify(MessageReceiver,Map,Iterable)
method must be called to
fill the map.
The state machine is very similar to PatternDistributor
:
start---> [INIT] | "$xxx" | V -----> [COLLECTING] <-------- ^^ | ________ ) "$xxx" || |"IDEM" || | ||"$xxx" V (starting from 0) <---- ||____ [USING]_________________________) "IDEM" | | <------------ | | | | | | | | "TERM"/"xxx" | |"$xxx" V | "CONT"/"IDEM" ------- [SUSPENDED] ----------/
Modifier and Type | Class and Description |
---|---|
static class |
EventPatternDistributor.Phase |
Modifier and Type | Field and Description |
---|---|
static String |
default_endUse |
static String |
default_resumeUse |
static String |
default_startDef |
static String |
default_startUse |
protected String |
endUse |
protected Map<Event,String> |
intermediate |
protected MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> |
msg |
protected Map<Event,Event> |
origin |
protected List<Event> |
pattern |
protected int |
patternphase |
protected EventPatternDistributor.Phase |
phase |
protected String |
resumeUse |
protected String |
startDef |
protected String |
startUse |
Constructor and Description |
---|
EventPatternDistributor() |
EventPatternDistributor(String startDef,
String startUse,
String endUse,
String resumeUse) |
Modifier and Type | Method and Description |
---|---|
protected void |
copyPattern(Event ev) |
Translet.Parser<?> |
getParser() |
void |
reify(MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg,
Map<Event,Event> origin,
Iterable<Event> evs) |
protected void |
startUse(Event ev,
boolean reset) |
protected final String startDef
protected final String startUse
protected final String endUse
protected final String resumeUse
public static final String default_startDef
public static final String default_startUse
public static final String default_endUse
public static final String default_resumeUse
protected int patternphase
protected EventPatternDistributor.Phase phase
protected MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg
public Translet.Parser<?> getParser()
public void reify(MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg, Map<Event,Event> origin, Iterable<Event> evs)
protected void startUse(Event ev, boolean reset)
protected void copyPattern(Event ev)