You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jaxme-dev@ws.apache.org by Colin Bendell <cb...@point2.com> on 2004/01/21 19:56:26 UTC

clarification

Could someone clarify for me what Attributes, Particles, and Properties
(found in the jaxme SG) refer to in terms of the schema?  Do Attributes
map to the xsd:attributes elements or are they attributes on the
element? 

Thanks
/colin

Re: clarification

Posted by Jochen Wiedmann <jo...@ispsoft.de>.
Hi, Colin,

Colin Bendell wrote:

> Could someone clarify for me what Attributes, Particles, and Properties 
> (found in the jaxme SG) refer to in terms of the schema?  Do Attributes 
> map to the xsd:attributes elements or are they attributes on the element?

good question. In other words: I am unable to give a good answer. ;-)

The object model, as we have it, is still not satisfying, at least not for
me. Much of this arives from the fact that parts are dictated from XML
Schema, other parts are dictated from JAXB and these parts do not fit
together very well. For example, the JAXB objects typically have a
different scope than the XML Schema objects do. :-(

My view of the objects is as follows:

* A particle is the same thing as in the schema of XML Schema (see the
   JavaDocs of XsGNestedParticle). It may be defined from the group:
   A group is an ordered set of particles. If the group is a sequence,
   then the particles must (minOccurs=1) or may (minOccurs=0) in that
   order.

   A particle may be an element, a wildcard element or an embedded
   group. In JaxMe any complex type with complex content does have
   a single particle, typically of group type. This is not required.
   It only serves the purpose of canonicalization: It is simpler to
   assume that the particle is there than to check whether it is
   there or not and if not, access the embedded group directly.

   The particle is also the entity having a multiplicity. In other
   words: It does have a "minOccurs" and "maxOccurs" attribute.

   Unfortunately that is not the whole story: In case of nested groups,
   the particle may also be embedded in a group, which is modelled as
   a class.

* The property is unknown to XML Schema. It is a concept specified
   by JAXB. Having a property can be viewed as "being embedded into
   a complex type". For example, the attribute has a property, as it
   is embedded into a complex type. The particle has a property,
   because it is embedded into a group or a complex type.

   The property is the thing which we may access via a "getFoo()" or
   "setFoo()" method. In terms of JAXB, it may be configured via an
   embedded jaxb:property element. However, depending on the
   property owner (attribute or particle), the return type of getFoo()
   may be *really* different.

* The attribute is something that may be embedded into a complex
   type: As such it does have a property. The best thing to view it
   is the combination of a particle and an element with simple type.


Sure I did case more confusion than providing explanation. Sorry!
Anyways: I am curious why you're asking?


Jochen

---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org