Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [] FW: Question on UMLUTil

Hi Anju,

I don't think much has changed in UMLUtil between those versions you mention, at least nothing to cause the change in behavior you are seeing.
Do you notice any exceptions or problems when you step through the code?

Also, please use the newsgroup for such questions in the future.

- James

"Geethabai, Anju" <GeethabaiA@xxxxxxxxx>
Sent by:

23/06/2009 03:11 PM

Please respond to
MDT UML2 mailing list <>

[] FW: Question on UMLUTil


From: Geethabai, Anju
Tuesday, June 23, 2009 3:01 PM
Question on UMLUTil

Below is part of a plugin code which converts  emx file   to ecore.
org.eclipse.uml2.uml.Package Pkg = EcoreUtil.getObjectByType(rset.getResource("c:\temp\test.uml",
   true).getContents(), UMLPackage.Literals.PACKAGE);
 Map<String, String> optionsMap = new HashMap<String, String>() ;
  Collection ecoreElements = UMLUtil.convertToEcore(pkg,optionsMap);

  save("c:\temp\test.ecore", ecoreElements);

When I run this code on following snippet.

 emx snippet

       <packagedElement xmi:type="uml:Class" xmi:id="_GFIhIAnAEd65K6q0HTJl7A" name="ServiceInfo">
         <ownedAttribute xmi:id="_I8GHMAnAEd65K6q0HTJl7A" name="serviceRendered" visibility="public" type="_HthxlwLEEd6ALd4GJZLpDQ"/>
         <ownedAttribute xmi:id="_MHUGAAnAEd65K6q0HTJl7A" name="activityCounter" visibility="public">

           <eAnnotations xmi:id="_PacDoAnAEd65K6q0HTJl7A" source="">
             <details xmi:id="_PacDoQnAEd65K6q0HTJl7A" key="@"/>

           <type xmi:type="uml:PrimitiveType" href="">            <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_NrSaMQnAEd65K6q0HTJl7A" value="1"/>
           <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_NrSaMAnAEd65K6q0HTJl7A"/>
         <ownedAttribute xmi:id="_R24Q4AnAEd65K6q0HTJl7A" name="activityInfos" visibility="public" type="_tBEmwAm_Ed65K6q0HTJl7A" association="_R2vG8AnAEd65K6q0HTJl7A">
           <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_R24Q4gnAEd65K6q0HTJl7A" value="10"/>
           <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_R24Q4QnAEd65K6q0HTJl7A"/>

 Note that the emx snippet  shows a child element of eAnnotation for a class  attribute .

Using the  eclipse plugin jar :  org.eclipse.uml2.uml_2.2.2.v200811051031.jar   which has version v of , eAnnotations are lost when ecore file is created.

This used to work in the previous version of plugin: org.eclipse.uml2.uml_2.0.5.v200802262248.jar

Generated Ecore Snippet   // Result when using  org.eclipse.uml2.uml_2.0.5.v200802262248.jar

<eClassifiers xsi:type="ecore:EClass" name="ServiceInfo">
       <eStructuralFeatures xsi:type="ecore:EAttribute" name="serviceRendered" ordered="false"
           lowerBound="1" eType="#//ServiceAssetView/CommonDataTypes/CoreTypes/Alpha50"/>
       <eStructuralFeatures xsi:type="ecore:EAttribute" name="activityCounter" ordered="false"
         <eAnnotations source="">
           <details key="@"/>
       <eStructuralFeatures xsi:type="ecore:EReference" name="activityInfos" ordered="false"
           upperBound="10" eType="#//ServiceAssetView/BusinessObjects/ActivityInfo"/>

Please  let me know  what changes have to me made to get eAnnotations in ecore file,






This e-mail may contain confidential or privileged information. If you think you have received this e-mail in error, please advise the sender by reply e-mail and then delete this e-mail immediately. Thank you. Aetna _______________________________________________ mailing list

Back to the top