Inheritance: extends NativeExportFilter
Esempio n. 1
0
 /**
  * Constructor
  * @param $filterGroup FilterGroup
  */
 function ArticleMedraXmlFilter($filterGroup)
 {
     $this->setDisplayName('mEDRA XML article export');
     parent::O4DOIXmlFilter($filterGroup);
 }
Esempio n. 2
0
 /**
  * @copydoc O4DOIXmlFilter::createJournalIssueNode()
  */
 function createJournalIssueNode($doc, $issue, $journalLocalePrecedence)
 {
     $deployment = $this->getDeployment();
     $context = $deployment->getContext();
     $plugin = $deployment->getPlugin();
     $journalIssueNode = parent::createJournalIssueNode($doc, $issue, $journalLocalePrecedence);
     // Publication Date
     $datePublished = $issue->getDatePublished();
     if (!empty($datePublished)) {
         $journalIssueNode->appendChild($node = $doc->createElementNS($deployment->getNamespace(), 'PublicationDate', date('Ymd', strtotime($datePublished))));
     }
     // Issue Title (mandatory)
     $localizedTitles = $this->getTranslationsByPrecedence($issue->getTitle(null), $journalLocalePrecedence);
     // Retrieve the first key/value pair...
     foreach ($localizedTitles as $locale => $localizedTitle) {
         break;
     }
     if (empty($localizedTitle)) {
         $localizedTitles = $this->getTranslationsByPrecedence($context->getName(null), $journalLocalePrecedence);
         // Retrieve the first key/value pair...
         foreach ($localizedTitles as $locale => $localizedTitle) {
             break;
         }
         assert(!empty($localizedTitle));
         // Hack to make sure that no untranslated title appears:
         $showTitle = $issue->getShowTitle();
         $issue->setShowTitle(0);
         $localizedTitle = $localizedTitle . ', ' . $issue->getIssueIdentification();
         $issue->setShowTitle($showTitle);
     }
     $journalIssueNode->appendChild($this->createTitleNode($doc, $locale, $localizedTitle, O4DOI_TITLE_TYPE_ISSUE));
     // Extent (for issues-as-manifestation only)
     if (!$this->isWork($context, $plugin)) {
         $issueGalleyDao = DAORegistry::getDAO('IssueGalleyDAO');
         /* @var $issueGalleyDao IssueGalleyDAO */
         $issueGalleys = $issueGalleyDao->getGalleysByIssue($issue->getId());
         if (!empty($issueGalleys)) {
             foreach ($issueGalleys as $issueGalley) {
                 $journalIssueNode->appendChild($this->createExtentNode($doc, $issueGalley));
             }
         }
     }
     return $journalIssueNode;
 }
Esempio n. 3
0
 /**
  * Constructor
  * @param $filterGroup FilterGroup
  */
 function __construct($filterGroup)
 {
     $this->setDisplayName('mEDRA XML article export');
     parent::__construct($filterGroup);
 }