Developing the CSV ODA driver extensions
Eclipse DTP provides two ODA plug-in template wizards, one for ODA data source run‑time driver, another for ODA data source designer. Each wizard creates a new plug-in project, generating implementations of related ODA extension points. The auto-generated Java classes implement method stubs that support a single result set and input parameters. The classes have hard‑coded result set data so that an ODA extension developer can immediately verify that the generated ODA driver plug-ins work with an ODA consumer, for example, BIRT.
After the ODA wizard generates the plug-ins, modify the TODO tags in the generated source code to customize data source behavior.
To develop the CSV ODA extensions, perform the following tasks:
*Download the required BIRT source code from the Eclipse CVS repository.
*Create two new projects using the ODA wizards in the Eclipse PDE to implement the following plug-ins:
*CSV ODA driver to access the data source
*CSV ODA user interface to select the data file and available data columns in BIRT Report Designer
*Extend the source code in the CSV ODA plug-in projects by adding new functionality at the defined extension points.
*Test and deploy the extensions in the run-time environment.
You can download the source code for the CSV ODA driver extension examples at http://www.actuate.com/birt/contributions.
About the CSV ODA plug-ins
The CSV ODA extensions require the following two plug-ins:
*org.eclipse.birt.report.data.oda.csv
The CSV ODA data source plug-in extends the functionality defined by the extension point, org.eclipse.datatools.connectivity.oda.dataSource, to create the CSV ODA driver. The first row of the CSV input file contains the column names. The remaining rows, separated by new line markers, contain the data fields, separated by commas. The org.eclipse.birt.report.data.oda.csv plug-in contains the database classes and data structures, such as data types, result set, metadata result set, and query used to handle data in a BIRT report.
The org.eclipse.datatools.connectivity.oda.dataSource extension point is in the Eclipse DTP project and is part of the org.eclipse.datatools.connectivity.oda plug-in. This plug-in is available from the CVS repository in /home/datatools.
*org.eclipse.birt.report.data.csv.ui
The CSV ODA user interface plug-in extends the functionality defined by the org.eclipse.datatools.connectivity.connectionProfile, org.eclipse.ui.propertyPages, and org.eclipse.datatools.connectivity.oda.design.ui.dataSource extension points. The user interface consists of the following two pages:
*The data source page, which specifies and validates the path and name of the CSV file.
*The data set page, which shows the selected data file and columns available in the file. By default, the user interface selects all the columns in the data set.
Downloading BIRT source code
The CSV ODA driver plug-in, org.eclipse.birt.report.data.oda.csv, requires the following plug-ins:
*org.eclipse.core.runtime
*org.eclipse.datatools.connectivity.oda
*org.eclipse.datatools.connectivity.oda.profile
The CSV ODA user interface extension, org.eclipse.birt.report.data.csv.ui, requires the following plug-ins:
*org.eclipse.birt.report.data.oda.csv
*org.eclipse.core.runtime
*org.eclipse.datatools.connectivity.oda.design.ui
*org.eclipse.ui
For the org.eclipse.birt.report.data.oda.csv plug-in, extend only the Java classes in the org.eclipse.datatools.connectivity.oda plug-in. For the org.eclipse.birt.report.data.csv.ui plug-in, extend the Java classes in the org.eclipse.datatools.connectivity.oda.design.ui plug-in.
Eclipse makes source code available to the developer community. Compiling does not require the source code for the plug-ins. You can configure the system to use the JAR files in the eclipse\plugins folder. To debug, you may need the source code for all the required BIRT and DTP plug‑ins available in source repositories like Git. Additional information is available at the eclipse.org downloads site.