Interface AttributeDefinition
- All Superinterfaces:
Attribute
- All Known Subinterfaces:
PropertyDefinition
- All Known Implementing Classes:
PropertyDefinitionImpl
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 Summary
FieldsFields inherited from interface org.gcube.informationsystem.base.reference.Attribute
DEFAULT_VALUE_PROPERTY, DESCRIPTION_PROPERTY, MAX_PROPERTY, MIN_PROPERTY, NAME, NAME_PROPERTY, PROPERTY_TYPE_PROPERTY, REGEX_PROPERTY -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks if the attribute is mandatory.voidsetMandatory(boolean mandatory) Sets whether the attribute is mandatory.Methods inherited from interface org.gcube.informationsystem.base.reference.Attribute
getDefaultValue, getDescription, getMax, getMin, getName, getPropertyType, getPropertyTypeName, getRegexp, setDefaultValue, setDescription, setMax, setMin, setName, setPropertyType, setRegexp
-
Field Details
-
MANDATORY_PROPERTY
The property name for the 'mandatory' flag.- See Also:
-
-
Method Details
-
isMandatory
boolean isMandatory()Checks if the attribute is mandatory.- Returns:
trueif the attribute is mandatory,falseotherwise.
-
setMandatory
void setMandatory(boolean mandatory) Sets whether the attribute is mandatory.- Parameters:
mandatory-trueto make the attribute mandatory,falseotherwise.
-