Statistics
| Revision:

gvsig-scripting / org.gvsig.scripting.app / trunk / org.gvsig.scripting.app / org.gvsig.scripting.app.extension / src / main / resources-plugin / scripting / lib / gvsig_2_1_0 / vectorial / layervectorial.py @ 451

History | View | Annotate | Download (1.76 KB)

1

    
2

    
3

    
4
__docformat__ = "restructuredtext en"
5

    
6
from org.gvsig.fmap.mapcontext.layers.vectorial import FLyrVect as JLayerVectorial
7

    
8
from table import DataTable
9

    
10
class LayerVectorial(JLayerVectorial,DataTable):
11
  """
12
  This class represent a vectorial layer.
13
  
14
  Extends the `java FLyrVect`_ class.
15
  
16
  .. _`java FLyrVect` : FIXME_URL
17
  """
18

    
19
  @staticmethod
20
  def getProjectionCode(self):
21
    """
22
    Returns projection code name of the layer.
23
    
24
    :return:
25
      the projection code name of the layer.
26
    :returntype:
27
      String
28
    """
29
    projection = self.getProjection()
30
    if projection == None:
31
      return None
32
    return projection.getFullCode()
33

    
34
  @staticmethod
35
  def __call__(self):
36
    """
37
    Return the java object represented by this object.
38
    
39
    This method is for compatibility with scripting API of gvSIG 2.0
40
    
41
    :ReturnType:
42
      LayerVectorial
43
    :deprecated: 
44
      With gvSIG 2.1 the call this method isn't necesary
45
      
46
    """
47
    return self    
48

    
49

    
50
#
51
# Inject new methods in the class JLayerVectorial
52
#
53
JLayerVectorial.getProjectionCode = LayerVectorial.getProjectionCode
54
JLayerVectorial.__call__ = LayerVectorial.__call__
55
JLayerVectorial.__iter__ = DataTable.__iter__
56
JLayerVectorial.__len__ = DataTable.__len__
57
JLayerVectorial.features = DataTable.features
58
JLayerVectorial.getSchema = DataTable.getSchema
59
JLayerVectorial.updateSchema = DataTable.updateSchema
60
JLayerVectorial.append = DataTable.append
61
JLayerVectorial.update = DataTable.update
62
JLayerVectorial.edit = DataTable.edit
63
JLayerVectorial.commit = DataTable.commit
64
JLayerVectorial.abort = DataTable.abort
65
JLayerVectorial.getSelection = DataTable.getSelection
66
JLayerVectorial.select = DataTable.select
67
JLayerVectorial.deselect = DataTable.deselect
68
JLayerVectorial.isSelected = DataTable.isSelected
69