org.gbif.datatester
Class ParameterMetadata

java.lang.Object
  extended by org.gbif.datatester.ParameterMetadata

public class ParameterMetadata
extends java.lang.Object

Class to store metadata about test parameters.

Version:
$Revision: 1.2 $
Author:
Renato De Giovanni ( renato at cria . org . br )

Constructor Summary
ParameterMetadata(DataTest dataTest, java.lang.String name)
          Constructs a ParameterMetadata implicitly assuming that the parameter is mandatory.
ParameterMetadata(DataTest dataTest, java.lang.String name, java.lang.String defaultValue)
          Constructs a ParameterMetadata implicitly assuming that the parameter is optional by specifying a default value.
 
Method Summary
 java.lang.String getDefaultValue()
          Returns the default value for the parameter (null if it's a mandatory parameter).
 java.lang.String getDescription()
          Returns the parameter description or an empty string if the corresponding key was not found in the resource bundle.
 java.lang.String getName()
          Returns the parameter name.
 boolean isMandatory()
          Tells if the parameter is mandatory or not.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParameterMetadata

public ParameterMetadata(DataTest dataTest,
                         java.lang.String name)

Constructs a ParameterMetadata implicitly assuming that the parameter is mandatory.

Parameters:
dataTest - Reference to the related data test.
name - Parameter name (id).

ParameterMetadata

public ParameterMetadata(DataTest dataTest,
                         java.lang.String name,
                         java.lang.String defaultValue)

Constructs a ParameterMetadata implicitly assuming that the parameter is optional by specifying a default value.

Parameters:
dataTest - Reference to the related data test.
name - Parameter name (id).
defaultValue - Default value.
Method Detail

getName

public java.lang.String getName()

Returns the parameter name.

Note that name here works as an identifier, so it is considered to be independent from language.

Returns:
Parameter name.

getDescription

public java.lang.String getDescription()

Returns the parameter description or an empty string if the corresponding key was not found in the resource bundle.

Returns:
Parameter description.

isMandatory

public boolean isMandatory()

Tells if the parameter is mandatory or not.

Returns:
Flag indicating if the parameter is mandatory.

getDefaultValue

public java.lang.String getDefaultValue()

Returns the default value for the parameter (null if it's a mandatory parameter).

Returns:
Default value for the parameter (null if it's mandatory).