|
|
|||||||||||||||||||||
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.parser.meta.MetaParser<O>
O
- the type of DatabaseObject used in the ParsingResult
retrieved by the base parser
and provided in the ParsingResult
of the Parser.parse(InputStream)
-method of this Parser's subclass.public abstract class MetaParser<O extends DatabaseObject>
A MetaParser uses any Parser
as specified by the user via parameter setting
as base parser and may perform certain transformations on the retrieved ParsingResult
.
Field Summary | |
---|---|
private Parser<O> |
baseparser
Holds an instance of the current base parser. |
static OptionID |
BASEPARSER_ID
OptionID for BASEPARSER_PARAM . |
private ClassParameter<? extends Parser<O>> |
BASEPARSER_PARAM
The parameter for setting the base parser. |
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 | |
---|---|
protected |
MetaParser()
Sets the parameter for setting the base parser. |
Method Summary | |
---|---|
protected ParsingResult<O> |
retrieveBaseParsingresult(InputStream in)
Retrieves the ParsingResult of the base parser. |
List<String> |
setParameters(List<String> args)
Grabs all specified options from the option handler. |
String |
toString()
Returns a string representation of the object. |
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, wait, wait, wait |
Methods inherited from interface de.lmu.ifi.dbs.elki.parser.Parser |
---|
parse |
Methods inherited from interface de.lmu.ifi.dbs.elki.utilities.optionhandling.Parameterizable |
---|
checkGlobalParameterConstraints, collectOptions, getParameters, shortDescription |
Field Detail |
---|
public static final OptionID BASEPARSER_ID
BASEPARSER_PARAM
.
private final ClassParameter<? extends Parser<O extends DatabaseObject>> BASEPARSER_PARAM
Key: -metaparser.baseparser
Default: DoubleVectorLabelParser
private Parser<O extends DatabaseObject> baseparser
Constructor Detail |
---|
protected MetaParser()
Method Detail |
---|
protected ParsingResult<O> retrieveBaseParsingresult(InputStream in)
Retrieves the ParsingResult
of the base parser.
in
- the InputStream
to be parsed
ParsingResult
of the base parserpublic List<String> setParameters(List<String> args) throws ParameterException
AbstractParameterizable
{ ListremainingParameters = super.setParameters(args); // set parameters for your class // for example like this: if(isSet(MY_PARAM_VALUE_PARAM)) { myParamValue = getParameterValue(MY_PARAM_VALUE_PARAM); } . . . return remainingParameters; // or in case of attributes requesting parameters themselves // return parameterizableAttribbute.setParameters(remainingParameters); }
setParameters
in interface Parameterizable
setParameters
in class AbstractParameterizable
args
- parameters to set the attributes accordingly to
ParameterException
- in case of wrong parameter-settingAbstractParameterizable.setParameters(java.util.List)
public String toString()
toString
in class Object
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |