Annotation Type HasCardinality

    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      String description
      An optional description of the constraint.
      String formalName
      An optional formal name for the constraint.
      String id
      An optional identifier for the constraint, which must be unique to only this constraint.
      IConstraint.Level level
      The significance of a violation of this constraint.
      int maxOccurs
      The maximum occurrence of the target.
      String message
      The message to emit when the constraint is violated.
      int minOccurs
      The minimum occurrence of the target.
      Property[] properties
      An optional set of properties associated with these allowed values.
      String remarks
      Any remarks about the constraint, encoded as an escaped Markdown string.
      String target
      An optional metapath that points to the target flag or field value that the constraint applies to.
    • Element Detail

      • id

        @NonNull
        String id
        An optional identifier for the constraint, which must be unique to only this constraint.
        Returns:
        the identifier if provided or an empty string otherwise
        Default:
        ""
      • formalName

        @NonNull
        String formalName
        An optional formal name for the constraint.
        Returns:
        the formal name if provided or an empty string otherwise
        Default:
        ""
      • description

        @NonNull
        String description
        An optional description of the constraint.
        Returns:
        the description if provided or an empty string otherwise
        Default:
        ""
      • level

        @NonNull
        IConstraint.Level level
        The significance of a violation of this constraint.
        Returns:
        the level
        Default:
        gov.nist.secauto.metaschema.core.model.constraint.IConstraint.Level.ERROR
      • target

        @NonNull
        String target
        An optional metapath that points to the target flag or field value that the constraint applies to. If omitted the target will be ".", which means the target is the value of the BoundFlag, BoundField or MetaschemaFieldValue annotation the constraint appears on. In the prior case, this annotation may only appear on a BoundField if the field has no flags, which results in a BoundField annotation on a field instance with a scalar, data type value.
        Returns:
        the target metapath
        Default:
        "."
      • properties

        Property[] properties
        An optional set of properties associated with these allowed values.
        Returns:
        the properties or an empty array with no properties
        Default:
        {}
      • minOccurs

        int minOccurs
        The minimum occurrence of the target. This value cannot be less than or equal to the corresponding value defined on the target. The value must be greater than 0.
        Returns:
        a non-negative integer or -1 if not defined
        Default:
        -1
      • maxOccurs

        int maxOccurs
        The maximum occurrence of the target. This value must be greater than or equal to the minOccurs() if both are provided. This value must be less than the corresponding value defined on the target.
        Returns:
        a non-negative integer or -1 if not defined
        Default:
        -1
      • message

        @NonNull
        String message
        The message to emit when the constraint is violated.
        Returns:
        the message or an empty string otherwise
        Default:
        ""
      • remarks

        @NonNull
        String remarks
        Any remarks about the constraint, encoded as an escaped Markdown string.
        Returns:
        an encoded markdown string or an empty string if no remarks are provided
        Default:
        ""