org.alicebot.server.core.processor.loadtime
Class StartupElementProcessor

java.lang.Object
  extended by org.alicebot.server.core.processor.Processor
      extended by org.alicebot.server.core.processor.loadtime.StartupElementProcessor
Direct Known Subclasses:
BotProcessor, BotsProcessor, GenderProcessor, InputProcessor, LearnProcessor, ListenerProcessor, ListenersProcessor, Person2Processor, PersonProcessor, PredicateProcessor, PredicatesProcessor, PropertiesProcessor, PropertyProcessor, SentenceSplittersProcessor, SubstitutionsProcessor

public abstract class StartupElementProcessor
extends Processor

A StartupElementProcessor is responsible for processing an element in a Program D startup file.

Since:
4.1.3
Author:
Noel Bush

Field Summary
protected static java.lang.String HREF
          The string "href".
 
Fields inherited from class org.alicebot.server.core.processor.Processor
EMPTY_STRING, ENABLED, ID, label, NAME, NAME_EQUALS, VALUE, VALUE_EQUALS
 
Constructor Summary
StartupElementProcessor()
           
 
Method Summary
protected  java.lang.String getHref(XMLNode tag)
          Returns the contents of the href attribute (if present).
 java.lang.String process(int level, XMLNode tag, GenericParser parser)
          Processes an element.
abstract  java.lang.String process(int level, XMLNode tag, StartupFileParser parser)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HREF

protected static final java.lang.String HREF
The string "href".

See Also:
Constant Field Values
Constructor Detail

StartupElementProcessor

public StartupElementProcessor()
Method Detail

process

public java.lang.String process(int level,
                                XMLNode tag,
                                GenericParser parser)
                         throws ProcessorException
Description copied from class: Processor
Processes an element.

Specified by:
process in class Processor
Parameters:
level - the starting level in the XML trie
tag - 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

process

public abstract java.lang.String process(int level,
                                         XMLNode tag,
                                         StartupFileParser parser)
                                  throws InvalidStartupElementException
Throws:
InvalidStartupElementException

getHref

protected java.lang.String getHref(XMLNode tag)
Returns the contents of the href attribute (if present).

Returns:
the contents of the href attribute (if present)