This commit is contained in:
Miriam Baglioni 2020-06-15 11:06:56 +02:00
parent 20b9e67728
commit 56e70573c2
20 changed files with 223 additions and 233 deletions

View File

@ -1,24 +1,25 @@
package eu.dnetlib.dhp.schema.dump.oaf; package eu.dnetlib.dhp.schema.dump.oaf;
import java.io.Serializable; import java.io.Serializable;
public class APC implements Serializable { public class APC implements Serializable {
private String currency; private String currency;
private String amount; private String amount;
public String getCurrency() { public String getCurrency() {
return currency; return currency;
} }
public void setCurrency(String currency) { public void setCurrency(String currency) {
this.currency = currency; this.currency = currency;
} }
public String getAmount() { public String getAmount() {
return amount; return amount;
} }
public void setAmount(String amount) { public void setAmount(String amount) {
this.amount = amount; this.amount = amount;
} }
} }

View File

@ -1,18 +1,23 @@
package eu.dnetlib.dhp.schema.dump.oaf; package eu.dnetlib.dhp.schema.dump.oaf;
import com.fasterxml.jackson.annotation.JsonProperty; public class AccessRight extends Qualifier {
public class AccessRight extends Qualifier{ private String scheme;
private String schema; public String getScheme() {
return scheme;
public String getSchema() { }
return schema;
}
public void setSchema(String schema) {
this.schema = schema;
}
public void setScheme(String scheme) {
this.scheme = scheme;
}
public static AccessRight newInstance(String code, String label, String scheme) {
AccessRight ar = new AccessRight();
ar.setCode(code);
ar.setLabel(label);
ar.setScheme(scheme);
return ar;
}
} }

View File

@ -1,5 +1,6 @@
package eu.dnetlib.dhp.schema.dump.oaf; package eu.dnetlib.dhp.schema.dump.oaf;
import java.io.Serializable; import java.io.Serializable;
import java.util.List; import java.util.List;
import java.util.Objects; import java.util.Objects;
@ -66,5 +67,4 @@ public class Author implements Serializable {
this.affiliation = affiliation; this.affiliation = affiliation;
} }
} }

View File

@ -1,3 +1,4 @@
package eu.dnetlib.dhp.schema.dump.oaf; package eu.dnetlib.dhp.schema.dump.oaf;
import java.io.Serializable; import java.io.Serializable;
@ -5,116 +6,114 @@ import java.util.Objects;
public class Container implements Serializable { public class Container implements Serializable {
private String name; private String name;
private String issnPrinted; private String issnPrinted;
private String issnOnline; private String issnOnline;
private String issnLinking; private String issnLinking;
private String ep; private String ep;
private String iss; private String iss;
private String sp; private String sp;
private String vol; private String vol;
private String edition; private String edition;
private String conferenceplace; private String conferenceplace;
private String conferencedate; private String conferencedate;
public String getName() {
return name;
}
public String getName() { public void setName(String name) {
return name; this.name = name;
} }
public void setName(String name) { public String getIssnPrinted() {
this.name = name; return issnPrinted;
} }
public String getIssnPrinted() { public void setIssnPrinted(String issnPrinted) {
return issnPrinted; this.issnPrinted = issnPrinted;
} }
public void setIssnPrinted(String issnPrinted) { public String getIssnOnline() {
this.issnPrinted = issnPrinted; return issnOnline;
} }
public String getIssnOnline() { public void setIssnOnline(String issnOnline) {
return issnOnline; this.issnOnline = issnOnline;
} }
public void setIssnOnline(String issnOnline) { public String getIssnLinking() {
this.issnOnline = issnOnline; return issnLinking;
} }
public String getIssnLinking() { public void setIssnLinking(String issnLinking) {
return issnLinking; this.issnLinking = issnLinking;
} }
public void setIssnLinking(String issnLinking) { public String getEp() {
this.issnLinking = issnLinking; return ep;
} }
public String getEp() { public void setEp(String ep) {
return ep; this.ep = ep;
} }
public void setEp(String ep) { public String getIss() {
this.ep = ep; return iss;
} }
public String getIss() { public void setIss(String iss) {
return iss; this.iss = iss;
} }
public void setIss(String iss) { public String getSp() {
this.iss = iss; return sp;
} }
public String getSp() { public void setSp(String sp) {
return sp; this.sp = sp;
} }
public void setSp(String sp) { public String getVol() {
this.sp = sp; return vol;
} }
public String getVol() { public void setVol(String vol) {
return vol; this.vol = vol;
} }
public void setVol(String vol) { public String getEdition() {
this.vol = vol; return edition;
} }
public String getEdition() { public void setEdition(String edition) {
return edition; this.edition = edition;
} }
public void setEdition(String edition) { public String getConferenceplace() {
this.edition = edition; return conferenceplace;
} }
public String getConferenceplace() { public void setConferenceplace(String conferenceplace) {
return conferenceplace; this.conferenceplace = conferenceplace;
} }
public void setConferenceplace(String conferenceplace) { public String getConferencedate() {
this.conferenceplace = conferenceplace; return conferencedate;
} }
public String getConferencedate() {
return conferencedate;
}
public void setConferencedate(String conferencedate) {
this.conferencedate = conferencedate;
}
public void setConferencedate(String conferencedate) {
this.conferencedate = conferencedate;
}
} }

