Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Import QUDV ISO-80000-1 libraries(Quantity Unit Dimension Value)
Import QUDV ISO-80000-1 libraries [message #1503411] Mon, 08 December 2014 12:42 Go to next message
Johan Van Noten is currently offline Johan Van NotenFriend
Messages: 87
Registered: July 2009
Member
In order to comply to ISO-80000-1 data structure, I tried to import the XMI provided on the omg SysML site. See the non-normative section on http://www.omg.org/spec/SysML/1.3/.

Unfortunately, I don't see any way to import these in Papyrus.
I followed this strategy:
* Download
* Rename from xmi to uml
* Rightclick them in a Papyrus project and create a "Papyrus model" from them

Tried several fixes, such as correcting the \n\r on which the SAX parser gets stuck. None helped.

Anybody successfully did this?

Johan
Re: Import QUDV ISO-80000-1 libraries [message #1504500 is a reply to message #1503411] Tue, 09 December 2014 10:01 Go to previous messageGo to next message
Camille Letavernier is currently offline Camille LetavernierFriend
Messages: 926
Registered: February 2011
Senior Member
Hi Johan,

Eclipse/UML2 supports various formats for UML documents:

- Normative XMI files: File extension = *.xmi, UML Namespace = http://www.omg.org/spec/UML/20110701
- Eclipse UML files: File extension = *.uml, UML Namespace = http://www.eclipse.org/uml2/5.0.0/UML

So, if you change the file extension, you need to also change the xmlns:uml Namespace (xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML"). After that, it works (Well, partially, because there are still some missing dependencies, but the model can be loaded in Papyrus)

Regards,
Camille


Camille Letavernier
Re: Import QUDV ISO-80000-1 libraries [message #1505087 is a reply to message #1504500] Tue, 09 December 2014 20:42 Go to previous messageGo to next message
Johan Van Noten is currently offline Johan Van NotenFriend
Messages: 87
Registered: July 2009
Member
From your reply, I conclude that it should be possible to directly import the normative XMIs without issue into Papyrus, except for some "missing dependencies".

Unfortunately, I tried following steps:
* download http://www.omg.org/spec/SysML/20120401/ISO-80000-1-QUDV.xmi
* right-click it, select New | Papyrus model

I end up with a model, but the model explorer remains empty.
Is this because of the "missing dependencies" that you mention?

I looked at http://wiki.eclipse.org/MDT/UML2/UML2_4.0_Migration_Guide (the QUDV.xmi still seems to be written with 2.4.1 XMI). I see that there is quite a bit of difference between the URIs for Eclipse UML2 and those that are used by OMG. No problem for the "dumb end-user", since making this mapping is exactly what an XMI importer is all about, no? The end-user should not be patching XMI files by hand, imho.

In that sense, we can't blame Papyrus of course, since you only use the Eclipse UML2 import facilities. Would you agree that this is a shortcoming on the Eclipse UML2 importer? Or do I misjudge this?

Thanks,
Johan
Re: Import QUDV ISO-80000-1 libraries [message #1505102 is a reply to message #1505087] Tue, 09 December 2014 20:55 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6774
Registered: July 2009
Senior Member
Hi

Camille explained the difference between *.xmi and *.uml.

Using ana alaogy, when you renamed from *.xmi to *.uml you effectively
asserted that what was a 'French' document was now a 'German' document
but neglected to change the internal contents accordingly.

If you want to use the Eclipse extension (*.uml) you must use Eclipse
namespaces.

Regards

Ed Willink


On 09/12/2014 20:42, Johan Van Noten wrote:
> In that sense, we can't blame Papyrus of course, since you only use the
> Eclipse UML2 import facilities. Would you agree that this is a
> shortcoming on the Eclipse UML2 importer? Or do I misjudge this?
Re: Import QUDV ISO-80000-1 libraries [message #1505160 is a reply to message #1505102] Tue, 09 December 2014 22:00 Go to previous messageGo to next message
Johan Van Noten is currently offline Johan Van NotenFriend
Messages: 87
Registered: July 2009
Member
Hi Ed,

Thanks for your additional clarification.
I agree with your and Camille's statement: I clearly made a mistake initially when I modified the extension to uml.

Independent of that, I wrote my reply.
In that reply I am pointing out that the XMI import still fails if I don't "wrongly fake the extension".
So, I offer an unmodified normative XMI to the importer and I still run into problems.

I then suppose that:
* either I'm still making a mistake
* or the Eclipse UML2 importer has problems with importing OMG's normative XMIs (which would not be a Papyrus problem, but rather an Eclipse UML2 implementation shortcoming imho).

Do I see this wrong?

Thanks,
Johan
Re: Import QUDV ISO-80000-1 libraries [message #1505665 is a reply to message #1505160] Wed, 10 December 2014 08:03 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6774
Registered: July 2009
Senior Member
Hi

The UML2 project has support for the really normative OMG URIs.

Unfortunately OMG thrash URIs during specification development so not
all are really normative. Also the UML2 project has yearly releases and
so there may be a significant delay between an OMG URI stabilizing and
subsequently appearing in Eclipse UML2.

I am afraid that my attempts to allow cutting edge developers to add
synonym URIs have failed. The assumption being that such cutting edge
developers are skilled enough to define the synonyms themselves.

In https://bugs.eclipse.org/bugs/show_bug.cgi?id=401119 you will find a
contribution that shows roughly what is needed to support a less
standard URI.

Regards

Ed Willink

On 09/12/2014 22:00, Johan Van Noten wrote:
> Hi Ed,
>
> Thanks for your additional clarification.
> I agree with your and Camille's statement: I clearly made a mistake
> initially when I modified the extension to uml.
>
> Independent of that, I wrote my reply.
> In that reply I am pointing out that the XMI import still fails if I
> don't "wrongly fake the extension".
> So, I offer an unmodified normative XMI to the importer and I still run
> into problems.
>
> I then suppose that:
> * either I'm still making a mistake
> * or the Eclipse UML2 importer has problems with importing OMG's
> normative XMIs (which would not be a Papyrus problem, but rather an
> Eclipse UML2 implementation shortcoming imho).
>
> Do I see this wrong?
>
> Thanks,
> Johan
Re: Import QUDV ISO-80000-1 libraries [message #1505697 is a reply to message #1505665] Wed, 10 December 2014 08:31 Go to previous message
Camille Letavernier is currently offline Camille LetavernierFriend
Messages: 926
Registered: February 2011
Senior Member
Hi Johan,


I forgot to mention that, although the UML2 project properly supports Eclipse/UML and OMG/XMI files, Papyrus only supports *.uml files as its semantics model (i.e. main model, the one from which you create DI/Notation). So, you actually need to change the file extension, *and* the namespace, for Papyrus to be able to handle it.

OMG/XMI models are supposed to be importable in Papyrus (Via Package-import for example). However, I checked yesterday, and they weren't properly supported:

454546: [UML Import] Can't import UML resources if they don't have the *.uml file extension
https://bugs.eclipse.org/bugs/show_bug.cgi?id=454546

I've now fixed this bug on Mars/Nightly (Papyrus 1.1.0 Nightly). But this still only provides a partial support of OMG/XMI models, and you still need to rename these models to UML (+ Namespace) to have a full support from Papyrus


Regards,
Camille


Camille Letavernier
Previous Topic:Display of an association defined in a profile by an association between two stereotypes
Next Topic:association class
Goto Forum:
  


Current Time: Wed Jul 15 09:19:12 GMT 2020

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

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

Back to the top