server/src/app/Libraries/Mappers/CocoonContentRdfMapper.php
changeset 526 cdaf9dfb5dfd
parent 505 9175ea22f1b1
equal deleted inserted replaced
525:c06db7aa1b10 526:cdaf9dfb5dfd
    57         }
    57         }
    58         if(count($masterList)>0) {
    58         if(count($masterList)>0) {
    59             $aggregationNode->add('edm:isShownBy', $masterList[0]);
    59             $aggregationNode->add('edm:isShownBy', $masterList[0]);
    60         }
    60         }
    61 
    61 
       
    62         $this->setRightsAggregationNode($res, $aggregationNode);
       
    63 
       
    64     }
       
    65 
       
    66     protected function setRightsAggregationNode($res, $aggregationNode) {
    62         $license = $res->get('dc:license');
    67         $license = $res->get('dc:license');
    63         $matches = [];
    68         $matches = [];
    64 
    69 
    65         if( ($license instanceof Resource) &&
    70         if( ($license instanceof Resource) &&
    66             (preg_match('/http\:\/\/creativecommons\.org\/licenses\/([a-z-]+)\/[\d\.]+\//', $license->getUri(), $matches) > 0) ) {
    71             (preg_match('/http\:\/\/creativecommons\.org\/licenses\/([a-z-]+)\/[\d\.]+\//', $license->getUri(), $matches) > 0) ) {