Package org.esa.snap.core.gpf.descriptor
Interface ParameterDescriptor
-
- All Superinterfaces:
DataElementDescriptor
,ElementDescriptor
- All Known Implementing Classes:
AnnotationParameterDescriptor
,DefaultParameterDescriptor
,TemplateParameterDescriptor
,ToolParameterDescriptor
public interface ParameterDescriptor extends DataElementDescriptor
Target parameter element metadata.- Since:
- BEAM 5
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
getCondition()
Gets a conditional expression which must returntrue
in order to indicate that the parameter value is valid, e.g.Class<? extends Converter>
getConverterClass()
A converter to be used to convert a text to the parameter value and vice versa.String
getDefaultValue()
Gets the parameter's default value.Class<? extends DomConverter>
getDomConverterClass()
A converter to be used to convert an (XML) DOM to the parameter value and vice versa.String
getFormat()
Gets a format string to which a textual parameter value must match in order to indicate a valid value, e.g.String
getInterval()
Gets the valid interval for numeric parameters, e.g.String
getItemAlias()
String
getPattern()
Gets a regular expression pattern to which a textual parameter value must match in order to indicate a valid value, e.g.Class<? extends RasterDataNode>
getRasterDataNodeClass()
Specifies whichRasterDataNode
subclass of the source products is used to fill thegetValueSet()
for this parameter.ParameterDescriptor[]
getStructureMemberDescriptors()
String
getUnit()
Class<? extends Validator>
getValidatorClass()
A validator to be used to validate a parameter value.String[]
getValueSet()
Gets the set of values which can be assigned to a parameter field.boolean
isDeprecated()
Is the parameter marked as deprecated?boolean
isNotEmpty()
Parameter value must not be an empty string?boolean
isNotNull()
Parameter value must not benull
?boolean
isStructure()
-
Methods inherited from interface org.esa.snap.core.gpf.descriptor.DataElementDescriptor
getDataType
-
Methods inherited from interface org.esa.snap.core.gpf.descriptor.ElementDescriptor
getAlias, getDescription, getLabel, getName
-
-
-
-
Method Detail
-
getItemAlias
String getItemAlias()
- Returns:
- An alias name for the elements of a parameter array. Forces element-wise array conversion from and to DOM representation. Defaults to the empty string (= not set).
-
getDefaultValue
String getDefaultValue()
Gets the parameter's default value. The default value set is given as a textual representations of the actual value. The framework creates the actual value set by converting the text value to an object using the associatedConverter
.- Returns:
- The default value. Defaults to the empty string (= not set).
- See Also:
getConverterClass()
-
getUnit
String getUnit()
- Returns:
- The parameter physical unit. Defaults to the empty string (= not set).
-
getValueSet
String[] getValueSet()
Gets the set of values which can be assigned to a parameter field. The value set is given as textual representations of the actual values. The framework creates the actual value set by converting each text value to an object value using the associatedConverter
.- Returns:
- The value set. Defaults to empty array (= not set).
- See Also:
getConverterClass()
-
getInterval
String getInterval()
Gets the valid interval for numeric parameters, e.g."[10,20)"
: in the range 10 (inclusive) to 20 (exclusive).- Returns:
- The valid interval. Defaults to empty string (= not set).
-
getCondition
String getCondition()
Gets a conditional expression which must returntrue
in order to indicate that the parameter value is valid, e.g."value > 2.5"
.- Returns:
- A conditional expression. Defaults to empty string (= not set).
-
getPattern
String getPattern()
Gets a regular expression pattern to which a textual parameter value must match in order to indicate a valid value, e.g."a*"
.- Returns:
- A regular expression pattern. Defaults to empty string (= not set).
- See Also:
Pattern
-
getFormat
String getFormat()
Gets a format string to which a textual parameter value must match in order to indicate a valid value, e.g."yyyy-MM-dd HH:mm:ss.Z"
.- Returns:
- A format string. Defaults to empty string (= not set).
- See Also:
Format
-
isNotNull
boolean isNotNull()
Parameter value must not benull
?- Returns:
true
, if so. Defaults tofalse
.
-
isNotEmpty
boolean isNotEmpty()
Parameter value must not be an empty string?- Returns:
true
, if so. Defaults tofalse
.
-
isDeprecated
boolean isDeprecated()
Is the parameter marked as deprecated?- Returns:
true
, if so. Defaults tofalse
.
-
getValidatorClass
Class<? extends Validator> getValidatorClass()
A validator to be used to validate a parameter value.- Returns:
- The validator class.
-
getConverterClass
Class<? extends Converter> getConverterClass()
A converter to be used to convert a text to the parameter value and vice versa.- Returns:
- The converter class.
-
getDomConverterClass
Class<? extends DomConverter> getDomConverterClass()
A converter to be used to convert an (XML) DOM to the parameter value and vice versa.- Returns:
- The DOM converter class.
-
getRasterDataNodeClass
Class<? extends RasterDataNode> getRasterDataNodeClass()
Specifies whichRasterDataNode
subclass of the source products is used to fill thegetValueSet()
for this parameter.- Returns:
- The raster data node type.
-
isStructure
boolean isStructure()
- Returns:
true
if the parameter type is a composite data structure.- See Also:
DataElementDescriptor.getDataType()
,getStructureMemberDescriptors()
-
getStructureMemberDescriptors
ParameterDescriptor[] getStructureMemberDescriptors()
- Returns:
- The descriptors for the structure members of this parameter type. The returned array will be empty, if this parameter doesn't have a structure data type.
- See Also:
DataElementDescriptor.getDataType()
,isStructure()
-
-