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

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/mauRepo/MolesManager/trunk/src/ea_model/ceda_metadatamodel/ceda_acquisition/ceda_platform.py@8091
Revision 8091, 2.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.moles3_4.acquisition.mo_platform import  MO_Platform
22from ascore.utils import has_value
23
24'''
25Created on 16-Feb-2012 16:18:02
26
27@author: mnagni
28'''
29
30class CEDA_Platform(MO_Platform):
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_platform = MO_Platform()       
43
44        self.identifier = []
45        self.relatedParty = []
46        self.type = None
47        self.review = []
48        self.documentation = []
49        self.location = None
50        self.description = None
51        self.childPlatform = []
52        super(CEDA_Platform, self).__init__()
53
54    @property
55    def identifier(self):       
56        return self._mo_platform.identifier
57
58    @identifier.setter
59    def identifier(self, value):       
60            self._mo_platform.identifier = value
61
62    @property
63    def relatedParty(self):     
64        return self._mo_platform.relatedParty
65
66    @relatedParty.setter
67    def relatedParty(self, value):     
68            self._mo_platform.relatedParty = value
69
70    @property
71    def type(self):     
72        return self._mo_platform.type
73
74    @type.setter
75    def type(self, value):     
76            self._mo_platform.type = value
77
78    @property
79    def documentation(self):   
80        return self._mo_platform.documentation
81
82    @documentation.setter
83    def documentation(self, value):     
84            self._mo_platform.documentation = value
85
86    @property
87    def location(self): 
88        return self._mo_platform.location
89
90    @location.setter
91    def location(self, value): 
92            self._mo_platform.location = value
93
94    @property
95    def description(self):     
96        return self._mo_platform.description
97
98    @description.setter
99    def description(self, value):       
100            self._mo_platform.description = value
101
102    @property
103    def childPlatform(self):   
104        return self._mo_platform.childPlatform
105
106    @childPlatform.setter
107    def childPlatform(self, value):     
108            self._mo_platform.childPlatform = value
109
110    def __key(self):
111        return (self.identifier, self.relatedParty, self.type, self.review, self.documentation, self.location, self.description, self.childPlatform)
112
113    def __eq__(self, y):
114        '''
115        Cannot compare classes which do not define a "__key" attribute
116        '''
117        if hasattr(self, '_%s__key' % (type(self).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)):
118            return self.__key() == y.__key()
119        return id(self) == id(y)
120
121    def __hash__(self):
122        return hash(self.__key())
Note: See TracBrowser for help on using the repository browser.