Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Editing Dali Project/FeatureDocs/Indigo/JAXB/AttributeAnnotations
Contents
Functional Specification: JAXB Attribute Annotations
[enter bug location here]
Document History
Date | Author | Version Description & Notes |
---|---|---|
10-11-2010 | Paul Fullbright | Draft |
Feature overview
This feature is about support for JAXB attribute annotations
Goals:
- Support JAXB attribute level annotations and default values
- @XmlElement/Elements
- @XmlElementRef/Refs
- @XmlElementWrapper
- @XmlAnyElement
- @XmlAttribute
- @XmlAnyAttribute
- @XmlTransient
- @XmlValue
- @XmlID
- @XmlIDRef
- @XmlList
- @XmlMixed
- @XmlMimeType
- @XmlAttachmentRef
- @XmlInlineBinaryData
- @XmlJavaTypeAdapter
Concepts
Attribute annotations are supported on JAXB fields and Java bean style properties. Unless @XmlTransient is present, all fields/properties that fulfill the type's access type are considered mapped JAXB attributes.
Requirements / Functionality
@XmlElement/Elements
@XmlElement is used on an attribute to indicate that it is mapped to an XML element or element ref. If there is not another mapping annotation on a legitimate JAXB attribute, and:
- the attribute is single valued - @XmlElement is assumed
- the attribute has a collection type - @XmlElements({ @XmlElement(nillable=true) }) is assumed
- the attribute has a collection type and has the @XmlList annotation - @XmlElement is assumed
- name - String; name of the XML element this attribute is mapped to; default value is based on the name of the attribute
- namespace - String;
Code Completion
Code completion should be implemented where feasible to help users with values.