#
source:
mauRepo/MolesManager/trunk/src/ea_model/iso_19107_2003_spatial_schema/geometry/coordinate_geometry/gm_arc.py
@
8089

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_arc.py@8089
Revision 8089, 3.0 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_arcstring import GM_ArcString |

22 | from ascore.utils import has_value |

23 | |

24 | ''' |

25 | Created on 14-Feb-2012 17:19:32 |

26 | |

27 | @author: mnagni |

28 | ''' |

29 | |

30 | class GM_Arc(GM_ArcString): |

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_arcstring = GM_ArcString() |

43 | |

44 | self.numDerivativesAtEnd = None |

45 | self.curve = None |

46 | self.interpolation = None |

47 | self.numDerivativesAtStart = None |

48 | self.numDerivativeInterior = None |

49 | self.numArc = None |

50 | self.controlPoints = None |

51 | super(GM_Arc, self).__init__() |

52 | |

53 | @property |

54 | def numDerivativesAtEnd(self): |

55 | return self._gm_arcstring.numDerivativesAtEnd |

56 | |

57 | @numDerivativesAtEnd.setter |

58 | def numDerivativesAtEnd(self, value): |

59 | self._gm_arcstring.numDerivativesAtEnd = value |

60 | |

61 | @property |

62 | def curve(self): |

63 | return self._gm_arcstring.curve |

64 | |

65 | @curve.setter |

66 | def curve(self, value): |

67 | self._gm_arcstring.curve = value |

68 | |

69 | @property |

70 | def interpolation(self): |

71 | return self._gm_arcstring.interpolation |

72 | |

73 | @interpolation.setter |

74 | def interpolation(self, value): |

75 | self._gm_arcstring.interpolation = value |

76 | |

77 | @property |

78 | def numDerivativesAtStart(self): |

79 | return self._gm_arcstring.numDerivativesAtStart |

80 | |

81 | @numDerivativesAtStart.setter |

82 | def numDerivativesAtStart(self, value): |

83 | self._gm_arcstring.numDerivativesAtStart = value |

84 | |

85 | @property |

86 | def numDerivativeInterior(self): |

87 | return self._gm_arcstring.numDerivativeInterior |

88 | |

89 | @numDerivativeInterior.setter |

90 | def numDerivativeInterior(self, value): |

91 | self._gm_arcstring.numDerivativeInterior = value |

92 | |

93 | @property |

94 | def numArc(self): |

95 | return self._gm_arcstring.numArc |

96 | |

97 | @numArc.setter |

98 | def numArc(self, value): |

99 | self._gm_arcstring.numArc = value |

100 | |

101 | @property |

102 | def controlPoints(self): |

103 | return self._gm_arcstring.controlPoints |

104 | |

105 | @controlPoints.setter |

106 | def controlPoints(self, value): |

107 | self._gm_arcstring.controlPoints = value |

108 | |

109 | def __key(self): |

110 | return (self.numDerivativesAtEnd, self.curve, self.interpolation, self.numDerivativesAtStart, self.numDerivativeInterior, self.numArc, self.controlPoints) |

111 | |

112 | def __eq__(self, y): |

113 | ''' |

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

115 | ''' |

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

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

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

119 | |

120 | def __hash__(self): |

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

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