diff --git a/main/src/com/google/refine/importers/tree/ImportColumn.java b/main/src/com/google/refine/importers/tree/ImportColumn.java index ec07a7ca4..4bc7898ea 100644 --- a/main/src/com/google/refine/importers/tree/ImportColumn.java +++ b/main/src/com/google/refine/importers/tree/ImportColumn.java @@ -6,8 +6,17 @@ package com.google.refine.importers.tree; * */ public class ImportColumn extends ImportVertical { + /** + * Index of this column. + */ public int cellIndex; - public int nextRowIndex; + /** + * Index of next row to allocate. + */ + public int nextRowIndex; // TODO: this can be hoisted into superclass + /** + * ??? - this field is never written to + */ public boolean blankOnFirstRow; public ImportColumn() {} @@ -18,6 +27,6 @@ public class ImportColumn extends ImportVertical { @Override void tabulate() { - // already done the tabulation elsewhere + // Nothing to do since our nonBlankCount is always up-to-date and we have no children. } } \ No newline at end of file diff --git a/main/src/com/google/refine/importers/tree/ImportColumnGroup.java b/main/src/com/google/refine/importers/tree/ImportColumnGroup.java index d50e2838d..233ac0da2 100644 --- a/main/src/com/google/refine/importers/tree/ImportColumnGroup.java +++ b/main/src/com/google/refine/importers/tree/ImportColumnGroup.java @@ -11,7 +11,7 @@ import org.apache.commons.lang.StringUtils; public class ImportColumnGroup extends ImportVertical { public Map subgroups = new HashMap(); public Map columns = new HashMap(); - public int nextRowIndex; + public int nextRowIndex; // TODO: this can be hoisted into superclass @Override void tabulate() { diff --git a/main/src/com/google/refine/importers/tree/ImportVertical.java b/main/src/com/google/refine/importers/tree/ImportVertical.java index 0a29e8d75..58524bfd4 100644 --- a/main/src/com/google/refine/importers/tree/ImportVertical.java +++ b/main/src/com/google/refine/importers/tree/ImportVertical.java @@ -1,9 +1,18 @@ package com.google.refine.importers.tree; +/** + * Abstract base class for ImportColumn and ImportColumnGroup + */ abstract class ImportVertical { public String name = ""; + /** + * Number of cells which have values in this column/column group. + */ public int nonBlankCount; + /** + * Sum up counts for all children and update. + */ abstract void tabulate(); @Override