org.mbari.oasis
Class CalibrationHistory

java.lang.Object
  extended byorg.mbari.oasis.CalibrationHistory

public class CalibrationHistory
extends java.lang.Object

Contains methods for storing and retrieving calibration history information for MBARI moorings. A List for storing calibraion history information.

See Also:
CalibrationHistoryFactory

Constructor Summary
CalibrationHistory()
          Default Constructor.
CalibrationHistory(java.lang.String instrumentType)
          Adds the isntrument type to the list.
 
Method Summary
 java.lang.String get(java.util.Date calDate)
          Returns the name of the correct calibration file to use based on date
 java.lang.String get(long calDate)
          Returns the name of the correct calibration file to use based on date
 java.lang.String getDefault()
          returns the default calibration.
 java.lang.String getInstrumentType()
          Returns the type of instrument calibrations stored in this object
 void set(java.util.Date startDate, java.util.Date endDate, java.lang.String cal)
          Adds a calibration file to the history.
 void set(long startDate, long endDate, java.lang.String cal)
          Adds a calibration file to the history.
 void setDefault(java.lang.String defaultCal)
          Sets the default calibration file
protected  void setInstrumentType(java.lang.String instrumentType)
          Useful for setting or changing the instrument type
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CalibrationHistory

public CalibrationHistory()
Default Constructor. If you use this call setInstrumentType Later on.


CalibrationHistory

public CalibrationHistory(java.lang.String instrumentType)
Adds the isntrument type to the list.

Parameters:
instrumentType - The ID for this isntrument type
Method Detail

setInstrumentType

protected void setInstrumentType(java.lang.String instrumentType)
Useful for setting or changing the instrument type

Parameters:
instrumentType - The ID for the type of instrument

getInstrumentType

public java.lang.String getInstrumentType()
Returns the type of instrument calibrations stored in this object


setDefault

public void setDefault(java.lang.String defaultCal)
Sets the default calibration file


getDefault

public java.lang.String getDefault()
returns the default calibration. However the prefered use is to use the get(calDate) method. This will return the appropriate calibration file to use for a particular date.


set

public void set(java.util.Date startDate,
                java.util.Date endDate,
                java.lang.String cal)
Adds a calibration file to the history.

Parameters:
startDate - The inclusive time that specifies when this cali file is valid
endDate - The inclusive time that specifies when this cla file is no longer valid.

set

public void set(long startDate,
                long endDate,
                java.lang.String cal)
Adds a calibration file to the history.

Parameters:
startDate - The inclusive time that specifies when this cali file is valid
endDate - The inclusive time that specifies when this cla file is no longer valid.

get

public java.lang.String get(java.util.Date calDate)
Returns the name of the correct calibration file to use based on date

Parameters:
calDate - A date objec representing the date of sample

get

public java.lang.String get(long calDate)
Returns the name of the correct calibration file to use based on date

Parameters:
calDate - Millisec since epoch representing the date of sample.