UniVista.namelist
Class NamelistInput

java.lang.Object
  |
  +--UniVista.namelist.NamelistInput
Direct Known Subclasses:
FortranNamelistInput

public class NamelistInput
extends java.lang.Object

this is a base class for input objects. An input object takes an input stream and parses it into an appropriate UniVista object.


Field Summary
protected static java.lang.String[] inputMethods
          contains fully qualified classnames of all of the different input methods for use when instantiating them.
 
Constructor Summary
NamelistInput()
           
 
Method Summary
 java.lang.String getDescription()
          return a user comprehensible string for the type of file the translator can comprehend
static java.lang.String[] getImportClasses()
          this is an accessor for the class names
 void importValuesIntoRun(Run importTo, java.io.InputStream theFile)
          this function is intended to import any values of variables in a file into the variables of a Run
 void importValuesIntoStudyDefaults(Study importTo, java.io.InputStream theFile)
          this functino is designed to import any values of a file that are different from a Code's defaults into a Study and make them study defaults
 Code makeCodeFromNamelist(java.lang.String codeName, java.io.InputStream theFile)
          this function is designed to take an input stream from a file or other source and translate it into a Code object.
 Variable readVariable(java.lang.String variableName, java.io.InputStream theFile)
          this function is designed to read in the variable of the passed name from the input file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

inputMethods

protected static final java.lang.String[] inputMethods
contains fully qualified classnames of all of the different input methods for use when instantiating them. It should ideally be user extendable so input methods can be dropped dynamically into the program without having to recode UniVista.
Constructor Detail

NamelistInput

public NamelistInput()
Method Detail

getDescription

public java.lang.String getDescription()
return a user comprehensible string for the type of file the translator can comprehend

getImportClasses

public static java.lang.String[] getImportClasses()
this is an accessor for the class names

importValuesIntoRun

public void importValuesIntoRun(Run importTo,
                                java.io.InputStream theFile)
this function is intended to import any values of variables in a file into the variables of a Run

importValuesIntoStudyDefaults

public void importValuesIntoStudyDefaults(Study importTo,
                                          java.io.InputStream theFile)
this functino is designed to import any values of a file that are different from a Code's defaults into a Study and make them study defaults

makeCodeFromNamelist

public Code makeCodeFromNamelist(java.lang.String codeName,
                                 java.io.InputStream theFile)
                          throws java.io.IOException
this function is designed to take an input stream from a file or other source and translate it into a Code object.

readVariable

public Variable readVariable(java.lang.String variableName,
                             java.io.InputStream theFile)
this function is designed to read in the variable of the passed name from the input file