Class BasicLineMapParser<K,T>
java.lang.Object
ubic.gemma.core.loader.util.parser.BasicLineMapParser<K,T>
- All Implemented Interfaces:
LineParser<T>,Parser<T>
- Direct Known Subclasses:
AffyProbeReader,IlluminaProbeReader,LineMapParser,NcbiGeneEnsemblFileParser,NcbiGeneHistoryParser,NcbiGeneInfoParser,ProbeSequenceParser,TaxonParser
A line parser that produces a Map instead of a Collection. Subclasses must provide a method to generate keys, which
is generated from the values. A typical use case of this is when the keys are also known to another class that needs
the data provided by the parser; to locate the data it uses the key.
- Author:
- pavlidis
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final StringLines starting with this will be ignored.protected final org.apache.commons.logging.LogFields inherited from interface ubic.gemma.core.loader.util.parser.LineParser
MIN_PARSED_LINES_FOR_UPDATE, PARSE_ALERT_TIME_FREQUENCY_MSFields inherited from interface ubic.gemma.core.loader.util.parser.Parser
PARSE_ALERT_FREQUENCY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract booleancontainsKey(K key) abstract Tprotected abstract Kabstract Collection<K> abstract Collection<T> voidParse aFilevoidparse(InputStream is) Parse aInputStream.voidParse a file identified by its path.abstract TparseOneLine(String line) Handle the parsing of a single line from the input.protected abstract voidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ubic.gemma.core.loader.util.parser.Parser
getUniqueResult
-
Field Details
-
COMMENT_MARK
Lines starting with this will be ignored.- See Also:
-
log
protected final org.apache.commons.logging.Log log
-
-
Constructor Details
-
BasicLineMapParser
public BasicLineMapParser()
-
-
Method Details
-
containsKey
-
get
-
getKeySet
-
getResults
- Specified by:
getResultsin interfaceParser<K>- Returns:
- the results of the parse.
-
parse
Description copied from interface:ParserParse aFile- Specified by:
parsein interfaceParser<K>- Parameters:
file- file- Throws:
IOException- if there is a problem while manipulating the file
-
parse
Description copied from interface:ParserParse aInputStream.- Specified by:
parsein interfaceParser<K>- Parameters:
is- input stream- Throws:
IOException- if there is a problem while manipulating the file
-
parse
Description copied from interface:ParserParse a file identified by its path.- Specified by:
parsein interfaceParser<K>- Parameters:
filename- Absolute path to the file- Throws:
IOException- if there is a problem while manipulating the file
-
parseOneLine
Description copied from interface:LineParserHandle the parsing of a single line from the input.- Specified by:
parseOneLinein interfaceLineParser<K>- Parameters:
line- line to parse- Returns:
- parsed object
-
getKey
-
put
-