Fix various issues and add support for file storage
This commit is contained in:
parent
2e34bd4aa2
commit
d2a13d99ff
|
@ -22,10 +22,10 @@ public interface FileTransformerClient {
|
|||
* @return a string representing the persistent digital object identifier (DOI)
|
||||
* @throws Exception if an error occurs while trying to deposit the dmp
|
||||
*/
|
||||
FileEnvelope exportDmp(DmpFileTransformerModel dmp) throws InvalidApplicationException, IOException;
|
||||
FileEnvelope exportDmp(DmpFileTransformerModel dmp, String format) throws InvalidApplicationException, IOException;
|
||||
DmpFileTransformerModel importDmp(FileEnvelope file);
|
||||
|
||||
FileEnvelope exportDescription(DescriptionFileTransformerModel descriptionFileTransformerModel) throws InvalidApplicationException, IOException;
|
||||
FileEnvelope exportDescription(DescriptionFileTransformerModel descriptionFileTransformerModel, String format) throws InvalidApplicationException, IOException;
|
||||
DescriptionFileTransformerModel importDescription(FileEnvelope file);
|
||||
|
||||
FileTransformerConfiguration getConfiguration();
|
||||
|
|
|
@ -1,12 +1,15 @@
|
|||
package eu.eudat.file.transformer.interfaces;
|
||||
|
||||
|
||||
import eu.eudat.file.transformer.models.misc.FileFormat;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class FileTransformerConfiguration {
|
||||
|
||||
private String fileTransformerId;
|
||||
private String[] exportVariants;
|
||||
private String[] importVariants;
|
||||
private boolean hasLogo;
|
||||
private List<FileFormat> exportVariants;
|
||||
private List<FileFormat> importVariants;
|
||||
|
||||
public String getFileTransformerId() {
|
||||
return fileTransformerId;
|
||||
|
@ -16,27 +19,19 @@ public class FileTransformerConfiguration {
|
|||
this.fileTransformerId = fileTransformerId;
|
||||
}
|
||||
|
||||
public String[] getExportVariants() {
|
||||
public List<FileFormat> getExportVariants() {
|
||||
return exportVariants;
|
||||
}
|
||||
|
||||
public void setExportVariants(String[] exportVariants) {
|
||||
public void setExportVariants(List<FileFormat> exportVariants) {
|
||||
this.exportVariants = exportVariants;
|
||||
}
|
||||
|
||||
public String[] getImportVariants() {
|
||||
public List<FileFormat> getImportVariants() {
|
||||
return importVariants;
|
||||
}
|
||||
|
||||
public void setImportVariants(String[] importVariants) {
|
||||
public void setImportVariants(List<FileFormat> importVariants) {
|
||||
this.importVariants = importVariants;
|
||||
}
|
||||
|
||||
public boolean isHasLogo() {
|
||||
return hasLogo;
|
||||
}
|
||||
|
||||
public void setHasLogo(boolean hasLogo) {
|
||||
this.hasLogo = hasLogo;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ package eu.eudat.file.transformer.models.misc;
|
|||
|
||||
public class FileEnvelope {
|
||||
private String filename;
|
||||
private byte[] file;
|
||||
private String file;
|
||||
|
||||
public String getFilename() {
|
||||
return filename;
|
||||
|
@ -12,11 +12,11 @@ public class FileEnvelope {
|
|||
this.filename = filename;
|
||||
}
|
||||
|
||||
public byte[] getFile() {
|
||||
public String getFile() {
|
||||
return file;
|
||||
}
|
||||
|
||||
public void setFile(byte[] file) {
|
||||
public void setFile(String file) {
|
||||
this.file = file;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
package eu.eudat.file.transformer.models.misc;
|
||||
|
||||
public class FileFormat {
|
||||
private String format;
|
||||
private Boolean hasLogo;
|
||||
private String icon;
|
||||
|
||||
public FileFormat(String format, Boolean hasLogo, String icon) {
|
||||
this.format = format;
|
||||
this.hasLogo = hasLogo;
|
||||
this.icon = icon;
|
||||
}
|
||||
|
||||
public FileFormat() {
|
||||
}
|
||||
|
||||
public String getFormat() {
|
||||
return format;
|
||||
}
|
||||
|
||||
public void setFormat(String format) {
|
||||
this.format = format;
|
||||
}
|
||||
|
||||
public Boolean getHasLogo() {
|
||||
return hasLogo;
|
||||
}
|
||||
|
||||
public void setHasLogo(Boolean hasLogo) {
|
||||
this.hasLogo = hasLogo;
|
||||
}
|
||||
|
||||
public String getIcon() {
|
||||
return icon;
|
||||
}
|
||||
|
||||
public void setIcon(String icon) {
|
||||
this.icon = icon;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue