org.mbari.oasis
Class OMSUtil

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

public class OMSUtil
extends java.lang.Object

Utilties used for netcdf file construction

Version:
29 Sep 1999
Author:
Brian Schlining

Method Summary
static java.lang.String getDataSymbol(OMSSensor s)
          Returns a short symbol used to represent the data in equations.
static java.util.Date getDateFromName(java.lang.String filename)
          Converts a file name like '99123' or '1999123' to a Date object
static int getDay(java.lang.String filename)
          Extract the day from filenames of types 'yyddd' or 'yyyyddd'.
static java.lang.String getLongName(java.lang.String name)
          Assign a long descriptive name based on the short name found in the calibration files.
static java.lang.String getSortableName(OMSSensor s)
          Assign each variable in an OMSSensor array a unique name that that can be used for sorting
static java.lang.String getUniqueName(OMSSensor s)
          Assign each variable in an OMSSensor array a unique name
static java.lang.String getUniqueName(java.lang.String name, int bank, int channel)
          Assign each variable in an OMSSensor array a unique name
static float getWavelength(OMSSensor s)
           
static float getWavelength(java.lang.String name)
           
static int getYear(java.lang.String filename)
          Extract the year from filenames of types 'yyddd' or 'yyyyddd'.
static java.lang.String[] sortFiles(java.lang.String[] strArray)
          Sorts an array of Strings alphabetically
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getLongName

public static java.lang.String getLongName(java.lang.String name)
Assign a long descriptive name based on the short name found in the calibration files.

Parameters:
name - String which is to be the name of this Attribute
Returns:
longName String describing the short name

getUniqueName

public static java.lang.String getUniqueName(java.lang.String name,
                                             int bank,
                                             int channel)
Assign each variable in an OMSSensor array a unique name

Parameters:
name - The short descriptive name of a sensor variable
bank - The bank number of the sensor
channel - The channel number of the sensor
Returns:
A unique name for the sensor created by comining the name, bank and channel

getUniqueName

public static java.lang.String getUniqueName(OMSSensor s)
Assign each variable in an OMSSensor array a unique name

Parameters:
s - An OMSSensor object
Returns:
A unique name for the sensor created by comining the name, bank and channel

getSortableName

public static java.lang.String getSortableName(OMSSensor s)
Assign each variable in an OMSSensor array a unique name that that can be used for sorting

Parameters:
s - An OMSSensor object
Returns:
A unique name for the sensor created by comining the name, bank and channel

getDateFromName

public static java.util.Date getDateFromName(java.lang.String filename)
Converts a file name like '99123' or '1999123' to a Date object

Parameters:
filename - The file name of the data file
Returns:
A date object corresponding to the date of the filename

getYear

public static int getYear(java.lang.String filename)
Extract the year from filenames of types 'yyddd' or 'yyyyddd'.

Returns:
The year represented in the file name

getDay

public static int getDay(java.lang.String filename)
Extract the day from filenames of types 'yyddd' or 'yyyyddd'.

Returns:
The year-day represented in the file name

sortFiles

public static java.lang.String[] sortFiles(java.lang.String[] strArray)
Sorts an array of Strings alphabetically

Parameters:
strArray - An array of strings
Returns:
The array of string sorted alphabetically

getWavelength

public static float getWavelength(OMSSensor s)

getWavelength

public static float getWavelength(java.lang.String name)

getDataSymbol

public static java.lang.String getDataSymbol(OMSSensor s)
Returns a short symbol used to represent the data in equations. For example Ed490 in Channel 0 will return "Es" as the symbol

Parameters:
s - An OMSSensor object
Returns:
symbol A string of the symbol corresponding to the data collected by the sensor.