jasext.paw
Class PawEventSource
java.lang.Object
|
+--jasext.paw.PawEventSource
- All Implemented Interfaces:
- AnnotatedEventSource, EventSource, TreeObjectSource
- public class PawEventSource
- extends java.lang.Object
- implements AnnotatedEventSource
A class for opening a PAW file as an event source.
Since a PAW file may contain multiple NTuples the PawEventSource is not normally used directly as an
event source. Instead the getItems method should be used to find elements within the PAW file which
implement AnnotatedEventSource. These items correspond to NTuples within the file and can themselves
be fetched using getItem and used as an EventSource.
To handle the case where there are no n-tuples in the PAW file we have provided kludgy implementations
of the EventSource methods. We need a better way of handling this, such as a new interface such as
CompositeEventSource instead of AnnotatedEventSource.
|
Constructor Summary |
PawEventSource(java.lang.String fileName)
Create a PawEventSource connected to the PAW file specified. |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PawEventSource
public PawEventSource(java.lang.String fileName)
throws ModuleException
- Create a PawEventSource connected to the PAW file specified.
- Parameters:
fileName - the PAW file to open
close
public void close()
- Close the EventSource and free all the resources associated with it.
- Specified by:
close in interface EventSource
finalize
public void finalize()
- Overrides:
finalize in class java.lang.Object
getName
public java.lang.String getName()
- Specified by:
getName in interface EventSource
getItems
public TreeItem[] getItems()
- Specified by:
getItems in interface AnnotatedEventSource
getItem
public java.lang.Object getItem(TreeItem i)
- Specified by:
getItem in interface AnnotatedEventSource
getTotalNumberOfEvents
public int getTotalNumberOfEvents()
- Specified by:
getTotalNumberOfEvents in interface EventSource
beforeFirstEvent
public void beforeFirstEvent()
- Specified by:
beforeFirstEvent in interface EventSource
afterLastEvent
public void afterLastEvent()
- Specified by:
afterLastEvent in interface EventSource
getNextEvent
public EventData getNextEvent()
throws EndOfDataException
- Specified by:
getNextEvent in interface EventSource
getEventDataClass
public java.lang.Class getEventDataClass()
- Specified by:
getEventDataClass in interface EventSource
main
public static void main(java.lang.String[] argv)
throws java.lang.Exception