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
BoundFieldValueannotation on the field. - A type or a collection whose item value is a type based on a class with a
MetaschemaFieldannotation.
- 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 StringdescriptionGet the documentary description of the field.StringformalNameGet the documentary formal name of the field.booleaninXmlWrappedIf the data type allows it, determines if the field's value must be wrapped with an XML element.intmaxOccursA number that indicates the maximum occurrence of the model instance.intminOccursA non-negative number that indicates the minimum occurrence of the model instance.StringnamespaceThe namespace to use for associated XML elements.StringremarksGet any remarks for this field.StringuseNameThe 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
MetaschemaFieldannotation.- 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:
trueif the field must be wrapped, orfalseotherwise
- 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
-1to indicate "unbounded"
- Default:
- 1
-
-