Class TimeBinIndex

java.lang.Object
com.google.refine.browsing.util.TimeBinIndex
Direct Known Subclasses:
TimeBinRecordIndex, TimeBinRowIndex

public abstract class TimeBinIndex extends Object
A utility class for computing the base bins that form the base histograms of temporal range facets. It evaluates an expression on all the rows of a project to get temporal values, determines how many bins to distribute those values in, and bins the rows accordingly. This class processes all rows rather than just the filtered rows because it needs to compute the base bins of a temporal range facet, which remain unchanged as the user interacts with the facet.
  • Field Details

    • _totalValueCount

      protected int _totalValueCount
    • _timeValueCount

      protected int _timeValueCount
    • _min

      protected long _min
    • _max

      protected long _max
    • _step

      protected long _step
    • _bins

      protected int[] _bins
    • _timeRowCount

      protected int _timeRowCount
    • _nonTimeRowCount

      protected int _nonTimeRowCount
    • _blankRowCount

      protected int _blankRowCount
    • _errorRowCount

      protected int _errorRowCount
    • _hasError

      protected boolean _hasError
    • _hasNonTime

      protected boolean _hasNonTime
    • _hasTime

      protected boolean _hasTime
    • _hasBlank

      protected boolean _hasBlank
    • steps

      protected long[] steps
  • Constructor Details

  • Method Details

    • iterate

      protected abstract void iterate(Project project, RowEvaluable rowEvaluable, List<Long> allValues)
    • isTemporal

      public boolean isTemporal()
    • getMin

      public long getMin()
    • getMax

      public long getMax()
    • getStep

      public long getStep()
    • getBins

      public int[] getBins()
    • getTimeRowCount

      public int getTimeRowCount()
    • getNonTimeRowCount

      public int getNonTimeRowCount()
    • getBlankRowCount

      public int getBlankRowCount()
    • getErrorRowCount

      public int getErrorRowCount()
    • processRow

      protected void processRow(Project project, RowEvaluable rowEvaluable, List<Long> allValues, int rowIndex, Row row, Properties bindings)
    • preprocessing

      protected void preprocessing()
    • postprocessing

      protected void postprocessing()
    • processValue

      protected void processValue(long v, List<Long> allValues)