Hosted By Map - model classes to store the intermediate information to be used to apply the hosted by map

This commit is contained in:
Miriam Baglioni 2021-07-30 17:55:39 +02:00
parent 613bd3bde0
commit d8b9b0553b
2 changed files with 141 additions and 0 deletions

View File

@ -0,0 +1,72 @@
package eu.dnetlib.dhp.oa.graph.hostedbymap.model;
import java.io.Serializable;
public class DatasourceInfo implements Serializable {
private String id;
private String officialname;
private String issn;
private String eissn;
private String lissn;
private Boolean openAccess;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getOfficialname() {
return officialname;
}
public void setOfficialname(String officialname) {
this.officialname = officialname;
}
public String getIssn() {
return issn;
}
public void setIssn(String issn) {
this.issn = issn;
}
public String getEissn() {
return eissn;
}
public void setEissn(String eissn) {
this.eissn = eissn;
}
public String getLissn() {
return lissn;
}
public void setLissn(String lissn) {
this.lissn = lissn;
}
public Boolean getOpenAccess() {
return openAccess;
}
public void setOpenAccess(Boolean openAccess) {
this.openAccess = openAccess;
}
public static DatasourceInfo newInstance(String id, String officialname, String issn, String eissn, String lissn){
DatasourceInfo di = new DatasourceInfo();
di.id = id;
di.officialname = officialname;
di.issn = (issn != null) ? issn : "" ;
di.eissn = (eissn != null) ? eissn:"";
di.lissn = (lissn != null) ? lissn : "";
di.openAccess = false;
return di;
}
}

View File

@ -0,0 +1,69 @@
package eu.dnetlib.dhp.oa.graph.hostedbymap.model;
import java.io.Serializable;
public class EntityInfo implements Serializable {
private String id;
private String journal_id;
private String name;
private Boolean openaccess;
private String hb_id;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getJournal_id() {
return journal_id;
}
public void setJournal_id(String journal_id) {
this.journal_id = journal_id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Boolean getOpenaccess() {
return openaccess;
}
public void setOpenaccess(Boolean openaccess) {
this.openaccess = openaccess;
}
public String getHb_id() {
return hb_id;
}
public void setHb_id(String hb_id) {
this.hb_id = hb_id;
}
public static EntityInfo newInstance(String id, String j_id, String name){
return newInstance(id, j_id, name, false);
}
public static EntityInfo newInstance(String id, String j_id, String name, Boolean openaccess){
EntityInfo pi = new EntityInfo();
pi.id = id;
pi.journal_id = j_id;
pi.name = name;
pi.openaccess = openaccess;
pi.hb_id = "";
return pi;
}
}