org.aitools.programd.processor.botconfiguration
Class SubstitutionElementProcessor

java.lang.Object
  extended by org.aitools.programd.processor.Processor
      extended by org.aitools.programd.processor.botconfiguration.BotConfigurationElementProcessor
          extended by org.aitools.programd.processor.botconfiguration.SubstitutionElementProcessor
Direct Known Subclasses:
GenderProcessor, InputProcessor, Person2Processor, PersonProcessor, ServletPageProcessor

public abstract class SubstitutionElementProcessor
extends BotConfigurationElementProcessor

Author:
Noel Bush

Nested Class Summary
(package private) static class SubstitutionElementProcessor.SubstitutionType
          Package-visibility enum for specifying substitution type.
 
Field Summary
private static java.lang.String FIND
          The string ""find"".
private static java.lang.String REPLACE
          The string ""replace"".
 
Fields inherited from class org.aitools.programd.processor.botconfiguration.BotConfigurationElementProcessor
HREF, logger
 
Fields inherited from class org.aitools.programd.processor.Processor
core, EMPTY_STRING, ENABLED, ID, NAME, NAME_EQUALS, VALUE, VALUE_EQUALS
 
Constructor Summary
SubstitutionElementProcessor(Core coreToUse)
          Creates a new SubstitutionElementProcessor using the given Core.
 
Method Summary
protected  void addSubstitutions(SubstitutionElementProcessor.SubstitutionType type, org.w3c.dom.Element element, BotsConfigurationFileParser parser)
          Adds substitutions of the specified type.
 
Methods inherited from class org.aitools.programd.processor.botconfiguration.BotConfigurationElementProcessor
process, process
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FIND

private static final java.lang.String FIND
The string ""find"".

See Also:
Constant Field Values

REPLACE

private static final java.lang.String REPLACE
The string ""replace"".

See Also:
Constant Field Values
Constructor Detail

SubstitutionElementProcessor

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

Parameters:
coreToUse - the Core object to use
Method Detail

addSubstitutions

protected void addSubstitutions(SubstitutionElementProcessor.SubstitutionType type,
                                org.w3c.dom.Element element,
                                BotsConfigurationFileParser parser)
                         throws ProcessorException
Adds substitutions of the specified type.

Parameters:
type - the type of substitution to add
element - the container of the <substitute/> elements
parser - the parser handling this
Throws:
ProcessorException - if there is some problem processing