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

classes/publicationFormat/SalesRights.inc.php

00001 <?php
00002 
00016 class SalesRights extends DataObject {
00020    function SalesRights() {
00021       parent::DataObject();
00022    }
00023 
00028    function getPublicationFormatId() {
00029       return $this->getData('publicationFormatId');
00030    }
00031 
00036    function setPublicationFormatId($publicationFormatId) {
00037       return $this->setData('publicationFormatId', $publicationFormatId);
00038    }
00039 
00044    function setType($type) {
00045       $this->setData('type', $type);
00046    }
00047 
00052    function getType() {
00053       return $this->getData('type');
00054    }
00055 
00060    function getNameForONIXCode() {
00061       $onixCodelistItemDao =& DAORegistry::getDAO('ONIXCodelistItemDAO');
00062       $codes =& $onixCodelistItemDao->getCodes('List46'); // List46 is for things like 'unrestricted sale with exclusive rights', etc.
00063       return $codes[$this->getType()];
00064    }
00065 
00070    function setROWSetting($rowSetting) {
00071       $this->setData('rowSetting', $rowSetting);
00072    }
00073 
00078    function getROWSetting() {
00079       return $this->getData('rowSetting');
00080    }
00081 
00086    function getCountriesIncluded() {
00087       return $this->getData('countriesIncluded');
00088    }
00089 
00094    function setCountriesIncluded($countriesIncluded) {
00095       $this->setData('countriesIncluded', array_filter($countriesIncluded, array(&$this, '_removeEmptyElements')));
00096    }
00097 
00102    function getCountriesExcluded() {
00103       return $this->getData('countriesExcluded');
00104    }
00105 
00110    function setCountriesExcluded($countriesExcluded) {
00111       $this->setData('countriesExcluded', array_filter($countriesExcluded, array(&$this, '_removeEmptyElements')));
00112    }
00113 
00118    function getRegionsIncluded() {
00119       return $this->getData('regionsIncluded');
00120    }
00121 
00126    function setRegionsIncluded($regionsIncluded) {
00127       $this->setData('regionsIncluded', array_filter($regionsIncluded, array(&$this, '_removeEmptyElements')));
00128    }
00129 
00134    function getRegionsExcluded() {
00135       return $this->getData('regionsExcluded');
00136    }
00137 
00142    function setRegionsExcluded($regionsExcluded) {
00143       $this->setData('regionsExcluded', array_filter($regionsExcluded, array(&$this, '_removeEmptyElements')));
00144    }
00145 
00153    function _removeEmptyElements($value) {
00154       return (trim($value) != '') ? true : false;
00155    }
00156 }
00157 
00158 ?>

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