getData('publishedArticleId'); } /** * Set ID of published article. * @param $publishedArticleId int */ function setPublishedArticleId($publishedArticleId) { return $this->setData('publishedArticleId', $publishedArticleId); } /** * Get ID of the issue this article is in. * @return int */ function getIssueId() { return $this->getData('issueId'); } /** * Set ID of the issue this article is in. * @param $issueId int */ function setIssueId($issueId) { return $this->setData('issueId', $issueId); } /** * Get sequence of article in table of contents. * @return float */ function getSequence() { return $this->getData('seq'); } /** * Set sequence of article in table of contents. * @param $seq float */ function setSequence($seq) { return $this->setData('seq', $seq); } /** * Get views of the published article. * @return int */ function getViews() { $application = PKPApplication::getApplication(); return $application->getPrimaryMetricByAssoc(ASSOC_TYPE_ARTICLE, $this->getId()); } /** * get access status (ARTICLE_ACCESS_...) * @return int */ function getAccessStatus() { return $this->getData('accessStatus'); } /** * set access status (ARTICLE_ACCESS_...) * @param $accessStatus int */ function setAccessStatus($accessStatus) { return $this->setData('accessStatus',$accessStatus); } /** * Get the galleys for an article. * @return array ArticleGalley */ function getGalleys() { return $this->getData('galleys'); } /** * Get the localized galleys for an article. * @return array ArticleGalley */ function getLocalizedGalleys() { $allGalleys = $this->getData('galleys'); $galleys = array(); foreach (array(AppLocale::getLocale(), AppLocale::getPrimaryLocale()) as $tryLocale) { foreach (array_keys($allGalleys) as $key) { if ($allGalleys[$key]->getLocale() == $tryLocale) { $galleys[] = $allGalleys[$key]; } } if (!empty($galleys)) { HookRegistry::call('ArticleGalleyDAO::getLocalizedGalleysByArticle', array(&$galleys)); return $galleys; } } return $galleys; } /** * Set the galleys for an article. * @param $galleys array ArticleGalley */ function setGalleys($galleys) { return $this->setData('galleys', $galleys); } } ?>