Changeset 8409


Ignore:
Timestamp:
26/06/12 16:53:02 (7 years ago)
Author:
mnagni
Message:

Incomplete - # 22490: CEDA Observation Collection - Description
 http://team.ceda.ac.uk/trac/ceda/ticket/22490

Location:
mauRepo/MolesManager/trunk/src
Files:
1 deleted
16 edited

Legend:

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

    r8408 r8409  
    3232''' 
    3333from libs.epb import EPB 
    34 from ea_model.ceda_metadatamodel.ceda_observationcollection.ceda_observationcollection import CEDA_ObservationCollection 
    35 from ea_model.ceda_metadatamodel.ceda_observation.ceda_observation import CEDA_Observation 
    3634from ea_model.moles3_4.observationcollection.mo_observationcollection import MO_ObservationCollection 
    3735from ea_model.moles3_4.observation.mo_observation import MO_Observation 
    38 from ea_model.ceda_metadatamodel.ceda_project.ceda_project import CEDA_Project 
    3936from sqlalchemy import Table, Column, ForeignKey, Integer, String 
    4037from sqlalchemy.orm import mapper 
     
    4542from ea_model.iso_19115_2006_metadata_corrigendum.extent_information.ex_geographicboundingbox import EX_GeographicBoundingBox 
    4643from libs.postgisutil import unifyGeometries, create_st_setSRID 
     44from ea_model.ceda_metadatamodel.ceda_observationcollection.ceda_observationcollection import CEDA_ObservationCollection 
     45from ea_model.ceda_metadatamodel.ceda_observation.ceda_observation import CEDA_Observation 
     46from ea_model.ceda_metadatamodel.ceda_project.ceda_project import CEDA_Project 
    4747 
    4848class Moles3EPBFactory(EPB): 
     
    9898         
    9999    def searchEager(self, clazz, inst_id): 
    100         return EPB.searchEager(clazz, inst_id)      
     100        return EPB.searchEager(clazz, inst_id, self._session)      
    101101      
    102102    def persistInstance(self, instance): 
  • mauRepo/MolesManager/trunk/src/MolesManager/views/cedaBrowse.py

    r8321 r8409  
    55from django.shortcuts import render_to_response 
    66from django.core.context_processors import csrf 
    7 from ea_model.ceda_metadatamodel.ceda_observation.ceda_observation import CEDA_Observation 
    87from MolesManager.moles3epb import Moles3EPB 
    98from MolesManager.djencoder import DJEncoder 
    109from django.utils.safestring import mark_safe 
     10from ea_model.ceda_metadatamodel.ceda_observation.ceda_observation import CEDA_Observation 
    1111 
    1212def browseView(request, obs_id_str): 
  • mauRepo/MolesManager/trunk/src/MolesManager/views/cedaInstrument.py

    r8323 r8409  
    66from django.shortcuts import render_to_response 
    77from django.core.context_processors import csrf 
    8 from MolesManager.forms.commons import ObjectById 
    9 from ea_model.ceda_metadatamodel.ceda_observation.ceda_observation import CEDA_Observation 
    108from MolesManager.moles3epb import Moles3EPB 
    119from MolesManager.djencoder import DJEncoder 
     10from ea_model.ceda_metadatamodel.ceda_observation.ceda_observation import CEDA_Observation 
    1211 
    1312 
  • mauRepo/MolesManager/trunk/src/MolesManager/views/cedaObservationView.py

    r8408 r8409  
    11''' 
     2BSD Licence 
     3Copyright (c) 2012, Science & Technology Facilities Council (STFC) 
     4All rights reserved. 
     5 
     6Redistribution and use in source and binary forms, with or without modification,  
     7are permitted provided that the following conditions are met: 
     8 
     9    * Redistributions of source code must retain the above copyright notice,  
     10        this list of conditions and the following disclaimer. 
     11    * Redistributions in binary form must reproduce the above copyright notice, 
     12        this list of conditions and the following disclaimer in the documentation 
     13        and/or other materials provided with the distribution. 
     14    * Neither the name of the Science & Technology Facilities Council (STFC)  
     15        nor the names of its contributors may be used to endorse or promote  
     16        products derived from this software without specific prior written permission. 
     17 
     18THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"  
     19AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,  
     20THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR  
     21PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 
     22BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,  
     23OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF  
     24SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
     25HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 
     26OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE  
     27OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
     28 
    229Created on 1 Nov 2011 
    330 
     
    633from django.shortcuts import render_to_response 
    734from django.core.context_processors import csrf 
    8 from ea_model.ceda_metadatamodel.ceda_observation.ceda_observation import CEDA_Observation 
    935from MolesManager.djencoder import DJEncoder 
    1036from django.utils.safestring import mark_safe 
     37from ea_model.ceda_metadatamodel.ceda_observation.ceda_observation import CEDA_Observation 
     38 
    1139 
    1240 
  • mauRepo/MolesManager/trunk/src/MolesManager/views/cedaPlatform.py

    r8323 r8409  
    77from django.core.context_processors import csrf 
    88from MolesManager.forms.commons import ObjectById 
    9 from ea_model.ceda_metadatamodel.ceda_observation.ceda_observation import CEDA_Observation 
    109from MolesManager.moles3epb import Moles3EPB 
    1110from MolesManager.djencoder import DJEncoder 
     11from ea_model.ceda_metadatamodel.ceda_observation.ceda_observation import CEDA_Observation 
    1212 
    1313 
  • mauRepo/MolesManager/trunk/src/MolesManager/views/cedaProjectView.py

    r8323 r8409  
    66from django.shortcuts import render_to_response 
    77from django.core.context_processors import csrf 
    8 from MolesManager.forms.commons import ObjectById 
    9 from ea_model.ceda_metadatamodel.ceda_observation.ceda_observation import CEDA_Observation 
    108from MolesManager.moles3epb import Moles3EPB 
    119from MolesManager.djencoder import DJEncoder 
     10from ea_model.ceda_metadatamodel.ceda_observation.ceda_observation import CEDA_Observation 
    1211 
    1312 
  • mauRepo/MolesManager/trunk/src/dropAllTables.sql

    r8245 r8409  
    1919 ORDER BY 1;   
    2020 
     21DROP SEQUENCE IF EXISTS ad_abstractaddress_id_seq CASCADE; 
     22DROP SEQUENCE IF EXISTS arcbycenterpoint_id_seq CASCADE; 
     23DROP SEQUENCE IF EXISTS cell_id_seq CASCADE; 
     24DROP SEQUENCE IF EXISTS cellularcomplex_id_seq CASCADE; 
     25DROP SEQUENCE IF EXISTS eg_pointestimate_id_seq CASCADE; 
     26DROP SEQUENCE IF EXISTS fd_featurecollection_id_seq CASCADE; 
     27DROP SEQUENCE IF EXISTS fd_feature_id_seq CASCADE; 
     28DROP SEQUENCE IF EXISTS fd_featurename_id_seq CASCADE; 
     29DROP SEQUENCE IF EXISTS lr_element_id_seq CASCADE; 
     30DROP SEQUENCE IF EXISTS lr_feature_id_seq CASCADE; 
     31DROP SEQUENCE IF EXISTS lr_linearreferencemethod_id_seq CASCADE; 
     32DROP SEQUENCE IF EXISTS lr_offsetexpression_id_seq CASCADE; 
     33DROP SEQUENCE IF EXISTS lr_positionexpression_id_seq CASCADE; 
     34DROP SEQUENCE IF EXISTS lr_referencemarker_id_seq CASCADE; 
     35DROP SEQUENCE IF EXISTS mo_citation_id_seq CASCADE; 
     36DROP SEQUENCE IF EXISTS mo_individual_id_seq CASCADE; 
     37DROP SEQUENCE IF EXISTS mo_organisation_id_seq CASCADE; 
     38DROP SEQUENCE IF EXISTS mo_party_id_seq CASCADE; 
     39DROP SEQUENCE IF EXISTS nl_compositecurve_id_seq CASCADE; 
     40DROP SEQUENCE IF EXISTS nl_composite_id_seq CASCADE; 
     41DROP SEQUENCE IF EXISTS nl_compositepoint_id_seq CASCADE; 
     42DROP SEQUENCE IF EXISTS nl_compsitesurface_id_seq CASCADE; 
     43DROP SEQUENCE IF EXISTS nl_curve_id_seq CASCADE; 
     44DROP SEQUENCE IF EXISTS nl_curvesegment_id_seq CASCADE; 
     45DROP SEQUENCE IF EXISTS nl_map_id_seq CASCADE; 
     46DROP SEQUENCE IF EXISTS nl_orientablecurve_id_seq CASCADE; 
     47DROP SEQUENCE IF EXISTS nl_orientablesurface_id_seq CASCADE; 
     48DROP SEQUENCE IF EXISTS nl_point_id_seq CASCADE; 
     49DROP SEQUENCE IF EXISTS nl_primitve_id_seq CASCADE; 
     50DROP SEQUENCE IF EXISTS nl_ring_id_seq CASCADE; 
     51DROP SEQUENCE IF EXISTS nl_surfaceboundary_id_seq CASCADE; 
     52DROP SEQUENCE IF EXISTS nl_surface_id_seq CASCADE; 
     53DROP SEQUENCE IF EXISTS nl_surfacepatch_id_seq CASCADE; 
     54DROP SEQUENCE IF EXISTS ns_avoidlist_id_seq CASCADE; 
     55DROP SEQUENCE IF EXISTS ns_costedlink_id_seq CASCADE; 
     56DROP SEQUENCE IF EXISTS ns_costedturn_id_seq CASCADE; 
     57DROP SEQUENCE IF EXISTS ns_costfunction_id_seq CASCADE; 
     58DROP SEQUENCE IF EXISTS ns_routerequest_id_seq CASCADE; 
     59DROP SEQUENCE IF EXISTS nt_advisorydirection_id_seq CASCADE; 
     60DROP SEQUENCE IF EXISTS nt_advisorydistance_id_seq CASCADE; 
     61DROP SEQUENCE IF EXISTS nt_advisoryelement_id_seq CASCADE; 
     62DROP SEQUENCE IF EXISTS nt_advisory_id_seq CASCADE; 
     63DROP SEQUENCE IF EXISTS nt_advisoryspatialrelation_id_seq CASCADE; 
     64DROP SEQUENCE IF EXISTS nt_combinednetwork_id_seq CASCADE; 
     65DROP SEQUENCE IF EXISTS nt_constraint_id_seq CASCADE; 
     66DROP SEQUENCE IF EXISTS nt_exitassociation_id_seq CASCADE; 
     67DROP SEQUENCE IF EXISTS nt_junction_id_seq CASCADE; 
    2168DROP TABLE IF EXISTS angle CASCADE; 
    22 DROP TABLE IF EXISTS "any" CASCADE; 
     69DROP TABLE IF EXISTS any CASCADE; 
    2370DROP TABLE IF EXISTS cc_concatenatedoperation CASCADE; 
    2471DROP TABLE IF EXISTS cc_concatenatedoperation_cc_concatenatedoperation CASCADE; 
     
    74121DROP TABLE IF EXISTS ci_series CASCADE; 
    75122DROP TABLE IF EXISTS ci_telephone CASCADE; 
    76 DROP TABLE IF EXISTS class08_4 CASCADE; 
    77 DROP TABLE IF EXISTS class09_1 CASCADE; 
    78 DROP TABLE IF EXISTS class09_2 CASCADE; 
    79 DROP TABLE IF EXISTS class09_3 CASCADE; 
    80 DROP TABLE IF EXISTS class09_4 CASCADE; 
    81 DROP TABLE IF EXISTS class10_1 CASCADE; 
    82 DROP TABLE IF EXISTS class12_1 CASCADE; 
    83 DROP TABLE IF EXISTS class12_2 CASCADE; 
    84 DROP TABLE IF EXISTS class12_3 CASCADE; 
    85 DROP TABLE IF EXISTS class12_4 CASCADE; 
    86123DROP TABLE IF EXISTS cl_classificationcollection CASCADE; 
    87124DROP TABLE IF EXISTS cl_classificationcollection_cv_surfacevaluepair CASCADE; 
     
    572609DROP TABLE IF EXISTS uomscale CASCADE; 
    573610DROP TABLE IF EXISTS url CASCADE; 
    574 DROP TABLE IF EXISTS data_entity_migration CASCADE; 
    575 DROP TABLE IF EXISTS deployment_data_migration CASCADE; 
    576 DROP TABLE IF EXISTS deployments_migration CASCADE; 
    577611DROP TABLE IF EXISTS cv_solidvaluepair_cv_discretecoverage CASCADE; 
    578 DROP TABLE IF EXISTS ceda_guid CASCADE; 
     612DROP TABLE IF EXISTS geometries CASCADE; 
     613DROP TABLE IF EXISTS geometry_columns CASCADE; 
     614DROP TABLE IF EXISTS spatial_ref_sys CASCADE; 
     615DROP TABLE IF EXISTS ad_abstractaddress CASCADE; 
     616DROP TABLE IF EXISTS arcbycenterpoint CASCADE; 
     617DROP TABLE IF EXISTS cell CASCADE; 
     618DROP TABLE IF EXISTS cell_cellularcomplex CASCADE; 
     619DROP TABLE IF EXISTS cell_gm_complex CASCADE; 
     620DROP TABLE IF EXISTS cell_gm_composite CASCADE; 
     621DROP TABLE IF EXISTS cell_gm_primitive CASCADE; 
     622DROP TABLE IF EXISTS cell_tp_complex CASCADE; 
     623DROP TABLE IF EXISTS cell_tp_primitive CASCADE; 
     624DROP TABLE IF EXISTS cellularcomplex CASCADE; 
     625DROP TABLE IF EXISTS cellularcomplex_cell CASCADE; 
     626DROP TABLE IF EXISTS cellularcomplex_gm_complex CASCADE; 
     627DROP TABLE IF EXISTS cellularcomplex_gm_primitive CASCADE; 
     628DROP TABLE IF EXISTS cellularcomplex_tp_complex CASCADE; 
     629DROP TABLE IF EXISTS cellularcomplex_tp_primitive CASCADE; 
     630DROP TABLE IF EXISTS eg_pointestimate CASCADE; 
     631DROP TABLE IF EXISTS ex_extent_mo_responsiblepartyinfo CASCADE; 
     632DROP TABLE IF EXISTS fd_feature CASCADE; 
     633DROP TABLE IF EXISTS fd_featurecollection CASCADE; 
     634DROP TABLE IF EXISTS fd_featurecollection_fd_feature CASCADE; 
     635DROP TABLE IF EXISTS fd_feature_fd_featurecollection CASCADE; 
     636DROP TABLE IF EXISTS fd_featurename CASCADE; 
     637DROP TABLE IF EXISTS fd_feature_ns_avoidlist CASCADE; 
     638DROP TABLE IF EXISTS gf_featuretype_ns_avoidlist CASCADE; 
     639DROP TABLE IF EXISTS gm_composite_gm_complex CASCADE; 
     640DROP TABLE IF EXISTS gm_composite_gm_primitive CASCADE; 
     641DROP TABLE IF EXISTS lr_element CASCADE; 
     642DROP TABLE IF EXISTS lr_feature CASCADE; 
     643DROP TABLE IF EXISTS lr_linearreferencemethod CASCADE; 
     644DROP TABLE IF EXISTS lr_offsetexpression CASCADE; 
     645DROP TABLE IF EXISTS lr_positionexpression CASCADE; 
     646DROP TABLE IF EXISTS lr_referencemarker CASCADE; 
     647DROP TABLE IF EXISTS mo_acquisition_mo_compositeprocess CASCADE; 
     648DROP TABLE IF EXISTS mo_citation CASCADE; 
     649DROP TABLE IF EXISTS mo_individual CASCADE; 
     650DROP TABLE IF EXISTS mo_instrument_mo_acquisition CASCADE; 
     651DROP TABLE IF EXISTS mo_operation_mo_acquisition CASCADE; 
     652DROP TABLE IF EXISTS mo_organisation CASCADE; 
     653DROP TABLE IF EXISTS mo_organisation_mo_responsiblepartyinfo CASCADE; 
     654DROP TABLE IF EXISTS mo_party CASCADE; 
     655DROP TABLE IF EXISTS mo_platform_mo_acquisition CASCADE; 
     656DROP TABLE IF EXISTS mo_platform_mo_operation CASCADE; 
     657DROP TABLE IF EXISTS mo_responsiblepartyinfo_mo_acquisition CASCADE; 
     658DROP TABLE IF EXISTS mo_responsiblepartyinfo_mo_compositeprocess CASCADE; 
     659DROP TABLE IF EXISTS mo_responsiblepartyinfo_mo_instrument CASCADE; 
     660DROP TABLE IF EXISTS mo_responsiblepartyinfo_mo_observation CASCADE; 
     661DROP TABLE IF EXISTS mo_responsiblepartyinfo_mo_operation CASCADE; 
     662DROP TABLE IF EXISTS mo_responsiblepartyinfo_mo_organisation CASCADE; 
     663DROP TABLE IF EXISTS mo_responsiblepartyinfo_mo_platform CASCADE; 
     664DROP TABLE IF EXISTS mo_responsiblepartyinfo_mo_processing CASCADE; 
     665DROP TABLE IF EXISTS mo_responsiblepartyinfo_mo_project CASCADE; 
     666DROP TABLE IF EXISTS nl_composite CASCADE; 
     667DROP TABLE IF EXISTS nl_compositecurve CASCADE; 
     668DROP TABLE IF EXISTS nl_compositecurve_nl_compositecurve CASCADE; 
     669DROP TABLE IF EXISTS nl_compositepoint CASCADE; 
     670DROP TABLE IF EXISTS nl_compsitesurface CASCADE; 
     671DROP TABLE IF EXISTS nl_compsitesurface_nl_compsitesurface CASCADE; 
     672DROP TABLE IF EXISTS nl_curve CASCADE; 
     673DROP TABLE IF EXISTS nl_curvesegment CASCADE; 
     674DROP TABLE IF EXISTS nl_map CASCADE; 
     675DROP TABLE IF EXISTS nl_orientablecurve CASCADE; 
     676DROP TABLE IF EXISTS nl_orientablesurface CASCADE; 
     677DROP TABLE IF EXISTS nl_point CASCADE; 
     678DROP TABLE IF EXISTS nl_primitve CASCADE; 
     679DROP TABLE IF EXISTS nl_ring CASCADE; 
     680DROP TABLE IF EXISTS nl_surfaceboundary CASCADE; 
     681DROP TABLE IF EXISTS nl_surface CASCADE; 
     682DROP TABLE IF EXISTS nl_surfacepatch CASCADE; 
     683DROP TABLE IF EXISTS ns_avoidlist CASCADE; 
     684DROP TABLE IF EXISTS ns_costedlink CASCADE; 
     685DROP TABLE IF EXISTS ns_costedturn CASCADE; 
     686DROP TABLE IF EXISTS ns_costfunction CASCADE; 
     687DROP TABLE IF EXISTS ns_costfunction_ns_routerequest CASCADE; 
     688DROP TABLE IF EXISTS ns_routerequest CASCADE; 
     689DROP TABLE IF EXISTS ns_routerequest_ns_costfunction CASCADE; 
     690DROP TABLE IF EXISTS nt_advisory CASCADE; 
     691DROP TABLE IF EXISTS nt_advisorydirection CASCADE; 
     692DROP TABLE IF EXISTS nt_advisorydistance CASCADE; 
     693DROP TABLE IF EXISTS nt_advisoryelement CASCADE; 
     694DROP TABLE IF EXISTS nt_advisoryspatialrelation CASCADE; 
     695DROP TABLE IF EXISTS nt_combinednetwork CASCADE; 
     696DROP TABLE IF EXISTS nt_combinednetwork_nt_combinednetwork CASCADE; 
     697DROP TABLE IF EXISTS nt_constraint CASCADE; 
     698DROP TABLE IF EXISTS nt_exitassociation CASCADE; 
     699DROP TABLE IF EXISTS nt_junction CASCADE; 
     700DROP TABLE IF EXISTS nt_junction_nt_network CASCADE; 
     701DROP TABLE IF EXISTS nt_junction_nt_transfernode CASCADE; 
     702DROP TABLE IF EXISTS nt_laneconstraint CASCADE; 
     703DROP TABLE IF EXISTS nt_link CASCADE; 
     704DROP TABLE IF EXISTS nt_link_lr_linearreferencemethod CASCADE; 
     705DROP TABLE IF EXISTS nt_link_nt_junction CASCADE; 
     706DROP TABLE IF EXISTS nt_link_nt_maneuver CASCADE; 
     707DROP TABLE IF EXISTS nt_link_nt_network CASCADE; 
     708DROP TABLE IF EXISTS nt_linkposition CASCADE; 
     709DROP TABLE IF EXISTS nt_link_tp_face CASCADE; 
     710DROP TABLE IF EXISTS nt_link_tp_node CASCADE; 
     711DROP TABLE IF EXISTS nt_maneuver CASCADE; 
     712DROP TABLE IF EXISTS nt_maneuver_nt_link CASCADE; 
     713DROP TABLE IF EXISTS nt_maneuver_nt_route CASCADE; 
     714DROP TABLE IF EXISTS nt_maneuver_nt_turn CASCADE; 
     715DROP TABLE IF EXISTS nt_network CASCADE; 
     716DROP TABLE IF EXISTS nt_networkposition CASCADE; 
     717DROP TABLE IF EXISTS nt_network_tp_complex CASCADE; 
     718DROP TABLE IF EXISTS nt_network_tp_primitive CASCADE; 
     719DROP TABLE IF EXISTS nt_route CASCADE; 
     720DROP TABLE IF EXISTS nt_route_nt_combinednetwork CASCADE; 
     721DROP TABLE IF EXISTS nt_routesummary CASCADE; 
     722DROP TABLE IF EXISTS nt_temporalconstraint CASCADE; 
     723DROP TABLE IF EXISTS nt_transfer CASCADE; 
     724DROP TABLE IF EXISTS nt_transferlink CASCADE; 
     725DROP TABLE IF EXISTS nt_transfernode CASCADE; 
     726DROP TABLE IF EXISTS nt_transfernode_nt_combinednetwork CASCADE; 
     727DROP TABLE IF EXISTS nt_turn CASCADE; 
     728DROP TABLE IF EXISTS nt_turn_nt_junction CASCADE; 
     729DROP TABLE IF EXISTS nt_turn_nt_link CASCADE; 
     730DROP TABLE IF EXISTS nt_turn_nt_maneuver CASCADE; 
     731DROP TABLE IF EXISTS nt_turn_nt_network CASCADE; 
     732DROP TABLE IF EXISTS nt_vehicleconstraint CASCADE; 
     733DROP TABLE IF EXISTS nt_waypoint CASCADE; 
     734DROP TABLE IF EXISTS nt_waypointlist CASCADE; 
     735DROP TABLE IF EXISTS polygon CASCADE; 
     736DROP TABLE IF EXISTS rectangle CASCADE; 
     737DROP TABLE IF EXISTS si_gazetteer CASCADE; 
     738DROP TABLE IF EXISTS si_gazetteer_si_locationinstance CASCADE; 
     739DROP TABLE IF EXISTS si_locationinstance CASCADE; 
     740DROP TABLE IF EXISTS si_locationinstance_si_gazetteer CASCADE; 
     741DROP TABLE IF EXISTS si_locationinstance_si_locationinstance CASCADE; 
     742DROP TABLE IF EXISTS si_locationtype CASCADE; 
     743DROP TABLE IF EXISTS si_locationtype_si_gazetteer CASCADE; 
     744DROP TABLE IF EXISTS si_locationtype_si_locationtype CASCADE; 
     745DROP TABLE IF EXISTS si_locationtype_si_spatialreferencesystemusinggeographicidenti CASCADE; 
     746DROP TABLE IF EXISTS simplex CASCADE; 
     747DROP TABLE IF EXISTS simplex_gm_complex CASCADE; 
     748DROP TABLE IF EXISTS simplex_gm_composite CASCADE; 
     749DROP TABLE IF EXISTS simplex_gm_primitive CASCADE; 
     750DROP TABLE IF EXISTS simplex_simplicialcomplex CASCADE; 
     751DROP TABLE IF EXISTS simplex_tp_complex CASCADE; 
     752DROP TABLE IF EXISTS simplex_tp_primitive CASCADE; 
     753DROP TABLE IF EXISTS simplicialcomplex CASCADE; 
     754DROP TABLE IF EXISTS simplicialcomplex_simplex CASCADE; 
     755DROP TABLE IF EXISTS si_spatialreferencesystemusinggeographicidentifiers CASCADE; 
     756DROP TABLE IF EXISTS si_spatialreferencesystemusinggeographicidentifiers_si_locatio CASCADE; 
     757DROP TABLE IF EXISTS taxonomicclassification CASCADE; 
     758DROP TABLE IF EXISTS taxonomysystem CASCADE; 
     759DROP TABLE IF EXISTS temporalcrs CASCADE; 
     760DROP TABLE IF EXISTS temporaldatum CASCADE; 
     761DROP TABLE IF EXISTS timecs CASCADE; 
     762DROP TABLE IF EXISTS tk_position CASCADE; 
     763DROP TABLE IF EXISTS tm_intervallength CASCADE; 
     764DROP TABLE IF EXISTS topocurve CASCADE; 
     765DROP TABLE IF EXISTS topopoint CASCADE; 
     766DROP TABLE IF EXISTS toposurface CASCADE; 
     767DROP TABLE IF EXISTS topovolume CASCADE; 
     768DROP TABLE IF EXISTS tp_edge_tp_face CASCADE; 
     769DROP TABLE IF EXISTS tp_edge_tp_node CASCADE; 
     770DROP TABLE IF EXISTS uomweight CASCADE; 
     771DROP TABLE IF EXISTS vouchers CASCADE; 
     772DROP TABLE IF EXISTS weight CASCADE; 
    579773 
    580774 
     775 
     776DROP TABLE IF EXISTS ceda_guid CASCADE; 
     777UPDATE data_entity_migration  
     778        set ceda_observation_coll_id = NULL, doc_hash = NULL; 
     779 
     780UPDATE deployments_migration  
     781        set ceda_observation_id = NULL, doc_hash = NULL; 
     782         
     783UPDATE deployment_data_migration  
     784        set ceda_processing_id = NULL, ceda_instrument_id = NULL, 
     785        ceda_compositeprocess_id = NULL, ceda_acquisition_id = NULL, 
     786        ceda_project_id = NULL, doc_hash = NULL; 
     787DROP TABLE IF EXISTS data_entity_migration CASCADE; 
     788DROP TABLE IF EXISTS deployments_migration CASCADE; 
     789DROP TABLE IF EXISTS deployment_data_migration CASCADE; 
    581790 
    582791DROP SEQUENCE IF EXISTS angle_id_seq CASCADE; 
     
    9671176DROP SEQUENCE IF EXISTS uomscale_id_seq CASCADE; 
    9681177DROP SEQUENCE IF EXISTS url_id_seq CASCADE; 
     1178DROP SEQUENCE IF EXISTS nt_laneconstraint_id_seq CASCADE; 
     1179DROP SEQUENCE IF EXISTS nt_link_id_seq CASCADE; 
     1180DROP SEQUENCE IF EXISTS nt_linkposition_id_seq CASCADE; 
     1181DROP SEQUENCE IF EXISTS nt_maneuver_id_seq CASCADE; 
     1182DROP SEQUENCE IF EXISTS nt_network_id_seq CASCADE; 
     1183DROP SEQUENCE IF EXISTS nt_networkposition_id_seq CASCADE; 
     1184DROP SEQUENCE IF EXISTS nt_route_id_seq CASCADE; 
     1185DROP SEQUENCE IF EXISTS nt_routesummary_id_seq CASCADE; 
     1186DROP SEQUENCE IF EXISTS nt_temporalconstraint_id_seq CASCADE; 
     1187DROP SEQUENCE IF EXISTS nt_transfer_id_seq CASCADE; 
     1188DROP SEQUENCE IF EXISTS nt_transferlink_id_seq CASCADE; 
     1189DROP SEQUENCE IF EXISTS nt_transfernode_id_seq CASCADE; 
     1190DROP SEQUENCE IF EXISTS nt_turn_id_seq CASCADE; 
     1191DROP SEQUENCE IF EXISTS nt_vehicleconstraint_id_seq CASCADE; 
     1192DROP SEQUENCE IF EXISTS nt_waypoint_id_seq CASCADE; 
     1193DROP SEQUENCE IF EXISTS nt_waypointlist_id_seq CASCADE; 
     1194DROP SEQUENCE IF EXISTS polygon_id_seq CASCADE; 
     1195DROP SEQUENCE IF EXISTS rectangle_id_seq CASCADE; 
     1196DROP SEQUENCE IF EXISTS si_gazetteer_id_seq CASCADE; 
     1197DROP SEQUENCE IF EXISTS si_locationinstance_id_seq CASCADE; 
     1198DROP SEQUENCE IF EXISTS si_locationtype_id_seq CASCADE; 
     1199DROP SEQUENCE IF EXISTS simplex_id_seq CASCADE; 
     1200DROP SEQUENCE IF EXISTS simplicialcomplex_id_seq CASCADE; 
     1201DROP SEQUENCE IF EXISTS si_spatialreferencesystemusinggeographicidentifiers_id_seq CASCADE; 
     1202DROP SEQUENCE IF EXISTS taxonomicclassification_id_seq CASCADE; 
     1203DROP SEQUENCE IF EXISTS taxonomysystem_id_seq CASCADE; 
     1204DROP SEQUENCE IF EXISTS temporalcrs_id_seq CASCADE; 
     1205DROP SEQUENCE IF EXISTS temporaldatum_id_seq CASCADE; 
     1206DROP SEQUENCE IF EXISTS timecs_id_seq CASCADE; 
     1207DROP SEQUENCE IF EXISTS tk_position_id_seq CASCADE; 
     1208DROP SEQUENCE IF EXISTS tm_intervallength_id_seq CASCADE; 
     1209DROP SEQUENCE IF EXISTS topocurve_id_seq CASCADE; 
     1210DROP SEQUENCE IF EXISTS topopoint_id_seq CASCADE; 
     1211DROP SEQUENCE IF EXISTS toposurface_id_seq CASCADE; 
     1212DROP SEQUENCE IF EXISTS topovolume_id_seq CASCADE; 
     1213DROP SEQUENCE IF EXISTS uomweight_id_seq CASCADE; 
     1214DROP SEQUENCE IF EXISTS vouchers_id_seq CASCADE; 
     1215DROP SEQUENCE IF EXISTS weight_id_seq CASCADE; 
  • mauRepo/MolesManager/trunk/src/libs/migration/processor/commons.py

    r8408 r8409  
    4040import html5lib 
    4141from html5lib import treebuilders 
    42 from ea_model.ceda_metadatamodel.ceda_result.ceda_result import CEDA_Result 
    4342from ea_model.moles3_4.result.mo_onlineresource import MO_OnlineResource 
    44 from ea_model.ceda_metadatamodel.ceda_computation.ceda_processing import CEDA_Processing 
    45 from ea_model.ceda_metadatamodel.ceda_acquisition.ceda_instrument import CEDA_Instrument 
    46 from ea_model.ceda_metadatamodel.ceda_observationprocess.ceda_compositeprocess import CEDA_CompositeProcess 
    47 from ea_model.ceda_metadatamodel.ceda_acquisition.ceda_acquisition import CEDA_Acquisition 
    48 from ea_model.ceda_metadatamodel.ceda_project.ceda_project import CEDA_Project 
    49 from ea_model.ceda_metadatamodel.ceda_utilities.ceda_review import CEDA_Review 
    5043from ea_model.iso_19115_2006_metadata_corrigendum.reference_system_information.md_identifier import MD_Identifier 
    5144from ea_model.iso_19115_2006_metadata_corrigendum.identification_information.md_keywords import MD_Keywords 
     
    7164from ea_model.iso_19115_2006_metadata_corrigendum.extent_information.ex_geographicboundingbox import EX_GeographicBoundingBox 
    7265from ea_model.iso_19115_2006_metadata_corrigendum.data_quality_information.dq_element import DQ_Element 
     66from ea_model.ceda_metadatamodel.ceda_project.ceda_project import CEDA_Project 
     67from ea_model.ceda_metadatamodel.ceda_utilities.ceda_review import CEDA_Review 
     68from ea_model.ceda_metadatamodel.ceda_acquisition.ceda_acquisition import CEDA_Acquisition 
     69from ea_model.ceda_metadatamodel.ceda_observationprocess.ceda_compositeprocess import CEDA_CompositeProcess 
     70from ea_model.ceda_metadatamodel.ceda_acquisition.ceda_instrument import CEDA_Instrument 
     71from ea_model.ceda_metadatamodel.ceda_computation.ceda_processing import CEDA_Processing 
     72from ea_model.ceda_metadatamodel.ceda_result.ceda_result import CEDA_Result 
    7373 
    7474base = '/exist/rest/atoms' 
     
    458458def extractSummary(deploymentMigration, dataEntityMigration): 
    459459    resourceXML = getAtomDocumentByMO(deploymentMigration) 
    460     summary = resourceXML.find('%ssummary' % (atomNS)) 
    461     ret = _returnNotNoneText(summary) 
    462     if ret: 
    463         return ret 
    464     resourceXML = getAtomDocumentByMO(dataEntityMigration) 
    465460    summary = resourceXML.find('%ssummary' % (atomNS)) 
    466461    return _returnNotNoneText(summary) 
  • mauRepo/MolesManager/trunk/src/libs/migration/processor/dataEntity.py

    r8408 r8409  
    3131@author: Maurizio Nagni 
    3232''' 
    33 from ea_model.ceda_metadatamodel.ceda_observationcollection.ceda_observationcollection import \ 
    34     CEDA_ObservationCollection 
    3533from libs.migration.exception.exceptions import MigrationObjectException, NoAssociatedAuthor,\ 
    3634    migrationObjectDescription, NoAssociatedDeployments 
     
    4038    isoDateTimeStringToTimeDate, findUpdatedDate, createDate,\ 
    4139    calculateHash, findDOIInMigrationDocument,\ 
    42     hasMOBeenProcessed, getAtomDocumentHashByMO, extractTitle 
     40    hasMOBeenProcessed, getAtomDocumentHashByMO, extractTitle, extractSummary 
    4341from libs.migration.processor.deployment import DeploymentProcessor 
    4442from logging import StreamHandler 
     
    4644from ea_model.iso_19115_2006_metadata_corrigendum.citation_and_responsible_party_information.ci_datetypecode import CI_DateTypeCode 
    4745from MolesManager.ceda_guid import CedaGUID 
    48 from ea_model.moles3_4.observation.mo_observationpublicationstatevalue import MO_ObservationPublicationStateValue 
    4946from MolesManager.codelist import MM_ObservationPublicationStateValue,\ 
    5047    getCLValue 
     48from ea_model.ceda_metadatamodel.ceda_observationcollection.ceda_observationcollection import CEDA_ObservationCollection 
    5149 
    5250CEDA_TITLE = 'ceda_title' 
     
    7371    def _checkGeographicExtent(self, ceda_observationCollection): 
    7472        union = self.moles3epb.getUnifyObservationCollectionGE(ceda_observationCollection) 
     73 
     74    def _assignDescription(self, ceda_observationCollection): 
     75        if self._dataEntityHasSameHash: 
     76            return 
     77 
     78        description = extractSummary(self._dataEntityMigration) 
     79             
     80        if description: 
     81            ceda_observationCollection.description = description 
    7582     
    7683    def _processTitle(self, ceda_observationCollection): 
     84        if self._dataEntityHasSameHash: 
     85            return 
     86                 
    7787        ititle = extractTitle(self._dataEntityMigration) 
    7888        if ceda_observationCollection.identifier: 
     
    118128         
    119129        self._processTitle(ceda_observationCollection) 
     130        self._assignDescription(ceda_observationCollection)         
    120131         
    121132        if not self._dataEntityHasSameHash: 
  • mauRepo/MolesManager/trunk/src/libs/migration/processor/deployment.py

    r8408 r8409  
    5151    findLinksInMigrationDocument, findSubTypeInDPT, extractMolesPublishedDate,\ 
    5252    createMD_Keywords, hasMOBeenProcessed, createMO_Individual 
    53 from ea_model.ceda_metadatamodel.ceda_observation.ceda_observation import CEDA_Observation 
    5453from libs.epb import EPB 
    5554from libs.migration.processor.deployment_data import DeploymentDataProcessor 
     
    6564from copy import deepcopy 
    6665import datetime 
    67 from ea_model.ceda_metadatamodel.ceda_result import ceda_curationvalue 
    68 from ea_model.ceda_metadatamodel.ceda_utilities.ceda_reviewfrequencyvalue import CEDA_ReviewFrequencyValue 
    69 from ea_model.ceda_metadatamodel.ceda_utilities.ceda_reviewstatusvalue import CEDA_ReviewStatusValue 
    7066from MolesManager.ceda_guid import CedaGUID 
    7167from ea_model.iso_19115_2006_metadata_corrigendum.citation_and_responsible_party_information.ci_rolecode import CI_RoleCode 
    7268from ea_model.iso_19115_2006_metadata_corrigendum.maintenance_information.md_maintenancefrequencycode import MD_MaintenanceFrequencyCode 
    73 from ea_model.ceda_metadatamodel.ceda_result.ceda_curationvalue import CEDA_CurationValue 
    7469from ea_model.moles3_4.utilities.ceda_rolevalue import CEDA_RoleValue 
    7570from ea_model.moles3_4.observation.mo_observationpublicationstatevalue import MO_ObservationPublicationStateValue 
    7671from MolesManager.codelist import MM_RoleValue,\ 
    7772    MM_ObservationPublicationStateValue, getCLValue 
     73from ea_model.ceda_metadatamodel.ceda_observation.ceda_observation import CEDA_Observation 
     74from ea_model.ceda_metadatamodel.ceda_result.ceda_curationvalue import CEDA_CurationValue 
     75from ea_model.ceda_metadatamodel.ceda_utilities.ceda_reviewstatusvalue import CEDA_ReviewStatusValue 
     76from ea_model.ceda_metadatamodel.ceda_utilities.ceda_reviewfrequencyvalue import CEDA_ReviewFrequencyValue 
    7877 
    7978MET_GEO_FEATURE = 'Meteorological geographical features' 
     
    366365            return 
    367366         
    368         description = extractSummary(self._deploymentMigration, self._dataEntityMigration) 
     367        description = extractSummary(self._deploymentMigration) 
     368        if description is None: 
     369            description = extractSummary(self._dataEntityMigration) 
     370             
    369371        if description: 
    370372            observation.description = description 
  • mauRepo/MolesManager/trunk/src/libs/migration/tests/infodbepbtests.py

    r8222 r8409  
    1818    def setUp(self):       
    1919        InfodbEPBTest.infoDB = DbManager(INFO_DB_CONNECTION)         
    20         InfodbEPB.overrrideDBManager(InfodbEPBTest.infoDB) 
     20        #InfodbEPB.overrrideDBManager(InfodbEPBTest.infoDB) 
    2121        self.logging = logging.getLogger('InfodbEPB') 
    2222        self.logging.addHandler(StreamHandler()) 
     
    3030        self.getInfo() 
    3131     
    32  
     32    ''' 
    3333    def getInfo(self): 
    3434        connection = InfodbEPB.getNewInfoConnection(); 
     
    3838            print rec['id'] 
    3939        records.close() 
    40  
     40    ''' 
    4141 
    4242if __name__ == "__main__": 
  • mauRepo/MolesManager/trunk/src/libs/migration/tests/loadresource.py

    r8147 r8409  
    2020    def setUp(self): 
    2121        migrationDB = DbManager(MIGRATION_DB_CONNECTION, MIGRATION_DB_SCRIPT) 
    22         MigrationEPB.overrrideDBManager(migrationDB)      
     22        #MigrationEPB.overrrideDBManager(migrationDB)      
    2323 
    2424    def testLoadResource(self): 
  • mauRepo/MolesManager/trunk/src/libs/migration/tests/moles3epbmothods.py

    r8323 r8409  
    1212from logging import StreamHandler 
    1313from test_utils import createObservationCollection, createObservation, createProject 
    14 from ea_model.ceda_metadatamodel.ceda_observationcollection.ceda_observationcollection import CEDA_ObservationCollection 
    1514from ea_model.moles3_4.observationcollection.mo_observationcollection import MO_ObservationCollection 
    1615from ea_model.moles3_4.utilities.mo_responsiblepartyinfo import MO_ResponsiblePartyInfo 
    17 from ea_model.ceda_metadatamodel.ceda_observation.ceda_observation import CEDA_Observation 
    1816from ea_model.moles3_4.observation.mo_observation import MO_Observation 
    1917from ea_model.moles3_4.utilities.mo_rolevalue import MO_RoleValue 
  • mauRepo/MolesManager/trunk/src/libs/migration/tests/moles3epbtests.py

    r8323 r8409  
    99from libs.commons_db import DbManager 
    1010from unittest import TestCase 
    11 from ea_model.ceda_metadatamodel.ceda_observationcollection.ceda_observationcollection import CEDA_ObservationCollection 
    1211import logging, datetime 
    1312from logging import StreamHandler 
    14 from ea_model.ceda_metadatamodel.ceda_observation.ceda_observation import CEDA_Observation 
    1513from sqlalchemy.exc import IntegrityError 
    1614from libs.migration.processor.check.check import moles3Append 
     
    2220from ea_model.iso_19108_2006_temporal_schema.temporal_reference_system.tm_position import TM_Position 
    2321from test_utils import createObservationCollection,\ 
    24     createProject, createCI_Responsibility 
    25 from ea_model.ceda_metadatamodel.ceda_project.ceda_project import CEDA_Project   
     22    createProject, createCI_Responsibility   
    2623 
    2724 
  • mauRepo/MolesManager/trunk/src/libs/migration/tests/test_utils.py

    r8217 r8409  
    55''' 
    66from ea_model.ceda_metadatamodel.ceda_observationcollection.ceda_observationcollection import CEDA_ObservationCollection 
    7 from libs.migration.processor.commons import createMD_Identifier,\ 
    8     createCI_Citation, createCI_Individual, createCI_Organization 
     7from libs.migration.processor.commons import createCI_Citation,\ 
     8    createMD_Identifier 
    99from ea_model.ceda_metadatamodel.ceda_observation.ceda_observation import CEDA_Observation 
    1010from ea_model.ceda_metadatamodel.ceda_project.ceda_project import CEDA_Project 
    11 from ea_model.upcomingiso.ci_responsibility import CI_Responsibility 
    12 from ea_model.iso_19115_2006_metadata_corrigendum.citation_and_responsible_party_information import ci_rolecode 
    13 from ea_model.upcomingiso.ci_individual import CI_Individual 
    1411 
    1512def createObservationCollection(): 
     
    4138    return observation 
    4239 
     40''' 
    4341def createCI_Responsibility(): 
    44     ''' 
     42 
    4543        Creates a CI_Responsibility with the following data: 
    4644        ci_responsibilty.role = 'ci_rolecode.CI_RoleCode.cl_author 
     
    4947        ci_responsibilty.party[1] 
    5048            CI_Organization.name = 'organization_1' 
    51     '''     
     49         
    5250    ci_responsibilty = CI_Responsibility() 
    5351    ci_responsibilty.role = ci_rolecode.CI_RoleCode.cl_author 
     
    5755    ci_responsibilty.party.append(ci_organization_1)    
    5856    return ci_responsibilty 
     57''' 
    5958 
    6059def createProject(): 
  • mauRepo/MolesManager/trunk/src/libs/migration/tests/testconfig.py

    r8358 r8409  
    3131@author: Maurizio Nagni 
    3232''' 
     33 
    3334MIGRATION_DB_CONNECTION = 'postgresql://badc:rotyn217m@neptune.badc.rl.ac.uk:5432/Moles3' 
    3435MOLES3_DB_CONNECTION = 'postgresql://badc:rotyn217m@neptune.badc.rl.ac.uk:5432/Moles3' 
     
    3839MIGRATION_DB_SCRIPT = doMigration 
    3940 
    40  
    41 from sqlTables import doTables as doMoles, attachEvents 
    42 MOLES3_DB_SCRIPT = doMoles 
    43 EVENTS_DB = attachEvents  
     41from ea_model.sqlTables import attachEvents, doTables 
     42MOLES3_DB_SCRIPT = doTables 
     43EVENTS_DB = attachEvents 
Note: See TracChangeset for help on using the changeset viewer.