Interface AttributeProperty

  • All Superinterfaces:
    org.gcube.informationsystem.base.reference.Attribute, org.gcube.informationsystem.base.reference.AttributeDefinition, org.gcube.informationsystem.base.reference.Element, GCubeProperty, org.gcube.informationsystem.model.reference.ModelElement, org.gcube.informationsystem.model.reference.properties.Property, org.gcube.informationsystem.base.reference.properties.PropertyElement, org.gcube.informationsystem.base.reference.SchemaMixedElement, Serializable
    All Known Implementing Classes:
    AttributePropertyImpl

    @TypeMetadata(name="AttributeProperty",
                  description="AttributeProperty describes a single named attribute, i.e., its name, description, mandatory constraint, min/max value bounds, validation regex, expected property type, and default value, to be instantiated by a [TemplateFacet](type:TemplateFacet).",
                  version="2.0.0")
    @Change(version="2.0.0",description="Removed \'notnull\': a null value means the same as an absent one, and \'mandatory\' means present with a real value. \'min\' and \'max\' are optional; \'regexp\' is always present, empty for no pattern.") @Change(version="1.0.0",description="First Version")
    public interface AttributeProperty
    extends GCubeProperty, org.gcube.informationsystem.base.reference.AttributeDefinition
    AttributeProperty describes a single named attribute — its name, description, mandatory constraint, min/max value bounds, validation regex, expected property type, and default value — to be instantiated by a TemplateFacet.
    Author:
    Luca Frosini (ISTI - CNR)
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static String NAME
      The name associated with this property
      static String VERSION  
      • Fields inherited from interface org.gcube.informationsystem.base.reference.Attribute

        DEFAULT_VALUE_PROPERTY, DESCRIPTION_PROPERTY, MAX_PROPERTY, MIN_PROPERTY, NAME_PROPERTY, PROPERTY_TYPE_PROPERTY, REGEX_PROPERTY
      • Fields inherited from interface org.gcube.informationsystem.base.reference.AttributeDefinition

        MANDATORY_PROPERTY
      • Fields inherited from interface org.gcube.informationsystem.base.reference.Element

        DATETIME_PATTERN, REDACTED, TYPE_PROPERTY, UNKNOWN_USER
      • Fields inherited from interface org.gcube.informationsystem.model.reference.ModelElement

        EXPECTED_TYPE_PROPERTY, SUPERTYPES_PROPERTY
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      static AttributeProperty getDefaultInstance()
      Returns a default instance of AttributeProperty
      Object getDefaultValue()
      String getDescription()
      Integer getMax()
      Integer getMin()
      String getName()
      String getPropertyType()
      String getRegexp()
      boolean isMandatory()
      • Methods inherited from interface org.gcube.informationsystem.base.reference.Attribute

        getPropertyTypeName, setDefaultValue, setDescription, setMax, setMin, setName, setPropertyType, setRegexp
      • Methods inherited from interface org.gcube.informationsystem.base.reference.AttributeDefinition

        setMandatory
      • Methods inherited from interface org.gcube.informationsystem.base.reference.Element

        getTypeName
      • Methods inherited from interface org.gcube.informationsystem.model.reference.ModelElement

        getExpectedType, getSupertypes
      • Methods inherited from interface org.gcube.informationsystem.model.reference.properties.Property

        getAdditionalProperties, getAdditionalProperty, setAdditionalProperties, setAdditionalProperty
    • Method Detail

      • getDefaultInstance

        static AttributeProperty getDefaultInstance()
        Returns a default instance of AttributeProperty
        Returns:
        a default instance of AttributeProperty
      • getName

        @ISProperty(name="name",
                    description="The name of the attribute property.",
                    readonly=true,
                    mandatory=true)
        String getName()
        Specified by:
        getName in interface org.gcube.informationsystem.base.reference.Attribute
      • getDescription

        @ISProperty(name="description",
                    description="A human-oriented description of the attribute.",
                    readonly=false,
                    mandatory=true)
        String getDescription()
        Specified by:
        getDescription in interface org.gcube.informationsystem.base.reference.Attribute
      • isMandatory

        @ISProperty(name="mandatory",
                    description="Whether the attribute is mandatory.",
                    readonly=false,
                    mandatory=true,
                    defaultValue="false")
        boolean isMandatory()
        Specified by:
        isMandatory in interface org.gcube.informationsystem.base.reference.AttributeDefinition
      • getMax

        @ISProperty(name="max",
                    description="The maximum allowed value for the attribute, if any.",
                    readonly=false,
                    mandatory=false)
        Integer getMax()
        Specified by:
        getMax in interface org.gcube.informationsystem.base.reference.Attribute
      • getMin

        @ISProperty(name="min",
                    description="The minimum allowed value for the attribute, if any.",
                    readonly=false,
                    mandatory=false)
        Integer getMin()
        Specified by:
        getMin in interface org.gcube.informationsystem.base.reference.Attribute
      • getRegexp

        @ISProperty(name="regexp",
                    description="The regular expression used to validate the attribute\'s value, empty for none.",
                    readonly=false,
                    mandatory=true,
                    defaultValue="")
        String getRegexp()
        Specified by:
        getRegexp in interface org.gcube.informationsystem.base.reference.Attribute
      • getPropertyType

        @ISProperty(name="propertyType",
                    description="The expected property type of the attribute, expressed as a string.",
                    readonly=false,
                    mandatory=true)
        String getPropertyType()
        Specified by:
        getPropertyType in interface org.gcube.informationsystem.base.reference.Attribute
      • getDefaultValue

        @ISProperty(name="defaultValue",
                    description="The default value of the attribute, if any.",
                    readonly=false,
                    mandatory=false)
        Object getDefaultValue()
        Specified by:
        getDefaultValue in interface org.gcube.informationsystem.base.reference.Attribute