Package org.openrefine.commands.recon
Class GuessTypesOfColumnCommand
- java.lang.Object
-
- org.openrefine.commands.Command
-
- org.openrefine.commands.recon.GuessTypesOfColumnCommand
-
public class GuessTypesOfColumnCommand extends Command
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classGuessTypesOfColumnCommand.IndividualQueryprotected static classGuessTypesOfColumnCommand.TypeGroupprotected static classGuessTypesOfColumnCommand.TypesResponse-
Nested classes/interfaces inherited from class org.openrefine.commands.Command
Command.HistoryEntryResponse
-
-
Field Summary
-
Fields inherited from class org.openrefine.commands.Command
csrfFactory, logger, servlet
-
-
Constructor Summary
Constructors Constructor Description GuessTypesOfColumnCommand()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddoPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)protected List<GuessTypesOfColumnCommand.TypeGroup>guessTypes(Grid grid, int cellIndex, String serviceUrl)Run relevance searches for the first n cells in the given column and count the types of the results.protected voidsetSampleSize(int sampleSize)-
Methods inherited from class org.openrefine.commands.Command
addHistoryEntryAndRespond, doDelete, doGet, doPut, getEngine, getEngineConfig, getIntegerParameter, getLongParameter, getProject, getProjectMetadata, getSortingConfig, hasValidCSRFToken, hasValidCSRFTokenAsGET, init, logRequests, redirect, respondCSRFError, respondError, respondError, respondJSON, respondJSON, respondOK, respondWithErrorPage
-
-
-
-
Method Detail
-
doPost
public void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException- Overrides:
doPostin classCommand- Throws:
javax.servlet.ServletExceptionIOException
-
guessTypes
protected List<GuessTypesOfColumnCommand.TypeGroup> guessTypes(Grid grid, int cellIndex, String serviceUrl) throws IOException
Run relevance searches for the first n cells in the given column and count the types of the results. Return a sorted list of types, from most frequent to least.- Parameters:
grid-cellIndex-- Returns:
- Throws:
IOException
-
setSampleSize
protected void setSampleSize(int sampleSize)
-
-