diff -r 34ffc04cef62 -r e60c55988ed4 server/src/tests/libraries/Mergers/CocoonSoundRdfMergerTest.php --- 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 ; dc11:publisher ; dc11:type , "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 ; dc11:subject "lexicography"^^olac:linguistic-field, "phonetics"^^olac:linguistic-field, "anthropological_linguistics"^^olac:linguistic-field, "general_linguistics"^^olac:linguistic-field, , "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 ; + dc11:rights "Copyright (c) 2012 Université d'Orléans/LLL" ; dc:issued "2013-10-12T14:35:57+02:00"^^dc:W3CDTF . @@ -80,7 +84,11 @@ dc11:format "audio/x-wav"^^dc:IMT ; edm:isDerivativeOf ; 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 ; + dc11:rights "Copyright (c) 2012 Université d'Orléans/LLL" . + a edm:WebResource ; @@ -88,7 +96,11 @@ dc11:format "audio/mpeg"^^dc:IMT ; edm:isDerivativeOf ; 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 ; + dc11:rights "Copyright (c) 2012 Université d'Orléans/LLL" . + EOT , 'SOURCE' => <<, "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 , ; 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 ; + dc:accessRights "Freely available for non-commercial use" ; + dc11:rights "Copyright (c) 2012 Université d'Orléans/LLL" . 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 ; + 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"); + } + } + } }