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 for this element.

For JSON and YAML serializations, the useName() identifies the property/item name to use.

The field must be either:

  1. A Module data type or a collection whose item value is Module data type, with a non-null typeAdapter().
  2. A type or a collection whose item value is a type based on a class with a MetaschemaField annotation, with a property annotated with BoundFieldValue.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The 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.
    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

      @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

      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"
    • useIndex

      The 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

      @NonNull Class<? extends IDataTypeAdapter<?>> 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 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, or false otherwise
      Default:
      true
    • minOccurs

      A non-negative number that indicates the minimum occurrence of the model instance.
      Returns:
      a non-negative number
      Default:
      0
    • maxOccurs

      A number that indicates the maximum occurrence of the model instance.
      Returns:
      a positive number or -1 to indicate "unbounded"
      Default:
      1
    • remarks

      @NonNull String remarks
      Get any remarks for this field.
      Returns:
      a markdown string or "##none" if no remarks are provided
      Default:
      "##none"
    • groupAs

      @NonNull GroupAs 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 a null 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