Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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] Thu, 16 January 2014 03:05 Go to next message
Jingang Zhou is currently offline Jingang ZhouFriend
Messages: 18
Registered: August 2010
Junior Member
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 08:58 Go to previous messageGo to next message
Camille Letavernier is currently offline Camille LetavernierFriend
Messages: 952
Registered: February 2011
Senior Member
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


Camille Letavernier
Re: Parse UML2 diagrams with Papyrus [message #1232124 is a reply to message #1232108] Thu, 16 January 2014 09:26 Go to previous messageGo to next message
Jingang Zhou is currently offline Jingang ZhouFriend
Messages: 18
Registered: August 2010
Junior Member
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 09:38 Go to previous message
Camille Letavernier is currently offline Camille LetavernierFriend
Messages: 952
Registered: February 2011
Senior Member
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


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


Current Time: Thu Mar 28 16:50:13 GMT 2024

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

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

Back to the top