@Title(value="Input-Stream based database connection") @Description(value="Parse an input stream such as STDIN into a database.") public class InputStreamDatabaseConnection extends AbstractDatabaseConnection implements java.lang.AutoCloseable
Modifier and Type | Class and Description |
---|---|
static class |
InputStreamDatabaseConnection.Parameterizer
Parameterization class.
|
Modifier and Type | Field and Description |
---|---|
(package private) java.util.function.Supplier<java.io.InputStream> |
in
The input stream to parse from.
|
(package private) java.io.InputStream |
ins
The stream that we are processing.
|
private static Logging |
LOG
The logger for this class.
|
(package private) Parser |
parser
Holds the instance of the parser.
|
filters, LABEL_CONCATENATION
Constructor and Description |
---|
InputStreamDatabaseConnection(java.io.InputStream ins,
java.util.List<ObjectFilter> filters,
Parser parser)
Constructor.
|
InputStreamDatabaseConnection(java.util.function.Supplier<java.io.InputStream> in,
java.util.List<ObjectFilter> filters,
Parser parser)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected Logging |
getLogger()
Get the logger for this database connection.
|
MultipleObjectsBundle |
loadData()
Returns the initial data for a database.
|
invokeBundleFilters, invokeStreamFilters
private static final Logging LOG
Parser parser
java.util.function.Supplier<java.io.InputStream> in
java.io.InputStream ins
public InputStreamDatabaseConnection(java.util.function.Supplier<java.io.InputStream> in, java.util.List<ObjectFilter> filters, Parser parser)
in
- Input stream openerfilters
- Filters to useparser
- the parser to provide a databasepublic InputStreamDatabaseConnection(java.io.InputStream ins, java.util.List<ObjectFilter> filters, Parser parser)
ins
- Input stream to processfilters
- Filters to useparser
- the parser to provide a databasepublic MultipleObjectsBundle loadData()
DatabaseConnection
loadData
in interface DatabaseConnection
public void close() throws java.io.IOException
close
in interface java.lang.AutoCloseable
java.io.IOException
protected Logging getLogger()
AbstractDatabaseConnection
getLogger
in class AbstractDatabaseConnection
Copyright © 2019 ELKI Development Team. License information.