Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Ecore Tools » Resolve Ecore Cross Reference
Resolve Ecore Cross Reference [message #949027] Thu, 18 October 2012 16:04
Florian B. is currently offline Florian B.Friend
Messages: 21
Registered: July 2012
Location: Hamburg Germany
Junior Member
Hi folks,

I have a problem concerning the resolving of ecore cross references.

In my model I have cross references from entities to the same entity in a different file.

In my ecore model the reference's upper bound is set to unbounded and the lower bound is set to 1.

The problem is, when the XML are parsed and I want to access the referenced objects in foo as single entities, these objects (in my case "ports") are null. It seems the factory returns just new objects of the types.
<foo>
 <refPort>bar_test.bar_specification#//@devices/@device[name='testDevice1']/@port[name='TestDevice1Port']</refPort>
 <refPort>bar_test.bar_specification#//@devices/@device[name='testDevice2']/@port[name='TestDevice2Port']</refPort>
</foo>


The weird thing is, the references seems to be resolved, if only one referenced object is defined in the XML document as attribute of foo, like the following example.
<foo 
refport="bar_test.bar_specification#//@devices/@device[name='testDevice1']/@port[name='TestDevice1Port']" />


Maybe some properties are wrong in the .ecore ?

Thx again,

Florian

EDIT1:
I also tried to resolve the references with the static method EcoreUtil.resolveAll()

[Updated on: Thu, 18 October 2012 16:09]

Report message to a moderator

Previous Topic:Ecore editor doesn't find a file
Next Topic:Missing EMF Ecore diagram editor + Indigo JEE package 32 bit
Goto Forum:
  


Current Time: Tue Apr 23 06:18:37 GMT 2024

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

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

Back to the top