XSD -> EMF -> UML [message #627515] |
Thu, 23 April 2009 21:05 |
John T.E. Timm Messages: 161 Registered: July 2009 |
Senior Member |
|
|
I am creating an EMF model from XML schema and then exporting it to UML
using the "Export Model..." option on the genmodel context menu. What I
find is one of two things:
1. Either I get a runtime error with an InvocationTargetException
(mentioned in a previous post)
or
2. If my schema has a root element definition that creates DocumentRoot in
the EMF model, the model exporter tries to create a locally defined
Ecore.uml in addition to library.uml.
I am using the simple library.xsd schema (from various EMF examples) and
adding a root element:
<xsd:element name="library" type="lib:Library"/>
When the DocumentRoot EClass is created in Ecore, it has some attributes
that are of type EStringToStringMapEntry. I believe it is this specific
class that causes the model export to attempt to create a local definition
of Ecore.uml (as opposed to simply referencing it with path maps). Without
the root element, I do not have any issues.
My goal is to take the XML Schema convert it to Ecore and then UML so that
I can use it in other UML models and finally take those UML models back
into Ecore with OCL and ultimately produce a Java runtime that validates
the ecore model using OCL constraints specified at the UML level.
Unfortunately, this has not been possible with the library example that I
am using due to the above problems. Any ideas or workarounds would be
appreciated.
Thanks,
JT
|
|
|
Powered by
FUDForum. Page generated in 0.02396 seconds