public abstract class JaxbCustomXmlDataStoragePart<E> extends JaxbXmlPart<E> implements CustomXmlPart
Modifier and Type | Field and Description |
---|---|
protected Document |
doc
This part's XML contents.
|
jaxbElement, jc, log, MAX_BYTES_Unmarshal_Error
contentType, partName, relationships
Constructor and Description |
---|
JaxbCustomXmlDataStoragePart(PartName partName) |
JaxbCustomXmlDataStoragePart(PartName partName,
JAXBContext jc) |
Modifier and Type | Method and Description |
---|---|
String |
cachedXPathGetString(String xpath,
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.
|
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(String xpath,
String value,
String prefixMappings) |
void |
setXML(Document xmlDocument)
Set the XML data
|
void |
updateJaxbElementFromDocument() |
List<Node> |
xpathGetNodes(String xpathString,
String prefixMappings) |
String |
xpathGetString(String xpathString,
String prefixMappings) |
addMcChoiceNamespace, getContents, getJAXBContext, getJaxbElement, getMcChoiceNamespaces, getMceIgnorable, getXML, isContentEqual, isUnmarshalled, marshal, marshal, marshal, marshal, pipe, pipe, pipe, setContents, setJAXBContext, setJaxbElement, setJaxbElement, setMceIgnorable, transform, unmarshal, unmarshal, variableReplace
getContentLengthAsLoaded, getOwningRelationshipPart, getPackage, getRelationshipType, getSourceRelationship, getSourceRelationships, getVersion, rename, setContentLengthAsLoaded, setOwningRelationshipPart, setPackage, setPartShortcut, setRelationshipType, setSourceRelationship, setVersion
addTargetPart, addTargetPart, addTargetPart, addTargetPart, getContentType, getPartName, getRelationshipsPart, getRelationshipsPart, getUserData, reset, setContentType, setPartName, setRelationships, setUserData
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getXML
protected Document doc
public JaxbCustomXmlDataStoragePart(PartName partName) throws InvalidFormatException
InvalidFormatException
public JaxbCustomXmlDataStoragePart(PartName partName, JAXBContext jc) throws InvalidFormatException
InvalidFormatException
public void init()
public void readyXPath()
public void updateJaxbElementFromDocument()
public String xpathGetString(String xpathString, String prefixMappings) throws Docx4JException
xpathGetString
in interface CustomXmlPart
Docx4JException
public String cachedXPathGetString(String xpath, String prefixMappings) throws Docx4JException
CustomXmlPart
cachedXPathGetString
in interface CustomXmlPart
Docx4JException
discardCacheXPathObject
public void discardCacheXPathObject()
CustomXmlPart
discardCacheXPathObject
in interface CustomXmlPart
public List<Node> xpathGetNodes(String xpathString, String prefixMappings) throws Docx4JException
xpathGetNodes
in interface CustomXmlPart
Docx4JException
public boolean setNodeValueAtXPath(String xpath, String value, String prefixMappings) throws Docx4JException
setNodeValueAtXPath
in interface CustomXmlPart
Docx4JException
public String getItemId()
getItemId
in interface CustomXmlPart
public void remove()
public void setXML(Document xmlDocument) throws Docx4JException
CustomXmlPart
setXML
in interface CustomXmlPart
Docx4JException
Copyright © 2007-2019. All Rights Reserved.