17 import(
'lib.pkp.classes.submission.Representation');
24 parent::__construct();
33 return $this->
getData(
'urlPath')
43 return $this->
getData(
'physicalFormat');
51 return $this->
setData(
'physicalFormat', $physicalFormat);
59 return $this->
getData(
'entryKey');
67 $this->
setData(
'entryKey', $entryKey);
76 $codes = $onixCodelistItemDao->getCodes(
'List7');
85 return $this->
getData(
'countryManufactureCode');
93 return $this->
setData(
'countryManufactureCode', $countryManufactureCode);
101 return $this->
getData(
'productAvailabilityCode');
109 return $this->
setData(
'productAvailabilityCode', $productAvailabilityCode);
117 return $this->
getData(
'height');
125 return $this->
setData(
'height', $height);
133 return $this->
getData(
'heightUnitCode');
141 return $this->
setData(
'heightUnitCode', $heightUnitCode);
149 return $this->
getData(
'width');
157 return $this->
setData(
'width', $width);
165 return $this->
getData(
'widthUnitCode');
173 return $this->
setData(
'widthUnitCode', $widthUnitCode);
181 return $this->
getData(
'thickness');
189 return $this->
setData(
'thickness', $thickness);
197 return $this->
getData(
'thicknessUnitCode');
205 return $this->
setData(
'thicknessUnitCode', $thicknessUnitCode);
213 return $this->
getData(
'weight');
221 return $this->
setData(
'weight', $weight);
229 return $this->
getData(
'weightUnitCode');
237 return $this->
setData(
'weightUnitCode', $weightUnitCode);
245 return $this->
getData(
'fileSize');
257 import(
'lib.pkp.classes.submission.SubmissionFile');
258 $stageMonographFiles = $submissionFileDao->getLatestRevisionsByAssocId(
259 ASSOC_TYPE_PUBLICATION_FORMAT, $this->
getId(),
260 $publication->getData(
'submissionId'), SUBMISSION_FILE_PROOF
263 foreach ($stageMonographFiles as $monographFile) {
264 if ($monographFile->getViewable()) {
265 $fileSize += (int) $monographFile->getFileSize();
269 return sprintf(
'%d.3', $fileSize/(1024*1024));
277 return $this->
setData(
'fileSize', $fileSize);
286 return $salesRightsDao->getByPublicationFormatId($this->
getId());
295 return $identificationCodeDao->getByPublicationFormatId($this->
getId());
304 return $publicationDateDao->getByPublicationFormatId($this->
getId());
313 return $marketDao->getByPublicationFormatId($this->
getId());
321 return $this->
getData(
'productFormDetailCode');
329 return $this->
setData(
'productFormDetailCode', $productFormDetailCode);
337 return $this->
getData(
'productCompositionCode');
345 return $this->
setData(
'productCompositionCode', $productCompositionCode);
353 return $this->
getData(
'frontMatter');
361 return $this->
setData(
'frontMatter', $frontMatter);
369 return $this->
getData(
'backMatter');
377 return $this->
setData(
'backMatter', $backMatter);
385 return $this->
getData(
'imprint');
393 return $this->
setData(
'imprint', $imprint);
401 return $this->
getData(
'technicalProtectionCode');
409 return $this->
setData(
'technicalProtectionCode', $technicalProtectionCode);
417 return $this->
getData(
'returnableIndicatorCode');
425 return $this->
setData(
'returnableIndicatorCode', $returnableIndicatorCode);
433 return $this->
getData(
'isAvailable');
441 return $this->
setData(
'isAvailable', $isAvailable);
457 if ($assignedMarkets->wasEmpty()) {
458 $errors[] =
'monograph.publicationFormat.noMarketsAssigned';
461 if ($assignedIdentificationCodes->wasEmpty()) {
462 $errors[] =
'monograph.publicationFormat.noCodesAssigned';
474 $requiredFields = array(
'productCompositionCode' =>
'grid.catalogEntry.codeRequired',
'productAvailabilityCode' =>
'grid.catalogEntry.productAvailabilityRequired');
478 foreach ($requiredFields as $field => $errorCode) {
479 if ($this->
getData($field) ==
'') {
480 $errors[] = $errorCode;
486 $errors[
'fileSize'] =
'grid.catalogEntry.fileSizeRequired';
515 $dimensions = array();
520 return join( __(
'monograph.publicationFormat.productDimensionsSeparator'), $dimensions );