original_string: public function add_metadata_file(cc_i_metadata_file $met, $identifier, $filename) {
  
          if (empty($met) || empty($identifier) || empty($filename)) {
              throw new Exception('Try to add a metadata file with nulls values given!');
          }
  
          $metanode = $this->node("//imscc:resource".
              "[@identifier='".
              $identifier.
              "']/imscc:file".
              "[@href='".
              $filename.
              "']");
  
          $nspaces = $this->activemanifest->get_cc_namespaces();
          $dnode   = $this->doc->createElementNS($nspaces['imscc'], "metadata");
  
          $metanode->appendChild($dnode);
  
          $this->activemanifest->create_metadata_file_node($met, $this->doc, $dnode);
      }
code: public function add_metadata_file(cc_i_metadata_file $met, $identifier, $filename) {
  
          if (empty($met) || empty($identifier) || empty($filename)) {
              throw new Exception('Try to add a metadata file with nulls values given!');
          }
  
          $metanode = $this->node("//imscc:resource".
              "[@identifier='".
              $identifier.
              "']/imscc:file".
              "[@href='".
              $filename.
              "']");
  
          $nspaces = $this->activemanifest->get_cc_namespaces();
          $dnode   = $this->doc->createElementNS($nspaces['imscc'], "metadata");
  
          $metanode->appendChild($dnode);
  
          $this->activemanifest->create_metadata_file_node($met, $this->doc, $dnode);
      }
code_tokens: public function add_metadata_file ( cc_i_metadata_file $ met , $ identifier , $ filename ) { if ( empty ( $ met ) || empty ( $ identifier ) || empty ( $ filename ) ) { throw new Exception ( 'Try to add a metadata file with nulls values given!' ) ; } $ metanode = $ this -> node ( "//imscc:resource" . "[@identifier='" . $ identifier . "']/imscc:file" . "[@href='" . $ filename . "']" ) ; $ nspaces = $ this -> activemanifest -> get_cc_namespaces ( ) ; $ dnode = $ this -> doc -> createElementNS ( $ nspaces [ 'imscc' ] , "metadata" ) ; $ metanode -> appendChild ( $ dnode ) ; $ this -> activemanifest -> create_metadata_file_node ( $ met , $ this -> doc , $ dnode ) ; }
docstring: Add Metadata For File
  
  @param cc_i_metadata_file $met
  @param string $identifier
  @param string $filename
docstring_tokens: Add Metadata For File