#
source:
mauRepo/MolesManager/trunk/src/ea_model/iso_19107_2003_spatial_schema/geometry/coordinate_geometry/gm_bsplinecurve.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_bsplinecurve.py@8091
Revision 8091, 3.4 KB checked in by mnagni, 9 years ago (diff) |
---|

Line | |
---|---|

1 | |

2 | |

3 | |

4 | |

5 | |

6 | |

7 | |

8 | |

9 | |

10 | |

11 | |

12 | |

13 | |

14 | |

15 | |

16 | |

17 | |

18 | |

19 | |

20 | |

21 | from ea_model.iso_19107_2003_spatial_schema.geometry.coordinate_geometry.gm_splinecurve import GM_SplineCurve |

22 | from ascore.utils import has_value |

23 | |

24 | ''' |

25 | Created on 16-Feb-2012 16:18:08 |

26 | |

27 | @author: mnagni |

28 | ''' |

29 | |

30 | class GM_BSplineCurve(GM_SplineCurve): |

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_splinecurve = GM_SplineCurve() |

43 | |

44 | self.curveForm = None |

45 | self.numDerivativesAtEnd = None |

46 | self.curve = None |

47 | self.knot = [] |

48 | self.interpolation = None |

49 | self.numDerivativesAtStart = None |

50 | self.degree = None |

51 | self.numDerivativeInterior = None |

52 | self.isPolynomial = None |

53 | self.controlPoints = None |

54 | self.knotSpec = None |

55 | super(GM_BSplineCurve, self).__init__() |

56 | |

57 | @property |

58 | def numDerivativesAtEnd(self): |

59 | return self._gm_splinecurve.numDerivativesAtEnd |

60 | |

61 | @numDerivativesAtEnd.setter |

62 | def numDerivativesAtEnd(self, value): |

63 | self._gm_splinecurve.numDerivativesAtEnd = value |

64 | |

65 | @property |

66 | def curve(self): |

67 | return self._gm_splinecurve.curve |

68 | |

69 | @curve.setter |

70 | def curve(self, value): |

71 | self._gm_splinecurve.curve = value |

72 | |

73 | @property |

74 | def knot(self): |

75 | return self._gm_splinecurve.knot |

76 | |

77 | @knot.setter |

78 | def knot(self, value): |

79 | self._gm_splinecurve.knot = value |

80 | |

81 | @property |

82 | def interpolation(self): |

83 | return self._gm_splinecurve.interpolation |

84 | |

85 | @interpolation.setter |

86 | def interpolation(self, value): |

87 | self._gm_splinecurve.interpolation = value |

88 | |

89 | @property |

90 | def numDerivativesAtStart(self): |

91 | return self._gm_splinecurve.numDerivativesAtStart |

92 | |

93 | @numDerivativesAtStart.setter |

94 | def numDerivativesAtStart(self, value): |

95 | self._gm_splinecurve.numDerivativesAtStart = value |

96 | |

97 | @property |

98 | def degree(self): |

99 | return self._gm_splinecurve.degree |

100 | |

101 | @degree.setter |

102 | def degree(self, value): |

103 | self._gm_splinecurve.degree = value |

104 | |

105 | @property |

106 | def numDerivativeInterior(self): |

107 | return self._gm_splinecurve.numDerivativeInterior |

108 | |

109 | @numDerivativeInterior.setter |

110 | def numDerivativeInterior(self, value): |

111 | self._gm_splinecurve.numDerivativeInterior = value |

112 | |

113 | @property |

114 | def controlPoints(self): |

115 | return self._gm_splinecurve.controlPoints |

116 | |

117 | @controlPoints.setter |

118 | def controlPoints(self, value): |

119 | self._gm_splinecurve.controlPoints = value |

120 | |

121 | def __key(self): |

122 | return (self.curveForm, self.numDerivativesAtEnd, self.curve, self.knot, self.interpolation, self.numDerivativesAtStart, self.degree, self.numDerivativeInterior, self.isPolynomial, self.controlPoints, self.knotSpec) |

123 | |

124 | def __eq__(self, y): |

125 | ''' |

126 | Cannot compare classes which do not define a "__key" attribute |

127 | ''' |

128 | if hasattr(self, '_%s__key' % (type(self).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): |

129 | return self.__key() == y.__key() |

130 | return id(self) == id(y) |

131 | |

132 | def __hash__(self): |

133 | return hash(self.__key()) |

**Note:**See TracBrowser for help on using the repository browser.