org.globus.exec.utils.rsl
Class RSLHelper
java.lang.Object
org.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
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
RSLHelper
public RSLHelper()
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 - JobDescriptionTypevariableName - Stringvalue - 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