001package org.kuali.ole.docstore.common.search; 002 003import java.util.ArrayList; 004import java.util.List; 005import javax.xml.bind.annotation.*; 006 007/** 008 * Created with IntelliJ IDEA. 009 * User: jayabharathreddy 010 * Date: 2/26/14 011 * Time: 6:22 PM 012 * To change this template use File | Settings | File Templates. 013 */ 014 015/** 016 * <p>Java class for facetField complex type. 017 * <p/> 018 * <p>The following schema fragment specifies the expected content contained within this class. 019 * <p/> 020 * <pre> 021 * <complexType name="facetField"> 022 * <complexContent> 023 * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> 024 * <sequence> 025 * <element name="docType" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> 026 * <element name="filedNmae" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> 027 * <element name="valueCounts" type="{}valueCount" maxOccurs="unbounded" minOccurs="0"/> 028 * </sequence> 029 * </restriction> 030 * </complexContent> 031 * </complexType> 032 * </pre> 033 */ 034@XmlAccessorType(XmlAccessType.FIELD) 035@XmlType(name = "FacetResultField", propOrder = { 036 "fieldName", 037 "valueCounts", 038 "fieldLabel", 039 "totalCount" 040}) 041public class FacetResultField { 042 043 044 protected String fieldName; 045 protected String fieldLabel; 046 @XmlElementWrapper(name = "valueCounts") 047 @XmlElement(name = "valueCount") 048 protected List<ValueCount> valueCounts; 049 protected int totalCount; 050 051 052 053 /** 054 * Gets the value of the fieldName property. 055 * 056 * @return possible object is 057 * {@link String } 058 */ 059 public String getFieldName() { 060 return fieldName; 061 } 062 063 /** 064 * Sets the value of the filedNmae property. 065 * 066 * @param value allowed object is 067 * {@link String } 068 */ 069 public void setFieldName(String value) { 070 this.fieldName = value; 071 } 072 073 public String getFieldLabel() { 074 return fieldName.replace("_facet", ""); 075 } 076 077 public void setFieldLabel(String fieldLabel) { 078 this.fieldLabel = fieldLabel; 079 } 080 081 /** 082 * Gets the value of the valueCounts property. 083 * <p/> 084 * <p/> 085 * This accessor method returns a reference to the live list, 086 * not a snapshot. Therefore any modification you make to the 087 * returned list will be present inside the JAXB object. 088 * This is why there is not a <CODE>set</CODE> method for the valueCounts property. 089 * <p/> 090 * <p/> 091 * For example, to add a new item, do as follows: 092 * <pre> 093 * getValueCounts().add(newItem); 094 * </pre> 095 * <p/> 096 * <p/> 097 * <p/> 098 * Objects of the following type(s) are allowed in the list 099 * {@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}