Interface Attribute

  • All Known Subinterfaces:
    AttributeDefinition, PropertyDefinition, TemplateVariable
    All Known Implementing Classes:
    PropertyDefinitionImpl, TemplateVariableImpl

    public interface Attribute
    Defines the contract for an attribute, which represents a characteristic of an entity or property.

    An attribute has a name, description, type, and optional constraints such as minimum/maximum values and a regular expression for validation. It can also _ * have a default value.

    Author:
    Luca Frosini (ISTI - CNR)
    • Method Detail

      • getName

        String getName()
        Returns the name of the attribute.
        Returns:
        The attribute's name.
      • setName

        void setName​(String name)
        Sets the name of the attribute.
        Parameters:
        name - The name to set.
      • getDescription

        String getDescription()
        Returns the description of the attribute.
        Returns:
        The attribute's description.
      • setDescription

        void setDescription​(String description)
        Sets the description of the attribute.
        Parameters:
        description - The description to set.
      • getPropertyType

        String getPropertyType()
        Returns the property type of the attribute as a string.
        Returns:
        The property type.
      • setPropertyType

        void setPropertyType​(String type)
        Sets the property type of the attribute.
        Parameters:
        type - The property type to set.
      • getDefaultValue

        Object getDefaultValue()
        Returns the default value of the attribute.
        Returns:
        The default value.
      • setDefaultValue

        void setDefaultValue​(Object defaultValue)
        Sets the default value of the attribute.
        Parameters:
        defaultValue - The default value to set.
      • getMax

        Integer getMax()
        Returns the maximum allowed value for the attribute.
        Returns:
        The maximum value, or null if not set.
      • setMax

        void setMax​(Integer max)
        Sets the maximum allowed value for the attribute.
        Parameters:
        max - The maximum value to set.
      • getMin

        Integer getMin()
        Returns the minimum allowed value for the attribute.
        Returns:
        The minimum value, or null if not set.
      • setMin

        void setMin​(Integer min)
        Sets the minimum allowed value for the attribute.
        Parameters:
        min - The minimum value to set.
      • getRegexp

        String getRegexp()
        Returns the regular expression used to validate the attribute's value.
        Returns:
        The regular expression, or null if not set.
      • setRegexp

        void setRegexp​(String regexp)
        Sets the regular expression for validating the attribute's value.
        Parameters:
        regexp - The regular expression to set.