org.globus.exec.utils.rsl
Class RSLHelper

java.lang.Object
  extended byorg.globus.exec.utils.rsl.RSLHelper

public class RSLHelper
extends java.lang.Object


Field Summary
static javax.xml.namespace.QName FACTORY_ENDPOINT_ATTRIBUTE_QNAME
          QName of the element "factoryEndpoint" used as a job attribute in RSL.
private static org.globus.util.I18n i18n
           
private static org.apache.commons.logging.Log logger
           
 
Constructor Summary
RSLHelper()
           
 
Method Summary
static void addEnvironmentVariable(JobDescriptionType jobDescription, java.lang.String variableName, java.lang.String value)
          Add environment variable to job description if there is no variable with the same name.
static java.lang.String convertToString(JobDescriptionType jobDescription)
          Serializes the job description to XML.
static JobDescriptionType makeSimpleJob(java.lang.String commandLine)
          Makes a simple JobDescriptionType based on a command line.
static JobDescriptionType readRSL(java.io.File rslFile)
           
static JobDescriptionType readRSL(java.io.InputStream rslInputStream)
           
static JobDescriptionType readRSL(java.lang.String rslString)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FACTORY_ENDPOINT_ATTRIBUTE_QNAME

public static final javax.xml.namespace.QName FACTORY_ENDPOINT_ATTRIBUTE_QNAME
QName of the element "factoryEndpoint" used as a job attribute in RSL.


i18n

private static org.globus.util.I18n i18n

logger

private static org.apache.commons.logging.Log logger
Constructor Detail

RSLHelper

public RSLHelper()
Method Detail

addEnvironmentVariable

public static void addEnvironmentVariable(JobDescriptionType jobDescription,
                                          java.lang.String variableName,
                                          java.lang.String value)
Add environment variable to job description if there is no variable with the same name.

Parameters:
jobDescription - JobDescriptionType
variableName - String
value - String

makeSimpleJob

public static JobDescriptionType makeSimpleJob(java.lang.String commandLine)
Makes a simple JobDescriptionType based on a command line. The resulting RSL will have only an "executable" and zero or more "arguments" tags.

Returns:
JobDescriptionType

readRSL

public static JobDescriptionType readRSL(java.io.File rslFile)
                                  throws RSLParseException,
                                         java.io.FileNotFoundException
Throws:
RSLParseException
java.io.FileNotFoundException

readRSL

public static JobDescriptionType readRSL(java.lang.String rslString)
                                  throws RSLParseException
Throws:
RSLParseException

readRSL

public static JobDescriptionType readRSL(java.io.InputStream rslInputStream)
                                  throws RSLParseException
Throws:
RSLParseException

convertToString

public static java.lang.String convertToString(JobDescriptionType jobDescription)
Serializes the job description to XML.

Parameters:
jobDescription - JobDescriptionType The job description to convert
Returns:
String An XML string representation of the job description
Throws:
java.lang.Exception