--- 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");
+ }
+ }
+ }
+
+
+
}