Loading programatically a model referring to a profile in a standalone application [message #627989] |
Fri, 16 October 2009 13:42 |
|
Hi,
I have an UML 2 Class Diagram referring to a profile.
While opening it in eclipse I can see it correctly: my classes have the stereotypes defined in the profile that I applied. While loading it programmatically I don't get them using the method getAppliedStereotypes().
I have loaded the pathmaps according to the FAQ but I don't know if I have to specify also the uml profile in the resources set. Anyway I tried to do it in this way:
addMapping(URI.createURI("platform:/resource/abc/metamodel/uwe.profile.uml "), URI.createURI("file:/D:/thesis/").appendSegment("uwe") .appendFileExtension(UMLResource.PROFILE_FILE_EXTENSION));
The addMapping method is reported:
private void addMapping(URI src, URI dest){
Map uriMap = resourcesSet.getURIConverter().getURIMap();
uriMap.put(src, dest);
System.out.println("Uri Mapping '"+src+"' -> '"+dest+"'");
}
I used the URI "platform:/resource/abc/metamodel/uwe.profile.uml" because it is the URI i see openening the model in the Eclipse (I can see the platform URI for the model itself, the one for the profile and then the list of URI for the pathmaps).
Can someone explain me what I am missing?
Federico
website: http://www.federico-tomassetti.it
|
|
|
|
Powered by
FUDForum. Page generated in 0.02953 seconds