Package org.esa.snap.core.gpf.descriptor
Class DefaultParameterDescriptor
java.lang.Object
org.esa.snap.core.gpf.descriptor.DefaultParameterDescriptor
- All Implemented Interfaces:
DataElementDescriptor,ElementDescriptor,ParameterDescriptor
- Direct Known Subclasses:
ToolParameterDescriptor
Default implementation of the
ParameterDescriptor interface.- Since:
- BEAM 5
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAlias()Gets a conditional expression which must returntruein order to indicate that the parameter value is valid, e.g.A converter to be used to convert a text to the parameter value and vice versa.static ParameterDescriptor[]getDataMemberDescriptors(Class<?> dataType) Class<?> Gets the parameter's default value.Class<? extends DomConverter> A converter to be used to convert an (XML) DOM to the parameter value and vice versa.Gets a format string to which a textual parameter value must match in order to indicate a valid value, e.g.Gets the valid interval for numeric parameters, e.g.getLabel()getName()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> Specifies whichRasterDataNodesubclass of the source products is used to fill theParameterDescriptor.getValueSet()for this parameter.getUnit()A validator to be used to validate a parameter value.String[]Gets the set of values which can be assigned to a parameter field.booleanIs the parameter marked as deprecated?booleanParameter value must not be an empty string?booleanParameter value must not benull?static booleanbooleanstatic booleanisStructure(Class<?> type) voidvoidsetCondition(String condition) voidsetConverterClass(Class<? extends Converter> converter) voidsetDataType(Class<?> dataType) voidsetDefaultValue(String defaultValue) voidsetDeprecated(boolean deprecated) voidsetDescription(String description) voidsetDomConverterClass(Class<? extends DomConverter> domConverter) voidvoidsetInterval(String interval) voidsetItemAlias(String itemAlias) voidvoidvoidsetNotEmpty(boolean notEmpty) voidsetNotNull(boolean notNull) voidsetPattern(String pattern) voidsetRasterDataNodeClass(Class<? extends RasterDataNode> rasterDataNodeClass) voidvoidsetValidatorClass(Class<? extends Validator> validator) voidsetValueSet(String[] valueSet)
-
Constructor Details
-
DefaultParameterDescriptor
public DefaultParameterDescriptor() -
DefaultParameterDescriptor
-
-
Method Details
-
isStructure
-
isSimple
-
getDataMemberDescriptors
-
getName
- Specified by:
getNamein interfaceElementDescriptor- Returns:
- The symbolic name used to unambiguously identify this element. E.g. the fully qualified name of a Java class.
-
setName
-
getDataType
- Specified by:
getDataTypein interfaceDataElementDescriptor- Returns:
- The element's data type.
Defaults to
Object.
-
setDataType
-
getAlias
- Specified by:
getAliasin interfaceElementDescriptor- Returns:
- A short form of the symbolic name, or
nullif not declared.
-
setAlias
-
getDefaultValue
Description copied from interface:ParameterDescriptorGets 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.- Specified by:
getDefaultValuein interfaceParameterDescriptor- Returns:
- The default value. Defaults to the empty string (= not set).
- See Also:
-
setDefaultValue
-
getDescription
- Specified by:
getDescriptionin interfaceElementDescriptor- Returns:
- A short description, or
nullif not declared.
-
setDescription
-
getLabel
- Specified by:
getLabelin interfaceElementDescriptor- Returns:
- A human-readable version of the symbolic name to be used in user interfaces, or
nullif not declared.
-
setLabel
-
getUnit
- Specified by:
getUnitin interfaceParameterDescriptor- Returns:
- The parameter physical unit. Defaults to the empty string (= not set).
-
setUnit
-
getInterval
Description copied from interface:ParameterDescriptorGets the valid interval for numeric parameters, e.g."[10,20)": in the range 10 (inclusive) to 20 (exclusive).- Specified by:
getIntervalin interfaceParameterDescriptor- Returns:
- The valid interval. Defaults to empty string (= not set).
-
setInterval
-
getValueSet
Description copied from interface:ParameterDescriptorGets 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.- Specified by:
getValueSetin interfaceParameterDescriptor- Returns:
- The value set. Defaults to empty array (= not set).
- See Also:
-
setValueSet
-
getCondition
Description copied from interface:ParameterDescriptorGets a conditional expression which must returntruein order to indicate that the parameter value is valid, e.g."value > 2.5".- Specified by:
getConditionin interfaceParameterDescriptor- Returns:
- A conditional expression. Defaults to empty string (= not set).
-
setCondition
-
getPattern
Description copied from interface:ParameterDescriptorGets a regular expression pattern to which a textual parameter value must match in order to indicate a valid value, e.g."a*".- Specified by:
getPatternin interfaceParameterDescriptor- Returns:
- A regular expression pattern. Defaults to empty string (= not set).
- See Also:
-
setPattern
-
getFormat
Description copied from interface:ParameterDescriptorGets 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".- Specified by:
getFormatin interfaceParameterDescriptor- Returns:
- A format string. Defaults to empty string (= not set).
- See Also:
-
setFormat
-
isNotNull
public boolean isNotNull()Description copied from interface:ParameterDescriptorParameter value must not benull?- Specified by:
isNotNullin interfaceParameterDescriptor- Returns:
true, if so. Defaults tofalse.
-
setNotNull
public void setNotNull(boolean notNull) -
isNotEmpty
public boolean isNotEmpty()Description copied from interface:ParameterDescriptorParameter value must not be an empty string?- Specified by:
isNotEmptyin interfaceParameterDescriptor- Returns:
true, if so. Defaults tofalse.
-
setNotEmpty
public void setNotEmpty(boolean notEmpty) -
isDeprecated
public boolean isDeprecated()Description copied from interface:ParameterDescriptorIs the parameter marked as deprecated?- Specified by:
isDeprecatedin interfaceParameterDescriptor- Returns:
true, if so. Defaults tofalse.
-
setDeprecated
public void setDeprecated(boolean deprecated) -
getRasterDataNodeClass
Description copied from interface:ParameterDescriptorSpecifies whichRasterDataNodesubclass of the source products is used to fill theParameterDescriptor.getValueSet()for this parameter.- Specified by:
getRasterDataNodeClassin interfaceParameterDescriptor- Returns:
- The raster data node type.
-
setRasterDataNodeClass
-
getValidatorClass
Description copied from interface:ParameterDescriptorA validator to be used to validate a parameter value.- Specified by:
getValidatorClassin interfaceParameterDescriptor- Returns:
- The validator class.
-
setValidatorClass
-
getConverterClass
Description copied from interface:ParameterDescriptorA converter to be used to convert a text to the parameter value and vice versa.- Specified by:
getConverterClassin interfaceParameterDescriptor- Returns:
- The converter class.
-
setConverterClass
-
getDomConverterClass
Description copied from interface:ParameterDescriptorA converter to be used to convert an (XML) DOM to the parameter value and vice versa.- Specified by:
getDomConverterClassin interfaceParameterDescriptor- Returns:
- The DOM converter class.
-
setDomConverterClass
-
getItemAlias
- Specified by:
getItemAliasin interfaceParameterDescriptor- 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).
-
setItemAlias
-
isStructure
public boolean isStructure()- Specified by:
isStructurein interfaceParameterDescriptor- Returns:
trueif the parameter type is a composite data structure.- See Also:
-
getStructureMemberDescriptors
- Specified by:
getStructureMemberDescriptorsin interfaceParameterDescriptor- 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:
-