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 * Created with IntelliJ IDEA.
9 * User: jayabharathreddy
10 * Date: 2/26/14
11 * Time: 6:22 PM
12 * To change this template use File | Settings | File Templates.
13 */
14
15
16 /**
17 * <p>Java class for facetCondition complex type.
18 * <p/>
19 * <p>The following schema fragment specifies the expected content contained within this class.
20 * <p/>
21 * <pre>
22 * <complexType name="facetCondition">
23 * <complexContent>
24 * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
25 * <sequence>
26 * <element name="facetField" type="{}facetField" minOccurs="0"/>
27 * <element name="facetFieldPageSize" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
28 * </sequence>
29 * </restriction>
30 * </complexContent>
31 * </complexType>
32 * </pre>
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 * Gets the value of the fieldValue property.
66 *
67 * @return possible object is
68 * {@link String }
69 */
70 public String getFieldValue() {
71 return fieldValue;
72 }
73
74 /**
75 * Sets the value of the fieldValue property.
76 *
77 * @param value allowed object is
78 * {@link String }
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 }