2010-03-02 04:31:58 +01:00
|
|
|
package com.metaweb.gridworks.model.recon;
|
|
|
|
|
|
|
|
import org.json.JSONObject;
|
|
|
|
|
|
|
|
abstract public class StrictReconConfig extends ReconConfig {
|
2010-03-03 05:19:58 +01:00
|
|
|
final static protected String s_mqlreadService = "http://api.freebase.com/api/service/mqlread";
|
2010-03-02 19:19:20 +01:00
|
|
|
|
2010-03-02 04:31:58 +01:00
|
|
|
static public ReconConfig reconstruct(JSONObject obj) throws Exception {
|
|
|
|
String match = obj.getString("match");
|
|
|
|
if ("key".equals(match)) {
|
2010-03-03 05:19:58 +01:00
|
|
|
return KeyBasedReconConfig.reconstruct(obj);
|
2010-03-02 19:19:20 +01:00
|
|
|
} else if ("id".equals(match)) {
|
2010-03-03 05:19:58 +01:00
|
|
|
return IdBasedReconConfig.reconstruct(obj);
|
2010-03-02 19:19:20 +01:00
|
|
|
} else if ("guid".equals(match)) {
|
2010-03-03 05:19:58 +01:00
|
|
|
return GuidBasedReconConfig.reconstruct(obj);
|
2010-03-02 04:31:58 +01:00
|
|
|
}
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|