Skip to main content



      Home
Home » Modeling » Papyrus » Parse UML2 diagrams with Papyrus(Transform UML2 models to other format processed by other tools)
Parse UML2 diagrams with Papyrus [message #1232029] Wed, 15 January 2014 22:05 Go to next message
Eclipse UserFriend
Hi,

We want to parse UML2 models created by Papyrus so that we can creat other formats of files to be processed by other tools. So, how can I do this with Papyrus?

Thanks.
Robin
Re: Parse UML2 diagrams with Papyrus [message #1232108 is a reply to message #1232029] Thu, 16 January 2014 03:58 Go to previous messageGo to next message
Eclipse UserFriend
Hi Robin,

UML2 models in Papyrus use the standard OMG-xmi syntax, which is basically pure-XML.

EMF provides a higher level API for manipulating these models (Each XML tag is mapped to a Java class, with getters and setters for each attribute).

So... it's kind of trivial to parse/read. But I may have misunderstood your use-case. Could you please be more precise? For example, do you need to read Papyrus/UML files from other tools, or do you need to produce different files from Papyrus? In the later case, all the APIs for reading the models will be available.

Regards,
Camille
Re: Parse UML2 diagrams with Papyrus [message #1232124 is a reply to message #1232108] Thu, 16 January 2014 04:26 Go to previous messageGo to next message
Eclipse UserFriend
Thank you, Camille.

To be precisely, my use case is basically reading Papyrus/UML files from our own tools to extract some model information, e.g., components, layers, and relations among these modle elments, and then these information can be used as a design specification as its own file format needed by our own tools.

Since this reading (parsing) maybe complex as you said it is trivial, can we extract these information in the Papyrus environment and write them via Papyrus APIs to a formatted file we want?

Regards,
Robin
Re: Parse UML2 diagrams with Papyrus [message #1232132 is a reply to message #1232124] Thu, 16 January 2014 04:38 Go to previous message
Eclipse UserFriend
Hi Robin,

It would be easier to read these files directly from Papyrus, then produce the files you need. If the external tool is compatible with EMF, you can also import the Eclipse/UML2 metamodel in this other tool, then use their APIs to read the models from this other tool.

The files used by Papyrus are pure-EMF, so any documentation related to EMF (Eclipse Modeling Framework) should help you to achieve that.

Regards,
Camille
Previous Topic:Cannot set up InitialValues in SysML model
Next Topic:Cannot set up InitialValues in SysML model
Goto Forum:
  


Current Time: Sun Jul 27 02:12:52 EDT 2025

Powered by FUDForum. Page generated in 0.03403 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top