source: mauRepo/MolesManager/trunk/src/ea_model/iso_19129_2009_igcd/igcd_framework/if_cellvaluepair.py @ 8087

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/mauRepo/MolesManager/trunk/src/ea_model/iso_19129_2009_igcd/igcd_framework/if_cellvaluepair.py@8087
Revision 8087, 2.5 KB checked in by mnagni, 8 years ago (diff)

Imported a new DB library which fixes the MO_ObservationColleciton <--> CEDA_ObservationCollection problem

Line 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18from ea_model.iso_19123_2005_coverages.coverages.discrete_coverages.cv_surfacevaluepair import  CV_SurfaceValuePair
19from ascore.utils import has_value
20
21'''
22Created on 06-Feb-2012 15:59:44
23
24@author: mnagni
25'''
26
27class IF_CellValuePair(CV_SurfaceValuePair):
28    '''
29        Represents a data entity defined in a UML diagram and supposed to
30        be persisted in a relational database.
31 
32        This class has been genererated automatically using the Apache Velocity project.
33    '''
34    '''
35        Please note that any access to the inner attributes should be done using
36        the given get/set methods and NOT accessing them directly.
37    '''
38    def __init__(self):
39        self._cv_surfacevaluepair = CV_SurfaceValuePair()       
40
41        self._collection_cv_discretesolidcoverage = []
42        self._collection_cvt_discretetimeinstantcoverage = []
43        self._collection_cv_discretesurfacecoverage = []
44        self._collection_cv_discretegridpointcoverage = []
45        self._collection_cv_discretecurvecoverage = []
46        self._collection_cv_discretepointcoverage = []
47        self.collection = []
48        self.value = None
49        self.geometry = None
50        self._extension_cv_valuecurve = []
51        self._extension_cv_valuehexagon = []
52        self._extension_cv_gridvaluecell = []
53        self._extension_cv_thiessenvaluepolygon = []
54        self._extension_cv_valuetriangle = []
55        super(IF_CellValuePair, self).__init__()
56
57    @property
58    def collection(self):
59        return self._cv_surfacevaluepair.collection
60
61    @collection.setter
62    def collection(self, value):
63            self._cv_surfacevaluepair.collection = value
64
65    @property
66    def collection(self):
67        return self._cv_surfacevaluepair.collection
68
69    @collection.setter
70    def collection(self, value):
71            self._cv_surfacevaluepair.collection = value
72
73
74
75
76
77    @property
78    def extension(self):
79        return self._cv_surfacevaluepair.extension
80
81    @extension.setter
82    def extension(self, value):
83            self._cv_surfacevaluepair.extension = value
84
85    def __key(self):
86        return (self.collection, self.collection, self.value, self.geometry, self.extension)
87
88    def __eq__(x, y):
89        '''
90        Cannot compare classes which do not define a "__key" attribute
91        '''
92        if hasattr(x, '_%s__key' % (type(x).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)):
93            return x.__key() == y.__key()
94        return id(x) == id(y)
95
96    def __hash__(self):
97        return hash(self.__key())
Note: See TracBrowser for help on using the repository browser.