Book a Demo

Author Topic: UML Import  (Read 5956 times)

jeue

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
UML Import
« on: December 16, 2007, 03:04:12 pm »
Hi,

i want to import a stereotype marked PIM into EA.  
e.g. <<Entity>> User

The import failed. In the log file is witten:
Error: Unknown Package Connector Source or Target

Profile files and uml model are in the same directory. What i do wrong?

thomaskilian

  • Guest
Re: UML Import
« Reply #1 on: December 17, 2007, 04:06:03 am »
It's always a good idea when asking questions to do that in a way the question is clear. It helps when writing down the steps up to the failure or something like that.

jeue

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: UML Import
« Reply #2 on: December 17, 2007, 06:44:35 am »
First i've transformed an unmarked model into a stereotyped model with openarchitectureWare. The profile that i've used is AndroMDA profile. the output is an emf-uml2 2.1 xmi file like this:
Code: [Select]

<?xml version="1.0" encoding="UTF-8"?>
<xmi:XMI xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:EJB3_0="http:///EJB3_0_bknxgJzyEduNFJngXC2TxA.profile.uml2" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/2.1.0/UML" xsi:schemaLocation="http:///EJB3_0_bknxgJzyEduNFJngXC2TxA.profile.uml2 EJB3.profile.uml#_bnaAE5zyEduNFJngXC2TxA">
 <uml:Model xmi:id="971f12ea-ab33-11dc-a981-93859b9b4235" name="Model">
   <packagedElement xmi:type="uml:Package" xmi:id="_ltiTkKszEdyWcf8A5Md9Tg" name="PrimitiveTypes">
     <elementImport xmi:id="_lx6dQKszEdyWcf8A5Md9Tg">
       <importedElement xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
     </elementImport>
     <elementImport xmi:id="_lx8ScKszEdyWcf8A5Md9Tg">
       <importedElement xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
     </elementImport>
     <elementImport xmi:id="_lx8ScaszEdyWcf8A5Md9Tg">
       <importedElement xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
     </elementImport>
     <elementImport xmi:id="_lx8ScqszEdyWcf8A5Md9Tg">
       <importedElement xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#UnlimitedNatural"/>
     </elementImport>
     <packagedElement xmi:type="uml:PrimitiveType" xmi:id="974fe6f6-ab33-11dc-a981-93859b9b4235" name="int"/>
     <packagedElement xmi:type="uml:PrimitiveType" xmi:id="97503517-ab33-11dc-a981-93859b9b4235" name="void"/>
   </packagedElement>
   <packagedElement xmi:type="uml:Package" xmi:id="971f39fb-ab33-11dc-a981-93859b9b4235" name="Model View">
     <packagedElement xmi:type="uml:Package" xmi:id="9724b83c-ab33-11dc-a981-93859b9b4235" name="com">
       <packagedElement xmi:type="uml:Package" xmi:id="97490921-ab33-11dc-a981-93859b9b4235" name="dummy">
         <packagedElement xmi:type="uml:Class" xmi:id="97493032-ab33-11dc-a981-93859b9b4235" name="User">
           <ownedAttribute xmi:id="_l03DkKszEdyWcf8A5Md9Tg" name="name" visibility="public">
             <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
             <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_l04RsaszEdyWcf8A5Md9Tg" value="1"/>
             <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_l04RsKszEdyWcf8A5Md9Tg" value="1"/>
             <defaultValue xmi:type="uml:LiteralString" xmi:id="_l09KMKszEdyWcf8A5Md9Tg" value=""/>
           </ownedAttribute>
         </packagedElement>
         <packagedElement xmi:type="uml:Class" xmi:id="974adde3-ab33-11dc-a981-93859b9b4235" name="Student">
           <generalization xmi:id="_l09xQKszEdyWcf8A5Md9Tg" general="97493032-ab33-11dc-a981-93859b9b4235"/>
           <ownedAttribute xmi:id="_l09xQaszEdyWcf8A5Md9Tg" name="matrikelnummer" visibility="public">
             <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
             <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_l09xQ6szEdyWcf8A5Md9Tg" value="1"/>
             <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_l09xQqszEdyWcf8A5Md9Tg" value="1"/>
             <defaultValue xmi:type="uml:LiteralString" xmi:id="_l0-_YKszEdyWcf8A5Md9Tg" value=""/>
           </ownedAttribute>
         </packagedElement>
         <packagedElement xmi:type="uml:Class" xmi:id="974bc844-ab33-11dc-a981-93859b9b4235" name="Professor">
           <generalization xmi:id="_l0-_YaszEdyWcf8A5Md9Tg" general="97493032-ab33-11dc-a981-93859b9b4235"/>
           <ownedAttribute xmi:id="_l0_mcaszEdyWcf8A5Md9Tg" name="id" visibility="private" type="974fe6f6-ab33-11dc-a981-93859b9b4235">
             <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_l0_mc6szEdyWcf8A5Md9Tg" value="1"/>
             <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_l0_mcqszEdyWcf8A5Md9Tg" value="1"/>
             <defaultValue xmi:type="uml:LiteralString" xmi:id="_l1ANgKszEdyWcf8A5Md9Tg" value=""/>
           </ownedAttribute>
         </packagedElement>
       </packagedElement>
     </packagedElement>
     <profileApplication xmi:id="_TdRLwKs0EdyIO8FO6pxi7w">
       <eAnnotations xmi:id="_TdRLwas0EdyIO8FO6pxi7w" source="http://www.eclipse.org/uml2/2.0.0/UML">
         <references xmi:type="ecore:EPackage" href="EJB3.profile.uml#_bnaAE5zyEduNFJngXC2TxA"/>
       </eAnnotations>
       <appliedProfile href="EJB3.profile.uml#_bnaAD5zyEduNFJngXC2TxA"/>
     </profileApplication>
   </packagedElement>
 </uml:Model>
 <EJB3_0:EJB3__Entity xmi:id="__CTG8Ks0EdyIO8FO6pxi7w" base_Class="97493032-ab33-11dc-a981-93859b9b4235"/>
