1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package org.apache.commons.scxml.model;
19
20 import org.w3c.dom.Node;
21
22 /***
23 * The class in this SCXML object model that corresponds to the SCXML
24 * <data> child element of the <datamodel> element.
25 *
26 */
27 public class Data {
28
29 /***
30 * The name of this data instance, that is used as its identifier.
31 */
32 private String name;
33
34 /***
35 * The URL to get the XML data tree from.
36 */
37 private String src;
38
39 /***
40 * The expression that evaluates to the value of this data instance.
41 */
42 private String expr;
43
44 /***
45 * The child XML data tree, parsed as a Node, cloned per execution
46 * instance.
47 */
48 private Node node;
49
50 /***
51 * Constructor.
52 */
53 public Data() {
54 this.name = null;
55 this.src = null;
56 this.expr = null;
57 this.node = null;
58 }
59
60 /***
61 * Get the name.
62 *
63 * @return String The name.
64 */
65 public final String getName() {
66 return name;
67 }
68
69 /***
70 * Set the name.
71 *
72 * @param name The name.
73 */
74 public final void setName(final String name) {
75 this.name = name;
76 }
77
78 /***
79 * Get the URL where the XML data tree resides.
80 *
81 * @return String The URL.
82 */
83 public final String getSrc() {
84 return src;
85 }
86
87 /***
88 * Set the URL where the XML data tree resides.
89 *
90 * @param src The source URL.
91 */
92 public final void setSrc(final String src) {
93 this.src = src;
94 }
95
96 /***
97 * Get the expression that evaluates to the value of this data instance.
98 *
99 * @return String The expression.
100 */
101 public final String getExpr() {
102 return expr;
103 }
104
105 /***
106 * Set the expression that evaluates to the value of this data instance.
107 *
108 * @param expr The expression.
109 */
110 public final void setExpr(final String expr) {
111 this.expr = expr;
112 }
113
114 /***
115 * Get the XML data tree.
116 *
117 * @return Node The XML data tree, parsed as a <code>Node</code>.
118 */
119 public final Node getNode() {
120 return node;
121 }
122
123 /***
124 * Set the XML data tree.
125 *
126 * @param node The XML data tree, parsed as a <code>Node</code>.
127 */
128 public final void setNode(final Node node) {
129 this.node = node;
130 }
131
132 }
133