|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.magicproject.xml.XmlTest
public final class XmlTest
Generic implementation of the XmlToMDB interface for managing XML elements relative to tests. Mainly used to get the suitable XmlToMDB implementation corresponding to a given action name (corresponding to the XML element name) through the getTest() method.
Method Summary | |
---|---|
int |
buildMdb(XmlParser.Node node,
java.io.OutputStream out)
|
static void |
buildMdbBinary(XmlParser.Node node,
java.io.OutputStream out,
IdTest idTests)
Write the contained binary test of the specified node to the given output stream. |
static void |
buildMdbCard(XmlParser.Node node,
java.io.OutputStream out,
IdTest idTests)
Write the contained test relative to a card of the specified node to the given outputstream. |
static void |
buildMdbObject(XmlParser.Node node,
java.io.OutputStream out,
IdTest idTests)
Write the contained test relative to a card of the specified node to the given output stream. |
static void |
buildMdbPlayer(XmlParser.Node node,
java.io.OutputStream out,
IdTest idTestPlayer)
Write the contained test relative to a card associated to a player of the specified node to the given output stream. |
static void |
buildMdbPlayerplayer(XmlParser.Node node,
java.io.OutputStream out,
IdTest idTestPlayer)
Write the contained test relative to a card associated to a player of the specified node to the given output stream. |
static void |
buildMdbTargetable(XmlParser.Node node,
java.io.OutputStream out,
IdTest idTests)
Writes the contained test relative to a targetable of the given node to the given output stream. |
static XmlToMDB |
getTest(java.lang.String testName)
Returns a suitable XmlToMDB implementation for the given action name (corresponding to the XML element name). |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void buildMdbBinary(XmlParser.Node node, java.io.OutputStream out, IdTest idTests) throws java.io.IOException
node
- the XML test container structureout
- outputstream where the card structure will be savedidTests
- test id
java.io.IOException
- if an I/O error occurs if an illegal argument is given if a
security error occurs if an illegal access error occurs if an
invocation target error occurspublic int buildMdb(XmlParser.Node node, java.io.OutputStream out)
buildMdb
in interface XmlToMDB
node
- the XML structure of element to write.out
- outputstream where the card structure will be saved
public static void buildMdbPlayer(XmlParser.Node node, java.io.OutputStream out, IdTest idTestPlayer) throws java.io.IOException
node
- the XML test container structureout
- outputstream where the test container structure will be savedidTestPlayer
- test id relative to a player
java.io.IOException
- if an I/O error occurspublic static void buildMdbPlayerplayer(XmlParser.Node node, java.io.OutputStream out, IdTest idTestPlayer) throws java.io.IOException
node
- the XML test container structureout
- outputstream where the test container structure will be savedidTestPlayer
- test id relative to a player
java.io.IOException
- if an I/O error occurs if an illegal argument is given if a
security error occurspublic static void buildMdbObject(XmlParser.Node node, java.io.OutputStream out, IdTest idTests) throws java.io.IOException
node
- the XML test container structureout
- outputstream where the card structure will be savedidTests
- test id
java.io.IOException
- if an I/O error occurs if an illegal argument is given if a
security error occurspublic static void buildMdbCard(XmlParser.Node node, java.io.OutputStream out, IdTest idTests) throws java.io.IOException
node
- the XML test container structureout
- outputstream where the card structure will be savedidTests
- test id relative to a card
java.io.IOException
- if an I/O error occurs if an illegal argument is given if a
security error occurspublic static XmlToMDB getTest(java.lang.String testName)
testName
- the name of the test corresponding to the found XML element name.
public static void buildMdbTargetable(XmlParser.Node node, java.io.OutputStream out, IdTest idTests) throws java.io.IOException
node
- the XML test container structureout
- outputstream where the test structure will be savedidTests
- the type of target, can be either IdTests.IS_PLAYER,
IdTests.IS_SPELL or IdTests.IS_ABILITY
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |