Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Generate output from diagram content
Generate output from diagram content [message #1848557] Tue, 07 December 2021 19:11 Go to next message
T Wintermann is currently offline T WintermannFriend
Messages: 1
Registered: December 2021
Junior Member
Hi All,

I hope this makes sense, newbie here...

I am trying the following: I get a set of XSD files as input, from which I generate an EMF Generator Model, then an UML model and finally a Papyrus model (based on the instructions I found here: 1). I can then create class diagrams based on the model, which gives me the UI functionality I am looking for.

I would now like to generate some XML output based only on the content of a specific class diagram. Is there a way for doing this? Every generation example I look into seems to take into account the entire model -- I only use a handful of classes from the quite large input, so I would like to limit the scope.

https:// wiki.onap.org/display/DW/Step-by-step+to+generate+Papyrus+UML+model+from+XSD+file
Re: Generate output from diagram content [message #1848575 is a reply to message #1848557] Wed, 08 December 2021 11:50 Go to previous messageGo to next message
Carsten Pitz is currently offline Carsten PitzFriend
Messages: 479
Registered: May 2015
Location: Germany
Senior Member
> I hope this makes sense, newbie here...

If you have a use case, it make sense.

OK, nevertheless a diagram is a visualization of typically a part of a model. Because a diagram is a visualization, a diagram is not very well suited as a base for a transformation.

Alternative approaches are
* group the classes to be taken into account by modeling means by
- relating these classes with an element used to be the root element of the transformation (i.e. making the classes realize an artifact and using the artifact as the root element)
- classifying the classes by a stereotype or a value of a stereotype
* if possible, make the transformation selecting the right classes. In this case you take a class as root element and the transformation computes which other classes are needed.

/pica


Re: Generate output from diagram content [message #1848602 is a reply to message #1848575] Thu, 09 December 2021 13:17 Go to previous messageGo to next message
Pauline Deville is currently offline Pauline DevilleFriend
Messages: 122
Registered: November 2016
Location: Paris Saclay, France
Senior Member
Hello,

Papyrus does not have tools to convert the UML into an other xsd format. You should certainly create you own generator using the UML API.

Best regards,
Pauline
Re: Generate output from diagram content [message #1848603 is a reply to message #1848602] Thu, 09 December 2021 13:23 Go to previous message
Carsten Pitz is currently offline Carsten PitzFriend
Messages: 479
Registered: May 2015
Location: Germany
Senior Member
> You should certainly create you own generator using the UML API.

or
* ATL (https://www.eclipse.org/atl/)
* Acceleo (https://www.eclipse.org/acceleo/)
* Xtext / Xtend (https://www.eclipse.org/Xtext/)
...

Papyrus being a member of Eclipse provides you a broad choice :-)

/Carsten
Previous Topic:simple import classes only with class names
Next Topic:Composite association has multiplicity labels on wrong (?) sides
Goto Forum:
  


Current Time: Fri Apr 19 07:14:16 GMT 2024

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

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

Back to the top