source: mauRepo/MolesManager/trunk/src/ea_model/ceda_metadatamodel/ceda_project/ceda_project.py @ 8089

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

Played with DOJO
New EA library
Addede CEDA_Process to the migration

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.project.mo_project import  MO_Project
22from ascore.utils import has_value
23
24'''
25Created on 14-Feb-2012 17:19:36
26
27@author: mnagni
28'''
29
30class CEDA_Project(MO_Project):
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_project = MO_Project()         
43
44        self.relatedParty = []
45        self.review = []
46        self.dmp = None
47        self.projectResource = []
48        self.subProject = []
49        self.publicationState = None
50        self.identifier = []
51        self.abstract = None
52        self.status = None
53        self.keywords = []
54        self.documentation = []
55        self.description = None
56        self.observationCollection = []
57        super(CEDA_Project, self).__init__()
58
59    @property
60    def relatedParty(self):     
61        return self._mo_project.relatedParty
62
63    @relatedParty.setter
64    def relatedParty(self, value):     
65            self._mo_project.relatedParty = value
66
67    @property
68    def dmp(self):     
69        return self._mo_project.dmp
70
71    @dmp.setter
72    def dmp(self, value):       
73            self._mo_project.dmp = value
74
75    @property
76    def subProject(self):       
77        return self._mo_project.subProject
78
79    @subProject.setter
80    def subProject(self, value):       
81            self._mo_project.subProject = value
82
83    @property
84    def publicationState(self): 
85        return self._mo_project.publicationState
86
87    @publicationState.setter
88    def publicationState(self, value): 
89            self._mo_project.publicationState = value
90
91    @property
92    def identifier(self):       
93        return self._mo_project.identifier
94
95    @identifier.setter
96    def identifier(self, value):       
97            self._mo_project.identifier = value
98
99    @property
100    def abstract(self): 
101        return self._mo_project.abstract
102
103    @abstract.setter
104    def abstract(self, value): 
105            self._mo_project.abstract = value
106
107    @property
108    def status(self):   
109        return self._mo_project.status
110
111    @status.setter
112    def status(self, value):   
113            self._mo_project.status = value
114
115    @property
116    def keywords(self): 
117        return self._mo_project.keywords
118
119    @keywords.setter
120    def keywords(self, value): 
121            self._mo_project.keywords = value
122
123    @property
124    def documentation(self):   
125        return self._mo_project.documentation
126
127    @documentation.setter
128    def documentation(self, value):     
129            self._mo_project.documentation = value
130
131    @property
132    def description(self):     
133        return self._mo_project.description
134
135    @description.setter
136    def description(self, value):       
137            self._mo_project.description = value
138
139    @property
140    def observationCollection(self):   
141        return self._mo_project.observationCollection
142
143    @observationCollection.setter
144    def observationCollection(self, value):     
145            self._mo_project.observationCollection = value
146
147    def __key(self):
148        return (self.relatedParty, self.review, self.dmp, self.projectResource, self.subProject, self.publicationState, self.identifier, self.abstract, self.status, self.keywords, self.documentation, self.description, self.observationCollection)
149
150    def __eq__(self, y):
151        '''
152        Cannot compare classes which do not define a "__key" attribute
153        '''
154        if hasattr(self, '_%s__key' % (type(self).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)):
155            return self.__key() == y.__key()
156        return id(self) == id(y)
157
158    def __hash__(self):
159        return hash(self.__key())
Note: See TracBrowser for help on using the repository browser.