View File

@ -1,7 +1,6 @@
package eu.dnetlib.dhp.schema.dump.oaf; package eu.dnetlib.dhp.schema.dump.oaf;
import java.util.List; import java.util.List;
public class Context extends Qualifier { public class Context extends Qualifier {

View File

@ -1,35 +1,36 @@
package eu.dnetlib.dhp.schema.dump.oaf;
import eu.dnetlib.dhp.schema.oaf.StructuredProperty; package eu.dnetlib.dhp.schema.dump.oaf;
import java.io.Serializable; import java.io.Serializable;
import eu.dnetlib.dhp.schema.oaf.StructuredProperty;
public class ControlledField implements Serializable { public class ControlledField implements Serializable {
private String scheme; private String scheme;
private String value; private String value;
public String getScheme() { public String getScheme() {
return scheme; return scheme;
} }
public void setScheme(String scheme) { public void setScheme(String scheme) {
this.scheme = scheme; this.scheme = scheme;
} }
public String getValue() { public String getValue() {
return value; return value;
} }
public void setValue(String value) { public void setValue(String value) {
this.value = value; this.value = value;
} }
public static ControlledField newInstance(StructuredProperty pid){ public static ControlledField newInstance(String scheme, String value) {
ControlledField cf = new ControlledField(); ControlledField cf = new ControlledField();
cf.scheme = pid.getQualifier().getClassid(); cf.setScheme(scheme);
cf.value = pid.getValue(); cf.setValue(value);
return cf; return cf;
} }
} }

View File

@ -1,7 +1,6 @@
package eu.dnetlib.dhp.schema.dump.oaf; package eu.dnetlib.dhp.schema.dump.oaf;
public class Country extends Qualifier { public class Country extends Qualifier {
private String provenance; private String provenance;
@ -14,5 +13,12 @@ public class Country extends Qualifier {
this.provenance = provenance; this.provenance = provenance;
} }
public static Country newInstance(String code, String label, String provenance){
Country c = new Country();
c.setProvenance(provenance);
c.setCode(code);
c.setLabel(label);
return c;
}
} }

View File

@ -1,14 +1,12 @@
package eu.dnetlib.dhp.schema.dump.oaf; package eu.dnetlib.dhp.schema.dump.oaf;
import eu.dnetlib.dhp.schema.common.ModelConstants;
import java.io.Serializable; import java.io.Serializable;
import java.util.List; import java.util.List;
public class Dataset extends Result implements Serializable { import eu.dnetlib.dhp.schema.common.ModelConstants;
public class Dataset extends Result implements Serializable {
private String size; private String size;
@ -20,7 +18,6 @@ public class Dataset extends Result implements Serializable {
setType(ModelConstants.DATASET_DEFAULT_RESULTTYPE.getClassname()); setType(ModelConstants.DATASET_DEFAULT_RESULTTYPE.getClassname());
} }
public String getSize() { public String getSize() {
return size; return size;
} }
@ -45,5 +42,4 @@ public class Dataset extends Result implements Serializable {
this.geolocation = geolocation; this.geolocation = geolocation;
} }
} }

