public abstract class JaxbCustomXmlDataStoragePart<E> extends JaxbXmlPart<E> implements CustomXmlPart
| Modifier and Type | Field and Description |
|---|---|
protected org.w3c.dom.Document |
doc
This part's XML contents.
|
jaxbElement, jc, log, MAX_BYTES_Unmarshal_ErrorcontentType, partName, relationships| Constructor and Description |
|---|
JaxbCustomXmlDataStoragePart(PartName partName) |
JaxbCustomXmlDataStoragePart(PartName partName,
javax.xml.bind.JAXBContext jc) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
cachedXPathGetString(java.lang.String xpath,
java.lang.String prefixMappings)
Use org.apache.xpath.CachedXPathAPI, since this is much quicker than default javax.xml.xpath.XPath implementations
(Apache's anyway) for large XML files.
|
void |
discardCacheXPathObject()
Use this to null out the org.apache.xpath.CachedXPathAPI object, which you should do
if you've changed your source document, or want to reclaim memory.
|
java.lang.String |
getItemId() |
void |
init() |
void |
readyXPath()
XPaths are evaluated against a DOM document representation
of the JAXBElement.
|
void |
remove()
Remove this part from the pkg.
|
boolean |
setNodeValueAtXPath(java.lang.String xpath,
java.lang.String value,
java.lang.String prefixMappings) |
void |
setXML(org.w3c.dom.Document xmlDocument)
Set the XML data
|
void |
updateJaxbElementFromDocument() |
java.util.List<org.w3c.dom.Node> |
xpathGetNodes(java.lang.String xpathString,
java.lang.String prefixMappings) |
java.lang.String |
xpathGetString(java.lang.String xpathString,
java.lang.String prefixMappings) |
addMcChoiceNamespace, getConfiguredUnmarshaller, getContents, getJAXBContext, getJaxbElement, getMcChoiceNamespaces, getMceIgnorable, getXML, inputStreamToXSR, isContentEqual, isUnmarshalled, marshal, marshal, marshal, marshal, pipe, pipe, pipe, preprocess, setContents, setJAXBContext, setJaxbElement, setJaxbElement, setMceIgnorable, transform, transformToDom, unmarshal, unmarshal, variableReplacegetContentLengthAsLoaded, getOwningRelationshipPart, getPackage, getRelationshipType, getSourceRelationship, getSourceRelationships, getVersion, rename, setContentLengthAsLoaded, setOwningRelationshipPart, setPackage, setPartShortcut, setRelationshipType, setSourceRelationship, setVersionaddTargetPart, addTargetPart, addTargetPart, addTargetPart, getContentType, getPartName, getRelationshipsPart, getRelationshipsPart, getUserData, reset, setContentType, setPartName, setRelationships, setUserDataclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetXMLprotected org.w3c.dom.Document doc
public JaxbCustomXmlDataStoragePart(PartName partName) throws InvalidFormatException
InvalidFormatExceptionpublic JaxbCustomXmlDataStoragePart(PartName partName, javax.xml.bind.JAXBContext jc) throws InvalidFormatException
InvalidFormatExceptionpublic void init()
public void readyXPath()
public void updateJaxbElementFromDocument()
public java.lang.String xpathGetString(java.lang.String xpathString,
java.lang.String prefixMappings)
throws Docx4JException
xpathGetString in interface CustomXmlPartDocx4JExceptionpublic java.lang.String cachedXPathGetString(java.lang.String xpath,
java.lang.String prefixMappings)
throws Docx4JException
CustomXmlPartcachedXPathGetString in interface CustomXmlPartDocx4JExceptiondiscardCacheXPathObjectpublic void discardCacheXPathObject()
CustomXmlPartdiscardCacheXPathObject in interface CustomXmlPartpublic java.util.List<org.w3c.dom.Node> xpathGetNodes(java.lang.String xpathString,
java.lang.String prefixMappings)
throws Docx4JException
xpathGetNodes in interface CustomXmlPartDocx4JExceptionpublic boolean setNodeValueAtXPath(java.lang.String xpath,
java.lang.String value,
java.lang.String prefixMappings)
throws Docx4JException
setNodeValueAtXPath in interface CustomXmlPartDocx4JExceptionpublic java.lang.String getItemId()
getItemId in interface CustomXmlPartpublic void remove()
public void setXML(org.w3c.dom.Document xmlDocument)
throws Docx4JException
CustomXmlPartsetXML in interface CustomXmlPartDocx4JExceptionCopyright © 2007–2023. All rights reserved.