|
|
Re: Get and create SysML subprofiles (SysML 1.4 Memtamodel) [message #1753513 is a reply to message #1753457] |
Tue, 07 February 2017 11:12 |
Rineseable Eika Messages: 8 Registered: January 2016 |
Junior Member |
|
|
Hi Benoit,
Thank you for the answer. So what I understand is that "programatically" I'm not able to get or apply à profile?
Let me give an example:
I'm java programing a Model to Model transformer from a model A to à target SysML 1.4 model. I want to transform a port element from model A to a FullPort port in the target SysML1.4 model. To do so, I need to create a port using UMLFactory, get the applicable stereotypes to acces the "Full port" stereotype. So, how can I transform and create a full port programatically ? I'm not supposed to do it on Papyrus IDE for instance. This is the same for the reste of SysML elements "allocation", "activities" , etc, etc, ...
Don't hesitate to ask for more specific details.
Regards,
Nesrine.
|
|
|
|
Re: Get and create SysML subprofiles (SysML 1.4 Memtamodel) [message #1754766 is a reply to message #1753535] |
Wed, 22 February 2017 08:37 |
Rineseable Eika Messages: 8 Registered: January 2016 |
Junior Member |
|
|
Hi Benoit,
I will try to be more specific in this posusing the code in charge of loading SysML 1.4 profile and subprofiles.
I'm using the attached SysmlResourcesUtilitites to load the profiles from the resource set etc...
In the calling class, I'm calling the load sysml profile and sub profiles as follow (the example is focused on the activities profile):
/*
* Create the model
*/
Model model = SysmlResourcesUtilities.createSysmlModel();
/*
* Create ResourceSet and load sysml profile
*/
ResourceSet set = new ResourceSetImpl();
Profile sysmlProfile = SysmlResourcesUtilities.init(set);
Profile requirementsProfile = (Profile) sysmlProfile.getNestedPackage("Activities");
(Profile) sysmlProfile.getNestedPackage("Activities"); throws a cast exception, as the getNestedPackage return a Package, not a profile.
If I check the SysML.profile.uml for SysML14, I can see that SysML14 subprofiles are absolutly not profiles (see attached image).
What is the right way to get the subprofiles ?
Don't hesitate if you have any question.
Regards,
Nesrine.
[Updated on: Wed, 22 February 2017 08:38] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.02977 seconds