Umple

Ken Webb 2010-03-08T18:17:52Z

Umple is "a programming language family. It adds abstractions such as Associations and Attributes derived from UML to object-oriented programming languages such as Java and PHP. Umple can also be used to create UML class diagrams textually".

Any Xholon application can write itself out in an Umple-compatible format. The resulting text can be copied and pasted into a version of Umple that runs online at http://cruise.site.uottawa.ca/umpleonline/ .

For example, the Xholon CTRNN Robot example, can be written out in Umple format. The Xholon2Umple class is not yet complete. In the following example, several lines of the text were manually edited to combine one-to-one relationships into one-to-many relationships.

/*
Automatically generated by Xholon version 0.8.1, using Xholon2Umple.java
Sun Mar 07 11:04:13 EST 2010 1267977853747
model: Ctrnn - AdapSysLab example
www.primordion.com/Xholon
*/
namespace dummy;
class Behavior {
  isA CtrnnEntity;
}
class Connection {
  isA CtrnnEntity;
  1 -> 1 Neuron;
}
class Ctrnn {
  isA Behavior;
}
class CtrnnEntity {
}
class Motor {
}
class Neuron {
  isA CtrnnEntity;
  1 -> 1..3 Connection;
}
class Photoreceptor {
  1 -> 1 SensorNeuron;
}
class Robot {
}
class SensorNeuron {
  isA CtrnnEntity;
  1 -> 1..2 Connection;
}

The following image shows the application loaded into the Xholon GUI (the small panel labeled "Xholon"), and the generated Umple-formatted text loaded into Umple online. The text was copied into the right-hand pane of Umple. Umple automatically displayed it as a UML diagram in the left-hand pane, which I then reformated by moving the class rectangles around on the screen.

The lower part of the image shows the result of clicking on the XMI Code button. The resulting text is in XMI format, the native format for models used by many third-party UML packages.

The generated XMI can be saved to a file, and imported into a number of different UML tools. After a small amount of repackaging, MagicDraw and BOUML were both able to read the XMI 2.1 file. The repackaging included adding outermost <xmi:XMI> and <uml:Model> elements. The following figure shows the class diagram that can be constructed after loading the model into BOUML.

return to main page