Community
Participate
Working Groups
A common request from users is how to set a value based on the existence of an element/attribute (see link below). This enhancement request is for a solution to this problem. http://stackoverflow.com/questions/5969265/how-do-i-assign-a-boolean-value-based-on-the-existence-of-an-element-in-jaxb The initial proposal is to introduce 2 new annotations @XmlValueNode/@XmlValueNodes that map a value to the existence of an XML node. Example #1 @XmlValueNode(xpath="OPEN", value="true" public boolean isOpen() { return open } Example #2 @XmlValueNodes({ @XmlValueNode(xpath="green", value="GREEN"), @XmlValueNode(xpath="yellow", value="YELLOW"), @XmlValueNode(xpath="red", value="RED") }) public TrafficLightEnum getLightColour() { return lightColour; }
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink