Package org.docx4j.openpackaging.parts
Class JaxbXmlPartAltChunkHost<E>
java.lang.Object
org.docx4j.openpackaging.Base
org.docx4j.openpackaging.parts.Part
org.docx4j.openpackaging.parts.JaxbXmlPart<E>
org.docx4j.openpackaging.parts.JaxbXmlPartXPathAware<E>
org.docx4j.openpackaging.parts.JaxbXmlPartAltChunkHost<E>
- All Implemented Interfaces:
AltChunkInterface,XPathEnabled<E>
- Direct Known Subclasses:
DocumentPart,FooterPart,HeaderPart
public abstract class JaxbXmlPartAltChunkHost<E>
extends JaxbXmlPartXPathAware<E>
implements AltChunkInterface
- Since:
- 3.0.0
- Author:
- jharrop
-
Field Summary
FieldsFields inherited from class org.docx4j.openpackaging.parts.JaxbXmlPartXPathAware
binderFields inherited from class org.docx4j.openpackaging.parts.JaxbXmlPart
jaxbElement, jc, MAX_BYTES_Unmarshal_ErrorFields inherited from class org.docx4j.openpackaging.Base
contentType, partName, relationships -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAltChunk(AltChunkType type, byte[] bytes) Add content from byte array of type AltChunkType, in a way that leaves it up to downstream application (eg Word) to convert the content to docx content.addAltChunk(AltChunkType type, byte[] bytes, int index) Add at index content from byte array of type AltChunkType, in a way that leaves it up to downstream application (eg Word) to convert the content to docx content.addAltChunk(AltChunkType type, byte[] bytes, ContentAccessor attachmentPoint) Add content from byte array of type AltChunkType, in a way that leaves it up to downstream application (eg Word) to convert the content to docx content.addAltChunk(AltChunkType type, byte[] bytes, ContentAccessor attachmentPoint, int index) Add at index content from byte array of type AltChunkType, in a way that leaves it up to downstream application (eg Word) to convert the content to docx content.addAltChunk(AltChunkType type, InputStream is) Add content from InputStream of type AltChunkType, in a way that leaves it up to downstream application (eg Word) to convert the content to docx content.addAltChunk(AltChunkType type, InputStream is, int index) Add at index content from InputStream of type AltChunkType, in a way that leaves it up to downstream application (eg Word) to convert the content to docx content.addAltChunk(AltChunkType type, InputStream is, ContentAccessor attachmentPoint) Add content from InputStream of type AltChunkType, in a way that leaves it up to downstream application (eg Word) to convert the content to docx content.addAltChunk(AltChunkType type, InputStream is, ContentAccessor attachmentPoint, int index) Add at index content from InputStream of type AltChunkType, in a way that leaves it up to downstream application (eg Word) to convert the content to docx content.voidConvert altChunks in this part to ordinary docx WordML content.Methods inherited from class org.docx4j.openpackaging.parts.JaxbXmlPartXPathAware
createBinderAndJaxbElement, getBinder, getJAXBAssociationsForXPath, getJAXBAssociationsForXPath, getJAXBNodesViaXPath, getJAXBNodesViaXPath, setJaxbElement, unmarshal, unmarshalMethods inherited from class org.docx4j.openpackaging.parts.JaxbXmlPart
addMcChoiceNamespace, getConfiguredUnmarshaller, getContents, getJAXBContext, getJaxbElement, getMcChoiceNamespaces, getMceIgnorable, getXML, getXMLStreamReader, inputStreamToXSR, isContentEqual, isUnmarshalled, marshal, marshal, marshal, marshal, pipe, pipe, pipe, preprocess, replacePartContent, setContents, setJAXBContext, setJaxbElement, setMceIgnorable, transform, transformToDom, variableReplaceMethods inherited from class org.docx4j.openpackaging.parts.Part
getContentLengthAsLoaded, getOwningRelationshipPart, getPackage, getRelationshipType, getSourceRelationship, getSourceRelationships, getVersion, remove, rename, setContentLengthAsLoaded, setOwningRelationshipPart, setPackage, setPartShortcut, setRelationshipType, setSourceRelationship, setVersionMethods inherited from class org.docx4j.openpackaging.Base
addTargetPart, addTargetPart, addTargetPart, addTargetPart, getContentType, getPartName, getRelationshipsPart, getRelationshipsPart, getUserData, reset, setContentType, setPartName, setRelationships, setUserData
-
Field Details
-
log
protected static org.slf4j.Logger log
-
-
Constructor Details
-
JaxbXmlPartAltChunkHost
- Throws:
InvalidFormatException
-
-
Method Details
-
addAltChunk
public AlternativeFormatInputPart addAltChunk(AltChunkType type, byte[] bytes) throws Docx4JException Description copied from interface:AltChunkInterfaceAdd content from byte array of type AltChunkType, in a way that leaves it up to downstream application (eg Word) to convert the content to docx content. Note re XHTML content: Unless you really want it converted by Word, users are advised to use docx4j's XHTMLImporter instead.- Specified by:
addAltChunkin interfaceAltChunkInterface- Returns:
- Throws:
Docx4JException
-
addAltChunk
public AlternativeFormatInputPart addAltChunk(AltChunkType type, byte[] bytes, int index) throws Docx4JException Description copied from interface:AltChunkInterfaceAdd at index content from byte array of type AltChunkType, in a way that leaves it up to downstream application (eg Word) to convert the content to docx content. Note re XHTML content: Unless you really want it converted by Word, users are advised to use docx4j's XHTMLImporter instead.- Specified by:
addAltChunkin interfaceAltChunkInterface- Returns:
- Throws:
Docx4JException
-
addAltChunk
public AlternativeFormatInputPart addAltChunk(AltChunkType type, InputStream is) throws Docx4JException Description copied from interface:AltChunkInterfaceAdd content from InputStream of type AltChunkType, in a way that leaves it up to downstream application (eg Word) to convert the content to docx content. Note re XHTML content: Unless you really want it converted by Word, users are advised to use docx4j's XHTMLImporter instead.- Specified by:
addAltChunkin interfaceAltChunkInterface- Returns:
- Throws:
Docx4JException
-
addAltChunk
public AlternativeFormatInputPart addAltChunk(AltChunkType type, InputStream is, int index) throws Docx4JException Description copied from interface:AltChunkInterfaceAdd at index content from InputStream of type AltChunkType, in a way that leaves it up to downstream application (eg Word) to convert the content to docx content. Note re XHTML content: Unless you really want it converted by Word, users are advised to use docx4j's XHTMLImporter instead.- Specified by:
addAltChunkin interfaceAltChunkInterface- Returns:
- Throws:
Docx4JException
-
addAltChunk
public AlternativeFormatInputPart addAltChunk(AltChunkType type, byte[] bytes, ContentAccessor attachmentPoint) throws Docx4JException Description copied from interface:AltChunkInterfaceAdd content from byte array of type AltChunkType, in a way that leaves it up to downstream application (eg Word) to convert the content to docx content. Note re XHTML content: Unless you really want it converted by Word, users are advised to use docx4j's XHTMLImporter instead.- Specified by:
addAltChunkin interfaceAltChunkInterface- Returns:
- Throws:
Docx4JException
-
addAltChunk
public AlternativeFormatInputPart addAltChunk(AltChunkType type, byte[] bytes, ContentAccessor attachmentPoint, int index) throws Docx4JException Description copied from interface:AltChunkInterfaceAdd at index content from byte array of type AltChunkType, in a way that leaves it up to downstream application (eg Word) to convert the content to docx content. Note re XHTML content: Unless you really want it converted by Word, users are advised to use docx4j's XHTMLImporter instead.- Specified by:
addAltChunkin interfaceAltChunkInterface- Returns:
- Throws:
Docx4JException
-
addAltChunk
public AlternativeFormatInputPart addAltChunk(AltChunkType type, InputStream is, ContentAccessor attachmentPoint) throws Docx4JException Description copied from interface:AltChunkInterfaceAdd content from InputStream of type AltChunkType, in a way that leaves it up to downstream application (eg Word) to convert the content to docx content. Note re XHTML content: Unless you really want it converted by Word, users are advised to use docx4j's XHTMLImporter instead.- Specified by:
addAltChunkin interfaceAltChunkInterface- Returns:
- Throws:
Docx4JException
-
addAltChunk
public AlternativeFormatInputPart addAltChunk(AltChunkType type, InputStream is, ContentAccessor attachmentPoint, int index) throws Docx4JException Description copied from interface:AltChunkInterfaceAdd at index content from InputStream of type AltChunkType, in a way that leaves it up to downstream application (eg Word) to convert the content to docx content. Note re XHTML content: Unless you really want it converted by Word, users are advised to use docx4j's XHTMLImporter instead.- Specified by:
addAltChunkin interfaceAltChunkInterface- Returns:
- Throws:
Docx4JException
-
convertAltChunks
Description copied from interface:AltChunkInterfaceConvert altChunks in this part to ordinary docx WordML content. To convert an altChunk of type XHTML, this method requires docx4j-XHTMLImport.jar (LGPL) and its dependencies. Since 11.4.8, this method does the conversion in situ (ie rather than cloning the pkg), and does not convert docx altChunks. To handle those, use the MergeDocx component of Docx4j Enterprise.- Specified by:
convertAltChunksin interfaceAltChunkInterface- Throws:
Docx4JException
-