Source Code Cross Referenced for StartEndDescription.java in  » Workflow-Engines » JaWE » org » enhydra » jawe » components » graph » 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 » JaWE » org.enhydra.jawe.components.graph 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package org.enhydra.jawe.components.graph;
002:
003:        /**
004:         * Info structure for start/end element description.
005:         *
006:         * @author Sasa Bojanic
007:         */
008:        import java.awt.Point;
009:
010:        import org.enhydra.shark.xpdl.elements.ExtendedAttribute;
011:
012:        public final class StartEndDescription {
013:
014:            private String actSetId = null;
015:            private String participantId = FreeTextExpressionParticipant
016:                    .getInstance().getId();
017:            private String actId = null;
018:            private Point offset = new Point(0, 0);
019:            private String transitionStyle = GraphEAConstants.EA_JAWE_GRAPH_TRANSITION_STYLE_VALUE_NO_ROUTING_ORTHOGONAL;
020:            private String type = GraphEAConstants.START_TYPE_DEFAULT;
021:            private String eaname;
022:
023:            boolean isStart = true;
024:
025:            public StartEndDescription() {
026:
027:            }
028:
029:            public StartEndDescription(ExtendedAttribute ea) {
030:                this (ea.getName(), ea.getVValue());
031:            }
032:
033:            public StartEndDescription(String eaname, String eaval) {
034:                try {
035:                    setEAName(eaname);
036:
037:                    //      System.out.println("ean="+eaname+", eaval="+eaval);
038:                    //         String[] startOrEndD=Utils.tokenize(eaval, ",");
039:                    int ind = 0;
040:                    int ind2 = 0;
041:                    if (eaname.indexOf("BLOCK") >= 0) {
042:                        ind = eaval
043:                                .indexOf(GraphEAConstants.EA_PART_ACTIVITY_SET_ID
044:                                        + "=");
045:                        ind2 = eaval.indexOf(","
046:                                + GraphEAConstants.EA_JAWE_GRAPH_PARTICIPANT_ID
047:                                + "=", ind);
048:                        String asId = eaval
049:                                .substring(
050:                                        ind
051:                                                + (GraphEAConstants.EA_PART_ACTIVITY_SET_ID + "=")
052:                                                        .length(), ind2);
053:                        setActSetId(asId);
054:                        ind = ind2 + 1;
055:                    }
056:
057:                    ind2 = eaval.indexOf(","
058:                            + GraphEAConstants.EA_PART_CONNECTING_ACTIVITY_ID
059:                            + "=", ind);
060:                    String parId = eaval
061:                            .substring(
062:                                    ind
063:                                            + (GraphEAConstants.EA_JAWE_GRAPH_PARTICIPANT_ID + "=")
064:                                                    .length(), ind2);
065:                    setParticipantId(parId);
066:                    ind = ind2 + 1;
067:
068:                    ind2 = eaval.indexOf(","
069:                            + GraphEAConstants.EA_PART_GRAPH_OFFSET_X + "=",
070:                            ind);
071:                    String aId = eaval
072:                            .substring(
073:                                    ind
074:                                            + (GraphEAConstants.EA_PART_CONNECTING_ACTIVITY_ID + "=")
075:                                                    .length(), ind2);
076:                    if (!(aId == null || aId.equals(""))) {
077:                        setActId(aId);
078:                    }
079:                    ind = ind2 + 1;
080:
081:                    Point temp_offset = new Point(0, 0);
082:                    ind2 = eaval.indexOf(","
083:                            + GraphEAConstants.EA_PART_GRAPH_OFFSET_Y + "=",
084:                            ind);
085:                    String off = eaval.substring(ind
086:                            + (GraphEAConstants.EA_PART_GRAPH_OFFSET_X + "=")
087:                                    .length(), ind2);
088:                    temp_offset.x = Integer.parseInt(off);
089:                    ind = ind2 + 1;
090:
091:                    ind2 = eaval.indexOf(","
092:                            + GraphEAConstants.EA_JAWE_GRAPH_TRANSITION_STYLE
093:                            + "=", ind);
094:                    off = eaval.substring(ind
095:                            + (GraphEAConstants.EA_PART_GRAPH_OFFSET_Y + "=")
096:                                    .length(), ind2);
097:                    temp_offset.y = Integer.parseInt(off);
098:                    setOffset(temp_offset);
099:                    ind = ind2 + 1;
100:
101:                    ind2 = eaval.indexOf("," + GraphEAConstants.EA_PART_TYPE
102:                            + "=", ind);
103:                    String ts = eaval
104:                            .substring(
105:                                    ind
106:                                            + (GraphEAConstants.EA_JAWE_GRAPH_TRANSITION_STYLE + "=")
107:                                                    .length(), ind2);
108:                    setTransitonStyle(ts);
109:                    ind = ind2 + 1;
110:
111:                    String temp_type = eaval.substring(ind
112:                            + (GraphEAConstants.EA_PART_TYPE + "=").length());
113:                    setType(temp_type);
114:                } catch (Exception ex) {
115:                    System.err.println("Exception while parsing start/end ea");
116:                    ex.printStackTrace();
117:                }
118:            }
119:
120:            public String getActId() {
121:                return this .actId;
122:            }
123:
124:            public void setActId(String actId) {
125:                this .actId = actId;
126:            }
127:
128:            public String getActSetId() {
129:                return this .actSetId;
130:            }
131:
132:            public void setActSetId(String actSetId) {
133:                this .actSetId = actSetId;
134:            }
135:
136:            public String getParticipantId() {
137:                return this .participantId;
138:            }
139:
140:            public void setParticipantId(String participantId) {
141:                this .participantId = participantId;
142:            }
143:
144:            public String getTransitionStyle() {
145:                return this .transitionStyle;
146:            }
147:
148:            public void setTransitonStyle(String transitionStyle) {
149:                this .transitionStyle = transitionStyle;
150:            }
151:
152:            public Point getOffset() {
153:                return this .offset;
154:            }
155:
156:            public void setOffset(Point offset) {
157:                this .offset = offset;
158:            }
159:
160:            public void setType(String type) {
161:                this .type = type;
162:            }
163:
164:            public String getType() {
165:                return this .type;
166:            }
167:
168:            public String getEAName() {
169:                return eaname;
170:            }
171:
172:            public void setEAName(String eaname) {
173:                this .eaname = eaname;
174:            }
175:
176:            public boolean isStart() {
177:                return eaname.indexOf("START") >= 0;
178:            }
179:
180:            public String toString() {
181:                String ret = "";
182:                if (actSetId != null)
183:                    ret += GraphEAConstants.EA_PART_ACTIVITY_SET_ID + "="
184:                            + actSetId + ",";
185:                ret += GraphEAConstants.EA_JAWE_GRAPH_PARTICIPANT_ID + "="
186:                        + participantId + ",";
187:                ret += GraphEAConstants.EA_PART_CONNECTING_ACTIVITY_ID + "=";
188:                if (actId != null) {
189:                    ret += actId;
190:                }
191:                ret += ",";
192:                ret += GraphEAConstants.EA_PART_GRAPH_OFFSET_X + "="
193:                        + String.valueOf(offset.x) + ",";
194:                ret += GraphEAConstants.EA_PART_GRAPH_OFFSET_Y + "="
195:                        + String.valueOf(offset.y) + ",";
196:                ret += GraphEAConstants.EA_JAWE_GRAPH_TRANSITION_STYLE + "="
197:                        + transitionStyle + ",";
198:                ret += GraphEAConstants.EA_PART_TYPE + "=" + type;
199:                return ret;
200:            }
201:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.