Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » How to save to .uml file using an older UML version?
How to save to .uml file using an older UML version? [message #1001207] Wed, 16 January 2013 08:47 Go to next message
Andreas Brieg is currently offline Andreas BriegFriend
Messages: 48
Registered: November 2012
Member
I'm using org.eclipse.uml2.uml 4.0.1 to create an UML model. The model is saved in a .uml file with xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML". I would like it to be saved with xmlns:uml="http://www.eclipse.org/uml2/3.0.0/UML".

My code for creating the resource currently looks like this:
Resource resource = UML302UMLResource.Factory.INSTANCE.createResource(uri);


And I save it with no options:
resource.save(null);


What do I have to do, to save my model with the XML Namespace of UML302UMLResource? Do I have to specify an option. If yes, which one is it?

Thanks

[Updated on: Wed, 16 January 2013 08:47]

Report message to a moderator

Re: How to save to .uml file using an older UML version? [message #1001246 is a reply to message #1001207] Wed, 16 January 2013 10:11 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

I presume your message has a typo because your request the current nsURI.

Your activities are possibly confused by
https://bugs.eclipse.org/bugs/show_bug.cgi?id=389542 which identifies
that on 4.0.1 createResource is broken for UML; use a more recent
maintenance version.

For the current version, I would expect to do

ResourceSet.createResource(URI)

I thought there was an MDT/UML2 enhancement Bugzilla open for previous
versions but I can't find it.

Anyway, the reality is that unless someone comes forward to fund
multi-version save it's unlikely to happen.

Once implemented, for a previous version I would expect to do

ResourceSet.createResource(URI, String)

where String is the required content type.

Regards

Ed Willink


On 16/01/2013 08:47, Andreas Brieg wrote:
> I'm using org.eclipse.uml2.uml 4.0.1 to create an UML model. The model
> is saved in a .uml file with
> xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML". I would like it to
> be saved with xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML".
>
> My code for creating the resource currently looks like this:
>
> Resource resource =
> UML302UMLResource.Factory.INSTANCE.createResource(uri);
>
>
> And I save it with no options:
>
> resource.save(null);
>
>
> What do I have to do, to save my model with the XML Namespace of
> UML302UMLResource? Do I have to specify an option. If yes, which one
> is it?
>
> Thanks
Re: How to save to .uml file using an older UML version? [message #1001290 is a reply to message #1001246] Wed, 16 January 2013 12:07 Go to previous message
Andreas Brieg is currently offline Andreas BriegFriend
Messages: 48
Registered: November 2012
Member
Thanks for your answer Ed. I meant xmlns:uml="http://www.eclipse.org/uml2/3.0.0/UML" as the xml namespace the I would like to have. I corrected this here in the forum. So as there is no easy workaround, I will fall back on using an older version of the UML API.
Previous Topic:UML save to *.uml file
Next Topic:XMI datatype representation
Goto Forum:
  


Current Time: Wed Apr 24 15:37:32 GMT 2024

Powered by FUDForum. Page generated in 0.02859 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top