View File

@ -1,10 +1,11 @@
package eu.dnetlib.dhp.schema.dump.oaf; package eu.dnetlib.dhp.schema.dump.oaf;
import eu.dnetlib.dhp.schema.oaf.ExtraInfo;
import java.io.Serializable; import java.io.Serializable;
import java.util.Objects; import java.util.Objects;
import eu.dnetlib.dhp.schema.oaf.ExtraInfo;
//ExtraInfo //ExtraInfo
public class ExternalReference implements Serializable { public class ExternalReference implements Serializable {
private String name; private String name;
@ -58,7 +59,7 @@ public class ExternalReference implements Serializable {
this.value = value; this.value = value;
} }
public static ExternalReference newInstance(ExtraInfo ei){ public static ExternalReference newInstance(ExtraInfo ei) {
ExternalReference er = new ExternalReference(); ExternalReference er = new ExternalReference();
er.name = ei.getName(); er.name = ei.getName();

View File

@ -1,10 +1,11 @@
package eu.dnetlib.dhp.schema.dump.oaf; package eu.dnetlib.dhp.schema.dump.oaf;
import com.fasterxml.jackson.annotation.JsonIgnore; import java.io.Serializable;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import java.io.Serializable; import com.fasterxml.jackson.annotation.JsonIgnore;
public class GeoLocation implements Serializable { public class GeoLocation implements Serializable {
@ -43,5 +44,4 @@ public class GeoLocation implements Serializable {
return StringUtils.isBlank(point) && StringUtils.isBlank(box) && StringUtils.isBlank(place); return StringUtils.isBlank(point) && StringUtils.isBlank(box) && StringUtils.isBlank(place);
} }
} }

View File

@ -18,7 +18,7 @@ public class Instance implements Serializable {
private KeyValue collectedfrom; private KeyValue collectedfrom;
private String publicationdata;//dateofacceptance; private String publicationdate;// dateofacceptance;
// ( article | book ) processing charges. Defined here to cope with possible wrongly typed // ( article | book ) processing charges. Defined here to cope with possible wrongly typed
// results // results
@ -78,12 +78,12 @@ public class Instance implements Serializable {
this.collectedfrom = collectedfrom; this.collectedfrom = collectedfrom;
} }
public String getPublicationdata() { public String getPublicationdate() {
return publicationdata; return publicationdate;
} }
public void setPublicationdata(String publicationdata) { public void setPublicationdate(String publicationdate) {
this.publicationdata = publicationdata; this.publicationdate = publicationdate;
} }
public String getRefereed() { public String getRefereed() {
@ -94,5 +94,4 @@ public class Instance implements Serializable {
this.refereed = refereed; this.refereed = refereed;
} }
} }

View File

@ -1,11 +1,11 @@
package eu.dnetlib.dhp.schema.dump.oaf; package eu.dnetlib.dhp.schema.dump.oaf;
import com.fasterxml.jackson.annotation.JsonIgnore; import java.io.Serializable;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import java.io.Serializable; import com.fasterxml.jackson.annotation.JsonIgnore;
public class KeyValue implements Serializable { public class KeyValue implements Serializable {
@ -13,7 +13,6 @@ public class KeyValue implements Serializable {
private String value; private String value;
public String getKey() { public String getKey() {
return key; return key;
} }
@ -30,8 +29,7 @@ public class KeyValue implements Serializable {
this.value = value; this.value = value;
} }
public static KeyValue newInstance(String key, String value) {
public static KeyValue newInstance(String key, String value){
KeyValue inst = new KeyValue(); KeyValue inst = new KeyValue();
inst.key = key; inst.key = key;
inst.value = value; inst.value = value;
@ -43,5 +41,4 @@ public class KeyValue implements Serializable {
return StringUtils.isBlank(key) && StringUtils.isBlank(value); return StringUtils.isBlank(key) && StringUtils.isBlank(value);
} }
} }

View File

@ -1,7 +1,6 @@
package eu.dnetlib.dhp.schema.dump.oaf; package eu.dnetlib.dhp.schema.dump.oaf;
import java.io.Serializable; import java.io.Serializable;
import java.util.List; import java.util.List;
import java.util.Objects; import java.util.Objects;
@ -24,7 +23,6 @@ public abstract class Oaf implements Serializable {
this.collectedfrom = collectedfrom; this.collectedfrom = collectedfrom;
} }
public Long getLastupdatetimestamp() { public Long getLastupdatetimestamp() {
return lastupdatetimestamp; return lastupdatetimestamp;
} }

View File

@ -2,11 +2,8 @@
package eu.dnetlib.dhp.schema.dump.oaf; package eu.dnetlib.dhp.schema.dump.oaf;
import java.io.Serializable; import java.io.Serializable;
import java.util.List; import java.util.List;
public abstract class OafEntity extends Oaf implements Serializable { public abstract class OafEntity extends Oaf implements Serializable {
private String id; private String id;
@ -59,5 +56,4 @@ public abstract class OafEntity extends Oaf implements Serializable {
this.projects = projects; this.projects = projects;
} }
} }

