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 Summary
Fields Modifier and Type Field Description protected org.apache.commons.logging.Log
log
-
Fields inherited from interface ubic.gemma.core.loader.util.parser.LineParser
MIN_PARSED_LINES_FOR_UPDATE, PARSE_ALERT_TIME_FREQUENCY_MS
-
Fields inherited from interface ubic.gemma.core.loader.util.parser.Parser
PARSE_ALERT_FREQUENCY
-
-
Constructor Summary
Constructors Constructor Description BasicLineParser()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract void
addResult(T obj)
abstract Collection<T>
getResults()
void
parse(File file)
Parse aFile
void
parse(InputStream is)
Parse aInputStream
.void
parse(String filename)
Parse a file identified by its path.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface ubic.gemma.core.loader.util.parser.LineParser
parseOneLine
-
-
-
-
Method Detail
-
getResults
public abstract Collection<T> getResults()
- Specified by:
getResults
in interfaceParser<T>
- Returns:
- the results of the parse.
-
parse
public void parse(File file) throws IOException
Description copied from interface:Parser
Parse aFile
- Specified by:
parse
in interfaceParser<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 aInputStream
.- Specified by:
parse
in interfaceParser<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 interfaceParser<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)
-
-