Replace dmp and grant form String to DataManagementOverviewMaodel and GrantOverviewModel on DatasetOverviewModel
This commit is contained in:
parent
a8528ee5b1
commit
d10615d13a
|
@ -3,6 +3,8 @@ package eu.eudat.models.data.dataset;
|
|||
import eu.eudat.data.entities.Dataset;
|
||||
import eu.eudat.models.DataModel;
|
||||
import eu.eudat.models.data.datasetprofile.DatasetProfileOverviewModel;
|
||||
import eu.eudat.models.data.grant.GrantOverviewModel;
|
||||
import eu.eudat.models.data.listingmodels.DataManagementPlanOverviewModel;
|
||||
import eu.eudat.models.data.listingmodels.UserInfoListingModel;
|
||||
|
||||
import java.util.Date;
|
||||
|
@ -17,8 +19,8 @@ public class DatasetOverviewModel implements DataModel<Dataset, DatasetOverviewM
|
|||
private short status;
|
||||
private DatasetProfileOverviewModel datasetTemplate;
|
||||
private List<UserInfoListingModel> users;
|
||||
private String dmp;
|
||||
private String grant;
|
||||
private DataManagementPlanOverviewModel dmp;
|
||||
private GrantOverviewModel grant;
|
||||
private String description;
|
||||
private Boolean isPublic;
|
||||
private Date modified;
|
||||
|
@ -59,19 +61,19 @@ public class DatasetOverviewModel implements DataModel<Dataset, DatasetOverviewM
|
|||
this.users = users;
|
||||
}
|
||||
|
||||
public String getDmp() {
|
||||
public DataManagementPlanOverviewModel getDmp() {
|
||||
return dmp;
|
||||
}
|
||||
|
||||
public void setDmp(String dmp) {
|
||||
public void setDmp(DataManagementPlanOverviewModel dmp) {
|
||||
this.dmp = dmp;
|
||||
}
|
||||
|
||||
public String getGrant() {
|
||||
public GrantOverviewModel getGrant() {
|
||||
return grant;
|
||||
}
|
||||
|
||||
public void setGrant(String grant) {
|
||||
public void setGrant(GrantOverviewModel grant) {
|
||||
this.grant = grant;
|
||||
}
|
||||
|
||||
|
@ -106,8 +108,8 @@ public class DatasetOverviewModel implements DataModel<Dataset, DatasetOverviewM
|
|||
this.status = entity.getStatus();
|
||||
this.datasetTemplate = new DatasetProfileOverviewModel().fromDataModel(entity.getProfile());
|
||||
this.users = entity.getDmp().getUsers().stream().map(x -> new UserInfoListingModel().fromDataModel(x)).collect(Collectors.toList());
|
||||
this.dmp = entity.getDmp().getLabel();
|
||||
this.grant = entity.getDmp().getGrant().getLabel();
|
||||
this.dmp = new DataManagementPlanOverviewModel().fromDataModel(entity.getDmp());
|
||||
this.grant = new GrantOverviewModel().fromDataModel(entity.getDmp().getGrant());
|
||||
this.description = entity.getDescription();
|
||||
this.isPublic = entity.getDmp().isPublic();
|
||||
this.modified = entity.getModified();
|
||||
|
|
Loading…
Reference in New Issue