org.apache.poi.hssf.eventmodel
Class ModelFactory

java.lang.Object
  extended by org.apache.poi.hssf.eventmodel.ModelFactory
All Implemented Interfaces:
ERFListener

public class ModelFactory
extends java.lang.Object
implements ERFListener

ModelFactory creates workbook and sheet models based upon events thrown by them there events from the EventRecordFactory.

Author:
Andrew C. Oliver acoliver@apache.org
See Also:
EventRecordFactory

Constructor Summary
ModelFactory()
          Constructor for ModelFactory.
 
Method Summary
 boolean processRecord(Record rec)
          Process a Record.
 void registerListener(ModelFactoryListener listener)
          register a ModelFactoryListener so that it can receive Models as they are created.
 void run(java.io.InputStream stream)
          Start processing the Workbook stream into Model events.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModelFactory

public ModelFactory()
Constructor for ModelFactory. Does practically nothing.

Method Detail

registerListener

public void registerListener(ModelFactoryListener listener)
register a ModelFactoryListener so that it can receive Models as they are created.


run

public void run(java.io.InputStream stream)
Start processing the Workbook stream into Model events.


processRecord

public boolean processRecord(Record rec)
Description copied from interface: ERFListener
Process a Record. This method is called by the EventRecordFactory when a record is returned.

Specified by:
processRecord in interface ERFListener
Returns:
boolean specifying whether the effort was a success.


Copyright 2008 The Apache Software Foundation or its licensors, as applicable.