600 assocType = AssociationType(int(value)) |
600 assocType = AssociationType(int(value)) |
601 elif key == "topToBottom": |
601 elif key == "topToBottom": |
602 topToBottom = Utilities.toBool(value) |
602 topToBottom = Utilities.toBool(value) |
603 |
603 |
604 return src, dst, assocType, topToBottom |
604 return src, dst, assocType, topToBottom |
|
605 |
|
606 def toDict(self): |
|
607 """ |
|
608 Public method to collect data to be persisted. |
|
609 |
|
610 @return dictionary containing data to be persisted |
|
611 @rtype dict |
|
612 """ |
|
613 return { |
|
614 "src": self.itemA.getId(), |
|
615 "dst": self.itemB.getId(), |
|
616 "type": self.assocType.value, |
|
617 "topToBottom": self.topToBottom, |
|
618 } |