2010-01-24 22:09:50 +01:00
|
|
|
package com.metaweb.gridlock.model;
|
|
|
|
|
2010-01-25 23:51:25 +01:00
|
|
|
import java.io.Serializable;
|
2010-01-27 02:48:42 +01:00
|
|
|
import java.util.Properties;
|
2010-01-25 23:51:25 +01:00
|
|
|
|
|
|
|
import org.json.JSONException;
|
|
|
|
import org.json.JSONObject;
|
|
|
|
|
|
|
|
public class Column implements Serializable {
|
|
|
|
private static final long serialVersionUID = -1063342490951563563L;
|
|
|
|
|
2010-01-24 22:09:50 +01:00
|
|
|
public int cellIndex;
|
|
|
|
public String headerLabel;
|
|
|
|
public Class valueType;
|
2010-01-25 23:51:25 +01:00
|
|
|
|
2010-01-27 02:48:42 +01:00
|
|
|
public JSONObject getJSON(Properties options) throws JSONException {
|
2010-01-25 23:51:25 +01:00
|
|
|
JSONObject o = new JSONObject();
|
|
|
|
|
|
|
|
o.put("cellIndex", cellIndex);
|
|
|
|
o.put("headerLabel", headerLabel);
|
|
|
|
o.put("valueType", valueType == null ? null : valueType.getSimpleName());
|
|
|
|
|
|
|
|
return o;
|
|
|
|
}
|
2010-01-24 22:09:50 +01:00
|
|
|
}
|