HiRISE

HiRISE.HiPlan.PTF
Class PTF_Comparison.Field_Pair

java.lang.Object
  extended by HiRISE.HiPlan.PTF.PTF_Comparison.Field_Pair
Enclosing class:
PTF_Comparison

public static class PTF_Comparison.Field_Pair
extends Object

A pair of observation field values from two different sources. The field name and observation's ID are included.

At the targeting specialists' request, null values are to be treated as empty strings. Thus, the setters for the values ensure that the values are never null.

Version:
1.23
Author:
Ben Pearson - UA/PIRL

Field Summary
static String SOURCE_A
           
static String SOURCE_B
           
 
Constructor Summary
PTF_Comparison.Field_Pair(String observation_id, String field_name, String value_a, String value_b)
          Creates a new field pair with the indicated values.
 
Method Summary
 String csv()
          Gets the comma-separated value (CSV) text representation of the pair.
 String field_name()
          Gets the field name for the pair.
 void field_name(String field_name)
          Sets the field name for the pair.
 String observation_id()
          Gets the observation ID for the pair.
 void observation_id(String observation_id)
          Sets the observation ID for the pair.
 Parameter parameter()
          Gets the PVL representation of the pair.
 String terse()
          Gets the terse text representation of the pair.
 String toString()
          Gets the string representation of the field pair.
 String value_a()
          Gets value A of the pair.
 void value_a(String value_a)
          Sets value A of the pair.
 String value_b()
          Gets value B of the pair.
 void value_b(String value_b)
          Sets value B of the pair.
 String verbose()
          Gets the verbose text representation of the pair.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SOURCE_A

public static final String SOURCE_A
See Also:
Constant Field Values

SOURCE_B

public static final String SOURCE_B
See Also:
Constant Field Values
Constructor Detail

PTF_Comparison.Field_Pair

public PTF_Comparison.Field_Pair(String observation_id,
                                 String field_name,
                                 String value_a,
                                 String value_b)
Creates a new field pair with the indicated values.

Parameters:
observation_id - the observation ID for the pair.
field_name - the name of the PTF field represented.
value_a - the first value.
value_b - the second value.
Method Detail

observation_id

public String observation_id()
Gets the observation ID for the pair.

Returns:
the current observation identifier.

observation_id

public void observation_id(String observation_id)
Sets the observation ID for the pair.

Parameters:
observation_id - the new observation identifier.

field_name

public String field_name()
Gets the field name for the pair.

Returns:
the current field name.

field_name

public void field_name(String field_name)
Sets the field name for the pair. The field number is parenthetically appended if the field is a proper PTF field name; note that the field number has a value one greater than the field index.

Parameters:
field_name - the new observation field name.

value_a

public String value_a()
Gets value A of the pair.

Returns:
the current value A.

value_a

public void value_a(String value_a)
Sets value A of the pair.

Parameters:
value_a - the new value A.

value_b

public String value_b()
Gets value B of the pair.

Returns:
the current value B.

value_b

public void value_b(String value_b)
Sets value B of the pair.

Parameters:
value_b - the new value B.

parameter

public Parameter parameter()
Gets the PVL representation of the pair. If source_a is null, "source_a" will be used instead. If source_b is null, "source_b" will be used instead.

Returns:
the field pair as a PVL parameter.

csv

public String csv()
Gets the comma-separated value (CSV) text representation of the pair. This text is of the form observation_id,field_name,value_a,value_b.

Returns:
the CSV text representation of the pair.

terse

public String terse()
Gets the terse text representation of the pair. This text is of the form: observation_id Field: field_name source_a:value_a source_b:value_b. If source_a is null, "source_a" will be used instead. If source_b is null, "source_b" will be used instead.

Returns:
the terse text representation of the pair.

verbose

public String verbose()
Gets the verbose text representation of the pair. This text is of the following form:

field_name
        source_a: value_a
        source_b: value_b

If source_a is null, "source_a" will be used instead. If source_b is null, "source_b" will be used instead.

Returns:
the verbose text representation of the pair.

toString

public String toString()
Gets the string representation of the field pair. This text is of the form observation_id (field_name=field_name; value_a=value_a; value_b=value_b).

Overrides:
toString in class Object
Returns:
the string representation of the pair.

HiRISE

Copyright (C) Arizona Board of Regents on behalf of the Planetary Image Research Laboratory, Lunar and Planetary Laboratory at the University of Arizona