Class WSCoreService

  • All Implemented Interfaces:
    WSCoreInterface

    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

        public javax.ws.rs.core.Response getSupportedSrcDataSources()
                                                             throws org.bridgedb.utils.BridgeDBException
        Specified by:
        getSupportedSrcDataSources in interface WSCoreInterface
        Throws:
        org.bridgedb.utils.BridgeDBException
      • getSupportedSrcDataSourcesJson

        public javax.ws.rs.core.Response getSupportedSrcDataSourcesJson()
                                                                 throws org.bridgedb.utils.BridgeDBException
        Throws:
        org.bridgedb.utils.BridgeDBException
      • 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

        public javax.ws.rs.core.Response freeSearch​(String text,
                                                    String limitString)
                                             throws org.bridgedb.utils.BridgeDBException
        Specified by:
        freeSearch in interface WSCoreInterface
        Throws:
        org.bridgedb.utils.BridgeDBException
      • freeSearchJson

        public javax.ws.rs.core.Response freeSearchJson​(String text,
                                                        String limitString)
                                                 throws org.bridgedb.utils.BridgeDBException
        Throws:
        org.bridgedb.utils.BridgeDBException
      • freeSearch

        public javax.ws.rs.core.Response freeSearch​(String text,
                                                    String limitString,
                                                    @Context
                                                    javax.servlet.http.HttpServletRequest httpServletRequest)
                                             throws org.bridgedb.utils.BridgeDBException
        Throws:
        org.bridgedb.utils.BridgeDBException
      • mapID

        public javax.ws.rs.core.Response mapID​(List<String> id,
                                               List<String> scrCode,
                                               List<String> targetCodes)
                                        throws org.bridgedb.utils.BridgeDBException
        Specified by:
        mapID in interface WSCoreInterface
        Throws:
        org.bridgedb.utils.BridgeDBException
      • mapIDJson

        public javax.ws.rs.core.Response mapIDJson​(List<String> id,
                                                   List<String> scrCode,
                                                   List<String> targetCodes)
                                            throws org.bridgedb.utils.BridgeDBException
        Throws:
        org.bridgedb.utils.BridgeDBException
      • mapID

        public javax.ws.rs.core.Response mapID​(List<String> id,
                                               List<String> scrCode,
                                               List<String> targetCodes,
                                               @Context
                                               javax.servlet.http.HttpServletRequest httpServletRequest)
                                        throws org.bridgedb.utils.BridgeDBException
        Throws:
        org.bridgedb.utils.BridgeDBException
      • xrefExists

        public javax.ws.rs.core.Response xrefExists​(String id,
                                                    String scrCode)
                                             throws org.bridgedb.utils.BridgeDBException
        Specified by:
        xrefExists in interface WSCoreInterface
        Throws:
        org.bridgedb.utils.BridgeDBException
      • xrefExistsJson

        public javax.ws.rs.core.Response xrefExistsJson​(String id,
                                                        String scrCode)
                                                 throws org.bridgedb.utils.BridgeDBException
        Throws:
        org.bridgedb.utils.BridgeDBException
      • 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

        public javax.ws.rs.core.Response getSupportedTgtDataSourcesJson()
                                                                 throws org.bridgedb.utils.BridgeDBException
        Throws:
        org.bridgedb.utils.BridgeDBException
      • getSupportedTgtDataSources

        public javax.ws.rs.core.Response getSupportedTgtDataSources​(@Context
                                                                    javax.servlet.http.HttpServletRequest httpServletRequest)
                                                             throws org.bridgedb.utils.BridgeDBException
        Throws:
        org.bridgedb.utils.BridgeDBException
      • isFreeSearchSupportedJson

        public javax.ws.rs.core.Response isFreeSearchSupportedJson()
      • isMappingSupported

        public javax.ws.rs.core.Response isMappingSupported​(String sourceCode,
                                                            String targetCode)
                                                     throws org.bridgedb.utils.BridgeDBException
        Specified by:
        isMappingSupported in interface WSCoreInterface
        Throws:
        org.bridgedb.utils.BridgeDBException
      • isMappingSupportedJson

        public javax.ws.rs.core.Response isMappingSupportedJson​(String sourceCode,
                                                                String targetCode)
                                                         throws org.bridgedb.utils.BridgeDBException
        Throws:
        org.bridgedb.utils.BridgeDBException
      • getPropertyJson

        public javax.ws.rs.core.Response getPropertyJson​(String key)
      • getProperty

        public javax.ws.rs.core.Response getProperty​(String key,
                                                     @Context
                                                     javax.servlet.http.HttpServletRequest httpServletRequest)
                                              throws org.bridgedb.utils.BridgeDBException
        Throws:
        org.bridgedb.utils.BridgeDBException
      • getKeysJson

        public javax.ws.rs.core.Response getKeysJson()
      • getKeys

        public javax.ws.rs.core.Response getKeys​(@Context
                                                 javax.servlet.http.HttpServletRequest httpServletRequest)
                                          throws org.bridgedb.utils.BridgeDBException
        Throws:
        org.bridgedb.utils.BridgeDBException
      • getCapabilitiesJson

        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:
        Throws:
        org.bridgedb.utils.BridgeDBException - thrown by super classes