| Summary: | Add JAXB annotations model to Texo with JAXB annotator | ||
|---|---|---|---|
| Product: | [Modeling] EMFT | Reporter: | Martin Taal <mtaal> |
| Component: | Texo | Assignee: | Martin Taal <mtaal> |
| Status: | CLOSED DUPLICATE | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | adietish, mcooper, philipp.wode |
| Version: | Future | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
|
Description
Martin Taal
Short update: - the jaxb annotation model has been done - it is possible to manually define jaxb annotations - the code to generate java annotations from these jaxb model annotations has been mostly done - I started to write some code to generate jaxb annotations. This is in its initial phase. I will continue to work on this from monday evening/tuesday as this is a holiday weekend here in The Netherlands. gr. Martin I am getting into some trouble with supporting jaxb annotations because EMF handles global elements quite differently from jaxb. EMF creates a so-called DocumentRoot eclass which, as efeatures, has all the global elements. If a complexType is re-used across several global elements then this results in several efeatures refering to the same eclass. Jaxb on the other hand seems to use an ObjectFactory to handle this specific case. See here: http://weblogs.java.net/blog/2006/03/03/why-does-jaxb-put-xmlrootelement-sometimes-not-always So this won't be supported by Texo. I am wondering how big of a disadvantage this is? It seems quite blocking... Another not-supported-by-emf things is the difference between xs:all and xs:sequence. This information is not stored in the ecore model, this because for EMF there is no difference between the two. gr. Martin *** This bug has been marked as a duplicate of bug 453338 *** It would be useful to try to address the general use case and filter out/warn about unsupported elements (e.g. cross referrals). In my own XML encoder I ran into similar issues. What I found was I generally only needed to use XML on some of my model classes and those where fairly straight-forward. |