Enumeration S.Type: How to add values? [message #17012] |
Mon, 07 April 2003 22:17 |
Eclipse User |
|
|
|
Originally posted by: dirk.schesmer.divos.de
Hi there,
I'm a newbee in this group and would like to learn about how to add value to
an <<Enumeration>> Simple Type like the S.T. Status: available, negotaiting,
sold (taken from the Car example in Mastering XMI)
I know how to do it using the XMIFramework, but how to add values using
EMF/XSD (this indeed sooo much more powerful framework!)
XSDPrototypicalSchema.java just show me how to add the first enum value, but
what about more of them ?
XSDEnumerationFacet xsdEnumerationFacet =
xsdFactory.createXSDEnumerationFacet();
xsdEnumerationFacet.setLexicalValue("unknown");
Thanks for help,
Dirk V. Schesmer
|
|
|
Re: Enumeration S.Type: How to add values? [message #17071 is a reply to message #17012] |
Mon, 07 April 2003 23:17 |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
Dirk,
Each concrete enumeration facet holds only one value, so you simply create
another XSDEnumerationFacet and add it to the facet contents too. (All the
different concrete enumeration facets are composed as a single synthetic
enumeration facet that holds a list of values.)
"Dirk V. Schesmer" wrote:
> Hi there,
> I'm a newbee in this group and would like to learn about how to add value to
> an <<Enumeration>> Simple Type like the S.T. Status: available, negotaiting,
> sold (taken from the Car example in Mastering XMI)
>
> I know how to do it using the XMIFramework, but how to add values using
> EMF/XSD (this indeed sooo much more powerful framework!)
> XSDPrototypicalSchema.java just show me how to add the first enum value, but
> what about more of them ?
>
> XSDEnumerationFacet xsdEnumerationFacet =
> xsdFactory.createXSDEnumerationFacet();
>
> xsdEnumerationFacet.setLexicalValue("unknown");
>
> Thanks for help,
>
> Dirk V. Schesmer
|
|
|
Re: Enumeration S.Type: How to add values? [message #567217 is a reply to message #17012] |
Mon, 07 April 2003 23:17 |
Ed Merks Messages: 33140 Registered: July 2009 |
Senior Member |
|
|
Dirk,
Each concrete enumeration facet holds only one value, so you simply create
another XSDEnumerationFacet and add it to the facet contents too. (All the
different concrete enumeration facets are composed as a single synthetic
enumeration facet that holds a list of values.)
"Dirk V. Schesmer" wrote:
> Hi there,
> I'm a newbee in this group and would like to learn about how to add value to
> an <<Enumeration>> Simple Type like the S.T. Status: available, negotaiting,
> sold (taken from the Car example in Mastering XMI)
>
> I know how to do it using the XMIFramework, but how to add values using
> EMF/XSD (this indeed sooo much more powerful framework!)
> XSDPrototypicalSchema.java just show me how to add the first enum value, but
> what about more of them ?
>
> XSDEnumerationFacet xsdEnumerationFacet =
> xsdFactory.createXSDEnumerationFacet();
>
> xsdEnumerationFacet.setLexicalValue("unknown");
>
> Thanks for help,
>
> Dirk V. Schesmer
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.02842 seconds