server/bo_client/app/services/constants.js
author ymh <ymh.work@gmail.com>
Fri, 15 Jan 2016 15:35:00 +0100
changeset 28 b0b56e0f8c7f
permissions -rw-r--r--
Add contributor edition - added viaf resolver - improve contributors list display - add update of document objects - propagate update to back office - update back office - add bo-client to back office - setup language initializer - add options mechanism - add language information in language list - add lexvo resolver service + api - add language and lexvo resolver to js app - correct env template - refresh bootstrap - download google font - add version information - update dev virtual machine to centos7 - add a readme + clean folders - add local .env file to start commands

import Ember from 'ember';

const OLAC_ROLES = {
  'http://www.language-archives.org/OLAC/1.1/annotator': 'bo.olac_role_annotator',
  'http://www.language-archives.org/OLAC/1.1/author': 'bo.olac_role_author',
  'http://www.language-archives.org/OLAC/1.1/compiler': 'bo.olac_role_compiler',
  'http://www.language-archives.org/OLAC/1.1/consultant': 'bo.olac_role_consultant',
  'http://www.language-archives.org/OLAC/1.1/data_inputter': 'bo.olac_role_data_inputter',
  'http://www.language-archives.org/OLAC/1.1/depositor': 'bo.olac_role_depositor',
  'http://www.language-archives.org/OLAC/1.1/developer': 'bo.olac_role_developer',
  'http://www.language-archives.org/OLAC/1.1/editor': 'bo.olac_role_editor',
  'http://www.language-archives.org/OLAC/1.1/illustrator': 'bo.olac_role_illustrator',
  'http://www.language-archives.org/OLAC/1.1/interpreter': 'bo.olac_role_interpreter',
  'http://www.language-archives.org/OLAC/1.1/interviewer': 'bo.olac_role_interviewer',
  'http://www.language-archives.org/OLAC/1.1/participant': 'bo.olac_role_participant',
  'http://www.language-archives.org/OLAC/1.1/performer': 'bo.olac_role_performer',
  'http://www.language-archives.org/OLAC/1.1/photographer': 'bo.olac_role_photographer',
  'http://www.language-archives.org/OLAC/1.1/recorder': 'bo.olac_role_recorder',
  'http://www.language-archives.org/OLAC/1.1/researcher': 'bo.olac_role_researcher',
  'http://www.language-archives.org/OLAC/1.1/research_participant': 'bo.olac_role_research_participant',
  'http://www.language-archives.org/OLAC/1.1/responder': 'bo.olac_role_responder',
  'http://www.language-archives.org/OLAC/1.1/signer': 'bo.olac_role_signer',
  'http://www.language-archives.org/OLAC/1.1/singer': 'bo.olac_role_singer',
  'http://www.language-archives.org/OLAC/1.1/speaker': 'bo.olac_role_speaker',
  'http://www.language-archives.org/OLAC/1.1/sponsor': 'bo.olac_role_sponsor',
  'http://www.language-archives.org/OLAC/1.1/transcriber': 'bo.olac_role_transcriber',
  'http://www.language-archives.org/OLAC/1.1/translator': 'bo.olac_role_translator',
};

const KEY_CODES = {
  BACKSPACE : 8,
  DELETE : 46,
  ESCAPE: 27,
  RETURN: 13,
};

export default Ember.Service.extend({
  OLAC_ROLES: OLAC_ROLES,
  KEY_CODES: KEY_CODES,
  VIAF_BASE_URL: "http://viaf.org/viaf/",
  LEXVO_BASE_URL: "http://lexvo.org/id/iso639-3/",
});