Class Row

java.lang.Object
com.google.refine.model.Row
All Implemented Interfaces:
HasFields

public class Row extends Object implements HasFields
Class representing a single Row which contains a list of Cells. There may be multiple rows in a Record.
  • Field Details

    • flagged

      public boolean flagged
    • starred

      public boolean starred
    • cells

      public final List<Cell> cells
  • Constructor Details

    • Row

      public Row(int cellCount)
      Construct a new Row.
      Parameters:
      cellCount - number of cells to give row initially (can be extended later)
    • Row

      protected Row(List<Cell> cells, boolean flagged, boolean starred)
  • Method Details

    • dup

      public Row dup()
      Copy a row and return the copy. Note that this is a shallow copy, so if the contents of cells are changed in the original, they will be be changed in the duplicate.
      Returns:
      the duplicated row
    • getField

      public Object getField(String name, Properties bindings)
      Specified by:
      getField in interface HasFields
    • fieldAlsoHasFields

      public boolean fieldAlsoHasFields(String name)
      Specified by:
      fieldAlsoHasFields in interface HasFields
    • isEmpty

      public boolean isEmpty()
    • getCell

      public Cell getCell(int cellIndex)
      Parameters:
      cellIndex - index of cell to return
      Returns:
      given cell or null if cell doesn't exist or cell index is out of range
    • getCellValue

      public Object getCellValue(int cellIndex)
    • isCellBlank

      public boolean isCellBlank(int cellIndex)
    • isValueBlank

      protected boolean isValueBlank(Object value)
    • setCell

      public void setCell(int cellIndex, Cell cell)
    • getCellTuple

      public CellTuple getCellTuple(Project project)
    • isFlagged

      public boolean isFlagged()
    • isStarred

      public boolean isStarred()
    • getCells

      public List<Cell> getCells()
    • save

      public void save(Writer writer, Properties options)
    • load

      public static Row load(String s, Pool pool) throws Exception
      Throws:
      Exception
    • deserialize

      public static Row deserialize(boolean starred, boolean flagged, List<Cell> cells)
    • loadStreaming

      public static Row loadStreaming(String s, Pool pool) throws Exception
      Throws:
      Exception
    • toString

      public String toString()
      Overrides:
      toString in class Object