[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"] = [];
|
||||
if(project.description) {
|
||||
let parsing = new ParsingFunctions();
|
||||
let abstracts = parsing.parseDescription(project.description);
|
||||
doc["description"] = [abstracts && abstracts[0] ?(abstracts[0].substring(0,4997)+(abstracts[0].substring(0,4997).length == 4997?'...':'')):"" ];
|
||||
let abstracts = parsing.parseDescription(project.description, true);
|
||||
doc["description"] = [abstracts ?(abstracts.substring(0,4997)+(abstracts.substring(0,4997).length == 4997?'...':'')):"" ];
|
||||
} else {
|
||||
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"] = [];
|
||||
if(datasource.description) {
|
||||
let parsing = new ParsingFunctions();
|
||||
let abstracts = parsing.parseDescription(datasource.description);
|
||||
doc["description"] = [abstracts && abstracts[0] ?(abstracts[0].substring(0,4997)+(abstracts[0].substring(0,4997).length == 4997?'...':'')):"" ];
|
||||
let abstracts = parsing.parseDescription(datasource.description, true);
|
||||
doc["description"] = [abstracts ?(abstracts.substring(0,4997)+(abstracts.substring(0,4997).length == 4997?'...':'')):"" ];
|
||||
} else {
|
||||
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);
|
||||
if (!item) return [ "" + this.getTitle(result)];
|
||||
let parsing = new ParsingFunctions();
|
||||
let abstracts = parsing.parseDescription(item);
|
||||
return [abstracts && abstracts[0] ?(abstracts[0].substring(0,4997)+(abstracts[0].substring(0,4997).length == 4997?'...':'')):"" ];
|
||||
let abstracts = parsing.parseDescription(item, true);
|
||||
return [abstracts ?(abstracts.substring(0,4997)+(abstracts.substring(0,4997).length == 4997?'...':'')):"" ];
|
||||
}
|
||||
|
||||
private getDateCreated(result: any): String[] {
|
||||
|
|
Loading…
Reference in New Issue