Coverage details for umich.cac.pbs.RerunRecord

LineHitsSource
1 package umich.cac.pbs;
2  
3 import java.util.logging.Logger;
4  
5 import umich.cac.data.Field;
6 import umich.cac.data.FieldName;
7 import umich.cac.data.FieldType;
8  
9 /**
10  * Process the RERUN record, "R" record in PBS.
11  * <p>
12  *
13  * An example from PBS accounting file is below
14  *
15  * <pre>
16  * 01/01/2003 17:55:15;R;15312.head;
17  * </pre>
18  *
19  * @author rmach@umich.edu
20  * @version $Header: /cvsroot/pbsaccounting/pbsaccounting/src/umich/cac/pbs/RerunRecord.java,v 1.3 2003/10/21 19:07:59 rodmach Exp $
21  */
22  
233public class RerunRecord implements PbsRecordParser {
24  
25     /** Logger instance */
266    private Logger logger = Logger.getLogger(RerunRecord.class.getName());
27  
28     /**
29      * Return the XML representation of an R record, inside &ltrerun_record&gt
30      * tags.
31      * <p>
32      *
33      * @param rawfields
34      * Array from PBS containing the rerun record (R record)
35      * @return The rerun record converted to XML
36      */
37     public String processRecord(String[] rawfields) {
38  
39         //This field
400        Field rerunField =
41             new Field(FieldName.RERUN_FIELD, "rerun_record", FieldType.GENERIC);
42  
43         //The JOB ID
440        Field jobIdField =
45             FieldFactory.getInstance().getField(
46                 FieldName.JOBID,
47                 rawfields[RecordPosition.JOB_ID]);
480        rerunField.addChild(jobIdField);
49  
50         //The DATE
510        Field dateField =
52             FieldFactory.getInstance().getField(
53                 FieldName.DATE,
54                 rawfields[RecordPosition.DATE_TIME]);
550        rerunField.addChild(dateField);
56  
570        return rerunField.toXML();
58  
59     }
60  
61 }

this report was generated by version 1.0.5 of jcoverage.
visit www.jcoverage.com for updates.

copyright © 2003, jcoverage ltd. all rights reserved.
Java is a trademark of Sun Microsystems, Inc. in the United States and other countries.