Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Erwin UML Export (XMI) to .uml?(Read a xml file from a RDBMS and convert it to uml)
Erwin UML Export (XMI) to .uml? [message #1826589] Mon, 27 April 2020 14:32 Go to next message
Paul Hernandez is currently offline Paul HernandezFriend
Messages: 9
Registered: April 2020
Junior Member
Hi everyone,

sorry if I missing a basic concept. The thing is, I exported a data model from erwin data modeler to uml.
The result is a XML File with XMI.

I would like to:
- Open this file with eclipse, if possible with the uml editor.
- Define a transformation to obtain a OWL ontology.

Hier is an extract of the file:
<?xml version='1.0' encoding='UTF-8'?>
<xmi:XMI xmi:version="2.1" xmlns:uml="http://schema.omg.org/spec/UML/2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1">
<xmi:Documentation contact="www.metaintegration.net" exporter="Meta Integration Model Bridge" exporterVersion="9.0.2"/>
<uml:Model xmi:type="uml:Model" xmi:id="{799A0437-D91A-4CC5-998A-7C23E2130F39}+00000001" name="Model_3">
<packagedElement xmi:type="uml:DataType" xmi:id="{D1F75789-86EE-4187-BF2D-5F05AB9963EF}+00000001" name="char[18]" visibility="public"/>
<packagedElement xmi:type="uml:DataType" xmi:id="{D1F75789-86EE-4187-BF2D-5F05AB9963EF}+00000006" name="char[18]" visibility="public"/>
<packagedElement xmi:type="uml:DataType" xmi:id="{D1F75789-86EE-4187-BF2D-5F05AB9963EF}+00000005" name="Blob" visibility="public"/>
<packagedElement xmi:type="uml:DataType" xmi:id="{1F9647DB-8B31-4FE1-B712-0E1EEC1F21F9}+00000000" name="Classword Amount" visibility="public">
<ownedComment xmi:type="uml:Comment" xmi:id="_1" body="Used to denote monetary values (currency).

Ex: Credit Card Limit Amt

Note: 
Numeric.
Computable.
Currency only.">
<annotatedElement xmi:idref="{1F9647DB-8B31-4FE1-B712-0E1EEC1F21F9}+00000000"/>
</ownedComment>


I am completely lost. Any help would be appreciated.

Regards,
Paul
Re: Erwin UML Export (XMI) to .uml? [message #1826612 is a reply to message #1826589] Mon, 27 April 2020 18:10 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7047
Registered: July 2009
Senior Member
Hi

You are more likely to get help if you attach a full model rather than paste a partial example.

Regards

Ed Willink
Re: Erwin UML Export (XMI) to .uml? [message #1826640 is a reply to message #1826612] Tue, 28 April 2020 06:51 Go to previous messageGo to next message
Paul Hernandez is currently offline Paul HernandezFriend
Messages: 9
Registered: April 2020
Junior Member
Hi Ed,
thanks for you reply.
Model is quite long, therefore I only provided a small piece.
**UPDATE**
File attached below in another reply

[Updated on: Tue, 28 April 2020 10:08]

Report message to a moderator

Re: Erwin UML Export (XMI) to .uml? [message #1826649 is a reply to message #1826640] Tue, 28 April 2020 09:02 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7047
Registered: July 2009
Senior Member
Hi

It clearly is not the complete model since it ends with "xmi:id=".

Pasting inline is not very friendly. Why not just attach a file? That would enable us to see what file extension you use and even give it a try.

However I see http://schema.omg.org/spec/UML/2.1. IIRC UML 2.2 was the first version supported by Eclipse. Nowadays anything before UML 2.5 is a dinosaur. There is however a XMI212UMLHandler so the conversion might work once you resolve other difficulties.

You probably need to use *.xmi to have any chance of success, but in my experience there are so many diverse variants of metamodels that it is usually necessary to manually change the extension to *.uml and the nsURI to

xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML"

and perhaps

xmlns:xmi="http://www.omg.org/spec/XMI/20131001"

Fortunately you have no MOF references for which the nsURI can be unbelievably diverse and the master file is not available from Eclipse or OMG.

Regards

Ed Willink
Re: Erwin UML Export (XMI) to .uml? [message #1826651 is a reply to message #1826649] Tue, 28 April 2020 10:06 Go to previous messageGo to next message
Paul Hernandez is currently offline Paul HernandezFriend
Messages: 9
Registered: April 2020
Junior Member
Hi Ed,
thanks for the information provided.
I will try what you mentioned and give some feedback.
And sorry, I have not found the option to attach a file, but I now realize I was in the quick reply box.
Attached you can find the file generated by Erwin Data Modeler.

Thanks and best regards,
Paul
Re: Erwin UML Export (XMI) to .uml? [message #1826654 is a reply to message #1826651] Tue, 28 April 2020 11:21 Go to previous messageGo to next message
Paul Hernandez is currently offline Paul HernandezFriend
Messages: 9
Registered: April 2020
Junior Member
Hi everyone,
that is definitely a step forward.
Using the changes to the namespaces proposed by Ed worked, at least to open the file in the uml editor:

https://drive.google.com/thumbnail?id=1-iQ1sGGvxQjZwE2CmbzuP4PRA1ULlQd9

What I have not achieved yet is to crate a papyrus model from this file. I select the file, right click, then new, model. It creates some files in the workspace and after 1 or 2 seconds these files just disappeared. I am not able to finalize the wizard. When I hit the "finish" button, nothing happens.

https://drive.google.com/thumbnail?id=1yPM6h_4In4JGiGuDuxa-bFugF3SQ0luE

https://drive.google.com/thumbnail?id=1TTEZfmXb5rybwQJqT2E8_rzFmfN71SZz

Best regards,
Paul
Re: Erwin UML Export (XMI) to .uml? [message #1826664 is a reply to message #1826654] Tue, 28 April 2020 13:24 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7047
Registered: July 2009
Senior Member
Hi

The error log might have some clues.

Using Validate in the UML Model Editor might give some clues.

Regards

Ed Willink
Re: Erwin UML Export (XMI) to .uml? [message #1826729 is a reply to message #1826664] Wed, 29 April 2020 14:58 Go to previous messageGo to next message
Paul Hernandez is currently offline Paul HernandezFriend
Messages: 9
Registered: April 2020
Junior Member
Hi Ed,
thanks again for your support!
Checking the log I found this error:
!ENTRY org.eclipse.papyrus.uml.tools 4 0 2020-04-29 12:11:52.488
!MESSAGE Unexpected Error
!STACK 0
org.eclipse.papyrus.infra.core.resource.NotFoundException: No root defined in the model


I edited the *.uml file with a text editor and got rid of the <xmi:XMI> tag and unified the ns info in the <uml:Model> tag as follows:
<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="{799A0437-D91A-4CC5-998A-7C23E2130F39}+00000001" name="Model_3">


I also used the validate model tool and fixed a couple of duplicated elements.
After that I was able to create a Papyrus Model.
I tried then to generate a class diagram. It succeeded but the diagram is empty.
I could drag and drop classes directly from the model explorer.
I had to add the properties manually but also worked.
I am not able to drag and drop other elements like associations or generalizations.
I found this error several time in the log:
!ENTRY org.eclipse.ui 4 0 2020-04-29 16:10:44.988
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.NullPointerException
	at org.eclipse.papyrus.uml.diagram.common.editpolicies.CommonDiagramDragDropEditPolicy.dropBinaryLink(CommonDiagramDragDropEditPolicy.java:205)
	at org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy.dropAssociation(ClassDiagramDragDropEditPolicy.java:255)
	at org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy.getSpecificDropCommand(ClassDiagramDragDropEditPolicy.java:140)
	at org.eclipse.papyrus.uml.diagram.common.editpolicies.CommonDiagramDragDropEditPolicy.getDropObjectCommand(CommonDiagramDragDropEditPolicy.java:314)
	at org.eclipse.papyrus.uml.diagram.common.editpolicies.CommonDiagramDragDropEditPolicy.getDropObjectsCommand(CommonDiagramDragDropEditPolicy.java:298)
	at org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy.getCommand(DragDropEditPolicy.java:80)
	at org.eclipse.papyrus.infra.gmfdiag.dnd.strategy.DefaultDropStrategy.getCommand(DefaultDropStrategy.java:76)
	at org.eclipse.papyrus.infra.gmfdiag.dnd.policy.CustomizableDropEditPolicy.findExtendedStrategies(CustomizableDropEditPolicy.java:490)
	at org.eclipse.papyrus.infra.gmfdiag.dnd.policy.CustomizableDropEditPolicy.getCustomCommand(CustomizableDropEditPolicy.java:240)
	at org.eclipse.papyrus.infra.gmfdiag.dnd.policy.CustomizableDropEditPolicy.getCommand(CustomizableDropEditPolicy.java:108)
...


Do you know any workaround?

Many thanks in advanced and best regards,
Paul
Re: Erwin UML Export (XMI) to .uml? [message #1826733 is a reply to message #1826729] Wed, 29 April 2020 15:21 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7047
Registered: July 2009
Senior Member
Hi

I'm only a vwery occasional Papyrus user. I suggest checking the create diagram from UML tutorials. I vaguely recall that there are options since for many UML models a single diagram of everything can be very large, very slow and very useless. Once you have dragged your 'focus' class, you can use an add neighbours menu action to grow the diagram in a controlled fashion.

Regards

Ed Willink
Re: Erwin UML Export (XMI) to .uml? [message #1826906 is a reply to message #1826733] Mon, 04 May 2020 11:23 Go to previous message
Ri Fr is currently offline Ri FrFriend
Messages: 134
Registered: July 2015
Senior Member
I ran into a similar problem a while back. I forgot details, so sorry if i'm vague. I remember opening the imported *.uml file with the object editor. .. it was a viewer like the text editor or the UML editor. Then I could see the classes from the old data model, and I dragged them (CTRL-A and drag) to my model in model explorer, and I could use them in diagrams etc. Using Papyrus 4.7. Sorry I cannot be more precise! Good luck!
Previous Topic:Unable to generate Association class code from Class diagram
Next Topic:CSS for Instance Specification Link
Goto Forum:
  


Current Time: Sun Feb 28 04:52:27 GMT 2021

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

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

Back to the top