Links for authors removed | Parsing for authors changed: from 'rels->rel->to = hasAuthor' to 'creator' and from 'relperson' to 'resultauthor' | structure for authors changed from {'name':string, 'id':string}[] to string[] where name of each author is stored
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-portal/trunk@49605 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
8b50c430bc
commit
da7399e5cd
|
@ -68,7 +68,7 @@
|
|||
<a *ngIf="!isSelected(result.id)" (click)="add(result, result.id, 'openaire', 'publication', result['title'].url, result['title'].name, result.year,result['title'].accessMode)" class="uk-icon-button"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="plus" ratio="1"><rect x="9" y="1" width="1" height="17"></rect><rect x="1" y="9" width="17" height="1"></rect></svg></a>
|
||||
</div>
|
||||
<span *ngIf="result.publisher" class="uk-article-meta">Publisher: {{result.publisher}}</span><span class="uk-article-meta" *ngIf="(result.year)">({{result.year}})</span>
|
||||
<div *ngIf="result.authors && result.authors.length >0 " class="uk-article-meta">Authors: <span *ngFor="let author of result.authors.slice(0,10) let i = index">{{author.name}}{{(i < (result.authors.slice(0,10).length-1))?"; ":""}}{{(i == result.authors.slice(0,10).length-1 && result.authors.length > 10)?"...":""}}</span></div>
|
||||
<div *ngIf="result.authors && result.authors.length >0 " class="uk-article-meta">Authors: <span *ngFor="let author of result.authors.slice(0,10) let i = index">{{author}}{{(i < (result.authors.slice(0,10).length-1))?"; ":""}}{{(i == result.authors.slice(0,10).length-1 && result.authors.length > 10)?"...":""}}</span></div>
|
||||
|
||||
|
||||
</li>
|
||||
|
@ -177,7 +177,7 @@
|
|||
(click)="add(result, result.id, 'openaire','dataset', result['title'].url, result['title'].name, result.year, result['title'].accessMode)" class="uk-icon-button"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="plus" ratio="1"><rect x="9" y="1" width="1" height="17"></rect><rect x="1" y="9" width="17" height="1"></rect></svg></a>
|
||||
</div>
|
||||
<span *ngIf="result.publisher" class="uk-article-meta">Publisher: {{result.publisher}}</span><span *ngIf="(result.year)" class="uk-article-meta">({{result.year}})</span>
|
||||
<div *ngIf="result.authors && result.authors.length >0 " class="uk-article-meta">Authors: <span *ngFor="let author of result.authors.slice(0,10) let i = index">{{author.name}}{{(i < (result.authors.slice(0,10).length-1))?"; ":""}}{{(i == result.authors.slice(0,10).length-1 && result.authors.length > 10)?"...":""}}</span></div>
|
||||
<div *ngIf="result.authors && result.authors.length >0 " class="uk-article-meta">Authors: <span *ngFor="let author of result.authors.slice(0,10) let i = index">{{author}}{{(i < (result.authors.slice(0,10).length-1))?"; ":""}}{{(i == result.authors.slice(0,10).length-1 && result.authors.length > 10)?"...":""}}</span></div>
|
||||
|
||||
|
||||
</li>
|
||||
|
|
|
@ -70,7 +70,7 @@
|
|||
<a *ngIf="displayedResult.url" target="_blank" href="{{displayedResult.url}}" > <span class="custom-external"></span> {{displayedResult.title}}</a>
|
||||
<span *ngIf="!displayedResult.url" >{{displayedResult.title}}</span>
|
||||
</div>
|
||||
<div *ngIf="displayedResult.result.authors && displayedResult.result.authors.length >0 " class="uk-article-meta">Authors: <span *ngFor="let author of displayedResult.result.authors.slice(0,10) let i = index">{{author.name}}{{(i < (displayedResult.result.authors.slice(0,10).length-1))?"; ":""}}{{(i == displayedResult.result.authors.slice(0,10).length-1 && displayedResult.result.authors.length > 10)?"...":""}}</span></div>
|
||||
<div *ngIf="displayedResult.result.authors && displayedResult.result.authors.length >0 " class="uk-article-meta">Authors: <span *ngFor="let author of displayedResult.result.authors.slice(0,10) let i = index">{{author}}{{(i < (displayedResult.result.authors.slice(0,10).length-1))?"; ":""}}{{(i == displayedResult.result.authors.slice(0,10).length-1 && displayedResult.result.authors.length > 10)?"...":""}}</span></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ import {Dates} from '../../../utils/string-utils.class';
|
|||
<div *ngIf="pub.result.editor && pub.result.editor.length > 0" >Editors: <span *ngFor="let author of pub.result.editor.slice(0,10) let i = index">{{author.family}} {{author.given}}{{(i < (pub.result.editor.slice(0,10).length-1))?"; ":""}}{{(i == pub.result.editor.slice(0,10).length-1 && pub.result.editor.length > 10)?"...":""}}</span></div>
|
||||
|
||||
<!-- Openaire -->
|
||||
<div *ngIf="pub.result.authors && pub.result.authors.length >0 " >Authors: <span *ngFor="let author of pub.result.authors.slice(0,10) let i = index">{{author.name}}{{(i < (pub.result.authors.slice(0,10).length-1))?"; ":""}}{{(i == pub.result.authors.slice(0,10).length-1 && pub.result.authors.length > 10)?"...":""}}</span></div>
|
||||
<div *ngIf="pub.result.authors && pub.result.authors.length >0 " >Authors: <span *ngFor="let author of pub.result.authors.slice(0,10) let i = index">{{author}}{{(i < (pub.result.authors.slice(0,10).length-1))?"; ":""}}{{(i == pub.result.authors.slice(0,10).length-1 && pub.result.authors.length > 10)?"...":""}}</span></div>
|
||||
|
||||
<!-- Orcid -->
|
||||
|
||||
|
|
|
@ -42,7 +42,8 @@ export class DatasetService {
|
|||
res[1]['collectedfrom'],
|
||||
res[1]['context'],
|
||||
//res[1]['resulttype'],
|
||||
res[0]
|
||||
res[0],
|
||||
res[1]['creator']
|
||||
]).do(res => {
|
||||
this._cache.set(key, res);
|
||||
})
|
||||
|
@ -90,14 +91,7 @@ export class DatasetService {
|
|||
for(let i=0; i<length; i++) {
|
||||
relation = data[2].length!=undefined ? data[2][i] : data[2];
|
||||
if(relation.hasOwnProperty("to")) {
|
||||
if(relation['to'].class == "hasAuthor") {
|
||||
if(this.datasetInfo.authors == undefined) {
|
||||
this.datasetInfo.authors = new Array<{"name": string, "id": string}>();
|
||||
}
|
||||
|
||||
this.datasetInfo.authors[relation.ranking-1] = {"name": "", "id": ""};
|
||||
this.datasetInfo.authors[relation.ranking-1]['name'] = relation.fullname;
|
||||
} else if(relation['to'].class == "isProducedBy") {
|
||||
if(relation['to'].class == "isProducedBy") {
|
||||
this.datasetInfo.fundedByProjects = this.parsingFunctions.parseFundingByProjects(this.datasetInfo.fundedByProjects, relation, this.datasetInfo.projectsProvenanceVocabulary);
|
||||
} else if(relation['to'].class == "isRelatedTo") {
|
||||
let provenanceAction: string;
|
||||
|
@ -114,12 +108,6 @@ export class DatasetService {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(this.datasetInfo.authors != undefined) {
|
||||
this.datasetInfo.authors = this.datasetInfo.authors.filter(function (item) {
|
||||
return (item != undefined);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if(data[3] != null) {
|
||||
|
@ -214,6 +202,24 @@ export class DatasetService {
|
|||
this.datasetInfo.underCurationMessage = false;
|
||||
}
|
||||
|
||||
if(data[10] != null) {
|
||||
if(this.datasetInfo.authors == undefined) {
|
||||
this.datasetInfo.authors = new Array<string>();
|
||||
}
|
||||
|
||||
let authors = data[13];
|
||||
let length = Array.isArray(authors) ? authors.length : 1;
|
||||
|
||||
for(let i=0; i<length; i++) {
|
||||
let author = Array.isArray(authors) ? authors[i] : authors;
|
||||
this.datasetInfo.authors[author.rank-1] = author.content;
|
||||
}
|
||||
|
||||
this.datasetInfo.authors = this.datasetInfo.authors.filter(function (item) {
|
||||
return (item != undefined);
|
||||
});
|
||||
}
|
||||
|
||||
return this.datasetInfo;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -67,12 +67,12 @@ export class CiteThisComponent {
|
|||
citationData.author = [];
|
||||
var max_length = (this.result.authors.length > 10)?10:this.result.authors.length;
|
||||
for (var i =0 ;i < max_length; i++){
|
||||
if(this.result.authors[i].name && this.result.authors[i].name.indexOf(", ") !== -1){
|
||||
citationData.author.push({given:this.result.authors[i].name.split(", ")[0], family:this.result.authors[i].name.split(", ")[1], 'parse-names':true});
|
||||
if(this.result.authors[i] && this.result.authors[i].indexOf(", ") !== -1){
|
||||
citationData.author.push({given:this.result.authors[i].split(", ")[0], family:this.result.authors[i].split(", ")[1], 'parse-names':true});
|
||||
}else{
|
||||
citationData.author.push({given:"", family:this.result.authors[i].name, 'parse-names':true});
|
||||
citationData.author.push({given:"", family:this.result.authors[i], 'parse-names':true});
|
||||
}
|
||||
citationData.authors.push(this.result.authors[i].name);
|
||||
citationData.authors.push(this.result.authors[i]);
|
||||
}
|
||||
}
|
||||
if(this.result.dateofacceptance != undefined){
|
||||
|
|
|
@ -8,20 +8,20 @@ import {RouterHelper} from '../../utils/routerHelper.class';
|
|||
<div *ngIf="showAll">
|
||||
<a class="uk-text-muted" (click)="showAll = !showAll;">View less authors</a>
|
||||
</div>
|
||||
<span *ngFor="let item of authors.slice(0,30) let i=index">
|
||||
<!--a href="{{item['url']}}"-->
|
||||
<a [queryParams]="routerHelper.createQueryParams(['author','au'],[quote(item['name']),'and'])" routerLinkActive="router-link-active" [routerLink]="'/search/advanced/'+searchPage">
|
||||
{{item['name']}}
|
||||
</a>
|
||||
<span *ngFor="let author of authors.slice(0,30) let i=index">
|
||||
<!--a [queryParams]="routerHelper.createQueryParams(['author','au'],[quote(author['name']),'and'])" routerLinkActive="router-link-active" [routerLink]="'/search/advanced/'+searchPage">
|
||||
{{author['name']}}
|
||||
</a-->
|
||||
{{author}}
|
||||
<span *ngIf=" i<29 && i<(authors.length-1)">;</span>
|
||||
</span>
|
||||
<span *ngIf="!showAll && authors.length > 30"> ... </span>
|
||||
<span *ngIf="showAll">
|
||||
<span *ngFor="let item of authors.slice(30) let i=index">
|
||||
<!--a href="{{item['url']}}"-->
|
||||
<a [queryParams]="routerHelper.createQueryParams(['author','au'],[quote(item['name']),'and'])" routerLinkActive="router-link-active" [routerLink]="'/search/advanced/'+searchPage">
|
||||
{{item['name']}}
|
||||
</a>
|
||||
<span *ngFor="let author of authors.slice(30) let i=index">
|
||||
<!--a [queryParams]="routerHelper.createQueryParams(['author','au'],[quote(author['name']),'and'])" routerLinkActive="router-link-active" [routerLink]="'/search/advanced/'+searchPage">
|
||||
{{author['name']}}
|
||||
</a-->
|
||||
{{author}}
|
||||
<span *ngIf=" i<(authors.length-1)">;</span>
|
||||
</span>
|
||||
</span>
|
||||
|
|
|
@ -43,7 +43,8 @@ export class PublicationService {
|
|||
res[1]['oaf:result']['collectedfrom'],
|
||||
(res[1]['extraInfo']!= undefined && res[1]['extraInfo']['citations']!= undefined)? res[1]['extraInfo']['citations']['citation']:null,
|
||||
res[1]['oaf:result']['context'],
|
||||
res[0]
|
||||
res[0],
|
||||
res[1]['oaf:result']['creator']
|
||||
])
|
||||
.do(res => {
|
||||
this._cache.set(key, res);
|
||||
|
@ -94,14 +95,14 @@ export class PublicationService {
|
|||
for(let i=0; i<length; i++) {
|
||||
relation = Array.isArray(data[2]) ? data[2][i] : data[2];
|
||||
if(relation.hasOwnProperty("to")) {
|
||||
if(relation['to'].class == "hasAuthor") {
|
||||
if(this.publicationInfo.authors == undefined) {
|
||||
this.publicationInfo.authors = new Array<{"name": string, "id": string}>();
|
||||
}
|
||||
|
||||
this.publicationInfo.authors[relation.ranking-1] = {"name": "", "id": ""};
|
||||
this.publicationInfo.authors[relation.ranking-1]['name'] = relation.fullname;
|
||||
} else if(relation['to'].class == "isProducedBy") {
|
||||
// if(relation['to'].class == "hasAuthor") {
|
||||
// if(this.publicationInfo.authors == undefined) {
|
||||
// this.publicationInfo.authors = new Array<{"name": string, "id": string}>();
|
||||
// }
|
||||
//
|
||||
// this.publicationInfo.authors[relation.ranking-1] = {"name": "", "id": ""};
|
||||
// this.publicationInfo.authors[relation.ranking-1]['name'] = relation.fullname;
|
||||
/*} else*/ if(relation['to'].class == "isProducedBy") {
|
||||
this.publicationInfo.fundedByProjects = this.parsingFunctions.parseFundingByProjects(this.publicationInfo.fundedByProjects, relation, this.publicationInfo.projectsProvenanceVocabulary);
|
||||
} else if(relation['to'].class == "isRelatedTo") {
|
||||
let provenanceAction: string;
|
||||
|
@ -119,12 +120,6 @@ export class PublicationService {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(this.publicationInfo.authors != undefined) {
|
||||
this.publicationInfo.authors = this.publicationInfo.authors.filter(function (item) {
|
||||
return (item != undefined);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if(data[3] != null) {
|
||||
|
@ -248,6 +243,23 @@ export class PublicationService {
|
|||
this.publicationInfo.underCurationMessage = false;
|
||||
}
|
||||
|
||||
if(data[13] != null) {
|
||||
if(this.publicationInfo.authors == undefined) {
|
||||
this.publicationInfo.authors = new Array<string>();
|
||||
}
|
||||
|
||||
let authors = data[13];
|
||||
let length = Array.isArray(authors) ? authors.length : 1;
|
||||
|
||||
for(let i=0; i<length; i++) {
|
||||
let author = Array.isArray(authors) ? authors[i] : authors;
|
||||
this.publicationInfo.authors[author.rank-1] = author.content;
|
||||
}
|
||||
this.publicationInfo.authors = this.publicationInfo.authors.filter(function (item) {
|
||||
return (item != undefined);
|
||||
});
|
||||
}
|
||||
|
||||
return this.publicationInfo;
|
||||
}
|
||||
|
||||
|
|
|
@ -42,7 +42,8 @@ export class SoftwareService {
|
|||
res[1]['collectedfrom'],
|
||||
res[1]['context'],
|
||||
//res[1]['resulttype'],
|
||||
res[0]
|
||||
res[0],
|
||||
res[1]['creator']
|
||||
]).do(res => {
|
||||
this._cache.set(key, res);
|
||||
})
|
||||
|
@ -90,14 +91,7 @@ export class SoftwareService {
|
|||
for(let i=0; i<length; i++) {
|
||||
relation = data[2].length!=undefined ? data[2][i] : data[2];
|
||||
if(relation.hasOwnProperty("to")) {
|
||||
if(relation['to'].class == "hasAuthor") {
|
||||
if(this.softwareInfo.authors == undefined) {
|
||||
this.softwareInfo.authors = new Array<{"name": string, "id": string}>();
|
||||
}
|
||||
|
||||
this.softwareInfo.authors[relation.ranking-1] = {"name": "", "id": ""};
|
||||
this.softwareInfo.authors[relation.ranking-1]['name'] = relation.fullname;
|
||||
} else if(relation['to'].class == "isProducedBy") {
|
||||
if(relation['to'].class == "isProducedBy") {
|
||||
this.softwareInfo.fundedByProjects = this.parsingFunctions.parseFundingByProjects(this.softwareInfo.fundedByProjects, relation, this.softwareInfo.projectsProvenanceVocabulary);
|
||||
} else if(relation['to'].class == "isRelatedTo") {
|
||||
let provenanceAction: string;
|
||||
|
@ -114,12 +108,6 @@ export class SoftwareService {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(this.softwareInfo.authors != undefined) {
|
||||
this.softwareInfo.authors = this.softwareInfo.authors.filter(function (item) {
|
||||
return (item != undefined);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if(data[3] != null) {
|
||||
|
@ -214,6 +202,24 @@ export class SoftwareService {
|
|||
this.softwareInfo.underCurationMessage = false;
|
||||
}
|
||||
|
||||
if(data[10] != null) {
|
||||
if(this.softwareInfo.authors == undefined) {
|
||||
this.softwareInfo.authors = new Array<string>();
|
||||
}
|
||||
|
||||
let authors = data[13];
|
||||
let length = Array.isArray(authors) ? authors.length : 1;
|
||||
|
||||
for(let i=0; i<length; i++) {
|
||||
let author = Array.isArray(authors) ? authors[i] : authors;
|
||||
this.softwareInfo.authors[author.rank-1] = author.content;
|
||||
}
|
||||
|
||||
this.softwareInfo.authors = this.softwareInfo.authors.filter(function (item) {
|
||||
return (item != undefined);
|
||||
});
|
||||
}
|
||||
|
||||
return this.softwareInfo;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,9 +22,10 @@
|
|||
<span *ngIf="result['authors'] != undefined">
|
||||
<span *ngFor="let author of result['authors'].slice(0,15)">
|
||||
<!--a href="{{author['url']}}"-->
|
||||
<a [queryParams]="routerHelper.createQueryParams(['author','au'],[quote(author['name']),'and'])" routerLinkActive="router-link-active" [routerLink]="linkToAdvancedSearchPage">
|
||||
<!--a [queryParams]="routerHelper.createQueryParams(['author','au'],[quote(author['name']),'and'])" routerLinkActive="router-link-active" [routerLink]="linkToAdvancedSearchPage">
|
||||
{{author['name']}};
|
||||
</a>
|
||||
</a-->
|
||||
{{author}};
|
||||
</span>
|
||||
<span *ngIf="result['authors'].length > 15">...</span>
|
||||
</span>
|
||||
|
|
|
@ -25,9 +25,10 @@
|
|||
<div>
|
||||
<span *ngIf="result['authors'] != undefined">
|
||||
<span *ngFor="let author of result['authors'].slice(0,15)">
|
||||
<a [queryParams]="routerHelper.createQueryParams(['author','au'],[quote(author['name']),'and'])" routerLinkActive="router-link-active" [routerLink]="'/search/advanced/'+type+'s'">
|
||||
<!--a [queryParams]="routerHelper.createQueryParams(['author','au'],[quote(author['name']),'and'])" routerLinkActive="router-link-active" [routerLink]="'/search/advanced/'+type+'s'">
|
||||
{{author['name']}};
|
||||
</a>
|
||||
</a-->
|
||||
{{author}};
|
||||
</span>
|
||||
<span *ngIf="result['authors'].length > 15">...</span>
|
||||
</span>
|
||||
|
|
|
@ -196,19 +196,36 @@ export class SearchDatasetsService {
|
|||
let relation = Array.isArray(resData['rels']['rel']) ? resData['rels']['rel'][j] : resData['rels']['rel'];
|
||||
|
||||
if(relation.hasOwnProperty("to")) {
|
||||
if(relation['to'].class == "hasAuthor") {
|
||||
/*if(relation['to'].class == "hasAuthor") {
|
||||
if(result['authors'] == undefined) {
|
||||
result['authors'] = new Array<{"name": string, "id": string}>();
|
||||
}
|
||||
|
||||
result['authors'].push({"name": relation.fullname, "id": relation['to'].content});
|
||||
} else if(relation['to'].class == "isProducedBy") {
|
||||
} else */if(relation['to'].class == "isProducedBy") {
|
||||
result['projects'] = this.parseProjects(result['projects'], relation);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(resData.hasOwnProperty("creator") && resData['creator'] != null) {
|
||||
if(result['authors'] == undefined) {
|
||||
result['authors'] = new Array<string>();
|
||||
}
|
||||
|
||||
let authors = resData['creator'];
|
||||
let length = Array.isArray(authors) ? authors.length : 1;
|
||||
|
||||
for(let i=0; i<length; i++) {
|
||||
let author = Array.isArray(authors) ? authors[i] : authors;
|
||||
result.authors[author.rank-1] = author.content;
|
||||
}
|
||||
result.authors = result.authors.filter(function (item) {
|
||||
return (item != undefined);
|
||||
});
|
||||
}
|
||||
|
||||
var date:string = (resData.dateofacceptance)+""; // transform to string in case it is an integer
|
||||
result.year = (date && (date).indexOf('-') !== -1)?date.split('-')[0]:date;
|
||||
if(!Array.isArray(resData.description)) {
|
||||
|
|
|
@ -236,18 +236,36 @@ export class SearchPublicationsService {
|
|||
let relation = Array.isArray(resData['rels']['rel']) ? resData['rels']['rel'][j] : resData['rels']['rel'];
|
||||
|
||||
if(relation.hasOwnProperty("to")) {
|
||||
if(relation['to'].class == "hasAuthor") {
|
||||
/*if(relation['to'].class == "hasAuthor") {
|
||||
if(result['authors'] == undefined) {
|
||||
result['authors'] = new Array<{"name": string, "id": string}>();
|
||||
}
|
||||
|
||||
result['authors'].push({"name": relation.fullname, "id": /*OpenaireProperties.getsearchLinkToPerson()+*/relation['to'].content});
|
||||
} else if(relation['to'].class == "isProducedBy") {
|
||||
result['authors'].push({"name": relation.fullname, "id": relation['to'].content});
|
||||
} else */if(relation['to'].class == "isProducedBy") {
|
||||
result['projects'] = this.parseProjects(result['projects'], relation);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(resData.hasOwnProperty("creator") && resData['creator'] != null) {
|
||||
if(result['authors'] == undefined) {
|
||||
result['authors'] = new Array<string>();
|
||||
}
|
||||
|
||||
let authors = resData['creator'];
|
||||
let length = Array.isArray(authors) ? authors.length : 1;
|
||||
|
||||
for(let i=0; i<length; i++) {
|
||||
let author = Array.isArray(authors) ? authors[i] : authors;
|
||||
result.authors[author.rank-1] = author.content;
|
||||
}
|
||||
result.authors = result.authors.filter(function (item) {
|
||||
return (item != undefined);
|
||||
});
|
||||
}
|
||||
|
||||
var date:string = (resData.dateofacceptance)+""; // transform to string in case it is an integer
|
||||
result.year = (date && (date).indexOf('-') !== -1)?date.split('-')[0]:date;
|
||||
|
||||
|
|
|
@ -196,19 +196,36 @@ export class SearchSoftwareService {
|
|||
let relation = Array.isArray(resData['rels']['rel']) ? resData['rels']['rel'][j] : resData['rels']['rel'];
|
||||
|
||||
if(relation.hasOwnProperty("to")) {
|
||||
if(relation['to'].class == "hasAuthor") {
|
||||
/*if(relation['to'].class == "hasAuthor") {
|
||||
if(result['authors'] == undefined) {
|
||||
result['authors'] = new Array<{"name": string, "id": string}>();
|
||||
}
|
||||
|
||||
result['authors'].push({"name": relation.fullname, "id": relation['to'].content});
|
||||
} else if(relation['to'].class == "isProducedBy") {
|
||||
} else */if(relation['to'].class == "isProducedBy") {
|
||||
result['projects'] = this.parseProjects(result['projects'], relation);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(resData.hasOwnProperty("creator") && resData['creator'] != null) {
|
||||
if(result['authors'] == undefined) {
|
||||
result['authors'] = new Array<string>();
|
||||
}
|
||||
|
||||
let authors = resData['creator'];
|
||||
let length = Array.isArray(authors) ? authors.length : 1;
|
||||
|
||||
for(let i=0; i<length; i++) {
|
||||
let author = Array.isArray(authors) ? authors[i] : authors;
|
||||
result.authors[author.rank-1] = author.content;
|
||||
}
|
||||
result.authors = result.authors.filter(function (item) {
|
||||
return (item != undefined);
|
||||
});
|
||||
}
|
||||
|
||||
var date:string = (resData.dateofacceptance)+""; // transform to string in case it is an integer
|
||||
result.year = (date && (date).indexOf('-') !== -1)?date.split('-')[0]:date;
|
||||
if(!Array.isArray(resData.description)) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
export class DatasetInfo {
|
||||
underCurationMessage: boolean;
|
||||
title: { "name": string, "url": string, "accessMode": string};
|
||||
authors: { "name": string, "id": string}[];
|
||||
authors: string[];
|
||||
date: string;
|
||||
dateofacceptance: string;
|
||||
embargoEndDate: string;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
export class PublicationInfo {
|
||||
underCurationMessage: boolean;
|
||||
title: { "name": string, "url": string, "accessMode": string};
|
||||
authors: { "name": string, "id": string}[];
|
||||
authors: string[];
|
||||
date: string;
|
||||
dateofacceptance: string;
|
||||
embargoEndDate: string;
|
||||
|
|
|
@ -8,7 +8,7 @@ export class SearchResult {
|
|||
description: string;
|
||||
year: string;
|
||||
embargoEndDate: string;
|
||||
authors: { "name": string, "id": string}[];
|
||||
authors: string[];
|
||||
//datasets:
|
||||
publisher: string;
|
||||
//dataproviders & projects:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
export class SoftwareInfo {
|
||||
underCurationMessage: boolean;
|
||||
title: { "name": string, "url": string, "accessMode": string};
|
||||
authors: { "name": string, "id": string}[];
|
||||
authors: string[];
|
||||
date: string;
|
||||
dateofacceptance: string;
|
||||
embargoEndDate: string;
|
||||
|
|
|
@ -9,14 +9,14 @@ export class SearchFields {
|
|||
"relproject","resultacceptanceyear",
|
||||
"resultbestaccessright", "instancetypename", "resultlanguagename", "community","resulthostingdatasource"];
|
||||
|
||||
public RESULT_ADVANCED_FIELDS:string[] = ["q","resulttitle","relperson","resultpublisher","instancetypename",
|
||||
public RESULT_ADVANCED_FIELDS:string[] = ["q","resulttitle","resultauthor","resultpublisher","instancetypename",
|
||||
"resultlanguagename", "community","relprojectid", "relfunder",
|
||||
"relfundinglevel0_id","relfundinglevel1_id","relfundinglevel2_id",
|
||||
"resultdateofacceptance","resultbestaccessright","pid","resulthostingdatasourceid","collectedfromdatasourceid", "relorganizationid"];
|
||||
public RESULT_FIELDS: { [key:string]:FieldDetails}={
|
||||
["q"]:{name:"All fields", type:"keyword", param:"q", equalityOperator: "="},
|
||||
["resulttitle"]:{name:"Title", type:"keyword", param:"title", equalityOperator: "="},
|
||||
["relperson"]:{name:"Author", type:"keyword", param:"author", equalityOperator: "="},
|
||||
["resultauthor"]:{name:"Author", type:"keyword", param:"author", equalityOperator: "="},
|
||||
["resultpublisher"]:{name:"Publisher", type:"keyword", param:"publisher", equalityOperator: "="},
|
||||
["pid"]:{name:"PID", type:"keyword", param:"pid", equalityOperator: " = "},
|
||||
["resulthostingdatasourceid"]:{name:"Hosting Content Provider", type:"entity", param:"hostedBy", equalityOperator: " exact "},
|
||||
|
|
Loading…
Reference in New Issue