Entity: Figure 33 53 null * name String 3 false true false Operation: copyFigure Figure void true RealFigure->exists( rf | rf.name = name & FigureDescriptor->exists( fd | fd.actualFigure = rf ) ) Operation: copyReferences Figure void true true Operation: copyReference Figure void fd FigureDescriptor d DiagramElement true RealFigure[name] = fd.actualFigure => d.figure = fd & ( d : DiagramLabel => ChildAccess->exists( ca | d.accessor = ca & ca : fd.accessors ) ) Operation: copyChildren Figure void true RealFigure[name].children = RealFigure[children.name] Entity: Figure1 248 72 null * abstract Entity: RealFigure 254 155 Figure1 * name String 3 false true false Entity: FigureGallery 174 238 null * Operation: copyFigures FigureGallery void true figures1 = RealFigure[figures.name] & descriptors = FigureDescriptor ->select ( actualFigure : figures1 ) Entity: FigureDescriptor 516 171 null * Entity: DiagramElement 544 293 null * abstract Entity: Node 450 387 DiagramElement * Entity: Compartment 518 391 DiagramElement * Entity: Connection 672 392 DiagramElement * Entity: DiagramLabel 795 393 DiagramElement * Entity: ChildAccess 785 178 null * Entity: Canvas 612 494 null * Operation: cleanModel Canvas void true Figure@pre.referencingElements = {} & FigureGallery.figures = {} & Figure->isDeleted() Association: Figure Figure 1 33 84 142 62 0 children null Association: FigureGallery Figure 1 178 240 162 146 0 figures null Association: RealFigure Figure1 1 298 158 291 93 0 children null Association: FigureGallery RealFigure 1 205 240 256 191 0 figures1 null Association: FigureDescriptor Figure1 0 518 174 295 78 1 actualFigure null Association: FigureGallery FigureDescriptor 1 252 258 518 192 0 descriptors null Association: DiagramElement FigureDescriptor 0 561 295 555 192 1 figure null Association: FigureDescriptor ChildAccess 1 615 181 787 186 0 accessors null Association: DiagramLabel ChildAccess 0 815 396 810 199 1 accessor null Association: Canvas Node 1 615 496 479 408 0 nodes null Association: Canvas Compartment 1 624 495 567 413 0 compartments null Association: Canvas Connection 1 636 494 677 413 0 connections null Association: Canvas DiagramLabel 1 658 495 798 414 0 labels null Association: Canvas FigureGallery 1 615 515 252 274 0 figures null Association: Figure DiagramElement 1 168 62 548 300 0 referencingElements null Generalisation: Figure1 RealFigure 260 157 259 95 Generalisation: DiagramElement Node 478 393 548 313 Generalisation: DiagramElement Compartment 559 392 554 315 Generalisation: DiagramElement Connection 677 394 622 314 Generalisation: DiagramElement DiagramLabel 802 395 646 315 Activity: Figure copyReferences for fd : FigureDescriptor do for d : referencingElements do copyReference(fd,d) Activity: Canvas null loadModel("gmf1.txt") ; Figure.copyFigure() ; Figure.copyChildren() ; FigureGallery.copyFigures() ; Figure.copyReferences() ; Canvas.cleanModel() ; saveModel("out.txt")