/**
  * remove protected properties and execute @name annotation
  *
  * @param Record $record
  */
 protected function finalizeRecord(Record $record, DataDimensions $dataDimensions)
 {
     // Apply @name annotation
     if ($record->getDataTypeDefinition()->hasNamingPattern()) {
         $record->setName(Util::applyNamingPattern($record->getProperties(), $record->getDataTypeDefinition()->getNamingPattern()));
     }
     // remove protected properties
     $properties = $record->getProperties();
     foreach ($record->getDataTypeDefinition()->getProtectedProperties($dataDimensions->getViewName()) as $property) {
         unset($properties[$property]);
     }
     $record->setProperties($properties);
     return $record;
 }