Package org.docx4j.model.datastorage
Class OpenDoPEHandlerComponents
java.lang.Object
org.docx4j.model.datastorage.OpenDoPEHandlerComponents
Process OpenDoPE components.
From 6.1, components can be at any level in the
Main Document Part
content hierarchy where an SdtBlock is allowed.
From 6.1, components support the idea of an XPath
context: where an XPath is not absolute, it will be
interpreted relative to context. Context can be
provided explicitly (the id of an XPath in the XPaths
part). If not provided explicitly, we can read it
from an enclosing repeat. (We don't do that for
conditions right now, since they are a bit more tricky).
In 6.1, the section break handling is missing.
TODO: consider whether it is needed. May be useful
for top level components which add headers/footers?
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate classThis traversor finds components, taking note of their XPath context. -
Field Summary
FieldsModifier and TypeFieldDescriptionaltChunkRel.getId(), xpathIdprivate Componentsprivate static DocxFetcherprotected booleanprivate static org.slf4j.Loggerprivate WordprocessingMLPackageprivate Map<String,Xpaths.Xpath> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidComponent processingstatic DocxFetcherprivate PartNamegetNewPartName(String prefix, String suffix, RelationshipsPart rp) private QNamestatic voidsetDocxFetcher(DocxFetcher docxFetcher)
-
Field Details
-
log
private static org.slf4j.Logger log -
srcPackage
-
justGotAComponent
protected boolean justGotAComponent -
components
-
xpathsMap
-
conditionsMap
-
docxFetcher
-
altChunkXPathContexts
altChunkRel.getId(), xpathId
-
-
Constructor Details
-
OpenDoPEHandlerComponents
- Throws:
Docx4JException
-
-
Method Details
-
getDocxFetcher
-
setDocxFetcher
-
fetchComponents
Component processing- Parameters:
srcPackage-contentAccessor-- Returns:
- Throws:
Docx4JException
-
getQName
-
extensionMissing
-
getNewPartName
private PartName getNewPartName(String prefix, String suffix, RelationshipsPart rp) throws InvalidFormatException - Throws:
InvalidFormatException
-