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:
16: package org.griphyn.vdl.router;
17:
18: import org.griphyn.vdl.classes.*;
19: import org.griphyn.vdl.router.*;
20: import org.griphyn.vdl.util.Logging;
21: import java.io.*;
22:
23: public class ShowFullDiamond {
24: public static void main(String[] args)
25: throws IllegalArgumentException, IOException {
26: // create debug output
27: Logging.instance().register("dag", System.err);
28: Logging.instance().register("state", System.err);
29: Logging.instance().register("route", System.err);
30:
31: // start timer
32: long start = System.currentTimeMillis();
33:
34: // create the diamond
35: Definitions diamond = org.griphyn.vdl.router.CreateFullDiamond
36: .create();
37: if (args.length > 0
38: && args[0] != null
39: && (args[0].equalsIgnoreCase("vdlt") || args[0]
40: .startsWith("t")))
41: System.out.println(diamond.toString());
42: else {
43: BufferedWriter bw = new BufferedWriter(
44: new OutputStreamWriter(System.out));
45: diamond.toXML(bw, "");
46: bw.flush(); // IMPORTANT!
47: }
48: long diff = System.currentTimeMillis() - start;
49: System.err.println("execution time: " + diff + " ms");
50: System.exit(0);
51: }
52: }
|