ostore.oil
Class HMMStage

java.lang.Object
  |
  +--ostore.oil.HMMStage
All Implemented Interfaces:
EventHandlerIF
Direct Known Subclasses:
HMMBuilder, HMMPredictor

public abstract class HMMStage
extends Object
implements EventHandlerIF

A superclass for stages which employ HMMs. This class initializes a few useful Class objects, and initializes an HMM and event stream filter. Subclasses should call ModelStage.init at the beginning of their own init method.

Version:
$Id: HMMStage.java,v 1.10 2002/07/22 20:54:53 srhea Exp $
Author:
Dennis Geels
See Also:
HMM

Nested Class Summary
static class HMMStage.InvalidTypeException
          An exception thrown when a config file supplies the name of a class or field that does not satisfy type restrictions.
static class HMMStage.UnsupportedConfigurationException
          An exception thrown when a config file requests an operation (e.g. emit_predictions) that a particular Builder does not provide.
 
Field Summary
protected  Field accessor
          The location of the observable field within the events watched.
protected static String class_tag
           
protected  Classifier classifier
           
protected  HMM model
          The learning model to use.
protected  String name
          The name by which to refer to this stage.
protected  Class observed_type
          The type of events to observe.
protected static Class QueueElementIF_class
          The Class object for the QueueElementIF Interface.
protected static Class QuickSerializable_class
          The Class object for the QuickSerializable Interface.
 
Constructor Summary
HMMStage()
           
 
Method Summary
 void destroy()
           
 void handleEvents(QueueElementIF[] elemarr)
           
 void init(ConfigDataIF config)
          Performs stage initialization common to HMMBuilders and HMMPredictor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface seda.sandStorm.api.EventHandlerIF
handleEvent
 

Field Detail

class_tag

protected static String class_tag

QueueElementIF_class

protected static Class QueueElementIF_class
The Class object for the QueueElementIF Interface.


QuickSerializable_class

protected static Class QuickSerializable_class
The Class object for the QuickSerializable Interface.


name

protected String name
The name by which to refer to this stage. It should be the name of the corresponding StageIF.


model

protected HMM model
The learning model to use.


observed_type

protected Class observed_type
The type of events to observe.


accessor

protected Field accessor
The location of the observable field within the events watched. This field comprises the observed output for the HMM.


classifier

protected Classifier classifier
Constructor Detail

HMMStage

public HMMStage()
Method Detail

handleEvents

public void handleEvents(QueueElementIF[] elemarr)
                  throws EventHandlerException
Specified by:
handleEvents in interface EventHandlerIF
EventHandlerException

init

public void init(ConfigDataIF config)
          throws Exception
Performs stage initialization common to HMMBuilders and HMMPredictor.

Specified by:
init in interface EventHandlerIF
Throws:
InvalidConfigFileException - if the ConfigDataIF contains an invalid parameter or does not contain a required field.
HMMStage.InvalidTypeException - if a parameter specifies a Class or Field which does not implement the proper java interface.
Exception

destroy

public void destroy()
Specified by:
destroy in interface EventHandlerIF