|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object wyvern.lib.commands.Atmospheres
Handles reading an atmosphere list from an XML file.
Field Summary | |
protected java.util.HashMap |
adjacent_
|
protected java.util.HashSet |
all_
|
protected java.util.HashMap |
solo_
|
protected java.util.HashMap |
visible_
|
Constructor Summary | |
Atmospheres()
|
Method Summary | |
java.lang.String[] |
getAdjacentMessages(java.lang.String verb)
Returns the templatized messages for this atmosphere. |
java.lang.String[] |
getSoloMessages(java.lang.String verb)
Returns the templatized messages for this atmosphere. |
java.lang.String[] |
getVerbs()
Returns a list of all the atmosphere verbs this object has read from xml files, from calls to readFile(). |
java.lang.String[] |
getVisibleMessages(java.lang.String verb)
Returns the templatized messages for this atmosphere. |
boolean |
isAdjacentAtmosphere(java.lang.String verb)
Returns true if the passed verb can be used as a "adjacent" atmosphere (i.e. takes an adjacent target). |
boolean |
isSoloAtmosphere(java.lang.String verb)
Returns true if the passed verb can be used as a "solo" atmosphere (i.e. no target). |
boolean |
isVisibleAtmosphere(java.lang.String verb)
Returns true if the passed verb can be used as a "visible" atmosphere (i.e. takes a visible target). |
static void |
main(java.lang.String[] args)
Test harness. |
protected void |
parseAdjacent(org.w3c.dom.Element node,
java.lang.String verb)
Parses an "adjacent" atmosphere element and puts it in the list. |
protected void |
parseAdjacentMessage(org.w3c.dom.Element node,
java.lang.String[] messages,
java.lang.String verb)
Grabs a message from a adjacent element. |
protected void |
parseSolo(org.w3c.dom.Element node,
java.lang.String verb)
Parses a "solo" atmosphere element and puts it in the list. |
protected void |
parseSoloMessage(org.w3c.dom.Element node,
java.lang.String[] messages,
java.lang.String verb)
Grabs a message from a solo element. |
protected void |
parseVisible(org.w3c.dom.Element node,
java.lang.String verb)
Parses a "visible" atmosphere element and puts it in the list. |
protected void |
readAtmospheres(org.w3c.dom.Element root)
Parses the master atmospheres document (read from an XML file). |
void |
readFile(java.lang.String path)
Reads in a specified atmospheres XML file. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.util.HashMap solo_
protected java.util.HashMap adjacent_
protected java.util.HashMap visible_
protected java.util.HashSet all_
Constructor Detail |
public Atmospheres()
Method Detail |
public void readFile(java.lang.String path) throws java.lang.Exception
java.lang.Exception
protected void readAtmospheres(org.w3c.dom.Element root)
protected void parseSolo(org.w3c.dom.Element node, java.lang.String verb)
node
- the xml "solo" nodeverb
- the atmosphere verbprotected void parseSoloMessage(org.w3c.dom.Element node, java.lang.String[] messages, java.lang.String verb)
messages
- a string array for storing the messages
(first is agent, second is other)protected void parseAdjacent(org.w3c.dom.Element node, java.lang.String verb)
node
- the xml "adjacent" nodeprotected void parseAdjacentMessage(org.w3c.dom.Element node, java.lang.String[] messages, java.lang.String verb)
messages
- a string array for storing the messages
(first is agent, second is other)protected void parseVisible(org.w3c.dom.Element node, java.lang.String verb)
node
- the xml "visible" nodepublic java.lang.String[] getSoloMessages(java.lang.String verb)
public java.lang.String[] getAdjacentMessages(java.lang.String verb)
public java.lang.String[] getVisibleMessages(java.lang.String verb)
public boolean isSoloAtmosphere(java.lang.String verb)
public boolean isAdjacentAtmosphere(java.lang.String verb)
public boolean isVisibleAtmosphere(java.lang.String verb)
public java.lang.String[] getVerbs()
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |