server/src/app/Libraries/Mappers/CocoonTextRdfMapper.php
changeset 125 e550b10fe3ca
parent 116 e60c55988ed4
child 504 4ab820b387da
equal deleted inserted replaced
124:93234b0b12f3 125:e550b10fe3ca
   133 
   133 
   134     protected function addCHOResourceDateProperties($providedCHOResource, $res, $outputGraph) {
   134     protected function addCHOResourceDateProperties($providedCHOResource, $res, $outputGraph) {
   135         // We do not add date to the providedCHO for Text resource
   135         // We do not add date to the providedCHO for Text resource
   136     }
   136     }
   137 
   137 
       
   138     protected function addConformsToProperty($webResource, $res, $mimetype) {
       
   139         if($mimetype === 'application/xml') {
       
   140             $this->applyPropertiesToRes($res, $webResource, [
       
   141                 ['http://purl.org/dc/terms/conformsTo', null],
       
   142             ]);
       
   143         }
       
   144     }
       
   145 
   138     // protected function propertyTypeMap($providedCHOResource, $prop, $value) {
   146     // protected function propertyTypeMap($providedCHOResource, $prop, $value) {
   139     //     if((!$value instanceof Resource) || $value->getUri() !== "http://purl.org/dc/dcmitype/Text") {
   147     //     if((!$value instanceof Resource) || $value->getUri() !== "http://purl.org/dc/dcmitype/Text") {
   140     //         $providedCHOResource->add($prop, $value);
   148     //         $providedCHOResource->add($prop, $value);
   141     //     }
   149     //     }
   142     // }
   150     // }
   155 
   163 
   156             $webResource->addLiteral('http://purl.org/dc/elements/1.1/format', Literal::create($mimetype, null, $outputGraph->resource('http://purl.org/dc/terms/IMT')));
   164             $webResource->addLiteral('http://purl.org/dc/elements/1.1/format', Literal::create($mimetype, null, $outputGraph->resource('http://purl.org/dc/terms/IMT')));
   157 
   165 
   158             $this->addResourceRightProperties($webResource, $res);
   166             $this->addResourceRightProperties($webResource, $res);
   159             $this->addDateToWebResource($webResource, $res);
   167             $this->addDateToWebResource($webResource, $res);
       
   168             $this->addConformsToProperty($webResource, $res, $mimetype);
   160             $aggregationNode->addResource('edm:hasView', $reprUrl);
   169             $aggregationNode->addResource('edm:hasView', $reprUrl);
   161 
   170 
   162         }
   171         }
   163 
   172 
   164     }
   173     }