public abstract class AbstractGrammar extends Object implements IGrammar
Modifier and Type | Field and Description |
---|---|
protected String |
name
The grammar name
|
protected IStates |
statesEnum
The grammar's states
|
protected HashMap<Tag,GrammarTransition>[] |
transitions
Table of transitions.
|
Constructor and Description |
---|
AbstractGrammar() |
Modifier and Type | Method and Description |
---|---|
void |
executeAction(Dsmlv2Container container)
This method, when called, execute an action on the current data stored in
the container.
|
String |
getName()
Return the grammar's name
|
IStates |
getStatesEnum()
Get the states of the current grammar
|
GrammarTransition |
getTransition(int state,
Tag tag)
Get the transition associated with the state and tag
|
void |
setName(String name)
Set the grammar's name
|
void |
setStatesEnum(IStates statesEnum)
Set the states for this grammar
|
protected HashMap<Tag,GrammarTransition>[] transitions
protected String name
protected IStates statesEnum
public String getName()
public void setName(String name)
public GrammarTransition getTransition(int state, Tag tag)
state
- The current statetag
- The current tagpublic IStates getStatesEnum()
getStatesEnum
in interface IGrammar
public void setStatesEnum(IStates statesEnum)
statesEnum
- The statesEnum to set.public void executeAction(Dsmlv2Container container) throws org.xmlpull.v1.XmlPullParserException, IOException
IGrammar
executeAction
in interface IGrammar
container
- the DSML containerorg.xmlpull.v1.XmlPullParserException
- Thrown when an unrecoverable error occurs.IOException
Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.