Skip to main content



      Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » How can i set save option for element as QualifiedName ?
How can i set save option for element as QualifiedName ? [message #1232247] Thu, 16 January 2014 09:08 Go to next message
Eclipse UserFriend
Hi all,

When i save my model elements releations saved with Sequence Numbers like;

end1Entity="#//@ownedEntityModel/@entities.0"


but on diagram when i switch my models with drag and drop my relation broken cause of Sequence Numbers. My releation always shows 0. element on ownedEntityModel.

so i need to save my model as qualified name. How can i do this ? There is an proper save option ?

Regards


[Updated on: Thu, 16 January 2014 09:17] by Moderator

Re: How can i save option for element as QualifiedName ? [message #1240908 is a reply to message #1232247] Fri, 07 February 2014 03:11 Go to previous messageGo to next message
Eclipse UserFriend
Serhat,

I've been away on vacation...

If an entity has an attribute (or combination of attributes) that make
it unique within the "entities" containment reference you can specify
that attribute (those attributes) as the eKeys of that containment
reference to produce the fragment segment @enties[key='value'] instead
and that will be resilient to reordering changes. Alternatively you
could have a look at how EModelElementImpl specializes the fragment
segments for Ecore models via
org.eclipse.emf.ecore.impl.EModelElementImpl.eURIFragmentSegment(EStructuralFeature,
EObject) and
org.eclipse.emf.ecore.impl.EModelElementImpl.eObjectForURIFragmentSegment(String).


On 16/01/2014 3:08 PM, serhat gezgin wrote:
> Hi all,
>
> When i save my model elements releations saved with Sequence Numbers
> like;
>
>
> end1Entity="#//@ownedEntityModel/@entities.0"
>
>
> but on diagram when i switch my models with drag and drop my relation
> broken cause of Sequence Numbers. My releation always shows 0. element
> on ownedEntityModel.
>
> so i need to save my model as qualified name. How can i do this ?
> There is an proper save option ?
>
> Regards
>
>
>
Re: How can i save option for element as QualifiedName ? [message #1245282 is a reply to message #1240908] Thu, 13 February 2014 10:19 Go to previous messageGo to next message
Eclipse UserFriend
Hi Ed,

I try using UUIDs. But i think there is a problem with this.

When i extend XMIResource and use UUID; some elements have xmi.id but someone not have

like;
<?xml version="1.0" encoding="UTF-8"?>
<content:ContentModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:content="http://www.mdd4cca.com/msf/content/Content" xmi:id="_oPDHIJTBEeO-OoAj4bvJwg">
  <ownedEntityModel name="EntityModel">
    <entities name="E1"/>
  </ownedEntityModel>
</content:ContentModel>


Do you know this problem?

I thik, if i can solve this, my problems are solved automatically.

Regards
Re: How can i save option for element as QualifiedName ? [message #1245683 is a reply to message #1245282] Fri, 14 February 2014 00:37 Go to previous messageGo to next message
Eclipse UserFriend
Serhat,

Comments below.

On 13/02/2014 4:19 PM, serhat gezgin wrote:
> Hi Ed,
>
> I try using UUIDs. But i think there is a problem with this.
>
> When i extend XMIResource and use UUID; some elements have xmi.id but
> someone not have
>
> like;
>
> <?xml version="1.0" encoding="UTF-8"?>
> <content:ContentModel xmi:version="2.0"
> xmlns:xmi="http://www.omg.org/XMI"
> xmlns:content="http://www.mdd4cca.com/msf/content/Content"
> xmi:id="_oPDHIJTBEeO-OoAj4bvJwg">
> <ownedEntityModel name="EntityModel">
> <entities name="E1"/>
> </ownedEntityModel>
> </content:ContentModel>
>
>
> Do you know this problem?
Might it be the case that you've defined the "name" EAttribute of each
of those two things to have isID true? In
org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.attachedHelper(EObject)
you can see that if an object has an intrinsic ID it won't be assigned
an extrinsic one.
>
> I thik, if i can solve this, my problems are solved automatically.
Likely just change your model not to specify intrinsic IDs.
>
> Regards
Re: How can i save option for element as QualifiedName ? [message #1248652 is a reply to message #1245683] Mon, 17 February 2014 09:04 Go to previous messageGo to next message
Eclipse UserFriend
Hi Ed,

Sory for late answer.

My all attributes " ID = false " like added pic. The problem might be different. But still i can't find

Regards
  • Attachment: property.png
    (Size: 14.31KB, Downloaded 158 times)
Re: How can i save option for element as QualifiedName ? [message #1249271 is a reply to message #1248652] Mon, 17 February 2014 23:47 Go to previous message
Eclipse UserFriend
Have a look at what's happening in
org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.attachedHelper(EObject).
That should be called for each object attached to the resource (i.e.,
for each object contained by the resource). It should assign an ID.

On 17/02/2014 3:04 PM, serhat gezgin wrote:
> Hi Ed,
>
> Sory for late answer.
>
> My all attributes " ID = false " like added pic. The problem might be different. But still i can't find
>
> Regards
Previous Topic:EMFClient 1.2
Next Topic:[EMFStore/ECP] Can't add more than approx. 58.000 model elements to project
Goto Forum:
  


Current Time: Mon Jul 07 22:31:21 EDT 2025

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

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

Back to the top