users@jaxb.java.net

Interfaces generation for Element containing embedded definition of complexType

From: Brandon Franklin <brandon_at_thoughtriver.com>
Date: Thu, 31 Jul 2003 01:38:12 +0930

Put in the most simple terms, the reason for this is that one of them is the
actual "type" definition (the #1 you included--called EType for that reason)
and the other is the Element definition...Which can be thought of as a sort
of "implementation" of the type. Think of an Element as a concrete version
of the type. Therefore, the two are not actually the same thing.

It would be analagous to having a DataType with an associated DataImpl. In
Java terms, both of these are Interfaces, but thought of from the standpoint
of metadata (schema), there is an additional layer of abstraction.

-Brandon
 Thought River South

----- Original Message -----
From: "Manish Sethi" <msethi_at_noida.manystreams.com>
To: <JAXB-INTEREST_at_ARCHIVES.JAVA.SUN.COM>
Sent: Friday, July 18, 2003 2:10 PM
Subject: Re: Interfaces generation for Element containing embedded
definition of complexType


> Hi,
>
> I posted this sometime back but didn't get any reply.
>
> May be it's too stupid question to be answered but again I would
appreciate
> if someone can take time to shed some light on this.
>
> Thanks,
> Manish
>
>
> > -----Original Message-----
> > From: Discussion list for the Java Architecture for XML Binding
> > [mailto:JAXB-INTEREST_at_JAVA.SUN.COM]On Behalf Of Manish Sethi
> > Sent: Sunday, July 20, 2003 4:02 PM
> > To: JAXB-INTEREST_at_JAVA.SUN.COM
> > Subject: Interfaces generation for Element containing embedded
> > definition of complexType
> >
> >
> > Hi,
> >
> > If an element is of complexType and the definition of complex type is
> > defined within that element e.g.
> >
> > <element name="E">
> > <complexType>
> > <sequence>
> > <element name="E1"/>
> > <element name="E2"/>
> > </sequence>
> > </complexType>
> > </element>
> >
> > JAXB-RI compiler generates following two interfaces
> >
> > 1) public interface EType
> > 2) public interface E extends javax.xml.bind.Element,
> > com.test.testschema.EType
> >
> > I understand it may be useful in some cases. But In some cases
> > (And I guess
> > in most of the cases) I would not like to have both interfaces.
> > In a way it
> > will just increase the number of generated interfaces which looks
> > cumbersome
> > and becomes unmanageable.
> >
> > IMO there shd be a way in customization by which I can generate only one
> > interface for element (i.e. E) that is complete in it's own.
> >
> > May be it's already there and I couldn't notice it. Any
> > help/feedback wud be
> > appreciated.
> >
> >
> > Thanks,
> > Manish
> >
>


/**
 * There are only 10 types of people, those who understand binary and those
who don't!
 */

---- BEGIN SSH2 PUBLIC KEY ----
Comment: "rsa-key-20030408"
AAAAB3NzaC1yc2EAAAABJQAAAIB1Oya5y2gACM7mQX/OWRlaLLstK27x8rTG8+Cu
kXNPCt163dNGYP1OcBhNlMtexN6eVat/L0D1/yMgc5ezYGz5Znqu8tvNUbsDXRdb
MlV7tvohb1wk8qIFx33bAJb3VjGt+4qRgmOkxMqCJvrSwBjiQ06pFsLDFW2BF8mF
8K0/qQ==
---- END SSH2 PUBLIC KEY ----