server/src/app/Libraries/Mappers/CocoonSoundRdfMapper.php
changeset 116 e60c55988ed4
parent 111 af85c436048f
child 405 f239c8c5bb94
equal deleted inserted replaced
115:34ffc04cef62 116:e60c55988ed4
   117             if(!$formatAdded) {
   117             if(!$formatAdded) {
   118                 $mimetype = Utils::getMimetype($masterReprUrl);
   118                 $mimetype = Utils::getMimetype($masterReprUrl);
   119                 $masterWebResource->addLiteral('http://purl.org/dc/elements/1.1/format', Literal::create($mimetype, null, $outputGraph->resource('http://purl.org/dc/terms/IMT')));
   119                 $masterWebResource->addLiteral('http://purl.org/dc/elements/1.1/format', Literal::create($mimetype, null, $outputGraph->resource('http://purl.org/dc/terms/IMT')));
   120             }
   120             }
   121 
   121 
   122             $this->addDateToWebResource($res, $masterWebResource);
   122             $this->addResourceRightProperties($masterWebResource, $res);
       
   123 
       
   124             $this->addDateToWebResource($masterWebResource, $res);
   123 
   125 
   124         }
   126         }
   125 
   127 
   126         // build others
   128         // build others
   127         foreach($res->all($this->inputGraph->resource('http://purl.org/dc/terms/isFormatOf')) as $reprUrl) {
   129         foreach($res->all($this->inputGraph->resource('http://purl.org/dc/terms/isFormatOf')) as $reprUrl) {
   133             $webResource->addLiteral('http://purl.org/dc/elements/1.1/format', Literal::create($mimetype, null, $outputGraph->resource('http://purl.org/dc/terms/IMT')));
   135             $webResource->addLiteral('http://purl.org/dc/elements/1.1/format', Literal::create($mimetype, null, $outputGraph->resource('http://purl.org/dc/terms/IMT')));
   134 
   136 
   135             if(!is_null($masterReprUrl)) {
   137             if(!is_null($masterReprUrl)) {
   136                 $webResource->addResource('edm:isDerivativeOf', $masterReprUrl);
   138                 $webResource->addResource('edm:isDerivativeOf', $masterReprUrl);
   137             }
   139             }
   138             $this->addDateToWebResource($res, $webResource);
   140 
       
   141             $this->addResourceRightProperties($webResource, $res);
       
   142 
       
   143             $this->addDateToWebResource($webResource, $res);
       
   144 
   139             $aggregationNode->addResource('edm:hasView', $reprUrl);
   145             $aggregationNode->addResource('edm:hasView', $reprUrl);
   140         }
   146         }
   141     }
   147     }
   142 }
   148 }