Ignore:
Timestamp:
10/02/12 13:39:16 (8 years ago)
Author:
mnagni
Message:

New ea_model library.
No more use the django.forms. Now uses JSON and Dojo(javascript)
DB creation files are now executed as standard python function (before was used a system execution call)
Added an html example to play/work offline with DOJO

File:
1 edited

Legend:

Unmodified
Added
Removed
  • mauRepo/MolesManager/trunk/src/ea_model/iso_19129_2009_igcd/igcd_framework/if_tincoverage.py

    r8087 r8088  
     1 
     2 
     3 
    14 
    25 
     
    2023 
    2124''' 
    22 Created on 06-Feb-2012 15:59:48 
     25Created on 10-Feb-2012 12:03:12 
    2326 
    2427@author: mnagni 
     
    3942        self._if_coveragedata = IF_CoverageData()        
    4043 
     44        self.domainExtent = [] 
    4145        self.interpolationType = None 
    42         self.domainExtent = [] 
     46        self.geometry = None 
    4347        self.commonPointRule = None 
    44         self.geometry = None 
    4548        self.rangeType = None 
    4649        self.interpolationParametersType = None 
    4750        super(IF_TINCoverage, self).__init__() 
    4851 
     52    def __key(self): 
     53        return (self.domainExtent, self.interpolationType, self.geometry, self.commonPointRule, self.rangeType, self.interpolationParametersType) 
    4954 
    50  
    51  
    52  
    53  
    54  
    55  
    56  
    57  
    58  
    59  
    60  
    61     def __key(self): 
    62         return (self.interpolationType, self.domainExtent, self.commonPointRule, self.geometry, self.rangeType, self.interpolationParametersType) 
    63  
    64     def __eq__(x, y): 
     55    def __eq__(self, y): 
    6556        ''' 
    6657        Cannot compare classes which do not define a "__key" attribute  
    6758        ''' 
    68         if hasattr(x, '_%s__key' % (type(x).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): 
    69             return x.__key() == y.__key() 
    70         return id(x) == id(y) 
     59        if hasattr(self, '_%s__key' % (type(self).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): 
     60            return self.__key() == y.__key() 
     61        return id(self) == id(y) 
    7162 
    7263    def __hash__(self): 
Note: See TracChangeset for help on using the changeset viewer.