Package elki.datasource.parser
Class AbstractStreamingParser
- java.lang.Object
-
- elki.datasource.parser.AbstractStreamingParser
-
- All Implemented Interfaces:
elki.datasource.bundle.BundleStreamSource,Parser,StreamingParser
- Direct Known Subclasses:
NumberVectorLabelParser,SimplePolygonParser,SimpleTransactionParser
public abstract class AbstractStreamingParser extends java.lang.Object implements StreamingParser
Base class for streaming parsers.- Since:
- 0.5.0
- Author:
- Erich Schubert
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAbstractStreamingParser.ParParameterization class.
-
Constructor Summary
Constructors Constructor Description AbstractStreamingParser(CSVReaderFormat format)Constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description elki.datasource.bundle.MultipleObjectsBundleasMultipleObjectsBundle()booleanassignDBID(elki.database.ids.DBIDVar var)voidcleanup()Perform cleanup operations after parsing.protected abstract elki.logging.LogginggetLogger()Get the logger for this class.booleanhasDBIDs()voidinitStream(java.io.InputStream in)Init the streaming parser for the given input stream.elki.datasource.bundle.MultipleObjectsBundleparse(java.io.InputStream in)Returns a list of the objects parsed from the specified input stream.
-
-
-
Constructor Detail
-
AbstractStreamingParser
public AbstractStreamingParser(CSVReaderFormat format)
Constructor.- Parameters:
format- Reader format
-
-
Method Detail
-
parse
public final elki.datasource.bundle.MultipleObjectsBundle parse(java.io.InputStream in)
Description copied from interface:ParserReturns a list of the objects parsed from the specified input stream.
-
initStream
public void initStream(java.io.InputStream in)
Description copied from interface:StreamingParserInit the streaming parser for the given input stream.- Specified by:
initStreamin interfaceStreamingParser- Parameters:
in- the stream to parse objects from
-
hasDBIDs
public boolean hasDBIDs()
- Specified by:
hasDBIDsin interfaceelki.datasource.bundle.BundleStreamSource
-
assignDBID
public boolean assignDBID(elki.database.ids.DBIDVar var)
- Specified by:
assignDBIDin interfaceelki.datasource.bundle.BundleStreamSource
-
asMultipleObjectsBundle
public elki.datasource.bundle.MultipleObjectsBundle asMultipleObjectsBundle()
- Specified by:
asMultipleObjectsBundlein interfaceelki.datasource.bundle.BundleStreamSource
-
cleanup
public void cleanup()
Description copied from interface:ParserPerform cleanup operations after parsing.
-
getLogger
protected abstract elki.logging.Logging getLogger()
Get the logger for this class.- Returns:
- Logger.
-
-