org.alicebot.server.core.targeting
Class TargetsReaderListener
java.lang.Object
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 |
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
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 pathmatchThat
- the that
part of the matched pathmatchTopic
- the topic
part of the matched pathmatchTemplate
- the template
associated with the matched pathinputText
- the input text that was matchedinputThat
- the value of the that
predicate when the input was receivedinputTopic
- the value of the topic
predicate when the input was receivedreply
- the reply from the bot