public abstract class JaxbXmlPartXPathAware<E> extends JaxbXmlPart<E> implements XPathEnabled<E>
| Modifier and Type | Field and Description |
|---|---|
protected javax.xml.bind.Binder<org.w3c.dom.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.
|
javax.xml.bind.Binder<org.w3c.dom.Node> |
getBinder()
Enables synchronization between XML infoset nodes and JAXB objects
representing same XML document.
|
java.util.List<JAXBAssociation> |
getJAXBAssociationsForXPath(java.lang.Object someJaxbElement,
java.lang.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).
|
java.util.List<JAXBAssociation> |
getJAXBAssociationsForXPath(java.lang.String xpathExpr,
boolean refreshXmlFirst)
Fetch DOM node / JAXB object pairs matching an XPath (for example "//w:p").
|
java.util.List<java.lang.Object> |
getJAXBNodesViaXPath(java.lang.String xpathExpr,
boolean refreshXmlFirst)
Fetch JAXB Nodes matching an XPath (for example "//w:p").
|
java.util.List<java.lang.Object> |
getJAXBNodesViaXPath(java.lang.String xpathExpr,
java.lang.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(org.w3c.dom.Element el) |
E |
unmarshal(java.io.InputStream is)
Unmarshal XML data from the specified InputStream and return the
resulting content tree.
|
addMcChoiceNamespace, getConfiguredUnmarshaller, getContents, getJAXBContext, getJaxbElement, getMcChoiceNamespaces, getMceIgnorable, getXML, inputStreamToXSR, isContentEqual, isUnmarshalled, marshal, marshal, marshal, marshal, pipe, pipe, pipe, preprocess, setContents, setJAXBContext, setJaxbElement, setMceIgnorable, transform, transformToDom, 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, setUserDataprotected static org.slf4j.Logger log
protected javax.xml.bind.Binder<org.w3c.dom.Node> binder
public JaxbXmlPartXPathAware(PartName partName) throws InvalidFormatException
InvalidFormatExceptionpublic javax.xml.bind.Binder<org.w3c.dom.Node> getBinder()
getBinder in interface XPathEnabled<E>public void setJaxbElement(E jaxbElement)
setJaxbElement in class JaxbXmlPart<E>public E createBinderAndJaxbElement(E source) throws javax.xml.bind.JAXBException
createBinderAndJaxbElement in interface XPathEnabled<E>source - javax.xml.bind.JAXBExceptionpublic java.util.List<java.lang.Object> getJAXBNodesViaXPath(java.lang.String xpathExpr,
boolean refreshXmlFirst)
throws javax.xml.bind.JAXBException,
XPathBinderAssociationIsPartialException
getJAXBNodesViaXPath in interface XPathEnabled<E>xpathExpr - refreshXmlFirst - javax.xml.bind.JAXBExceptionXPathBinderAssociationIsPartialExceptionpublic java.util.List<java.lang.Object> getJAXBNodesViaXPath(java.lang.String xpathExpr,
java.lang.Object someJaxbElement,
boolean refreshXmlFirst)
throws javax.xml.bind.JAXBException,
XPathBinderAssociationIsPartialException
getJAXBNodesViaXPath in interface XPathEnabled<E>xpathExpr - someJaxbElement - refreshXmlFirst - javax.xml.bind.JAXBExceptionXPathBinderAssociationIsPartialExceptionpublic java.util.List<JAXBAssociation> getJAXBAssociationsForXPath(java.lang.String xpathExpr, boolean refreshXmlFirst) throws javax.xml.bind.JAXBException, XPathBinderAssociationIsPartialException
getJAXBAssociationsForXPath in interface XPathEnabled<E>binder - jaxbElement - xpathExpr - refreshXmlFirst - javax.xml.bind.JAXBExceptionXPathBinderAssociationIsPartialExceptionpublic java.util.List<JAXBAssociation> getJAXBAssociationsForXPath(java.lang.Object someJaxbElement, java.lang.String xpathExpr, boolean refreshXmlFirst) throws javax.xml.bind.JAXBException, XPathBinderAssociationIsPartialException
getJAXBAssociationsForXPath in interface XPathEnabled<E>binder - jaxbElement - xpathExpr - refreshXmlFirst - javax.xml.bind.JAXBExceptionXPathBinderAssociationIsPartialExceptionpublic E unmarshal(java.io.InputStream is) throws javax.xml.bind.JAXBException
Implements Unmarshal Global Root Element.
unmarshal in class JaxbXmlPart<E>is - the InputStream to unmarshal XML data fromjavax.xml.bind.JAXBException - If any unexpected errors occur while unmarshallingpublic E unmarshal(org.w3c.dom.Element el) throws javax.xml.bind.JAXBException
unmarshal in class JaxbXmlPart<E>javax.xml.bind.JAXBExceptionCopyright © 2007–2023. All rights reserved.