function handleVideoCollectionForm($form_values)
 {
     $this->handleQDCForm($form_values);
     $pid = $form_values["pid"];
     $object = new Fedora_Item($pid);
     $path = drupal_get_path('module', 'Fedora_Repository');
     $stream = file_get_contents($path . "/epistemetec/xml/VIDEO_COLLECTION_POLICY.xml");
     $object->add_datastream_from_string($stream, "COLLECTION_POLICY", "Collection Policy");
     $file = $path . "/epistemetec/files/cover-video.png";
     $object->add_datastream_from_file($file, "TN", "Thumbnail");
     $this->createNode($form_values);
 }
示例#2
0
 function updateTags($pid, $terms)
 {
     $object = new Fedora_Item($pid);
     $stream = $object->get_datastream_dissemination("TAGS");
     if (strcasecmp($stream, "")) {
         $object->purge_datastream("TAGS");
     }
     $toinject = "<tags>";
     foreach ($terms as $term) {
         $toinject .= "<tag>" . $term->name . "</tag>";
     }
     $toinject .= "</tags>";
     $object->add_datastream_from_string($toinject, "TAGS", "Tag Utenti");
 }