View File

@ -1,12 +1,11 @@
package eu.dnetlib.dhp.schema.dump.oaf; package eu.dnetlib.dhp.schema.dump.oaf;
import eu.dnetlib.dhp.schema.common.ModelConstants;
import java.io.Serializable; import java.io.Serializable;
import java.util.List; import java.util.List;
import eu.dnetlib.dhp.schema.common.ModelConstants;
public class OtherResearchProduct extends Result implements Serializable { public class OtherResearchProduct extends Result implements Serializable {
private List<String> contactperson; private List<String> contactperson;

View File

@ -1,67 +1,68 @@
package eu.dnetlib.dhp.schema.dump.oaf;
import eu.dnetlib.dhp.schema.oaf.Project; package eu.dnetlib.dhp.schema.dump.oaf;
import java.util.List; import java.util.List;
import eu.dnetlib.dhp.schema.oaf.Project;
public class Projects { public class Projects {
private String id ;//OpenAIRE id private String id;// OpenAIRE id
private String code; private String code;
private String acronym; private String acronym;
private String title; private String title;
private List<String> funding_tree; private Funder funder;
public String getId() { public String getId() {
return id; return id;
} }
public void setId(String id) { public void setId(String id) {
this.id = id; this.id = id;
} }
public String getCode() { public String getCode() {
return code; return code;
} }
public void setCode(String code) { public void setCode(String code) {
this.code = code; this.code = code;
} }
public String getAcronym() { public String getAcronym() {
return acronym; return acronym;
} }
public void setAcronym(String acronym) { public void setAcronym(String acronym) {
this.acronym = acronym; this.acronym = acronym;
} }
public String getTitle() { public String getTitle() {
return title; return title;
} }
public void setTitle(String title) { public void setTitle(String title) {
this.title = title; this.title = title;
} }
public List<String> getFunding_tree() { public Funder getFunder() {
return funding_tree; return funder;
} }
public void setFunding_tree(List<String> funding_tree) { public void setFunder(Funder funders) {
this.funding_tree = funding_tree; this.funder = funders;
} }
public static Projects newInstance(String id, String code, String acronym, String title, List<String> funding_tree){ public static Projects newInstance(String id, String code, String acronym, String title, Funder funder) {
Projects projects = new Projects(); Projects projects = new Projects();
projects.setAcronym(acronym); projects.setAcronym(acronym);
projects.setCode(code); projects.setCode(code);
projects.setFunding_tree(funding_tree); projects.setFunder(funder);
projects.setId(id); projects.setId(id);
projects.setTitle(title); projects.setTitle(title);
return projects; return projects;
} }
} }

View File

@ -1,17 +1,14 @@
package eu.dnetlib.dhp.schema.dump.oaf; package eu.dnetlib.dhp.schema.dump.oaf;
import eu.dnetlib.dhp.schema.common.ModelConstants;
import java.io.Serializable; import java.io.Serializable;
public class Publication extends Result implements Serializable { import eu.dnetlib.dhp.schema.common.ModelConstants;
public class Publication extends Result implements Serializable {
public Publication() { public Publication() {
setType(ModelConstants.PUBLICATION_DEFAULT_RESULTTYPE.getClassname()); setType(ModelConstants.PUBLICATION_DEFAULT_RESULTTYPE.getClassname());
} }
} }

View File

@ -1,15 +1,16 @@
package eu.dnetlib.dhp.schema.dump.oaf; package eu.dnetlib.dhp.schema.dump.oaf;
import com.fasterxml.jackson.annotation.JsonIgnore; import java.io.Serializable;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import java.io.Serializable; import com.fasterxml.jackson.annotation.JsonIgnore;
public class Qualifier implements Serializable { public class Qualifier implements Serializable {
private String code; //the classid in the Qualifier private String code; // the classid in the Qualifier
private String label; //the classname in the Qualifier private String label; // the classname in the Qualifier
public String getCode() { public String getCode() {
return code; return code;
@ -27,7 +28,7 @@ public class Qualifier implements Serializable {
this.label = label; this.label = label;
} }
public static Qualifier newInstance(String code, String value){ public static Qualifier newInstance(String code, String value) {
Qualifier qualifier = new Qualifier(); Qualifier qualifier = new Qualifier();
qualifier.setCode(code); qualifier.setCode(code);
qualifier.setLabel(value); qualifier.setLabel(value);

View File

@ -1,17 +1,15 @@
package eu.dnetlib.dhp.schema.dump.oaf; package eu.dnetlib.dhp.schema.dump.oaf;
import java.io.Serializable; import java.io.Serializable;
import java.util.List; import java.util.List;
public class Result extends OafEntity implements Serializable { public class Result extends OafEntity implements Serializable {
private List<Author> author; private List<Author> author;
// resulttype allows subclassing results into publications | datasets | software // resulttype allows subclassing results into publications | datasets | software
private String type; //resulttype private String type; // resulttype
// common fields // common fields
private Qualifier language; private Qualifier language;
@ -26,7 +24,7 @@ public class Result extends OafEntity implements Serializable {
private List<String> description; private List<String> description;
private String publicationdata; // dateofacceptance; private String publicationdate; // dateofacceptance;
private String publisher; private String publisher;
@ -48,7 +46,7 @@ public class Result extends OafEntity implements Serializable {
private List<Instance> instance; private List<Instance> instance;
private Container container;//Journal private Container container;// Journal
public List<Author> getAuthor() { public List<Author> getAuthor() {
return author; return author;
@ -74,7 +72,6 @@ public class Result extends OafEntity implements Serializable {
this.author = author; this.author = author;
} }
public Qualifier getLanguage() { public Qualifier getLanguage() {
return language; return language;
} }
@ -123,12 +120,12 @@ public class Result extends OafEntity implements Serializable {
this.description = description; this.description = description;
} }
public String getPublicationdata() { public String getPublicationdate() {
return publicationdata; return publicationdate;
} }
public void setPublicationdata(String publicationdata) { public void setPublicationdate(String publicationdate) {
this.publicationdata = publicationdata; this.publicationdate = publicationdate;
} }
public String getPublisher() { public String getPublisher() {
@ -211,5 +208,4 @@ public class Result extends OafEntity implements Serializable {
this.instance = instance; this.instance = instance;
} }
} }

View File

@ -1,12 +1,11 @@
package eu.dnetlib.dhp.schema.dump.oaf; package eu.dnetlib.dhp.schema.dump.oaf;
import eu.dnetlib.dhp.schema.common.ModelConstants;
import java.io.Serializable; import java.io.Serializable;
import java.util.List; import java.util.List;
import eu.dnetlib.dhp.schema.common.ModelConstants;
public class Software extends Result implements Serializable { public class Software extends Result implements Serializable {
private List<String> documentationUrl; private List<String> documentationUrl;
@ -43,5 +42,4 @@ public class Software extends Result implements Serializable {
this.programmingLanguage = programmingLanguage; this.programmingLanguage = programmingLanguage;
} }
} }