Interface EnumStringProperty
-
- All Superinterfaces:
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,TypedProperty<Set<String>,String>,ValidatedTypedProperty<Set<String>,String>
- All Known Implementing Classes:
EnumStringPropertyImpl
@TypeMetadata(name="EnumStringProperty", description="EnumStringProperty is a string property validated against a set of accepted values.", version="1.1.0") @Change(version="1.1.0",description="Declared the \'value\' and \'schema\' properties.") @Change(version="1.0.0",description="First Version") public interface EnumStringProperty extends GCubeProperty, ValidatedTypedProperty<Set<String>,String>EnumStringProperty is a string property validated against a set of accepted values.- Author:
- Manuele Simi (ISTI - CNR), Luca Frosini (ISTI - CNR)
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classEnumStringProperty.SetStringValidatorValidator forValueSchemaproperties.
-
Field Summary
Fields Modifier and Type Field Description static StringNAMEThe name associated with this propertystatic StringVERSIONThe version of this type definition.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static EnumStringPropertygetDefaultInstance()Returns a default instance of EnumStringPropertySet<String>getSchema()Gets the schema of the property.StringgetValue()Gets the value of the property.voidsetSchema(Set<String> schema)Sets the schema of the property.voidsetValue(String value)Sets the value of the property.default Validationvalidate()Applies this validation to the property.
-
-
-
Field Detail
-
NAME
static final String NAME
The name associated with this property- See Also:
- Constant Field Values
-
VERSION
static final String VERSION
The version of this type definition.- See Also:
- Constant Field Values
-
-
Method Detail
-
getValue
@ISProperty(description="The value to be validated against the accepted values.") String getValue()
Gets the value of the property.- Specified by:
getValuein interfaceTypedProperty<Set<String>,String>- Returns:
- the value
-
setValue
void setValue(String value)
Sets the value of the property.- Specified by:
setValuein interfaceTypedProperty<Set<String>,String>- Parameters:
value- the new value
-
getSchema
@ISProperty(description="The accepted values.") Set<String> getSchema()
Gets the schema of the property.- Specified by:
getSchemain interfaceTypedProperty<Set<String>,String>- Returns:
- the schema
-
setSchema
void setSchema(Set<String> schema)
Sets the schema of the property.- Specified by:
setSchemain interfaceTypedProperty<Set<String>,String>- Parameters:
schema- the new schema
-
getDefaultInstance
static EnumStringProperty getDefaultInstance()
Returns a default instance of EnumStringProperty- Returns:
- a default instance of EnumStringProperty
-
validate
default Validation validate()
Applies this validation to the property.- Specified by:
validatein interfaceValidatedTypedProperty<Set<String>,String>- Returns:
- the validation result
-
-