eu.planets_project.ifr.core.wee.api.workflow
Class WorkflowResult

java.lang.Object
  extended by eu.planets_project.ifr.core.wee.api.workflow.WorkflowResult
All Implemented Interfaces:
java.io.Serializable

public class WorkflowResult
extends java.lang.Object
implements java.io.Serializable

First draft of an actual WorkflowResult implementation.

See Also:
Serialized Form

Constructor Summary
WorkflowResult()
           
WorkflowResult(ReportingLog wfLogger)
           
WorkflowResult(java.net.URL report, java.net.URL log, java.util.List<java.net.URL> results)
           
 
Method Summary
 void addCharacterisationWorkflowResultItem(DigitalObject inputDigo, java.util.List<java.lang.String> characterisation, long startTime, long endTime, java.lang.String logInfo)
          Document a 'characterisation' specific workflow result item
 void addIdentificationWorkflowResultItem(DigitalObject inputDigo, java.util.List<java.lang.String> identifier, long startTime, long endTime, java.lang.String logInfo)
          Document a 'identification' specific workflow result item
 void addMigrationWorkflowResultItem(DigitalObject inputDigo, DigitalObject outputDigo, long startTime, long endTime, java.lang.String logInfo)
          Document a 'migration' specific workflow result item
 void addWorkflowResultItem(WorkflowResultItem item)
           
 long getDuration()
          Duration if the start time and end time of the workflow have been set
 long getEndTime()
          End Time of the entire workflow - server specific timestamp
 java.net.URL getLog()
           
 int getProgress()
          Indicates the percentage of digital objects out of the overall job have been processed.
 java.net.URL getReport()
           
 java.util.List<java.net.URL> getResults()
          Deprecated. 
 long getStartTime()
          Start Time of the entire workflow - server specific timestamp
 java.util.List<WorkflowResultItem> getWorkflowResultItems()
          returns a list of WorkflowResultItems in the order they took place
 boolean isPartialResults()
          Indicates if partial results or all results are contained within this WF report
 void setEndTime(long millis)
          End Time of the entire workflow - server specific timestamp
 void setLog(java.net.URL log)
           
 void setProgress(int i)
           
 void setReport(java.net.URL report)
           
 void setReportingLog(ReportingLog logger)
          Use a custom logger to report this - otherwise use default log.
 void setResults(java.util.List<java.net.URL> results)
          Deprecated. 
 void setStartTime(long millis)
          Start Time of the entire workflow - server specific timestamp
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WorkflowResult

public WorkflowResult()

WorkflowResult

public WorkflowResult(ReportingLog wfLogger)

WorkflowResult

public WorkflowResult(java.net.URL report,
                      java.net.URL log,
                      java.util.List<java.net.URL> results)
Parameters:
report - The location of the report
log - The location of the log
results - The location of the results
Method Detail

setReportingLog

public void setReportingLog(ReportingLog logger)
Use a custom logger to report this - otherwise use default log.

Parameters:
logger -

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object
See Also:
Object.toString()

getResults

@Deprecated
public java.util.List<java.net.URL> getResults()
Deprecated. 

A list of URL pointers to all objects that have been created within this workflow

Returns:
the objects

setResults

@Deprecated
public void setResults(java.util.List<java.net.URL> results)
Deprecated. 


getLog

public java.net.URL getLog()
Returns:
the log

setLog

public void setLog(java.net.URL log)

getReport

public java.net.URL getReport()
Returns:
the report

setReport

public void setReport(java.net.URL report)

setStartTime

public void setStartTime(long millis)
Start Time of the entire workflow - server specific timestamp

Parameters:
millis -

setEndTime

public void setEndTime(long millis)
End Time of the entire workflow - server specific timestamp

Parameters:
millis -

getStartTime

public long getStartTime()
Start Time of the entire workflow - server specific timestamp

Parameters:
millis -

getEndTime

public long getEndTime()
End Time of the entire workflow - server specific timestamp

Parameters:
millis -

getDuration

public long getDuration()
Duration if the start time and end time of the workflow have been set

Returns:

getWorkflowResultItems

public java.util.List<WorkflowResultItem> getWorkflowResultItems()
returns a list of WorkflowResultItems in the order they took place

Returns:

addWorkflowResultItem

public void addWorkflowResultItem(WorkflowResultItem item)

addMigrationWorkflowResultItem

public void addMigrationWorkflowResultItem(DigitalObject inputDigo,
                                           DigitalObject outputDigo,
                                           long startTime,
                                           long endTime,
                                           java.lang.String logInfo)
Document a 'migration' specific workflow result item

Parameters:
inputDigo - - the input data
outputDigo - - possibly an output file
startTime - - before the 'migration' service was called
endTime - - after the 'migration' service returned
logInfo - - any additional logInformation for this step

addIdentificationWorkflowResultItem

public void addIdentificationWorkflowResultItem(DigitalObject inputDigo,
                                                java.util.List<java.lang.String> identifier,
                                                long startTime,
                                                long endTime,
                                                java.lang.String logInfo)
Document a 'identification' specific workflow result item

Parameters:
inputDigo - - the input data
identifier - - possibly the extracted identifier(s)
startTime - - before the 'identification' service was called
endTime - - after the 'identification' service returned
logInfo - - any additional logInformation for this step

addCharacterisationWorkflowResultItem

public void addCharacterisationWorkflowResultItem(DigitalObject inputDigo,
                                                  java.util.List<java.lang.String> characterisation,
                                                  long startTime,
                                                  long endTime,
                                                  java.lang.String logInfo)
Document a 'characterisation' specific workflow result item

Parameters:
inputDigo - - the input data
characterisation - - extracted characteristics
startTime - - before the 'characterisation' service was called
endTime - - after the 'characterisation' service returned
logInfo - - any additional logInformation for this step

isPartialResults

public boolean isPartialResults()
Indicates if partial results or all results are contained within this WF report

Returns:

getProgress

public int getProgress()
Indicates the percentage of digital objects out of the overall job have been processed. This does not give any information about the success / failure

Returns:
0-100

setProgress

public void setProgress(int i)


Copyright © 2007-2010 The Planets Consortium. All Rights Reserved.