source: mauRepo/MolesManager/trunk/src/ea_model/ceda_metadatamodel/ceda_observationcollection/ceda_observationcollection.py @ 8091

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/mauRepo/MolesManager/trunk/src/ea_model/ceda_metadatamodel/ceda_observationcollection/ceda_observationcollection.py@8091
Revision 8091, 4.3 KB checked in by mnagni, 8 years ago (diff)

The migration process now includes
1) deployment_data files
2) XML document hash
3) full Dojo support


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
23
24'''
25Created on 16-Feb-2012 16:18:09
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.identifier = []
45        self.publicationState = None
46        self._geographicExtent_ex_boundingpolygon = []
47        self._geographicExtent_ex_geographicdescription = []
48        self._geographicExtent_ex_geographicboundingbox = []
49        self._phenomenonTime_tm_primitive = []
50        self._phenomenonTime_tm_complex = []
51        self.review = []
52        self.verticalExtent = []
53        self.subCollection = []
54        self.additionalMetadata = []
55        self.member = []
56        self.description = None
57        self.CEDAOfficer = None
58        self.isoMetadata = []
59        super(CEDA_ObservationCollection, self).__init__()
60
61    @property
62    def identifier(self):       
63        return self._mo_observationcollection.identifier
64
65    @identifier.setter
66    def identifier(self, value):       
67            self._mo_observationcollection.identifier = value
68
69    @property
70    def publicationState(self): 
71        return self._mo_observationcollection.publicationState
72
73    @publicationState.setter
74    def publicationState(self, value): 
75            self._mo_observationcollection.publicationState = value
76
77    @property
78    def geographicExtent(self): 
79        return self._mo_observationcollection.geographicExtent
80
81    @geographicExtent.setter
82    def geographicExtent(self, value): 
83            self._mo_observationcollection.geographicExtent = value
84
85    @property
86    def phenomenonTime(self):   
87        return self._mo_observationcollection.phenomenonTime
88
89    @phenomenonTime.setter
90    def phenomenonTime(self, value):   
91            self._mo_observationcollection.phenomenonTime = value
92
93    @property
94    def verticalExtent(self):   
95        return self._mo_observationcollection.verticalExtent
96
97    @verticalExtent.setter
98    def verticalExtent(self, value):   
99            self._mo_observationcollection.verticalExtent = value
100
101    @property
102    def subCollection(self):   
103        return self._mo_observationcollection.subCollection
104
105    @subCollection.setter
106    def subCollection(self, value):     
107            self._mo_observationcollection.subCollection = value
108
109    @property
110    def additionalMetadata(self):       
111        return self._mo_observationcollection.additionalMetadata
112
113    @additionalMetadata.setter
114    def additionalMetadata(self, value):       
115            self._mo_observationcollection.additionalMetadata = value
116
117    @property
118    def member(self):   
119        return self._mo_observationcollection.member
120
121    @member.setter
122    def member(self, value):   
123            self._mo_observationcollection.member = value
124
125    @property
126    def description(self):     
127        return self._mo_observationcollection.description
128
129    @description.setter
130    def description(self, value):       
131            self._mo_observationcollection.description = value
132
133    @property
134    def isoMetadata(self):     
135        return self._mo_observationcollection.isoMetadata
136
137    @isoMetadata.setter
138    def isoMetadata(self, value):       
139            self._mo_observationcollection.isoMetadata = value
140
141    def __key(self):
142        return (self.identifier, self.publicationState, self.geographicExtent, self.phenomenonTime, self.review, self.verticalExtent, self.subCollection, self.additionalMetadata, self.member, self.description, self.CEDAOfficer, self.isoMetadata)
143
144    def __eq__(self, y):
145        '''
146        Cannot compare classes which do not define a "__key" attribute
147        '''
148        if hasattr(self, '_%s__key' % (type(self).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)):
149            return self.__key() == y.__key()
150        return id(self) == id(y)
151
152    def __hash__(self):
153        return hash(self.__key())
Note: See TracBrowser for help on using the repository browser.