org.aitools.programd.processor.aiml
Class SRAIProcessor

java.lang.Object
  extended by org.aitools.programd.processor.Processor
      extended by org.aitools.programd.processor.aiml.AIMLProcessor
          extended by org.aitools.programd.processor.aiml.SRAIProcessor

public class SRAIProcessor
extends AIMLProcessor

Implements the <srai/> element.

Author:
Jon Baer, Thomas Ringate, Pedro Colla, Noel Bush

Field Summary
static java.lang.String label
          The label (as required by the registration scheme).
private static org.apache.log4j.Logger matchLogger
           
 
Fields inherited from class org.aitools.programd.processor.aiml.AIMLProcessor
aimlLogger, logger
 
Fields inherited from class org.aitools.programd.processor.Processor
core, EMPTY_STRING, ENABLED, ID, NAME, NAME_EQUALS, VALUE, VALUE_EQUALS
 
Constructor Summary
SRAIProcessor(Core coreToUse)
          Creates a new SRAIProcessor using the given Core.
 
Method Summary
 java.lang.String process(org.w3c.dom.Element element, TemplateParser parser)
          Processes a <srai/> element.
 
Methods inherited from class org.aitools.programd.processor.aiml.AIMLProcessor
process
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

label

public static final java.lang.String label
The label (as required by the registration scheme).

See Also:
Constant Field Values

matchLogger

private static org.apache.log4j.Logger matchLogger
Constructor Detail

SRAIProcessor

public SRAIProcessor(Core coreToUse)
Creates a new SRAIProcessor using the given Core.

Parameters:
coreToUse - the Core object to use
Method Detail

process

public java.lang.String process(org.w3c.dom.Element element,
                                TemplateParser parser)
                         throws ProcessorException
Processes a <srai/> element. First, all elements contained within a given <srai/> are evaluated, and the result is recursively fed as input to the pattern matching process. The result of such evaluation (which itself might be recursive) is returned as the result.

Specified by:
process in class AIMLProcessor
Parameters:
element - the srai element
parser - the parser that is at work
Returns:
the result of processing the element
Throws:
ProcessorException - if there is an unrecoverable problem processing the element
See Also:
AIMLProcessor.process(Element, TemplateParser)