Package org.esa.snap.core.datamodel
Class ProductNodeNameValidator
- java.lang.Object
-
- org.esa.snap.core.datamodel.ProductNodeNameValidator
-
- All Implemented Interfaces:
ParamValidator
public class ProductNodeNameValidator extends Object implements ParamValidator
-
-
Field Summary
Fields Modifier and Type Field Description static String
PRODUCT_PROPERTY_KEY
This key should only be specified if the requested productNodeName have to be unique inside the given product.
-
Constructor Summary
Constructors Constructor Description ProductNodeNameValidator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equalValues(Parameter parameter, Object value1, Object value2)
Tests if the given two values are equal taking the given parameter information into account.String
format(Parameter parameter, Object value)
Converts the given value into a text taking the given parameter information into account.Object
parse(Parameter parameter, String text)
Converts the given text into a value taking the given parameter information into account.void
validate(Parameter parameter, Object value)
Tests if the given value passes all constraints given in the supplied parameter information.
-
-
-
Field Detail
-
PRODUCT_PROPERTY_KEY
public static final String PRODUCT_PROPERTY_KEY
This key should only be specified if the requested productNodeName have to be unique inside the given product. This applies to bandNames and tiePointGridNames.- See Also:
- Constant Field Values
-
-
Method Detail
-
equalValues
public boolean equalValues(Parameter parameter, Object value1, Object value2)
Description copied from interface:ParamValidator
Tests if the given two values are equal taking the given parameter information into account.- Specified by:
equalValues
in interfaceParamValidator
- Parameters:
parameter
- the parameter, must not benull
value1
- the first value, can benull
value2
- the second value, can also benull
- Returns:
true
if the value are equal,false
otherwise
-
format
public String format(Parameter parameter, Object value) throws ParamFormatException
Description copied from interface:ParamValidator
Converts the given value into a text taking the given parameter information into account.- Specified by:
format
in interfaceParamValidator
- Parameters:
parameter
- the parameter, must not benull
value
- the value to be converted into a text, can benull
- Returns:
- the value represented by the text, never
null
. - Throws:
ParamFormatException
-
parse
public Object parse(Parameter parameter, String text) throws ParamParseException
Description copied from interface:ParamValidator
Converts the given text into a value taking the given parameter information into account.- Specified by:
parse
in interfaceParamValidator
- Parameters:
parameter
- the parameter, must not benull
text
- the text to be converted into a value, must not benull
- Returns:
- the value represented by the text
- Throws:
ParamParseException
-
validate
public void validate(Parameter parameter, Object value) throws ParamValidateException
Description copied from interface:ParamValidator
Tests if the given value passes all constraints given in the supplied parameter information. The value can also benull
since parameters can be allowed to have the value 'null'.- Specified by:
validate
in interfaceParamValidator
- Parameters:
parameter
- the parameter, must not benull
value
- the value to be tested, can benull
- Throws:
ParamValidateException
-
-