Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » simple type wrapper classes pattern?
simple type wrapper classes pattern? [message #424311] Wed, 22 October 2008 17:57 Go to next message
jakob is currently offline jakobFriend
Messages: 1
Registered: July 2009
Junior Member
Dear EMFers,

I am doing a mapping from models created in modeling schemas in a language
that allows the creation of Interfaces that can be implemented by either a
class or a simple datatype (yeah, I know this probably sounds strange).

Is there a recommended pattern to create primitive Datatype EClass
wrappers that is efficient and compatible with CDO / Teneo?

Thank you for any hints in advance
Cheers
Jakob
Re: simple type wrapper classes pattern? [message #424338 is a reply to message #424311] Thu, 23 October 2008 15:01 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Jakob,

Comments below.

jakob wrote:
> Dear EMFers,
>
> I am doing a mapping from models created in modeling schemas in a
> language that allows the creation of Interfaces that can be
> implemented by either a class or a simple datatype (yeah, I know this
> probably sounds strange).
Yes, I don't really know what it means. :-P
> Is there a recommended pattern to create primitive Datatype EClass
> wrappers that is efficient and compatible with CDO / Teneo?
EMF provides SimpleAnyType which generally provides a wrapper for any
EDataType's instance to make it appear like an EObject. It's a bit
similar I guess to Java's "box" types for primitives. The idea is you
can use setInstanceType to specify the type of data value being wrapped
and then use setValue to set a value. The ability to convert the value
to and from a string is used to serialize and deserialize the result.

I think Teneo and CDO support this.
>
> Thank you for any hints in advance
> Cheers
> Jakob
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Example generator validator (JET example)
Next Topic:Serialized models based on xsd ?
Goto Forum:
  


Current Time: Thu Apr 25 10:26:01 GMT 2024

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

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

Back to the top