extensions.gem
Class createScript

java.lang.Object
  |
  +--extensions.gem.createScript
Direct Known Subclasses:
createCSH, createDQS, createGRD, createLSF, createPBS

public abstract class createScript
extends java.lang.Object

Program Name: createScript.java Comments: This is a parent class for all of the createJob scripts for the different platforms. It receives the ContextManager object from the calling JSP page (or whatever). This object is protected, and can be accesses by the children. We want to write the script to the user's "Descriptors" directory, which is located under the WEB-INF directory. It is thus not accessible by the web server and thus by the JSP pages. So we have to use a bean. The String scriptString is used to store the script as it is constructed. Part of this occurs here (the createCommands() method) and part must occur in the appropriate child (the createHeader() method). So this string is protected and inherited by the child classes. I am assuming the following naming convention for the ContextData: Directory: the user's decriptors directory (xml). IOStyle: type of I/O. Can by C-style, standard I/O, or internal(xml). WorkDir: name of the workspace directory in which the program will execute (xml). Name: name of problem (user). NumInParams: number of input parameters (xml). NumOutFiles: number of output files (xml). inputParam: values of the input parameters, include input filenames. Possibly multivalues. (user or xml). outputFiles: names of the output files. Possible multivalued (user or xml). execpath: full path of the executable (xml). The data source can either be from ApplDesc.xml (xml) or from the user (user).


Field Summary
protected  extensions.gem.ContextManager cm
           
protected  java.lang.String descDir
           
protected  ContextManagerBean my_cm
           
protected  java.io.PrintWriter pw
           
protected  java.lang.String scriptString
           
 
Constructor Summary
createScript()
           
createScript(ContextManagerBean cm, java.lang.String name)
           
createScript(extensions.gem.ContextManager cm, java.lang.String name)
           
createScript(moduleServerBean msb, java.lang.String name)
           
 
Method Summary
 void createCommands()
          The following method should be used to create the command portion of the job script.
abstract  void createFlagTable()
          The following method should be overriden by each child.
 void createHashCommands()
          This version of createCommands uses the hashtable instead of the context manager.
abstract  void createHeader()
          The following method is used to construct the header information with the queue specific directives.
 void writeScript()
          The child should construct the script as a single string and use the following method to print it out.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cm

protected extensions.gem.ContextManager cm

my_cm

protected ContextManagerBean my_cm

descDir

protected java.lang.String descDir

pw

protected java.io.PrintWriter pw

scriptString

protected java.lang.String scriptString
Constructor Detail

createScript

public createScript()

createScript

public createScript(ContextManagerBean cm,
                    java.lang.String name)

createScript

public createScript(moduleServerBean msb,
                    java.lang.String name)

createScript

public createScript(extensions.gem.ContextManager cm,
                    java.lang.String name)
Method Detail

writeScript

public void writeScript()
The child should construct the script as a single string and use the following method to print it out.

createFlagTable

public abstract void createFlagTable()
The following method should be overriden by each child. This creates a tag that associates each flag with its name for a given queuing system.

createHeader

public abstract void createHeader()
The following method is used to construct the header information with the queue specific directives. For example, a PBS script begins with #PBS -q default #PBS -l walltime=10:00:00 and so on. Must be overriden by each child.

createCommands

public void createCommands()
The following method should be used to create the command portion of the job script. This part is code specific, not queue specific, so we can do this here. Note this requires that the ContextData has the following properties set: IOStylem, WorkDir, Name. This is FRAGILE since changes in the JSP pages that collect info and store them in the ContextData can potentially break this method. Currently we have to really on a name convention. We have no way of enforcing this convention. Probably should move to XML/DTD for this reason.

createHashCommands

public void createHashCommands()
This version of createCommands uses the hashtable instead of the context manager.