source: mauRepo/MolesManager/trunk/src/ea_model/moles3_4/result/mo_onlineresource.py @ 8091

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/mauRepo/MolesManager/trunk/src/ea_model/moles3_4/result/mo_onlineresource.py@8091
Revision 8091, 2.7 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.iso_19115_2006_metadata_corrigendum.citation_and_responsible_party_information.ci_onlineresource import  CI_OnlineResource
22from ascore.utils import has_value
23
24'''
25Created on 16-Feb-2012 16:18:07
26
27@author: mnagni
28'''
29
30class MO_OnlineResource(CI_OnlineResource):
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._ci_onlineresource = CI_OnlineResource()   
43
44        self.linkage = None
45        self.name = None
46        self.function = None
47        self.description = None
48        self.serviceFunction = None
49        self.protocol = None
50        self.applicationProfile = None
51        super(MO_OnlineResource, self).__init__()
52
53    @property
54    def linkage(self): 
55        return self._ci_onlineresource.linkage
56
57    @linkage.setter
58    def linkage(self, value):   
59            self._ci_onlineresource.linkage = value
60
61    @property
62    def name(self):     
63        return self._ci_onlineresource.name
64
65    @name.setter
66    def name(self, value):     
67            self._ci_onlineresource.name = value
68
69    @property
70    def function(self): 
71        return self._ci_onlineresource.function
72
73    @function.setter
74    def function(self, value): 
75            self._ci_onlineresource.function = value
76
77    @property
78    def description(self):     
79        return self._ci_onlineresource.description
80
81    @description.setter
82    def description(self, value):       
83            self._ci_onlineresource.description = value
84
85    @property
86    def protocol(self): 
87        return self._ci_onlineresource.protocol
88
89    @protocol.setter
90    def protocol(self, value): 
91            self._ci_onlineresource.protocol = value
92
93    @property
94    def applicationProfile(self):       
95        return self._ci_onlineresource.applicationProfile
96
97    @applicationProfile.setter
98    def applicationProfile(self, value):       
99            self._ci_onlineresource.applicationProfile = value
100
101    def __key(self):
102        return (self.linkage, self.name, self.function, self.description, self.serviceFunction, self.protocol, self.applicationProfile)
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.