Source Code Cross Referenced for SCXML.java in  » Library » Apache-commons-scxml-0.6-src » org » apache » commons » scxml » model » 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 » Library » Apache commons scxml 0.6 src » org.apache.commons.scxml.model 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Licensed to the Apache Software Foundation (ASF) under one or more
003:         * contributor license agreements.  See the NOTICE file distributed with
004:         * this work for additional information regarding copyright ownership.
005:         * The ASF licenses this file to You under the Apache License, Version 2.0
006:         * (the "License"); you may not use this file except in compliance with
007:         * the License.  You may obtain a copy of the License at
008:         *
009:         *     http://www.apache.org/licenses/LICENSE-2.0
010:         *
011:         * Unless required by applicable law or agreed to in writing, software
012:         * distributed under the License is distributed on an "AS IS" BASIS,
013:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014:         * See the License for the specific language governing permissions and
015:         * limitations under the License.
016:         */
017:        package org.apache.commons.scxml.model;
018:
019:        import java.io.Serializable;
020:        import java.util.HashMap;
021:        import java.util.Map;
022:
023:        import org.apache.commons.scxml.SCXMLHelper;
024:
025:        /**
026:         * The class in this SCXML object model that corresponds to the
027:         * <scxml> root element, and serves as the "document
028:         * root".
029:         *
030:         */
031:        public class SCXML implements  Serializable {
032:
033:            /**
034:             * Serial version UID.
035:             */
036:            private static final long serialVersionUID = 1L;
037:
038:            /**
039:             * The SCXML XMLNS.
040:             */
041:            public static final String XMLNS = "http://www.w3.org/2005/07/scxml";
042:
043:            /**
044:             * The xmlns attribute on the root <smxml> element.
045:             * This must match XMLNS above.
046:             */
047:            private String xmlns;
048:
049:            /**
050:             * The SCXML version of this document.
051:             */
052:            private String version;
053:
054:            /**
055:             * The initial State for the SCXML executor.
056:             */
057:            private State initialState;
058:
059:            /**
060:             * The initial state ID (used by XML Digester only).
061:             */
062:            private String initialstate;
063:
064:            /**
065:             * Optional property holding the data model for this SCXML document.
066:             * This gets merged with the root context and potentially hides any
067:             * (namesake) variables in the root context.
068:             */
069:            private Datamodel datamodel;
070:
071:            /**
072:             * The immediate child states of this SCXML document root.
073:             */
074:            private Map states;
075:
076:            /**
077:             * A global map of all States and Parallels associated with this
078:             * state machine, keyed by their id.
079:             */
080:            private Map targets;
081:
082:            /**
083:             * Constructor.
084:             */
085:            public SCXML() {
086:                this .states = new HashMap();
087:                this .targets = new HashMap();
088:            }
089:
090:            /**
091:             * Get the initial State.
092:             *
093:             * @return State Returns the initialstate.
094:             */
095:            public final State getInitialState() {
096:                return initialState;
097:            }
098:
099:            /**
100:             * Set the initial State.
101:             *
102:             * @param initialState The initialstate to set.
103:             */
104:            public final void setInitialState(final State initialState) {
105:                this .initialState = initialState;
106:            }
107:
108:            /**
109:             * Get the data model placed at document root.
110:             *
111:             * @return Returns the data model.
112:             */
113:            public final Datamodel getDatamodel() {
114:                return datamodel;
115:            }
116:
117:            /**
118:             * Set the data model at document root.
119:             *
120:             * @param datamodel The Datamodel to set.
121:             */
122:            public final void setDatamodel(final Datamodel datamodel) {
123:                this .datamodel = datamodel;
124:            }
125:
126:            /**
127:             * Get the children states.
128:             *
129:             * @return Map Returns map of the child states.
130:             */
131:            public final Map getStates() {
132:                return states;
133:            }
134:
135:            /**
136:             * Add a child state.
137:             *
138:             * @param state The state to be added to the states Map.
139:             */
140:            public final void addState(final State state) {
141:                states.put(state.getId(), state);
142:            }
143:
144:            /**
145:             * Get the targets map, whichis a Map of all States and Parallels
146:             * associated with this state machine, keyed by their id.
147:             *
148:             * @return Map Returns the targets.
149:             */
150:            public final Map getTargets() {
151:                return targets;
152:            }
153:
154:            /**
155:             * Add a target to this SCXML document.
156:             *
157:             * @param target The target to be added to the targets Map.
158:             */
159:            public final void addTarget(final TransitionTarget target) {
160:                String id = target.getId();
161:                if (!SCXMLHelper.isStringEmpty(id)) {
162:                    // Target is not anonymous, so makes sense to map it
163:                    targets.put(id, target);
164:                }
165:            }
166:
167:            /**
168:             * Get the SCXML document version.
169:             *
170:             * @return Returns the version.
171:             */
172:            public final String getVersion() {
173:                return version;
174:            }
175:
176:            /**
177:             * Set the SCXML document version.
178:             *
179:             * @param version The version to set.
180:             */
181:            public final void setVersion(final String version) {
182:                this .version = version;
183:            }
184:
185:            /**
186:             * Get the xmlns of this SCXML document.
187:             *
188:             * @return Returns the xmlns.
189:             */
190:            public final String getXmlns() {
191:                return xmlns;
192:            }
193:
194:            /**
195:             * Set the xmlns of this SCXML document.
196:             *
197:             * @param xmlns The xmlns to set.
198:             */
199:            public final void setXmlns(final String xmlns) {
200:                this .xmlns = xmlns;
201:            }
202:
203:            /**
204:             * Get the ID of the initial state.
205:             *
206:             * @return String Returns the initial state ID (used by XML Digester only).
207:             * @see #getInitialState()
208:             */
209:            public final String getInitialstate() {
210:                return initialstate;
211:            }
212:
213:            /**
214:             * Set the ID of the initial state.
215:             *
216:             * @param initialstate The initial state ID (used by XML Digester only).
217:             * @see #setInitialState(State)
218:             */
219:            public final void setInitialstate(final String initialstate) {
220:                this.initialstate = initialstate;
221:            }
222:
223:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.