00001 <?php
00002
00016
00017
00018 class PaperFile extends DataObject {
00019
00023 function PaperFile() {
00024 parent::DataObject();
00025 }
00026
00031 function getFilePath() {
00032 $paperDao =& DAORegistry::getDAO('PaperDAO');
00033 $paper =& $paperDao->getPaper($this->getPaperId());
00034 $paperId = $paper->getSchedConfId();
00035 $schedConfDao =& DAORegistry::getDAO('SchedConfDAO');
00036 $schedConf =& $schedConfDao->getSchedConf($paperId);
00037
00038 return Config::getVar('files', 'files_dir') . '/conferences/' . $schedConf->getConferenceId() . '/schedConfs/' . $paperId .
00039 '/papers/' . $this->getPaperId() . '/' . $this->getType() . '/' . $this->getFileName();
00040 }
00041
00042
00043
00044
00049 function getFileId() {
00050 return $this->getData('fileId');
00051 }
00052
00057 function setFileId($fileId) {
00058 return $this->setData('fileId', $fileId);
00059 }
00060
00065 function getRevision() {
00066 return $this->getData('revision');
00067 }
00068
00073 function setRevision($revision) {
00074 return $this->setData('revision', $revision);
00075 }
00076
00081 function getPaperId() {
00082 return $this->getData('paperId');
00083 }
00084
00089 function setPaperId($paperId) {
00090 return $this->setData('paperId', $paperId);
00091 }
00092
00097 function getFileName() {
00098 return $this->getData('fileName');
00099 }
00100
00105 function setFileName($fileName) {
00106 return $this->setData('fileName', $fileName);
00107 }
00108
00113 function getFileType() {
00114 return $this->getData('fileType');
00115 }
00116
00121 function setFileType($fileType) {
00122 return $this->setData('fileType', $fileType);
00123 }
00124
00129 function getOriginalFileName() {
00130 return $this->getData('originalFileName');
00131 }
00132
00137 function setOriginalFileName($originalFileName) {
00138 return $this->setData('originalFileName', $originalFileName);
00139 }
00140
00145 function getType() {
00146 return $this->getData('type');
00147 }
00148
00153 function setType($type) {
00154 return $this->setData('type', $type);
00155 }
00156
00161 function getStage() {
00162 return $this->getData('stage');
00163 }
00164
00169 function setStage($stage) {
00170 return $this->setData('stage', $stage);
00171 }
00172
00178 function getDateUploaded() {
00179 return $this->getData('dateUploaded');
00180 }
00181
00182
00188 function setDateUploaded($dateUploaded) {
00189 return $this->SetData('dateUploaded', $dateUploaded);
00190 }
00191
00197 function getDateModified() {
00198 return $this->getData('dateModified');
00199 }
00200
00201
00207 function setDateModified($dateModified) {
00208 return $this->SetData('dateModified', $dateModified);
00209 }
00210
00216 function getFileSize() {
00217 return $this->getData('fileSize');
00218 }
00219
00220
00226 function setFileSize($fileSize) {
00227 return $this->SetData('fileSize', $fileSize);
00228 }
00229
00235 function getNiceFileSize() {
00236 return FileManager::getNiceFileSize($this->getData('fileSize'));
00237 }
00238
00244 function getViewable() {
00245 return $this->getData('viewable');
00246 }
00247
00248
00254 function setViewable($viewable) {
00255 return $this->SetData('viewable', $viewable);
00256 }
00257
00262 function isInlineable() {
00263 $paperFileDao =& DAORegistry::getDAO('PaperFileDAO');
00264 return $paperFileDao->isInlineable($this);
00265 }
00266 }
00267
00268 ?>