Interface Extractor

All Known Implementing Classes:
AbstractFlexPat, PatternsOfLife, XCoord, XTemporal

public interface Extractor
For now, this interface is closer to an AbstractExtractor where a clean interface might be output = Extractor.extract(input) This interface specifies more
Author:
ubaldino
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    optional constant - a universal doc ID holder
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Resource management.
    void
    Configure an Extractor using defaults for that extractor.
    void
    configure(String patfile)
    Configure an Extractor using a config file named by a path.
    void
    configure(URL patfile)
    Configure an Extractor using a config file named by a URL.
    extract(String input)
    Useful for working with text buffers adhoc.
    Useuful for working with batches of inputs that have an innate row ID + buffer pairing.
     
  • Field Details

  • Method Details

    • getName

      String getName()
    • configure

      void configure() throws ConfigException
      Configure an Extractor using defaults for that extractor.
      Throws:
      ConfigException - the config exception
    • configure

      void configure(String patfile) throws ConfigException
      Configure an Extractor using a config file named by a path.
      Parameters:
      patfile - configuration file path
      Throws:
      ConfigException - the config exception
    • configure

      void configure(URL patfile) throws ConfigException
      Configure an Extractor using a config file named by a URL.
      Parameters:
      patfile - configuration URL
      Throws:
      ConfigException - the config exception
    • extract

      List<TextMatch> extract(TextInput input) throws ExtractionException
      Useuful for working with batches of inputs that have an innate row ID + buffer pairing.
      Parameters:
      input - text input
      Returns:
      the list of TextMatch
      Throws:
      ExtractionException - error if underlying extractor(s) fail
    • extract

      List<TextMatch> extract(String input) throws ExtractionException
      Useful for working with text buffers adhoc. Fewer assumptions about input data here.
      Parameters:
      input - text input, as a string
      Returns:
      the list of TextMatch
      Throws:
      ExtractionException - error if underlying extractor(s) fail
    • cleanup

      void cleanup()
      Resource management. This cleanup routine usually in turn calls some shutdown, disconnect, etc.