java.lang.Object
fr.opensagres.xdocreport.document.preprocessor.AbstractXDocPreprocessor<Document>
fr.opensagres.xdocreport.document.preprocessor.dom.DOMPreprocessor
All Implemented Interfaces:
IXDocPreprocessor

public abstract class DOMPreprocessor extends AbstractXDocPreprocessor<Document>
  • 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:
      getSource in class AbstractXDocPreprocessor<Document>
      Throws:
      fr.opensagres.xdocreport.core.XDocReportException
      IOException
    • closeSource

      protected void closeSource(Document reader)
      Specified by:
      closeSource in class AbstractXDocPreprocessor<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:
      preprocess in class AbstractXDocPreprocessor<Document>
      Throws:
      fr.opensagres.xdocreport.core.XDocReportException
      IOException
    • 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: