--- a/server/src/app/Libraries/Mergers/CocoonTextRdfMerger.php Wed Feb 08 16:38:09 2017 +0100
+++ b/server/src/app/Libraries/Mergers/CocoonTextRdfMerger.php Thu Feb 09 15:05:36 2017 +0100
@@ -105,5 +105,28 @@
"http://purl.org/dc/terms/modified",
], $targetArray, $baseRes, $srcRes);
+ // Must handle created
+ $isBaseSound = false;
+ foreach ($baseRes->all("dc11:type","resource") as $resType) {
+ $type = $resType->getUri();
+ if($type === 'http://purl.org/dc/dcmitype/Sound') {
+ $isBaseSound = true;
+ break;
+ }
+ }
+ if($isBaseSound) {
+ // The base is Sound. In this case for http://purl.org/dc/terms/created,
+ // the sound takes over.
+ // The case to ensure is when there is no created info in the sound. We must make sure it stays that way
+ $srcCreated = $srcRes->get("<http://purl.org/dc/terms/created>");
+ $baseCreated = $baseRes->get("<http://purl.org/dc/terms/created>");
+
+ if(!is_null($srcCreated) && is_null($baseCreated)) {
+ // There is no created in sound. Remove created info from targetArray
+ unset($targetArray['http://purl.org/dc/terms/created']);
+ }
+ }
+
+
}
}