1 | |
---|
2 | |
---|
3 | |
---|
4 | |
---|
5 | |
---|
6 | |
---|
7 | |
---|
8 | |
---|
9 | |
---|
10 | |
---|
11 | |
---|
12 | |
---|
13 | |
---|
14 | |
---|
15 | |
---|
16 | |
---|
17 | |
---|
18 | |
---|
19 | |
---|
20 | |
---|
21 | from ea_model.moles3_4.result.mo_result import MO_Result |
---|
22 | from ascore.utils import has_value |
---|
23 | |
---|
24 | ''' |
---|
25 | Created on 14-Feb-2012 17:19:34 |
---|
26 | |
---|
27 | @author: mnagni |
---|
28 | ''' |
---|
29 | |
---|
30 | class CEDA_Result(MO_Result): |
---|
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_result = MO_Result() |
---|
43 | |
---|
44 | self.sample = [] |
---|
45 | self.segment = [] |
---|
46 | self.numberOfFiles = None |
---|
47 | self.curationCategory = None |
---|
48 | self.source = [] |
---|
49 | self.volume = None |
---|
50 | self.internalPath = None |
---|
51 | super(CEDA_Result, self).__init__() |
---|
52 | |
---|
53 | @property |
---|
54 | def sample(self): |
---|
55 | return self._mo_result.sample |
---|
56 | |
---|
57 | @sample.setter |
---|
58 | def sample(self, value): |
---|
59 | self._mo_result.sample = value |
---|
60 | |
---|
61 | @property |
---|
62 | def segment(self): |
---|
63 | return self._mo_result.segment |
---|
64 | |
---|
65 | @segment.setter |
---|
66 | def segment(self, value): |
---|
67 | self._mo_result.segment = value |
---|
68 | |
---|
69 | @property |
---|
70 | def source(self): |
---|
71 | return self._mo_result.source |
---|
72 | |
---|
73 | @source.setter |
---|
74 | def source(self, value): |
---|
75 | self._mo_result.source = value |
---|
76 | |
---|
77 | def __key(self): |
---|
78 | return (self.sample, self.segment, self.numberOfFiles, self.curationCategory, self.source, self.volume, self.internalPath) |
---|
79 | |
---|
80 | def __eq__(self, y): |
---|
81 | ''' |
---|
82 | Cannot compare classes which do not define a "__key" attribute |
---|
83 | ''' |
---|
84 | if hasattr(self, '_%s__key' % (type(self).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): |
---|
85 | return self.__key() == y.__key() |
---|
86 | return id(self) == id(y) |
---|
87 | |
---|
88 | def __hash__(self): |
---|
89 | return hash(self.__key()) |
---|