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

Location:
mauRepo/MolesManager/trunk/src/ea_model/iso_19129_2009_igcd/igcd_framework
Files:
20 edited

Legend:

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

    r8087 r8088  
     1 
     2 
     3 
    14 
    25 
     
    1922 
    2023''' 
    21 Created on 06-Feb-2012 15:59:42 
     24Created on 10-Feb-2012 12:03:12 
    2225 
    2326@author: mnagni 
     
    4245        return () 
    4346 
    44     def __eq__(x, y): 
     47    def __eq__(self, y): 
    4548        ''' 
    4649        Cannot compare classes which do not define a "__key" attribute  
    4750        ''' 
    48         if hasattr(x, '_%s__key' % (type(x).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): 
    49             return x.__key() == y.__key() 
    50         return id(x) == id(y) 
     51        if hasattr(self, '_%s__key' % (type(self).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): 
     52            return self.__key() == y.__key() 
     53        return id(self) == id(y) 
    5154 
    5255    def __hash__(self): 
  • mauRepo/MolesManager/trunk/src/ea_model/iso_19129_2009_igcd/igcd_framework/if_cellvaluepair.py

    r8087 r8088  
     1 
     2 
     3 
    14 
    25 
     
    2023 
    2124''' 
    22 Created on 06-Feb-2012 15:59:44 
     25Created on 10-Feb-2012 12:03:16 
    2326 
    2427@author: mnagni 
     
    4043 
    4144        self._collection_cv_discretesolidcoverage = [] 
     45        self._collection_cv_discretecurvecoverage = [] 
     46        self._collection_cv_discretegridpointcoverage = [] 
     47        self._collection_cv_discretesurfacecoverage = [] 
    4248        self._collection_cvt_discretetimeinstantcoverage = [] 
    43         self._collection_cv_discretesurfacecoverage = [] 
    44         self._collection_cv_discretegridpointcoverage = [] 
    45         self._collection_cv_discretecurvecoverage = [] 
    4649        self._collection_cv_discretepointcoverage = [] 
    4750        self.collection = [] 
     
    4952        self.geometry = None 
    5053        self._extension_cv_valuecurve = [] 
     54        self._extension_cv_thiessenvaluepolygon = [] 
    5155        self._extension_cv_valuehexagon = [] 
    5256        self._extension_cv_gridvaluecell = [] 
    53         self._extension_cv_thiessenvaluepolygon = [] 
    5457        self._extension_cv_valuetriangle = [] 
    5558        super(IF_CellValuePair, self).__init__() 
    5659 
    5760    @property 
    58     def collection(self): 
     61    def collection(self):        
    5962        return self._cv_surfacevaluepair.collection 
    6063 
    6164    @collection.setter 
    62     def collection(self, value): 
     65    def collection(self, value):         
    6366            self._cv_surfacevaluepair.collection = value 
    6467 
    6568    @property 
    66     def collection(self): 
     69    def collection(self):        
    6770        return self._cv_surfacevaluepair.collection 
    6871 
    6972    @collection.setter 
    70     def collection(self, value): 
     73    def collection(self, value):         
    7174            self._cv_surfacevaluepair.collection = value 
    7275 
    73  
    74  
    75  
    76  
    7776    @property 
    78     def extension(self): 
     77    def extension(self):         
    7978        return self._cv_surfacevaluepair.extension 
    8079 
    8180    @extension.setter 
    82     def extension(self, value): 
     81    def extension(self, value):  
    8382            self._cv_surfacevaluepair.extension = value 
    8483 
     
    8685        return (self.collection, self.collection, self.value, self.geometry, self.extension) 
    8786 
    88     def __eq__(x, y): 
     87    def __eq__(self, y): 
    8988        ''' 
    9089        Cannot compare classes which do not define a "__key" attribute  
    9190        ''' 
    92         if hasattr(x, '_%s__key' % (type(x).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): 
    93             return x.__key() == y.__key() 
    94         return id(x) == id(y) 
     91        if hasattr(self, '_%s__key' % (type(self).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): 
     92            return self.__key() == y.__key() 
     93        return id(self) == id(y) 
    9594 
    9695    def __hash__(self): 
  • mauRepo/MolesManager/trunk/src/ea_model/iso_19129_2009_igcd/igcd_framework/if_classificationattributetype.py

    r8087 r8088  
     1 
     2 
     3 
    14 
    25 
     
    2023 
    2124''' 
    22 Created on 06-Feb-2012 15:59:43 
     25Created on 10-Feb-2012 12:03:12 
    2326 
    2427@author: mnagni 
     
    4144        self.propertyTypeMetadata = [] 
    4245        self.valueDomain = None 
     46        self._characterizeBy_gf_temporalattributetype = [] 
     47        self._characterizeBy_gf_spatialattributetype = [] 
     48        self._characterizeBy_gf_thematicattributetype = [] 
    4349        self._characterizeBy_gf_locationalattributetype = [] 
    44         self._characterizeBy_gf_thematicattributetype = [] 
    4550        self._characterizeBy_gf_metadataattributetype = [] 
    46         self._characterizeBy_gf_spatialattributetype = [] 
    47         self._characterizeBy_gf_temporalattributetype = [] 
    4851        self._characterizeBy_if_classificationattributetype = [] 
    4952        self.featureAttributeMetadata = [] 
     53        self.constrainedBy = [] 
    5054        self.memberName = None 
    51         self.constrainedBy = [] 
    5255        self.valueType = None 
     56        self.theGF_FeatureType = None 
    5357        self.definition = None 
    54         self.theGF_FeatureType = None 
     58        self._characterize_gf_temporalattributetype = None 
     59        self._characterize_gf_spatialattributetype = None 
     60        self._characterize_gf_thematicattributetype = None 
    5561        self._characterize_gf_locationalattributetype = None 
    56         self._characterize_gf_thematicattributetype = None 
    5762        self._characterize_gf_metadataattributetype = None 
    58         self._characterize_gf_spatialattributetype = None 
    59         self._characterize_gf_temporalattributetype = None 
    6063        self._characterize_if_classificationattributetype = None 
    6164        self.cardinality = None 
     
    6366 
    6467    @property 
    65     def propertyTypeMetadata(self): 
     68    def propertyTypeMetadata(self):      
    6669        return self._gf_attributetype.propertyTypeMetadata 
    6770 
    6871    @propertyTypeMetadata.setter 
    69     def propertyTypeMetadata(self, value): 
     72    def propertyTypeMetadata(self, value):       
    7073            self._gf_attributetype.propertyTypeMetadata = value 
    7174 
    7275    @property 
    73     def valueDomain(self): 
     76    def valueDomain(self):       
    7477        return self._gf_attributetype.valueDomain 
    7578 
    7679    @valueDomain.setter 
    77     def valueDomain(self, value): 
     80    def valueDomain(self, value):        
    7881            self._gf_attributetype.valueDomain = value 
    7982 
    8083    @property 
    81     def characterizeBy(self): 
     84    def characterizeBy(self):    
    8285        return self._gf_attributetype.characterizeBy 
    8386 
    8487    @characterizeBy.setter 
    85     def characterizeBy(self, value): 
     88    def characterizeBy(self, value):     
    8689            self._gf_attributetype.characterizeBy = value 
    8790 
    8891    @property 
    89     def featureAttributeMetadata(self): 
     92    def featureAttributeMetadata(self):  
    9093        return self._gf_attributetype.featureAttributeMetadata 
    9194 
    9295    @featureAttributeMetadata.setter 
    93     def featureAttributeMetadata(self, value): 
     96    def featureAttributeMetadata(self, value):   
    9497            self._gf_attributetype.featureAttributeMetadata = value 
    9598 
    9699    @property 
    97     def memberName(self): 
     100    def constrainedBy(self):     
     101        return self._gf_attributetype.constrainedBy 
     102 
     103    @constrainedBy.setter 
     104    def constrainedBy(self, value):      
     105            self._gf_attributetype.constrainedBy = value 
     106 
     107    @property 
     108    def memberName(self):        
    98109        return self._gf_attributetype.memberName 
    99110 
    100111    @memberName.setter 
    101     def memberName(self, value): 
     112    def memberName(self, value):         
    102113            self._gf_attributetype.memberName = value 
    103114 
    104115    @property 
    105     def constrainedBy(self): 
    106         return self._gf_attributetype.constrainedBy 
    107  
    108     @constrainedBy.setter 
    109     def constrainedBy(self, value): 
    110             self._gf_attributetype.constrainedBy = value 
    111  
    112     @property 
    113     def valueType(self): 
     116    def valueType(self):         
    114117        return self._gf_attributetype.valueType 
    115118 
    116119    @valueType.setter 
    117     def valueType(self, value): 
     120    def valueType(self, value):  
    118121            self._gf_attributetype.valueType = value 
    119122 
    120123    @property 
    121     def definition(self): 
     124    def theGF_FeatureType(self):         
     125        return self._gf_attributetype.theGF_FeatureType 
     126 
     127    @theGF_FeatureType.setter 
     128    def theGF_FeatureType(self, value):  
     129            self._gf_attributetype.theGF_FeatureType = value 
     130 
     131    @property 
     132    def definition(self):        
    122133        return self._gf_attributetype.definition 
    123134 
    124135    @definition.setter 
    125     def definition(self, value): 
     136    def definition(self, value):         
    126137            self._gf_attributetype.definition = value 
    127138 
    128139    @property 
    129     def theGF_FeatureType(self): 
    130         return self._gf_attributetype.theGF_FeatureType 
    131  
    132     @theGF_FeatureType.setter 
    133     def theGF_FeatureType(self, value): 
    134             self._gf_attributetype.theGF_FeatureType = value 
    135  
    136     @property 
    137     def characterize(self): 
     140    def characterize(self):      
    138141        return self._gf_attributetype.characterize 
    139142 
    140143    @characterize.setter 
    141     def characterize(self, value): 
     144    def characterize(self, value):       
    142145            self._gf_attributetype.characterize = value 
    143146 
    144147    @property 
    145     def cardinality(self): 
     148    def cardinality(self):       
    146149        return self._gf_attributetype.cardinality 
    147150 
    148151    @cardinality.setter 
    149     def cardinality(self, value): 
     152    def cardinality(self, value):        
    150153            self._gf_attributetype.cardinality = value 
    151154 
    152155    def __key(self): 
    153         return (self.propertyTypeMetadata, self.valueDomain, self.characterizeBy, self.featureAttributeMetadata, self.memberName, self.constrainedBy, self.valueType, self.definition, self.theGF_FeatureType, self.characterize, self.cardinality) 
     156        return (self.propertyTypeMetadata, self.valueDomain, self.characterizeBy, self.featureAttributeMetadata, self.constrainedBy, self.memberName, self.valueType, self.theGF_FeatureType, self.definition, self.characterize, self.cardinality) 
    154157 
    155     def __eq__(x, y): 
     158    def __eq__(self, y): 
    156159        ''' 
    157160        Cannot compare classes which do not define a "__key" attribute  
    158161        ''' 
    159         if hasattr(x, '_%s__key' % (type(x).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): 
    160             return x.__key() == y.__key() 
    161         return id(x) == id(y) 
     162        if hasattr(self, '_%s__key' % (type(self).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): 
     163            return self.__key() == y.__key() 
     164        return id(self) == id(y) 
    162165 
    163166    def __hash__(self): 
  • mauRepo/MolesManager/trunk/src/ea_model/iso_19129_2009_igcd/igcd_framework/if_collection.py

    r8087 r8088  
     1 
     2 
     3 
    14 
    25 
     
    1922 
    2023''' 
    21 Created on 06-Feb-2012 15:59:43 
     24Created on 10-Feb-2012 12:03:14 
    2225 
    2326@author: mnagni 
     
    4043        super(IF_Collection, self).__init__() 
    4144 
    42  
    43  
    4445    def __key(self): 
    4546        return (self.describes) 
    4647 
    47     def __eq__(x, y): 
     48    def __eq__(self, y): 
    4849        ''' 
    4950        Cannot compare classes which do not define a "__key" attribute  
    5051        ''' 
    51         if hasattr(x, '_%s__key' % (type(x).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): 
    52             return x.__key() == y.__key() 
    53         return id(x) == id(y) 
     52        if hasattr(self, '_%s__key' % (type(self).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): 
     53            return self.__key() == y.__key() 
     54        return id(self) == id(y) 
    5455 
    5556    def __hash__(self): 
  • mauRepo/MolesManager/trunk/src/ea_model/iso_19129_2009_igcd/igcd_framework/if_collectionmetadata.py

    r8087 r8088  
     1 
     2 
     3 
    14 
    25 
     
    1922 
    2023''' 
    21 Created on 06-Feb-2012 15:59:37 
     24Created on 10-Feb-2012 12:03:08 
    2225 
    2326@author: mnagni 
     
    4043        super(IF_CollectionMetadata, self).__init__() 
    4144 
    42  
    43  
    4445    def __key(self): 
    4546        return (self.has) 
    4647 
    47     def __eq__(x, y): 
     48    def __eq__(self, y): 
    4849        ''' 
    4950        Cannot compare classes which do not define a "__key" attribute  
    5051        ''' 
    51         if hasattr(x, '_%s__key' % (type(x).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): 
    52             return x.__key() == y.__key() 
    53         return id(x) == id(y) 
     52        if hasattr(self, '_%s__key' % (type(self).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): 
     53            return self.__key() == y.__key() 
     54        return id(self) == id(y) 
    5455 
    5556    def __hash__(self): 
  • mauRepo/MolesManager/trunk/src/ea_model/iso_19129_2009_igcd/igcd_framework/if_coveragedata.py

    r8087 r8088  
     1 
     2 
     3 
    14 
    25 
     
    1922 
    2023''' 
    21 Created on 06-Feb-2012 15:59:39 
     24Created on 10-Feb-2012 12:03:07 
    2225 
    2326@author: mnagni 
     
    4245        return () 
    4346 
    44     def __eq__(x, y): 
     47    def __eq__(self, y): 
    4548        ''' 
    4649        Cannot compare classes which do not define a "__key" attribute  
    4750        ''' 
    48         if hasattr(x, '_%s__key' % (type(x).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): 
    49             return x.__key() == y.__key() 
    50         return id(x) == id(y) 
     51        if hasattr(self, '_%s__key' % (type(self).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): 
     52            return self.__key() == y.__key() 
     53        return id(self) == id(y) 
    5154 
    5255    def __hash__(self): 
  • mauRepo/MolesManager/trunk/src/ea_model/iso_19129_2009_igcd/igcd_framework/if_dataset.py

    r8087 r8088  
     1 
     2 
     3 
    14 
    25 
     
    1922 
    2023''' 
    21 Created on 06-Feb-2012 15:59:47 
     24Created on 10-Feb-2012 12:03:15 
    2225 
    2326@author: mnagni 
     
    4245        return () 
    4346 
    44     def __eq__(x, y): 
     47    def __eq__(self, y): 
    4548        ''' 
    4649        Cannot compare classes which do not define a "__key" attribute  
    4750        ''' 
    48         if hasattr(x, '_%s__key' % (type(x).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): 
    49             return x.__key() == y.__key() 
    50         return id(x) == id(y) 
     51        if hasattr(self, '_%s__key' % (type(self).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): 
     52            return self.__key() == y.__key() 
     53        return id(self) == id(y) 
    5154 
    5255    def __hash__(self): 
  • mauRepo/MolesManager/trunk/src/ea_model/iso_19129_2009_igcd/igcd_framework/if_discoverymetadata.py

    r8087 r8088  
     1 
     2 
     3 
    14 
    25 
     
    1922 
    2023''' 
    21 Created on 06-Feb-2012 15:59:37 
     24Created on 10-Feb-2012 12:03:07 
    2225 
    2326@author: mnagni 
     
    4245        return () 
    4346 
    44     def __eq__(x, y): 
     47    def __eq__(self, y): 
    4548        ''' 
    4649        Cannot compare classes which do not define a "__key" attribute  
    4750        ''' 
    48         if hasattr(x, '_%s__key' % (type(x).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): 
    49             return x.__key() == y.__key() 
    50         return id(x) == id(y) 
     51        if hasattr(self, '_%s__key' % (type(self).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): 
     52            return self.__key() == y.__key() 
     53        return id(self) == id(y) 
    5154 
    5255    def __hash__(self): 
  • mauRepo/MolesManager/trunk/src/ea_model/iso_19129_2009_igcd/igcd_framework/if_discretepointcoverage.py

    r8087 r8088  
     1 
     2 
     3 
    14 
    25 
     
    2023 
    2124''' 
    22 Created on 06-Feb-2012 15:59:37 
     25Created on 10-Feb-2012 12:03:15 
    2326 
    2427@author: mnagni 
     
    4346        super(IF_DiscretePointCoverage, self).__init__() 
    4447 
    45  
    46  
    47  
    48  
    4948    def __key(self): 
    5049        return (self.domainExtent, self.rangeType) 
    5150 
    52     def __eq__(x, y): 
     51    def __eq__(self, y): 
    5352        ''' 
    5453        Cannot compare classes which do not define a "__key" attribute  
    5554        ''' 
    56         if hasattr(x, '_%s__key' % (type(x).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): 
    57             return x.__key() == y.__key() 
    58         return id(x) == id(y) 
     55        if hasattr(self, '_%s__key' % (type(self).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): 
     56            return self.__key() == y.__key() 
     57        return id(self) == id(y) 
    5958 
    6059    def __hash__(self): 
  • mauRepo/MolesManager/trunk/src/ea_model/iso_19129_2009_igcd/igcd_framework/if_discretesurfacegridcoverage.py

    r8087 r8088  
     1 
     2 
     3 
    14 
    25 
     
    2023 
    2124''' 
    22 Created on 06-Feb-2012 15:59:49 
     25Created on 10-Feb-2012 12:03:11 
    2326 
    2427@author: mnagni 
     
    4447        super(IF_DiscreteSurfaceGridCoverage, self).__init__() 
    4548 
    46  
    47  
    48  
    49  
    50  
    51  
    5249    def __key(self): 
    5350        return (self.domainExtent, self.commonPointRule, self.rangeType) 
    5451 
    55     def __eq__(x, y): 
     52    def __eq__(self, y): 
    5653        ''' 
    5754        Cannot compare classes which do not define a "__key" attribute  
    5855        ''' 
    59         if hasattr(x, '_%s__key' % (type(x).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): 
    60             return x.__key() == y.__key() 
    61         return id(x) == id(y) 
     56        if hasattr(self, '_%s__key' % (type(self).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): 
     57            return self.__key() == y.__key() 
     58        return id(self) == id(y) 
    6259 
    6360    def __hash__(self): 
  • mauRepo/MolesManager/trunk/src/ea_model/iso_19129_2009_igcd/igcd_framework/if_feature.py

    r8087 r8088  
     1 
     2 
     3 
    14 
    25 
     
    1922 
    2023''' 
    21 Created on 06-Feb-2012 15:59:44 
     24Created on 10-Feb-2012 12:03:12 
    2225 
    2326@author: mnagni 
     
    4144        super(IF_Feature, self).__init__() 
    4245 
    43  
    44  
    45  
    46  
    4746    def __key(self): 
    4847        return (self.theCV_DiscretePointCoverage, self.theCV_DiscreteGridPointCoverage) 
    4948 
    50     def __eq__(x, y): 
     49    def __eq__(self, y): 
    5150        ''' 
    5251        Cannot compare classes which do not define a "__key" attribute  
    5352        ''' 
    54         if hasattr(x, '_%s__key' % (type(x).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): 
    55             return x.__key() == y.__key() 
    56         return id(x) == id(y) 
     53        if hasattr(self, '_%s__key' % (type(self).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): 
     54            return self.__key() == y.__key() 
     55        return id(self) == id(y) 
    5756 
    5857    def __hash__(self): 
  • mauRepo/MolesManager/trunk/src/ea_model/iso_19129_2009_igcd/igcd_framework/if_gridcoverage.py

    r8087 r8088  
     1 
     2 
     3 
    14 
    25 
     
    2023 
    2124''' 
    22 Created on 06-Feb-2012 15:59:45 
     25Created on 10-Feb-2012 12:03:12 
    2326 
    2427@author: mnagni 
     
    4447        return () 
    4548 
    46     def __eq__(x, y): 
     49    def __eq__(self, y): 
    4750        ''' 
    4851        Cannot compare classes which do not define a "__key" attribute  
    4952        ''' 
    50         if hasattr(x, '_%s__key' % (type(x).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): 
    51             return x.__key() == y.__key() 
    52         return id(x) == id(y) 
     53        if hasattr(self, '_%s__key' % (type(self).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): 
     54            return self.__key() == y.__key() 
     55        return id(self) == id(y) 
    5356 
    5457    def __hash__(self): 
  • mauRepo/MolesManager/trunk/src/ea_model/iso_19129_2009_igcd/igcd_framework/if_quadgriddeddata.py

    r8087 r8088  
     1 
     2 
     3 
    14 
    25 
     
    2023 
    2124''' 
    22 Created on 06-Feb-2012 15:59:49 
     25Created on 10-Feb-2012 12:03:08 
    2326 
    2427@author: mnagni 
     
    3942        self._if_gridcoverage = IF_GridCoverage()        
    4043 
     44        self.domainExtent = [] 
    4145        self.interpolationType = None 
    42         self.domainExtent = [] 
    4346        self.commonPointRule = None 
    4447        self.rangeType = None 
     
    4649        super(IF_QuadGriddedData, self).__init__() 
    4750 
     51    def __key(self): 
     52        return (self.domainExtent, self.interpolationType, self.commonPointRule, self.rangeType, self.interpolationParametersType) 
    4853 
    49  
    50  
    51  
    52  
    53  
    54  
    55  
    56  
    57  
    58     def __key(self): 
    59         return (self.interpolationType, self.domainExtent, self.commonPointRule, self.rangeType, self.interpolationParametersType) 
    60  
    61     def __eq__(x, y): 
     54    def __eq__(self, y): 
    6255        ''' 
    6356        Cannot compare classes which do not define a "__key" attribute  
    6457        ''' 
    65         if hasattr(x, '_%s__key' % (type(x).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): 
    66             return x.__key() == y.__key() 
    67         return id(x) == id(y) 
     58        if hasattr(self, '_%s__key' % (type(self).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): 
     59            return self.__key() == y.__key() 
     60        return id(self) == id(y) 
    6861 
    6962    def __hash__(self): 
  • mauRepo/MolesManager/trunk/src/ea_model/iso_19129_2009_igcd/igcd_framework/if_qualitymetadata.py

    r8087 r8088  
     1 
     2 
     3 
    14 
    25 
     
    1922 
    2023''' 
    21 Created on 06-Feb-2012 15:59:42 
     24Created on 10-Feb-2012 12:03:13 
    2225 
    2326@author: mnagni 
     
    4245        return () 
    4346 
    44     def __eq__(x, y): 
     47    def __eq__(self, y): 
    4548        ''' 
    4649        Cannot compare classes which do not define a "__key" attribute  
    4750        ''' 
    48         if hasattr(x, '_%s__key' % (type(x).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): 
    49             return x.__key() == y.__key() 
    50         return id(x) == id(y) 
     51        if hasattr(self, '_%s__key' % (type(self).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): 
     52            return self.__key() == y.__key() 
     53        return id(self) == id(y) 
    5154 
    5255    def __hash__(self): 
  • mauRepo/MolesManager/trunk/src/ea_model/iso_19129_2009_igcd/igcd_framework/if_riemanngriddeddata.py

    r8087 r8088  
     1 
     2 
     3 
    14 
    25 
     
    2023 
    2124''' 
    22 Created on 06-Feb-2012 15:59:41 
     25Created on 10-Feb-2012 12:03:06 
    2326 
    2427@author: mnagni 
     
    3942        self._if_gridcoverage = IF_GridCoverage()        
    4043 
     44        self.domainExtent = [] 
    4145        self.interpolationType = None 
    42         self.domainExtent = [] 
    4346        self.commonPointRule = None 
    4447        self.rangeType = None 
     
    4649        super(IF_RiemannGriddedData, self).__init__() 
    4750 
     51    def __key(self): 
     52        return (self.domainExtent, self.interpolationType, self.commonPointRule, self.rangeType, self.interpolationParametersType) 
    4853 
    49  
    50  
    51  
    52  
    53  
    54  
    55  
    56  
    57  
    58     def __key(self): 
    59         return (self.interpolationType, self.domainExtent, self.commonPointRule, self.rangeType, self.interpolationParametersType) 
    60  
    61     def __eq__(x, y): 
     54    def __eq__(self, y): 
    6255        ''' 
    6356        Cannot compare classes which do not define a "__key" attribute  
    6457        ''' 
    65         if hasattr(x, '_%s__key' % (type(x).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): 
    66             return x.__key() == y.__key() 
    67         return id(x) == id(y) 
     58        if hasattr(self, '_%s__key' % (type(self).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): 
     59            return self.__key() == y.__key() 
     60        return id(self) == id(y) 
    6861 
    6962    def __hash__(self): 
  • mauRepo/MolesManager/trunk/src/ea_model/iso_19129_2009_igcd/igcd_framework/if_structuralmetadata.py

    r8087 r8088  
     1 
     2 
     3 
    14 
    25 
     
    1922 
    2023''' 
    21 Created on 06-Feb-2012 15:59:46 
     24Created on 10-Feb-2012 12:03:12 
    2225 
    2326@author: mnagni 
     
    4245        return () 
    4346 
    44     def __eq__(x, y): 
     47    def __eq__(self, y): 
    4548        ''' 
    4649        Cannot compare classes which do not define a "__key" attribute  
    4750        ''' 
    48         if hasattr(x, '_%s__key' % (type(x).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): 
    49             return x.__key() == y.__key() 
    50         return id(x) == id(y) 
     51        if hasattr(self, '_%s__key' % (type(self).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): 
     52            return self.__key() == y.__key() 
     53        return id(self) == id(y) 
    5154 
    5255    def __hash__(self): 
  • mauRepo/MolesManager/trunk/src/ea_model/iso_19129_2009_igcd/igcd_framework/if_surface.py

    r8087 r8088  
     1 
     2 
     3 
    14 
    25 
     
    1922 
    2023''' 
    21 Created on 06-Feb-2012 15:59:41 
     24Created on 10-Feb-2012 12:03:13 
    2225 
    2326@author: mnagni 
     
    4346        super(IF_Surface, self).__init__() 
    4447 
    45  
    46  
    47  
    48  
    49  
    50  
    51  
    52  
    5348    def __key(self): 
    5449        return (self.interpolation, self.numDerivativesOnBoundary, self.spanningSurface, self.boundary) 
    5550 
    56     def __eq__(x, y): 
     51    def __eq__(self, y): 
    5752        ''' 
    5853        Cannot compare classes which do not define a "__key" attribute  
    5954        ''' 
    60         if hasattr(x, '_%s__key' % (type(x).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): 
    61             return x.__key() == y.__key() 
    62         return id(x) == id(y) 
     55        if hasattr(self, '_%s__key' % (type(self).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): 
     56            return self.__key() == y.__key() 
     57        return id(self) == id(y) 
    6358 
    6459    def __hash__(self): 
  • mauRepo/MolesManager/trunk/src/ea_model/iso_19129_2009_igcd/igcd_framework/if_tiling.py

    r8087 r8088  
     1 
     2 
     3 
    14 
    25 
     
    1922 
    2023''' 
    21 Created on 06-Feb-2012 15:59:49 
     24Created on 10-Feb-2012 12:03:15 
    2225 
    2326@author: mnagni 
     
    4245        return () 
    4346 
    44     def __eq__(x, y): 
     47    def __eq__(self, y): 
    4548        ''' 
    4649        Cannot compare classes which do not define a "__key" attribute  
    4750        ''' 
    48         if hasattr(x, '_%s__key' % (type(x).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): 
    49             return x.__key() == y.__key() 
    50         return id(x) == id(y) 
     51        if hasattr(self, '_%s__key' % (type(self).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): 
     52            return self.__key() == y.__key() 
     53        return id(self) == id(y) 
    5154 
    5255    def __hash__(self): 
  • 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): 
  • mauRepo/MolesManager/trunk/src/ea_model/iso_19129_2009_igcd/igcd_framework/if_transmittal.py

    r8087 r8088  
     1 
     2 
     3 
    14 
    25 
     
    1922 
    2023''' 
    21 Created on 06-Feb-2012 15:59:44 
     24Created on 10-Feb-2012 12:03:06 
    2225 
    2326@author: mnagni 
     
    4245        return () 
    4346 
    44     def __eq__(x, y): 
     47    def __eq__(self, y): 
    4548        ''' 
    4649        Cannot compare classes which do not define a "__key" attribute  
    4750        ''' 
    48         if hasattr(x, '_%s__key' % (type(x).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): 
    49             return x.__key() == y.__key() 
    50         return id(x) == id(y) 
     51        if hasattr(self, '_%s__key' % (type(self).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): 
     52            return self.__key() == y.__key() 
     53        return id(self) == id(y) 
    5154 
    5255    def __hash__(self): 
Note: See TracChangeset for help on using the changeset viewer.