Introducing JViews Maps > Architecture > Populating the Map > Diagram Data Sources

The styling and data mapping facilities of JViews Diagrammer allow you to connect to data sources and to style their representations.

The role of the diagram data source is to load the data to display in the diagram, and possibly write back the data if it has been modified.

There are the following predefined types of data source: flat files (in the Designer only), XML, and JDBC.

When you cannot use flat files, XML, or JDBC, you can always connect the data model to your data by implementing the data model interface in Java.

The SDM Engine

The SDM engine is one of the most important pieces of JViews Diagrammer as it controls the data-to-graphics mapping. There are four key elements in the data-to-graphics mapping process:

An example of the SDM Engine and the Data-to-Graphics Mapping is shown in Figure 3.2.

images/diaext_dtogmapping.png

Figure 3.2 The SDM Engine and the Data-to-Graphics Mapping

As shown in Figure 3.2, the mapping between the data model and the graphical representation is bidirectional:

The Data Model Interface

The SDM data model is the interface that tells the SDM engine how to get the data to be displayed. The SDM data model is an abstract description of a set of nodes and links between nodes. Nodes and links have a user-defined type (also called the tag), and a set of named properties.

JViews Diagrammer provides prebuilt data models, and you can implement the data model interface to connect your data.