eu.unicore.hila.job.model
Class JobModel

java.lang.Object
  extended by eu.unicore.hila.job.model.JobModel

public class JobModel
extends Object

A convenience class to help build JSDL documents. Instantiate an object of this class and use the set and add methods to set or add

Executable and Application (by name and optional version) are mutually exclusive, which is enforced by the methods. Whatever is set last will be used.

Author:
bjoernh

Constructor Summary
JobModel()
           
 
Method Summary
 void addArgument(String argument)
           
 void addEnvironment(String variable, String value)
           
 void addExport(File _localFile)
           
 void addExport(String _fileName, File _localFile)
          An Export from the working directory of the job to the local file system.
 void addImport(File _localFile)
           
 void addImport(File _localFile, String _filename)
          Import local file into the job's working directory before the job starts.
 void addJobAnnotation(String _annotation)
           
 void addJobProject(String _project)
           
 void addStageIn(StageIn stageIn)
           
 void addStageOut(StageOut stageout)
           
 String getApplicationDescription()
           
 String getApplicationName()
          Get the name of the application currently defined.
 String getApplicationVersion()
          Get the version of the application to be used.
 List<String> getArguments()
           
 Map<String,String> getEnvironment()
           
 String getExecutable()
           
 List<Export> getExports()
          Get the List of Exports already defined.
 List<Import> getImports()
          Get the List of Imports already defined.
 List<String> getJobAnnotations()
           
 String getJobDescription()
           
 long getLastModified()
           
 org.ggf.schemas.jsdl.x2005.x11.jsdl.ResourcesType getResources()
           
 List<StageIn> getStageIns()
           
 List<StageOut> getStageOuts()
           
 String getStderr()
           
 String getStdin()
           
 String getStdout()
           
 String getTaskName()
           
 boolean isClientDataPush()
           
 void setApplicationDescription(String _applicationDescription)
           
 void setApplicationName(String applicationName)
          Set the name of the application to be used.
 void setApplicationVersion(String applicationVersion)
          Set the version of the application to be used.
 void setArguments(List<String> arguments)
           
 void setClientDataPush(boolean clientDataPush)
           
 void setEnvironment(Map<String,String> environment)
           
 void setExecutable(String executable)
           
 void setExports(List<Export> exports)
          Set the list of Exports.
 void setImports(List<Import> imports)
          Set the List of Imports.
 void setJobDescription(String _description)
           
 void setResources(org.ggf.schemas.jsdl.x2005.x11.jsdl.ResourcesType _resources)
           
 void setStderr(String stderr)
           
 void setStdin(String stdin)
           
 void setStdout(String stdout)
           
 void setTaskName(String _taskName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JobModel

public JobModel()
Method Detail

getImports

public List<Import> getImports()
Get the List of Imports already defined.

Returns:

setImports

public void setImports(List<Import> imports)
Set the List of Imports.

Parameters:
imports -

getLastModified

public long getLastModified()

getExports

public List<Export> getExports()
Get the List of Exports already defined.

Returns:

setExports

public void setExports(List<Export> exports)
Set the list of Exports.

Parameters:
exports -

getApplicationName

public String getApplicationName()
Get the name of the application currently defined.

Returns:
The name of the application, if it is defined. null otherwise.

setApplicationName

public void setApplicationName(String applicationName)
Set the name of the application to be used.

Parameters:
applicationName -

getApplicationVersion

public String getApplicationVersion()
Get the version of the application to be used.

Returns:
The version of the application, if defined. null otherwise.

setApplicationVersion

public void setApplicationVersion(String applicationVersion)
Set the version of the application to be used.

Parameters:
applicationVersion -

setApplicationDescription

public void setApplicationDescription(String _applicationDescription)
Parameters:
_applicationDescription -

getApplicationDescription

public String getApplicationDescription()
Returns:
the applicationDescription

getExecutable

public String getExecutable()

setExecutable

public void setExecutable(String executable)

getArguments

public List<String> getArguments()

setArguments

public void setArguments(List<String> arguments)

getEnvironment

public Map<String,String> getEnvironment()

setEnvironment

public void setEnvironment(Map<String,String> environment)

setResources

public void setResources(org.ggf.schemas.jsdl.x2005.x11.jsdl.ResourcesType _resources)

getResources

public org.ggf.schemas.jsdl.x2005.x11.jsdl.ResourcesType getResources()

addArgument

public void addArgument(String argument)

addEnvironment

public void addEnvironment(String variable,
                           String value)

addExport

public void addExport(String _fileName,
                      File _localFile)
An Export from the working directory of the job to the local file system.

Parameters:
_fileName -
_localFile -

addExport

public void addExport(File _localFile)
Parameters:
_localFile -

addImport

public void addImport(File _localFile,
                      String _filename)
Import local file into the job's working directory before the job starts.

Parameters:
_localFile -
_filename -

addImport

public void addImport(File _localFile)
Parameters:
_localFile -
See Also:
addImport(File, String)

getTaskName

public String getTaskName()

setTaskName

public void setTaskName(String _taskName)

addJobAnnotation

public void addJobAnnotation(String _annotation)
Parameters:
_annotation -

getJobAnnotations

public List<String> getJobAnnotations()
Returns:

setJobDescription

public void setJobDescription(String _description)
Parameters:
_description -

getJobDescription

public String getJobDescription()
Returns:
the description

addJobProject

public void addJobProject(String _project)
Parameters:
project -

getStageOuts

public List<StageOut> getStageOuts()
Returns:

getStageIns

public List<StageIn> getStageIns()

addStageOut

public void addStageOut(StageOut stageout)
Parameters:
stageout -

addStageIn

public void addStageIn(StageIn stageIn)
Parameters:
stageIn -

getStdout

public String getStdout()
Returns:
the stdout

setStdout

public void setStdout(String stdout)
Parameters:
stdout - the stdout to set

getStderr

public String getStderr()
Returns:
the stderr

setStderr

public void setStderr(String stderr)
Parameters:
stderr - the stderr to set

getStdin

public String getStdin()
Returns:
the stdin

setStdin

public void setStdin(String stdin)
Parameters:
stdin - the stdin to set

isClientDataPush

public boolean isClientDataPush()
Returns:
the clientDataPush

setClientDataPush

public void setClientDataPush(boolean clientDataPush)
Parameters:
clientDataPush - the clientDataPush to set


Copyright © 2010-2013 UNICORE. All Rights Reserved.