Class ListOperationService
- java.lang.Object
-
- org.intermine.webservice.server.WebService
-
- org.intermine.webservice.server.core.JSONService
-
- org.intermine.webservice.server.lists.AbstractListService
-
- org.intermine.webservice.server.lists.AuthenticatedListService
-
- org.intermine.webservice.server.lists.ListMakerService
-
- org.intermine.webservice.server.lists.ListOperationService
-
- Direct Known Subclasses:
ListDifferenceService
,ListIntersectionService
,ListSubtractionService
,ListUnionService
public abstract class ListOperationService extends ListMakerService
A base class for services that perform operations on lists.- Author:
- Alex Kalderimis
-
-
Field Summary
-
Fields inherited from class org.intermine.webservice.server.lists.ListMakerService
LIST_TYPE_KEY
-
Fields inherited from class org.intermine.webservice.server.lists.AbstractListService
LIST_DESCRIPTION_KEY, LIST_ID_KEY, LIST_NAME_KEY, LIST_SIZE_KEY
-
Fields inherited from class org.intermine.webservice.server.core.JSONService
bagManager, model
-
Fields inherited from class org.intermine.webservice.server.WebService
dataPackageOutput, DEFAULT_CALLBACK, im, os, out, output, request, response, webProperties
-
-
Constructor Summary
Constructors Constructor Description ListOperationService(InterMineAPI api)
Constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected ListInput
getInput()
java.lang.String
getNewListType(ListInput input)
Calculate the type of the new list.protected abstract BagOperation
getOperation(ListInput input)
Get the BagOperation that will create the list.protected void
makeList(ListInput input, java.lang.String type, Profile profile, java.util.Set<java.lang.String> rubbishbin)
Make the list requested by the user.-
Methods inherited from class org.intermine.webservice.server.lists.ListMakerService
canServe, execute, getDefaultFormat, getHeaderAttributes, initialiseDelendumAccumulator, validateState
-
Methods inherited from class org.intermine.webservice.server.lists.AbstractListService
getClassesForBags
-
Methods inherited from class org.intermine.webservice.server.core.JSONService
addOutputInfo, addResultEntries, addResultEntries, addResultEntry, addResultEntry, addResultItem, addResultItem, addResultValue, addResultValue, addResultValue, getResultsKey, lazyList, postInit
-
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, initState, isAuthenticated, isGzip, isUncompressed, isZip, makeJSONOutput, makeXMLOutput, service, setFormat, setNameSpace, wantsColumnHeaders, wantsDataPackage
-
-
-
-
Constructor Detail
-
ListOperationService
public ListOperationService(InterMineAPI api)
Constructor.- Parameters:
api
- The InterMine application object.
-
-
Method Detail
-
getNewListType
public java.lang.String getNewListType(ListInput input)
Description copied from class:ListMakerService
Calculate the type of the new list.- Specified by:
getNewListType
in classListMakerService
- Parameters:
input
- The parsed parameter input.- Returns:
- The type name.
-
getInput
protected ListInput getInput()
- Overrides:
getInput
in classAbstractListService
- Returns:
- The Input for this request.
-
getOperation
protected abstract BagOperation getOperation(ListInput input)
Get the BagOperation that will create the list.- Parameters:
input
- The parameters provided by the user.- Returns:
- A BagOperation.
-
makeList
protected void makeList(ListInput input, java.lang.String type, Profile profile, java.util.Set<java.lang.String> rubbishbin) throws java.lang.Exception
Description copied from class:ListMakerService
Make the list requested by the user.- Specified by:
makeList
in classListMakerService
- Parameters:
input
- The parsed parameter input.type
- The type of the new list.profile
- The profile to save the list in.rubbishbin
- The accumulator to store the list of bags to delete.- Throws:
java.lang.Exception
- If something goes wrong.
-
-