g-Eclipse
Release 1.0.0

eu.geclipse.servicejob.parsers
Class GTDLJobParser

java.lang.Object
  extended by eu.geclipse.servicejob.parsers.GTDLJobParser

public class GTDLJobParser
extends java.lang.Object

General parser for the service job status file.


Field Summary
static java.lang.String OUTPUT_RESULT_DATA
          XML node - result data
static java.lang.String OUTPUT_RESULT_DATE
          XML node - date
static java.lang.String OUTPUT_RESULT_ELEMENT
          XML node - result
static java.lang.String OUTPUT_RESULT_ENUM
          XML node - bes status
static java.lang.String OUTPUT_RESULT_RESOURCE
          XML node - resource
static java.lang.String OUTPUT_RESULT_SERVICE_JOB
          XML node - simple service job name
static java.lang.String OUTPUT_RESULT_SUMMARY
          XML node - summary
static java.lang.String OUTPUT_RESULT_TYPE
          result type
static java.lang.String SCHEMA_LOCATION
          Path to location of the XML schema
 
Constructor Summary
GTDLJobParser()
           
 
Method Summary
static java.util.List<SubmittableServiceJobResult> getServiceJobResults(java.io.File file)
          Parses GTDL (grid test description language) file for service job results.
static java.util.List<java.lang.String> parseGeneralPartForResources(java.io.InputStream stream)
          Method to parse part of XML file in which resources are described for this service job.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SCHEMA_LOCATION

public static final java.lang.String SCHEMA_LOCATION
Path to location of the XML schema

See Also:
Constant Field Values

OUTPUT_RESULT_ELEMENT

public static final java.lang.String OUTPUT_RESULT_ELEMENT
XML node - result

See Also:
Constant Field Values

OUTPUT_RESULT_RESOURCE

public static final java.lang.String OUTPUT_RESULT_RESOURCE
XML node - resource

See Also:
Constant Field Values

OUTPUT_RESULT_DATE

public static final java.lang.String OUTPUT_RESULT_DATE
XML node - date

See Also:
Constant Field Values

OUTPUT_RESULT_SERVICE_JOB

public static final java.lang.String OUTPUT_RESULT_SERVICE_JOB
XML node - simple service job name

See Also:
Constant Field Values

OUTPUT_RESULT_DATA

public static final java.lang.String OUTPUT_RESULT_DATA
XML node - result data

See Also:
Constant Field Values

OUTPUT_RESULT_SUMMARY

public static final java.lang.String OUTPUT_RESULT_SUMMARY
XML node - summary

See Also:
Constant Field Values

OUTPUT_RESULT_ENUM

public static final java.lang.String OUTPUT_RESULT_ENUM
XML node - bes status

See Also:
Constant Field Values

OUTPUT_RESULT_TYPE

public static final java.lang.String OUTPUT_RESULT_TYPE
result type

See Also:
Constant Field Values
Constructor Detail

GTDLJobParser

public GTDLJobParser()
Method Detail

getServiceJobResults

public static java.util.List<SubmittableServiceJobResult> getServiceJobResults(java.io.File file)
                                                                        throws javax.xml.parsers.ParserConfigurationException,
                                                                               org.xml.sax.SAXException,
                                                                               java.io.IOException,
                                                                               org.w3c.dom.DOMException,
                                                                               java.text.ParseException
Parses GTDL (grid test description language) file for service job results. List of results that were found and parsed is returned. List elements are instances of ServiceJobResult - which means that they have String taken directly from XML as a service job's result. Only plug-in calling this method knows what to do with this String (available also as a InputStream - IServiceJob.getInputStreamForResult(IServiceJobResult)). This all means that data returned by this method has to modified by plug-in that called this method!

Parameters:
file - XML file (GTDL).
Returns:
List of ServiceJobResult representing data in XML file.
Throws:
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.io.IOException
org.w3c.dom.DOMException
java.text.ParseException

parseGeneralPartForResources

public static java.util.List<java.lang.String> parseGeneralPartForResources(java.io.InputStream stream)
Method to parse part of XML file in which resources are described for this service job.

Parameters:
stream - Input stream of XML to parse.
Returns:
List of resources.

g-Eclipse
Release 1.0.0