/**
  * @param Metadata $metadata
  * @param SimpleXMLElement $mrss
  * @return SimpleXMLElement
  */
 public function contributeMetadata(Metadata $metadata, SimpleXMLElement $mrss)
 {
     $key = $metadata->getSyncKey(Metadata::FILE_SYNC_METADATA_DATA);
     $xml = kFileSyncUtils::file_get_contents($key, true, false);
     $metadataXml = new SimpleXMLElement($xml);
     $customData = $mrss->addChild('customData');
     $customData->addAttribute('metadataId', $metadata->getId());
     $customData->addAttribute('metadataVersion', $metadata->getVersion());
     $customData->addAttribute('metadataProfileId', $metadata->getMetadataProfileId());
     $customData->addAttribute('metadataProfileVersion', $metadata->getMetadataProfileVersion());
     $this->contributeMetadataObject($customData, $metadataXml);
 }
 /**
  * @param Metadata $metadata
  * @param SimpleXMLElement $mrss
  * @param kMrssParameters $mrssParams
  * @return SimpleXMLElement
  */
 public function contributeMetadata(Metadata $metadata, SimpleXMLElement $mrss, kMrssParameters $mrssParams = null)
 {
     $key = $metadata->getSyncKey(Metadata::FILE_SYNC_METADATA_DATA);
     $xml = kFileSyncUtils::file_get_contents($key, true, false);
     if (is_null($xml)) {
         KalturaLog::alert("ready file sync was not found for key[{$key}]");
         return;
     }
     $metadataXml = new SimpleXMLElement($xml);
     $customData = $mrss->addChild('customData');
     $customData->addAttribute('metadataId', $metadata->getId());
     $customData->addAttribute('metadataVersion', $metadata->getVersion());
     $customData->addAttribute('metadataProfileId', $metadata->getMetadataProfileId());
     $customData->addAttribute('metadataProfileVersion', $metadata->getMetadataProfileVersion());
     $this->contributeMetadataObject($customData, $metadataXml, $mrssParams, '');
 }