Class WSCoreService

  • All Implemented Interfaces:
    WSCoreInterface

    @Path("/")
    public class WSCoreService
    extends Object
    implements WSCoreInterface
    Webservice server code, that uses the ws.core functionality to expose BridgeDB data
    Author:
    Christian Y. A. Brenninkmeijer
    • Field Detail

      • noContentOnEmpty

        protected final boolean noContentOnEmpty
      • idMapper

        protected org.bridgedb.IDMapper idMapper
    • Constructor Detail

      • WSCoreService

        public WSCoreService​(org.bridgedb.IDMapper idMapper)
                      throws org.bridgedb.utils.BridgeDBException
        Throws:
        org.bridgedb.utils.BridgeDBException
    • Method Detail

      • getSupportedSrcDataSources

        @GET
        @Produces("application/xml")
        @Path("/getSupportedSrcDataSources")
        public javax.ws.rs.core.Response getSupportedSrcDataSources()
                                                             throws org.bridgedb.utils.BridgeDBException
        Specified by:
        getSupportedSrcDataSources in interface WSCoreInterface
        Throws:
        org.bridgedb.utils.BridgeDBException
      • getSupportedSrcDataSourcesJson

        @GET
        @Produces("application/json")
        @Path("/getSupportedSrcDataSources")
        public javax.ws.rs.core.Response getSupportedSrcDataSourcesJson()
                                                                 throws org.bridgedb.utils.BridgeDBException
        Throws:
        org.bridgedb.utils.BridgeDBException
      • getSupportedSrcDataSources

        @GET
        @Produces("text/html")
        @Path("/getSupportedSrcDataSources")
        public javax.ws.rs.core.Response getSupportedSrcDataSources​(@Context
                                                                    javax.servlet.http.HttpServletRequest httpServletRequest)
                                                             throws org.bridgedb.utils.BridgeDBException
        Throws:
        org.bridgedb.utils.BridgeDBException
      • freeSearch

        @GET
        @Produces("application/xml")
        @Path("/freeSearch")
        public javax.ws.rs.core.Response freeSearch​(@QueryParam("text")
                                                    String text,
                                                    @QueryParam("limit")
                                                    String limitString)
                                             throws org.bridgedb.utils.BridgeDBException
        Specified by:
        freeSearch in interface WSCoreInterface
        Throws:
        org.bridgedb.utils.BridgeDBException
      • freeSearchJson

        @GET
        @Produces("application/json")
        @Path("/freeSearch")
        public javax.ws.rs.core.Response freeSearchJson​(@QueryParam("text")
                                                        String text,
                                                        @QueryParam("limit")
                                                        String limitString)
                                                 throws org.bridgedb.utils.BridgeDBException
        Throws:
        org.bridgedb.utils.BridgeDBException
      • freeSearch

        @GET
        @Produces("text/html")
        @Path("/freeSearch")
        public javax.ws.rs.core.Response freeSearch​(@QueryParam("text")
                                                    String text,
                                                    @QueryParam("limit")
                                                    String limitString,
                                                    @Context
                                                    javax.servlet.http.HttpServletRequest httpServletRequest)
                                             throws org.bridgedb.utils.BridgeDBException
        Throws:
        org.bridgedb.utils.BridgeDBException
      • mapID

        @GET
        @Produces("application/xml")
        @Path("/mapID")
        public javax.ws.rs.core.Response mapID​(@QueryParam("id")
                                               List<String> id,
                                               @QueryParam("code")
                                               List<String> scrCode,
                                               @QueryParam("targetCode")
                                               List<String> targetCodes)
                                        throws org.bridgedb.utils.BridgeDBException
        Specified by:
        mapID in interface WSCoreInterface
        Throws:
        org.bridgedb.utils.BridgeDBException
      • mapIDJson

        @GET
        @Produces("application/json")
        @Path("/mapID")
        public javax.ws.rs.core.Response mapIDJson​(@QueryParam("id")
                                                   List<String> id,
                                                   @QueryParam("code")
                                                   List<String> scrCode,
                                                   @QueryParam("targetCode")
                                                   List<String> targetCodes)
                                            throws org.bridgedb.utils.BridgeDBException
        Throws:
        org.bridgedb.utils.BridgeDBException
      • mapID

        @GET
        @Produces("text/html")
        @Path("/mapID")
        public javax.ws.rs.core.Response mapID​(@QueryParam("id")
                                               List<String> id,
                                               @QueryParam("code")
                                               List<String> scrCode,
                                               @QueryParam("targetCode")
                                               List<String> targetCodes,
                                               @Context
                                               javax.servlet.http.HttpServletRequest httpServletRequest)
                                        throws org.bridgedb.utils.BridgeDBException
        Throws:
        org.bridgedb.utils.BridgeDBException
      • xrefExists

        @GET
        @Produces("application/xml")
        @Path("/xrefExists")
        public javax.ws.rs.core.Response xrefExists​(@QueryParam("id")
                                                    String id,
                                                    @QueryParam("code")
                                                    String scrCode)
                                             throws org.bridgedb.utils.BridgeDBException
        Specified by:
        xrefExists in interface WSCoreInterface
        Throws:
        org.bridgedb.utils.BridgeDBException
      • xrefExistsJson

        @GET
        @Produces("application/json")
        @Path("/xrefExists")
        public javax.ws.rs.core.Response xrefExistsJson​(@QueryParam("id")
                                                        String id,
                                                        @QueryParam("code")
                                                        String scrCode)
                                                 throws org.bridgedb.utils.BridgeDBException
        Throws:
        org.bridgedb.utils.BridgeDBException
      • getSupportedTgtDataSources

        @GET
        @Produces("application/xml")
        @Path("/getSupportedTgtDataSources")
        public javax.ws.rs.core.Response getSupportedTgtDataSources()
                                                             throws org.bridgedb.utils.BridgeDBException
        Specified by:
        getSupportedTgtDataSources in interface WSCoreInterface
        Throws:
        org.bridgedb.utils.BridgeDBException
      • getSupportedTgtDataSourcesJson

        @GET
        @Produces("application/json")
        @Path("/getSupportedTgtDataSources")
        public javax.ws.rs.core.Response getSupportedTgtDataSourcesJson()
                                                                 throws org.bridgedb.utils.BridgeDBException
        Throws:
        org.bridgedb.utils.BridgeDBException
      • getSupportedTgtDataSources

        @GET
        @Produces("text/html")
        @Path("/getSupportedTgtDataSources")
        public javax.ws.rs.core.Response getSupportedTgtDataSources​(@Context
                                                                    javax.servlet.http.HttpServletRequest httpServletRequest)
                                                             throws org.bridgedb.utils.BridgeDBException
        Throws:
        org.bridgedb.utils.BridgeDBException
      • isFreeSearchSupported

        @GET
        @Produces("application/xml")
        @Path("isFreeSearchSupported")
        public javax.ws.rs.core.Response isFreeSearchSupported()
        Specified by:
        isFreeSearchSupported in interface WSCoreInterface
      • isFreeSearchSupportedJson

        @GET
        @Produces("application/json")
        @Path("isFreeSearchSupported")
        public javax.ws.rs.core.Response isFreeSearchSupportedJson()
      • isMappingSupported

        @GET
        @Produces("application/xml")
        @Path("/isMappingSupported")
        public javax.ws.rs.core.Response isMappingSupported​(@QueryParam("sourceCode")
                                                            String sourceCode,
                                                            @QueryParam("targetCode")
                                                            String targetCode)
                                                     throws org.bridgedb.utils.BridgeDBException
        Specified by:
        isMappingSupported in interface WSCoreInterface
        Throws:
        org.bridgedb.utils.BridgeDBException
      • isMappingSupportedJson

        @GET
        @Produces("application/xml")
        @Path("/isMappingSupported")
        public javax.ws.rs.core.Response isMappingSupportedJson​(@QueryParam("sourceCode")
                                                                String sourceCode,
                                                                @QueryParam("targetCode")
                                                                String targetCode)
                                                         throws org.bridgedb.utils.BridgeDBException
        Throws:
        org.bridgedb.utils.BridgeDBException
      • getProperty

        @GET
        @Produces("application/xml")
        @Path("/property/{key}")
        public javax.ws.rs.core.Response getProperty​(@PathParam("key")
                                                     String key)
        Specified by:
        getProperty in interface WSCoreInterface
      • getPropertyJson

        @GET
        @Produces("application/json")
        @Path("/property/{key}")
        public javax.ws.rs.core.Response getPropertyJson​(@PathParam("key")
                                                         String key)
      • getProperty

        @GET
        @Produces("application/xml")
        @Path("/property/{key}")
        public javax.ws.rs.core.Response getProperty​(@PathParam("key")
                                                     String key,
                                                     @Context
                                                     javax.servlet.http.HttpServletRequest httpServletRequest)
                                              throws org.bridgedb.utils.BridgeDBException
        Throws:
        org.bridgedb.utils.BridgeDBException
      • getKeys

        @GET
        @Produces("application/xml")
        @Path("/getKeys")
        public javax.ws.rs.core.Response getKeys()
        Specified by:
        getKeys in interface WSCoreInterface
      • getKeysJson

        @GET
        @Produces("application/json")
        @Path("/getKeys")
        public javax.ws.rs.core.Response getKeysJson()
      • getKeys

        @GET
        @Produces("text/html")
        @Path("/getKeys")
        public javax.ws.rs.core.Response getKeys​(@Context
                                                 javax.servlet.http.HttpServletRequest httpServletRequest)
                                          throws org.bridgedb.utils.BridgeDBException
        Throws:
        org.bridgedb.utils.BridgeDBException
      • getCapabilities

        @GET
        @Produces("application/xml")
        @Path("/getCapabilities")
        public javax.ws.rs.core.Response getCapabilities()
        Specified by:
        getCapabilities in interface WSCoreInterface
      • getCapabilitiesJson

        @GET
        @Produces("application/json")
        @Path("/getCapabilities")
        public javax.ws.rs.core.Response getCapabilitiesJson()
      • noContentWrapper

        protected javax.ws.rs.core.Response noContentWrapper​(javax.servlet.http.HttpServletRequest httpServletRequest)
        Simple warning that no Context was found. Can be overwritten with nicer page
        Parameters:
        httpServletRequest - Used by super classes
        Returns:
        the response