Hydrologic Event Generator Plug-in

Launch Netbeans, open the BasicPlugin project (created in Simple Plug-in Instructions)
Right click on the project and select Copy…
Copy the project into the same root directory as the BasicPlugin project, and change the name of the project to "BasicEventGeneratorPlugin".
Refactor the basicplugin package to be basiceventgeneratorplugin.
Change the I18n class to reference the proper package name
Change the manifest file to point at the proper WatPluginMainClass: basiceventgeneratorplugin.BasicPlugin
Change the plug-in _subdirectory in the BasicPluginClass to be BasicEventGeneratorPlugin and the _pluginExtension to be ".begp"
The steps above allow the BasicPlugin to be used in the same WAT instance as the BasicEventGeneratorPlugin – separating them by package and jar, as well as separating their file storage directory and extension will ensure no conflicts for simultaneous operation.
The next step is to extend the HydrologicEventPlugin interface – a marker interface which separates the event generator plug-ins from other plug-ins. This will not require any changes to the method signatures in BasicPlugin, but it will require a change in either the BasicPlugin.compute method or the BasicAlternative.Compute method to manipulate the compute options event list. This event list will be harvested by WAT to set the event list for all other plug-ins in the program order.
This example will change the event list in the BasicAlternative.compute. Under the conditions that the compute is a WAT compute and an FRM compute, the event list will be set to have one member that is a clone of the RunTimeWindow. It will tell all subsequent plug-ins to run for the entire analysis period.

Code Example 54 Alternative's compute()
Alternatively, this code could be modified to create many events within the RunTimeWindow. To do this, a loop would need to be added, and criteria for determining when events occur would need to be created. This could be based on reading in a time series and parsing the time series for peaks above some threshold value, or based on a Poisson distribution for creating a number of events per year and a complicated event generation routine for scaling events given an input frequency curve and shape sets.