Speed up parsing and tweak edit comment
This commit is contained in:
parent
1eaaa00824
commit
54b25d714b
@ -34,7 +34,6 @@ import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
import org.json.JSONWriter;
|
||||
|
||||
import com.google.refine.browsing.Engine;
|
||||
@ -49,7 +48,6 @@ import org.openrefine.wikidata.updates.ItemUpdate;
|
||||
import org.openrefine.wikidata.utils.FirstLinesExtractor;
|
||||
|
||||
import com.google.refine.model.Project;
|
||||
import com.google.refine.util.ParsingUtilities;
|
||||
|
||||
public class PreviewWikibaseSchemaCommand extends Command {
|
||||
|
||||
@ -68,8 +66,7 @@ public class PreviewWikibaseSchemaCommand extends Command {
|
||||
WikibaseSchema schema = null;
|
||||
if (jsonString != null) {
|
||||
try {
|
||||
JSONObject json = ParsingUtilities.evaluateJsonStringToObject(jsonString);
|
||||
schema = WikibaseSchema.reconstruct(json);
|
||||
schema = WikibaseSchema.reconstruct(jsonString);
|
||||
} catch (JSONException e) {
|
||||
respond(response, "error", "Wikibase schema could not be parsed.");
|
||||
return;
|
||||
|
@ -190,7 +190,7 @@ public class PerformWikibaseEditsOperation extends EngineDependentOperation {
|
||||
|
||||
// Generate batch token
|
||||
long token = (new Random()).nextLong();
|
||||
String summary = _summary + String.format(" ([[Wikidata:Edit groups/OR/%s|discuss]])",
|
||||
String summary = _summary + String.format(" ([[:toollabs:editgroups/b/OR/%s|details]])",
|
||||
(Long.toHexString(token).substring(0, 7)));
|
||||
|
||||
// Evaluate the schema
|
||||
|
Loading…
Reference in New Issue
Block a user