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

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/mauRepo/CedaMolesModel/trunk/ceda_moles_model/ea_model/ceda_metadatamodel/ceda_observationprocess/ceda_compositeprocess.py@8457
Revision 8457, 2.9 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.ceda_metadatamodel.ceda_observationprocess.ceda_process import  CEDA_Process
22from ea_model.moles3_4.observationprocess.mo_compositeprocess import  MO_CompositeProcess
23from ascore.utils import has_value, collectionProofHash
24
25'''
26Created on 10-Jul-2012 14:15:04
27
28@author: mnagni
29'''
30
31class CEDA_CompositeProcess(MO_CompositeProcess,CEDA_Process):
32        '''
33                Represents a data entity defined in a UML diagram and supposed to
34                be persisted in a relational database.
35 
36                This class has been genererated automatically using the Apache Velocity project.
37        '''
38        '''
39                Please note that any access to the inner attributes should be done using
40                the given get/set methods and NOT accessing them directly.
41        '''
42        def __init__(self):
43                self._ceda_process = CEDA_Process()     
44                self._mo_compositeprocess = MO_CompositeProcess()       
45
46                self.metadataManagement = []
47                self.description = None
48                super(CEDA_CompositeProcess, self).__init__()
49        @property
50        def identifier(self):   
51                return self._mo_compositeprocess.identifier
52
53        @identifier.setter
54        def identifier(self, value):   
55                        self._mo_compositeprocess.identifier = value
56        @property
57        def computationComponent(self):
58                return self._mo_compositeprocess.computationComponent
59
60        @computationComponent.setter
61        def computationComponent(self, value): 
62                        self._mo_compositeprocess.computationComponent = value
63        @property
64        def relatedParty(self):
65                return self._mo_compositeprocess.relatedParty
66
67        @relatedParty.setter
68        def relatedParty(self, value): 
69                        self._mo_compositeprocess.relatedParty = value
70        @property
71        def documentation(self):       
72                return self._mo_compositeprocess.documentation
73
74        @documentation.setter
75        def documentation(self, value):
76                        self._mo_compositeprocess.documentation = value
77        @property
78        def description(self): 
79                return self._mo_compositeprocess.description
80
81        @description.setter
82        def description(self, value):   
83                        self._mo_compositeprocess.description = value
84        @property
85        def acquisitionComponent(self):
86                return self._mo_compositeprocess.acquisitionComponent
87
88        @acquisitionComponent.setter
89        def acquisitionComponent(self, value): 
90                        self._mo_compositeprocess.acquisitionComponent = value
91        @property
92        def generatedObservation(self):
93                return self._ceda_process.generatedObservation
94
95        @generatedObservation.setter
96        def generatedObservation(self, value): 
97                        self._ceda_process.generatedObservation = value
98
99        def synchronize(self):
100                pass
101
102        def __key(self):
103                return (self.identifier, self.computationComponent, self.metadataManagement, self.relatedParty, self.documentation, self.description, self.acquisitionComponent, self.generatedObservation)
104
105        def __eq__(self, y):
106                if type(self) != type(y):
107                        return False
108                '''
109                Cannot compare classes which do not define a "__key" attribute
110                '''
111                if hasattr(self, '_%s__key' % (type(self).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)):
112                        return self.__key() == y.__key()
113                return id(self) == id(y)
114
115        def __hash__(self):
116                return collectionProofHash(self.__key())
Note: See TracBrowser for help on using the repository browser.