Class DOMPreprocessor
java.lang.Object
fr.opensagres.xdocreport.document.preprocessor.AbstractXDocPreprocessor<Document>
fr.opensagres.xdocreport.document.preprocessor.dom.DOMPreprocessor
- All Implemented Interfaces:
IXDocPreprocessor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcloseSource(Document reader) protected StringgetDynamicAttr(Element element, String attrName, String contextIfKey, String contextValueKey, fr.opensagres.xdocreport.template.formatter.IDocumentFormatter formatter) Generate directive (ex with FM: [#if ___font??]protected Documentbooleanpreprocess(String entryName, Document document, Writer writer, fr.opensagres.xdocreport.template.formatter.FieldsMetadata fieldsMetadata, fr.opensagres.xdocreport.template.formatter.IDocumentFormatter formatter, Map<String, Object> sharedContext) protected voidupdateDynamicAttr(Element element, String attrName, String contextKey, fr.opensagres.xdocreport.template.formatter.IDocumentFormatter formatter) protected voidupdateDynamicAttr(Element element, String attrName, String contextIfKey, String contextValueKey, fr.opensagres.xdocreport.template.formatter.IDocumentFormatter formatter) protected abstract voidvisit(Document document, String entryName, fr.opensagres.xdocreport.template.formatter.FieldsMetadata fieldsMetadata, fr.opensagres.xdocreport.template.formatter.IDocumentFormatter formatter, Map<String, Object> sharedContext) Methods inherited from class fr.opensagres.xdocreport.document.preprocessor.AbstractXDocPreprocessor
create, createAndProcess, preprocess
-
Constructor Details
-
DOMPreprocessor
public DOMPreprocessor()
-
-
Method Details
-
getSource
protected Document getSource(fr.opensagres.xdocreport.core.io.XDocArchive documentArchive, String entryName) throws fr.opensagres.xdocreport.core.XDocReportException, IOException - Specified by:
getSourcein classAbstractXDocPreprocessor<Document>- Throws:
fr.opensagres.xdocreport.core.XDocReportExceptionIOException
-
closeSource
- Specified by:
closeSourcein classAbstractXDocPreprocessor<Document>
-
preprocess
public boolean preprocess(String entryName, Document document, Writer writer, fr.opensagres.xdocreport.template.formatter.FieldsMetadata fieldsMetadata, fr.opensagres.xdocreport.template.formatter.IDocumentFormatter formatter, Map<String, Object> sharedContext) throws fr.opensagres.xdocreport.core.XDocReportException, IOException- Specified by:
preprocessin classAbstractXDocPreprocessor<Document>- Throws:
fr.opensagres.xdocreport.core.XDocReportExceptionIOException
-
visit
protected abstract void visit(Document document, String entryName, fr.opensagres.xdocreport.template.formatter.FieldsMetadata fieldsMetadata, fr.opensagres.xdocreport.template.formatter.IDocumentFormatter formatter, Map<String, Object> sharedContext) throws fr.opensagres.xdocreport.core.XDocReportException- Throws:
fr.opensagres.xdocreport.core.XDocReportException
-
updateDynamicAttr
protected void updateDynamicAttr(Element element, String attrName, String contextKey, fr.opensagres.xdocreport.template.formatter.IDocumentFormatter formatter) - Parameters:
element-attrName-contextKey-formatter-
-
updateDynamicAttr
protected void updateDynamicAttr(Element element, String attrName, String contextIfKey, String contextValueKey, fr.opensagres.xdocreport.template.formatter.IDocumentFormatter formatter) - Parameters:
element-attrName-contextKey-formatter-
-
getDynamicAttr
protected String getDynamicAttr(Element element, String attrName, String contextIfKey, String contextValueKey, fr.opensagres.xdocreport.template.formatter.IDocumentFormatter formatter) Generate directive (ex with FM: [#if ___font??]${___font}[#else]Arial[/#if])- Parameters:
element-attrName-formatter-- Returns:
-