public abstract class JaxbXmlPartXPathAware<E> extends JaxbXmlPart<E> implements XPathEnabled<E>
| Modifier and Type | Field and Description |
|---|---|
protected Binder<Node> |
binder |
protected static org.slf4j.Logger |
log |
jaxbElement, jc, MAX_BYTES_Unmarshal_ErrorcontentType, partName, relationships| Constructor and Description |
|---|
JaxbXmlPartXPathAware(PartName partName) |
| Modifier and Type | Method and Description |
|---|---|
E |
createBinderAndJaxbElement(E source)
Set the JAXBElement for this part, and a corresponding
binder, based on the object provided.
|
Binder<Node> |
getBinder()
Enables synchronization between XML infoset nodes and JAXB objects
representing same XML document.
|
List<JAXBAssociation> |
getJAXBAssociationsForXPath(Object someJaxbElement,
String xpathExpr,
boolean refreshXmlFirst)
Fetch DOM node / JAXB object pairs matching an XPath (for example ".//w:p" - note the dot,
which is necessary for this sort of relative path).
|
List<JAXBAssociation> |
getJAXBAssociationsForXPath(String xpathExpr,
boolean refreshXmlFirst)
Fetch DOM node / JAXB object pairs matching an XPath (for example "//w:p").
|
List<Object> |
getJAXBNodesViaXPath(String xpathExpr,
boolean refreshXmlFirst)
Fetch JAXB Nodes matching an XPath (for example "//w:p").
|
List<Object> |
getJAXBNodesViaXPath(String xpathExpr,
Object someJaxbElement,
boolean refreshXmlFirst)
Fetch JAXB Nodes matching an XPath (for example ".//w:p" - note the dot,
which is necessary for this sort of relative path).
|
void |
setJaxbElement(E jaxbElement)
You can't use this override to create/update a binder, since this would set the
jaxbElement field to something different to the object being passed in
(as a consequence of the process to create a binder).
|
E |
unmarshal(Element el) |
E |
unmarshal(InputStream is)
Unmarshal XML data from the specified InputStream and return the
resulting content tree.
|
addMcChoiceNamespace, getContents, getJAXBContext, getJaxbElement, getMcChoiceNamespaces, getMceIgnorable, getXML, isContentEqual, isUnmarshalled, marshal, marshal, marshal, marshal, pipe, pipe, pipe, setContents, setJAXBContext, setJaxbElement, setMceIgnorable, transform, variableReplacegetContentLengthAsLoaded, getOwningRelationshipPart, getPackage, getRelationshipType, getSourceRelationship, getSourceRelationships, getVersion, remove, rename, setContentLengthAsLoaded, setOwningRelationshipPart, setPackage, setPartShortcut, setRelationshipType, setSourceRelationship, setVersionaddTargetPart, addTargetPart, addTargetPart, addTargetPart, getContentType, getPartName, getRelationshipsPart, getRelationshipsPart, getUserData, reset, setContentType, setPartName, setRelationships, setUserDatapublic JaxbXmlPartXPathAware(PartName partName) throws InvalidFormatException
InvalidFormatExceptionpublic Binder<Node> getBinder()
getBinder in interface XPathEnabled<E>public void setJaxbElement(E jaxbElement)
setJaxbElement in class JaxbXmlPart<E>public E createBinderAndJaxbElement(E source) throws JAXBException
createBinderAndJaxbElement in interface XPathEnabled<E>source - JAXBExceptionpublic List<Object> getJAXBNodesViaXPath(String xpathExpr, boolean refreshXmlFirst) throws JAXBException, XPathBinderAssociationIsPartialException
getJAXBNodesViaXPath in interface XPathEnabled<E>xpathExpr - refreshXmlFirst - JAXBExceptionXPathBinderAssociationIsPartialExceptionpublic List<Object> getJAXBNodesViaXPath(String xpathExpr, Object someJaxbElement, boolean refreshXmlFirst) throws JAXBException, XPathBinderAssociationIsPartialException
getJAXBNodesViaXPath in interface XPathEnabled<E>xpathExpr - someJaxbElement - refreshXmlFirst - JAXBExceptionXPathBinderAssociationIsPartialExceptionpublic List<JAXBAssociation> getJAXBAssociationsForXPath(String xpathExpr, boolean refreshXmlFirst) throws JAXBException, XPathBinderAssociationIsPartialException
getJAXBAssociationsForXPath in interface XPathEnabled<E>binder - jaxbElement - xpathExpr - refreshXmlFirst - JAXBExceptionXPathBinderAssociationIsPartialExceptionpublic List<JAXBAssociation> getJAXBAssociationsForXPath(Object someJaxbElement, String xpathExpr, boolean refreshXmlFirst) throws JAXBException, XPathBinderAssociationIsPartialException
getJAXBAssociationsForXPath in interface XPathEnabled<E>binder - jaxbElement - xpathExpr - refreshXmlFirst - JAXBExceptionXPathBinderAssociationIsPartialExceptionpublic E unmarshal(InputStream is) throws JAXBException
Implements Unmarshal Global Root Element.
unmarshal in class JaxbXmlPart<E>is - the InputStream to unmarshal XML data fromJAXBException - If any unexpected errors occur while unmarshallingpublic E unmarshal(Element el) throws JAXBException
unmarshal in class JaxbXmlPart<E>JAXBExceptionCopyright © 2007-2020. All Rights Reserved.