Package org.openrefine.browsing.util
Class NumericFacetState
- java.lang.Object
-
- org.openrefine.browsing.util.NumericFacetState
-
- All Implemented Interfaces:
Serializable
,FacetState
public class NumericFacetState extends Object implements FacetState
The aggregation state of a numeric facet, which contains two histograms: - the histogram for the rows seen by the facet (the ones selected by all other active facets) - called the view histogram - the histogram for all rows, which is used to determine the bin size, called the global histogram. This is added to ensure that the bin size does not change when interactively faceting.- Author:
- Antonin Delpeuch
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description NumericFacetState(HistogramState global, HistogramState view)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object other)
HistogramState
getGlobalHistogram()
HistogramState
getViewHistogram()
int
hashCode()
NumericFacetState
normalizeForReporting(int logBinSize)
To be called after aggregating on all rows, to force a single-valued histogram to be represented as a single bin, with the supplied log bin size.String
toString()
-
-
-
Constructor Detail
-
NumericFacetState
public NumericFacetState(HistogramState global, HistogramState view)
-
-
Method Detail
-
getGlobalHistogram
public HistogramState getGlobalHistogram()
-
getViewHistogram
public HistogramState getViewHistogram()
-
normalizeForReporting
public NumericFacetState normalizeForReporting(int logBinSize)
To be called after aggregating on all rows, to force a single-valued histogram to be represented as a single bin, with the supplied log bin size. It also deals with the case where no numeric value was present in the view, but some was found outside the view, in which case the view histogram should- Returns:
-
-