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);
    }