fixed a typo in the name of a filed

This commit is contained in:
Miriam Baglioni 2020-06-23 11:19:23 +02:00
parent f12b1ede24
commit 60a3206de5
2 changed files with 8 additions and 7 deletions

View File

@ -9,7 +9,7 @@ import eu.dnetlib.dhp.schema.dump.oaf.KeyValue;
public class CatalogueEntry implements Serializable { public class CatalogueEntry implements Serializable {
private String name; // openaire id withouut :: substitute with $$ private String name; // openaire id withouut :: substitute with $$
private String licence_id; // default "notspecified", private String license_id; // default "notspecified",
private String title; // title.maintitle private String title; // title.maintitle
private String notes; // description.value (the first description private String notes; // description.value (the first description
private String url; // the url of the resource in the openaire dashboard private String url; // the url of the resource in the openaire dashboard
@ -32,12 +32,12 @@ public class CatalogueEntry implements Serializable {
this.name = name; this.name = name;
} }
public String getLicence_id() { public String getLicense_id() {
return licence_id; return license_id;
} }
public void setLicence_id(String licence_id) { public void setLicense_id(String license_id) {
this.licence_id = licence_id; this.license_id = license_id;
} }
public String getTitle() { public String getTitle() {

View File

@ -67,7 +67,7 @@ public class Mapper implements Serializable {
} }
out.setLicence_id(Constants.DEFAULT_LICENCE_ID); out.setLicense_id(Constants.DEFAULT_LICENCE_ID);
Optional Optional
.ofNullable(input.getAuthor()) .ofNullable(input.getAuthor())
@ -115,7 +115,8 @@ public class Mapper implements Serializable {
.ofNullable(input.getFormat()) .ofNullable(input.getFormat())
.ifPresent(value -> value.forEach(f -> formatList.add(f.getValue()))); .ifPresent(value -> value.forEach(f -> formatList.add(f.getValue())));
out.setName(input.getId().replace(":", "$")); String id = input.getId();
out.setName(id.substring(id.indexOf('|') + 1).replace(":", "-"));
Optional Optional
.ofNullable(input.getInstance()) .ofNullable(input.getInstance())