org.aitools.programd.processor.aiml
Class AIMLProcessor

java.lang.Object
  extended by org.aitools.programd.processor.Processor
      extended by org.aitools.programd.processor.aiml.AIMLProcessor
Direct Known Subclasses:
BotProcessor, ConditionProcessor, DateProcessor, FormalProcessor, GetProcessor, GossipProcessor, IDProcessor, IndexedPredicateProcessor, JavaScriptProcessor, LearnProcessor, LowerCaseProcessor, RandomProcessor, SentenceProcessor, SetProcessor, SizeProcessor, SRAIProcessor, SRProcessor, SubstitutionProcessor, SystemProcessor, TemplateProcessor, ThinkProcessor, UpperCaseProcessor, VersionProcessor

public abstract class AIMLProcessor
extends Processor

An AIMLProcessor is responsible for processing a particular AIML element.

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

Field Summary
protected static org.apache.log4j.Logger aimlLogger
           
protected static org.apache.log4j.Logger logger
           
 
Fields inherited from class org.aitools.programd.processor.Processor
core, EMPTY_STRING, ENABLED, ID, NAME, NAME_EQUALS, VALUE, VALUE_EQUALS
 
Constructor Summary
AIMLProcessor(Core coreToUse)
          Creates a new AIMLProcessor using the given Core.
 
Method Summary
 java.lang.String process(org.w3c.dom.Element element, GenericParser parser)
          Processes an element.
abstract  java.lang.String process(org.w3c.dom.Element element, TemplateParser parser)
          Processes the given element, using the given parser if needed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static final org.apache.log4j.Logger logger

aimlLogger

protected static final org.apache.log4j.Logger aimlLogger
Constructor Detail

AIMLProcessor

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

Parameters:
coreToUse - the Core object to use with the new AIMLProcessor
Method Detail

process

public java.lang.String process(org.w3c.dom.Element element,
                                GenericParser parser)
                         throws ProcessorException
Description copied from class: Processor
Processes an element.

Specified by:
process in class Processor
Parameters:
element - the element to process
parser - the parser calling the processor
Returns:
the result of processing the given element
Throws:
ProcessorException - if the tag or its contents are invalid
See Also:
Processor.process(org.w3c.dom.Element, org.aitools.programd.parser.GenericParser)

process

public abstract java.lang.String process(org.w3c.dom.Element element,
                                         TemplateParser parser)
                                  throws ProcessorException
Processes the given element, using the given parser if needed.

Parameters:
element - the element to process
parser - the parser that has ordered the processing
Returns:
the result of processing the element
Throws:
ProcessorException - if there is an unrecoverable problem processing the element