public abstract class AbstractStreamingParser extends Object implements StreamingParser
Modifier and Type | Class and Description |
---|---|
static class |
AbstractStreamingParser.Parameterizer
Parameterization class.
|
BundleStreamSource.Event
Modifier and Type | Field and Description |
---|---|
protected TokenizedReader |
reader
Tokenized reader.
|
protected Tokenizer |
tokenizer
Tokenizer.
|
Constructor and Description |
---|
AbstractStreamingParser(CSVReaderFormat format)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
MultipleObjectsBundle |
asMultipleObjectsBundle()
Return (or collect) the stream as bundle.
|
boolean |
assignDBID(DBIDVar var)
Assign the current object ID to a
DBIDVar . |
void |
cleanup()
Perform cleanup operations after parsing.
|
protected abstract Logging |
getLogger()
Get the logger for this class.
|
boolean |
hasDBIDs()
Indicate whether the stream contains DBIDs.
|
void |
initStream(InputStream in)
Init the streaming parser for the given input stream.
|
MultipleObjectsBundle |
parse(InputStream in)
Returns a list of the objects parsed from the specified input stream.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
data, getMeta, nextEvent
protected TokenizedReader reader
protected Tokenizer tokenizer
public AbstractStreamingParser(CSVReaderFormat format)
format
- Reader formatpublic final MultipleObjectsBundle parse(InputStream in)
Parser
public void initStream(InputStream in)
StreamingParser
initStream
in interface StreamingParser
in
- the stream to parse objects frompublic boolean hasDBIDs()
BundleStreamSource
hasDBIDs
in interface BundleStreamSource
true
if the stream contains DBIDs.public boolean assignDBID(DBIDVar var)
BundleStreamSource
DBIDVar
.assignDBID
in interface BundleStreamSource
var
- Variable to assign the object id tofalse
when no object id is availablepublic MultipleObjectsBundle asMultipleObjectsBundle()
BundleStreamSource
asMultipleObjectsBundle
in interface BundleStreamSource
public void cleanup()
Parser
protected abstract Logging getLogger()
Copyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.