|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.alicebot.server.core.targeting.Targeting org.alicebot.server.core.targeting.TargetingTool
public class TargetingTool
Manages the use of the Targeting GUI.
Field Summary | |
---|---|
static java.lang.String |
VERSION
Version string. |
Fields inherited from class org.alicebot.server.core.targeting.Targeting |
---|
CATEGORY_END, CATEGORY_START, EMPTY_STRING, INDENT, INPUT_END, INPUT_START, LINE_SEPARATOR, MATCH_END, MATCH_START, PATTERN_END, PATTERN_START, REPLY_END, REPLY_START, SPACE, TARGET_END, TARGET_START, TARGETS, TARGETS_END, TARGETS_START, TEMPLATE_END, TEMPLATE_START, TEXT_END, TEXT_START, THAT_END, THAT_START, TOPIC_END, TOPIC_NAME_BEGIN, TOPIC_NAME_END, TOPIC_START |
Constructor Summary | |
---|---|
TargetingTool()
Creates a new instance of TargetingTool, loading targets from targets data path. |
Method Summary | |
---|---|
(package private) static void |
add(Target target,
java.util.HashMap set)
Adds a target to the specified set. |
void |
changeTargetsDataPath(java.lang.String path)
Changes the targets data path and loads data from the new file. |
static int |
countDiscarded()
Returns the number of discarded targets. |
static int |
countLive()
Returns the number of live targets. |
static int |
countSaved()
Returns the number of saved targets. |
static void |
discard(Target target)
Discards a target from the live targets. |
static void |
discardAll()
Discards all targets from the live targets. |
int |
getReloadFrequency()
Returns the current timer frequency, in seconds. |
static java.util.List |
getSortedTargets()
Returns the live target set, sorted by the activations count. |
java.lang.String |
getTargetsDataPath()
Returns the current targets data path. |
boolean |
includeIncompleteThats()
Returns whether incomplete-that targets should be included. |
void |
includeIncompleteThats(boolean b)
Specifies whether incomplete-that targets should be included. |
boolean |
includeIncompleteTopics()
Returns whether incomplete-topic targets should be included. |
void |
includeIncompleteTopics(boolean b)
Specifies whether incomplete-topic targets should be included. |
static void |
main(java.lang.String[] args)
Starts up a new Targets, managed by a Thread. |
static Target |
nextTarget()
Returns a new target from the live targets. |
void |
reload()
Reloads targets from the targets data path into the live targets cache. |
void |
restartTimer(int frequency)
Starts the target data checking task with a given frequency. |
void |
run()
Starts the Targeting GUI (and the timer, if configured). |
static void |
save(Target target)
Saves a target from the live targets (does not create a new category. |
static void |
saveCategory(Target target)
Saves a new category to the targets AIML file. |
static void |
shutdown()
Performs any steps necessary before shutdown of the tool. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String VERSION
Constructor Detail |
---|
public TargetingTool()
Method Detail |
---|
public void reload() throws java.io.IOException, java.net.MalformedURLException
java.io.IOException
java.net.MalformedURLException
public void run()
run
in interface java.lang.Runnable
public void restartTimer(int frequency)
frequency
- seconds in between target data checkspublic int getReloadFrequency()
static void add(Target target, java.util.HashMap set)
liveTargets
, then if the target is already in
the live targets set, the new target is merged with
the already-known target.
target
- the target to addset
- the target set to which to add itTarget#merge}
public static void saveCategory(Target target)
target
- the target to savepublic static Target nextTarget()
public static void save(Target target)
target
- the target to discardpublic static void discardAll()
public static void discard(Target target)
target
- the target to discardpublic static java.util.List getSortedTargets()
public static int countLive()
public static int countSaved()
public static int countDiscarded()
public static void shutdown()
public java.lang.String getTargetsDataPath()
public void changeTargetsDataPath(java.lang.String path)
path
- the desired targets data pathpublic boolean includeIncompleteThats()
public boolean includeIncompleteTopics()
public void includeIncompleteThats(boolean b)
b
- whether incomplete-that targets should be includedpublic void includeIncompleteTopics(boolean b)
b
- whether incomplete-topic targets should be includedpublic static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |