OpenCCM - The UML Compilation Tool Chain | |||||||||||||||||||||||||||||||
The UML OpenCCM Compilation Tool ChainThe UML OpenCCM Compilation Tool Chain is a set of tools for feeding the OpenCCM Platform from an XMI 1.1 UML 1.4 Profile for CORBA Components document and for generating OMG IDL 3.0, OMG CIDL and Java implementation files from the same XMI file. The UML OpenCCM Compilation Tool Chain is composed of the following tools:
In the following sections, all UML OpenCCM Compilation Tool Chain scripts are illustrated on top of the ORBacus 4.1.0 product running on a Linux system. However all these following scripts could be used in the same way on any ORB products and operating systems supported by OpenCCM. The XMI 1.1 UML 1.4 documentsThese commands feeds the platform or generates differents files from an XMI document in parameter. This XMI 1.1 UML 1.4 documents must respect the OMG XMI 1.1 (see OMG TC Document formal/00-11-02) and the OMG UML 1.4 (see OMG TC Document formal/01-09-67) specifications. The elements of the UML model must be stereotyped with the stereotypes defined in the UML Profile for CORBA (OMG TC Document formal/02-04-01) and CORBA Components (OMG TC Document mars/03-07-01) specifications. The XMI 1.1 UML 1.4 documents can be written with any text editor, but it can be generated by a UML tool, e.g.:
If your UML tool is Poseidon, you can download the CORBA stereotypes and the CIF stereotypes : CORBAStereotypes.zuml, CIFStereotypes.zuml Feeding XMI 1.1 UML 1.4 documents into the OpenCCM Interface Repository
The
For example, the corresponding UML diagram of the
Next, the XMI 1.1 UML 1.4 document can be generated by the UML tools to parse it
and to feed it into the OpenCCM Interface Repository
with the $ xmi2ir test/sample.xmi . . . xmi2ir 0.8.2: Reading from test/sample.xmi... xmi2ir 0.8.2: Checking if the UML model is correct... xmi2ir 0.8.2: The UML model is correct. xmi2ir 0.8.2: Feeding the UML model into the OpenCCM Interface Repository... xmi2ir 0.8.2: The UML model is fed into the OpenCCM Interface Repository. $ Warning: XMI 1.1 UML 1.4 documents must be fed into the OpenCCM Interface Repository only once!!!
The
To obtain usage and help information, do: $ xmi2ir --help Usage: xmi2ir [-h|--help] [--version] [--silent] xmi_uml_document Options: -h, --help Display this information and exit --version Output version information and exit --silent Silent output messages Description: Feed the OpenCCM Interface Repository with an XMI 1.1 UML 1.4 document $ To obtain version information, do: $ xmi2ir --version OpenCCM xmi2ir 0.8.2 Copyright (C) 2000-2004 INRIA - USTL - LIFL - GOAL . . . $
By default, the $ xmi2ir --silent test/sample.xmi $ Generating OMG IDL 3.0, CIDL and the Java implementation files from the XMI 1.1 UML 1.4 document
The For example, the corresponding UML diagram of the Demo 1 can be represented by the following picture: Next, the implementation of the Client (CIF) can be represented by the following model. The implementation classes correspond to the classes which will be generated by the command. Theses classes contain all the features present in the generated classes (attributes, methods, ...). The content of the differents methods are contained in the modelisation, but not visible on the picture. For the implementation of the Server, it's the same kind of UML representation.
All these pictures are extracted from a UML file, then we can execute the
$ uml2ccm demo1-cif.xmi -d out uml2ccm 0.8.1: Generating the Java implementation files... uml2ccm 0.8.1: Transformation of the Home ClientHomeImpl ... uml2ccm 0.8.1: Transformation of the Component ClientImpl ... uml2ccm 0.8.1: Transformation of the Home ServerHomeImpl ... uml2ccm 0.8.1: Transformation of the Component ServerImpl ... uml2ccm 0.8.1: Generating the OMG IDL 3.0 and OMG CIDL files... uml2ccm 0.8.1: Generating OMG IDL 3.0 file outDemo1Mono/demo1.idl3 ... uml2ccm 0.8.1: Generating OMG CIDL file outDemo1Mono/demo1.cidl ... uml2ccm 0.8.1: The OMG IDL 3.0, OMG CIDL and Java implementation files are generated. $ Now, the generated OMG IDL 3.0 and OMG CIDL files are conform to the UML representation: $ cat out/demo1.idl3 . . . #ifndef __DEMO1__ #define __DEMO1__ #pragma prefix "ccm.objectweb.org" module demo1 { interface Display; component Client; component Server; interface Display { void print(in string text); }; component Client { attribute string the_name; uses ::demo1::Display to_server; }; home ClientHome manages ::demo1::Client { }; component Server { attribute string the_name; provides ::demo1::Display for_clients; }; home ServerHome manages ::demo1::Server { }; }; #endif $ $ cat out/demo1.cidl . . . #ifndef __DEMO1__ #define __DEMO1__ #pragma prefix "ccm.objectweb.org" module demo1 { composition session ClientSessionComposition { home executor HomeImpl { implements ::demo1::ClientHome; manages ComponentImpl; }; }; composition session ServerSessionComposition { home executor HomeImpl { implements ::demo1::ServerHome; manages ComponentImpl; }; }; }; #endif $
So, thanks to the This generation are based on the MDA approach. This command runs MDA transformations from the UML representation to the Java implementation and to the OMG IDL 3.0 and OMG CIDL langage. So, this feature is an example that the MDA approach can be used to create an application.
The
To obtain usage and help information, do: $ uml2ccm --help Usage: uml2ccm [-h|--help] [--version] [--silent] [--monolithic] [-d|--outputdir directory] xmi_uml_document Options: -h, --help Display this information and exit --version Output version information and exit --silent Silent output messages --monolithic Generate the monolithic version of the Java implementation (CIF Implementation by default) -d, --outputdir directory Set the output directory for the generated files ('generated' by default) Description: Transform the XMI 1.1 UML 1.4 document to the OMG IDL 3.0, OMG CIDL and Java Implementation files $ To obtain version information, do: $ uml2ccm --version OpenCCM uml2ccm 0.8.2 Copyright (C) 2000-2004 INRIA - USTL - LIFL - GOAL . . . $
By default, the $ uml2ccm --silent test/sample.xmi $ |
|||||||||||||||||||||||||||||||
Copyright © 1999-2005, ObjectWeb Consortium | contact | webmaster | Last modified at 2005-07-07 02:04 PM |