Skip to main content



      Home
Home » Modeling » QVT-OML » Create references between models
Create references between models [message #1834522] Wed, 11 November 2020 12:09 Go to next message
Eclipse UserFriend
Hi,
I would like to know if is possible to do that a model has a reference to an object in another model via href attribute. Something like this:

<?xml version="1.0" encoding="UTF-8"?>
<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="csdcdsc" name="model">
<packagedElement xmi:type="uml:Enumeration" href="file://c:/model_in.uml#_PoSvoMztEeqmrbZwnausIQ"/>
</uml:Model>

I've been trying but if I assign it as a packagedElement, the element is moved from one model to the other.

Thanks.
Pere Joseph
Re: Create references between models [message #1834548 is a reply to message #1834522] Thu, 12 November 2020 04:31 Go to previous messageGo to next message
Eclipse UserFriend
Hi

Yes.

A packagedElement is a composition so the the child is stolen: See Section 3.4 of https://www.eclipse.org/mmt/qvt/docs/ICMT2014/QVTtraceability.pdf

If you want to reference rather than compose the reference should be in a reference such as a TypedElement "type" feature.

You may find it helpful to play with the UML Model Editor to gain some understanding of how UML works.

Regards

Ed Willink
Re: Create references between models [message #1834555 is a reply to message #1834548] Thu, 12 November 2020 05:48 Go to previous messageGo to next message
Eclipse UserFriend
Hi

Ed Willink wrote on Thu, 12 November 2020 04:31
A packagedElement is a composition so the the child is stolen

I remember some discussions from https://www.eclipse.org/lists/qvto-dev/msg00340.html, pointing out that the EMF containment hierachy may actually span multiple resources. But it's not clear to me whether and how this can be accomplished technically. Perhaps QVTo does currently not support this.


Kind regards
Christopher
Re: Create references between models [message #1834583 is a reply to message #1834555] Thu, 12 November 2020 14:21 Go to previous messageGo to next message
Eclipse UserFriend
Hi

Indeed. The file-space structure of a model is out-of-scope for a model transformation specification. However the QVT 1.3 partial evolution to multi-file typed models motivated me to think a bit about how an Extent could be elaborated to be more useful and so support file-space control. Unfortunately some of the word changes in QVT 1.3 may need to be revised to support this. IIRC The way forward is for a TypedModel to comprise many Extents each of which may comprise a partial Model.

An implementation may realize an OMG MOF Extent by a primary EMF Resource and the partial models by composed secondary EMF Resources.

Regards

Ed Willink

[Updated on: Thu, 12 November 2020 14:35] by Moderator

Re: Create references between models [message #1834617 is a reply to message #1834583] Fri, 13 November 2020 10:31 Go to previous message
Eclipse UserFriend
Thanks, I didn't realize about the composition detail.
The purpose of this was to create different model views of a model, while keeping the elements references between them.
Previous Topic:Compilation errors found in unit when calling QVTo transform
Next Topic:Multiple source objects to single target object
Goto Forum:
  


Current Time: Wed Jul 23 16:34:50 EDT 2025

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

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

Back to the top