1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.commons.scxml.model;
18
19 import java.io.Serializable;
20 import java.util.ArrayList;
21 import java.util.List;
22
23 /***
24 * The class in this SCXML object model that corresponds to the SCXML
25 * <datamodel> element.
26 *
27 */
28 public class Datamodel implements Serializable {
29
30 /***
31 * Serial version UID.
32 */
33 private static final long serialVersionUID = 1L;
34
35 /***
36 * The set of <data> elements, parsed as Elements, that are
37 * children of this <datamodel> element.
38 */
39 private List data;
40
41 /***
42 * Constructor.
43 */
44 public Datamodel() {
45 this.data = new ArrayList();
46 }
47
48 /***
49 * Get all the data children of this datamodel.
50 *
51 * @return Returns the data.
52 */
53 public final List getData() {
54 return data;
55 }
56
57 /***
58 * Add a Data.
59 *
60 * @param datum The data child to be added.
61 */
62 public final void addData(final Data datum) {
63 if (datum != null) {
64 data.add(datum);
65 }
66 }
67
68 }
69