Do not map language info for text. This should correct bug #0025932
--- 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],
--- 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);