2019-10-11 15:39:29 +02:00
|
|
|
package eu.eudat.models.data.rda;
|
|
|
|
|
|
|
|
import eu.eudat.data.entities.Funder;
|
|
|
|
import eu.eudat.data.entities.Grant;
|
|
|
|
|
|
|
|
public class FundingRDAExportModel {
|
|
|
|
private FunderIdRDAExportModel funder_id;
|
|
|
|
private GrantIdRDAExportModel grant_id;
|
|
|
|
private String funding_status;
|
|
|
|
|
|
|
|
public FunderIdRDAExportModel getFunder_id() {
|
|
|
|
return funder_id;
|
|
|
|
}
|
|
|
|
public void setFunder_id(FunderIdRDAExportModel funder_id) {
|
|
|
|
this.funder_id = funder_id;
|
|
|
|
}
|
|
|
|
|
|
|
|
public GrantIdRDAExportModel getGrant_id() {
|
|
|
|
return grant_id;
|
|
|
|
}
|
|
|
|
public void setGrant_id(GrantIdRDAExportModel grant_id) {
|
|
|
|
this.grant_id = grant_id;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getFunding_status() {
|
|
|
|
return funding_status;
|
|
|
|
}
|
|
|
|
public void setFunding_status(String funding_status) {
|
|
|
|
this.funding_status = funding_status;
|
|
|
|
}
|
|
|
|
|
|
|
|
public FundingRDAExportModel fromDataModel(Funder funder, Grant grant) {
|
|
|
|
this.funding_status = "planned"; // mock data
|
|
|
|
if (funder != null) {
|
2019-10-15 12:46:49 +02:00
|
|
|
this.funder_id = new FunderIdRDAExportModel(funder.getReference(), "argos_internal");
|
2019-10-11 15:39:29 +02:00
|
|
|
}
|
|
|
|
if (grant != null) {
|
2019-10-15 12:46:49 +02:00
|
|
|
this.grant_id = new GrantIdRDAExportModel(grant.getReference(), "argos_internal");
|
2019-10-11 15:39:29 +02:00
|
|
|
}
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
}
|