OSFI-Java  3.9.2
OpenSF Integration Library
esa.opensf.osfi.Parameter Class Reference

Classes

enum  ParamComplexType
 
enum  ParamType
 

Public Member Functions

 Parameter (String name, String description, String type, String value)
 
 Parameter (String name, String description, ParamType type, ParamComplexType complexType, String value, String units, String min, String max, List< Integer > dims)
 
 Parameter (String name, String description, ParamType type, ParamComplexType complexType, ArrayNode.Raw rootNode, String units, String min, String max, List< Integer > dims)
 
void write ()
 
boolean isArray ()
 
String getValue ()
 
String getRawValue ()
 
int getIntValue ()
 
double getDoubleValue ()
 
boolean getBooleanValue ()
 
TimeValue getTimeValue ()
 
String getStringValue ()
 
String getFileValue ()
 
int[] getVectorInt ()
 
double[] getVectorDouble ()
 
boolean[] getVectorBoolean ()
 
TimeValue[] getVectorTime ()
 
String[] getVectorString ()
 
String[] getVectorFile ()
 
int[][] getMatrixInt ()
 
double[][] getMatrixDouble ()
 
boolean[][] getMatrixBoolean ()
 
TimeValue[][] getMatrixTime ()
 
String[][] getMatrixString ()
 
String[][] getMatrixFile ()
 
ArrayNode.Raw getRootNode ()
 
boolean[][] fileExist ()
 
void setValue (final String value)
 
int getNdims ()
 
List< Integer > getDims ()
 
String getName ()
 
String getLocalName ()
 
String getPath ()
 
String getDescription ()
 
String getUnits ()
 
String getMax ()
 
String getMin ()
 
String getType ()
 
ParamType getElementType ()
 
String getComplexType ()
 
void addOtherAttribute (final String key, final String val)
 
Map< String, String > getOtherAttributes ()
 
String getOtherAttribute (final String key)
 

Static Public Member Functions

static String getFileFormattedValue (String fileName)
 

Detailed Description

Parameter.
Represents a model's parameter described in a configuration file.

Author
ridr

Member Function Documentation

◆ addOtherAttribute()

void esa.opensf.osfi.Parameter.addOtherAttribute ( final String  key,
final String  val 
)

Set an the value of a non-standard parameter attribute.

Parameters
keyattribute name
valattribute value

◆ fileExist()

boolean [][] esa.opensf.osfi.Parameter.fileExist ( )

Check the existence of the files specified within a FILE parameter

Note: When the parameter value is a single file name, the boolean is in the first pos [0][0] When the parameter value is a vector of file names, the array is a single row one in horizontal [0][0:vector.size] Not valid for ARRAY type.

Returns
A matrix with a boolean for each file TRUE → file found, FALSE→file not found A file is considered found when it is correctly located and ready to be read.

References esa.opensf.osfi.Parameter.ParamComplexType.ARRAY, esa.opensf.osfi.Logger.error(), esa.opensf.osfi.Parameter.getFileValue(), esa.opensf.osfi.Parameter.getMatrixFile(), and esa.opensf.osfi.Parameter.getVectorFile().

◆ getBooleanValue()

boolean esa.opensf.osfi.Parameter.getBooleanValue ( )

Gets the value of the parameter as a boolean.

Valid when there is only one value.

Returns
Parameter value as boolean

◆ getComplexType()

String esa.opensf.osfi.Parameter.getComplexType ( )

Gets the complex type of the parameter.

Returns an empty string if complex type is not set.

Returns
String with the complex type of the parameter.

◆ getDescription()

String esa.opensf.osfi.Parameter.getDescription ( )

Gets a brief description of the parameters.

Returns
string with the description.

◆ getDims()

List<Integer> esa.opensf.osfi.Parameter.getDims ( )

Gets a vector with the size of the dimensions.

Note that, as described in the E2E-ICD, matrix sizes are represented as [nCol, nRow].

