00001 <?php
00002
00016
00017
00018
00019 class ArticleFile extends DataObject {
00020
00024 function ArticleFile() {
00025 parent::DataObject();
00026 }
00027
00032 function getFilePath() {
00033 $articleDao = &DAORegistry::getDAO('ArticleDAO');
00034 $article = &$articleDao->getArticle($this->getArticleId());
00035 $journalId = $article->getJournalId();
00036
00037 return Config::getVar('files', 'files_dir') . '/journals/' . $journalId .
00038 '/articles/' . $this->getArticleId() . '/' . $this->getType() . '/' . $this->getFileName();
00039 }
00040
00041
00042
00043
00048 function getFileId() {
00049 return $this->getData('fileId');
00050 }
00051
00056 function setFileId($fileId) {
00057 return $this->setData('fileId', $fileId);
00058 }
00059
00064 function getSourceFileId() {
00065 return $this->getData('sourceFileId');
00066 }
00067
00072 function setSourceFileId($sourceFileId) {
00073 return $this->setData('sourceFileId', $sourceFileId);
00074 }
00075
00080 function getSourceRevision() {
00081 return $this->getData('sourceRevision');
00082 }
00083
00088 function setSourceRevision($sourceRevision) {
00089 return $this->setData('sourceRevision', $sourceRevision);
00090 }
00091
00096 function getAssocId() {
00097 return $this->getData('assocId');
00098 }
00099
00104 function setAssocId($assocId) {
00105 return $this->setData('assocId', $assocId);
00106 }
00107
00112 function getRevision() {
00113 return $this->getData('revision');
00114 }
00115
00120 function setRevision($revision) {
00121 return $this->setData('revision', $revision);
00122 }
00123
00128 function getArticleId() {
00129 return $this->getData('articleId');
00130 }
00131
00136 function setArticleId($articleId) {
00137 return $this->setData('articleId', $articleId);
00138 }
00139
00144 function getFileName() {
00145 return $this->getData('fileName');
00146 }
00147
00152 function setFileName($fileName) {
00153 return $this->setData('fileName', $fileName);
00154 }
00155
00160 function getFileType() {
00161 return $this->getData('fileType');
00162 }
00163
00168 function setFileType($fileType) {
00169 return $this->setData('fileType', $fileType);
00170 }
00171
00176 function getOriginalFileName() {
00177 return $this->getData('originalFileName');
00178 }
00179
00184 function setOriginalFileName($originalFileName) {
00185 return $this->setData('originalFileName', $originalFileName);
00186 }
00187
00192 function getType() {
00193 return $this->getData('type');
00194 }
00195
00200 function setType($type) {
00201 return $this->setData('type', $type);
00202 }
00203
00208 function getStatus() {
00209 return $this->getData('status');
00210 }
00211
00216 function setStatus($status) {
00217 return $this->setData('status', $status);
00218 }
00219
00225 function getDateUploaded() {
00226 return $this->getData('dateUploaded');
00227 }
00228
00229
00235 function setDateUploaded($dateUploaded) {
00236 return $this->SetData('dateUploaded', $dateUploaded);
00237 }
00238
00244 function getDateModified() {
00245 return $this->getData('dateModified');
00246 }
00247
00248
00254 function setDateModified($dateModified) {
00255 return $this->SetData('dateModified', $dateModified);
00256 }
00257
00263 function getFileSize() {
00264 return $this->getData('fileSize');
00265 }
00266
00267
00273 function setFileSize($fileSize) {
00274 return $this->SetData('fileSize', $fileSize);
00275 }
00276
00282 function getNiceFileSize() {
00283 return FileManager::getNiceFileSize($this->getData('fileSize'));
00284 }
00285
00291 function getRound() {
00292 return $this->getData('round');
00293 }
00294
00295
00301 function setRound($round) {
00302 return $this->SetData('round', $round);
00303 }
00304
00310 function getViewable() {
00311 return $this->getData('viewable');
00312 }
00313
00314
00320 function setViewable($viewable) {
00321 return $this->SetData('viewable', $viewable);
00322 }
00323
00328 function isInlineable() {
00329 $articleFileDao =& DAORegistry::getDAO('ArticleFileDAO');
00330 return $articleFileDao->isInlineable($this);
00331 }
00332 }
00333
00334 ?>