Class FacetAttributeResultImpl

java.lang.Object
ddf.catalog.operation.impl.FacetAttributeResultImpl
All Implemented Interfaces:
ddf.catalog.operation.FacetAttributeResult

public class FacetAttributeResultImpl extends Object implements ddf.catalog.operation.FacetAttributeResult
  • Constructor Details

    • FacetAttributeResultImpl

      public FacetAttributeResultImpl(String attributeName, List<String> attributeValues, List<Long> valueCounts)
      Instantiates a FacetAttributeResultImpl representing a portion of the results of a faceted query. A FacetAttributeResultImpl is representative of a single attribute's faceting results, and zero to many FacetAttributeResults may make up a complete faceted query result. This constructor zips together the attributeValues and valueCounts provided, and these list should correspond and be of the same length if sane results are desired.
      Parameters:
      attributeName - The attribute name for which faceting data is reported
      attributeValues - A list of the discovered facet values
      valueCounts - A list of the number of occurrences for each facet value
    • FacetAttributeResultImpl

      public FacetAttributeResultImpl(String attributeName, List<org.apache.commons.lang3.tuple.Pair<String,Long>> valueCountPairs)
      Instantiates a FacetAttributeResultImpl representing a portion of the results of a faceted query. This constructor takes a zipped list of value to count pairings.
      Parameters:
      attributeName - The field name for which faceting data is reported
      valueCountPairs - A list of value-count pairs for the faceted field
  • Method Details

    • getAttributeName

      public String getAttributeName()
      Specified by:
      getAttributeName in interface ddf.catalog.operation.FacetAttributeResult
    • getFacetValues

      public List<ddf.catalog.operation.FacetValueCount> getFacetValues()
      Specified by:
      getFacetValues in interface ddf.catalog.operation.FacetAttributeResult