| [news.eclipse.stp.sca-tools] Re: Extending the SCA Meta Model |
Damien Fournier a écrit :
Hi Stéphane,
Stephane Drapeau a écrit :Following the sca model extension guide, I've extended the SCA model with an osgi implementation in a new Ecore model.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?
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/model/
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,
RightYou can use instanceof
if(component.getImplementation() instanceof JavaImplementation) { .... } else if (component.getImplementation() instanceof OSGiImplementation) { ... }
cheers!
Stephane Drapeau Obeo
But
Whatever, I can use class name instead of meta object ids
Thanks for help
Damien