Home » Archived » Service Component Architecture (SCA) Tools » Extending the SCA Meta Model
|
Re: Extending the SCA Meta Model [message #8831 is a reply to message #8826] |
Fri, 05 June 2009 09:42 |
Stephane Drapeau Messages: 199 Registered: July 2009 |
Senior Member |
|
|
Hi Damien,
Meta object Id values can be the same for different meta models.
Could you clarify how are you doing to add the OSGi type?
If your OSGi type is defined in a new meta model (plugin), this meta
model can't reuse the FraSCAti namespace.
If you want to use the FraSCAti namespace, you must add the OSGi
implementation type directly in the FraSCAti meta model and then
regenerate the code.
Regards,
Stéphane
Damien Fournier a écrit :
> Hi All,
>
> I'm trying to extend the SCA meta model by adding a new implementation
> type (currently an implementation.osgi element specific for the OW2
> FraSCAti platform).
>
> My extension integrates with the core sca metal model, but I still have
> an issue with meta object id, when generating java code for this model.
>
> The meta object id value for my OsgiPackage.OSGI_IMPLEMENTATION is set
> to "1" which is in conflict with existing
> FrascatiPackage.FRACTAL_IMPLEMENTATION
>
> Following FraSCAti and Tuscany model extension, meta objects ids seem
> to be unique
>
> Thus, does anyone knows how to generate java code from a model extension
> without having conflict with meta object ids
>
> Thanks
>
> Damien
|
|
|
Re: Extending the SCA Meta Model [message #8976 is a reply to message #8831] |
Tue, 09 June 2009 08:57 |
Damien Fournier Messages: 12 Registered: July 2009 Location: Lille, France |
Junior Member |
|
|
Hi Stéphane,
Stephane Drapeau a écrit :
> Hi Damien,
>
> Meta object Id values can be the same for different meta models.
> Could you clarify how are you doing to add the OSGi type?
Following the sca model extension guide, I've extended the SCA model
with an osgi implementation in a new Ecore model.
This implementation has an EAttribute named "bundle". I've also added a
DocumentRoot (EObject) which
has an EReference on the "OsgiImplmentation" (as explained in the
extension guide)
Ecore and genmodel files are accessible at
http://svn.forge.objectweb.org/cgi-bin/viewcvs.cgi/frascati/ trunk/assembly-factory/model/org.ow2.frascati.model.osgi/mod el/
This metal model has a different namespace of existing FraSCAti meta
model (http://frascati.ow2.org/osgi).
If Meta object Id values can be the same for different SCA model
extensions, then how to make distinction between
two different implementations or bindings ? For instance when calling
getImplementation() on a SCA Component, how
to know if this component is implemented with java, spring, bpel, etc ?
Thanks
Damien
>
> If your OSGi type is defined in a new meta model (plugin), this meta
> model can't reuse the FraSCAti namespace.
> If you want to use the FraSCAti namespace, you must add the OSGi
> implementation type directly in the FraSCAti meta model and then
> regenerate the code.
>
> Regards,
>
> Stéphane
>
> Damien Fournier a écrit :
>> Hi All,
>>
>> I'm trying to extend the SCA meta model by adding a new
>> implementation type (currently an implementation.osgi element
>> specific for the OW2 FraSCAti platform).
>>
>> My extension integrates with the core sca metal model, but I still have
>> an issue with meta object id, when generating java code for this model.
>>
>> The meta object id value for my OsgiPackage.OSGI_IMPLEMENTATION is
>> set to "1" which is in conflict with existing
>> FrascatiPackage.FRACTAL_IMPLEMENTATION
>>
>> Following FraSCAti and Tuscany model extension, meta objects ids seem
>> to be unique
>>
>> Thus, does anyone knows how to generate java code from a model
>> extension without having conflict with meta object ids
>>
>> Thanks
>>
>> Damien
|
|
| |
Re: Extending the SCA Meta Model [message #9015 is a reply to message #8995] |
Tue, 09 June 2009 14:54 |
Damien Fournier Messages: 12 Registered: July 2009 Location: Lille, France |
Junior Member |
|
|
Stephane Drapeau a écrit :
> Damien Fournier a écrit :
>>
>> Hi Stéphane,
>>
>> Stephane Drapeau a écrit :
>>> Hi Damien,
>>>
>>> Meta object Id values can be the same for different meta models.
>>> Could you clarify how are you doing to add the OSGi type?
>> Following the sca model extension guide, I've extended the SCA model
>> with an osgi implementation in a new Ecore model.
>> This implementation has an EAttribute named "bundle". I've also added
>> a DocumentRoot (EObject) which
>> has an EReference on the "OsgiImplmentation" (as explained in the
>> extension guide)
>>
>> Ecore and genmodel files are accessible at
>>
>> http://svn.forge.objectweb.org/cgi-bin/viewcvs.cgi/frascati/ trunk/assembly-factory/model/org.ow2.frascati.model.osgi/mod el/
>>
>>
>> This metal model has a different namespace of existing FraSCAti meta
>> model (http://frascati.ow2.org/osgi).
>>
>> If Meta object Id values can be the same for different SCA model
>> extensions, then how to make distinction between
>> two different implementations or bindings ? For instance when calling
>> getImplementation() on a SCA Component, how
>> to know if this component is implemented with java, spring, bpel, etc ?
>
Hi Stephane,
> You can use instanceof
>
> if(component.getImplementation() instanceof JavaImplementation) {
> ....
> } else if (component.getImplementation() instanceof OSGiImplementation) {
> ...
> }
>
Right
> cheers!
>
> Stephane Drapeau
> Obeo
But
What about the doSwitch() method provided by FrascatiSwitch or
TuscanySwitch class (Obtained when generating model code)?
Since the generated doSwitch() call the caseXXX method according to meta
object id.
Does this means that the doSwitch() cannot be used when having ecore
model extensions ?
Whatever, I can use class name instead of meta object ids
Thanks for help
Damien
|
|
| |
Re: Extending the SCA Meta Model [message #575203 is a reply to message #8826] |
Fri, 05 June 2009 09:42 |
Stephane Drapeau Messages: 199 Registered: July 2009 |
Senior Member |
|
|
Hi Damien,
Meta object Id values can be the same for different meta models.
Could you clarify how are you doing to add the OSGi type?
If your OSGi type is defined in a new meta model (plugin), this meta
model can't reuse the FraSCAti namespace.
If you want to use the FraSCAti namespace, you must add the OSGi
implementation type directly in the FraSCAti meta model and then
regenerate the code.
Regards,
Stéphane
Damien Fournier a écrit :
> Hi All,
>
> I'm trying to extend the SCA meta model by adding a new implementation
> type (currently an implementation.osgi element specific for the OW2
> FraSCAti platform).
>
> My extension integrates with the core sca metal model, but I still have
> an issue with meta object id, when generating java code for this model.
>
> The meta object id value for my OsgiPackage.OSGI_IMPLEMENTATION is set
> to "1" which is in conflict with existing
> FrascatiPackage.FRACTAL_IMPLEMENTATION
>
> Following FraSCAti and Tuscany model extension, meta objects ids seem
> to be unique
>
> Thus, does anyone knows how to generate java code from a model extension
> without having conflict with meta object ids
>
> Thanks
>
> Damien
|
|
|
Re: Extending the SCA Meta Model [message #575307 is a reply to message #8831] |
Tue, 09 June 2009 08:57 |
Damien Fournier Messages: 12 Registered: July 2009 Location: Lille, France |
Junior Member |
|
|
Hi Stéphane,
Stephane Drapeau a écrit :
> Hi Damien,
>
> Meta object Id values can be the same for different meta models.
> Could you clarify how are you doing to add the OSGi type?
Following the sca model extension guide, I've extended the SCA model
with an osgi implementation in a new Ecore model.
This implementation has an EAttribute named "bundle". I've also added a
DocumentRoot (EObject) which
has an EReference on the "OsgiImplmentation" (as explained in the
extension guide)
Ecore and genmodel files are accessible at
http://svn.forge.objectweb.org/cgi-bin/viewcvs.cgi/frascati/ trunk/assembly-factory/model/org.ow2.frascati.model.osgi/mod el/
This metal model has a different namespace of existing FraSCAti meta
model (http://frascati.ow2.org/osgi).
If Meta object Id values can be the same for different SCA model
extensions, then how to make distinction between
two different implementations or bindings ? For instance when calling
getImplementation() on a SCA Component, how
to know if this component is implemented with java, spring, bpel, etc ?
Thanks
Damien
>
> If your OSGi type is defined in a new meta model (plugin), this meta
> model can't reuse the FraSCAti namespace.
> If you want to use the FraSCAti namespace, you must add the OSGi
> implementation type directly in the FraSCAti meta model and then
> regenerate the code.
>
> Regards,
>
> Stéphane
>
> Damien Fournier a écrit :
>> Hi All,
>>
>> I'm trying to extend the SCA meta model by adding a new
>> implementation type (currently an implementation.osgi element
>> specific for the OW2 FraSCAti platform).
>>
>> My extension integrates with the core sca metal model, but I still have
>> an issue with meta object id, when generating java code for this model.
>>
>> The meta object id value for my OsgiPackage.OSGI_IMPLEMENTATION is
>> set to "1" which is in conflict with existing
>> FrascatiPackage.FRACTAL_IMPLEMENTATION
>>
>> Following FraSCAti and Tuscany model extension, meta objects ids seem
>> to be unique
>>
>> Thus, does anyone knows how to generate java code from a model
>> extension without having conflict with meta object ids
>>
>> Thanks
>>
>> Damien
|
|
| |
Re: Extending the SCA Meta Model [message #575341 is a reply to message #8995] |
Tue, 09 June 2009 14:54 |
Damien Fournier Messages: 12 Registered: July 2009 Location: Lille, France |
Junior Member |
|
|
Stephane Drapeau a écrit :
> Damien Fournier a écrit :
>>
>> Hi Stéphane,
>>
>> Stephane Drapeau a écrit :
>>> Hi Damien,
>>>
>>> Meta object Id values can be the same for different meta models.
>>> Could you clarify how are you doing to add the OSGi type?
>> Following the sca model extension guide, I've extended the SCA model
>> with an osgi implementation in a new Ecore model.
>> This implementation has an EAttribute named "bundle". I've also added
>> a DocumentRoot (EObject) which
>> has an EReference on the "OsgiImplmentation" (as explained in the
>> extension guide)
>>
>> Ecore and genmodel files are accessible at
>>
>> http://svn.forge.objectweb.org/cgi-bin/viewcvs.cgi/frascati/ trunk/assembly-factory/model/org.ow2.frascati.model.osgi/mod el/
>>
>>
>> This metal model has a different namespace of existing FraSCAti meta
>> model (http://frascati.ow2.org/osgi).
>>
>> If Meta object Id values can be the same for different SCA model
>> extensions, then how to make distinction between
>> two different implementations or bindings ? For instance when calling
>> getImplementation() on a SCA Component, how
>> to know if this component is implemented with java, spring, bpel, etc ?
>
Hi Stephane,
> You can use instanceof
>
> if(component.getImplementation() instanceof JavaImplementation) {
> ....
> } else if (component.getImplementation() instanceof OSGiImplementation) {
> ...
> }
>
Right
> cheers!
>
> Stephane Drapeau
> Obeo
But
What about the doSwitch() method provided by FrascatiSwitch or
TuscanySwitch class (Obtained when generating model code)?
Since the generated doSwitch() call the caseXXX method according to meta
object id.
Does this means that the doSwitch() cannot be used when having ecore
model extensions ?
Whatever, I can use class name instead of meta object ids
Thanks for help
Damien
|
|
| |
Goto Forum:
Current Time: Sat Nov 09 00:29:27 GMT 2024
Powered by FUDForum. Page generated in 0.06486 seconds
|