Hello,
I am trying to customize a schema for jaxb.
The problem that I use IDREF and the jaxb method are of the type :
java.lang.Object getAuthor()
setAuthor(java.lang.Object refenceObj)
I would like to have AuthorBio where I have java.lang.Object.
This problem is described in the "Java Architecture XML Binding, Final version", page 87-88 and 89.
They told
"Note that ID and IDREF mechanisms does not incorporate the type definitions
that can be referenced. A binding declaration customization could specify that
the base type for the author property of content interface Book should be
AuthorBio instead of java.lang.Object to make for a more meaningful binding."
But no way to found an example of this! I want to customize a java.lang.Object with a class which will be build by jaxb!
Could someone give me an advice? It will be helpful in a bioinformatics programs where AuthorBio are Gene and Protein.
I wish you a happy new year 2005.
Thansk a lot.
Francois
Given XML Schema fragment:
<xs:complexType name="Book">
<xs:sequence>
<xs:element name="author" type="xs:IDREF"/>
<!-- ... -->
</xs:sequence>
</xs:complexType>
<xs:complexType name="AuthorBio">
<xs:sequence><!-- ... --> </xs:sequence>
<xs:attribute name="name" type="xs:ID"/>
</xs:complexType>