Class AbstractRegionExportService

    • 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, out, output, request, response, webProperties
    • Constructor Summary

      Constructors 
      Constructor Description
      AbstractRegionExportService​(org.intermine.api.InterMineAPI im)
      Constructor.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected void checkPathQuery​(org.intermine.pathquery.PathQuery pq)
      No-op stub.
      protected void export​(org.intermine.pathquery.PathQuery pq, org.intermine.api.profile.Profile profile)
      Method that carries out the logic for this exporter.
      protected abstract java.lang.String getContentType()  
      protected java.lang.String getDefaultFileName()  
      org.intermine.webservice.server.Format getDefaultFormat()  
      protected org.intermine.webservice.server.output.Output getDefaultOutput​(java.io.PrintWriter out, java.io.OutputStream outputstream, java.lang.String separator)  
      protected abstract org.intermine.web.logic.export.Exporter getExporter​(org.intermine.pathquery.PathQuery pq)  
      protected org.intermine.webservice.server.output.Formatter getFormatter()  
      protected java.io.OutputStream getOutputStream()  
      protected java.io.PrintWriter getPrintWriter()  
      protected abstract java.lang.String getSuffix()  
      boolean isAuthenticated()  
      protected void makeList​(org.intermine.webservice.server.lists.ListInput input, java.lang.String type, org.intermine.api.profile.Profile profile, java.util.Set<java.lang.String> temporaryBagNamesAccumulator)  
      protected org.intermine.pathquery.PathQuery makePathQuery​(java.lang.String type, java.util.Collection<java.lang.Integer> ids)
      Make a path-query from a bag.
      protected void validateState()  
      • Methods inherited from class org.intermine.webservice.server.lists.ListMakerService

        canServe, execute, initialiseDelendumAccumulator
      • 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, getDefaultOutput, getExtension, getFormat, getIntParameter, getIntParameter, getLineBreak, getListManager, getOptionalParameter, getOptionalParameter, getPermission, getProperty, getRawOutput, getRequestFileName, getRequiredParameter, hasCallback, initState, isGzip, isUncompressed, isZip, makeJSONOutput, makeXMLOutput, service, setFormat, setNameSpace, wantsColumnHeaders, wantsDataPackage
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AbstractRegionExportService

        public AbstractRegionExportService​(org.intermine.api.InterMineAPI im)
        Constructor.
        Parameters:
        im - The InterMine API settings object.
    • Method Detail

      • isAuthenticated

        public boolean isAuthenticated()
        Overrides:
        isAuthenticated in class org.intermine.webservice.server.WebService
      • validateState

        protected void validateState()
        Overrides:
        validateState in class org.intermine.webservice.server.lists.ListMakerService
      • makeList

        protected void makeList​(org.intermine.webservice.server.lists.ListInput input,
                                java.lang.String type,
                                org.intermine.api.profile.Profile profile,
                                java.util.Set<java.lang.String> temporaryBagNamesAccumulator)
                         throws java.lang.Exception
        Overrides:
        makeList in class GenomicRegionSearchService
        Throws:
        java.lang.Exception
      • makePathQuery

        protected org.intermine.pathquery.PathQuery makePathQuery​(java.lang.String type,
                                                                  java.util.Collection<java.lang.Integer> ids)
                                                           throws java.lang.Exception
        Make a path-query from a bag.
        Parameters:
        ids - list of ids
        type - The bag to constrain this query on.
        Returns:
        A path-query.
        Throws:
        java.lang.Exception - if something goes wrong
      • checkPathQuery

        protected void checkPathQuery​(org.intermine.pathquery.PathQuery pq)
                               throws java.lang.Exception
        No-op stub. Override to implement format checks.
        Parameters:
        pq - pathquery
        Throws:
        java.lang.Exception - if something goes wrong
      • getExporter

        protected abstract org.intermine.web.logic.export.Exporter getExporter​(org.intermine.pathquery.PathQuery pq)
        Parameters:
        pq - pathquery
        Returns:
        the exporter
      • export

        protected void export​(org.intermine.pathquery.PathQuery pq,
                              org.intermine.api.profile.Profile profile)
        Method that carries out the logic for this exporter.
        Parameters:
        pq - The pathquery.
        profile - A profile to lookup saved bags in.
      • getSuffix

        protected abstract java.lang.String getSuffix()
        Returns:
        The suffix for the file name.
      • getDefaultFileName

        protected java.lang.String getDefaultFileName()
        Overrides:
        getDefaultFileName in class org.intermine.webservice.server.WebService
      • getPrintWriter

        protected java.io.PrintWriter getPrintWriter()
        Returns:
        printwriter
      • getOutputStream

        protected java.io.OutputStream getOutputStream()
        Returns:
        outputstream
      • getContentType

        protected abstract java.lang.String getContentType()
        Returns:
        content type
      • getFormatter

        protected org.intermine.webservice.server.output.Formatter getFormatter()
        Returns:
        formatter
      • getDefaultOutput

        protected org.intermine.webservice.server.output.Output getDefaultOutput​(java.io.PrintWriter out,
                                                                                 java.io.OutputStream outputstream,
                                                                                 java.lang.String separator)
        Overrides:
        getDefaultOutput in class org.intermine.webservice.server.WebService
      • getDefaultFormat

        public org.intermine.webservice.server.Format getDefaultFormat()
        Overrides:
        getDefaultFormat in class org.intermine.webservice.server.lists.ListMakerService