|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.alicebot.server.core.Bot
public class Bot
Describes all of the properties of a bot.
Field Summary | |
---|---|
protected XMLResourceSpec |
chatlogSpec
The resource spec for logs from this bot. |
protected java.lang.String |
PREDICATE_EMPTY_DEFAULT
The predicate empty default. |
Constructor Summary | |
---|---|
Bot(java.lang.String id)
|
Method Summary | |
---|---|
void |
addGenderSubstitution(java.lang.String find,
java.lang.String replace)
|
void |
addInputSubstitution(java.lang.String find,
java.lang.String replace)
|
void |
addPerson2Substitution(java.lang.String find,
java.lang.String replace)
|
void |
addPersonSubstitution(java.lang.String find,
java.lang.String replace)
|
void |
addPredicateInfo(java.lang.String name,
java.lang.String defaultValue,
boolean returnNameWhenSet)
Registers some information about a predicate in advance. |
void |
addSentenceSplitter(java.lang.String splitter)
Adds a sentence splitter to the sentence splitters list. |
void |
addToFilenameMap(java.lang.String filename,
Nodemapper nodemapper)
Adds a nodemapper to the filename map. |
java.lang.String |
applyInputSubstitutions(java.lang.String input)
|
XMLResourceSpec |
getChatlogSpec()
|
java.util.HashMap |
getGenderSubstitutionsMap()
|
java.lang.String |
getID()
|
java.util.HashMap |
getInputSubstitutionsMap()
|
java.util.HashMap |
getLoadedFilesMap()
|
java.util.HashMap |
getPerson2SubstitutionsMap()
|
java.util.HashMap |
getPersonSubstitutionsMap()
|
java.util.Map |
getPredicateCache()
Returns the predicate cache. |
java.util.HashMap |
getPredicatesInfo()
Returns the predicates info map. |
java.lang.String |
getPropertyValue(java.lang.String name)
Retrieves the value of a named bot property. |
java.util.ArrayList |
getSentenceSplitters()
|
java.util.Map |
predicatesFor(java.lang.String userid)
Returns the map of predicates for a userid if it is cached, or a new map if it is not cached. |
java.util.ArrayList |
sentenceSplit(java.lang.String input)
|
void |
setPropertyValue(java.lang.String name,
java.lang.String value)
Sets the value of a bot property. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.String PREDICATE_EMPTY_DEFAULT
protected XMLResourceSpec chatlogSpec
Constructor Detail |
---|
public Bot(java.lang.String id)
Method Detail |
---|
public java.lang.String getID()
public java.util.HashMap getLoadedFilesMap()
public void addToFilenameMap(java.lang.String filename, Nodemapper nodemapper)
filename
- the filenamenodemapper
- the mapper for the node to addpublic java.lang.String getPropertyValue(java.lang.String name)
property
- the name of the bot property to get
public void setPropertyValue(java.lang.String name, java.lang.String value)
property
- the name of the bot predicate to setpublic void addPredicateInfo(java.lang.String name, java.lang.String defaultValue, boolean returnNameWhenSet)
name
- the name of the predicatedefaultValue
- the default value (if any) for the predicatereturnNameWhenSet
- whether the predicate should return its name when setbotid
- the bot id for whom to register the predicate this way (not yet used)public java.util.HashMap getPredicatesInfo()
public java.util.Map getPredicateCache()
public java.util.Map predicatesFor(java.lang.String userid)
userid
- public void addInputSubstitution(java.lang.String find, java.lang.String replace)
public void addGenderSubstitution(java.lang.String find, java.lang.String replace)
public void addPersonSubstitution(java.lang.String find, java.lang.String replace)
public void addPerson2Substitution(java.lang.String find, java.lang.String replace)
public void addSentenceSplitter(java.lang.String splitter)
splitter
- the string on which to divide sentencespublic java.util.HashMap getInputSubstitutionsMap()
public java.util.HashMap getGenderSubstitutionsMap()
public java.util.HashMap getPersonSubstitutionsMap()
public java.util.HashMap getPerson2SubstitutionsMap()
public java.util.ArrayList getSentenceSplitters()
public java.util.ArrayList sentenceSplit(java.lang.String input)
public java.lang.String applyInputSubstitutions(java.lang.String input)
public XMLResourceSpec getChatlogSpec()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |