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

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