Ignore:
Timestamp:
06/07/12 09:00:43 (7 years ago)
Author:
mnagni
Message:

Added a new function to ascore.utils in order to synchronize classes before committing to database

The following constraints has been added to the official model:

MO_ObservationCollection:member:CEDA_Observation
MO_ObservationCollection:phenomenonTime:TM_GeometricPrimitive
MO_Project:observationCollection:CEDA_ObservationCollection
MO_Observation:result:CEDA_Result
MO_Observation:inSupportOf:CEDA_Project
MO_Project:subProject:CEDA_Project
OM_Observation:procedure:CEDA_Process
OM_Observation:phenomenonTime:TM_GeometricPrimitive
MO_ResponsiblePartyFunctionValue:CEDA_RoleValue

Location:
mauRepo/CedaMolesModel/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • mauRepo/CedaMolesModel/trunk

    • Property svn:ignore
      •  

        old new  
        44 
        55.project 
         6 
         7dist 
  • mauRepo/CedaMolesModel/trunk/ceda_moles_model

    • Property svn:ignore set to
      ceda_moles_model.egg-info
  • mauRepo/CedaMolesModel/trunk/ceda_moles_model/ea_model/informative/open_gis_consortium/features/fe_containerfeaturecollection.py

    r8397 r8437  
    2323 
    2424''' 
    25 Created on 26-Jun-2012 10:16:27 
     25Created on 06-Jul-2012 07:43:10 
    2626 
    2727@author: mnagni 
     
    4545                self.isGlobal = None 
    4646                self.localName = None 
     47                self._element_fe_queryfeaturecollection = [] 
    4748                self._element_fe_featurecollection = [] 
    48                 self._element_fe_queryfeaturecollection = [] 
    4949                self._element = [] 
    5050                self.container = None 
     
    8989                try: 
    9090                        ret = [] 
     91                        ret.extend(self._element_fe_queryfeaturecollection) 
    9192                        ret.extend(self._element_fe_featurecollection) 
    92                         ret.extend(self._element_fe_queryfeaturecollection) 
    9393                        if not hasattr(self, '_element'): 
    9494                                self._element = [] 
    95                         if self._element: 
     95                        if self._element is not None: 
    9696                                ret.extend(self._element) 
    9797                        del self._element[:] 
     
    124124 
    125125        def synchronize(self): 
     126                del self._element_fe_queryfeaturecollection[:] 
    126127                del self._element_fe_featurecollection[:] 
    127                 del self._element_fe_queryfeaturecollection[:] 
    128128                for item in self.element:        
     129                        valueClass = "%s.%s" % (type(item).__module__,type(item).__name__) 
     130                        if valueClass == "ea_model.informative.open_gis_consortium.features.fe_queryfeaturecollection.FE_QueryFeatureCollection": 
     131                                self._element_fe_queryfeaturecollection.append(item) 
     132                                continue 
    129133                        valueClass = "%s.%s" % (type(item).__module__,type(item).__name__) 
    130134                        if valueClass == "ea_model.informative.open_gis_consortium.features.fe_featurecollection.FE_FeatureCollection": 
    131135                                self._element_fe_featurecollection.append(item) 
    132                                 continue 
    133                         valueClass = "%s.%s" % (type(item).__module__,type(item).__name__) 
    134                         if valueClass == "ea_model.informative.open_gis_consortium.features.fe_queryfeaturecollection.FE_QueryFeatureCollection": 
    135                                 self._element_fe_queryfeaturecollection.append(item) 
    136136                                continue 
    137137                pass 
Note: See TracChangeset for help on using the changeset viewer.