org.peace_tools.workspace
Class JobSummary

java.lang.Object
  extended by org.peace_tools.workspace.JobBase
      extended by org.peace_tools.workspace.JobSummary

public class JobSummary
extends JobBase

Class to encapsulate some basic information about a Job. This class is used within the MSTData and MSTClusterData classes. This class serves merely as a read-only type class that is created when a new job is run. The data is persisted in the XML work space for future reference so that users can determine some core characteristics of the Job that was run to generate a given data set.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.peace_tools.workspace.JobBase
JobBase.JobStatusType
 
Field Summary
private  int cpus
          The total number of CPUs (Nodes * CPUsPerNode) that were used for running the job.
private  java.lang.String filtersSummary
          A string that contains summary of filters run as a part of the job used to generate the associated data.
private  java.lang.String heuristicsSummary
          A string that contains summary of heuristics run as a part of the job used to generate the associated data.
private  java.lang.String serverName
          The domain name (or IP address) of the server on which the job was actually run.
 
Fields inherited from class org.peace_tools.workspace.JobBase
jobID, runtime, serverID, status
 
Constructor Summary
JobSummary(Job job)
          A convenience constructor.
JobSummary(Job job, FWAnalyzer.FWAnalyzerType analyzerType)
          A convenience constructor.
JobSummary(java.lang.String jobID, java.lang.String serverID, int cpus, java.lang.String serverName, java.lang.String heuristicsSummary, java.lang.String filtersSummary)
          Constructor to create a common job object with the fixed value fields initialized to specific values.
 
Method Summary
static JobSummary create(org.w3c.dom.Element jobNode)
          Helper method to utilize data from a DOM tree to create a suitable JobSummary entry.
 int getCPUs()
          The total number of CPUS that was computed and stored in this summary when the JobSummary object was created.
 java.lang.String getFiltersSummary()
          Obtain a summary of the filters run as a part of the data.
 java.lang.String getHeuristicsSummary()
          Obtain a summary of the heuristics run as a part of the data.
 java.lang.String getServerName()
          The server name that was obtained from the Server entry and stored in this summary when the JobSummary object was created.
 void marshall(org.w3c.dom.Element jobList)
          Method to marshall the data stored in this object to become part of a DOM tree element passed in.
 void marshall(java.io.PrintWriter out)
          Method to marshall the data stored in this object directly to a XML fragment.
 
Methods inherited from class org.peace_tools.workspace.JobBase
getJobID, getRunTime, getServerID, getStatus, isDone, setRunTime, setStatus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serverName

private final java.lang.String serverName
The domain name (or IP address) of the server on which the job was actually run.


cpus

private final int cpus
The total number of CPUs (Nodes * CPUsPerNode) that were used for running the job.


heuristicsSummary

private final java.lang.String heuristicsSummary
A string that contains summary of heuristics run as a part of the job used to generate the associated data. This string is simply stored as the command line parameter passed to the PEACE clustering tool.


filtersSummary

private final java.lang.String filtersSummary
A string that contains summary of filters run as a part of the job used to generate the associated data. This string is simply stored as the command line parameter passed to the PEACE clustering tool.

Constructor Detail

JobSummary

public JobSummary(java.lang.String jobID,
                  java.lang.String serverID,
                  int cpus,
                  java.lang.String serverName,
                  java.lang.String heuristicsSummary,
                  java.lang.String filtersSummary)
Constructor to create a common job object with the fixed value fields initialized to specific values.

Parameters:
jobID - The work space-wide unique, generated job ID for this job. The jobID is generated via a call to JobList.reserveJobID() method. This is a valid string (typically in the form job####)
serverID - The ID of the server on which this job is running. This is a cross reference ID of a Server configured in this work space.
cpus - The total number of CPUs that were used to run this job.
serverName - The name (or IP address) of the server on which this job was run.
heuristicsSummary - The command line parameter(s) passed to the PEACE clustering engine (C++ side) to configure heuristics to accelerate clustering.
filtersSummary - The command line parameter(s) passed to the PEACE clustering engine (C++ side) to configure filters to improve clustering quality.

JobSummary

public JobSummary(Job job)
A convenience constructor. The constructor uses the complete Job object to populate the various summary information that is contained in this class.

Parameters:
job - The job object to be used for summarizing the information associated with this job.

JobSummary

public JobSummary(Job job,
                  FWAnalyzer.FWAnalyzerType analyzerType)
A convenience constructor. The constructor uses the complete Job object to populate the various summary information that is contained in this class.

Parameters:
job - The job object to be used for summarizing the information associated with this job.
analyzerType - The type of analyzer used for the job. If the analyzer's type is TwoPassD2 that uses automatic heuristics, then the heuristic summary is set to an empty string.
Method Detail

create

public static JobSummary create(org.w3c.dom.Element jobNode)
                         throws java.lang.Exception
Helper method to utilize data from a DOM tree to create a suitable JobSummary entry. This method is typically used to create a suitable JobSummary entry when loading a Work space into the GUI.

Parameters:
jobNode - The DOM element to be used for creating the summary entry and populating with the needed data.
Returns:
The newly created job summary entry based on the DOM data.
Throws:
java.lang.Exception - This method throws an exception when errors occur during reading and processing elements from the DOM node.

getServerName

public java.lang.String getServerName()
The server name that was obtained from the Server entry and stored in this summary when the JobSummary object was created.

Returns:
The domain name (or IP address) of the server on which the Job was run.

getCPUs

public int getCPUs()
The total number of CPUS that was computed and stored in this summary when the JobSummary object was created.

Returns:
The total number of CPUs that were used for this job.

getHeuristicsSummary

public java.lang.String getHeuristicsSummary()
Obtain a summary of the heuristics run as a part of the data. This method can be used to obtain a summary representation of the heuristics used in the job to generate the associated data.

Returns:
A summary information about the heuristics used. This information is stored as the command line parameters passed to the PEACE clustering engine.

getFiltersSummary

public java.lang.String getFiltersSummary()
Obtain a summary of the filters run as a part of the data. This method can be used to obtain a summary representation of the filters used in the job to generate the associated data.

Returns:
A summary information about the filters used. This information is stored as the command line parameters passed to the PEACE clustering engine.

marshall

public final void marshall(org.w3c.dom.Element jobList)
Method to marshall the data stored in this object to become part of a DOM tree element passed in. This method assumes that the element passed in corresponds to the parent JobList node in the DOM tree.

Parameters:
jobList - The DOM element corresponding to the "JobList" node that contains this entry.

marshall

public final void marshall(java.io.PrintWriter out)
Method to marshall the data stored in this object directly to a XML fragment. The XML fragment is guaranteed to be compatible with the PEACE work space configuration data.

Parameters:
out - The stream to which the XML must be serialized.