public function deleteSemanticType()
 {
     try {
         $model = new SemanticType($this->data->id);
         $model->delete();
         $this->renderPrompt('information', "Record removed.", "structure.reloadSemanticType();");
     } catch (\Exception $e) {
         $this->renderPrompt('error', $e->getMessage());
     }
 }
 public function save($data)
 {
     $transaction = $this->beginTransaction();
     try {
         if (!$this->isPersistent()) {
             $entity = new Entity();
             $entity->setAlias($this->getEntry());
             $entity->setType('ST');
             $entity->save();
             $entry = new Entry();
             $entry->newEntry($this->getEntry());
             $this->setIdEntity($entity->getId());
             if ($data->idSuperType) {
                 $superType = new SemanticType($data->idSuperType);
                 $this->setIdDomain($superType->getIdDomain());
                 Base::createEntityRelation($entity->getId(), 'rel_subtypeof', $superType->getIdEntity());
             }
         }
         parent::save();
         $transaction->commit();
     } catch (\Exception $e) {
         $transaction->rollback();
         throw new \Exception($e->getMessage());
     }
 }