Class TemplateVariableImpl
java.lang.Object
org.gcube.informationsystem.base.impl.ElementImpl
org.gcube.informationsystem.base.impl.properties.PropertyElementImpl
org.gcube.informationsystem.queries.templates.impl.properties.TemplateVariableImpl
- All Implemented Interfaces:
Serializable,Attribute,Element,PropertyElement,SchemaMixedElement,ModelElement,Property,TemplateVariable
The default implementation of the
TemplateVariable interface.- Author:
- Luca Frosini (ISTI - CNR)
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ObjectThe default value of the variable.protected StringThe description of the variable.protected StringThe name of the variable.Fields inherited from class org.gcube.informationsystem.base.impl.properties.PropertyElementImpl
additionalProperties, allowedAdditionalKeys, expectedtype, supertypesFields inherited from interface org.gcube.informationsystem.base.reference.Attribute
DEFAULT_VALUE_PROPERTY, DESCRIPTION_PROPERTY, MAX_PROPERTY, MIN_PROPERTY, NAME_PROPERTY, PROPERTY_TYPE_PROPERTY, REGEX_PROPERTYFields inherited from interface org.gcube.informationsystem.base.reference.Element
DATETIME_PATTERN, NAME, TYPE_PROPERTYFields inherited from interface org.gcube.informationsystem.model.reference.ModelElement
EXPECTED_TYPE_PROPERTY, SUPERTYPES_PROPERTYFields inherited from interface org.gcube.informationsystem.model.reference.properties.Property
NAMEFields inherited from interface org.gcube.informationsystem.queries.templates.reference.properties.TemplateVariable
NAME, VERSION -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the default value of the attribute.Returns the description of the attribute.getMax()Returns the maximum allowed value for the attribute.getMin()Returns the minimum allowed value for the attribute.getName()Returns the name of the attribute.Returns the property type of the attribute as a string.Gets the property type name.Returns the regular expression used to validate the attribute's value.voidsetDefaultValue(Object defaultValue) Sets the default value of the attribute.voidsetDescription(String description) Sets the description of the attribute.voidSets the maximum allowed value for the attribute.voidSets the minimum allowed value for the attribute.voidSets the name of the attribute.voidsetPropertyType(String type) Sets the property type.voidSets the regular expression for validating the attribute's value.toString()Returns a JSON representation of the element.Methods inherited from class org.gcube.informationsystem.base.impl.properties.PropertyElementImpl
addAllowedAdditionalKey, getAdditionalProperties, getAdditionalProperty, getExpectedtype, getSupertypes, setAdditionalProperties, setAdditionalPropertyMethods inherited from class org.gcube.informationsystem.base.impl.ElementImpl
getTypeNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.gcube.informationsystem.base.reference.Element
getTypeName
-
Field Details
-
name
The name of the variable. -
description
The description of the variable. -
defaultValue
The default value of the variable.
-
-
Constructor Details
-
TemplateVariableImpl
public TemplateVariableImpl()Default constructor.
-
-
Method Details
-
getName
Returns the name of the attribute.- Specified by:
getNamein interfaceAttribute- Specified by:
getNamein interfaceTemplateVariable- Returns:
- The attribute's name.
-
setName
Sets the name of the attribute. -
getDescription
Returns the description of the attribute.- Specified by:
getDescriptionin interfaceAttribute- Specified by:
getDescriptionin interfaceTemplateVariable- Returns:
- The attribute's description.
-
setDescription
Sets the description of the attribute.- Specified by:
setDescriptionin interfaceAttribute- Parameters:
description- The description to set.
-
getMax
Returns the maximum allowed value for the attribute.- Specified by:
getMaxin interfaceAttribute- Specified by:
getMaxin interfaceTemplateVariable- Returns:
- The maximum value, or
nullif not set.
-
setMax
Sets the maximum allowed value for the attribute. -
getMin
Returns the minimum allowed value for the attribute.- Specified by:
getMinin interfaceAttribute- Specified by:
getMinin interfaceTemplateVariable- Returns:
- The minimum value, or
nullif not set.
-
setMin
Sets the minimum allowed value for the attribute. -
getRegexp
Returns the regular expression used to validate the attribute's value.- Specified by:
getRegexpin interfaceAttribute- Specified by:
getRegexpin interfaceTemplateVariable- Returns:
- The regular expression, or
nullif not set.
-
setRegexp
Sets the regular expression for validating the attribute's value. -
getPropertyType
Returns the property type of the attribute as a string.- Specified by:
getPropertyTypein interfaceAttribute- Specified by:
getPropertyTypein interfaceTemplateVariable- Returns:
- The property type.
-
setPropertyType
Sets the property type.- Specified by:
setPropertyTypein interfaceAttribute- Parameters:
type- the type
-
getPropertyTypeName
Gets the property type name.- Specified by:
getPropertyTypeNamein interfaceAttribute- Returns:
- the property type name
-
getDefaultValue
Returns the default value of the attribute.- Specified by:
getDefaultValuein interfaceAttribute- Specified by:
getDefaultValuein interfaceTemplateVariable- Returns:
- The default value.
-
setDefaultValue
Sets the default value of the attribute.- Specified by:
setDefaultValuein interfaceAttribute- Parameters:
defaultValue- The default value to set.
-
toString
Returns a JSON representation of the element.- Overrides:
toStringin classElementImpl- Returns:
- The JSON string representation of the object.
-