Export created model as PNML [message #1743300] |
Wed, 14 September 2016 04:36  |
Eclipse User |
|
|
|
Hello,
I have created an editor with EMF and Sirius. Now I am looking for a way to export the models, that I am building with this editor, in a certain format, like PNML.
Is there a way how to do/implement this function? I would be grateful for any hints.
Cheers,
Emil
|
|
|
Re: Export created model as PNML [message #1743371 is a reply to message #1743300] |
Wed, 14 September 2016 11:14  |
Eclipse User |
|
|
|
Hi.
The semantic models represented by Sirius are plain EMF models that can be loaded/manipulated programmatically using the standard EMF APIs with no dependency on Sirius itself. Only the .aird files/models are Sirius-specific, but hey only contain the graphical/layout information, and then they are EMF models too.
If by PNML you mean http://www.pnml.org/, it looks like they already provide an EMF metamodel: http://www.pnml.org/grammar.php. If you are using it, then there is nothing to do, the semantic models are already PNML files. If you have defined your own PNML-like metamodel, then you'll need to write a converter, but this has nothing to do with Sirius. A plain Java program (or Eclipse plug-in) which uses the EMF framework and both metamodel implementations should be enough to 1) load your models created using your own metamodel, 2) convert it into an instance of the PNML metamodel, 3) save the result.
Regards,
Pierre-Charles
--
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
Powered by
FUDForum. Page generated in 0.02822 seconds