Class ExpressionNominalValueGrouper

java.lang.Object
com.google.refine.browsing.util.ExpressionNominalValueGrouper
All Implemented Interfaces:
RecordVisitor, RowVisitor

public class ExpressionNominalValueGrouper extends Object implements RowVisitor, RecordVisitor
Visit matched rows or records and group them into facet choices based on the values computed from a given expression.
  • Field Details

  • Constructor Details

    • ExpressionNominalValueGrouper

      public ExpressionNominalValueGrouper(Evaluable evaluable, String columnName, int cellIndex)
  • Method Details

    • start

      public void start(Project project)
      Description copied from interface: RowVisitor
      Called before any visit() call.
      Specified by:
      start in interface RecordVisitor
      Specified by:
      start in interface RowVisitor
    • end

      public void end(Project project)
      Description copied from interface: RowVisitor
      Called after all visit() calls.
      Specified by:
      end in interface RecordVisitor
      Specified by:
      end in interface RowVisitor
    • visit

      public boolean visit(Project project, int rowIndex, Row row)
      Specified by:
      visit in interface RowVisitor
      Parameters:
      project - project
      rowIndex - zero-based row index
      row - row
      Returns:
      true to abort visitation early - no further visit calls will be made
    • visit

      public boolean visit(Project project, Record record)
      Specified by:
      visit in interface RecordVisitor
    • visitRow

      protected void visitRow(Project project, int rowIndex, Row row, Properties bindings, int index)
    • evalRow

      protected Object evalRow(Project project, int rowIndex, Row row, Properties bindings)
    • processValue

      protected void processValue(Object value, int index)
    • getChoiceCountRowEvaluable

      public RowEvaluable getChoiceCountRowEvaluable()
    • getChoiceValueCountMultiple

      public Object getChoiceValueCountMultiple(Object value)
    • getChoiceValueCount

      public Integer getChoiceValueCount(Object choiceValue)