|
|
|||||||||||||||||||||
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<MultiRepresentedObject<O>>
de.lmu.ifi.dbs.elki.database.connection.MultipleFileBasedDatabaseConnection<O>
O
- the type of DatabaseObject to be provided by the implementing
class as element of the supplied databasepublic class MultipleFileBasedDatabaseConnection<O extends DatabaseObject>
Provides a database connection based on multiple files and parsers to be set.
Field Summary | |
---|---|
static OptionID |
INPUT_ID
OptionID for INPUT_PARAM |
private FileListParameter |
INPUT_PARAM
Parameter that specifies the names of the input files to be parsed. |
private List<InputStream> |
inputStreams
The input files to parse from as specified by INPUT_PARAM . |
private List<Parser<O>> |
parsers
Holds the instances of the parsers specified by PARSERS_PARAM . |
static OptionID |
PARSERS_ID
OptionID for PARSERS_PARAM |
private ClassListParameter<Parser<O>> |
PARSERS_PARAM
Optional parameter to specify the parsers 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 | |
---|---|
MultipleFileBasedDatabaseConnection()
Provides a database connection expecting input from several files, adding parameters PARSERS_PARAM , and INPUT_PARAM to the option
handler additionally to parameters of super class. |
Method Summary | |
---|---|
Database<MultiRepresentedObject<O>> |
getDatabase(Normalization<MultiRepresentedObject<O>> normalization)
Returns a Database according to parameter settings. |
List<String> |
setParameters(List<String> args)
Calls the super method and instantiates inputStreams according to
the value of parameter INPUT_PARAM and parsers according
to the value of parameter PARSERS_PARAM . |
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, shortDescription |
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, shortDescription |
Field Detail |
---|
public static final OptionID PARSERS_ID
PARSERS_PARAM
private final ClassListParameter<Parser<O extends DatabaseObject>> PARSERS_PARAM
Parser
. If this parameter is not set,
DoubleVectorLabelParser
is used as parser for all input files.
Key: -multipledbc.parsers
private List<Parser<O extends DatabaseObject>> parsers
PARSERS_PARAM
.
public static final OptionID INPUT_ID
INPUT_PARAM
private final FileListParameter INPUT_PARAM
Key: -multipledbc.in
private List<InputStream> inputStreams
INPUT_PARAM
.
Constructor Detail |
---|
public MultipleFileBasedDatabaseConnection()
PARSERS_PARAM
, and INPUT_PARAM
to the option
handler additionally to parameters of super class.
Method Detail |
---|
public Database<MultiRepresentedObject<O>> getDatabase(Normalization<MultiRepresentedObject<O>> normalization)
DatabaseConnection
normalization
- Normalization to perform a normalization if this action is
supported. May remain null.
public List<String> setParameters(List<String> args) throws ParameterException
inputStreams
according to
the value of parameter INPUT_PARAM
and parsers
according
to the value of parameter PARSERS_PARAM
. The remaining parameters
are passed to all instances of parsers
.
setParameters
in interface Parameterizable
setParameters
in class AbstractDatabaseConnection<MultiRepresentedObject<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 |