Returns
Vector with dimension sizes.

◆ getDoubleValue()

double esa.opensf.osfi.Parameter.getDoubleValue ( )

Gets the value of the parameter as a floating point number.

Valid when there is only one value.

Returns
Parameter value as double

◆ getElementType()

ParamType esa.opensf.osfi.Parameter.getElementType ( )

Returns the element data type of the parameter, as an enum key.

◆ getFileFormattedValue()

static String esa.opensf.osfi.Parameter.getFileFormattedValue ( String  fileName)
static

Gets the value of the parameter as an array of characters.

Checks the file validity

Parameters
fileNameString where file path name is stored
Returns
Parameter value as array of characters.

◆ getFileValue()

String esa.opensf.osfi.Parameter.getFileValue ( )

Gets the value of the parameter as a file.

Valid when there is only one value.

Returns
Parameter value as a file

◆ getIntValue()

int esa.opensf.osfi.Parameter.getIntValue ( )

Gets the value of the parameter as an integer type.

Valid when there is only one value.

Returns
Parameter value as integer

◆ getLocalName()

String esa.opensf.osfi.Parameter.getLocalName ( )

Gets the local name of the parameter.

Returns
string with the local part of the name.

◆ getMatrixBoolean()

boolean [][] esa.opensf.osfi.Parameter.getMatrixBoolean ( )

Gets the value of the parameter as a Java array-of-arrays of boolean values.

Not valid for ARRAY type.

Returns
Value as matrix of booleans.

◆ getMatrixDouble()

double [][] esa.opensf.osfi.Parameter.getMatrixDouble ( )

Gets the value of the parameter as a Java array-of-arrays of floating point values.

Not valid for ARRAY type.

Returns
Value as matrix of doubles.

◆ getMatrixFile()

String [][] esa.opensf.osfi.Parameter.getMatrixFile ( )

Gets the value of the parameter as a Java array-of-arrays of file values.

Not valid for ARRAY type.

Returns
Value as matrix of files.

◆ getMatrixInt()

int [][] esa.opensf.osfi.Parameter.getMatrixInt ( )

Gets the value of the parameter as a Java array-of-arrays of integer values.

Not valid for ARRAY type.

Returns
Value as matrix of integers.

◆ getMatrixString()

String [][] esa.opensf.osfi.Parameter.getMatrixString ( )

Gets the value of the parameter as a Java array-of-arrays of string values.

Not valid for ARRAY type.

Returns
Value as matrix of strings.

◆ getMatrixTime()

TimeValue [][] esa.opensf.osfi.Parameter.getMatrixTime ( )

Gets the value of the parameter as a Java array-of-arrays of timecode values.

Not valid for ARRAY type.

Returns
Value as matrix of timecodes.

◆ getMax()

String esa.opensf.osfi.Parameter.getMax ( )

Gets the maximum value of the parameters.

Returns
string with the maximum value.

◆ getMin()

String esa.opensf.osfi.Parameter.getMin ( )

Gets the minimum value of the parameters.

Returns
string with the minimum value.

◆ getName()

String esa.opensf.osfi.Parameter.getName ( )

Gets the name of the parameter.

Returns
string with the parameter name.
Deprecated:
Ambiguous function, instead use getLocalName or getPath

References esa.opensf.osfi.Parameter.getPath().

◆ getNdims()

int esa.opensf.osfi.Parameter.getNdims ( )

Gets the number of dimensions.

Returns
Dimensions number.

◆ getOtherAttribute()

String esa.opensf.osfi.Parameter.getOtherAttribute ( final String  key)
Returns
the value of the given non-standard attribute, or null if not present.

◆ getOtherAttributes()

Map<String, String> esa.opensf.osfi.Parameter.getOtherAttributes ( )
Returns
a copy of the map of non-standard attributes and their values.

◆ getPath()

String esa.opensf.osfi.Parameter.getPath ( )

Gets the full path of the parameter.

