put right, access and licence info on webresource
authorymh <ymh.work@gmail.com>
Fri, 05 Feb 2016 15:08:46 +0100
changeset 116 e60c55988ed4
parent 115 34ffc04cef62
child 117 7abc74acf392
put right, access and licence info on webresource
server/src/app/Libraries/Mappers/CocoonContentRdfMapper.php
server/src/app/Libraries/Mappers/CocoonSoundRdfMapper.php
server/src/app/Libraries/Mappers/CocoonTextRdfMapper.php
server/src/tests/libraries/Mappers/CocoonSoundRdfMapperTest.php
server/src/tests/libraries/Mappers/CocoonTextRdfMapperTest.php
server/src/tests/libraries/Mergers/CocoonSoundRdfMergerTest.php
server/src/tests/libraries/Mergers/CocoonTextRdfMergerTest.php
--- a/server/src/app/Libraries/Mappers/CocoonContentRdfMapper.php	Wed Feb 03 18:34:44 2016 +0100
+++ b/server/src/app/Libraries/Mappers/CocoonContentRdfMapper.php	Fri Feb 05 15:08:46 2016 +0100
@@ -108,19 +108,24 @@
 
     }
 
+    protected function addResourceRightProperties($resource, $res) {
+        $this->applyPropertiesToRes($res, $resource, [
+            ['http://purl.org/dc/elements/1.1/rights', null],
+            ['http://purl.org/dc/terms/license', null],
+            ['http://purl.org/dc/terms/accessRights', 'propertyTrimMap'],
+        ]);
+    }
+
     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', 'propertyCollectionMap'],
             ['http://purl.org/dc/terms/abstract', null],
@@ -160,9 +165,11 @@
             ['http://www.language-archives.org/OLAC/1.1/translator', 'propertyOlacRoleMap'],
         ]);
 
+        $this->addResourceRightProperties($providedCHOResource, $res);
+
     }
 
-    protected function addDateToWebResource($sourceRes, $targetRes) {
+    protected function addDateToWebResource($targetRes, $sourceRes) {
 
         $this->applyPropertiesToRes($sourceRes, $targetRes, [
             ['http://purl.org/dc/terms/created', null],
--- a/server/src/app/Libraries/Mappers/CocoonSoundRdfMapper.php	Wed Feb 03 18:34:44 2016 +0100
+++ b/server/src/app/Libraries/Mappers/CocoonSoundRdfMapper.php	Fri Feb 05 15:08:46 2016 +0100
@@ -119,7 +119,9 @@
                 $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);
+            $this->addResourceRightProperties($masterWebResource, $res);
+
+            $this->addDateToWebResource($masterWebResource, $res);
 
         }
 
@@ -135,7 +137,11 @@
             if(!is_null($masterReprUrl)) {
                 $webResource->addResource('edm:isDerivativeOf', $masterReprUrl);
             }
-            $this->addDateToWebResource($res, $webResource);
+
+            $this->addResourceRightProperties($webResource, $res);
+
+            $this->addDateToWebResource($webResource, $res);
+
             $aggregationNode->addResource('edm:hasView', $reprUrl);
         }
     }
--- a/server/src/app/Libraries/Mappers/CocoonTextRdfMapper.php	Wed Feb 03 18:34:44 2016 +0100
+++ b/server/src/app/Libraries/Mappers/CocoonTextRdfMapper.php	Fri Feb 05 15:08:46 2016 +0100
@@ -155,7 +155,8 @@
 
             $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);
+            $this->addResourceRightProperties($webResource, $res);
+            $this->addDateToWebResource($webResource, $res);
             $aggregationNode->addResource('edm:hasView', $reprUrl);
 
         }
--- a/server/src/tests/libraries/Mappers/CocoonSoundRdfMapperTest.php	Wed Feb 03 18:34:44 2016 +0100
+++ b/server/src/tests/libraries/Mappers/CocoonSoundRdfMapperTest.php	Fri Feb 05 15:08:46 2016 +0100
@@ -268,6 +268,51 @@
      }
 
 
