Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] dealing with XMLInjector / XMLExtractor with ATL 3.0
[ATL] dealing with XMLInjector / XMLExtractor with ATL 3.0 [message #482469] Wed, 26 August 2009 16:31 Go to next message
Guillaume Gauffre is currently offline Guillaume GauffreFriend
Messages: 65
Registered: July 2009
Member
Hi,

I found the new version very easy to use with the new version thanks to
the specific "Injector/Extractor" to perform model loading and saving. I
use ATL programmatically to include it as part on an IDE developped
with Eclipse.
But I have two questions :
why using this terms, Injector/Extractor, as Injector are yet defined
for XML injection but they are two different elements since they do not
inherit of the same classes ?
if these two kinds of elements are the same (bridging EMF, ASM, XML
technical spaces) why is it not possible to access the XML injector
using CoreService.getInjector() - on my platform only EMF, ATL and ASM
are possible ? If I'm right, the XML injector must implement the same
interfaces... ?

And for now, if i need to inject XML before performing a transformation
with the EMF VM, how can I perform that : must I create ASM model first
and inject them into EMF vm ?

Thanks for your help.
And I have to say that it is always a great tool, thanks guys !

Guillaume
Re: [ATL] dealing with XMLInjector / XMLExtractor with ATL 3.0 [message #482632 is a reply to message #482469] Thu, 27 August 2009 11:58 Go to previous messageGo to next message
William Piers is currently offline William PiersFriend
Messages: 301
Registered: July 2009
Senior Member
Hello,

Answers below:

Guillaume a écrit :
> Hi,
>
> I found the new version very easy to use with the new version thanks to
> the specific "Injector/Extractor" to perform model loading and saving. I
> use ATL programmatically to include it as part on an IDE developped
> with Eclipse.
> But I have two questions :
> why using this terms, Injector/Extractor, as Injector are yet defined
> for XML injection but they are two different elements since they do not
> inherit of the same classes ?

Historically, the ATL RegularVM was defining a specific inject/extract
api, strongly based on RegularVM concepts. The ATL 3.0 API was inspired
from that one but isn't strictly compatible with: for instance, the
"ASM" injector/extractor you mention are used to wrap RegularVM models
to the new API, which is not specific to only one VM (that was the main
problem with the RegularVM API).

> if these two kinds of elements are the same (bridging EMF, ASM, XML
> technical spaces) why is it not possible to access the XML injector
> using CoreService.getInjector() - on my platform only EMF, ATL and ASM
> are possible ?

At this time, under the new API, three injector/extractors have been
implemented:
- EMF: to load/save basic EMF models (or XML files through EMF XSD)
- ASM: to make the new API compatible with old RegularVM models, in
order to use same API to launch a transformation with both VMs
- ATL: to allow .atl files parsing/generation to/from an EMF model
conforming to the ATL metamodel (in its .ecore form)

> If I'm right, the XML injector must implement the same
> interfaces... ?

That's the point. As the injection/extraction system was strongly
related to AM3/TCS components, which are now completly separated of ATL.

> And for now, if i need to inject XML before performing a transformation
> with the EMF VM, how can I perform that : must I create ASM model first
> and inject them into EMF vm ?

This could have been a solution, but ASM models wrapping is not as
strong as to allow EMFVM / RegularVM interactions.

Currently the quickest solution is to use EMF XSD. But as several people
encounter that problematic, it could interesting to open a bug about
that issue. Then interested people should be able to merge their efforts
in order to contribute an XML injector/extractor based on the new API.

Best regards,

William

> Thanks for your help.
> And I have to say that it is always a great tool, thanks guys !
>
> Guillaume
Re: [ATL] dealing with XMLInjector / XMLExtractor with ATL 3.0 [message #484796 is a reply to message #482632] Wed, 09 September 2009 11:07 Go to previous messageGo to next message
Guillaume Gauffre is currently offline Guillaume GauffreFriend
Messages: 65
Registered: July 2009
Member
Hello,

thanks for the information.
My opinion is that the new API is really great and I would like to use
it. The refining mode is really helpful.
But without a XML injector, I can't use all its functionnalities.
If the xml.ecore metamodel of AM3/TCS is validated by contributors of
the M2M project, I think the XML injector/extractor for the new API have
to be implemented.
I'm using it for example to perform OWL protege files imports and also
parametrization of transformations as mentionned in "ATL How To".
I'm having difficulties finding information about how to use EMF XSD,
does anybody has a reference to give about that purpose ?

On another subject : I'm encountering a problem when using the refining
mode.
for an element A to refine, I can modify attributes and add elements to
collections but when I need to exclude some elements of a collection, it
doesn't do anything :

rule {
from
elt : MM!EltA
using {
toAdd : Sequence(MM!Link) = getLinksToAdd();
toDel : Sequence(MM!Link) = getLinksToDelete();
}
to
t_elt : MM!EltA (
name <- elt.name, -- works well
incoming_links <- toAdd, -- works too
outgoing_links <- elt.outgoing_links->excluding(toDel) -- do nothing
)
}

Thanks for your help

Guillaume

William Piers a écrit :
> Hello,
>
> Answers below:
>
> Guillaume a écrit :
>> Hi,
>>
>> I found the new version very easy to use with the new version thanks
>> to the specific "Injector/Extractor" to perform model loading and
>> saving. I use ATL programmatically to include it as part on an IDE
>> developped with Eclipse.
>> But I have two questions :
>> why using this terms, Injector/Extractor, as Injector are yet defined
>> for XML injection but they are two different elements since they do
>> not inherit of the same classes ?
>
> Historically, the ATL RegularVM was defining a specific inject/extract
> api, strongly based on RegularVM concepts. The ATL 3.0 API was inspired
> from that one but isn't strictly compatible with: for instance, the
> "ASM" injector/extractor you mention are used to wrap RegularVM models
> to the new API, which is not specific to only one VM (that was the main
> problem with the RegularVM API).
>
>> if these two kinds of elements are the same (bridging EMF, ASM, XML
>> technical spaces) why is it not possible to access the XML injector
>> using CoreService.getInjector() - on my platform only EMF, ATL and ASM
>> are possible ?
>
> At this time, under the new API, three injector/extractors have been
> implemented:
> - EMF: to load/save basic EMF models (or XML files through EMF XSD)
> - ASM: to make the new API compatible with old RegularVM models, in
> order to use same API to launch a transformation with both VMs
> - ATL: to allow .atl files parsing/generation to/from an EMF model
> conforming to the ATL metamodel (in its .ecore form)
>
>> If I'm right, the XML injector must implement the same interfaces... ?
>
> That's the point. As the injection/extraction system was strongly
> related to AM3/TCS components, which are now completly separated of ATL.
>
>> And for now, if i need to inject XML before performing a
>> transformation with the EMF VM, how can I perform that : must I create
>> ASM model first and inject them into EMF vm ?
>
> This could have been a solution, but ASM models wrapping is not as
> strong as to allow EMFVM / RegularVM interactions.
>
> Currently the quickest solution is to use EMF XSD. But as several people
> encounter that problematic, it could interesting to open a bug about
> that issue. Then interested people should be able to merge their efforts
> in order to contribute an XML injector/extractor based on the new API.
>
> Best regards,
>
> William
>
>> Thanks for your help.
>> And I have to say that it is always a great tool, thanks guys !
>>
>> Guillaume
Re: [ATL] dealing with XMLInjector / XMLExtractor with ATL 3.0 [message #484799 is a reply to message #484796] Wed, 09 September 2009 11:15 Go to previous messageGo to next message
Guillaume Gauffre is currently offline Guillaume GauffreFriend
Messages: 65
Registered: July 2009
Member
Ok,

after looking at the previous threads, I found deleting is not yet
implemented in refining mode. Is there any plans for offering this
functionnality ?


Guillaume a écrit :
> Hello,
>
> thanks for the information.
> My opinion is that the new API is really great and I would like to use
> it. The refining mode is really helpful.
> But without a XML injector, I can't use all its functionnalities.
> If the xml.ecore metamodel of AM3/TCS is validated by contributors of
> the M2M project, I think the XML injector/extractor for the new API have
> to be implemented.
> I'm using it for example to perform OWL protege files imports and also
> parametrization of transformations as mentionned in "ATL How To".
> I'm having difficulties finding information about how to use EMF XSD,
> does anybody has a reference to give about that purpose ?
>
> On another subject : I'm encountering a problem when using the refining
> mode.
> for an element A to refine, I can modify attributes and add elements to
> collections but when I need to exclude some elements of a collection, it
> doesn't do anything :
>
> rule {
> from
> elt : MM!EltA
> using {
> toAdd : Sequence(MM!Link) = getLinksToAdd();
> toDel : Sequence(MM!Link) = getLinksToDelete();
> }
> to
> t_elt : MM!EltA (
> name <- elt.name, -- works well
> incoming_links <- toAdd, -- works too
> outgoing_links <- elt.outgoing_links->excluding(toDel) -- do nothing
> )
> }
>
> Thanks for your help
>
> Guillaume
>
> William Piers a écrit :
>> Hello,
>>
>> Answers below:
>>
>> Guillaume a écrit :
>>> Hi,
>>>
>>> I found the new version very easy to use with the new version thanks
>>> to the specific "Injector/Extractor" to perform model loading and
>>> saving. I use ATL programmatically to include it as part on an IDE
>>> developped with Eclipse.
>>> But I have two questions :
>>> why using this terms, Injector/Extractor, as Injector are yet defined
>>> for XML injection but they are two different elements since they do
>>> not inherit of the same classes ?
>>
>> Historically, the ATL RegularVM was defining a specific inject/extract
>> api, strongly based on RegularVM concepts. The ATL 3.0 API was
>> inspired from that one but isn't strictly compatible with: for
>> instance, the "ASM" injector/extractor you mention are used to wrap
>> RegularVM models to the new API, which is not specific to only one VM
>> (that was the main problem with the RegularVM API).
>>
>>> if these two kinds of elements are the same (bridging EMF, ASM, XML
>>> technical spaces) why is it not possible to access the XML injector
>>> using CoreService.getInjector() - on my platform only EMF, ATL and
>>> ASM are possible ?
>>
>> At this time, under the new API, three injector/extractors have been
>> implemented:
>> - EMF: to load/save basic EMF models (or XML files through EMF XSD)
>> - ASM: to make the new API compatible with old RegularVM models, in
>> order to use same API to launch a transformation with both VMs
>> - ATL: to allow .atl files parsing/generation to/from an EMF model
>> conforming to the ATL metamodel (in its .ecore form)
>>
>>> If I'm right, the XML injector must implement the same interfaces... ?
>>
>> That's the point. As the injection/extraction system was strongly
>> related to AM3/TCS components, which are now completly separated of ATL.
>>
>>> And for now, if i need to inject XML before performing a
>>> transformation with the EMF VM, how can I perform that : must I
>>> create ASM model first and inject them into EMF vm ?
>>
>> This could have been a solution, but ASM models wrapping is not as
>> strong as to allow EMFVM / RegularVM interactions.
>>
>> Currently the quickest solution is to use EMF XSD. But as several
>> people encounter that problematic, it could interesting to open a bug
>> about that issue. Then interested people should be able to merge their
>> efforts in order to contribute an XML injector/extractor based on the
>> new API.
>>
>> Best regards,
>>
>> William
>>
>>> Thanks for your help.
>>> And I have to say that it is always a great tool, thanks guys !
>>>
>>> Guillaume
Re: [ATL] dealing with XMLInjector / XMLExtractor with ATL 3.0 [message #484832 is a reply to message #484799] Wed, 09 September 2009 13:04 Go to previous message
William Piers is currently offline William PiersFriend
Messages: 301
Registered: July 2009
Senior Member
This will be implemented in the next ATL release, ATL 3.1 in june 2010.

Best regards,

William

Guillaume a écrit :
> Ok,
>
> after looking at the previous threads, I found deleting is not yet
> implemented in refining mode. Is there any plans for offering this
> functionnality ?
>
>
> Guillaume a écrit :
>> Hello,
>>
>> thanks for the information.
>> My opinion is that the new API is really great and I would like to use
>> it. The refining mode is really helpful.
>> But without a XML injector, I can't use all its functionnalities.
>> If the xml.ecore metamodel of AM3/TCS is validated by contributors of
>> the M2M project, I think the XML injector/extractor for the new API
>> have to be implemented.
>> I'm using it for example to perform OWL protege files imports and also
>> parametrization of transformations as mentionned in "ATL How To".
>> I'm having difficulties finding information about how to use EMF XSD,
>> does anybody has a reference to give about that purpose ?
>>
>> On another subject : I'm encountering a problem when using the
>> refining mode.
>> for an element A to refine, I can modify attributes and add elements
>> to collections but when I need to exclude some elements of a
>> collection, it doesn't do anything :
>>
>> rule {
>> from
>> elt : MM!EltA
>> using {
>> toAdd : Sequence(MM!Link) = getLinksToAdd();
>> toDel : Sequence(MM!Link) = getLinksToDelete();
>> }
>> to
>> t_elt : MM!EltA (
>> name <- elt.name, -- works well
>> incoming_links <- toAdd, -- works too
>> outgoing_links <- elt.outgoing_links->excluding(toDel) -- do
>> nothing
>> )
>> }
>>
>> Thanks for your help
>>
>> Guillaume
>>
>> William Piers a écrit :
>>> Hello,
>>>
>>> Answers below:
>>>
>>> Guillaume a écrit :
>>>> Hi,
>>>>
>>>> I found the new version very easy to use with the new version thanks
>>>> to the specific "Injector/Extractor" to perform model loading and
>>>> saving. I use ATL programmatically to include it as part on an IDE
>>>> developped with Eclipse.
>>>> But I have two questions :
>>>> why using this terms, Injector/Extractor, as Injector are yet
>>>> defined for XML injection but they are two different elements since
>>>> they do not inherit of the same classes ?
>>>
>>> Historically, the ATL RegularVM was defining a specific
>>> inject/extract api, strongly based on RegularVM concepts. The ATL 3.0
>>> API was inspired from that one but isn't strictly compatible with:
>>> for instance, the "ASM" injector/extractor you mention are used to
>>> wrap RegularVM models to the new API, which is not specific to only
>>> one VM (that was the main problem with the RegularVM API).
>>>
>>>> if these two kinds of elements are the same (bridging EMF, ASM, XML
>>>> technical spaces) why is it not possible to access the XML injector
>>>> using CoreService.getInjector() - on my platform only EMF, ATL and
>>>> ASM are possible ?
>>>
>>> At this time, under the new API, three injector/extractors have been
>>> implemented:
>>> - EMF: to load/save basic EMF models (or XML files through EMF XSD)
>>> - ASM: to make the new API compatible with old RegularVM models, in
>>> order to use same API to launch a transformation with both VMs
>>> - ATL: to allow .atl files parsing/generation to/from an EMF model
>>> conforming to the ATL metamodel (in its .ecore form)
>>>
>>>> If I'm right, the XML injector must implement the same interfaces... ?
>>>
>>> That's the point. As the injection/extraction system was strongly
>>> related to AM3/TCS components, which are now completly separated of ATL.
>>>
>>>> And for now, if i need to inject XML before performing a
>>>> transformation with the EMF VM, how can I perform that : must I
>>>> create ASM model first and inject them into EMF vm ?
>>>
>>> This could have been a solution, but ASM models wrapping is not as
>>> strong as to allow EMFVM / RegularVM interactions.
>>>
>>> Currently the quickest solution is to use EMF XSD. But as several
>>> people encounter that problematic, it could interesting to open a bug
>>> about that issue. Then interested people should be able to merge
>>> their efforts in order to contribute an XML injector/extractor based
>>> on the new API.
>>>
>>> Best regards,
>>>
>>> William
>>>
>>>> Thanks for your help.
>>>> And I have to say that it is always a great tool, thanks guys !
>>>>
>>>> Guillaume
Previous Topic:succesive "collect"
Next Topic:call of lazy rule
Goto Forum:
  


Current Time: Thu Apr 25 16:42:56 GMT 2024

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

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

Back to the top