Exposed more fields for each record.

git-svn-id: http://google-refine.googlecode.com/svn/trunk@2081 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
David Huynh 2011-06-06 20:19:20 +00:00
parent 4dc3ef8caa
commit 11cf415ee8

View File

@ -84,6 +84,14 @@ public class WrappedRow implements HasFields {
public Object getField(String name, Properties bindings) { public Object getField(String name, Properties bindings) {
if ("cells".equals(name)) { if ("cells".equals(name)) {
return new RecordCells(_record); 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; return null;
} }