org.mbari.oasis
Class OMSAttributeReader

java.lang.Object
  extended byorg.mbari.oasis.OMSAttributeReader
All Implemented Interfaces:
java.util.Enumeration

public class OMSAttributeReader
extends java.lang.Object
implements java.util.Enumeration

This class reads in data from a file in 'mooring'/data/specprr files and collects the netcdf specific information for attributes

Version:
29 Sep 1999
Author:
Brian Schlining

Field Summary
protected  ucar.netcdf.Attribute[] attributes
           
 
Constructor Summary
OMSAttributeReader(java.io.File file)
          MooringAttributeReader reads in the Attributes in the main configuration file
OMSAttributeReader(java.lang.String filename)
          MooringAttributeReader reads in the Attributes in the main configuration file
 
Method Summary
 int countAttributes()
          Count the number of attributes in the file
 ucar.netcdf.Attribute getAttribute(int i)
          Get a single attribute
 ucar.netcdf.Attribute[] getAttributes()
          Get all attributes
 java.lang.String getFilename()
           
 boolean hasMoreElements()
          Enumeration interface
 java.lang.Object nextElement()
          Enumeration interface
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

attributes

protected ucar.netcdf.Attribute[] attributes
Constructor Detail

OMSAttributeReader

public OMSAttributeReader(java.lang.String filename)
MooringAttributeReader reads in the Attributes in the main configuration file

Parameters:
filename - The configuration file containing the mooring attributes

OMSAttributeReader

public OMSAttributeReader(java.io.File file)
MooringAttributeReader reads in the Attributes in the main configuration file

Method Detail

getFilename

public java.lang.String getFilename()
Returns:
The name of the file used to create an instance of MooringAttributeReader

getAttributes

public ucar.netcdf.Attribute[] getAttributes()
Get all attributes

Returns:
All attributes occurring in this object

getAttribute

public ucar.netcdf.Attribute getAttribute(int i)
Get a single attribute

Parameters:
i - The index of the attribute to return. REMINDER Java uses zero based indices.
Returns:
One attribute
Throws:
java.lang.ArrayIndexOutOfBoundsException

countAttributes

public int countAttributes()
Count the number of attributes in the file

Returns:
Number of attributes

hasMoreElements

public boolean hasMoreElements()
Enumeration interface

Specified by:
hasMoreElements in interface java.util.Enumeration
Returns:
true if more elements are available; false otherwise

nextElement

public java.lang.Object nextElement()
Enumeration interface

Specified by:
nextElement in interface java.util.Enumeration
Returns:
The next element