[Trunk | Library]: deletedByInference: [Bug fix] Remove parsing and view of 'fundedByProjects' field ('projectsProvenanceVocabulary' which was used is deleted).
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@57335 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
93f9b9ef7d
commit
eea9c25108
|
@ -43,21 +43,6 @@ import {DeletedByInferenceService} from './deletedByInference.service';
|
||||||
<showIdentifiers [identifiers]="result.identifiers"></showIdentifiers>
|
<showIdentifiers [identifiers]="result.identifiers"></showIdentifiers>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngIf="result['fundedByProjects'] != undefined">
|
|
||||||
<span class="uk-text-bold"> Project: </span>
|
|
||||||
<span *ngFor="let project of result['fundedByProjects'].slice(0,15) let i=index">
|
|
||||||
{{project['funderShortname']?project['funderShortname']:project['funderName']}}
|
|
||||||
| {{ project['acronym']?project['acronym']:(project['title'].length>25?project['title'].substring(0,25)+'...':project['title'])}} ({{project.code}})<span
|
|
||||||
|
|
||||||
*ngIf="!project.id">{{project['funderShortname']?project['funderShortname']:project['funderName']}}<span
|
|
||||||
*ngIf="project['acronym'] || project['title']"> | {{ project['acronym']?project['acronym']:(project['title'].length>25?project['title'].substring(0,25)+'...':project['title'])}}</span><span
|
|
||||||
*ngIf="project.code">({{project.code}})</span></span><span
|
|
||||||
|
|
||||||
*ngIf="i < result['fundedByProjects'].length-1">,</span>
|
|
||||||
</span>
|
|
||||||
<span *ngIf="result['fundedByProjects'].length > 15">...</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div *ngIf="result.hostedBy_collectedFrom != undefined && result.hostedBy_collectedFrom.length > 0">
|
<div *ngIf="result.hostedBy_collectedFrom != undefined && result.hostedBy_collectedFrom.length > 0">
|
||||||
<span class="uk-text-bold"> Download From: </span>
|
<span class="uk-text-bold"> Download From: </span>
|
||||||
<span *ngFor="let available of result.hostedBy_collectedFrom let i=index">
|
<span *ngFor="let available of result.hostedBy_collectedFrom let i=index">
|
||||||
|
|
|
@ -22,10 +22,10 @@ export class DeletedByInferenceService {
|
||||||
return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url)
|
return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url)
|
||||||
//.map(res => <any> res.json())
|
//.map(res => <any> res.json())
|
||||||
.pipe(map(res => res['results']))
|
.pipe(map(res => res['results']))
|
||||||
.pipe(map(res => this.parseDeletedByInferenceResults(res, properties)));
|
.pipe(map(res => this.parseDeletedByInferenceResults(res)));
|
||||||
}
|
}
|
||||||
|
|
||||||
parseDeletedByInferenceResults (_results: any, properties: EnvProperties): ResultLandingInfo[] {
|
parseDeletedByInferenceResults (_results: any): ResultLandingInfo[] {
|
||||||
/*title, authors, abstract, List of projects, PIDs,
|
/*title, authors, abstract, List of projects, PIDs,
|
||||||
collectedfrom (link pointing to the download url), access rights*/
|
collectedfrom (link pointing to the download url), access rights*/
|
||||||
|
|
||||||
|
@ -79,20 +79,6 @@ export class DeletedByInferenceService {
|
||||||
result.countries = this.parsingFunctions.parseCountries(_result['oaf:result']['country']);
|
result.countries = this.parsingFunctions.parseCountries(_result['oaf:result']['country']);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(_result['oaf:result'] && _result['oaf:result']['rels'] && _result['oaf:result']['rels']['rel']) {
|
|
||||||
let relation;
|
|
||||||
let length = Array.isArray(_result['oaf:result']['rels']['rel']) ? _result['oaf:result']['rels']['rel'].length : 1;
|
|
||||||
|
|
||||||
for(let i=0; i<length; i++) {
|
|
||||||
relation = Array.isArray(_result['oaf:result']['rels']['rel']) ? _result['oaf:result']['rels']['rel'][i] : _result['oaf:result']['rels']['rel'];
|
|
||||||
if(relation.hasOwnProperty("to")) {
|
|
||||||
if(relation['to'].class == "isProducedBy") {
|
|
||||||
result.fundedByProjects = this.parsingFunctions.parseFundingByProjects(result.fundedByProjects, relation, result.projectsProvenanceVocabulary);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(_result['oaf:result'] && _result['oaf:result']['children']) {
|
if(_result['oaf:result'] && _result['oaf:result']['children']) {
|
||||||
let children = _result['oaf:result']['children'];
|
let children = _result['oaf:result']['children'];
|
||||||
|
|
||||||
|
|
|
@ -20,11 +20,11 @@ export class ResultLandingInfo {
|
||||||
"accessMode": string[], "bestAccessMode": string,
|
"accessMode": string[], "bestAccessMode": string,
|
||||||
"type": string, "year":string}[];
|
"type": string, "year":string}[];
|
||||||
|
|
||||||
|
// PUBLICATION, DATASET, SOFTWARE, ORP
|
||||||
fundedByProjects: { "id": string, "acronym": string, "title": string,
|
fundedByProjects: { "id": string, "acronym": string, "title": string,
|
||||||
"funderShortname": string, "funderName": string,
|
"funderShortname": string, "funderName": string,
|
||||||
"funding": string, "code": string, "provenanceAction": string, "inline": boolean}[];
|
"funding": string, "code": string, "provenanceAction": string, "inline": boolean}[];
|
||||||
|
|
||||||
// PUBLICATION, DATASET, SOFTWARE, ORP
|
|
||||||
underCurationMessage: boolean;
|
underCurationMessage: boolean;
|
||||||
publisher: string;
|
publisher: string;
|
||||||
journal: {"journal": string, "issn": string, "lissn": string, "eissn": string,
|
journal: {"journal": string, "issn": string, "lissn": string, "eissn": string,
|
||||||
|
|
Loading…
Reference in New Issue