Adds researchers to DMP overview model.
This commit is contained in:
parent
dd973d4b78
commit
392eb0d36e
|
@ -5,6 +5,7 @@ import eu.eudat.logic.utilities.builders.XmlBuilder;
|
||||||
import eu.eudat.models.DataModel;
|
import eu.eudat.models.DataModel;
|
||||||
import eu.eudat.models.data.dmp.AssociatedProfile;
|
import eu.eudat.models.data.dmp.AssociatedProfile;
|
||||||
import eu.eudat.models.data.dmp.Organisation;
|
import eu.eudat.models.data.dmp.Organisation;
|
||||||
|
import eu.eudat.models.data.dmp.Researcher;
|
||||||
import eu.eudat.models.data.urls.DatasetUrlListing;
|
import eu.eudat.models.data.urls.DatasetUrlListing;
|
||||||
import org.w3c.dom.Document;
|
import org.w3c.dom.Document;
|
||||||
import org.w3c.dom.Element;
|
import org.w3c.dom.Element;
|
||||||
|
@ -34,6 +35,7 @@ public class DataManagementPlanOverviewModel implements DataModel<DMP, DataManag
|
||||||
private String description;
|
private String description;
|
||||||
private String projectAbbreviation;
|
private String projectAbbreviation;
|
||||||
private String projectId;
|
private String projectId;
|
||||||
|
private List<Researcher> researchers;
|
||||||
|
|
||||||
|
|
||||||
public String getId() {
|
public String getId() {
|
||||||
|
@ -148,6 +150,13 @@ public class DataManagementPlanOverviewModel implements DataModel<DMP, DataManag
|
||||||
this.projectId = projectId;
|
this.projectId = projectId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<Researcher> getResearchers() {
|
||||||
|
return researchers;
|
||||||
|
}
|
||||||
|
public void setResearchers(List<Researcher> researchers) {
|
||||||
|
this.researchers = researchers;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public DataManagementPlanOverviewModel fromDataModel(DMP entity) {
|
public DataManagementPlanOverviewModel fromDataModel(DMP entity) {
|
||||||
this.id = entity.getId().toString();
|
this.id = entity.getId().toString();
|
||||||
|
@ -170,6 +179,7 @@ public class DataManagementPlanOverviewModel implements DataModel<DMP, DataManag
|
||||||
this.description = entity.getDescription();
|
this.description = entity.getDescription();
|
||||||
this.projectAbbreviation = entity.getProject().getAbbreviation();
|
this.projectAbbreviation = entity.getProject().getAbbreviation();
|
||||||
this.projectId = entity.getProject().getId().toString();
|
this.projectId = entity.getProject().getId().toString();
|
||||||
|
this.researchers = entity.getResearchers().stream().map(item -> new Researcher().fromDataModel(item)).collect(Collectors.toList());
|
||||||
|
|
||||||
if (entity.getAssociatedDmps() != null && !entity.getAssociatedDmps().isEmpty()) {
|
if (entity.getAssociatedDmps() != null && !entity.getAssociatedDmps().isEmpty()) {
|
||||||
Document viewStyleDoc = XmlBuilder.fromXml(entity.getAssociatedDmps());
|
Document viewStyleDoc = XmlBuilder.fromXml(entity.getAssociatedDmps());
|
||||||
|
|
Loading…
Reference in New Issue