cms/app-client/app/services/constants.js
changeset 126 e87a340711a4
child 142 86fcf0c837c0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cms/app-client/app/services/constants.js	Mon Feb 22 18:06:39 2016 +0100
@@ -0,0 +1,266 @@
+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,
+};
+
+const LANGUAGES_TREEMAP = {
+ "name": "Global",
+ "children": [
+  {
+    "id": "http://lexvo.org/id/iso639-3/fra",
+    "name": "Français",
+  },
+  {
+    "id": "http://lexvo.org/id/iso639-3/gsw",
+    "name": "Alsacien",
+  },
+  {
+    "id": "http://lexvo.org/id/iso639-3/bre",
+    "name": "Breton",
+  },
+  {
+    "id": "http://lexvo.org/id/iso639-3/oci",
+    "name": "Occitan",
+  },
+  {
+    "id": "http://lexvo.org/id/iso639-3/lad",
+    "name": "Judéo-espagnol",
+  },
+  {
+    "id": "http://lexvo.org/id/iso639-3/und",
+    "name": "Undetermined",
+  },
+  {
+    "name": "Langues régionales",
+    // (franccomtois,wallon, champenois, picard, normand, gallo,poitevin-saintongeais [dans ses deux variétés : poitevinet saintongeais], lorrain, bourguignon-morvandiau)
+    "children": [
+      {
+        "id": "http://lexvo.org/id/iso639-3/pcd",
+        "name": "Langues d'oïl",
+      },
+      {
+        "id": "http://lexvo.org/id/iso639-3/frp",
+        "name": "Francoprovençal",
+      },
+      {
+        "id": "http://lexvo.org/id/iso639-3/cos",
+        "name": "Corse",
+      }
+    ]
+  },
+  {
+    "name": "Langues non territoriales",
+    "children": [
+      {
+        "id": "http://lexvo.org/id/iso639-3/fsl",
+        "name": "Langue des signes française (LSF)",
+      },
+      {
+        "id": "http://lexvo.org/id/iso639-3/ber",
+        "name": "Berbère",
+      },
+      {
+        "id": "http://lexvo.org/id/iso639-3/kab",
+        "name": "Kabyle",
+      },
+      {
+        "id": "http://lexvo.org/id/iso639-3/ell",
+        "name": "Grec moderne"
+      },
+      {
+        "id": "http://lexvo.org/id/iso639-3/spa",
+        "name": "Espagnol"
+      },
+      {
+        "id": "http://lexvo.org/id/iso639-3/eng",
+        "name": "Anglais",
+      },
+      {
+        "id": "http://lexvo.org/id/iso639-3/ita",
+        "name": "Italien",
+      },
+      {
+        "id": "http://lexvo.org/id/iso639-3/deu",
+        "name": "Allemand",
+      },
+      {
+        "id": "http://lexvo.org/id/iso639-3/tur",
+        "name": "Turque",
+      },
+    ]
+  },
+  {
+    "name": "Les Creoles",
+    "children": [
+      {
+        "id": "http://lexvo.org/id/iso639-3/rcf",
+        "name": "Creole de la Réunion",
+      },
+      {
+        "id": "http://lexvo.org/id/iso639-3/gcf",
+        "name": "Creole de la Guadeloupe",
+      }
+    ]
+  },
+  {
+    "name": "Guyane",
+    "children": [
+      {
+        "id": "http://lexvo.org/id/iso639-3/gcf",
+        "name": "Ndyuka-Trio Pidgin (njt)",
+      },
+      {
+        "id": "http://lexvo.org/id/iso639-3/plu",
+        "name": "Palikúr (plu)",
+      },
+      {
+        "id": "http://lexvo.org/id/iso639-3/gcr",
+        "name": "Guianese Creole French (gcr)",
+      },
+      {
+        "id": "http://lexvo.org/id/iso639-3/djk",
+        "name": "Eastern Maroon Creole (djk)",
+      },
+      {
+        "id": "http://lexvo.org/id/iso639-3/srn",
+        "name": "Sranan Tongo (srn)",
+      },
+      {
+        "id": "http://lexvo.org/id/iso639-3/car",
+        "name": "kali'na (car)",
+      }
+    ]
+  },
+  {
+    "name": "Mayotte",
+    "children": [
+      {
+        "id": "http://lexvo.org/id/iso639-3/swb",
+        "name": "Maore Comorian (swb)",
+      },
+      {
+        "id": "http://lexvo.org/id/iso639-3/lsy",
+        "name": "Mauritian Sign Language (lsy)",
+      }
+    ]
+  },
+  {
+    "name": "Polynésie française",
+    "children": [
+      {
+        "id": "http://lexvo.org/id/iso639-3/uve",
+        "name": "West Uvean (uve)",
+      }
+    ]
+  },
+  {
+    "name": "Wallis et Futuna",
+    "children": [
+      {
+        "id": "http://lexvo.org/id/iso639-3/fud",
+        "name": "LanEast Futuna (fud)",
+      },
+      {
+        "id": "http://lexvo.org/id/iso639-3/wls",
+        "name": "Wallisian (wls)",
+      }
+    ]
+  },
+  {
+    "name": "Nouvelle-Calédonie",
+    "children": [
+      {
+        "id": "http://lexvo.org/id/iso639-3/wls",
+        "name": "Wallisian (wls)",
+      },
+      {
+        "id": "http://lexvo.org/id/iso639-3/ane",
+        "name": "Xârâcùù (ane)",
+      },
+      {
+        "id": "http://lexvo.org/id/iso639-3/cam",
+        "name": "Cemuhî (cam)",
+      },
+      {
+        "id": "http://lexvo.org/id/iso639-3/axx",
+        "name": "Xaragure (axx)",
+      },
+      {
+        "id": "http://lexvo.org/id/iso639-3/iai",
+        "name": "Iaai (iai)",
+      },
+      {
+        "id": "http://lexvo.org/id/iso639-3/nee",
+        "name": "Nêlêmwa-Nixumwak (nee)",
+      },
+      {
+        "id": "http://lexvo.org/id/iso639-3/dhv",
+        "name": "Dehu (dhv)",
+      },
+      {
+        "id": "http://lexvo.org/id/iso639-3/nen",
+        "name": "Nengone (nen)",
+      },
+      {
+        "id": "http://lexvo.org/id/iso639-3/aji",
+        "name": "Ajië (aji)",
+      },
+      {
+        "id": "http://lexvo.org/id/iso639-3/kdk",
+        "name": "Numee (kdk)",
+      },
+      {
+        "id": "http://lexvo.org/id/iso639-3/nem",
+        "name": "Nemi",
+      },
+      {
+        "id": "http://lexvo.org/id/iso639-3/nua",
+        "name": "Yuaga (nua)",
+      },
+      {
+        "id": "http://lexvo.org/id/iso639-3/bwa",
+        "name": "Bwatoo (bwa)",
+      }
+    ]
+  }
+ ]
+};
+
+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/",
+  LANGUAGES_TREEMAP: LANGUAGES_TREEMAP
+});