/** * creates the METS:div element for a submission */ function generatePublishedPaperDiv(&$doc, &$root, &$paper, &$schedConf) { $pDiv =& XMLCustomWriter::createElement($doc, 'METS:div'); XMLCustomWriter::setAttribute($pDiv, 'TYPE', 'submission'); XMLCustomWriter::setAttribute($pDiv, 'DMDID', 'P' . $paper->getId()); $paperGalleyDAO = DAORegistry::getDAO('PaperGalleyDAO'); $i = 0; $galleysArray =& $paperGalleyDAO->getGalleysByPaper($paper->getId()); while ($i < sizeof($galleysArray)) { MetsExportDom::generatePaperFileDiv($doc, $pDiv, $galleysArray[$i]); $i++; } $exportSuppFiles =& Request::getUserVar('exportSuppFiles'); $rtDao = DAORegistry::getDAO('RTDAO'); $conferenceRt =& $rtDao->getConferenceRTByConference($schedConf->getConference()); if ($exportSuppFiles == 'on' || $conferenceRt->getEnabled()) { $suppFileDAO = DAORegistry::getDAO('SuppFileDAO'); $paperFilesArray =& $suppFileDAO->getSuppFilesByPaper($paper->getId()); $i = 0; while ($i < sizeof($paperFilesArray)) { MetsExportDom::generatePaperSuppFilesDiv($doc, $pDiv, $paperFilesArray[$i]); $i++; } } XMLCustomWriter::appendChild($root, $pDiv); }