Chapter 4. Working with Data Sources

The first step in designing a chart is to retrieve data you want to use. Within Chart Designer, you can draw data from JDBC compliant databases, text files, XML files, EJBs, and even bring in object/array data through class files. All data source information is stored within the Data Source Manager.

4.1. The Data Source Manager

The Data Source Manager is an integrated utility that stores location and connection information for the data sources employed by a particular user. The information is stored in XML registry file. You can set up as many different data registry files as you like and there is no limit to the number of data sources that can be stored within a single registry. The registry is used as an aid at design time and is not required to deploy charts since the data or the data source information is stored within the chart file.

[Caution]Caution

The XML data source repository only stores location and connection information, not the actual data. It is not an XML file that contains data to be used in a chart.

4.1.1. Using Data Source Manager

When you start a new chart (by selecting FileNew, or by clicking the New button on the toolbar), the chart wizard will launch. The Wizard is a step-by-step process that will guide you through the basic construction of your chart. The first dialog in the chart wizard will prompt you to specify the data registry file that you want to use, or to create a new registry. By default, the data source registry files are saved in DataRegistry directory. Once you either open an existing registry or start a new one, the Data Source Manager window will open.

Data Source Manager

Left side of the window contains a tree listing all data sources in the registry file. Grouped under Databases are individual databases and their associated queries and data views. Grouped under JNDIDataSources are database sources that use JNDI (Java Naming and Directory Interface) name to connect instead of JDBC. Grouped under XMLFiles are all XML files and their associated queries. Grouped under TXTFiles are all specified Text files. Grouped under ClassFiles are all specified class files. Grouped under EJBs are all specified EJB connections, and grouped under SOAP are all specified SOAP data sources.

Right side of the window contains a series of buttons controlling all of the functions of the Data Source manager. Each button performs the following function:

Edit:

This option allows you to modify attributes of a data source. For a database, it allows you to change the connection information and modify queries/data views. For XML files, it allows you to change the file and its location, and modify XML queries. For text files, it allows you to change the display name and file location. For class files, it allows you to change the display name and modify the location. And for EJBs, it allows you to change the display name as well as parameter values.

Copy:

This option is not only available for database nodes and bigdata nodes but also for the specified query or data view.

Add:

This option allows you to add a data source. It will create a new source depending on which node is selected on the left side of the window. Hence, if you select TXTFiles and click the Add button, you will be prompted to add a new text file data source.

Remove:

This option will remove the selected data source.

Back:

This option allows you to go back one step in the wizard and change the registry file that you are using.

Cancel:

This will cancel the wizard process.

Next:

This will use the currently selected data source for the chart and proceed to the next step in the wizard.