PageRenderTime 80ms CodeModel.GetById 31ms RepoModel.GetById 1ms app.codeStats 0ms

/ojs/ojs-2.0.2-1/classes/submission/reviewer/ReviewerSubmission.inc.php

https://github.com/mcrider/pkpUpgradeTestSuite
PHP | 513 lines | 192 code | 69 blank | 252 comment | 5 complexity | f8506efc554f27471f97d7f80c79f25d MD5 | raw file
Possible License(s): GPL-2.0, LGPL-2.1
  1. <?php
  2. /**
  3. * ReviewerSubmission.inc.php
  4. *
  5. * Copyright (c) 2003-2004 The Public Knowledge Project
  6. * Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
  7. *
  8. * @package submission
  9. *
  10. * ReviewerSubmission class.
  11. *
  12. * $Id: ReviewerSubmission.inc.php,v 1.16 2005/08/12 19:52:51 alec Exp $
  13. */
  14. import('article.Article');
  15. define('SUBMISSION_REVIEWER_RECOMMENDATION_ACCEPT', 1);
  16. define('SUBMISSION_REVIEWER_RECOMMENDATION_PENDING_REVISIONS', 2);
  17. define('SUBMISSION_REVIEWER_RECOMMENDATION_RESUBMIT_HERE', 3);
  18. define('SUBMISSION_REVIEWER_RECOMMENDATION_RESUBMIT_ELSEWHERE', 4);
  19. define('SUBMISSION_REVIEWER_RECOMMENDATION_DECLINE', 5);
  20. define('SUBMISSION_REVIEWER_RECOMMENDATION_SEE_COMMENTS', 6);
  21. class ReviewerSubmission extends Article {
  22. /** @var array ArticleFiles reviewer file revisions of this article */
  23. var $reviewerFileRevisions;
  24. /** @var array ArticleComments peer review comments of this article */
  25. var $peerReviewComments;
  26. /** @var array the editor decisions of this article */
  27. var $editorDecisions;
  28. /**
  29. * Constructor.
  30. */
  31. function ReviewerSubmission() {
  32. parent::Article();
  33. }
  34. /**
  35. * Get/Set Methods.
  36. */
  37. /**
  38. * Get editor of this article.
  39. * @return User
  40. */
  41. function &getEditor() {
  42. $editor = &$this->getData('editor');
  43. return $editor;
  44. }
  45. /**
  46. * Set editor of this article.
  47. * @param $editor User
  48. */
  49. function setEditor($editor) {
  50. return $this->setData('editor', $editor);
  51. }
  52. /**
  53. * Get ID of review assignment.
  54. * @return int
  55. */
  56. function getReviewId() {
  57. return $this->getData('reviewId');
  58. }
  59. /**
  60. * Set ID of review assignment
  61. * @param $reviewId int
  62. */
  63. function setReviewId($reviewId) {
  64. return $this->setData('reviewId', $reviewId);
  65. }
  66. /**
  67. * Get ID of article.
  68. * @return int
  69. */
  70. function getArticleId() {
  71. return $this->getData('articleId');
  72. }
  73. /**
  74. * Set ID of article.
  75. * @param $articleId int
  76. */
  77. function setArticleId($articleId) {
  78. return $this->setData('articleId', $articleId);
  79. }
  80. /**
  81. * Get ID of reviewer.
  82. * @return int
  83. */
  84. function getReviewerId() {
  85. return $this->getData('reviewerId');
  86. }
  87. /**
  88. * Set ID of reviewer.
  89. * @param $reviewerId int
  90. */
  91. function setReviewerId($reviewerId) {
  92. return $this->setData('reviewerId', $reviewerId);
  93. }
  94. /**
  95. * Get full name of reviewer.
  96. * @return string
  97. */
  98. function getReviewerFullName() {
  99. return $this->getData('reviewerFullName');
  100. }
  101. /**
  102. * Set full name of reviewer.
  103. * @param $reviewerFullName string
  104. */
  105. function setReviewerFullName($reviewerFullName) {
  106. return $this->setData('reviewerFullName', $reviewerFullName);
  107. }
  108. /**
  109. * Get editor decisions.
  110. * @return array
  111. */
  112. function getDecisions($round = null) {
  113. if ($round == null) {
  114. return $this->editorDecisions;
  115. } else {
  116. if (isset($this->editorDecisions[$round])) return $this->editorDecisions[$round];
  117. else return null;
  118. }
  119. }
  120. /**
  121. * Set editor decisions.
  122. * @param $editorDecisions array
  123. * @param $round int
  124. */
  125. function setDecisions($editorDecisions, $round) {
  126. $this->stampStatusModified();
  127. return $this->editorDecisions[$round] = $editorDecisions;
  128. }
  129. /**
  130. * Get reviewer recommendation.
  131. * @return string
  132. */
  133. function getRecommendation() {
  134. return $this->getData('recommendation');
  135. }
  136. /**
  137. * Set reviewer recommendation.
  138. * @param $recommendation string
  139. */
  140. function setRecommendation($recommendation) {
  141. return $this->setData('recommendation', $recommendation);
  142. }
  143. /**
  144. * Get the reviewer's assigned date.
  145. * @return string
  146. */
  147. function getDateAssigned() {
  148. return $this->getData('dateAssigned');
  149. }
  150. /**
  151. * Set the reviewer's assigned date.
  152. * @param $dateAssigned string
  153. */
  154. function setDateAssigned($dateAssigned) {
  155. return $this->setData('dateAssigned', $dateAssigned);
  156. }
  157. /**
  158. * Get the reviewer's notified date.
  159. * @return string
  160. */
  161. function getDateNotified() {
  162. return $this->getData('dateNotified');
  163. }
  164. /**
  165. * Set the reviewer's notified date.
  166. * @param $dateNotified string
  167. */
  168. function setDateNotified($dateNotified) {
  169. return $this->setData('dateNotified', $dateNotified);
  170. }
  171. /**
  172. * Get the reviewer's confirmed date.
  173. * @return string
  174. */
  175. function getDateConfirmed() {
  176. return $this->getData('dateConfirmed');
  177. }
  178. /**
  179. * Set the reviewer's confirmed date.
  180. * @param $dateConfirmed string
  181. */
  182. function setDateConfirmed($dateConfirmed) {
  183. return $this->setData('dateConfirmed', $dateConfirmed);
  184. }
  185. /**
  186. * Get the reviewer's completed date.
  187. * @return string
  188. */
  189. function getDateCompleted() {
  190. return $this->getData('dateCompleted');
  191. }
  192. /**
  193. * Set the reviewer's completed date.
  194. * @param $dateCompleted string
  195. */
  196. function setDateCompleted($dateCompleted) {
  197. return $this->setData('dateCompleted', $dateCompleted);
  198. }
  199. /**
  200. * Get the reviewer's acknowledged date.
  201. * @return string
  202. */
  203. function getDateAcknowledged() {
  204. return $this->getData('dateAcknowledged');
  205. }
  206. /**
  207. * Set the reviewer's acknowledged date.
  208. * @param $dateAcknowledged string
  209. */
  210. function setDateAcknowledged($dateAcknowledged) {
  211. return $this->setData('dateAcknowledged', $dateAcknowledged);
  212. }
  213. /**
  214. * Get the reviewer's due date.
  215. * @return string
  216. */
  217. function getDateDue() {
  218. return $this->getData('dateDue');
  219. }
  220. /**
  221. * Set the reviewer's due date.
  222. * @param $dateDue string
  223. */
  224. function setDateDue($dateDue) {
  225. return $this->setData('dateDue', $dateDue);
  226. }
  227. /**
  228. * Get the declined value.
  229. * @return boolean
  230. */
  231. function getDeclined() {
  232. return $this->getData('declined');
  233. }
  234. /**
  235. * Set the reviewer's declined value.
  236. * @param $declined boolean
  237. */
  238. function setDeclined($declined) {
  239. return $this->setData('declined', $declined);
  240. }
  241. /**
  242. * Get the replaced value.
  243. * @return boolean
  244. */
  245. function getReplaced() {
  246. return $this->getData('replaced');
  247. }
  248. /**
  249. * Set the reviewer's replaced value.
  250. * @param $replaced boolean
  251. */
  252. function setReplaced($replaced) {
  253. return $this->setData('replaced', $replaced);
  254. }
  255. /**
  256. * Get the cancelled value.
  257. * @return boolean
  258. */
  259. function getCancelled() {
  260. return $this->getData('cancelled');
  261. }
  262. /**
  263. * Set the reviewer's cancelled value.
  264. * @param $replaced boolean
  265. */
  266. function setCancelled($cancelled) {
  267. return $this->setData('cancelled', $cancelled);
  268. }
  269. /**
  270. * Get reviewer file id.
  271. * @return int
  272. */
  273. function getReviewerFileId() {
  274. return $this->getData('reviewerFileId');
  275. }
  276. /**
  277. * Set reviewer file id.
  278. * @param $reviewerFileId int
  279. */
  280. function setReviewerFileId($reviewerFileId) {
  281. return $this->setData('reviewerFileId', $reviewerFileId);
  282. }
  283. /**
  284. * Get quality.
  285. * @return int
  286. */
  287. function getQuality() {
  288. return $this->getData('quality');
  289. }
  290. /**
  291. * Set quality.
  292. * @param $quality int
  293. */
  294. function setQuality($quality) {
  295. return $this->setData('quality', $quality);
  296. }
  297. /**
  298. * Get round.
  299. * @return int
  300. */
  301. function getRound() {
  302. return $this->getData('round');
  303. }
  304. /**
  305. * Set round.
  306. * @param $round int
  307. */
  308. function setRound($round) {
  309. return $this->setData('round', $round);
  310. }
  311. /**
  312. * Get review file id.
  313. * @return int
  314. */
  315. function getReviewFileId() {
  316. return $this->getData('reviewFileId');
  317. }
  318. /**
  319. * Set review file id.
  320. * @param $reviewFileId int
  321. */
  322. function setReviewFileId($reviewFileId) {
  323. return $this->setData('reviewFileId', $reviewFileId);
  324. }
  325. /**
  326. * Get review revision.
  327. * @return int
  328. */
  329. function getReviewRevision() {
  330. return $this->getData('reviewRevision');
  331. }
  332. /**
  333. * Set review revision.
  334. * @param $reviewRevision int
  335. */
  336. function setReviewRevision($reviewRevision) {
  337. return $this->setData('reviewRevision', $reviewRevision);
  338. }
  339. //
  340. // Files
  341. //
  342. /**
  343. * Get submission file for this article.
  344. * @return ArticleFile
  345. */
  346. function getSubmissionFile() {
  347. return $this->getData('submissionFile');
  348. }
  349. /**
  350. * Set submission file for this article.
  351. * @param $submissionFile ArticleFile
  352. */
  353. function setSubmissionFile($submissionFile) {
  354. return $this->setData('submissionFile', $submissionFile);
  355. }
  356. /**
  357. * Get revised file for this article.
  358. * @return ArticleFile
  359. */
  360. function getRevisedFile() {
  361. return $this->getData('revisedFile');
  362. }
  363. /**
  364. * Set revised file for this article.
  365. * @param $submissionFile ArticleFile
  366. */
  367. function setRevisedFile($revisedFile) {
  368. return $this->setData('revisedFile', $revisedFile);
  369. }
  370. /**
  371. * Get supplementary files for this article.
  372. * @return array SuppFiles
  373. */
  374. function getSuppFiles() {
  375. return $this->getData('suppFiles');
  376. }
  377. /**
  378. * Set supplementary file for this article.
  379. * @param $suppFiles array SuppFiles
  380. */
  381. function setSuppFiles($suppFiles) {
  382. return $this->setData('suppFiles', $suppFiles);
  383. }
  384. /**
  385. * Get review file.
  386. * @return ArticleFile
  387. */
  388. function getReviewFile() {
  389. return $this->getData('reviewFile');
  390. }
  391. /**
  392. * Set review file.
  393. * @param $reviewFile ArticleFile
  394. */
  395. function setReviewFile($reviewFile) {
  396. return $this->setData('reviewFile', $reviewFile);
  397. }
  398. /**
  399. * Get reviewer file.
  400. * @return ArticleFile
  401. */
  402. function getReviewerFile() {
  403. return $this->getData('reviewerFile');
  404. }
  405. /**
  406. * Set reviewer file.
  407. * @param $reviewFile ArticleFile
  408. */
  409. function setReviewerFile($reviewerFile) {
  410. return $this->setData('reviewerFile', $reviewerFile);
  411. }
  412. /**
  413. * Get all reviewer file revisions.
  414. * @return array ArticleFiles
  415. */
  416. function getReviewerFileRevisions() {
  417. return $this->reviewerFileRevisions;
  418. }
  419. /**
  420. * Set all reviewer file revisions.
  421. * @param $reviewerFileRevisions array ArticleFiles
  422. */
  423. function setReviewerFileRevisions($reviewerFileRevisions) {
  424. return $this->reviewerFileRevisions = $reviewerFileRevisions;
  425. }
  426. //
  427. // Comments
  428. //
  429. /**
  430. * Get most recent peer review comment.
  431. * @return ArticleComment
  432. */
  433. function getMostRecentPeerReviewComment() {
  434. return $this->getData('peerReviewComment');
  435. }
  436. /**
  437. * Set most recent peer review comment.
  438. * @param $peerReviewComment ArticleComment
  439. */
  440. function setMostRecentPeerReviewComment($peerReviewComment) {
  441. return $this->setData('peerReviewComment', $peerReviewComment);
  442. }
  443. }
  444. ?>