|
View:
New views
2 Messages
—
Rating Filter:
Alert me
|
|
|
Programmatic model generation via MDRMy team wants to express its model in our own text (YAML) format, rather than via a WYSIWYG UML tool, and be able to use it in Andromda. To do that, we need to be able to programmagically build an XMI representation of our model after parsing our YAML files. Does MDR provide an API for defining a model (including classes, associations, attributes, operations, etc.) from scratch programmatically, and then exporting it to XMI?
From the example at the bottom of http://mdr.netbeans.org/example.html it looks like this might be possible starting with ProjectFactory.createProject(), but I've been unable to find documentation which details how this might be done. Any pointers would be greatly appreciated! Thanks, Nick |
|
|
RE: Programmatic model generation via MDR> My team wants to express its model in our own text (YAML)
> format, rather than via a WYSIWYG UML tool, and be able to > use it in Andromda. To do that, we need to be able to > programmagically build an XMI representation of our model > after parsing our YAML files. Does MDR provide an API for > defining a model (including classes, associations, > attributes, operations, etc.) from scratch programmatically, > and then exporting it to XMI? Sure. That's what ArgoUML (nasty WYSIWYG UML tool) uses to generate XMI files that can be fed to AndroMDA. > I've been unable to find documentation which details how this > might be done. Any pointers would be greatly appreciated! Well, like all things UML, there's really not a lot of "getting started" documentation for writing tools (as opposed to just using UML). The key thing that you're probably missing is that MDR is an implementation of JMI which is just a thin veneer for working with MOF which is in the M3 layer, while you really want to be working with UML 1.4 which is at the M2 layer. You'll need to load the UML 1.4 metamodel with MDR and then work with those UML elements. In practice this means that you'll be depending heavily on the UML 1.4 spec, but only using the JMI & MDR Javadoc a little bit. If you want an example of software that does this, you can look at the ArgoUML subsystem that encapsulates all the UML 1.4 / MOF / JMI / MDR stuff here http://argouml.tigris.org/source/browse/argouml/trunk/src/model-mdr/. The API was defined as a façade to wrap our previous UML implementation library (NSUML), so it's not what you'd design if you were starting from scratch, but it works. BTW, your post came through with an ad for a commercial mailing list archive. You can access the list archives directly at http://mdr.netbeans.org/servlets/ProjectMailingListList Tom |
| Free Forum Powered by Nabble | Forum Help |