source: mauRepo/CedaMolesModel/trunk/ceda_moles_model/ea_model/ceda_metadatamodel/ceda_observationcollection/ceda_observationcollection.py @ 8457

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/mauRepo/CedaMolesModel/trunk/ceda_moles_model/ea_model/ceda_metadatamodel/ceda_observationcollection/ceda_observationcollection.py@8457
Revision 8457, 3.6 KB checked in by mnagni, 7 years ago (diff)

Corrected an error in the generation of the classes "synchronize" method.

  • Property svn:mime-type set to text/plain
Line 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21from ea_model.moles3_4.observationcollection.mo_observationcollection import  MO_ObservationCollection
22from ascore.utils import has_value, collectionProofHash
23
24'''
25Created on 10-Jul-2012 14:15:14
26
27@author: mnagni
28'''
29
30class CEDA_ObservationCollection(MO_ObservationCollection):
31        '''
32                Represents a data entity defined in a UML diagram and supposed to
33                be persisted in a relational database.
34 
35                This class has been genererated automatically using the Apache Velocity project.
36        '''
37        '''
38                Please note that any access to the inner attributes should be done using
39                the given get/set methods and NOT accessing them directly.
40        '''
41        def __init__(self):
42                self._mo_observationcollection = MO_ObservationCollection()     
43
44                self.publicationState = None
45                self.metadataManagement = []
46                self.description = None
47                self.CEDAOfficer = None
48                super(CEDA_ObservationCollection, self).__init__()
49        @property
50        def identifier(self):   
51                return self._mo_observationcollection.identifier
52
53        @identifier.setter
54        def identifier(self, value):   
55                        self._mo_observationcollection.identifier = value
56        @property
57        def publicationState(self):     
58                return self._mo_observationcollection.publicationState
59
60        @publicationState.setter
61        def publicationState(self, value):     
62                        self._mo_observationcollection.publicationState = value
63        @property
64        def geographicExtent(self):     
65                return self._mo_observationcollection.geographicExtent
66
67        @geographicExtent.setter
68        def geographicExtent(self, value):     
69                        self._mo_observationcollection.geographicExtent = value
70        @property
71        def phenomenonTime(self):       
72                return self._mo_observationcollection.phenomenonTime
73
74        @phenomenonTime.setter
75        def phenomenonTime(self, value):       
76                        self._mo_observationcollection.phenomenonTime = value
77        @property
78        def verticalExtent(self):       
79                return self._mo_observationcollection.verticalExtent
80
81        @verticalExtent.setter
82        def verticalExtent(self, value):       
83                        self._mo_observationcollection.verticalExtent = value
84        @property
85        def subCollection(self):       
86                return self._mo_observationcollection.subCollection
87
88        @subCollection.setter
89        def subCollection(self, value):
90                        self._mo_observationcollection.subCollection = value
91        @property
92        def member(self):       
93                return self._mo_observationcollection.member
94
95        @member.setter
96        def member(self, value):       
97                        self._mo_observationcollection.member = value
98        @property
99        def additionalMetadata(self):   
100                return self._mo_observationcollection.additionalMetadata
101
102        @additionalMetadata.setter
103        def additionalMetadata(self, value):   
104                        self._mo_observationcollection.additionalMetadata = value
105        @property
106        def description(self): 
107                return self._mo_observationcollection.description
108
109        @description.setter
110        def description(self, value):   
111                        self._mo_observationcollection.description = value
112        @property
113        def isoMetadata(self): 
114                return self._mo_observationcollection.isoMetadata
115
116        @isoMetadata.setter
117        def isoMetadata(self, value):   
118                        self._mo_observationcollection.isoMetadata = value
119
120        def synchronize(self):
121                pass
122
123        def __key(self):
124                return (self.identifier, self.publicationState, self.metadataManagement, self.geographicExtent, self.phenomenonTime, self.verticalExtent, self.subCollection, self.member, self.additionalMetadata, self.description, self.CEDAOfficer, self.isoMetadata)
125
126        def __eq__(self, y):
127                if type(self) != type(y):
128                        return False
129                '''
130                Cannot compare classes which do not define a "__key" attribute
131                '''
132                if hasattr(self, '_%s__key' % (type(self).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)):
133                        return self.__key() == y.__key()
134                return id(self) == id(y)
135
136        def __hash__(self):
137                return collectionProofHash(self.__key())
Note: See TracBrowser for help on using the repository browser.