How to get applied stereotypes of stereotypes [message #1844485] |
Wed, 15 September 2021 02:03  |
Lars Eulberg Messages: 2 Registered: September 2021 |
Junior Member |
|
|
Hello together,
I'm new in this forum and quite new with m2x Eclipse implementations.
In my first steps i've been progressing fast.
However, now, I'm a little bit struggling, because I do not find proper docs on already existing m2t mechnismns for java.
What I want to do is to transform a UML model to Openxava application.
Because I've not found any suitable ready to use tools, I've started to build a UML profile on papyrus and some templates with Acceleo to generate the Entity beans in Openxava style.
If there is any m2t mechanismn out there, which can already generate Openxava apps from UML out of the box, I would like to pick up a hint on such a tool.
If not, it is not that complicate to build it, but...
Openxava brings a lot of Java Annotations beside those Java already knows.
My idea is, to put a mark into the UML profile stereotypes whether the marked stereotype has to be transformed into an Java annotation, or not. Example
Class<--Stereotype1
Stereotype<--Stereotype2
I thought, well sounds easy. Apply Stereotype2 to Stereotype1. On the UML side, it works fine. Of course, if you apply Stereotype1 to a class, you have no direct access to Stereotype2. The Application is an instance of Stereotype1 and Stereotype2 is applied to Stereotype1 itself.
However, I cannot find a way to access the applied stereotypes of the stereotypes, neither through getAppliedStereotypes() nor through getStereotypeApplication().
I would do something like:
element.getStereotypeApplication(element.getAppliedStereotype(name)).getAppliedStereotypes()
or
element.getAppliedStereotype(name).getAppliedStereotypes()
Any ideas?
Thanks for some useful hints.
Best regards
|
|
|
|
Re: How to get applied stereotypes of stereotypes [message #1844574 is a reply to message #1844486] |
Thu, 16 September 2021 17:39   |
Lars Eulberg Messages: 2 Registered: September 2021 |
Junior Member |
|
|
Hi,
thank you for your quick response.
I understand that it is possible to generate java stuff out of ecore models through genModels, which itself is fine. But I've neither found a way to get to Entity Beans nor to customize the genmodel.
Are there any recommendations, maybe links, for tutorials on customizing genModels? I've not yet found any tutorials on customizing genModels.
Is there already any approach available, to generate Entity Beans out of UML models? Then, it is still needed to generate all the view stuff provided by OpenXava.
Acceleo gave me the fastest way into the generation stuff.
But, if there were any out of the box M2T solution for Entity Beans (JPA) or for OpenXava itself available, I would like to jump out of the Acceleo dress, of course.
Regards,
Lars Eulberg
|
|
|
|
Powered by
FUDForum. Page generated in 0.02968 seconds