final class TorqueXmlParser
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private javax.xml.parsers.DocumentBuilder |
documentBuilder |
private static org.slf4j.Logger |
LOGGER |
Constructor and Description |
---|
TorqueXmlParser() |
Modifier and Type | Method and Description |
---|---|
protected org.w3c.dom.Document |
parseDocument(java.lang.String data) |
protected java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> |
parseJobInfos(java.lang.String data)
Parses job info from "qstat -x"
|
protected void |
recursiveMapFromElement(org.w3c.dom.Node root,
java.util.Map<java.lang.String,java.lang.String> result)
Create a Map from the tag names and text values of child nodes.
|
private static final org.slf4j.Logger LOGGER
private final javax.xml.parsers.DocumentBuilder documentBuilder
TorqueXmlParser() throws XenonException
XenonException
protected org.w3c.dom.Document parseDocument(java.lang.String data) throws XenonException
XenonException
protected void recursiveMapFromElement(org.w3c.dom.Node root, java.util.Map<java.lang.String,java.lang.String> result)
root
- XML element of which the children will be added to the mapresult
- a mutable map that will have added to it tag names as keys and text values as valuesjava.lang.IllegalArgumentException
- if root is not an XML elementprotected java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> parseJobInfos(java.lang.String data) throws XenonException
data
- the stream to get the xml data fromXenonException
- if the file could not be parsedXenonException
- if the server version is not compatible with this adaptor