server/src/app/Libraries/Mappers/CocoonContentRdfMapper.php
changeset 108 be2d3b30b2e0
parent 21 01e7e6a17317
child 115 34ffc04cef62
equal deleted inserted replaced
107:16e1473a6a99 108:be2d3b30b2e0
    79 
    79 
    80     protected function propertyReferenceCorrectMap($providedCHOResource, $prop, $value) {
    80     protected function propertyReferenceCorrectMap($providedCHOResource, $prop, $value) {
    81         $providedCHOResource->add('http://purl.org/dc/terms/references', $value);
    81         $providedCHOResource->add('http://purl.org/dc/terms/references', $value);
    82     }
    82     }
    83 
    83 
       
    84     protected function propertyCollectionMap($providedCHOResource, $prop, $value) {
       
    85         // if this is a collection, we use the edm:isGatheredInto property
       
    86         if(CocoonUtils::isResourceCollection($value)) {
       
    87             $providedCHOResource->add('http://www.europeana.eu/schemas/edm/isGatheredInto', $value);
       
    88         } else {
       
    89             $providedCHOResource->add($prop, $value);
       
    90         }
       
    91     }
       
    92 
    84     /**
    93     /**
    85      * Build the provided CHO.
    94      * Build the provided CHO.
    86      */
    95      */
    87     private function mapProvidedCHO($res, $outputGraph) {
    96     private function mapProvidedCHO($res, $outputGraph) {
    88 
    97 
   107             ['http://purl.org/dc/elements/1.1/subject', null],
   116             ['http://purl.org/dc/elements/1.1/subject', null],
   108             ['http://purl.org/dc/elements/1.1/title', null],
   117             ['http://purl.org/dc/elements/1.1/title', null],
   109             ['http://purl.org/dc/elements/1.1/language', null],
   118             ['http://purl.org/dc/elements/1.1/language', null],
   110             ['http://purl.org/dc/terms/accessRights', 'propertyTrimMap'],
   119             ['http://purl.org/dc/terms/accessRights', 'propertyTrimMap'],
   111             ['http://purl.org/dc/terms/extent', null],
   120             ['http://purl.org/dc/terms/extent', null],
   112             ['http://purl.org/dc/terms/isPartOf', null],
   121             ['http://purl.org/dc/terms/isPartOf', 'propertyCollectionMap'],
   113             ['http://purl.org/dc/terms/abstract', null],
   122             ['http://purl.org/dc/terms/abstract', null],
   114             ['http://purl.org/dc/elements/1.1/source', null],
   123             ['http://purl.org/dc/elements/1.1/source', null],
   115             ['http://purl.org/dc/terms/medium', null],
   124             ['http://purl.org/dc/terms/medium', null],
   116             ['http://purl.org/dc/terms/alternative', null],
   125             ['http://purl.org/dc/terms/alternative', null],
   117             ['http://purl.org/dc/terms/bibliographicCitation', null],
   126             ['http://purl.org/dc/terms/bibliographicCitation', null],