org.mbari.oasis
Class OMSVariableReader

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

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

OMSVariableReader (OMS = Oasis Mooring Specprr) is used to get Variable information about the configuration that is stored in the configuration files

Version:
29 Sep 1999
Author:
Brian Schlining

Constructor Summary
OMSVariableReader(java.io.File file)
          OMSVariableReader reads in the Variables in the main configuration file
OMSVariableReader(java.lang.String filename)
          OMSVariableReader reads in the Variables in the main configuration file
 
Method Summary
 int countVariables()
          Count the number of variables in the file
 java.lang.String getFilename()
           
 org.mbari.oasis.OMSVariable getVariable(int i)
          Get a single variable in the file
 org.mbari.oasis.OMSVariable[] getVariables()
          Get all the variables in the file
 boolean hasMoreElements()
          Enumeration interface
static void main(java.lang.String[] args)
           
 java.lang.Object nextElement()
          Enumeration interface
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OMSVariableReader

public OMSVariableReader(java.lang.String filename)
OMSVariableReader reads in the Variables in the main configuration file

Parameters:
filename - The configuration file containing the mooring attributes

OMSVariableReader

public OMSVariableReader(java.io.File file)
OMSVariableReader reads in the Variables in the main configuration file

Method Detail

countVariables

public int countVariables()
Count the number of variables in the file


getFilename

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

getVariable

public org.mbari.oasis.OMSVariable getVariable(int i)
Get a single variable in the file

Parameters:
i - The index of the variable to return (Zero based indices)
Returns:
MooringAttributeReader$MooringVariable
Throws:
java.lang.ArrayIndexOutOfBoundsException

getVariables

public org.mbari.oasis.OMSVariable[] getVariables()
Get all the variables in the file

Returns:
an array of MooringVariables

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

main

public static void main(java.lang.String[] args)