de.lmu.ifi.dbs.elki.datasource
Class InputStreamDatabaseConnection

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.datasource.AbstractDatabaseConnection
      extended by de.lmu.ifi.dbs.elki.datasource.InputStreamDatabaseConnection
All Implemented Interfaces:
DatabaseConnection, InspectionUtilFrequentlyScanned, Parameterizable
Direct Known Subclasses:
FileBasedDatabaseConnection

@Title(value="Input-Stream based database connection")
@Description(value="Parse an input stream such as STDIN into a database.")
public class InputStreamDatabaseConnection
extends AbstractDatabaseConnection

Provides a database connection expecting input from an input stream such as stdin.


Nested Class Summary
static class InputStreamDatabaseConnection.Parameterizer
          Parameterization class.
 
Field Summary
(package private)  InputStream in
          The input stream to parse from.
private static Logging logger
          The logger for this class.
(package private)  Parser parser
          Holds the instance of the parser.
static OptionID PARSER_ID
          Parameter to specify the parser to provide a database.
 
Fields inherited from class de.lmu.ifi.dbs.elki.datasource.AbstractDatabaseConnection
filters, FILTERS_ID, LABEL_CONCATENATION
 
Constructor Summary
InputStreamDatabaseConnection(List<ObjectFilter> filters, Parser parser)
          Constructor.
 
Method Summary
protected  Logging getLogger()
          Get the logger for this database connection.
 MultipleObjectsBundle loadData()
          Returns the initial data for a database.
 
Methods inherited from class de.lmu.ifi.dbs.elki.datasource.AbstractDatabaseConnection
invokeFilters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

private static final Logging logger
The logger for this class.


PARSER_ID

public static final OptionID PARSER_ID
Parameter to specify the parser to provide a database.

Key: -dbc.parser


parser

Parser parser
Holds the instance of the parser.


in

InputStream in
The input stream to parse from.

Constructor Detail

InputStreamDatabaseConnection

public InputStreamDatabaseConnection(List<ObjectFilter> filters,
                                     Parser parser)
Constructor.

Parameters:
filters - Filters to use
parser - the parser to provide a database
Method Detail

loadData

public MultipleObjectsBundle loadData()
Description copied from interface: DatabaseConnection
Returns the initial data for a database.

Returns:
a database object bundle

getLogger

protected Logging getLogger()
Description copied from class: AbstractDatabaseConnection
Get the logger for this database connection.

Specified by:
getLogger in class AbstractDatabaseConnection
Returns:
Logger

Release 0.4.0 (2011-09-20_1324)