Business Objects and Data Sources > Data Sources > Data Source API

JViews TGO provides a default data source implementation, IltDefaultDataSource, to connect to XML files. This default data source includes methods for adding or removing business objects implementing the IlpObject interface or JavaBeans, that is, Java objects that comply with the JavaBeans design pattern (see Reminder About JavaBeans Design Patterns). It also provides an API that lets you obtain structural information about the existence of a parent, children, an origin or a destination from the back-end and store it in the IlpObject.

To learn how to create a custom data source, see Implementing a New Data Source.

The interface IlpDataSource defines static data sources. It provides methods to:

The interface IlpMutableDataSource defines dynamic data sources. In addition to the methods listed above, it provides methods to:

JViews TGO provides a convenience implementation of these interfaces that you can use directly when building an application: IltDefaultDataSource. This default implementation for a dynamic data source is able to read business model information from XML and to manage custom business objects as well as predefined business objects.

The following sample code shows how to create a data source instance to be used with the different JViews TGO graphic components.

How to Create a Data Source
IlpContext context = IltSystem.GetDefaultContext();
IltDefaultDataSource dataSource = new IltDefaultDataSource(context);

A diagram of the data source classes and of their relationships is given in Figure 3.1.

images/tgo_datasource.png

Figure 3.1 Data Source Classes