In a typical business application, it might become necessary to attach additional business data in the form of attributes or complex objects to your model and view instances. The type of this additional data should not be visible to the internals of Tensegrity Graph Framework. At a minimum, however, it is required that you wrap this extra information behind a special interface that lets the runtime system deal with it.
InfoObject is the general categorization of these
extention interfaces. Both model and view classes may implement a specific
Info extension by providing code for the
deepCopy method.
As a general rule of thumb, we can divide graph-related data into two categories: model and view objects. The key difference between the two categories is that the model objects are shared by all the views while view objects exist independently from each other and are therefore not shared.
Table 1.3. Info Objects
| Base Object | 1:1 Associated Info Object |
|---|---|
Node | NodeInfo |
Edge | EdgeInfo |
VisualNode | VisualNodeInfo |
VisualEdge | VisualEdgeInfo |
While 0-N VisualNode instances are associated with a single Node instance,
we transitively associate 0-N VisualNodeInfo objects with a single NodeInfo
object. This transitive relationship between view and model objects reflects
the general 0-N cardinality between model and view. The extra decoupled
Info object provides efficient modeling capabilities
for additional model and view attributes. It is not advisable, therefore,
to hard-code certain attributes into the model or view, since it is not
foreseeable how the Tensegrity Graph Framework will evolve.
The actual objects that are used for the NodeInfo, VisualNodeInfo and other
info objects are dynamically assignable by implementing the corresponding
interfaces.
© 2004, 2005 Tensegrity Software GmbH