Open Monograph Press  1.1
 All Classes Namespaces Functions Variables Groups Pages
Representation.inc.php
1 <?php
2 
16 import('lib.pkp.classes.core.DataObject');
17 
18 class Representation extends DataObject {
22  function Representation() {
23  // Switch on meta-data adapter support.
24  $this->setHasLoadableAdapters(true);
25 
26  parent::DataObject();
27  }
28 
33  function getSeq() {
34  return $this->getData('seq');
35  }
36 
41  function setSeq($seq) {
42  return $this->setData('seq', $seq);
43  }
44 
49  function getLocalizedName() {
50  return $this->getLocalizedData('name');
51  }
52 
57  function getName() {
58  return $this->getData('name');
59  }
60 
66  function setName($name, $locale = null) {
67  return $this->setData('name', $name, $locale);
68  }
69 
74  function setSubmissionId($submissionId) {
75  return $this->setData('submissionId', $submissionId);
76  }
77 
82  function getSubmissionId() {
83  return $this->getData('submissionId');
84  }
85 
93  function getStoredPubId($pubIdType) {
94  return $this->getData('pub-id::'.$pubIdType);
95  }
96 
104  function setStoredPubId($pubIdType, $pubId) {
105  return $this->setData('pub-id::'.$pubIdType, $pubId);
106  }
107 
112  function getContextId() {
113  $submissionDao = Application::getSubmissionDAO();
114  $submission = $submissionDao->getById($this->getSubmissionId());
115  return $submission->getContextId();
116  }
117 }
118 
119 ?>
& getLocalizedData($key)
setSubmissionId($submissionId)
getStoredPubId($pubIdType)
& getData($key, $locale=null)
static getSubmissionDAO()
A submission&#39;s representation (Publication Format, Galley, ...)
setHasLoadableAdapters($hasLoadableAdapters)
setStoredPubId($pubIdType, $pubId)
Any class with an associated DAO should extend this class.
setData($key, $value, $locale=null)
setName($name, $locale=null)