10.12.2012 Views

The Java EE 5 Tutorial (PDF) - Oracle Software Downloads

The Java EE 5 Tutorial (PDF) - Oracle Software Downloads

The Java EE 5 Tutorial (PDF) - Oracle Software Downloads

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

TABLE 17–6 JAXB Annotations Associated with <strong>Java</strong> Properties and Fields (Continued)<br />

Annotation Description and Default Setting<br />

@XmlElementWrapper Generates a wrapper element around an XML representation. Typically a wrapper<br />

XML element around collections. Default Settings:<br />

@XmlElementWrapper (<br />

name = "##default",<br />

namespace = "##default",<br />

nillable = false<br />

)<br />

@XmlAnyElement Maps a <strong>Java</strong>Beans property to an XML infoset representation and/or JAXB<br />

element. Default Settings:<br />

@XmlAnyElement (<br />

lax = false,<br />

value = W3CDomHandler.class<br />

)<br />

@XmlAttribute Maps a <strong>Java</strong>Beans property to an XML attribute. Default Settings:<br />

@XmlAttribute (<br />

name = ##default,<br />

required = false,<br />

namespace = "##default"<br />

)<br />

@XmlAnyAttribute Maps a <strong>Java</strong>Beans property to a map of wildcard attributes. Default Settings:<br />

None<br />

@XmlTransient Prevents the mapping of a <strong>Java</strong>Beans property to an XML representation. Default<br />

Settings:<br />

None<br />

@XmlValue Defines mapping of a class to an XML Schema complex type with a<br />

simpleContent or an XML Schema simple type. Default Settings:<br />

None<br />

@XmlID Maps a <strong>Java</strong>Beans property to an XML ID. Default Settings:<br />

None<br />

@XmlIDREF Maps a <strong>Java</strong>Beans property to an XML IDREF. Default Settings:<br />

None<br />

@XmlList Maps a property to a list simple type. Default Settings:<br />

None<br />

Customizing Generated Classes and <strong>Java</strong> Program Elements<br />

Chapter 17 • Binding between XML Schema and <strong>Java</strong> Classes 497

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!