Production release May 2024 [EXPLORE] #40
|
@ -58,22 +58,20 @@ export class SearchDataciteService {
|
||||||
entity.result.journal = null;
|
entity.result.journal = null;
|
||||||
entity.result.DOI = item.attributes.doi;
|
entity.result.DOI = item.attributes.doi;
|
||||||
entity.id = item.attributes.doi;
|
entity.id = item.attributes.doi;
|
||||||
entity.title = item.attributes.title;
|
entity.title = Array.isArray(item.attributes.titles) && item.attributes.titles[0].title?item.attributes.titles[0].title:null;
|
||||||
entity.result.url = properties.doiURL + item.attributes.doi;
|
entity.result.url = properties.doiURL + item.attributes.doi;
|
||||||
entity.result.source = 'datacite';
|
entity.result.source = 'datacite';
|
||||||
entity.type = 'dataset';
|
entity.type = 'dataset';
|
||||||
entity.result.date = item.attributes.published;
|
entity.result.date = item.attributes.publicationYear;
|
||||||
entity.result.accessRights = "OPEN";
|
entity.result.accessRights = "OPEN";
|
||||||
entity.result.publisher = item.attributes['container-title'];
|
entity.result.publisher = item.attributes['publisher'];
|
||||||
entity.result.journal = null;
|
entity.result.journal = null;
|
||||||
entity.result.record = item;
|
entity.result.record = item;
|
||||||
if (item.attributes.author) {
|
if (item.attributes.creators) {
|
||||||
entity.result.authors = [];
|
entity.result.authors = [];
|
||||||
for (let j = 0; j < item.attributes.author.length; j++) {
|
for (let j = 0; j < item.attributes.creators.length; j++) {
|
||||||
const author = item.attributes.author[j];
|
const author = item.attributes.creators[j].name;
|
||||||
if(author.family || author.literal) {
|
entity.result.authors.push(author);
|
||||||
entity.result.authors.push((author.family) ? author.family + (author.given ? ', ' + author.given : '') : author.literal);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
results.push(entity);
|
results.push(entity);
|
||||||
|
|
Loading…
Reference in New Issue