Inheritance: extends NativeExportFilter
Beispiel #1
0
 /**
  * Create and return a submission node.
  * @param $doc DOMDocument
  * @param $submission Submission
  * @return DOMElement
  */
 function createSubmissionNode($doc, $submission)
 {
     $deployment = $this->getDeployment();
     $submissionNode = parent::createSubmissionNode($doc, $submission);
     // Add the series, if one is designated.
     if ($sectionId = $submission->getSectionId()) {
         $sectionDao = DAORegistry::getDAO('SectionDAO');
         $section = $sectionDao->getById($sectionId, $submission->getContextId());
         assert(isset($section));
         $submissionNode->setAttribute('section_ref', $section->getLocalizedAbbrev());
     }
     $publishedArticleDao = DAORegistry::getDAO('PublishedArticleDAO');
     $publishedArticle = $publishedArticleDao->getPublishedArticleByArticleId($submission->getId());
     $publishedArticle ? $submissionNode->setAttribute('seq', $publishedArticle->getSequence()) : $submissionNode->setAttribute('seq', '0');
     $publishedArticle ? $submissionNode->setAttribute('access_status', $publishedArticle->getAccessStatus()) : $submissionNode->setAttribute('access_status', '0');
     // if this is a published article and not part/subelement of an issue element
     // add issue identification element
     if ($publishedArticle && !$deployment->getIssue()) {
         $issueDao = DAORegistry::getDAO('IssueDAO');
         $issue = $issueDao->getById($publishedArticle->getIssueId());
         import('plugins.importexport.native.filter.NativeFilterHelper');
         $nativeFilterHelper = new NativeFilterHelper();
         $submissionNode->appendChild($nativeFilterHelper->createIssueIdentificationNode($this, $doc, $issue));
     }
     $pages = $submission->getPages();
     if (!empty($pages)) {
         $submissionNode->appendChild($node = $doc->createElementNS($deployment->getNamespace(), 'pages', htmlspecialchars($pages, ENT_COMPAT, 'UTF-8')));
     }
     return $submissionNode;
 }
 /**
  * Create and return a submission node.
  * @param $doc DOMDocument
  * @param $submission Submission
  * @return DOMElement
  */
 function createSubmissionNode($doc, $submission)
 {
     $submissionNode = parent::createSubmissionNode($doc, $submission);
     // Add the series, if one is designated.
     if ($sectionId = $submission->getSectionId()) {
         $sectionDao = DAORegistry::getDAO('SectionDAO');
         $section = $sectionDao->getById($sectionId, $submission->getContextId());
         assert($section);
         $submissionNode->setAttribute('section_ref', $section->getLocalizedAbbrev());
     }
     return $submissionNode;
 }
 /**
  * Create and return a submission node.
  * @param $doc DOMDocument
  * @param $submission Submission
  * @return DOMElement
  */
 function createSubmissionNode($doc, $submission)
 {
     $submissionNode = parent::createSubmissionNode($doc, $submission);
     // Add the series, if one is designated.
     if ($seriesId = $submission->getSeriesId()) {
         $seriesDao = DAORegistry::getDAO('SeriesDAO');
         $series = $seriesDao->getById($seriesId, $submission->getContextId());
         assert($series);
         $submissionNode->setAttribute('series', $series->getPath());
         $submissionNode->setAttribute('series_position', $submission->getSeriesPosition());
         $submissionNode->setAttribute('work_type', $submission->getWorkType());
     }
     return $submissionNode;
 }
 /**
  * Create and return a submission node.
  * @param $doc DOMDocument
  * @param $submission Submission
  * @return DOMElement
  */
 function createSubmissionNode($doc, $submission)
 {
     $submissionNode = parent::createSubmissionNode($doc, $submission);
     // Add the series, if one is designated.
     if ($sectionId = $submission->getSectionId()) {
         $sectionDao = DAORegistry::getDAO('SectionDAO');
         $section = $sectionDao->getById($sectionId, $submission->getContextId());
         assert($section);
         $submissionNode->setAttribute('section_ref', $section->getLocalizedAbbrev());
     }
     $publishedArticleDao = DAORegistry::getDAO('PublishedArticleDAO');
     $publishedArticle = $publishedArticleDao->getPublishedArticleByArticleId($submission->getId());
     $publishedArticle ? $submissionNode->setAttribute('seq', $publishedArticle->getSequence()) : $submissionNode->setAttribute('seq', '0');
     $publishedArticle ? $submissionNode->setAttribute('access_status', $publishedArticle->getAccessStatus()) : $submissionNode->setAttribute('access_status', '0');
     return $submissionNode;
 }