123 lines
3.1 KiB
Java
123 lines
3.1 KiB
Java
package eu.eudat.models.data.dataset;
|
|
|
|
import eu.eudat.commons.enums.DescriptionStatus;
|
|
import eu.eudat.data.DescriptionEntity;
|
|
import eu.eudat.model.DmpUser;
|
|
import eu.eudat.models.DataModel;
|
|
|
|
import java.time.Instant;
|
|
import java.util.List;
|
|
import java.util.UUID;
|
|
|
|
public class DatasetOverviewModel implements DataModel<DescriptionEntity, DatasetOverviewModel> {
|
|
|
|
private UUID id;
|
|
private String label;
|
|
private DescriptionStatus status;
|
|
private List<DmpUser> users;
|
|
// private DataManagementPlanOverviewModel dmp;
|
|
private String description;
|
|
private Boolean isPublic;
|
|
private Instant modified;
|
|
private Instant created;
|
|
|
|
public UUID getId() {
|
|
return id;
|
|
}
|
|
public void setId(UUID id) {
|
|
this.id = id;
|
|
}
|
|
|
|
public String getLabel() {
|
|
return label;
|
|
}
|
|
public void setLabel(String label) {
|
|
this.label = label;
|
|
}
|
|
|
|
public DescriptionStatus getStatus() {
|
|
return status;
|
|
}
|
|
public void setStatus(DescriptionStatus status) {
|
|
this.status = status;
|
|
}
|
|
|
|
public List<DmpUser> getUsers() {
|
|
return users;
|
|
}
|
|
|
|
public void setUsers(List<DmpUser> users) {
|
|
this.users = users;
|
|
}
|
|
|
|
// public DataManagementPlanOverviewModel getDmp() {
|
|
// return dmp;
|
|
// }
|
|
//
|
|
// public void setDmp(DataManagementPlanOverviewModel dmp) {
|
|
// this.dmp = dmp;
|
|
// }
|
|
|
|
public String getDescription() {
|
|
return description;
|
|
}
|
|
|
|
public void setDescription(String description) {
|
|
this.description = description;
|
|
}
|
|
|
|
public Boolean getPublic() {
|
|
return isPublic;
|
|
}
|
|
|
|
public void setPublic(Boolean aPublic) {
|
|
isPublic = aPublic;
|
|
}
|
|
|
|
public Instant getModified() {
|
|
return modified;
|
|
}
|
|
|
|
public void setModified(Instant modified) {
|
|
this.modified = modified;
|
|
}
|
|
|
|
public Instant getCreated() {
|
|
return created;
|
|
}
|
|
|
|
public void setCreated(Instant created) {
|
|
this.created = created;
|
|
}
|
|
|
|
@Override
|
|
public DatasetOverviewModel fromDataModel(DescriptionEntity entity) {
|
|
//TODO Implement it on transfer
|
|
// this.id = entity.getId();
|
|
// this.label = entity.getLabel();
|
|
// 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 = new DataManagementPlanOverviewModel().fromDataModel(entity.getDmp());
|
|
// if (entity.getDmp().getGrant() != null) {
|
|
// this.grant = new GrantOverviewModel().fromDataModel(entity.getDmp().getGrant());
|
|
// }
|
|
// this.description = entity.getDescription();
|
|
// this.isPublic = entity.getDmp().isPublic();
|
|
// this.modified = entity.getCreatedAt();
|
|
// this.created = entity.getUpdatedAt();
|
|
|
|
return this;
|
|
}
|
|
|
|
@Override
|
|
public DescriptionEntity toDataModel() throws Exception {
|
|
return null;
|
|
}
|
|
|
|
@Override
|
|
public String getHint() {
|
|
return null;
|
|
}
|
|
}
|