Changeset 8424


Ignore:
Timestamp:
02/07/12 15:15:39 (7 years ago)
Author:
mnagni
Message:

Complete - # 22488: CEDA Observation Collection - Geographical Extent
 http://team.ceda.ac.uk/trac/ceda/ticket/22488
Complete - # 22513: Missing ValidTime? tag in the CedaSearch?
 http://team.ceda.ac.uk/trac/ceda/ticket/22513

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

Legend:

Unmodified
Added
Removed
  • mauRepo/MolesManager/trunk/src/dropAllTables.sql

    r8409 r8424  
    6767DROP SEQUENCE IF EXISTS nt_junction_id_seq CASCADE; 
    6868DROP TABLE IF EXISTS angle CASCADE; 
    69 DROP TABLE IF EXISTS any CASCADE; 
     69DROP TABLE IF EXISTS "any" CASCADE; 
    7070DROP TABLE IF EXISTS cc_concatenatedoperation CASCADE; 
    7171DROP TABLE IF EXISTS cc_concatenatedoperation_cc_concatenatedoperation CASCADE; 
  • mauRepo/MolesManager/trunk/src/libs/migration/MigrationEPB.py

    r8336 r8424  
    109109                        setattr(coll, k, val) 
    110110        EPB.persistInstance(coll, self._session)                              
    111              
    112     def loadAttributes(self, instance, attributes): 
    113         """ 
    114             Returns the attribute of an instance. The parameter "attributes" is a single string or a list of attributes  
    115             owned by the instance of "clazz". Furthermore such list may contain  
    116             also the children of the main attributes. For example "attrs" may look  
    117             like 
    118             ['resultAccumulation', 'identifier.authority', 'resultTime.position.dateTime8601.month', \ 
    119                       'relatedParty.party', 'result.source.function', 'permission', \ 
    120                       'geographicExtent', 'phenomenonTime', 'keywords', 'description', \ 
    121                       'inSupportOf.abstract', 'dataLineage'] 
    122             the first parameter refers to the main class so is equivalent to  
    123             clazz.resultAccumulation 
    124             the second parameter is equivalent to invoke 
    125             clazz.identifier.authority 
    126             As single string "attributes" could be as well just 'identifier.authority' 
    127             @param instance: an instance containing the appropriate id 
    128             @param attributes: the attribute value required 
    129             @param session: the session to use for the operation 
    130             @return: a detached instance (or array of instances) of the required attribute.                      
    131         """ 
    132         instance = self._session.merge(instance) 
    133         EPB.loadAttributes(instance, attributes)                         
    134         return instance   
    135111 
    136112    def search(self, clazz, inst_id): 
     
    139115        ret = EPB.search(clazz, inst_id, self._session) 
    140116        return ret  
    141           
  • mauRepo/MolesManager/trunk/src/libs/migration/processor/commons.py

    r8416 r8424  
    7777DS_WORKING = 'working' 
    7878DS_PUBLISHED = 'Published' 
    79 docStatus = (DS_pUBLISHED, DS_WORKING, DS_PUBLISHED) 
     79DOC_STATUS = (DS_pUBLISHED, DS_WORKING, DS_PUBLISHED) 
    8080 
    8181DT_DEPLOYMENTS = 'deployments' 
     
    8383DT_DEPLOYMENT_DATA = 'deployment_data' 
    8484DT_DATA_GRANULES = 'data_granules' 
    85 docTypes = (DT_DEPLOYMENTS, DT_DATA_ENTITIES, DT_DEPLOYMENT_DATA, DT_DATA_GRANULES) 
     85DOC_TYPES = (DT_DEPLOYMENTS, DT_DATA_ENTITIES, DT_DEPLOYMENT_DATA, DT_DATA_GRANULES) 
    8686 
    8787DO_BADC = 'badc.nerc.ac.uk' 
  • mauRepo/MolesManager/trunk/src/libs/migration/processor/dataEntity.py

    r8423 r8424  
    4747from MolesManager.codelist import MM_ObservationPublicationStateValue,\ 
    4848    getCLValue 
    49 from ea_model.ceda_metadatamodel.ceda_observationcollection.ceda_observationcollection import CEDA_ObservationCollection 
    50  
     49from ea_model.ceda_metadatamodel.ceda_observationcollection.ceda_observationcollection import CEDA_ObservationCollection  
    5150CEDA_TITLE = 'ceda_title' 
    5251 
  • mauRepo/MolesManager/trunk/src/libs/migration/processor/deployment.py

    r8416 r8424  
    283283        i_category = getCLValue(CEDA_CurationValue.cl_a)                                   
    284284        if infodb_de and infodb_de.has_key('category') and infodb_de['category']: 
    285             i_category = CEDA_CurationValue.from_string(infodb_de['category'].lower())         
     285            i_category = getCLValue(CEDA_CurationValue.from_string(infodb_de['category'].lower()))       
    286286 
    287287        if not self._deploymentHasBeenProcessed:                      
  • mauRepo/MolesManager/trunk/src/libs/migration/processor/loadResources.py

    r8358 r8424  
    3131@author: Maurizio Nagni 
    3232''' 
    33 from libs.migration.processor.commons import docStatus, getCollectionRefs,\ 
     33from libs.migration.processor.commons import DOC_STATUS, getCollectionRefs,\ 
    3434    findMolesCreationDate, findID, stringToTimestamp, buildExistTypePath,\ 
    3535    buildExistDocPath, DT_DATA_ENTITIES, DT_DEPLOYMENTS, DT_DEPLOYMENT_DATA,\ 
    36     getOwnerRefs, getAtomDocumentAsElementtree, getAtomDocumentHash 
     36    getOwnerRefs, getAtomDocumentAsElementtree 
    3737from libs.migration.exception.exceptions import NoCreationDate, NoDocumentID 
    3838from libs.migration.db.classes import DeploymentDataMigration,\ 
     
    5252        """  
    5353        ex = []        
    54         for status in docStatus:        
     54        for status in DOC_STATUS:        
    5555            ex.extend(self._loadCollections(status, DT_DATA_ENTITIES, DataEntityMigration)) 
    5656            ex.extend(self._loadCollections(status, DT_DEPLOYMENTS, DeploymentsMigration)) 
Note: See TracChangeset for help on using the changeset viewer.