Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community Forumssave options
https://www.eclipse.org/forums/index.php/mv/msg/825606/1438778/#msg_1438778
I'm trying to save a programatically created bpmn2 model exactly like the modeler generates the file.
The easy solution would be to use the Bpmn2ModelerResourceFactory but in a stand alone mode (that is similar to the modelreader example) it requires too many modeler dependencies to be practical.
Therefore I have been looking into the save options of a emf model and got completely lost.
First: all bpmn elements that the bpmn2 model does not recognize gets save with prefix of my target namespace. Example:
<bpmn2:itemDefinition id="ItemDefinition_1" structureRef="sapprop:sflight"/> with sapprop being my target namespace in lowercase. I found a save option that prevented this and then lost it again in all my crazy testing..
Second: the structureRef above gets saved with full document reference whereas in the modeler resource implementation a custom xml handler is used. I wish to use that handler is stand alone, ie for save option OPTION_URI_HANDLER.
So could I be guided out of the forest to generate programatically the same output as the modeler produces?
Many thanks!
Martin]]>Martin Jonsson2014-10-06T13:25:38-00:00Re: save options
https://www.eclipse.org/forums/index.php/mv/msg/825606/1440588/#msg_1440588
Also, if you have defined a default namespace (i.e. <definitions xmlns="com.sap.mynamespace"...>) it will affect whether NS prefixes are generated or not.
Sorry I couldn't be more help, but a lot of this EMF parsing and serializing is "black magic" to me