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