server/src/tests/libraries/Mergers/CocoonSoundRdfMergerTest.php
changeset 112 7a542145832c
parent 111 af85c436048f
child 113 faff38055a07
equal deleted inserted replaced
111:af85c436048f 112:7a542145832c
    24         @prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> .
    24         @prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> .
    25         @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
    25         @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
    26         @prefix skos: <http://www.w3.org/2004/02/skos/core#> .
    26         @prefix skos: <http://www.w3.org/2004/02/skos/core#> .
    27         @prefix owl: <http://www.w3.org/2002/07/owl#> .
    27         @prefix owl: <http://www.w3.org/2002/07/owl#> .
    28 
    28 
    29         <###h#ttp://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-CFPP2000_35_SOUND>
    29         <http://corpusdelaparole.huma-num.fr/corpus/res/crdo-CFPP2000_35_SOUND>
    30           a ore:Aggregation ;
    30           a ore:Aggregation ;
    31           edm:aggregatedCHO <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-CFPP2000_35_SOUND> ;
    31           edm:aggregatedCHO <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-CFPP2000_35_SOUND> ;
    32           edm:provider "Corpus de la Parole"@fr ;
    32           edm:provider "Corpus de la Parole"@fr ;
    33           edm:dataProvider <http://viaf.org/viaf/142432638> ;
    33           edm:dataProvider <http://viaf.org/viaf/142432638> ;
    34           edm:isShownAt <http://cocoon.huma-num.fr/exist/crdo/meta/crdo-CFPP2000_35_SOUND> ;
    34           edm:isShownAt <http://cocoon.huma-num.fr/exist/crdo/meta/crdo-CFPP2000_35_SOUND> ;
    99         @prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> .
    99         @prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> .
   100         @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
   100         @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
   101         @prefix skos: <http://www.w3.org/2004/02/skos/core#> .
   101         @prefix skos: <http://www.w3.org/2004/02/skos/core#> .
   102         @prefix owl: <http://www.w3.org/2002/07/owl#> .
   102         @prefix owl: <http://www.w3.org/2002/07/owl#> .
   103 
   103 
   104         <###h#ttp://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-CFPP2000_35_SOUND>
   104         <http://corpusdelaparole.huma-num.fr/corpus/res/crdo-CFPP2000_35_SOUND>
   105           a ore:Aggregation ;
   105           a ore:Aggregation ;
   106           edm:aggregatedCHO <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-CFPP2000_35_SOUND> ;
   106           edm:aggregatedCHO <http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-CFPP2000_35_SOUND> ;
   107           edm:provider "Corpus de la Parole"@fr ;
   107           edm:provider "Corpus de la Parole"@fr ;
   108           edm:dataProvider <http://viaf.org/viaf/142432638> ;
   108           edm:dataProvider <http://viaf.org/viaf/142432638> ;
   109           edm:isShownAt <http://cocoon.huma-num.fr/exist/crdo/meta/crdo-CFPP2000_35_SOUND> ;
   109           edm:isShownAt <http://cocoon.huma-num.fr/exist/crdo/meta/crdo-CFPP2000_35_SOUND> ;
   153           dc:issued "2013-11-04T22:20:07+01:00"^^dc:W3CDTF .
   153           dc:issued "2013-11-04T22:20:07+01:00"^^dc:W3CDTF .
   154 EOT
   154 EOT
   155     ];
   155     ];
   156 
   156 
   157     const TEST_INPUT_ID = "crdo-ESLO1_ENT_019";
   157     const TEST_INPUT_ID = "crdo-ESLO1_ENT_019";
   158     const TEST_GRAPH_URI = "http://purl.org/poi/corpusdelaparole.huma-num.fr/crdo-ESLO1_ENT_019";
   158     const TEST_GRAPH_URI = "http://corpusdelaparole.huma-num.fr/corpus/res/crdo-ESLO1_ENT_019";
   159     const TEST_CHO_URI = "http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-ESLO1_ENT_019";
   159     const TEST_CHO_URI = "http://purl.org/poi/crdo.vjf.cnrs.fr/crdo-ESLO1_ENT_019";
   160 
   160 
   161 
   161 
   162     private $inputGraphes = [];
   162     private $inputGraphes = [];
   163     private $resGraph;
   163     private $resGraph;
   211     public function testAggregationResource() {
   211     public function testAggregationResource() {
   212         $aggregationResList = $this->resGraph->allOfType('http://www.openarchives.org/ore/terms/Aggregation');
   212         $aggregationResList = $this->resGraph->allOfType('http://www.openarchives.org/ore/terms/Aggregation');
   213         $this->assertCount(1, $aggregationResList, "Only one Aggregation node");
   213         $this->assertCount(1, $aggregationResList, "Only one Aggregation node");
   214         $aggregationRes = $aggregationResList[0];
   214         $aggregationRes = $aggregationResList[0];
   215 
   215 
   216         $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");
   216         $this->assertEquals("http://corpusdelaparole.huma-num.fr/corpus/res/crdo-CFPP2000_35_SOUND",$aggregationRes->getUri(),"Aggregation node uri must be http://corpusdelaparole.huma-num.fr/corpus/res/crdo-CFPP2000_35_SOUND");
   217 
   217 
   218         $singleValuesRes = [
   218         $singleValuesRes = [
   219             '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")],
   219             '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")],
   220             'http://www.europeana.eu/schemas/edm/provider' => ['size'=>1, 'val' => new Literal("Corpus de la Parole", "fr", null)],
   220             'http://www.europeana.eu/schemas/edm/provider' => ['size'=>1, 'val' => new Literal("Corpus de la Parole", "fr", null)],
   221             'http://www.europeana.eu/schemas/edm/dataProvider' => ['size'=>1, 'val' => $this->resGraph->resource("http://viaf.org/viaf/142432638")],
   221             'http://www.europeana.eu/schemas/edm/dataProvider' => ['size'=>1, 'val' => $this->resGraph->resource("http://viaf.org/viaf/142432638")],