org.alicebot.server.core.processor
Class ConditionProcessor
java.lang.Object
org.alicebot.server.core.processor.Processor
org.alicebot.server.core.processor.AIMLProcessor
org.alicebot.server.core.processor.ConditionProcessor
public class ConditionProcessor
- extends AIMLProcessor
Handles a
condition
element.
- Version:
- 4.1.4
- Author:
- Jon Baer, Thomas Ringate, Pedro Colla, Noel Bush
Field Summary |
static int |
DEFAULT_LI
A defaultListItem in a <condition/>. |
static java.lang.String |
label
|
static int |
NAME_VALUE_LI
A nameValueListItem in a <condition/>. |
static int |
VALUE_ONLY_LI
A valueOnlyListItem in a <condition/>. |
Method Summary |
java.lang.String |
process(int level,
XMLNode tag,
TemplateParser parser)
|
java.lang.String |
processListItem(int level,
TemplateParser parser,
java.util.LinkedList list,
int listItemType,
java.lang.String name,
java.lang.String value)
Evaluates an <li/> element inside a <condition/>. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NAME_VALUE_LI
public static final int NAME_VALUE_LI
- A nameValueListItem in a <condition/>.
- See Also:
- Constant Field Values
DEFAULT_LI
public static final int DEFAULT_LI
- A defaultListItem in a <condition/>.
- See Also:
- Constant Field Values
VALUE_ONLY_LI
public static final int VALUE_ONLY_LI
- A valueOnlyListItem in a <condition/>.
- See Also:
- Constant Field Values
label
public static final java.lang.String label
- See Also:
- Constant Field Values
ConditionProcessor
public ConditionProcessor()
process
public java.lang.String process(int level,
XMLNode tag,
TemplateParser parser)
throws AIMLProcessorException
- Specified by:
process
in class AIMLProcessor
- Throws:
AIMLProcessorException
processListItem
public java.lang.String processListItem(int level,
TemplateParser parser,
java.util.LinkedList list,
int listItemType,
java.lang.String name,
java.lang.String value)
- Evaluates an <li/> element inside a <condition/>.
- Parameters:
level
- the level we're at in the XML trieparser
- the TemplateParser object responsible for thislist
- the XML trielistItemType
- one of NAME_VALUE_LI
, DEFAULT_LI
or VALUE_ONLY_LI
name
- the name attribute of the <li/> (if applicable)value
- the value attribute of the <li/> (if applicable)
- Returns:
- the result of processing this <li/>