Objects Model Simplified ======================== .. |mo1| image:: images/modelo_de_objetos_simplificado.png 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. .. raw:: html 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: .. figure:: images/interpretar-funcion.png :align: center 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 :javadoc:`Document ` that has the common features of :javadoc:`ViewDocument `, :javadoc:`TableDocument ` or :javadoc:`LayoutDocument `. In this diagram we could find, for example: .. figure:: images/interpretar-herencia.png :align: center Here we have an abstract entity :javadoc:`FFrame `, we will never find this type of object, what we will find is this object types: :javadoc:`FFrameView `, :javadoc:`FFramePicture ` or :javadoc:`FFrameText `, and it show us that is related with :javadoc:`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: .. figure:: images/interpretar-asociacion.png :align: center It show us that if we have an object :javadoc:`LayoutDocument `, we could obtain a :javadoc:`LayoutContext ` object using the ``getLaypoutContext`` method:: laypoutContext = layoutDocument.getLaypoutContext()