Package org.docx4j.convert.out.common
Class AbstractVisitorExporterGenerator<CC extends AbstractWmlConversionContext>
java.lang.Object
org.docx4j.TraversalUtil.CallbackImpl
org.docx4j.convert.out.common.AbstractVisitorExporterGenerator<CC>
- All Implemented Interfaces:
TraversalUtil.Callback
- Direct Known Subclasses:
HTMLExporterVisitorGenerator
public abstract class AbstractVisitorExporterGenerator<CC extends AbstractWmlConversionContext>
extends TraversalUtil.CallbackImpl
The …ExporterGenerator is the visitor, that gets used in those cases where a document is done
as a NonXSLT. (docx4j supports convert.out via both xslt and non-xslt based approaches)
- Since:
- 3.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Objectprotected CCprotected Elementprotected Elementprotected Documentprotected static final intprotected static final intprotected static final intprotected static final intprotected Nodeprotected PPrprotected RPrprotected static final Stringprotected LinkedList<Element>protected LinkedList<Element> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractVisitorExporterGenerator(CC conversionContext, Document document, Node parentNode) -
Method Summary
Modifier and TypeMethodDescriptionVisits a node in pre order (before its children have been visited).protected voidconvertTabToNode(CC conversionContext, Document document) protected voidconvertToNode(CC conversionContext, Object unmarshalledNode, String modelId, Document document, Node parentNode) protected abstract DocumentFragmentcreateImage(int imgType, CC conversionContext, Object anchorOrInline) protected abstract ElementcreateNode(Document doc, int nodeType) protected Nodeprotected abstract AbstractVisitorExporterDelegate.AbstractVisitorExporterGeneratorFactory<CC>protected org.slf4j.LoggergetLog()protected intprotected abstract voidprotected abstract Elementprotected abstract voidOn a block representing a run, we just put run properties from this rPr node.protected voidbooleanDecide whether this node's children should be traversed.voidMethods inherited from class org.docx4j.TraversalUtil.CallbackImpl
getChildren
-
Field Details
-
TAB_DUMMY
- See Also:
-
NODE_BLOCK
protected static final int NODE_BLOCK- See Also:
-
NODE_INLINE
protected static final int NODE_INLINE- See Also:
-
IMAGE_E10
protected static final int IMAGE_E10- See Also:
-
IMAGE_E20
protected static final int IMAGE_E20- See Also:
-
conversionContext
-
document
-
parentNode
-
currentP
-
currentSpan
-
tr
-
tc
-
pPr
-
rPr
-
anchorOrInline
-
-
Constructor Details
-
AbstractVisitorExporterGenerator
-
-
Method Details
-
shouldTraverse
Description copied from class:TraversalUtil.CallbackImplDecide whether this node's children should be traversed.- Specified by:
shouldTraversein interfaceTraversalUtil.Callback- Overrides:
shouldTraversein classTraversalUtil.CallbackImpl- Returns:
- whether the children of this node should be visited
-
getCurrentParent
-
convertToNode
protected void convertToNode(CC conversionContext, Object unmarshalledNode, String modelId, Document document, Node parentNode) throws DOMException - Throws:
DOMException
-
rtlAwareAppendChildToCurrentP
-
walkJAXBElements
- Specified by:
walkJAXBElementsin interfaceTraversalUtil.Callback- Overrides:
walkJAXBElementsin classTraversalUtil.CallbackImpl
-
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
-
handleBr
-
getPos
-
convertTabToNode
- Throws:
DOMException
-
handlePPr
-
handleRPr
protected abstract void handleRPr(CC conversionContext, PPr pPrDirect, RPr rPrDirect, Element currentParent) On a block representing a run, we just put run properties from this rPr node. The paragraph style rPr's have been taken care of on the fo block which represents the paragraph. -
getFactory
protected abstract AbstractVisitorExporterDelegate.AbstractVisitorExporterGeneratorFactory<CC> getFactory() -
createImage
protected abstract DocumentFragment createImage(int imgType, CC conversionContext, Object anchorOrInline) -
createNode
-
getLog
protected org.slf4j.Logger getLog()
-