00001 <?php
00002
00016
00017
00018 import('paper.Paper');
00019
00020 class PublishedPaper extends Paper {
00021
00025 function PublishedPaper() {
00026 parent::Paper();
00027 }
00028
00033 function getPubId() {
00034 return $this->getData('pubId');
00035 }
00036
00041 function setPubId($pubId) {
00042 return $this->setData('pubId', $pubId);
00043 }
00044
00049 function getSchedConfId() {
00050 return $this->getData('schedConfId');
00051 }
00052
00057 function setSchedConfId($schedConfId) {
00058 return $this->setData('schedConfId', $schedConfId);
00059 }
00060
00065 function getRoomId() {
00066 return $this->getData('roomId');
00067 }
00068
00073 function setRoomId($roomId) {
00074 return $this->setData('roomId', $roomId);
00075 }
00076
00081 function getTrackId() {
00082 return $this->getData('trackId');
00083 }
00084
00089 function setTrackId($trackId) {
00090 return $this->setData('trackId', $trackId);
00091 }
00092
00098 function getDatePublished() {
00099 return $this->getData('datePublished');
00100 }
00101
00102
00108 function setDatePublished($datePublished) {
00109 return $this->SetData('datePublished', $datePublished);
00110 }
00111
00116 function getSeq() {
00117 return $this->getData('seq');
00118 }
00119
00124 function setSeq($seq) {
00125 return $this->setData('seq', $seq);
00126 }
00127
00132 function getViews() {
00133 return $this->getData('views');
00134 }
00135
00140 function setViews($views) {
00141 return $this->setData('views', $views);
00142 }
00143
00148 function &getGalleys() {
00149 $galleys =& $this->getData('galleys');
00150 return $galleys;
00151 }
00152
00157 function &getLocalizedGalleys() {
00158 $primaryLocale = AppLocale::getPrimaryLocale();
00159
00160 $allGalleys =& $this->getData('galleys');
00161 $galleys = array();
00162 foreach (array(AppLocale::getLocale(), AppLocale::getPrimaryLocale()) as $tryLocale) {
00163 foreach (array_keys($allGalleys) as $key) {
00164 if ($allGalleys[$key]->getLocale() == $tryLocale) {
00165 $galleys[] =& $allGalleys[$key];
00166 }
00167 }
00168 if (!empty($galleys)) {
00169 HookRegistry::call('PaperGalleyDAO::getLocalizedGalleysByPaper', array(&$galleys, &$paperId));
00170 return $galleys;
00171 }
00172 }
00173
00174 return $galleys;
00175 }
00176
00181 function setGalleys(&$galleys) {
00182 return $this->setData('galleys', $galleys);
00183 }
00184
00189 function &getSuppFiles() {
00190 $returner =& $this->getData('suppFiles');
00191 return $returner;
00192 }
00193
00198 function setSuppFiles($suppFiles) {
00199 return $this->setData('suppFiles', $suppFiles);
00200 }
00201
00206 function getPublicPaperId() {
00207
00208 $returner = $this->getData('publicPaperId');
00209 if ($returner === '') return null;
00210 return $returner;
00211 }
00212
00217 function setPublicPaperId($publicPaperId) {
00218 return $this->setData('publicPaperId', $publicPaperId);
00219 }
00220
00228 function getBestPaperId($conference = null) {
00229
00230 if (!isset($schedConf)) {
00231 $schedConfDao =& DAORegistry::getDAO('SchedConfDAO');
00232 $schedConf = $schedConfDao->getSchedConf($this->getSchedConfId());
00233 }
00234
00235 if ($schedConf->getSetting('enablePublicPaperId')) {
00236 $publicPaperId = $this->getPublicPaperId();
00237 if (!empty($publicPaperId)) return $publicPaperId;
00238 }
00239 return $this->getId();
00240 }
00241 }
00242
00243 ?>