

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

def getProjectionCode(self):
  projection = self.getProjection()
  if projection == None:
    return None
  return projection.getFullCode()


#
# Inject new methods in the class JLayerVectorial
#

JLayerVectorial.getProjectionCode = getProjectionCode
JLayerVectorial.__call__ = table._call
JLayerVectorial.__iter__ = table._iter_features
JLayerVectorial.__len__ = table._len_features
JLayerVectorial.features = table._features
JLayerVectorial.getSchema = table._getSchema
JLayerVectorial.updateSchema = table._updateSchema
JLayerVectorial.append = table._append
JLayerVectorial.update = table._update
JLayerVectorial.edit = table._edit
JLayerVectorial.commit = table._commit
JLayerVectorial.abort = table._abort
JLayerVectorial.getSelection = table._getSelection
JLayerVectorial.select = table._select
JLayerVectorial.deselect = table._deselect
JLayerVectorial.isSelected = table._isSelected
JLayerVectorial.finishEditing = table._commit
JLayerVectorial.cancelEditing = table._abort

