Class BasicLineParser<T>

java.lang.Object
ubic.gemma.core.loader.util.parser.BasicLineParser<T>
All Implemented Interfaces:
LineParser<T>, Parser<T>
Direct Known Subclasses:
ArrayDesignParser, BlatResultParser, CompositeSequenceParser, NcbiGene2AccessionParser, NCBIGene2GOAssociationParser

public abstract class BasicLineParser<T> extends Object implements LineParser<T>
A simple LineParser implementation that doesn't do anything. Subclass this and implement the "parseOneLine" method.
Author:
pavlidis
  • Field Details

    • log

      protected final org.apache.commons.logging.Log log
  • Constructor Details

    • BasicLineParser

      public BasicLineParser()
  • Method Details

    • getResults

      public abstract Collection<T> getResults()
      Specified by:
      getResults in interface Parser<T>
      Returns:
      the results of the parse.
    • parse

      public void parse(File file) throws IOException
      Description copied from interface: Parser
      Parse a File
      Specified by:
      parse in interface Parser<T>
      Parameters:
      file - file
      Throws:
      IOException - if there is a problem while manipulating the file
    • parse

      public void parse(InputStream is) throws IOException
      Description copied from interface: Parser
      Parse a InputStream.
      Specified by:
      parse in interface Parser<T>
      Parameters:
      is - input stream
      Throws:
      IOException - if there is a problem while manipulating the file
    • parse

      public void parse(String filename) throws IOException
      Description copied from interface: Parser
      Parse a file identified by its path.
      Specified by:
      parse in interface Parser<T>
      Parameters:
      filename - Absolute path to the file
      Throws:
      IOException - if there is a problem while manipulating the file
    • addResult

      protected abstract void addResult(T obj)