|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.proactive.benchmarks.timit.util.XMLHelper
public class XMLHelper
An helper class for reading and writing XML files
Constructor Summary | |
---|---|
XMLHelper()
|
Method Summary | |
---|---|
static java.io.File |
createFileWithDirs(java.lang.String filename)
|
static void |
errorLog(java.lang.String filename,
java.lang.String message)
This method allow to append a message to an error file |
static void |
generateDescriptor(java.lang.String inFilename,
java.util.HashMap<java.lang.String,java.lang.String> gvars,
java.util.HashMap<java.lang.String,java.lang.String> lvars,
java.lang.String outFilename)
Generate a ProActive descriptor file thanks to a pad base file. |
static void |
printOut(org.jdom.Document doc)
Print document on stdout. |
static org.jdom.Document |
readFile(java.lang.String filename)
Get XML Document thanks to its filename |
static void |
replaceAll(org.jdom.Element elt,
java.lang.String old,
java.lang.String value)
Replace all occurences of old by value in all attributes of elt |
static void |
replaceVariables(java.util.List serieList,
java.util.HashMap<java.lang.String,java.lang.String> vars)
Replace all variable occurences in serie's list by their value in vars |
static void |
tagFiltering(org.jdom.Element eTag,
java.lang.String[] values)
Filter elements from value of name attribute Remove all elements which are not in values. |
static void |
writeFile(org.jdom.Document document,
java.lang.String filename)
Save document into XML file |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XMLHelper()
Method Detail |
---|
public static org.jdom.Document readFile(java.lang.String filename)
filename
- the XML file name
public static void writeFile(org.jdom.Document document, java.lang.String filename)
document
- the Document to savefilename
- the XML file name to savepublic static java.io.File createFileWithDirs(java.lang.String filename)
public static void errorLog(java.lang.String filename, java.lang.String message)
filename
- the error file to writemessage
- the message to append to filepublic static void generateDescriptor(java.lang.String inFilename, java.util.HashMap<java.lang.String,java.lang.String> gvars, java.util.HashMap<java.lang.String,java.lang.String> lvars, java.lang.String outFilename)
inFilename
- the ProActive descriptor base filegvars
- the global variableslvars
- the local variablesoutFilename
- the generated pad file namepublic static void replaceAll(org.jdom.Element elt, java.lang.String old, java.lang.String value)
elt
- the Element to parseold
- the old value to replacevalue
- the new valuepublic static void replaceVariables(java.util.List serieList, java.util.HashMap<java.lang.String,java.lang.String> vars)
serieList
- the list of series to parsevars
- the variables to setpublic static void tagFiltering(org.jdom.Element eTag, java.lang.String[] values)
timit
- the Element to modifyvalues
- names to acceptpublic static void printOut(org.jdom.Document doc)
doc
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |