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

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@8091
Revision 8091, 2.9 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_19107_2003_spatial_schema.geometry.geometric_primitive.gm_curvesegment import  GM_CurveSegment
22from ascore.utils import has_value
23
24'''
25Created on 16-Feb-2012 16:18:04
26
27@author: mnagni
28'''
29
30class GM_Conic(GM_CurveSegment):
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._gm_curvesegment = GM_CurveSegment()       
43
44        self.startConstrParam = None
45        self.numDerivativesAtEnd = None
46        self.curve = None
47        self.interpolation = None
48        self.numDerivativesAtStart = None
49        self.endConstrParam = None
50        self.numDerivativeInterior = None
51        self.shifted = None
52        self.position = None
53        self.semiLatusRectum = None
54        self.eccentricity = None
55        super(GM_Conic, self).__init__()
56
57    @property
58    def numDerivativesAtEnd(self):     
59        return self._gm_curvesegment.numDerivativesAtEnd
60
61    @numDerivativesAtEnd.setter
62    def numDerivativesAtEnd(self, value):       
63            self._gm_curvesegment.numDerivativesAtEnd = value
64
65    @property
66    def curve(self):   
67        return self._gm_curvesegment.curve
68
69    @curve.setter
70    def curve(self, value):     
71            self._gm_curvesegment.curve = value
72
73    @property
74    def interpolation(self):   
75        return self._gm_curvesegment.interpolation
76
77    @interpolation.setter
78    def interpolation(self, value):     
79            self._gm_curvesegment.interpolation = value
80
81    @property
82    def numDerivativesAtStart(self):   
83        return self._gm_curvesegment.numDerivativesAtStart
84
85    @numDerivativesAtStart.setter
86    def numDerivativesAtStart(self, value):     
87            self._gm_curvesegment.numDerivativesAtStart = value
88
89    @property
90    def numDerivativeInterior(self):   
91        return self._gm_curvesegment.numDerivativeInterior
92
93    @numDerivativeInterior.setter
94    def numDerivativeInterior(self, value):     
95            self._gm_curvesegment.numDerivativeInterior = value
96
97    def __key(self):
98        return (self.startConstrParam, self.numDerivativesAtEnd, self.curve, self.interpolation, self.numDerivativesAtStart, self.endConstrParam, self.numDerivativeInterior, self.shifted, self.position, self.semiLatusRectum, self.eccentricity)
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())
Note: See TracBrowser for help on using the repository browser.