org.aitools.programd.processor.aiml
Class IndexedPredicateProcessor

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.IndexedPredicateProcessor
Direct Known Subclasses:
InputProcessor, StarProcessor, ThatProcessor, ThatStarProcessor, TopicStarProcessor

public abstract class IndexedPredicateProcessor
extends AIMLProcessor

Processes an indexed predicate.

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

Field Summary
 
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
IndexedPredicateProcessor(Core coreToUse)
          Creates a new IndexedPredicateProcessor using the given Core.
 
Method Summary
 java.lang.String process(org.w3c.dom.Element element, TemplateParser parser, java.util.ArrayList<java.lang.String> predicates, int dimensions)
          Processes an indexed predicate whose values are stored in the supplied predicates ArrayList.
 java.lang.String process(org.w3c.dom.Element element, TemplateParser parser, java.lang.String name, int dimensions)
          Processes an indexed predicate with dimensions dimensions (must be either 1 or 2)
 
Methods inherited from class org.aitools.programd.processor.aiml.AIMLProcessor
process, process
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IndexedPredicateProcessor

public IndexedPredicateProcessor(Core coreToUse)
Creates a new IndexedPredicateProcessor 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,
                                java.lang.String name,
                                int dimensions)
Processes an indexed predicate with dimensions dimensions (must be either 1 or 2)

Parameters:
element -
parser -
name - predicate name
dimensions - the number of dimensions (1 or 2)
Returns:
the result of processing the element
Since:
4.1.3
See Also:
AIMLProcessor.process(Element, TemplateParser)

process

public java.lang.String process(org.w3c.dom.Element element,
                                TemplateParser parser,
                                java.util.ArrayList<java.lang.String> predicates,
                                int dimensions)
Processes an indexed predicate whose values are stored in the supplied predicates ArrayList. Currently supports only a 1-dimensional index (for handling star, thatstar, and topicstar elements).

Parameters:
element -
parser -
predicates - predicate values
dimensions - the number of dimensions (1 only)
Returns:
the result of processing the element