|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.fu_berlin.ties.context.sensor.BaseSensor
public abstract class BaseSensor
Abstract implementation of the
Sensor
interface that stores a
configuration and provides a factory method to initialize a set of sensors.
Constructor Summary | |
---|---|
BaseSensor(TiesConfiguration conf)
Creates a new instance. |
Method Summary | |
---|---|
static Sensor[] |
createSensors(String[] classNames,
TiesConfiguration conf)
Factory method that initializes an array of sensors. |
TiesConfiguration |
getConfig()
Returns the configuration used by this instance. |
void |
initDocument(File filename,
TokenizerFactory tFactory)
Called when starting to process a new document. The default implementation does nothing. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface de.fu_berlin.ties.context.sensor.Sensor |
---|
lookup |
Constructor Detail |
---|
public BaseSensor(TiesConfiguration conf)
conf
- the configuration to useMethod Detail |
---|
public static Sensor[] createSensors(String[] classNames, TiesConfiguration conf) throws ProcessingException
classNames
- array of fully specified names of classes
implementing the Sensor
interface; each of them must provide
a constructor that accepts a TiesConfiguration
as single argumentconf
- used to configure the sensors
ProcessingException
- if an error occurred while creating the
classifierpublic TiesConfiguration getConfig()
public void initDocument(File filename, TokenizerFactory tFactory) throws ProcessingException, IOException
initDocument
in interface Sensor
filename
- the name of the filetFactory
- a factory that can be used for creating tokenizers,
if required
ProcessingException
- if an error occurs while starting to
process the document
IOException
- if an I/O error occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |