The transformed model is contained in an EGraph and saved like this:
options.put(XMIResource.OPTION_SCHEMA_LOCATION,
Boolean.TRUE); Resource resource2 =
resourceSet.createResource(URI.createFileURI("seclinks_corrected.uml"));
resource2.getContents().addAll(graph.getRoots());
try {
resource2.save(options);}
where
org.eclipse.emf.ecore.resource.impl
is used as ResourceImplementation.
What I miss in the saved model are all xmi:id-attributes.
I already had a look at further options in XMIResource but didn't find
an matching options.
I already asked the EMF-people and Ed Merks suggested:
"So you need to be sure to register the necessary UML2 things. They
have some UMLUtil thingy that you can use to initialize a resource set.
Ask questions about UML2 on eclipse.modeling.mdt.uml2"