# HG changeset patch # User ymh # Date 1486657378 -3600 # Node ID 9175ea22f1b163e22301a35a3dc330dd15bf1b31 # Parent 4ab820b387daebfab419fb0be21bd49bfc672684 Do not map language info for text. This should correct bug #0025932 diff -r 4ab820b387da -r 9175ea22f1b1 server/src/app/Libraries/Mappers/CocoonContentRdfMapper.php --- a/server/src/app/Libraries/Mappers/CocoonContentRdfMapper.php Thu Feb 09 15:05:36 2017 +0100 +++ b/server/src/app/Libraries/Mappers/CocoonContentRdfMapper.php Thu Feb 09 17:22:58 2017 +0100 @@ -81,6 +81,11 @@ $providedCHOResource->add('http://purl.org/dc/terms/references', $value); } + protected function propertyLanguageMap($targetRes, $prop, $value) { + $targetRes->add($prop, $value); + } + + /** * Build the provided CHO. */ @@ -115,12 +120,11 @@ $this->applyPropertiesToRes($res, $providedCHOResource, [ ['http://purl.org/dc/terms/tableOfContents', null], ['http://purl.org/dc/elements/1.1/description', null], - ['http://purl.org/dc/elements/1.1/language', null], + ['http://purl.org/dc/elements/1.1/language', 'propertyLanguageMap'], ['http://purl.org/dc/elements/1.1/publisher', null], ['http://purl.org/dc/elements/1.1/type', 'propertyTypeMap'], ['http://purl.org/dc/elements/1.1/subject', null], ['http://purl.org/dc/elements/1.1/title', null], - ['http://purl.org/dc/elements/1.1/language', null], ['http://purl.org/dc/terms/extent', null], ['http://purl.org/dc/terms/isPartOf', 'propertyCollectionMap'], ['http://purl.org/dc/terms/abstract', null], diff -r 4ab820b387da -r 9175ea22f1b1 server/src/app/Libraries/Mappers/CocoonTextRdfMapper.php --- a/server/src/app/Libraries/Mappers/CocoonTextRdfMapper.php Thu Feb 09 15:05:36 2017 +0100 +++ b/server/src/app/Libraries/Mappers/CocoonTextRdfMapper.php Thu Feb 09 17:22:58 2017 +0100 @@ -156,6 +156,10 @@ protected function addProvidedCHODateProperties($targetRes, $res, $outputGraph) { } + // In the case of text, the language info are not added to the providedCHR resource. + protected function propertyLanguageMap($targetRes, $prop, $value) { + } + protected function mapWebResources($res, $outputGraph) { $resId = CocoonUtils::getIdFromUri($this->getResourceBaseId($res)); $resUri = CocoonUtils::getCorpusUriFromId($resId);