I am using hypejaxb3, and trying to find the syntax for adding the inheritance. e.g i wants to define the xsd for the relation class Circle inherits Shape . I could find the hyperjaxb customization guide at https://wikis.sun.com/display/GlassFish/Hyperjaxb3Reference but couldnt find specific steps for the defining the inheritance.
Asked
Active
Viewed 167 times
1 Answers
2
Just use the XML Schema complex type extension mechanism:
<xsd:complexType name="Shape">
<xsd:sequence>
...
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="Cicrle">
<xsd:complexContent>
<xsd:extension base="geometry:Shape">
<xsd:sequence>
<xsd:element name="radius" type="double"/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
HJ3 will generate Circle which would extend Shape - as well as appropriate JPA mappings, including inheritance annotations.

lexicore
- 42,748
- 17
- 132
- 221
-
I notice you answer almost all of the hyperjaxb questions, and that the activity stopped 2 or 3 years ago. Is hyperjaxb still being developed/maintained? I have a similar question, and I wonder if the problem is that the download might not include working code because hyperjaxb is no longer supperted. Are you willing to help me with my question? Here is the link: http://stackoverflow.com/questions/25676731/hyperjaxb3-not-generating-files – CodeMed Sep 05 '14 at 03:50