Source Code Cross Referenced for Display.java in  » Workflow-Engines » pegasus-2.1.0 » org » griphyn » vdl » directive » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Workflow Engines » pegasus 2.1.0 » org.griphyn.vdl.directive 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * This file or a portion of this file is licensed under the terms of
003:         * the Globus Toolkit Public License, found in file GTPL, or at
004:         * http://www.globus.org/toolkit/download/license.html. This notice must
005:         * appear in redistributions of this file, with or without modification.
006:         *
007:         * Redistributions of this Software, with or without modification, must
008:         * reproduce the GTPL in: (1) the Software, or (2) the Documentation or
009:         * some other similar material which is provided with the Software (if
010:         * any).
011:         *
012:         * Copyright 1999-2004 University of Chicago and The University of
013:         * Southern California. All rights reserved.
014:         */
015:        package org.griphyn.vdl.directive;
016:
017:        import java.io.*;
018:        import java.util.*;
019:        import org.griphyn.vdl.dax.*;
020:        import org.griphyn.vdl.parser.DAXParser;
021:        import org.griphyn.vdl.util.Logging;
022:        import org.griphyn.vdl.util.DAX2DOT;
023:
024:        /**
025:         * The class converts a DAX specification into other formats
026:         * for visualization purposes.
027:         *
028:         * @see org.griphyn.vdl.parser.VDLxParser
029:         *
030:         * @author Jens-S. Vöckler
031:         * @author Yong Zhao
032:         * @version $Revision: 50 $
033:         */
034:        public class Display extends Directive {
035:            /**
036:             * instance variable that is managed by this interface for web
037:             * services.
038:             */
039:            private DAX2DOT m_dax;
040:
041:            /** 
042:             * Constructor.
043:             * @throws IOException
044:             * @throws MissingResourceException
045:             */
046:            public Display() throws IOException, MissingResourceException {
047:                super ();
048:                m_dax = new DAX2DOT();
049:            }
050:
051:            /**
052:             * Sets the graph size.
053:             *
054:             * @param h is the height in inches?
055:             * @param w is the width in inches?
056:             */
057:            public void setSize(double h, double w) {
058:                m_dax.setSize(h, w);
059:            }
060:
061:            /**
062:             * Determines whether to show derivations.
063:             * @param showDV if true, also show the DVs
064:             */
065:            public void setShowDV(boolean showDV) {
066:                m_dax.setShowDV(showDV);
067:            }
068:
069:            /**
070:             * Generates GraphViz dot format from the DAX specification.
071:             * @param dax is the InputStream for the DAX
072:             * @param showFiles specifies whether to show input/output files in
073:             * the graph.
074:             * @return a string of the GraphViz dot representation
075:             * @throws IOException if there is a problem reading or writing
076:             */
077:            public String DAX2DOT(InputStream dax, boolean showFiles)
078:                    throws IOException {
079:                // parse the dax file
080:                Logging.instance().log("display", 0, "Initializing dax parser");
081:                DAXParser daxparser = new DAXParser(m_props
082:                        .getDAXSchemaLocation());
083:
084:                Logging.instance().log("display", 0, "parsing the dax...");
085:                ADAG adag = daxparser.parse(dax);
086:
087:                if (adag == null) {
088:                    Logging.instance().log("display", 0,
089:                            "failed parsing the dax.");
090:                    return null;
091:                }
092:
093:                return m_dax.toDOT(adag, showFiles);
094:            }
095:
096:            /**
097:             * Generates GraphViz dot format from the DAX specification.
098:             * @param dax is the InputStream for the DAX
099:             * @param writer is the target to output GraphViz dot representation
100:             * @param showFiles specifies whether to show input/output files in
101:             * the graph.
102:             * @throws IOException if there is a problem reading or writing
103:             */
104:            public void DAX2DOT(InputStream dax, Writer writer,
105:                    boolean showFiles) throws IOException {
106:                // parse the dax file
107:                Logging.instance().log("display", 0, "Initializing dax parser");
108:                DAXParser daxparser = new DAXParser(m_props
109:                        .getDAXSchemaLocation());
110:
111:                Logging.instance().log("display", 0, "parsing the dax...");
112:                ADAG adag = daxparser.parse(dax);
113:
114:                if (adag == null) {
115:                    Logging.instance().log("display", 0,
116:                            "failed parsing the dax.");
117:                    return;
118:                }
119:
120:                m_dax.toDOT(adag, writer, showFiles);
121:            }
122:
123:            /**
124:             * Generates GraphViz dot format from the DAX specification.
125:             * @param dax is the InputStream for the DAX
126:             * @param writer is the target to output GraphViz dot representation
127:             * @param showFiles specifies whether to show input/output files in
128:             * the graph.
129:             * @param jobURL is the base URL for jobs
130:             * @param fileURL is the base URL for files
131:             * @throws IOException if there is a problem reading or writing
132:             */
133:            public void DAX2DOT(InputStream dax, Writer writer,
134:                    boolean showFiles, String jobURL, String fileURL)
135:                    throws IOException {
136:                // parse the dax file
137:                Logging.instance().log("display", 0, "Initializing dax parser");
138:                DAXParser daxparser = new DAXParser(m_props
139:                        .getDAXSchemaLocation());
140:
141:                Logging.instance().log("display", 0, "parsing the dax...");
142:                ADAG adag = daxparser.parse(dax);
143:
144:                if (adag == null) {
145:                    Logging.instance().log("display", 0,
146:                            "failed parsing the dax.");
147:                    return;
148:                }
149:
150:                m_dax.toDOT(adag, writer, showFiles, jobURL, fileURL);
151:            }
152:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.