Class AbstractImporter

java.lang.Object
com.nomagic.reportwizard.tools.importer.template.AbstractImporter
All Implemented Interfaces:
IImporter
Direct Known Subclasses:
HtmlImporter, RtfImporter, TxtImporter, XmlImporter

@OpenApiAll public abstract class AbstractImporter extends Object implements IImporter
the Abstract Importer implementation.
Since:
Jan 22, 2009
  • Field Details

    • log

      protected org.apache.logging.log4j.Logger log
      the logger for IImporter instances.
    • reader

      protected Reader reader
      the reader containing the content.
  • Constructor Details

    • AbstractImporter

      public AbstractImporter()
  • Method Details

    • getReader

      public Reader getReader()
      initialize reader invalid input: '&' writer.
      Specified by:
      getReader in interface IImporter
      Returns:
      the reader for the template
    • postFormat

      public ITool.RetainedString postFormat(StringWriter writer)
      Apply necessary document dependent formatting.
      Specified by:
      postFormat in interface IImporter
      Parameters:
      writer - the writer to post format
      Returns:
      the final output.
    • getDocumentBody

      protected abstract String getDocumentBody(File file) throws IOException
      Get the HTML Body.
      Parameters:
      file - holding the document
      Returns:
      the Text
      Throws:
      IOException - if reading the file failed
    • getDocumentSection

      protected String getDocumentSection(File file, String section) throws IOException
      Get a Section in an Html document.
      Parameters:
      file - holding the document.
      section - the section name
      Returns:
      the section text
      Throws:
      IOException - if reading the section failed