Merge
authornowmad@nowmads-macbook-pro.local
Thu, 10 Dec 2015 17:04:51 +0100
changeset 50 182f46ea5a56
parent 23 037687868bc4 (diff)
parent 49 66739650678f (current diff)
child 51 70dff07a76ff
Merge
cms/app-client/app/controllers/visus/visu-carto.js
cms/app-client/app/templates/visus/visu-carto.hbs
cms/app-client/app/templates/visus/visu-chrono.hbs
cms/app-client/app/templates/visus/visu-discours.hbs
cms/app-client/app/templates/visus/visu-langues.hbs
cms/app-client/app/templates/visus/visu-thematiques.hbs
--- a/.hgignore	Thu Dec 10 17:00:59 2015 +0100
+++ b/.hgignore	Thu Dec 10 17:04:51 2015 +0100
@@ -1,5 +1,6 @@
 syntax: regexp
 ^dev/\.vagrant
+^dev/corpus-dev.box$
 ^server/data
 ^server/src/\.git.*
 ^server/src/\.env
@@ -8,6 +9,7 @@
 ^server/src/node_modules
 ^server/src/bootstrap/cache/
 ^server/src/database/.*\.sqlite$
+^server/src/storage/.*\.sqlite$
 ^server/src/storage/laravel.log$
 ^server/src/storage/app/
 ^server/src/storage/logs/
--- a/dev/Vagrantfile	Thu Dec 10 17:00:59 2015 +0100
+++ b/dev/Vagrantfile	Thu Dec 10 17:04:51 2015 +0100
@@ -77,7 +77,7 @@
   # end
   #
   config.vm.provider "virtualbox" do |v|
-    v.memory = 512
+    v.memory = 1024
     v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
   end
 
@@ -105,6 +105,9 @@
 
   config.vm.provision "ansible" do |ansible|
     ansible.playbook = "provisioning/playbook.yml"
+    ansible.extra_vars = {
+        site_name: "corpus-parole.local"
+    }
     ansible.sudo = true
   end
 
--- a/dev/provisioning/playbook.yml	Thu Dec 10 17:00:59 2015 +0100
+++ b/dev/provisioning/playbook.yml	Thu Dec 10 17:04:51 2015 +0100
@@ -8,8 +8,6 @@
     db_user: corpus
     db_password: md5bf687edf8c06f3f1aa3759c82c1217a0
 
-    site_name: corpus-parole.local
-
   tasks:
 #   - name: install language pack
 #     command: localedef -v -c -i en_US -f UTF-8 en_US.UTF-8
@@ -30,10 +28,10 @@
     - name: ensure correct locale LANG
       lineinfile: dest=/etc/sysconfig/i18n regexp=^LANG= line=LANG="en_US.UTF-8"
 
-    - name: set .bashrc
-      copy: src=files/.bashrc dest=/home/vagrant/.bashrc force=yes
-    - name: set .profile
-      copy: src=files/.profile dest=/home/vagrant/.profile force=yes
+    # - name: set .bashrc
+    #   copy: src=files/.bashrc dest=/home/vagrant/.bashrc force=yes
+    # - name: set .profile
+    #   copy: src=files/.profile dest=/home/vagrant/.profile force=yes
 
     - name: check yum base last update
       stat: path=/var/cache/yum/x86_64/6/base/cachecookie
@@ -192,7 +190,7 @@
       args:
         creates: /etc/nginx/ssl/{{ site_name }}.key
     - name: generate ssl csr
-      command: openssl req -new -key /etc/nginx/ssl/{{ site_name }}.key -out /etc/nginx/ssl/{{ site_name }}.csr -subj "/CN={{ site_name }}/O=Vagrant/C=UK"
+      command: openssl req -new -key /etc/nginx/ssl/{{ site_name }}.key -out /etc/nginx/ssl/{{ site_name }}.csr -subj "/CN={{ site_name }}/O=MCC/C=FR"
       args:
         creates: /etc/nginx/ssl/{{ site_name }}.csr
     - name: generate ssl certificate
@@ -237,19 +235,19 @@
       register: sesame_jar
 
     - name: download sesame
-      get_url: url=http://sourceforge.net/projects/sesame/files/Sesame%202/2.8.3/openrdf-sesame-2.8.3-sdk.tar.gz/download dest=/tmp/openrdf-sesame-2.8.3-sdk.tar.gz
+      get_url: url=http://sourceforge.net/projects/sesame/files/Sesame%204/4.0.0/openrdf-sesame-4.0.0-sdk.tar.gz/download dest=/tmp/openrdf-sesame-4.0.0-sdk.tar.gz
       when: sesame_jar.stat.exists == False
 
     - name: create sesame untar dest
-      file: path=/tmp/openrdf-sesame-2.8.3-sdk state=directory
+      file: path=/tmp/openrdf-sesame-4.0.0-sdk state=directory
       when: sesame_jar.stat.exists == False
 
     - name: unarchive sesame
-      unarchive: src=/tmp/openrdf-sesame-2.8.3-sdk.tar.gz dest=/tmp/openrdf-sesame-2.8.3-sdk copy=false
+      unarchive: src=/tmp/openrdf-sesame-4.0.0-sdk.tar.gz dest=/tmp/openrdf-sesame-4.0.0-sdk copy=false
       when: sesame_jar.stat.exists == False
 
     - name: deploy sesame jar
-      shell: cp /tmp/openrdf-sesame-2.8.3-sdk/openrdf-sesame-2.8.3/war/*.war /var/lib/tomcat/webapps/
+      shell: cp /tmp/openrdf-sesame-4.0.0-sdk/openrdf-sesame-4.0.0/war/*.war /var/lib/tomcat/webapps/
       when: sesame_jar.stat.exists == False
 
     - name: create sesame data folder
@@ -259,7 +257,7 @@
     - name: update tomcat config
       lineinfile:
         dest: /etc/tomcat/tomcat.conf
-        line: 'JAVA_OPTS=\"${JAVA_OPTS} -Dinfo.aduna.platform.appdata.basedir=/var/lib/sesame/data\"'
+        line: 'JAVA_OPTS=\"${JAVA_OPTS} -Dinfo.aduna.platform.appdata.basedir=/var/lib/sesame/data -Xms512m -Xmx512m\"'
         state: present
       when: sesame_jar.stat.exists == False
 
@@ -268,10 +266,10 @@
       when: sesame_jar.stat.exists == False
 
     - name : delete sesame archive
-      file: path=/tmp/openrdf-sesame-2.8.3-sdk.tar.gz state=absent
+      file: path=/tmp/openrdf-sesame-4.0.0-sdk.tar.gz state=absent
 
     - name : delete sesame untar
-      file: path=/tmp/openrdf-sesame-2.8.3-sdk state=absent
+      file: path=/tmp/openrdf-sesame-4.0.0-sdk state=absent
 
 
 #set postgresql local access to trust
--- a/server/bo_client/app/adapters/application.js	Thu Dec 10 17:00:59 2015 +0100
+++ b/server/bo_client/app/adapters/application.js	Thu Dec 10 17:04:51 2015 +0100
@@ -1,5 +1,5 @@
 import DS from 'ember-data';
 
 export default DS.RESTAdapter.extend({
-  namespace: 'api',
+  namespace: 'api/v1',
 });
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/server/bo_client/app/components/bo-doc-contributors.js	Thu Dec 10 17:04:51 2015 +0100
@@ -0,0 +1,21 @@
+import Ember from 'ember';
+import _ from 'lodash/lodash';
+
+export default Ember.Component.extend({
+
+  actions: {
+    toggleEditContributors : function() {
+      console.log("EDIT CONTRIBUTORS");
+      // var contributors = _.clone(this.get('document').get('contributors'));
+      // console.log("EDIT CONTRIBUTPRS", contributors);
+      // contributors.push({
+      //   name: "Hello world",
+      //   url: null,
+      //   role: 'http://www.language-archives.org/OLAC/1.1/annotator'
+      // });
+      // this.get('document').set('contributors', contributors);
+      Ember.$('#doc-contributors-table-pane').slideToggle();
+      Ember.$('#doc-contributors-list-pane').slideToggle();
+    }
+  }
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/server/bo_client/app/helpers/add-one.js	Thu Dec 10 17:04:51 2015 +0100
@@ -0,0 +1,7 @@
+import Ember from 'ember';
+
+export function addOne(params) {
+  return params[0] + 1;
+}
+
+export default Ember.Helper.helper(addOne);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/server/bo_client/app/helpers/document-contributor-role-translation-tag.js	Thu Dec 10 17:04:51 2015 +0100
@@ -0,0 +1,8 @@
+import Ember from 'ember';
+
+export function documentContributorRoleTranslationTag(params) {
+  let role  = params[0];
+  return role.replace('http://www.language-archives.org/OLAC/1.1/', 'bo.olac_role_');
+}
+
+export default Ember.Helper.helper(documentContributorRoleTranslationTag);
--- a/server/bo_client/app/index.html	Thu Dec 10 17:00:59 2015 +0100
+++ b/server/bo_client/app/index.html	Thu Dec 10 17:04:51 2015 +0100
@@ -18,7 +18,7 @@
       <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
 
     <![endif]-->
-    <link rel="stylesheet" href="assets/vendor.css">
+    <link rel="stylesheet" href="assets/bo-client-vendor.css">
     <link rel="stylesheet" href="assets/bo-client.css">
 
     {{content-for 'head-footer'}}
@@ -51,7 +51,7 @@
 
     {{content-for 'body'}}
 
-    <script src="assets/vendor.js"></script>
+    <script src="assets/bo-client-vendor.js"></script>
     <script src="assets/bo-client.js"></script>
 
   </body>
--- a/server/bo_client/app/locales/en/translations.js	Thu Dec 10 17:00:59 2015 +0100
+++ b/server/bo_client/app/locales/en/translations.js	Thu Dec 10 17:04:51 2015 +0100
@@ -12,7 +12,35 @@
     "document_audio": "Audio:",
     "document_content": "Content",
     "document_title": "Title:",
-    "document_editors": "Editor(s):"
+    "document_editors": "Editor(s):",
+    "document_contributors": "Contributor(s):",
+    "contributors_th_name": "Name",
+    "contributors_th_url": "URL",
+    "contributors_th_role": "Role",
+    "olac_role_annotator": "annotator",
+    "olac_role_author": "author",
+    "olac_role_compiler": "compiler",
+    "olac_role_consultant": "consultant",
+    "olac_role_data_inputter": "data inputter",
+    "olac_role_depositor": "depositor",
+    "olac_role_developer": "developer",
+    "olac_role_editor": "editor",
+    "olac_role_illustrator": "illustrator",
+    "olac_role_interpreter": "interpreter",
+    "olac_role_interviewer": "interviewer",
+    "olac_role_participant": "participant",
+    "olac_role_performer": "performer",
+    "olac_role_photographer": "photographer",
+    "olac_role_recorder": "recorder",
+    "olac_role_researcher": "researcher",
+    "olac_role_research_participant": "research participant",
+    "olac_role_responder": "responder",
+    "olac_role_signer": "signer",
+    "olac_role_singer": "singer",
+    "olac_role_speaker": "speaker",
+    "olac_role_sponsor": "sponsor",
+    "olac_role_transcriber": "transcriber",
+    "olac_role_translator": "translator",
   }
 
   // "some.translation.key": "Text for some.translation.key",
--- a/server/bo_client/app/locales/fr/translations.js	Thu Dec 10 17:00:59 2015 +0100
+++ b/server/bo_client/app/locales/fr/translations.js	Thu Dec 10 17:04:51 2015 +0100
@@ -11,7 +11,35 @@
     "document_audio": "Audio :",
     "document_content": "Contenu",
     "document_title": "Titre :",
-    "document_editors": "Editeur(s) :"
+    "document_editors": "Editeur(s) :",
+    "document_contributors": "Contributeur(s) :",
+    "contributors_th_name": "Nom",
+    "contributors_th_url": "URL",
+    "contributors_th_role": "Role",
+    "olac_role_annotator": "annotateur",
+    "olac_role_author": "auteur",
+    "olac_role_compiler": "compilateur",
+    "olac_role_consultant": "consultant",
+    "olac_role_data_inputter": "data inputter",
+    "olac_role_depositor": "depositeur",
+    "olac_role_developer": "developpeur",
+    "olac_role_editor": "editeur",
+    "olac_role_illustrator": "illustrateur",
+    "olac_role_interpreter": "interprète",
+    "olac_role_interviewer": "interviewer",
+    "olac_role_participant": "participant",
+    "olac_role_performer": "performer",
+    "olac_role_photographer": "photographe",
+    "olac_role_recorder": "recorder",
+    "olac_role_researcher": "chercheur",
+    "olac_role_research_participant": "research participant",
+    "olac_role_responder": "responder",
+    "olac_role_signer": "signataire",
+    "olac_role_singer": "chanteur",
+    "olac_role_speaker": "speaker",
+    "olac_role_sponsor": "sponsor",
+    "olac_role_transcriber": "transcripteur",
+    "olac_role_translator": "traducteur",
   },
   // "some.translation.key": "Text for some.translation.key",
   //
--- a/server/bo_client/app/models/document.js	Thu Dec 10 17:00:59 2015 +0100
+++ b/server/bo_client/app/models/document.js	Thu Dec 10 17:04:51 2015 +0100
@@ -1,9 +1,32 @@
 import DS from 'ember-data';
+import Ember from 'ember';
+import _ from 'lodash/lodash';
 
 export default DS.Model.extend({
   //id: DS.attr('string'),
   uri: DS.attr('string'),
+
   title: DS.attr('string'),
+
   publishers: DS.attr({defaultValue: []}),
-  mediaArray: DS.attr({defaultValue: []})
+
+  contributors: DS.attr({defaultValue: []}),
+
+  mediaArray: DS.attr({defaultValue: []}),
+
+  mediaList: Ember.computed('mediaArray', function() {
+    var res = [];
+    var mp3 = null;
+    _.forEach(this.get('mediaArray'), function(m) {
+      if(m.format === 'audio/mpeg') {
+        mp3 = m;
+      } else if (m.format.startsWith('audio/')) {
+        res.push(m);
+      }
+    });
+    if(mp3) {
+      res.unshift(mp3);
+    }
+    return res;
+  }),
 });
--- a/server/bo_client/app/styles/app.scss	Thu Dec 10 17:00:59 2015 +0100
+++ b/server/bo_client/app/styles/app.scss	Thu Dec 10 17:04:51 2015 +0100
@@ -1,1 +1,34 @@
-@import "app-core";
+@import 'bower_components/bootstrap-sass/assets/stylesheets/_bootstrap';
+@import 'bower_components/font-awesome/scss/font-awesome';
+
+$btn-font-weight: 300;
+$font-family-sans-serif: "Roboto", Helvetica, Arial, sans-serif;
+
+body, label, .checkbox label {
+	font-weight: 300;
+}
+
+.doc_details_title {
+	@extend .h3;
+	margin-top: 0;
+}
+.content-main-title {
+	@extend .h4;
+}
+
+.data-audio-title {
+	@extend .h4;
+}
+
+.content-title {
+	@extend .h5;
+}
+
+.bo-doc-edit-icons {
+  cursor: pointer;
+}
+
+#doc-contributors-table-pane {
+	display: none;
+	margin-top: 20px;
+}
--- a/server/bo_client/app/templates/application.hbs	Thu Dec 10 17:00:59 2015 +0100
+++ b/server/bo_client/app/templates/application.hbs	Thu Dec 10 17:04:51 2015 +0100
@@ -1,3 +1,1 @@
-<h2 id="title">Welcome to Ember application</h2>
-
 {{outlet}}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/server/bo_client/app/templates/components/bo-doc-contributors.hbs	Thu Dec 10 17:04:51 2015 +0100
@@ -0,0 +1,36 @@
+<div class="col-md-1">
+    {{ fa-icon "pencil" class='bo-doc-edit-icons' click=(action "toggleEditContributors")}}
+    <!--span class="glyphicon glyphicon-pencil bo-doc-edit-icons"></span-->
+</div>
+<div class="col-md-11">
+  <div class="row">
+    <div class="col-md-12 content-title">{{t 'bo.document_contributors'}}</div>
+  </div>
+  <div class="row" id="doc-contributors-list-pane">
+    <div class="col-md-12 content-value">{{#each document.contributors as |contrib index|}}{{if index " ; "}}{{#if contrib.name}}{{contrib.name}}{{else}}{{contrib.url}}{{/if}} ({{t (document-contributor-role-translation-tag contrib.role)}}){{/each}}</div>
+  </div>
+  <div class="row" id="doc-contributors-table-pane">
+    <div class="col-md-12 panel panel-default">
+      <table class="table table-striped table-condensed">
+        <thead>
+          <tr>
+            <th>#</th>
+            <th>{{t 'bo.contributors_th_name'}}</th>
+            <th>{{t 'bo.contributors_th_url'}}</th>
+            <th>{{t 'bo.contributors_th_role'}}</th>
+          </tr>
+        </thead>
+        <tbody>
+        {{#each document.contributors as |contrib index|}}
+          <tr>
+            <td>{{add-one index}}</td>
+            <td>{{contrib.name}}</td>
+            <td>{{contrib.url}}</td>
+            <td>{{contrib.role}}</td>
+          </tr>
+        {{/each}}
+      </tbody>
+      </table>
+    </div>
+  </div>
+</div>
--- a/server/bo_client/app/templates/doc.hbs	Thu Dec 10 17:00:59 2015 +0100
+++ b/server/bo_client/app/templates/doc.hbs	Thu Dec 10 17:04:51 2015 +0100
@@ -1,27 +1,48 @@
 <div class="row">
-  <div class="col-md-10 col-md-offset-1">
+  <div class="col-md-12">
     <div class="panel panel-default">
       <div class="panel-heading doc_details_title">{{t 'bo.document_detail'}}</div>
 
       <div class="panel-body">
-        <div class="doc_details">
-          <div class="data">
-            <div class="data-audio-title">{{t 'bo.document_audio'}}</div>
-            <div class="data-audio-player">
-              <audio id='' controls="controls">
-              {{#each model.mediaArray as |audio|}}
-                <source src="{{ audio.url }}" type="{{ audio.format }}"/>
-              {{/each}}
-                {{t 'bo.audio_support_error' }}
-              </audio>
+        <div class="doc_details row">
+          <div class="col-md-8 content">
+              <div class="content-main-title">{{t 'bo.document_content'}}</div>
+              <div class="row">
+                <div class="col-md-1">
+                  &nbsp;
+                </div>
+                <div class="col-md-11">
+                  <div class="content-title">{{t 'bo.document_title'}}</div>
+                  <div class="content-value">{{model.title}}</div>
+                </div>
+              </div>
+              <div class="row">
+                {{bo-doc-contributors document=model}}
+              </div>
+              <div class="row">
+                <div class="col-md-1">
+                  &nbsp;
+                </div>
+                <div class="col-md-11">
+                  <div class="content-title">{{t 'bo.document_editors'}}</div>
+                  <div class="content-value">{{#each model.publishers as |publisher index|}}{{if index ", "}}{{publisher}}{{/each}}</div>
+                </div>
+              </div>
+          </div>
+          <div class="col-md-4">
+            <div class="data">
+              <div class="data-audio-title">{{t 'bo.document_audio'}}</div>
+              <div class="data-audio-player">
+                <audio id='' controls="controls">
+                {{#each model.mediaList as |audio|}}
+                  <source src="{{ audio.url }}" type="{{ audio.format }}"/>
+                {{/each}}
+                  {{t 'bo.audio_support_error' }}
+                </audio>
+              </div>
             </div>
           </div>
           <div class="content">
-            <div class="content-main-title">{{t 'bo.document_content'}}</div>
-            <div class="content-title">{{t 'bo.document_title'}}</div>
-            <div class="content-value">{{model.title}}</div>
-            <div class="content-title">{{t 'bo.document_editors'}}</div>
-            <div class="content-value">{{#each model.publishers as |publisher index|}}{{if index ", "}}{{publisher}}{{/each}}</div>
           </div>
         </div>
       </div>
--- a/server/bo_client/bower.json	Thu Dec 10 17:00:59 2015 +0100
+++ b/server/bo_client/bower.json	Thu Dec 10 17:04:51 2015 +0100
@@ -1,16 +1,25 @@
 {
   "name": "bo-client",
   "dependencies": {
-    "ember": ">=2.0.0",
-    "ember-cli-shims": "ember-cli/ember-cli-shims#0.0.3",
+    "ember": "2.2.0",
+    "ember-cli-shims": "ember-cli/ember-cli-shims#0.0.6",
     "ember-cli-test-loader": "ember-cli-test-loader#0.1.3",
-    "ember-data": ">=2.0.0",
-    "ember-load-initializers": "ember-cli/ember-load-initializers#0.1.5",
-    "ember-qunit": "0.4.9",
-    "ember-qunit-notifications": "0.0.7",
-    "ember-resolver": "~0.1.18",
+    "ember-data": ">=2.1.0",
+    "ember-load-initializers": "ember-cli/ember-load-initializers#0.1.7",
+    "ember-qunit": ">=0.4.9",
+    "ember-qunit-notifications": ">=0.0.7",
+    "ember-resolver": ">=0.1.18",
     "jquery": "latest",
-    "loader.js": "ember-cli/loader.js#3.2.1",
-    "qunit": "~1.18.0"
+    "loader.js": "ember-cli/loader.js#3.5.0",
+    "qunit": "~1.18.0",
+    "bootstrap-sass": "bootstrap-sass-official#~3.3.6",
+    "font-awesome": "~4.4.0"
+  },
+  "resolutions": {
+    "ember-cli-shims": "0.0.6",
+    "loader.js": "3.5.0",
+    "ember-load-initializers": "0.1.7",
+    "ember": "2.2.0",
+    "qunit-notifications": "~0.1.0"
   }
 }
--- a/server/bo_client/config/environment.js	Thu Dec 10 17:00:59 2015 +0100
+++ b/server/bo_client/config/environment.js	Thu Dec 10 17:04:51 2015 +0100
@@ -5,6 +5,7 @@
     modulePrefix: 'bo-client',
     environment: environment,
     baseURL: '/',
+    //locationType: 'auto',
     locationType: 'auto',
     EmberENV: {
       FEATURES: {
@@ -20,11 +21,11 @@
   };
 
   if (environment === 'development') {
-    // ENV.APP.LOG_RESOLVER = true;
-    // ENV.APP.LOG_ACTIVE_GENERATION = true;
-    // ENV.APP.LOG_TRANSITIONS = true;
-    // ENV.APP.LOG_TRANSITIONS_INTERNAL = true;
-    // ENV.APP.LOG_VIEW_LOOKUPS = true;
+    ENV.APP.LOG_RESOLVER = true;
+    ENV.APP.LOG_ACTIVE_GENERATION = true;
+    ENV.APP.LOG_TRANSITIONS = true;
+    ENV.APP.LOG_TRANSITIONS_INTERNAL = true;
+    ENV.APP.LOG_VIEW_LOOKUPS = true;
   }
 
   if (environment === 'test') {
@@ -40,7 +41,7 @@
   }
 
   if (environment === 'production') {
-
+    ENV.locationType = 'hash';
   }
 
   return ENV;
--- a/server/bo_client/ember-cli-build.js	Thu Dec 10 17:00:59 2015 +0100
+++ b/server/bo_client/ember-cli-build.js	Thu Dec 10 17:04:51 2015 +0100
@@ -1,20 +1,44 @@
 /* global require, module */
 var EmberApp = require('ember-cli/lib/broccoli/ember-app');
+var pickFiles = require('broccoli-static-compiler');
 
 
 module.exports = function(defaults) {
 
   var app = new EmberApp(defaults, {
+    outputPaths: {
+      vendor: {
+        js: '/assets/bo-client-vendor.js',
+        css: '/assets/bo-client-vendor.css'
+      }
+    },
+    fingerprint: {
+      enabled: false
+    },
+    storeConfigInMeta: false,
     // Add options here
+    emberCliFontAwesome: {
+      useScss: true
+    },
     sassOptions: {
       includePaths: [
         'app/styles',
-        '../src/resources/assets/sass',
-        '../src/vendor/bower_components/bootstrap-sass/assets/stylesheets'
       ],
     }
   });
 
+  // bootstrap
+  app.import('bower_components/bootstrap-sass/assets/javascripts/bootstrap.js');
+  var bootstrapFonts = pickFiles('bower_components/bootstrap-sass/assets/fonts', {
+    srcDir: '/',
+    destDir: '/fonts'
+  });
+
+
+  // app.import('../src/vendor/bower_components/bootstrap-sass/assets/fonts/bootstrap/glyphicons-halflings-regular.woff', {
+  //   destDir: 'fonts'
+  // })
+
   // Use `app.import` to add additional libraries to the generated
   // output files.
   //
@@ -28,5 +52,5 @@
   // please specify an object with the list of modules as keys
   // along with the exports of each module as its value.
 
-  return app.toTree();
+  return app.toTree(bootstrapFonts);
 };
--- a/server/bo_client/package.json	Thu Dec 10 17:00:59 2015 +0100
+++ b/server/bo_client/package.json	Thu Dec 10 17:04:51 2015 +0100
@@ -19,30 +19,37 @@
   "author": "",
   "license": "MIT",
   "devDependencies": {
-    "bower": "^1.5.2",
-    "broccoli-asset-rev": "^2.1.2",
-    "broccoli-funnel": "^0.2.8",
-    "broccoli-merge-trees": "^0.2.3",
-    "ember-cli": "1.13.8",
-    "ember-cli-app-version": "0.5.0",
-    "ember-cli-babel": "^5.1.3",
+    "bower": "^1.6.8",
+    "broccoli-asset-rev": "^2.3.0",
+    "broccoli-funnel": "^1.0.1",
+    "broccoli-merge-trees": "^1.0.0",
+    "ember-cli": "1.13.13",
+    "ember-cli-app-version": "1.0.0",
+    "ember-cli-babel": "^5.1.6",
     "ember-cli-content-security-policy": "0.4.0",
-    "ember-cli-dependency-checker": "^1.0.1",
-    "ember-cli-htmlbars": "0.7.9",
-    "ember-cli-htmlbars-inline-precompile": "^0.2.0",
-    "ember-cli-ic-ajax": "0.2.1",
+    "ember-cli-dependency-checker": "^1.1.0",
+    "ember-cli-font-awesome": "1.3.0",
+    "ember-cli-htmlbars": "1.0.1",
+    "ember-cli-htmlbars-inline-precompile": "^0.3.1",
+    "ember-cli-ic-ajax": "0.2.4",
     "ember-cli-inject-live-reload": "^1.3.1",
-    "ember-cli-qunit": "^1.0.0",
-    "ember-cli-release": "0.2.3",
-    "ember-cli-sass": "4.2.0",
-    "ember-cli-sri": "^1.0.3",
+    "ember-cli-qunit": "^1.0.4",
+    "ember-cli-release": "0.2.8",
+    "ember-cli-sass": "5.2.0",
+    "ember-cli-sri": "^1.2.1",
     "ember-cli-uglify": "^1.2.0",
-    "ember-data": "1.13.8",
-    "ember-disable-proxy-controllers": "^1.0.0",
-    "ember-export-application-global": "^1.0.3",
-    "ember-i18n": "4.1.3",
+    "ember-data": "2.2.1",
+    "ember-disable-proxy-controllers": "^1.0.1",
+    "ember-export-application-global": "^1.0.5",
+    "ember-i18n": "4.2.0",
+    "ember-lodash": "0.0.6",
     "express": "^4.13.3",
-    "glob": "^4.5.3",
-    "morgan": "^1.6.1"
+    "glob": "^6.0.1",
+    "morgan": "^1.6.1",
+    "npm-check-updates": "^2.5.1",
+    "walk-sync": "^0.2.6"
+  },
+  "dependencies": {
+    "broccoli-static-compiler": "^0.2.2"
   }
 }
--- a/server/bo_client/server/mocks/documents.js	Thu Dec 10 17:00:59 2015 +0100
+++ b/server/bo_client/server/mocks/documents.js	Thu Dec 10 17:04:51 2015 +0100
@@ -1,42 +1,162 @@
 module.exports = function(app) {
   var express = require('express');
+  var _ = require('lodash');
+
   var documentsRouter = express.Router();
 
+
+  var documentList = [{
+    "id": "crdo-09-CAYCHAX_SOUND",
+    "uri": "http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-09-CAYCHAX_SOUND",
+    "title": "ALLOc : Caychax : Parabole",
+    "modified": "2010-10-25T18:16:38+02:00",
+    "publishers": [
+      "Équipe de Recherche en Syntaxe et Sémantique",
+      "Bases, corpus, langage"
+    ],
+    "contributors": [
+      {
+        "name": null,
+        "url": "http://viaf.org/viaf/56666014",
+        "role": "http://www.language-archives.org/OLAC/1.1/data_inputter"
+      },
+      {
+        "name": "LDOR",
+        "url": null,
+        "role": "http://www.language-archives.org/OLAC/1.1/depositor"
+      },
+      {
+        "name": "Thésaurus Occitan",
+        "url": null,
+        "role": "http://www.language-archives.org/OLAC/1.1/depositor"
+      },
+      {
+        "name": "Équipe de Recherche en Syntaxe et Sémantique",
+        "url": null,
+        "role": "http://www.language-archives.org/OLAC/1.1/editor"
+      },
+      {
+        "name": "Bases, corpus, langage",
+        "url": null,
+        "role": "http://www.language-archives.org/OLAC/1.1/editor"
+      },
+      {
+        "name": null,
+        "url": "http://viaf.org/viaf/91792187",
+        "role": "http://www.language-archives.org/OLAC/1.1/interviewer"
+      },
+      {
+        "name": null,
+        "url": "http://viaf.org/viaf/51700729",
+        "role": "http://www.language-archives.org/OLAC/1.1/researcher"
+      },
+      {
+        "name": "Alazet, Pierre",
+        "url": null,
+        "role": "http://www.language-archives.org/OLAC/1.1/speaker"
+      },
+      {
+        "name": "Del Duca, Jeanne",
+        "url": null,
+        "role": "http://www.language-archives.org/OLAC/1.1/transcriber"
+      }
+    ],
+    "mediaArray": {
+      "http://cocoon.huma-num.fr/data/archi/144792_09-CAYCHAX_22km.wav": {
+        "url": "http://cocoon.huma-num.fr/data/archi/144792_09-CAYCHAX_22km.wav",
+        "format": "audio/x-wav",
+        "extent": "PT03M18S",
+        "extent_ms": 198000,
+        "master": false
+      },
+      "http://cocoon.huma-num.fr/data/archi/masters/144792.wav": {
+        "url": "http://cocoon.huma-num.fr/data/archi/masters/144792.wav",
+        "format": "audio/x-wav",
+        "extent": "PT03M18S",
+        "extent_ms": 198000,
+        "master": true
+      },
+      "http://cocoon.huma-num.fr/data/archi/mp3/144792_09-CAYCHAX_44k.mp3": {
+        "url": "http://cocoon.huma-num.fr/data/archi/mp3/144792_09-CAYCHAX_44k.mp3",
+        "format": "audio/mpeg",
+        "extent": "PT03M18S",
+        "extent_ms": 198000,
+        "master": false
+      },
+      "http://cocoon.huma-num.fr/exist/crdo/thesoc/oc/crdo-09-CAYCHAX.xhtml": {
+        "url": "http://cocoon.huma-num.fr/exist/crdo/thesoc/oc/crdo-09-CAYCHAX.xhtml",
+        "format": "application/xhtml+xml",
+        "extent": null,
+        "extent_ms": null,
+        "master": false
+      },
+      "http://cocoon.huma-num.fr/exist/crdo/thesoc/oc/crdo-09-CAYCHAX.xml": {
+        "url": "http://cocoon.huma-num.fr/exist/crdo/thesoc/oc/crdo-09-CAYCHAX.xml",
+        "format": "application/xml",
+        "extent": null,
+        "extent_ms": null,
+        "master": false
+      }
+    }
+  },
+  {
+    "id": "crdo-ALA_177",
+    "uri": "http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-ALA_177",
+    "title": "Atlas Linguistique et ethnographique de l'Alsace - Enquêtes linguistiques - Cleebourg: 04",
+    "modified": "2014-12-01T18:34:43+01:00",
+    "publishers": [
+      "Atlas linguistiques, cultures et parlers régionaux de France"
+    ],
+    "contributors": [
+      {
+        "name": null,
+        "url": "http://viaf.org/viaf/9122216",
+        "role": "http://www.language-archives.org/OLAC/1.1/depositor"
+      },
+      {
+        "name": null,
+        "url": "http://viaf.org/viaf/61542329",
+        "role": "http://www.language-archives.org/OLAC/1.1/interviewer"
+      },
+      {
+        "name": "Informateur 1",
+        "url": null,
+        "role": "http://www.language-archives.org/OLAC/1.1/speaker"
+      },
+      {
+        "name": null,
+        "url": "http://viaf.org/viaf/61542329",
+        "role": "http://www.language-archives.org/OLAC/1.1/transcriber"
+      }
+    ],
+    "mediaArray": {
+      "http://cocoon.huma-num.fr/data/ala/ALA_177.mp3": {
+        "url": "http://cocoon.huma-num.fr/data/ala/ALA_177.mp3",
+        "format": "audio/mpeg",
+        "extent": "PT23M53S",
+        "extent_ms": 1433000,
+        "master": false
+      },
+      "http://cocoon.huma-num.fr/data/ala/masters/ALA_177.wav": {
+        "url": "http://cocoon.huma-num.fr/data/ala/masters/ALA_177.wav",
+        "format": "audio/x-wav",
+        "extent": "PT23M53S",
+        "extent_ms": 1433000,
+        "master": true
+      },
+      "http://cocoon.huma-num.fr/data/ala/ALA_177_22km.wav": {
+        "url": "http://cocoon.huma-num.fr/data/ala/ALA_177_22km.wav",
+        "format": "audio/x-wav",
+        "extent": "PT23M53S",
+        "extent_ms": 1433000,
+        "master": false
+      }
+    }
+  }];
+
   documentsRouter.get('/', function(req, res) {
     res.send({
-      'documents': [{
-            id: "crdo-ALA_170",
-            uri: "http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-ALA_170",
-            title: "Atlas Linguistique et ethnographique de l'Alsace - Enqu\u00eates linguistiques - Brumath: 03",
-            publishers: ["Atlas linguistiques, cultures et parlers r\u00e9gionaux de France"],
-            mediaArray: [
-              {
-                url: "http:\/\/cocoon.huma-num.fr\/data\/ala\/ALA_170_22km.wav",
-                format: "audio\/x-wav"},
-              {
-                url: "http:\/\/cocoon.huma-num.fr\/data\/ala\/ALA_170.mp3",
-                format: "audio\/mpeg"},
-              {
-                url: "http:\/\/purl.org\/poi\/crdo.vjf.cnrs.fr\/crdo-ALA_170",
-                format: "audio\/x-wav" }
-            ]
-          },
-          {
-            id: "crdo-ALA_177",
-            uri: "http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-ALA_177",
-            title: "Atlas Linguistique et ethnographique de l'Alsace - Enqu\u00eates linguistiques - Cleebourg: 04",
-            publishers: ["Atlas linguistiques, cultures et parlers r\u00e9gionaux de France"],
-            mediaArray: [{
-                url: "http:\/\/cocoon.huma-num.fr\/data\/ala\/ALA_177_22km.wav",
-                format: "audio\/x-wav"
-            }, {
-                url: "http:\/\/cocoon.huma-num.fr\/data\/ala\/ALA_177.mp3",
-                format: "audio\/mpeg"
-            }, {
-                url: "http:\/\/purl.org\/poi\/crdo.vjf.cnrs.fr\/crdo-ALA_177",
-                format: "audio\/x-wav"
-            }]
-          }]
+      'documents': documentList,
     });
   });
 
@@ -45,25 +165,14 @@
   });
 
   documentsRouter.get('/:id', function(req, res) {
-    res.send({
-      'document': {
-        id: req.params.id,
-        uri: "http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-ALA_170",
-        title: "Atlas Linguistique et ethnographique de l'Alsace - Enqu\u00eates linguistiques - Brumath: 03",
-        publishers: ["Atlas linguistiques, cultures et parlers r\u00e9gionaux de France"],
-        mediaArray: [
-          {
-            url: "http:\/\/cocoon.huma-num.fr\/data\/ala\/ALA_170_22km.wav",
-            format: "audio\/x-wav"},
-          {
-            url: "http:\/\/cocoon.huma-num.fr\/data\/ala\/ALA_170.mp3",
-            format: "audio\/mpeg"},
-          {
-            url: "http:\/\/purl.org\/poi\/crdo.vjf.cnrs.fr\/crdo-ALA_170",
-            format: "audio\/x-wav" }
-        ]
-      }
-    });
+
+    var docRes = _.find(documentList, 'id', req.params.id);
+    if(docRes) {
+      res.send({'document': docRes});
+    } else {
+      res.status(404).send('Not found');
+    }
+
   });
 
   documentsRouter.put('/:id', function(req, res) {
@@ -78,5 +187,5 @@
     res.status(204).end();
   });
 
-  app.use('/api/documents', documentsRouter);
+  app.use('/api/v1/documents', documentsRouter);
 };
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/server/bo_client/tests/integration/components/bo-doc-contributors-test.js	Thu Dec 10 17:04:51 2015 +0100
@@ -0,0 +1,25 @@
+import { moduleForComponent, test } from 'ember-qunit';
+import hbs from 'htmlbars-inline-precompile';
+
+moduleForComponent('bo-doc-contributors', 'Integration | Component | bo doc contributors', {
+  integration: true
+});
+
+test('it renders', function(assert) {
+  
+  // Set any properties with this.set('myProperty', 'value');
+  // Handle any actions with this.on('myAction', function(val) { ... });" + EOL + EOL +
+
+  this.render(hbs`{{bo-doc-contributors}}`);
+
+  assert.equal(this.$().text().trim(), '');
+
+  // Template block usage:" + EOL +
+  this.render(hbs`
+    {{#bo-doc-contributors}}
+      template block text
+    {{/bo-doc-contributors}}
+  `);
+
+  assert.equal(this.$().text().trim(), 'template block text');
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/server/bo_client/tests/unit/helpers/add-one-test.js	Thu Dec 10 17:04:51 2015 +0100
@@ -0,0 +1,10 @@
+import { addOne } from '../../../helpers/add-one';
+import { module, test } from 'qunit';
+
+module('Unit | Helper | add one');
+
+// Replace this with your real tests.
+test('it works', function(assert) {
+  let result = addOne(42);
+  assert.equal(result, 43);
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/server/bo_client/tests/unit/helpers/document-contributor-role-translation-tag-test.js	Thu Dec 10 17:04:51 2015 +0100
@@ -0,0 +1,10 @@
+import { documentContributorRoleTranslationTag } from '../../../helpers/document-contributor-role-translation-tag';
+import { module, test } from 'qunit';
+
+module('Unit | Helper | document contributor role translation tag');
+
+// Replace this with your real tests.
+test('it works', function(assert) {
+  let result = documentContributorRoleTranslationTag("http://www.language-archives.org/OLAC/1.1/transcriber");
+  assert.equal(result, "bo.olac_role_transcriber");
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/server/src/.env.example	Thu Dec 10 17:04:51 2015 +0100
@@ -0,0 +1,27 @@
+APP_ENV=local
+APP_DEBUG=true
+APP_KEY=SomeRandomString
+APP_URL=http://corpus-parole.local
+
+DATABASE_DRIVER=pgsql
+DB_HOST=localhost
+DB_DATABASE=corpus
+DB_USERNAME=corpus
+DB_PASSWORD=secret
+
+CACHE_DRIVER=file
+SESSION_DRIVER=file
+QUEUE_DRIVER=sync
+
+MAIL_DRIVER=smtp
+MAIL_HOST=mailtrap.io
+MAIL_PORT=2525
+MAIL_USERNAME=null
+MAIL_PASSWORD=null
+
+CORPUSPAROLE_COCOON_RDF_BASE_URI=
+CORPUSPAROLE_COCOON_OAIPMH_URL=
+CORPUSPAROLE_SESAME_QUERY_URL=http://172.16.1.5:8080/openrdf-sesame
+CORPUSPAROLE_SESAME_UPDATE_URL=
+
+EASYRDF_HTTP_CLIENT_TIMEOUT=20
--- a/server/src/app/Console/Commands/ImportCocoonRDF.php	Thu Dec 10 17:00:59 2015 +0100
+++ b/server/src/app/Console/Commands/ImportCocoonRDF.php	Thu Dec 10 17:04:51 2015 +0100
@@ -12,6 +12,15 @@
 
 class ImportCocoonRDF extends Command {
 
+    const INSERT_TIMEOUT_RETRY = 5;
+
+    const MAPPER_CLASS_MAP = [
+        "http://purl.org/dc/dcmitype/Sound" => '\CorpusParole\Libraries\Mappers\CocoonSoundRdfMapper',
+        "http://purl.org/dc/dcmitype/MovingImage" => '\CorpusParole\Libraries\Mappers\CocoonSoundRdfMapper',
+        "http://purl.org/dc/dcmitype/Text" => '\CorpusParole\Libraries\Mappers\CocoonTextRdfMapper',
+        "http://purl.org/dc/dcmitype/Collection" => '\CorpusParole\Libraries\Mappers\CocoonCollectionRdfMapper'
+    ];
+
     /**
      * The console command description.
      *
@@ -24,7 +33,7 @@
     *
     * @var string
     */
-    protected $signature = 'corpus-parole:importRDF {--skip=0 : Number of record to skip}';
+    protected $signature = 'corpus-parole:importRDF {--skip=0 : Number of record to skip} {--raw : Register raw}';
 
     /**
      * Create a new command instance.
@@ -34,6 +43,31 @@
     }
 
     /**
+     * Get the list of dcmi types for the graph
+     */
+    private function getDocTypes($doc, $docUri) {
+
+        $res = $doc->resource($docUri);
+        $docTypes = [];
+        //foreach ($res->all("http://purl.org/dc/elements/1.1/type") as $resType) {
+        foreach ($res->all("dc11:type","resource") as $resType) {
+            $type = $resType->getUri();
+            if(0 === strpos($type, 'http://purl.org/dc/dcmitype/')) {
+                $docTypes[] = $type;
+            }
+        }
+
+        // if the doc type list is empty, check that we have a collection
+        if(empty($docTypes)) {
+            if(!empty($doc->allOfType('edm:Collection'))) {
+                $docTypes[] = "http://purl.org/dc/dcmitype/Collection";
+            }
+        }
+        return $docTypes;
+    }
+
+
+    /**
      * Execute the console command.
      *
      * @return mixed
@@ -43,10 +77,13 @@
         libxml_use_internal_errors(true);
 
         $skip = (int)$this->option('skip');
+        $raw = $this->option('raw');
 
         $this->comment("Skipping $skip records");
+        $this->comment("Recording raw queries: $raw");
 
         $gs = new \EasyRdf\Sparql\Client(Config::get('corpusparole.sesame_query_url'), Config::get('corpusparole.sesame_update_url'));
+        $gs_raw = new \EasyRdf\Sparql\Client(Config::get('corpusparole.sesame_query_url_raw'), Config::get('corpusparole.sesame_update_url_raw'));
 
 
         $client = new Client(Config::get('corpusparole.cocoon_oaipmh_url'));
@@ -58,6 +95,10 @@
         $progressBar = $this->output->createProgressBar($recs->getTotalRecordsInCollection());
         $progressBar->setFormat(' %current%/%max% [%bar%] %percent:3s%% - %message%');
 
+        $insertTimeouts = 0;
+
+        $documentCounts = ['all' => 0, 'unknown' => 0];
+
         foreach ($recs as $item) {
 
             $identifier = (string) $item->xpath('/record/header/identifier')[0];
@@ -72,47 +113,143 @@
             $progressBar->advance();
 
             $docUri = config('corpusparole.cocoon_doc_id_base_uri').substr($identifier, strlen(Config::get('corpusparole.cocoon_doc_id_base')));
-            $resDocs = $gs->query("ASK WHERE { GRAPH <$docUri> { ?s ?p ?o }}");
-            if(!$resDocs->getBoolean()) {
-                $docLoaded = false;
-                $loadRetry = 0;
-                while(!$docLoaded && $loadRetry < config('corpusparole.max_load_retry', 3)) {
-                    $loadRetry++;
-                    try {
-                        $doc = new \EasyRdf\Graph($docRdfUrl);
-                        $doc->load();
-                        $docLoaded = true;
+
+            $docLoaded = false;
+            $loadRetry = 0;
+            $doc = null;
+            while(!$docLoaded && $loadRetry < config('corpusparole.max_load_retry', 3)) {
+                $loadRetry++;
+                try {
+                    $doc = new \EasyRdf\Graph($docRdfUrl);
+                    $doc->load();
+                    $docLoaded = true;
+                }
+                //TODO: catch network exception - add error to database
+                catch(\Exception $e) {
+                    $code = $e->getCode();
+                    $message = $e->getMessage();
+                    $this->info("\nError processing $identifier. code : $code, message: $message");
+                    Log::debug("Error processing $identifier. code : $code, message: $message");
+                    if($code == 0 && stripos($message, 'timed out')>=0 ) {
+                        $this->info("\nTimeout error processing $identifier ($docRdfUrl) : $e, retrying");
+                        Log::warning("Timeout error processing $identifier ($docRdfUrl) : $e, retrying");
+                        continue;
+                    }
+                    else {
+                        $this->error("\nError processing $identifier ($docRdfUrl) : $e");
+                        Log::error("Error processing $identifier ($docRdfUrl) : $e");
+                        break;
                     }
-                    //TODO: catch network exception - add error to database
-                    catch(\Exception $e) {
-                        $code = $e->getCode();
-                        $message = $e->getMessage();
-                        $this->debug("\nError processing $identifier. code : $code, message: $message");
-                        Log::debug("Error processing $identifier. code : $code, message: $message");
-                        if($code == 1 && stripos($message, 'timed out')>=0 ) {
-                            $this->warning("\nTimeout error processing $identifier ($docRdfUrl) : $e, retrying");
-                            Log::warning("Timeout error processing $identifier ($docRdfUrl) : $e, retrying");
-                            continue;
-                        }
-                        else {
-                            $this->error("\nError processing $identifier ($docRdfUrl) : $e");
-                            Log::error("Error processing $identifier ($docRdfUrl) : $e");
-                            break;
-                        }
-                        //$this->error(print_r($e->getTraceAsString(),true));
+                    //$this->error(print_r($e->getTraceAsString(),true));
+                }
+            }
+            if(!$docLoaded) {
+                continue;
+            }
+
+            //insert raw
+            if($raw) {
+                $resDocsRaw = $gs_raw->query("ASK WHERE { GRAPH <$docUri> { ?s ?p ?o }}");
+                if($resDocsRaw->getBoolean()) {
+                    $gs_raw->clear($docUri);
+                }
+                $gs_raw->insert($doc, $docUri);
+            }
+
+            //map doc
+            $inputDocTypes = $this->getDocTypes($doc, $docUri);
+
+            $docType = count($inputDocTypes)>0? $inputDocTypes[0]:null;
+
+            if(is_null($docType) || !array_key_exists($docType,ImportCocoonRDF::MAPPER_CLASS_MAP)) {
+                $this->error("\nError processing $identifier ($docRdfUrl) : $docType unknown mapper");
+                Log::error("Error processing $identifier ($docRdfUrl) : $docType unknown mapper");
+                $documentCounts['unknown'] += 1;
+                continue;
+            }
+            $documentCounts['all'] += 1;
+            $documentCounts[$docType] = isset($documentCounts[$docType])?$documentCounts[$docType]+1:1;
+
+            $mapperClass = ImportCocoonRDF::MAPPER_CLASS_MAP[$docType];
+            $mapper = new $mapperClass($doc, $docUri);
+
+            $mapper->mapGraph();
+            $mappedGraphes = $mapper->getOutputGraphes();
+
+            foreach ($mapper->getOutputGraphes() as $mappedGraphKey => $mappedGraph) {
+
+                $mappedGraphUri = $mappedGraph->getUri();
+                try {
+                    $resDocs = $gs->query("CONSTRUCT { ?s ?p ?o } WHERE { GRAPH <$mappedGraphUri> { ?s ?p ?o }}");
+                } catch (\Exception $e) {
+                    $this->error("\nError on graph query $identifier ($mappedGraphUri) : $e \n" . $e->getBody() . "\n");
+                    Log::error("\nError on graph query $identifier ($mappedGraphUri) : $e \n" . $e->getBody());
+                    exit;
+                }
+
+                $mergedGraph = null;
+                $doDelete = true;
+
+                if($resDocs->isEmpty()) {
+                    $mergedGraph = $mappedGraph;
+                    $doDelete = false;
+                }
+                else {
+                    $doDelete = true;
+                    $mappedTypes = $this->getDocTypes($mappedGraph, $mappedGraphUri);
+                    $presentTypes = $this->getDocTypes($resDocs, $mappedGraphUri);
+
+                    if($docType == "http://purl.org/dc/dcmitype/Collection" || in_array("http://purl.org/dc/dcmitype/Collection", $mappedTypes)) {
+                        $merger = new \CorpusParole\Libraries\Mergers\CocoonCollectionRdfMerger();
+                        $baseGraph = $resDocs;
+                        $sourceGraph = $mappedGraph;
+                    }
+                    elseif ($docType == "http://purl.org/dc/dcmitype/Text") {
+                        $merger = new \CorpusParole\Libraries\Mergers\CocoonSoundRdfMerger();
+                        $baseGraph = $resDocs;
+                        $sourceGraph = $mappedGraph;
+                    }
+                    else {
+                        $merger = new \CorpusParole\Libraries\Mergers\CocoonSoundRdfMerger();
+                        $baseGraph = $mappedGraph;
+                        $sourceGraph = $resDocs;
+                    }
+                    $mergedGraph = $merger->mergeGraph($baseGraph, $sourceGraph, $mappedGraphUri);
+                    if(\EasyRdf\Isomorphic::isomorphic($resDocs, $mergedGraph)) {
+                        //graph are isomorphic no need to go farther for this graph
+                        Log::info("Graph are isomorphic for $mappedGraphUri (from $identifier : $docRdfUrl), skipping");
+                        continue;
                     }
                 }
-                if(!$docLoaded) {
-                    continue;
+
+                try {
+                    if($doDelete) {
+                        $gs->clear($mappedGraphUri);
+                    }
+                    $gs->insert($mergedGraph, $mappedGraphUri);
                 }
-                //TODO: treat errors
-                $subjects = $doc->resources();
-                $subject = reset($subjects)->getUri();
-                //TODO: exceptions ? but if pb on insert probably we have to fail anyway
-                $gs->insert($doc, $subject);
+                catch(\Exception $e) {
+                    // just log not much we can do here...
+                    $this->error("\nError on insert $identifier ($docRdfUrl) : $e");
+                    Log::error("Error on insert $identifier ($docRdfUrl) : $e");
+                    $code = $e->getCode();
+                    $message = $e->getMessage();
+                    if($e instanceof EasyRdf\Exception && stripos($message, 'timed out')>=0 && $insertTimeout<= ImportCocoonRDF::INSERT_TIMEOUT_RETRY) {
+                        $this->info("\nThis is a timeout, we continue.");
+                        Log::info("This is a timeout, we continue.");
+                        $insertTimeouts++;
+                        continue;
+                    }
+                    throw $e;
+                }
             }
         }
         $progressBar->setMessage("finished");
         $progressBar->finish();
+
+        $this->info("\nDocument count info: ");
+        foreach ($documentCounts as $docType => $docCount) {
+            $this->info("$docType => $docCount");
+        }
     }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/server/src/app/Facades/GuzzleFacade.php	Thu Dec 10 17:04:51 2015 +0100
@@ -0,0 +1,12 @@
+<?php
+namespace CorpusParole\Facades;
+
+use Illuminate\Support\Facades\Facade;
+
+class GuzzleFacade extends Facade {
+
+    protected static function getFacadeAccessor() {
+        return 'guzzle';
+    }
+
+}
--- a/server/src/app/Http/Controllers/Api/DocumentController.php	Thu Dec 10 17:00:59 2015 +0100
+++ b/server/src/app/Http/Controllers/Api/DocumentController.php	Thu Dec 10 17:04:51 2015 +0100
@@ -24,7 +24,12 @@
      */
     public function index()
     {
-        return response()->json($this->documentRepository->paginateAll());
+        $paginator = $this->documentRepository->paginateAll();
+        $res = [];
+        foreach ($paginator->toArray() as $key => $value) {
+            $res[($key === 'data')?'documents':$key] = $value;
+        }
+        return response()->json($res);
     }
 
     /**
@@ -60,7 +65,7 @@
         if(is_null($doc)) {
             abort(404);
         }
-        return response()->json($doc);
+        return response()->json(["document" => $doc]);
     }
 
     /**
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/server/src/app/Http/Controllers/Api/ViafController.php	Thu Dec 10 17:04:51 2015 +0100
@@ -0,0 +1,32 @@
+<?php
+
+namespace CorpusParole\Http\Controllers\Api;
+
+use Illuminate\Http\Request;
+use CorpusParole\Http\Requests;
+use CorpusParole\Http\Controllers\Controller;
+use CorpusParole\Services\ViafResolverInterface;
+use CorpusParole\Services\ViafResolverException;
+
+class ViafController extends Controller
+{
+    public function __construct(ViafResolverInterface $viafResolver) {
+        $this->viafResolver = $viafResolver;
+    }
+
+    /**
+     * Display the specified resource.
+     *
+     * @param  int  $id od comma separatedlist of ids
+     * @return \Illuminate\Http\Response
+     */
+    public function show($id)
+    {
+        try {
+            return response()->json(['viafids' => $this->viafResolver->getNames(explode(",", $id))]);
+        } catch (ViafResolverException $e) {
+            abort($e->getCode(), $e->getMessage());
+        }
+    }
+
+}
--- a/server/src/app/Http/Controllers/Bo/DocumentListController.php	Thu Dec 10 17:00:59 2015 +0100
+++ b/server/src/app/Http/Controllers/Bo/DocumentListController.php	Thu Dec 10 17:04:51 2015 +0100
@@ -69,6 +69,27 @@
     }
 
     /**
+     * Display the specified resource with the js client.
+     *
+     * @param string $id
+     *
+     * @return Response
+     */
+    public function getClient($id)
+    {
+        //$doc->add("<$doc_uri>");
+        $doc = $this->documentRepository->get($id);
+
+        if(is_null($doc)) {
+            abort(404);
+        }
+
+        return view('bo.docDetailClient', ['doc' => $doc]);
+
+    }
+
+
+    /**
      * Show the form for editing the specified resource.
      *
      * @param int $id
--- a/server/src/app/Http/routes.php	Thu Dec 10 17:00:59 2015 +0100
+++ b/server/src/app/Http/routes.php	Thu Dec 10 17:04:51 2015 +0100
@@ -15,10 +15,15 @@
 
 Route::get('home', 'HomeController@index');
 
+//Route::get('bo/docs/docDetailClient', 'Bo\DocumentListController@showClient');
 Route::resource('bo/docs', 'Bo\DocumentListController');
+Route::controller('bo/docs', 'Bo\DocumentListController', [
+    'getClient' => 'bo.docs.client'
+]);
+
 
 Route::controllers([
-    'auth' => 'Auth\AuthController',
+//    'auth' => 'Auth\AuthController',
     'password' => 'Auth\PasswordController',
 ]);
 
@@ -30,5 +35,9 @@
 |
 */
 
-Route::resource('api/document', 'Api\DocumentController',
-                ['only' => ['index', 'show']]);
+Route::group(['prefix' => 'api/v1'] , function() {
+    Route::resource('documents', 'Api\DocumentController',
+                    ['only' => ['index', 'show']]);
+    Route::resource('viaf', 'Api\ViafController',
+                    ['only' => ['show']]);
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/server/src/app/Libraries/CocoonUtils.php	Thu Dec 10 17:04:51 2015 +0100
@@ -0,0 +1,64 @@
+<?php
+namespace CorpusParole\Libraries;
+
+class CocoonUtils {
+
+    const OLAC_ROLES = [
+        'http://www.language-archives.org/OLAC/1.1/annotator',
+        'http://www.language-archives.org/OLAC/1.1/author',
+        'http://www.language-archives.org/OLAC/1.1/compiler',
+        'http://www.language-archives.org/OLAC/1.1/consultant',
+        'http://www.language-archives.org/OLAC/1.1/data_inputter',
+        'http://www.language-archives.org/OLAC/1.1/depositor',
+        'http://www.language-archives.org/OLAC/1.1/developer',
+        'http://www.language-archives.org/OLAC/1.1/editor',
+        'http://www.language-archives.org/OLAC/1.1/illustrator',
+        'http://www.language-archives.org/OLAC/1.1/interpreter',
+        'http://www.language-archives.org/OLAC/1.1/interviewer',
+        'http://www.language-archives.org/OLAC/1.1/participant',
+        'http://www.language-archives.org/OLAC/1.1/performer',
+        'http://www.language-archives.org/OLAC/1.1/photographer',
+        'http://www.language-archives.org/OLAC/1.1/recorder',
+        'http://www.language-archives.org/OLAC/1.1/researcher',
+        'http://www.language-archives.org/OLAC/1.1/research_participant',
+        'http://www.language-archives.org/OLAC/1.1/responder',
+        'http://www.language-archives.org/OLAC/1.1/signer',
+        'http://www.language-archives.org/OLAC/1.1/singer',
+        'http://www.language-archives.org/OLAC/1.1/speaker',
+        'http://www.language-archives.org/OLAC/1.1/sponsor',
+        'http://www.language-archives.org/OLAC/1.1/transcriber',
+        'http://www.language-archives.org/OLAC/1.1/translator',
+    ];
+
+    /**
+     * Extract id form cocoon url.
+     *
+     * @return string
+     */
+    public static function getIdFromUri($uri) {
+        return substr($uri, strlen(config('corpusparole.cocoon_doc_id_base_uri')));
+    }
+
+    /**
+     * Extract id form corpus url.
+     *
+     * @return string
+     */
+    public static function getIdFromCorpusUri($uri) {
+        return substr($uri, strlen(config('corpusparole.corpus_doc_id_base_uri')));
+    }
+
+    /**
+     * Create a Corpus resource id (purl url)
+     *
+     * @return string
+     */
+    public static function getCorpusUriFromId($id) {
+        return rtrim(config('corpusparole.corpus_doc_id_base_uri'),'/')."/$id";
+    }
+
+    public static function getCocoonPubUrl($id) {
+        return rtrim(config('corpusparole.cocoon_doc_pub_base_uri'), '/')."/$id";
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/server/src/app/Libraries/Mappers/CocoonAbstractRdfMapper.php	Thu Dec 10 17:04:51 2015 +0100
@@ -0,0 +1,146 @@
+<?php
+namespace CorpusParole\Libraries\Mappers;
+
+use Config;
+
+use CorpusParole\Libraries\Utils;
+use CorpusParole\Libraries\CocoonUtils;
+
+use EasyRdf\RdfNamespace;
+use EasyRdf\Graph;
+use EasyRdf\Literal;
+use EasyRdf\Resource;
+
+
+RdfNamespace::set('edm', 'http://www.europeana.eu/schemas/edm/');
+RdfNamespace::set('ore', 'http://www.openarchives.org/ore/terms/');
+RdfNamespace::set('crdo', 'http://crdo.risc.cnrs.fr/schemas/');
+RdfNamespace::set('olac', 'http://www.language-archives.org/OLAC/1.1/');
+RdfNamespace::set('skos', 'http://www.w3.org/2004/02/skos/core#');
+
+
+/**
+ *
+ */
+abstract class CocoonAbstractRdfMapper implements RdfMapper {
+
+    public function __construct(Graph $inputGraph, $uri=null) {
+        $this->inputGraph = $inputGraph;
+        $this->uri = is_null($uri)?$inputGraph->getUri():$uri;
+        $this->outputGraphes = [];
+    }
+
+    abstract protected function mapResource($res, $outputGraph);
+    abstract protected function getResourceBaseId($res=null);
+
+    public function getOutputGraphes() {
+        return $this->outputGraphes;
+    }
+
+    /**
+     * Map a Cocoon Rdf Graph to a CP graph
+     * @return the new mapped graph
+     */
+    public function mapGraph() {
+
+        $outputGraph = $this->buildOutputGraph();
+
+        $resources = $this->inputGraph->allOfType('crdo:Resource');
+        foreach ($resources as $res) {
+            $this->mapResource($res, $outputGraph);
+        }
+    }
+
+    /**
+     * Build the main outputgraph
+     * @return the new empty graph
+     */
+     protected function buildOutputGraph() {
+
+         //$soundRes = $this->inputGraph->resource($this->uri)->get('http://purl.org/dc/terms/requires');
+         $id = CocoonUtils::getIdFromUri($this->getResourceBaseId());
+
+         $outputGraph = new Graph(CocoonUtils::getCorpusUriFromId($id));
+         $this->outputGraphes[$this->getResourceBaseId()] = $outputGraph;
+
+         return $outputGraph;
+     }
+
+
+    protected function propertyOlacRoleMap($targetRes, $prop, $value) {
+        $targetRes->add($prop, $value);
+        $targetRes->add('http://purl.org/dc/elements/1.1/contributor', $value);
+    }
+
+    protected function propertyIdentityMap($targetRes, $prop, $value) {
+        $targetRes->add($prop, $value);
+    }
+
+    protected function propertyTrimMap($providedCHOResource, $prop, $value) {
+        $providedCHOResource->add($prop, trim($value));
+    }
+
+    protected function addSpatialProperties($destRes, $res, $outputGraph) {
+        $spatials = $res->all($this->inputGraph->resource('http://purl.org/dc/terms/spatial'));
+        $lats = $res->all($this->inputGraph->resource('http://www.w3.org/2003/01/geo/wgs84_pos#lat'));
+        $longs = $res->all($this->inputGraph->resource('http://www.w3.org/2003/01/geo/wgs84_pos#long'));
+        $alts = $res->all($this->inputGraph->resource('http://www.w3.org/2003/01/geo/wgs84_pos#alt'));
+
+        if( count($spatials) > 0 || count($lats) > 0 || count($longs) > 0 || count($alts)) {
+            $placeNode = $outputGraph->newBNode(['edm:Place']);
+            foreach($lats as $latitude) {
+                $placeNode->addLiteral('http://www.w3.org/2003/01/geo/wgs84_pos#lat', $latitude);
+            }
+            foreach($longs as $longitude) {
+                $placeNode->addLiteral('http://www.w3.org/2003/01/geo/wgs84_pos#long', $longitude);
+            }
+            foreach($spatials as $s) {
+                if($s instanceof Literal) {
+                    $placeNode->addLiteral('skos:note', $s);
+                }
+                elseif ($s instanceof Resource) {
+                    $placeNode->addResource('owl:sameAs', $s);
+                }
+            }
+            $destRes->add($outputGraph->resource('http://purl.org/dc/terms/spatial'), $placeNode);
+        }
+    }
+
+    protected function applyPropertiesToRes($sourceRes, $targetRes, $properties) {
+
+        foreach( $properties as list($prop, $mappingMethod)) {
+            if( is_null($mappingMethod) ) {
+                $mappingMethod = 'propertyIdentityMap';
+            }
+
+            foreach($sourceRes->all($this->inputGraph->resource($prop)) as $value) {
+                call_user_func(array($this, $mappingMethod), $targetRes, $prop, $value);
+            }
+        }
+    }
+
+    protected function addDateProperties($targetRes, $res, $outputGraph) {
+        $this->applyPropertiesToRes($res, $targetRes, [
+            ['http://purl.org/dc/terms/available', null],
+            ['http://purl.org/dc/terms/created', null],
+            ['http://purl.org/dc/terms/issued', null],
+            ['http://purl.org/dc/terms/modified', null],
+        ]);
+    }
+
+    protected function mapCollections($res) {
+        $collections = $res->all('dc:isPartOf');
+        foreach($collections as $coll) {
+            if($coll instanceof Resource) {
+                $collUri = $coll->getUri();
+                if(strpos(strtolower($collUri), "collection", strlen(config('corpusparole.cocoon_doc_id_base_uri'))) !== FALSE) {
+                    $collectionGraph = new Graph($collUri);
+                    $this->outputGraphes[$collUri] = $collectionGraph;
+                    $collectionGraph->resource($collUri, 'edm:Collection');
+                }
+            }
+        }
+    }
+
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/server/src/app/Libraries/Mappers/CocoonCollectionRdfMapper.php	Thu Dec 10 17:04:51 2015 +0100
@@ -0,0 +1,138 @@
+<?php
+namespace CorpusParole\Libraries\Mappers;
+
+use EasyRdf\Graph;
+
+//<http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-COLLECTION_ALA_CL> a <http://crdo.risc.cnrs.fr/schemas/Resource> ;
+//	<http://purl.org/dc/elements/1.1/description> """Cette série d'entretiens semi-dirigés avait comme objectif de susciter un discours
+//            sur les pratiques linguistiques des locuteurs. Les locuteurs se sont exprimés dans la langue de leur choix.
+//            Le questionnaire servant de trame à l'entretien comportait les volets suivants :
+//            # la biographie sociolinguistique
+//            # la délimitation de l'espace de vie et de l'espace linguistique d'appartenance
+//            # l'auto-évaluation des compétences linguistiques en alsacien, en français et en allemand
+//            # les normes linguistiques des trois variétés
+//            # les variations (alsacien, français, allemand)
+//            # les pratiques linguistiques et langagières
+//            # l'idéologie linguistique (rapport langue / identité, dialecte / école …)."""@fr ;
+//    <http://purl.org/dc/elements/1.1/type> "primary_text"^^<http://www.language-archives.org/OLAC/1.1/linguistic-type> , "dialogue"^^<http://www.language-archives.org/OLAC/1.1/discourse-type> , <http://purl.org/dc/dcmitype/Collection> , "lexicon"^^<http://www.language-archives.org/OLAC/1.1/linguistic-type> ;
+//    <http://purl.org/dc/elements/1.1/subject> <http://lexvo.org/id/iso639-3/gsw> ;
+//    <http://purl.org/dc/elements/1.1/language> <http://lexvo.org/id/iso639-3/gsw> ;
+//    <http://www.language-archives.org/OLAC/1.1/depositor> <http://viaf.org/viaf/9122216> ;
+//    <http://purl.org/dc/elements/1.1/publisher> "Atlas linguistiques, cultures et parlers régionaux de France" ;
+//    <http://purl.org/dc/elements/1.1/rights> "Copyright (c) Département de dialectologie alsacienne et mosellane de l'Université de Strasbourg" ;
+//    <http://purl.org/dc/elements/1.1/title> "Atlas Linguistique et ethnographique de l'Alsace: Enquêtes sur la conscience linguistique"@fr ;
+//    <http://purl.org/dc/terms/accessRights> "Freely available for non-commercial use" ;
+//    <http://purl.org/dc/terms/license> <http://creativecommons.org/licenses/by-nc-nd/2.5/> ;
+//    <http://purl.org/dc/terms/isPartOf> <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-COLLECTION_ALA> ;
+//    <http://purl.org/dc/terms/created> "start=1988; end=1989"^^<http://purl.org/dc/terms/Period> ;
+//    <http://purl.org/dc/terms/spatial> "France, Alsace"@fr , "FR"^^<http://purl.org/dc/terms/ISO3166> ;
+//    <http://purl.org/dc/terms/available> "2014-04-18"^^<http://purl.org/dc/terms/W3CDTF> ;
+//    <http://purl.org/dc/terms/issued> "2015-07-09T09:40:21 02:00"^^<http://purl.org/dc/terms/W3CDTF> ;
+//    <http://www.language-archives.org/OLAC/1.1/transcriber> "Huck, Dominique" ;
+//    <http://www.language-archives.org/OLAC/1.1/researcher> "Bothorel-Witz, Arlette" .
+
+// http://purl.org/dc/elements/1.1/description
+// http://purl.org/dc/elements/1.1/language
+// http://purl.org/dc/elements/1.1/publisher
+// http://purl.org/dc/elements/1.1/rights
+// http://purl.org/dc/elements/1.1/subject
+// http://purl.org/dc/elements/1.1/title
+// http://purl.org/dc/elements/1.1/type
+// http://purl.org/dc/terms/accessRights
+// http://purl.org/dc/terms/available
+// http://purl.org/dc/terms/created
+// http://purl.org/dc/terms/issued
+// http://purl.org/dc/terms/license
+// http://purl.org/dc/terms/spatial
+// http://www.language-archives.org/OLAC/1.1/depositor
+// http://www.language-archives.org/OLAC/1.1/researcher
+// http://www.language-archives.org/OLAC/1.1/transcriber
+// http://purl.org/dc/terms/isPartOf
+// http://www.language-archives.org/OLAC/1.1/compiler
+// http://www.language-archives.org/OLAC/1.1/data_inputter
+// http://www.language-archives.org/OLAC/1.1/developer
+// http://www.language-archives.org/OLAC/1.1/interviewer
+// http://www.language-archives.org/OLAC/1.1/sponsor
+// http://www.w3.org/2003/01/geo/wgs84_pos#lat
+// http://www.w3.org/2003/01/geo/wgs84_pos#long
+
+class CocoonCollectionRdfMapper extends CocoonAbstractRdfMapper {
+
+    protected function getResourceBaseId($res=null) {
+
+        if(is_null($res)) {
+            $res = $this->inputGraph->resource($this->uri);
+        }
+        return $res->getUri();
+    }
+
+    /**
+     * Build the main outputgraph
+     * @return the new empty graph
+     */
+     protected function buildOutputGraph() {
+
+         $outputGraph = new Graph($this->uri);
+         $this->outputGraphes[$this->getResourceBaseId()] = $outputGraph;
+
+         return $outputGraph;
+     }
+
+
+    protected function mapResource($res, $outputGraph) {
+        $resUri = $res->getUri();
+
+        $collNode = $outputGraph->resource($resUri, 'edm:Collection');
+
+        $this->addSimpleProperties($collNode, $res);
+        $this->addDateProperties($collNode, $res, $outputGraph);
+        $this->addSpatialProperties($collNode, $res, $outputGraph);
+
+        $this->mapCollections($res);
+    }
+
+
+    protected function addSimpleProperties($targetRes, $sourceRes) {
+        $this->applyPropertiesToRes($sourceRes, $targetRes, [
+            ['http://purl.org/dc/elements/1.1/description', null],
+            ['http://purl.org/dc/elements/1.1/language', null],
+            ['http://purl.org/dc/elements/1.1/publisher', null],
+            ['http://purl.org/dc/elements/1.1/rights', null],
+            ['http://purl.org/dc/elements/1.1/type', null],
+            ['http://purl.org/dc/terms/license', null],
+            ['http://purl.org/dc/elements/1.1/subject', null],
+            ['http://purl.org/dc/elements/1.1/title', null],
+            ['http://purl.org/dc/elements/1.1/language', null],
+            ['http://purl.org/dc/terms/accessRights', 'propertyTrimMap'],
+            ['http://purl.org/dc/terms/extent', null],
+            ['http://purl.org/dc/terms/isPartOf', null],
+            ['http://www.language-archives.org/OLAC/1.1/annotator', 'propertyOlacRoleMap'],
+            ['http://www.language-archives.org/OLAC/1.1/author', 'propertyOlacRoleMap'],
+            ['http://www.language-archives.org/OLAC/1.1/compiler', 'propertyOlacRoleMap'],
+            ['http://www.language-archives.org/OLAC/1.1/consultant', 'propertyOlacRoleMap'],
+            ['http://www.language-archives.org/OLAC/1.1/data_inputter', 'propertyOlacRoleMap'],
+            ['http://www.language-archives.org/OLAC/1.1/depositor', 'propertyOlacRoleMap'],
+            ['http://www.language-archives.org/OLAC/1.1/developer', 'propertyOlacRoleMap'],
+            ['http://www.language-archives.org/OLAC/1.1/editor', 'propertyOlacRoleMap'],
+            ['http://www.language-archives.org/OLAC/1.1/illustrator', 'propertyOlacRoleMap'],
+            ['http://www.language-archives.org/OLAC/1.1/interpreter', 'propertyOlacRoleMap'],
+            ['http://www.language-archives.org/OLAC/1.1/interviewer', 'propertyOlacRoleMap'],
+            ['http://www.language-archives.org/OLAC/1.1/participant', 'propertyOlacRoleMap'],
+            ['http://www.language-archives.org/OLAC/1.1/performer', 'propertyOlacRoleMap'],
+            ['http://www.language-archives.org/OLAC/1.1/photographer', 'propertyOlacRoleMap'],
+            ['http://www.language-archives.org/OLAC/1.1/recorder', 'propertyOlacRoleMap'],
+            ['http://www.language-archives.org/OLAC/1.1/researcher', 'propertyOlacRoleMap'],
+            ['http://www.language-archives.org/OLAC/1.1/research_participant', 'propertyOlacRoleMap'],
+            ['http://www.language-archives.org/OLAC/1.1/responder', 'propertyOlacRoleMap'],
+            ['http://www.language-archives.org/OLAC/1.1/signer', 'propertyOlacRoleMap'],
+            ['http://www.language-archives.org/OLAC/1.1/singer', 'propertyOlacRoleMap'],
+            ['http://www.language-archives.org/OLAC/1.1/speaker', 'propertyOlacRoleMap'],
+            ['http://www.language-archives.org/OLAC/1.1/sponsor', 'propertyOlacRoleMap'],
+            ['http://www.language-archives.org/OLAC/1.1/transcriber', 'propertyOlacRoleMap'],
+            ['http://www.language-archives.org/OLAC/1.1/translator', 'propertyOlacRoleMap'],
+        ]);
+    }
+
+
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/server/src/app/Libraries/Mappers/CocoonContentRdfMapper.php	Thu Dec 10 17:04:51 2015 +0100
@@ -0,0 +1,160 @@
+<?php
+namespace CorpusParole\Libraries\Mappers;
+
+use CorpusParole\Libraries\CocoonUtils;
+
+use EasyRdf\Graph;
+use EasyRdf\Literal;
+use EasyRdf\Resource;
+
+
+abstract class CocoonContentRdfMapper extends CocoonAbstractRdfMapper {
+
+
+    protected function mapResource($res, $outputGraph) {
+        $this->mapMainGraph($res, $outputGraph);
+        //map collection
+        $this->mapCollections($res);
+    }
+
+    abstract protected function mapWebResources($res, $outputGraph);
+
+    protected function mapMainGraph($res, $outputGraph) {
+        $this->mapAggregationNode($res, $outputGraph);
+        $this->mapProvidedCHO($res, $outputGraph);
+        $this->mapWebResources($res, $outputGraph);
+    }
+
+    /**
+     * Build the aggregation node
+     */
+    protected function mapAggregationNode($res, $outputGraph) {
+        $resId = CocoonUtils::getIdFromUri($this->getResourceBaseId($res));
+        $resUri = CocoonUtils::getCorpusUriFromId($resId);
+
+        $aggregationNode = $outputGraph->resource($resUri, 'ore:Aggregation');
+
+        $aggregationResource = $aggregationNode->addResource('edm:aggregatedCHO', $this->getResourceBaseId($res));
+
+        $aggregationNode->addLiteral('edm:provider', config('corpusparole.edm_provider'), 'fr');
+
+        $publishersInputs = $res->all($this->inputGraph->resource('http://purl.org/dc/elements/1.1/publisher'));
+        if(count($publishersInputs) == 0) {
+            $provider = Literal::create(config('corpusparole.edm_provider'), 'fr');
+        }
+        else {
+            $provider = $publishersInputs[0];
+            //TODO: if this is a resource, get id from it (viaf)
+        }
+        $aggregationNode->add('edm:dataProvider', $provider);
+
+        $aggregationNode->addResource('edm:isShownAt', CocoonUtils::getCocoonPubUrl($resId));
+
+        $master = null;
+        $masterList = $res->all($this->inputGraph->resource('http://crdo.risc.cnrs.fr/schemas/master'));
+        if(count($masterList)==0) {
+            $masterList = $res->all($this->inputGraph->resource('http://purl.org/dc/terms/isFormatOf'));
+        }
+        if(count($masterList)>0) {
+            $aggregationNode->add('edm:isShownBy', $masterList[0]);
+        }
+
+        $license = $res->get('dc:license');
+        $matches = [];
+
+        if( ($license instanceof Resource) &&
+            (preg_match('/http\:\/\/creativecommons\.org\/licenses\/([a-z-]+)\/[\d\.]+\//', $license->getUri(), $matches) > 0) ) {
+            $license = "http://creativecommons.org/licenses/$matches[1]/4.0/";
+        }
+        else {
+            $license = config('corpusparole.corpus_doc_default_cc_rights');
+        }
+
+        $aggregationNode->addResource('edm:rights', $license);
+    }
+
+    protected function propertyTypeMap($providedCHOResource, $prop, $value) {
+        $providedCHOResource->add($prop, $value);
+    }
+
+    protected function propertyReferenceCorrectMap($providedCHOResource, $prop, $value) {
+        $providedCHOResource->add('http://purl.org/dc/terms/references', $value);
+    }
+
+    /**
+     * Build the provided CHO.
+     */
+    private function mapProvidedCHO($res, $outputGraph) {
+
+        $providedCHOResource = $outputGraph->resource($this->getResourceBaseId($res), 'edm:ProvidedCHO');
+
+        $this->addCHOResourceProperties($providedCHOResource, $res, $outputGraph);
+
+        $this->addDateProperties($providedCHOResource, $res, $outputGraph);
+        $this->addSpatialProperties($providedCHOResource, $res, $outputGraph);
+
+    }
+
+    protected function addCHOResourceProperties($providedCHOResource, $res, $outputGraph) {
+        $this->applyPropertiesToRes($res, $providedCHOResource, [
+            ['http://purl.org/dc/terms/tableOfContents', null],
+            ['http://purl.org/dc/elements/1.1/description', null],
+            ['http://purl.org/dc/elements/1.1/language', null],
+            ['http://purl.org/dc/elements/1.1/publisher', null],
+            ['http://purl.org/dc/elements/1.1/rights', null],
+            ['http://purl.org/dc/elements/1.1/type', 'propertyTypeMap'],
+            ['http://purl.org/dc/terms/license', null],
+            ['http://purl.org/dc/elements/1.1/subject', null],
+            ['http://purl.org/dc/elements/1.1/title', null],
+            ['http://purl.org/dc/elements/1.1/language', null],
+            ['http://purl.org/dc/terms/accessRights', 'propertyTrimMap'],
+            ['http://purl.org/dc/terms/extent', null],
+            ['http://purl.org/dc/terms/isPartOf', null],
+            ['http://purl.org/dc/terms/abstract', null],
+            ['http://purl.org/dc/elements/1.1/source', null],
+            ['http://purl.org/dc/terms/medium', null],
+            ['http://purl.org/dc/terms/alternative', null],
+            ['http://purl.org/dc/terms/bibliographicCitation', null],
+            ['http://purl.org/dc/elements/1.1/identifier', null],
+            ['http://purl.org/dc/terms/references', null],
+            ['http://purl.org/dc/elements/1.1/reference', 'propertyReferenceCorrectMap'],
+            ['http://purl.org/dc/elements/1.1/coverage', null],
+            ['http://purl.org/dc/elements/1.1/relation', null],
+            ['http://purl.org/dc/elements/1.1/creator', null],
+            ['http://www.language-archives.org/OLAC/1.1/annotator', 'propertyOlacRoleMap'],
+            ['http://www.language-archives.org/OLAC/1.1/author', 'propertyOlacRoleMap'],
+            ['http://www.language-archives.org/OLAC/1.1/compiler', 'propertyOlacRoleMap'],
+            ['http://www.language-archives.org/OLAC/1.1/consultant', 'propertyOlacRoleMap'],
+            ['http://www.language-archives.org/OLAC/1.1/data_inputter', 'propertyOlacRoleMap'],
+            ['http://www.language-archives.org/OLAC/1.1/depositor', 'propertyOlacRoleMap'],
+            ['http://www.language-archives.org/OLAC/1.1/developer', 'propertyOlacRoleMap'],
+            ['http://www.language-archives.org/OLAC/1.1/editor', 'propertyOlacRoleMap'],
+            ['http://www.language-archives.org/OLAC/1.1/illustrator', 'propertyOlacRoleMap'],
+            ['http://www.language-archives.org/OLAC/1.1/interpreter', 'propertyOlacRoleMap'],
+            ['http://www.language-archives.org/OLAC/1.1/interviewer', 'propertyOlacRoleMap'],
+            ['http://www.language-archives.org/OLAC/1.1/participant', 'propertyOlacRoleMap'],
+            ['http://www.language-archives.org/OLAC/1.1/performer', 'propertyOlacRoleMap'],
+            ['http://www.language-archives.org/OLAC/1.1/photographer', 'propertyOlacRoleMap'],
+            ['http://www.language-archives.org/OLAC/1.1/recorder', 'propertyOlacRoleMap'],
+            ['http://www.language-archives.org/OLAC/1.1/researcher', 'propertyOlacRoleMap'],
+            ['http://www.language-archives.org/OLAC/1.1/research_participant', 'propertyOlacRoleMap'],
+            ['http://www.language-archives.org/OLAC/1.1/responder', 'propertyOlacRoleMap'],
+            ['http://www.language-archives.org/OLAC/1.1/signer', 'propertyOlacRoleMap'],
+            ['http://www.language-archives.org/OLAC/1.1/singer', 'propertyOlacRoleMap'],
+            ['http://www.language-archives.org/OLAC/1.1/speaker', 'propertyOlacRoleMap'],
+            ['http://www.language-archives.org/OLAC/1.1/sponsor', 'propertyOlacRoleMap'],
+            ['http://www.language-archives.org/OLAC/1.1/transcriber', 'propertyOlacRoleMap'],
+            ['http://www.language-archives.org/OLAC/1.1/translator', 'propertyOlacRoleMap'],
+        ]);
+
+    }
+
+    protected function addDateToWebResource($sourceRes, $targetRes) {
+
+        $this->applyPropertiesToRes($sourceRes, $targetRes, [
+            ['http://purl.org/dc/terms/created', null],
+            ['http://purl.org/dc/terms/issued', null],
+        ]);
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/server/src/app/Libraries/Mappers/CocoonSoundRdfMapper.php	Thu Dec 10 17:04:51 2015 +0100
@@ -0,0 +1,142 @@
+<?php
+namespace CorpusParole\Libraries\Mappers;
+
+use Config;
+
+use CorpusParole\Libraries\Utils;
+use CorpusParole\Libraries\CocoonUtils;
+
+use EasyRdf\Graph;
+use EasyRdf\Literal;
+use EasyRdf\Resource;
+
+
+/**
+ *
+ * rdf:type
+ * sesame:directType
+ ** <http://purl.org/dc/elements/1.1/description> -> providedCHO
+ * <http://purl.org/dc/elements/1.1/format> -> webRepresentation
+ * <http://purl.org/dc/elements/1.1/language> -> providedCHO
+ * <http://purl.org/dc/elements/1.1/publisher> -> providedCHO
+ * <http://purl.org/dc/elements/1.1/rights> -> providedCHO
+ * <http://purl.org/dc/elements/1.1/subject> -> providedCHO
+ * <http://purl.org/dc/elements/1.1/title> -> providedCHO
+ * <http://purl.org/dc/elements/1.1/type> -> providedCHO
+ * <http://purl.org/dc/terms/accessRights> -> providedCHO
+ * <http://purl.org/dc/terms/available> -> providedCHO
+ * <http://purl.org/dc/terms/conformsTo> -> for text -> webRepresentation (2 val : http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-dtd_transcriber : transcript, http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-dtd_archive)
+ * <http://purl.org/dc/terms/created> -> providedCHO
+ * <http://purl.org/dc/terms/isFormatOf> -> webResource
+ *** <http://purl.org/dc/terms/isPartOf> ->collections
+ * <http://purl.org/dc/terms/issued> -> providedCHO
+ * <http://purl.org/dc/terms/license> -> providedCHO
+ *** <http://purl.org/dc/terms/requires> -> transcriptions
+ * <http://www.language-archives.org/OLAC/1.1/data_inputter> -> providedCHO
+ * <http://www.language-archives.org/OLAC/1.1/depositor> -> providedCHO
+ * <http://www.language-archives.org/OLAC/1.1/editor> -> providedCHO
+ * <http://www.language-archives.org/OLAC/1.1/interviewer> -> providedCHO
+ * <http://www.language-archives.org/OLAC/1.1/researcher> -> providedCHO
+ * <http://www.language-archives.org/OLAC/1.1/speaker> -> providedCHO
+ * <http://www.language-archives.org/OLAC/1.1/transcriber> -> providedCHO
+ * <http://www.language-archives.org/OLAC/1.1/participant> -> providedCHO
+ * <http://www.language-archives.org/OLAC/1.1/compiler> -> providedCHO
+ * <http://www.language-archives.org/OLAC/1.1/interpreter> -> providedCHO
+ * <http://www.language-archives.org/OLAC/1.1/author> -> providedCHO
+ * <http://www.language-archives.org/OLAC/1.1/translator> -> providedCHO
+ * <http://www.language-archives.org/OLAC/1.1/signer> -> providedCHO
+ * <http://www.language-archives.org/OLAC/1.1/recorder> -> providedCHO
+ * <http://www.language-archives.org/OLAC/1.1/responder> -> providedCHO
+ * <http://www.language-archives.org/OLAC/1.1/developer> -> providedCHO
+ * <http://www.language-archives.org/OLAC/1.1/sponsor> -> providedCHO
+ * <http://www.language-archives.org/OLAC/1.1/annotator> -> providedCHO
+ * <http://www.language-archives.org/OLAC/1.1/singer> -> providedCHO
+ * <http://www.language-archives.org/OLAC/1.1/consultant> -> providedCHO
+ * <http://www.language-archives.org/OLAC/1.1/research_participant> -> providedCHO
+ * <http://crdo.risc.cnrs.fr/schemas/master> -> webRepresentation
+ * <http://purl.org/dc/terms/extent> -> webRepresentation
+ * <http://purl.org/dc/terms/isRequiredBy> -> transcriptions
+ * <http://purl.org/dc/terms/spatial> -> edm:Place
+ * <http://www.w3.org/2003/01/geo/wgs84_pos#lat> -> edm:Place
+ * <http://www.w3.org/2003/01/geo/wgs84_pos#long> -> edm:Place
+ * <http://purl.org/dc/elements/1.1/source> -> providedCHO
+ * <http://purl.org/dc/terms/tableOfContents> -> providedCHO
+ * <http://purl.org/dc/terms/alternative> -> providedCHO
+ * <http://purl.org/dc/terms/modified> -> providedCHO
+ * <http://purl.org/dc/terms/abstract> -> providedCHO
+ * <http://purl.org/dc/elements/1.1/identifier> -> providedCHO but question...
+ * <http://purl.org/dc/terms/medium> -> providedCHO
+ * <http://purl.org/dc/elements/1.1/coverage> -> providedCHO
+ * <http://purl.org/dc/elements/1.1/relation> - providedCHO
+ * <http://purl.org/dc/terms/description> -> ProvidedCHO
+ * <http://purl.org/dc/terms/bibliographicCitation> -> providedCHO
+ * <http://purl.org/dc/elements/1.1/creator> -> providedCHO
+ * <http://purl.org/dc/terms/references> -> providedCHO
+ * <http://purl.org/dc/elements/1.1/reference> -> providedCHO
+ *
+ * pour olac : http://quijote.fdi.ucm.es:8084/LLOD-LSASummerWorkshop2015/Presentations/Simons--OLAC%20Metadata.pdf
+ * DATA consolidation
+ * -> edm:place : get label + altLabel
+ */
+class CocoonSoundRdfMapper extends CocoonContentRdfMapper {
+
+    protected function getResourceBaseId($res=null) {
+
+        if(is_null($res)) {
+            $res = $this->inputGraph->resource($this->uri);
+        }
+        return $res->getUri();
+    }
+
+    /**
+     * Build teh webresources
+     */
+    protected function mapWebResources($res, $outputGraph) {
+
+        $resId = CocoonUtils::getIdFromUri($res->getUri());
+        $resUri = CocoonUtils::getCorpusUriFromId($resId);
+
+
+        $aggregationNode = $outputGraph->resource($resUri, 'ore:Aggregation');
+
+        // get extent
+        $extent = $res->get($this->inputGraph->resource('http://purl.org/dc/terms/extent'));
+
+        // build master webresources
+        $masterReprUrl = $res->get($this->inputGraph->resource('http://crdo.risc.cnrs.fr/schemas/master'));
+        if(! is_null($masterReprUrl)) {
+            $masterWebResource = $outputGraph->resource($masterReprUrl, 'edm:WebResources');
+            if(!is_null($extent)) {
+                $masterWebResource->addLiteral($outputGraph->resource('http://purl.org/dc/terms/extent'),$extent);
+            }
+            $formatAdded = false;
+            foreach($res->all($this->inputGraph->resource('http://purl.org/dc/elements/1.1/format')) as $wrformat) {
+                $masterWebResource->addLiteral('http://purl.org/dc/elements/1.1/format', $wrformat);
+                $formatAdded = true;
+            }
+            if(!$formatAdded) {
+                $mimetype = Utils::getMimetype($masterReprUrl);
+                $masterWebResource->addLiteral('http://purl.org/dc/elements/1.1/format', Literal::create($mimetype, null, $outputGraph->resource('http://purl.org/dc/terms/IMT')));
+            }
+
+            $this->addDateToWebResource($res, $masterWebResource);
+
+        }
+
+        // build others
+        foreach($res->all($this->inputGraph->resource('http://purl.org/dc/terms/isFormatOf')) as $reprUrl) {
+            $webResource = $outputGraph->resource($reprUrl, 'edm:WebResources');
+            if(!is_null($extent)) {
+                $webResource->addLiteral($outputGraph->resource('http://purl.org/dc/terms/extent'),$extent);
+            }
+            $mimetype = Utils::getMimetype($reprUrl);
+            $webResource->addLiteral('http://purl.org/dc/elements/1.1/format', Literal::create($mimetype, null, $outputGraph->resource('http://purl.org/dc/terms/IMT')));
+
+            if(!is_null($masterReprUrl)) {
+                $webResource->addResource('edm:isDerivativeOf', $masterReprUrl);
+            }
+            $this->addDateToWebResource($res, $webResource);
+            $aggregationNode->addResource('edm:hasView', $reprUrl);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/server/src/app/Libraries/Mappers/CocoonTextRdfMapper.php	Thu Dec 10 17:04:51 2015 +0100
@@ -0,0 +1,165 @@
+<?php
+namespace CorpusParole\Libraries\Mappers;
+
+use Config;
+
+use CorpusParole\Libraries\Utils;
+use CorpusParole\Libraries\CocoonUtils;
+
+use EasyRdf\RdfNamespace;
+use EasyRdf\Graph;
+use EasyRdf\Literal;
+use EasyRdf\Resource;
+
+/**
+ * <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-UVE_MOCIKA> a <http://crdo.risc.cnrs.fr/schemas/Resource> ;
+ * 	<http://purl.org/dc/elements/1.1/description> "Voilà pourquoi le bernard-l'hermite, aujourd'hui, se cache dans les coquilles vides qu'il trouve, alors que le crabe de cocotier n'a pas honte de se promener tout nu."@fr ;
+ * 	<http://purl.org/dc/elements/1.1/format> "text/xml"^^<http://purl.org/dc/terms/IMT> ;
+ * 	<http://purl.org/dc/elements/1.1/type> "primary_text"^^<http://www.language-archives.org/OLAC/1.1/linguistic-type> , <http://purl.org/dc/dcmitype/Text> , "narrative"^^<http://www.language-archives.org/OLAC/1.1/discourse-type> ;
+ * 	<http://purl.org/dc/elements/1.1/subject> <http://lexvo.org/id/iso639-3/uve> ;
+ * 	<http://purl.org/dc/elements/1.1/language> <http://lexvo.org/id/iso639-3/uve> ;
+ * 	<http://www.language-archives.org/OLAC/1.1/depositor> <http://viaf.org/viaf/56614135> ;
+ * 	<http://purl.org/dc/elements/1.1/publisher> <http://viaf.org/viaf/154919513> ;
+ * 	<http://purl.org/dc/elements/1.1/rights> "Copyright (c) Moyse-Faurie, Claire" ;
+ * 	<http://purl.org/dc/elements/1.1/title> "The two hermit crabs and the coconut crab"@en ;
+ * 	<http://purl.org/dc/terms/isFormatOf> <http://cocoon.huma-num.fr/exist/crdo/moyse-faurie/uve/crdo-UVE_MOCIKA.xml> , <http://cocoon.huma-num.fr/exist/crdo/moyse-faurie/uve/crdo-UVE_MOCIKA.xhtml> ;
+ * 	<http://purl.org/dc/terms/accessRights> "Freely available for non-commercial use" ;
+ * 	<http://purl.org/dc/terms/license> <http://creativecommons.org/licenses/by-nc-sa/2.5/> ;
+ * 	<http://purl.org/dc/terms/isPartOf> <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-COLLECTION_LANGUESDEFRANCE> , <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-COLLECTION_LACITO> ;
+ * 	<http://purl.org/dc/terms/spatial> "NC"^^<http://purl.org/dc/terms/ISO3166> , "New Caledonia, Ohnyat (Ouvéa)" ;
+ * 	<http://purl.org/dc/terms/available> "2011-02-05"^^<http://purl.org/dc/terms/W3CDTF> ;
+ * 	<http://purl.org/dc/terms/issued> "2011-02-05T23:22:23+01:00"^^<http://purl.org/dc/terms/W3CDTF> ;
+ * 	<http://www.language-archives.org/OLAC/1.1/speaker> "Idakote, Félicien" ;
+ * 	<http://purl.org/dc/terms/requires> <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-UVE_MOCIKA_SOUND> ;
+ * 	<http://purl.org/dc/terms/alternative> "Les deux bernard-l'hermite et le crabe de cocotier"@fr ;
+ * 	<http://www.language-archives.org/OLAC/1.1/researcher> "Moyse-Faurie, Claire" ;
+ * 	<http://purl.org/dc/terms/modified> "2002-02-20"^^<http://purl.org/dc/terms/W3CDTF> ;
+ * 	<http://purl.org/dc/terms/conformsTo> <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-dtd_archive> .
+ *
+ * <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-UVE_MOCIKA_SOUND> a <http://crdo.risc.cnrs.fr/schemas/Resource> ;
+ * 	<http://purl.org/dc/elements/1.1/format> "audio/x-wav"^^<http://purl.org/dc/terms/IMT> ;
+ * 	<http://purl.org/dc/elements/1.1/type> <http://purl.org/dc/dcmitype/Sound> , "primary_text"^^<http://www.language-archives.org/OLAC/1.1/linguistic-type> , "narrative"^^<http://www.language-archives.org/OLAC/1.1/discourse-type> ;
+ * 	<http://purl.org/dc/elements/1.1/subject> <http://lexvo.org/id/iso639-3/uve> ;
+ * 	<http://purl.org/dc/elements/1.1/language> <http://lexvo.org/id/iso639-3/uve> ;
+ * 	<http://www.language-archives.org/OLAC/1.1/depositor> <http://viaf.org/viaf/56614135> ;
+ * 	<http://purl.org/dc/elements/1.1/publisher> <http://viaf.org/viaf/154919513> ;
+ * 	<http://purl.org/dc/elements/1.1/rights> "Copyright (c) Moyse-Faurie, Claire" ;
+ * 	<http://purl.org/dc/elements/1.1/title> "The two hermit crabs and the coconut crab"@en ;
+ * 	<http://purl.org/dc/terms/isFormatOf> <http://cocoon.huma-num.fr/data/archi/144187_MOCIKA_22km.wav> , <http://cocoon.huma-num.fr/data/archi/mp3/144187_MOCIKA_44k.mp3> ;
+ * 	<http://purl.org/dc/terms/accessRights> "Freely available for non-commercial use" ;
+ * 	<http://purl.org/dc/terms/license> <http://creativecommons.org/licenses/by-nc-nd/2.5/> ;
+ * 	<http://purl.org/dc/terms/isPartOf> <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-COLLECTION_LANGUESDEFRANCE> , <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-COLLECTION_LACITO> ;
+ * 	<http://purl.org/dc/terms/extent> "PT2M35S" ;
+ * 	<http://purl.org/dc/terms/created> "1997-08-29"^^<http://purl.org/dc/terms/W3CDTF> ;
+ * 	<http://purl.org/dc/terms/spatial> "NC"^^<http://purl.org/dc/terms/ISO3166> , "New Caledonia, Ohnyat (Ouvéa)" ;
+ * 	<http://crdo.risc.cnrs.fr/schemas/master> <http://cocoon.huma-num.fr/data/archi/masters/144187.wav> ;
+ * 	<http://purl.org/dc/terms/available> "2010-10-23"^^<http://purl.org/dc/terms/W3CDTF> ;
+ * 	<http://purl.org/dc/terms/issued> "2010-10-23T00:08:27+02:00"^^<http://purl.org/dc/terms/W3CDTF> ;
+ * 	<http://www.language-archives.org/OLAC/1.1/speaker> "Idakote, Félicien" ;
+ * 	<http://www.w3.org/2003/01/geo/wgs84_pos#long> "166.6526"^^xsd:float ;
+ * 	<http://www.w3.org/2003/01/geo/wgs84_pos#lat> "-20.4765"^^xsd:float ;
+ * 	<http://purl.org/dc/terms/isRequiredBy> <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-UVE_MOCIKA> ;
+ * 	<http://www.language-archives.org/OLAC/1.1/researcher> "Moyse-Faurie, Claire" .
+ *
+ *  http://purl.org/dc/elements/1.1/description
+ *  http://purl.org/dc/elements/1.1/format
+ *  http://purl.org/dc/elements/1.1/language
+ *  http://purl.org/dc/elements/1.1/publisher
+ *  http://purl.org/dc/elements/1.1/rights
+ *  http://purl.org/dc/elements/1.1/subject
+ *  http://purl.org/dc/elements/1.1/title
+ *  http://purl.org/dc/elements/1.1/type
+ *  http://purl.org/dc/terms/accessRights
+ *  http://purl.org/dc/terms/available
+ *  http://purl.org/dc/terms/conformsTo
+ *  http://purl.org/dc/terms/created
+ *  http://purl.org/dc/terms/isFormatOf
+ *  http://purl.org/dc/terms/isPartOf
+ *  http://purl.org/dc/terms/issued
+ *  http://purl.org/dc/terms/license
+ *  http://purl.org/dc/terms/requires
+ *  http://www.language-archives.org/OLAC/1.1/data_inputter
+ *  http://www.language-archives.org/OLAC/1.1/depositor
+ *  http://www.language-archives.org/OLAC/1.1/editor
+ *  http://www.language-archives.org/OLAC/1.1/interviewer
+ *  http://www.language-archives.org/OLAC/1.1/researcher
+ *  http://www.language-archives.org/OLAC/1.1/speaker
+ *  http://www.language-archives.org/OLAC/1.1/transcriber
+ *  http://www.language-archives.org/OLAC/1.1/author
+ *  http://www.language-archives.org/OLAC/1.1/recorder
+ *  http://www.language-archives.org/OLAC/1.1/translator
+ *  http://www.language-archives.org/OLAC/1.1/responder
+ *  http://www.language-archives.org/OLAC/1.1/sponsor
+ *  http://www.language-archives.org/OLAC/1.1/annotator
+ *  http://www.language-archives.org/OLAC/1.1/participant
+ *  http://www.language-archives.org/OLAC/1.1/compiler
+ *  http://www.language-archives.org/OLAC/1.1/developer
+ *  http://www.language-archives.org/OLAC/1.1/consultant
+ *  http://www.language-archives.org/OLAC/1.1/research_participant
+ *  http://purl.org/dc/terms/spatial
+ *  http://purl.org/dc/terms/tableOfContents
+ *  http://www.w3.org/2003/01/geo/wgs84_pos#lat
+ *  http://www.w3.org/2003/01/geo/wgs84_pos#long
+ *  http://purl.org/dc/terms/alternative
+ *  http://purl.org/dc/terms/modified
+ *  http://purl.org/dc/elements/1.1/identifier
+ *  http://purl.org/dc/terms/extent
+ *  http://purl.org/dc/terms/medium
+ *  http://purl.org/dc/elements/1.1/source
+ *  http://purl.org/dc/elements/1.1/coverage
+ *  http://crdo.risc.cnrs.fr/schemas/master
+ *  http://purl.org/dc/elements/1.1/creator
+ *  http://purl.org/dc/elements/1.1/reference
+ *  http://purl.org/dc/terms/references
+ *  http://purl.org/dc/terms/abstract
+ *  http://purl.org/dc/elements/1.1/relation
+ */
+class CocoonTextRdfMapper extends CocoonContentRdfMapper {
+
+
+    protected function getResourceBaseId($res=null) {
+
+        if(is_null($res)) {
+            $res = $this->inputGraph->resource($this->uri);
+        }
+        $soundRes = $res->get('dc:requires');
+
+        if(! $soundRes instanceof Resource) {
+            throw new \Exception("Input graph for text not correct, can not find sound resource", 1);
+        }
+
+        return $soundRes->getUri();
+    }
+
+    protected function addCHOResourceDateProperties($providedCHOResource, $res, $outputGraph) {
+        // We do not add date to the providedCHO for Text resource
+    }
+
+    // protected function propertyTypeMap($providedCHOResource, $prop, $value) {
+    //     if((!$value instanceof Resource) || $value->getUri() !== "http://purl.org/dc/dcmitype/Text") {
+    //         $providedCHOResource->add($prop, $value);
+    //     }
+    // }
+
+    protected function mapWebResources($res, $outputGraph) {
+        $resId = CocoonUtils::getIdFromUri($this->getResourceBaseId($res));
+        $resUri = CocoonUtils::getCorpusUriFromId($resId);
+
+
+        $aggregationNode = $outputGraph->resource($resUri, 'ore:Aggregation');
+
+        // build others
+        foreach($res->all($this->inputGraph->resource('http://purl.org/dc/terms/isFormatOf')) as $reprUrl) {
+            $webResource = $outputGraph->resource($reprUrl, 'edm:WebResources');
+            $mimetype = Utils::getMimetype($reprUrl);
+
+            $webResource->addLiteral('http://purl.org/dc/elements/1.1/format', Literal::create($mimetype, null, $outputGraph->resource('http://purl.org/dc/terms/IMT')));
+
+            $this->addDateToWebResource($res, $webResource);
+            $aggregationNode->addResource('edm:hasView', $reprUrl);
+
+        }
+
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/server/src/app/Libraries/Mappers/RdfMapper.php	Thu Dec 10 17:04:51 2015 +0100
@@ -0,0 +1,20 @@
+<?php
+namespace CorpusParole\Libraries\Mappers;
+
+/**
+ * Map a rdf graph to one more graph(es).
+ */
+interface RdfMapper {
+
+    /**
+     * Map an Rdf Graph from one model to another
+     * @return the new mapped graph
+     */
+    function mapGraph();
+
+    /**
+     * Get output graphes
+     * @return array
+     */
+    function getOutputGraphes();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/server/src/app/Libraries/Mergers/CocoonAbstractRdfMerger.php	Thu Dec 10 17:04:51 2015 +0100
@@ -0,0 +1,205 @@
+<?php
+namespace CorpusParole\Libraries\Mergers;
+
+
+use EasyRdf\RdfNamespace;
+use EasyRdf\Graph;
+
+RdfNamespace::set('edm', 'http://www.europeana.eu/schemas/edm/');
+RdfNamespace::set('ore', 'http://www.openarchives.org/ore/terms/');
+RdfNamespace::set('crdo', 'http://crdo.risc.cnrs.fr/schemas/');
+RdfNamespace::set('olac', 'http://www.language-archives.org/OLAC/1.1/');
+RdfNamespace::set('skos', 'http://www.w3.org/2004/02/skos/core#');
+
+abstract class CocoonAbstractRdfMerger implements RdfMerger {
+
+    const ORIGIN_BASE = 0;
+    const ORIGIN_SRC = 1;
+
+    abstract protected function getTypeMergeMethodMap();
+
+    /**
+     * Merge an Rdf Graph from one model to another
+     *
+     * @param EasyRdf\Graph $baseGraph The graph used as base for the merge
+     * @param EasyRdf\Graph $srcGraph The source graph with the new triples to add
+     *
+     * @return EasyRdf\Graph The new merged graph
+     */
+    function mergeGraph($baseGraph, $srcGraph, $uri = null) {
+
+        $uri = is_null($uri)?$baseGraph->getUri():$uri;
+        $this->mergedArray = [];
+        $this->resGraph = new Graph($uri);
+        $this->bnodeMerge = [];
+        $this->baseGraph = $baseGraph;
+        $this->srcGraph = $srcGraph;
+
+
+        $typeMergeMethodMap = $this->getTypeMergeMethodMap();
+
+        foreach ( $typeMergeMethodMap as $nodeType => $mergeMethod) {
+
+            foreach($baseGraph->allOfType($nodeType) as $baseResource) {
+                if($baseResource->isBNode()) {
+                    continue;
+                }
+                $this->mergedArray[$baseResource->getUri()] = $baseGraph->toRdfPhp()[$baseResource->getUri()];
+            }
+            foreach($srcGraph->allOfType($nodeType) as $srcResource) {
+                if($baseResource->isBNode()) {
+                    continue;
+                }
+                if(empty($baseGraph->propertyUris($srcResource->getUri()))) {
+                    $this->mergedArray[$srcResource->getUri()] = $srcGraph->toRdfPhp()[$srcResource->getUri()];
+                }
+                else {
+                    $baseResource = $baseGraph->resource($srcResource->getUri());
+                    $this->mergedArray[$srcResource->getUri()] = $baseGraph->toRdfPhp()[$baseResource->getUri()];
+                    call_user_func(array($this, $mergeMethod), $baseResource, $srcResource);
+                }
+            }
+        }
+
+        // merge blank node
+        reset($this->bnodeMerge);
+        while(list($bnodeId, $bnodeDef) = each($this->bnodeMerge)) {
+
+            $srcUrl = isset($bnodeDef['src_url'])?$bnodeDef['src_url']:null;
+            $baseUrl = isset($bnodeDef['base_url'])?$bnodeDef['base_url']:null;
+
+            if(is_null($srcUrl) && !is_null($baseUrl)) {
+                $this->mergedArray[$bnodeId] = $this->copyResource($baseGraph->toRdfPhp()[$baseUrl],CocoonAbstractRdfMerger::ORIGIN_BASE);
+            }
+            elseif (is_null($baseUrl) && !is_null($srcUrl)) {
+                $this->mergedArray[$bnodeId] = $this->copyResource($srcGraph->toRdfPhp()[$srcUrl],CocoonAbstractRdfMerger::ORIGIN_SRC);
+            }
+            elseif (!is_null($baseUrl) && !is_null($srcUrl)) {
+
+                $baseResource = $baseGraph->resource($baseUrl);
+                $srcResource = $srcGraph->resource($srcUrl);
+
+                if(!is_null($baseResource->typeAsResource()) && array_key_exists($baseResource->typeAsResource()->getUri(), $typeMergeMethodMap)) {
+
+                    $mergeMethod = $typeMergeMethodMap[$baseResource->typeAsResource()->getUri()];
+                    $this->mergedArray[$bnodeId] = [];
+
+                    call_user_func(array($this, $mergeMethod), $baseResource, $srcResource, $bnodeId);
+                }
+            }
+
+        }
+
+        //echo "MERGED ARRAY:\n";
+        $this->resGraph->parse($this->mergedArray);
+        return $this->resGraph;
+    }
+
+    /**
+     * Copy a full resource node
+     *
+     */
+    protected function copyResource($origArray, $origin) {
+        $resArray = [];
+        foreach($origArray as $prop => $propValues) {
+            $resArray[$prop] = $this->buildValueList($propValues, $origin);
+        }
+        return $resArray;
+    }
+
+    /**
+     * Build a value list. replace the blank node reference.
+     * @param $srcValues array The original values
+     * @param $origin int values are 'ORIGIN_BASE' if bnode from base graph or 'ORIGIN_SRC' from source graph
+     */
+    protected function buildValueList($srcValues, $origin) {
+        $srcArrayProps = [];
+        foreach ($srcValues as $propValue) {
+            if(is_array($propValue) && array_key_exists('type', $propValue) && $propValue['type'] == 'bnode') {
+                $newBNodeId = $this->resGraph->newBNodeId();
+                if($origin == CocoonAbstractRdfMerger::ORIGIN_SRC) {
+                    $this->bnodeMerge[$newBNodeId] = ['src_url' => $propValue['value'], 'base_url' => null];
+                }
+                else {
+                    $this->bnodeMerge[$newBNodeId] = ['base_url' => $propValue['value'], 'src_url' => null];
+                }
+
+                $propValue['value'] = $newBNodeId;
+            }
+            $srcArrayProps[] = $propValue;
+        }
+        return $srcArrayProps;
+    }
+
+    protected function mergePropertySingleValue($prop, &$targetArray, $baseArray, $srcArray) {
+
+        if(isset($baseArray[$prop])) {
+            $targetArray[$prop] = $this->buildValueList($baseArray[$prop], CocoonAbstractRdfMerger::ORIGIN_BASE);
+        }
+        elseif(isset($srcArray[$prop])) {
+            $targetArray[$prop] = $this->buildValueList($srcArray[$prop], CocoonAbstractRdfMerger::ORIGIN_SRC);
+        }
+    }
+
+    protected function mergePropertyMultiplevalue($prop, &$targetArray, $baseArray, $srcArray) {
+        $propArray = $this->buildValueList(isset($baseArray[$prop])?$baseArray[$prop]:[], CocoonAbstractRdfMerger::ORIGIN_BASE);
+        if(isset($srcArray[$prop])) {
+            $mergedArray = array_merge($propArray, $this->buildValueList($srcArray[$prop], CocoonAbstractRdfMerger::ORIGIN_BASE));
+            //yes, this is real. Array_unique does not work on multidimentional arrays. Most work-around suggest the use of serialize to compare sub arrays...
+            $propArray = array_values(array_intersect_key($mergedArray, array_unique(array_map('md5',array_map('serialize', $mergedArray)))));
+        }
+
+        if(!empty($propArray)) {
+            $targetArray[$prop] = $propArray;
+        }
+    }
+
+    protected function mergePropertySingleBNode($prop, &$targetArray, $baseArray, $srcArray) {
+
+        $newBNodeId = $this->resGraph->newBNodeId();
+
+        $srcUrl = null;
+        $baseUrl = null;
+
+        // in src but not in base
+        if(array_key_exists($prop, $baseArray) &&
+            !empty($baseArray[$prop]) &&
+            array_key_exists('type',$baseArray[$prop][0]) &&
+            array_key_exists('value',$baseArray[$prop][0]) &&
+            $baseArray[$prop][0]['type'] === 'bnode') {
+            $baseUrl = $baseArray[$prop][0]['value'];
+        }
+
+        if(array_key_exists($prop, $srcArray) &&
+            !empty($srcArray[$prop]) &&
+            array_key_exists('type',$srcArray[$prop][0]) &&
+            array_key_exists('value',$srcArray[$prop][0]) &&
+            $srcArray[$prop][0]['type'] === 'bnode') {
+            $srcUrl = $srcArray[$prop][0]['value'];
+        }
+
+        $this->bnodeMerge[$newBNodeId] = ['src_url' => $srcUrl, 'base_url' => $baseUrl];
+
+        $targetArray[$prop] = [ [ 'type' => 'bnode', 'value' => $newBNodeId], ];
+
+    }
+
+
+    protected function mergeProperties($singleBNodeProperties, $singleProperties, &$targetArray, $baseRes, $srcRes) {
+        $srcRdfPhp = $this->srcGraph->toRdfPhp();
+        $srcArray = array_key_exists($srcRes->getUri(), $srcRdfPhp)?$srcRdfPhp[$srcRes->getUri()]:[];
+        $baseRdfPhp = $this->baseGraph->toRdfPhp();
+        $baseArray = array_key_exists($baseRes->getUri(), $baseRdfPhp)?$baseRdfPhp[$baseRes->getUri()]:[];
+        foreach($srcRes->propertyUris() as $prop) {
+            if(in_array($prop, $singleBNodeProperties)) {
+                $this->mergePropertySingleBNode($prop, $targetArray, $baseArray, $srcArray);
+            }
+            elseif(in_array($prop, $singleProperties)) {
+                $this->mergePropertySingleValue($prop, $targetArray, $baseArray, $srcArray);
+            }
+            else {
+                $this->mergePropertyMultiplevalue($prop, $targetArray, $baseArray, $srcArray);
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/server/src/app/Libraries/Mergers/CocoonCollectionRdfMerger.php	Thu Dec 10 17:04:51 2015 +0100
@@ -0,0 +1,47 @@
+<?php
+namespace CorpusParole\Libraries\Mergers;
+
+
+class CocoonCollectionRdfMerger extends CocoonAbstractRdfMerger {
+
+    protected function getTypeMergeMethodMap() {
+        return [
+            'http://www.europeana.eu/schemas/edm/Collection' => 'mergeEdmCollection',
+            'http://www.europeana.eu/schemas/edm/Place' => 'mergeDcSpatialBlankNode'
+        ];
+    }
+
+    protected function mergeEdmCollection($baseRes, $srcRes, $uri = null) {
+
+        if(is_null($uri)) {
+            $uri = $baseRes->getUri();
+        }
+        $targetArray =& $this->mergedArray[$uri];
+
+        $this->mergeProperties([
+            "http://purl.org/dc/terms/spatial"
+        ], [
+            "http://purl.org/dc/elements/1.1/title",
+            "http://purl.org/dc/terms/available",
+            "http://purl.org/dc/terms/created",
+            "http://purl.org/dc/terms/issued",
+            "http://purl.org/dc/terms/modified"
+        ], $targetArray, $baseRes, $srcRes);
+
+    }
+
+    protected function mergeDcSpatialBlankNode($baseRes, $srcRes, $uri=null) {
+        if(is_null($uri)) {
+            $uri = $baseRes->getUri();
+        }
+        $targetArray =& $this->mergedArray[$uri];
+
+        $this->mergeProperties([],[
+            "http://www.w3.org/2003/01/geo/wgs84_pos#lat",
+            "http://www.w3.org/2003/01/geo/wgs84_pos#long",
+            "http://www.w3.org/2003/01/geo/wgs84_pos#alt",
+            "http://www.w3.org/2002/07/owl#sameAs"
+        ], $targetArray, $baseRes, $srcRes);
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/server/src/app/Libraries/Mergers/CocoonSoundRdfMerger.php	Thu Dec 10 17:04:51 2015 +0100
@@ -0,0 +1,163 @@
+<?php
+namespace CorpusParole\Libraries\Mergers;
+
+
+// @prefix ore: <http://www.openarchives.org/ore/terms/> .
+// @prefix edm: <http://www.europeana.eu/schemas/edm/> .
+// @prefix dc: <http://purl.org/dc/terms/> .
+// @prefix dc11: <http://purl.org/dc/elements/1.1/> .
+// @prefix olac: <http://www.language-archives.org/OLAC/1.1/> .
+// @prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> .
+// @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+// @prefix skos: <http://www.w3.org/2004/02/skos/core#> .
+// @prefix owl: <http://www.w3.org/2002/07/owl#> .
+//
+// <http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-ESLO1_ENT_019>
+//   a ore:Aggregation ;
+//   edm:aggregatedCHO <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-ESLO1_ENT_019> ;
+//   edm:provider "Corpus de la Parole"@fr ;
+//   edm:dataProvider <http://viaf.org/viaf/181558906> ;
+//   edm:isShownAt <http://cocoon.huma-num.fr/exist/crdo/meta/crdo-ESLO1_ENT_019> ;
+//   edm:isShownBy <http://cocoon.huma-num.fr/data/eslo/masters/ESLO1_ENT_019.wav> ;
+//   edm:rights <http://creativecommons.org/licenses/by-nc-sa/4.0/> ;
+//   edm:hasView <http://cocoon.huma-num.fr/data/eslo/ESLO1_ENT_019_22km.wav>, <http://cocoon.huma-num.fr/data/eslo/ESLO1_ENT_019.mp3> .
+//
+// <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-ESLO1_ENT_019>
+//   a edm:ProvidedCHO ;
+//   dc:tableOfContents "01 née; famille a toujours habité Orléans03 oui, on y a des amis, relations04 oui, certainementT1 centralisait comptabilité dans une industrieT2 RR passer des écritures, caisse; horaires avant et après loi de 1936T3 aimait travail, rien ne lui déplaisaitT4 n'a jamais pensé à çaT5 actuellement on est forcée quelquefois - assurance sociale - retraite appréciable; autre chose avec enfantL1 concerts, théâtre, réunions, etc...:préfère s'occuperL2 messe, puis a passé la journée avec une amieL3 (quand elle travaillait) au bord de la mer ou voyages organisésE1 n'en sait rienE2 lui semble que ça aide le françaisE3 peut-être chimie, physiqueE4 intelligence, travail, familleE5 dépend de leurs capacitésE6 non : dépend de la vie de l'enfant plus tardP1 oui, à part loyers chersP4 ne comprend pas motifs des étudiants; très calme à OrléansP9 moins qu'avant 1940P10 RR bourgeois = gros rentiers, femmes d'officierss, gros industriels; chaque groupe se recevait mutuellement, formait un clanQ. Orléans une ville renfermée? oui : orléanais assez distant, peut-être moins maintenantP6 il faut avoir la moitié des votesP7 des candidats se retirentP8 droite gaulliste, réservée; gauche avancéeP5 pas grand-chose - attachés à leurs partisP11 oui, maintenant, par l'éducation; famille moins importanteP12 à diminuer : les gens travaillent beaucoup plus et l'argent a changé de mainsOmelette (je casse mes oeufs...)Questionnaire sociolinguistique"@fr ;
+//   dc11:description "Extrait du corpus d'Orléans, réalisé dans le cadre de l'Enquête SocioLinguistique à Orléans à la fin des années 1960."@fr ;
+//   dc11:language <http://lexvo.org/id/iso639-3/fra> ;
+//   dc11:publisher <http://viaf.org/viaf/181558906> ;
+//   dc11:rights "Copyright (c) 2012 Université d'Orléans/LLL" ;
+//   dc11:type <http://purl.org/dc/dcmitype/Sound>, "primary_text"^^olac:linguistic-type, "dialogue"^^olac:discourse-type ;
+//   dc:license <http://creativecommons.org/licenses/by-nc-sa/3.0/> ;
+//   dc11:subject <http://lexvo.org/id/iso639-3/fra>, "text_and_corpus_linguistics"^^olac:linguistic-field, <http://ark.bnf.fr/ark:/12148/cb135052099>, <http://ark.bnf.fr/ark:/12148/cb11943508j>, <http://ark.bnf.fr/ark:/12148/cb11934124q>, <http://ark.bnf.fr/ark:/12148/cb11931498c>, <http://ark.bnf.fr/ark:/12148/cb11935508t>, <http://ark.bnf.fr/ark:/12148/cb11934132b>, <http://ark.bnf.fr/ark:/12148/cb11939893p>, <http://ark.bnf.fr/ark:/12148/cb11933091b> ;
+//   dc11:title "ESLO1: entretien 019"@fr ;
+//   dc:accessRights "Freely available for non-commercial use" ;
+//   dc:extent "PT0H47M16S" ;
+//   dc:isPartOf <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-COLLECTION_LANGUESDEFRANCE>, <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-COLLECTION_ESLO1> ;
+//   dc11:source <http://archivesetmanuscrits.bnf.fr/ead.html?id=FRBNFEAD000095934&c=FRBNFEAD000095934_a19844296> ;
+//   dc:medium "1 bande magnétique audio"@fr ;
+//   dc:alternative "ESLO1: entretien 019 alt"@fr ;
+//   dc:bibliographicCitation "A.-M. VURPAS (1988), Autrefois dans les monts du Beaujolais, Action graphique." ;
+//   dc11:identifier "Cote producteur: 001_3"@fr ;
+//   dc:references <http://panini.u-paris10.fr> ;
+//   dc11:coverage "Quartier concerné : Montreuil"@fr ;
+//   dc11:relation <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-ESLO1_ENTCONT_233> ;
+//   dc11:creator "Blanc, Michel", "Biggs, Patricia" ;
+//   olac:depositor <http://viaf.org/viaf/181558906> ;
+//   dc11:contributor <http://viaf.org/viaf/181558906>, <http://viaf.org/viaf/39685504>, <http://viaf.org/viaf/200058210>, "Kay, Jack", "JK", "UG393" ;
+//   olac:editor <http://viaf.org/viaf/39685504>, <http://viaf.org/viaf/200058210> ;
+//   olac:researcher "Kay, Jack" ;
+//   olac:speaker "JK", "UG393" ;
+//   dc:available "2014-11-06"^^dc:W3CDTF ;
+//   dc:created "1969-04-11"^^dc:W3CDTF ;
+//   dc:issued "2014-12-05T15:00:19+01:00"^^dc:W3CDTF ;
+//   dc:modified "2014-12-05T15:00:19+01:00"^^dc:W3CDTF ;
+//   dc:spatial [
+//     a edm:Place ;
+//     geo:lat "47.90"^^xsd:float ;
+//     geo:long "1.90"^^xsd:float ;
+//     skos:note "FR"^^dc:ISO3166, "France, Centre, Loiret, Orléans"@fr ;
+//     owl:sameAs <http://vocab.getty.edu/tgn/7008337>
+//   ] .
+//
+// <http://cocoon.huma-num.fr/data/eslo/masters/ESLO1_ENT_019.wav>
+//   a edm:WebResources ;
+//   dc:extent "PT0H47M16S" ;
+//   dc11:format "audio/x-wav"^^dc:IMT ;
+//   dc:created "1969-04-11"^^dc:W3CDTF ;
+//   dc:issued "2014-12-05T15:00:19+01:00"^^dc:W3CDTF .
+//
+// <http://cocoon.huma-num.fr/data/eslo/ESLO1_ENT_019_22km.wav>
+//   a edm:WebResources ;
+//   dc:extent "PT0H47M16S" ;
+//   dc11:format "audio/x-wav"^^dc:IMT ;
+//   edm:isDerivativeOf <http://cocoon.huma-num.fr/data/eslo/masters/ESLO1_ENT_019.wav> ;
+//   dc:created "1969-04-11"^^dc:W3CDTF ;
+//   dc:issued "2014-12-05T15:00:19+01:00"^^dc:W3CDTF .
+//
+// <http://cocoon.huma-num.fr/data/eslo/ESLO1_ENT_019.mp3>
+//   a edm:WebResources ;
+//   dc:extent "PT0H47M16S" ;
+//   dc11:format "audio/mpeg"^^dc:IMT ;
+//   edm:isDerivativeOf <http://cocoon.huma-num.fr/data/eslo/masters/ESLO1_ENT_019.wav> ;
+//   dc:created "1969-04-11"^^dc:W3CDTF ;
+//   dc:issued "2014-12-05T15:00:19+01:00"^^dc:W3CDTF .
+
+class CocoonSoundRdfMerger extends CocoonAbstractRdfMerger {
+
+    protected function getTypeMergeMethodMap() {
+        return [
+            'http://www.openarchives.org/ore/terms/Aggregation' => 'mergeOreAggregation',
+            'http://www.europeana.eu/schemas/edm/ProvidedCHO' => 'mergeEdmProvidedCHO',
+            'http://www.europeana.eu/schemas/edm/WebResources' => 'mergeEdmWebResources',
+            'http://www.europeana.eu/schemas/edm/Place' => 'mergeDcSpatialBlankNode'
+        ];
+    }
+
+    protected function mergeOreAggregation($baseRes, $srcRes, $uri = null) {
+
+        if(is_null($uri)) {
+            $uri = $baseRes->getUri();
+        }
+        $targetArray =& $this->mergedArray[$uri];
+
+        $this->mergeProperties([], [
+            "http://www.europeana.eu/schemas/edm/aggregatedCHO",
+            "http://www.europeana.eu/schemas/edm/provider",
+            "http://www.europeana.eu/schemas/edm/dataProvider",
+            "http://www.europeana.eu/schemas/edm/isShownAt",
+            "http://www.europeana.eu/schemas/edm/isShownBy"
+        ], $targetArray, $baseRes, $srcRes);
+
+    }
+
+    protected function mergeEdmProvidedCHO($baseRes, $srcRes, $uri=null) {
+        if(is_null($uri)) {
+            $uri = $baseRes->getUri();
+        }
+        $targetArray =& $this->mergedArray[$uri];
+
+        $this->mergeProperties([
+            "http://purl.org/dc/terms/spatial"
+        ], [
+            "http://purl.org/dc/elements/1.1/title",
+            "http://purl.org/dc/terms/extent",
+            "http://purl.org/dc/terms/available",
+            "http://purl.org/dc/terms/created",
+            "http://purl.org/dc/terms/issued",
+            "http://purl.org/dc/terms/modified"
+        ], $targetArray, $baseRes, $srcRes);
+
+    }
+
+    protected function mergeEdmWebResources($baseRes, $srcRes, $uri=null) {
+        if(is_null($uri)) {
+            $uri = $baseRes->getUri();
+        }
+        $targetArray =& $this->mergedArray[$uri];
+        $this->mergeProperties([],[
+            "http://purl.org/dc/terms/extent",
+            "http://purl.org/dc/elements/1.1/format",
+            "http://www.europeana.eu/schemas/edm/isDerivativeOf",
+            "http://purl.org/dc/terms/created",
+            "http://purl.org/dc/terms/issued"
+        ], $targetArray, $baseRes, $srcRes);
+    }
+
+    protected function mergeDcSpatialBlankNode($baseRes, $srcRes, $uri=null) {
+        if(is_null($uri)) {
+            $uri = $baseRes->getUri();
+        }
+        $targetArray =& $this->mergedArray[$uri];
+
+        $this->mergeProperties([],[
+            "http://www.w3.org/2003/01/geo/wgs84_pos#lat",
+            "http://www.w3.org/2003/01/geo/wgs84_pos#long",
+            "http://www.w3.org/2003/01/geo/wgs84_pos#alt",
+            "http://www.w3.org/2002/07/owl#sameAs"
+        ], $targetArray, $baseRes, $srcRes);
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/server/src/app/Libraries/Mergers/RdfMerger.php	Thu Dec 10 17:04:51 2015 +0100
@@ -0,0 +1,20 @@
+<?php
+namespace CorpusParole\Libraries\Mergers;
+
+/**
+ * merge graphes after mapping them.
+ */
+interface RdfMerger {
+
+
+    /**
+     * Merge an Rdf Graph from one model to another
+     *
+     * @param EasyRdf\Graph $baseGraph The graph used as base for the merge
+     * @param EasyRdf\Graph $srcGraph The source graph with the new triples to add
+     *
+     * @return EasyRdf\Graph The new merged graph
+     */
+    function mergeGraph($baseGraph, $srcGraph);
+
+}
--- a/server/src/app/Libraries/Utils.php	Thu Dec 10 17:00:59 2015 +0100
+++ b/server/src/app/Libraries/Utils.php	Thu Dec 10 17:04:51 2015 +0100
@@ -1,5 +1,4 @@
 <?php
-
 namespace CorpusParole\Libraries;
 
 /**
@@ -7,10 +6,50 @@
  */
 class Utils {
 
+    /**
+     * convert DateIntervals to milliseconds
+     * Months and year calculated by approximation based on average number
+     * of days over 4 years (365*4+1)
+     * @param \DateInterval $di the date interval
+     * @return the number of milliseconds or 0 if $di is null
+     */
+    public static function dateIntervalToMillis(\DateInterval $di) {
+        if(is_null($di)) {
+            return null;
+        }
+        $seconds = ($di->s)
+         + ($di->i * 60)
+         + ($di->h * 60 * 60)
+         + ($di->d * 60 * 60 * 24)
+         + ($di->m * (365*4+1)/48*60*60*24)
+         + ($di->y * (365*4+1)/4*60*60*24);
+        return $seconds*1000;
+    }
+
+    /**
+     * convert iso8601 strings to milliseconds
+     * Months and year calculated by approximation based on average number
+     * of days over 4 years (365*4+1)
+     *
+     * @param str iso8601 string
+     * @return the number of milliseconds or 0 if $str is null
+     */
+    public static function iso8601IntervalToMillis($str) {
+        if(is_null($str)) {
+            return null;
+        }
+        elseif( $str === '') {
+            return 0;
+        }
+
+        $di = new \DateInterval($str);
+        return self::dateIntervalToMillis($di);
+    }
+
     /*
      * From http://www.thecave.info/php-get-mime-type-from-file-extension/
      */
-    public static function get_mimetype($file) {
+    public static function getMimetype($file) {
 
         // our list of mime types
         $mime_types = array(
@@ -51,7 +90,7 @@
         return $mime_types[$extension];
     }
 
-    public static function process_literal_or_string($val) {
+    public static function processLiteralOrString($val) {
         if(is_null($val)) {
             return $val;
         }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/server/src/app/Models/CocoonDocument.php	Thu Dec 10 17:04:51 2015 +0100
@@ -0,0 +1,12 @@
+<?php
+
+namespace CorpusParole\Models;
+
+use Illuminate\Database\Eloquent\Model;
+
+class CocoonDocument extends Model
+{
+    public function revisions() {
+        return $this->hasMany('CorpusParole\Models\CocoonDocument', 'document_id');
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/server/src/app/Models/CocoonRevision.php	Thu Dec 10 17:04:51 2015 +0100
@@ -0,0 +1,12 @@
+<?php
+
+namespace CorpusParole\Models;
+
+use Illuminate\Database\Eloquent\Model;
+
+class CocoonRevision extends Model
+{
+    public function document() {
+        return $this->belongsTo('CorpusParole\Models\CocoonDocument');
+    }
+}
--- a/server/src/app/Models/Document.php	Thu Dec 10 17:00:59 2015 +0100
+++ b/server/src/app/Models/Document.php	Thu Dec 10 17:04:51 2015 +0100
@@ -3,6 +3,7 @@
 
 use Config;
 use CorpusParole\Libraries\Utils;
+use CorpusParole\Libraries\CocoonUtils;
 use CorpusParole\Libraries\RdfModel\RdfModelResource;
 use JsonSerializable;
 use Log;
@@ -24,86 +25,186 @@
 
     private $id = null;
 
+    // memoization
+    private $providedCHO = null;
+    private $title = false;
+    private $publishers = null;
+    private $mediaArray = null;
+    private $issued = null;
+    private $modified = null;
+
+    public function getProvidedCHO() {
+        if(is_null($this->providedCHO)) {
+            $this->providedCHO = $this->get("<http://www.europeana.eu/schemas/edm/aggregatedCHO>");
+        }
+        return $this->providedCHO;
+    }
+
+    private function clearMemoizationCache() {
+        $this->providedCHO = null;
+        $this->title = false;
+        $this->publishers = null;
+        $this->mediaArray = null;
+        $this->issued = null;
+        $this->modified = null;
+    }
+
     public function getId() {
         if(is_null($this->id)) {
-            $this->id = substr($this->uri, strlen(Config::get('corpusparole.cocoon_doc_id_base_uri')));
+            $this->id = CocoonUtils::getIdFromCorpusUri($this->uri);
         }
         return $this->id;
     }
 
     public function getTitle() {
-        try {
-            return $this->getLiteral('<http://purl.org/dc/elements/1.1/title>');
-        } catch(\Exception $e) {
-            return null;
+        if($this->title === false) {
+            try {
+                $this->title = $this->getProvidedCHO()->getLiteral('<http://purl.org/dc/elements/1.1/title>');
+            } catch(\Exception $e) {
+                $this->title = null;
+            }
         }
+        return $this->title;
+    }
+
+    public function getTitleValue() {
+        $title = $this->getTitle();
+        return is_null($title)?null:$title->getValue();
     }
 
     public function getPublishers() {
-        try {
-            return $this->allLiterals('dc11:publisher');
-        } catch(\Exception $e) {
-           return [];
-       }
+        if(is_null($this->publishers)) {
+            try {
+                $this->publishers = $this->getProvidedCHO()->all('dc11:publisher');
+            } catch(\Exception $e) {
+               $this->publishers = [];
+            }
+        }
+        return $this->publishers;
+    }
+
+    public function getIssued() {
+        if(is_null($this->issued)) {
+            try {
+                $this->issued = $this->getProvidedCHO()->getLiteral("<http://purl.org/dc/terms/issued>");
+            } catch(\Exception $e) {
+                $this->issued = null;
+            }
+        }
+        return $this->issued;
+    }
+
+    public function getIssuedValue() {
+        $issued = $this->getIssued();
+        return is_null($issued)?null:$issued->getValue();
+    }
+
+    public function getModified() {
+        if(is_null($this->modified)) {
+            try {
+                $this->modified = $this->getProvidedCHO()->getLiteral("<http://purl.org/dc/terms/modified>");
+                if(is_null($this->modified)) {
+                    $this->modified = $this->getIssued();
+                }
+            } catch(\Exception $e) {
+                $this->modified = null;
+            }
+        }
+        return $this->modified;
+    }
+
+    public function getModifiedValue() {
+        $modified = $this->getModified();
+        return is_null($modified)?null:$modified->getValue();
     }
 
     public function getMediaArray() {
 
-        //TODO: add media type
-        $res = [];
-        $formats = [];
-        try {
-            $formats = $this->allResources("dc:isFormatOf");
-        } catch(\Exception $e) {
-            // do nothing
+        if(is_null($this->mediaArray)) {
+            //TODO: add media type
+            $this->mediaArray = [];
+
+            $master = $this->get('<http://www.europeana.eu/schemas/edm/isShownBy>');
+            $masterUrl = is_null($master)?null:$master->getUri();
+
+            foreach($this->graph->allOfType("<http://www.europeana.eu/schemas/edm/WebResources>") as $webResource) {
+                $extent = $webResource->getLiteral("<http://purl.org/dc/terms/extent>");
+                $extent = is_null($extent)?null:$extent->getValue();
+                $extent_ms = Utils::iso8601IntervalToMillis($extent);
+                $format = $webResource->getLiteral("dc11:format");
+
+                $this->mediaArray[$webResource->getUri()] = [
+                    'url' => $webResource->getUri(),
+                    'format' => is_null($format)?null:$format->getValue(),
+                    'extent' => $extent,
+                    'extent_ms' => $extent_ms,
+                    'master' => (($webResource->getUri() === $masterUrl)?true:false)
+                ];
+            }
         }
-        foreach ($formats as $f) {
-            $uri = $f->getUri();
-            $mimetype = Utils::get_mimetype($uri);
-            array_push($res, ["url" => $uri, "format" => $mimetype]);
-        }
-
-        $format = null;
-        try {
-            $format = $this->getLiteral('dc11:format');
-        } catch(\Exception $e) {
-            // do nothing
-        }
-        array_push($res, ["url" => $this->getUri(), "format" => $format]);
-        return $res;
+        return $this->mediaArray;
     }
 
     public function getTypes() {
-        return $this->all('dc11:type');
+        return $this->getProvidedCHO()->all('dc11:type');
     }
 
     public function getDiscourseTypes() {
         return array_values(array_filter($this->getTypes(), function($v) {
-            return $v instanceof Literal && $v->getDatatypeUri() === Config::get('constants.OLAC_DISCOURSE_TYPE')['uri'];
+            return $v instanceof Literal && $v->getDatatypeUri() === Config::get('corpusparole.olac_discourse_type')['uri'];
         }));
     }
 
     public function getOtherTypes() {
         $res = array_values(array_filter($this->getTypes(), function($v) {
-            return $v instanceof Resource || $v->getDatatypeUri() !== Config::get('constants.OLAC_DISCOURSE_TYPE')['uri'];
+            return $v instanceof Resource || $v->getDatatypeUri() !== Config::get('corpusparole.olac_discourse_type')['uri'];
         }));
         return $res;
     }
 
+    public function getContributors() {
+        return array_reduce(
+            CocoonUtils::OLAC_ROLES,
+            function($res, $olacRole) {
+                return array_merge(
+                    $res,
+                    array_map(
+                        function($olacValue) use ($olacRole) {
+                            return [
+                                'name' => ($olacValue instanceof Literal)?$olacValue->getValue():null,
+                                'url' => ($olacValue instanceof Resource)?$olacValue->getUri():null,
+                                'role' => $olacRole
+                            ];
+                        },
+                        $this->getProvidedCHO()->all("<$olacRole>")
+                    )
+                );
+            },
+            []
+        );
+    }
+
+    /**
+     * change discourse type list
+     */
     public function updateDiscourseTypes(array $discoursesTypes) {
 
         $this->startDelta();
 
+        //delete
         foreach($this->getDiscourseTypes() as $discourseType) {
-            $this->delete('dc11:type', $discourseType);
-            $this->currentDelta->getDeletedGraph()->add($this, 'dc11:type', new Literal($discourseType, null, Config::get('constants.OLAC_DISCOURSE_TYPE')['uri']));
+            $literalValue = new Literal($discourseType, null, Config::get('corpusparole.olac_discourse_type')['uri']);
+            $this->getProvidedCHO()->delete('dc11:type', $literalValue);
+            $this->currentDelta->getDeletedGraph()->add($this->getProvidedCHO(), 'dc11:type', new Literal($discourseType, null, Config::get('corpusparole.olac_discourse_type')['uri']));
         }
-        // re-add them
 
+        // and re-add them
         foreach($discoursesTypes as $dType) {
-            $this->add('dc11:type', new Literal($dType, null, Config::get('constants.OLAC_DISCOURSE_TYPE')['uri']));
-            $this->currentDelta->getAddedGraph()->add($this, 'dc11:type', new Literal($dType, null, Config::get('constants.OLAC_DISCOURSE_TYPE')['uri']));
+            $this->getProvidedCHO()->add('dc11:type', new Literal($dType, null, Config::get('corpusparole.olac_discourse_type')['uri']));
+            $this->currentDelta->getAddedGraph()->add($this->getProvidedCHO(), 'dc11:type', new Literal($dType, null, Config::get('corpusparole.olac_discourse_type')['uri']));
         }
+
+        $this->clearMemoizationCache();
     }
 
     public function isIsomorphic($doc) {
@@ -127,21 +228,25 @@
         } else {
             $mediaArray = array_map(
                 function($m) {
-                    $f = Utils::process_literal_or_string($m['format']);
-                    return ['url' => $m['url'], 'format' => $f];},
+                    $f = Utils::processLiteralOrString($m['format']);
+                    $res = $m;
+                    $res['format'] = $f;
+                    return $res;},
                 $this->getMediaArray()
             );
 
             $publishers = array_map(
-                function($v) { return Utils::process_literal_or_string($v); },
+                function($v) { return Utils::processLiteralOrString($v); },
                 $this->getPublishers()
             );
 
             return [
                 'id' => $this->getId(),
                 'uri' => $this->getUri(),
-                'title' => $this->getTitle()->getValue(),
+                'title' => $this->getTitleValue(),
+                'modified' => $this->getModifiedValue(),
                 'publishers' => $publishers,
+                'contributors' => $this->getContributors(),
                 'mediaArray'=> $mediaArray
             ];
         }
--- a/server/src/app/Providers/AppServiceProvider.php	Thu Dec 10 17:00:59 2015 +0100
+++ b/server/src/app/Providers/AppServiceProvider.php	Thu Dec 10 17:04:51 2015 +0100
@@ -23,9 +23,9 @@
      */
     public function register()
     {
-        $this->app->bind(
-            'Illuminate\Contracts\Auth\Registrar',
-            'CorpusParole\Services\Registrar'
-        );
+        // $this->app->bind(
+        //     'Illuminate\Contracts\Auth\Registrar',
+        //     'CorpusParole\Services\Registrar'
+        // );
     }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/server/src/app/Providers/GuzzleServiceProvider.php	Thu Dec 10 17:04:51 2015 +0100
@@ -0,0 +1,25 @@
+<?php
+
+namespace CorpusParole\Providers;
+
+use Illuminate\Support\ServiceProvider;
+use GuzzleHttp\Client;
+
+/**
+ * guzzle Service Provider, inspired by https://github.com/urakozz/laravel-guzzle
+ */
+class GuzzleServiceProvider extends ServiceProvider
+{
+    /**
+     * Register the Guzzle provider
+     *
+     * @return GuzzleClient
+     */
+    public function register()
+    {
+        $this->app->bind('guzzle', function() {
+            $config = isset($this->app['config']['guzzle']) ? $this->app['config']['guzzle'] : [];
+            return new Client($config);
+        });
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/server/src/app/Providers/ViafServiceProvider.php	Thu Dec 10 17:04:51 2015 +0100
@@ -0,0 +1,24 @@
+<?php
+
+namespace CorpusParole\Providers;
+
+use Config;
+
+use Illuminate\Support\ServiceProvider;
+
+use CorpusParole\Services\ViafResolver;
+
+class ViafServiceProvider extends ServiceProvider
+{
+    /**
+     * Register the application services.
+     *
+     * @return void
+     */
+    public function register()
+    {
+        $this->app->bind('CorpusParole\Services\ViafResolverInterface', function($app) {
+            return new ViafResolver($app['guzzle']);
+        });
+    }
+}
--- a/server/src/app/Repositories/DocumentRepository.php	Thu Dec 10 17:00:59 2015 +0100
+++ b/server/src/app/Repositories/DocumentRepository.php	Thu Dec 10 17:04:51 2015 +0100
@@ -18,7 +18,7 @@
      * @param  string  $pageName
      * @return \Illuminate\Contracts\Pagination\LengthAwarePaginator
      */
-    public function paginateAll($perPage = 15, $pageName = 'page');
+    public function paginateAll($perPage = 15, $pageName = 'page', $page = null);
 
     public function getCount();
 }
--- a/server/src/app/Repositories/RdfDocumentRepository.php	Thu Dec 10 17:00:59 2015 +0100
+++ b/server/src/app/Repositories/RdfDocumentRepository.php	Thu Dec 10 17:04:51 2015 +0100
@@ -8,12 +8,14 @@
 use CorpusParole\Libraries\CorpusParoleException;
 use CorpusParole\Libraries\Sparql\SparqlClient;
 
+use EasyRdf\Graph;
+
 use Illuminate\Pagination\LengthAwarePaginator;
 use Illuminate\Pagination\Paginator;
 
 /**
  * Implement the DocumentRepository using EasyRdf
- * TODO: cetainly split the transaction management (+add, +delete +transaction ) to an extarnal class -> for this extend the sparql client.
+ * TODO: certainly split the transaction management (+add, +delete +transaction ) to an external class -> for this extend the sparql client.
  */
 class RdfDocumentRepository implements DocumentRepository {
 
@@ -33,7 +35,18 @@
         $data = [];
 
         foreach ($docs as $doc) {
-            array_push($data, new Document($doc->uri->getUri()));
+            $newGraph = new Graph($doc->uri->getUri());
+            $newGraph->add($doc->uri, "rdf:type", $newGraph->resource("http://www.openarchives.org/ore/terms/Aggregation"));
+            $newGraph->add($doc->uri, "http://www.europeana.eu/schemas/edm/aggregatedCHO", $doc->doc);
+            $newGraph->add($doc->doc, "rdf:type", $newGraph->resource("http://www.europeana.eu/schemas/edm/ProvidedCHO"));
+            $newGraph->add($doc->doc, "http://purl.org/dc/elements/1.1/title", $doc->title);
+            if(isset($doc->issued)) {
+                $newGraph->add($doc->doc, "http://purl.org/dc/terms/issued", $doc->issued);
+            }
+            if(isset($doc->modified)) {
+                $newGraph->add($doc->doc, "http://purl.org/dc/terms/modified", $doc->modified);
+            }
+            array_push($data, new Document($doc->uri->getUri(), $newGraph));
         }
 
         return $data;
@@ -41,13 +54,20 @@
 
     public function all() {
 
-        return $this->queryDocs("SELECT DISTINCT ?uri WHERE { GRAPH ?uri { ?s ?p ?o } } ORDER BY ?uri");
-
+        return $this->queryDocs(
+        "SELECT DISTINCT ?uri ?doc ?title ?issued ?modified".
+        "    WHERE {".
+        "        GRAPH ?uri { ?doc a <http://www.europeana.eu/schemas/edm/ProvidedCHO>.".
+        "        ?doc <http://purl.org/dc/elements/1.1/title> ?title.".
+        "        OPTIONAL {?doc <http://purl.org/dc/terms/issued> ?issued.} ".
+        "        OPTIONAL {?doc <http://purl.org/dc/terms/modified> ?modified.} }".
+        "    } ORDER BY ?uri"
+        );
     }
 
     public function get($id) {
 
-        $docUri = Config::get('corpusparole.cocoon_doc_id_base_uri').$id;
+        $docUri = Config::get('corpusparole.corpus_doc_id_base_uri').$id;
 
         // We want the CBD (Concise Bounded Description, cf. http://www.w3.org/Submission/CBD/)
         // WARNING: This seems to work in sesame for our dataset.
@@ -94,7 +114,7 @@
     }
 
     public function getCount() {
-        $res = $this->sparqlClient->query("SELECT (COUNT (DISTINCT ?g) as ?count) WHERE { GRAPH ?g { ?s ?p ?o } }");
+        $res = $this->sparqlClient->query("SELECT (COUNT (DISTINCT ?g) as ?count) WHERE { GRAPH ?g { ?s a <http://www.europeana.eu/schemas/edm/ProvidedCHO> } }");
         assert(!is_null($res) && $res->count()==1);
         return $res[0]->count->getValue();
     }
@@ -108,15 +128,28 @@
      * @param  string  $pageName
      * @return \Illuminate\Contracts\Pagination\LengthAwarePaginator
      */
-    public function paginateAll($perPage = 15, $pageName = 'page')
+    public function paginateAll($perPage = 15, $pageName = 'page', $page = null)
     {
-        $page = Paginator::resolveCurrentPage($pageName);
+        assert(is_numeric($perPage));
+
+        if(is_null($page)) {
+            $page = Paginator::resolveCurrentPage($pageName);
+        }
+
+        assert(is_null($page) || is_numeric($page));
 
         $total = $this->getCount();
 
         $offset = max(0,($page - 1) * $perPage);
 
-        $query = "SELECT DISTINCT ?uri WHERE { GRAPH ?uri { ?s ?p ?o } } ORDER BY ?uri OFFSET $offset LIMIT $perPage";
+        $query =
+            "SELECT DISTINCT ?uri ?doc ?title ?issued ?modified".
+            "    WHERE {".
+            "        GRAPH ?uri { ?doc a <http://www.europeana.eu/schemas/edm/ProvidedCHO>.".
+            "        ?doc <http://purl.org/dc/elements/1.1/title> ?title.".
+            "        OPTIONAL {?doc <http://purl.org/dc/terms/issued> ?issued.} ".
+            "        OPTIONAL {?doc <http://purl.org/dc/terms/modified> ?modified.} }".
+            "    } ORDER BY ?uri OFFSET $offset LIMIT $perPage";
 
         $results = $this->queryDocs($query);
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/server/src/app/Services/ViafResolver.php	Thu Dec 10 17:04:51 2015 +0100
@@ -0,0 +1,114 @@
+<?php
+namespace CorpusParole\Services;
+
+use CorpusParole\Services\ViafResolverInterface;
+
+use Cache;
+use Config;
+use EasyRdf\Graph;
+use GuzzleHttp\Client;
+use GuzzleHttp\Exception\RequestException;
+use GuzzleHttp\Exception\ClientException;
+use GuzzleHttp\Exception\GuzzleException;
+use Illuminate\Contracts\Cache\Repository as CacheRepository;
+
+class ViafResolver implements ViafResolverInterface {
+
+    private $client = null;
+
+    public function __construct(Client $httpClient) {
+        $this->client = $httpClient;
+    }
+
+    /**
+     * make the viaf query.
+     */
+    public function queryName($id) {
+
+        $url = config('corpusparole.viaf_base_url').$id;
+
+        try {
+            $response = $this->client->get($url."/", ['headers'=>['Accept' => 'application/rdf+xml'],]);
+        }
+        catch(ClientException $e) {
+            if($e->getResponse()->getStatusCode() === 404) {
+                return null;
+            } else {
+                throw new ViafResolverException(
+                    $e->getMessage(),
+                    $e->getResponse()->getStatusCode(),
+                    $e
+                );
+            }
+        }
+        catch(RequestException $e) {
+            throw new ViafResolverException(
+                $e->getMessage(),
+                $e->hasResponse()?$e->getResponse()->getStatusCode():500,
+                $e
+            );
+        }
+
+        $graph = new Graph($url, $response->getBody());
+        $names = [];
+        foreach ($graph->allLiterals("<$url>", "schema:name") as $nameLit) {
+            $lang = $nameLit->getLang();
+            if(!$lang && !isset($names[''])) {
+                $names[''] = $nameLit->getvalue();
+            }
+            elseif (strpos($lang, 'fr') === 0 && !isset($names['fr'])) {
+                $names['fr'] = $nameLit->getvalue();
+            }
+            elseif (strpos($lang, 'en') === 0 && !isset($names['en'])) {
+                $names['en'] = $nameLit->getvalue();
+            }
+        }
+
+        return (isset($names['fr'])) ? $names['fr'] : ((isset($names['en'])) ? $names['en'] : ((isset($names['']))? $names[''] : null));
+
+    }
+
+    /**
+     * Check viaf id format
+     */
+    private function checkViafIdFormat($viafid) {
+        return ctype_digit($viafid);
+    }
+
+    /**
+     * Get name from Viaf id
+     * @param string $id The id to resolve. Can be an url starting with http://viaf.org/viaf/
+     * @return a string with the name
+     */
+    public function getName($id) {
+        $viafid = $id;
+        if(strpos($id, config('corpusparole.viaf_base_url')) === 0) {
+            $viafid = substr($id, strlen(config('corpusparole.viaf_base_url')));
+        }
+        $viafid = rtrim($viafid, '/');
+
+        if(!$this->checkViafIdFormat($viafid)) {
+            throw new ViafResolverException("ViafId not in correct format", 400);
+        }
+
+        $that = $this;
+
+        return Cache::remember("viaf:$viafid", config('corpusparole.viaf_cache_expiration'), function() use ($that, $viafid)  {
+
+            return $that->queryName($viafid);
+
+        });
+
+    }
+
+    /**
+     * Get a list of names from an array of viaf ids.
+     * @param array $ids The array of ids to resolve.
+     *                   Each id can be an url starting with http://viaf.org/viaf/
+     */
+    public function getNames(array $ids) {
+        return array_combine($ids, array_map([$this,'getName'], $ids));
+    }
+
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/server/src/app/Services/ViafResolverException.php	Thu Dec 10 17:04:51 2015 +0100
@@ -0,0 +1,6 @@
+<?php
+namespace CorpusParole\Services;
+
+class ViafResolverException extends \Exception {
+    // just extend...
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/server/src/app/Services/ViafResolverInterface.php	Thu Dec 10 17:04:51 2015 +0100
@@ -0,0 +1,20 @@
+<?php
+namespace CorpusParole\Services;
+
+interface ViafResolverInterface {
+
+    /**
+     * Get name from Viaf id
+     * @param string $id The id to resolve. Can be an url starting with http://viaf.org/viaf/
+     * @return a string with the name
+     */
+    public function getName($id);
+
+    /**
+     * Get a list of names from an array of viaf ids.
+     * @param array $ids The array of ids to resolve.
+     *                   Each id can be an url starting with http://viaf.org/viaf/
+     */
+    public function getNames(array $ids);
+
+}
--- a/server/src/composer.json	Thu Dec 10 17:00:59 2015 +0100
+++ b/server/src/composer.json	Thu Dec 10 17:04:51 2015 +0100
@@ -13,7 +13,7 @@
 		"laravelcollective/html": "5.1.*"
 	},
 	"require-dev": {
-		"phpunit/phpunit": "~4.0",
+		"phpunit/phpunit": "~5.0",
 		"phpspec/phpspec": "~2.1",
 		"fabpot/php-cs-fixer": "^1.9",
 		"mockery/mockery": "dev-master"
--- a/server/src/composer.lock	Thu Dec 10 17:00:59 2015 +0100
+++ b/server/src/composer.lock	Thu Dec 10 17:04:51 2015 +0100
@@ -4,7 +4,8 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
         "This file is @generated automatically"
     ],
-    "hash": "43b757168dd323060f8ecedc259686a8",
+    "hash": "814fed9487bfb758c37b3f322650ade6",
+    "content-hash": "80322b0e38b8cc26e4ef4caa3a13894f",
     "packages": [
         {
             "name": "caseyamcl/phpoaipmh",
@@ -281,12 +282,12 @@
             "source": {
                 "type": "git",
                 "url": "https://github.com/njh/easyrdf.git",
-                "reference": "4f7f1e5e726e4abaf1428888cf45796abbc7d70b"
+                "reference": "02864f8996311ff7c6619be70fc1ecf6f3165c48"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/njh/easyrdf/zipball/4f7f1e5e726e4abaf1428888cf45796abbc7d70b",
-                "reference": "4f7f1e5e726e4abaf1428888cf45796abbc7d70b",
+                "url": "https://api.github.com/repos/njh/easyrdf/zipball/02864f8996311ff7c6619be70fc1ecf6f3165c48",
+                "reference": "02864f8996311ff7c6619be70fc1ecf6f3165c48",
                 "shasum": ""
             },
             "require": {
@@ -340,20 +341,20 @@
                 "rdfa",
                 "sparql"
             ],
-            "time": "2015-04-02 06:12:11"
+            "time": "2015-10-07 11:58:54"
         },
         {
             "name": "guzzlehttp/guzzle",
-            "version": "6.0.2",
+            "version": "6.1.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/guzzle/guzzle.git",
-                "reference": "a8dfeff00eb84616a17fea7a4d72af35e750410f"
+                "reference": "66fd14b4d0b8f2389eaf37c5458608c7cb793a81"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/guzzle/guzzle/zipball/a8dfeff00eb84616a17fea7a4d72af35e750410f",
-                "reference": "a8dfeff00eb84616a17fea7a4d72af35e750410f",
+                "url": "https://api.github.com/repos/guzzle/guzzle/zipball/66fd14b4d0b8f2389eaf37c5458608c7cb793a81",
+                "reference": "66fd14b4d0b8f2389eaf37c5458608c7cb793a81",
                 "shasum": ""
             },
             "require": {
@@ -369,7 +370,7 @@
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "6.0-dev"
+                    "dev-master": "6.1-dev"
                 }
             },
             "autoload": {
@@ -402,7 +403,7 @@
                 "rest",
                 "web service"
             ],
-            "time": "2015-07-04 20:09:24"
+            "time": "2015-09-08 17:36:26"
         },
         {
             "name": "guzzlehttp/promises",
@@ -660,16 +661,16 @@
         },
         {
             "name": "laravel/framework",
-            "version": "v5.1.12",
+            "version": "v5.1.19",
             "source": {
                 "type": "git",
                 "url": "https://github.com/laravel/framework.git",
-                "reference": "76a9816f37a58383f6ba093ccf08f253e5488555"
+                "reference": "45e181369991579dc3ad015665eabbb72c0fadba"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/laravel/framework/zipball/76a9816f37a58383f6ba093ccf08f253e5488555",
-                "reference": "76a9816f37a58383f6ba093ccf08f253e5488555",
+                "url": "https://api.github.com/repos/laravel/framework/zipball/45e181369991579dc3ad015665eabbb72c0fadba",
+                "reference": "45e181369991579dc3ad015665eabbb72c0fadba",
                 "shasum": ""
             },
             "require": {
@@ -784,20 +785,20 @@
                 "framework",
                 "laravel"
             ],
-            "time": "2015-08-30 23:25:48"
+            "time": "2015-10-01 18:32:48"
         },
         {
             "name": "laravelcollective/html",
-            "version": "v5.1.5",
+            "version": "v5.1.6",
             "source": {
                 "type": "git",
                 "url": "https://github.com/LaravelCollective/html.git",
-                "reference": "59f124084c9135a6a8d87323e5c5562ab823deb4"
+                "reference": "8b7c357e78b8fb6a2e48377cf2441441aac6dd1e"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/LaravelCollective/html/zipball/59f124084c9135a6a8d87323e5c5562ab823deb4",
-                "reference": "59f124084c9135a6a8d87323e5c5562ab823deb4",
+                "url": "https://api.github.com/repos/LaravelCollective/html/zipball/8b7c357e78b8fb6a2e48377cf2441441aac6dd1e",
+                "reference": "8b7c357e78b8fb6a2e48377cf2441441aac6dd1e",
                 "shasum": ""
             },
             "require": {
@@ -834,25 +835,28 @@
                     "email": "adam@laravelcollective.com"
                 }
             ],
-            "time": "2015-07-28 03:18:41"
+            "time": "2015-09-03 17:16:48"
         },
         {
             "name": "league/flysystem",
-            "version": "1.0.11",
+            "version": "1.0.15",
             "source": {
                 "type": "git",
                 "url": "https://github.com/thephpleague/flysystem.git",
-                "reference": "c16222fdc02467eaa12cb6d6d0e65527741f6040"
+                "reference": "31525caf9e8772683672fefd8a1ca0c0736020f4"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/c16222fdc02467eaa12cb6d6d0e65527741f6040",
-                "reference": "c16222fdc02467eaa12cb6d6d0e65527741f6040",
+                "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/31525caf9e8772683672fefd8a1ca0c0736020f4",
+                "reference": "31525caf9e8772683672fefd8a1ca0c0736020f4",
                 "shasum": ""
             },
             "require": {
                 "php": ">=5.4.0"
             },
+            "conflict": {
+                "league/flysystem-sftp": "<1.0.6"
+            },
             "require-dev": {
                 "ext-fileinfo": "*",
                 "mockery/mockery": "~0.9",
@@ -915,7 +919,7 @@
                 "sftp",
                 "storage"
             ],
-            "time": "2015-07-28 20:41:58"
+            "time": "2015-09-30 22:26:59"
         },
         {
             "name": "ml/iri",
@@ -1182,16 +1186,16 @@
         },
         {
             "name": "nikic/php-parser",
-            "version": "v1.4.0",
+            "version": "v1.4.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/nikic/PHP-Parser.git",
-                "reference": "196f177cfefa0f1f7166c0a05d8255889be12418"
+                "reference": "f78af2c9c86107aa1a34cd1dbb5bbe9eeb0d9f51"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/196f177cfefa0f1f7166c0a05d8255889be12418",
-                "reference": "196f177cfefa0f1f7166c0a05d8255889be12418",
+                "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/f78af2c9c86107aa1a34cd1dbb5bbe9eeb0d9f51",
+                "reference": "f78af2c9c86107aa1a34cd1dbb5bbe9eeb0d9f51",
                 "shasum": ""
             },
             "require": {
@@ -1223,7 +1227,7 @@
                 "parser",
                 "php"
             ],
-            "time": "2015-07-14 17:31:05"
+            "time": "2015-09-19 14:15:08"
         },
         {
             "name": "psr/http-message",
@@ -1439,16 +1443,16 @@
         },
         {
             "name": "symfony/console",
-            "version": "v2.7.3",
+            "version": "v2.7.5",
             "source": {
                 "type": "git",
-                "url": "https://github.com/symfony/Console.git",
-                "reference": "d6cf02fe73634c96677e428f840704bfbcaec29e"
+                "url": "https://github.com/symfony/console.git",
+                "reference": "06cb17c013a82f94a3d840682b49425cd00a2161"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/Console/zipball/d6cf02fe73634c96677e428f840704bfbcaec29e",
-                "reference": "d6cf02fe73634c96677e428f840704bfbcaec29e",
+                "url": "https://api.github.com/repos/symfony/console/zipball/06cb17c013a82f94a3d840682b49425cd00a2161",
+                "reference": "06cb17c013a82f94a3d840682b49425cd00a2161",
                 "shasum": ""
             },
             "require": {
@@ -1492,20 +1496,20 @@
             ],
             "description": "Symfony Console Component",
             "homepage": "https://symfony.com",
-            "time": "2015-07-28 15:18:12"
+            "time": "2015-09-25 08:32:23"
         },
         {
             "name": "symfony/css-selector",
-            "version": "v2.7.3",
+            "version": "v2.7.5",
             "source": {
                 "type": "git",
-                "url": "https://github.com/symfony/CssSelector.git",
-                "reference": "0b5c07b516226b7dd32afbbc82fe547a469c5092"
+                "url": "https://github.com/symfony/css-selector.git",
+                "reference": "abe19cc0429a06be0c133056d1f9859854860970"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/CssSelector/zipball/0b5c07b516226b7dd32afbbc82fe547a469c5092",
-                "reference": "0b5c07b516226b7dd32afbbc82fe547a469c5092",
+                "url": "https://api.github.com/repos/symfony/css-selector/zipball/abe19cc0429a06be0c133056d1f9859854860970",
+                "reference": "abe19cc0429a06be0c133056d1f9859854860970",
                 "shasum": ""
             },
             "require": {
@@ -1545,20 +1549,20 @@
             ],
             "description": "Symfony CssSelector Component",
             "homepage": "https://symfony.com",
-            "time": "2015-05-15 13:33:16"
+            "time": "2015-09-22 13:49:29"
         },
         {
             "name": "symfony/debug",
-            "version": "v2.7.3",
+            "version": "v2.7.5",
             "source": {
                 "type": "git",
-                "url": "https://github.com/symfony/Debug.git",
-                "reference": "9daa1bf9f7e615fa2fba30357e479a90141222e3"
+                "url": "https://github.com/symfony/debug.git",
+                "reference": "c79c361bca8e5ada6a47603875a3c964d03b67b1"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/Debug/zipball/9daa1bf9f7e615fa2fba30357e479a90141222e3",
-                "reference": "9daa1bf9f7e615fa2fba30357e479a90141222e3",
+                "url": "https://api.github.com/repos/symfony/debug/zipball/c79c361bca8e5ada6a47603875a3c964d03b67b1",
+                "reference": "c79c361bca8e5ada6a47603875a3c964d03b67b1",
                 "shasum": ""
             },
             "require": {
@@ -1570,14 +1574,9 @@
             },
             "require-dev": {
                 "symfony/class-loader": "~2.2",
-                "symfony/http-foundation": "~2.1",
                 "symfony/http-kernel": "~2.3.24|~2.5.9|~2.6,>=2.6.2",
                 "symfony/phpunit-bridge": "~2.7"
             },
-            "suggest": {
-                "symfony/http-foundation": "",
-                "symfony/http-kernel": ""
-            },
             "type": "library",
             "extra": {
                 "branch-alias": {
@@ -1605,20 +1604,20 @@
             ],
             "description": "Symfony Debug Component",
             "homepage": "https://symfony.com",
-            "time": "2015-07-09 16:07:40"
+            "time": "2015-09-14 08:41:38"
         },
         {
             "name": "symfony/dom-crawler",
-            "version": "v2.7.3",
+            "version": "v2.7.5",
             "source": {
                 "type": "git",
-                "url": "https://github.com/symfony/DomCrawler.git",
-                "reference": "9dabece63182e95c42b06967a0d929a5df78bc35"
+                "url": "https://github.com/symfony/dom-crawler.git",
+                "reference": "2e185ca136399f902b948694987e62c80099c052"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/DomCrawler/zipball/9dabece63182e95c42b06967a0d929a5df78bc35",
-                "reference": "9dabece63182e95c42b06967a0d929a5df78bc35",
+                "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/2e185ca136399f902b948694987e62c80099c052",
+                "reference": "2e185ca136399f902b948694987e62c80099c052",
                 "shasum": ""
             },
             "require": {
@@ -1658,20 +1657,20 @@
             ],
             "description": "Symfony DomCrawler Component",
             "homepage": "https://symfony.com",
-            "time": "2015-07-09 16:07:40"
+            "time": "2015-09-20 21:13:58"
         },
         {
             "name": "symfony/event-dispatcher",
-            "version": "v2.7.3",
+            "version": "v2.7.5",
             "source": {
                 "type": "git",
-                "url": "https://github.com/symfony/EventDispatcher.git",
-                "reference": "9310b5f9a87ec2ea75d20fec0b0017c77c66dac3"
+                "url": "https://github.com/symfony/event-dispatcher.git",
+                "reference": "ae4dcc2a8d3de98bd794167a3ccda1311597c5d9"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/9310b5f9a87ec2ea75d20fec0b0017c77c66dac3",
-                "reference": "9310b5f9a87ec2ea75d20fec0b0017c77c66dac3",
+                "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/ae4dcc2a8d3de98bd794167a3ccda1311597c5d9",
+                "reference": "ae4dcc2a8d3de98bd794167a3ccda1311597c5d9",
                 "shasum": ""
             },
             "require": {
@@ -1716,20 +1715,20 @@
             ],
             "description": "Symfony EventDispatcher Component",
             "homepage": "https://symfony.com",
-            "time": "2015-06-18 19:21:56"
+            "time": "2015-09-22 13:49:29"
         },
         {
             "name": "symfony/finder",
-            "version": "v2.7.3",
+            "version": "v2.7.5",
             "source": {
                 "type": "git",
-                "url": "https://github.com/symfony/Finder.git",
-                "reference": "ae0f363277485094edc04c9f3cbe595b183b78e4"
+                "url": "https://github.com/symfony/finder.git",
+                "reference": "8262ab605973afbb3ef74b945daabf086f58366f"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/Finder/zipball/ae0f363277485094edc04c9f3cbe595b183b78e4",
-                "reference": "ae0f363277485094edc04c9f3cbe595b183b78e4",
+                "url": "https://api.github.com/repos/symfony/finder/zipball/8262ab605973afbb3ef74b945daabf086f58366f",
+                "reference": "8262ab605973afbb3ef74b945daabf086f58366f",
                 "shasum": ""
             },
             "require": {
@@ -1765,20 +1764,20 @@
             ],
             "description": "Symfony Finder Component",
             "homepage": "https://symfony.com",
-            "time": "2015-07-09 16:07:40"
+            "time": "2015-09-19 19:59:23"
         },
         {
             "name": "symfony/http-foundation",
-            "version": "v2.7.3",
+            "version": "v2.7.5",
             "source": {
                 "type": "git",
-                "url": "https://github.com/symfony/HttpFoundation.git",
-                "reference": "863af6898081b34c65d42100c370b9f3c51b70ca"
+                "url": "https://github.com/symfony/http-foundation.git",
+                "reference": "e1509119f164a0d0a940d7d924d693a7a28a5470"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/HttpFoundation/zipball/863af6898081b34c65d42100c370b9f3c51b70ca",
-                "reference": "863af6898081b34c65d42100c370b9f3c51b70ca",
+                "url": "https://api.github.com/repos/symfony/http-foundation/zipball/e1509119f164a0d0a940d7d924d693a7a28a5470",
+                "reference": "e1509119f164a0d0a940d7d924d693a7a28a5470",
                 "shasum": ""
             },
             "require": {
@@ -1818,20 +1817,20 @@
             ],
             "description": "Symfony HttpFoundation Component",
             "homepage": "https://symfony.com",
-            "time": "2015-07-22 10:11:00"
+            "time": "2015-09-22 13:49:29"
         },
         {
             "name": "symfony/http-kernel",
-            "version": "v2.7.3",
+            "version": "v2.7.5",
             "source": {
                 "type": "git",
-                "url": "https://github.com/symfony/HttpKernel.git",
-                "reference": "405d3e7a59ff7a28ec469441326a0ac79065ea98"
+                "url": "https://github.com/symfony/http-kernel.git",
+                "reference": "353aa457424262d7d4e4289ea483145921cffcb5"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/HttpKernel/zipball/405d3e7a59ff7a28ec469441326a0ac79065ea98",
-                "reference": "405d3e7a59ff7a28ec469441326a0ac79065ea98",
+                "url": "https://api.github.com/repos/symfony/http-kernel/zipball/353aa457424262d7d4e4289ea483145921cffcb5",
+                "reference": "353aa457424262d7d4e4289ea483145921cffcb5",
                 "shasum": ""
             },
             "require": {
@@ -1898,20 +1897,20 @@
             ],
             "description": "Symfony HttpKernel Component",
             "homepage": "https://symfony.com",
-            "time": "2015-07-31 13:24:45"
+            "time": "2015-09-25 11:16:52"
         },
         {
             "name": "symfony/process",
-            "version": "v2.7.3",
+            "version": "v2.7.5",
             "source": {
                 "type": "git",
-                "url": "https://github.com/symfony/Process.git",
-                "reference": "48aeb0e48600321c272955132d7606ab0a49adb3"
+                "url": "https://github.com/symfony/process.git",
+                "reference": "b27c8e317922cd3cdd3600850273cf6b82b2e8e9"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/Process/zipball/48aeb0e48600321c272955132d7606ab0a49adb3",
-                "reference": "48aeb0e48600321c272955132d7606ab0a49adb3",
+                "url": "https://api.github.com/repos/symfony/process/zipball/b27c8e317922cd3cdd3600850273cf6b82b2e8e9",
+                "reference": "b27c8e317922cd3cdd3600850273cf6b82b2e8e9",
                 "shasum": ""
             },
             "require": {
@@ -1947,20 +1946,20 @@
             ],
             "description": "Symfony Process Component",
             "homepage": "https://symfony.com",
-            "time": "2015-07-01 11:25:50"
+            "time": "2015-09-19 19:59:23"
         },
         {
             "name": "symfony/routing",
-            "version": "v2.7.3",
+            "version": "v2.7.5",
             "source": {
                 "type": "git",
-                "url": "https://github.com/symfony/Routing.git",
-                "reference": "ea9134f277162b02e5f80ac058b75a77637b0d26"
+                "url": "https://github.com/symfony/routing.git",
+                "reference": "6c5fae83efa20baf166fcf4582f57094e9f60f16"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/Routing/zipball/ea9134f277162b02e5f80ac058b75a77637b0d26",
-                "reference": "ea9134f277162b02e5f80ac058b75a77637b0d26",
+                "url": "https://api.github.com/repos/symfony/routing/zipball/6c5fae83efa20baf166fcf4582f57094e9f60f16",
+                "reference": "6c5fae83efa20baf166fcf4582f57094e9f60f16",
                 "shasum": ""
             },
             "require": {
@@ -2018,20 +2017,20 @@
                 "uri",
                 "url"
             ],
-            "time": "2015-07-09 16:07:40"
+            "time": "2015-09-14 14:14:09"
         },
         {
             "name": "symfony/translation",
-            "version": "v2.7.3",
+            "version": "v2.7.5",
             "source": {
                 "type": "git",
-                "url": "https://github.com/symfony/Translation.git",
-                "reference": "c8dc34cc936152c609cdd722af317e4239d10dd6"
+                "url": "https://github.com/symfony/translation.git",
+                "reference": "485877661835e188cd78345c6d4eef1290d17571"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/Translation/zipball/c8dc34cc936152c609cdd722af317e4239d10dd6",
-                "reference": "c8dc34cc936152c609cdd722af317e4239d10dd6",
+                "url": "https://api.github.com/repos/symfony/translation/zipball/485877661835e188cd78345c6d4eef1290d17571",
+                "reference": "485877661835e188cd78345c6d4eef1290d17571",
                 "shasum": ""
             },
             "require": {
@@ -2043,7 +2042,7 @@
             "require-dev": {
                 "psr/log": "~1.0",
                 "symfony/config": "~2.7",
-                "symfony/intl": "~2.3",
+                "symfony/intl": "~2.4",
                 "symfony/phpunit-bridge": "~2.7",
                 "symfony/yaml": "~2.2"
             },
@@ -2079,20 +2078,20 @@
             ],
             "description": "Symfony Translation Component",
             "homepage": "https://symfony.com",
-            "time": "2015-07-09 16:07:40"
+            "time": "2015-09-06 08:36:38"
         },
         {
             "name": "symfony/var-dumper",
-            "version": "v2.7.3",
+            "version": "v2.7.5",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/var-dumper.git",
-                "reference": "e8903ebba5eb019f5886ffce739ea9e3b7519579"
+                "reference": "ba8c9a0edf18f70a7efcb8d3eb35323a10263338"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/var-dumper/zipball/e8903ebba5eb019f5886ffce739ea9e3b7519579",
-                "reference": "e8903ebba5eb019f5886ffce739ea9e3b7519579",
+                "url": "https://api.github.com/repos/symfony/var-dumper/zipball/ba8c9a0edf18f70a7efcb8d3eb35323a10263338",
+                "reference": "ba8c9a0edf18f70a7efcb8d3eb35323a10263338",
                 "shasum": ""
             },
             "require": {
@@ -2138,7 +2137,7 @@
                 "debug",
                 "dump"
             ],
-            "time": "2015-07-28 15:18:12"
+            "time": "2015-09-22 14:41:01"
         },
         {
             "name": "vlucas/phpdotenv",
@@ -2347,12 +2346,12 @@
             "source": {
                 "type": "git",
                 "url": "https://github.com/padraic/mockery.git",
-                "reference": "e585573c91b0c821e511afd14666b4503ef7255b"
+                "reference": "bb19cd92e91aee51c344d8bd1a453dc85de47c21"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/padraic/mockery/zipball/e585573c91b0c821e511afd14666b4503ef7255b",
-                "reference": "e585573c91b0c821e511afd14666b4503ef7255b",
+                "url": "https://api.github.com/repos/padraic/mockery/zipball/bb19cd92e91aee51c344d8bd1a453dc85de47c21",
+                "reference": "bb19cd92e91aee51c344d8bd1a453dc85de47c21",
                 "shasum": ""
             },
             "require": {
@@ -2404,7 +2403,49 @@
                 "test double",
                 "testing"
             ],
-            "time": "2015-07-31 13:51:58"
+            "time": "2015-10-02 20:03:43"
+        },
+        {
+            "name": "myclabs/deep-copy",
+            "version": "1.4.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/myclabs/DeepCopy.git",
+                "reference": "d8093b631a31628342d0703764935f8bac2c56b1"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/d8093b631a31628342d0703764935f8bac2c56b1",
+                "reference": "d8093b631a31628342d0703764935f8bac2c56b1",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.4.0"
+            },
+            "require-dev": {
+                "doctrine/collections": "1.*",
+                "phpunit/phpunit": "~4.1"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "DeepCopy\\": "src/DeepCopy/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "description": "Create deep copies (clones) of your objects",
+            "homepage": "https://github.com/myclabs/DeepCopy",
+            "keywords": [
+                "clone",
+                "copy",
+                "duplicate",
+                "object",
+                "object graph"
+            ],
+            "time": "2015-10-05 15:07:09"
         },
         {
             "name": "phpdocumentor/reflection-docblock",
@@ -2491,16 +2532,16 @@
         },
         {
             "name": "phpspec/phpspec",
-            "version": "2.2.1",
+            "version": "2.3.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/phpspec/phpspec.git",
-                "reference": "e9a40577323e67f1de2e214abf32976a0352d8f8"
+                "reference": "36635a903bdeb54899d7407bc95610501fd98559"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/phpspec/phpspec/zipball/e9a40577323e67f1de2e214abf32976a0352d8f8",
-                "reference": "e9a40577323e67f1de2e214abf32976a0352d8f8",
+                "url": "https://api.github.com/repos/phpspec/phpspec/zipball/36635a903bdeb54899d7407bc95610501fd98559",
+                "reference": "36635a903bdeb54899d7407bc95610501fd98559",
                 "shasum": ""
             },
             "require": {
@@ -2512,15 +2553,14 @@
                 "symfony/console": "~2.3",
                 "symfony/event-dispatcher": "~2.1",
                 "symfony/finder": "~2.1",
-                "symfony/process": "~2.1",
+                "symfony/process": "^2.6",
                 "symfony/yaml": "~2.1"
             },
             "require-dev": {
                 "behat/behat": "^3.0.11",
                 "bossa/phpspec2-expect": "~1.0",
                 "phpunit/phpunit": "~4.4",
-                "symfony/filesystem": "~2.1",
-                "symfony/process": "~2.1"
+                "symfony/filesystem": "~2.1"
             },
             "suggest": {
                 "phpspec/nyan-formatters": "~1.0 – Adds Nyan formatters"
@@ -2565,7 +2605,7 @@
                 "testing",
                 "tests"
             ],
-            "time": "2015-05-30 15:21:40"
+            "time": "2015-09-07 07:07:37"
         },
         {
             "name": "phpspec/prophecy",
@@ -2629,20 +2669,20 @@
         },
         {
             "name": "phpunit/php-code-coverage",
-            "version": "2.2.2",
+            "version": "3.0.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/php-code-coverage.git",
-                "reference": "2d7c03c0e4e080901b8f33b2897b0577be18a13c"
+                "reference": "c84f05be256cd7c9d2340b26f7995b4afbf8787b"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/2d7c03c0e4e080901b8f33b2897b0577be18a13c",
-                "reference": "2d7c03c0e4e080901b8f33b2897b0577be18a13c",
+                "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/c84f05be256cd7c9d2340b26f7995b4afbf8787b",
+                "reference": "c84f05be256cd7c9d2340b26f7995b4afbf8787b",
                 "shasum": ""
             },
             "require": {
-                "php": ">=5.3.3",
+                "php": ">=5.6",
                 "phpunit/php-file-iterator": "~1.3",
                 "phpunit/php-text-template": "~1.2",
                 "phpunit/php-token-stream": "~1.3",
@@ -2651,7 +2691,7 @@
             },
             "require-dev": {
                 "ext-xdebug": ">=2.1.4",
-                "phpunit/phpunit": "~4"
+                "phpunit/phpunit": "~5"
             },
             "suggest": {
                 "ext-dom": "*",
@@ -2661,7 +2701,7 @@
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "2.2.x-dev"
+                    "dev-master": "3.0.x-dev"
                 }
             },
             "autoload": {
@@ -2687,7 +2727,7 @@
                 "testing",
                 "xunit"
             ],
-            "time": "2015-08-04 03:42:39"
+            "time": "2015-10-06 15:51:05"
         },
         {
             "name": "phpunit/php-file-iterator",
@@ -2820,16 +2860,16 @@
         },
         {
             "name": "phpunit/php-token-stream",
-            "version": "1.4.6",
+            "version": "1.4.8",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/php-token-stream.git",
-                "reference": "3ab72c62e550370a6cd5dc873e1a04ab57562f5b"
+                "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/3ab72c62e550370a6cd5dc873e1a04ab57562f5b",
-                "reference": "3ab72c62e550370a6cd5dc873e1a04ab57562f5b",
+                "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da",
+                "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da",
                 "shasum": ""
             },
             "require": {
@@ -2865,20 +2905,20 @@
             "keywords": [
                 "tokenizer"
             ],
-            "time": "2015-08-16 08:51:00"
+            "time": "2015-09-15 10:49:45"
         },
         {
             "name": "phpunit/phpunit",
-            "version": "4.8.6",
+            "version": "5.0.4",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/phpunit.git",
-                "reference": "2246830f4a1a551c67933e4171bf2126dc29d357"
+                "reference": "6b3a71e90026801f6bcfd1d72cce4a06685c2637"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/2246830f4a1a551c67933e4171bf2126dc29d357",
-                "reference": "2246830f4a1a551c67933e4171bf2126dc29d357",
+                "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/6b3a71e90026801f6bcfd1d72cce4a06685c2637",
+                "reference": "6b3a71e90026801f6bcfd1d72cce4a06685c2637",
                 "shasum": ""
             },
             "require": {
@@ -2887,18 +2927,20 @@
                 "ext-pcre": "*",
                 "ext-reflection": "*",
                 "ext-spl": "*",
-                "php": ">=5.3.3",
+                "myclabs/deep-copy": "~1.3",
+                "php": ">=5.6",
                 "phpspec/prophecy": "^1.3.1",
-                "phpunit/php-code-coverage": "~2.1",
+                "phpunit/php-code-coverage": "~3.0",
                 "phpunit/php-file-iterator": "~1.4",
                 "phpunit/php-text-template": "~1.2",
                 "phpunit/php-timer": ">=1.0.6",
-                "phpunit/phpunit-mock-objects": "~2.3",
+                "phpunit/phpunit-mock-objects": ">=3.0",
                 "sebastian/comparator": "~1.1",
                 "sebastian/diff": "~1.2",
                 "sebastian/environment": "~1.3",
                 "sebastian/exporter": "~1.2",
                 "sebastian/global-state": "~1.0",
+                "sebastian/resource-operations": "~1.0",
                 "sebastian/version": "~1.0",
                 "symfony/yaml": "~2.1|~3.0"
             },
@@ -2911,7 +2953,7 @@
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "4.8.x-dev"
+                    "dev-master": "5.0.x-dev"
                 }
             },
             "autoload": {
@@ -2937,30 +2979,30 @@
                 "testing",
                 "xunit"
             ],
-            "time": "2015-08-24 04:09:38"
+            "time": "2015-10-07 10:45:35"
         },
         {
             "name": "phpunit/phpunit-mock-objects",
-            "version": "2.3.7",
+            "version": "3.0.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
-                "reference": "5e2645ad49d196e020b85598d7c97e482725786a"
+                "reference": "b66bfd55201aa33e8096d8c9bcb762361521c301"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/5e2645ad49d196e020b85598d7c97e482725786a",
-                "reference": "5e2645ad49d196e020b85598d7c97e482725786a",
+                "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/b66bfd55201aa33e8096d8c9bcb762361521c301",
+                "reference": "b66bfd55201aa33e8096d8c9bcb762361521c301",
                 "shasum": ""
             },
             "require": {
                 "doctrine/instantiator": "^1.0.2",
-                "php": ">=5.3.3",
+                "php": ">=5.6",
                 "phpunit/php-text-template": "~1.2",
                 "sebastian/exporter": "~1.2"
             },
             "require-dev": {
-                "phpunit/phpunit": "~4.4"
+                "phpunit/phpunit": "~5"
             },
             "suggest": {
                 "ext-soap": "*"
@@ -2968,7 +3010,7 @@
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "2.3.x-dev"
+                    "dev-master": "3.0.x-dev"
                 }
             },
             "autoload": {
@@ -2993,7 +3035,7 @@
                 "mock",
                 "xunit"
             ],
-            "time": "2015-08-19 09:14:08"
+            "time": "2015-10-01 06:43:55"
         },
         {
             "name": "sebastian/comparator",
@@ -3332,6 +3374,48 @@
             "time": "2015-06-21 08:04:50"
         },
         {
+            "name": "sebastian/resource-operations",
+            "version": "1.0.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/resource-operations.git",
+                "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52",
+                "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.6.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.0.x-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de"
+                }
+            ],
+            "description": "Provides a list of PHP built-in functions that operate on resources",
+            "homepage": "https://www.github.com/sebastianbergmann/resource-operations",
+            "time": "2015-07-28 20:34:47"
+        },
+        {
             "name": "sebastian/version",
             "version": "1.0.6",
             "source": {
@@ -3368,16 +3452,16 @@
         },
         {
             "name": "symfony/filesystem",
-            "version": "v2.7.3",
+            "version": "v2.7.5",
             "source": {
                 "type": "git",
-                "url": "https://github.com/symfony/Filesystem.git",
-                "reference": "2d7b2ddaf3f548f4292df49a99d19c853d43f0b8"
+                "url": "https://github.com/symfony/filesystem.git",
+                "reference": "a17f8a17c20e8614c15b8e116e2f4bcde102cfab"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/Filesystem/zipball/2d7b2ddaf3f548f4292df49a99d19c853d43f0b8",
-                "reference": "2d7b2ddaf3f548f4292df49a99d19c853d43f0b8",
+                "url": "https://api.github.com/repos/symfony/filesystem/zipball/a17f8a17c20e8614c15b8e116e2f4bcde102cfab",
+                "reference": "a17f8a17c20e8614c15b8e116e2f4bcde102cfab",
                 "shasum": ""
             },
             "require": {
@@ -3413,20 +3497,20 @@
             ],
             "description": "Symfony Filesystem Component",
             "homepage": "https://symfony.com",
-            "time": "2015-07-09 16:07:40"
+            "time": "2015-09-09 17:42:36"
         },
         {
             "name": "symfony/stopwatch",
-            "version": "v2.7.3",
+            "version": "v2.7.5",
             "source": {
                 "type": "git",
-                "url": "https://github.com/symfony/Stopwatch.git",
-                "reference": "b07a866719bbac5294c67773340f97b871733310"
+                "url": "https://github.com/symfony/stopwatch.git",
+                "reference": "08dd97b3f22ab9ee658cd16e6758f8c3c404336e"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/Stopwatch/zipball/b07a866719bbac5294c67773340f97b871733310",
-                "reference": "b07a866719bbac5294c67773340f97b871733310",
+                "url": "https://api.github.com/repos/symfony/stopwatch/zipball/08dd97b3f22ab9ee658cd16e6758f8c3c404336e",
+                "reference": "08dd97b3f22ab9ee658cd16e6758f8c3c404336e",
                 "shasum": ""
             },
             "require": {
@@ -3462,20 +3546,20 @@
             ],
             "description": "Symfony Stopwatch Component",
             "homepage": "https://symfony.com",
-            "time": "2015-07-01 18:23:16"
+            "time": "2015-09-22 13:49:29"
         },
         {
             "name": "symfony/yaml",
-            "version": "v2.7.3",
+            "version": "v2.7.5",
             "source": {
                 "type": "git",
-                "url": "https://github.com/symfony/Yaml.git",
-                "reference": "71340e996171474a53f3d29111d046be4ad8a0ff"
+                "url": "https://github.com/symfony/yaml.git",
+                "reference": "31cb2ad0155c95b88ee55fe12bc7ff92232c1770"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/Yaml/zipball/71340e996171474a53f3d29111d046be4ad8a0ff",
-                "reference": "71340e996171474a53f3d29111d046be4ad8a0ff",
+                "url": "https://api.github.com/repos/symfony/yaml/zipball/31cb2ad0155c95b88ee55fe12bc7ff92232c1770",
+                "reference": "31cb2ad0155c95b88ee55fe12bc7ff92232c1770",
                 "shasum": ""
             },
             "require": {
@@ -3511,7 +3595,7 @@
             ],
             "description": "Symfony Yaml Component",
             "homepage": "https://symfony.com",
-            "time": "2015-07-28 14:07:07"
+            "time": "2015-09-14 14:14:09"
         }
     ],
     "aliases": [],
--- a/server/src/config/app.php	Thu Dec 10 17:00:59 2015 +0100
+++ b/server/src/config/app.php	Thu Dec 10 17:04:51 2015 +0100
@@ -151,6 +151,9 @@
         'CorpusParole\Providers\EventServiceProvider',
         'CorpusParole\Providers\RouteServiceProvider',
         'CorpusParole\Providers\RepositoryServiceProvider',
+        'CorpusParole\Providers\GuzzleServiceProvider',
+        'CorpusParole\Providers\ViafServiceProvider',
+
     ],
 
     /*
--- a/server/src/config/cache.php	Thu Dec 10 17:00:59 2015 +0100
+++ b/server/src/config/cache.php	Thu Dec 10 17:04:51 2015 +0100
@@ -74,6 +74,6 @@
     |
     */
 
-    'prefix' => 'laravel',
+    'prefix' => 'corpus',
 
 ];
--- a/server/src/config/constants.php	Thu Dec 10 17:00:59 2015 +0100
+++ b/server/src/config/constants.php	Thu Dec 10 17:04:51 2015 +0100
@@ -4,59 +4,4 @@
 
     'VERSION' => [0,0,0,'alpha',1],
 
-    'OLAC_DISCOURSE_TYPE' => [
-        'uri' => 'http://www.language-archives.org/OLAC/1.1/discourse-type',
-        'values' => [
-            [
-                'code' => 'dialogue',
-                'name' => 'Dialogue',
-            ],
-
-            [
-                'code' => 'drama',
-                'name' => 'Drama',
-            ],
-
-            [
-                'code' => 'formulaic',
-                'name' => 'Formulaic Discourse',
-            ],
-
-            [
-                'code' => 'ludic',
-                'name' => 'Ludic Discourse',
-            ],
-            [
-                'code' => 'oratory',
-                'name' => 'Oratory',
-            ],
-
-            [
-                'code' => 'narrative',
-                'name' => 'Narrative Discourse',
-            ],
-
-            [
-                'code' => 'procedural',
-                'name' => 'Procedural Discourse',
-            ],
-
-            [
-                'code' => 'report',
-                'name' => 'Report',
-            ],
-
-            [
-                'code' => 'singing',
-                'name' => 'Singing',
-            ],
-
-            [
-                'code' => 'unintelligible_speech',
-                'name' => 'Unintelligible Speech',
-            ]
-        ]
-
-    ]
-
 ];
--- a/server/src/config/corpusparole.php	Thu Dec 10 17:00:59 2015 +0100
+++ b/server/src/config/corpusparole.php	Thu Dec 10 17:04:51 2015 +0100
@@ -5,14 +5,81 @@
 return [
     'sesame_base_url' => $sesameBaseUrl,
     'sesame_repository' => env('CORPUSPAROLE_SESAME_REPOSITORY'),
+    'sesame_repository_raw' => env('CORPUSPAROLE_SESAME_REPOSITORY_RAW'),
     'max_load_retry' => env('CORPUSPAROLE_MAX_LOAD_RETRY', 5),
     'sesame_query_url' => $sesameBaseUrl.'repositories/'.env('CORPUSPAROLE_SESAME_REPOSITORY'),
     'sesame_update_url' => $sesameBaseUrl.'repositories/'.env('CORPUSPAROLE_SESAME_REPOSITORY').'/statements',
+    'sesame_query_url_raw' => $sesameBaseUrl.'repositories/'.env('CORPUSPAROLE_SESAME_REPOSITORY_RAW'),
+    'sesame_update_url_raw' => $sesameBaseUrl.'repositories/'.env('CORPUSPAROLE_SESAME_REPOSITORY_RAW').'/statements',
+
 
     'cocoon_rdf_base_uri' => env('CORPUSPAROLE_COCOON_RDF_BASE_URI'),
     'cocoon_oaipmh_url' => env('CORPUSPAROLE_COCOON_OAIPMH_URL'),
-    'cocoon_doc_id_base_uri' => env('CORPUSPAROLE_COCOON_DOC_ID_BASE_URI'),
+    'cocoon_doc_id_base_uri' => 'http://purl.org/poi/crdo.vjf.cnrs.fr/',
+    'cocoon_doc_pub_base_uri' => 'http://cocoon.huma-num.fr/exist/crdo/meta/',
     'cocoon_doc_id_base' => 'oai:crdo.vjf.cnrs.fr:',
 
-    'easyrdf_http_client_timeout' => env('EASYRDF_HTTP_CLIENT_TIMEOUT', 10),
+    'corpus_doc_id_base_uri' => 'http://purl.org/poi/corpusdelaparole.huma-num.fr/',
+    'corpus_doc_default_cc_rights' => 'http://creativecommons.org/licenses/by-nc/4.0/',
+
+    'edm_provider' => 'Corpus de la Parole',
+
+    'easyrdf_http_client_timeout' => env('EASYRDF_HTTP_CLIENT_TIMEOUT', 1000),
+
+    'olac_discourse_type' => [
+        'uri' => 'http://www.language-archives.org/OLAC/1.1/discourse-type',
+        'values' => [
+            [
+                'code' => 'dialogue',
+                'name' => 'Dialogue',
+            ],
+
+            [
+                'code' => 'drama',
+                'name' => 'Drama',
+            ],
+
+            [
+                'code' => 'formulaic',
+                'name' => 'Formulaic Discourse',
+            ],
+
+            [
+                'code' => 'ludic',
+                'name' => 'Ludic Discourse',
+            ],
+            [
+                'code' => 'oratory',
+                'name' => 'Oratory',
+            ],
+
+            [
+                'code' => 'narrative',
+                'name' => 'Narrative Discourse',
+            ],
+
+            [
+                'code' => 'procedural',
+                'name' => 'Procedural Discourse',
+            ],
+
+            [
+                'code' => 'report',
+                'name' => 'Report',
+            ],
+
+            [
+                'code' => 'singing',
+                'name' => 'Singing',
+            ],
+
+            [
+                'code' => 'unintelligible_speech',
+                'name' => 'Unintelligible Speech',
+            ]
+        ]
+    ],
+
+    'viaf_base_url' => 'http://viaf.org/viaf/',
+    'viaf_cache_expiration' => 60*24*30
 ];
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/server/src/database/migrations/2015_11_16_182634_create_cocoon_documents_table.php	Thu Dec 10 17:04:51 2015 +0100
@@ -0,0 +1,32 @@
+<?php
+
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class CreateCocoonDocumentsTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::create('cocoon_documents', function (Blueprint $table) {
+            $table->increments('id');
+            $table->string('uri')->unique();
+            $table->string('title', 2048);
+            $table->timestamps();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::drop('cocoon_documents');
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/server/src/database/migrations/2015_11_16_183307_create_cocoon_revisions_table.php	Thu Dec 10 17:04:51 2015 +0100
@@ -0,0 +1,31 @@
+<?php
+
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class CreateCocoonRevisionsTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::create('cocoon_revisions', function (Blueprint $table) {
+            $table->increments('id');
+            $table->timestamps();
+            $table->integer('document_id');
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::drop('cocoon_revisions');
+    }
+}
--- a/server/src/gulpfile.js	Thu Dec 10 17:00:59 2015 +0100
+++ b/server/src/gulpfile.js	Thu Dec 10 17:04:51 2015 +0100
@@ -1,5 +1,8 @@
-var elixir = require('laravel-elixir');
+var gulp = require('gulp'),
+    elixir = require('laravel-elixir');
 
+
+var exec = require('child_process').execSync;
 /*
  |--------------------------------------------------------------------------
  | Elixir Asset Management
@@ -16,11 +19,27 @@
  'bootstrap': './vendor/bower_components/bootstrap-sass/assets/'
  };
 
+gulp.task('build-ember', function(cb) {
+    exec('node_modules/.bin/ember build -prod', {
+        cwd: '../bo_client',
+        stdio:[0,1,2]
+    });
+});
+
+
+gulp.task('copy-bo-ember', function() {
+    gulp.src('../bo_client/dist/assets/*.js')
+        .pipe(gulp.dest('public/js/vendor/'));
+    gulp.src('../bo_client/dist/assets/*.css')
+        .pipe(gulp.dest('public/css/vendor/'));
+});
 
 elixir(function(mix) {
     mix.sass('app.scss', 'public/css/app.css', {includePaths: [paths['bootstrap']+'stylesheets/']})
         .copy(paths.bootstrap + 'fonts/bootstrap', 'public/fonts')
         .copy(paths.bootstrap + 'javascripts/bootstrap.js', 'public/js/vendor/bootstrap.js')
         .copy(paths.bower_base_path + 'jquery/dist/jquery.min.js', 'public/js/vendor/jquery.js')
-        .copy(paths.bower_base_path + 'font-awesome/css/font-awesome.min.css', 'public/css/vendor/font-awesome.css');
+        .copy(paths.bower_base_path + 'font-awesome/css/font-awesome.min.css', 'public/css/vendor/font-awesome.css')
+        .task('build-ember')
+        .task('copy-bo-ember');
 });
--- a/server/src/package.json	Thu Dec 10 17:00:59 2015 +0100
+++ b/server/src/package.json	Thu Dec 10 17:04:51 2015 +0100
@@ -3,6 +3,7 @@
   "devDependencies": {
     "bower": "^1.5.3",
     "gulp": "^3.8.8",
+    "gulp-exec": "^2.1.2",
     "laravel-elixir": "*"
   }
 }
--- a/server/src/public/css/app.css	Thu Dec 10 17:00:59 2015 +0100
+++ b/server/src/public/css/app.css	Thu Dec 10 17:04:51 2015 +0100
@@ -1,3 +1,4 @@
+@charset "UTF-8";
 /*!
  * Bootstrap v3.3.5 (http://getbootstrap.com)
  * Copyright 2011-2015 Twitter, Inc.
@@ -123,7 +124,8 @@
   text-transform: none; }
 
 button,
-html input[type="button"], input[type="reset"],
+html input[type="button"],
+input[type="reset"],
 input[type="submit"] {
   -webkit-appearance: button;
   cursor: pointer; }
@@ -1066,8 +1068,7 @@
 a {
   color: #337ab7;
   text-decoration: none; }
-  a:hover,
-  a:focus {
+  a:hover, a:focus {
     color: #23527c;
     text-decoration: underline; }
   a:focus {
@@ -1119,8 +1120,7 @@
   clip: rect(0, 0, 0, 0);
   border: 0; }
 
-.sr-only-focusable:active,
-.sr-only-focusable:focus {
+.sr-only-focusable:active, .sr-only-focusable:focus {
   position: static;
   width: auto;
   height: auto;
@@ -1132,7 +1132,7 @@
   cursor: pointer; }
 
 h1, h2, h3, h4, h5, h6,
-.h1, .h2, .h3, .h4, .h5, .h6 {
+.h1, .h2, .h3, .doc_details_title, .h4, .content-main-title, .data-audio-title, .h5, .content-title, .h6 {
   font-family: inherit;
   font-weight: 500;
   line-height: 1.1;
@@ -1146,10 +1146,10 @@
   h6 .small,
   .h1 small,
   .h1 .small, .h2 small,
-  .h2 .small, .h3 small,
-  .h3 .small, .h4 small,
-  .h4 .small, .h5 small,
-  .h5 .small, .h6 small,
+  .h2 .small, .h3 small, .doc_details_title small,
+  .h3 .small, .doc_details_title .small, .h4 small, .content-main-title small, .data-audio-title small,
+  .h4 .small, .content-main-title .small, .data-audio-title .small, .h5 small, .content-title small,
+  .h5 .small, .content-title .small, .h6 small,
   .h6 .small {
     font-weight: normal;
     line-height: 1;
@@ -1157,7 +1157,7 @@
 
 h1, .h1,
 h2, .h2,
-h3, .h3 {
+h3, .h3, .doc_details_title {
   margin-top: 20px;
   margin-bottom: 10px; }
   h1 small,
@@ -1167,21 +1167,21 @@
   h2 .small, .h2 small,
   .h2 .small,
   h3 small,
-  h3 .small, .h3 small,
-  .h3 .small {
+  h3 .small, .h3 small, .doc_details_title small,
+  .h3 .small, .doc_details_title .small {
     font-size: 65%; }
 
-h4, .h4,
-h5, .h5,
+h4, .h4, .content-main-title, .data-audio-title,
+h5, .h5, .content-title,
 h6, .h6 {
   margin-top: 10px;
   margin-bottom: 10px; }
   h4 small,
-  h4 .small, .h4 small,
-  .h4 .small,
+  h4 .small, .h4 small, .content-main-title small, .data-audio-title small,
+  .h4 .small, .content-main-title .small, .data-audio-title .small,
   h5 small,
-  h5 .small, .h5 small,
-  .h5 .small,
+  h5 .small, .h5 small, .content-title small,
+  .h5 .small, .content-title .small,
   h6 small,
   h6 .small, .h6 small,
   .h6 .small {
@@ -1193,13 +1193,13 @@
 h2, .h2 {
   font-size: 30px; }
 
-h3, .h3 {
+h3, .h3, .doc_details_title {
   font-size: 24px; }
 
-h4, .h4 {
+h4, .h4, .content-main-title, .data-audio-title {
   font-size: 18px; }
 
-h5, .h5 {
+h5, .h5, .content-title {
   font-size: 14px; }
 
 h6, .h6 {
@@ -1368,8 +1368,7 @@
 dd {
   margin-left: 0; }
 
-.dl-horizontal dd:before,
-.dl-horizontal dd:after {
+.dl-horizontal dd:before, .dl-horizontal dd:after {
   content: " ";
   display: table; }
 
@@ -1499,8 +1498,7 @@
   margin-left: auto;
   padding-left: 15px;
   padding-right: 15px; }
-  .container:before,
-  .container:after {
+  .container:before, .container:after {
     content: " ";
     display: table; }
   .container:after {
@@ -1520,8 +1518,7 @@
   margin-left: auto;
   padding-left: 15px;
   padding-right: 15px; }
-  .container-fluid:before,
-  .container-fluid:after {
+  .container-fluid:before, .container-fluid:after {
     content: " ";
     display: table; }
   .container-fluid:after {
@@ -1530,8 +1527,7 @@
 .row {
   margin-left: -15px;
   margin-right: -15px; }
-  .row:before,
-  .row:after {
+  .row:before, .row:after {
     content: " ";
     display: table; }
   .row:after {
@@ -2324,8 +2320,7 @@
     color: #999; }
   .form-control::-webkit-input-placeholder {
     color: #999; }
-  .form-control[disabled],
-  .form-control[readonly],
+  .form-control[disabled], .form-control[readonly],
   fieldset[disabled] .form-control {
     background-color: #eeeeee;
     opacity: 1; }
@@ -2345,8 +2340,7 @@
   input[type="datetime-local"].form-control,
   input[type="month"].form-control {
     line-height: 34px; }
-  input[type="date"].input-sm,
-  .input-group-sm > input[type="date"].form-control,
+  input[type="date"].input-sm, .input-group-sm > input[type="date"].form-control,
   .input-group-sm > input[type="date"].input-group-addon,
   .input-group-sm > .input-group-btn > input[type="date"].btn,
   .input-group-sm input[type="date"],
@@ -2354,20 +2348,22 @@
   .input-group-sm > input[type="time"].form-control,
   .input-group-sm > input[type="time"].input-group-addon,
   .input-group-sm > .input-group-btn > input[type="time"].btn,
-  .input-group-sm input[type="time"],
+  .input-group-sm
+  input[type="time"],
   input[type="datetime-local"].input-sm,
   .input-group-sm > input[type="datetime-local"].form-control,
   .input-group-sm > input[type="datetime-local"].input-group-addon,
   .input-group-sm > .input-group-btn > input[type="datetime-local"].btn,
-  .input-group-sm input[type="datetime-local"],
+  .input-group-sm
+  input[type="datetime-local"],
   input[type="month"].input-sm,
   .input-group-sm > input[type="month"].form-control,
   .input-group-sm > input[type="month"].input-group-addon,
   .input-group-sm > .input-group-btn > input[type="month"].btn,
-  .input-group-sm input[type="month"] {
+  .input-group-sm
+  input[type="month"] {
     line-height: 30px; }
-  input[type="date"].input-lg,
-  .input-group-lg > input[type="date"].form-control,
+  input[type="date"].input-lg, .input-group-lg > input[type="date"].form-control,
   .input-group-lg > input[type="date"].input-group-addon,
   .input-group-lg > .input-group-btn > input[type="date"].btn,
   .input-group-lg input[type="date"],
@@ -2375,17 +2371,20 @@
   .input-group-lg > input[type="time"].form-control,
   .input-group-lg > input[type="time"].input-group-addon,
   .input-group-lg > .input-group-btn > input[type="time"].btn,
-  .input-group-lg input[type="time"],
+  .input-group-lg
+  input[type="time"],
   input[type="datetime-local"].input-lg,
   .input-group-lg > input[type="datetime-local"].form-control,
   .input-group-lg > input[type="datetime-local"].input-group-addon,
   .input-group-lg > .input-group-btn > input[type="datetime-local"].btn,
-  .input-group-lg input[type="datetime-local"],
+  .input-group-lg
+  input[type="datetime-local"],
   input[type="month"].input-lg,
   .input-group-lg > input[type="month"].form-control,
   .input-group-lg > input[type="month"].input-group-addon,
   .input-group-lg > .input-group-btn > input[type="month"].btn,
-  .input-group-lg input[type="month"] {
+  .input-group-lg
+  input[type="month"] {
     line-height: 46px; } }
 
 .form-group {
@@ -2432,24 +2431,26 @@
   margin-top: 0;
   margin-left: 10px; }
 
-input[type="radio"][disabled],
-input[type="radio"].disabled,
+input[type="radio"][disabled], input[type="radio"].disabled,
 fieldset[disabled] input[type="radio"],
 input[type="checkbox"][disabled],
 input[type="checkbox"].disabled,
-fieldset[disabled] input[type="checkbox"] {
+fieldset[disabled]
+input[type="checkbox"] {
   cursor: not-allowed; }
 
 .radio-inline.disabled,
 fieldset[disabled] .radio-inline,
 .checkbox-inline.disabled,
-fieldset[disabled] .checkbox-inline {
+fieldset[disabled]
+.checkbox-inline {
   cursor: not-allowed; }
 
 .radio.disabled label,
 fieldset[disabled] .radio label,
 .checkbox.disabled label,
-fieldset[disabled] .checkbox label {
+fieldset[disabled]
+.checkbox label {
   cursor: not-allowed; }
 
 .form-control-static {
@@ -2457,11 +2458,9 @@
   padding-bottom: 7px;
   margin-bottom: 0;
   min-height: 34px; }
-  .form-control-static.input-lg,
-  .input-group-lg > .form-control-static.form-control,
+  .form-control-static.input-lg, .input-group-lg > .form-control-static.form-control,
   .input-group-lg > .form-control-static.input-group-addon,
-  .input-group-lg > .input-group-btn > .form-control-static.btn,
-  .form-control-static.input-sm, .input-group-sm > .form-control-static.form-control,
+  .input-group-lg > .input-group-btn > .form-control-static.btn, .form-control-static.input-sm, .input-group-sm > .form-control-static.form-control,
   .input-group-sm > .form-control-static.input-group-addon,
   .input-group-sm > .input-group-btn > .form-control-static.btn {
     padding-left: 0;
@@ -2482,11 +2481,11 @@
   height: 30px;
   line-height: 30px; }
 
-textarea.input-sm,
-.input-group-sm > textarea.form-control,
+textarea.input-sm, .input-group-sm > textarea.form-control,
 .input-group-sm > textarea.input-group-addon,
 .input-group-sm > .input-group-btn > textarea.btn,
-select[multiple].input-sm, .input-group-sm > select[multiple].form-control,
+select[multiple].input-sm,
+.input-group-sm > select[multiple].form-control,
 .input-group-sm > select[multiple].input-group-addon,
 .input-group-sm > .input-group-btn > select[multiple].btn {
   height: auto; }
@@ -2528,11 +2527,11 @@
   height: 46px;
   line-height: 46px; }
 
-textarea.input-lg,
-.input-group-lg > textarea.form-control,
+textarea.input-lg, .input-group-lg > textarea.form-control,
 .input-group-lg > textarea.input-group-addon,
 .input-group-lg > .input-group-btn > textarea.btn,
-select[multiple].input-lg, .input-group-lg > select[multiple].form-control,
+select[multiple].input-lg,
+.input-group-lg > select[multiple].form-control,
 .input-group-lg > select[multiple].input-group-addon,
 .input-group-lg > .input-group-btn > select[multiple].btn {
   height: auto; }
@@ -2576,8 +2575,7 @@
   text-align: center;
   pointer-events: none; }
 
-.input-lg + .form-control-feedback,
-.input-group-lg > .form-control + .form-control-feedback,
+.input-lg + .form-control-feedback, .input-group-lg > .form-control + .form-control-feedback,
 .input-group-lg > .input-group-addon + .form-control-feedback,
 .input-group-lg > .input-group-btn > .btn + .form-control-feedback,
 .input-group-lg + .form-control-feedback,
@@ -2586,8 +2584,7 @@
   height: 46px;
   line-height: 46px; }
 
-.input-sm + .form-control-feedback,
-.input-group-sm > .form-control + .form-control-feedback,
+.input-sm + .form-control-feedback, .input-group-sm > .form-control + .form-control-feedback,
 .input-group-sm > .input-group-addon + .form-control-feedback,
 .input-group-sm > .input-group-btn > .btn + .form-control-feedback,
 .input-group-sm + .form-control-feedback,
@@ -2743,8 +2740,7 @@
 .form-horizontal .form-group {
   margin-left: -15px;
   margin-right: -15px; }
-  .form-horizontal .form-group:before,
-  .form-horizontal .form-group:after {
+  .form-horizontal .form-group:before, .form-horizontal .form-group:after {
     content: " ";
     display: table; }
   .form-horizontal .form-group:after {
@@ -2789,27 +2785,18 @@
   -moz-user-select: none;
   -ms-user-select: none;
   user-select: none; }
-  .btn:focus,
-  .btn.focus,
-  .btn:active:focus,
-  .btn:active.focus,
-  .btn.active:focus,
-  .btn.active.focus {
+  .btn:focus, .btn.focus, .btn:active:focus, .btn:active.focus, .btn.active:focus, .btn.active.focus {
     outline: thin dotted;
     outline: 5px auto -webkit-focus-ring-color;
     outline-offset: -2px; }
-  .btn:hover,
-  .btn:focus,
-  .btn.focus {
+  .btn:hover, .btn:focus, .btn.focus {
     color: #333;
     text-decoration: none; }
-  .btn:active,
-  .btn.active {
+  .btn:active, .btn.active {
     outline: 0;
     background-image: none;
     box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); }
-  .btn.disabled,
-  .btn[disabled],
+  .btn.disabled, .btn[disabled],
   fieldset[disabled] .btn {
     cursor: not-allowed;
     opacity: 0.65;
@@ -2824,8 +2811,7 @@
   color: #333;
   background-color: #fff;
   border-color: #ccc; }
-  .btn-default:focus,
-  .btn-default.focus {
+  .btn-default:focus, .btn-default.focus {
     color: #333;
     background-color: #e6e6e6;
     border-color: #8c8c8c; }
@@ -2833,40 +2819,22 @@
     color: #333;
     background-color: #e6e6e6;
     border-color: #adadad; }
-  .btn-default:active,
-  .btn-default.active,
+  .btn-default:active, .btn-default.active,
   .open > .btn-default.dropdown-toggle {
     color: #333;
     background-color: #e6e6e6;
     border-color: #adadad; }
-    .btn-default:active:hover,
-    .btn-default:active:focus,
-    .btn-default:active.focus,
-    .btn-default.active:hover,
-    .btn-default.active:focus,
-    .btn-default.active.focus,
+    .btn-default:active:hover, .btn-default:active:focus, .btn-default:active.focus, .btn-default.active:hover, .btn-default.active:focus, .btn-default.active.focus,
     .open > .btn-default.dropdown-toggle:hover,
     .open > .btn-default.dropdown-toggle:focus,
     .open > .btn-default.dropdown-toggle.focus {
       color: #333;
       background-color: #d4d4d4;
       border-color: #8c8c8c; }
-  .btn-default:active,
-  .btn-default.active,
+  .btn-default:active, .btn-default.active,
   .open > .btn-default.dropdown-toggle {
     background-image: none; }
-  .btn-default.disabled,
-  .btn-default.disabled:hover,
-  .btn-default.disabled:focus,
-  .btn-default.disabled.focus,
-  .btn-default.disabled:active,
-  .btn-default.disabled.active,
-  .btn-default[disabled],
-  .btn-default[disabled]:hover,
-  .btn-default[disabled]:focus,
-  .btn-default[disabled].focus,
-  .btn-default[disabled]:active,
-  .btn-default[disabled].active,
+  .btn-default.disabled, .btn-default.disabled:hover, .btn-default.disabled:focus, .btn-default.disabled.focus, .btn-default.disabled:active, .btn-default.disabled.active, .btn-default[disabled], .btn-default[disabled]:hover, .btn-default[disabled]:focus, .btn-default[disabled].focus, .btn-default[disabled]:active, .btn-default[disabled].active,
   fieldset[disabled] .btn-default,
   fieldset[disabled] .btn-default:hover,
   fieldset[disabled] .btn-default:focus,
@@ -2883,8 +2851,7 @@
   color: #fff;
   background-color: #337ab7;
   border-color: #2e6da4; }
-  .btn-primary:focus,
-  .btn-primary.focus {
+  .btn-primary:focus, .btn-primary.focus {
     color: #fff;
     background-color: #286090;
     border-color: #122b40; }
@@ -2892,40 +2859,22 @@
     color: #fff;
     background-color: #286090;
     border-color: #204d74; }
-  .btn-primary:active,
-  .btn-primary.active,
+  .btn-primary:active, .btn-primary.active,
   .open > .btn-primary.dropdown-toggle {
     color: #fff;
     background-color: #286090;
     border-color: #204d74; }
-    .btn-primary:active:hover,
-    .btn-primary:active:focus,
-    .btn-primary:active.focus,
-    .btn-primary.active:hover,
-    .btn-primary.active:focus,
-    .btn-primary.active.focus,
+    .btn-primary:active:hover, .btn-primary:active:focus, .btn-primary:active.focus, .btn-primary.active:hover, .btn-primary.active:focus, .btn-primary.active.focus,
     .open > .btn-primary.dropdown-toggle:hover,
     .open > .btn-primary.dropdown-toggle:focus,
     .open > .btn-primary.dropdown-toggle.focus {
       color: #fff;
       background-color: #204d74;
       border-color: #122b40; }
-  .btn-primary:active,
-  .btn-primary.active,
+  .btn-primary:active, .btn-primary.active,
   .open > .btn-primary.dropdown-toggle {
     background-image: none; }
-  .btn-primary.disabled,
-  .btn-primary.disabled:hover,
-  .btn-primary.disabled:focus,
-  .btn-primary.disabled.focus,
-  .btn-primary.disabled:active,
-  .btn-primary.disabled.active,
-  .btn-primary[disabled],
-  .btn-primary[disabled]:hover,
-  .btn-primary[disabled]:focus,
-  .btn-primary[disabled].focus,
-  .btn-primary[disabled]:active,
-  .btn-primary[disabled].active,
+  .btn-primary.disabled, .btn-primary.disabled:hover, .btn-primary.disabled:focus, .btn-primary.disabled.focus, .btn-primary.disabled:active, .btn-primary.disabled.active, .btn-primary[disabled], .btn-primary[disabled]:hover, .btn-primary[disabled]:focus, .btn-primary[disabled].focus, .btn-primary[disabled]:active, .btn-primary[disabled].active,
   fieldset[disabled] .btn-primary,
   fieldset[disabled] .btn-primary:hover,
   fieldset[disabled] .btn-primary:focus,
@@ -2942,8 +2891,7 @@
   color: #fff;
   background-color: #5cb85c;
   border-color: #4cae4c; }
-  .btn-success:focus,
-  .btn-success.focus {
+  .btn-success:focus, .btn-success.focus {
     color: #fff;
     background-color: #449d44;
     border-color: #255625; }
@@ -2951,40 +2899,22 @@
     color: #fff;
     background-color: #449d44;
     border-color: #398439; }
-  .btn-success:active,
-  .btn-success.active,
+  .btn-success:active, .btn-success.active,
   .open > .btn-success.dropdown-toggle {
     color: #fff;
     background-color: #449d44;
     border-color: #398439; }
-    .btn-success:active:hover,
-    .btn-success:active:focus,
-    .btn-success:active.focus,
-    .btn-success.active:hover,
-    .btn-success.active:focus,
-    .btn-success.active.focus,
+    .btn-success:active:hover, .btn-success:active:focus, .btn-success:active.focus, .btn-success.active:hover, .btn-success.active:focus, .btn-success.active.focus,
     .open > .btn-success.dropdown-toggle:hover,
     .open > .btn-success.dropdown-toggle:focus,
     .open > .btn-success.dropdown-toggle.focus {
       color: #fff;
       background-color: #398439;
       border-color: #255625; }
-  .btn-success:active,
-  .btn-success.active,
+  .btn-success:active, .btn-success.active,
   .open > .btn-success.dropdown-toggle {
     background-image: none; }
-  .btn-success.disabled,
-  .btn-success.disabled:hover,
-  .btn-success.disabled:focus,
-  .btn-success.disabled.focus,
-  .btn-success.disabled:active,
-  .btn-success.disabled.active,
-  .btn-success[disabled],
-  .btn-success[disabled]:hover,
-  .btn-success[disabled]:focus,
-  .btn-success[disabled].focus,
-  .btn-success[disabled]:active,
-  .btn-success[disabled].active,
+  .btn-success.disabled, .btn-success.disabled:hover, .btn-success.disabled:focus, .btn-success.disabled.focus, .btn-success.disabled:active, .btn-success.disabled.active, .btn-success[disabled], .btn-success[disabled]:hover, .btn-success[disabled]:focus, .btn-success[disabled].focus, .btn-success[disabled]:active, .btn-success[disabled].active,
   fieldset[disabled] .btn-success,
   fieldset[disabled] .btn-success:hover,
   fieldset[disabled] .btn-success:focus,
@@ -3001,8 +2931,7 @@
   color: #fff;
   background-color: #5bc0de;
   border-color: #46b8da; }
-  .btn-info:focus,
-  .btn-info.focus {
+  .btn-info:focus, .btn-info.focus {
     color: #fff;
     background-color: #31b0d5;
     border-color: #1b6d85; }
@@ -3010,40 +2939,22 @@
     color: #fff;
     background-color: #31b0d5;
     border-color: #269abc; }
-  .btn-info:active,
-  .btn-info.active,
+  .btn-info:active, .btn-info.active,
   .open > .btn-info.dropdown-toggle {
     color: #fff;
     background-color: #31b0d5;
     border-color: #269abc; }
-    .btn-info:active:hover,
-    .btn-info:active:focus,
-    .btn-info:active.focus,
-    .btn-info.active:hover,
-    .btn-info.active:focus,
-    .btn-info.active.focus,
+    .btn-info:active:hover, .btn-info:active:focus, .btn-info:active.focus, .btn-info.active:hover, .btn-info.active:focus, .btn-info.active.focus,
     .open > .btn-info.dropdown-toggle:hover,
     .open > .btn-info.dropdown-toggle:focus,
     .open > .btn-info.dropdown-toggle.focus {
       color: #fff;
       background-color: #269abc;
       border-color: #1b6d85; }
-  .btn-info:active,
-  .btn-info.active,
+  .btn-info:active, .btn-info.active,
   .open > .btn-info.dropdown-toggle {
     background-image: none; }
-  .btn-info.disabled,
-  .btn-info.disabled:hover,
-  .btn-info.disabled:focus,
-  .btn-info.disabled.focus,
-  .btn-info.disabled:active,
-  .btn-info.disabled.active,
-  .btn-info[disabled],
-  .btn-info[disabled]:hover,
-  .btn-info[disabled]:focus,
-  .btn-info[disabled].focus,
-  .btn-info[disabled]:active,
-  .btn-info[disabled].active,
+  .btn-info.disabled, .btn-info.disabled:hover, .btn-info.disabled:focus, .btn-info.disabled.focus, .btn-info.disabled:active, .btn-info.disabled.active, .btn-info[disabled], .btn-info[disabled]:hover, .btn-info[disabled]:focus, .btn-info[disabled].focus, .btn-info[disabled]:active, .btn-info[disabled].active,
   fieldset[disabled] .btn-info,
   fieldset[disabled] .btn-info:hover,
   fieldset[disabled] .btn-info:focus,
@@ -3060,8 +2971,7 @@
   color: #fff;
   background-color: #f0ad4e;
   border-color: #eea236; }
-  .btn-warning:focus,
-  .btn-warning.focus {
+  .btn-warning:focus, .btn-warning.focus {
     color: #fff;
     background-color: #ec971f;
     border-color: #985f0d; }
@@ -3069,40 +2979,22 @@
     color: #fff;
     background-color: #ec971f;
     border-color: #d58512; }
-  .btn-warning:active,
-  .btn-warning.active,
+  .btn-warning:active, .btn-warning.active,
   .open > .btn-warning.dropdown-toggle {
     color: #fff;
     background-color: #ec971f;
     border-color: #d58512; }
-    .btn-warning:active:hover,
-    .btn-warning:active:focus,
-    .btn-warning:active.focus,
-    .btn-warning.active:hover,
-    .btn-warning.active:focus,
-    .btn-warning.active.focus,
+    .btn-warning:active:hover, .btn-warning:active:focus, .btn-warning:active.focus, .btn-warning.active:hover, .btn-warning.active:focus, .btn-warning.active.focus,
     .open > .btn-warning.dropdown-toggle:hover,
     .open > .btn-warning.dropdown-toggle:focus,
     .open > .btn-warning.dropdown-toggle.focus {
       color: #fff;
       background-color: #d58512;
       border-color: #985f0d; }
-  .btn-warning:active,
-  .btn-warning.active,
+  .btn-warning:active, .btn-warning.active,
   .open > .btn-warning.dropdown-toggle {
     background-image: none; }
-  .btn-warning.disabled,
-  .btn-warning.disabled:hover,
-  .btn-warning.disabled:focus,
-  .btn-warning.disabled.focus,
-  .btn-warning.disabled:active,
-  .btn-warning.disabled.active,
-  .btn-warning[disabled],
-  .btn-warning[disabled]:hover,
-  .btn-warning[disabled]:focus,
-  .btn-warning[disabled].focus,
-  .btn-warning[disabled]:active,
-  .btn-warning[disabled].active,
+  .btn-warning.disabled, .btn-warning.disabled:hover, .btn-warning.disabled:focus, .btn-warning.disabled.focus, .btn-warning.disabled:active, .btn-warning.disabled.active, .btn-warning[disabled], .btn-warning[disabled]:hover, .btn-warning[disabled]:focus, .btn-warning[disabled].focus, .btn-warning[disabled]:active, .btn-warning[disabled].active,
   fieldset[disabled] .btn-warning,
   fieldset[disabled] .btn-warning:hover,
   fieldset[disabled] .btn-warning:focus,
@@ -3119,8 +3011,7 @@
   color: #fff;
   background-color: #d9534f;
   border-color: #d43f3a; }
-  .btn-danger:focus,
-  .btn-danger.focus {
+  .btn-danger:focus, .btn-danger.focus {
     color: #fff;
     background-color: #c9302c;
     border-color: #761c19; }
@@ -3128,40 +3019,22 @@
     color: #fff;
     background-color: #c9302c;
     border-color: #ac2925; }
-  .btn-danger:active,
-  .btn-danger.active,
+  .btn-danger:active, .btn-danger.active,
   .open > .btn-danger.dropdown-toggle {
     color: #fff;
     background-color: #c9302c;
     border-color: #ac2925; }
-    .btn-danger:active:hover,
-    .btn-danger:active:focus,
-    .btn-danger:active.focus,
-    .btn-danger.active:hover,
-    .btn-danger.active:focus,
-    .btn-danger.active.focus,
+    .btn-danger:active:hover, .btn-danger:active:focus, .btn-danger:active.focus, .btn-danger.active:hover, .btn-danger.active:focus, .btn-danger.active.focus,
     .open > .btn-danger.dropdown-toggle:hover,
     .open > .btn-danger.dropdown-toggle:focus,
     .open > .btn-danger.dropdown-toggle.focus {
       color: #fff;
       background-color: #ac2925;
       border-color: #761c19; }
-  .btn-danger:active,
-  .btn-danger.active,
+  .btn-danger:active, .btn-danger.active,
   .open > .btn-danger.dropdown-toggle {
     background-image: none; }
-  .btn-danger.disabled,
-  .btn-danger.disabled:hover,
-  .btn-danger.disabled:focus,
-  .btn-danger.disabled.focus,
-  .btn-danger.disabled:active,
-  .btn-danger.disabled.active,
-  .btn-danger[disabled],
-  .btn-danger[disabled]:hover,
-  .btn-danger[disabled]:focus,
-  .btn-danger[disabled].focus,
-  .btn-danger[disabled]:active,
-  .btn-danger[disabled].active,
+  .btn-danger.disabled, .btn-danger.disabled:hover, .btn-danger.disabled:focus, .btn-danger.disabled.focus, .btn-danger.disabled:active, .btn-danger.disabled.active, .btn-danger[disabled], .btn-danger[disabled]:hover, .btn-danger[disabled]:focus, .btn-danger[disabled].focus, .btn-danger[disabled]:active, .btn-danger[disabled].active,
   fieldset[disabled] .btn-danger,
   fieldset[disabled] .btn-danger:hover,
   fieldset[disabled] .btn-danger:focus,
@@ -3178,25 +3051,17 @@
   color: #337ab7;
   font-weight: normal;
   border-radius: 0; }
-  .btn-link,
-  .btn-link:active,
-  .btn-link.active,
-  .btn-link[disabled],
+  .btn-link, .btn-link:active, .btn-link.active, .btn-link[disabled],
   fieldset[disabled] .btn-link {
     background-color: transparent;
     box-shadow: none; }
-  .btn-link,
-  .btn-link:hover,
-  .btn-link:focus,
-  .btn-link:active {
+  .btn-link, .btn-link:hover, .btn-link:focus, .btn-link:active {
     border-color: transparent; }
-  .btn-link:hover,
-  .btn-link:focus {
+  .btn-link:hover, .btn-link:focus {
     color: #23527c;
     text-decoration: underline;
     background-color: transparent; }
-  .btn-link[disabled]:hover,
-  .btn-link[disabled]:focus,
+  .btn-link[disabled]:hover, .btn-link[disabled]:focus,
   fieldset[disabled] .btn-link:hover,
   fieldset[disabled] .btn-link:focus {
     color: #777777;
@@ -3311,27 +3176,21 @@
     color: #333333;
     white-space: nowrap; }
 
-.dropdown-menu > li > a:hover,
-.dropdown-menu > li > a:focus {
+.dropdown-menu > li > a:hover, .dropdown-menu > li > a:focus {
   text-decoration: none;
   color: #262626;
   background-color: #f5f5f5; }
 
-.dropdown-menu > .active > a,
-.dropdown-menu > .active > a:hover,
-.dropdown-menu > .active > a:focus {
+.dropdown-menu > .active > a, .dropdown-menu > .active > a:hover, .dropdown-menu > .active > a:focus {
   color: #fff;
   text-decoration: none;
   outline: 0;
   background-color: #337ab7; }
 
-.dropdown-menu > .disabled > a,
-.dropdown-menu > .disabled > a:hover,
-.dropdown-menu > .disabled > a:focus {
+.dropdown-menu > .disabled > a, .dropdown-menu > .disabled > a:hover, .dropdown-menu > .disabled > a:focus {
   color: #777777; }
 
-.dropdown-menu > .disabled > a:hover,
-.dropdown-menu > .disabled > a:focus {
+.dropdown-menu > .disabled > a:hover, .dropdown-menu > .disabled > a:focus {
   text-decoration: none;
   background-color: transparent;
   background-image: none;
@@ -3402,10 +3261,7 @@
   .btn-group-vertical > .btn {
     position: relative;
     float: left; }
-    .btn-group > .btn:hover,
-    .btn-group > .btn:focus,
-    .btn-group > .btn:active,
-    .btn-group > .btn.active,
+    .btn-group > .btn:hover, .btn-group > .btn:focus, .btn-group > .btn:active, .btn-group > .btn.active,
     .btn-group-vertical > .btn:hover,
     .btn-group-vertical > .btn:focus,
     .btn-group-vertical > .btn:active,
@@ -3420,8 +3276,7 @@
 
 .btn-toolbar {
   margin-left: -5px; }
-  .btn-toolbar:before,
-  .btn-toolbar:after {
+  .btn-toolbar:before, .btn-toolbar:after {
     content: " ";
     display: table; }
   .btn-toolbar:after {
@@ -3499,8 +3354,7 @@
   width: 100%;
   max-width: 100%; }
 
-.btn-group-vertical > .btn-group:before,
-.btn-group-vertical > .btn-group:after {
+.btn-group-vertical > .btn-group:before, .btn-group-vertical > .btn-group:after {
   content: " ";
   display: table; }
 
@@ -3605,12 +3459,14 @@
   background-color: #eeeeee;
   border: 1px solid #ccc;
   border-radius: 4px; }
-  .input-group-addon.input-sm, .input-group-sm > .input-group-addon,
+  .input-group-addon.input-sm,
+  .input-group-sm > .input-group-addon,
   .input-group-sm > .input-group-btn > .input-group-addon.btn {
     padding: 5px 10px;
     font-size: 12px;
     border-radius: 3px; }
-  .input-group-addon.input-lg, .input-group-lg > .input-group-addon,
+  .input-group-addon.input-lg,
+  .input-group-lg > .input-group-addon,
   .input-group-lg > .input-group-btn > .input-group-addon.btn {
     padding: 10px 16px;
     font-size: 18px;
@@ -3653,9 +3509,7 @@
     position: relative; }
     .input-group-btn > .btn + .btn {
       margin-left: -1px; }
-    .input-group-btn > .btn:hover,
-    .input-group-btn > .btn:focus,
-    .input-group-btn > .btn:active {
+    .input-group-btn > .btn:hover, .input-group-btn > .btn:focus, .input-group-btn > .btn:active {
       z-index: 2; }
   .input-group-btn:first-child > .btn,
   .input-group-btn:first-child > .btn-group {
@@ -3669,8 +3523,7 @@
   margin-bottom: 0;
   padding-left: 0;
   list-style: none; }
-  .nav:before,
-  .nav:after {
+  .nav:before, .nav:after {
     content: " ";
     display: table; }
   .nav:after {
@@ -3682,21 +3535,17 @@
       position: relative;
       display: block;
       padding: 10px 15px; }
-      .nav > li > a:hover,
-      .nav > li > a:focus {
+      .nav > li > a:hover, .nav > li > a:focus {
         text-decoration: none;
         background-color: #eeeeee; }
     .nav > li.disabled > a {
       color: #777777; }
-      .nav > li.disabled > a:hover,
-      .nav > li.disabled > a:focus {
+      .nav > li.disabled > a:hover, .nav > li.disabled > a:focus {
         color: #777777;
         text-decoration: none;
         background-color: transparent;
         cursor: not-allowed; }
-  .nav .open > a,
-  .nav .open > a:hover,
-  .nav .open > a:focus {
+  .nav .open > a, .nav .open > a:hover, .nav .open > a:focus {
     background-color: #eeeeee;
     border-color: #337ab7; }
   .nav .nav-divider {
@@ -3719,9 +3568,7 @@
       border-radius: 4px 4px 0 0; }
       .nav-tabs > li > a:hover {
         border-color: #eeeeee #eeeeee #ddd; }
-    .nav-tabs > li.active > a,
-    .nav-tabs > li.active > a:hover,
-    .nav-tabs > li.active > a:focus {
+    .nav-tabs > li.active > a, .nav-tabs > li.active > a:hover, .nav-tabs > li.active > a:focus {
       color: #555555;
       background-color: #fff;
       border: 1px solid #ddd;
@@ -3734,9 +3581,7 @@
     border-radius: 4px; }
   .nav-pills > li + li {
     margin-left: 2px; }
-  .nav-pills > li.active > a,
-  .nav-pills > li.active > a:hover,
-  .nav-pills > li.active > a:focus {
+  .nav-pills > li.active > a, .nav-pills > li.active > a:hover, .nav-pills > li.active > a:focus {
     color: #fff;
     background-color: #337ab7; }
 
@@ -3768,17 +3613,17 @@
   .nav-tabs-justified > li > a, .nav-tabs.nav-justified > li > a {
     margin-right: 0;
     border-radius: 4px; }
-  .nav-tabs-justified > .active > a,
-  .nav-tabs.nav-justified > .active > a, .nav-tabs-justified > .active > a:hover,
-  .nav-tabs.nav-justified > .active > a:hover, .nav-tabs-justified > .active > a:focus, .nav-tabs.nav-justified > .active > a:focus {
+  .nav-tabs-justified > .active > a, .nav-tabs.nav-justified > .active > a,
+  .nav-tabs-justified > .active > a:hover, .nav-tabs.nav-justified > .active > a:hover,
+  .nav-tabs-justified > .active > a:focus, .nav-tabs.nav-justified > .active > a:focus {
     border: 1px solid #ddd; }
   @media (min-width: 768px) {
     .nav-tabs-justified > li > a, .nav-tabs.nav-justified > li > a {
       border-bottom: 1px solid #ddd;
       border-radius: 4px 4px 0 0; }
-    .nav-tabs-justified > .active > a,
-    .nav-tabs.nav-justified > .active > a, .nav-tabs-justified > .active > a:hover,
-    .nav-tabs.nav-justified > .active > a:hover, .nav-tabs-justified > .active > a:focus, .nav-tabs.nav-justified > .active > a:focus {
+    .nav-tabs-justified > .active > a, .nav-tabs.nav-justified > .active > a,
+    .nav-tabs-justified > .active > a:hover, .nav-tabs.nav-justified > .active > a:hover,
+    .nav-tabs-justified > .active > a:focus, .nav-tabs.nav-justified > .active > a:focus {
       border-bottom-color: #fff; } }
 
 .tab-content > .tab-pane {
@@ -3797,8 +3642,7 @@
   min-height: 50px;
   margin-bottom: 20px;
   border: 1px solid transparent; }
-  .navbar:before,
-  .navbar:after {
+  .navbar:before, .navbar:after {
     content: " ";
     display: table; }
   .navbar:after {
@@ -3807,8 +3651,7 @@
     .navbar {
       border-radius: 4px; } }
 
-.navbar-header:before,
-.navbar-header:after {
+.navbar-header:before, .navbar-header:after {
   content: " ";
   display: table; }
 
@@ -3826,8 +3669,7 @@
   border-top: 1px solid transparent;
   box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
   -webkit-overflow-scrolling: touch; }
-  .navbar-collapse:before,
-  .navbar-collapse:after {
+  .navbar-collapse:before, .navbar-collapse:after {
     content: " ";
     display: table; }
   .navbar-collapse:after {
@@ -3907,8 +3749,7 @@
   font-size: 18px;
   line-height: 20px;
   height: 50px; }
-  .navbar-brand:hover,
-  .navbar-brand:focus {
+  .navbar-brand:hover, .navbar-brand:focus {
     text-decoration: none; }
   .navbar-brand > img {
     display: block; }
@@ -3961,8 +3802,7 @@
         padding: 5px 15px 5px 25px; }
       .navbar-nav .open .dropdown-menu > li > a {
         line-height: 20px; }
-        .navbar-nav .open .dropdown-menu > li > a:hover,
-        .navbar-nav .open .dropdown-menu > li > a:focus {
+        .navbar-nav .open .dropdown-menu > li > a:hover, .navbar-nav .open .dropdown-menu > li > a:focus {
           background-image: none; } }
   @media (min-width: 768px) {
     .navbar-nav {
@@ -4081,58 +3921,44 @@
   border-color: #e7e7e7; }
   .navbar-default .navbar-brand {
     color: #777; }
-    .navbar-default .navbar-brand:hover,
-    .navbar-default .navbar-brand:focus {
+    .navbar-default .navbar-brand:hover, .navbar-default .navbar-brand:focus {
       color: #5e5e5e;
       background-color: transparent; }
   .navbar-default .navbar-text {
     color: #777; }
   .navbar-default .navbar-nav > li > a {
     color: #777; }
-    .navbar-default .navbar-nav > li > a:hover,
-    .navbar-default .navbar-nav > li > a:focus {
+    .navbar-default .navbar-nav > li > a:hover, .navbar-default .navbar-nav > li > a:focus {
       color: #333;
       background-color: transparent; }
-  .navbar-default .navbar-nav > .active > a,
-  .navbar-default .navbar-nav > .active > a:hover,
-  .navbar-default .navbar-nav > .active > a:focus {
+  .navbar-default .navbar-nav > .active > a, .navbar-default .navbar-nav > .active > a:hover, .navbar-default .navbar-nav > .active > a:focus {
     color: #555;
     background-color: #e7e7e7; }
-  .navbar-default .navbar-nav > .disabled > a,
-  .navbar-default .navbar-nav > .disabled > a:hover,
-  .navbar-default .navbar-nav > .disabled > a:focus {
+  .navbar-default .navbar-nav > .disabled > a, .navbar-default .navbar-nav > .disabled > a:hover, .navbar-default .navbar-nav > .disabled > a:focus {
     color: #ccc;
     background-color: transparent; }
   .navbar-default .navbar-toggle {
     border-color: #ddd; }
-    .navbar-default .navbar-toggle:hover,
-    .navbar-default .navbar-toggle:focus {
+    .navbar-default .navbar-toggle:hover, .navbar-default .navbar-toggle:focus {
       background-color: #ddd; }
     .navbar-default .navbar-toggle .icon-bar {
       background-color: #888; }
   .navbar-default .navbar-collapse,
   .navbar-default .navbar-form {
     border-color: #e7e7e7; }
-  .navbar-default .navbar-nav > .open > a,
-  .navbar-default .navbar-nav > .open > a:hover,
-  .navbar-default .navbar-nav > .open > a:focus {
+  .navbar-default .navbar-nav > .open > a, .navbar-default .navbar-nav > .open > a:hover, .navbar-default .navbar-nav > .open > a:focus {
     background-color: #e7e7e7;
     color: #555; }
   @media (max-width: 767px) {
     .navbar-default .navbar-nav .open .dropdown-menu > li > a {
       color: #777; }
-      .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover,
-      .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus {
+      .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover, .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus {
         color: #333;
         background-color: transparent; }
-    .navbar-default .navbar-nav .open .dropdown-menu > .active > a,
-    .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover,
-    .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus {
+    .navbar-default .navbar-nav .open .dropdown-menu > .active > a, .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover, .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus {
       color: #555;
       background-color: #e7e7e7; }
-    .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a,
-    .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:hover,
-    .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:focus {
+    .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a, .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:hover, .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:focus {
       color: #ccc;
       background-color: transparent; } }
   .navbar-default .navbar-link {
@@ -4141,11 +3967,9 @@
       color: #333; }
   .navbar-default .btn-link {
     color: #777; }
-    .navbar-default .btn-link:hover,
-    .navbar-default .btn-link:focus {
+    .navbar-default .btn-link:hover, .navbar-default .btn-link:focus {
       color: #333; }
-    .navbar-default .btn-link[disabled]:hover,
-    .navbar-default .btn-link[disabled]:focus,
+    .navbar-default .btn-link[disabled]:hover, .navbar-default .btn-link[disabled]:focus,
     fieldset[disabled] .navbar-default .btn-link:hover,
     fieldset[disabled] .navbar-default .btn-link:focus {
       color: #ccc; }
@@ -4155,41 +3979,32 @@
   border-color: #090909; }
   .navbar-inverse .navbar-brand {
     color: #9d9d9d; }
-    .navbar-inverse .navbar-brand:hover,
-    .navbar-inverse .navbar-brand:focus {
+    .navbar-inverse .navbar-brand:hover, .navbar-inverse .navbar-brand:focus {
       color: #fff;
       background-color: transparent; }
   .navbar-inverse .navbar-text {
     color: #9d9d9d; }
   .navbar-inverse .navbar-nav > li > a {
     color: #9d9d9d; }
-    .navbar-inverse .navbar-nav > li > a:hover,
-    .navbar-inverse .navbar-nav > li > a:focus {
+    .navbar-inverse .navbar-nav > li > a:hover, .navbar-inverse .navbar-nav > li > a:focus {
       color: #fff;
       background-color: transparent; }
-  .navbar-inverse .navbar-nav > .active > a,
-  .navbar-inverse .navbar-nav > .active > a:hover,
-  .navbar-inverse .navbar-nav > .active > a:focus {
+  .navbar-inverse .navbar-nav > .active > a, .navbar-inverse .navbar-nav > .active > a:hover, .navbar-inverse .navbar-nav > .active > a:focus {
     color: #fff;
     background-color: #090909; }
-  .navbar-inverse .navbar-nav > .disabled > a,
-  .navbar-inverse .navbar-nav > .disabled > a:hover,
-  .navbar-inverse .navbar-nav > .disabled > a:focus {
+  .navbar-inverse .navbar-nav > .disabled > a, .navbar-inverse .navbar-nav > .disabled > a:hover, .navbar-inverse .navbar-nav > .disabled > a:focus {
     color: #444;
     background-color: transparent; }
   .navbar-inverse .navbar-toggle {
     border-color: #333; }
-    .navbar-inverse .navbar-toggle:hover,
-    .navbar-inverse .navbar-toggle:focus {
+    .navbar-inverse .navbar-toggle:hover, .navbar-inverse .navbar-toggle:focus {
       background-color: #333; }
     .navbar-inverse .navbar-toggle .icon-bar {
       background-color: #fff; }
   .navbar-inverse .navbar-collapse,
   .navbar-inverse .navbar-form {
     border-color: #101010; }
-  .navbar-inverse .navbar-nav > .open > a,
-  .navbar-inverse .navbar-nav > .open > a:hover,
-  .navbar-inverse .navbar-nav > .open > a:focus {
+  .navbar-inverse .navbar-nav > .open > a, .navbar-inverse .navbar-nav > .open > a:hover, .navbar-inverse .navbar-nav > .open > a:focus {
     background-color: #090909;
     color: #fff; }
   @media (max-width: 767px) {
@@ -4199,18 +4014,13 @@
       background-color: #090909; }
     .navbar-inverse .navbar-nav .open .dropdown-menu > li > a {
       color: #9d9d9d; }
-      .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover,
-      .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus {
+      .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover, .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus {
         color: #fff;
         background-color: transparent; }
-    .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a,
-    .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover,
-    .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus {
+    .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a, .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover, .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus {
       color: #fff;
       background-color: #090909; }
-    .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a,
-    .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:hover,
-    .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:focus {
+    .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a, .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:hover, .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:focus {
       color: #444;
       background-color: transparent; } }
   .navbar-inverse .navbar-link {
@@ -4219,11 +4029,9 @@
       color: #fff; }
   .navbar-inverse .btn-link {
     color: #9d9d9d; }
-    .navbar-inverse .btn-link:hover,
-    .navbar-inverse .btn-link:focus {
+    .navbar-inverse .btn-link:hover, .navbar-inverse .btn-link:focus {
       color: #fff; }
-    .navbar-inverse .btn-link[disabled]:hover,
-    .navbar-inverse .btn-link[disabled]:focus,
+    .navbar-inverse .btn-link[disabled]:hover, .navbar-inverse .btn-link[disabled]:focus,
     fieldset[disabled] .navbar-inverse .btn-link:hover,
     fieldset[disabled] .navbar-inverse .btn-link:focus {
       color: #444; }
@@ -4237,7 +4045,7 @@
   .breadcrumb > li {
     display: inline-block; }
     .breadcrumb > li + li:before {
-      content: "/\\00a0";
+      content: "/ ";
       padding: 0 5px;
       color: #ccc; }
   .breadcrumb > .active {
@@ -4270,17 +4078,14 @@
     .pagination > li:last-child > span {
       border-bottom-right-radius: 4px;
       border-top-right-radius: 4px; }
-  .pagination > li > a:hover,
-  .pagination > li > a:focus,
+  .pagination > li > a:hover, .pagination > li > a:focus,
   .pagination > li > span:hover,
   .pagination > li > span:focus {
     z-index: 3;
     color: #23527c;
     background-color: #eeeeee;
     border-color: #ddd; }
-  .pagination > .active > a,
-  .pagination > .active > a:hover,
-  .pagination > .active > a:focus,
+  .pagination > .active > a, .pagination > .active > a:hover, .pagination > .active > a:focus,
   .pagination > .active > span,
   .pagination > .active > span:hover,
   .pagination > .active > span:focus {
@@ -4337,8 +4142,7 @@
   margin: 20px 0;
   list-style: none;
   text-align: center; }
-  .pager:before,
-  .pager:after {
+  .pager:before, .pager:after {
     content: " ";
     display: table; }
   .pager:after {
@@ -4372,7 +4176,7 @@
 
 .label {
   display: inline;
-  padding: 0.2em 0.6em 0.3em;
+  padding: .2em .6em .3em;
   font-size: 75%;
   font-weight: bold;
   line-height: 1;
@@ -4387,46 +4191,39 @@
     position: relative;
     top: -1px; }
 
-a.label:hover,
-a.label:focus {
+a.label:hover, a.label:focus {
   color: #fff;
   text-decoration: none;
   cursor: pointer; }
 
 .label-default {
   background-color: #777777; }
-  .label-default[href]:hover,
-  .label-default[href]:focus {
+  .label-default[href]:hover, .label-default[href]:focus {
     background-color: #5e5e5e; }
 
 .label-primary {
   background-color: #337ab7; }
-  .label-primary[href]:hover,
-  .label-primary[href]:focus {
+  .label-primary[href]:hover, .label-primary[href]:focus {
     background-color: #286090; }
 
 .label-success {
   background-color: #5cb85c; }
-  .label-success[href]:hover,
-  .label-success[href]:focus {
+  .label-success[href]:hover, .label-success[href]:focus {
     background-color: #449d44; }
 
 .label-info {
   background-color: #5bc0de; }
-  .label-info[href]:hover,
-  .label-info[href]:focus {
+  .label-info[href]:hover, .label-info[href]:focus {
     background-color: #31b0d5; }
 
 .label-warning {
   background-color: #f0ad4e; }
-  .label-warning[href]:hover,
-  .label-warning[href]:focus {
+  .label-warning[href]:hover, .label-warning[href]:focus {
     background-color: #ec971f; }
 
 .label-danger {
   background-color: #d9534f; }
-  .label-danger[href]:hover,
-  .label-danger[href]:focus {
+  .label-danger[href]:hover, .label-danger[href]:focus {
     background-color: #c9302c; }
 
 .badge {
@@ -4447,8 +4244,7 @@
   .btn .badge {
     position: relative;
     top: -1px; }
-  .btn-xs .badge,
-  .btn-group-xs > .btn .badge,
+  .btn-xs .badge, .btn-group-xs > .btn .badge,
   .btn-group-xs > .btn .badge {
     top: 0;
     padding: 1px 5px; }
@@ -4463,8 +4259,7 @@
   .nav-pills > li > a > .badge {
     margin-left: 3px; }
 
-a.badge:hover,
-a.badge:focus {
+a.badge:hover, a.badge:focus {
   color: #fff;
   text-decoration: none;
   cursor: pointer; }
@@ -4542,9 +4337,11 @@
   .alert > p + p {
     margin-top: 5px; }
 
-.alert-dismissable, .alert-dismissible {
+.alert-dismissable,
+.alert-dismissible {
   padding-right: 35px; }
-  .alert-dismissable .close, .alert-dismissible .close {
+  .alert-dismissable .close,
+  .alert-dismissible .close {
     position: relative;
     top: -2px;
     right: -21px;
@@ -4719,8 +4516,7 @@
   a.list-group-item .list-group-item-heading,
   button.list-group-item .list-group-item-heading {
     color: #333; }
-  a.list-group-item:hover,
-  a.list-group-item:focus,
+  a.list-group-item:hover, a.list-group-item:focus,
   button.list-group-item:hover,
   button.list-group-item:focus {
     text-decoration: none;
@@ -4731,41 +4527,29 @@
   width: 100%;
   text-align: left; }
 
-.list-group-item.disabled,
-.list-group-item.disabled:hover,
-.list-group-item.disabled:focus {
+.list-group-item.disabled, .list-group-item.disabled:hover, .list-group-item.disabled:focus {
   background-color: #eeeeee;
   color: #777777;
   cursor: not-allowed; }
-  .list-group-item.disabled .list-group-item-heading,
-  .list-group-item.disabled:hover .list-group-item-heading,
-  .list-group-item.disabled:focus .list-group-item-heading {
+  .list-group-item.disabled .list-group-item-heading, .list-group-item.disabled:hover .list-group-item-heading, .list-group-item.disabled:focus .list-group-item-heading {
     color: inherit; }
-  .list-group-item.disabled .list-group-item-text,
-  .list-group-item.disabled:hover .list-group-item-text,
-  .list-group-item.disabled:focus .list-group-item-text {
+  .list-group-item.disabled .list-group-item-text, .list-group-item.disabled:hover .list-group-item-text, .list-group-item.disabled:focus .list-group-item-text {
     color: #777777; }
 
-.list-group-item.active,
-.list-group-item.active:hover,
-.list-group-item.active:focus {
+.list-group-item.active, .list-group-item.active:hover, .list-group-item.active:focus {
   z-index: 2;
   color: #fff;
   background-color: #337ab7;
   border-color: #337ab7; }
   .list-group-item.active .list-group-item-heading,
   .list-group-item.active .list-group-item-heading > small,
-  .list-group-item.active .list-group-item-heading > .small,
-  .list-group-item.active:hover .list-group-item-heading,
+  .list-group-item.active .list-group-item-heading > .small, .list-group-item.active:hover .list-group-item-heading,
   .list-group-item.active:hover .list-group-item-heading > small,
-  .list-group-item.active:hover .list-group-item-heading > .small,
-  .list-group-item.active:focus .list-group-item-heading,
+  .list-group-item.active:hover .list-group-item-heading > .small, .list-group-item.active:focus .list-group-item-heading,
   .list-group-item.active:focus .list-group-item-heading > small,
   .list-group-item.active:focus .list-group-item-heading > .small {
     color: inherit; }
-  .list-group-item.active .list-group-item-text,
-  .list-group-item.active:hover .list-group-item-text,
-  .list-group-item.active:focus .list-group-item-text {
+  .list-group-item.active .list-group-item-text, .list-group-item.active:hover .list-group-item-text, .list-group-item.active:focus .list-group-item-text {
     color: #c7ddef; }
 
 .list-group-item-success {
@@ -4778,15 +4562,12 @@
   a.list-group-item-success .list-group-item-heading,
   button.list-group-item-success .list-group-item-heading {
     color: inherit; }
-  a.list-group-item-success:hover,
-  a.list-group-item-success:focus,
+  a.list-group-item-success:hover, a.list-group-item-success:focus,
   button.list-group-item-success:hover,
   button.list-group-item-success:focus {
     color: #3c763d;
     background-color: #d0e9c6; }
-  a.list-group-item-success.active,
-  a.list-group-item-success.active:hover,
-  a.list-group-item-success.active:focus,
+  a.list-group-item-success.active, a.list-group-item-success.active:hover, a.list-group-item-success.active:focus,
   button.list-group-item-success.active,
   button.list-group-item-success.active:hover,
   button.list-group-item-success.active:focus {
@@ -4804,15 +4585,12 @@
   a.list-group-item-info .list-group-item-heading,
   button.list-group-item-info .list-group-item-heading {
     color: inherit; }
-  a.list-group-item-info:hover,
-  a.list-group-item-info:focus,
+  a.list-group-item-info:hover, a.list-group-item-info:focus,
   button.list-group-item-info:hover,
   button.list-group-item-info:focus {
     color: #31708f;
     background-color: #c4e3f3; }
-  a.list-group-item-info.active,
-  a.list-group-item-info.active:hover,
-  a.list-group-item-info.active:focus,
+  a.list-group-item-info.active, a.list-group-item-info.active:hover, a.list-group-item-info.active:focus,
   button.list-group-item-info.active,
   button.list-group-item-info.active:hover,
   button.list-group-item-info.active:focus {
@@ -4830,15 +4608,12 @@
   a.list-group-item-warning .list-group-item-heading,
   button.list-group-item-warning .list-group-item-heading {
     color: inherit; }
-  a.list-group-item-warning:hover,
-  a.list-group-item-warning:focus,
+  a.list-group-item-warning:hover, a.list-group-item-warning:focus,
   button.list-group-item-warning:hover,
   button.list-group-item-warning:focus {
     color: #8a6d3b;
     background-color: #faf2cc; }
-  a.list-group-item-warning.active,
-  a.list-group-item-warning.active:hover,
-  a.list-group-item-warning.active:focus,
+  a.list-group-item-warning.active, a.list-group-item-warning.active:hover, a.list-group-item-warning.active:focus,
   button.list-group-item-warning.active,
   button.list-group-item-warning.active:hover,
   button.list-group-item-warning.active:focus {
@@ -4856,15 +4631,12 @@
   a.list-group-item-danger .list-group-item-heading,
   button.list-group-item-danger .list-group-item-heading {
     color: inherit; }
-  a.list-group-item-danger:hover,
-  a.list-group-item-danger:focus,
+  a.list-group-item-danger:hover, a.list-group-item-danger:focus,
   button.list-group-item-danger:hover,
   button.list-group-item-danger:focus {
     color: #a94442;
     background-color: #ebcccc; }
-  a.list-group-item-danger.active,
-  a.list-group-item-danger.active:hover,
-  a.list-group-item-danger.active:focus,
+  a.list-group-item-danger.active, a.list-group-item-danger.active:hover, a.list-group-item-danger.active:focus,
   button.list-group-item-danger.active,
   button.list-group-item-danger.active:hover,
   button.list-group-item-danger.active:focus {
@@ -4889,8 +4661,7 @@
 
 .panel-body {
   padding: 15px; }
-  .panel-body:before,
-  .panel-body:after {
+  .panel-body:before, .panel-body:after {
     content: " ";
     display: table; }
   .panel-body:after {
@@ -5236,8 +5007,7 @@
   text-shadow: 0 1px 0 #fff;
   opacity: 0.2;
   filter: alpha(opacity=20); }
-  .close:hover,
-  .close:focus {
+  .close:hover, .close:focus {
     color: #000;
     text-decoration: none;
     cursor: pointer;
@@ -5328,8 +5098,7 @@
   padding: 15px;
   text-align: right;
   border-top: 1px solid #e5e5e5; }
-  .modal-footer:before,
-  .modal-footer:after {
+  .modal-footer:before, .modal-footer:after {
     content: " ";
     display: table; }
   .modal-footer:after {
@@ -5521,8 +5290,7 @@
 .popover-content {
   padding: 9px 14px; }
 
-.popover > .arrow,
-.popover > .arrow:after {
+.popover > .arrow, .popover > .arrow:after {
   position: absolute;
   display: block;
   width: 0;
@@ -5618,19 +5386,15 @@
         backface-visibility: hidden;
         -webkit-perspective: 1000px;
         perspective: 1000px; }
-        .carousel-inner > .item.next,
-        .carousel-inner > .item.active.right {
+        .carousel-inner > .item.next, .carousel-inner > .item.active.right {
           -webkit-transform: translate3d(100%, 0, 0);
           transform: translate3d(100%, 0, 0);
           left: 0; }
-        .carousel-inner > .item.prev,
-        .carousel-inner > .item.active.left {
+        .carousel-inner > .item.prev, .carousel-inner > .item.active.left {
           -webkit-transform: translate3d(-100%, 0, 0);
           transform: translate3d(-100%, 0, 0);
           left: 0; }
-        .carousel-inner > .item.next.left,
-        .carousel-inner > .item.prev.right,
-        .carousel-inner > .item.active {
+        .carousel-inner > .item.next.left, .carousel-inner > .item.prev.right, .carousel-inner > .item.active {
           -webkit-transform: translate3d(0, 0, 0);
           transform: translate3d(0, 0, 0);
           left: 0; } }
@@ -5679,8 +5443,7 @@
     background-image: linear-gradient(to right, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%);
     background-repeat: repeat-x;
     filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1); }
-  .carousel-control:hover,
-  .carousel-control:focus {
+  .carousel-control:hover, .carousel-control:focus {
     outline: 0;
     color: #fff;
     text-decoration: none;
@@ -5777,8 +5540,7 @@
   .carousel-indicators {
     bottom: 20px; } }
 
-.clearfix:before,
-.clearfix:after {
+.clearfix:before, .clearfix:after {
   content: " ";
   display: table; }
 
@@ -5994,4 +5756,7 @@
 body, label, .checkbox label {
   font-weight: 300; }
 
+.doc_details_title {
+  margin-top: 0; }
+
 /*# sourceMappingURL=app.css.map */
--- a/server/src/resources/views/app.blade.php	Thu Dec 10 17:00:59 2015 +0100
+++ b/server/src/resources/views/app.blade.php	Thu Dec 10 17:04:51 2015 +0100
@@ -4,12 +4,14 @@
 	<meta charset="utf-8">
 	<meta http-equiv="X-UA-Compatible" content="IE=edge">
 	<meta name="viewport" content="width=device-width, initial-scale=1">
-	<title>Laravel</title>
+	<title>@yield('title','Laravel')</title>
 
+	@section('css-assets')
 	<link href="{{ asset('/css/app.css') }}" rel="stylesheet">
 
 	<!-- Fonts -->
 	<link href='//fonts.googleapis.com/css?family=Roboto:400,300' rel='stylesheet' type='text/css'>
+	@show
 
 	<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
 	<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
@@ -55,8 +57,10 @@
 
 	@yield('content')
 
+	@section('js-assets')
 	<!-- Scripts -->
-	<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
-	<script src="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.1/js/bootstrap.min.js"></script>
+	<script src="{{ asset('/js/vendor/jquery.js') }}"></script>
+	<script src="{{ asset('/js/vendor/bootstrap.js') }}"></script>
+	@show
 </body>
 </html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/server/src/resources/views/bo/docDetailClient.blade.php	Thu Dec 10 17:04:51 2015 +0100
@@ -0,0 +1,21 @@
+@extends('app')
+
+@section('title', 'Document detail')
+
+@section('css-assets')
+
+	<link href="{{ asset('/css/vendor/bo-client-vendor.css') }}" rel="stylesheet">
+	<link href="{{ asset('/css/vendor/bo-client.css') }}" rel="stylesheet">
+@endsection
+
+@section('js-assets')
+	@parent
+
+	<script src="{{ asset('/js/vendor/bo-client-vendor.js') }}"></script>
+	<script src="{{ asset('/js/vendor/bo-client.js') }}"></script>
+@endsection
+
+@section('content')
+<div class="container" id="ember-container">
+</div>
+@endsection
--- a/server/src/resources/views/bo/docList.blade.php	Thu Dec 10 17:00:59 2015 +0100
+++ b/server/src/resources/views/bo/docList.blade.php	Thu Dec 10 17:04:51 2015 +0100
@@ -10,11 +10,18 @@
                 <div class="panel-body">
                     <table class="table table-striped">
                         <thead>
-                            <tr><th>URI</th><th>ID</th></tr>
+                            <tr><th>ID</th><th>TITLE</th><th>DATE</th></tr>
                         </thead>
                         <tbody>
                         @foreach ($docs as $doc)
-                            <tr><td>{{ $doc->getUri() }}</td><td><a href="{{ route('bo.docs.show',[ 'id' => $doc->getId()]) }}">{{ $doc->getId() }}</a></td></tr>
+                            <tr>
+                                <td>
+                                    <a href="{{ route('bo.docs.show',[ 'id' => $doc->getId()]) }}">{{ $doc->getId() }}</a><br>
+                                    <a href="{{ route('bo.docs.client',[ 'id' => $doc->getId()]) }}#/doc/{{ $doc->getId() }}">{{ $doc->getId() }}</a>
+                                </td>
+                                <td>{{ $doc->getTitle() }}</td>
+                                <td>{{ $doc->getModified() }}</td>
+                            </tr>
                         @endforeach
                         </tbody>
                     </table>
--- a/server/src/tests/Controllers/DocumentListControllerTest.php	Thu Dec 10 17:00:59 2015 +0100
+++ b/server/src/tests/Controllers/DocumentListControllerTest.php	Thu Dec 10 17:04:51 2015 +0100
@@ -10,7 +10,7 @@
  */
 class DocumentListControllerTest extends TestCase {
 
-    const GET_DOC = <<<EOD
+    const GET_DOC = <<<EOT
     @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
     @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
     @prefix sesame: <http://www.openrdf.org/schema/sesame#> .
@@ -18,55 +18,71 @@
     @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
     @prefix fn: <http://www.w3.org/2005/xpath-functions#> .
 
-    <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-BOD092_SOUND> <http://purl.org/dc/elements/1.1/title> "Corpus LS émergente, L'oncle Geraldo, raconté par Ivaldo"@fr ;
-        <http://www.language-archives.org/OLAC/1.1/depositor> <http://viaf.org/viaf/202009521> , <http://viaf.org/viaf/74053259> ;
-        <http://purl.org/dc/elements/1.1/rights> "Copyright (c) Cuxac, Christian" ;
-        <http://purl.org/dc/elements/1.1/format> "video/mp4"^^<http://purl.org/dc/terms/IMT> ;
-        <http://purl.org/dc/terms/isFormatOf> <http://cocoon.huma-num.fr/data/boutet/BOD092_low.mp4> , <http://cocoon.huma-num.fr/data/boutet/BOD092_low.ogg> ;
-        <http://purl.org/dc/elements/1.1/subject> <http://lexvo.org/id/iso639-3/und> , "general_linguistics"^^<http://www.language-archives.org/OLAC/1.1/linguistic-field> ;
-        <http://purl.org/dc/elements/1.1/language> <http://lexvo.org/id/iso639-3/und> ;
-        <http://purl.org/dc/elements/1.1/type> "dialogue"^^<http://www.language-archives.org/OLAC/1.1/discourse-type> , <http://purl.org/dc/dcmitype/MovingImage> , "primary_text"^^<http://www.language-archives.org/OLAC/1.1/linguistic-type> ;
-        <http://www.language-archives.org/OLAC/1.1/author> "Fusellier-Souza, Ivani" ;
-        <http://www.language-archives.org/OLAC/1.1/interviewer> "Fusellier-Souza, Ivani" ;
-        <http://www.language-archives.org/OLAC/1.1/compiler> "Boutet, Dominique" , "Cuxac, Christian" ;
-        <http://www.language-archives.org/OLAC/1.1/data_inputter> "Fiore, Sonia" , "Lacroix, Magdalena" , "Boutet, Dominique" ;
-        <http://www.language-archives.org/OLAC/1.1/speaker> "Ivaldo, Lucia" ;
-        <http://www.language-archives.org/OLAC/1.1/translator> "Fusellier-Souza, Ivani" ;
-        <http://purl.org/dc/elements/1.1/description> """Cette séquence fait partie du corpus vidéo de Langue des
-            Signes Emergentes utilisé lors de la thèse d'Ivani Fusellier-Souza : le locuteur Ivaldo
-            raconte que son oncle Geraldo est riche mais n'est pas radin, et qu'il y a très
-            longtemps lorsque les affaires marchaient pour son"""@fr ;
-        <http://purl.org/dc/terms/alternative> "Séquence 13, L'oncle Geraldo, raconté par Ivaldo"@fr ;
-        <http://purl.org/dc/terms/accessRights> "Freely available for non-commercial use" ;
-        <http://purl.org/dc/terms/license> <http://creativecommons.org/licenses/by-nc-nd/2.5/> ;
-        <http://purl.org/dc/terms/spatial> "Brésil, Brasilia"@fr , "BR"^^<http://purl.org/dc/terms/ISO3166> ;
-        <http://www.w3.org/2003/01/geo/wgs84_pos#long> "-47.9291"^^xsd:float ;
-        <http://www.w3.org/2003/01/geo/wgs84_pos#lat> "-15.7801"^^xsd:float ;
-        <http://purl.org/dc/terms/created> "2001-03"^^<http://purl.org/dc/terms/W3CDTF> ;
-        <http://purl.org/dc/terms/tableOfContents> """00:00:00>00:00:45 Ivaldo raconte que son oncle
-            Geraldo est riche. C'est un homme cultivé, qui a beaucoup d'argent. Il habite près de
-            l'aéroport, où habite également l'amie de Lucia. La femme à Geraldo aussi est riche.
-            00:00:45>00:00:46 Lucia dit qu'il est riche, tant mieux pour lui. 00:00:46>00:01:55
-            Ivaldo raconte que son oncle était riche mais généreux. Il lui donne des billets d'avion
-            pour voyager. Il lui donne également des vêtements. Ensuite, Ivaldo raconte qu'avant,
-            son père était aisé et c'est l'oncle Geraldo qui ne l'était pas. Alors son père aidait
-            l'oncle Geraldo car les affaires allaient bien. Mais par la suite, les affaires ont
-            chutées et pour l'oncle Geraldo elles montaient."""@fr ;
-        <http://purl.org/dc/terms/extent> "PT00H01M54S" ;
-        <http://purl.org/dc/terms/isPartOf> <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-COLLECTION_LANGUESDEFRANCE> ;
-        <http://purl.org/dc/terms/issued> "2013-06-04T22:39:21+02:00"^^<http://purl.org/dc/terms/W3CDTF> ;
-        <http://crdo.risc.cnrs.fr/schemas/master> <http://cocoon.huma-num.fr/data/archi/masters/350801.mp4> ;
-        <http://purl.org/dc/terms/available> "2013-06-04"^^<http://purl.org/dc/terms/W3CDTF> .
+    _:genid-25e7608caea646d5ba7b21eaf92c050f-genid1 a <http://www.europeana.eu/schemas/edm/Place> ;
+    	owl:sameAs <http://sws.geonames.org/3469058/> ;
+    	<http://www.w3.org/2004/02/skos/core#note> "BR"^^<http://purl.org/dc/terms/ISO3166> , "Brésil, Brasilia"@fr ;
+    	<http://www.w3.org/2003/01/geo/wgs84_pos#lat> "-15.77972"^^xsd:float ;
+    	<http://www.w3.org/2003/01/geo/wgs84_pos#long> "-47.92972"^^xsd:float .
+
+    <http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-BOD092_SOUND> a <http://www.openarchives.org/ore/terms/Aggregation> ;
+    	<http://www.europeana.eu/schemas/edm/aggregatedCHO> <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-BOD092_SOUND> ;
+    	<http://www.europeana.eu/schemas/edm/dataProvider> "Corpus de la Parole"@fr ;
+    	<http://www.europeana.eu/schemas/edm/hasView> <http://cocoon.huma-num.fr/data/boutet/BOD092_low.mp4> , <http://cocoon.huma-num.fr/data/boutet/BOD092_low.ogg> ;
+    	<http://www.europeana.eu/schemas/edm/isShownAt> <http://cocoon.huma-num.fr/exist/crdo/meta/crdo-BOD092_SOUND> ;
+    	<http://www.europeana.eu/schemas/edm/isShownBy> <http://cocoon.huma-num.fr/data/archi/masters/350801.mp4> ;
+    	<http://www.europeana.eu/schemas/edm/provider> "Corpus de la Parole"@fr ;
+    	<http://www.europeana.eu/schemas/edm/rights> <http://creativecommons.org/licenses/by-nc-nd/4.0/> .
+
+    <http://cocoon.huma-num.fr/data/archi/masters/350801.mp4> a <http://www.europeana.eu/schemas/edm/WebResources> ;
+    	<http://purl.org/dc/elements/1.1/format> "video/mp4"^^<http://purl.org/dc/terms/IMT> ;
+    	<http://purl.org/dc/terms/created> "2001-03"^^<http://purl.org/dc/terms/W3CDTF> ;
+    	<http://purl.org/dc/terms/extent> "PT00H01M54S" ;
+    	<http://purl.org/dc/terms/issued> "2013-06-04T22:39:21+02:00"^^<http://purl.org/dc/terms/W3CDTF> .
+
+    <http://cocoon.huma-num.fr/data/boutet/BOD092_low.mp4> a <http://www.europeana.eu/schemas/edm/WebResources> ;
+    	<http://purl.org/dc/elements/1.1/format> "video/mp4"^^<http://purl.org/dc/terms/IMT> ;
+    	<http://purl.org/dc/terms/created> "2001-03"^^<http://purl.org/dc/terms/W3CDTF> ;
+    	<http://purl.org/dc/terms/extent> "PT00H01M54S" ;
+    	<http://purl.org/dc/terms/issued> "2013-06-04T22:39:21+02:00"^^<http://purl.org/dc/terms/W3CDTF> ;
+    	<http://www.europeana.eu/schemas/edm/isDerivativeOf> <http://cocoon.huma-num.fr/data/archi/masters/350801.mp4> .
 
-    <http://lexvo.org/id/iso639-3/und> rdfs:label "Langue des signes émergente"@fr .
-
-    <http://viaf.org/viaf/202009521> rdfs:label "Boutet, Dominique" ;
-        <http://xmlns.com/foaf/0.1/status> "depositor"^^<http://www.language-archives.org/OLAC/1.1/role> .
+    <http://cocoon.huma-num.fr/data/boutet/BOD092_low.ogg> a <http://www.europeana.eu/schemas/edm/WebResources> ;
+    	<http://purl.org/dc/elements/1.1/format> "video/ogg"^^<http://purl.org/dc/terms/IMT> ;
+    	<http://purl.org/dc/terms/created> "2001-03"^^<http://purl.org/dc/terms/W3CDTF> ;
+    	<http://purl.org/dc/terms/extent> "PT00H01M54S" ;
+    	<http://purl.org/dc/terms/issued> "2013-06-04T22:39:21+02:00"^^<http://purl.org/dc/terms/W3CDTF> ;
+    	<http://www.europeana.eu/schemas/edm/isDerivativeOf> <http://cocoon.huma-num.fr/data/archi/masters/350801.mp4> .
 
-    <http://viaf.org/viaf/74053259> rdfs:label "Cuxac, Christian" ;
-        <http://xmlns.com/foaf/0.1/status> "depositor"^^<http://www.language-archives.org/OLAC/1.1/role> .
+    <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-BOD092_SOUND> a <http://www.europeana.eu/schemas/edm/ProvidedCHO> ;
+    	<http://purl.org/dc/terms/created> "2001-03"^^<http://purl.org/dc/terms/W3CDTF> ;
+    	<http://purl.org/dc/terms/extent> "PT00H01M54S" ;
+    	<http://purl.org/dc/terms/issued> "2013-06-04T22:39:21+02:00"^^<http://purl.org/dc/terms/W3CDTF> ;
+    	<http://purl.org/dc/elements/1.1/contributor> <http://viaf.org/viaf/202009521> , <http://viaf.org/viaf/74053259> , "Fiore, Sonia" , <http://viaf.org/viaf/207122465> , "Lacroix, Magdalena" , "Ivaldo" , "Lucia" ;
+    	<http://purl.org/dc/elements/1.1/description> """Cette séquence fait partie du corpus vidéo de Langue des
+    		Signes Emergentes utilisé lors de la thèse d'Ivani Fusellier-Souza : le locuteur Ivaldo
+    		raconte que son oncle Geraldo est riche mais n'est pas radin, et qu'il y a très
+    		longtemps lorsque les affaires marchaient pour son"""@fr ;
+    	<http://purl.org/dc/elements/1.1/language> <http://lexvo.org/id/iso639-3/und> ;
+    	<http://purl.org/dc/elements/1.1/rights> "Copyright (c) Cuxac, Christian" ;
+    	<http://purl.org/dc/elements/1.1/subject> <http://ark.bnf.fr/ark:/12148/cb11946662b> , <http://ark.bnf.fr/ark:/12148/cb119339867> , <http://ark.bnf.fr/ark:/12148/cb11963612g> , "general_linguistics"^^<http://www.language-archives.org/OLAC/1.1/linguistic-field> , <http://ark.bnf.fr/ark:/12148/cb11965628b> , <http://lexvo.org/id/iso639-3/und> , <http://ark.bnf.fr/ark:/12148/cb119677899> , <http://ark.bnf.fr/ark:/12148/cb119511608> , <http://ark.bnf.fr/ark:/12148/cb16648129s> ;
+    	<http://purl.org/dc/elements/1.1/title> "Corpus LS émergente, L'oncle Geraldo, raconté par Ivaldo"@fr ;
+    	<http://purl.org/dc/elements/1.1/type> "dialogue"^^<http://www.language-archives.org/OLAC/1.1/discourse-type> , "primary_text"^^<http://www.language-archives.org/OLAC/1.1/linguistic-type> , <http://purl.org/dc/dcmitype/MovingImage> ;
+    	<http://purl.org/dc/terms/accessRights> "Freely available for non-commercial use" ;
+    	<http://purl.org/dc/terms/available> "2013-06-04"^^<http://purl.org/dc/terms/W3CDTF> ;
+    	<http://purl.org/dc/terms/isPartOf> <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-COLLECTION_LANGUESDEFRANCE> ;
+    	<http://purl.org/dc/terms/license> <http://creativecommons.org/licenses/by-nc-nd/2.5/> ;
+    	<http://purl.org/dc/terms/spatial> _:genid-25e7608caea646d5ba7b21eaf92c050f-genid1 ;
+    	<http://www.language-archives.org/OLAC/1.1/depositor> <http://viaf.org/viaf/202009521> , <http://viaf.org/viaf/74053259> ;
+    	<http://www.language-archives.org/OLAC/1.1/interviewer> <http://viaf.org/viaf/207122465> ;
+    	<http://www.language-archives.org/OLAC/1.1/speaker> "Ivaldo" , "Lucia" ;
+    	<http://purl.org/dc/terms/tableOfContents> "00:00:00>00:00:45 Ivaldo raconte que son oncle Geraldo est riche. C'est un homme cultivé, qui a beaucoup d'argent. Il habite près de l'aéroport, où habite également l'amie de Lucia. La femme à Geraldo aussi est riche. 00:00:45>00:00:46 Lucia dit qu'il est riche, tant mieux pour lui. 00:00:46>00:01:55 Ivaldo raconte que son oncle était riche mais généreux. Il lui donne des billets d'avion pour voyager. Il lui donne également des vêtements. Ensuite, Ivaldo raconte qu'avant, son père était aisé et c'est l'oncle Geraldo qui ne l'était pas. Alors son père aidait l'oncle Geraldo car les affaires allaient bien. Mais par la suite, les affaires ont chutées et pour l'oncle Geraldo elles montaient."@fr ;
+    	<http://www.language-archives.org/OLAC/1.1/compiler> <http://viaf.org/viaf/202009521> , <http://viaf.org/viaf/74053259> ;
+    	<http://www.language-archives.org/OLAC/1.1/data_inputter> <http://viaf.org/viaf/202009521> , "Fiore, Sonia" , "Lacroix, Magdalena" ;
+    	<http://purl.org/dc/terms/alternative> "Séquence 13, L'oncle Geraldo, raconté par Ivaldo"@fr ;
+    	<http://www.language-archives.org/OLAC/1.1/author> <http://viaf.org/viaf/207122465> ;
+    	<http://www.language-archives.org/OLAC/1.1/translator> <http://viaf.org/viaf/207122465> .
+EOT;
 
-EOD;
 #""" comment for syntax highliting
 
     private $documentRepository;
@@ -103,11 +119,11 @@
     }
 
     public function testShow() {
-        $res_doc = new EasyRdf\Graph('http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-BOD092_SOUND',DocumentListControllerTest::GET_DOC);
+        $res_doc = new EasyRdf\Graph('http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-BOD092_SOUND',DocumentListControllerTest::GET_DOC);
         $this->documentRepository
             ->shouldReceive('get')
             ->once()
-            ->andReturn(new Document('http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-BOD092_SOUND', $res_doc));
+            ->andReturn(new Document('http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-BOD092_SOUND', $res_doc));
 
         $response = $this->visit('/bo/docs/crdo-BOD092_SOUND');
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/server/src/tests/Controllers/ViafControllerTest.php	Thu Dec 10 17:04:51 2015 +0100
@@ -0,0 +1,84 @@
+<?php
+
+use Mockery as m;
+
+use CorpusParole\Services\ViafResolverException;
+
+/**
+ *
+ */
+class ViafControllerTest extends TestCase {
+
+    private $viafResolver;
+
+    public function setUp() {
+
+        parent::setup();
+
+        // create a mock of the post repository interface and inject it into the
+        // IoC container
+        $this->viafResolver = m::mock('CorpusParole\Services\ViafResolverInterface');
+        $this->app->instance('CorpusParole\Services\ViafResolverInterface', $this->viafResolver);
+    }
+
+    public function tearDown() {
+        m::close();
+        parent::tearDown();
+    }
+
+    public function testShow() {
+        $this->viafResolver
+            ->shouldReceive('getNames')
+            ->with(['93752300', '56666014'])
+            ->once()
+            ->andReturn([
+                '56666014' => 'Guylaine Brun-Trigaud',
+                '93752300' => 'Sonia Branca-Rosoff'
+            ]);
+        $response = $this->get('/api/v1/viaf/93752300,56666014')->
+            seeJsonEquals(['viafids' => [
+                '56666014' => 'Guylaine Brun-Trigaud',
+                '93752300' => 'Sonia Branca-Rosoff'
+            ]]);
+    }
+
+    public function testShowOne() {
+        $this->viafResolver
+            ->shouldReceive('getNames')
+            ->with(['93752300'])
+            ->once()
+            ->andReturn([
+                '93752300' => 'Sonia Branca-Rosoff'
+            ]);
+        $response = $this->get('/api/v1/viaf/93752300')->
+            seeJsonEquals(['viafids' => [
+                '93752300' => 'Sonia Branca-Rosoff'
+            ]]);
+    }
+
+    public function testShowUnknown() {
+        $this->viafResolver
+            ->shouldReceive('getNames')
+            ->with(['12345'])
+            ->once()
+            ->andReturn([
+                '12345' => null
+            ]);
+        $response = $this->get('/api/v1/viaf/12345')->
+            seeJsonEquals(['viafids' => [
+                '12345' => null
+            ]]);
+    }
+
+    public function testShowMalformed() {
+        $this->viafResolver
+            ->shouldReceive('getNames')
+            ->with(['abcdef','ghij'])
+            ->once()
+            ->andThrow('CorpusParole\Services\ViafResolverException', "ViafId not in correct format", 400);
+        $response = $this->get('/api/v1/viaf/abcdef,ghij');
+
+        $this->assertResponseStatus(400);
+    }
+
+}
--- a/server/src/tests/Models/DocumentTest.php	Thu Dec 10 17:00:59 2015 +0100
+++ b/server/src/tests/Models/DocumentTest.php	Thu Dec 10 17:04:51 2015 +0100
@@ -1,6 +1,7 @@
 <?php
 
 use CorpusParole\Models\Document;
+use CorpusParole\Libraries\CocoonUtils;
 
 /**
  *
@@ -8,90 +9,189 @@
 class DocumentTest extends TestCase {
 
     const TEST_DOC = <<<EOT
-    @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
-    @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
-    @prefix sesame: <http://www.openrdf.org/schema/sesame#> .
+    @prefix ore: <http://www.openarchives.org/ore/terms/> .
+    @prefix edm: <http://www.europeana.eu/schemas/edm/> .
+    @prefix dc11: <http://purl.org/dc/elements/1.1/> .
+    @prefix olac: <http://www.language-archives.org/OLAC/1.1/> .
+    @prefix dc: <http://purl.org/dc/terms/> .
+    @prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> .
+    @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+    @prefix skos: <http://www.w3.org/2004/02/skos/core#> .
     @prefix owl: <http://www.w3.org/2002/07/owl#> .
-    @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
-    @prefix fn: <http://www.w3.org/2005/xpath-functions#> .
+
+    <http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-CFPP2000_35_SOUND>
+      a ore:Aggregation ;
+      edm:aggregatedCHO <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-CFPP2000_35_SOUND> ;
+      edm:provider "Corpus de la Parole"@fr ;
+      edm:dataProvider <http://viaf.org/viaf/142432638> ;
+      edm:isShownAt <http://cocoon.huma-num.fr/exist/crdo/meta/crdo-CFPP2000_35_SOUND> ;
+      edm:isShownBy <http://cocoon.huma-num.fr/data/archi/masters/372593.wav> ;
+      edm:rights <http://creativecommons.org/licenses/by-nc-sa/4.0/> ;
+      edm:hasView <http://cocoon.huma-num.fr/data/cfpp2000/Ozgur_Kilic_H_32_alii_3e-2.wav>, <http://cocoon.huma-num.fr/data/cfpp2000/Ozgur_Kilic_H_32_alii_3e-2.mp3>, <http://cocoon.huma-num.fr/exist/crdo/cfpp2000/fra/Ozgur_Kilic_H_32_alii_3e-2.xml>,  <http://cocoon.huma-num.fr/exist/crdo/cfpp2000/fra/Ozgur_Kilic_H_32_alii_3e-2.xhtml>.
 
-    <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-ALA_608> <http://purl.org/dc/elements/1.1/description> "Extrait des enquêtes dialectologiques en vue de constituer un atlas linguistique de l'Alsace."@fr ;
-    	<http://purl.org/dc/elements/1.1/format> "audio/x-wav"^^<http://purl.org/dc/terms/IMT> ;
-    	<http://purl.org/dc/elements/1.1/type> <http://purl.org/dc/dcmitype/Sound> , "primary_text"^^<http://www.language-archives.org/OLAC/1.1/linguistic-type> , "dialogue"^^<http://www.language-archives.org/OLAC/1.1/discourse-type> ;
-    	<http://purl.org/dc/elements/1.1/subject> <http://lexvo.org/id/iso639-3/gsw> , "lexicography"^^<http://www.language-archives.org/OLAC/1.1/linguistic-field> , "phonetics"^^<http://www.language-archives.org/OLAC/1.1/linguistic-field> , "anthropological_linguistics"^^<http://www.language-archives.org/OLAC/1.1/linguistic-field> ;
-    	<http://purl.org/dc/elements/1.1/language> <http://lexvo.org/id/iso639-3/gsw> ;
-    	<http://www.language-archives.org/OLAC/1.1/depositor> <http://viaf.org/viaf/9122216> ;
-    	<http://purl.org/dc/elements/1.1/publisher> "Atlas linguistiques, cultures et parlers régionaux de France" ;
-    	<http://purl.org/dc/elements/1.1/rights> "Copyright (c) Département de dialectologie alsacienne et mosellane de l'Université de Strasbourg" ;
-    	<http://purl.org/dc/elements/1.1/title> "Atlas Linguistique et ethnographique de l'Alsace - Enquetes sur la conscience linguistique - ALA_608"@fr ;
-    	<http://www.language-archives.org/OLAC/1.1/interviewer> "Bothorel-Witz, Arlette" , "Huck, Dominique" ;
-    	<http://purl.org/dc/terms/isFormatOf> <http://cocoon.huma-num.fr/data/ala/ALA_608_22km.wav> , <http://cocoon.huma-num.fr/data/ala/ALA_608.mp3> ;
-    	<http://purl.org/dc/terms/accessRights> "Freely available for non-commercial use" ;
-    	<http://purl.org/dc/terms/license> <http://creativecommons.org/licenses/by-nc-nd/2.5/> ;
-    	<http://purl.org/dc/terms/isPartOf> <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-COLLECTION_ALA_CL> , <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-COLLECTION_LANGUESDEFRANCE> ;
-    	<http://purl.org/dc/terms/extent> "PT02H04M16S" ;
-    	<http://purl.org/dc/terms/created> "start=1980; end=1989; name=années 80"^^<http://purl.org/dc/terms/Period> ;
-    	<http://purl.org/dc/terms/spatial> "France, Alsace"@fr , "FR"^^<http://purl.org/dc/terms/ISO3166> ;
-    	<http://crdo.risc.cnrs.fr/schemas/master> <http://cocoon.huma-num.fr/data/ala/masters/ALA_608.wav> ;
-    	<http://purl.org/dc/terms/available> "2004-07-03"^^<http://purl.org/dc/terms/W3CDTF> ;
-    	<http://purl.org/dc/terms/issued> "2014-11-04T16:25:54+01:00"^^<http://purl.org/dc/terms/W3CDTF> .
+    <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-CFPP2000_35_SOUND>
+      a edm:ProvidedCHO ;
+      dc11:description "Enregistrement issu du Corpus de Français Parlé Parisien des années 2000 (CFPP2000)"@fr, "Enregistrement: Caractéristiques de l'enregistrement; Identifiant : CFPP2000 [03-01] Ozgur_Kilic_H_32_alii_3e; Langue : français; Editeur : Université Paris III – Syled ; Date : 17.11.2010; Lieu de l'enregistrement : au domicile de l’enquêté Özgur KILIÇ ; Enquêteur : Sonia BRANCA-ROSOFF; Quartier(s) concerné(s) : Paris 3e, et 20e (pour l’âge adulte); Transcription : Noalig TANGUY; Anonymisation : Noalig TANGUY; Durée : 0h46’; "@fr, "Enquêteur: Etat civil; Prénom et NOM : Sonia BRANCA-ROSOFF; Sexe : féminin; Lieu de naissance : New-York (USA); Lieu la petite enfance : Bretagne, puis région parisienne, puis de 8 à 16 ans Nice; Date de naissance : 16.12.1947; Situation familiale : mariée, deux enfants; Mobilité géographique : Paris 1967-1971, Aix-en-Provence 1971-1996, Paris 1996-2012; Scolarité; Niveau : Primaire [X] Secondaire [X] ; Supérieur : Licence [X] Post-licence [X] ; Dernier diplôme, avec année d’obtention : Doctorat d’État (sciences du langage) 1987; Travail; Activité actuelle : Enseignante-chercheuse (linguistique française), Université de la Sorbonne Nouvelle-Paris III, Paris; Activités passées : ; Langues; Langue première : français; Parents (profession, lieu de naissance, scolarité…); Mère : née en 1916 à Nice (France), interprète de conférences ; licence d’anglais; Père : né en 1913 à Mananjary (Madagascar), ingénieur.; "@fr, "Enquêté 1: Etat civil; Prénom et NOM fictifs : Özgur KILIÇ ; Sexe : masculin; Lieu de naissance: Paris 11e, France; Lieu la petite enfance : Paris 11e, France; Date de naissance : 07.02.1979; Age au moment de l’enregistrement : 32 ans; Situation familiale : pacsé, deux enfants; Mobilité géographique : 3e, 18e, 20e arrondissements; Relation (parenté, ami, etc) avec Enquêteur : aucune; Relation (parenté, ami, etc) avec autres enquêtés : amis; Scolarité; Niveau : Primaire [X] Secondaire [X] ; Supérieur : Licence [X] Post-licence [X] ; Dernier diplôme, avec année d’obtention : ; Précisions : Primaire  st Merri 75003 ; Secondaire : Victor Hugo, Turgot 75003, Jean Lurçat 75013 général bac ES Supérieur. Puis St Denis université (cinéma); Travail; Activité actuelle : ingénieur du son pour l'audiovisuel; Activités passées : restauration, assistant son pour l'audiovisuel ; Langues; Langues pratiquées : français, anglais, turc; Parents (profession, lieu de naissance, scolarité…); Mère : psychothérapeute, né a Houilles région parisienne France; Père : professeur d'université, né a Istanbul en Turquie.  ; "@fr, "Enquêté 2: Etat civil; Prénom et NOM fictifs : Michel CHEVRIER; Sexe : masculin; Lieu de naissance : naissance à Boulogne-Billancourt (92); Lieu la petite enfance : rue du Temple, 3e arrondissement, Paris; Date de naissance : 01.06.1979; Age au moment de l’enregistrement : 31 ans; Situation familiale : concubinage; Mobilité géographique : 3e, puis 20e (entre 2005 et 2009) puis Romainville (depuis 2009); Relation (parenté, ami, etc) avec Enquêteur : ; Relation (parenté, ami, etc) avec Enquêté NOM : ; Relation (parenté, ami, etc) avec Enquêté NOM : ; Prénom et NOM réels : ; Réseau par lequel contacté : ; Adresse (si connue) : ; Téléphone (si connu) : ; Scolarité; Niveau : Primaire [X] Secondaire [X] ; Supérieur : Licence [X] Post-licence [X] ; Dernier diplôme, avec année d’obtention : ; Précisions : Primaire : École à aire ouverte rue St Merri 75003 ; Secondaire (Collège Victor Hugo 75003) puis Lycée Autogéré de Paris (75015) Bac Littéraire. Deux années au CIM (école de jazz) dans le 75018, puis 3 ans au conservatoire du 9eme; Travail; Activité actuelle : Musicien, Compositeur, Professeur de piano jazz ; Activités passées : Musicien; Langues; Langues pratiquées : français, anglais; Parents (profession, lieu de naissance, scolarité…); Mère : ancienne médecin généraliste pneumologue, puis sociologue, née en France; Père : enseignant en sciences de l'éducation à Paris 8 né en Belgique; "@fr, "Enquêté 3: Etat civil; Prénom et NOM fictifs : Benoît DU BREUIL-DE-PONT-EN-AUGE; Sexe : masculin; Lieu de naissance : Paris 14e; Lieu la petite enfance :  Paris 3e; Date de naissance : 28.11.1978; Age au moment de l’enregistrement : 32 ans; Situation familiale : concubinage avéré, avec papier de la mairie tamponné et signé!; Mobilité géographique : à 2 ans vit dans le 9°, puis déménage pour le 3°, est resté dans la même rue pendant 20 ans tout en changeant d'immeuble. Ensuite le 19° pendant 4 ans, puis Pantin 6 mois puis Les Lilas. ; Relation (parenté, ami, etc) avec Enquêteur : aucune; Relation (parenté, ami, etc) avec autres enquêtés : voir Scolarité, Précisions; Prénom et NOM réels : ; Réseau par lequel contacté : ; Scolarité; Niveau : Primaire [X] Secondaire [X] ; Supérieur : Licence [ ] Post-licence [ ] ; Dernier diplôme, avec année d’obtention : CAP; Précisions : Primaire école à aire ouverte (St Merri) dans le 4° avec Augustin, Ôzgur, Michel. Secondaire : collège Victor-Hugo dans le 3° avec Ôzgur ; puis CAP ; Travail; Activité actuelle : ; Activités passées : ébéniste agenceur puis ébéniste restaurateur et enfin constructeur décors (ainsi que de nombreux petits jobs ayant duré moins d'un an); Langues; Langues pratiquées : français; Parents (profession, lieu de naissance, scolarité…); Mère : à la retraite ; secrétaire de rédaction dans un grand journal, baccalauréat ; née à Montrouge; Père : conseiller à travail à pole emploi, né à Boulogne Billancourt, baccalauréat présenté 3 ou 4 fois, puis obtenu par équivalence. ; "@fr, "Enquêté 4: Etat civil; Enquêté 4; Prénom et NOM fictifs : ; Sexe : féminin / masculin; Lieu de naissance : Paris 14e; Lieu de la petite enfance : Paris 4e et 3e ; Date de naissance : 06.12.1976; Age au moment de l’enregistrement : 34 ans; Situation familiale : ; Mobilité géographique : Rue la Bruyère 75009 (1976-1978), Rambuteau 75004 (1978-1987/88) & 75003 (chgt de côté de rue 1988-1998), a quitté Paris de 1998 à 2005 ; Rue Rambuteau 75003 (2006-2010), rue Gossec 75012 (2011); Relation (parenté, ami, etc) avec Enquêteur : aucune; Relation (parenté, ami, etc) avec Enquêté 2 : ami; Relation (parenté, ami, etc) avec Enquêté NOM : ; Réseau par lequel contacté : ; Scolarité; Niveau : Primaire [X] Secondaire [X] ; Supérieur : Licence [X] Post-licence [X] ; Dernier diplôme, avec année d’obtention : ; Précisions : Primaire : Ecole St Merri 75003. Secondaire : Collège François Couperin 75004, Institut St Pierre Fourier 75012 ; Cours Charlemagne 75014 ; Travail; Activité actuelle : Superviseur Centre d'appels ; Activités passées : Animateur Club Enfant, Réceptionniste ; Langues; Langues pratiquées :; Parents (profession, lieu de naissance, scolarité…); Mère : retraitée, Paris, bac + 1/2 (?) ; Père : Conseiller Pôle Emploi, Paris, bac. ; "@fr, "Enquêté 5: Etat civil; Prénom et NOM fictifs : Étienne SALVEGAS; Sexe : masculin; Lieu de naissance : Paris 12e; Lieu de la petite enfance : Paris 3e Le Marais; Date de naissance :  16.06.1978; Age au moment de l’enregistrement : 32 ans; Situation familiale : marié 1 enfant, 12 ans de vie commune ; Mobilité géographique : 3e (1978-1999) 19e (1999-2002) 9e (2002-2011) ; Relation (parenté, ami, etc) avec Enquêteur : ; Relation (parenté, ami, etc) avec Enquêté 2 : ami ; Relation (parenté, ami, etc) avec Enquêté NOM : ; Prénom et NOM réels : ; Scolarité; Primaire [X] Secondaire [X] ; Supérieur : Licence [X] Post-licence [ ] ; Dernier diplôme, avec année d’obtention : ; Précisions : Primaire : Ecole Vertus, rue des Vertus 3ème. Secondaire Collège Montgolfier / Lycée Turgot 3ème. Supérieur Droit Univ. Paris Panthéon Sorbonne ; Travail; Activité actuelle : évènementiel; Activités passées : stagiaire journaliste sportif / relations publiques, accueil, agent de  sécurité, remplacement gardien, réceptionniste hôtellerie.; Langues; Langues pratiquées :; Parents (profession, lieu de naissance, scolarité…); Mère : né à Paris, lycée ; Père : né à Oloron (64), lycée ; "@fr ;
+      dc11:language <http://lexvo.org/id/iso639-3/fra> ;
+      dc11:publisher <http://viaf.org/viaf/142432638> ;
+      dc11:type <http://purl.org/dc/dcmitype/Sound>, "primary_text"^^olac:linguistic-type, "narrative"^^olac:discourse-type, "report"^^olac:discourse-type, "unintelligible_speech"^^olac:discourse-type ;
+      dc:license <http://creativecommons.org/licenses/by-nc-sa/3.0/> ;
+      dc11:subject "lexicography"^^olac:linguistic-field, "phonetics"^^olac:linguistic-field, "anthropological_linguistics"^^olac:linguistic-field, "general_linguistics"^^olac:linguistic-field, <http://lexvo.org/id/iso639-3/fra>, "text_and_corpus_linguistics"^^olac:linguistic-field, "phonology"^^olac:linguistic-field, "semantics"^^olac:linguistic-field, "sociolinguistics"^^olac:linguistic-field, "syntax"^^olac:linguistic-field, "typology"^^olac:linguistic-field, "discourse_analysis"^^olac:linguistic-field, "historical_linguistics"^^olac:linguistic-field, "language_documentation"^^olac:linguistic-field, "mathematical_linguistics"^^olac:linguistic-field ;
+      dc11:title "CFPP2000 [03-01] Ozgur_Kilic_H_32_alii_3e Entretien de Ozgur KILIÇ 2"@fr ;
+      dc:accessRights "Freely available for non-commercial use" ;
+      dc:extent "PT48M26S" ;
+      dc:isPartOf <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-COLLECTION_LANGUESDEFRANCE>, <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-COLLECTION_CFPP2000> ;
+      dc11:source "CFPP2000"@fr ;
+      dc11:coverage "Quartier concerné : 3e"@fr ;
+      olac:depositor <http://viaf.org/viaf/93752300> ;
+      dc11:contributor <http://viaf.org/viaf/93752300>, "Branca-Rosoff, Sonia", "Kiliç Ozgur", "Chevrier Michel", "du-Breuil-de-Pont-en-Auge Benoît", "du-Breuil-de-Pont-en-Auge Augustin", "Salvegas Etienne", "Tanguy Noalig" ;
+      olac:interviewer "Branca-Rosoff, Sonia" ;
+      olac:responder "Kiliç Ozgur", "Chevrier Michel", "du-Breuil-de-Pont-en-Auge Benoît", "du-Breuil-de-Pont-en-Auge Augustin", "Salvegas Etienne" ;
+      olac:transcriber "Tanguy Noalig" ;
+      dc:available "2013-10-12"^^dc:W3CDTF ;
+      dc:created "2010-11-17"^^dc:W3CDTF ;
+      dc:issued "2013-10-12T14:35:57+02:00"^^dc:W3CDTF ;
+      dc:spatial [
+        a edm:Place ;
+        geo:lat "48.83975"^^xsd:float ;
+        geo:long "2.3542"^^xsd:float ;
+        skos:note "FR"^^dc:ISO3166, "France, Paris, Université Sorbonne Nouvelle Paris 3, site Censier"@fr ;
+        owl:sameAs <http://vocab.getty.edu/tgn/7008038>
+      ] .
 
-    <http://lexvo.org/id/iso639-3/gsw> rdfs:label "Alsacien"@fr .
+    <http://cocoon.huma-num.fr/data/archi/masters/372593.wav>
+      a edm:WebResources ;
+      dc:extent "PT48M26S" ;
+      dc11:format "audio/x-wav"^^dc:IMT ;
+      dc:created "2010-11-17"^^dc:W3CDTF ;
+      dc:issued "2013-10-12T14:35:57+02:00"^^dc:W3CDTF .
+
+    <http://cocoon.huma-num.fr/data/cfpp2000/Ozgur_Kilic_H_32_alii_3e-2.wav>
+      a edm:WebResources ;
+      dc:extent "PT48M26S" ;
+      dc11:format "audio/x-wav"^^dc:IMT ;
+      edm:isDerivativeOf <http://cocoon.huma-num.fr/data/archi/masters/372593.wav> ;
+      dc:created "2010-11-17"^^dc:W3CDTF ;
+      dc:issued "2013-10-12T14:35:57+02:00"^^dc:W3CDTF .
 
-    <http://viaf.org/viaf/9122216> rdfs:label "Huck, Dominique" ;
-    	<http://xmlns.com/foaf/0.1/status> "depositor"^^<http://www.language-archives.org/OLAC/1.1/role> .
+    <http://cocoon.huma-num.fr/data/cfpp2000/Ozgur_Kilic_H_32_alii_3e-2.mp3>
+      a edm:WebResources ;
+      dc:extent "PT48M26S" ;
+      dc11:format "audio/mpeg"^^dc:IMT ;
+      edm:isDerivativeOf <http://cocoon.huma-num.fr/data/archi/masters/372593.wav> ;
+      dc:created "2010-11-17"^^dc:W3CDTF ;
+      dc:issued "2013-10-12T14:35:57+02:00"^^dc:W3CDTF .
+
+    <http://cocoon.huma-num.fr/exist/crdo/cfpp2000/fra/Ozgur_Kilic_H_32_alii_3e-2.xml>
+        a edm:WebResources ;
+        dc11:format "application/xml"^^dc:IMT ;
+        dc:created "2010-11-17"^^dc:W3CDTF ;
+        dc:issued "2013-11-04T22:20:07+01:00"^^dc:W3CDTF .
+
+    <http://cocoon.huma-num.fr/exist/crdo/cfpp2000/fra/Ozgur_Kilic_H_32_alii_3e-2.xhtml>
+        a edm:WebResources ;
+        dc11:format "application/xhtml+xml"^^dc:IMT ;
+        dc:created "2010-11-17"^^dc:W3CDTF ;
+        dc:issued "2013-11-04T22:20:07+01:00"^^dc:W3CDTF .
 EOT;
 
 
     public function setUp() {
 
         parent::setup();
-        $this->graph = new EasyRdf\Graph("http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-ALA_608", DocumentTest::TEST_DOC);
+        $this->graph = new EasyRdf\Graph("http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-CFPP2000_35_SOUND", DocumentTest::TEST_DOC);
 
     }
 
     public function testConstructor() {
         $this->assertNotNull($this->graph, 'Graph shoud not be null');
 
-        $doc = new Document("http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-ALA_608", $this->graph);
+        $doc = new Document("http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-CFPP2000_35_SOUND", $this->graph);
 
-        $this->assertEquals('crdo-ALA_608',$doc->getId(),'Must have the correct id');
+        $this->assertEquals('crdo-CFPP2000_35_SOUND',$doc->getId(),'Must have the correct id');
     }
 
     public function testTitle() {
         $this->assertNotNull($this->graph, 'Graph shoud not be null');
 
-        $doc = new Document("http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-ALA_608", $this->graph);
+        $doc = new Document("http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-CFPP2000_35_SOUND", $this->graph);
 
-        $this->assertEquals("Atlas Linguistique et ethnographique de l'Alsace - Enquetes sur la conscience linguistique - ALA_608",$doc->getTitle(),'Must have correct title');
+        $this->assertEquals("CFPP2000 [03-01] Ozgur_Kilic_H_32_alii_3e Entretien de Ozgur KILIÇ 2",$doc->getTitle(),'Must have correct title');
         $this->assertInstanceOf(EasyRdf\Literal::class, $doc->getTitle(), "Title must be a literal");
         $this->assertEquals('fr', $doc->getTitle()->getLang(), "Language title must be fr");
     }
 
-    public function testPublisher() {
+    public function testModified() {
+        $this->assertNotNull($this->graph, 'Graph shoud not be null');
 
-        $doc = new Document("http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-ALA_608", $this->graph);
-
-        $this->assertCount(1, $doc->getPublishers(), 'Publisher is an array of size 1');
-        $this->assertEquals(new EasyRdf\Literal("Atlas linguistiques, cultures et parlers régionaux de France",null,null), $doc->getPublishers()[0], "Must contains correct publisher");
+        $doc = new Document("http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-CFPP2000_35_SOUND", $this->graph);
+        $this->assertInstanceOf(EasyRdf\Literal::class, $doc->getModified(), "Modified must be a literal");
+        $this->assertEquals("http://purl.org/dc/terms/W3CDTF", $doc->getModified()->getDatatypeURI(), "type must be http://purl.org/dc/terms/W3CDTF");
+        $this->assertEquals("2013-10-12T14:35:57+02:00", $doc->getModified(), "modified must be 2013-10-12T14:35:57+02:00");
 
     }
 
-    public function testMediaArray() {
-        $doc = new Document("http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-ALA_608", $this->graph);
+
+    public function testPublisher() {
+
+        $doc = new Document("http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-CFPP2000_35_SOUND", $this->graph);
 
-        $this->assertCount(3, $doc->getMediaArray(), "Media array must be of size 3");
-        foreach($doc->getMediaArray() as $media) {
-            $this->assertCount(2, $media, "media is a 2 element array");
+        $this->assertCount(1, $doc->getPublishers(), 'Publisher is an array of size 1');
+        $this->assertInstanceOf('EasyRdf\Resource', $doc->getPublishers()[0], 'publisher is a resource');
+        $this->assertEquals("http://viaf.org/viaf/142432638", $doc->getPublishers()[0]->getUri(),"");
+    }
+
+    public function testMediaArray() {
+        $doc = new Document("http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-CFPP2000_35_SOUND", $this->graph);
+
+        $this->assertCount(5, $doc->getMediaArray(), "Media array must be of size 5");
+        foreach($doc->getMediaArray() as $url => $media) {
+            $this->assertCount(5, $media, "media is a 5 element array");
             $this->assertArrayHasKey('format', $media, "media has 'format key'");
             $this->assertArrayHasKey('url', $media, "media has url");
+            $this->assertArrayHasKey('extent', $media, "media has extent");
+            $this->assertArrayHasKey('extent_ms', $media, "media has extent_ms");
+            $this->assertArrayHasKey('master', $media, "media has master");
+
+            $this->assertEquals($media['url'], $url);
+
+            $this->assertContains(
+                $media['url'],
+                [ "http://cocoon.huma-num.fr/data/cfpp2000/Ozgur_Kilic_H_32_alii_3e-2.wav",
+                  "http://cocoon.huma-num.fr/data/cfpp2000/Ozgur_Kilic_H_32_alii_3e-2.mp3",
+                  "http://cocoon.huma-num.fr/exist/crdo/cfpp2000/fra/Ozgur_Kilic_H_32_alii_3e-2.xml",
+                  "http://cocoon.huma-num.fr/exist/crdo/cfpp2000/fra/Ozgur_Kilic_H_32_alii_3e-2.xhtml",
+                  "http://cocoon.huma-num.fr/data/archi/masters/372593.wav"
+                ]
+            );
+            if($url === "http://cocoon.huma-num.fr/data/archi/masters/372593.wav") {
+                $this->assertEquals('audio/x-wav', $media['format']);
+                $this->assertTrue($media['master'] === true, "should be master");
+            }
+            else {
+                $this->assertTrue($media['master'] === false, "should not be master");
+            }
+
+            if( $url === "http://cocoon.huma-num.fr/data/archi/masters/372593.wav" ||
+                $url === "http://cocoon.huma-num.fr/data/cfpp2000/Ozgur_Kilic_H_32_alii_3e-2.mp3" ||
+                $url === "http://cocoon.huma-num.fr/data/cfpp2000/Ozgur_Kilic_H_32_alii_3e-2.wav" ) {
+                $this->assertEquals("PT48M26S", $media['extent'], "extent is PT48M26S");
+                $this->assertGreaterThan(0, $media['extent_ms'], "extent_ms must be > 0");
+                $this->assertStringStartsWith('audio/', $media['format']);
+            }
+            else {
+                $this->assertNull($media['extent'], "no media extent");
+                $this->assertNull($media['extent_ms'], "extend in ms is null");
+                $this->assertStringStartsWith('application/', $media['format']);
+            }
+
         }
     }
 
     public function testGetTypes() {
-        $doc = new Document("http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-ALA_608", $this->graph);
+        $doc = new Document("http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-CFPP2000_35_SOUND", $this->graph);
 
-        $this->assertCount(3, $doc->getTypes(), "types array must be of size 3");
+        $this->assertCount(5, $doc->getTypes(), "types array must be of size 5");
 
         foreach($doc->getTypes() as $type) {
             $this->assertThat(
@@ -105,7 +205,7 @@
     }
 
     public function testGetOtherTypes() {
-        $doc = new Document("http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-ALA_608", $this->graph);
+        $doc = new Document("http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-CFPP2000_35_SOUND", $this->graph);
 
         $this->assertCount(2, $doc->getOtherTypes(), "types array must be of size 3");
 
@@ -121,18 +221,18 @@
     }
 
     public function testGetDiscourseTypes() {
-        $doc = new Document("http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-ALA_608", $this->graph);
+        $doc = new Document("http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-CFPP2000_35_SOUND", $this->graph);
 
-        $this->assertCount(1, $doc->getDiscourseTypes(), "types array must be of size 1");
+        $this->assertCount(3, $doc->getDiscourseTypes(), "types array must be of size 3");
 
         $this->assertContainsOnlyInstancesOf("EasyRdf\Literal", $doc->getDiscourseTypes(), "Result contains only literals");
         $type = $doc->getDiscourseTypes()[0];
-        $this->assertEquals("dialogue", $type, "discourse type is dialogue");
+        $this->assertEquals("narrative", $type->getValue(), "discourse type is narrative");
         $this->assertEquals("http://www.language-archives.org/OLAC/1.1/discourse-type", $type->getDatatypeUri(), "discourse type url");
     }
 
     public function testCloneDocument() {
-        $doc = new Document("http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-ALA_608", $this->graph);
+        $doc = new Document("http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-CFPP2000_35_SOUND", $this->graph);
 
         $doc2 = clone $doc;
 
@@ -143,8 +243,8 @@
     }
 
     public function testIsIsomorphic() {
-        $doc1 = new Document("http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-ALA_608", $this->graph);
-        $doc2 = new Document("http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-ALA_608", new EasyRdf\Graph("http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-ALA_608", DocumentTest::TEST_DOC));
+        $doc1 = new Document("http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-CFPP2000_35_SOUND", $this->graph);
+        $doc2 = new Document("http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-CFPP2000_35_SOUND", new EasyRdf\Graph("http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-CFPP2000_35_SOUND", DocumentTest::TEST_DOC));
 
         $this->assertTrue($doc1->isIsomorphic($doc2),"document must be isomorphic");
 
@@ -155,14 +255,14 @@
 
     public function testUpdateDiscourseTypes() {
 
-        $newDiscourseTypes = ['oratory','dialogue','narrative'];
+        $newDiscourseTypes = ['oratory','dialogue','narrative', 'formulaic', 'ludic'];
 
-        $doc = new Document("http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-ALA_608", $this->graph);
-        $this->assertCount(1, $doc->getDiscourseTypes(), "types array must be of size 1");
+        $doc = new Document("http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-CFPP2000_35_SOUND", $this->graph);
+        $this->assertCount(3, $doc->getDiscourseTypes(), "types array must be of size 3");
 
         $doc->updateDiscourseTypes($newDiscourseTypes);
 
-        $this->assertCount(3, $doc->getDiscourseTypes(), "types array must be of size 3");
+        $this->assertCount(5, $doc->getDiscourseTypes(), "types array must be of size 5");
 
         $discourseTypes = $doc->getDiscourseTypes();
         foreach($newDiscourseTypes as $dt) {
@@ -173,9 +273,9 @@
 
     public function testUpdateDiscourseTypesDelta() {
 
-        $newDiscourseTypes = ['oratory','dialogue','narrative'];
+        $newDiscourseTypes = ['oratory','dialogue','narrative', 'formulaic', 'ludic'];
 
-        $doc = new Document("http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-ALA_608", $this->graph);
+        $doc = new Document("http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-CFPP2000_35_SOUND", $this->graph);
 
         $doc->updateDiscourseTypes($newDiscourseTypes);
 
@@ -185,13 +285,13 @@
 
         $delta = $doc->getDeltaList()[0];
 
-        $this->assertEquals("http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-ALA_608", $delta->getDeletedGraph()->getUri(), "uri of deleted graph must be ok");
-        $this->assertEquals("http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-ALA_608", $delta->getAddedGraph()->getUri(), "uri of added graph must be ok");
+        $this->assertEquals("http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-CFPP2000_35_SOUND", $delta->getDeletedGraph()->getUri(), "uri of deleted graph must be ok");
+        $this->assertEquals("http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-CFPP2000_35_SOUND", $delta->getAddedGraph()->getUri(), "uri of added graph must be ok");
 
-        $this->assertEquals(1, $delta->getDeletedGraph()->countTriples(), "deleted graph must have only one triple");
-        $this->assertEquals(3, $delta->getAddedGraph()->countTriples(), "deleted graph must have only one triple");
+        $this->assertEquals(3, $delta->getDeletedGraph()->countTriples(), "deleted graph must have only 3 triples");
+        $this->assertEquals(5, $delta->getAddedGraph()->countTriples(), "deleted graph must have only 5 triples");
 
-        $resQueryDiscourseType = $delta->getAddedGraph()->allLiterals('http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-ALA_608', 'dc11:type');
+        $resQueryDiscourseType = $delta->getAddedGraph()->allLiterals($doc->getProvidedCHO(), 'dc11:type');
         foreach($resQueryDiscourseType as $dt) {
             $this->assertInstanceOf(EasyRdf\Literal::class, $dt, "This must be a litteral");
             $this->assertEquals('http://www.language-archives.org/OLAC/1.1/discourse-type', $dt->getDatatypeUri(), "The type of the Litteral must be correct");
@@ -206,11 +306,28 @@
 
         $newDiscourseTypes = ['oratory','dialogue','narrative'];
 
-        $doc = new Document("http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-ALA_608", $this->graph);
+        $doc = new Document("http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-CFPP2000_35_SOUND", $this->graph);
         $doc->updateDiscourseTypes($newDiscourseTypes);
 
-        $doc2 = new Document("http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-ALA_608", new EasyRdf\Graph("http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-ALA_608", DocumentTest::TEST_DOC));
+        $doc2 = new Document("http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-CFPP2000_35_SOUND", new EasyRdf\Graph("http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-CFPP2000_35_SOUND", DocumentTest::TEST_DOC));
 
         $this->assertFalse($doc->isIsomorphic($doc2),"document must not be isomorphic after adding discourse type");
     }
+
+    public function testGetContributors() {
+        $doc = new Document("http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-CFPP2000_35_SOUND", $this->graph);
+
+        $contributors = $doc->getContributors();
+
+        $this->assertNotEmpty($contributors, "The contributors array should not be empty");
+        $this->assertCount(8, $contributors, "The contributors array should have 8 elements");
+
+        foreach ($contributors as $contribDef) {
+            $this->assertArrayHasKey('name', $contribDef, "ContribDef must have name key");
+            $this->assertArrayHasKey('url', $contribDef, "ContribDef must have url key");
+            $this->assertArrayHasKey('role', $contribDef, "ContribDef must have role key");
+            $this->assertContains($contribDef['role'], CocoonUtils::OLAC_ROLES, "Role should be in OLAC_ROLES");
+        }
+    }
+
 }
--- a/server/src/tests/Repositories/DocumentRepositoryIntegrationTest.php	Thu Dec 10 17:00:59 2015 +0100
+++ b/server/src/tests/Repositories/DocumentRepositoryIntegrationTest.php	Thu Dec 10 17:04:51 2015 +0100
@@ -34,50 +34,70 @@
 EOT;
 
     const TEST_DOC = <<<EOT
-    <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-ALA_608> <http://xmlns.com/foaf/0.1/primaryTopic> <http://cocoon.huma-num.fr/data/ala/ALA_608_22km.wav> .
-    <http://cocoon.huma-num.fr/data/ala/ALA_608_22km.wav> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Document> .
-    <http://cocoon.huma-num.fr/data/ala/ALA_608_22km.wav> <http://purl.org/dc/elements/1.1/description> "Extrait des enqu\u00EAtes dialectologiques en vue de constituer un atlas linguistique de l'Alsace."@fr .
-    <http://cocoon.huma-num.fr/data/ala/ALA_608_22km.wav> <http://purl.org/dc/elements/1.1/format> "audio/x-wav"^^<http://purl.org/dc/terms/IMT> .
-    <http://cocoon.huma-num.fr/data/ala/ALA_608_22km.wav> <http://purl.org/dc/elements/1.1/type> <http://purl.org/dc/dcmitype/Sound> .
-    <http://cocoon.huma-num.fr/data/ala/ALA_608_22km.wav> <http://purl.org/dc/elements/1.1/type> "primary_text"^^<http://www.language-archives.org/OLAC/1.1/linguistic-type> .
-    <http://cocoon.huma-num.fr/data/ala/ALA_608_22km.wav> <http://purl.org/dc/elements/1.1/type> "dialogue"^^<http://www.language-archives.org/OLAC/1.1/discourse-type> .
-    <http://cocoon.huma-num.fr/data/ala/ALA_608_22km.wav> <http://purl.org/dc/elements/1.1/subject> <http://lexvo.org/id/iso639-3/gsw> .
-    <http://cocoon.huma-num.fr/data/ala/ALA_608_22km.wav> <http://purl.org/dc/elements/1.1/subject> "lexicography"^^<http://www.language-archives.org/OLAC/1.1/linguistic-field> .
-    <http://cocoon.huma-num.fr/data/ala/ALA_608_22km.wav> <http://purl.org/dc/elements/1.1/subject> "phonetics"^^<http://www.language-archives.org/OLAC/1.1/linguistic-field> .
-    <http://cocoon.huma-num.fr/data/ala/ALA_608_22km.wav> <http://purl.org/dc/elements/1.1/subject> "anthropological_linguistics"^^<http://www.language-archives.org/OLAC/1.1/linguistic-field> .
-    <http://cocoon.huma-num.fr/data/ala/ALA_608_22km.wav> <http://purl.org/dc/elements/1.1/language> <http://lexvo.org/id/iso639-3/gsw> .
-    <http://cocoon.huma-num.fr/data/ala/ALA_608_22km.wav> <http://purl.org/dc/elements/1.1/contributor> <http://viaf.org/viaf/9122216> .
-    <http://cocoon.huma-num.fr/data/ala/ALA_608_22km.wav> <http://purl.org/dc/elements/1.1/contributor> _:genid2d5831d84541df446694586ac2006f96042dgenid1 .
-    <http://cocoon.huma-num.fr/data/ala/ALA_608_22km.wav> <http://purl.org/dc/elements/1.1/contributor> _:genid2d5831d84541df446694586ac2006f96042dgenid2 .
-    <http://cocoon.huma-num.fr/data/ala/ALA_608_22km.wav> <http://purl.org/dc/elements/1.1/publisher> "Atlas linguistiques, cultures et parlers r\u00E9gionaux de France" .
-    <http://cocoon.huma-num.fr/data/ala/ALA_608_22km.wav> <http://purl.org/dc/elements/1.1/rights> "Copyright (c) D\u00E9partement de dialectologie alsacienne et mosellane de l'Universit\u00E9 de Strasbourg" .
-    <http://cocoon.huma-num.fr/data/ala/ALA_608_22km.wav> <http://purl.org/dc/elements/1.1/title> "Atlas Linguistique et ethnographique de l'Alsace - Enquetes sur la conscience linguistique - ALA_608"@fr .
-    <http://cocoon.huma-num.fr/data/ala/ALA_608_22km.wav> <http://purl.org/dc/terms/accessRights> "Freely available for non-commercial use" .
-    <http://cocoon.huma-num.fr/data/ala/ALA_608_22km.wav> <http://purl.org/dc/terms/license> <http://creativecommons.org/licenses/by-nc-nd/2.5/> .
-    <http://cocoon.huma-num.fr/data/ala/ALA_608_22km.wav> <http://purl.org/dc/terms/isPartOf> <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-COLLECTION_ALA_CL> .
-    <http://cocoon.huma-num.fr/data/ala/ALA_608_22km.wav> <http://purl.org/dc/terms/isPartOf> <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-COLLECTION_LANGUESDEFRANCE> .
-    <http://cocoon.huma-num.fr/data/ala/ALA_608_22km.wav> <http://purl.org/dc/terms/extent> "PT02H04M16S" .
-    <http://cocoon.huma-num.fr/data/ala/ALA_608_22km.wav> <http://purl.org/dc/terms/created> "start=1980; end=1989; name=ann\u00E9es 80"^^<http://purl.org/dc/terms/Period> .
-    <http://cocoon.huma-num.fr/data/ala/ALA_608_22km.wav> <http://purl.org/dc/terms/spatial> "France, Alsace"@fr .
-    <http://cocoon.huma-num.fr/data/ala/ALA_608_22km.wav> <http://purl.org/dc/terms/spatial> "FR"^^<http://purl.org/dc/terms/ISO3166> .
-    <http://cocoon.huma-num.fr/data/ala/ALA_608_22km.wav> <http://purl.org/dc/terms/isFormatOf> <http://cocoon.huma-num.fr/data/ala/ALA_608.mp3> .
-    <http://cocoon.huma-num.fr/data/ala/ALA_608_22km.wav> <http://purl.org/dc/terms/isFormatOf> <http://cocoon.huma-num.fr/data/ala/masters/ALA_608.wav> .
-    <http://cocoon.huma-num.fr/data/ala/ALA_608_22km.wav> <http://purl.org/dc/terms/available> "2004-07-03"^^<http://purl.org/dc/terms/W3CDTF> .
-    <http://cocoon.huma-num.fr/data/ala/ALA_608_22km.wav> <http://purl.org/dc/terms/issued> "2014-11-04T16:25:54+01:00"^^<http://purl.org/dc/terms/W3CDTF> .
-    <http://lexvo.org/id/iso639-3/gsw> <http://www.w3.org/2000/01/rdf-schema#label> "Alsacien"@fr .
-    <http://viaf.org/viaf/9122216> <http://www.w3.org/2000/01/rdf-schema#label> "Huck, Dominique" .
-    <http://viaf.org/viaf/9122216> <http://xmlns.com/foaf/0.1/status> "depositor"^^<http://www.language-archives.org/OLAC/1.1/role> .
-    _:genid2d5831d84541df446694586ac2006f96042dgenid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Agent> .
-    _:genid2d5831d84541df446694586ac2006f96042dgenid1 <http://xmlns.com/foaf/0.1/name> "Bothorel-Witz, Arlette" .
-    _:genid2d5831d84541df446694586ac2006f96042dgenid1 <http://xmlns.com/foaf/0.1/status> "interviewer"^^<http://www.language-archives.org/OLAC/1.1/role> .
-    _:genid2d5831d84541df446694586ac2006f96042dgenid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Agent> .
-    _:genid2d5831d84541df446694586ac2006f96042dgenid2 <http://xmlns.com/foaf/0.1/name> "Huck, Dominique" .
-    _:genid2d5831d84541df446694586ac2006f96042dgenid2 <http://xmlns.com/foaf/0.1/status> "interviewer"^^<http://www.language-archives.org/OLAC/1.1/role> .
+    @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+    @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+    @prefix sesame: <http://www.openrdf.org/schema/sesame#> .
+    @prefix owl: <http://www.w3.org/2002/07/owl#> .
+    @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+    @prefix fn: <http://www.w3.org/2005/xpath-functions#> .
+
+    _:genid-2267740936ad4d04a567e6787732f0dd-genid1 a <http://www.europeana.eu/schemas/edm/Place> ;
+    	owl:sameAs <http://sws.geonames.org/3038033/> ;
+    	<http://www.w3.org/2004/02/skos/core#note> "northlimit=47.431892250000033; southlimit=49.053971250000046;westlimit=6.846186050000028; eastlimit=8.232571550000074;"^^<http://purl.org/dc/terms/Box> , "FR"^^<http://purl.org/dc/terms/ISO3166> , "France, Alsace"@fr .
+
+    <http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-ALA_738> a <http://www.openarchives.org/ore/terms/Aggregation> ;
+    	<http://www.europeana.eu/schemas/edm/aggregatedCHO> <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-ALA_738> ;
+    	<http://www.europeana.eu/schemas/edm/dataProvider> "Atlas linguistiques, cultures et parlers régionaux de France" ;
+    	<http://www.europeana.eu/schemas/edm/hasView> <http://cocoon.huma-num.fr/data/ala/ALA_738.mp3> , <http://cocoon.huma-num.fr/data/ala/ALA_738_22km.wav> ;
+    	<http://www.europeana.eu/schemas/edm/isShownAt> <http://cocoon.huma-num.fr/exist/crdo/meta/crdo-ALA_738> ;
+    	<http://www.europeana.eu/schemas/edm/isShownBy> <http://cocoon.huma-num.fr/data/ala/masters/ALA_738.wav> ;
+    	<http://www.europeana.eu/schemas/edm/provider> "Corpus de la Parole"@fr ;
+    	<http://www.europeana.eu/schemas/edm/rights> <http://creativecommons.org/licenses/by-nc-nd/4.0/> .
+
+    <http://cocoon.huma-num.fr/data/ala/ALA_738.mp3> a <http://www.europeana.eu/schemas/edm/WebResources> ;
+    	<http://purl.org/dc/elements/1.1/format> "audio/mpeg"^^<http://purl.org/dc/terms/IMT> ;
+    	<http://purl.org/dc/terms/created> "1996"^^<http://purl.org/dc/terms/Period> ;
+    	<http://purl.org/dc/terms/extent> "PT01H11M29S" ;
+    	<http://purl.org/dc/terms/issued> "2014-11-10T14:27:08+01:00"^^<http://purl.org/dc/terms/W3CDTF> ;
+    	<http://www.europeana.eu/schemas/edm/isDerivativeOf> <http://cocoon.huma-num.fr/data/ala/masters/ALA_738.wav> .
+
+    <http://cocoon.huma-num.fr/data/ala/masters/ALA_738.wav> a <http://www.europeana.eu/schemas/edm/WebResources> ;
+    	<http://purl.org/dc/elements/1.1/format> "audio/x-wav"^^<http://purl.org/dc/terms/IMT> ;
+    	<http://purl.org/dc/terms/created> "1996"^^<http://purl.org/dc/terms/Period> ;
+    	<http://purl.org/dc/terms/extent> "PT01H11M29S" ;
+    	<http://purl.org/dc/terms/issued> "2014-11-10T14:27:08+01:00"^^<http://purl.org/dc/terms/W3CDTF> .
+
+    <http://cocoon.huma-num.fr/data/ala/ALA_738_22km.wav> a <http://www.europeana.eu/schemas/edm/WebResources> ;
+    	<http://purl.org/dc/elements/1.1/format> "audio/x-wav"^^<http://purl.org/dc/terms/IMT> ;
+    	<http://purl.org/dc/terms/created> "1996"^^<http://purl.org/dc/terms/Period> ;
+    	<http://purl.org/dc/terms/extent> "PT01H11M29S" ;
+    	<http://purl.org/dc/terms/issued> "2014-11-10T14:27:08+01:00"^^<http://purl.org/dc/terms/W3CDTF> ;
+    	<http://www.europeana.eu/schemas/edm/isDerivativeOf> <http://cocoon.huma-num.fr/data/ala/masters/ALA_738.wav> .
+
+    <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-ALA_738> a <http://www.europeana.eu/schemas/edm/ProvidedCHO> ;
+    	<http://purl.org/dc/terms/created> "1996"^^<http://purl.org/dc/terms/Period> ;
+    	<http://purl.org/dc/terms/extent> "PT01H11M29S" ;
+    	<http://purl.org/dc/terms/issued> "2014-11-10T14:27:08+01:00"^^<http://purl.org/dc/terms/W3CDTF> ;
+    	<http://purl.org/dc/elements/1.1/contributor> <http://viaf.org/viaf/61542329> , <http://viaf.org/viaf/9122216> ;
+    	<http://purl.org/dc/elements/1.1/description> "Extrait des enquêtes dialectologiques en vue de constituer un atlas linguistique de l'Alsace."@fr ;
+    	<http://purl.org/dc/elements/1.1/language> <http://lexvo.org/id/iso639-3/gsw> ;
+    	<http://purl.org/dc/elements/1.1/publisher> "Atlas linguistiques, cultures et parlers régionaux de France" ;
+    	<http://purl.org/dc/elements/1.1/rights> "Copyright (c) Département de dialectologie alsacienne et mosellane de l'Université de Strasbourg" ;
+    	<http://purl.org/dc/elements/1.1/subject> <http://lexvo.org/id/iso639-3/gsw> , <http://ark.bnf.fr/ark:/12148/cb11931472p> , <http://ark.bnf.fr/ark:/12148/cb11931564b> , <http://ark.bnf.fr/ark:/12148/cb11932194d> , <http://ark.bnf.fr/ark:/12148/cb11933029x> , <http://ark.bnf.fr/ark:/12148/cb11933281k> , <http://ark.bnf.fr/ark:/12148/cb11934740m> , <http://ark.bnf.fr/ark:/12148/cb11935375d> , <http://ark.bnf.fr/ark:/12148/cb11935986q> , <http://ark.bnf.fr/ark:/12148/cb11936549n> , <http://ark.bnf.fr/ark:/12148/cb11937931x> , <http://ark.bnf.fr/ark:/12148/cb119392962> , <http://ark.bnf.fr/ark:/12148/cb119458243> , <http://ark.bnf.fr/ark:/12148/cb11946662b> , <http://ark.bnf.fr/ark:/12148/cb11947332t> , <http://ark.bnf.fr/ark:/12148/cb119481497> , <http://ark.bnf.fr/ark:/12148/cb119591726> , <http://ark.bnf.fr/ark:/12148/cb119756721> , <http://ark.bnf.fr/ark:/12148/cb119757609> , <http://ark.bnf.fr/ark:/12148/cb11975806s> , <http://ark.bnf.fr/ark:/12148/cb119759527> , <http://ark.bnf.fr/ark:/12148/cb12032030g> , <http://ark.bnf.fr/ark:/12148/cb12042429k> , <http://ark.bnf.fr/ark:/12148/cb12099148r> , <http://ark.bnf.fr/ark:/12148/cb12148936v> , <http://ark.bnf.fr/ark:/12148/cb12289036m> , <http://ark.bnf.fr/ark:/12148/cb13318335q> , <http://ark.bnf.fr/ark:/12148/cb133183540> , <http://ark.bnf.fr/ark:/12148/cb13318415c> , <http://ark.bnf.fr/ark:/12148/cb13318491g> , "anthropological_linguistics"^^<http://www.language-archives.org/OLAC/1.1/linguistic-field> , "lexicography"^^<http://www.language-archives.org/OLAC/1.1/linguistic-field> , "phonetics"^^<http://www.language-archives.org/OLAC/1.1/linguistic-field> ;
+    	<http://purl.org/dc/elements/1.1/title> "Atlas Linguistique et ethnographique de l'Alsace - Enquetes sur la conscience linguistique - ALA_738"@fr ;
+    	<http://purl.org/dc/elements/1.1/type> <http://ark.bnf.fr/ark:/12148/cb11932135w> , <http://ark.bnf.fr/ark:/12148/cb12481481z> , <http://purl.org/dc/dcmitype/Sound> , "dialogue"^^<http://www.language-archives.org/OLAC/1.1/discourse-type> , "primary_text"^^<http://www.language-archives.org/OLAC/1.1/linguistic-type> ;
+    	<http://purl.org/dc/terms/accessRights> "Freely available for non-commercial use" ;
+    	<http://purl.org/dc/terms/available> "2004-07-03"^^<http://purl.org/dc/terms/W3CDTF> ;
+    	<http://purl.org/dc/terms/isPartOf> <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-COLLECTION_ALA_CL> , <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-COLLECTION_LANGUESDEFRANCE> ;
+    	<http://purl.org/dc/terms/license> <http://creativecommons.org/licenses/by-nc-nd/2.5/> ;
+    	<http://purl.org/dc/terms/spatial> _:genid-2267740936ad4d04a567e6787732f0dd-genid1 ;
+    	<http://www.language-archives.org/OLAC/1.1/depositor> <http://viaf.org/viaf/9122216> ;
+    	<http://www.language-archives.org/OLAC/1.1/interviewer> <http://viaf.org/viaf/61542329> , <http://viaf.org/viaf/9122216> .
 EOT;
 
     function __construct(string $name = null) {
         parent::__construct($name);
-        $this->graph = new EasyRdf\Graph("http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-ALA_608", DocumentRepositoryIntegrationTest::TEST_DOC);
+        $this->graph = new EasyRdf\Graph("http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-ALA_738", DocumentRepositoryIntegrationTest::TEST_DOC);
     }
 
     public function setUp() {
@@ -85,7 +105,7 @@
 
         $this->httpClient = new Client(['base_uri' => config('corpusparole.sesame_base_url')]);
         $this->sesameRepository = config('corpusparole.sesame_repository');
-        $this->cocoonDocIdBaseUri = config('corpusparole.cocoon_doc_id_base_uri');
+        $this->corpusDocIdBaseUri = config('corpusparole.corpus_doc_id_base_uri');
 
         $this->documentRepository = $this->app->make('CorpusParole\Repositories\DocumentRepository');
         $uniqueid = uniqid('corpusparole', true);
@@ -99,7 +119,7 @@
         $this->httpClient->put("repositories/$this->sesameRepository/statements", [
             'headers' => ['Content-type' => 'text/turtle;charset=UTF-8'],
             'body' => DocumentRepositoryIntegrationTest::TEST_DOC,
-            'query' => ['context' => '<http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-ALA_608>'],
+            'query' => ['context' => '<http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-ALA_738>'],
         ]);
     }
 
@@ -109,14 +129,14 @@
     }
 
     public function testAll() {
-        $expectedId = $this->cocoonDocIdBaseUri.'crdo-ALA_608';
+        $expectedId = $this->corpusDocIdBaseUri.'crdo-ALA_738';
         $docList = $this->documentRepository->all();
         $this->assertCount(1, $docList, "Should have one element");
 
         $resDoc = $docList[0];
 
         $this->assertInstanceOf(Document::class, $resDoc, "Res doc must be a Document");
-        $this->assertEquals('crdo-ALA_608', $resDoc->getId(), "id must be crdo...");
+        $this->assertEquals('crdo-ALA_738', $resDoc->getId(), "id must be crdo...");
         $this->assertEquals($expectedId, $resDoc->getUri(), 'url must be ...');
         $this->assertNull($resDoc->getGraph(), 'Graph must be null');
 
@@ -124,27 +144,27 @@
 
     public function testGet() {
 
-        $expectedId = $this->cocoonDocIdBaseUri.'crdo-ALA_608';
+        $expectedId = $this->corpusDocIdBaseUri.'crdo-ALA_738';
         $returnedGraph = new EasyRdf\Graph($expectedId, DocumentRepositoryIntegrationTest::TEST_DOC);
 
-        $res = $this->documentRepository->get('crdo-ALA_608');
+        $res = $this->documentRepository->get('crdo-ALA_738');
 
         $this->assertInstanceOf(Document::class, $res, "Result must be of type Document");
-        $this->assertEquals('crdo-ALA_608', $res->getId(), 'id should be crdo-ALA_608' );
+        $this->assertEquals('crdo-ALA_738', $res->getId(), 'id should be crdo-ALA_738' );
         $this->assertNotNull($res->getGraph(), "Graph shoul not be null");
         $this->assertTrue(EasyRdf\Isomorphic::isomorphic($res->getGraph(),$returnedGraph));
     }
 
     public function testSave() {
 
-        $doc = new Document("http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-ALA_608", $this->graph);
+        $doc = new Document("http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-ALA_738", $this->graph);
         $doc->updateDiscourseTypes(['oratory','drama','narrative']);
 
         $res = $this->documentRepository->save($doc);
 
         $this->assertTrue($res, 'Has started a transaction');
 
-        $res = $this->documentRepository->get('crdo-ALA_608');
+        $res = $this->documentRepository->get('crdo-ALA_738');
 
         $discoursesTypes = $res->getDiscourseTypes();
 
--- a/server/src/tests/Repositories/DocumentRepositoryTest.php	Thu Dec 10 17:00:59 2015 +0100
+++ b/server/src/tests/Repositories/DocumentRepositoryTest.php	Thu Dec 10 17:04:51 2015 +0100
@@ -11,51 +11,6 @@
 class DocumentRepositoryTest extends TestCase {
 
     const TEST_DOC = <<<EOT
-<http://cocoon.huma-num.fr/data/ala/ALA_608_22km.wav> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Resource> .
-<http://cocoon.huma-num.fr/data/ala/ALA_608_22km.wav> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Document> .
-<http://cocoon.huma-num.fr/data/ala/ALA_608_22km.wav> <http://purl.org/dc/elements/1.1/description> "Extrait des enqu\u00EAtes dialectologiques en vue de constituer un atlas linguistique de l'Alsace."@fr .
-<http://cocoon.huma-num.fr/data/ala/ALA_608_22km.wav> <http://purl.org/dc/elements/1.1/format> "audio/x-wav"^^<http://purl.org/dc/terms/IMT> .
-<http://cocoon.huma-num.fr/data/ala/ALA_608_22km.wav> <http://purl.org/dc/elements/1.1/type> <http://purl.org/dc/dcmitype/Sound> .
-<http://cocoon.huma-num.fr/data/ala/ALA_608_22km.wav> <http://purl.org/dc/elements/1.1/type> "primary_text"^^<http://www.language-archives.org/OLAC/1.1/linguistic-type> .
-<http://cocoon.huma-num.fr/data/ala/ALA_608_22km.wav> <http://purl.org/dc/elements/1.1/type> "dialogue"^^<http://www.language-archives.org/OLAC/1.1/discourse-type> .
-<http://cocoon.huma-num.fr/data/ala/ALA_608_22km.wav> <http://purl.org/dc/elements/1.1/subject> <http://lexvo.org/id/iso639-3/gsw> .
-<http://cocoon.huma-num.fr/data/ala/ALA_608_22km.wav> <http://purl.org/dc/elements/1.1/subject> "lexicography"^^<http://www.language-archives.org/OLAC/1.1/linguistic-field> .
-<http://cocoon.huma-num.fr/data/ala/ALA_608_22km.wav> <http://purl.org/dc/elements/1.1/subject> "phonetics"^^<http://www.language-archives.org/OLAC/1.1/linguistic-field> .
-<http://cocoon.huma-num.fr/data/ala/ALA_608_22km.wav> <http://purl.org/dc/elements/1.1/subject> "anthropological_linguistics"^^<http://www.language-archives.org/OLAC/1.1/linguistic-field> .
-<http://cocoon.huma-num.fr/data/ala/ALA_608_22km.wav> <http://purl.org/dc/elements/1.1/language> <http://lexvo.org/id/iso639-3/gsw> .
-<http://cocoon.huma-num.fr/data/ala/ALA_608_22km.wav> <http://purl.org/dc/elements/1.1/contributor> <http://viaf.org/viaf/9122216> .
-<http://cocoon.huma-num.fr/data/ala/ALA_608_22km.wav> <http://purl.org/dc/elements/1.1/contributor> _:genid2d6c3879d9d2484bd98bb0bcb9dd0364fc2dgenid1 .
-<http://cocoon.huma-num.fr/data/ala/ALA_608_22km.wav> <http://purl.org/dc/elements/1.1/contributor> _:genid2d6c3879d9d2484bd98bb0bcb9dd0364fc2dgenid2 .
-<http://cocoon.huma-num.fr/data/ala/ALA_608_22km.wav> <http://purl.org/dc/elements/1.1/publisher> "Atlas linguistiques, cultures et parlers r\u00E9gionaux de France" .
-<http://cocoon.huma-num.fr/data/ala/ALA_608_22km.wav> <http://purl.org/dc/elements/1.1/rights> "Copyright (c) D\u00E9partement de dialectologie alsacienne et mosellane de l'Universit\u00E9 de Strasbourg" .
-<http://cocoon.huma-num.fr/data/ala/ALA_608_22km.wav> <http://purl.org/dc/elements/1.1/title> "Atlas Linguistique et ethnographique de l'Alsace - Enquetes sur la conscience linguistique - ALA_608"@fr .
-<http://cocoon.huma-num.fr/data/ala/ALA_608_22km.wav> <http://purl.org/dc/terms/accessRights> "Freely available for non-commercial use" .
-<http://cocoon.huma-num.fr/data/ala/ALA_608_22km.wav> <http://purl.org/dc/terms/license> <http://creativecommons.org/licenses/by-nc-nd/2.5/> .
-<http://cocoon.huma-num.fr/data/ala/ALA_608_22km.wav> <http://purl.org/dc/terms/isPartOf> <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-COLLECTION_ALA_CL> .
-<http://cocoon.huma-num.fr/data/ala/ALA_608_22km.wav> <http://purl.org/dc/terms/isPartOf> <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-COLLECTION_LANGUESDEFRANCE> .
-<http://cocoon.huma-num.fr/data/ala/ALA_608_22km.wav> <http://purl.org/dc/terms/extent> "PT02H04M16S" .
-<http://cocoon.huma-num.fr/data/ala/ALA_608_22km.wav> <http://purl.org/dc/terms/created> "start=1980; end=1989; name=ann\u00E9es 80"^^<http://purl.org/dc/terms/Period> .
-<http://cocoon.huma-num.fr/data/ala/ALA_608_22km.wav> <http://purl.org/dc/terms/spatial> "France, Alsace"@fr .
-<http://cocoon.huma-num.fr/data/ala/ALA_608_22km.wav> <http://purl.org/dc/terms/spatial> "FR"^^<http://purl.org/dc/terms/ISO3166> .
-<http://cocoon.huma-num.fr/data/ala/ALA_608_22km.wav> <http://purl.org/dc/terms/isFormatOf> <http://cocoon.huma-num.fr/data/ala/ALA_608.mp3> .
-<http://cocoon.huma-num.fr/data/ala/ALA_608_22km.wav> <http://purl.org/dc/terms/isFormatOf> <http://cocoon.huma-num.fr/data/ala/masters/ALA_608.wav> .
-<http://cocoon.huma-num.fr/data/ala/ALA_608_22km.wav> <http://purl.org/dc/terms/available> "2004-07-03"^^<http://purl.org/dc/terms/W3CDTF> .
-<http://cocoon.huma-num.fr/data/ala/ALA_608_22km.wav> <http://purl.org/dc/terms/issued> "2014-11-04T16:25:54+01:00"^^<http://purl.org/dc/terms/W3CDTF> .
-<http://cocoon.huma-num.fr/data/ala/ALA_608_22km.wav> <http://www.openrdf.org/schema/sesame#directType> <http://xmlns.com/foaf/0.1/Document> .
-_:genid2d6c3879d9d2484bd98bb0bcb9dd0364fc2dgenid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Resource> .
-_:genid2d6c3879d9d2484bd98bb0bcb9dd0364fc2dgenid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Agent> .
-_:genid2d6c3879d9d2484bd98bb0bcb9dd0364fc2dgenid1 <http://xmlns.com/foaf/0.1/name> "Bothorel-Witz, Arlette" .
-_:genid2d6c3879d9d2484bd98bb0bcb9dd0364fc2dgenid1 <http://xmlns.com/foaf/0.1/status> "interviewer"^^<http://www.language-archives.org/OLAC/1.1/role> .
-_:genid2d6c3879d9d2484bd98bb0bcb9dd0364fc2dgenid1 <http://www.openrdf.org/schema/sesame#directType> <http://xmlns.com/foaf/0.1/Agent> .
-_:genid2d6c3879d9d2484bd98bb0bcb9dd0364fc2dgenid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Resource> .
-_:genid2d6c3879d9d2484bd98bb0bcb9dd0364fc2dgenid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Agent> .
-_:genid2d6c3879d9d2484bd98bb0bcb9dd0364fc2dgenid2 <http://xmlns.com/foaf/0.1/name> "Huck, Dominique" .
-_:genid2d6c3879d9d2484bd98bb0bcb9dd0364fc2dgenid2 <http://xmlns.com/foaf/0.1/status> "interviewer"^^<http://www.language-archives.org/OLAC/1.1/role> .
-_:genid2d6c3879d9d2484bd98bb0bcb9dd0364fc2dgenid2 <http://www.openrdf.org/schema/sesame#directType> <http://xmlns.com/foaf/0.1/Agent> .
-<http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-ALA_608> <http://xmlns.com/foaf/0.1/primaryTopic> <http://cocoon.huma-num.fr/data/ala/ALA_608_22km.wav> .
-EOT;
-
-    const RES_DOC = <<<EOT
     @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
     @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
     @prefix sesame: <http://www.openrdf.org/schema/sesame#> .
@@ -63,46 +18,68 @@
     @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
     @prefix fn: <http://www.w3.org/2005/xpath-functions#> .
 
-    <http://cocoon.huma-num.fr/data/ala/ALA_608_22km.wav> a <http://xmlns.com/foaf/0.1/Document> ;
-    	<http://purl.org/dc/elements/1.1/description> "Extrait des enquêtes dialectologiques en vue de constituer un atlas linguistique de l'Alsace."@fr ;
+    _:genid-2267740936ad4d04a567e6787732f0dd-genid1 a <http://www.europeana.eu/schemas/edm/Place> ;
+    	owl:sameAs <http://sws.geonames.org/3038033/> ;
+    	<http://www.w3.org/2004/02/skos/core#note> "northlimit=47.431892250000033; southlimit=49.053971250000046;westlimit=6.846186050000028; eastlimit=8.232571550000074;"^^<http://purl.org/dc/terms/Box> , "FR"^^<http://purl.org/dc/terms/ISO3166> , "France, Alsace"@fr .
+
+    <http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-ALA_738> a <http://www.openarchives.org/ore/terms/Aggregation> ;
+    	<http://www.europeana.eu/schemas/edm/aggregatedCHO> <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-ALA_738> ;
+    	<http://www.europeana.eu/schemas/edm/dataProvider> "Atlas linguistiques, cultures et parlers régionaux de France" ;
+    	<http://www.europeana.eu/schemas/edm/hasView> <http://cocoon.huma-num.fr/data/ala/ALA_738.mp3> , <http://cocoon.huma-num.fr/data/ala/ALA_738_22km.wav> ;
+    	<http://www.europeana.eu/schemas/edm/isShownAt> <http://cocoon.huma-num.fr/exist/crdo/meta/crdo-ALA_738> ;
+    	<http://www.europeana.eu/schemas/edm/isShownBy> <http://cocoon.huma-num.fr/data/ala/masters/ALA_738.wav> ;
+    	<http://www.europeana.eu/schemas/edm/provider> "Corpus de la Parole"@fr ;
+    	<http://www.europeana.eu/schemas/edm/rights> <http://creativecommons.org/licenses/by-nc-nd/4.0/> .
+
+    <http://cocoon.huma-num.fr/data/ala/ALA_738.mp3> a <http://www.europeana.eu/schemas/edm/WebResources> ;
+    	<http://purl.org/dc/elements/1.1/format> "audio/mpeg"^^<http://purl.org/dc/terms/IMT> ;
+    	<http://purl.org/dc/terms/created> "1996"^^<http://purl.org/dc/terms/Period> ;
+    	<http://purl.org/dc/terms/extent> "PT01H11M29S" ;
+    	<http://purl.org/dc/terms/issued> "2014-11-10T14:27:08+01:00"^^<http://purl.org/dc/terms/W3CDTF> ;
+    	<http://www.europeana.eu/schemas/edm/isDerivativeOf> <http://cocoon.huma-num.fr/data/ala/masters/ALA_738.wav> .
+
+    <http://cocoon.huma-num.fr/data/ala/masters/ALA_738.wav> a <http://www.europeana.eu/schemas/edm/WebResources> ;
     	<http://purl.org/dc/elements/1.1/format> "audio/x-wav"^^<http://purl.org/dc/terms/IMT> ;
-    	<http://purl.org/dc/elements/1.1/type> <http://purl.org/dc/dcmitype/Sound> , "primary_text"^^<http://www.language-archives.org/OLAC/1.1/linguistic-type> , "dialogue"^^<http://www.language-archives.org/OLAC/1.1/discourse-type> ;
-    	<http://purl.org/dc/elements/1.1/subject> <http://lexvo.org/id/iso639-3/gsw> , "lexicography"^^<http://www.language-archives.org/OLAC/1.1/linguistic-field> , "phonetics"^^<http://www.language-archives.org/OLAC/1.1/linguistic-field> , "anthropological_linguistics"^^<http://www.language-archives.org/OLAC/1.1/linguistic-field> ;
+    	<http://purl.org/dc/terms/created> "1996"^^<http://purl.org/dc/terms/Period> ;
+    	<http://purl.org/dc/terms/extent> "PT01H11M29S" ;
+    	<http://purl.org/dc/terms/issued> "2014-11-10T14:27:08+01:00"^^<http://purl.org/dc/terms/W3CDTF> .
+
+    <http://cocoon.huma-num.fr/data/ala/ALA_738_22km.wav> a <http://www.europeana.eu/schemas/edm/WebResources> ;
+    	<http://purl.org/dc/elements/1.1/format> "audio/x-wav"^^<http://purl.org/dc/terms/IMT> ;
+    	<http://purl.org/dc/terms/created> "1996"^^<http://purl.org/dc/terms/Period> ;
+    	<http://purl.org/dc/terms/extent> "PT01H11M29S" ;
+    	<http://purl.org/dc/terms/issued> "2014-11-10T14:27:08+01:00"^^<http://purl.org/dc/terms/W3CDTF> ;
+    	<http://www.europeana.eu/schemas/edm/isDerivativeOf> <http://cocoon.huma-num.fr/data/ala/masters/ALA_738.wav> .
+
+    <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-ALA_738> a <http://www.europeana.eu/schemas/edm/ProvidedCHO> ;
+    	<http://purl.org/dc/terms/created> "1996"^^<http://purl.org/dc/terms/Period> ;
+    	<http://purl.org/dc/terms/extent> "PT01H11M29S" ;
+    	<http://purl.org/dc/terms/issued> "2014-11-10T14:27:08+01:00"^^<http://purl.org/dc/terms/W3CDTF> ;
+    	<http://purl.org/dc/elements/1.1/contributor> <http://viaf.org/viaf/61542329> , <http://viaf.org/viaf/9122216> ;
+    	<http://purl.org/dc/elements/1.1/description> "Extrait des enquêtes dialectologiques en vue de constituer un atlas linguistique de l'Alsace."@fr ;
     	<http://purl.org/dc/elements/1.1/language> <http://lexvo.org/id/iso639-3/gsw> ;
-    	<http://purl.org/dc/elements/1.1/contributor> <http://viaf.org/viaf/9122216> , _:genid-39d722daa01242edb2da8d2d1e71eae7-ED8A67E3CE4C51EA8EDC4ED1190E161A , _:genid-39d722daa01242edb2da8d2d1e71eae7-FD40C63A1295F7BE6765BB87A70CE839 ;
     	<http://purl.org/dc/elements/1.1/publisher> "Atlas linguistiques, cultures et parlers régionaux de France" ;
     	<http://purl.org/dc/elements/1.1/rights> "Copyright (c) Département de dialectologie alsacienne et mosellane de l'Université de Strasbourg" ;
-    	<http://purl.org/dc/elements/1.1/title> "Atlas Linguistique et ethnographique de l'Alsace - Enquetes sur la conscience linguistique - ALA_608"@fr ;
+    	<http://purl.org/dc/elements/1.1/subject> <http://lexvo.org/id/iso639-3/gsw> , <http://ark.bnf.fr/ark:/12148/cb11931472p> , <http://ark.bnf.fr/ark:/12148/cb11931564b> , <http://ark.bnf.fr/ark:/12148/cb11932194d> , <http://ark.bnf.fr/ark:/12148/cb11933029x> , <http://ark.bnf.fr/ark:/12148/cb11933281k> , <http://ark.bnf.fr/ark:/12148/cb11934740m> , <http://ark.bnf.fr/ark:/12148/cb11935375d> , <http://ark.bnf.fr/ark:/12148/cb11935986q> , <http://ark.bnf.fr/ark:/12148/cb11936549n> , <http://ark.bnf.fr/ark:/12148/cb11937931x> , <http://ark.bnf.fr/ark:/12148/cb119392962> , <http://ark.bnf.fr/ark:/12148/cb119458243> , <http://ark.bnf.fr/ark:/12148/cb11946662b> , <http://ark.bnf.fr/ark:/12148/cb11947332t> , <http://ark.bnf.fr/ark:/12148/cb119481497> , <http://ark.bnf.fr/ark:/12148/cb119591726> , <http://ark.bnf.fr/ark:/12148/cb119756721> , <http://ark.bnf.fr/ark:/12148/cb119757609> , <http://ark.bnf.fr/ark:/12148/cb11975806s> , <http://ark.bnf.fr/ark:/12148/cb119759527> , <http://ark.bnf.fr/ark:/12148/cb12032030g> , <http://ark.bnf.fr/ark:/12148/cb12042429k> , <http://ark.bnf.fr/ark:/12148/cb12099148r> , <http://ark.bnf.fr/ark:/12148/cb12148936v> , <http://ark.bnf.fr/ark:/12148/cb12289036m> , <http://ark.bnf.fr/ark:/12148/cb13318335q> , <http://ark.bnf.fr/ark:/12148/cb133183540> , <http://ark.bnf.fr/ark:/12148/cb13318415c> , <http://ark.bnf.fr/ark:/12148/cb13318491g> , "anthropological_linguistics"^^<http://www.language-archives.org/OLAC/1.1/linguistic-field> , "lexicography"^^<http://www.language-archives.org/OLAC/1.1/linguistic-field> , "phonetics"^^<http://www.language-archives.org/OLAC/1.1/linguistic-field> ;
+    	<http://purl.org/dc/elements/1.1/title> "Atlas Linguistique et ethnographique de l'Alsace - Enquetes sur la conscience linguistique - ALA_738"@fr ;
+    	<http://purl.org/dc/elements/1.1/type> <http://ark.bnf.fr/ark:/12148/cb11932135w> , <http://ark.bnf.fr/ark:/12148/cb12481481z> , <http://purl.org/dc/dcmitype/Sound> , "dialogue"^^<http://www.language-archives.org/OLAC/1.1/discourse-type> , "primary_text"^^<http://www.language-archives.org/OLAC/1.1/linguistic-type> ;
     	<http://purl.org/dc/terms/accessRights> "Freely available for non-commercial use" ;
-    	<http://purl.org/dc/terms/license> <http://creativecommons.org/licenses/by-nc-nd/2.5/> ;
-    	<http://purl.org/dc/terms/isPartOf> <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-COLLECTION_ALA_CL> , <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-COLLECTION_LANGUESDEFRANCE> ;
-    	<http://purl.org/dc/terms/extent> "PT02H04M16S" ;
-    	<http://purl.org/dc/terms/created> "start=1980; end=1989; name=années 80"^^<http://purl.org/dc/terms/Period> ;
-    	<http://purl.org/dc/terms/spatial> "France, Alsace"@fr , "FR"^^<http://purl.org/dc/terms/ISO3166> ;
-    	<http://purl.org/dc/terms/isFormatOf> <http://cocoon.huma-num.fr/data/ala/ALA_608.mp3> , <http://cocoon.huma-num.fr/data/ala/masters/ALA_608.wav> ;
     	<http://purl.org/dc/terms/available> "2004-07-03"^^<http://purl.org/dc/terms/W3CDTF> ;
-    	<http://purl.org/dc/terms/issued> "2014-11-04T16:25:54+01:00"^^<http://purl.org/dc/terms/W3CDTF> .
-
-    _:genid-39d722daa01242edb2da8d2d1e71eae7-ED8A67E3CE4C51EA8EDC4ED1190E161A a <http://xmlns.com/foaf/0.1/Agent> ;
-    	<http://xmlns.com/foaf/0.1/name> "Bothorel-Witz, Arlette" ;
-    	<http://xmlns.com/foaf/0.1/status> "interviewer"^^<http://www.language-archives.org/OLAC/1.1/role> .
-
-    _:genid-39d722daa01242edb2da8d2d1e71eae7-FD40C63A1295F7BE6765BB87A70CE839 a <http://xmlns.com/foaf/0.1/Agent> ;
-    	<http://xmlns.com/foaf/0.1/name> "Huck, Dominique" ;
-    	<http://xmlns.com/foaf/0.1/status> "interviewer"^^<http://www.language-archives.org/OLAC/1.1/role> .
-
-    <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-ALA_608> <http://xmlns.com/foaf/0.1/primaryTopic> <http://cocoon.huma-num.fr/data/ala/ALA_608_22km.wav> .
+    	<http://purl.org/dc/terms/isPartOf> <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-COLLECTION_ALA_CL> , <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-COLLECTION_LANGUESDEFRANCE> ;
+    	<http://purl.org/dc/terms/license> <http://creativecommons.org/licenses/by-nc-nd/2.5/> ;
+    	<http://purl.org/dc/terms/spatial> _:genid-2267740936ad4d04a567e6787732f0dd-genid1 ;
+    	<http://www.language-archives.org/OLAC/1.1/depositor> <http://viaf.org/viaf/9122216> ;
+    	<http://www.language-archives.org/OLAC/1.1/interviewer> <http://viaf.org/viaf/61542329> , <http://viaf.org/viaf/9122216> .
 EOT;
 
-
     function __construct(string $name = null) {
         parent::__construct($name);
     }
 
     public function setUp() {
         parent::setUp();
-        $this->graph = new EasyRdf\Graph("http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-ALA_608", DocumentRepositoryTest::TEST_DOC);
-        $this->cocoonDocIdBaseUri = config('corpusparole.cocoon_doc_id_base_uri');
+        $this->graph = new EasyRdf\Graph("http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-ALA_738", DocumentRepositoryTest::TEST_DOC);
+        $this->corpusDocIdBaseUri = config('corpusparole.corpus_doc_id_base_uri');
     }
 
     public function tearDown() {
@@ -111,7 +88,7 @@
 
 
     public function testAll() {
-        $expectedId = $this->cocoonDocIdBaseUri.'crdo-ALA_608';
+        $expectedId = $this->corpusDocIdBaseUri.'crdo-ALA_738';
         $returnedArray = [
             m::mock('resObj', function($mock) use (&$expectedId) {
                 $mock->uri = new EasyRdf\Resource($expectedId);
@@ -129,27 +106,27 @@
         $resDoc = $res[0];
 
         $this->assertInstanceOf(Document::class, $resDoc, "Res doc must be a Document");
-        $this->assertEquals('crdo-ALA_608', $resDoc->getId(), "id must be crdo...");
+        $this->assertEquals('crdo-ALA_738', $resDoc->getId(), "id must be crdo...");
         $this->assertEquals($expectedId, $resDoc->getUri(), 'url must be ...');
         $this->assertNull($resDoc->getGraph(), 'Graph must be null');
     }
 
     public function testGet() {
 
-        $expectedId = $this->cocoonDocIdBaseUri.'crdo-ALA_608';
-        $returnedGraph = new EasyRdf\Graph($expectedId, DocumentRepositoryTest::RES_DOC);
+        $expectedId = $this->corpusDocIdBaseUri.'crdo-ALA_738';
+        $returnedGraph = new EasyRdf\Graph($expectedId, DocumentRepositoryTest::TEST_DOC);
 
         $sparqlClientMock = m::mock('CorpusParole\Libraries\Sparql\SparqlClient');
         $sparqlClientMock->shouldReceive('query')->with(containsString($expectedId))
                 ->andReturn($returnedGraph);
         $documentRepository = $this->app->make('CorpusParole\Repositories\RdfDocumentRepository', [$sparqlClientMock]);
 
-        $res = $documentRepository->get('crdo-ALA_608');
+        $res = $documentRepository->get('crdo-ALA_738');
 
         $this->assertInstanceOf(Document::class, $res, "Result must be of type Document");
-        $this->assertEquals('crdo-ALA_608', $res->getId(), 'id should be crdo-ALA_608' );
+        $this->assertEquals('crdo-ALA_738', $res->getId(), 'id should be crdo-ALA_738' );
         $this->assertNotNull($res->getGraph(), "Graph shoul not be null");
-        $this->assertTrue(EasyRdf\Isomorphic::isomorphic($res->getGraph(), new EasyRdf\Graph($expectedId, DocumentRepositoryTest::RES_DOC)));
+        $this->assertTrue(EasyRdf\Isomorphic::isomorphic($res->getGraph(), new EasyRdf\Graph($expectedId, DocumentRepositoryTest::TEST_DOC)));
     }
 
     public function testSave() {
@@ -162,7 +139,7 @@
         $documentRepository = $this->app->make('CorpusParole\Repositories\RdfDocumentRepository', [$sparqlClientMock]);
 
 
-        $doc = new Document("http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-ALA_608", $this->graph);
+        $doc = new Document("http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-ALA_738", $this->graph);
         $doc->updateDiscourseTypes(['oratory','drama','narrative']);
 
         $res = $documentRepository->save($doc);
@@ -184,8 +161,6 @@
                 ->andReturn($returnedCount);
         $documentRepository = $this->app->make('CorpusParole\Repositories\RdfDocumentRepository', [$sparqlClientMock]);
 
-
-
     }
 
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/server/src/tests/Services/ViafResolverTest.php	Thu Dec 10 17:04:51 2015 +0100
@@ -0,0 +1,179 @@
+<?php
+
+use Illuminate\Foundation\Testing\WithoutMiddleware;
+use Illuminate\Foundation\Testing\DatabaseMigrations;
+use Illuminate\Foundation\Testing\DatabaseTransactions;
+
+use GuzzleHttp\Client;
+use GuzzleHttp\Handler\MockHandler;
+use GuzzleHttp\HandlerStack;
+use GuzzleHttp\Psr7\Response;
+use GuzzleHttp\Psr7\Request;
+use GuzzleHttp\Middleware;
+use GuzzleHttp\Exception\RequestException;
+
+
+
+class ViafResolverTest extends TestCase
+{
+    const VIAF_RDF_56666014 = <<<EOT
+<?xml version="1.0" encoding="UTF-8"?><rdf:RDF xmlns:schema="http://schema.org/" xmlns:genont="http://www.w3.org/2006/gen/ont#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:bgn="http://bibliograph.net/" xmlns:umbel="http://umbel.org/umbel#" xmlns:pto="http://www.productontology.org/id/"><rdf:Description rdf:about="http://viaf.org/viaf/56666014/"><rdf:type rdf:resource="http://xmlns.com/foaf/0.1/Document"/><rdf:type rdf:resource="http://www.w3.org/2006/gen/ont#InformationResource"/><void:inDataset xmlns:void="http://rdfs.org/ns/void#" rdf:resource="http://viaf.org/viaf/data"/><foaf:primaryTopic xmlns:foaf="http://xmlns.com/foaf/0.1/" rdf:resource="http://viaf.org/viaf/56666014"/></rdf:Description><rdf:Description rdf:about="http://viaf.org/viaf/56666014"><dcterms:identifier xmlns:dcterms="http://purl.org/dc/terms/">56666014</dcterms:identifier><rdf:type rdf:resource="http://schema.org/Person"/><rdf:type rdf:resource="http://schema.org/Person"/><rdf:type rdf:resource="http://schema.org/Person"/><rdf:type rdf:resource="http://schema.org/Person"/><rdf:type rdf:resource="http://schema.org/Person"/><schema:birthDate>1961-10-23</schema:birthDate><schema:name xml:lang="fr-FR">Guylaine Brun-Trigaud</schema:name><rdfs:comment xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xml:lang="en">Warning: skos:prefLabels are not ensured against change!</rdfs:comment><skos:prefLabel xmlns:skos="http://www.w3.org/2004/02/skos/core#" xml:lang="fr-FR">Guylaine Brun-Trigaud</skos:prefLabel><schema:name xml:lang="nl-NL">Guylaine Brun-Trigaud</schema:name><rdfs:comment xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xml:lang="en">Warning: skos:prefLabels are not ensured against change!</rdfs:comment><skos:prefLabel xmlns:skos="http://www.w3.org/2004/02/skos/core#" xml:lang="nl-NL">Guylaine Brun-Trigaud</skos:prefLabel><schema:name xml:lang="en-US">Guylaine Brun-Trigaud</schema:name><rdfs:comment xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xml:lang="en">Warning: skos:prefLabels are not ensured against change!</rdfs:comment><skos:prefLabel xmlns:skos="http://www.w3.org/2004/02/skos/core#" xml:lang="en-US">Guylaine Brun-Trigaud</skos:prefLabel><schema:name xml:lang="en">Guylaine Brun-Trigaud</schema:name><schema:name xml:lang="fr-FR">Guylaine Brun-Trigaud</schema:name><schema:alternateName>Guylaine Brun- Trigaud</schema:alternateName><schema:givenName>Guylaine Brun-</schema:givenName><schema:familyName>Trigaud</schema:familyName><schema:alternateName>Trigaud</schema:alternateName><schema:sameAs><rdf:Description rdf:about="http://data.bnf.fr/ark:/12148/cb122483560#foaf:Person"/></schema:sameAs><schema:sameAs><rdf:Description rdf:about="http://id.loc.gov/authorities/names/nr92014179"/></schema:sameAs><schema:sameAs><rdf:Description rdf:about="http://www.idref.fr/031227201/id"/></schema:sameAs><schema:sameAs><rdf:Description rdf:about="http://isni.org/isni/0000000000375823"/></schema:sameAs></rdf:Description><rdf:Description rdf:about="http://viaf.org/viaf/sourceID/BNF%7C12248356#skos:Concept"><rdf:type rdf:resource="http://www.w3.org/2004/02/skos/core#Concept"/><skos:inScheme xmlns:skos="http://www.w3.org/2004/02/skos/core#" rdf:resource="http://viaf.org/authorityScheme/BNF"/><skos:prefLabel xmlns:skos="http://www.w3.org/2004/02/skos/core#">Brun-Trigaud, Guylaine, 1961-....</skos:prefLabel><skos:altLabel xmlns:skos="http://www.w3.org/2004/02/skos/core#">Trigaud Guylaine Brun-</skos:altLabel><foaf:focus xmlns:foaf="http://xmlns.com/foaf/0.1/" rdf:resource="http://viaf.org/viaf/56666014"/></rdf:Description><rdf:Description rdf:about="http://viaf.org/viaf/sourceID/NTA%7C072991968#skos:Concept"><rdf:type rdf:resource="http://www.w3.org/2004/02/skos/core#Concept"/><skos:inScheme xmlns:skos="http://www.w3.org/2004/02/skos/core#" rdf:resource="http://viaf.org/authorityScheme/NTA"/><skos:prefLabel xmlns:skos="http://www.w3.org/2004/02/skos/core#">Brun-Trigaud, Guylaine</skos:prefLabel><foaf:focus xmlns:foaf="http://xmlns.com/foaf/0.1/" rdf:resource="http://viaf.org/viaf/56666014"/><schema:url>http://opc4.kb.nl/PPN?PPN=072991968</schema:url></rdf:Description><rdf:Description rdf:about="http://viaf.org/viaf/sourceID/LC%7Cnr+92014179#skos:Concept"><rdf:type rdf:resource="http://www.w3.org/2004/02/skos/core#Concept"/><skos:inScheme xmlns:skos="http://www.w3.org/2004/02/skos/core#" rdf:resource="http://viaf.org/authorityScheme/LC"/><skos:prefLabel xmlns:skos="http://www.w3.org/2004/02/skos/core#">Brun-Trigaud, Guylaine</skos:prefLabel><skos:altLabel xmlns:skos="http://www.w3.org/2004/02/skos/core#">Trigaud, Guylaine Brun-</skos:altLabel><foaf:focus xmlns:foaf="http://xmlns.com/foaf/0.1/" rdf:resource="http://viaf.org/viaf/56666014"/></rdf:Description><rdf:Description rdf:about="http://viaf.org/viaf/sourceID/ISNI%7C0000000000375823#skos:Concept"><rdf:type rdf:resource="http://www.w3.org/2004/02/skos/core#Concept"/><skos:inScheme xmlns:skos="http://www.w3.org/2004/02/skos/core#" rdf:resource="http://viaf.org/authorityScheme/ISNI"/><skos:prefLabel xmlns:skos="http://www.w3.org/2004/02/skos/core#">Brun-Trigaud, Guylaine, 1961-....</skos:prefLabel><skos:altLabel xmlns:skos="http://www.w3.org/2004/02/skos/core#">Trigaud, Guylaine Brun-</skos:altLabel><foaf:focus xmlns:foaf="http://xmlns.com/foaf/0.1/" rdf:resource="http://viaf.org/viaf/56666014"/></rdf:Description><rdf:Description rdf:about="http://viaf.org/viaf/sourceID/SUDOC%7C031227201#skos:Concept"><rdf:type rdf:resource="http://www.w3.org/2004/02/skos/core#Concept"/><skos:inScheme xmlns:skos="http://www.w3.org/2004/02/skos/core#" rdf:resource="http://viaf.org/authorityScheme/SUDOC"/><skos:prefLabel xmlns:skos="http://www.w3.org/2004/02/skos/core#">Brun-Trigaud, Guylaine, 1961-....</skos:prefLabel><skos:altLabel xmlns:skos="http://www.w3.org/2004/02/skos/core#">Trigaud, Guylaine Brun-</skos:altLabel><foaf:focus xmlns:foaf="http://xmlns.com/foaf/0.1/" rdf:resource="http://viaf.org/viaf/56666014"/></rdf:Description></rdf:RDF>
+EOT;
+    const VIAF_RDF_93752300 = <<<EOT
+<?xml version="1.0" encoding="UTF-8"?><rdf:RDF xmlns:schema="http://schema.org/" xmlns:genont="http://www.w3.org/2006/gen/ont#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:bgn="http://bibliograph.net/" xmlns:umbel="http://umbel.org/umbel#" xmlns:pto="http://www.productontology.org/id/"><rdf:Description rdf:about="http://viaf.org/viaf/93752300/"><rdf:type rdf:resource="http://xmlns.com/foaf/0.1/Document"/><rdf:type rdf:resource="http://www.w3.org/2006/gen/ont#InformationResource"/><void:inDataset xmlns:void="http://rdfs.org/ns/void#" rdf:resource="http://viaf.org/viaf/data"/><foaf:primaryTopic xmlns:foaf="http://xmlns.com/foaf/0.1/" rdf:resource="http://viaf.org/viaf/93752300"/></rdf:Description><rdf:Description rdf:about="http://viaf.org/viaf/93752300"><dcterms:identifier xmlns:dcterms="http://purl.org/dc/terms/">93752300</dcterms:identifier><rdf:type rdf:resource="http://schema.org/Person"/><rdf:type rdf:resource="http://schema.org/Person"/><rdf:type rdf:resource="http://schema.org/Person"/><rdf:type rdf:resource="http://schema.org/Person"/><rdf:type rdf:resource="http://schema.org/Person"/><rdf:type rdf:resource="http://schema.org/Person"/><rdf:type rdf:resource="http://schema.org/Person"/><rdf:type rdf:resource="http://schema.org/Person"/><schema:name xml:lang="fr-FR">Sonia Branca-Rosoff</schema:name><rdfs:comment xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xml:lang="en">Warning: skos:prefLabels are not ensured against change!</rdfs:comment><skos:prefLabel xmlns:skos="http://www.w3.org/2004/02/skos/core#" xml:lang="fr-FR">Sonia Branca-Rosoff</skos:prefLabel><schema:name xml:lang="cs-CZ">Sonia Branca-Rosoff</schema:name><rdfs:comment xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xml:lang="en">Warning: skos:prefLabels are not ensured against change!</rdfs:comment><skos:prefLabel xmlns:skos="http://www.w3.org/2004/02/skos/core#" xml:lang="cs-CZ">Sonia Branca-Rosoff</skos:prefLabel><schema:name xml:lang="en-US">Sonia Branca-Rosoff</schema:name><rdfs:comment xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xml:lang="en">Warning: skos:prefLabels are not ensured against change!</rdfs:comment><skos:prefLabel xmlns:skos="http://www.w3.org/2004/02/skos/core#" xml:lang="en-US">Sonia Branca-Rosoff</skos:prefLabel><schema:name xml:lang="nl-NL">Sonia Branca-Rosoff</schema:name><rdfs:comment xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xml:lang="en">Warning: skos:prefLabels are not ensured against change!</rdfs:comment><skos:prefLabel xmlns:skos="http://www.w3.org/2004/02/skos/core#" xml:lang="nl-NL">Sonia Branca-Rosoff</skos:prefLabel><schema:name xml:lang="en">Sonia Branca-Rosoff</schema:name><rdfs:comment xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">BCP47 tag for 'B2Q' is undetermined. Name is 'Sonia Branca-Rosoff'.</rdfs:comment><schema:alternateName>Sonia Branca-Rosoff</schema:alternateName><schema:name xml:lang="fr-FR">Sonia Branca-Rosoff</schema:name><schema:name xml:lang="pl-PL">Sonia Branca-Rosoff</schema:name><schema:alternateName>Sonia Branca</schema:alternateName><schema:givenName>Sonia</schema:givenName><schema:familyName>Branca</schema:familyName><schema:alternateName>Branca</schema:alternateName><schema:alternateName>Sonia Creusot</schema:alternateName><schema:givenName>Sonia</schema:givenName><schema:familyName>Creusot</schema:familyName><schema:alternateName>Sonia Rosoff</schema:alternateName><schema:givenName>Sonia</schema:givenName><schema:familyName>Rosoff</schema:familyName><schema:alternateName>Sonia Branca- Rosoff</schema:alternateName><schema:givenName>Sonia Branca-</schema:givenName><schema:familyName>Rosoff</schema:familyName><schema:alternateName>Sonia Branca- Rosoff</schema:alternateName><schema:givenName>Sonia Branca-</schema:givenName><schema:familyName>Rosoff</schema:familyName><schema:alternateName>Rosoff</schema:alternateName><schema:sameAs><rdf:Description rdf:about="http://www.idref.fr/030435358/id"/></schema:sameAs><schema:sameAs><rdf:Description rdf:about="http://data.bnf.fr/ark:/12148/cb121850323#foaf:Person"/></schema:sameAs><schema:sameAs><rdf:Description rdf:about="http://isni.org/isni/0000000066460502"/></schema:sameAs><schema:sameAs><rdf:Description rdf:about="http://id.loc.gov/authorities/names/n81045017"/></schema:sameAs><rdf:value rdf:parseType="Literal"><ns2:source xmlns="http://viaf.org/viaf/terms#" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:void="http://rdfs.org/ns/void#" xmlns:ns2="http://viaf.org/viaf/terms#" nsid="0000099925">B2Q|0000099925</ns2:source></rdf:value></rdf:Description><rdf:Description rdf:about="http://viaf.org/viaf/sourceID/BNF%7C12185032#skos:Concept"><rdf:type rdf:resource="http://www.w3.org/2004/02/skos/core#Concept"/><skos:inScheme xmlns:skos="http://www.w3.org/2004/02/skos/core#" rdf:resource="http://viaf.org/authorityScheme/BNF"/><skos:prefLabel xmlns:skos="http://www.w3.org/2004/02/skos/core#">Branca-Rosoff, Sonia.</skos:prefLabel><skos:altLabel xmlns:skos="http://www.w3.org/2004/02/skos/core#">Branca Sonia</skos:altLabel><skos:altLabel xmlns:skos="http://www.w3.org/2004/02/skos/core#">Rosoff Sonia</skos:altLabel><foaf:focus xmlns:foaf="http://xmlns.com/foaf/0.1/" rdf:resource="http://viaf.org/viaf/93752300"/></rdf:Description><rdf:Description rdf:about="http://viaf.org/viaf/sourceID/NKC%7Cjo2012712459#skos:Concept"><rdf:type rdf:resource="http://www.w3.org/2004/02/skos/core#Concept"/><skos:inScheme xmlns:skos="http://www.w3.org/2004/02/skos/core#" rdf:resource="http://viaf.org/authorityScheme/NKC"/><skos:prefLabel xmlns:skos="http://www.w3.org/2004/02/skos/core#">Branca-Rosoff, Sonia.</skos:prefLabel><skos:altLabel xmlns:skos="http://www.w3.org/2004/02/skos/core#">Branca, Sonia</skos:altLabel><skos:altLabel xmlns:skos="http://www.w3.org/2004/02/skos/core#">Creusot, Sonia</skos:altLabel><skos:altLabel xmlns:skos="http://www.w3.org/2004/02/skos/core#">Rosoff, Sonia</skos:altLabel><foaf:focus xmlns:foaf="http://xmlns.com/foaf/0.1/" rdf:resource="http://viaf.org/viaf/93752300"/></rdf:Description><rdf:Description rdf:about="http://viaf.org/viaf/sourceID/LC%7Cn++81045017#skos:Concept"><rdf:type rdf:resource="http://www.w3.org/2004/02/skos/core#Concept"/><skos:inScheme xmlns:skos="http://www.w3.org/2004/02/skos/core#" rdf:resource="http://viaf.org/authorityScheme/LC"/><skos:prefLabel xmlns:skos="http://www.w3.org/2004/02/skos/core#">Branca-Rosoff, Sonia.</skos:prefLabel><skos:altLabel xmlns:skos="http://www.w3.org/2004/02/skos/core#">Branca, Sonia</skos:altLabel><skos:altLabel xmlns:skos="http://www.w3.org/2004/02/skos/core#">Rosoff, Sonia Branca-</skos:altLabel><foaf:focus xmlns:foaf="http://xmlns.com/foaf/0.1/" rdf:resource="http://viaf.org/viaf/93752300"/></rdf:Description><rdf:Description rdf:about="http://viaf.org/viaf/sourceID/NTA%7C146010671#skos:Concept"><rdf:type rdf:resource="http://www.w3.org/2004/02/skos/core#Concept"/><skos:inScheme xmlns:skos="http://www.w3.org/2004/02/skos/core#" rdf:resource="http://viaf.org/authorityScheme/NTA"/><skos:prefLabel xmlns:skos="http://www.w3.org/2004/02/skos/core#">Branca-Rosoff, Sonia.</skos:prefLabel><foaf:focus xmlns:foaf="http://xmlns.com/foaf/0.1/" rdf:resource="http://viaf.org/viaf/93752300"/><schema:url>http://opc4.kb.nl/PPN?PPN=146010671</schema:url></rdf:Description><rdf:Description rdf:about="http://viaf.org/viaf/sourceID/ISNI%7C0000000066460502#skos:Concept"><rdf:type rdf:resource="http://www.w3.org/2004/02/skos/core#Concept"/><skos:inScheme xmlns:skos="http://www.w3.org/2004/02/skos/core#" rdf:resource="http://viaf.org/authorityScheme/ISNI"/><skos:prefLabel xmlns:skos="http://www.w3.org/2004/02/skos/core#">Branca-Rosoff, Sonia.</skos:prefLabel><skos:altLabel xmlns:skos="http://www.w3.org/2004/02/skos/core#">Branca, Sonia</skos:altLabel><skos:altLabel xmlns:skos="http://www.w3.org/2004/02/skos/core#">Creusot, Sonia</skos:altLabel><skos:altLabel xmlns:skos="http://www.w3.org/2004/02/skos/core#">Rosoff, Sonia</skos:altLabel><skos:altLabel xmlns:skos="http://www.w3.org/2004/02/skos/core#">Rosoff, Sonia Branca-</skos:altLabel><foaf:focus xmlns:foaf="http://xmlns.com/foaf/0.1/" rdf:resource="http://viaf.org/viaf/93752300"/></rdf:Description><rdf:Description rdf:about="http://viaf.org/viaf/sourceID/B2Q%7C0000099925#skos:Concept"><rdf:type rdf:resource="http://www.w3.org/2004/02/skos/core#Concept"/><skos:inScheme xmlns:skos="http://www.w3.org/2004/02/skos/core#" rdf:resource="http://viaf.org/authorityScheme/B2Q"/><skos:prefLabel xmlns:skos="http://www.w3.org/2004/02/skos/core#">Branca-Rosoff, Sonia.</skos:prefLabel><skos:altLabel xmlns:skos="http://www.w3.org/2004/02/skos/core#">Branca, Sonia</skos:altLabel><skos:altLabel xmlns:skos="http://www.w3.org/2004/02/skos/core#">Rosoff, Sonia Branca-</skos:altLabel><foaf:focus xmlns:foaf="http://xmlns.com/foaf/0.1/" rdf:resource="http://viaf.org/viaf/93752300"/></rdf:Description><rdf:Description rdf:about="http://viaf.org/viaf/sourceID/SUDOC%7C030435358#skos:Concept"><rdf:type rdf:resource="http://www.w3.org/2004/02/skos/core#Concept"/><skos:inScheme xmlns:skos="http://www.w3.org/2004/02/skos/core#" rdf:resource="http://viaf.org/authorityScheme/SUDOC"/><skos:prefLabel xmlns:skos="http://www.w3.org/2004/02/skos/core#">Branca-Rosoff, Sonia.</skos:prefLabel><skos:altLabel xmlns:skos="http://www.w3.org/2004/02/skos/core#">Branca, Sonia</skos:altLabel><skos:altLabel xmlns:skos="http://www.w3.org/2004/02/skos/core#">Rosoff, Sonia</skos:altLabel><foaf:focus xmlns:foaf="http://xmlns.com/foaf/0.1/" rdf:resource="http://viaf.org/viaf/93752300"/></rdf:Description><rdf:Description rdf:about="http://viaf.org/viaf/sourceID/NUKAT%7Cn+2012152967#skos:Concept"><rdf:type rdf:resource="http://www.w3.org/2004/02/skos/core#Concept"/><skos:inScheme xmlns:skos="http://www.w3.org/2004/02/skos/core#" rdf:resource="http://viaf.org/authorityScheme/NUKAT"/><skos:prefLabel xmlns:skos="http://www.w3.org/2004/02/skos/core#">Branca-Rosoff, Sonia.</skos:prefLabel><skos:altLabel xmlns:skos="http://www.w3.org/2004/02/skos/core#">Rosoff, Sonia Branca-.</skos:altLabel><foaf:focus xmlns:foaf="http://xmlns.com/foaf/0.1/" rdf:resource="http://viaf.org/viaf/93752300"/></rdf:Description></rdf:RDF>
+EOT;
+
+//"<?"" (for syntax highliting)
+
+    function __construct(string $name = null) {
+        parent::__construct($name);
+    }
+
+    public function setUp() {
+        parent::setUp();
+        $this->container = [];
+        $history = Middleware::history($this->container);
+        $mock = new MockHandler([
+            new Response(200, [], self::VIAF_RDF_56666014),
+            new Response(200, [], self::VIAF_RDF_93752300),
+        ]);
+        $handler = HandlerStack::create($mock);
+        $handler->push($history);
+
+        $this->client = new Client(['handler' => $handler]);
+
+        $mock404 = new MockHandler([
+            new Response(404),
+        ]);
+        $this->client404 = new Client(['handler' => HandlerStack::create($mock404)]);
+
+        $mock401 = new MockHandler([
+            new Response(401, [], 'Unauthorized'),
+            new Response(500),
+        ]);
+        $this->client401 = new Client(['handler' => HandlerStack::create($mock401)]);
+
+        $mock500 = new MockHandler([
+            new Response(500, [], 'Internal Server Error'),
+        ]);
+        $this->client500 = new Client(['handler' => HandlerStack::create($mock500)]);
+
+    }
+
+    /**
+     * Jsut test the setup
+     *
+     * @return void
+     */
+    public function testSetUp() {
+        $this->assertTrue(true);
+    }
+
+    /**
+     * test getName
+     */
+    public function testGetName() {
+        $resolver = $this->app->make('CorpusParole\Services\ViafResolver', [$this->client]);
+        $name = $resolver->getName('56666014');
+
+        $this->assertEquals('Guylaine Brun-Trigaud', $name, "Name must be Guylaine Brun-Trigaud");
+
+        $this->assertCount(1, $this->container);
+
+        $this->assertEquals("http://viaf.org/viaf/56666014/", (string)$this->container[0]['request']->getUri());
+
+    }
+
+    /**
+     * test getName
+     */
+    public function testGetName93752300() {
+        $resolver = $this->app->make('CorpusParole\Services\ViafResolver', [$this->client]);
+        $name = $resolver->getName('56666014'); //first to consume responses
+
+        $name = $resolver->getName('93752300');
+
+        $this->assertEquals('Sonia Branca-Rosoff', $name, "Name must be Sonia Branca-Rosoff");
+
+        $this->assertCount(2, $this->container);
+
+        $this->assertEquals("http://viaf.org/viaf/93752300/", (string)$this->container[1]['request']->getUri());
+
+    }
+
+    /**
+     * test unknown id
+     */
+    public function testUnkownName404() {
+        $resolver = $this->app->make('CorpusParole\Services\ViafResolver', [$this->client404]);
+
+        $name = $resolver->getName('12345');
+
+        $this->assertNull($name);
+    }
+
+    /**
+     * test unknown id
+     */
+    public function testUnkownName() {
+        $resolver = $this->app->make('CorpusParole\Services\ViafResolver', [$this->client]);
+
+        $name = $resolver->getName('12345');
+
+        $this->assertNull($name);
+    }
+
+    /**
+     * Test exception 401
+     * @expectedException        CorpusParole\Services\ViafResolverException
+     * @expectedExceptionMessage Client error: 401
+     * @expectedExceptionCode 401
+     */
+    public function test401Error() {
+        $resolver = $this->app->make('CorpusParole\Services\ViafResolver', [$this->client401]);
+
+        $name = $resolver->getName('12345');
+    }
+
+
+    /**
+     * Test exception 500
+     * @expectedException        CorpusParole\Services\ViafResolverException
+     * @expectedExceptionMessage Server error: 500
+     * @expectedExceptionCode 500
+     */
+    public function test500Error() {
+        $resolver = $this->app->make('CorpusParole\Services\ViafResolver', [$this->client500]);
+
+        $name = $resolver->getName('12345');
+    }
+
+    /**
+     * Test exception malformed
+     * @expectedException        CorpusParole\Services\ViafResolverException
+     * @expectedExceptionMessage ViafId not in correct format
+     * @expectedExceptionCode 400
+     */
+    public function testMalformedError() {
+        $resolver = $this->app->make('CorpusParole\Services\ViafResolver', [$this->client]);
+
+        $name = $resolver->getName('abcd');
+    }
+
+    /**
+     * test getnames
+     */
+    public function testGetNames() {
+        $resolver = $this->app->make('CorpusParole\Services\ViafResolver', [$this->client]);
+        $names = $resolver->getNames(['56666014', '93752300']);
+
+        $this->assertCount(2, $names);
+        $this->assertArrayHasKey('56666014', $names);
+        $this->assertArrayHasKey('93752300', $names);
+
+        $this->assertEquals('Sonia Branca-Rosoff', $names['93752300']);
+        $this->assertEquals('Guylaine Brun-Trigaud', $names['56666014']);
+
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/server/src/tests/libraries/Mappers/CocoonCollectionRdfMapperTest.php	Thu Dec 10 17:04:51 2015 +0100
@@ -0,0 +1,203 @@
+<?php
+
+use CorpusParole\Libraries\Mappers\CocoonCollectionRdfMapper;
+use CorpusParole\Libraries\CocoonUtils;
+
+use EasyRdf\Graph;
+use EasyRdf\Resource;
+use EasyRdf\Literal;
+
+use Illuminate\Foundation\Testing\WithoutMiddleware;
+use Illuminate\Foundation\Testing\DatabaseMigrations;
+use Illuminate\Foundation\Testing\DatabaseTransactions;
+
+class CocoonCollectionRdfMapperTest extends TestCase
+{
+
+    const TEST_INPUT_DOCS = [
+        'BASE' => <<<EOT
+        @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+        @prefix owl: <http://www.w3.org/2002/07/owl#> .
+        @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+        @prefix fn: <http://www.w3.org/2005/xpath-functions#> .
+        @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+        @prefix sesame: <http://www.openrdf.org/schema/sesame#> .
+        @prefix v: <http://rdf.data-vocabulary.org/#> .
+        <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-COLLECTION_CFPP2000> a <http://crdo.risc.cnrs.fr/schemas/Resource> ;
+            <http://purl.org/dc/elements/1.1/description> "Corpus de Français Parlé Parisien des années 2000."@fr , "Le Corpus de Français Parlé Parisien (CFPP2000) est composé d'un ensemble d'interviews non directives sur les quartiers de Paris et de la proche banlieue. Les entretiens, transcrits en orthographe et alignés au tour de parole, sont disponibles sur le net ; ils sont librement employables en échange de la mention dans la bibliographie des travaux qui en seraient tirés d'une part de l'adresse du site: http://cfpp2000.univ-paris3.fr/ et d'autre part du document de présentation suivant : Branca-Rosoff S., Fleury S., Lefeuvre F., Pires M., 2012, \"Discours sur la ville. Présentation du Corpus de Français Parlé Parisien des années 2000 (CFPP2000)\". En février 2013, ce corpus comprenait environ 550 000 mots. Un certain nombre d'outils en ligne, notamment un concordancier et  des outils textométriques permettent de mener des requêtes lexicales et grammaticales. CFPP2000 est particulièrement destiné à des analyses sur le français oral. Le projet sous-jacent au corpus est par ailleurs l'étude des modifications et des variations qui interviennent dans ce qu'on peut considérer comme un parisien véhiculaire en tension entre le pôle du standard et le pôle du vernaculaire. Par ailleurs, il comporte des activités linguistiques diversifiées (description de quartier, anecdotes, argumentation…) et on peut par conséquent travailler sur la syntaxe propre à ces différentes utilisations du langage. Il permet enfin d'opposer dialogues (entre enquêteur et enquêtés) et multilogues (où la présence de plusieurs enquêtés favorise le passage à un registre familier).  CFPP2000 est constitué d'interviews longues (d'une heure en moyenne) intégralement transcrites. Il est donc utilisable pour examiner les singularités qui reviennent à l'idiolecte propre à une personne donnée, par opposition aux variantes diffusées dans des groupes plus larges (quartiers, groupes socio-culturels, classe d'âge, etc.). Le corpus constitue enfin un ensemble de témoignages intéressants sur les représentations de Paris et de sa proche banlieue qui est susceptible d'intéresser des analystes du discours, des sociologues, ou tout simplement des curieux de la ville."@fr ;
+            <http://purl.org/dc/elements/1.1/type> <http://purl.org/dc/dcmitype/Collection> ;
+            <http://purl.org/dc/elements/1.1/subject> <http://lexvo.org/id/iso639-3/fra> ;
+            <http://purl.org/dc/elements/1.1/language> <http://lexvo.org/id/iso639-3/gsw> ;
+            <http://purl.org/dc/terms/created> "start=1988; end=1989"^^<http://purl.org/dc/terms/Period> ;
+            <http://purl.org/dc/elements/1.1/rights> "Copyright (c) Département de dialectologie alsacienne et mosellane de l'Université de Strasbourg" ;
+            <http://www.language-archives.org/OLAC/1.1/depositor> <http://viaf.org/viaf/93752300> ;
+            <http://purl.org/dc/elements/1.1/publisher> <http://viaf.org/viaf/142432638> , "Fédération CLESTHIA" , <http://viaf.org/viaf/154862993> ;
+            <http://purl.org/dc/elements/1.1/title> "Corpus de Français Parlé Parisien des années 2000 (CFPP)"@fr ;
+            <http://www.language-archives.org/OLAC/1.1/interviewer> "Branca-Rosoff, Sonia" , "Lefeuvre, Florence" , "Pires, Mat" ;
+            <http://purl.org/dc/terms/accessRights> "Freely available for non-commercial use" ;
+            <http://purl.org/dc/terms/license> <http://creativecommons.org/licenses/by-nc-sa/3.0/> ;
+            <http://purl.org/dc/terms/spatial> "FR"^^<http://purl.org/dc/terms/ISO3166> , "France, Paris, Université Sorbonne Nouvelle Paris 3, site Censier"@fr , <http://vocab.getty.edu/tgn/7008038> ;
+            <http://purl.org/dc/terms/available> "2013-04-12"^^<http://purl.org/dc/terms/W3CDTF> ;
+            <http://purl.org/dc/terms/issued> "2013-04-12T22:20:23+02:00"^^<http://purl.org/dc/terms/W3CDTF> ;
+            <http://purl.org/dc/terms/modified> "2014-05-10T20:16:27+02:00"^^<http://purl.org/dc/terms/W3CDTF> ;
+            <http://www.language-archives.org/OLAC/1.1/transcriber> "Branca-Rosoff, Sonia" , "Lefeuvre, Florence" , "Pires, Mat" ;
+            <http://www.w3.org/2003/01/geo/wgs84_pos#long> "2.3333"^^xsd:float ;
+            <http://www.w3.org/2003/01/geo/wgs84_pos#lat> "48.8667"^^xsd:float ;
+            <http://www.language-archives.org/OLAC/1.1/compiler> "Branca-Rosoff, Sonia" , "Fleury, Serge" , "Lefeuvre, Florence" , "Pires, Mat" ;
+            <http://www.language-archives.org/OLAC/1.1/data_inputter> "Branca-Rosoff, Sonia" , "Lefeuvre, Florence" , "Pires, Mat" ;
+            <http://www.language-archives.org/OLAC/1.1/researcher> "Branca-Rosoff, Sonia" , "Fleury, Serge" , "Lefeuvre, Florence" , "Pires, Mat" ;
+            <http://www.language-archives.org/OLAC/1.1/sponsor> "Ville de Paris " , "Délégation générale à la langue française et aux langues de France " ;
+            <http://www.language-archives.org/OLAC/1.1/developer> "Fleury, Serge" ;
+            <http://purl.org/dc/terms/isPartOf> <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-COLLECTION_ALA> .
+EOT
+    ];
+
+    const TEST_INPUT_ID = "crdo-COLLECTION_CFPP2000";
+    const TEST_GRAPH_URI = "http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-COLLECTION_CFPP2000";
+
+    private $inputGraphes = [];
+    private $resGraphes = [];
+    private $mappers = [];
+
+    function __construct(string $name = null) {
+        parent::__construct($name);
+    }
+
+    public function setUp() {
+        parent::setUp();
+
+        foreach(CocoonCollectionRdfMapperTest::TEST_INPUT_DOCS as $key => $inputDoc) {
+            $this->inputGraphes[$key] = new Graph("http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-COLLECTION_CFPP2000", $inputDoc);
+            $this->mappers[$key] = new CocoonCollectionRdfMapper($this->inputGraphes[$key]);
+            $this->mappers[$key]->mapGraph();
+            $this->resGraphes[$key] = $this->mappers[$key]->getOutputGraphes()[$this->inputGraphes[$key]->getUri()];
+        }
+    }
+
+    public function tearDown() {
+        parent::tearDown();
+    }
+
+    /**
+     * Just test that the construct and setup are ok
+     *
+     * @return void
+     */
+    public function testInit()
+    {
+        $this->assertTrue(true);
+    }
+
+    /**
+     * Test that the returned graph has the same uri that the original.
+     *
+     * @return void
+     */
+    public function testUri() {
+
+        echo $this->resGraphes['BASE']->serialise('turtle');
+        //echo var_export($this->resGraphes['BASE']->toRdfPhp());
+
+        $this->assertNotNull($this->resGraphes['BASE']);
+        $this->assertEquals(CocoonCollectionRdfMapperTest::TEST_GRAPH_URI, $this->resGraphes['BASE']->getUri(), "URIS must be translated");
+     }
+
+    /**
+      * Test that the return graph has one edm:Collection resource
+      *
+      * @return void
+      */
+    public function testAggregationResource() {
+
+        $resources = $this->resGraphes['BASE']->allOfType('edm:Collection');
+
+        $this->assertCount(1, $resources, "Must found only one resources of type edm:Collection");
+        $this->assertEquals(CocoonCollectionRdfMapperTest::TEST_GRAPH_URI,$resources[0]);
+    }
+
+    /**
+    * Test one to one mapping spatial info
+    *
+    * @return void
+    */
+    public function testSpatial() {
+
+        $coll = $this->resGraphes['BASE']->get('edm:Collection', '^rdf:type');
+        $sourceNode = $this->inputGraphes['BASE']->get('http://crdo.risc.cnrs.fr/schemas/Resource', '^rdf:type');
+
+        $this->assertNotNull($coll);
+        $this->assertNotNull($sourceNode);
+
+        $spatials = $coll->all($this->resGraphes['BASE']->resource('http://purl.org/dc/terms/spatial'));
+
+        $this->assertCount(1, $spatials, "Must have only one spatial node");
+        $spatial = $spatials[0];
+        $this->assertTrue($spatial->isBNode(),"spatial node must be blank");
+        $this->assertEquals("edm:Place", $spatial->type(), "spatial node type must be edm:Place");
+
+        $lats = $spatial->all('geo:lat');
+        $this->assertCount(1, $lats, "One latitude");
+        $this->assertInstanceOf("EasyRdf\Literal", $lats[0], "Latitude must be a litteral");
+        $this->assertEquals(Literal::create("48.8667", null, 'xsd:float'), $lats[0], "lat must be '48.8667'^^xsd:float");
+
+        $longs = $spatial->all('geo:long');
+        $this->assertCount(1, $longs, "One longitude");
+        $this->assertInstanceOf("EasyRdf\Literal", $longs[0], "Longitude must be a litteral");
+        $this->assertEquals(Literal::create("2.3333", null, 'xsd:float'), $longs[0], "long must be '1.90'^^xsd:float");
+
+        $notes = $spatial->all('skos:note');
+        $this->assertCount(2, $notes, "2 notes");
+        $this->assertContainsOnlyInstancesOf("EasyRdf\Literal", $notes, "Notes mus be only literals");
+        $this->assertEquals(Literal::create("FR", null, "dc:ISO3166"), $notes[0], "notes contains 'FR'^^dc:ISO3166");
+        $this->assertEquals(Literal::create("France, Paris, Université Sorbonne Nouvelle Paris 3, site Censier", "fr", null), $notes[1], "notes contains 'France, Paris, Université Sorbonne Nouvelle Paris 3, site Censier'@fr");
+
+        $sameas = $spatial->all('owl:sameAs');
+        $this->assertCount(1, $sameas, "1 same as");
+        $this->assertContainsOnlyInstancesOf("EasyRdf\Resource", $sameas, "Notes mus be only resources");
+        $this->assertEquals('http://vocab.getty.edu/tgn/7008038', $sameas[0]->getUri(), "uri must be http://vocab.getty.edu/tgn/7008038");
+    }
+
+    /**
+     * Test one to one mapping
+     *
+     * @return void
+     */
+    public function testOneToOnePropsIdentity() {
+
+        $properties = [
+            'http://purl.org/dc/elements/1.1/description',
+            'http://purl.org/dc/elements/1.1/language',
+            'http://purl.org/dc/elements/1.1/publisher',
+            'http://purl.org/dc/elements/1.1/rights',
+            'http://purl.org/dc/terms/license',
+            'http://purl.org/dc/elements/1.1/subject',
+            'http://purl.org/dc/elements/1.1/title',
+            'http://purl.org/dc/terms/available',
+            'http://purl.org/dc/terms/created',
+            'http://purl.org/dc/terms/issued',
+            'http://purl.org/dc/elements/1.1/type',
+            'http://purl.org/dc/elements/1.1/language',
+            'http://purl.org/dc/terms/isPartOf',
+            'http://purl.org/dc/terms/modified',
+        ];
+
+        $coll = $this->resGraphes['BASE']->get('edm:Collection', '^rdf:type');
+        $sourceNode = $this->inputGraphes['BASE']->get('http://crdo.risc.cnrs.fr/schemas/Resource', '^rdf:type');
+
+        $this->assertNotNull($coll);
+        $this->assertNotNull($sourceNode);
+
+        foreach ($properties as $prop) {
+            $outputValuesStr = [];
+            foreach($coll->all($this->resGraphes['BASE']->resource($prop)) as $outputValue) {
+                array_push($outputValuesStr, strval($outputValue));
+            }
+            $this->assertNotEmpty($outputValuesStr, "we must found some values to test $prop");
+            foreach ($sourceNode->all($this->inputGraphes['BASE']->resource($prop)) as $value) {
+                $this->assertContains(strval($value), $outputValuesStr, "$prop not found in output graph");
+            }
+        }
+
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/server/src/tests/libraries/Mappers/CocoonSoundRdfMapperTest.php	Thu Dec 10 17:04:51 2015 +0100
@@ -0,0 +1,488 @@
+<?php
+
+use CorpusParole\Libraries\Mappers\CocoonSoundRdfMapper;
+use CorpusParole\Libraries\CocoonUtils;
+
+use EasyRdf\Graph;
+use EasyRdf\Resource;
+use EasyRdf\Literal;
+
+use Illuminate\Foundation\Testing\WithoutMiddleware;
+use Illuminate\Foundation\Testing\DatabaseMigrations;
+use Illuminate\Foundation\Testing\DatabaseTransactions;
+
+class CocoonSoundRdfMapperTest extends TestCase
+{
+
+    const TEST_INPUT_DOCS = [
+        'BASE' => <<<EOT
+        @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+        @prefix owl: <http://www.w3.org/2002/07/owl#> .
+        @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+        @prefix fn: <http://www.w3.org/2005/xpath-functions#> .
+        @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+        @prefix sesame: <http://www.openrdf.org/schema/sesame#> .
+        @prefix v: <http://rdf.data-vocabulary.org/#> .
+            <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-ESLO1_ENT_019> a <http://crdo.risc.cnrs.fr/schemas/Resource> ;
+            <http://purl.org/dc/elements/1.1/description> "Extrait du corpus d'Orléans, réalisé dans le cadre de l'Enquête SocioLinguistique à Orléans à la fin des années 1960."@fr ;
+            <http://purl.org/dc/elements/1.1/type> <http://purl.org/dc/dcmitype/Sound> , "primary_text"^^<http://www.language-archives.org/OLAC/1.1/linguistic-type> , "dialogue"^^<http://www.language-archives.org/OLAC/1.1/discourse-type> ;
+            <http://purl.org/dc/elements/1.1/subject> <http://lexvo.org/id/iso639-3/fra> , "text_and_corpus_linguistics"^^<http://www.language-archives.org/OLAC/1.1/linguistic-field> , <http://ark.bnf.fr/ark:/12148/cb135052099> , <http://ark.bnf.fr/ark:/12148/cb11943508j> , <http://ark.bnf.fr/ark:/12148/cb11934124q> , <http://ark.bnf.fr/ark:/12148/cb11931498c> , <http://ark.bnf.fr/ark:/12148/cb11935508t> , <http://ark.bnf.fr/ark:/12148/cb11934132b> , <http://ark.bnf.fr/ark:/12148/cb11939893p> , <http://ark.bnf.fr/ark:/12148/cb11933091b> ;
+            <http://purl.org/dc/elements/1.1/language> <http://lexvo.org/id/iso639-3/fra> ;
+            <http://www.language-archives.org/OLAC/1.1/depositor> <http://viaf.org/viaf/181558906> ;
+            <http://purl.org/dc/elements/1.1/publisher> <http://viaf.org/viaf/181558906> ;
+            <http://purl.org/dc/elements/1.1/rights> "Copyright (c) 2012 Université d'Orléans/LLL" ;
+            <http://purl.org/dc/elements/1.1/title> "ESLO1: entretien 019"@fr ;
+            <http://purl.org/dc/terms/alternative> "ESLO1: entretien 019 alt"@fr ;
+            <http://purl.org/dc/terms/isFormatOf> <http://cocoon.huma-num.fr/data/eslo/ESLO1_ENT_019_22km.wav> , <http://cocoon.huma-num.fr/data/eslo/ESLO1_ENT_019.mp3> ;
+            <http://purl.org/dc/terms/accessRights> " Freely available for non-commercial use" ;
+            <http://purl.org/dc/terms/license> <http://creativecommons.org/licenses/by-nc-sa/3.0/> ;
+            <http://purl.org/dc/terms/isPartOf> <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-COLLECTION_LANGUESDEFRANCE> , <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-COLLECTION_ESLO1> ;
+            <http://purl.org/dc/terms/extent> "PT0H47M16S" ;
+            <http://purl.org/dc/terms/created> "1969-04-11"^^<http://purl.org/dc/terms/W3CDTF> ;
+            <http://purl.org/dc/terms/spatial> "FR"^^<http://purl.org/dc/terms/ISO3166> , <http://vocab.getty.edu/tgn/7008337> , "France, Centre, Loiret, Orléans"@fr ;
+            <http://crdo.risc.cnrs.fr/schemas/master> <http://cocoon.huma-num.fr/data/eslo/masters/ESLO1_ENT_019.wav> ;
+            <http://purl.org/dc/terms/available> "2014-11-06"^^<http://purl.org/dc/terms/W3CDTF> ;
+            <http://purl.org/dc/terms/issued> "2014-12-05T15:00:19+01:00"^^<http://purl.org/dc/terms/W3CDTF> ;
+            <http://purl.org/dc/terms/modified> "2014-12-05T15:00:19+01:00"^^<http://purl.org/dc/terms/W3CDTF> ;
+            <http://www.language-archives.org/OLAC/1.1/speaker> "JK" , "UG393" ;
+            <http://purl.org/dc/elements/1.1/source> <http://archivesetmanuscrits.bnf.fr/ead.html?id=FRBNFEAD000095934&c=FRBNFEAD000095934_a19844296> ;
+            <http://www.w3.org/2003/01/geo/wgs84_pos#long> "1.90"^^xsd:float ;
+            <http://www.w3.org/2003/01/geo/wgs84_pos#lat> "47.90"^^xsd:float ;
+            <http://purl.org/dc/terms/tableOfContents> "01 née; famille a toujours habité Orléans03 oui, on y a des amis, relations04 oui, certainementT1 centralisait comptabilité dans une industrieT2 RR passer des écritures, caisse; horaires avant et après loi de 1936T3 aimait travail, rien ne lui déplaisaitT4 n'a jamais pensé à çaT5 actuellement on est forcée quelquefois - assurance sociale - retraite appréciable; autre chose avec enfantL1 concerts, théâtre, réunions, etc...:préfère s'occuperL2 messe, puis a passé la journée avec une amieL3 (quand elle travaillait) au bord de la mer ou voyages organisésE1 n'en sait rienE2 lui semble que ça aide le françaisE3 peut-être chimie, physiqueE4 intelligence, travail, familleE5 dépend de leurs capacitésE6 non : dépend de la vie de l'enfant plus tardP1 oui, à part loyers chersP4 ne comprend pas motifs des étudiants; très calme à OrléansP9 moins qu'avant 1940P10 RR bourgeois = gros rentiers, femmes d'officierss, gros industriels; chaque groupe se recevait mutuellement, formait un clanQ. Orléans une ville renfermée? oui : orléanais assez distant, peut-être moins maintenantP6 il faut avoir la moitié des votesP7 des candidats se retirentP8 droite gaulliste, réservée; gauche avancéeP5 pas grand-chose - attachés à leurs partisP11 oui, maintenant, par l'éducation; famille moins importanteP12 à diminuer : les gens travaillent beaucoup plus et l'argent a changé de mainsOmelette (je casse mes oeufs...)Questionnaire sociolinguistique"@fr ;
+            <http://purl.org/dc/terms/isRequiredBy> <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-ESLO1_ENT_019_C> , <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-ESLO1_ENT_019_A> ;
+            <http://www.language-archives.org/OLAC/1.1/editor> <http://viaf.org/viaf/39685504> , <http://viaf.org/viaf/200058210> ;
+            <http://purl.org/dc/terms/abstract> " Identifiant du témoin : UG 393 Femme, 72 ans (né en 1897, à Orléans ) ; comptable en retraite Enregistré par Jack Kay, le 11 avril 1969, au domicile du témoin. Questionnaires enregistrés : questionnaire sociolinguistique; questionnaire ouvert(questions 01 ; 03-04 ; T1-T5 ; L1-L3 ; E1-E6 ; P1 ; P4 ; P9-P10 ; P6-P8 ; P5 ; P11-P12 ; omelette). Classe politique du témoin : Centre Remarques sur le témoignage : réponses concises. Intérêt pédagogique : conditions de travail avant la guerre de 1940 ; classes sociales. Acoustique : bonne qualité d'enregistrement."@fr ;
+            <http://www.language-archives.org/OLAC/1.1/researcher> "Kay, Jack" ;
+            <http://purl.org/dc/elements/1.1/relation> <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-ESLO1_ENTCONT_233> ;
+            <http://purl.org/dc/terms/medium> "1 bande magnétique audio"@fr ;
+            <http://purl.org/dc/terms/bibliographicCitation> "A.-M. VURPAS (1988), Autrefois dans les monts du Beaujolais, Action graphique.";
+            <http://purl.org/dc/elements/1.1/identifier> "Cote producteur: 001_3"@fr ;
+            <http://purl.org/dc/elements/1.1/reference> <http://panini.u-paris10.fr> ;
+            <http://purl.org/dc/elements/1.1/coverage> "Quartier concerné : 3e"@fr ;
+            <http://purl.org/dc/elements/1.1/creator> "Blanc, Michel" , "Biggs, Patricia" .
+EOT
+        ,
+        'NO-FORMAT' => <<<EOT
+        @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+        @prefix owl: <http://www.w3.org/2002/07/owl#> .
+        @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+        @prefix fn: <http://www.w3.org/2005/xpath-functions#> .
+        @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+        @prefix sesame: <http://www.openrdf.org/schema/sesame#> .
+        @prefix v: <http://rdf.data-vocabulary.org/#> .
+            <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-ESLO1_ENT_019> a <http://crdo.risc.cnrs.fr/schemas/Resource> ;
+            <http://purl.org/dc/elements/1.1/description> "Extrait du corpus d'Orléans, réalisé dans le cadre de l'Enquête SocioLinguistique à Orléans à la fin des années 1960."@fr ;
+            <http://purl.org/dc/elements/1.1/type> <http://purl.org/dc/dcmitype/Sound> , "primary_text"^^<http://www.language-archives.org/OLAC/1.1/linguistic-type> , "dialogue"^^<http://www.language-archives.org/OLAC/1.1/discourse-type> ;
+            <http://purl.org/dc/elements/1.1/subject> <http://lexvo.org/id/iso639-3/fra> , "text_and_corpus_linguistics"^^<http://www.language-archives.org/OLAC/1.1/linguistic-field> , <http://ark.bnf.fr/ark:/12148/cb135052099> , <http://ark.bnf.fr/ark:/12148/cb11943508j> , <http://ark.bnf.fr/ark:/12148/cb11934124q> , <http://ark.bnf.fr/ark:/12148/cb11931498c> , <http://ark.bnf.fr/ark:/12148/cb11935508t> , <http://ark.bnf.fr/ark:/12148/cb11934132b> , <http://ark.bnf.fr/ark:/12148/cb11939893p> , <http://ark.bnf.fr/ark:/12148/cb11933091b> ;
+            <http://purl.org/dc/elements/1.1/language> <http://lexvo.org/id/iso639-3/fra> ;
+            <http://www.language-archives.org/OLAC/1.1/depositor> <http://viaf.org/viaf/181558906> ;
+            <http://purl.org/dc/elements/1.1/publisher> <http://viaf.org/viaf/181558906> ;
+            <http://purl.org/dc/elements/1.1/rights> "Copyright (c) 2012 Université d'Orléans/LLL" ;
+            <http://purl.org/dc/elements/1.1/title> "ESLO1: entretien 019"@fr ;
+            <http://purl.org/dc/terms/alternative> "ESLO1: entretien 019 alt"@fr ;
+            <http://purl.org/dc/terms/isFormatOf> <http://cocoon.huma-num.fr/data/eslo/ESLO1_ENT_019_22km.wav> , <http://cocoon.huma-num.fr/data/eslo/ESLO1_ENT_019.mp3> ;
+            <http://purl.org/dc/terms/accessRights> " Freely available for non-commercial use" ;
+            <http://purl.org/dc/terms/license> <http://creativecommons.org/licenses/by-nc-sa/3.0/> ;
+            <http://purl.org/dc/terms/isPartOf> <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-COLLECTION_LANGUESDEFRANCE> , <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-COLLECTION_ESLO1> ;
+            <http://purl.org/dc/terms/extent> "PT0H47M16S" ;
+            <http://purl.org/dc/terms/created> "1969-04-11"^^<http://purl.org/dc/terms/W3CDTF> ;
+            <http://purl.org/dc/terms/spatial> "FR"^^<http://purl.org/dc/terms/ISO3166> , <http://vocab.getty.edu/tgn/7008337> , "France, Centre, Loiret, Orléans"@fr ;
+            <http://crdo.risc.cnrs.fr/schemas/master> <http://cocoon.huma-num.fr/data/eslo/masters/ESLO1_ENT_019.wav> ;
+            <http://purl.org/dc/terms/available> "2014-11-06"^^<http://purl.org/dc/terms/W3CDTF> ;
+            <http://purl.org/dc/terms/issued> "2014-12-05T15:00:19+01:00"^^<http://purl.org/dc/terms/W3CDTF> ;
+            <http://purl.org/dc/terms/modified> "2014-12-05T15:00:19+01:00"^^<http://purl.org/dc/terms/W3CDTF> ;
+            <http://www.language-archives.org/OLAC/1.1/speaker> "JK" , "UG393" ;
+            <http://purl.org/dc/elements/1.1/source> <http://archivesetmanuscrits.bnf.fr/ead.html?id=FRBNFEAD000095934&c=FRBNFEAD000095934_a19844296> ;
+            <http://www.w3.org/2003/01/geo/wgs84_pos#long> "1.90"^^xsd:float ;
+            <http://www.w3.org/2003/01/geo/wgs84_pos#lat> "47.90"^^xsd:float ;
+            <http://purl.org/dc/terms/tableOfContents> "01 née; famille a toujours habité Orléans03 oui, on y a des amis, relations04 oui, certainementT1 centralisait comptabilité dans une industrieT2 RR passer des écritures, caisse; horaires avant et après loi de 1936T3 aimait travail, rien ne lui déplaisaitT4 n'a jamais pensé à çaT5 actuellement on est forcée quelquefois - assurance sociale - retraite appréciable; autre chose avec enfantL1 concerts, théâtre, réunions, etc...:préfère s'occuperL2 messe, puis a passé la journée avec une amieL3 (quand elle travaillait) au bord de la mer ou voyages organisésE1 n'en sait rienE2 lui semble que ça aide le françaisE3 peut-être chimie, physiqueE4 intelligence, travail, familleE5 dépend de leurs capacitésE6 non : dépend de la vie de l'enfant plus tardP1 oui, à part loyers chersP4 ne comprend pas motifs des étudiants; très calme à OrléansP9 moins qu'avant 1940P10 RR bourgeois = gros rentiers, femmes d'officierss, gros industriels; chaque groupe se recevait mutuellement, formait un clanQ. Orléans une ville renfermée? oui : orléanais assez distant, peut-être moins maintenantP6 il faut avoir la moitié des votesP7 des candidats se retirentP8 droite gaulliste, réservée; gauche avancéeP5 pas grand-chose - attachés à leurs partisP11 oui, maintenant, par l'éducation; famille moins importanteP12 à diminuer : les gens travaillent beaucoup plus et l'argent a changé de mainsOmelette (je casse mes oeufs...)Questionnaire sociolinguistique"@fr ;
+            <http://purl.org/dc/terms/isRequiredBy> <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-ESLO1_ENT_019_C> , <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-ESLO1_ENT_019_A> ;
+            <http://www.language-archives.org/OLAC/1.1/editor> <http://viaf.org/viaf/39685504> , <http://viaf.org/viaf/200058210> ;
+            <http://purl.org/dc/terms/abstract> " Identifiant du témoin : UG 393 Femme, 72 ans (né en 1897, à Orléans ) ; comptable en retraite Enregistré par Jack Kay, le 11 avril 1969, au domicile du témoin. Questionnaires enregistrés : questionnaire sociolinguistique; questionnaire ouvert(questions 01 ; 03-04 ; T1-T5 ; L1-L3 ; E1-E6 ; P1 ; P4 ; P9-P10 ; P6-P8 ; P5 ; P11-P12 ; omelette). Classe politique du témoin : Centre Remarques sur le témoignage : réponses concises. Intérêt pédagogique : conditions de travail avant la guerre de 1940 ; classes sociales. Acoustique : bonne qualité d'enregistrement."@fr ;
+            <http://www.language-archives.org/OLAC/1.1/researcher> "Kay, Jack" ;
+            <http://purl.org/dc/elements/1.1/relation> <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-ESLO1_ENTCONT_233> ;
+            <http://purl.org/dc/terms/medium> "1 bande magnétique audio"@fr ;
+            <http://purl.org/dc/terms/bibliographicCitation> "A.-M. VURPAS (1988), Autrefois dans les monts du Beaujolais, Action graphique.";
+            <http://purl.org/dc/elements/1.1/identifier> "Cote producteur: 001_3"@fr ;
+            <http://purl.org/dc/elements/1.1/reference> <http://panini.u-paris10.fr> ;
+            <http://purl.org/dc/elements/1.1/creator> "Blanc, Michel" , "Biggs, Patricia" .
+
+EOT
+    ];
+
+    const TEST_INPUT_ID = "crdo-ESLO1_ENT_019";
+    const TEST_GRAPH_URI = "http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-ESLO1_ENT_019";
+    const TEST_CHO_URI = "http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-ESLO1_ENT_019";
+
+
+    private $inputGraphes = [];
+    private $resGraphes = [];
+    private $mappers = [];
+
+    function __construct(string $name = null) {
+        parent::__construct($name);
+    }
+
+    public function setUp() {
+        parent::setUp();
+
+        foreach(CocoonSoundRdfMapperTest::TEST_INPUT_DOCS as $key => $inputDoc) {
+            $this->inputGraphes[$key] = new Graph("http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-ESLO1_ENT_019", $inputDoc);
+            $this->mappers[$key] = new CocoonSoundRdfMapper($this->inputGraphes[$key]);
+            $this->mappers[$key]->mapGraph();
+            $this->resGraphes[$key] = $this->mappers[$key]->getOutputGraphes()[$this->inputGraphes[$key]->getUri()];
+        }
+    }
+
+    public function tearDown() {
+        parent::tearDown();
+    }
+
+    /**
+     * Just test that the construct and setup are ok
+     *
+     * @return void
+     */
+    public function testInit()
+    {
+        $this->assertTrue(true);
+    }
+
+    /**
+     * Test that the returned graph has the same uri that the original.
+     *
+     * @return void
+     */
+    public function testUri() {
+
+         echo $this->resGraphes['BASE']->serialise('turtle');
+         //echo var_export($this->resGraphes['BASE']->toRdfPhp());
+
+         $this->assertNotNull($this->resGraphes['BASE']);
+         $this->assertEquals(CocoonSoundRdfMapperTest::TEST_GRAPH_URI, $this->resGraphes['BASE']->getUri(), "URIS must be translated");
+     }
+
+    /**
+      * Test that the return graph has one ore:Aggregation resource
+      *
+      * @return void
+      */
+    public function testAggregationResource() {
+
+         $resources = $this->resGraphes['BASE']->allOfType('ore:Aggregation');
+
+         $this->assertCount(1, $resources, "Must found only one resources of type ore:Aggregation");
+         $this->assertEquals(CocoonSoundRdfMapperTest::TEST_GRAPH_URI,$resources[0]);
+     }
+
+    /**
+      * test that there one (and only one) edm:dateProvider and edm:provider property
+      *
+      * @return void
+      */
+    public function testProviders() {
+
+         $providers = $this->resGraphes['BASE']->all(CocoonSoundRdfMapperTest::TEST_GRAPH_URI,'edm:provider');
+
+         $this->assertCount(1,$providers, "one and only one edm provider");
+         $this->assertTrue($providers[0] instanceof Literal);
+         $this->assertEquals('Corpus de la Parole', $providers[0]->getValue(), 'provider must be Corpus de la Parole');
+         $this->assertEquals('fr', $providers[0]->getLang(), 'provider must be in french');
+
+         $dataProviders = $this->resGraphes['BASE']->all(CocoonSoundRdfMapperTest::TEST_GRAPH_URI,'edm:dataProvider');
+
+         $this->assertCount(1,$dataProviders, "one and only one edm data provider");
+         //TODO: to change after viaf resolution
+         $this->assertTrue($dataProviders[0] instanceof Resource);
+         $this->assertEquals('http://viaf.org/viaf/181558906', $dataProviders[0]->getUri(), 'dataProvider uri must be http://viaf.org/viaf/181558906');
+    }
+
+
+    /**
+     * test isShownAt and isShownBy
+     *
+     * @return void
+     */
+    public function testIsShown() {
+
+        $isShownAts = $this->resGraphes['BASE']->all(CocoonSoundRdfMapperTest::TEST_GRAPH_URI, 'edm:isShownAt');
+
+        $this->assertCount(1, $isShownAts, "One edm:isShownAt");
+        $this->assertInstanceOf("EasyRdf\Resource", $isShownAts[0]);
+        $this->assertEquals("http://cocoon.huma-num.fr/exist/crdo/meta/crdo-ESLO1_ENT_019", $isShownAts[0]);
+
+        $isShownBys = $this->resGraphes['BASE']->all(CocoonSoundRdfMapperTest::TEST_GRAPH_URI, 'edm:isShownBy');
+
+        $this->assertCount(1, $isShownBys, "One edm:isShownBy");
+        $this->assertInstanceOf("EasyRdf\Resource", $isShownBys[0]);
+        $this->assertEquals("http://cocoon.huma-num.fr/data/eslo/masters/ESLO1_ENT_019.wav", $isShownBys[0]);
+
+    }
+
+    /**
+     * test rights
+     *
+     * @return void
+     */
+    public function testRights() {
+        $rightsNodes = $this->resGraphes['BASE']->all(CocoonSoundRdfMapperTest::TEST_GRAPH_URI, 'edm:rights');
+
+        $this->assertCount(1, $rightsNodes, "One edm:right");
+
+        $rights = $rightsNodes[0];
+
+        $this->assertTrue($rights instanceof Resource);
+
+        $this->assertEquals("http://creativecommons.org/licenses/by-nc-sa/4.0/", $rights->getUri(), "right must be CC-BY-NC");
+    }
+
+    /**
+     * Test that the return graph has one ore:Aggregation resource
+     *
+     * @return void
+     */
+    public function testProvidedCHO() {
+
+         $resources = $this->resGraphes['BASE']->allOfType('edm:ProvidedCHO');
+
+         $this->assertCount(1, $resources, "Must found only one resources of type edm:aggregatedCHO");
+         $this->assertEquals(CocoonSoundRdfMapperTest::TEST_CHO_URI,$resources[0]);
+     }
+
+    /**
+     * Test one to one mapping
+     *
+     * @return void
+     */
+    public function testOneToOneProvidedCHOIdentity() {
+
+        $properties = [
+            'http://purl.org/dc/terms/tableOfContents',
+            'http://purl.org/dc/elements/1.1/description',
+            'http://purl.org/dc/elements/1.1/language',
+            'http://purl.org/dc/elements/1.1/publisher',
+            'http://purl.org/dc/elements/1.1/rights',
+            'http://purl.org/dc/terms/license',
+            'http://purl.org/dc/elements/1.1/subject',
+            'http://purl.org/dc/elements/1.1/title',
+            'http://purl.org/dc/terms/available',
+            'http://purl.org/dc/terms/created',
+            'http://purl.org/dc/terms/issued',
+            'http://purl.org/dc/terms/extent',
+            'http://purl.org/dc/elements/1.1/type',
+            'http://purl.org/dc/elements/1.1/language',
+            'http://purl.org/dc/terms/medium',
+            'http://purl.org/dc/terms/isPartOf',
+            'http://purl.org/dc/elements/1.1/source',
+            'http://purl.org/dc/terms/alternative',
+            'http://purl.org/dc/terms/modified',
+            'http://purl.org/dc/terms/abstract',
+            'http://purl.org/dc/terms/bibliographicCitation',
+            'http://purl.org/dc/elements/1.1/identifier',
+            'http://purl.org/dc/terms/references',
+            'http://purl.org/dc/elements/1.1/coverage',
+            'http://purl.org/dc/elements/1.1/relation',
+            'http://purl.org/dc/elements/1.1/creator',
+        ];
+
+        $providedCHO = $this->resGraphes['BASE']->get('edm:ProvidedCHO', '^rdf:type');
+        $sourceNode = $this->inputGraphes['BASE']->get('http://crdo.risc.cnrs.fr/schemas/Resource', '^rdf:type');
+
+        $this->assertNotNull($providedCHO);
+        $this->assertNotNull($sourceNode);
+
+        foreach ($properties as $prop) {
+            $outputValuesStr = [];
+            foreach($providedCHO->all($this->resGraphes['BASE']->resource($prop)) as $outputValue) {
+                array_push($outputValuesStr, strval($outputValue));
+            }
+            $this->assertNotEmpty($outputValuesStr, "we must found some values to test $prop");
+            foreach ($sourceNode->all($this->inputGraphes['BASE']->resource($prop)) as $value) {
+                $this->assertContains(strval($value), $outputValuesStr, "$prop not found in output graph");
+            }
+        }
+
+    }
+
+    /**
+    * Test one to one mapping spatial info
+    *
+    * @return void
+    */
+    public function testOneToOneProvidedCHOSpatial() {
+        $providedCHO = $this->resGraphes['BASE']->get('edm:ProvidedCHO', '^rdf:type');
+        $sourceNode = $this->inputGraphes['BASE']->get('http://crdo.risc.cnrs.fr/schemas/Resource', '^rdf:type');
+
+        $this->assertNotNull($providedCHO);
+        $this->assertNotNull($sourceNode);
+
+        $spatials = $providedCHO->all($this->resGraphes['BASE']->resource('http://purl.org/dc/terms/spatial'));
+
+        $this->assertCount(1, $spatials, "Must have only one spatial node");
+        $spatial = $spatials[0];
+        $this->assertTrue($spatial->isBNode(),"spatial node must be blank");
+        $this->assertEquals("edm:Place", $spatial->type(), "spatial node type must be edm:Place");
+
+        $lats = $spatial->all('geo:lat');
+        $this->assertCount(1, $lats, "One latitude");
+        $this->assertInstanceOf("EasyRdf\Literal", $lats[0], "Latitude must be a litteral");
+        $this->assertEquals(Literal::create("47.90", null, 'xsd:float'), $lats[0], "lat must be '47.90'^^xsd:float");
+
+        $longs = $spatial->all('geo:long');
+        $this->assertCount(1, $longs, "One longitude");
+        $this->assertInstanceOf("EasyRdf\Literal", $longs[0], "Longitude must be a litteral");
+        $this->assertEquals(Literal::create("1.90", null, 'xsd:float'), $longs[0], "long must be '1.90'^^xsd:float");
+
+        $notes = $spatial->all('skos:note');
+        $this->assertCount(2, $notes, "2 notes");
+        $this->assertContainsOnlyInstancesOf("EasyRdf\Literal", $notes, "Notes mus be only literals");
+        $this->assertEquals(Literal::create("FR", null, "dc:ISO3166"), $notes[0], "notes contains 'FR'^^dc:ISO3166");
+        $this->assertEquals(Literal::create("France, Centre, Loiret, Orléans", "fr", null), $notes[1], "notes contains 'France, Centre, Loiret, Orléans'@fr");
+
+        $sameas = $spatial->all('owl:sameAs');
+        $this->assertCount(1, $sameas, "1 same as");
+        $this->assertContainsOnlyInstancesOf("EasyRdf\Resource", $sameas, "Notes mus be only resources");
+        $this->assertEquals('http://vocab.getty.edu/tgn/7008337', $sameas[0]->getUri(), "uri must be http://vocab.getty.edu/tgn/7008337");
+    }
+
+    /**
+     * Test one to one mapping trim values
+     *
+     * @return void
+     */
+    public function testOneToOneProvidedCHOTrim() {
+
+        $properties = [
+            'http://purl.org/dc/terms/accessRights',
+        ];
+
+        $providedCHO = $this->resGraphes['BASE']->get('edm:ProvidedCHO', '^rdf:type');
+        $sourceNode = $this->inputGraphes['BASE']->get('http://crdo.risc.cnrs.fr/schemas/Resource', '^rdf:type');
+
+        $this->assertNotNull($providedCHO);
+        $this->assertNotNull($sourceNode);
+
+        foreach ($properties as $prop) {
+            $outputValuesStr = [];
+            foreach($providedCHO->all($this->resGraphes['BASE']->resource($prop)) as $outputValue) {
+                array_push($outputValuesStr, strval($outputValue));
+            }
+            $this->assertNotEmpty($outputValuesStr, 'we must found some values to test');
+            foreach ($sourceNode->all($this->inputGraphes['BASE']->resource($prop)) as $value) {
+                $this->assertContains(trim(strval($value)), $outputValuesStr, "$prop not found in output graph");
+            }
+        }
+    }
+
+    /**
+     * Test one to one mapping trim values
+     *
+     * @return void
+     */
+    public function testOneToOneProvidedCHOReference() {
+
+        $providedCHO = $this->resGraphes['NO-FORMAT']->get('edm:ProvidedCHO', '^rdf:type');
+        $sourceNode = $this->inputGraphes['NO-FORMAT']->get('http://crdo.risc.cnrs.fr/schemas/Resource', '^rdf:type');
+
+        $this->assertNotNull($providedCHO);
+        $this->assertNotNull($sourceNode);
+
+        $outputValuesStr = [];
+        foreach($providedCHO->all($this->resGraphes['NO-FORMAT']->resource('http://purl.org/dc/terms/references')) as $outputValue) {
+            array_push($outputValuesStr, strval($outputValue));
+        }
+        $this->assertNotEmpty($outputValuesStr, 'we must found some values to test for http://purl.org/dc/elements/1.1/reference');
+        foreach ($sourceNode->all($this->inputGraphes['NO-FORMAT']->resource('http://purl.org/dc/elements/1.1/reference')) as $value) {
+            $this->assertContains(strval($value), $outputValuesStr, "http://purl.org/dc/terms/references not found in output graph");
+        }
+    }
+
+
+    /**
+     * Test that the web resources
+     *
+     * @return void
+     */
+    public function testWebResources() {
+
+        $resources = $this->resGraphes['BASE']->allOfType('edm:WebResources');
+
+        $this->assertCount(3, $resources, "Must found three webresources");
+
+        $aggregation = $this->resGraphes['BASE']->resource(CocoonSoundRdfMapperTest::TEST_GRAPH_URI);
+
+        foreach ($resources as $wres) {
+            $mimetypes = $wres->all($this->resGraphes['BASE']->resource('http://purl.org/dc/elements/1.1/format'));
+            $this->assertCount(1, $mimetypes, "Must find one mimetype.");
+            $mimetype = $mimetypes[0];
+            $this->assertInstanceOf("EasyRdf\Literal", $mimetype, "mimetype must be literal");
+            $this->assertEquals("dc:IMT",$mimetype->getDatatype());
+
+            $extends = $wres->all($this->resGraphes['BASE']->resource('http://purl.org/dc/terms/extent'));
+            $this->assertCount(1, $extends, "Must find one extent.");
+            $extent = $extends[0];
+            $this->assertInstanceOf("EasyRdf\Literal", $extent, "extent must be literal");
+            $this->assertStringStartsWith("PT", $extent->getValue(), "value mus start with PT");
+
+            if($wres->hasProperty('edm:isDerivativeOf')) {
+                $derivative = $wres->get('edm:isDerivativeOf');
+                $this->assertInstanceOf("EasyRdf\Resource", $derivative, "Derivative must be a resource");
+                $this->assertEquals("http://cocoon.huma-num.fr/data/eslo/masters/ESLO1_ENT_019.wav", $derivative->getUri(), "derivative uri must be http://cocoon.huma-num.fr/data/eslo/masters/ESLO1_ENT_019.wav");
+                $this->assertTrue($aggregation->hasProperty('edm:hasView', $wres));
+            }
+            else {
+                $this->assertTrue($aggregation->hasProperty('edm:isShownBy', $wres));
+            }
+
+        }
+    }
+
+    /**
+     * Test that the web resources
+     *
+     * @return void
+     */
+    public function testWebResourcesDate() {
+
+        $resources = $this->resGraphes['BASE']->allOfType('edm:WebResources');
+
+        foreach ($resources as $wres) {
+            $this->assertFalse($wres->hasProperty("http://purl.org/dc/terms/available"),"web resource must not have http://purl.org/dc/terms/available");
+            $this->assertFalse($wres->hasProperty("http://purl.org/dc/terms/modified"),"web resource must not have http://purl.org/dc/terms/modified");
+            $this->assertTrue($wres->hasProperty("http://purl.org/dc/terms/issued"), "Must have http://purl.org/dc/terms/issued");
+            $this->assertTrue($wres->hasProperty("http://purl.org/dc/terms/created"), "Must have http://purl.org/dc/terms/created");
+
+            $issued = $wres->getLiteral('dc:issued');
+            //<http://purl.org/dc/terms/issued> "2014-12-05T15:00:19+01:00"^^<http://purl.org/dc/terms/W3CDTF> ;
+            $this->assertInstanceOf('EasyRdf\Literal', $issued, "issued value must be a literal");
+            $this->assertEquals('http://purl.org/dc/terms/W3CDTF', $issued->getDatatypeUri(), "issued datatype uri must be a http://purl.org/dc/terms/W3CDTF");
+            $this->assertEquals('2014-12-05T15:00:19+01:00', $issued->getValue(), "Value must be 2014-12-05T15:00:19+01:00");
+
+            $created = $wres->getLiteral('dc:created');
+            //<http://purl.org/dc/terms/created> "1969-04-11"^^<http://purl.org/dc/terms/W3CDTF> ;
+            $this->assertInstanceOf('EasyRdf\Literal', $created, "created value must be a literal");
+            $this->assertEquals('http://purl.org/dc/terms/W3CDTF', $created->getDatatypeUri(), "created datatype uri must be a http://purl.org/dc/terms/W3CDTF");
+            $this->assertEquals('1969-04-11', $created->getValue(), "Value must be 1969-04-11");
+
+        }
+
+    }
+
+
+    /**
+     * Test collection graph creation
+     * @return void
+     */
+    public function testCollectionGraph() {
+        $outputs = $this->mappers['BASE']->getOutputGraphes();
+        $this->assertCount(3, $outputs, "Must have 3 graphes as output");
+        foreach($outputs as $url => $outputGraph) {
+            if($outputGraph->getUri() == 'http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-ESLO1_ENT_019') {
+                continue;
+            }
+            $this->assertContains($outputGraph->getUri(), ['http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-COLLECTION_LANGUESDEFRANCE', 'http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-COLLECTION_ESLO1']);
+            $this->assertEquals($outputGraph->resource($outputGraph->getUri())->type(), 'edm:Collection');
+        }
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/server/src/tests/libraries/Mappers/CocoonTextRdfMapperTest.php	Thu Dec 10 17:04:51 2015 +0100
@@ -0,0 +1,201 @@
+<?php
+
+use CorpusParole\Libraries\Mappers\CocoonTextRdfMapper;
+use CorpusParole\Libraries\CocoonUtils;
+
+use EasyRdf\Graph;
+use EasyRdf\Resource;
+use EasyRdf\Literal;
+
+use Illuminate\Foundation\Testing\WithoutMiddleware;
+use Illuminate\Foundation\Testing\DatabaseMigrations;
+use Illuminate\Foundation\Testing\DatabaseTransactions;
+
+class CocoonTextRdfMapperTest extends TestCase
+{
+
+    const TEST_INPUT_DOCS = [
+        'BASE' => <<<EOT
+        @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+        @prefix owl: <http://www.w3.org/2002/07/owl#> .
+        @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+        @prefix fn: <http://www.w3.org/2005/xpath-functions#> .
+        @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+        @prefix sesame: <http://www.openrdf.org/schema/sesame#> .
+        @prefix v: <http://rdf.data-vocabulary.org/#> .
+        <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-UVE_MOCIKA> a <http://crdo.risc.cnrs.fr/schemas/Resource> ;
+            <http://purl.org/dc/elements/1.1/description> "Voilà pourquoi le bernard-l'hermite, aujourd'hui, se cache dans les coquilles vides qu'il trouve, alors que le crabe de cocotier n'a pas honte de se promener tout nu."@fr ;
+            <http://purl.org/dc/elements/1.1/format> "text/xml"^^<http://purl.org/dc/terms/IMT> ;
+            <http://purl.org/dc/elements/1.1/type> "primary_text"^^<http://www.language-archives.org/OLAC/1.1/linguistic-type> , <http://purl.org/dc/dcmitype/Text> , "narrative"^^<http://www.language-archives.org/OLAC/1.1/discourse-type> ;
+            <http://purl.org/dc/elements/1.1/subject> <http://lexvo.org/id/iso639-3/uve> ;
+            <http://purl.org/dc/elements/1.1/language> <http://lexvo.org/id/iso639-3/uve> ;
+            <http://www.language-archives.org/OLAC/1.1/depositor> <http://viaf.org/viaf/56614135> ;
+            <http://purl.org/dc/elements/1.1/publisher> <http://viaf.org/viaf/154919513> ;
+            <http://purl.org/dc/elements/1.1/rights> "Copyright (c) Moyse-Faurie, Claire" ;
+            <http://purl.org/dc/elements/1.1/title> "The two hermit crabs and the coconut crab"@en ;
+            <http://purl.org/dc/terms/isFormatOf> <http://cocoon.huma-num.fr/exist/crdo/moyse-faurie/uve/crdo-UVE_MOCIKA.xml> , <http://cocoon.huma-num.fr/exist/crdo/moyse-faurie/uve/crdo-UVE_MOCIKA.xhtml> ;
+            <http://purl.org/dc/terms/accessRights> "Freely available for non-commercial use" ;
+            <http://purl.org/dc/terms/license> <http://creativecommons.org/licenses/by-nc-sa/2.5/> ;
+            <http://purl.org/dc/terms/isPartOf> <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-COLLECTION_LANGUESDEFRANCE> , <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-COLLECTION_LACITO> ;
+            <http://purl.org/dc/terms/spatial> "NC"^^<http://purl.org/dc/terms/ISO3166> , "New Caledonia, Ohnyat (Ouvéa)" ;
+            <http://purl.org/dc/terms/available> "2011-02-05"^^<http://purl.org/dc/terms/W3CDTF> ;
+            <http://purl.org/dc/terms/issued> "2011-02-05T23:22:23+01:00"^^<http://purl.org/dc/terms/W3CDTF> ;
+            <http://www.language-archives.org/OLAC/1.1/speaker> "Idakote, Félicien" ;
+            <http://purl.org/dc/terms/requires> <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-UVE_MOCIKA_SOUND> ;
+            <http://purl.org/dc/terms/alternative> "Les deux bernard-l'hermite et le crabe de cocotier"@fr ;
+            <http://www.language-archives.org/OLAC/1.1/researcher> "Moyse-Faurie, Claire" ;
+            <http://purl.org/dc/terms/modified> "2002-02-20"^^<http://purl.org/dc/terms/W3CDTF> ;
+            <http://purl.org/dc/terms/conformsTo> <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-dtd_archive> .
+EOT
+    ];
+
+    const TEST_INPUT_ID = "crdo-UVE_MOCIKA_SOUND";
+    const TEST_GRAPH_URI = "http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-UVE_MOCIKA_SOUND";
+    const TEST_CHO_URI = "http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-UVE_MOCIKA_SOUND";
+
+
+    private $inputGraphes = [];
+    private $resGraphes = [];
+    private $mappers = [];
+
+    function __construct(string $name = null) {
+        parent::__construct($name);
+    }
+
+    public function setUp() {
+        parent::setUp();
+
+        foreach(CocoonTextRdfMapperTest::TEST_INPUT_DOCS as $key => $inputDoc) {
+            $this->inputGraphes[$key] = new Graph("http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-UVE_MOCIKA", $inputDoc);
+            $this->mappers[$key] = new CocoonTextRdfMapper($this->inputGraphes[$key]);
+            $this->mappers[$key]->mapGraph();
+            $this->resGraphes[$key] = $this->mappers[$key]->getOutputGraphes()["http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-UVE_MOCIKA_SOUND"];
+        }
+    }
+
+    public function tearDown() {
+        parent::tearDown();
+    }
+
+    /**
+     * Just test that the construct and setup are ok
+     *
+     * @return void
+     */
+    public function testInit()
+    {
+        $this->assertTrue(true);
+    }
+
+    /**
+     * Test that the returned graph has the same uri that the original.
+     *
+     * @return void
+     */
+    public function testUri() {
+
+        echo $this->resGraphes['BASE']->serialise('turtle');
+        //echo var_export($this->resGraphes['BASE']->toRdfPhp());
+
+        $this->assertNotNull($this->resGraphes['BASE']);
+        $this->assertEquals(CocoonTextRdfMapperTest::TEST_GRAPH_URI, $this->resGraphes['BASE']->getUri(), "URIS must be translated");
+    }
+
+    /**
+     * Test that the return graph has one ore:Aggregation resource
+     *
+     * @return void
+     */
+    public function testAggregationResource() {
+
+        $resources = $this->resGraphes['BASE']->allOfType('ore:Aggregation');
+
+        $this->assertCount(1, $resources, "Must found only one resources of type ore:Aggregation");
+        $this->assertEquals(CocoonTextRdfMapperTest::TEST_GRAPH_URI,$resources[0]->getUri());
+    }
+
+    /**
+     * Test providedCHO uri.
+     *
+     * @return void
+     */
+    public function testProvidedChoURI() {
+        $resources = $this->resGraphes['BASE']->allOfType('edm:ProvidedCHO');
+
+        $this->assertCount(1, $resources, "Must found only one resources of type edm:ProvidedCHO");
+        $this->assertEquals(CocoonTextRdfMapperTest::TEST_CHO_URI,$resources[0]->getUri());
+    }
+
+    /**
+     * Test that the returned graph does not have a http://purl.org/dc/dcmitype/Sound type
+     *
+     * @return void
+     */
+    public function testType() {
+        //"primary_text"^^<http://www.language-archives.org/OLAC/1.1/linguistic-type> , <http://purl.org/dc/dcmitype/Text> , "narrative"^^<http://www.language-archives.org/OLAC/1.1/discourse-type> ;
+        $providedCHO = $this->resGraphes['BASE']->get('edm:ProvidedCHO', '^rdf:type');
+
+        $this->assertNotNull($providedCHO);
+
+        $this->assertcount(3, $providedCHO->all($this->resGraphes['BASE']->resource('http://purl.org/dc/elements/1.1/type')), 'but should find 2 literals');
+
+        $dcTypeList = $providedCHO->all($this->resGraphes['BASE']->resource('http://purl.org/dc/elements/1.1/type'));
+        foreach ($dcTypeList as $dcType) {
+            $this->assertThat(
+                $dcType,
+                $this->logicalXor(
+                    $this->isInstanceOf(EasyRdf\Literal::class),
+                    $this->isInstanceOf(EasyRdf\Resource::class)
+                )
+            );
+        }
+    }
+
+     /**
+      * Test that the web resources
+      *
+      * @return void
+      */
+    public function testWebResources() {
+
+        $resources = $this->resGraphes['BASE']->allOfType('edm:WebResources');
+
+        $this->assertCount(2, $resources, "Must found three webresources");
+
+        $aggregation = $this->resGraphes['BASE']->resource(CocoonTextRdfMapperTest::TEST_GRAPH_URI);
+
+        foreach ($resources as $wres) {
+            $mimetypes = $wres->all($this->resGraphes['BASE']->resource('http://purl.org/dc/elements/1.1/format'));
+            $this->assertCount(1, $mimetypes, "Must find one mimetype.");
+            $mimetype = $mimetypes[0];
+            $this->assertInstanceOf("EasyRdf\Literal", $mimetype, "mimetype must be literal");
+            $this->assertEquals("dc:IMT",$mimetype->getDatatype());
+        }
+    }
+
+     /**
+      * Test that the web resources
+      *
+      * @return void
+      */
+    public function testWebResourcesDate() {
+
+        $resources = $this->resGraphes['BASE']->allOfType('edm:WebResources');
+
+        foreach ($resources as $wres) {
+            $this->assertFalse($wres->hasProperty("http://purl.org/dc/terms/available"),"web resource must not have http://purl.org/dc/terms/available");
+            $this->assertFalse($wres->hasProperty("http://purl.org/dc/terms/modified"),"web resource must not have http://purl.org/dc/terms/modified");
+            $this->assertTrue($wres->hasProperty("http://purl.org/dc/terms/issued"), "Must have http://purl.org/dc/terms/issued");
+
+            $issued = $wres->getLiteral('dc:issued');
+            //<http://purl.org/dc/terms/issued> "2014-12-05T15:00:19+01:00"^^<http://purl.org/dc/terms/W3CDTF> ;
+            $this->assertInstanceOf('EasyRdf\Literal', $issued, "issued value must be a literal");
+            $this->assertEquals('http://purl.org/dc/terms/W3CDTF', $issued->getDatatypeUri(), "issued datatype uri must be a http://purl.org/dc/terms/W3CDTF");
+            $this->assertEquals('2011-02-05T23:22:23+01:00', $issued->getValue(), "Value must be 2014-12-05T15:00:19+01:00");
+
+        }
+
+    }
+
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/server/src/tests/libraries/Mergers/CocoonCollectionRdfMergerTest.php	Thu Dec 10 17:04:51 2015 +0100
@@ -0,0 +1,216 @@
+<?php
+
+use CorpusParole\Libraries\Mergers\CocoonCollectionRdfMerger;
+use CorpusParole\Libraries\CocoonUtils;
+
+use EasyRdf\Graph;
+use EasyRdf\Resource;
+use EasyRdf\Literal;
+
+use Illuminate\Foundation\Testing\WithoutMiddleware;
+use Illuminate\Foundation\Testing\DatabaseMigrations;
+use Illuminate\Foundation\Testing\DatabaseTransactions;
+
+class CocoonCollectionRdfMergerTest extends TestCase
+{
+
+    const TEST_INPUT_DOCS = [
+        'BASE' => <<<EOT
+        @prefix edm: <http://www.europeana.eu/schemas/edm/> .
+        @prefix dc11: <http://purl.org/dc/elements/1.1/> .
+        @prefix dc: <http://purl.org/dc/terms/> .
+        @prefix olac: <http://www.language-archives.org/OLAC/1.1/> .
+        @prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> .
+        @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+        @prefix skos: <http://www.w3.org/2004/02/skos/core#> .
+        @prefix owl: <http://www.w3.org/2002/07/owl#> .
+
+        <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-COLLECTION_CFPP2000>
+          a edm:Collection ;
+          dc11:description "Corpus de Français Parlé Parisien des années 2000."@fr, "Le Corpus de Français Parlé Parisien (CFPP2000) est composé d'un ensemble d'interviews non directives sur les quartiers de Paris et de la proche banlieue. Les entretiens, transcrits en orthographe et alignés au tour de parole, sont disponibles sur le net ; ils sont librement employables en échange de la mention dans la bibliographie des travaux qui en seraient tirés d'une part de l'adresse du site: http://cfpp2000.univ-paris3.fr/ et d'autre part du document de présentation suivant : Branca-Rosoff S., Fleury S., Lefeuvre F., Pires M., 2012, \"Discours sur la ville. Présentation du Corpus de Français Parlé Parisien des années 2000 (CFPP2000)\". En février 2013, ce corpus comprenait environ 550 000 mots. Un certain nombre d'outils en ligne, notamment un concordancier et  des outils textométriques permettent de mener des requêtes lexicales et grammaticales. CFPP2000 est particulièrement destiné à des analyses sur le français oral. Le projet sous-jacent au corpus est par ailleurs l'étude des modifications et des variations qui interviennent dans ce qu'on peut considérer comme un parisien véhiculaire en tension entre le pôle du standard et le pôle du vernaculaire. Par ailleurs, il comporte des activités linguistiques diversifiées (description de quartier, anecdotes, argumentation…) et on peut par conséquent travailler sur la syntaxe propre à ces différentes utilisations du langage. Il permet enfin d'opposer dialogues (entre enquêteur et enquêtés) et multilogues (où la présence de plusieurs enquêtés favorise le passage à un registre familier).  CFPP2000 est constitué d'interviews longues (d'une heure en moyenne) intégralement transcrites. Il est donc utilisable pour examiner les singularités qui reviennent à l'idiolecte propre à une personne donnée, par opposition aux variantes diffusées dans des groupes plus larges (quartiers, groupes socio-culturels, classe d'âge, etc.). Le corpus constitue enfin un ensemble de témoignages intéressants sur les représentations de Paris et de sa proche banlieue qui est susceptible d'intéresser des analystes du discours, des sociologues, ou tout simplement des curieux de la ville."@fr ;
+          dc11:language <http://lexvo.org/id/iso639-3/gsw> ;
+          dc11:publisher <http://viaf.org/viaf/142432638>, "Fédération CLESTHIA", <http://viaf.org/viaf/154862993> ;
+          dc11:rights "Copyright (c) Département de dialectologie alsacienne et mosellane de l'Université de Strasbourg" ;
+          dc11:type <http://purl.org/dc/dcmitype/Collection> ;
+          dc:license <http://creativecommons.org/licenses/by-nc-sa/3.0/> ;
+          dc11:subject <http://lexvo.org/id/iso639-3/fra> ;
+          dc11:title "Corpus de Français Parlé Parisien des années 2000 (CFPP)"@fr ;
+          dc:accessRights "Freely available for non-commercial use" ;
+          dc:isPartOf <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-COLLECTION_ALA> ;
+          olac:compiler "Branca-Rosoff, Sonia", "Fleury, Serge", "Lefeuvre, Florence", "Pires, Mat" ;
+          dc11:contributor "Branca-Rosoff, Sonia", "Fleury, Serge", "Lefeuvre, Florence", "Pires, Mat", <http://viaf.org/viaf/93752300>, "Ville de Paris ", "Délégation générale à la langue française et aux langues de France " ;
+          olac:data_inputter "Branca-Rosoff, Sonia", "Lefeuvre, Florence", "Pires, Mat" ;
+          olac:depositor <http://viaf.org/viaf/93752300> ;
+          olac:developer "Fleury, Serge" ;
+          olac:interviewer "Branca-Rosoff, Sonia", "Lefeuvre, Florence", "Pires, Mat" ;
+          olac:researcher "Branca-Rosoff, Sonia", "Fleury, Serge", "Lefeuvre, Florence", "Pires, Mat" ;
+          olac:sponsor "Ville de Paris ", "Délégation générale à la langue française et aux langues de France " ;
+          olac:transcriber "Branca-Rosoff, Sonia", "Lefeuvre, Florence", "Pires, Mat" ;
+          dc:available "2013-04-12"^^dc:W3CDTF ;
+          dc:created "start=1988; end=1989"^^dc:Period ;
+          dc:issued "2013-04-12T22:20:23+02:00"^^dc:W3CDTF ;
+          dc:modified "2014-05-10T20:16:27+02:00"^^dc:W3CDTF ;
+          dc:spatial [
+            a edm:Place ;
+            geo:lat "48.8667"^^xsd:float ;
+            geo:long "2.3333"^^xsd:float ;
+            skos:note "FR"^^dc:ISO3166, "France, Paris, Université Sorbonne Nouvelle Paris 3, site Censier"@fr ;
+            owl:sameAs <http://vocab.getty.edu/tgn/7008038>
+          ] .
+EOT
+        ,
+        'SOURCE' => <<<EOT
+        @prefix edm: <http://www.europeana.eu/schemas/edm/> .
+        @prefix dc11: <http://purl.org/dc/elements/1.1/> .
+        @prefix dc: <http://purl.org/dc/terms/> .
+        @prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> .
+        @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+        @prefix skos: <http://www.w3.org/2004/02/skos/core#> .
+        @prefix owl: <http://www.w3.org/2002/07/owl#> .
+
+        <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-COLLECTION_CFPP2000>
+          a edm:Collection ;
+          dc11:title "Other title"@fr ;
+          dc:created "start=1988; end=1989"^^dc:Period ;
+          dc:issued "2013-04-12T22:20:23+02:00"^^dc:W3CDTF ;
+          dc:modified "2014-05-10T20:16:27+02:00"^^dc:W3CDTF ;
+          dc11:language <http://lexvo.org/id/iso639-3/gsw>, <http://lexvo.org/id/iso639-3/fra> ;
+          dc:spatial [
+            a edm:Place ;
+            geo:lat "89.8667"^^xsd:float ;
+            geo:long "55.3333"^^xsd:float ;
+            skos:note "FR"^^dc:ISO3166, "France, Paris, Université Sorbonne Nouvelle Paris 3, site Censier"@fr, "Other place very important"@fr ;
+            owl:sameAs <http://vocab.getty.edu/tgn/1234567890>
+          ] .
+EOT
+    ];
+
+    const TEST_INPUT_ID = "crdo-COLLECTION_CFPP2000";
+    const TEST_GRAPH_URI = "http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-COLLECTION_CFPP2000";
+    const TEST_CHO_URI = "http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-COLLECTION_CFPP2000";
+
+
+    private $inputGraphes = [];
+    private $resGraph;
+    private $merger;
+
+    function __construct(string $name = null) {
+        parent::__construct($name);
+    }
+
+    public function setUp() {
+        parent::setUp();
+
+        foreach(CocoonCollectionRdfMergerTest::TEST_INPUT_DOCS as $key => $inputDoc) {
+            $this->inputGraphes[$key] = new Graph("http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-COLLECTION_CFPP2000", $inputDoc);
+        }
+
+        $this->merger = new CocoonCollectionRdfMerger();
+        $this->resGraph = $this->merger->mergeGraph($this->inputGraphes['BASE'], $this->inputGraphes['SOURCE']);
+    }
+
+    public function tearDown() {
+        parent::tearDown();
+    }
+
+    /**
+     * Just test that the construct and setup are ok
+     *
+     * @return void
+     */
+    public function testInit()
+    {
+        $this->assertTrue(true);
+        echo $this->resGraph->serialise('turtle');
+    }
+
+    /**
+     * test the result graph.
+     *
+     * @return void
+     */
+    public function testResGraph() {
+        $this->assertNotNull($this->resGraph, "Res graph must not be null");
+        $this->assertEquals("http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-COLLECTION_CFPP2000", $this->resGraph->getUri(), "graph uri must be equals to http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-CFPP2000_35_SOUND");
+    }
+
+    /**
+     * test the merged Aggregation
+     *
+     * @return void
+     */
+    public function testCollectionResource() {
+        $collectionResList = $this->resGraph->allOfType('http://www.europeana.eu/schemas/edm/Collection');
+        $this->assertCount(1, $collectionResList, "Only one Collection node");
+        $collectionRes = $collectionResList[0];
+
+        $this->assertEquals("http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-COLLECTION_CFPP2000",$collectionRes->getUri(),"Collection node uri must be http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-COLLECTION_CFPP2000");
+
+        $singleValuesRes = [
+            'http://purl.org/dc/elements/1.1/title' => ['size'=>1, 'val' => new Literal("Corpus de Français Parlé Parisien des années 2000 (CFPP)", "fr", null)],
+            'http://purl.org/dc/terms/available' => ['size'=>1, 'val' => new Literal("2013-04-12", null, "dc:W3CDTF")],
+            'http://purl.org/dc/terms/created' => ['size'=>1, 'val' => new Literal("start=1988; end=1989", null, "dc:Period")],
+            'http://purl.org/dc/terms/issued' => ['size'=>1, 'val' => new Literal("2013-04-12T22:20:23+02:00", null, "dc:W3CDTF")],
+            'http://purl.org/dc/terms/modified' => ['size'=>1, 'val' => new Literal("2014-05-10T20:16:27+02:00", null, "dc:W3CDTF")],
+            'http://purl.org/dc/elements/1.1/language' => ['size' => 2, 'val' => [
+                $this->resGraph->resource("http://lexvo.org/id/iso639-3/gsw"),
+                $this->resGraph->resource("http://lexvo.org/id/iso639-3/fra"),
+            ]]
+        ];
+
+        foreach($singleValuesRes as $property => $resVal) {
+            $resList = $collectionRes->all($this->inputGraphes['BASE']->resource($property));
+            $this->assertCount($resVal['size'], $resList, "$property list size $resVal[size]");
+            if($resVal['size'] == 1) {
+                $this->assertEquals($resVal['val'], $resList[0], "$property size one not equals");
+            }
+            else {
+                $this->assertEquals($resVal['val'], $resList, "$property size more than one not equals");
+            }
+        }
+
+    }
+
+    /**
+    * Test one to one mapping spatial info
+    *
+    * @return void
+    */
+    public function testProvidedCHOSpatial() {
+        $collection = $this->resGraph->get('edm:Collection', '^rdf:type');
+
+        $this->assertNotNull($collection);
+
+        $spatials = $collection->all($this->resGraph->resource('http://purl.org/dc/terms/spatial'));
+
+        $this->assertCount(1, $spatials, "Must have only one spatial node");
+        $spatial = $spatials[0];
+        $this->assertTrue($spatial->isBNode(),"spatial node must be blank");
+        $this->assertEquals("edm:Place", $spatial->type(), "spatial node type must be edm:Place");
+
+        $lats = $spatial->all('geo:lat');
+        $this->assertCount(1, $lats, "One latitude");
+        $this->assertInstanceOf("EasyRdf\Literal", $lats[0], "Latitude must be a litteral");
+        $this->assertEquals(Literal::create("48.8667", null, 'xsd:float'), $lats[0], "lat must be '48.8667'^^xsd:float");
+
+        $longs = $spatial->all('geo:long');
+        $this->assertCount(1, $longs, "One longitude");
+        $this->assertInstanceOf("EasyRdf\Literal", $longs[0], "Longitude must be a litteral");
+        $this->assertEquals(Literal::create("2.3333", null, 'xsd:float'), $longs[0], "long must be '2.3333'^^xsd:float");
+
+        $notes = $spatial->all('skos:note');
+        $this->assertCount(3, $notes, "3 notes");
+        $this->assertContainsOnlyInstancesOf("EasyRdf\Literal", $notes, "Notes mus be only literals");
+        $this->assertEquals(Literal::create("FR", null, "dc:ISO3166"), $notes[0], "notes contains 'FR'^^dc:ISO3166");
+        $this->assertEquals(Literal::create("France, Paris, Université Sorbonne Nouvelle Paris 3, site Censier", "fr", null), $notes[1], "notes contains 'France, Paris, Université Sorbonne Nouvelle Paris 3, site Censier'@fr");
+        $this->assertEquals(Literal::create("Other place very important", "fr", null), $notes[2], "notes contains 'Other place very important'@fr");
+
+        $sameas = $spatial->all('owl:sameAs');
+        $this->assertCount(1, $sameas, "1 same as");
+        $this->assertContainsOnlyInstancesOf("EasyRdf\Resource", $sameas, "Notes mus be only resources");
+        $this->assertEquals('http://vocab.getty.edu/tgn/7008038', $sameas[0]->getUri(), "uri must be http://vocab.getty.edu/tgn/7008038");
+    }
+
+
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/server/src/tests/libraries/Mergers/CocoonSoundRdfMergerTest.php	Thu Dec 10 17:04:51 2015 +0100
@@ -0,0 +1,334 @@
+<?php
+
+use CorpusParole\Libraries\Mergers\CocoonSoundRdfMerger;
+use CorpusParole\Libraries\CocoonUtils;
+
+use EasyRdf\Graph;
+use EasyRdf\Resource;
+use EasyRdf\Literal;
+
+use Illuminate\Foundation\Testing\WithoutMiddleware;
+use Illuminate\Foundation\Testing\DatabaseMigrations;
+use Illuminate\Foundation\Testing\DatabaseTransactions;
+
+class CocoonSoundRdfMergerTest extends TestCase
+{
+
+    const TEST_INPUT_DOCS = [
+        'BASE' => <<<EOT
+        @prefix ore: <http://www.openarchives.org/ore/terms/> .
+        @prefix edm: <http://www.europeana.eu/schemas/edm/> .
+        @prefix dc11: <http://purl.org/dc/elements/1.1/> .
+        @prefix olac: <http://www.language-archives.org/OLAC/1.1/> .
+        @prefix dc: <http://purl.org/dc/terms/> .
+        @prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> .
+        @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+        @prefix skos: <http://www.w3.org/2004/02/skos/core#> .
+        @prefix owl: <http://www.w3.org/2002/07/owl#> .
+
+        <http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-CFPP2000_35_SOUND>
+          a ore:Aggregation ;
+          edm:aggregatedCHO <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-CFPP2000_35_SOUND> ;
+          edm:provider "Corpus de la Parole"@fr ;
+          edm:dataProvider <http://viaf.org/viaf/142432638> ;
+          edm:isShownAt <http://cocoon.huma-num.fr/exist/crdo/meta/crdo-CFPP2000_35_SOUND> ;
+          edm:isShownBy <http://cocoon.huma-num.fr/data/archi/masters/372593.wav> ;
+          edm:rights <http://creativecommons.org/licenses/by-nc-sa/4.0/> ;
+          edm:hasView <http://cocoon.huma-num.fr/data/cfpp2000/Ozgur_Kilic_H_32_alii_3e-2.wav>, <http://cocoon.huma-num.fr/data/cfpp2000/Ozgur_Kilic_H_32_alii_3e-2.mp3> .
+
+        <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-CFPP2000_35_SOUND>
+          a edm:ProvidedCHO ;
+          dc11:description "Enregistrement issu du Corpus de Français Parlé Parisien des années 2000 (CFPP2000)"@fr, "Enregistrement: Caractéristiques de l'enregistrement; Identifiant : CFPP2000 [03-01] Ozgur_Kilic_H_32_alii_3e; Langue : français; Editeur : Université Paris III – Syled ; Date : 17.11.2010; Lieu de l'enregistrement : au domicile de l’enquêté Özgur KILIÇ ; Enquêteur : Sonia BRANCA-ROSOFF; Quartier(s) concerné(s) : Paris 3e, et 20e (pour l’âge adulte); Transcription : Noalig TANGUY; Anonymisation : Noalig TANGUY; Durée : 0h46’; "@fr, "Enquêteur: Etat civil; Prénom et NOM : Sonia BRANCA-ROSOFF; Sexe : féminin; Lieu de naissance : New-York (USA); Lieu la petite enfance : Bretagne, puis région parisienne, puis de 8 à 16 ans Nice; Date de naissance : 16.12.1947; Situation familiale : mariée, deux enfants; Mobilité géographique : Paris 1967-1971, Aix-en-Provence 1971-1996, Paris 1996-2012; Scolarité; Niveau : Primaire [X] Secondaire [X] ; Supérieur : Licence [X] Post-licence [X] ; Dernier diplôme, avec année d’obtention : Doctorat d’État (sciences du langage) 1987; Travail; Activité actuelle : Enseignante-chercheuse (linguistique française), Université de la Sorbonne Nouvelle-Paris III, Paris; Activités passées : ; Langues; Langue première : français; Parents (profession, lieu de naissance, scolarité…); Mère : née en 1916 à Nice (France), interprète de conférences ; licence d’anglais; Père : né en 1913 à Mananjary (Madagascar), ingénieur.; "@fr, "Enquêté 1: Etat civil; Prénom et NOM fictifs : Özgur KILIÇ ; Sexe : masculin; Lieu de naissance: Paris 11e, France; Lieu la petite enfance : Paris 11e, France; Date de naissance : 07.02.1979; Age au moment de l’enregistrement : 32 ans; Situation familiale : pacsé, deux enfants; Mobilité géographique : 3e, 18e, 20e arrondissements; Relation (parenté, ami, etc) avec Enquêteur : aucune; Relation (parenté, ami, etc) avec autres enquêtés : amis; Scolarité; Niveau : Primaire [X] Secondaire [X] ; Supérieur : Licence [X] Post-licence [X] ; Dernier diplôme, avec année d’obtention : ; Précisions : Primaire  st Merri 75003 ; Secondaire : Victor Hugo, Turgot 75003, Jean Lurçat 75013 général bac ES Supérieur. Puis St Denis université (cinéma); Travail; Activité actuelle : ingénieur du son pour l'audiovisuel; Activités passées : restauration, assistant son pour l'audiovisuel ; Langues; Langues pratiquées : français, anglais, turc; Parents (profession, lieu de naissance, scolarité…); Mère : psychothérapeute, né a Houilles région parisienne France; Père : professeur d'université, né a Istanbul en Turquie.  ; "@fr, "Enquêté 2: Etat civil; Prénom et NOM fictifs : Michel CHEVRIER; Sexe : masculin; Lieu de naissance : naissance à Boulogne-Billancourt (92); Lieu la petite enfance : rue du Temple, 3e arrondissement, Paris; Date de naissance : 01.06.1979; Age au moment de l’enregistrement : 31 ans; Situation familiale : concubinage; Mobilité géographique : 3e, puis 20e (entre 2005 et 2009) puis Romainville (depuis 2009); Relation (parenté, ami, etc) avec Enquêteur : ; Relation (parenté, ami, etc) avec Enquêté NOM : ; Relation (parenté, ami, etc) avec Enquêté NOM : ; Prénom et NOM réels : ; Réseau par lequel contacté : ; Adresse (si connue) : ; Téléphone (si connu) : ; Scolarité; Niveau : Primaire [X] Secondaire [X] ; Supérieur : Licence [X] Post-licence [X] ; Dernier diplôme, avec année d’obtention : ; Précisions : Primaire : École à aire ouverte rue St Merri 75003 ; Secondaire (Collège Victor Hugo 75003) puis Lycée Autogéré de Paris (75015) Bac Littéraire. Deux années au CIM (école de jazz) dans le 75018, puis 3 ans au conservatoire du 9eme; Travail; Activité actuelle : Musicien, Compositeur, Professeur de piano jazz ; Activités passées : Musicien; Langues; Langues pratiquées : français, anglais; Parents (profession, lieu de naissance, scolarité…); Mère : ancienne médecin généraliste pneumologue, puis sociologue, née en France; Père : enseignant en sciences de l'éducation à Paris 8 né en Belgique; "@fr, "Enquêté 3: Etat civil; Prénom et NOM fictifs : Benoît DU BREUIL-DE-PONT-EN-AUGE; Sexe : masculin; Lieu de naissance : Paris 14e; Lieu la petite enfance :  Paris 3e; Date de naissance : 28.11.1978; Age au moment de l’enregistrement : 32 ans; Situation familiale : concubinage avéré, avec papier de la mairie tamponné et signé!; Mobilité géographique : à 2 ans vit dans le 9°, puis déménage pour le 3°, est resté dans la même rue pendant 20 ans tout en changeant d'immeuble. Ensuite le 19° pendant 4 ans, puis Pantin 6 mois puis Les Lilas. ; Relation (parenté, ami, etc) avec Enquêteur : aucune; Relation (parenté, ami, etc) avec autres enquêtés : voir Scolarité, Précisions; Prénom et NOM réels : ; Réseau par lequel contacté : ; Scolarité; Niveau : Primaire [X] Secondaire [X] ; Supérieur : Licence [ ] Post-licence [ ] ; Dernier diplôme, avec année d’obtention : CAP; Précisions : Primaire école à aire ouverte (St Merri) dans le 4° avec Augustin, Ôzgur, Michel. Secondaire : collège Victor-Hugo dans le 3° avec Ôzgur ; puis CAP ; Travail; Activité actuelle : ; Activités passées : ébéniste agenceur puis ébéniste restaurateur et enfin constructeur décors (ainsi que de nombreux petits jobs ayant duré moins d'un an); Langues; Langues pratiquées : français; Parents (profession, lieu de naissance, scolarité…); Mère : à la retraite ; secrétaire de rédaction dans un grand journal, baccalauréat ; née à Montrouge; Père : conseiller à travail à pole emploi, né à Boulogne Billancourt, baccalauréat présenté 3 ou 4 fois, puis obtenu par équivalence. ; "@fr, "Enquêté 4: Etat civil; Enquêté 4; Prénom et NOM fictifs : ; Sexe : féminin / masculin; Lieu de naissance : Paris 14e; Lieu de la petite enfance : Paris 4e et 3e ; Date de naissance : 06.12.1976; Age au moment de l’enregistrement : 34 ans; Situation familiale : ; Mobilité géographique : Rue la Bruyère 75009 (1976-1978), Rambuteau 75004 (1978-1987/88) & 75003 (chgt de côté de rue 1988-1998), a quitté Paris de 1998 à 2005 ; Rue Rambuteau 75003 (2006-2010), rue Gossec 75012 (2011); Relation (parenté, ami, etc) avec Enquêteur : aucune; Relation (parenté, ami, etc) avec Enquêté 2 : ami; Relation (parenté, ami, etc) avec Enquêté NOM : ; Réseau par lequel contacté : ; Scolarité; Niveau : Primaire [X] Secondaire [X] ; Supérieur : Licence [X] Post-licence [X] ; Dernier diplôme, avec année d’obtention : ; Précisions : Primaire : Ecole St Merri 75003. Secondaire : Collège François Couperin 75004, Institut St Pierre Fourier 75012 ; Cours Charlemagne 75014 ; Travail; Activité actuelle : Superviseur Centre d'appels ; Activités passées : Animateur Club Enfant, Réceptionniste ; Langues; Langues pratiquées :; Parents (profession, lieu de naissance, scolarité…); Mère : retraitée, Paris, bac + 1/2 (?) ; Père : Conseiller Pôle Emploi, Paris, bac. ; "@fr, "Enquêté 5: Etat civil; Prénom et NOM fictifs : Étienne SALVEGAS; Sexe : masculin; Lieu de naissance : Paris 12e; Lieu de la petite enfance : Paris 3e Le Marais; Date de naissance :  16.06.1978; Age au moment de l’enregistrement : 32 ans; Situation familiale : marié 1 enfant, 12 ans de vie commune ; Mobilité géographique : 3e (1978-1999) 19e (1999-2002) 9e (2002-2011) ; Relation (parenté, ami, etc) avec Enquêteur : ; Relation (parenté, ami, etc) avec Enquêté 2 : ami ; Relation (parenté, ami, etc) avec Enquêté NOM : ; Prénom et NOM réels : ; Scolarité; Primaire [X] Secondaire [X] ; Supérieur : Licence [X] Post-licence [ ] ; Dernier diplôme, avec année d’obtention : ; Précisions : Primaire : Ecole Vertus, rue des Vertus 3ème. Secondaire Collège Montgolfier / Lycée Turgot 3ème. Supérieur Droit Univ. Paris Panthéon Sorbonne ; Travail; Activité actuelle : évènementiel; Activités passées : stagiaire journaliste sportif / relations publiques, accueil, agent de  sécurité, remplacement gardien, réceptionniste hôtellerie.; Langues; Langues pratiquées :; Parents (profession, lieu de naissance, scolarité…); Mère : né à Paris, lycée ; Père : né à Oloron (64), lycée ; "@fr ;
+          dc11:language <http://lexvo.org/id/iso639-3/fra> ;
+          dc11:publisher <http://viaf.org/viaf/142432638> ;
+          dc11:type <http://purl.org/dc/dcmitype/Sound>, "primary_text"^^olac:linguistic-type, "narrative"^^olac:discourse-type, "report"^^olac:discourse-type, "unintelligible_speech"^^olac:discourse-type ;
+          dc:license <http://creativecommons.org/licenses/by-nc-sa/3.0/> ;
+          dc11:subject "lexicography"^^olac:linguistic-field, "phonetics"^^olac:linguistic-field, "anthropological_linguistics"^^olac:linguistic-field, "general_linguistics"^^olac:linguistic-field, <http://lexvo.org/id/iso639-3/fra>, "text_and_corpus_linguistics"^^olac:linguistic-field, "phonology"^^olac:linguistic-field, "semantics"^^olac:linguistic-field, "sociolinguistics"^^olac:linguistic-field, "syntax"^^olac:linguistic-field, "typology"^^olac:linguistic-field, "discourse_analysis"^^olac:linguistic-field, "historical_linguistics"^^olac:linguistic-field, "language_documentation"^^olac:linguistic-field, "mathematical_linguistics"^^olac:linguistic-field ;
+          dc11:title "CFPP2000 [03-01] Ozgur_Kilic_H_32_alii_3e Entretien de Ozgur KILIÇ 2"@fr ;
+          dc:accessRights "Freely available for non-commercial use" ;
+          dc:extent "PT48M26S" ;
+          dc:isPartOf <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-COLLECTION_LANGUESDEFRANCE>, <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-COLLECTION_CFPP2000> ;
+          dc11:source "CFPP2000"@fr ;
+          dc11:coverage "Quartier concerné : 3e"@fr ;
+          olac:depositor <http://viaf.org/viaf/93752300> ;
+          dc11:contributor <http://viaf.org/viaf/93752300>, "Branca-Rosoff, Sonia", "Kiliç Ozgur", "Chevrier Michel", "du-Breuil-de-Pont-en-Auge Benoît", "du-Breuil-de-Pont-en-Auge Augustin", "Salvegas Etienne", "Tanguy Noalig" ;
+          olac:interviewer "Branca-Rosoff, Sonia" ;
+          olac:responder "Kiliç Ozgur", "Chevrier Michel", "du-Breuil-de-Pont-en-Auge Benoît", "du-Breuil-de-Pont-en-Auge Augustin", "Salvegas Etienne" ;
+          olac:transcriber "Tanguy Noalig" ;
+          dc:available "2013-10-12"^^dc:W3CDTF ;
+          dc:created "2010-11-17"^^dc:W3CDTF ;
+          dc:issued "2013-10-12T14:35:57+02:00"^^dc:W3CDTF ;
+          dc:spatial [
+            a edm:Place ;
+            geo:lat "48.83975"^^xsd:float ;
+            geo:long "2.3542"^^xsd:float ;
+            skos:note "FR"^^dc:ISO3166, "France, Paris, Université Sorbonne Nouvelle Paris 3, site Censier"@fr ;
+            owl:sameAs <http://vocab.getty.edu/tgn/7008038>
+          ] .
+
+        <http://cocoon.huma-num.fr/data/archi/masters/372593.wav>
+          a edm:WebResources ;
+          dc:extent "PT48M26S" ;
+          dc11:format "audio/x-wav"^^dc:IMT ;
+          dc:created "2010-11-17"^^dc:W3CDTF ;
+          dc:issued "2013-10-12T14:35:57+02:00"^^dc:W3CDTF .
+
+        <http://cocoon.huma-num.fr/data/cfpp2000/Ozgur_Kilic_H_32_alii_3e-2.wav>
+          a edm:WebResources ;
+          dc:extent "PT48M26S" ;
+          dc11:format "audio/x-wav"^^dc:IMT ;
+          edm:isDerivativeOf <http://cocoon.huma-num.fr/data/archi/masters/372593.wav> ;
+          dc:created "2010-11-17"^^dc:W3CDTF ;
+          dc:issued "2013-10-12T14:35:57+02:00"^^dc:W3CDTF .
+
+        <http://cocoon.huma-num.fr/data/cfpp2000/Ozgur_Kilic_H_32_alii_3e-2.mp3>
+          a edm:WebResources ;
+          dc:extent "PT48M26S" ;
+          dc11:format "audio/mpeg"^^dc:IMT ;
+          edm:isDerivativeOf <http://cocoon.huma-num.fr/data/archi/masters/372593.wav> ;
+          dc:created "2010-11-17"^^dc:W3CDTF ;
+          dc:issued "2013-10-12T14:35:57+02:00"^^dc:W3CDTF .
+EOT
+        ,
+        'SOURCE' => <<<EOT
+        @prefix ore: <http://www.openarchives.org/ore/terms/> .
+        @prefix edm: <http://www.europeana.eu/schemas/edm/> .
+        @prefix dc11: <http://purl.org/dc/elements/1.1/> .
+        @prefix olac: <http://www.language-archives.org/OLAC/1.1/> .
+        @prefix dc: <http://purl.org/dc/terms/> .
+        @prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> .
+        @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+        @prefix skos: <http://www.w3.org/2004/02/skos/core#> .
+        @prefix owl: <http://www.w3.org/2002/07/owl#> .
+
+        <http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-CFPP2000_35_SOUND>
+          a ore:Aggregation ;
+          edm:aggregatedCHO <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-CFPP2000_35_SOUND> ;
+          edm:provider "Corpus de la Parole"@fr ;
+          edm:dataProvider <http://viaf.org/viaf/142432638> ;
+          edm:isShownAt <http://cocoon.huma-num.fr/exist/crdo/meta/crdo-CFPP2000_35_SOUND> ;
+          edm:isShownBy <http://cocoon.huma-num.fr/exist/crdo/cfpp2000/fra/Ozgur_Kilic_H_32_alii_3e-2.xml> ;
+          edm:rights <http://creativecommons.org/licenses/by-nc-sa/4.0/> ;
+          edm:hasView <http://cocoon.huma-num.fr/exist/crdo/cfpp2000/fra/Ozgur_Kilic_H_32_alii_3e-2.xml>, <http://cocoon.huma-num.fr/exist/crdo/cfpp2000/fra/Ozgur_Kilic_H_32_alii_3e-2.xhtml>, <http://cocoon.huma-num.fr/data/cfpp2000/Ozgur_Kilic_H_32_alii_3e-2.wav> .
+
+        <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-CFPP2000_35_SOUND>
+          a edm:ProvidedCHO ;
+          dc11:description "Enregistrement issu du Corpus de Français Parlé Parisien des années 2000 (CFPP2000)"@fr, "Enregistrement: Caractéristiques de l'enregistrement; Identifiant : CFPP2000 [03-01] Ozgur_Kilic_H_32_alii_3e; Langue : français; Editeur : Université Paris III – Syled ; Date : 17.11.2010; Lieu de l'enregistrement : au domicile de l’enquêté Özgur KILIÇ ; Enquêteur : Sonia BRANCA-ROSOFF; Quartier(s) concerné(s) : Paris 3e, et 20e (pour l’âge adulte); Transcription : Noalig TANGUY; Anonymisation : Noalig TANGUY; Durée : 0h46’; "@fr, "Enquêteur: Etat civil; Prénom et NOM : Sonia BRANCA-ROSOFF; Sexe : féminin; Lieu de naissance : New-York (USA); Lieu la petite enfance : Bretagne, puis région parisienne, puis de 8 à 16 ans Nice; Date de naissance : 16.12.1947; Situation familiale : mariée, deux enfants; Mobilité géographique : Paris 1967-1971, Aix-en-Provence 1971-1996, Paris 1996-2012; Scolarité; Niveau : Primaire [X] Secondaire [X] ; Supérieur : Licence [X] Post-licence [X] ; Dernier diplôme, avec année d’obtention : Doctorat d’État (sciences du langage) 1987; Travail; Activité actuelle : Enseignante-chercheuse (linguistique française), Université de la Sorbonne Nouvelle-Paris III, Paris; Activités passées : ; Langues; Langue première : français; Parents (profession, lieu de naissance, scolarité…); Mère : née en 1916 à Nice (France), interprète de conférences ; licence d’anglais; Père : né en 1913 à Mananjary (Madagascar), ingénieur.; "@fr, "Enquêté 1: Etat civil; Prénom et NOM fictifs : Özgur KILIÇ ; Sexe : masculin; Lieu de naissance: Paris 11e, France; Lieu la petite enfance : Paris 11e, France; Date de naissance : 07.02.1979; Age au moment de l’enregistrement : 32 ans; Situation familiale : pacsé, deux enfants; Mobilité géographique : 3e, 18e, 20e arrondissements; Relation (parenté, ami, etc) avec Enquêteur : aucune; Relation (parenté, ami, etc) avec autres enquêtés : amis; Scolarité; Niveau : Primaire [X] Secondaire [X] ; Supérieur : Licence [X] Post-licence [X] ; Dernier diplôme, avec année d’obtention : ; Précisions : Primaire  st Merri 75003 ; Secondaire : Victor Hugo, Turgot 75003, Jean Lurçat 75013 général bac ES Supérieur. Puis St Denis université (cinéma); Travail; Activité actuelle : ingénieur du son pour l'audiovisuel; Activités passées : restauration, assistant son pour l'audiovisuel ; Langues; Langues pratiquées : français, anglais, turc; Parents (profession, lieu de naissance, scolarité…); Mère : psychothérapeute, né a Houilles région parisienne France; Père : professeur d'université, né a Istanbul en Turquie.  ; "@fr, "Enquêté 2: Etat civil; Prénom et NOM fictifs : Michel CHEVRIER; Sexe : masculin; Lieu de naissance : naissance à Boulogne-Billancourt (92); Lieu la petite enfance : rue du Temple, 3e arrondissement, Paris; Date de naissance : 01.06.1979; Age au moment de l’enregistrement : 31 ans; Situation familiale : concubinage; Mobilité géographique : 3e, puis 20e (entre 2005 et 2009) puis Romainville (depuis 2009); Relation (parenté, ami, etc) avec Enquêteur : ; Relation (parenté, ami, etc) avec Enquêté NOM : ; Relation (parenté, ami, etc) avec Enquêté NOM : ; Prénom et NOM réels : ; Réseau par lequel contacté : ; Adresse (si connue) : ; Téléphone (si connu) : ; Scolarité; Niveau : Primaire [X] Secondaire [X] ; Supérieur : Licence [X] Post-licence [X] ; Dernier diplôme, avec année d’obtention : ; Précisions : Primaire : École à aire ouverte rue St Merri 75003 ; Secondaire (Collège Victor Hugo 75003) puis Lycée Autogéré de Paris (75015) Bac Littéraire. Deux années au CIM (école de jazz) dans le 75018, puis 3 ans au conservatoire du 9eme; Travail; Activité actuelle : Musicien, Compositeur, Professeur de piano jazz ; Activités passées : Musicien; Langues; Langues pratiquées : français, anglais; Parents (profession, lieu de naissance, scolarité…); Mère : ancienne médecin généraliste pneumologue, puis sociologue, née en France; Père : enseignant en sciences de l'éducation à Paris 8 né en Belgique; "@fr, "Enquêté 3: Etat civil; Prénom et NOM fictifs : Benoît DU BREUIL-DE-PONT-EN-AUGE; Sexe : masculin; Lieu de naissance : Paris 14e; Lieu la petite enfance :  Paris 3e; Date de naissance : 28.11.1978; Age au moment de l’enregistrement : 32 ans; Situation familiale : concubinage avéré, avec papier de la mairie tamponné et signé!; Mobilité géographique : à 2 ans vit dans le 9°, puis déménage pour le 3°, est resté dans la même rue pendant 20 ans tout en changeant d'immeuble. Ensuite le 19° pendant 4 ans, puis Pantin 6 mois puis Les Lilas. ; Relation (parenté, ami, etc) avec Enquêteur : aucune; Relation (parenté, ami, etc) avec autres enquêtés : voir Scolarité, Précisions; Prénom et NOM réels : ; Réseau par lequel contacté : ; Scolarité; Niveau : Primaire [X] Secondaire [X] ; Supérieur : Licence [ ] Post-licence [ ] ; Dernier diplôme, avec année d’obtention : CAP; Précisions : Primaire école à aire ouverte (St Merri) dans le 4° avec Augustin, Ôzgur, Michel. Secondaire : collège Victor-Hugo dans le 3° avec Ôzgur ; puis CAP ; Travail; Activité actuelle : ; Activités passées : ébéniste agenceur puis ébéniste restaurateur et enfin constructeur décors (ainsi que de nombreux petits jobs ayant duré moins d'un an); Langues; Langues pratiquées : français; Parents (profession, lieu de naissance, scolarité…); Mère : à la retraite ; secrétaire de rédaction dans un grand journal, baccalauréat ; née à Montrouge; Père : conseiller à travail à pole emploi, né à Boulogne Billancourt, baccalauréat présenté 3 ou 4 fois, puis obtenu par équivalence. ; "@fr, "Enquêté 4: Etat civil; Enquêté 4; Prénom et NOM fictifs : ; Sexe : féminin / masculin; Lieu de naissance : Paris 14e; Lieu de la petite enfance : Paris 4e et 3e ; Date de naissance : 06.12.1976; Age au moment de l’enregistrement : 34 ans; Situation familiale : ; Mobilité géographique : Rue la Bruyère 75009 (1976-1978), Rambuteau 75004 (1978-1987/88) & 75003 (chgt de côté de rue 1988-1998), a quitté Paris de 1998 à 2005 ; Rue Rambuteau 75003 (2006-2010), rue Gossec 75012 (2011); Relation (parenté, ami, etc) avec Enquêteur : aucune; Relation (parenté, ami, etc) avec Enquêté 2 : ami; Relation (parenté, ami, etc) avec Enquêté NOM : ; Réseau par lequel contacté : ; Scolarité; Niveau : Primaire [X] Secondaire [X] ; Supérieur : Licence [X] Post-licence [X] ; Dernier diplôme, avec année d’obtention : ; Précisions : Primaire : Ecole St Merri 75003. Secondaire : Collège François Couperin 75004, Institut St Pierre Fourier 75012 ; Cours Charlemagne 75014 ; Travail; Activité actuelle : Superviseur Centre d'appels ; Activités passées : Animateur Club Enfant, Réceptionniste ; Langues; Langues pratiquées :; Parents (profession, lieu de naissance, scolarité…); Mère : retraitée, Paris, bac + 1/2 (?) ; Père : Conseiller Pôle Emploi, Paris, bac. ; "@fr, "Enquêté 5: Etat civil; Prénom et NOM fictifs : Étienne SALVEGAS; Sexe : masculin; Lieu de naissance : Paris 12e; Lieu de la petite enfance : Paris 3e Le Marais; Date de naissance :  16.06.1978; Age au moment de l’enregistrement : 32 ans; Situation familiale : marié 1 enfant, 12 ans de vie commune ; Mobilité géographique : 3e (1978-1999) 19e (1999-2002) 9e (2002-2011) ; Relation (parenté, ami, etc) avec Enquêteur : ; Relation (parenté, ami, etc) avec Enquêté 2 : ami ; Relation (parenté, ami, etc) avec Enquêté NOM : ; Prénom et NOM réels : ; Scolarité; Primaire [X] Secondaire [X] ; Supérieur : Licence [X] Post-licence [ ] ; Dernier diplôme, avec année d’obtention : ; Précisions : Primaire : Ecole Vertus, rue des Vertus 3ème. Secondaire Collège Montgolfier / Lycée Turgot 3ème. Supérieur Droit Univ. Paris Panthéon Sorbonne ; Travail; Activité actuelle : évènementiel; Activités passées : stagiaire journaliste sportif / relations publiques, accueil, agent de  sécurité, remplacement gardien, réceptionniste hôtellerie.; Langues; Langues pratiquées :; Parents (profession, lieu de naissance, scolarité…); Mère : né à Paris, lycée ; Père : né à Oloron (64), lycée ; "@fr ;
+          dc11:language <http://lexvo.org/id/iso639-3/fra> ;
+          dc11:publisher <http://viaf.org/viaf/142432638> ;
+          dc11:type "primary_text"^^olac:linguistic-type, "narrative"^^olac:discourse-type, "report"^^olac:discourse-type, "unintelligible_speech"^^olac:discourse-type ;
+          dc:license <http://creativecommons.org/licenses/by-nc-sa/3.0/> ;
+          dc11:subject "lexicography"^^olac:linguistic-field, "phonetics"^^olac:linguistic-field, "anthropological_linguistics"^^olac:linguistic-field, "general_linguistics"^^olac:linguistic-field, <http://lexvo.org/id/iso639-3/fra>, "text_and_corpus_linguistics"^^olac:linguistic-field, "phonology"^^olac:linguistic-field, "semantics"^^olac:linguistic-field, "sociolinguistics"^^olac:linguistic-field, "syntax"^^olac:linguistic-field, "typology"^^olac:linguistic-field, "discourse_analysis"^^olac:linguistic-field, "historical_linguistics"^^olac:linguistic-field, "language_documentation"^^olac:linguistic-field, "mathematical_linguistics"^^olac:linguistic-field ;
+          dc11:title "CFPP2000 [03-01] Ozgur_Kilic_H_32_alii_3e Entretien de Ozgur KILIÇ 2 (annotations)"@fr ;
+          dc:accessRights "Freely available for non-commercial use" ;
+          dc:isPartOf <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-COLLECTION_LANGUESDEFRANCE>, <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-COLLECTION_CFPP2000> ;
+          dc11:source "CFPP2000"@fr ;
+          dc11:coverage "Quartier concerné : 3e"@fr ;
+          olac:depositor <http://viaf.org/viaf/93752300> ;
+          dc11:contributor <http://viaf.org/viaf/93752300>, "Branca-Rosoff, Sonia", "Kiliç Ozgur", "Chevrier Michel", "du-Breuil-de-Pont-en-Auge Benoît", "du-Breuil-de-Pont-en-Auge Augustin", "Salvegas Etienne", "Tanguy Noalig" ;
+          olac:interviewer "Branca-Rosoff, Sonia" ;
+          olac:responder "Kiliç Ozgur", "Chevrier Michel", "du-Breuil-de-Pont-en-Auge Benoît", "du-Breuil-de-Pont-en-Auge Augustin", "Salvegas Etienne" ;
+          olac:transcriber "Tanguy Noalig" ;
+          dc:available "2013-11-04"^^dc:W3CDTF ;
+          dc:created "2010-11-17"^^dc:W3CDTF ;
+          dc:issued "2013-11-04T22:20:07+01:00"^^dc:W3CDTF ;
+          dc:spatial [
+            a edm:Place ;
+            geo:lat "99.83975"^^xsd:float ;
+            geo:long "25.3542"^^xsd:float ;
+            skos:note "FR"^^dc:ISO3166, "France, Paris, Université Sorbonne Nouvelle Paris 3, site Censier"@fr, "Other place very important"@fr ;
+            owl:sameAs <http://vocab.getty.edu/tgn/1234567890>
+          ] .
+
+        <http://cocoon.huma-num.fr/exist/crdo/cfpp2000/fra/Ozgur_Kilic_H_32_alii_3e-2.xml>
+          a edm:WebResources ;
+          dc11:format "application/xml"^^dc:IMT ;
+          dc:created "2010-11-17"^^dc:W3CDTF ;
+          dc:issued "2013-11-04T22:20:07+01:00"^^dc:W3CDTF .
+
+        <http://cocoon.huma-num.fr/exist/crdo/cfpp2000/fra/Ozgur_Kilic_H_32_alii_3e-2.xhtml>
+          a edm:WebResources ;
+          dc11:format "application/xhtml+xml"^^dc:IMT ;
+          dc:created "2010-11-17"^^dc:W3CDTF ;
+          dc:issued "2013-11-04T22:20:07+01:00"^^dc:W3CDTF .
+EOT
+    ];
+
+    const TEST_INPUT_ID = "crdo-ESLO1_ENT_019";
+    const TEST_GRAPH_URI = "http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-ESLO1_ENT_019";
+    const TEST_CHO_URI = "http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-ESLO1_ENT_019";
+
+
+    private $inputGraphes = [];
+    private $resGraph;
+    private $merger;
+
+    function __construct(string $name = null) {
+        parent::__construct($name);
+    }
+
+    public function setUp() {
+        parent::setUp();
+
+        foreach(CocoonSoundRdfMergerTest::TEST_INPUT_DOCS as $key => $inputDoc) {
+            $this->inputGraphes[$key] = new Graph("http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-CFPP2000_35_SOUND", $inputDoc);
+        }
+
+        $this->merger = new CocoonSoundRdfMerger();
+        $this->resGraph = $this->merger->mergeGraph($this->inputGraphes['BASE'], $this->inputGraphes['SOURCE']);
+    }
+
+    public function tearDown() {
+        parent::tearDown();
+    }
+
+    /**
+     * Just test that the construct and setup are ok
+     *
+     * @return void
+     */
+    public function testInit()
+    {
+        $this->assertTrue(true);
+        echo $this->resGraph->serialise('turtle');
+    }
+
+    /**
+     * test the result graph.
+     *
+     * @return void
+     */
+    public function testResGraph() {
+        $this->assertNotNull($this->resGraph, "Res graph must not be null");
+        $this->assertEquals("http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-CFPP2000_35_SOUND", $this->resGraph->getUri(), "graph uri must be equals to http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-CFPP2000_35_SOUND");
+    }
+
+    /**
+     * test the merged Aggregation
+     *
+     * @return void
+     */
+    public function testAggregationResource() {
+        $aggregationResList = $this->resGraph->allOfType('http://www.openarchives.org/ore/terms/Aggregation');
+        $this->assertCount(1, $aggregationResList, "Only one Aggregation node");
+        $aggregationRes = $aggregationResList[0];
+
+        $this->assertEquals("http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-CFPP2000_35_SOUND",$aggregationRes->getUri(),"Aggregation node uri must be http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-CFPP2000_35_SOUND");
+
+        $singleValuesRes = [
+            'http://www.europeana.eu/schemas/edm/aggregatedCHO' => ['size'=>1, 'val' => $this->resGraph->resource("http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-CFPP2000_35_SOUND")],
+            'http://www.europeana.eu/schemas/edm/provider' => ['size'=>1, 'val' => new Literal("Corpus de la Parole", "fr", null)],
+            'http://www.europeana.eu/schemas/edm/dataProvider' => ['size'=>1, 'val' => $this->resGraph->resource("http://viaf.org/viaf/142432638")],
+            'http://www.europeana.eu/schemas/edm/isShownAt' => ['size'=>1, 'val' => $this->resGraph->resource("http://cocoon.huma-num.fr/exist/crdo/meta/crdo-CFPP2000_35_SOUND")],
+            'http://www.europeana.eu/schemas/edm/isShownBy' => ['size'=>1, 'val' => $this->resGraph->resource("http://cocoon.huma-num.fr/data/archi/masters/372593.wav")],
+            'http://www.europeana.eu/schemas/edm/rights' => ['size'=>1, 'val' => $this->resGraph->resource("http://creativecommons.org/licenses/by-nc-sa/4.0/")],
+            'http://www.europeana.eu/schemas/edm/hasView' => ['size' => 4, 'val' => [
+                $this->resGraph->resource("http://cocoon.huma-num.fr/data/cfpp2000/Ozgur_Kilic_H_32_alii_3e-2.wav"),
+                $this->resGraph->resource("http://cocoon.huma-num.fr/data/cfpp2000/Ozgur_Kilic_H_32_alii_3e-2.mp3"),
+                $this->resGraph->resource("http://cocoon.huma-num.fr/exist/crdo/cfpp2000/fra/Ozgur_Kilic_H_32_alii_3e-2.xml"),
+                $this->resGraph->resource("http://cocoon.huma-num.fr/exist/crdo/cfpp2000/fra/Ozgur_Kilic_H_32_alii_3e-2.xhtml")
+            ]]
+        ];
+
+        foreach($singleValuesRes as $property => $resVal) {
+            $resList = $aggregationRes->all($this->inputGraphes['BASE']->resource($property));
+            $this->assertCount($resVal['size'], $resList, "$property list size $resVal[size]");
+            if($resVal['size'] == 1) {
+                $this->assertEquals($resVal['val'], $resList[0], "$property size one not equals");
+            }
+            else {
+                $this->assertEquals($resVal['val'], $resList, "$property size more than one not equals");
+            }
+        }
+
+    }
+
+    /**
+     * test web resources
+     *
+     * @return void
+     */
+    public function testWebResources() {
+        $webResList = $this->resGraph->allOfType('http://www.europeana.eu/schemas/edm/WebResources');
+
+        $this->assertCount(5, $webResList, "Must have 5 webResource");
+    }
+
+
+    /**
+    * Test one to one mapping spatial info
+    *
+    * @return void
+    */
+    public function testProvidedCHOSpatial() {
+        $providedCHO = $this->resGraph->get('edm:ProvidedCHO', '^rdf:type');
+
+        $this->assertNotNull($providedCHO);
+
+        $spatials = $providedCHO->all($this->resGraph->resource('http://purl.org/dc/terms/spatial'));
+
+        $this->assertCount(1, $spatials, "Must have only one spatial node");
+        $spatial = $spatials[0];
+        $this->assertTrue($spatial->isBNode(),"spatial node must be blank");
+        $this->assertEquals("edm:Place", $spatial->type(), "spatial node type must be edm:Place");
+
+        $lats = $spatial->all('geo:lat');
+        $this->assertCount(1, $lats, "One latitude");
+        $this->assertInstanceOf("EasyRdf\Literal", $lats[0], "Latitude must be a litteral");
+        $this->assertEquals(Literal::create("48.83975", null, 'xsd:float'), $lats[0], "lat must be '48.83975'^^xsd:float");
+
+        $longs = $spatial->all('geo:long');
+        $this->assertCount(1, $longs, "One longitude");
+        $this->assertInstanceOf("EasyRdf\Literal", $longs[0], "Longitude must be a litteral");
+        $this->assertEquals(Literal::create("2.3542", null, 'xsd:float'), $longs[0], "long must be '2.3542'^^xsd:float");
+
+        $notes = $spatial->all('skos:note');
+        $this->assertCount(3, $notes, "3 notes");
+        $this->assertContainsOnlyInstancesOf("EasyRdf\Literal", $notes, "Notes mus be only literals");
+        $this->assertEquals(Literal::create("FR", null, "dc:ISO3166"), $notes[0], "notes contains 'FR'^^dc:ISO3166");
+        $this->assertEquals(Literal::create("France, Paris, Université Sorbonne Nouvelle Paris 3, site Censier", "fr", null), $notes[1], "notes contains 'France, Centre, Loiret, Orléans'@fr");
+        $this->assertEquals(Literal::create("Other place very important", "fr", null), $notes[2], "notes contains 'Other place very important'@fr");
+
+        $sameas = $spatial->all('owl:sameAs');
+        $this->assertCount(1, $sameas, "1 same as");
+        $this->assertContainsOnlyInstancesOf("EasyRdf\Resource", $sameas, "Notes mus be only resources");
+        $this->assertEquals('http://vocab.getty.edu/tgn/7008038', $sameas[0]->getUri(), "uri must be http://vocab.getty.edu/tgn/7008038");
+    }
+
+
+    /**
+     * Test one to one mapping
+     *
+     * @return void
+     */
+    public function testProvidedCHOSingleproperty() {
+
+        $properties = [
+            "http://purl.org/dc/elements/1.1/title",
+            "http://purl.org/dc/terms/extent",
+            "http://purl.org/dc/terms/available",
+            "http://purl.org/dc/terms/created",
+            "http://purl.org/dc/terms/issued"
+        ];
+
+        $providedCHO = $this->resGraph->get('edm:ProvidedCHO', '^rdf:type');
+        $baseNode = $this->inputGraphes['BASE']->get('edm:ProvidedCHO', '^rdf:type');
+
+        $this->assertNotNull($providedCHO);
+        $this->assertNotNull($baseNode);
+
+        foreach ($properties as $prop) {
+            $outputValuesStr = [];
+            foreach($providedCHO->all($this->resGraph->resource($prop)) as $outputValue) {
+                array_push($outputValuesStr, strval($outputValue));
+            }
+            $this->assertNotEmpty($outputValuesStr, "we must found some values to test $prop");
+            foreach ($baseNode->all($this->inputGraphes['BASE']->resource($prop)) as $value) {
+                $this->assertContains(strval($value), $outputValuesStr, "$prop not found in output graph");
+            }
+        }
+
+    }
+
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/server/src/tests/libraries/UtilsTest.php	Thu Dec 10 17:04:51 2015 +0100
@@ -0,0 +1,34 @@
+<?php
+
+use CorpusParole\Libraries\Utils;
+
+class UtilsTest extends TestCase {
+    function __construct(string $name = null) {
+        parent::__construct($name);
+    }
+
+    public function setup() {
+    }
+
+    public function tearDown() {
+    }
+
+    public function testDateIntervalToMillis() {
+        $di = new \DateInterval("P1Y1M1DT1H1M1S");
+
+        $ms = Utils::dateIntervalToMillis($di);
+
+        $this->assertEquals(34277461000, $ms, "duration must be 3427746100");
+    }
+
+    public function testiso8601IntervalToMillis() {
+        $ms = Utils::iso8601IntervalToMillis("P1Y1M1DT1H1M1S");
+        $this->assertEquals(34277461000, $ms, "duration must be 3427746100");
+    }
+
+    public function testiso8601IntervalToMillisNull() {
+        $ms = Utils::iso8601IntervalToMillis(null);
+        $this->assertNull($ms, "duration must be null");
+    }
+
+}