|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.alicebot.server.core.parser.GenericParser org.alicebot.server.core.parser.TemplateParser
public class TemplateParser
TemplateParser
is still a primitive class, implementing not a
"real" XML parser, but just enough (hopefully) to get the job done.
Field Summary |
---|
Fields inherited from class org.alicebot.server.core.parser.GenericParser |
---|
ATOMIC_MARKER_END, CLOSE_MARKER_START, COLON, COMMA, EMPTY_STRING, INDEX, NONATOMIC_MARKER_END, OPEN_MARKER_START, processorRegistry |
Constructor Summary | |
---|---|
TemplateParser(java.lang.String input,
java.lang.String userid,
java.lang.String botid)
Initializes an TemplateParser . |
Method Summary | |
---|---|
void |
addInput(java.lang.String input)
Adds an input to the inputs list (for avoiding infinite loops). |
java.lang.String |
getBotID()
Returns the botid. |
java.util.ArrayList |
getInputs()
Returns the input that matched the pattern associated with this template. |
java.util.ArrayList |
getInputStars()
Returns the values captured from the input path by wildcards in the pattern . |
java.util.ArrayList |
getThatStars()
Returns the the values captured from the input path by wildcards in the that . |
java.util.ArrayList |
getTopicStars()
Returns the values captured from the input path by wildcards in the topic name . |
java.lang.String |
getUserID()
Returns the userid. |
java.lang.String |
processTag(int level,
XMLNode tag)
Processes the AIML within and including a given AIML element. |
void |
setInputStars(java.util.ArrayList stars)
Sets the inputStars list. |
void |
setThatStars(java.util.ArrayList stars)
Sets the thatStars list. |
void |
setTopicStars(java.util.ArrayList stars)
Sets the topicStars Vector. |
Methods inherited from class org.alicebot.server.core.parser.GenericParser |
---|
evaluate, formatTag, getNode, getValid1dIndex, getValid2dIndex, nodeCount, processResponse, shortcutTag |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TemplateParser(java.lang.String input, java.lang.String userid, java.lang.String botid) throws TemplateParserException
TemplateParser
.
The input
is a required parameter!
input
- the input that matched the pattern
associated with this template (helps to avoid endless loops)
TemplateParserException
- if the input
is nullMethod Detail |
---|
public java.lang.String processTag(int level, XMLNode tag) throws ProcessorException
processTag
in class GenericParser
level
- the current level in the XML trietag
- the tag being evaluated
AIMLProcessorException
- if the AIML cannot be processed
ProcessorException
- if the content cannot be processedpublic void addInput(java.lang.String input)
input
- the input to addpublic java.util.ArrayList getInputs()
pattern
associated with this template.
pattern
associated with this templatepublic java.util.ArrayList getInputStars()
pattern
.
pattern
public java.util.ArrayList getThatStars()
that
.
that
public java.util.ArrayList getTopicStars()
topic name
.
topic name
public void setInputStars(java.util.ArrayList stars)
inputStars
list.
values
- captured from the input path by wildcards in the pattern
public void setThatStars(java.util.ArrayList stars)
thatStars
list.
values
- captured from the input path by wildcards in the that
public void setTopicStars(java.util.ArrayList stars)
topicStars
Vector.
values
- captured from the input path by wildcards in the topic name
public java.lang.String getUserID()
public java.lang.String getBotID()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |