1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.commons.jxpath;
18
19 import java.util.ArrayList;
20 import java.util.Collections;
21 import java.util.HashMap;
22 import java.util.List;
23 import java.util.Map;
24
25 import org.apache.commons.jxpath.xml.DocumentContainer;
26 import org.w3c.dom.Document;
27 import org.w3c.dom.Element;
28
29
30
31
32
33
34
35 public class TestMixedModelBean {
36 private String string;
37 private TestBean bean;
38 private Container container;
39 private Document document;
40 private Element element;
41
42 private Map map;
43
44 private List list;
45 private int[][] matrix;
46
47 public TestMixedModelBean() {
48 string = "string";
49 bean = new TestBean();
50 map = new HashMap();
51 list = new ArrayList();
52
53 container = new DocumentContainer(getClass().getResource("Vendor.xml"));
54 document = (Document) container.getValue();
55 element = document.getDocumentElement();
56
57 map.put("string", string);
58 map.put("bean", bean);
59 map.put("map", map);
60 map.put("list", list);
61 map.put("document", document);
62 map.put("element", element);
63 map.put("container", container);
64
65 list.add(string);
66 list.add(bean);
67 list.add(map);
68 list.add(new ArrayList(Collections.singletonList("string2")));
69 list.add(document);
70 list.add(element);
71 list.add(container);
72
73 matrix = new int[1][];
74 matrix[0] = new int[1];
75 matrix[0][0] = 3;
76 }
77
78 public String getString() {
79 return string;
80 }
81
82 public TestBean getBean() {
83 return bean;
84 }
85
86 public Map getMap() {
87 return map;
88 }
89
90 public List getList() {
91 return list;
92 }
93
94 public Document getDocument() {
95 return document;
96 }
97
98 public Element getElement() {
99 return element;
100 }
101
102 public Container getContainer() {
103 return container;
104 }
105
106 public int[][] getMatrix() {
107 return matrix;
108 }
109
110 public void setMatrix(int[][] matrix) {
111 this.matrix = matrix;
112 }
113 }