Package com.google.refine.browsing.util
Class TimeBinIndex
java.lang.Object
com.google.refine.browsing.util.TimeBinIndex
- Direct Known Subclasses:
TimeBinRecordIndex,TimeBinRowIndex
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 Summary
FieldsModifier and TypeFieldDescriptionprotected int[]protected intprotected intprotected booleanprotected booleanprotected booleanprotected booleanprotected longprotected longprotected intprotected longprotected intprotected intprotected intprotected long[] -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint[]getBins()intintlonggetMax()longgetMin()intlonggetStep()intbooleanprotected abstract voiditerate(Project project, RowEvaluable rowEvaluable, List<Long> allValues) protected voidprotected voidprotected voidprocessRow(Project project, RowEvaluable rowEvaluable, List<Long> allValues, int rowIndex, Row row, Properties bindings) protected voidprocessValue(long v, List<Long> allValues)
-
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
-
TimeBinIndex
-
-
Method Details
-
iterate
-
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
-