Interface ResultsFormatter

All Known Implementing Classes:
AbstractFormatter, AbstractGenericFormatter, CSVFormatter, CSVGenericFormatter, GDBFormatter, GeoCSVFormatter, GISDataFormatter, KMLFormatter, ShapefileFormatter, WKTFormatter

public interface ResultsFormatter
Interface for classes that generate output from corpora that have been processed by OpenSextant.
Author:
Rich Markeloff, MITRE Corp. Initial version created on Jul 13, 2011
  • Method Details

    • setParameters

      void setParameters(Parameters params)
      A more convenient way of passing in a list of parameters.
    • getJobName

      String getJobName()
      Returns:
      name of job
    • setOutputDir

      void setOutputDir(String pathname)
      Set the path to the output directory.
      Parameters:
      pathname -
    • setOutputFilename

      void setOutputFilename(String filename)
      Set the name of the output file.
      Parameters:
      filename -
    • getOutputType

      String getOutputType()
      Get the type of output produced by this formatter.
      Returns:
      type of output
    • getOutputFilepath

      String getOutputFilepath()
      Get the path to the output file.
      Returns:
      file path of output
    • formatResults

      String formatResults(ExtractionResult result) throws ProcessingException
      Formats the results obtained from processing a corpus through OpenSextant. Returns a string to display to the user. Typically this will be HTML to be shown in a browser.
      Parameters:
      result -
      Returns:
      A message for the user
      Throws:
      ProcessingException - formatting error
    • start

      void start(String nm) throws ProcessingException
      Throws:
      ProcessingException
    • finish

      void finish()
    • addField

      void addField(String f) throws ConfigException
      Parameters:
      f - field
      Throws:
      ConfigException - if not consistent with schema
    • removeField

      void removeField(String f) throws ConfigException
      Parameters:
      f - field
      Throws:
      ConfigException - if not consistent with schema