PageRenderTime 42ms CodeModel.GetById 13ms RepoModel.GetById 0ms app.codeStats 0ms

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

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