Attribute binding
Because a JViews TGO attribute (
IlpAttribute) may correspond to multiple SDM model (
IlvSDMModel) object properties, it must be bound to an SDM property individually if it is relevant to a JViews Diagrammer component.
A JViews TGO business object (
IlpObject) must be associated with a JViews TGO class (
IlpClass). The SDM model defines a symbolic property called 'tag' that is used to categorize different SDM objects. The TGO-SDM adapter automatically maps the String representation of a JViews TGO class to the 'tag' symbolic property.
IlpObject tgoObject = ...
String tag = tgoObject.getIlpClass().getName();
The binding process allows for name mapping (attribute name to property name) as well as bidirectional type conversion (from attribute to property and from property to attribute).
Examples of binding
The position attribute of the predefined business object
IltNetworkElement is represented by a point (
IlpPoint) with x and y coordinates. Conversely, the positioning in JViews Diagrammer is defined by the SDM object properties x and y. The JViews TGO attribute position must therefore be mapped to two SDM properties, x and y.
In this case, the conversion is trivial and can be performed in both ways: from attribute to property or from property to attribute, at nearly no cost.
In the case of the predefined business object
IltPolyGroup, the position attribute is defined by an array of points (
IlpPolygon). JViews Diagrammer does not support this type of representation, which means that the binding process has to convert a polygon into a point and vice versa. Although it is possible, this conversion is no longer trivial and may result in performance penalties.
Copyright © 2018, Rogue Wave Software, Inc. All Rights Reserved.