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

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/mauRepo/MolesManager/trunk/src/ea_model/ceda_metadatamodel/ceda_observationprocess/ceda_compositeprocess.py@8091
Revision 8091, 3.8 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.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
24
25'''
26Created on 16-Feb-2012 16:18:04
27
28@author: mnagni
29'''
30
31class CEDA_CompositeProcess(CEDA_Process,MO_CompositeProcess):
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._mo_compositeprocess = MO_CompositeProcess()       
44        self._ceda_process = CEDA_Process()     
45
46        self.identifier = []
47        self.computationComponent = []
48        self.relatedParty = []
49        self.review = []
50        self.documentation = []
51        self.description = None
52        self.acquisitionComponent = []
53        self._generatedObservation_om_discretecoverageobservation = []
54        self._generatedObservation_om_temporalobservation = []
55        self._generatedObservation_om_measurement = []
56        self._generatedObservation_mo_observation = []
57        self._generatedObservation_om_truthobservation = []
58        self._generatedObservation_om_countobservation = []
59        self._generatedObservation_om_categoryobservation = []
60        self._generatedObservation_om_geometryobservation = []
61        self._generatedObservation_om_complexobservation = []
62        super(CEDA_CompositeProcess, self).__init__()
63
64    @property
65    def identifier(self):       
66        return self._mo_compositeprocess.identifier
67
68    @identifier.setter
69    def identifier(self, value):       
70            self._mo_compositeprocess.identifier = value
71
72    @property
73    def computationComponent(self):     
74        return self._mo_compositeprocess.computationComponent
75
76    @computationComponent.setter
77    def computationComponent(self, value):     
78            self._mo_compositeprocess.computationComponent = value
79
80    @property
81    def relatedParty(self):     
82        return self._mo_compositeprocess.relatedParty
83
84    @relatedParty.setter
85    def relatedParty(self, value):     
86            self._mo_compositeprocess.relatedParty = value
87
88    @property
89    def documentation(self):   
90        return self._mo_compositeprocess.documentation
91
92    @documentation.setter
93    def documentation(self, value):     
94            self._mo_compositeprocess.documentation = value
95
96    @property
97    def description(self):     
98        return self._mo_compositeprocess.description
99
100    @description.setter
101    def description(self, value):       
102            self._mo_compositeprocess.description = value
103
104    @property
105    def acquisitionComponent(self):     
106        return self._mo_compositeprocess.acquisitionComponent
107
108    @acquisitionComponent.setter
109    def acquisitionComponent(self, value):     
110            self._mo_compositeprocess.acquisitionComponent = value
111
112    @property
113    def generatedObservation(self):     
114        return self._mo_compositeprocess.generatedObservation
115
116    @generatedObservation.setter
117    def generatedObservation(self, value):     
118            self._mo_compositeprocess.generatedObservation = value
119
120    def __key(self):
121        return (self.identifier, self.computationComponent, self.relatedParty, self.review, self.documentation, self.description, self.acquisitionComponent, self.generatedObservation)
122
123    def __eq__(self, y):
124        '''
125        Cannot compare classes which do not define a "__key" attribute
126        '''
127        if hasattr(self, '_%s__key' % (type(self).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)):
128            return self.__key() == y.__key()
129        return id(self) == id(y)
130
131    def __hash__(self):
132        return hash(self.__key())
Note: See TracBrowser for help on using the repository browser.