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 {
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 notes; // description.value (the first description
private String url; // the url of the resource in the openaire dashboard
@ -32,12 +32,12 @@ public class CatalogueEntry implements Serializable {
this.name = name;
}
public String getLicence_id() {
return licence_id;
public String getLicense_id() {
return license_id;
}
public void setLicence_id(String licence_id) {
this.licence_id = licence_id;
public void setLicense_id(String license_id) {
this.license_id = license_id;
}
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
.ofNullable(input.getAuthor())
@ -115,7 +115,8 @@ public class Mapper implements Serializable {
.ofNullable(input.getFormat())
.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
.ofNullable(input.getInstance())