From 11cf415ee89b812f1e33ff1892fbc1eba9be03ea Mon Sep 17 00:00:00 2001 From: David Huynh Date: Mon, 6 Jun 2011 20:19:20 +0000 Subject: [PATCH] Exposed more fields for each record. git-svn-id: http://google-refine.googlecode.com/svn/trunk@2081 7d457c2a-affb-35e4-300a-418c747d4874 --- main/src/com/google/refine/expr/WrappedRow.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/main/src/com/google/refine/expr/WrappedRow.java b/main/src/com/google/refine/expr/WrappedRow.java index 27f6fe7b6..3dbbfd1c0 100644 --- a/main/src/com/google/refine/expr/WrappedRow.java +++ b/main/src/com/google/refine/expr/WrappedRow.java @@ -84,6 +84,14 @@ public class WrappedRow implements HasFields { public Object getField(String name, Properties bindings) { if ("cells".equals(name)) { return new RecordCells(_record); + } else if ("index".equals(name)) { + return _record.recordIndex; + } else if ("fromRowIndex".equals(name)) { + return _record.fromRowIndex; + } else if ("toRowIndex".equals(name)) { + return _record.toRowIndex; + } else if ("rowCount".equals(name)) { + return _record.toRowIndex - _record.fromRowIndex; } return null; }