Annotation Type BoundField
For XML serialization, the useName()
identifies the name of the
element to use for 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 non-null
typeAdapter()
. - A type or a collection whose item value is a type based on a class with a
MetaschemaField
annotation, with a property annotated withBoundFieldValue
.
-
Optional Element Summary
Modifier and TypeOptional ElementDescriptionThe default value of the field represented as a string.Get the documentary description of the field.Get the documentary formal name of the field.Used to provide grouping information.boolean
If the data type allows it, determines if the field's value must be wrapped with an XML element.int
A number that indicates the maximum occurrence of the model instance.int
A non-negative number that indicates the minimum occurrence of the model instance.Property[]
An optional set of associated properties.Get any remarks for this field.Class<? extends IDataTypeAdapter<?>>
The Metaschema data type adapter for the field's value.int
The binary use name of the field.The model name to use for JSON/YAML singleton values and associated XML elements.Get the value constraints defined for this Metaschema field inline definition.
-
Element Details
-
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
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
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"
-
useIndex
int useIndexThe binary use name of the field.The value
Integer.MIN_VALUE
indicates that there is no use name.- Returns:
- the index value
- Default:
- -2147483648
-
typeAdapter
The Metaschema data type adapter for the field's value.- Returns:
- the data type adapter
- Default:
- gov.nist.secauto.metaschema.databind.model.annotations.NullJavaTypeAdapter.class
-
defaultValue
The default value of the field represented as a string.The value
ModelUtil.NULL_VALUE
is used to indicate if no default value is provided.- Returns:
- the default value
- Default:
- "\u0000"
-
inXmlWrapped
boolean inXmlWrappedIf 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 minOccursA non-negative number that indicates the minimum occurrence of the model instance.- Returns:
- a non-negative number
- Default:
- 0
-
maxOccurs
int maxOccursA number that indicates the maximum occurrence of the model instance.- Returns:
- a positive number or
-1
to indicate "unbounded"
- Default:
- 1
-
properties
An optional set of associated properties.- Returns:
- the properties or an empty array with no properties
- Default:
- {}
-
remarks
Get any remarks for this field.- Returns:
- a markdown string or
"##none"
if no remarks are provided
- Default:
- "##none"
-
groupAs
Used to provide grouping information.This annotation is required when the value of
maxOccurs()
is greater than 1.- Returns:
- the configured
GroupAs
or the default value with anull
GroupAs.name()
- Default:
- @gov.nist.secauto.metaschema.databind.model.annotations.GroupAs(name="\u0000")
-
valueConstraints
Get the value constraints defined for this Metaschema field inline definition.- Returns:
- the value constraints
- Default:
- @gov.nist.secauto.metaschema.databind.model.annotations.ValueConstraints
-