Changeset 8182 for mauRepo


Ignore:
Timestamp:
22/03/12 15:54:26 (8 years ago)
Author:
mnagni
Message:

Complete - # 22397: CEDA Observation geographicExtent
 http://team.ceda.ac.uk/trac/ceda/ticket/22397

Location:
mauRepo/MolesManager/trunk/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • mauRepo/MolesManager/trunk/src/MolesManager/djencoder.py

    r8143 r8182  
    3030        if d['__module__'].startswith('sqlalchemy'): 
    3131            return d 
    32         for key in obj.__dict__.keys(): 
    33             if not (key.startswith("_") or self.__pattern.match(key) or self.__pattern2.match(key)): 
    34                 d.update({key: getattr(obj, key)}) 
     32 
     33        if d['__class__'] == 'Decimal': 
     34            d.update({'value': str(obj)}) 
     35        else:     
     36            for key in obj.__dict__.keys(): 
     37                if not (key.startswith("_") or self.__pattern.match(key) or self.__pattern2.match(key)): 
     38                    d.update({key: getattr(obj, key)}) 
    3539        getters = list(methodsWithDecorator(type(obj), "property")) 
    3640        for name in getters: 
  • mauRepo/MolesManager/trunk/src/MolesManager/moles3epb.py

    r8180 r8182  
    44@author: mnagni 
    55''' 
    6 from MolesManager.settings import MOLES3_DB_CONNECTION, MOLES3_DB_SCRIPT 
    7 from libs.commons_db import DbManager 
    86from libs.epb import EPB 
    97from libs.migration.exception.exceptions import NoDBManager 
     
    1210from libs.migration.processor.check.check import moles3Append 
    1311from libs.migration.processor.commons import createDQ_Element 
    14 from ea_model.iso_19115_2006_metadata_corrigendum.reference_system_information.md_identifier import MD_Identifier 
    1512 
    1613#molesDB = DbManager(MOLES3_DB_CONNECTION, MOLES3_DB_SCRIPT) 
  • mauRepo/MolesManager/trunk/src/libs/migration/processor/commons.py

    r8181 r8182  
    491491    ex_geographic_bb = EX_GeographicBoundingBox() 
    492492    ex_geographic_bb.eastBoundLongitude = east 
    493     ex_geographic_bb.northBoundLongitude = north 
     493    ex_geographic_bb.northBoundLatitude = north 
    494494    ex_geographic_bb.westBoundLongitude = west 
    495     ex_geographic_bb.southBoundLongitude = south 
     495    ex_geographic_bb.southBoundLatitude = south 
    496496    return ex_geographic_bb 
    497497     
  • mauRepo/MolesManager/trunk/src/libs/migration/processor/deployment.py

    r8180 r8182  
    2626import logging 
    2727from ea_model.iso_19115_2006_metadata_corrigendum.citation_and_responsible_party_information.ci_onlinefunctioncode import CI_OnLineFunctionCode 
     28from libs.migration.processor.check.check import moles3Append 
    2829 
    2930class DeploymentProcessor(object): 
     
    202203            ge = extractGeographicExtentInMigrationDocument(self._dataEntityMigration) 
    203204        if ge: 
    204             observation.geographicExtent.append(createEX_GeographicBoundingBox(ge['east'], ge['north'], ge['west'], ge['south'])) 
     205            moles3Append(observation, 'geographicExtent', createEX_GeographicBoundingBox(ge['east'], ge['north'], ge['west'], ge['south'])) 
    205206 
    206207    def _assignDOI(self, observation): 
     
    223224        self._assignGeographicExtent(ceda_observation)     
    224225        self._assignDOI(ceda_observation)         
    225         self._migrationSessions.molesSession.commit() 
     226        #self._migrationSessions.molesSession.commit() 
    226227        #self._commitMoles3() 
    227228        #self._commitMigration() 
Note: See TracChangeset for help on using the changeset viewer.