Package org.docx4j.model.datastorage
Class OpenDoPEHandlerComponents.FindComponentsTraversor
java.lang.Object
org.docx4j.TraversalUtil.CallbackImpl
org.docx4j.model.datastorage.OpenDoPEHandlerComponents.FindComponentsTraversor
- All Implemented Interfaces:
TraversalUtil.Callback
- Enclosing class:
- OpenDoPEHandlerComponents
This traversor finds components, taking note of their XPath context.
For now, that's their immediate repeat ancestor.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate LinkedList<String>(package private) WordprocessingMLPackage -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionVisits a node in pre order (before its children have been visited).processBindingRoleIfAny(WordprocessingMLPackage wordMLPackage, Object sdt) This applies to any sdt which might be a conditional|repeatprocessOpenDopeComponent(WordprocessingMLPackage srcPackage, String componentId, String xpathId) Convert the component sdt to w:altChunkvoidwalkJAXBElements(Object parent) Methods inherited from class org.docx4j.TraversalUtil.CallbackImpl
getChildren, shouldTraverse
-
Field Details
-
wordMLPackage
WordprocessingMLPackage wordMLPackage -
repeatContext
-
-
Constructor Details
-
FindComponentsTraversor
private FindComponentsTraversor()
-
-
Method Details
-
apply
Description copied from class:TraversalUtil.CallbackImplVisits a node in pre order (before its children have been visited). A node is visited only if all its parents have been traversed (TraversalUtil.CallbackImpl.shouldTraverse(Object)).Implementations can have side effects.
- Specified by:
applyin interfaceTraversalUtil.Callback- Specified by:
applyin classTraversalUtil.CallbackImpl- Throws:
RuntimeException
-
walkJAXBElements
- Specified by:
walkJAXBElementsin interfaceTraversalUtil.Callback- Overrides:
walkJAXBElementsin classTraversalUtil.CallbackImpl
-
processBindingRoleIfAny
private List<Object> processBindingRoleIfAny(WordprocessingMLPackage wordMLPackage, Object sdt) throws Docx4JException This applies to any sdt which might be a conditional|repeat- Parameters:
wordMLPackage-sdtParent-sdt-tag-sdtContent-- Returns:
- Throws:
Docx4JExceptionException
-
processOpenDopeComponent
private List<Object> processOpenDopeComponent(WordprocessingMLPackage srcPackage, String componentId, String xpathId) throws Docx4JException Convert the component sdt to w:altChunk- Parameters:
srcPackage-componentId-xpathId- gives the context in which the component is to be used- Returns:
- Throws:
Docx4JException
-