GetCSV refactoring - changed the model to store only the information needed

This commit is contained in:
Miriam Baglioni 2021-08-12 18:01:10 +02:00
parent d36e925277
commit b62cd656a7
2 changed files with 64 additions and 11 deletions

View File

@ -1,20 +1,31 @@
package eu.dnetlib.dhp.actionmanager.project.utils;
package eu.dnetlib.dhp.actionmanager.project.utils.model;
import java.io.Serializable;
import com.opencsv.bean.CsvBindByName;
/**
* The model for the programme csv file
*/
public class CSVProgramme implements Serializable {
private String rcn;
@CsvBindByName(column = "code")
private String code;
@CsvBindByName(column = "title")
private String title;
@CsvBindByName(column = "shortTitle")
private String shortTitle;
@CsvBindByName(column = "language")
private String language;
@CsvBindByName(column = "classification")
private String classification;
@CsvBindByName(column = "classification_short")
private String classification_short;
public String getClassification_short() {
@ -33,14 +44,6 @@ public class CSVProgramme implements Serializable {
this.classification = classification;
}
public String getRcn() {
return rcn;
}
public void setRcn(String rcn) {
this.rcn = rcn;
}
public String getCode() {
return code;
}
@ -73,5 +76,4 @@ public class CSVProgramme implements Serializable {
this.language = language;
}
//
}

View File

@ -0,0 +1,51 @@
package eu.dnetlib.dhp.actionmanager.project.utils.model;
import java.io.Serializable;
import com.opencsv.bean.CsvBindByName;
/**
* the mmodel for the projects csv file
*/
public class CSVProject implements Serializable {
@CsvBindByName(column = "id")
private String id;
@CsvBindByName(column = "programme")
private String programme;
@CsvBindByName(column = "topics")
private String topics;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getProgramme() {
return programme;
}
public void setProgramme(String programme) {
this.programme = programme;
}
public String getTopics() {
return topics;
}
public void setTopics(String topics) {
this.topics = topics;
}
}