Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Does Papyrus support any Object Model or API? And using .uml files as XML files?
Does Papyrus support any Object Model or API? And using .uml files as XML files? [message #1847737] Thu, 04 November 2021 16:57 Go to next message
Ilja Kraval is currently offline Ilja KravalFriend
Messages: 38
Registered: October 2021
Member
Hi all

I have two questions:

1)
Does Papyrus support any Object Model or API for controlling its content (reading and writing), e.g. from a JAVA environment?

2)
Papyrus model files with the .uml extension contain the content of the given model with all elements and links (no graphics, only content) in an XML form (as seen when opened by an XML editor).
This XML file appears to conform to the XML standard in the UML specification (a very good general feature of Papyrus).
This could lead to the idea of ​​accessing the content through this file. For example, the Element-Constraint relationships discussed elsewhere are really beautiful to read there. So the information could be pulled from here.

Maybe it would be possible to change the content of the model via this file (of course "carefully" and with a backup).

As a test I tried to change the name of the Property in the .uml file with a text XML editor and it works, after loading Papyrus, the name has changed.

Has anyone tried such an access via an XML file with the .uml extension to Papyrus?

Thanks for the answers.

Ilya
Re: Does Papyrus support any Object Model or API? And using .uml files as XML files? [message #1847742 is a reply to message #1847737] Thu, 04 November 2021 18:53 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

The Eclipse UML2 project supports the *.uml extension and provides a memory representation and Java API. In principle the model is just an EMF model, but UML classes have so many little used properties that the UML2 implementation provides caches to reduce the memory bloat, but unfortunately hinder debugging.

Papyrus uses the UML2 project for all its UML model support (and the OCL project for its OCL support).

I suggest you follow the Eclipse UML2 tutorials so that you understand how it all works for just XMI files and the corresponding memory model and its API.

So yes everything that you want is provided by the Eclipse UML2 project.

Regards

Ed Willink
Previous Topic:A Constraint attached to an Attribute
Next Topic:A mysterious case of disappeared state in state machine diagram
Goto Forum:
  


Current Time: Fri Apr 26 18:48:47 GMT 2024

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

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

Back to the top