Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.parser.meta
Class MetaParser<O extends DatabaseObject>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.logging.AbstractLoggable
      extended by de.lmu.ifi.dbs.elki.parser.meta.MetaParser<O>
Type Parameters:
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.
All Implemented Interfaces:
Parser<O>, Parameterizable
Direct Known Subclasses:
ProjectionParser, RandomProjectionParser

public abstract class MetaParser<O extends DatabaseObject>
extends AbstractLoggable
implements Parser<O>

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.

Author:
Arthur Zimek

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.logging.AbstractLoggable
debug, logger
 
Constructor Summary
MetaParser(Parameterization config)
          Constructor, adhering to Parameterizable
 
Method Summary
protected  ParsingResult<O> retrieveBaseParsingresult(InputStream in)
           Retrieves the ParsingResult of the base parser.
 String toString()
          Returns a string representation of the object.
 
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
 

Field Detail

BASEPARSER_ID

public static final OptionID BASEPARSER_ID
OptionID for BASEPARSER_PARAM.


BASEPARSER_PARAM

private final ClassParameter<? extends Parser<O extends DatabaseObject>> BASEPARSER_PARAM
The parameter for setting the base parser.

Key: -metaparser.baseparser

Default: DoubleVectorLabelParser


baseparser

private Parser<O extends DatabaseObject> baseparser
Holds an instance of the current base parser.

Constructor Detail

MetaParser

public MetaParser(Parameterization config)
Constructor, adhering to Parameterizable

Parameters:
config - Parameterization
Method Detail

retrieveBaseParsingresult

protected ParsingResult<O> retrieveBaseParsingresult(InputStream in)

Retrieves the ParsingResult of the base parser.

Parameters:
in - the InputStream to be parsed
Returns:
the ParsingResult of the base parser

toString

public String toString()
Returns a string representation of the object.

Overrides:
toString in class Object
Returns:
a string representation of the object.

Release 0.3 (2010-03-31_1612)