Adds description and project abbreviation on Dmp listing model.

This commit is contained in:
gkolokythas 2019-05-09 12:42:51 +03:00
parent 65a3f4d11d
commit f0a73cf355
1 changed files with 19 additions and 0 deletions

View File

@ -33,6 +33,9 @@ public class DataManagementPlanListingModel implements DataModel<DMP, DataManage
private List<DatasetUrlListing> datasets;
private List<AssociatedProfile> associatedProfiles;
private List<UserInfoListingModel> users;
private String description;
private String projectabbreviation;
public String getId() {
return id;
@ -125,6 +128,20 @@ public class DataManagementPlanListingModel implements DataModel<DMP, DataManage
this.users = users;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getProjectabbreviation() {
return projectabbreviation;
}
public void setProjectabbreviation(String projectabbreviation) {
this.projectabbreviation = projectabbreviation;
}
@Override
public DataManagementPlanListingModel fromDataModel(DMP entity) {
this.id = entity.getId().toString();
@ -144,6 +161,8 @@ public class DataManagementPlanListingModel implements DataModel<DMP, DataManage
this.organisations = LabelBuilder.getLabel(entity.getOrganisations().stream().map(item -> new Organisation().fromDataModel(item)).collect(Collectors.toList()));
this.datasets = entity.getDataset().stream().map(x-> new DatasetUrlListing().fromDataModel(x)).collect(Collectors.toList());
this.users = entity.getUsers().stream().map(x -> new UserInfoListingModel().fromDataModel(x)).collect(Collectors.toList());
this.description = entity.getDescription();
this.projectabbreviation = entity.getProject().getAbbreviation();
if (entity.getAssociatedDmps() != null && !entity.getAssociatedDmps().isEmpty()) {
Document viewStyleDoc = XmlBuilder.fromXml(entity.getAssociatedDmps());