Login | Register
My pages Projects Community openCollabNet

argouml
Wiki: Repository Comparison With Model Interface

Revision 1 as of 2010-07-28 02:16:46 -0700

Edit this page | Links to this page | Page information | Attachments | Refresh page

 

Create an operation inside an interface

   1 Object operationType = Model.getMetaTypes().getOperation();
   2 Object myOperation = Model.getUmlFactory.buildNode(elementType, myInterface);

   1 MetaType operationType = MetaTypes().getOperation();
   2 Element myOperation = operationType.createElement(myInterface);

Add an existing element to another - everything can be done with a far reduced API (one add method) and less verbose

   1 Model.getCoreHelper().addOwnedElement(myNamespace, myInterface);
   2 Model.getCoreHelper().addFeature(myOperation, myInterface);
   3 Model.getCoreHelper().addParameter(myParameter, myOperation);

   1 myNamespace.add(myInterface);
   2 myInterface.add(myOperation);
   3 myOperation.add(myParameter);