Adds project Id on Dataset listing model.
This commit is contained in:
parent
d360b384cb
commit
3914c456d3
|
@ -25,6 +25,7 @@ public class DatasetListingModel implements DataModel<Dataset, DatasetListingMod
|
|||
private Date modified;
|
||||
private String description;
|
||||
private String projectAbbreviation;
|
||||
private String projectId;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
|
@ -124,6 +125,13 @@ public class DatasetListingModel implements DataModel<Dataset, DatasetListingMod
|
|||
this.projectAbbreviation = projectAbbreviation;
|
||||
}
|
||||
|
||||
public String getProjectId() {
|
||||
return projectId;
|
||||
}
|
||||
public void setProjectId(String projectId) {
|
||||
this.projectId = projectId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DatasetListingModel fromDataModel(Dataset entity) {
|
||||
this.id = entity.getId().toString();
|
||||
|
@ -137,6 +145,7 @@ public class DatasetListingModel implements DataModel<Dataset, DatasetListingMod
|
|||
this.description = entity.getDescription();
|
||||
this.status = entity.getStatus();
|
||||
this.projectAbbreviation = entity.getDmp().getProject().getAbbreviation();
|
||||
this.projectId = entity.getDmp().getProject().getId().toString();
|
||||
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