Added missing mapping for AssociatedProfilePublicModel on public api

This commit is contained in:
Thomas Georgios Giannos 2024-02-01 10:24:39 +02:00
parent 5373e2d867
commit 23c19888ca
1 changed files with 5 additions and 0 deletions

View File

@ -3,6 +3,7 @@ package eu.eudat.model.publicapi.associatedprofile;
import eu.eudat.model.DmpDescriptionTemplate;
import jakarta.xml.bind.annotation.*;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
@ -52,6 +53,10 @@ public class AssociatedProfilePublicModel {
public static AssociatedProfilePublicModel fromDmpDescriptionTemplate(DmpDescriptionTemplate dmpDescriptionTemplate) {
AssociatedProfilePublicModel model = new AssociatedProfilePublicModel();
model.setId(dmpDescriptionTemplate.getCurrentDescriptionTemplate().getId());
model.setDescriptionTemplateId(dmpDescriptionTemplate.getCurrentDescriptionTemplate().getId());
model.setLabel(dmpDescriptionTemplate.getCurrentDescriptionTemplate().getLabel());
model.setData(new HashMap<>());
return model;
}
}