background image

globalBindings Declarations

<< Customizing JAXB Bindings | Schema Binding Declarations >>
<< Customizing JAXB Bindings | Schema Binding Declarations >>

globalBindings Declarations

<globalBindings>
[ collectionType =
"collectionType" ]
[ fixedAttributeAsConstantProperty
=
"true" | "false" | "1" | "0" ]
[ generateIsSetMethod
=
"true" | "false" | "1" | "0" ]
[ enableFailFastCheck =
"true" | "false" | "1" | "0" ]
[ choiceContentProperty =
"true" | "false" | "1" | "0" ]
[ underscoreBinding =
"asWordSeparator" | "asCharInWord" ]
[ typesafeEnumBase =
"typesafeEnumBase" ]
[ typesafeEnumMemberName =
"generateName" | "generateError" ]
[ enableJavaNamingConventions =
"true" | "false" | "1" | "0" ]
[ bindingStyle =
"elementBinding" | "modelGroupBinding" ]
[ <javaType> ... </javaType> ]*
</globalBindings>
collectionType
can be either indexed or any fully qualified class name that implements
java.util.List
.
fixedAttributeAsConstantProperty
can be either true, false, 1, or 0. The default value
is false.
generateIsSetMethod
can be either true, false, 1, or 0. The default value is false.
enableFailFastCheck
can be either true, false, 1, or 0. If enableFailFastCheck is true
or 1 and the JAXB implementation supports this optional checking, type constraint
checking is performed when setting a property. The default value is false. Please note that
the JAXB implementation does not support failfast validation.
choiceContentProperty
can be either true, false, 1, or 0. The default value is false.
choiceContentProperty
is not relevant when the bindingStyle is elementBinding.
Therefore, if bindingStyle is specified as elementBinding, then the
choiceContentProperty
must result in an invalid customization.
underscoreBinding
can be either asWordSeparator or asCharInWord. The default value is
asWordSeparator
.
typesafeEnumBase
can be a list of QNames, each of which must resolve to a simple type
definition. The default value is xs:NCName. See
"Typesafe Enumeration Binding
Declarations" on page 524
for information about localized mapping of simpleType
definitions to Java typesafe enum classes.
typesafeEnumMemberName
can be either generateError or generateName. The default
value is generateError.
enableJavaNamingConventions
can be either true, false, 1, or 0. The default value is true.
bindingStyle
can be either elementBinding, or modelGroupBinding. The default value is
elementBinding
.
<javaType>
can be zero or more javaType binding declarations. For more information, see
"javaType Binding Declarations" on page 523
.
<globalBindings>
declarations are only valid in the annotation element of the top-level
schema
element. There can only be a single instance of a <globalBindings> declaration in any
Customizing JAXB Bindings
The Java EE 5 Tutorial · September 2007
520