Package org.openrefine.commands.row
Class GetRowsCommand
- java.lang.Object
-
- org.openrefine.commands.Command
-
- org.openrefine.commands.row.GetRowsCommand
-
public class GetRowsCommand extends Command
Retrieves rows from a project (or importing job). Those rows can be requested as either:- the batch of rows starting at a given index (included), up to a certain size
- the batch of rows ending at a given index (excluded), again up to a given size.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
GetRowsCommand.JsonResult
protected static class
GetRowsCommand.WrappedRow
-
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 GetRowsCommand()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
void
doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
This command accepts both POST and GET.protected void
internalRespond(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
boolean
logRequests()
Whether each request to this command should be logged.protected static List<GetRowsCommand.WrappedRow>
recordToWrappedRows(Record record)
-
Methods inherited from class org.openrefine.commands.Command
addHistoryEntryAndRespond, doDelete, doPut, getEngine, getEngineConfig, getIntegerParameter, getLongParameter, getProject, getProjectMetadata, getSortingConfig, hasValidCSRFToken, hasValidCSRFTokenAsGET, init, 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 Exception
This command accepts both POST and GET. It is not CSRF-protected as it does not incur any state change.
-
doGet
public void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws Exception
-
recordToWrappedRows
protected static List<GetRowsCommand.WrappedRow> recordToWrappedRows(Record record)
-
internalRespond
protected void internalRespond(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws Exception
- Throws:
Exception
-
logRequests
public boolean logRequests()
Description copied from class:Command
Whether each request to this command should be logged. For some commands that can get called too frequently, such as GetProcessesCommand, logging is very distracting.- Overrides:
logRequests
in classCommand
-
-