1 package org.kuali.ole.docstore.common.search;
2
3 import javax.xml.bind.annotation.XmlAccessType;
4 import javax.xml.bind.annotation.XmlAccessorType;
5 import javax.xml.bind.annotation.XmlType;
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34 @XmlAccessorType(XmlAccessType.FIELD)
35 @XmlType(name = "facetCondition", propOrder = {
36 "docType",
37 "fieldName",
38 "fieldValue",
39 "shortValue"
40 })
41 public class FacetCondition {
42
43 protected String docType;
44 protected String fieldName;
45 protected String fieldValue;
46 protected String shortValue;
47
48 public String getDocType() {
49 return docType;
50 }
51
52 public void setDocType(String docType) {
53 this.docType = docType;
54 }
55
56 public String getFieldName() {
57 return fieldName;
58 }
59
60 public void setFieldName(String fieldName) {
61 this.fieldName = fieldName;
62 }
63
64
65
66
67
68
69
70 public String getFieldValue() {
71 return fieldValue;
72 }
73
74
75
76
77
78
79
80 public void setFieldValue(String value) {
81 this.fieldValue = value;
82 }
83
84 public String getShortValue() {
85 if(fieldValue.contains("/r/n!@#$")) {
86 int index = fieldValue.indexOf("/r/n!@#$");
87 shortValue = fieldValue.substring(index + 8, fieldValue.length());
88 }
89 else {
90 shortValue = fieldValue;
91 }
92 return shortValue;
93 }
94
95 public void setShortValue(String shortValue) {
96 this.shortValue = shortValue;
97 }
98 }