uk.ac.soton.itinnovation.grid.service.types.jsdl
Class JobDescription

java.lang.Object
  extended by uk.ac.soton.itinnovation.grid.service.types.jsdl.RecognisedElementParser
      extended by uk.ac.soton.itinnovation.grid.service.types.jsdl.JobDescription

public class JobDescription
extends RecognisedElementParser

Class used for parsing and creating JSDL documents.


Field Summary
static String GRID_NS
           
static String JSDL_NS
           
static String JSDL_POSIX_NS
           
static String WSA_NS
           
 
Constructor Summary
JobDescription(Document jsdl)
          Validates and parses a JSDL document
JobDescription(Element jobDescription)
          Validates and parses the top-level element of a JSDL document
JobDescription(File jsdlFile)
          Validates and parses a JSDL document from a file.
JobDescription(String jobName, ApplicationMetadata metadata)
          Creates a new JSDL description with the given job name and the default number of inputs and outputs.
JobDescription(String jobName, String appUri)
          Creates a new, empty JSDL description with the given job name and application URI.
 
Method Summary
 void addStager(String name)
          Creates and adds a new DataStaging section with the given name
 Application getApplication()
           
 DataStaging getDataStaging(String name)
           
 DataStaging[] getDataStagings()
           
 org.apache.axis.message.addressing.EndpointReferenceType getJobEPR()
           
 JobIdentification getJobIdentification()
           
 Document getOriginalDocument()
           
 Resources getResources()
           
protected  void parseElement(Element e, String namespace, String localName)
           
 void setDataStagerEPR(String name, org.apache.axis.message.addressing.EndpointReferenceType epr)
           
 void setJobEPR(org.apache.axis.message.addressing.EndpointReferenceType epr)
           
 Document toXML()
          Generates a new XML document representing this JSDL description.
 
Methods inherited from class uk.ac.soton.itinnovation.grid.service.types.jsdl.RecognisedElementParser
addOtherNode, addRecognisedElement, addRecognisedElements, importOtherNodes, parse, removeOtherNode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JSDL_NS

public static final String JSDL_NS
See Also:
Constant Field Values

JSDL_POSIX_NS

public static final String JSDL_POSIX_NS
See Also:
Constant Field Values

GRID_NS

public static final String GRID_NS
See Also:
Constant Field Values

WSA_NS

public static final String WSA_NS
See Also:
Constant Field Values
Constructor Detail

JobDescription

public JobDescription(Document jsdl)
Validates and parses a JSDL document

Parameters:
jsdl - The JSDL document

JobDescription

public JobDescription(Element jobDescription)
Validates and parses the top-level element of a JSDL document

Parameters:
jobDescription - The <JobDescription> element of a JSDL document

JobDescription

public JobDescription(String jobName,
                      ApplicationMetadata metadata)
Creates a new JSDL description with the given job name and the default number of inputs and outputs. Further fields can be filled in by using setter methods of this class and its children.

Parameters:
jobName - A user-specified descriptive name for the job
metadata - The job metadata.

JobDescription

public JobDescription(String jobName,
                      String appUri)
Creates a new, empty JSDL description with the given job name and application URI. Further fields can be filled in by using setter methods of this class and its children.

Parameters:
jobName - A user-specified descriptive name for the job
appUri - The application URI. You can call getApplications() on the Job service to obtain a list of these URIs.

JobDescription

public JobDescription(File jsdlFile)
               throws GridFailureException
Validates and parses a JSDL document from a file.

Parameters:
jsdlFile - The file to parse
Throws:
GridFailureException
Method Detail

parseElement

protected void parseElement(Element e,
                            String namespace,
                            String localName)
Specified by:
parseElement in class RecognisedElementParser

getOriginalDocument

public Document getOriginalDocument()

getJobIdentification

public JobIdentification getJobIdentification()

getApplication

public Application getApplication()

getResources

public Resources getResources()

getDataStagings

public DataStaging[] getDataStagings()

getDataStaging

public DataStaging getDataStaging(String name)

getJobEPR

public org.apache.axis.message.addressing.EndpointReferenceType getJobEPR()

setJobEPR

public void setJobEPR(org.apache.axis.message.addressing.EndpointReferenceType epr)

setDataStagerEPR

public void setDataStagerEPR(String name,
                             org.apache.axis.message.addressing.EndpointReferenceType epr)

toXML

public Document toXML()
               throws GridFailureException
Generates a new XML document representing this JSDL description. Contains all the required sections, and any other elements added with RecognisedElementParser.addOtherNode(org.w3c.dom.Node).

Throws:
GridFailureException

addStager

public void addStager(String name)
Creates and adds a new DataStaging section with the given name

Parameters:
name -


Copyright © 2001-2007 University of Southampton IT Innovation Centre. All Rights Reserved.