[develop | DONE | FIXED]: [BUG FIΧ] open-aire-jsonld-converter.service.ts: Fixed how description is set in methods "convertProject()", "convertDatasource()", "getDescription()" (called for research products).
This commit is contained in:
parent
aba199e10d
commit
92f43c280e
|
@ -140,8 +140,8 @@ export class OpenAireJsonldConverterService {
|
||||||
doc["description"] = [];
|
doc["description"] = [];
|
||||||
if(project.description) {
|
if(project.description) {
|
||||||
let parsing = new ParsingFunctions();
|
let parsing = new ParsingFunctions();
|
||||||
let abstracts = parsing.parseDescription(project.description);
|
let abstracts = parsing.parseDescription(project.description, true);
|
||||||
doc["description"] = [abstracts && abstracts[0] ?(abstracts[0].substring(0,4997)+(abstracts[0].substring(0,4997).length == 4997?'...':'')):"" ];
|
doc["description"] = [abstracts ?(abstracts.substring(0,4997)+(abstracts.substring(0,4997).length == 4997?'...':'')):"" ];
|
||||||
} else {
|
} else {
|
||||||
doc["description"].push(("project" + (project.title ? "," + project.title : "") + (project.funding && project.funding.funderName ? ", funder: " + project.funding.funderName : "") + (project.acronym ? "," + project.acronym : "")));
|
doc["description"].push(("project" + (project.title ? "," + project.title : "") + (project.funding && project.funding.funderName ? ", funder: " + project.funding.funderName : "") + (project.acronym ? "," + project.acronym : "")));
|
||||||
}
|
}
|
||||||
|
@ -178,8 +178,8 @@ convertDatasource(datasource: any, URL, otherUrl): Organization {
|
||||||
doc["description"] = [];
|
doc["description"] = [];
|
||||||
if(datasource.description) {
|
if(datasource.description) {
|
||||||
let parsing = new ParsingFunctions();
|
let parsing = new ParsingFunctions();
|
||||||
let abstracts = parsing.parseDescription(datasource.description);
|
let abstracts = parsing.parseDescription(datasource.description, true);
|
||||||
doc["description"] = [abstracts && abstracts[0] ?(abstracts[0].substring(0,4997)+(abstracts[0].substring(0,4997).length == 4997?'...':'')):"" ];
|
doc["description"] = [abstracts ?(abstracts.substring(0,4997)+(abstracts.substring(0,4997).length == 4997?'...':'')):"" ];
|
||||||
} else {
|
} else {
|
||||||
doc["description"].push(datasource.title.name?datasource.title.name:datasource.officialName);
|
doc["description"].push(datasource.title.name?datasource.title.name:datasource.officialName);
|
||||||
}
|
}
|
||||||
|
@ -242,8 +242,8 @@ convertDatasource(datasource: any, URL, otherUrl): Organization {
|
||||||
const item = _.get(result, "result.metadata.oaf:entity.oaf:result.description", null);
|
const item = _.get(result, "result.metadata.oaf:entity.oaf:result.description", null);
|
||||||
if (!item) return [ "" + this.getTitle(result)];
|
if (!item) return [ "" + this.getTitle(result)];
|
||||||
let parsing = new ParsingFunctions();
|
let parsing = new ParsingFunctions();
|
||||||
let abstracts = parsing.parseDescription(item);
|
let abstracts = parsing.parseDescription(item, true);
|
||||||
return [abstracts && abstracts[0] ?(abstracts[0].substring(0,4997)+(abstracts[0].substring(0,4997).length == 4997?'...':'')):"" ];
|
return [abstracts ?(abstracts.substring(0,4997)+(abstracts.substring(0,4997).length == 4997?'...':'')):"" ];
|
||||||
}
|
}
|
||||||
|
|
||||||
private getDateCreated(result: any): String[] {
|
private getDateCreated(result: any): String[] {
|
||||||
|
|
Loading…
Reference in New Issue