Class TableRowService
- java.lang.Object
-
- org.intermine.webservice.server.WebService
-
- org.intermine.webservice.server.query.AbstractQueryService
-
- org.intermine.webservice.server.query.result.QueryResultService
-
- org.intermine.webservice.server.query.result.TableRowService
-
public class TableRowService extends QueryResultService
A service that produces results in nested rows for use in tables.- Author:
- Alex Kalderimis
-
-
Field Summary
-
Fields inherited from class org.intermine.webservice.server.query.result.QueryResultService
attributes, BATCH_SIZE, executor
-
Fields inherited from class org.intermine.webservice.server.WebService
dataPackageOutput, DEFAULT_CALLBACK, im, os, out, output, request, response, webProperties
-
-
Constructor Summary
Constructors Constructor Description TableRowService(InterMineAPI im)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
canServe(Format format)
Check whether the format is acceptable.protected Format
getDefaultFormat()
void
runPathQuery(PathQuery pathQuery, int firstResult, int maxResults)
Runs path query and returns to output obtained results.protected void
setHeaderAttributes(PathQuery pq, java.lang.Integer start, java.lang.Integer size)
Set the header attributes of the output based on the values of the PathQuery-
Methods inherited from class org.intermine.webservice.server.query.result.QueryResultService
encode, execute, getFormatType, getPathQueryExecutor, initState, makeJSONOutput, postInit, writeDataPackageAttributes
-
Methods inherited from class org.intermine.webservice.server.query.AbstractQueryService
formatIsJsonObj, getQueryBuilder, getSchemaLocation, getSchemaUrl
-
Methods inherited from class org.intermine.webservice.server.WebService
cleanUp, formatIsFlatFile, formatIsJSON, formatIsJSONP, formatIsXML, getAuthenticatedUser, getCallback, getColumnHeaderStyle, getDefaultFileName, getDefaultOutput, getDefaultOutput, getExtension, getFormat, getIntParameter, getIntParameter, getLineBreak, getListManager, getOptionalParameter, getOptionalParameter, getPermission, getProperty, getRawOutput, getRequestFileName, getRequiredParameter, hasCallback, isAuthenticated, isGzip, isUncompressed, isZip, makeXMLOutput, service, setFormat, setNameSpace, validateState, wantsColumnHeaders, wantsDataPackage
-
-
-
-
Constructor Detail
-
TableRowService
public TableRowService(InterMineAPI im)
- Parameters:
im
- The InterMine state object
-
-
Method Detail
-
getDefaultFormat
protected Format getDefaultFormat()
- Overrides:
getDefaultFormat
in classQueryResultService
- Returns:
- The default format constant for this service.
-
canServe
protected boolean canServe(Format format)
Description copied from class:WebService
Check whether the format is acceptable. By default returns true. Services with a particular set of accepted formats should override this and check.- Overrides:
canServe
in classQueryResultService
- Parameters:
format
- The format to check.- Returns:
- whether or not this format is acceptable.
-
setHeaderAttributes
protected void setHeaderAttributes(PathQuery pq, java.lang.Integer start, java.lang.Integer size)
Description copied from class:QueryResultService
Set the header attributes of the output based on the values of the PathQuery- Overrides:
setHeaderAttributes
in classQueryResultService
- Parameters:
pq
- The path query to be runstart
- The beginning of this set of resultssize
- The size of this set of results
-
runPathQuery
public void runPathQuery(PathQuery pathQuery, int firstResult, int maxResults)
Description copied from class:QueryResultService
Runs path query and returns to output obtained results.- Overrides:
runPathQuery
in classQueryResultService
- Parameters:
pathQuery
- path queryfirstResult
- index of first result, that should be returnedmaxResults
- maximum number of results
-
-