Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 326720

Summary: Reference mappings for generic JAXB to support validation
Product: [WebTools] Dali JPA Tools Reporter: Neil Hauge <neil.hauge>
Component: JAXBAssignee: Karen Butzke <karenfbutzke>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: karenfbutzke
Version: 3.0Keywords: plan
Target Milestone: 3.0 M6   
Hardware: PC   
OS: Windows 7   
Whiteboard: JAXB

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.