Ignore:
Timestamp:
03/02/12 13:48:25 (8 years ago)
Author:
mnagni
Message:

Fixed the multiple CI_Party INSERT in the DB
Refactored the ingestion thanks to the new eq method in the imported classes DB library

Location:
mauRepo/MolesManager/trunk/src/ea_model/iso_19115_2006_metadata_corrigendum/maintenance_information
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • mauRepo/MolesManager/trunk/src/ea_model/iso_19115_2006_metadata_corrigendum/maintenance_information/md_maintenancefrequencycode.py

    r8074 r8086  
     1 
    12 
    23 
     
    1819 
    1920''' 
    20 Created on 26-Jan-2012 16:07:39 
     21Created on 03-Feb-2012 10:41:13 
    2122 
    2223@author: mnagni 
     
    3031        This class has been genererated automatically using the Apache Velocity project. 
    3132    ''' 
    32     cl_daily = "daily"  
     33    cl_unknown = "unknown"  
    3334    cl_biannually = "biannually"  
    34     cl_weekly = "weekly"  
     35    cl_annually = "annually"  
     36    cl_asneeded = "asNeeded"  
     37    cl_irregular = "irregular"  
    3538    cl_fortnightly = "fortnightly"  
    3639    cl_quarterly = "quarterly"  
    37     cl_asneeded = "asNeeded"  
     40    cl_daily = "daily"  
     41    cl_continual = "continual"  
     42    cl_weekly = "weekly"  
     43    cl_monthly = "monthly"  
    3844    cl_notplanned = "notPlanned"  
    39     cl_continual = "continual"  
    40     cl_annually = "annually"  
    41     cl_irregular = "irregular"  
    42     cl_monthly = "monthly"  
    43     cl_unknown = "unknown"  
  • mauRepo/MolesManager/trunk/src/ea_model/iso_19115_2006_metadata_corrigendum/maintenance_information/md_maintenanceinformation.py

    r8074 r8086  
     1 
    12 
    23 
     
    1718 
    1819''' 
    19 Created on 26-Jan-2012 16:07:28 
     20Created on 03-Feb-2012 10:41:10 
    2021 
    2122@author: mnagni 
     
    3738        self.maintenanceNote = [] 
    3839        self.updateScope = [] 
     40        self.contact = [] 
    3941        self.userDefinedMaintenanceFrequency = None 
    40         self.contact = [] 
    4142        self.maintenanceAndUpdateFrequency = None 
    4243        self.updateScopeDescription = [] 
     
    5758 
    5859 
     60 
     61    def __key(self): 
     62        return (self.maintenanceNote, self.updateScope, self.contact, self.userDefinedMaintenanceFrequency, self.maintenanceAndUpdateFrequency, self.updateScopeDescription, self.dateOfNextUpdate) 
     63 
     64    def __eq__(x, y): 
     65        ''' 
     66        Cannot compare classes which do not define a "__key" attribute  
     67        ''' 
     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) 
     71 
     72    def __hash__(self): 
     73        return hash(self.__key()) 
  • mauRepo/MolesManager/trunk/src/ea_model/iso_19115_2006_metadata_corrigendum/maintenance_information/md_scopecode.py

    r8074 r8086  
     1 
    12 
    23 
     
    1819 
    1920''' 
    20 Created on 26-Jan-2012 16:07:26 
     21Created on 03-Feb-2012 10:41:18 
    2122 
    2223@author: mnagni 
     
    3031        This class has been genererated automatically using the Apache Velocity project. 
    3132    ''' 
     33    cl_featuretype = "featureType"  
     34    cl_model = "model"  
    3235    cl_service = "service"  
    3336    cl_software = "software"  
     37    cl_feature = "feature"  
     38    cl_nongeographicdataset = "nonGeographicDataset"  
     39    cl_propertytype = "propertyType"  
     40    cl_fieldsession = "fieldSession"  
    3441    cl_tile = "tile"  
    35     cl_collectionhardware = "collectionHardware"  
    36     cl_attribute = "attribute"  
    37     cl_model = "model"  
    38     cl_attributetype = "attributeType"  
    39     cl_nongeographicdataset = "nonGeographicDataset"  
    40     cl_fieldsession = "fieldSession"  
    41     cl_feature = "feature"  
    42     cl_propertytype = "propertyType"  
    43     cl_collectionsession = "collectionSession"  
    4442    cl_dataset = "dataset"  
    4543    cl_series = "series"  
    46     cl_featuretype = "featureType"  
    4744    cl_dimensiongroup = "dimensionGroup"  
     45    cl_attributetype = "attributeType"  
     46    cl_collectionsession = "collectionSession"  
     47    cl_attribute = "attribute"  
     48    cl_collectionhardware = "collectionHardware"  
  • mauRepo/MolesManager/trunk/src/ea_model/iso_19115_2006_metadata_corrigendum/maintenance_information/md_scopedescription.py

    r8074 r8086  
     1 
    12 
    23 
     
    2122 
    2223''' 
    23 Created on 26-Jan-2012 16:07:29 
     24Created on 03-Feb-2012 10:41:13 
    2425 
    2526@author: mnagni 
     
    3334        This class has been genererated automatically using the Apache Velocity project. 
    3435    ''' 
    35     types = {'attributes':GF_AttributeType,'attributeInstances':GF_AttributeType,'other':Text,'dataset':Text,'features':GF_FeatureType,'featureInstances':GF_FeatureType} 
     36    types = {'attributes':GF_AttributeType,'features':GF_FeatureType,'featureInstances':GF_FeatureType,'dataset':Text,'other':Text,'attributeInstances':GF_AttributeType} 
Note: See TracChangeset for help on using the changeset viewer.