![David Huynh](/assets/img/avatar_default.png)
git-svn-id: http://google-refine.googlecode.com/svn/trunk@90 7d457c2a-affb-35e4-300a-418c747d4874
27 lines
615 B
Java
27 lines
615 B
Java
package com.metaweb.gridworks.protograph;
|
|
|
|
import java.util.Properties;
|
|
|
|
import org.json.JSONException;
|
|
import org.json.JSONWriter;
|
|
|
|
public class AnonymousNode implements Node {
|
|
private static final long serialVersionUID = -6956243664838720646L;
|
|
|
|
final public FreebaseType type;
|
|
|
|
public AnonymousNode(FreebaseType type) {
|
|
this.type = type;
|
|
}
|
|
|
|
public void write(JSONWriter writer, Properties options)
|
|
throws JSONException {
|
|
|
|
writer.object();
|
|
writer.key("nodeType"); writer.value("anonymous");
|
|
writer.key("type"); type.write(writer, options);
|
|
writer.endObject();
|
|
}
|
|
|
|
}
|