Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » Annotations for shared super class attributes and associations?(Is it possible to setup annotations that are variable depending on context?)
icon5.gif  Annotations for shared super class attributes and associations? [message #666804] Fri, 22 April 2011 16:54
DavidH Mising name is currently offline DavidH Mising nameFriend
Messages: 3
Registered: April 2011
Junior Member
Suppose I have an abstract ECore meta-class called Cardinality with two integer attributes:
min:: EInt
max:: EInt

I have two subclasses that utilize the cardinality attributes:
ProductComposition extends Cardinality
RequestSpecificationComposition extends Cardinality

But the output XMI needs to use different tags to represent these instances as follows:
<xsd:complexType name="ProductComposition">
          <xsd:element name="MaximumNumberOfComponents" type="xsd:integer" minOccurs="0"/>
          <xsd:element name="MinimumNumberOfComponents" type="xsd:integer" minOccurs="0"/>

<xsd:complexType name="RequestSpecificationComposition">
          <xsd:element name="MaximumNumberOfRequests" type="xsd:integer" minOccurs="0"/>
          <xsd:element name="MinimumNumberOfRequests" type="xsd:integer" minOccurs="0"/>

How can I use annotations to vary the output format based on the subclass that uses the common super class attributes? The attributes are only defined I can only place one Annotation on each attribute.
Previous Topic:ECore Meta-Model to XMI Transform Issue: Re-used Entities Only Take Last Map
Next Topic: AML(AtlanMod Matching Language )
Goto Forum:

Current Time: Thu Mar 04 01:19:45 GMT 2021

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

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

Back to the top