JATSParserPlugin
JATSParserPlugin copied to clipboard
Simplify the process of copying submission files and their metadata
- Don't create a new file for a copied submission file (e.g., when importing a galley), use a file id of a submission file that is being copied.
- Clone a submission file and its metadata. Review what metadata should be changed. Relevant for importing XML galleys and creating PDF galley. Example:
$newSubmissionFile = clone $submissionFile;
$newSubmissionFile->setData('fileStage', $fileStage);
$newSubmissionFile->setData('sourceSubmissionFileId', $submissionFile->getId());
$newSubmissionFile = Services::get('submissionFile')->add($newSubmissionFile, Application::get()->getRequest());