Annotation Type BoundField
-
@Documented @Retention(RUNTIME) @Target(FIELD) public @interface BoundField
Identifies that the annotation target is a bound property that references a Module field.For XML serialization, the
useName()
identifies the name of the element to use and thenamespace()
identifies the namespace of this element.For JSON and YAML serializations, the
useName()
identifies the property/item name to use.The field must be either:
- A Module data type or a collection whose item value is Module data type,
with a
BoundFieldValue
annotation on the field. - A type or a collection whose item value is a type based on a class with a
MetaschemaField
annotation.
- A Module data type or a collection whose item value is Module data type,
with a
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description String
description
Get the documentary description of the field.String
formalName
Get the documentary formal name of the field.boolean
inXmlWrapped
If the data type allows it, determines if the field's value must be wrapped with an XML element.int
maxOccurs
A number that indicates the maximum occurrence of the model instance.int
minOccurs
A non-negative number that indicates the minimum occurrence of the model instance.String
namespace
The namespace to use for associated XML elements.String
remarks
Get any remarks for this field.String
useName
The model name to use for JSON/YAML singleton values and associated XML elements.
-
-
-
Element Detail
-
formalName
@NonNull String formalName
Get the documentary formal name of the field.If the value is "##none", then the description will be considered
null
.- Returns:
- a markdown string or
"##none"
if no formal name is provided
- Default:
- "##none"
-
-
-
description
@NonNull String description
Get the documentary description of the field.If the value is "##none", then the description will be considered
null
.- Returns:
- a markdown string or
"##none"
if no description is provided
- Default:
- "##none"
-
-
-
useName
@NonNull String useName
The model name to use for JSON/YAML singleton values and associated XML elements.If the value is "##none", then the use name will be provided by the definition or by the field name if the item value class is missing the
MetaschemaField
annotation.- Returns:
- the name
- Default:
- "##none"
-
-
-
inXmlWrapped
boolean inXmlWrapped
If the data type allows it, determines if the field's value must be wrapped with an XML element.- Returns:
true
if the field must be wrapped, orfalse
otherwise
- Default:
- true
-
-
-
minOccurs
int minOccurs
A non-negative number that indicates the minimum occurrence of the model instance.- Returns:
- a non-negative number
- Default:
- 0
-
-
-
maxOccurs
int maxOccurs
A number that indicates the maximum occurrence of the model instance.- Returns:
- a positive number or
-1
to indicate "unbounded"
- Default:
- 1
-
-