Class ConverterBase

java.lang.Object
writer2latex.base.ConverterBase
All Implemented Interfaces:
Converter
Direct Known Subclasses:
Converter, Converter, ConverterPalette

public abstract class ConverterBase extends Object implements Converter

Abstract base implementation of writer2latex.api.Converter

  • Field Details

  • Constructor Details

    • ConverterBase

      public ConverterBase()
  • Method Details

    • setGraphicConverter

      public void setGraphicConverter(GraphicConverter graphicConverter)
      Description copied from interface: Converter
      Define a GraphicConverter implementation to use for conversion of graphic files. If no converter is specified, graphic files will not be converted into other formats.
      Specified by:
      setGraphicConverter in interface Converter
      Parameters:
      graphicConverter - the GraphicConverter to use
    • readTemplate

      public void readTemplate(InputStream is) throws IOException
      Description copied from interface: Converter
      Read a template to use as a base for the converted document. The format of the template depends on the Converter implementation.
      Specified by:
      readTemplate in interface Converter
      Parameters:
      is - an InputStream from which to read the template
      Throws:
      IOException - if some exception occurs while reading the template
    • readTemplate

      public void readTemplate(File file) throws IOException
      Description copied from interface: Converter
      Read a template to use as a base for the converted document. The format of the template depends on the Converter implementation.
      Specified by:
      readTemplate in interface Converter
      Parameters:
      file - a file from which to read the template
      Throws:
      IOException - if the file does not exist or some exception occurs while reading the template
    • convert

      public ConverterResult convert(File source, String sTargetFileName) throws FileNotFoundException, IOException
      Description copied from interface: Converter
      Convert a document
      Specified by:
      convert in interface Converter
      Parameters:
      source - a File from which to read the source document.
      sTargetFileName - the file name to use for the converted document (if the converted document is a compound document consisting consisting of several files, this name will be used for the master document)
      Returns:
      a ConverterResult containing the converted document
      Throws:
      FileNotFoundException - if the file does not exist
      IOException - if some exception occurs while reading the document
    • convert

      public ConverterResult convert(InputStream is, String sTargetFileName) throws IOException
      Description copied from interface: Converter
      Convert a document
      Specified by:
      convert in interface Converter
      Parameters:
      is - an InputStream from which to read the source document.
      sTargetFileName - the file name to use for the converted document (if the converted document is a compound document consisting consisting of several files, this name will be used for the master document)
      Returns:
      a ConverterResult containing the converted document
      Throws:
      IOException - if some exception occurs while reading the document
    • convertInner

      public abstract void convertInner() throws IOException
      Throws:
      IOException
    • getMetaData

      public MetaData getMetaData()
    • getImageLoader

      public ImageLoader getImageLoader()
    • addDocument

      public void addDocument(OutputFile doc)
    • getEmbeddedObject

      public EmbeddedObject getEmbeddedObject(String sHref)