how to load int generals from Integer [message #872444] |
Wed, 16 May 2012 02:06  |
Eclipse User |
|
|
|
Hi all again,
I'm loading xmi2.1 file exported by EA, part of the xmi content is like below:
<primitivetypes>
<packagedElement xmi:type="uml:Package" xmi:id="EAPrimitiveTypesPackage" name="EA_PrimitiveTypes_Package" visibility="public">
<packagedElement xmi:type="uml:Package" xmi:id="EAJavaTypesPackage" name="EA_Java_Types_Package" visibility="public">
<packagedElement xmi:type="uml:PrimitiveType" xmi:id="EAJava_int" name="int" visibility="public">
<generalization xmi:type="uml:Generalization" xmi:id="EAJava_int_General">
<general href="http:||schema.omg.org/spec/UML/2.1/uml.xml#Integer"/>
</generalization>
</packagedElement>
</packagedElement>
</packagedElement>
</primitivetypes>
When I load the xmi file, it seems it didn't dealt Integer as EClass (general of EA "int").
org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Value 'org.eclipse.emf.ecore.xml.type.impl.AnyTypeImpl@5c0662 (eProxyURI: http:||schema.omg.org/spec/UML/2.1/uml.xml#Integer eClass: org.eclipse.emf.ecore.impl.EClassImpl@1a728d6 (name: Classifier) (instanceClassName: null) (abstract: false, interface: false))' is not legal.
at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.handleErrors(XMLLoadImpl.java:83)
How could I fix this problem to load the xmi successfully?
Thanks a lot!
[Updated on: Wed, 16 May 2012 02:06] by Moderator
|
|
|
|
|
|
Re: how to load int generals from Integer [message #886276 is a reply to message #873463] |
Thu, 14 June 2012 11:41  |
Eclipse User |
|
|
|
Hi
Sorry missed the response; been a busy time getting Juno ready.
I reviewed the UML2 Getting Started instructions and found a very
confusing mistake for novices; the Wiki has now been corrected as note
in https://bugs.eclipse.org/bugs/show_bug.cgi?id=382342. You may find
the reverse migration of UML2 4.0.0's UMLResourcesUtil.init() to
UML300ResourcesUtil.init in
https://bugs.eclipse.org/bugs/attachment.cgi?id=217303 helpful.
Regards
Ed Willink
On 18/05/2012 10:37, jy zhang wrote:
> HI Ed,
>
> I load the xmi file with my standalone java code,
> and I've loaded simple xmi2.1 file exported by EA correctly.
>
> load OK for xmi exported by EA (package0---Class0)
> failed to load for (package--Class0--attribute0::int)
>
> It seems EA creates generalization for its primitive type "int" which
> generals from http:||schema.omg.org/spec/UML/2.1/uml.xml#Integer,
>
> and I've loaded the primitive types followed by
> http:||wiki.eclipse.org/MDT/UML2/FAQ#What.27s_required_to_load_a_UML_.28.uml.29_resource_from_a_standalone_application.3F,
> but still failed. (low level to paste web link)
>
> Any ideas? Thanks a lot!
>
>
> Edward Willink wrote on Thu, 17 May 2012 12:59
>> Hi
>>
>> And how do you load?
>>
>> With Java code/UML model editor/Ecore model editor/....
>>
>> Regards
>>
>> Ed Willink
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.10793 seconds