Personal tools
You are here: Home Members Joaquin del Cerro gvSIG Scripting - raster Notas 4 201307172311 - Re: Some doubts [GSoC - 2013]

Hi Sandeep.

El 17/07/13 23:11, sandeep kumar escribió:
> Hi Sir,
>
> In continuation with my previous mail, i forgot to ask one more doubt.
>
>
> 7. We have a method getExtensions() in RasterLayer Class? What is its
> functionality? Though, you wrote some documentation saying that it is an
> internal method, i would like to know its functionality in the code. We
> have actually used it in the filter and operation methods.
>


Jython allow to add methods to a java class but not allow to add new attributes
to the classes or instances of a java object.

We have need to add a new attribute to the FlyrRaster, an instance of
the RasterLayerExtensions. This method allows us to access to this instance.
It maintain a map with the RasterLayerExtensions instances associateds to
the FlyrRaster instance and when you invoke it, creates a new instance of
RasterLayerExtensions and store it in the map or it retrieve from the map if already
exists.

Be care with the invocation of this method, it is heavy, is a
utility method that is not part of the API.

If you have any other way to associate the instance of RasterLayerExtensions to
FlyrRaster that I think best tell it.

some advice ....
if you install the jython interpreter (not python) in the system you can do
fast tests to see if it is viable or not any construction that comes to mind
(you will not have access to any of gvSIG). For example the test to add the
method "hello" to the java String class.

Regars
Joaquin

>
> Thank You,
> Sandeep Kumar,
> MS by Research,
> Lab for Spatial Informatics,
> IIIT Hyderabad.
>


Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: