equal
deleted
inserted
replaced
17 const TEST_INPUT_DOCS = [ |
17 const TEST_INPUT_DOCS = [ |
18 'BASE' => __DIR__.'/files/CocoonSoundRdfMergerTest/base_doc.ttl', |
18 'BASE' => __DIR__.'/files/CocoonSoundRdfMergerTest/base_doc.ttl', |
19 'SOURCE' => __DIR__.'/files/CocoonSoundRdfMergerTest/source_doc.ttl', |
19 'SOURCE' => __DIR__.'/files/CocoonSoundRdfMergerTest/source_doc.ttl', |
20 'BASE_NO_SPATIAL' => __DIR__.'/files/CocoonSoundRdfMergerTest/base_no_spatial.ttl', |
20 'BASE_NO_SPATIAL' => __DIR__.'/files/CocoonSoundRdfMergerTest/base_no_spatial.ttl', |
21 'SOURCE_NO_SPATIAL' => __DIR__.'/files/CocoonSoundRdfMergerTest/source_no_spatial.ttl', |
21 'SOURCE_NO_SPATIAL' => __DIR__.'/files/CocoonSoundRdfMergerTest/source_no_spatial.ttl', |
22 'SOURCE_MORE_SPATIAL_NOTES' => __DIR__.'/files/CocoonSoundRdfMergerTest/source_more_spatial_notes.ttl' |
22 'SOURCE_MORE_SPATIAL_NOTES' => __DIR__.'/files/CocoonSoundRdfMergerTest/source_more_spatial_notes.ttl', |
|
23 'SOURCE_RIGHTS' => __DIR__.'/files/CocoonSoundRdfMergerTest/source_rights.ttl', |
23 ]; |
24 ]; |
24 |
25 |
25 const TEST_INPUT_ID = "crdo-ESLO1_ENT_019"; |
26 const TEST_INPUT_ID = "crdo-ESLO1_ENT_019"; |
26 const TEST_GRAPH_URI = "http://corpusdelaparole.huma-num.fr/corpus/res/crdo-ESLO1_ENT_019"; |
27 const TEST_GRAPH_URI = "http://corpusdelaparole.huma-num.fr/corpus/res/crdo-ESLO1_ENT_019"; |
27 const TEST_CHO_URI = "http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-ESLO1_ENT_019"; |
28 const TEST_CHO_URI = "http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-ESLO1_ENT_019"; |
318 } |
319 } |
319 } |
320 } |
320 } |
321 } |
321 |
322 |
322 /** |
323 /** |
|
324 * Test rights merge |
|
325 * |
|
326 * @return void |
|
327 */ |
|
328 public function testRightsDifferentsAggregatedCHO() { |
|
329 $merger = new CocoonSoundRdfMerger(); |
|
330 $this->resGraph['NORMAL'] = $merger->mergeGraph($this->inputGraphes['BASE'], $this->inputGraphes['SOURCE_RIGHTS']); |
|
331 |
|
332 |
|
333 $aggregationResList = $this->resGraph['NORMAL']->allOfType('http://www.openarchives.org/ore/terms/Aggregation'); |
|
334 $this->assertCount(1, $aggregationResList, "Only one Aggregation node"); |
|
335 $aggregationRes = $aggregationResList[0]; |
|
336 |
|
337 $resList = $aggregationRes->all($this->inputGraphes['BASE']->resource('http://www.europeana.eu/schemas/edm/rights')); |
|
338 $this->assertCount(1, $resList, "'http://www.europeana.eu/schemas/edm/rights' list size 1"); |
|
339 $this->assertEquals($this->resGraph['NORMAL']->resource("http://creativecommons.org/licenses/by-nc-sa/4.0/"), $resList[0], "'http://www.europeana.eu/schemas/edm/rights' size one not equals"); |
|
340 |
|
341 } |
|
342 |
|
343 |
|
344 /** |
323 * Test one to one mapping spatial info |
345 * Test one to one mapping spatial info |
324 * |
346 * |
325 * @return void |
347 * @return void |
326 */ |
348 */ |
327 |
349 |