Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » how to load int generals from Integer
how to load int generals from Integer [message #872444] Wed, 16 May 2012 06:06 Go to next message
jy zhang is currently offline jy zhang
Messages: 19
Registered: May 2012
Junior Member
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 06:06]

Report message to a moderator

Re: how to load int generals from Integer [message #873198 is a reply to message #872444] Thu, 17 May 2012 16:59 Go to previous messageGo to next message
Ed Willink is currently offline Ed Willink
Messages: 4097
Registered: July 2009
Senior Member
Hi

And how do you load?

With Java code/UML model editor/Ecore model editor/....

Regards

Ed Willink

On 16/05/2012 07:06, jy zhang wrote:
> 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
> mailto:'org.eclipse.emf.ecore.xml.type.impl.AnyTypeImpl@5c0662
> (eProxyURI: http:||schema.omg.org/spec/UML/2.1/uml.xml#Integer eClass:
> mailto: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!
>
Re: how to load int generals from Integer [message #873463 is a reply to message #873198] Fri, 18 May 2012 09:37 Go to previous messageGo to next message
jy zhang is currently offline jy zhang
Messages: 19
Registered: May 2012
Junior Member
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

Re: how to load int generals from Integer [message #886140 is a reply to message #872444] Thu, 14 June 2012 10:15 Go to previous messageGo to next message
max power is currently offline max power
Messages: 9
Registered: May 2012
Junior Member
Hi jy zhang,

have you managed to import the model with EAJAVA_.. types? I'm facing the same problem at the moment.
Re: how to load int generals from Integer [message #886276 is a reply to message #873463] Thu, 14 June 2012 15:41 Go to previous message
Ed Willink is currently offline Ed Willink
Messages: 4097
Registered: July 2009
Senior Member
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
>
>
Previous Topic:Load uml resource from an uploaded file
Next Topic:href="http://schema.omg.org/spec/UML/2.1/uml.xml#Integer"/> to EInt
Goto Forum:
  


Current Time: Fri Oct 24 12:54:11 GMT 2014

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

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