Interface AttributeDefinition
-
- All Superinterfaces:
Attribute
- All Known Subinterfaces:
PropertyDefinition
- All Known Implementing Classes:
PropertyDefinitionImpl
public interface AttributeDefinition extends Attribute
Extends theAttributeinterface 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
nullvalue means the same as an absent one.- Author:
- Luca Frosini (ISTI - CNR)
- See Also:
Attribute
-
-
Field Summary
Fields Modifier and Type Field Description static StringMANDATORY_PROPERTYThe property name for the 'mandatory' flag.-
Fields 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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanisMandatory()Checks 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 Detail
-
MANDATORY_PROPERTY
static final String MANDATORY_PROPERTY
The property name for the 'mandatory' flag.- See Also:
- Constant Field Values
-
-
Method Detail
-
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.
-
-