|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.directory.shared.dsmlv2.AbstractGrammar
public abstract class AbstractGrammar
The abstract IGrammar which is the Mother of all the grammars. It contains the transitions table.
Field Summary | |
---|---|
protected java.lang.String |
name
The grammar name |
protected IStates |
statesEnum
The grammar's states |
protected java.util.HashMap<Tag,GrammarTransition>[] |
transitions
Table of transitions. |
Constructor Summary | |
---|---|
AbstractGrammar()
|
Method Summary | |
---|---|
void |
executeAction(Dsmlv2Container container)
This method, when called, execute an action on the current data stored in the container. |
java.lang.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(java.lang.String name)
Set the grammar's name |
void |
setStatesEnum(IStates statesEnum)
Set the states for this grammar |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.HashMap<Tag,GrammarTransition>[] transitions
protected java.lang.String name
protected IStates statesEnum
Constructor Detail |
---|
public AbstractGrammar()
Method Detail |
---|
public java.lang.String getName()
getName
in interface IGrammar
public void setName(java.lang.String name)
setName
in interface IGrammar
name
- the name to setpublic GrammarTransition getTransition(int state, Tag tag)
state
- The current statetag
- The current tag
public 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, java.io.IOException
IGrammar
executeAction
in interface IGrammar
container
- the DSML container
org.xmlpull.v1.XmlPullParserException
- Thrown when an unrecoverable error occurs.
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |