background image

JavaBeans Multi-Valued Property

<< Wrapper Element | JAXB Examples >>
<< Wrapper Element | JAXB Examples >>

JavaBeans Multi-Valued Property

TABLE 17­6
JAXB Annotations Associated with Java Properties and Fields
(Continued)
Annotation
Description and Default Setting
@XmlMixed
Marks a JavaBeans multi-valued property to support mixed content. Default
Settings:
None
@XmlMimeType
Associates the MIME type that controls the XML representation of the property.
Default Settings:
None
@XmlAttachmentRef
Marks a field/property that its XML form is a URI reference to mime content.
Default Settings:
None
@XmlInlineBinaryData
Disables consideration of XOP encoding for data types that are bound to
base64-encoded binary data in XML. Default Settings:
None
Table 17­7
summarizes the JAXB annotation that can be used with object factories.
TABLE 17­7
JAXB Annotations Associated with Object Factories
Annotation
Description and Default Setting
@XmlElementDecl
Maps a factory method to an XML element. Default Settings:
@XmlElementDecl (
scope = GLOBAL.class,
namespace =
"##default",
substitutionHeadNamespace =
"##default",
substitutionHeadName =
""
)
Table 17­8
summarizes JAXB annotations that can be used with adapters.
TABLE 17­8
JAXB Annotations Associated with Adapters
Annotation
Description and Default Setting
@XmlJavaTypeAdapter
Use the adapter that implements the @XmlAdapter annotation for custom
marshalling. Default Settings:
@XmlJavaTypeAdapter ( type = DEFAULT.class )
Customizing Generated Classes and Java Program Elements
The Java EE 5 Tutorial · September 2007
500