Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Serialization: Workspace URIs vs. External URIs.
Serialization: Workspace URIs vs. External URIs. [message #477689] Tue, 26 August 2008 00:39 Go to next message
Nicolas Rouquette is currently offline Nicolas RouquetteFriend
Messages: 157
Registered: July 2009
Senior Member
Suppose I have two UML resources in my workspace:

/MyProject/A.uml and
/MyProject/B.uml

Suppose that B.uml references types defined in A.uml.

With Eclipse 3.4, a parameter P for an operation in B where the type of
P is in A looks like this:

<ownedParameter xmi:id="..." name="P">
<type xmi:type="..." href="/MyProject/A.uml#..."/>
</ownedParameter>

How can I export A.uml and B.uml in such a way where the serialization
of /MyProject/B.uml would have:

<ownedParameter xmi:id="..." name="P">
<type xmi:type="..." href="http://example.org/MyProject/A.uml#..."/>
</ownedParameter>


The migration guide shows how to do load-time URI conversion.
However, save-time URI conversation seems to be much more mysterious.

http://www.eclipse.org/modeling/mdt/uml2/docs/guides/UML2_2. 0_Migration_Guide/guide.html

Any suggestions?

-- Nicolas.
Re: Serialization: Workspace URIs vs. External URIs. [message #477691 is a reply to message #477689] Tue, 26 August 2008 20:49 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Nicolas,

If the type of P you are referring to is one of the primitive types,
serialized as :
pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolea n , for
example, then the cmof resource handler will automtically save these as :
http://schema.omg.org/spec/UML/2.1.1/uml.xml#Boolean. This will occur
automatically when you "Save As.." your model with a .xmi/.cmof extension.

If the type of P is defined in B then the serialized type should look like
a relative path, something like: MyProject.xmi#MyType. Saving the href as
relative should be happening automatically by EMF.

HTH.

Cheers,
- James.

"Nicolas Rouquette" <nicolas.rouquette@jpl.nasa.gov> wrote in message
news:g8vj9d$b0h$1@build.eclipse.org...
> Suppose I have two UML resources in my workspace:
>
> /MyProject/A.uml and
> /MyProject/B.uml
>
> Suppose that B.uml references types defined in A.uml.
>
> With Eclipse 3.4, a parameter P for an operation in B where the type of
> P is in A looks like this:
>
> <ownedParameter xmi:id="..." name="P">
> <type xmi:type="..." href="/MyProject/A.uml#..."/>
> </ownedParameter>
>
> How can I export A.uml and B.uml in such a way where the serialization
> of /MyProject/B.uml would have:
>
> <ownedParameter xmi:id="..." name="P">
> <type xmi:type="..." href="http://example.org/MyProject/A.uml#..."/>
> </ownedParameter>
>
>
> The migration guide shows how to do load-time URI conversion.
> However, save-time URI conversation seems to be much more mysterious.
>
> http://www.eclipse.org/modeling/mdt/uml2/docs/guides/UML2_2. 0_Migration_Guide/guide.html
>
> Any suggestions?
>
> -- Nicolas.
>
>
Re: Serialization: Workspace URIs vs. External URIs. [message #626883 is a reply to message #477689] Tue, 26 August 2008 20:49 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Nicolas,

If the type of P you are referring to is one of the primitive types,
serialized as :
pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolea n , for
example, then the cmof resource handler will automtically save these as :
http://schema.omg.org/spec/UML/2.1.1/uml.xml#Boolean This will occur
automatically when you "Save As.." your model with a .xmi/.cmof extension.

If the type of P is defined in B then the serialized type should look like
a relative path, something like: MyProject.xmi#MyType. Saving the href as
relative should be happening automatically by EMF.

HTH.

Cheers,
- James.

"Nicolas Rouquette" <nicolas.rouquette@jpl.nasa.gov> wrote in message
news:g8vj9d$b0h$1@build.eclipse.org...
> Suppose I have two UML resources in my workspace:
>
> /MyProject/A.uml and
> /MyProject/B.uml
>
> Suppose that B.uml references types defined in A.uml.
>
> With Eclipse 3.4, a parameter P for an operation in B where the type of
> P is in A looks like this:
>
> <ownedParameter xmi:id="..." name="P">
> <type xmi:type="..." href="/MyProject/A.uml#..."/>
> </ownedParameter>
>
> How can I export A.uml and B.uml in such a way where the serialization
> of /MyProject/B.uml would have:
>
> <ownedParameter xmi:id="..." name="P">
> <type xmi:type="..." href="http://example.org/MyProject/A.uml#.."/>
> </ownedParameter>
>
>
> The migration guide shows how to do load-time URI conversion.
> However, save-time URI conversation seems to be much more mysterious.
>
> http://www.eclipse.org/modeling/mdt/uml2/docs/guides/UML2_2. 0_Migration_Guide/guide.html
>
> Any suggestions?
>
> -- Nicolas.
>
>
Previous Topic:[Announce] MDT UML2 2.2.1 M200808261340 is available
Next Topic:UML Metamodel specialization with OCL constraints
Goto Forum:
  


Current Time: Tue Apr 07 08:31:18 GMT 2020

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

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

Back to the top