We are dealing with an schema with a great amount of data and with JAXB, over
500 classes are generated. We wonder whether it's possible to generate
inherited classes with JAXB.
For example, a simple piece of schema is shown below:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="
http://www.w3.org/2001/XMLSchema">
<xs:group name = "person">
<xs:sequence>
<xs:element name = "FirstName" type = "xs:string"/>
<xs:element name = "FamilyName" type = "xs:string"/>
</xs:sequence>
</xs:group>
<xs:complexType name = "person">
<xs:sequence>
<xs:group ref = "person"/>
</xs:sequence>
</xs:complexType>
<xs:group name = "student">
<xs:sequence>
<xs:element name = "No" type = "xs:integer"/>
</xs:sequence>
</xs:group>
<xs:complexType name = "student">
<xs:sequence>
<xs:group ref = "person"/>
<xs:group ref = "student"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
and JAXB will generate something like
public class person{
protected String firstname;
protected String familyname;
}
public class student{
protected String firstname;
protected String familyname;
protected BigInteger no;
}
is it possible to generate the student class as subclass of person?
something like
public class student extends person{
protected BigInteger no;
}
--
View this message in context: http://old.nabble.com/is-it-possible-to-generate-inherited-classes-with-JAXB--tp27818621p27818621.html
Sent from the java.net - jaxb users mailing list archive at Nabble.com.