1 | |
---|
2 | |
---|
3 | |
---|
4 | |
---|
5 | |
---|
6 | |
---|
7 | |
---|
8 | |
---|
9 | |
---|
10 | |
---|
11 | |
---|
12 | |
---|
13 | |
---|
14 | |
---|
15 | |
---|
16 | |
---|
17 | |
---|
18 | |
---|
19 | |
---|
20 | |
---|
21 | from ascore.utils import has_value |
---|
22 | |
---|
23 | ''' |
---|
24 | Created on 16-Feb-2012 16:18:09 |
---|
25 | |
---|
26 | @author: mnagni |
---|
27 | ''' |
---|
28 | |
---|
29 | class SD_GCP(object): |
---|
30 | ''' |
---|
31 | Represents a data entity defined in a UML diagram and supposed to |
---|
32 | be persisted in a relational database. |
---|
33 | |
---|
34 | This class has been genererated automatically using the Apache Velocity project. |
---|
35 | ''' |
---|
36 | ''' |
---|
37 | Please note that any access to the inner attributes should be done using |
---|
38 | the given get/set methods and NOT accessing them directly. |
---|
39 | ''' |
---|
40 | def __init__(self): |
---|
41 | |
---|
42 | self._accuracyReport_dq_logicalconsistency = [] |
---|
43 | self._accuracyReport_dq_thematicaccuracy = [] |
---|
44 | self._accuracyReport_qe_usability = [] |
---|
45 | self._accuracyReport_dq_completeness = [] |
---|
46 | self._accuracyReport_dq_positionalaccuracy = [] |
---|
47 | self._accuracyReport_dq_temporalaccuracy = [] |
---|
48 | super(SD_GCP, self).__init__() |
---|
49 | |
---|
50 | @property |
---|
51 | def accuracyReport(self): |
---|
52 | ret = [] |
---|
53 | for item in self._accuracyReport_dq_logicalconsistency: |
---|
54 | ret.append(item) |
---|
55 | for item in self._accuracyReport_dq_thematicaccuracy: |
---|
56 | ret.append(item) |
---|
57 | for item in self._accuracyReport_qe_usability: |
---|
58 | ret.append(item) |
---|
59 | for item in self._accuracyReport_dq_completeness: |
---|
60 | ret.append(item) |
---|
61 | for item in self._accuracyReport_dq_positionalaccuracy: |
---|
62 | ret.append(item) |
---|
63 | for item in self._accuracyReport_dq_temporalaccuracy: |
---|
64 | ret.append(item) |
---|
65 | return ret |
---|
66 | |
---|
67 | @accuracyReport.setter |
---|
68 | def accuracyReport(self, value): |
---|
69 | if isinstance(value, list): |
---|
70 | self._accuracyReport_dq_logicalconsistency[:] |
---|
71 | self._accuracyReport_dq_thematicaccuracy[:] |
---|
72 | self._accuracyReport_qe_usability[:] |
---|
73 | self._accuracyReport_dq_completeness[:] |
---|
74 | self._accuracyReport_dq_positionalaccuracy[:] |
---|
75 | self._accuracyReport_dq_temporalaccuracy[:] |
---|
76 | for item in value: |
---|
77 | valueClass = "%s.%s" % (type(item).__module__,type(item).__name__) |
---|
78 | if valueClass == "ea_model.iso_19115_2006_metadata_corrigendum.data_quality_information.dq_logicalconsistency.DQ_LogicalConsistency": |
---|
79 | self._accuracyReport_dq_logicalconsistency.append(item) |
---|
80 | continue |
---|
81 | if valueClass == "ea_model.iso_19115_2006_metadata_corrigendum.data_quality_information.dq_thematicaccuracy.DQ_ThematicAccuracy": |
---|
82 | self._accuracyReport_dq_thematicaccuracy.append(item) |
---|
83 | continue |
---|
84 | if valueClass == "ea_model.iso_19115_2_2009_metadata___imagery.data_quality_information___imagery.qe_usability.QE_Usability": |
---|
85 | self._accuracyReport_qe_usability.append(item) |
---|
86 | continue |
---|
87 | if valueClass == "ea_model.iso_19115_2006_metadata_corrigendum.data_quality_information.dq_completeness.DQ_Completeness": |
---|
88 | self._accuracyReport_dq_completeness.append(item) |
---|
89 | continue |
---|
90 | if valueClass == "ea_model.iso_19115_2006_metadata_corrigendum.data_quality_information.dq_positionalaccuracy.DQ_PositionalAccuracy": |
---|
91 | self._accuracyReport_dq_positionalaccuracy.append(item) |
---|
92 | continue |
---|
93 | if valueClass == "ea_model.iso_19115_2006_metadata_corrigendum.data_quality_information.dq_temporalaccuracy.DQ_TemporalAccuracy": |
---|
94 | self._accuracyReport_dq_temporalaccuracy.append(item) |
---|
95 | continue |
---|
96 | |
---|
97 | def __key(self): |
---|
98 | return (self.accuracyReport) |
---|
99 | |
---|
100 | def __eq__(self, y): |
---|
101 | ''' |
---|
102 | Cannot compare classes which do not define a "__key" attribute |
---|
103 | ''' |
---|
104 | if hasattr(self, '_%s__key' % (type(self).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): |
---|
105 | return self.__key() == y.__key() |
---|
106 | return id(self) == id(y) |
---|
107 | |
---|
108 | def __hash__(self): |
---|
109 | return hash(self.__key()) |
---|