org.alicebot.server.core.targeting
Class TargetsReaderListener

java.lang.Object
  extended by org.alicebot.server.core.targeting.TargetsReaderListener
All Implemented Interfaces:
GenericReaderListener

public class TargetsReaderListener
extends java.lang.Object
implements GenericReaderListener

Reads in new targets to a given Targets object. This version is based on AIMLLoader. Obviously this and its companion TargetsReaderListener duplicate a lot from AIMLReader and AIMLLoader, so once this is stabilized these should all be combined.

Author:
Noel Bush

Constructor Summary
TargetsReaderListener(java.util.HashMap set)
          Initializes a TargetsReaderListener with the set in which to load the given targets.
 
Method Summary
 void loadTarget(java.lang.String matchPattern, java.lang.String matchThat, java.lang.String matchTopic, java.lang.String matchTemplate, java.lang.String inputText, java.lang.String inputThat, java.lang.String inputTopic, java.lang.String reply)
          Loads a target into TargetMaster.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TargetsReaderListener

public TargetsReaderListener(java.util.HashMap set)
Initializes a TargetsReaderListener with the set in which to load the given targets.

Parameters:
set - the set in which to load the targets
Method Detail

loadTarget

public void loadTarget(java.lang.String matchPattern,
                       java.lang.String matchThat,
                       java.lang.String matchTopic,
                       java.lang.String matchTemplate,
                       java.lang.String inputText,
                       java.lang.String inputThat,
                       java.lang.String inputTopic,
                       java.lang.String reply)
Loads a target into TargetMaster.

Parameters:
matchPattern - the pattern part of the matched path
matchThat - the that part of the matched path
matchTopic - the topic part of the matched path
matchTemplate - the template associated with the matched path
inputText - the input text that was matched
inputThat - the value of the that predicate when the input was received
inputTopic - the value of the topic predicate when the input was received
reply - the reply from the bot