cct.grid
Class CheckPoint

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap
          extended by cct.grid.CheckPoint
All Implemented Interfaces:
CheckPointInterface, java.io.Serializable, java.lang.Cloneable, java.util.Map

public class CheckPoint
extends java.util.HashMap
implements CheckPointInterface

Title: Molecular Structure Viewer/Editor

Description: Computational Chemistry Toolkit

Copyright: Copyright (c) 2006

Company: ANU

See Also:
Serialized Form

Field Summary
(package private) static boolean Debug
           
(package private) static java.lang.String inputStatusPrefix
           
(package private)  java.lang.String Message
           
(package private)  boolean outputFilesStatusUpdated
           
(package private) static java.lang.String outputStatusPrefix
           
(package private)  java.util.HashMap resourcesUsed
           
 
Fields inherited from interface cct.grid.CheckPointInterface
batchJobTag, computerTag, executableTag, firstLevelTags, handleTag, inputFilesTag, JOB_STATUS_DONE, JOB_STATUS_PENDING, JOB_STATUS_UNKNOWN, jobNameTag, JobSpecificationTag, JobSpecificationTags, localDirectoryTag, localExecutableTag, outputFilesTag, overallJobStatusTag, PARSE_JOB_SPECIFICATION_TAGS, PARSE_OUTPUT_FILES_TAGS, PARSE_SERVICE_TAGS, PARSE_TASK_TAGS, programTag, providerTag, remoteDirectoryTag, serviceTag, serviceTags, softwareTag, statusTag, stdErrorTag, stdOutputTag, submittedTimeTag, tasksTag, taskTag
 
Constructor Summary
CheckPoint()
           
CheckPoint(java.lang.String options, java.lang.String devider)
           
 
Method Summary
 boolean areOutputFilesLoaded()
          Informs whether remote output files are downloaded on a local computer
static java.lang.String CreateCheckpointString(java.util.ArrayList Tasks)
           
(package private) static boolean createElements(javax.xml.transform.sax.TransformerHandler hd, java.util.HashMap entries)
          Prints all tags and their values of "entries"
(package private) static boolean createElements(javax.xml.transform.sax.TransformerHandler hd, java.util.HashMap list, java.util.HashMap elements)
           
 void downloadOutputFiles(FileTransferInterface fileTransferHandler)
           
static java.util.HashMap getCheckPointSpecifications()
          Returns all possible specifications of checkpoint
 java.lang.String getComputer()
           
 java.lang.String getExecutable()
           
 java.lang.String getFullLocalPath(java.lang.String fileName)
           
 java.util.HashMap getHashMap()
          Returns checkpoint as a HashMap
 java.lang.String getJobHandle()
           
 java.lang.String getJobName()
           
 java.lang.String getJobStatus()
           
 java.lang.String getJobSubmitTime()
           
 java.lang.String getLocalDirectory()
           
 java.lang.String getMessage()
           
 java.util.HashMap getOutputFilesEntry()
           
 java.lang.String getOutputFileType(java.lang.String fileName)
           
 java.lang.String getOverallJobStatus()
           
 java.lang.String getProgram()
           
 java.lang.String getRemoteDirectory()
           
 java.util.HashMap getResourcesUsed()
           
 java.lang.String getServiceTag(java.lang.String tag)
          Query spesific "service" tags
 java.lang.String getTaskProvider()
           
 boolean hasOutputFile(java.lang.String fileName)
           
 boolean hasOutputFiles()
           
 boolean isOutputFileDownloaded(java.lang.String fileName)
           
 boolean isOutputFilesStatusUpdated()
           
 int saveCheckPoint(java.lang.String file_name)
           
 void setInputFile(java.lang.String tag, java.lang.String value, boolean local_file)
           
 void setJobStatus(java.lang.String status)
           
 void setOutputFile(java.lang.String tag, java.lang.String value)
           
 void setOutputFile(java.lang.String tag, java.lang.String value, boolean local_file)
           
 void setOverallJobStatus(java.lang.String status)
           
 void setResourcesUsed(java.util.HashMap rused)
           
 void setServiceTag(java.lang.String tag, java.lang.String value, boolean overwrite)
          Sets service tag which is in general could be some custom value
 java.lang.String updateJobStatus()
           
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Field Detail

outputStatusPrefix

static final java.lang.String outputStatusPrefix
See Also:
Constant Field Values

inputStatusPrefix

static final java.lang.String inputStatusPrefix
See Also:
Constant Field Values

resourcesUsed

java.util.HashMap resourcesUsed

Debug

static boolean Debug

outputFilesStatusUpdated

boolean outputFilesStatusUpdated

Message

java.lang.String Message
Constructor Detail

CheckPoint

public CheckPoint()

CheckPoint

public CheckPoint(java.lang.String options,
                  java.lang.String devider)
           throws MalformedCheckPointException
Parameters:
options - String
devider - String
Throws:
MalformedCheckPointException
Method Detail

getCheckPointSpecifications

public static java.util.HashMap getCheckPointSpecifications()
Returns all possible specifications of checkpoint

