Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » DTP » EDataType inheritance
EDataType inheritance [message #21056] Mon, 28 August 2006 23:14 Go to next message
Anil Samuel is currently offline Anil SamuelFriend
Messages: 108
Registered: July 2009
Senior Member
Hi

Is it possible to have a DataType inherit from another (E)DataType or
EClass ?

I am looking to model

CHAR -> CharacterStringDataType (DTP)
NCHAR -> CHAR

and so on.

Regards
Anthos
Re: EDataType inheritance [message #21106 is a reply to message #21056] Tue, 29 August 2006 10:40 Go to previous message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

This is a multi-part message in MIME format.
--------------050301050604020305010507
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Anil,

With extended meta data you can do
ExtendedMetaData.INSTANCE.setBaseType(eDataTypeDerived, eDataTypeBase)
which produces an EAnnotation as described in XML Schema to Ecore
Mapping
< http://www.eclipse.org/emf/docs/overviews/XMLSchemaToEcoreMa pping.pdf>.
All this really means is that the create from string and convert to
string in the generated factory will delegate to those for the base. Is
that all you are hoping to achieve or is there more? (EDataTypes are
just wrappers for existing/handwritten Java classes, so the Java
inheritance will be whatever it happens to be.)


Anil Samuel wrote:
> Hi
>
> Is it possible to have a DataType inherit from another (E)DataType or
> EClass ?
>
> I am looking to model
>
> CHAR -> CharacterStringDataType (DTP)
> NCHAR -> CHAR
>
> and so on.
>
> Regards
> Anthos


--------------050301050604020305010507
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Anil,<br>
<br>
With extended meta data you can do
ExtendedMetaData.INSTANCE.setBaseType(eDataTypeDerived, eDataTypeBase)
which produces an EAnnotation as described in <a
href=" http://www.eclipse.org/emf/docs/overviews/XMLSchemaToEcoreMa pping.pdf">XML
Schema to Ecore Mapping</a>.&nbsp; All this really means is that the create
from string and convert to string in the generated factory will
delegate to those for the base.&nbsp; Is that all you are hoping to achieve
or is there more?&nbsp; (EDataTypes are just wrappers for
existing/handwritten Java classes, so the Java inheritance will be
whatever it happens to be.)<br>
<br>
<br>
Anil Samuel wrote:
<blockquote cite="mid44F378C7.40302@oracle.com" type="cite">Hi
<br>
<br>
Is it possible to have a DataType inherit from another (E)DataType or
EClass ?
<br>
<br>
I am looking to model
<br>
<br>
CHAR -&gt; CharacterStringDataType (DTP)
<br>
NCHAR -&gt; CHAR
<br>
<br>
and so on.
<br>
<br>
Regards
<br>
Anthos
<br>
</blockquote>
<br>
</body>
</html>

--------------050301050604020305010507--
Re: EDataType inheritance [message #581994 is a reply to message #21056] Tue, 29 August 2006 10:40 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33136
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------050301050604020305010507
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Anil,

With extended meta data you can do
ExtendedMetaData.INSTANCE.setBaseType(eDataTypeDerived, eDataTypeBase)
which produces an EAnnotation as described in XML Schema to Ecore
Mapping
< http://www.eclipse.org/emf/docs/overviews/XMLSchemaToEcoreMa pping.pdf>.
All this really means is that the create from string and convert to
string in the generated factory will delegate to those for the base. Is
that all you are hoping to achieve or is there more? (EDataTypes are
just wrappers for existing/handwritten Java classes, so the Java
inheritance will be whatever it happens to be.)


Anil Samuel wrote:
> Hi
>
> Is it possible to have a DataType inherit from another (E)DataType or
> EClass ?
>
> I am looking to model
>
> CHAR -> CharacterStringDataType (DTP)
> NCHAR -> CHAR
>
> and so on.
>
> Regards
> Anthos


--------------050301050604020305010507
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Anil,<br>
<br>
With extended meta data you can do
ExtendedMetaData.INSTANCE.setBaseType(eDataTypeDerived, eDataTypeBase)
which produces an EAnnotation as described in <a
href=" http://www.eclipse.org/emf/docs/overviews/XMLSchemaToEcoreMa pping.pdf">XML
Schema to Ecore Mapping</a>.&nbsp; All this really means is that the create
from string and convert to string in the generated factory will
delegate to those for the base.&nbsp; Is that all you are hoping to achieve
or is there more?&nbsp; (EDataTypes are just wrappers for
existing/handwritten Java classes, so the Java inheritance will be
whatever it happens to be.)<br>
<br>
<br>
Anil Samuel wrote:
<blockquote cite="mid44F378C7.40302@oracle.com" type="cite">Hi
<br>
<br>
Is it possible to have a DataType inherit from another (E)DataType or
EClass ?
<br>
<br>
I am looking to model
<br>
<br>
CHAR -&gt; CharacterStringDataType (DTP)
<br>
NCHAR -&gt; CHAR
<br>
<br>
and so on.
<br>
<br>
Regards
<br>
Anthos
<br>
</blockquote>
<br>
</body>
</html>

--------------050301050604020305010507--


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:JDBCType handling during SP Execution
Next Topic:Connecting to Derby 10.1.3.1 Network Server
Goto Forum:
  


Current Time: Thu Apr 18 15:46:05 GMT 2024

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

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

Back to the top