|
(no subject) [message #676603 is a reply to message #676579] |
Sun, 05 June 2011 16:41 |
Ed Merks Messages: 33140 Registered: July 2009 |
Senior Member |
|
|
Stefan,
I would expect Xpand or any other templating technology to be able to
deal with multiple inputs. If necessary you can always create a new
model that references instances of other models. For example,
EAnnotation.getReferences can refer to arbitrary other instances while
EAnnotation.getConents can contain arbitrary other instances...
Stefan wrote:
> Hello all,
>
> how is it possible to handle distributed model data?
>
> Currently I am using ecore models and the data is stored in xmi files
> (dynamic instances).
>
> Each xmi file contains only a part of the whole data, but the
> processing (Xpand template) should have access to all data at the same
> time.
>
>
> Example:
>
> The model (model.ecore) has the classes A,B,C,... with their
> attributes or subclasses like this:
>
> A
> a1
> a2
> B
> b1
> b2
> C
> c1
> c2
> c3
>
> Now let us assume we have three dynamic instances D1.xmi, D2.xmi and
> D3.xmi
> The data content should be:
>
> D1
> a1
> a2
>
> D2
> b1
> c1
>
> D3
> b2
> c2
> c3
>
>
> How to get a single data model (D_merged.xmi? or merged in workflow
> model slot?), containing the whole data, so that a xpt can access e.g.
> a2 and c2 at the same time?
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Re: (no subject) [message #676606 is a reply to message #676603] |
Sun, 05 June 2011 16:59 |
Stefan Messages: 9 Registered: June 2011 |
Junior Member |
|
|
Hello Ed,
multiple input (xmi) with multiple output (one xpt-generation per xmi) is no problem.
But what I want is multiple input (xmi) with single output (one xpt-generation for all xmi).
I am not sure what you mean with "create a new model". I have only one .ecore model. All xmi (instances) files correspond to this. There is no other model and I do not see the need for an further model.
The problem is in my workflow, every xmi is read in to an own slot. Every slot needs it's own generator-component. I use the same xpt, but this does not matter.
Inside the xpt I want process e.g. C with c1,c2 and c3 (see first post) for one single output file.
But c1 is in D2 and c2,c3 in D3.
So when my workflow processes D2 the information of c2,c3 is missing, and when D3 is processes, the information of c1 is missing.
What I am looking for is just a "dumb" merger which e.g. merges all xmi files or all slots into one instance with all the data.
The merger should be run during workflow automatically.
The number of xmi files and the distribution of Classes and Attributes can varying. So I cannot say I have always three xmi (D1, D2, D3) ist can be everything from 1 to a high nummber (e.g. 100) different xmi files.
Is my explanation clear? If not I am sorry, I am new to the modeling stuff.
|
|
|
Re: (no subject) [message #676614 is a reply to message #676606] |
Sun, 05 June 2011 17:41 |
|
Hello Stefan,
see my post in the m2t forum. you need a component that loads multiple models into one slot or a component that mergerges multiple slots into one. in both cases i fear you have to write the workflow component yourself but this should be just a 10liner in both cases.
~Christian
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
|
|
|
Re: (no subject) [message #676619 is a reply to message #676606] |
Sun, 05 June 2011 17:57 |
Ed Merks Messages: 33140 Registered: July 2009 |
Senior Member |
|
|
Stefan,
Comments below.
Stefan wrote:
> Hello Ed,
>
> multiple input (xmi) with multiple output (one xpt-generation per xmi)
> is no problem.
> But what I want is multiple input (xmi) with single output (one
> xpt-generation for all xmi).
>
> I am not sure what you mean with "create a new model".
Either you stick all the objects into a single file or you model a new
type of object that references all the others you need.
> I have only one .ecore model. All xmi (instances) files correspond to
> this. There is no other model and I do not see the need for an further
> model.
You asked how to merge, you have the two choices.
>
>
> The problem is in my workflow, every xmi is read in to an own slot.
I don't know much about the workflow stuff, i.e., I don't know what a
"slot" is...
> Every slot needs it's own generator-component.
I don't know what a generator component is either.
> I use the same xpt, but this does not matter.
> Inside the xpt I want process e.g. C with c1,c2 and c3 (see first
> post) for one single output file.
> But c1 is in D2 and c2,c3 in D3.
> So when my workflow processes D2 the information of c2,c3 is missing,
> and when D3 is processes, the information of c1 is missing.
>
> What I am looking for is just a "dumb" merger which e.g. merges all
> xmi files or all slots into one instance with all the data.
One instance meaning what? In one resource or one modeled object?
> The merger should be run during workflow automatically.
>
> The number of xmi files and the distribution of Classes and Attributes
> can varying. So I cannot say I have always three xmi (D1, D2, D3) ist
> can be everything from 1 to a high nummber (e.g. 100) different xmi
> files.
>
>
> Is my explanation clear?
Not so much. It's best to ask on the m2t newsgroup/forum about Xpand or
on the EMFT newsgroup about MWE because your question seems to be
specific to those technologies. It's generally very easy to load an
arbitrary number of resources into a resource set. and then work with
all those objects...
> If not I am sorry, I am new to the modeling stuff.
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.03317 seconds