protected function initClassMap()
 {
     $definition = $this->attribute('definition');
     if (!isset($definition['LocalClassIdentifier'])) {
         throw new Exception("Configurazione LocalClassIdentifier non trovata");
     }
     if (!isset($definition['MapRemoteLocalAttributes'])) {
         throw new Exception("Configurazione MapRemoteLocalAttributes non trovata");
     }
     $this->mapClassIdentifier = $definition['LocalClassIdentifier'];
     $this->mapAttributes = $definition['MapRemoteLocalAttributes'];
     $this->remoteClassAttributes = array_keys($this->mapAttributes);
     $this->localeClassAttributes = array_values($this->mapAttributes);
     $contentClassDataMap = array();
     foreach ($this->remoteClassAttributes as $identifier) {
         $contentClassAttribute = new OCClassSearchTemplate();
         $contentClassAttribute->setAttributes(array('id' => $this->mapClassIdentifier . '-' . $identifier, 'identifier' => $identifier, 'name' => $identifier, 'is_searchable' => true, 'contentclass_id' => $this->classIdentifier));
         $contentClassDataMap[$identifier] = $contentClassAttribute;
     }
     $this->contentClass = new OCClassSearchTemplate();
     $this->contentClass->setAttributes(array('identifier' => $this->mapClassIdentifier, 'data_map' => $contentClassDataMap));
 }