|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.alicebot.server.core.parser.DeprecatedAIMLParser
public class DeprecatedAIMLParser
Processes deprecated AIML tags. Uses the old "giant conditional tree" approach, so it's slower and not preferable.
Field Summary | |
---|---|
static java.lang.String |
ALICE
The string "alice". |
static java.lang.String |
BEFORETHAT
The string "beforethat". |
static java.lang.String |
BIRTHDAY
The string "birthday". |
static java.lang.String |
BIRTHPLACE
The string "birthplace". |
static java.lang.String |
BOTMASTER
The string "botmaster". |
static java.lang.String |
BOYFRIEND
The string "boyfriend". |
static java.lang.String |
FAVORITEBAND
The string "favoriteband". |
static java.lang.String |
FAVORITEBOOK
The string "favoritebook". |
static java.lang.String |
FAVORITECOLOR
The string "favoritecolor". |
static java.lang.String |
FAVORITEFOOD
The string "favoritefood". |
static java.lang.String |
FAVORITEMOVIE
The string "favoritemovie". |
static java.lang.String |
FAVORITESONG
The string "favoritesong". |
static java.lang.String |
FOR_FUN
The string "for_fun". |
static java.lang.String |
FRIENDS
The string "friends". |
static java.lang.String |
GENDER
The string "gender". |
static java.lang.String |
GET_IP
The string "get_ip". |
static java.lang.String |
GET_OLD
The string "get_". |
static java.lang.String |
GETNAME
The string "getname". |
static java.lang.String |
GETSIZE
The string "getsize". |
static java.lang.String |
GETTOPIC
The string "gettopic". |
static java.lang.String |
GETVERSION
The string "getversion". |
static java.lang.String |
GIRLFRIEND
The string "girlfriend". |
static java.lang.String |
JUSTBEFORETHAT
The string "justbeforethat". |
static java.lang.String |
JUSTTHAT
The string "justthat". |
static java.lang.String |
KIND_MUSIC
The string "kind_music". |
static java.lang.String |
LOAD
The string "load". |
static java.lang.String |
LOCATION
The string "location". |
static java.lang.String |
LOOK_LIKE
The string "look_like". |
static java.lang.String |
NAME
The string "name". |
static java.lang.String |
QUESTION
The string "question". |
static java.lang.String |
QUOTE_MARK
A quote mark, for convenience. |
static java.lang.String |
SET_OLD
The string "set_". |
static java.lang.String |
SETNAME
The string "setname". |
static java.lang.String |
SETTOPIC
The string "settopic". |
static java.lang.String |
SIGN
The string "sign". |
static java.lang.String |
TALK_ABOUT
The string "talk_about". |
static java.lang.String |
WEAR
The string "wear". |
Constructor Summary | |
---|---|
DeprecatedAIMLParser()
|
Method Summary | |
---|---|
static java.lang.String |
processTag(int level,
java.lang.String userid,
XMLNode tag,
TemplateParser parser)
Recursively processes purportedly deprecated AIML tags, with top-down, inside-out order. |
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 QUOTE_MARK
public static final java.lang.String ALICE
public static final java.lang.String NAME
public static final java.lang.String JUSTBEFORETHAT
public static final java.lang.String JUSTTHAT
public static final java.lang.String BEFORETHAT
public static final java.lang.String GET_OLD
public static final java.lang.String GET_IP
public static final java.lang.String GETNAME
public static final java.lang.String GETSIZE
public static final java.lang.String GETTOPIC
public static final java.lang.String GETVERSION
public static final java.lang.String LOAD
public static final java.lang.String SETTOPIC
public static final java.lang.String SETNAME
public static final java.lang.String SET_OLD
public static final java.lang.String BIRTHDAY
public static final java.lang.String BIRTHPLACE
public static final java.lang.String BOYFRIEND
public static final java.lang.String FAVORITEBAND
public static final java.lang.String FAVORITEBOOK
public static final java.lang.String FAVORITECOLOR
public static final java.lang.String FAVORITEFOOD
public static final java.lang.String FAVORITEMOVIE
public static final java.lang.String FAVORITESONG
public static final java.lang.String FOR_FUN
public static final java.lang.String FRIENDS
public static final java.lang.String GENDER
public static final java.lang.String GIRLFRIEND
public static final java.lang.String KIND_MUSIC
public static final java.lang.String LOCATION
public static final java.lang.String LOOK_LIKE
public static final java.lang.String BOTMASTER
public static final java.lang.String QUESTION
public static final java.lang.String SIGN
public static final java.lang.String TALK_ABOUT
public static final java.lang.String WEAR
Constructor Detail |
---|
public DeprecatedAIMLParser()
Method Detail |
---|
public static java.lang.String processTag(int level, java.lang.String userid, XMLNode tag, TemplateParser parser) throws UnknownDeprecatedAIMLException
Recursively processes purportedly deprecated AIML tags, with top-down, inside-out order.
Uses the inefficient method of the old TemplateParser, so shouldn't be used if one can help it.
The actual tag to process is driven by @{link TemplateParser#evaluate}, so
strict sequencing is used. For each valid tag, the associated
AIMLProcessor
,
resolution code or #shortcutTag
processor is activated.
If no tag is recognized, an UnknownDeprecatedAIMLTagException
is thrown.
Tags are explored sequentially. The sequence has performance
implications (frequently-used tags should be first). However,
the actual sequence within the template is preserved,
because it's driven by the caller method (usually #evaluate
)
and not by the order in which the tags are resolved.
level
- the current level in the XML trieuserid
- the user identifiertag
- the tag being evaluatedparser
- the TemplateParser
that called this
UnknownDeprecatedAIMLException
- if no tags are recognized
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |