33 lines
1.3 KiB
Java
33 lines
1.3 KiB
Java
package org.opencdmp.filetransformerbase.interfaces;
|
|
|
|
import org.opencdmp.commonmodels.models.FileEnvelopeModel;
|
|
import org.opencdmp.commonmodels.models.description.DescriptionModel;
|
|
import org.opencdmp.commonmodels.models.dmp.DmpModel;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
/**
|
|
* The RepositoryDeposit interface represents the mechanism of depositing a dmp to any
|
|
* repository which mints a persistent digital object identifier (DOI) for each submission,
|
|
* which makes the stored dmps easily citeable.
|
|
*/
|
|
@RequestMapping("/api/file-transformer")
|
|
public interface FileTransformerController {
|
|
|
|
|
|
@PostMapping("/export/dmp")
|
|
FileEnvelopeModel exportDmp(@RequestBody DmpModel dmpDepositModel, @RequestParam(value = "format",required = false)String format) throws Exception ;
|
|
|
|
@PostMapping("/export/description")
|
|
FileEnvelopeModel exportDescription(@RequestBody DescriptionModel descriptionModel, @RequestParam(value = "format",required = false)String format) throws Exception;
|
|
|
|
@PostMapping("/import/dmp")
|
|
DmpModel importFileToDmp(@RequestBody FileEnvelopeModel fileEnvelope);
|
|
|
|
@PostMapping("/import/description")
|
|
DescriptionModel importFileToDescription(@RequestBody FileEnvelopeModel fileEnvelope);
|
|
|
|
@GetMapping("/formats")
|
|
FileTransformerConfiguration getSupportedFormats();
|
|
|
|
}
|