RandomSec/src/main/java/com/metaweb/gridlock/browsing/facets/NominalFacetChoice.java
David Huynh 8b22eb594f Refactoring and adding more functions.
git-svn-id: http://google-refine.googlecode.com/svn/trunk@14 7d457c2a-affb-35e4-300a-418c747d4874
2010-01-31 23:15:50 +00:00

29 lines
677 B
Java

package com.metaweb.gridlock.browsing.facets;
import java.util.Properties;
import org.json.JSONException;
import org.json.JSONObject;
import com.metaweb.gridlock.browsing.DecoratedValue;
public class NominalFacetChoice {
final public DecoratedValue decoratedValue;
public int count;
public boolean selected;
public NominalFacetChoice(DecoratedValue decoratedValue) {
this.decoratedValue = decoratedValue;
}
public JSONObject getJSON(Properties options) throws JSONException {
JSONObject o = new JSONObject();
o.put("v", decoratedValue.getJSON(options));
o.put("c", count);
o.put("s", selected);
return o;
}
}