</xmi:XMI>

Now i want to import the model into EA with all applied stereotypes. An import without stereotypes is possible but import with markings failed. After the import i get a log file.
Code: [Select]

Importing Model from XMI
***** Root Package: PrimitiveTypes *****
Add Classifier: int
Add Classifier: void
***** Resolving Classifiers *****
***** Resolving Owners *****
***** Resolving Attribute Types *****
***** Resolving Parameter Types *****
Error: Unknown Package Connector Source or Target
Error: Unknown Package Connector Source or Target
Error: Unknown Package Connector Source or Target
Error: Unknown Package Connector Source or Target
***** Resolving Association-Classes *****
***** Resolving InteractionOccurences *****
***** Fixup external references *****
Import Complete!

thomaskilian

  • Guest
Re: UML Import
« Reply #3 on: December 17, 2007, 12:27:16 pm »
I see (much cearer now ;)). The short answer is (again): XMI is not XMI. There are quite some different incompatible flavors of XMI. Sometimes you are lucky tweaking the source, but most times you are not.

Maybe someone from Sparx has an idea?

jeue

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: UML Import
« Reply #4 on: December 17, 2007, 11:40:32 pm »
I know that classic xmi is not ecore xmi. That's why there are different namespaces. But i have to know: is it possible to import emf-uml2 2.1 xmi into EA with applied stereotypes?

thomaskilian

  • Guest
Re: UML Import
« Reply #5 on: December 18, 2007, 03:06:39 am »
I just searched for EMF the last 999 days in the forum. The result (mainly 3 threads) did not look so promising. Maybe you read them by yourself.

mexfollower

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
  • Reality is a messed up implementation of a model
    • View Profile
Re: UML Import
« Reply #6 on: January 23, 2008, 12:49:38 pm »
Any success in your import or hints from Sparxs?
« Last Edit: January 23, 2008, 12:50:23 pm by mexfollower »