|
|
|||||||||||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.lmu.ifi.dbs.elki.logging.AbstractLoggable
de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable
de.lmu.ifi.dbs.elki.database.connection.AbstractDatabaseConnection<O>
de.lmu.ifi.dbs.elki.database.connection.InputStreamDatabaseConnection<O>
O
- the type of DatabaseObject to be provided by the implementing class as element of the supplied databasepublic class InputStreamDatabaseConnection<O extends DatabaseObject>
Provides a database connection expecting input from an input stream such as stdin.
Field Summary | |
---|---|
(package private) InputStream |
in
The input stream to parse from. |
(package private) Parser<O> |
parser
Holds the instance of the parser specified by PARSER_PARAM . |
static OptionID |
PARSER_ID
OptionID for PARSER_PARAM |
private ClassParameter<Parser<O>> |
PARSER_PARAM
Parameter to specify the parser to provide a database, must extend Parser . |
Fields inherited from class de.lmu.ifi.dbs.elki.database.connection.AbstractDatabaseConnection |
---|
CLASS_LABEL_CLASS_ID, CLASS_LABEL_INDEX_ID, classLabelIndex, database, DATABASE_ID, EXTERNAL_ID_INDEX_ID, forceExternalID, LABEL_CONCATENATION |
Fields inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable |
---|
optionHandler |
Fields inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable |
---|
debug, logger |
Constructor Summary | |
---|---|
InputStreamDatabaseConnection()
Adds parameter PARSER_PARAM
to the option handler additionally to parameters of super class. |
Method Summary | |
---|---|
Database<O> |
getDatabase(Normalization<O> normalization)
Returns a Database according to parameter settings. |
List<String> |
setParameters(List<String> args)
Calls the super method and instantiates parser according to the value of parameter
PARSER_PARAM . |
String |
shortDescription()
Returns a short description of the class. |
Methods inherited from class de.lmu.ifi.dbs.elki.database.connection.AbstractDatabaseConnection |
---|
normalizeAndTransformLabels |
Methods inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable |
---|
addOption, addParameterizable, addParameterizable, checkGlobalParameterConstraints, collectOptions, getAttributeSettings, getParameters, rememberParametersExcept, removeOption, removeParameterizable |
Methods inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable |
---|
debugFine, debugFiner, debugFinest, exception, progress, verbose, warning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface de.lmu.ifi.dbs.elki.utilities.optionhandling.Parameterizable |
---|
checkGlobalParameterConstraints, collectOptions, getParameters |
Field Detail |
---|
public static final OptionID PARSER_ID
PARSER_PARAM
private final ClassParameter<Parser<O extends DatabaseObject>> PARSER_PARAM
Parser
.
Default value: DoubleVectorLabelParser
Key: -dbc.parser
Parser<O extends DatabaseObject> parser
PARSER_PARAM
.
InputStream in
Constructor Detail |
---|
public InputStreamDatabaseConnection()
PARSER_PARAM
to the option handler additionally to parameters of super class.
Method Detail |
---|
public Database<O> getDatabase(Normalization<O> normalization)
DatabaseConnection
normalization
- Normalization to perform a normalization if this action is
supported. May remain null.
public String shortDescription()
AbstractParameterizable
shortDescription
in interface Parameterizable
shortDescription
in class AbstractParameterizable
public List<String> setParameters(List<String> args) throws ParameterException
parser
according to the value of parameter
PARSER_PARAM
.
The remaining parameters are passed to the parser
.
setParameters
in interface Parameterizable
setParameters
in class AbstractDatabaseConnection<O extends DatabaseObject>
args
- parameters to set the attributes accordingly to
ParameterException
- in case of wrong parameter-setting
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |