source: mauRepo/MolesManager/trunk/src/ea_model/iso_19107_2003_spatial_schema/geometry/coordinate_geometry/gm_conic.py @ 8087

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/mauRepo/MolesManager/trunk/src/ea_model/iso_19107_2003_spatial_schema/geometry/coordinate_geometry/gm_conic.py@8087
Revision 8087, 2.9 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_19107_2003_spatial_schema.geometry.geometric_primitive.gm_curvesegment import  GM_CurveSegment
19from ascore.utils import has_value
20
21'''
22Created on 06-Feb-2012 15:59:42
23
24@author: mnagni
25'''
26
27class GM_Conic(GM_CurveSegment):
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._gm_curvesegment = GM_CurveSegment()       
40
41        self.startConstrParam = None
42        self.curve = None
43        self.numDerivativesAtEnd = None
44        self.interpolation = None
45        self.numDerivativesAtStart = None
46        self.endConstrParam = None
47        self.numDerivativeInterior = None
48        self.shifted = None
49        self.position = None
50        self.semiLatusRectum = None
51        self.eccentricity = None
52        super(GM_Conic, self).__init__()
53
54
55
56    @property
57    def curve(self):
58        return self._gm_curvesegment.curve
59
60    @curve.setter
61    def curve(self, value):
62            self._gm_curvesegment.curve = value
63
64    @property
65    def numDerivativesAtEnd(self):
66        return self._gm_curvesegment.numDerivativesAtEnd
67
68    @numDerivativesAtEnd.setter
69    def numDerivativesAtEnd(self, value):
70            self._gm_curvesegment.numDerivativesAtEnd = value
71
72    @property
73    def interpolation(self):
74        return self._gm_curvesegment.interpolation
75
76    @interpolation.setter
77    def interpolation(self, value):
78            self._gm_curvesegment.interpolation = value
79
80    @property
81    def numDerivativesAtStart(self):
82        return self._gm_curvesegment.numDerivativesAtStart
83
84    @numDerivativesAtStart.setter
85    def numDerivativesAtStart(self, value):
86            self._gm_curvesegment.numDerivativesAtStart = value
87
88
89
90    @property
91    def numDerivativeInterior(self):
92        return self._gm_curvesegment.numDerivativeInterior
93
94    @numDerivativeInterior.setter
95    def numDerivativeInterior(self, value):
96            self._gm_curvesegment.numDerivativeInterior = value
97
98
99
100
101
102
103
104
105
106    def __key(self):
107        return (self.startConstrParam, self.curve, self.numDerivativesAtEnd, self.interpolation, self.numDerivativesAtStart, self.endConstrParam, self.numDerivativeInterior, self.shifted, self.position, self.semiLatusRectum, self.eccentricity)
108
109    def __eq__(x, y):
110        '''
111        Cannot compare classes which do not define a "__key" attribute
112        '''
113        if hasattr(x, '_%s__key' % (type(x).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)):
114            return x.__key() == y.__key()
115        return id(x) == id(y)
116
117    def __hash__(self):
118        return hash(self.__key())
Note: See TracBrowser for help on using the repository browser.