« Back to AAU Project

Graphical representation

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Graphical representation
community graphrep documentation visualisation adoscript
Answer
3/27/14 11:01 AM
Does ADOxx  provide a graphical view on all relations (class or INTERREF) as a result from analysis (2D or 3D)?

RE: Graphical representation
Answer
2/18/14 4:11 PM as a reply to Fadi.
The standard functionality of ADOxx does not include a component that provides a graphical view on all relations, both connectors and intermodel pointers.

However it is possible to implement algorithms that generate model "landscapes" that provide the user with an overview of all relations (connectors and intermodel references) originating from a given model.

I have implemented a short algorithm that could be used as a starting point in developing such functionality.
The algorithm takes the currently active model as the starting point for generating a model landscape and reproduces all models that are referenced from an object within the starting model or include objects referenced from within the starting object. The algorithm does a full-depth processing, displaying all models that are transitively referenced from the starting model.

In the implementation, I have defined a class "L-Object" derived from __D-construct__ for representing the objects, a class "L-Model" derived from __D_aggregation__ for representing the models, two relation classes "L-Connector" from L-Object to L-Object for representing the connectors and "L-Pointer" from L-Object to __D-construct__ for representing the pointers and a model type "Model Landscape" containing all these classes and relation classes.

A pseudocode description of the algorithm follows:

- gather information about the currently active model
- create a new landscape
- call the procedure for displaying the current model
- close all models opened during the process

Procedure DISPLAY_MODEL
- gather the model information
- create a new object of class L-Model
- position the new object one centimeter below the last created L-Model object (or 1cm below the top of the model)
- set the attributes of the new object
- for all objects inside the model
   - call the procedure for displaying an object
- for all connectors inside the model
   - call the procedure for displaying a connector
- for all objects inside the model
   - identify all attributes of type interref
   - for each interref attribute
       - read the interref information (type, count, etc.)
       - for each item referenced
         - call the procedure for displaying a pointer



Procedure DISPLAY_OBJECT
- read the object information
- create a new object of class L-Object
- set the position of the new object, based on the position of the source object inside its model and on theoffset (position of the model representing the source model)
- set the size of the new object based on the size of the initial object
- set the attributes of the new object

Procedure DISPLAY_CONNECTOR
- read the endpoints of the connector are read
- identify the L-Objects representing these endpoints
- create a new L-Connector between these L-Objects
- set the bend points of the new connector, based on the bendpoints of the initial connector and the offsets
- set the attributes of the new connector

Procedure DISPLAY_POINTER
- read information about the referenced item
- if the target model has not already been depicted in the landscape
  - call the procedure for displaying the model
- identify the L-Object representing the referencing object
- identify the L-Object or L-Model representing the entity referenced by the interref
- create a new L-Pointer between these two objects
- set the attributes of the new connector (L-Pointer)

Attached please find the exported application library file (AAU_GraphicalRepresentation.abl), the file containing the AdoScript code (createLandScape.asc ) and a set of sample models for initial testing of the solution (SampleModels_for_GraphicalRepresentation.adl).
Attachments: AAU_GraphicalRepresentation.abl (47.4k), SampleModels_for_GraphicalRepresentation.adl (34.1k), createLandScape.asc (14.1k)