common/corpus-common-addon/app/services/geonames-resolver.js
author ymh <ymh.work@gmail.com>
Wed, 08 Feb 2017 15:25:24 +0100
changeset 502 74fba571487e
parent 392 4fbe94af93e8
permissions -rw-r--r--
Complete the notice display. add various fields to document to correctly display the notice. Correct bug #0025746

import * as utils from 'corpus-common-addon/utils/utils';

import ResolverService from 'corpus-common-addon/services/resolver-service';

export default ResolverService.extend({

  storeKeyBase: 'geonames',
  apiPath: '/api/v1/resolvers/geonames/',
  resDocRoot: 'geonamesids',

  init(...args) {
    this._super(args);
  },

  processId: function (id) {
    return utils.getGeonamesCode(id);
  },

  getReturnDictKey: function (id) {
    return id;
  },

  getLabel: function (id) {
    return this.getName(id);
  }

});