Interface AttributeDefinition

All Superinterfaces:
Attribute
All Known Subinterfaces:
PropertyDefinition
All Known Implementing Classes:
PropertyDefinitionImpl

public interface AttributeDefinition extends Attribute
Extends the Attribute interface to include properties that define its requirement constraints.

This interface adds the flag specifying whether an attribute is mandatory: present, with a real value. A null value means the same as an absent one.

Author:
Luca Frosini (ISTI - CNR)
See Also:
  • Field Details

    • MANDATORY_PROPERTY

      static final String MANDATORY_PROPERTY
      The property name for the 'mandatory' flag.
      See Also:
  • Method Details

    • isMandatory

      boolean isMandatory()
      Checks if the attribute is mandatory.
      Returns:
      true if the attribute is mandatory, false otherwise.
    • setMandatory

      void setMandatory(boolean mandatory)
      Sets whether the attribute is mandatory.
      Parameters:
      mandatory - true to make the attribute mandatory, false otherwise.