Class IDMapperService

  • All Implemented Interfaces:
    org.restlet.Uniform

    public class IDMapperService
    extends org.restlet.Application
    Server component for ID mapping.

    Use -DserverURL=http:// to change the URL to the server. It defaults to http://bridgedb.org/wiki/BridgeWebservice and must be overwritten for custom installations.

    • Field Detail

      • configFile

        public final File configFile
      • URL_NO_MATCH

        public static final String URL_NO_MATCH
        URL pattern to catch a misformed query.
        {unmatched patter}
        See Also:
        Constant Field Values
      • URL_XREFS

        public static final String URL_XREFS
        URL pattern for mapping xrefs.
        /{organism}/xrefs/{system}/{id}[?dataSource={dsName}]
        See Also:
        IDMapper.mapID(org.bridgedb.Xref, org.bridgedb.DataSource...), Constant Field Values
      • URL_SEARCH

        public static final String URL_SEARCH
        URL pattern for searching xrefs.
        /{organism}/search/{query}[?limit={limit}]
        See Also:
        IDMapper.freeSearch(String, int), Constant Field Values
      • URL_XREF_EXISTS

        public static final String URL_XREF_EXISTS
        URL pattern for finding out if an xref exists in the database.
        /{organism}/xrefExists/{system}/{id}
        See Also:
        IDMapper.xrefExists(org.bridgedb.Xref), Constant Field Values
      • URL_PROPERTIES

        public static final String URL_PROPERTIES
        URL pattern for getting IDMapper properties. Returns tab delimited text with a property on each line, where the first column is the property key, the second is the property value.
        /{organism}/properties
        See Also:
        IDMapperCapabilities.getKeys(), IDMapperCapabilities.getProperty(String), Constant Field Values
      • URL_SUPPORTED_SOURCE_DATASOURCES

        public static final String URL_SUPPORTED_SOURCE_DATASOURCES
        URL pattern for getting the supported source datasources for this database.
        /{organism}/sourceDataSources
        See Also:
        IDMapperCapabilities.getSupportedSrcDataSources(), Constant Field Values
      • URL_SUPPORTED_TARGET_DATASOURCES

        public static final String URL_SUPPORTED_TARGET_DATASOURCES
        URL pattern for getting the supported target datasources for this database.
        /{organism}/targetDataSources
        See Also:
        IDMapperCapabilities.getSupportedTgtDataSources(), Constant Field Values
      • URL_IS_FREE_SEARCH_SUPPORTED

        public static final String URL_IS_FREE_SEARCH_SUPPORTED
        URL pattern for finding out if free search is supported.
        /{organism}/isFreeSearchSupported
        See Also:
        IDMapperCapabilities.isFreeSearchSupported(), Constant Field Values
      • URL_IS_MAPPING_SUPPORTED

        public static final String URL_IS_MAPPING_SUPPORTED
        URL pattern to find out if a mapping is supported.
        /{organism}/isMappingSupported/{source_system}/{target_system}
        See Also:
        IDMapperCapabilities.isMappingSupported(org.bridgedb.DataSource, org.bridgedb.DataSource), Constant Field Values
      • URL_ATTRIBUTE_SEARCH

        public static final String URL_ATTRIBUTE_SEARCH
        URL pattern for searching by attribute. Returns tab delimited text with an xref result on each line, where the first column is the identifier, the second column is the datasource and the third column is the attribute value.
        /{organism}/attributeSearch/{query}?[limit={limit}][&attrName={attrName}]
        See Also:
        AttributeMapper.freeAttributeSearch(String, String, int), Constant Field Values
      • URL_ATTRIBUTES

        public static final String URL_ATTRIBUTES
        URL pattern for getting attributes of an xref. If attrName is supplied, this method returns plain text with an attribute value on each line. If attrName is not supplied, this method returns tab delimited text with an attribute key-value pair on each line.
        /{organism}/attributes/{system}/{id}[?attrName={attrName}]
        See Also:
        AttributeMapper.getAttributes(org.bridgedb.Xref, String), AttributeMapper.getAttributes(org.bridgedb.Xref), Constant Field Values
      • URL_ATTRIBUTE_SET

        public static final String URL_ATTRIBUTE_SET
        URL pattern for getting the supported attribute set.
        /{organism}/attributeSet
        See Also:
        AttributeMapper.getAttributeSet(), Constant Field Values
      • URL_BACK_PAGE_TEXT

        public static final String URL_BACK_PAGE_TEXT
        URL pattern for getting backpage HTML.
        URL:
        /{organism}/backPageText/{system}/{id}
        See Also:
        Constant Field Values
      • URL_DATASOURCES

        public static final String URL_DATASOURCES
        URL pattern for getting the datasources.txt file
        See Also:
        Constant Field Values
    • Constructor Detail

      • IDMapperService

        public IDMapperService​(File aConfigFile,
                               boolean transitive)
    • Method Detail

      • start

        public void start()
                   throws Exception
        Overrides:
        start in class org.restlet.Application
        Throws:
        Exception
      • createRoot

        public org.restlet.Restlet createRoot()
        Overrides:
        createRoot in class org.restlet.Application
      • getGdbProvider

        public org.bridgedb.rdb.GdbProvider getGdbProvider()