00001 <?php
00002
00020
00021
00022
00023 define('ISSUE_DEFAULT', 0);
00024 define('OPEN_ACCESS', 1);
00025 define('SUBSCRIPTION', 2);
00026
00027 class Issue extends DataObject {
00032 function getIssueId() {
00033 return $this->getData('issueId');
00034 }
00035
00040 function setIssueId($issueId) {
00041 return $this->setData('issueId', $issueId);
00042 }
00043
00048 function getJournalId() {
00049 return $this->getData('journalId');
00050 }
00051
00056 function setJournalId($journalId) {
00057 return $this->setData('journalId', $journalId);
00058 }
00059
00064 function getIssueTitle() {
00065 return $this->getLocalizedData('title');
00066 }
00067
00073 function getTitle($locale) {
00074 return $this->getData('title', $locale);
00075 }
00076
00082 function setTitle($title, $locale) {
00083 return $this->setData('title', $title, $locale);
00084 }
00085
00090 function getVolume() {
00091 return $this->getData('volume');
00092 }
00093
00098 function setVolume($volume) {
00099 return $this->setData('volume', $volume);
00100 }
00101
00106 function getNumber() {
00107 return $this->getData('number');
00108 }
00109
00114 function setNumber($number) {
00115 return $this->setData('number', $number);
00116 }
00117
00122 function getYear() {
00123 return $this->getData('year');
00124 }
00125
00130 function setYear($year) {
00131 return $this->setData('year', $year);
00132 }
00133
00138 function getPublished() {
00139 return $this->getData('published');
00140 }
00141
00146 function setPublished($published) {
00147 return $this->setData('published', $published);
00148 }
00149
00154 function getCurrent() {
00155 return $this->getData('current');
00156 }
00157
00162 function setCurrent($current) {
00163 return $this->setData('current', $current);
00164 }
00165
00170 function getDatePublished() {
00171 return $this->getData('datePublished');
00172 }
00173
00178 function setDatePublished($datePublished) {
00179 return $this->setData('datePublished', $datePublished);
00180 }
00181
00186 function getDateNotified() {
00187 return $this->getData('dateNotified');
00188 }
00189
00194 function setDateNotified($dateNotified) {
00195 return $this->setData('dateNotified', $dateNotified);
00196 }
00197
00202 function getAccessStatus() {
00203 return $this->getData('accessStatus');
00204 }
00205
00210 function setAccessStatus($accessStatus) {
00211 return $this->setData('accessStatus', $accessStatus);
00212 }
00213
00218 function getOpenAccessDate() {
00219 return $this->getData('openAccessDate');
00220 }
00221
00226 function setOpenAccessDate($openAccessDate) {
00227 return $this->setData('openAccessDate', $openAccessDate);
00228 }
00229
00234 function getIssueDescription() {
00235 return $this->getLocalizedData('description');
00236 }
00237
00243 function getDescription($locale) {
00244 return $this->getData('description', $locale);
00245 }
00246
00252 function setDescription($description, $locale) {
00253 return $this->setData('description', $description, $locale);
00254 }
00255
00260 function getPublicIssueId() {
00261
00262 $returner = $this->getData('publicIssueId');
00263 if ($returner === '') return null;
00264 return $returner;
00265 }
00266
00271 function setPublicIssueId($publicIssueId) {
00272 return $this->setData('publicIssueId', $publicIssueId);
00273 }
00274
00279 function getShowVolume() {
00280 return $this->getData('showVolume');
00281 }
00282
00287 function setShowVolume($showVolume) {
00288 return $this->setData('showVolume', $showVolume);
00289 }
00290
00295 function getShowNumber() {
00296 return $this->getData('showNumber');
00297 }
00298
00303 function setShowNumber($showNumber) {
00304 return $this->setData('showNumber', $showNumber);
00305 }
00306
00311 function getShowYear() {
00312 return $this->getData('showYear');
00313 }
00314
00319 function setShowYear($showYear) {
00320 return $this->setData('showYear', $showYear);
00321 }
00322
00327 function getShowTitle() {
00328 return $this->getData('showTitle');
00329 }
00330
00335 function setShowTitle($showTitle) {
00336 return $this->setData('showTitle', $showTitle);
00337 }
00338
00343 function getIssueFileName() {
00344 return $this->getLocalizedData('fileName');
00345 }
00346
00352 function getFileName($locale) {
00353 return $this->getData('fileName', $locale);
00354 }
00355
00361 function setFileName($fileName, $locale) {
00362 return $this->setData('fileName', $fileName, $locale);
00363 }
00364
00369 function getIssueWidth() {
00370 return $this->getLocalizedData('width');
00371 }
00372
00378 function getWidth($locale) {
00379 return $this->getData('width', $locale);
00380 }
00381
00387 function setWidth($width, $locale) {
00388 return $this->setData('width', $width, $locale);
00389 }
00390
00395 function getIssueHeight() {
00396 return $this->getLocalizedData('height');
00397 }
00398
00404 function getHeight($locale) {
00405 return $this->getData('height', $locale);
00406 }
00407
00413 function setHeight($height, $locale) {
00414 return $this->setData('height', $height, $locale);
00415 }
00416
00421 function getIssueOriginalFileName() {
00422 return $this->getLocalizedData('originalFileName');
00423 }
00424
00430 function getOriginalFileName($locale) {
00431 return $this->getData('originalFileName', $locale);
00432 }
00433
00439 function setOriginalFileName($originalFileName, $locale) {
00440 return $this->setData('originalFileName', $originalFileName, $locale);
00441 }
00442
00447 function getIssueCoverPageAltText() {
00448 return $this->getLocalizedData('coverPageAltText');
00449 }
00450
00456 function getCoverPageAltText($locale) {
00457 return $this->getData('coverPageAltText', $locale);
00458 }
00459
00465 function setCoverPageAltText($coverPageAltText, $locale) {
00466 return $this->setData('coverPageAltText', $coverPageAltText, $locale);
00467 }
00468
00473 function getIssueCoverPageDescription() {
00474 return $this->getLocalizedData('coverPageDescription');
00475 }
00476
00482 function getCoverPageDescription($locale) {
00483 return $this->getData('coverPageDescription', $locale);
00484 }
00485
00491 function setCoverPageDescription($coverPageDescription, $locale) {
00492 return $this->setData('coverPageDescription', $coverPageDescription, $locale);
00493 }
00494
00499 function getIssueShowCoverPage() {
00500 return $this->getLocalizedData('showCoverPage');
00501 }
00502
00508 function getShowCoverPage($locale) {
00509 return $this->getData('showCoverPage', $locale);
00510 }
00511
00517 function setShowCoverPage($showCoverPage, $locale) {
00518 return $this->setData('showCoverPage', $showCoverPage, $locale);
00519 }
00520
00526 function getHideCoverPageArchives($locale) {
00527 return $this->getData('hideCoverPageArchives', $locale);
00528 }
00529
00535 function setHideCoverPageArchives($hideCoverPageArchives, $locale) {
00536 return $this->setData('hideCoverPageArchives', $hideCoverPageArchives, $locale);
00537 }
00538
00544 function getHideCoverPageCover($locale) {
00545 return $this->getData('hideCoverPageCover', $locale);
00546 }
00547
00553 function setHideCoverPageCover($hideCoverPageCover, $locale) {
00554 return $this->setData('hideCoverPageCover', $hideCoverPageCover, $locale);
00555 }
00556
00561 function getStyleFileName() {
00562 return $this->getData('styleFileName');
00563 }
00564
00569 function setStyleFileName($styleFileName) {
00570 return $this->setData('styleFileName', $styleFileName);
00571 }
00572
00577 function getOriginalStyleFileName() {
00578 return $this->getData('originalStyleFileName');
00579 }
00580
00585 function setOriginalStyleFileName($originalStyleFileName) {
00586 return $this->setData('originalStyleFileName', $originalStyleFileName);
00587 }
00588
00595 function getAuthorString($lastOnly = false, $separator = ', ') {
00596 $str = '';
00597 foreach ($this->getAuthors() as $a) {
00598 if (!empty($str)) {
00599 $str .= $separator;
00600 }
00601 $str .= $lastOnly ? $a->getLastName() : $a->getFullName();
00602 }
00603 return $str;
00604 }
00605
00613 function getIssueIdentification($default = false, $breadcrumb = false, $long = false) {
00614
00615 if ($default) {
00616 $showVolume = 1;
00617 $showNumber = 1;
00618 $showYear = 1;
00619 $showTitle = 0;
00620 } else {
00621 $showVolume = $this->getData('showVolume');
00622 $showNumber = $this->getData('showNumber');
00623 $showYear = $this->getData('showYear');
00624 $showTitle = $this->getData('showTitle');
00625 }
00626
00627 if ($breadcrumb && ($showVolume || $showNumber || $showYear)) {
00628 $showTitle = 0;
00629 }
00630
00631 $volLabel = Locale::translate('issue.vol');
00632 $numLabel = Locale::translate('issue.no');
00633
00634 $vol = $this->getData('volume');
00635 $num = $this->getData('number');
00636 $year = $this->getData('year');
00637 $title = $this->getLocalizedData('title');
00638
00639 $identification = '';
00640
00641 if ($showVolume) {
00642 $identification = "$volLabel $vol";
00643 }
00644 if ($showNumber) {
00645 if (!empty($identification)) {
00646 $identification .= ", ";
00647 }
00648 $identification .= "$numLabel $num";
00649 }
00650 if ($showYear) {
00651 if (!empty($identification)) {
00652 $identification .= " ($year)";
00653 } else {
00654 $identification = "$year";
00655 }
00656 }
00657
00658 if ($showTitle || ($long && !empty($title))) {
00659 if (!empty($identification)) {
00660 $identification .= ': ';
00661 }
00662 $identification .= "$title";
00663 }
00664
00665 if (empty($identification)) {
00666 $identification = "$volLabel $vol, $numLabel $num ($year)";
00667 }
00668
00669 return $identification;
00670 }
00671
00676 function getNumArticles() {
00677 return $this->getData('numArticles');
00678 }
00679
00684 function setNumArticles($numArticles) {
00685 return $this->setData('numArticles', $numArticles);
00686 }
00687
00695 function getBestIssueId($journal = null) {
00696
00697 if (!isset($journal)) {
00698 $journalDao = &DAORegistry::getDAO('JournalDAO');
00699 $journal = $journalDao->getJournal($this->getJournalId());
00700 }
00701
00702 if ($journal->getSetting('enablePublicIssueId')) {
00703 $publicIssueId = $this->getPublicIssueId();
00704 if (!empty($publicIssueId)) return $publicIssueId;
00705 }
00706 return $this->getIssueId();
00707 }
00708 }
00709
00710 ?>