2010-09-22 19:04:10 +02:00
|
|
|
package com.google.refine.commands.recon;
|
2010-05-05 01:24:48 +02:00
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
|
|
|
|
|
import org.json.JSONObject;
|
|
|
|
|
2010-09-22 19:04:10 +02:00
|
|
|
import com.google.refine.commands.EngineDependentCommand;
|
|
|
|
import com.google.refine.model.AbstractOperation;
|
|
|
|
import com.google.refine.model.Project;
|
|
|
|
import com.google.refine.model.ReconCandidate;
|
|
|
|
import com.google.refine.operations.recon.ReconMatchSpecificTopicOperation;
|
2010-05-05 01:24:48 +02:00
|
|
|
|
|
|
|
public class ReconMatchSpecificTopicCommand extends EngineDependentCommand {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
protected AbstractOperation createOperation(Project project,
|
|
|
|
HttpServletRequest request, JSONObject engineConfig) throws Exception {
|
|
|
|
|
|
|
|
String columnName = request.getParameter("columnName");
|
|
|
|
ReconCandidate match = new ReconCandidate(
|
|
|
|
request.getParameter("topicID"),
|
|
|
|
request.getParameter("topicName"),
|
|
|
|
request.getParameter("types").split(","),
|
|
|
|
100
|
|
|
|
);
|
|
|
|
|
2010-06-24 22:13:51 +02:00
|
|
|
return new ReconMatchSpecificTopicOperation(
|
|
|
|
engineConfig,
|
|
|
|
columnName,
|
|
|
|
match,
|
|
|
|
request.getParameter("identifierSpace"),
|
|
|
|
request.getParameter("schemaSpace")
|
|
|
|
);
|
2010-05-05 01:24:48 +02:00
|
|
|
}
|
|
|
|
}
|