public class AIMLParser
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.util.Set<java.lang.String> |
attributeNodes |
static java.util.List<java.lang.String> |
categoryChildren |
static java.util.Set<java.lang.String> |
htmlTags |
static int |
MAX_FILE_SIZE |
static int |
MAX_IDENTIFIER |
static int |
PAGE |
static java.util.List<java.lang.String> |
patternChildren |
static java.util.Set<java.lang.String> |
templateChildren |
static java.util.List<java.lang.String> |
topicChildren |
Constructor and Description |
---|
AIMLParser() |
Modifier and Type | Method and Description |
---|---|
void |
appendCode(org.w3c.dom.Element child,
boolean multiStar,
boolean[] srai,
java.io.StringWriter writer,
Network network) |
boolean |
appendHTML(java.lang.String tag,
org.w3c.dom.Element child,
boolean multiStar,
boolean[] srai,
boolean isTemplate,
java.io.StringWriter writer,
Network network) |
void |
appendNestedString(org.w3c.dom.Element child,
boolean multiStar,
boolean[] srai,
java.io.StringWriter writer,
Network network) |
boolean |
appendNestedText(org.w3c.dom.Element child,
boolean multiStar,
boolean[] srai,
java.io.StringWriter writer,
Network network) |
void |
appendPatternCode(org.w3c.dom.Element child,
boolean multiStar,
boolean[] srai,
java.io.StringWriter writer,
Network network) |
void |
appendThink(org.w3c.dom.Element element,
java.io.StringWriter writer,
boolean multiStar,
boolean[] srai,
Network network) |
void |
checkSupportedChildren(org.w3c.dom.Element element,
java.util.Collection<java.lang.String> tags,
Network network) |
Vertex |
createSentenceState(Vertex stateMachine,
Network network) |
Vertex |
createState(Vertex pattern,
Vertex parent,
Network network)
Create a left child state node for the pattern.
|
java.util.List<org.w3c.dom.Element> |
getLocalElementsByTagName(java.lang.String tag,
org.w3c.dom.Element element) |
java.lang.String |
getNodeValue(org.w3c.dom.Element node,
java.lang.String value,
java.lang.String defaulValue,
boolean primitive,
boolean quote,
boolean multiStar,
boolean[] srai,
Network network) |
java.lang.String |
getPattern(org.w3c.dom.Element element,
Network network) |
SelfCompiler |
getSelfCompiler() |
java.lang.String |
getTemplate(org.w3c.dom.Element element,
boolean quote,
boolean multiStar,
boolean[] srai,
boolean flattenTemplates,
boolean addQuotes,
boolean pattern,
Network network) |
boolean |
isPattern(java.lang.String text) |
Vertex |
parseAIML(java.io.File file,
boolean parseAsStateMachine,
boolean createStates,
boolean pin,
boolean indexStatic,
Vertex stateMachine,
java.lang.String encoding,
Network network)
Get the contents of the URL to a .aiml file and parse it.
|
Vertex |
parseAIML(java.lang.String code,
boolean parseAsStateMachine,
boolean createStates,
boolean pin,
boolean indexStatic,
Vertex stateMachine,
Network network)
Parse the code into a vertex state machine defined in the network.
|
Vertex |
parseAIML(java.net.URL url,
boolean parseAsStateMachine,
boolean createStates,
boolean pin,
boolean indexStatic,
Vertex stateMachine,
java.lang.String encoding,
Network network)
Get the contents of the URL to a .aiml file and parse it.
|
Vertex |
parseAIMLTemplate(java.lang.String code,
Network network)
Parse the template into a forumla defined in the network.
|
void |
parseCategory(org.w3c.dom.Element category,
Vertex topic,
boolean parseAsStateMachine,
boolean createStates,
boolean pin,
boolean indexStatic,
Vertex sentenceState,
java.util.Map<java.lang.String,Vertex> cache,
Network network) |
static AIMLParser |
parser() |
java.lang.String |
toString() |
public static int MAX_FILE_SIZE
public static int PAGE
public static int MAX_IDENTIFIER
public static java.util.Set<java.lang.String> htmlTags
public static java.util.List<java.lang.String> topicChildren
public static java.util.List<java.lang.String> categoryChildren
public static java.util.List<java.lang.String> patternChildren
public static java.util.Set<java.lang.String> templateChildren
public static java.util.Set<java.lang.String> attributeNodes
public static AIMLParser parser()
public SelfCompiler getSelfCompiler()
public Vertex parseAIML(java.net.URL url, boolean parseAsStateMachine, boolean createStates, boolean pin, boolean indexStatic, Vertex stateMachine, java.lang.String encoding, Network network)
public Vertex parseAIML(java.io.File file, boolean parseAsStateMachine, boolean createStates, boolean pin, boolean indexStatic, Vertex stateMachine, java.lang.String encoding, Network network)
public Vertex parseAIMLTemplate(java.lang.String code, Network network)
public Vertex parseAIML(java.lang.String code, boolean parseAsStateMachine, boolean createStates, boolean pin, boolean indexStatic, Vertex stateMachine, Network network)
public void checkSupportedChildren(org.w3c.dom.Element element, java.util.Collection<java.lang.String> tags, Network network)
public boolean isPattern(java.lang.String text)
public void parseCategory(org.w3c.dom.Element category, Vertex topic, boolean parseAsStateMachine, boolean createStates, boolean pin, boolean indexStatic, Vertex sentenceState, java.util.Map<java.lang.String,Vertex> cache, Network network)
public Vertex createState(Vertex pattern, Vertex parent, Network network)
public java.util.List<org.w3c.dom.Element> getLocalElementsByTagName(java.lang.String tag, org.w3c.dom.Element element)
public java.lang.String getPattern(org.w3c.dom.Element element, Network network)
public void appendNestedString(org.w3c.dom.Element child, boolean multiStar, boolean[] srai, java.io.StringWriter writer, Network network)
public boolean appendNestedText(org.w3c.dom.Element child, boolean multiStar, boolean[] srai, java.io.StringWriter writer, Network network)
public boolean appendHTML(java.lang.String tag, org.w3c.dom.Element child, boolean multiStar, boolean[] srai, boolean isTemplate, java.io.StringWriter writer, Network network)
public java.lang.String getTemplate(org.w3c.dom.Element element, boolean quote, boolean multiStar, boolean[] srai, boolean flattenTemplates, boolean addQuotes, boolean pattern, Network network)
public java.lang.String getNodeValue(org.w3c.dom.Element node, java.lang.String value, java.lang.String defaulValue, boolean primitive, boolean quote, boolean multiStar, boolean[] srai, Network network)
public void appendCode(org.w3c.dom.Element child, boolean multiStar, boolean[] srai, java.io.StringWriter writer, Network network)
public void appendPatternCode(org.w3c.dom.Element child, boolean multiStar, boolean[] srai, java.io.StringWriter writer, Network network)
public void appendThink(org.w3c.dom.Element element, java.io.StringWriter writer, boolean multiStar, boolean[] srai, Network network)
public java.lang.String toString()
toString
in class java.lang.Object