add exportEntityTypes importEntityTypes

This commit is contained in:
Efstratios Giannopoulos 2024-04-17 17:59:12 +03:00
parent b5610d7916
commit 8b601db40c
2 changed files with 19 additions and 1 deletions

View File

@ -3,6 +3,7 @@ package eu.eudat.file.transformer.service.rdafiletransformer;
import eu.eudat.commonmodels.models.FileEnvelopeModel;
import eu.eudat.commonmodels.models.description.DescriptionModel;
import eu.eudat.commonmodels.models.dmp.DmpModel;
import eu.eudat.file.transformer.enums.FileTransformerEntityType;
import eu.eudat.file.transformer.interfaces.FileTransformerClient;
import eu.eudat.file.transformer.interfaces.FileTransformerConfiguration;
import eu.eudat.file.transformer.models.misc.FileFormat;
@ -34,6 +35,9 @@ public class RdaFileTransformerService implements FileTransformerClient {
private final FileStorageService storageService;
private final RdaFileTransformerServiceProperties properties;
private final JsonHandlingService jsonHandlingService;
private final static List<FileTransformerEntityType> FILE_TRANSFORMER_ENTITY_TYPES = List.of(FileTransformerEntityType.Dmp);
@Autowired
public RdaFileTransformerService(DmpRDAMapper dmpRDAMapper, DatasetRDAMapper descriptionRDAMapper, FileStorageService storageService, RdaFileTransformerServiceProperties properties, JsonHandlingService jsonHandlingService) {
this.dmpRDAMapper = dmpRDAMapper;
@ -97,6 +101,7 @@ public class RdaFileTransformerService implements FileTransformerClient {
FileTransformerConfiguration configuration = new FileTransformerConfiguration();
configuration.setFileTransformerId(this.properties.getTransformerId());
configuration.setExportVariants(supportedFormats);
configuration.setExportEntityTypes(FILE_TRANSFORMER_ENTITY_TYPES);
configuration.setImportVariants(null);
configuration.setUseSharedStorage(this.properties.isUseSharedStorage());
return configuration;

15
pom.xml
View File

@ -30,7 +30,7 @@
<dependency>
<groupId>gr.cite.opendmp</groupId>
<artifactId>file-transformer-base</artifactId>
<version>0.0.11</version>
<version>0.0.12</version>
</dependency>
</dependencies>
@ -56,6 +56,19 @@
</repository>
</distributionManagement>
</profile>
<profile>
<id>cite-dev</id>
<repositories>
<repository>
<id>cite-maven</id>
<name>CITE Maven Repository</name>
<url>https://crepo.cite.gr/repository/cite-maven/</url>
</repository>
</repositories>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
</profile>
</profiles>
</project>