+    public function testRightsWebResourceIdentity() {
+        $properties = [
+            "http://purl.org/dc/elements/1.1/rights",
+            'http://purl.org/dc/terms/license',
+        ];
+
+        $webResourceList = $this->resGraphes['BASE']->all('edm:WebResource', '^rdf:type');
+        $sourceNode = $this->inputGraphes['BASE']->get('http://crdo.risc.cnrs.fr/schemas/Resource', '^rdf:type');
+
+        foreach ($webResourceList as $webResource) {
+            foreach ($properties as $prop) {
+                $outputValuesStr = [];
+                foreach($webResource->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");
+                }
+            }
+        }
+    }
+
+    public function testRightsWebResourceTrim() {
+        $properties = [
+            'http://purl.org/dc/terms/accessRights',
+        ];
+
+        $webResourceList = $this->resGraphes['BASE']->all('edm:WebResource', '^rdf:type');
+        $sourceNode = $this->inputGraphes['BASE']->get('http://crdo.risc.cnrs.fr/schemas/Resource', '^rdf:type');
+
+        foreach ($webResourceList as $webResource) {
+            foreach ($properties as $prop) {
+                $outputValuesStr = [];
+                foreach($webResource->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(trim(strval($value)), $outputValuesStr, "$prop not found in output graph");
+                }
+            }
+        }
+    }
+
     /**
      * Test one to one mapping
      *
--- a/server/src/tests/libraries/Mappers/CocoonTextRdfMapperTest.php	Wed Feb 03 18:34:44 2016 +0100
+++ b/server/src/tests/libraries/Mappers/CocoonTextRdfMapperTest.php	Fri Feb 05 15:08:46 2016 +0100
@@ -133,6 +133,52 @@
 
     }
 
+    public function testRightsWebResourceIdentity() {
+        $properties = [
+            "http://purl.org/dc/elements/1.1/rights",
+            'http://purl.org/dc/terms/license',
+        ];
+
+        $webResourceList = $this->resGraphes['BASE']->all('edm:WebResource', '^rdf:type');
+        $sourceNode = $this->inputGraphes['BASE']->get('http://crdo.risc.cnrs.fr/schemas/Resource', '^rdf:type');
+
+        foreach ($webResourceList as $webResource) {
+            foreach ($properties as $prop) {
+                $outputValuesStr = [];
+                foreach($webResource->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");
+                }
+            }
+        }
+    }
+
+    public function testRightsWebResourceTrim() {
+        $properties = [
+            'http://purl.org/dc/terms/accessRights',
+        ];
+
+        $webResourceList = $this->resGraphes['BASE']->all('edm:WebResource', '^rdf:type');
+        $sourceNode = $this->inputGraphes['BASE']->get('http://crdo.risc.cnrs.fr/schemas/Resource', '^rdf:type');
+
+        foreach ($webResourceList as $webResource) {
+            foreach ($properties as $prop) {
+                $outputValuesStr = [];
+                foreach($webResource->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(trim(strval($value)), $outputValuesStr, "$prop not found in output graph");
+                }
+            }
+        }
+    }
+
+
     /**
      * Test providedCHO uri.
      *
--- a/server/src/tests/libraries/Mergers/CocoonSoundRdfMergerTest.php	Wed Feb 03 18:34:44 2016 +0100
+++ b/server/src/tests/libraries/Mergers/CocoonSoundRdfMergerTest.php	Fri Feb 05 15:08:46 2016 +0100
@@ -43,6 +43,7 @@
           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 ;
+          dc11:rights "Copyright (c) 2012 Université d'Orléans/LLL" ;
           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 ;
@@ -72,6 +73,9 @@
           dc:extent "PT48M26S" ;
           dc11:format "audio/x-wav"^^dc:IMT ;
           dc:created "2010-11-17"^^dc:W3CDTF ;
+          dc:accessRights "Freely available for non-commercial use" ;
+          dc:license <http://creativecommons.org/licenses/by-nc-sa/3.0/> ;
+          dc11:rights "Copyright (c) 2012 Université d'Orléans/LLL" ;
           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>
@@ -80,7 +84,11 @@
           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 .
+          dc:issued "2013-10-12T14:35:57+02:00"^^dc:W3CDTF ;
+          dc:accessRights "Freely available for non-commercial use" ;
+          dc:license <http://creativecommons.org/licenses/by-nc-sa/3.0/> ;
+          dc11:rights "Copyright (c) 2012 Université d'Orléans/LLL" .
+
 
         <http://cocoon.huma-num.fr/data/cfpp2000/Ozgur_Kilic_H_32_alii_3e-2.mp3>
           a edm:WebResource ;
@@ -88,7 +96,11 @@
           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 .
+          dc:issued "2013-10-12T14:35:57+02:00"^^dc:W3CDTF ;
+          dc:accessRights "Freely available for non-commercial use" ;
+          dc:license <http://creativecommons.org/licenses/by-nc-sa/3.0/> ;
+          dc11:rights "Copyright (c) 2012 Université d'Orléans/LLL" .
+
 EOT
         ,
         'SOURCE' => <<<EOT
@@ -123,6 +135,7 @@
           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" ;
+          dc11:rights "Copyright (c) 2012 Université d'Orléans/LLL" ;
           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 ;
@@ -146,13 +159,20 @@
           a edm:WebResource ;
           dc11:format "application/xml"^^dc:IMT ;
           dc:created "2010-11-17"^^dc:W3CDTF ;
-          dc:issued "2013-11-04T22:20:07+01:00"^^dc:W3CDTF .
+          dc:issued "2013-11-04T22:20:07+01:00"^^dc:W3CDTF ;
+          dc:license <http://creativecommons.org/licenses/by-nc-sa/3.0/> ;
+          dc:accessRights "Freely available for non-commercial use" ;
+          dc11:rights "Copyright (c) 2012 Université d'Orléans/LLL" .
 
         <http://cocoon.huma-num.fr/exist/crdo/cfpp2000/fra/Ozgur_Kilic_H_32_alii_3e-2.xhtml>
           a edm:WebResource ;
           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 .
+          dc:issued "2013-11-04T22:20:07+01:00"^^dc:W3CDTF ;
+          dc:license <http://creativecommons.org/licenses/by-nc-sa/3.0/> ;
+          dc:accessRights "Freely available for non-commercial use" ;
+          dc11:rights "Copyright (c) 2012 Université d'Orléans/LLL" .
+
 EOT
     ];
 
@@ -333,5 +353,26 @@
 
     }
 
+    public function testRightsWebResource() {
+        $properties = [
+            "http://purl.org/dc/elements/1.1/rights",
+            'http://purl.org/dc/terms/license',
+            'http://purl.org/dc/terms/accessRights',
+        ];
+
+        $webResourceList = $this->resGraph->all('edm:WebResource', '^rdf:type');
+
+        //just check that they have all these resources.
+        //TODO: check that the same rights are kept (difficult)
+        foreach ($webResourceList as $webResource) {
+            foreach ($properties as $prop) {
+                $outputValuesStr = [];
+                foreach($webResource->all($this->resGraph->resource($prop)) as $outputValue) {
+                    array_push($outputValuesStr, strval($outputValue));
+                }
+                $this->assertNotEmpty($outputValuesStr, "we must found some values to test $prop");
+            }
+        }
+    }
 
 }
--- a/server/src/tests/libraries/Mergers/CocoonTextRdfMergerTest.php	Wed Feb 03 18:34:44 2016 +0100
+++ b/server/src/tests/libraries/Mergers/CocoonTextRdfMergerTest.php	Fri Feb 05 15:08:46 2016 +0100
@@ -49,6 +49,7 @@
           dc11:subject <http://ark.bnf.fr/ark:/12148/cb11958119h>, <http://lexvo.org/id/iso639-3/uve>, <http://ark.bnf.fr/ark:/12148/cb11953067w> ;
           dc11:title "The two hermit crabs and the coconut crab"@en ;
           dc:accessRights "Freely available for non-commercial use" ;
+          dc11:rights "Copyright (c) 2012 Université d'Orléans/LLL" ;
           dc:extent "PT2M35S" ;
           edm:isGatheredInto <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-COLLECTION_LANGUESDEFRANCE>, <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-COLLECTION_LACITO> ;
           olac:depositor <http://viaf.org/viaf/56614135> ;
@@ -72,7 +73,11 @@
           dc:extent "PT2M35S" ;
           dc11:format "audio/x-wav"^^dc:IMT ;
           dc:created "1997-08-29"^^dc:W3CDTF ;
-          dc:issued "2010-10-23T00:08:27+02:00"^^dc:W3CDTF .
+          dc:issued "2010-10-23T00:08:27+02:00"^^dc:W3CDTF ;
+          dc:license <http://creativecommons.org/licenses/by-nc-sa/3.0/> ;
+          dc:accessRights "Freely available for non-commercial use" ;
+          dc11:rights "Copyright (c) 2012 Université d'Orléans/LLL" .
+
 
         <http://cocoon.huma-num.fr/data/archi/144187_MOCIKA_22km.wav>
           a edm:WebResources ;
@@ -80,7 +85,11 @@
           dc11:format "audio/x-wav"^^dc:IMT ;
           edm:isDerivativeOf <http://cocoon.huma-num.fr/data/archi/masters/144187.wav> ;
           dc:created "1997-08-29"^^dc:W3CDTF ;
-          dc:issued "2010-10-23T00:08:27+02:00"^^dc:W3CDTF .
+          dc:issued "2010-10-23T00:08:27+02:00"^^dc:W3CDTF ;
+          dc:license <http://creativecommons.org/licenses/by-nc-sa/3.0/> ;
+          dc:accessRights "Freely available for non-commercial use" ;
+          dc11:rights "Copyright (c) 2012 Université d'Orléans/LLL" .
+
 
         <http://cocoon.huma-num.fr/data/archi/mp3/144187_MOCIKA_44k.mp3>
           a edm:WebResources ;
@@ -88,7 +97,11 @@
           dc11:format "audio/mpeg"^^dc:IMT ;
           edm:isDerivativeOf <http://cocoon.huma-num.fr/data/archi/masters/144187.wav> ;
           dc:created "1997-08-29"^^dc:W3CDTF ;
-          dc:issued "2010-10-23T00:08:27+02:00"^^dc:W3CDTF .
+          dc:issued "2010-10-23T00:08:27+02:00"^^dc:W3CDTF ;
+          dc:license <http://creativecommons.org/licenses/by-nc-sa/3.0/> ;
+          dc:accessRights "Freely available for non-commercial use" ;
+          dc11:rights "Copyright (c) 2012 Université d'Orléans/LLL" .
+
 EOT
         ,
         'SOUND_NO_MOD' => <<<EOT
@@ -124,6 +137,7 @@
           dc11:subject <http://ark.bnf.fr/ark:/12148/cb11958119h>, <http://lexvo.org/id/iso639-3/uve>, <http://ark.bnf.fr/ark:/12148/cb11953067w> ;
           dc11:title "The two hermit crabs and the coconut crab"@en ;
           dc:accessRights "Freely available for non-commercial use" ;
+          dc11:rights "Copyright (c) 2012 Université d'Orléans/LLL" ;
           dc:extent "PT2M35S" ;
           edm:isGatheredInto <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-COLLECTION_LANGUESDEFRANCE>, <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-COLLECTION_LACITO> ;
           olac:depositor <http://viaf.org/viaf/56614135> ;
@@ -146,7 +160,11 @@
           dc:extent "PT2M35S" ;
           dc11:format "audio/x-wav"^^dc:IMT ;
           dc:created "1997-08-29"^^dc:W3CDTF ;
-          dc:issued "2010-10-23T00:08:27+02:00"^^dc:W3CDTF .
+          dc:issued "2010-10-23T00:08:27+02:00"^^dc:W3CDTF ;
+          dc:license <http://creativecommons.org/licenses/by-nc-sa/3.0/> ;
+          dc:accessRights "Freely available for non-commercial use" ;
+          dc11:rights "Copyright (c) 2012 Université d'Orléans/LLL" .
+
 
         <http://cocoon.huma-num.fr/data/archi/144187_MOCIKA_22km.wav>
           a edm:WebResources ;
@@ -154,7 +172,11 @@
           dc11:format "audio/x-wav"^^dc:IMT ;
           edm:isDerivativeOf <http://cocoon.huma-num.fr/data/archi/masters/144187.wav> ;
           dc:created "1997-08-29"^^dc:W3CDTF ;
-          dc:issued "2010-10-23T00:08:27+02:00"^^dc:W3CDTF .
+          dc:issued "2010-10-23T00:08:27+02:00"^^dc:W3CDTF ;
+          dc:license <http://creativecommons.org/licenses/by-nc-sa/3.0/> ;
+          dc:accessRights "Freely available for non-commercial use" ;
+          dc11:rights "Copyright (c) 2012 Université d'Orléans/LLL" .
+
 
         <http://cocoon.huma-num.fr/data/archi/mp3/144187_MOCIKA_44k.mp3>
           a edm:WebResources ;
@@ -162,7 +184,11 @@
           dc11:format "audio/mpeg"^^dc:IMT ;
           edm:isDerivativeOf <http://cocoon.huma-num.fr/data/archi/masters/144187.wav> ;
           dc:created "1997-08-29"^^dc:W3CDTF ;
-          dc:issued "2010-10-23T00:08:27+02:00"^^dc:W3CDTF .
+          dc:issued "2010-10-23T00:08:27+02:00"^^dc:W3CDTF ;
+          dc:license <http://creativecommons.org/licenses/by-nc-sa/3.0/> ;
+          dc:accessRights "Freely available for non-commercial use" ;
+          dc11:rights "Copyright (c) 2012 Université d'Orléans/LLL" .
+
 EOT
         ,
         'TEXT' => <<<EOT
@@ -195,6 +221,7 @@
           dc11:subject <http://lexvo.org/id/iso639-3/uve> ;
           dc11:title "The two hermit crabs and the coconut crab"@en ;
           dc:accessRights "Freely available for non-commercial use" ;
+          dc11:rights "Copyright (c) 2012 Université d'Orléans/LLL" ;
           edm:isGatheredInto <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-COLLECTION_LANGUESDEFRANCE>, <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-COLLECTION_LACITO> ;
           dc:alternative "Les deux bernard-l'hermite et le crabe de cocotier"@fr ;
           olac:depositor <http://viaf.org/viaf/56614135> ;
@@ -212,12 +239,20 @@
         <http://cocoon.huma-num.fr/exist/crdo/moyse-faurie/uve/crdo-UVE_MOCIKA.xml>
           a edm:WebResources ;
           dc11:format "application/xml"^^dc:IMT ;
-          dc:issued "2011-02-05T23:22:23+01:00"^^dc:W3CDTF .
+          dc:issued "2011-02-05T23:22:23+01:00"^^dc:W3CDTF ;
+          dc:license <http://creativecommons.org/licenses/by-nc-sa/3.0/> ;
+          dc:accessRights "Freely available for non-commercial use" ;
+          dc11:rights "Copyright (c) 2012 Université d'Orléans/LLL" .
+
 
         <http://cocoon.huma-num.fr/exist/crdo/moyse-faurie/uve/crdo-UVE_MOCIKA.xhtml>
           a edm:WebResources ;
           dc11:format "application/xhtml+xml"^^dc:IMT ;
-          dc:issued "2011-02-05T23:22:23+01:00"^^dc:W3CDTF .
+          dc:issued "2011-02-05T23:22:23+01:00"^^dc:W3CDTF ;
+          dc:license <http://creativecommons.org/licenses/by-nc-sa/3.0/> ;
+          dc:accessRights "Freely available for non-commercial use" ;
+          dc11:rights "Copyright (c) 2012 Université d'Orléans/LLL" .
+
 EOT
     ];
 
@@ -365,4 +400,29 @@
     }
 
 
+    public function testRightsWebResource() {
+        $properties = [
+            "http://purl.org/dc/elements/1.1/rights",
+            'http://purl.org/dc/terms/license',
+            'http://purl.org/dc/terms/accessRights',
+        ];
+
+        $resGraph = $this->resGraph["SOUND_TEXT"];
+        $webResourceList = $resGraph->all('edm:WebResource', '^rdf:type');
+
+        //just check that they have all these resources.
+        //TODO: check that the same rights are kept (difficult)
+        foreach ($webResourceList as $webResource) {
+            foreach ($properties as $prop) {
+                $outputValuesStr = [];
+                foreach($webResource->all($resGraph->resource($prop)) as $outputValue) {
+                    array_push($outputValuesStr, strval($outputValue));
+                }
+                $this->assertNotEmpty($outputValuesStr, "we must found some values to test $prop");
+            }
+        }
+    }
+
+
+
 }