Interface Parser<T>

All Known Subinterfaces:
LineParser<T>
All Known Implementing Classes:
AffyProbeReader, BasicLineMapParser, BasicLineParser, BiomartEnsembleNcbiParser, BlatResultParser, CompositeSequenceParser, FastaParser, GeoFamilyParser, IlluminaProbeReader, LineMapParser, NcbiGene2AccessionParser, NCBIGene2GOAssociationParser, NcbiGeneEnsemblFileParser, NcbiGeneHistoryParser, NcbiGeneInfoParser, ProbeSequenceParser, RecordParser, SwissProtParser, TaxonParser

public interface Parser<T>
Interface for classes that allow parsing of files and streams.
Author:
pavlidis
  • Field Details

  • Method Details

    • getResults

      Collection<T> getResults()
      Returns:
      the results of the parse.
    • getUniqueResult

      @Nullable default T getUniqueResult() throws IllegalStateException
      Obtain a unique result from the parser.
      Throws:
      IllegalStateException - if there is more than one parse result
    • parse

      void parse(File f) throws IOException
      Parse a File
      Parameters:
      f - file
      Throws:
      IOException - if there is a problem while manipulating the file
    • parse

      void parse(InputStream is) throws IOException
      Parse a InputStream.
      Parameters:
      is - input stream
      Throws:
      IOException - if there is a problem while manipulating the file
    • parse

      void parse(String filename) throws IOException
      Parse a file identified by its path.
      Parameters:
      filename - Absolute path to the file
      Throws:
      IOException - if there is a problem while manipulating the file