1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krms.tree.node;
17
18 import org.apache.commons.lang.StringEscapeUtils;
19
20 import java.io.Serializable;
21 import java.util.List;
22
23
24
25
26 public class CompareTreeNode implements Serializable {
27
28 private String firstElement;
29 private List<String> firstElementItems;
30 private String secondElement;
31 private List<String> secondElementItems;
32 private String thirdElement;
33 private List<String> thirdElementItems;
34 private String fourthElement;
35 private List<String> fourthElementItems;
36 private String fithElement;
37 private List<String> fithElementItems;
38
39 private int width;
40
41 public CompareTreeNode(int width){
42 this.setWidth(width);
43 }
44
45 public CompareTreeNode(int width, String... elements){
46 this(width);
47 for (int i = 0; i < elements.length; i++) {
48 switch (i) {
49 case 0:
50 this.firstElement = elements[0];
51 break;
52 case 1:
53 this.secondElement = elements[1];
54 break;
55 case 2:
56 this.thirdElement = elements[2];
57 break;
58 case 3:
59 this.fourthElement= elements[3];
60 break;
61 case 4:
62 this.fithElement = elements[4];
63 break;
64 }
65 }
66 }
67
68 public String getFirstElement() {
69 if((this.firstElement == null) || (this.firstElement.isEmpty())){
70 return StringEscapeUtils.escapeHtml(" ");
71 }
72 return firstElement;
73 }
74
75 public void setFirstElement(String firstElement) {
76 this.firstElement = firstElement;
77 }
78
79 public List<String> getFirstElementItems() {
80 return firstElementItems;
81 }
82
83 public void setFirstElementItems(List<String> firstElementItems) {
84 this.firstElementItems = firstElementItems;
85 }
86
87 public String getSecondElement() {
88 if((this.secondElement == null) || (this.secondElement.isEmpty())){
89 return StringEscapeUtils.escapeHtml(" ");
90 }
91 return secondElement;
92 }
93
94 public void setSecondElement(String secondElement) {
95 this.secondElement = secondElement;
96 }
97
98 public List<String> getSecondElementItems() {
99 return secondElementItems;
100 }
101
102 public void setSecondElementItems(List<String> secondElementItems) {
103 this.secondElementItems = secondElementItems;
104 }
105
106 public String getThirdElement() {
107 if((this.thirdElement == null) || (this.thirdElement.isEmpty())){
108 return StringEscapeUtils.escapeHtml(" ");
109 }
110 return thirdElement;
111 }
112
113 public void setThirdElement(String thirdElement) {
114 this.thirdElement = thirdElement;
115 }
116
117 public List<String> getThirdElementItems() {
118 return thirdElementItems;
119 }
120
121 public void setThirdElementItems(List<String> thirdElementItems) {
122 this.thirdElementItems = thirdElementItems;
123 }
124
125 public String getFourthElement() {
126 if((this.fourthElement == null) || (this.fourthElement.isEmpty())){
127 return StringEscapeUtils.escapeHtml(" ");
128 }
129 return fourthElement;
130 }
131
132 public void setFourthElement(String fourthElement) {
133 this.fourthElement = fourthElement;
134 }
135
136 public List<String> getFourthElementItems() {
137 return fourthElementItems;
138 }
139
140 public void setFourthElementItems(List<String> fourthElementItems) {
141 this.fourthElementItems = fourthElementItems;
142 }
143
144 public String getFithElement() {
145 if((this.fithElement == null) || (this.fithElement.isEmpty())){
146 return StringEscapeUtils.escapeHtml(" ");
147 }
148 return fithElement;
149 }
150
151 public void setFithElement(String fithElement) {
152 this.fithElement = fithElement;
153 }
154
155 public List<String> getFithElementItems() {
156 return fithElementItems;
157 }
158
159 public void setFithElementItems(List<String> fithElementItems) {
160 this.fithElementItems = fithElementItems;
161 }
162
163 public int getWidth() {
164 return width;
165 }
166
167 public void setWidth(int width) {
168 this.width = width;
169 }
170 }