Returns:
HashMap

getHashMap

public java.util.HashMap getHashMap()
Returns checkpoint as a HashMap

Returns:
HashMap checkpoint

getMessage

public java.lang.String getMessage()

getResourcesUsed

public java.util.HashMap getResourcesUsed()

setResourcesUsed

public void setResourcesUsed(java.util.HashMap rused)

getJobStatus

public java.lang.String getJobStatus()

getJobName

public java.lang.String getJobName()

getProgram

public java.lang.String getProgram()

getJobSubmitTime

public java.lang.String getJobSubmitTime()

setJobStatus

public void setJobStatus(java.lang.String status)

setOverallJobStatus

public void setOverallJobStatus(java.lang.String status)

getOverallJobStatus

public java.lang.String getOverallJobStatus()

getJobHandle

public java.lang.String getJobHandle()

getTaskProvider

public java.lang.String getTaskProvider()

getComputer

public java.lang.String getComputer()

getRemoteDirectory

public java.lang.String getRemoteDirectory()

getExecutable

public java.lang.String getExecutable()

getLocalDirectory

public java.lang.String getLocalDirectory()

updateJobStatus

public java.lang.String updateJobStatus()
                                 throws java.lang.Exception
Throws:
java.lang.Exception

downloadOutputFiles

public void downloadOutputFiles(FileTransferInterface fileTransferHandler)
                         throws MalformedCheckPointException
Throws:
MalformedCheckPointException

isOutputFilesStatusUpdated

public boolean isOutputFilesStatusUpdated()

areOutputFilesLoaded

public boolean areOutputFilesLoaded()
Informs whether remote output files are downloaded on a local computer

Returns:
boolean "true" if ALL output files are downloaded on local computer, and "false" otherwise

getOutputFilesEntry

public java.util.HashMap getOutputFilesEntry()
Returns:
HashMap Entry for Output Files

hasOutputFiles

public boolean hasOutputFiles()

hasOutputFile

public boolean hasOutputFile(java.lang.String fileName)

isOutputFileDownloaded

public boolean isOutputFileDownloaded(java.lang.String fileName)
                               throws java.lang.Exception
Throws:
java.lang.Exception

getFullLocalPath

public java.lang.String getFullLocalPath(java.lang.String fileName)
                                  throws java.lang.Exception
Throws:
java.lang.Exception

getOutputFileType

public java.lang.String getOutputFileType(java.lang.String fileName)
                                   throws java.lang.Exception
Throws:
java.lang.Exception

setOutputFile

public void setOutputFile(java.lang.String tag,
                          java.lang.String value)
                   throws java.lang.Exception
Specified by:
setOutputFile in interface CheckPointInterface
Parameters:
tag - String
value - String
Throws:
MalformedCheckPointException
java.lang.Exception

setOutputFile

public void setOutputFile(java.lang.String tag,
                          java.lang.String value,
                          boolean local_file)
                   throws MalformedCheckPointException
Parameters:
tag - String
value - String
local_file - boolean
Throws:
MalformedCheckPointException

getServiceTag

public java.lang.String getServiceTag(java.lang.String tag)
Query spesific "service" tags

Parameters:
tag - String - Tag
Returns:
String - Value, or null is no such tag

setServiceTag

public void setServiceTag(java.lang.String tag,
                          java.lang.String value,
                          boolean overwrite)
                   throws java.lang.Exception
Sets service tag which is in general could be some custom value

Specified by:
setServiceTag in interface CheckPointInterface
Parameters:
tag - String - tag
value - String - value
Throws:
MalformedCheckPointException
java.lang.Exception

setInputFile

public void setInputFile(java.lang.String tag,
                         java.lang.String value,
                         boolean local_file)
                  throws MalformedCheckPointException
Throws:
MalformedCheckPointException

saveCheckPoint

public int saveCheckPoint(java.lang.String file_name)
                   throws java.lang.Exception
Parameters:
file_name - String
Returns:
int
Throws:
java.lang.Exception

CreateCheckpointString

public static java.lang.String CreateCheckpointString(java.util.ArrayList Tasks)
                                               throws MalformedCheckPointException,
                                                      org.xml.sax.SAXException
Throws:
MalformedCheckPointException
org.xml.sax.SAXException

createElements

static boolean createElements(javax.xml.transform.sax.TransformerHandler hd,
                              java.util.HashMap list,
                              java.util.HashMap elements)
                       throws MalformedCheckPointException,
                              org.xml.sax.SAXException
Parameters:
hd - TransformerHandler
list - HashSet
elements - HashMap
Returns:
boolean
Throws:
MalformedCheckPointException
org.xml.sax.SAXException

createElements

static boolean createElements(javax.xml.transform.sax.TransformerHandler hd,
                              java.util.HashMap entries)
                       throws org.xml.sax.SAXException
Prints all tags and their values of "entries"

Parameters:
hd - TransformerHandler
entries - HashMap
Returns:
boolean
Throws:
org.xml.sax.SAXException