Coverage details for umich.cac.pbs.AbortRecord

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 ABORT record, "A" record in PBS.
11  * <p>
12  *
13  * An example from PBS accounting file is below
14  *
15  * <pre>
16  * 05/13/2002 16:35:12;A;5417.head;
17  * </pre>
18  *
19  * @author rmach@umich.edu
20  * @version $Header: /cvsroot/pbsaccounting/pbsaccounting/src/umich/cac/pbs/AbortRecord.java,v 1.4 2003/10/21 19:39:02 rodmach Exp $
21  */
22  
233public class AbortRecord implements PbsRecordParser {
24  
25     /**
26      * Logger instance
27      */
28  
296    private Logger logger = Logger.getLogger(AbortRecord.class.getName());
30  
31     /**
32      * Return the XML representation of an R record, inside &ltabort_record&gt
33      * tags.
34      * <p>
35      *
36      * @param rawfields
37      * Array from PBS containing the abort record (A record)
38      * @return The abort record converted to XML
39      */
40  
41     public String processRecord(String[] rawfields) {
42  
43         //This field
44  
450        Field abortField =
46             new Field(FieldName.ABORT_FIELD, "abort_record", FieldType.GENERIC);
47  
48         //The JOB ID
49  
500        Field jobIdField =
51             FieldFactory.getInstance().getField(
52                 FieldName.JOBID,
53                 rawfields[RecordPosition.JOB_ID]);
54  
550        abortField.addChild(jobIdField);
56  
57         //The DATE
58  
590        Field dateField =
60             FieldFactory.getInstance().getField(
61                 FieldName.DATE,
62                 rawfields[RecordPosition.DATE_TIME]);
63  
640        abortField.addChild(dateField);
65  
660        return abortField.toXML();
67  
68     }
69  
70 }

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.