Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 326720 - Reference mappings for generic JAXB to support validation
Summary: Reference mappings for generic JAXB to support validation
Status: RESOLVED FIXED
Alias: None
Product: Dali JPA Tools
Classification: WebTools
Component: JAXB (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 7
: P3 enhancement (vote)
Target Milestone: 3.0 M6   Edit
Assignee: Karen Butzke CLA
QA Contact:
URL:
Whiteboard: JAXB
Keywords: plan
Depends on:
Blocks:
 
Reported: 2010-09-30 17:18 EDT by Neil Hauge CLA
Modified: 2011-03-02 14:39 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Neil Hauge CLA 2010-09-30 17:18:54 EDT
This enhancement covers context model for the generic JAXB reference mappings, specifically:

XmlID
XmlIDREF

See http://wiki.eclipse.org/EclipseLink/DesignDocs/277920/Phase5 for detailed info and examples for these annotations.

Context model should include standard state and behavior required for validation purposes.
Comment 1 Karen Butzke CLA 2011-03-02 13:19:28 EST
Also add support for @XmlAttachmentRef annotation on XmlElement and XmlAttribute mappings
Comment 2 Karen Butzke CLA 2011-03-02 14:39:50 EST
Added @XmlID support to XmlElement and XmlAttribute mappings. Validation:
1. XmlID on a field/property that is not a String: XmlID is only allowed on a java.lang.String property
2. Multiple XmlIDs on 1 class: Attribute "<name>" cannot have an XmlID because attribute "<name>" already has an XmlID, cannot define multiple mappings with XmlID

Added @XmlIDREF support to XmlElement and XmlAttribute mappings. Validation:
1. If the type of the attribute is Object, no validation. Otherwise the type or the Collection item type for Collections must include a property or field annotated with XmlId:  Attribute "<name>" is an XmlIDREF, type "<name>" must contain a property or field annotated with @XmlId.

Also added @XmlAttachmentRef support to XmlElement and XmlAttribute mappings. No corresponding validation yet.