EVolve
Class DemoSource

java.lang.Object
  |
  +--EVolve.DemoSource
All Implemented Interfaces:
DataSource

public class DemoSource
extends java.lang.Object
implements DataSource


Constructor Summary
DemoSource()
           
 
Method Summary
 java.lang.String getFileName()
          Gets the name of the data trace file.
 java.lang.String getName()
          Gets the name of the datasource.
 ElementDefinition getNextDefinition()
          Gets the next element definition.
 Entity getNextEntity()
          Gets the next entity.
 Event getNextEvent()
          Gets the next event.
 long getNumberOfEvents(java.lang.String definitionName)
          Gets number of events corresponding event definition name
 long getTotalNumberOfEvents()
          Gets total number of events in the data trace
 void init()
          Initializes the data source.
 void startBuildDefinition()
          Starts building the element definitions.
 void startBuildEntity()
          Starts building the entities.
 void startBuildEvent()
          Starts building the events.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DemoSource

public DemoSource()
Method Detail

init

public void init()
          throws EVolveException
Description copied from interface: DataSource
Initializes the data source.

Specified by:
init in interface DataSource
EVolveException

startBuildDefinition

public void startBuildDefinition()
                          throws DataProcessingException
Description copied from interface: DataSource
Starts building the element definitions.

Specified by:
startBuildDefinition in interface DataSource
DataProcessingException

getNextDefinition

public ElementDefinition getNextDefinition()
                                    throws DataProcessingException
Description copied from interface: DataSource
Gets the next element definition.

Specified by:
getNextDefinition in interface DataSource
Returns:
next element definition, null if all the definitions are sent.
DataProcessingException

startBuildEntity

public void startBuildEntity()
                      throws DataProcessingException
Description copied from interface: DataSource
Starts building the entities.

Specified by:
startBuildEntity in interface DataSource
DataProcessingException

getNextEntity

public Entity getNextEntity()
                     throws DataProcessingException
Description copied from interface: DataSource
Gets the next entity.

Specified by:
getNextEntity in interface DataSource
Returns:
next entity, null if all the entities are sent.
DataProcessingException

startBuildEvent

public void startBuildEvent()
                     throws DataProcessingException
Description copied from interface: DataSource
Starts building the events.

Specified by:
startBuildEvent in interface DataSource
DataProcessingException

getNextEvent

public Event getNextEvent()
                   throws DataProcessingException
Description copied from interface: DataSource
Gets the next event.

Specified by:
getNextEvent in interface DataSource
Returns:
next event, null if all the events are sent.
DataProcessingException

getName

public java.lang.String getName()
Description copied from interface: DataSource
Gets the name of the datasource.

Specified by:
getName in interface DataSource
Returns:
data sourse name

getFileName

public java.lang.String getFileName()
Description copied from interface: DataSource
Gets the name of the data trace file.

Specified by:
getFileName in interface DataSource
Returns:
trace file name or null

getTotalNumberOfEvents

public long getTotalNumberOfEvents()
Description copied from interface: DataSource
Gets total number of events in the data trace

Specified by:
getTotalNumberOfEvents in interface DataSource
Returns:
a long type number containing total number of events

getNumberOfEvents

public long getNumberOfEvents(java.lang.String definitionName)
Description copied from interface: DataSource
Gets number of events corresponding event definition name

Specified by:
getNumberOfEvents in interface DataSource
Returns:
event number