Class ExtractMetadataStep

  • All Implemented Interfaces:
    ListenerProcessingStep, RestProcessingStep, UploadableStep

    public class ExtractMetadataStep
    extends Object
    implements ListenerProcessingStep, UploadableStep
    This submission step allows to extract metadata from an uploaded file and/or use provided identifiers/metadata to further enrich a submission. The processing of the file is delegated to the Import Service (see ImportService that can be extended with Data Provider specialized by format (i.e. a Grobid extractor to get data from a PDF file, an extractor to get data from bibliographic file such as BibTeX, etc) Some metadata are monitored by listener (see MetadataListener and when changed the are used to generate an identifier that is used to query the External Data Provider associated with the specific listener
    Author:
    Luigi Andrea Pascarelli (luigiandrea.pascarelli at 4science.it), Andrea Bollini (andrea.bollini at 4science.it)
    • Constructor Detail

      • ExtractMetadataStep

        public ExtractMetadataStep()
    • Method Detail

      • doPreProcessing

        public void doPreProcessing​(org.dspace.core.Context context,
                                    org.dspace.content.InProgressSubmission wsi)
        Specified by:
        doPreProcessing in interface ListenerProcessingStep
      • doPostProcessing

        public void doPostProcessing​(org.dspace.core.Context context,
                                     org.dspace.content.InProgressSubmission wsi)
        Specified by:
        doPostProcessing in interface ListenerProcessingStep
      • upload

        public ErrorRest upload​(org.dspace.core.Context context,
                                SubmissionService submissionService,
                                org.dspace.app.util.SubmissionStepConfig stepConfig,
                                org.dspace.content.InProgressSubmission wsi,
                                org.springframework.web.multipart.MultipartFile multipartFile)
                         throws IOException
        Description copied from interface: UploadableStep
        The method to implement to support upload of a file in the submission section (aka panel / step)
        Specified by:
        upload in interface UploadableStep
        Parameters:
        context - the dspace context
        submissionService - the submission service
        stepConfig - the configuration of the submission section
        wsi - the inprogress submission
        multipartFile - the multipart file, please note that it is a complex object containing additional information other than just the binary such as the filename and the mimetype
        Returns:
        the encountered error if any
        Throws:
        IOException