Returns
string with the parameter full path and name.

◆ getRawValue()

String esa.opensf.osfi.Parameter.getRawValue ( )

Gets the unparsed parameter value, as a string.

Returns
Parameter value, unparsed. If an ARRAY-type parameter, returns a structural description of the parameter with the unparsed values.

References esa.opensf.osfi.Parameter.isArray(), and esa.opensf.osfi.ArrayNode< V, S extends ArrayNode< V, S >.toString().

◆ getRootNode()

ArrayNode.Raw esa.opensf.osfi.Parameter.getRootNode ( )

Specific method for Array types. Return the root node of the values tree. Each node consists of either some data elements or a list of subnodes. They can be parsed individually or in bulk (by depth-first flattening of the tree) into typed values.

See also
ArrayNode.Raw

References esa.opensf.osfi.Parameter.isArray().

◆ getStringValue()

String esa.opensf.osfi.Parameter.getStringValue ( )

Gets the value of the parameter as a string.

Valid when there is only one value.

Returns
Parameter value as a string

◆ getTimeValue()

TimeValue esa.opensf.osfi.Parameter.getTimeValue ( )

Gets the value of the parameter as a timecode.

Valid when there is only one value.

Returns
Parameter value as a timecode

◆ getType()

String esa.opensf.osfi.Parameter.getType ( )

Gets the element data type of the parameter, as a string.

Returns
String with the type of the parameter.
See also
getElementType()

◆ getUnits()

String esa.opensf.osfi.Parameter.getUnits ( )

Gets the units of the parameters.

Returns
string with the minimum value.

◆ getValue()

String esa.opensf.osfi.Parameter.getValue ( )

Gets the parameter value as a string.

Returns
Parameter value.
Deprecated:
Ambiguously-named function to be removed, use getRawValue() instead.

References esa.opensf.osfi.Parameter.getRawValue().

◆ getVectorBoolean()

boolean [] esa.opensf.osfi.Parameter.getVectorBoolean ( )

Gets the value of the parameter as a Java array of boolean values.

Returns
Parameter value parsed as a Java array of booleans.

◆ getVectorDouble()

double [] esa.opensf.osfi.Parameter.getVectorDouble ( )

Gets the value of the parameter as a Java array of floating point values.

Returns
Parameter value parsed as a Java array of doubles.

◆ getVectorFile()

String [] esa.opensf.osfi.Parameter.getVectorFile ( )

Gets the value of the parameter as a Java array of files.

Returns
Parameter value parsed as a Java array of files.

◆ getVectorInt()

int [] esa.opensf.osfi.Parameter.getVectorInt ( )

Gets the value of the parameter as a Java array of integer values.

Returns
Parameter value parsed as a Java array of integers.

◆ getVectorString()

String [] esa.opensf.osfi.Parameter.getVectorString ( )

Gets the value of the parameter as a Java array of strings.

Returns
Parameter value parsed as a Java array of strings.

◆ getVectorTime()

TimeValue [] esa.opensf.osfi.Parameter.getVectorTime ( )

Gets the value of the parameter as a Java array of timecode values.

Returns
Parameter value parsed as a Java array of timecodes.

◆ isArray()

boolean esa.opensf.osfi.Parameter.isArray ( )

Returns true if this parameter is of structured type ARRAY. Calling methods in the getVectorX family will "flatten" the array structure to 1D before parsing.

See also
getRootNode()

References esa.opensf.osfi.Parameter.ParamComplexType.ARRAY.

◆ setValue()

void esa.opensf.osfi.Parameter.setValue ( final String  value)

Sets the parameter value as a string.

Parameters
valueParameter value.

◆ write()

void esa.opensf.osfi.Parameter.write ( )

Prints out to standard output a textual description of the parameter.

References esa.opensf.osfi.Parameter.getRawValue(), and esa.opensf.osfi.Logger.info().


The documentation for this class was generated from the following file: