01: /*
02: * This file or a portion of this file is licensed under the terms of
03: * the Globus Toolkit Public License, found in file ../GTPL, or at
04: * http://www.globus.org/toolkit/download/license.html. This notice must
05: * appear in redistributions of this file, with or without modification.
06: *
07: * Redistributions of this Software, with or without modification, must
08: * reproduce the GTPL in: (1) the Software, or (2) the Documentation or
09: * some other similar material which is provided with the Software (if
10: * any).
11: *
12: * Copyright 1999-2004 University of Chicago and The University of
13: * Southern California. All rights reserved.
14: */
15: package org.griphyn.vdl.workflow;
16:
17: import org.griphyn.vdl.directive.*;
18: import org.griphyn.vdl.util.*;
19: import org.griphyn.vdl.dbschema.*;
20: import java.sql.SQLException;
21: import java.io.*;
22: import java.util.*;
23:
24: /**
25: * This class is used to show-case some elementary WF table stuff.
26: *
27: * @author Jens-S. Vöckler
28: * @version $Revision: 50 $
29: */
30: public class WorkflowTest // extends Toolkit
31: {
32: public static void asdf(DatabaseSchema dbschema)
33: throws SQLException {
34: WF workflow = (WF) dbschema;
35: Map x = workflow.getWorkflows(null);
36: for (Iterator i = x.values().iterator(); i.hasNext();) {
37: WorkEntry w = (WorkEntry) i.next();
38: System.out.println(w.toString());
39: }
40: }
41:
42: public static void main(String args[]) throws Exception {
43: // Connect the database.
44: String schemaName = ChimeraProperties.instance()
45: .getWFSchemaName();
46: Connect connect = new Connect();
47: DatabaseSchema dbschema = connect.connectDatabase(schemaName);
48: asdf(dbschema);
49: dbschema.close();
50: }
51: }
|