UniVista.namelist
Class NamelistOutput

java.lang.Object
  |
  +--UniVista.namelist.NamelistOutput
Direct Known Subclasses:
FortranNamelistOutput

public class NamelistOutput
extends java.lang.Object

this is the base class for all of the output filters for UniVista. It defines the common functions needed to translate the UniVista internal representations to external formats.


Field Summary
protected static java.lang.String[] outputMethods
          contains fully qualified classnames of all of the different output methods for use when instantiating them.
 
Constructor Summary
NamelistOutput()
           
 
Method Summary
 java.lang.String getDescription()
          return a human understandable description of the type of file the filter writes
static java.lang.String[] getExportClasses()
          accessor to get the different output method classnames known to UniVista
 java.lang.String outputForVariable(Variable theVar)
          translate the passed variable into a string output format.
 void writeToFile(Code toWrite, java.io.OutputStream outFile)
          this function should take the passed code and write it out on the passed OutputStream.
 void writeToFile(Run toWrite, java.io.OutputStream outFile)
          this function should take the passed Run and write it out its variable values on the passed OutputStream.
 void writeToFile(Study toWrite, java.io.OutputStream outFile)
          this function should take the passed Study and write out the default values of its variables on the output file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

outputMethods

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

NamelistOutput

public NamelistOutput()
Method Detail

getDescription

public java.lang.String getDescription()
return a human understandable description of the type of file the filter writes

getExportClasses

public static java.lang.String[] getExportClasses()
accessor to get the different output method classnames known to UniVista

outputForVariable

public java.lang.String outputForVariable(Variable theVar)
translate the passed variable into a string output format. Should be implemented only by export translators that use an ascii or unicode file format

writeToFile

public void writeToFile(Code toWrite,
                        java.io.OutputStream outFile)
this function should take the passed code and write it out on the passed OutputStream. The OutputStream may or may not point to a file.

writeToFile

public void writeToFile(Run toWrite,
                        java.io.OutputStream outFile)
this function should take the passed Run and write it out its variable values on the passed OutputStream. The OutputStream may or may not point to a file.

writeToFile

public void writeToFile(Study toWrite,
                        java.io.OutputStream outFile)
this function should take the passed Study and write out the default values of its variables on the output file. It should use the getVariable() function to get all of the variables in the Code with their appropriate defaults. The OutputStream may or may not point to a file.