Matthias Bohlen wrote:
Hallo Chad,
Thursday, October 13, 2005, 5:47:11 PM, you wrote:
CB> Yeah you're right, sorry, I guess I misunderstood. I guess I'm not
CB> sure how exactly why/how you'll be accessing them in the ATL
CB> script? Can you give me an example of how you'd call them using
CB> ATL once you have them available?
In the configuration metamodel, I am going to model a metaclass
"Mapping" with two attributes "from" and "to". Then, I can model a
1:n relationship from Configuration to Mapping, called
"languageMappings".
Then, after populating the configuration model at runtime with the
mappings from AndroMDA, I can write an ATL helper like this:
helper def: targetPlatformTypeName(sourcePlatformTypeName: String)
: String =
Config!Configuration.allInstances()->first().languageMappings
->select(m | m.from = sourcePlatformTypeName)->first().to;
(Weird, this mixture of "." and "->").
Cool thanks for the explantation.
CB> The reason I ask is because currently there is no way to retrieve
CB> all mappings at one time, the way they usually work is someone
CB> specifies the logical or physical path for a mappings file as a
CB> namespace property and then from within a metafacade we look up
CB> that mapping from the namespace, so I'm trying to understand
CB> you're requirements, do you need something that returns all
CB> mappings that have been loaded by AndroMDA?
Yes, I think this would be necessary because until AndroMDA reaches
that ATL script, no metafacades will have been involved, yet.
Metafacades will be invoked on the PSM, later, when it already has
been run through various model transformations.
What do you think would be the best way? Load all mappings eagerly at
the beginning? Or one by one incrementally, at cartridge
initialization time?
Probably eagerly, I'll look at implementing a method that does this for you.
Cheers...
Matthias
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl