Dashboard > Developers > Developers Home > Experimental generation of code and documentation from UML
  Developers Log In | Sign Up   View a printable version of the current page.  
  Experimental generation of code and documentation from UML
Added by Erik Sundvall, last edited by Erik Sundvall on 16-May-2008  (view change)
Labels: 
(None)

This page is in pre-alpha stage. When it comes closer to beta it will be noted on the openEHR developer mailing list...

EMF is a (meta)modeling framework in Eclipse. UML version 1+ or 2+ are some of the possible meta models. The openEHR RM and AM specifications are available as UML (Magic Draw) and also (partly) as XML Schemas. This wikipage is a intended for people that arw interested in getting the openEHR specification models as input into the EMF framework and then to generate artifacts such as code and documentation as output from the EMF framework.

Experiment description 

An initial experiment was conducted running Eclipse 3.3 on Windows XP.

  1. Get a machine readable version of the openEHR model specifications in UML/XMI-format
  2. Open the UML file in an EMF-enabled Eclipse setup.
  3. Inspect and edit the model if needed. If errors or differences in semantics compared to the PDF-specifications are found, then supply feedback to openEHR (TODO: Add link to JIRA-enry for "computable" spec?) Any EMF-based editing plugin for Eclipse should work. The errors and TODO-items found are listed at the end of this page.
  4. Use, modify or create new (usually template driven) output mechanisms to create code and documentation. There are several ways to go from EMF to Code (see discussion)

Suggested automated (or semiautomated) outputs to develop:

  • Java UPPER_CASE and/or CamelCase class implementation stubs possibly extended by...
    • Annotations for DBC frameworks (rules should be extracted from XMI file)
    • Annotations for serializing frameworks for XML and JSON (and possibly DADL if somebody feels a pressing need for it )
    • Conversion code between mutable and immutable versions of java implementations
  • JSON Schemas for AM and RM
  • Python stubs
  • C# stubs
  • Ruby stubs
  • Class documentation segments in FM (FrameMaker) format or something that FM can import as long as the specs are written using that tool instead of an open source alternative.
  • Model documentation in other formats (HTML, PDF etc)
  • ...

Errors and TODO-items

V 1.0.1 Alpha 0.02

DONE: (Please not that these "Alpha 0.02" changes  are not uploaded to this site yet)

  • rm.composition.content.entry.INSTRUCTION: Removed double generalization/inheritance to ENTRY
  • rm.composition.content.entry. EVALUATION: Removed double generalization/inheritance to ENTRY
  • rm.data_types.time_specification.DV_TIME_SPECIFICATION: Made it abstract
  • rm.data_structures.representation.ITEM: Added generalization/inheritance to LOCATABLE

TODO:

QUESITONS

  • DV_TIME_SPECIFICATION: Should the children of this class really repeat the method definitions instead of inheriting? Is that because the methods probably will need to be implemented differently and only share signatures?

Additions to prepare audience for V 1.0.1++ (Upcoming versions)

  • Add comment: PARTICIPATION will probably inhertit from LOCATABLE...
Site running on a free Atlassian Confluence Community License granted to The openEHR Foundation . Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.5.7 Build:#813 Aug 28, 2007) - Bug/feature request - Contact Administrators