|
From: <de...@us...> - 2003-06-17 01:11:48
|
Update of /cvsroot/pymerase/pymerase/pymerase/input
In directory sc8-pr-cvs1:/tmp/cvs-serv3476
Modified Files:
parseXMI.py
Log Message:
Indexed into classesInModel using the name of the class that an association
is bound to instead of the association name.
(which when the association name is different causes class duplications)
Index: parseXMI.py
===================================================================
RCS file: /cvsroot/pymerase/pymerase/pymerase/input/parseXMI.py,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** parseXMI.py 16 Jun 2003 20:30:26 -0000 1.21
--- parseXMI.py 17 Jun 2003 01:11:44 -0000 1.22
***************
*** 466,472 ****
# get names of types
thisEndTypeName = self.getEndClassName(end)
! thisEndTypeUUID = self.getUUID(end)
otherEndTypeName = self.getEndClassName(self.getOppositeEnd(end))
! otherEndTypeUUID = self.getUUID(self.getOppositeEnd(end))
# get references to type objects from the master class list
--- 466,472 ----
# get names of types
thisEndTypeName = self.getEndClassName(end)
! thisEndTypeUUID = self.getUUID(self.getEndClass(end))
otherEndTypeName = self.getEndClassName(self.getOppositeEnd(end))
! otherEndTypeUUID = self.getUUID(self.getEndClass(self.getOppositeEnd(end)))
# get references to type objects from the master class list
***************
*** 552,555 ****
--- 552,560 ----
return associationEnd.type.name
+ def getEndClass(self, associationEnd):
+ """Get the class referenced by this association end
+ """
+ return associationEnd.type
+
class uml14Parser(umlParser):
"""Utility functions for accessing a model using UML 1.4 naming conventions
***************
*** 564,567 ****
--- 569,577 ----
"""
return associationEnd.participant.name
+
+ def getEndClass(self, associationEnd):
+ """Get the class referenced by this association end
+ """
+ return associationEnd.participant
|