3. Objects Model Simplified

Here we can see a schema of the most common use components from scripting, the relation between them and how could we access to them from our script. Besides, we can navigate through and see the java class information of each component by clicking on them.

Note

For Java developers and users with UML knowledge. This diagram is made for users without knowledge neither in Java or UML. Its main purpose is not to be strict with the UML nomenclature, just to be understandable for everyone.

3.1. How to interpret the diagram

In the last diagram we can see:

  • Yellow boxes, represent a object that we can find and work with it.
  • Green boxes, represent actions that we can use in our script. For example:
../../_images/interpretar-funcion.png

We will intrepret this as we have an available function, currentProject(), that we can execute from our script to obtain its related object, in this case: project. For the elements labeled as function we will need import previously to its execution. In this case, this module where the currentProject() function is inside gvsig:

from gvsig import *
  • Blue boxes, indicates that it’s a abstract entity. We will never find an object of this type. These objects make reference to a generic group of objects with common features. For example, we have a Document that has the common features of ViewDocument, TableDocument or LayoutDocument. In this diagram we could find, for example:
../../_images/interpretar-herencia.png

Here we have an abstract entity FFrame, we will never find this type of object, what we will find is this object types: FFrameView, FFramePicture or FFrameText, and it show us that is related with FFrame They will have a common set of attributes and methods.

  • Relations between objects, that show us how to get an object or a set of them from other one. For example:
../../_images/interpretar-asociacion.png

It show us that if we have an object LayoutDocument, we could obtain a LayoutContext object using the getLaypoutContext method:

laypoutContext = layoutDocument.getLaypoutContext()

Table Of Contents

Previous topic

1. Scripting Composer

Next topic

4. Classes Model Simplified

This Page