00001 <?php
00002
00016
00017
00018 import('paper.PaperFile');
00019
00020 class PaperGalley extends PaperFile {
00021
00025 function PaperGalley() {
00026 parent::DataObject();
00027 }
00028
00033 function isHTMLGalley() {
00034 return false;
00035 }
00036
00041 function isPdfGalley() {
00042 switch ($this->getFileType()) {
00043 case 'application/pdf':
00044 case 'application/x-pdf':
00045 case 'text/pdf':
00046 case 'text/x-pdf':
00047 return true;
00048 default: return false;
00049 }
00050 }
00051
00057 function isDependentFile($fileId) {
00058 return false;
00059 }
00060
00061
00062
00063
00064
00069 function getGalleyId() {
00070 if (Config::getVar('debug', 'deprecation_warnings')) trigger_error('Deprecated function.');
00071 return $this->getId();
00072 }
00073
00078 function setGalleyId($galleyId) {
00079 if (Config::getVar('debug', 'deprecation_warnings')) trigger_error('Deprecated function.');
00080 return $this->setId($galleyId);
00081 }
00082
00087 function getViews() {
00088 return $this->getData('views');
00089 }
00090
00096 function setViews($views) {
00097 return $this->setData('views', $views);
00098 }
00099
00104 function getGalleyLabel() {
00105 $label = $this->getLabel();
00106 if ($this->getLocale() != AppLocale::getLocale()) {
00107 $locales = AppLocale::getAllLocales();
00108 $label .= ' (' . $locales[$this->getLocale()] . ')';
00109 }
00110 return $label;
00111 }
00112
00117 function getLabel() {
00118 return $this->getData('label');
00119 }
00120
00125 function setLabel($label) {
00126 return $this->setData('label', $label);
00127 }
00128
00133 function getLocale() {
00134 return $this->getData('locale');
00135 }
00136
00141 function setLocale($locale) {
00142 return $this->setData('locale', $locale);
00143 }
00144
00149 function getSequence() {
00150 return $this->getData('sequence');
00151 }
00152
00157 function setSequence($sequence) {
00158 return $this->setData('sequence', $sequence);
00159 }
00160
00161 }
00162
00163 ?>