Re: [mdr-users] FW: Generation of XMI from a sentence like "Dog is an animal"
Martin Matula <[email protected]> Thu, 26 Jan 2006 10:06:40 +0100
| Newsgroups | gmane.comp.java.netbeans.modules.mdr.user |
|---|---|
| Message-ID | <[email protected]> |
Hi Ramon,
this can be easily done using JMI/MDR. You can load a UML metamodel to
MDR, instantiate it and then do it a similar way you just described in
your example.
To see how to load/instantiate a UML metamodel and how to work with JMI
API, I would recommend you to look at the source code of UML2MOF tool
(it can be found in the CVS under mdr/extras/uml2mof or you can browse
it on the web:
http://mdr.netbeans.org/source/browse/mdr/extras/uml2mof/src/org/netbeans/lib/jmi/uml2mof/).
Then you should also read the following to get a basic idea about how to
manipulate the metadata using JMI APIs:
http://mdr.netbeans.org/example.html
Martin
Ramón Ramos wrote:
> Ok. Sorry. I understand. We want to deliver UML output as XMI in order to be
> imported by UML-Tools. Ideally we would like to use some library and say
>
> Model a = new Model();
> a.addClass("Animal");
> a.addClass("Dog");
> maybe a.addClassDiagramm("x");
> and so on
> ...addGeneralization("Dog", "Animal");
> a.writeXMI(...);
>
> We want to go the easiest way from sentences to uml (as xmi)
>
> Ramón
>
>
> ----- Original Message -----
> From: "Pete Rivett" <[email protected]>
> To: <[email protected]>
> Sent: Friday, January 20, 2006 1:10 PM
> Subject: RE: [mdr-users] FW: Generation of XMI from a sentence like "Dog is
> an animal"
>
>
> XMI for what metamodel?
> A natural one could be the Ontology Definition Metamodel nearing completion
> at OMG: this will have a mapping from RDF Schema and OWL. Since it will also
> have a UML Profile you also get the choice of using the UML2 metamodel. Let
> me know if you would like more details on this.
>
> Or do you want to use such sentences to create a MOF metamodel?
>
> Pete
>
> Pete Rivett (mailto:[email protected])
> CTO, Adaptive Inc.
> Hello House, 135 Somerford Road, Christchurch, BH23 3PY, UK
> Tel: +44 (0)1202 491243 Fax: +44 (0)1202 491241
> http://www.adaptive.com
>
>
>
>
>
>>-----Original Message-----
>>From: Ramón Ramos [mailto:[email protected]]
>>Sent: Friday, January 20, 2006 1:04 AM
>>To: [email protected]
>>Subject: [mdr-users] FW: Generation of XMI from a sentence
>>like "Dog is an animal"
>>
>>
>>
>>-----Original Message-----
>>From: Ramón Ramos [mailto:[email protected]]
>>Sent: Wednesday, January 18, 2006 8:29 PM
>>To: '[email protected]'
>>Subject: Generation of XMI from a sentence like "Dog is an animal"
>>
>>Hi,
>>
>>we have a project and we have to program a tool that creates
>>xmi as output.
>>Input are sentences like "Dog is an animal" "A dog has four
>>legs". What is
>>the easiest way to do that? Do you have any hints? We would
>>recognize the
>>generalization in the first sentence. Do you have an example
>>how we could go
>>then and use mdr (or something else) for this?
>>
>>Regards,
>>
>>Ramón Ramos
>>
>>
>>