T - Entity type.public class JAXBNavigator<T>
extends java.lang.Object
| Constructor and Description |
|---|
JAXBNavigator(T jaxbObj)
Constructor performing the setup for simplifying XPath handling using any JAXB object.
|
| Modifier and Type | Method and Description |
|---|---|
JAXBNavigator<T> |
addNamespace(java.lang.String prefix,
java.lang.String namespaceUri)
Adds a namespace to the xpath.
|
java.lang.Double |
evaluateDouble(java.lang.String xPathExpression)
Evaluates an XPath expression and returns an Double value as result.
|
java.lang.Integer |
evaluateInt(java.lang.String xPathExpression)
Evaluates an XPath expression and returns an Integer value as result.
|
java.lang.Object |
evaluateNode(java.lang.String xPathExpression)
Evaluates an XPath expression and returns the Object.
|
java.lang.Object[] |
evaluateNodeList(java.lang.String xPathExpression)
Evaluates an XPath expression.
|
java.lang.String |
evaluateString(java.lang.String xPathExpression)
Evaluates an XPath expression and returns an String value as result.
|
T |
getRoot()
Get the JAXB object.
|
JAXBNavigator<T> |
sync()
Sync changes made on the object graph.
|
public JAXBNavigator(T jaxbObj) throws javax.xml.bind.JAXBException, javax.xml.parsers.ParserConfigurationException
jaxbObj - The jaxb object to be bound.javax.xml.bind.JAXBException - If binding fails.javax.xml.parsers.ParserConfigurationException - If binding fails.public final java.lang.Integer evaluateInt(java.lang.String xPathExpression)
throws javax.xml.xpath.XPathExpressionException
xPathExpression - The expression to evaluate.javax.xml.xpath.XPathExpressionException - If an error occurs in the XPath expression.public final java.lang.Double evaluateDouble(java.lang.String xPathExpression)
throws javax.xml.xpath.XPathExpressionException
xPathExpression - The expression to evaluate.javax.xml.xpath.XPathExpressionException - If an error occurs in the XPath expression.public final java.lang.String evaluateString(java.lang.String xPathExpression)
throws javax.xml.xpath.XPathExpressionException
xPathExpression - The expression to evaluate.javax.xml.xpath.XPathExpressionException - If an error occurs in the XPath expression.public final java.lang.Object evaluateNode(java.lang.String xPathExpression)
throws javax.xml.xpath.XPathExpressionException
xPathExpression - The expression to evaluate.javax.xml.xpath.XPathExpressionException - If an error occurs in the XPath expression.public final java.lang.Object[] evaluateNodeList(java.lang.String xPathExpression)
throws javax.xml.xpath.XPathExpressionException
xPathExpression - The expression to evaluate.javax.xml.xpath.XPathExpressionException - If an error occurs in the XPath expression.public final JAXBNavigator<T> addNamespace(java.lang.String prefix, java.lang.String namespaceUri)
prefix - Namespace prefix.namespaceUri - URI of the namespace.public final T getRoot()
public final JAXBNavigator<T> sync() throws javax.xml.bind.JAXBException, javax.xml.parsers.ParserConfigurationException
javax.xml.bind.JAXBException - If any unexpected problem occurs during the marshalling.javax.xml.parsers.ParserConfigurationException - If creating a W3C document fails.