Adds project Abbreviation on Dataset listing model.
This commit is contained in:
parent
bb3fb91ba8
commit
25ce03b962
|
@ -24,6 +24,7 @@ public class DatasetListingModel implements DataModel<Dataset, DatasetListingMod
|
|||
private Date created;
|
||||
private Date modified;
|
||||
private String description;
|
||||
private String projectAbbreviation;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
|
@ -116,6 +117,13 @@ public class DatasetListingModel implements DataModel<Dataset, DatasetListingMod
|
|||
this.description = description;
|
||||
}
|
||||
|
||||
public String getProjectAbbreviation() {
|
||||
return projectAbbreviation;
|
||||
}
|
||||
public void setProjectAbbreviation(String projectAbbreviation) {
|
||||
this.projectAbbreviation = projectAbbreviation;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DatasetListingModel fromDataModel(Dataset entity) {
|
||||
this.id = entity.getId().toString();
|
||||
|
@ -128,6 +136,7 @@ public class DatasetListingModel implements DataModel<Dataset, DatasetListingMod
|
|||
this.profile = entity.getProfile() != null ? entity.getProfile().getLabel() : "";
|
||||
this.description = entity.getDescription();
|
||||
this.status = entity.getStatus();
|
||||
this.projectAbbreviation = entity.getDmp().getProject().getAbbreviation();
|
||||
this.registries = LabelBuilder.getLabel(entity.getRegistries().stream().map(item -> new eu.eudat.models.data.dataset.Registry().fromDataModel(item)).collect(Collectors.toList()));
|
||||
this.dataRepositories = LabelBuilder.getLabel(entity.getDatasetDataRepositories().stream().map(item -> new DataRepository().fromDataModel(item.getDataRepository())).collect(Collectors.toList()));
|
||||
this.services = LabelBuilder.getLabel(entity.getServices().stream().map(item -> new Service().fromDataModel(item.getService())).collect(Collectors.toList()));
|
||||
|
|
Loading…
Reference in New Issue