|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.magicproject.xml.XmlTools
public final class XmlTools
| Field Summary | |
|---|---|
static java.util.Map<java.lang.String,java.lang.Integer> |
aliasMap
The definied user alias |
static boolean |
defaultOnMeTag
This field must be set by activated ability, triggered, and counters to known the default value for the 'on' attribute |
static boolean |
testCanBePreempted
This field must be set by actions needing some pre-check test such as target action. |
static java.util.Map<java.lang.String,java.lang.Integer> |
zones
The available zones. |
| Method Summary | |
|---|---|
static void |
clean()
Clean tables. |
static int |
getAliasValue(java.lang.String alias)
Return the corresponding code to the card color name |
static int |
getColor(java.lang.String colorName)
Return the corresponding code to the card color name |
static XmlParser.Node |
getExternalizableNode(XmlParser.Node node,
java.lang.String nodeName)
Return the named node from the given node. |
static int |
getIdCard(java.lang.String idCard)
Return the corresponding code to the card type name |
static int |
getIdCards(java.lang.String list)
Return the corresponding code to the list of card type name |
static int |
getInt(java.lang.String alias)
Return the corresponding code to the specified alias. |
static IdMessageBox |
getMessageType(java.lang.String attribute)
|
static int |
getModifierLayer(java.lang.String attribute)
|
static int |
getOperation(java.lang.String operation)
Return the operation code |
static Optimization |
getOptimization(java.lang.String attribute)
|
static java.lang.Integer |
getPosition(java.lang.String positionAlias)
Return the corresponding code to the specified position name. |
static Priority |
getPriority(java.lang.String resolution)
Return the resolution code |
static int |
getTargetMode(java.lang.String modeAlias)
Return the corresponding code to the specified target mode. |
static int |
getValue(java.lang.String alias)
Return the corresponding codeto the specified string register index. |
static int |
getZone(java.lang.String zoneAlias)
Return the corresponding code to the specified zone name. |
static void |
initHashMaps()
Fill the referenced HashMaps |
static void |
tryWriteExpression(XmlParser.Node node,
java.lang.String attribute,
java.io.OutputStream out)
If there is neither attribute neither node with the given name, '-1' is witten instead of throwing an exception. |
static void |
writeAttrOptions(XmlParser.Node node,
java.lang.String tagAttr,
java.io.OutputStream out)
|
static void |
writeAttrOptions(XmlParser.Node node,
java.lang.String tagAttr,
java.io.OutputStream out,
java.lang.String nameSpace)
|
static void |
writeAttrOptionsDefault(XmlParser.Node node,
java.lang.String tagAttr,
java.io.OutputStream out,
java.lang.String defaultValue)
|
static void |
writeComplexValue(java.io.OutputStream out,
XmlParser.Node expr)
|
static void |
writeConstant(java.io.OutputStream out,
int value)
Write to the specified output stream the 16bits integer value. |
static void |
writeList(java.io.OutputStream out,
XmlParser.Node node,
java.lang.String tagAttr)
Write to the specified output stream the values defined as linear list ' ' separated values, or 'value' elements. |
static void |
writeSimpleValue(java.io.OutputStream out,
java.lang.String value)
Write to the specified output stream the 16bits integer value. |
static void |
writeTestOn(java.io.OutputStream out,
java.lang.String xsdName)
Write the TestOn instance corresponding to the given XSD attribute name. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static java.util.Map<java.lang.String,java.lang.Integer> zones
net.sf.magicproject.xml.tbs.Tbs#buildMdb(Node, OutputStream)public static java.util.Map<java.lang.String,java.lang.Integer> aliasMap
public static boolean defaultOnMeTag
public static boolean testCanBePreempted
true, the last build test does not
refer to a ability's runtime register such as 'stack' register.
| Method Detail |
|---|
public static void tryWriteExpression(XmlParser.Node node,
java.lang.String attribute,
java.io.OutputStream out)
throws java.io.IOException
node - the parent node.attribute - the attribute/node name to write.out - the outputstream.
java.io.IOException - error while writting.public static void initHashMaps()
public static void clean()
public static void writeTestOn(java.io.OutputStream out,
java.lang.String xsdName)
throws java.io.IOException
out - the stream ths enum would be written.xsdName - the Xsd name of this TestOn.
java.io.IOException - error while writting.public static int getModifierLayer(java.lang.String attribute)
attribute - the layer name.
public static Optimization getOptimization(java.lang.String attribute)
attribute - the optimization name.
public static int getOperation(java.lang.String operation)
operation - the alias
ModifyRegisterpublic static Priority getPriority(java.lang.String resolution)
resolution - the alias
public static int getTargetMode(java.lang.String modeAlias)
modeAlias - the alias of mode
IdTargets.MODE_NAMESpublic static java.lang.Integer getPosition(java.lang.String positionAlias)
positionAlias - the alias of place
IdPositions.POSITION_NAMESpublic static int getZone(java.lang.String zoneAlias)
zoneAlias - the alias of place
IdZones.ZONE_NAMESpublic static int getValue(java.lang.String alias)
alias - the alias of value in it's string form
public static int getInt(java.lang.String alias)
alias - the alias of value in it's string form
public static int getAliasValue(java.lang.String alias)
alias - the alias name.
public static int getColor(java.lang.String colorName)
colorName - the color alias
public static int getIdCard(java.lang.String idCard)
idCard - the card type name
public static int getIdCards(java.lang.String list)
list - is the list of card type name
public static void writeList(java.io.OutputStream out,
XmlParser.Node node,
java.lang.String tagAttr)
throws java.io.IOException
out - outputstream where the card structure will be savednode - the XML test container structuretagAttr -
java.io.IOException - error while writting.
public static void writeSimpleValue(java.io.OutputStream out,
java.lang.String value)
throws java.io.IOException
out - outputstream where the card structure will be savedvalue - the simple value to write.
java.io.IOException - error while writting.
public static void writeConstant(java.io.OutputStream out,
int value)
throws java.io.IOException
out - outputstream where the card structure will be savedvalue - the simple value to write.
java.io.IOException - error while writting.
public static void writeComplexValue(java.io.OutputStream out,
XmlParser.Node expr)
throws java.io.IOException
out - outputstream where the card structure will be savedexpr - complex expression node to write
java.io.IOException - error while writting.
public static void writeAttrOptions(XmlParser.Node node,
java.lang.String tagAttr,
java.io.OutputStream out)
throws java.io.IOException
node - the XML test container structuretagAttr - out - outputstream where the card structure will be saved
java.io.IOException - error while writting.
public static void writeAttrOptionsDefault(XmlParser.Node node,
java.lang.String tagAttr,
java.io.OutputStream out,
java.lang.String defaultValue)
throws java.io.IOException
node - the XML test container structuretagAttr - out - outputstream where the card structure will be saveddefaultValue - the default value to use if neither attribute, neither element has
been found.
java.io.IOException - error while writting.
public static void writeAttrOptions(XmlParser.Node node,
java.lang.String tagAttr,
java.io.OutputStream out,
java.lang.String nameSpace)
throws java.io.IOException
node - tagAttr - out - nameSpace -
java.io.IOException - error while writting.public static IdMessageBox getMessageType(java.lang.String attribute)
attribute - the message name.
public static XmlParser.Node getExternalizableNode(XmlParser.Node node,
java.lang.String nodeName)
node - the parent node.nodeName - the node name.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||