• Main Page
  • Modules
  • Classes
  • Files
  • File List

classes/monograph/ArtworkFile.inc.php

00001 <?php
00002 
00016 import('classes.monograph.MonographFile');
00017 
00018 class ArtworkFile extends MonographFile {
00020    var $_imageInfo;
00021 
00025    function ArtworkFile() {
00026       parent::MonographFile();
00027    }
00028 
00029 
00030    //
00031    // Getters and Setters
00032    //
00037    function getCaption() {
00038       return $this->getData('caption');
00039    }
00040 
00045    function setCaption($caption) {
00046       return $this->setData('caption', $caption);
00047    }
00048 
00053    function getCredit() {
00054       return $this->getData('credit');
00055    }
00056 
00061    function setCredit($credit) {
00062       return $this->setData('credit', $credit);
00063    }
00064 
00069    function getCopyrightOwner() {
00070       return $this->getData('copyrightOwner');
00071    }
00072 
00077    function setCopyrightOwner($owner) {
00078       return $this->setData('copyrightOwner', $owner);
00079    }
00080 
00085    function getCopyrightOwnerContactDetails() {
00086       return $this->getData('copyrightOwnerContact');
00087    }
00088 
00093    function setCopyrightOwnerContactDetails($contactDetails) {
00094       return $this->setData('copyrightOwnerContact', $contactDetails);
00095    }
00096 
00101    function getPermissionTerms() {
00102       return $this->getData('terms');
00103    }
00104 
00109    function setPermissionTerms($terms) {
00110       return $this->setData('terms', $terms);
00111    }
00112 
00117    function getPermissionFileId() {
00118       return $this->getData('permissionFileId');
00119    }
00120 
00125    function setPermissionFileId($fileId) {
00126       return $this->setData('permissionFileId', $fileId);
00127    }
00128 
00133    function getChapterId() {
00134       return $this->getData('chapterId');
00135    }
00136 
00141    function setChapterId($chapterId) {
00142       return $this->setData('chapterId', $chapterId);
00143    }
00144 
00149    function getContactAuthor() {
00150       return $this->getData('contactAuthor');
00151    }
00152 
00157    function setContactAuthor($authorId) {
00158       return $this->setData('contactAuthor', $authorId);
00159    }
00160 
00165    function getWidth() {
00166       if (!$this->_imageInfo) {
00167          $this->_imageInfo = getimagesize($this->getFilePath());
00168       }
00169       return $this->_imageInfo[0];
00170    }
00171 
00176    function getHeight() {
00177       if (!$this->_imageInfo) {
00178          $monographFile =& $this->getFile();
00179          $this->_imageInfo = getimagesize($this->getFilePath());
00180       }
00181       return $this->_imageInfo[1];
00182    }
00183 
00189    function copyEditableMetadataFrom($monographFile) {
00190       if (is_a($monographFile, 'ArtworkFile')) {
00191          $this->setCaption($monographFile->getCaption());
00192          $this->setCredit($monographFile->getCredit());
00193          $this->setCopyrightOwner($monographFile->getCopyrightOwner());
00194          $this->setCopyrightOwnerContactDetails($monographFile->getCopyrightOwnerContactDetails());
00195          $this->setPermissionTerms($monographFile->getPermissionTerms());
00196       }
00197 
00198       parent::copyEditableMetadataFrom($monographFile);
00199    }
00200 }
00201 
00202 ?>

Generated on Mon Sep 17 2012 13:58:55 for Open Monograph Press by  doxygen 1.7.1