View Javadoc

1   /*$Id: SummaryHelper.java,v 1.3 2004/07/26 12:07:38 nw Exp $
2    * Created on 17-Jun-2004
3    *
4    * Copyright (C) AstroGrid. All rights reserved.
5    *
6    * This software is published under the terms of the AstroGrid 
7    * Software License version 1.2, a copy of which has been included 
8    * with this distribution in the LICENSE.txt file.  
9    *
10  **/
11  package org.astrogrid.applications.manager.persist;
12  
13  import org.astrogrid.applications.Application;
14  import org.astrogrid.applications.beans.v1.cea.castor.ExecutionSummaryType;
15  import org.astrogrid.applications.beans.v1.cea.castor.InputListType;
16  
17  /***
18   * Helper class for  building execution summaries from applications 
19   * @author Noel Winstanley nw@jb.man.ac.uk 17-Jun-2004
20   *
21   */
22  public class SummaryHelper {
23       private SummaryHelper(){
24       }
25        
26  /*** Build a summary for an application.
27   * @param execID unique identifier for the application
28   * @param app the application to summarize
29   * @return a summary object for this application
30   */
31  public static ExecutionSummaryType summarize(String execID, Application app) {
32       ExecutionSummaryType summary = new ExecutionSummaryType();
33          summary.setApplicationName(app.getApplicationDescription().getName());
34          summary.setExecutionId(execID);
35          summary.setStatus(app.getStatus().toExecutionPhase());
36          summary.setInputList(new InputListType());
37          summary.getInputList().setInput(app.getInputParameters());
38          summary.setResultList(app.getResult());
39      return summary;
40  }
41   }
42  
43  /* 
44  $Log: SummaryHelper.java,v $
45  Revision 1.3  2004/07/26 12:07:38  nw
46  renamed indirect package to protocol,
47  renamed classes and methods within protocol package
48  javadocs
49  
50  Revision 1.2  2004/07/01 11:16:22  nw
51  merged in branch
52  nww-itn06-componentization
53  
54  Revision 1.1.2.2  2004/07/01 01:42:46  nw
55  final version, before merge
56  
57  Revision 1.1.2.1  2004/06/17 09:21:23  nw
58  finished all major functionality additions to core
59   
60  */