skip to main content
Defense > Getting started > Introducing JViews Maps for Defense > Architecture > Populating the map
 
Populating the map
This section describes how business data is imported and handled in map displays. A map application makes use of the data connectivity and styling features of JViews Diagrammer for the foreground symbols, but not the background map data.
*Map data sources
*Describes the specificities of map data sources.
*Diagram data sources
*Describes the specificities of diagram data sources.
*The SDM engine
*Explains what the SDM engine is about.
Map data sources
A map data source is the preferred way to connect your application to georeferenced data sets. A map data source connects a feature iterator, a renderer, and a map layer, see Connecting a Feature Iterator with a Renderer and a Map Layer.
Connecting a Feature Iterator with a Renderer and a Map Layer
The feature iterator is an object that iterates through the features of a map to obtain the data for the map overall. The features include the coordinates, the bounding box, and other features to be parsed.
The renderer is used to create the graphic objects that will represent the data model objects in the map.
Each data source is associated with a particular map layer, which manages the order and the style of the objects.
Specific map data sources are dedicated to accepting specific types of map format. See Data formats for a list of formats.
The Map Builder provides menu commands to import and export specific types of map data through an easy-to-use GUI. The SDK provides specialized interfaces for reading and writing map data of the supported types and for setting the appropriate data source.
The management of the graphic objects and their properties is part of the JViews Framework and is explained in detail in Managers and Graphic objects in The Essential JViews Framework.
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:
*A data model that interfaces to the data to display or edit. This data model is completely independent of the GUI, and refers only to the business objects of your application.
*Renderers that style the diagram as a whole and the graphic objects in it. Renderers apply the styles specified in the style sheets.
*A grapher in which the graphic objects representing the data model are created as nodes and links. It provides the infrastructure that is minimally necessary to draw a diagram.
*Interactors that permit user actions on graphic objects. Common requirements are for zoom, pan, select, and object creation functions.
An example of the SDM Engine and the Data-to-Graphics Mapping is shown in The SDM Engine and the Data-to-Graphics Mapping.
The SDM Engine and the Data-to-Graphics Mapping
As shown in The SDM Engine and the Data-to-Graphics Mapping, the mapping between the data model and the graphical representation is bidirectional:
*Data model to graphics: the rendering process is controlled by the style sheet, which lets you tell the SDM engine how you want each particular kind of data object to be displayed in the grapher. The rendering process is performed by specialized renderers.
*When the data model is loaded, the SDM engine explores it and creates graphic objects representing the nodes and links defined by the data model in the grapher.
*When the state of an object in the data model changes, the SDM engine updates the graphic object representing the modified data object.
*Graphics to data model: the editing process relies on built-in editing facilities that act directly on the underlying data model. The actions in an editing application are implemented by interactors. For example:
*When the user moves a graphic object (for example, in an editor), the SDM engine updates the geometric properties of the object in the data model.
*When the user expands or collapses a node (for example, in a navigation application), the SDM engine updates the expand/collapse status of the object in the data model.
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.

Copyright © 2018, Rogue Wave Software, Inc. All Rights Reserved.