T - Entity type.public class JAXBNavigator<T> extends 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(String prefix,
String namespaceUri)
Adds a namespace to the xpath.
|
Double |
evaluateDouble(String xPathExpression)
Evaluates an XPath expression and returns an Double value as result.
|
Integer |
evaluateInt(String xPathExpression)
Evaluates an XPath expression and returns an Integer value as result.
|
Object |
evaluateNode(String xPathExpression)
Evaluates an XPath expression and returns the Object.
|
Object[] |
evaluateNodeList(String xPathExpression)
Evaluates an XPath expression.
|
String |
evaluateString(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 JAXBException, ParserConfigurationException
jaxbObj - The jaxb object to be bound.JAXBException - If binding fails.ParserConfigurationException - If binding fails.public final Integer evaluateInt(String xPathExpression) throws XPathExpressionException
xPathExpression - The expression to evaluate.XPathExpressionException - If an error occurs in the XPath expression.public final Double evaluateDouble(String xPathExpression) throws XPathExpressionException
xPathExpression - The expression to evaluate.XPathExpressionException - If an error occurs in the XPath expression.public final String evaluateString(String xPathExpression) throws XPathExpressionException
xPathExpression - The expression to evaluate.XPathExpressionException - If an error occurs in the XPath expression.public final Object evaluateNode(String xPathExpression) throws XPathExpressionException
xPathExpression - The expression to evaluate.XPathExpressionException - If an error occurs in the XPath expression.public final Object[] evaluateNodeList(String xPathExpression) throws XPathExpressionException
xPathExpression - The expression to evaluate.XPathExpressionException - If an error occurs in the XPath expression.public final JAXBNavigator<T> addNamespace(String prefix, String namespaceUri)
prefix - Namespace prefix.namespaceUri - URI of the namespace.public final T getRoot()
public final JAXBNavigator<T> sync() throws JAXBException, ParserConfigurationException
JAXBException - If any unexpected problem occurs during the marshalling.ParserConfigurationException - If creating a W3C document fails.Copyright © 2016. All rights reserved.