|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectgenDevs.devsBridge.XMLHelper
public class XMLHelper
| Field Summary | |
|---|---|
protected static javax.xml.parsers.DocumentBuilder |
docBuilder
|
static javax.xml.transform.dom.DOMSource |
domSource
|
static javax.xml.transform.stream.StreamResult |
streamResult
|
static javax.xml.transform.Transformer |
transformer
|
protected static javax.xml.xpath.XPath |
xPath
|
| Constructor Summary | |
|---|---|
XMLHelper()
|
|
| Method Summary | |
|---|---|
static void |
applyModelInit(DOMInitModelOperations model,
org.w3c.dom.Node node,
java.lang.String path,
java.lang.String scenario)
Applies the given scenario and inherited scenario xml descriptions to a model. |
static void |
applyModelParameters(DOMInitModelOperations model,
org.w3c.dom.Node node,
java.lang.String path,
java.lang.String scenario)
Applies the given scenario and inherited scenario xml descriptions to a model. |
static org.w3c.dom.Document |
buildDocument(java.lang.String xml)
Builds a document from given xml Fragment. |
static double |
evalXPathDouble(java.lang.Object docOrNode,
java.lang.String expr)
Extracts the double-Value from Document for given expression. |
static org.w3c.dom.Node |
evalXPathNode(java.lang.Object docOrNode,
java.lang.String expr)
Extracts the Node from Document for given expression. |
static java.lang.String |
evalXPathString(java.lang.Object docOrNode,
java.lang.String expr)
Extracts the String-Value from Document for given expression. |
static void |
main(java.lang.String[] args)
|
static java.lang.String |
serializeChildren(org.w3c.dom.Node node)
Represents the child-Nodes of given nodes as xml-String. |
static void |
serializeChildren(org.w3c.dom.Node node,
java.io.Writer writer)
|
static java.lang.String |
serializeNode(org.w3c.dom.Node node)
Represents the child-Nodes of given nodes as xml-String. |
static void |
serializeNode(org.w3c.dom.Node node,
java.io.Writer writer)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static javax.xml.parsers.DocumentBuilder docBuilder
protected static javax.xml.xpath.XPath xPath
public static javax.xml.transform.dom.DOMSource domSource
public static javax.xml.transform.stream.StreamResult streamResult
public static javax.xml.transform.Transformer transformer
| Constructor Detail |
|---|
public XMLHelper()
| Method Detail |
|---|
public static void main(java.lang.String[] args)
args -
public static org.w3c.dom.Document buildDocument(java.lang.String xml)
throws java.lang.Exception
xml - String
java.lang.Exception - if parsing the document failed
public static double evalXPathDouble(java.lang.Object docOrNode,
java.lang.String expr)
throws javax.xml.xpath.XPathExpressionException
docOrNode - Document or Node to extract value fromexpr - the XPath expression
XPathExpressionException, - if expression is wrong or was not found
javax.xml.xpath.XPathExpressionException
public static java.lang.String evalXPathString(java.lang.Object docOrNode,
java.lang.String expr)
throws javax.xml.xpath.XPathExpressionException
docOrNode - Document or Node to extract value fromexpr - the XPath expression
XPathExpressionException, - if expression is wrong or was not found
javax.xml.xpath.XPathExpressionException
public static org.w3c.dom.Node evalXPathNode(java.lang.Object docOrNode,
java.lang.String expr)
throws javax.xml.xpath.XPathExpressionException
docOrNode - Document or Node to extract value fromexpr - the XPath expression
XPathExpressionException, - if expression is wrong or was not found
javax.xml.xpath.XPathExpressionException
public static java.lang.String serializeNode(org.w3c.dom.Node node)
throws javax.xml.transform.TransformerConfigurationException,
javax.xml.transform.TransformerException
node - the node to serialize.
javax.xml.transform.TransformerConfigurationException
javax.xml.transform.TransformerException
public static java.lang.String serializeChildren(org.w3c.dom.Node node)
throws javax.xml.transform.TransformerConfigurationException,
javax.xml.transform.TransformerException
node - the node to serialize.
javax.xml.transform.TransformerConfigurationException
javax.xml.transform.TransformerException
public static void serializeChildren(org.w3c.dom.Node node,
java.io.Writer writer)
throws javax.xml.transform.TransformerConfigurationException,
javax.xml.transform.TransformerException
javax.xml.transform.TransformerConfigurationException
javax.xml.transform.TransformerException
public static void serializeNode(org.w3c.dom.Node node,
java.io.Writer writer)
throws javax.xml.transform.TransformerConfigurationException,
javax.xml.transform.TransformerException
javax.xml.transform.TransformerConfigurationException
javax.xml.transform.TransformerException
public static void applyModelParameters(DOMInitModelOperations model,
org.w3c.dom.Node node,
java.lang.String path,
java.lang.String scenario)
throws devsBridge.DevsCorbaException
model - The model, thats parameters to be set.node - The DOM-representation of the parameters.path - The XPath to the descendants holding the different scenariosscenario - The value of the scenario-Attribute to select among the different descendants (empty to just get the first)
devsBridge.DevsCorbaException
public static void applyModelInit(DOMInitModelOperations model,
org.w3c.dom.Node node,
java.lang.String path,
java.lang.String scenario)
throws devsBridge.DevsCorbaException
model - The model, thats state is to be initialized.node - The DOM-representation of the State description.path - The XPath to the descendants holding the different scenariosscenario - The value of the scenario-Attribute to select among the different descendants (empty to just get the first)
devsBridge.DevsCorbaException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||