View Javadoc
1   package org.kuali.ole.docstore.common.search;
2   
3   import java.util.ArrayList;
4   import java.util.List;
5   import javax.xml.bind.annotation.*;
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   * <p>Java class for facetField complex type.
17   * <p/>
18   * <p>The following schema fragment specifies the expected content contained within this class.
19   * <p/>
20   * <pre>
21   * &lt;complexType name="facetField">
22   *   &lt;complexContent>
23   *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
24   *       &lt;sequence>
25   *         &lt;element name="docType" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
26   *         &lt;element name="filedNmae" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
27   *         &lt;element name="valueCounts" type="{}valueCount" maxOccurs="unbounded" minOccurs="0"/>
28   *       &lt;/sequence>
29   *     &lt;/restriction>
30   *   &lt;/complexContent>
31   * &lt;/complexType>
32   * </pre>
33   */
34  @XmlAccessorType(XmlAccessType.FIELD)
35  @XmlType(name = "FacetResultField", propOrder = {
36          "fieldName",
37          "valueCounts",
38          "fieldLabel",
39          "totalCount"
40  })
41  public class FacetResultField {
42  
43  
44      protected String fieldName;
45      protected String fieldLabel;
46      @XmlElementWrapper(name = "valueCounts")
47      @XmlElement(name = "valueCount")
48      protected List<ValueCount> valueCounts;
49      protected int totalCount;
50  
51  
52  
53      /**
54       * Gets the value of the fieldName property.
55       *
56       * @return possible object is
57       *         {@link String }
58       */
59      public String getFieldName() {
60          return fieldName;
61      }
62  
63      /**
64       * Sets the value of the filedNmae property.
65       *
66       * @param value allowed object is
67       *              {@link String }
68       */
69      public void setFieldName(String value) {
70          this.fieldName = value;
71      }
72  
73      public String getFieldLabel() {
74          return fieldName.replace("_facet", "");
75      }
76  
77      public void setFieldLabel(String fieldLabel) {
78          this.fieldLabel = fieldLabel;
79      }
80  
81      /**
82       * Gets the value of the valueCounts property.
83       * <p/>
84       * <p/>
85       * This accessor method returns a reference to the live list,
86       * not a snapshot. Therefore any modification you make to the
87       * returned list will be present inside the JAXB object.
88       * This is why there is not a <CODE>set</CODE> method for the valueCounts property.
89       * <p/>
90       * <p/>
91       * For example, to add a new item, do as follows:
92       * <pre>
93       *    getValueCounts().add(newItem);
94       * </pre>
95       * <p/>
96       * <p/>
97       * <p/>
98       * Objects of the following type(s) are allowed in the list
99       * {@link ValueCount }
100      */
101     public List<ValueCount> getValueCounts() {
102         if (valueCounts == null) {
103             valueCounts = new ArrayList<ValueCount>();
104         }
105         return this.valueCounts;
106     }
107 
108     public int getTotalCount() {
109         return totalCount;
110     }
111 
112     public void setTotalCount(int totalCount) {
113         this.totalCount = totalCount;
114     }
115 }