Fixing uk-progress-bar and tooltip after uikit upgrade
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-portal/trunk@47144 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
8bb6790e2c
commit
941b3640f2
|
@ -16,7 +16,7 @@
|
|||
</h3-->
|
||||
<showTitle [title]="dataProviderInfo.title"></showTitle>
|
||||
|
||||
<dl class="uk-description-list-horizontal custom-description-list-horizontal">
|
||||
<dl class="uk-description-list">
|
||||
<dt *ngIf="dataProviderInfo.type != undefined && dataProviderInfo.type != ''">Type: </dt>
|
||||
<dd *ngIf="dataProviderInfo.type != undefined && dataProviderInfo.type != ''">{{dataProviderInfo.type}}</dd>
|
||||
<dt *ngIf="dataProviderInfo.compatibility != undefined && dataProviderInfo.compatibility != ''">Compatibility: </dt>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<showTitle [title]="datasetInfo.title"></showTitle>
|
||||
|
||||
<div *ngIf="datasetInfo.underCurationMessage">
|
||||
<span data-uk-tooltip="{pos:'right', cls:'tooltip uk-text-center uk-contrast'}"
|
||||
<span data-uk-tooltip="pos:right; delay:10"
|
||||
title="{{buildCurationTooltip()}}">
|
||||
<i>Record in preview</i>
|
||||
<i class="uk-icon-info-circle"></i>
|
||||
|
@ -26,7 +26,7 @@
|
|||
<span *ngIf="datasetInfo.date != ''">({{datasetInfo.date}})</span>
|
||||
</div>
|
||||
|
||||
<dl class="uk-description-list-horizontal custom-description-list-horizontal">
|
||||
<dl class="uk-description-list">
|
||||
<dt *ngIf="datasetInfo.publisher != undefined && datasetInfo.publisher != ''">Publisher: </dt>
|
||||
<dd *ngIf="datasetInfo.publisher != undefined && datasetInfo.publisher != ''">{{datasetInfo.publisher}}</dd>
|
||||
<dt *ngIf="datasetInfo.type != undefined"> Type: </dt>
|
||||
|
@ -131,11 +131,11 @@
|
|||
<dt class="title">Download from</dt>
|
||||
<dd class="line"
|
||||
*ngFor="let key of datasetInfo.downloadFrom.keys() let i=index"
|
||||
data-uk-tooltip="{pos:'right', cls:'tooltip uk-text-center uk-contrast'}"
|
||||
[title]="datasetInfo.downloadFrom.get(key)['accessMode']">
|
||||
>
|
||||
<div *ngIf="i<5 || showAllDownloadFrom"
|
||||
class="{{datasetInfo.downloadFrom.get(key)['bestAccessMode']}}">
|
||||
<span class="uk-icon-external-link custom-icon">
|
||||
<span class="uk-icon-external-link custom-icon" data-uk-tooltip="pos:right; delay:10"
|
||||
[title]="datasetInfo.downloadFrom.get(key)['accessMode']">
|
||||
<div *ngIf="datasetInfo.downloadFrom.get(key)['url'].length > 1">
|
||||
{{key}}
|
||||
<span *ngFor="let url of datasetInfo.downloadFrom.get(key)['url']; let i=index;">
|
||||
|
@ -173,7 +173,7 @@
|
|||
<dd class="line"
|
||||
*ngFor="let item of datasetInfo.fundedByProjects let i=index">
|
||||
<div *ngIf="i<5 || showAllFundedBy">
|
||||
<span data-uk-tooltip="{pos:'right', cls:'tooltip uk-text-center uk-contrast'}"
|
||||
<span data-uk-tooltip="pos:right; delay:10"
|
||||
title="{{buildFundingTooltip(item)}}">
|
||||
<!--a *ngIf="!item['inline']" href="{{item['url']}}"-->
|
||||
<a *ngIf="!item['inline']"
|
||||
|
|
|
@ -161,23 +161,23 @@ export class DatasetService {
|
|||
if(this.datasetInfo.relatedResearchResults == undefined) {
|
||||
this.datasetInfo.relatedResearchResults = new Array<{
|
||||
"name": string, "id": string, "date": string,
|
||||
"trust": string, "class": string}>();
|
||||
"trust": number, "class": string}>();
|
||||
}
|
||||
*/
|
||||
if(this.datasetInfo.relatedResearchResults == undefined) {
|
||||
this.datasetInfo.relatedResearchResults =
|
||||
new Map<string, { "name": string, "id": string, "date": string,
|
||||
"trust": string, "class": string}[]>();
|
||||
"trust": number, "class": string}[]>();
|
||||
}
|
||||
|
||||
if(!this.datasetInfo.relatedResearchResults.has(provenanceAction)) {
|
||||
this.datasetInfo.relatedResearchResults.set(provenanceAction,
|
||||
new Array<{ "name": string, "id": string, "date": string,
|
||||
"trust": string, "class": string}>());
|
||||
"trust": number, "class": string}>());
|
||||
}
|
||||
|
||||
counter = this.datasetInfo.relatedResearchResults.get(provenanceAction).length;
|
||||
this.datasetInfo.relatedResearchResults.get(provenanceAction)[counter] = {"name": "", "id": "", "date": "", "trust": "", "class": ""}
|
||||
this.datasetInfo.relatedResearchResults.get(provenanceAction)[counter] = {"name": "", "id": "", "date": "", "trust": null, "class": ""}
|
||||
|
||||
//let url;
|
||||
if(mydata['resulttype'].classname == "publication") {
|
||||
|
@ -193,17 +193,17 @@ export class DatasetService {
|
|||
let titleName = Array.isArray(mydata['title']) ? mydata['title'][0].content : mydata['title'].content;
|
||||
this.datasetInfo.relatedResearchResults.get(provenanceAction)[counter]['name'] = titleName;
|
||||
this.datasetInfo.relatedResearchResults.get(provenanceAction)[counter]['date'] = mydata.dateofacceptance.substring(0,4);;
|
||||
this.datasetInfo.relatedResearchResults.get(provenanceAction)[counter]['trust'] = Math.round(mydata.trust*100)+"%";
|
||||
this.datasetInfo.relatedResearchResults.get(provenanceAction)[counter]['trust'] = Math.round(mydata.trust*100);
|
||||
|
||||
} else if(mydata['to'].class == "hasAmongTopNSimilarDocuments") {
|
||||
if(this.datasetInfo.similarResearchResults == undefined) {
|
||||
this.datasetInfo.similarResearchResults = new Array<{
|
||||
"name": string, "id": string, "date": string,
|
||||
"trust": string, "class": string}>();
|
||||
"trust": number, "class": string}>();
|
||||
}
|
||||
|
||||
counter = this.datasetInfo.similarResearchResults.length;
|
||||
this.datasetInfo.similarResearchResults[counter] = {"name": "", "id": "", "date": "", "trust": "", "class": ""}
|
||||
this.datasetInfo.similarResearchResults[counter] = {"name": "", "id": "", "date": "", "trust": null, "class": ""}
|
||||
|
||||
//let url;
|
||||
if(mydata['resulttype'].classname == "publication") {
|
||||
|
@ -219,7 +219,7 @@ export class DatasetService {
|
|||
let titleName = Array.isArray(mydata['title']) ? mydata['title'][0].content : mydata['title'].content;
|
||||
this.datasetInfo.similarResearchResults[counter]['name'] = titleName;
|
||||
this.datasetInfo.similarResearchResults[counter]['date'] = mydata.dateofacceptance.substring(0,4);;
|
||||
this.datasetInfo.similarResearchResults[counter]['trust'] = Math.round(mydata.trust*100)+"%";
|
||||
this.datasetInfo.similarResearchResults[counter]['trust'] = Math.round(mydata.trust*100);
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
<showTitle [title]="organizationInfo.title"></showTitle>
|
||||
|
||||
<!--div class="uk-width-2-3" *ngIf="organizationInfo != null"-->
|
||||
<dl class="uk-description-list-horizontal custom-description-list-horizontal">
|
||||
<dl class="uk-description-list">
|
||||
<dt *ngIf="organizationInfo.name != undefined && organizationInfo.name != ''">Name: </dt>
|
||||
<dd *ngIf="organizationInfo.name != undefined && organizationInfo.name != ''">{{organizationInfo.name}}</dd>
|
||||
<dt *ngIf="organizationInfo.country != undefined && organizationInfo.country != ''">Country: </dt>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<div class="uk-width-3-4@l uk-width-3-4@xl uk-width-3-4@m uk-width-1-1@s">
|
||||
<h2>{{personInfo.fullname}}</h2>
|
||||
|
||||
<dl class="uk-description-list-horizontal custom-description-list-horizontal">
|
||||
<dl class="uk-description-list">
|
||||
<dt *ngIf="personInfo.secondnames != undefined && personInfo.secondnames != ''">Last name: </dt>
|
||||
<dd *ngIf="personInfo.secondnames != undefined && personInfo.secondnames != ''">{{personInfo.secondnames}}</dd>
|
||||
<dt *ngIf="personInfo.firstname != undefined && personInfo.firstname != ''">First name: </dt>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<h2 *ngIf="projectInfo.specialClause39!=true">{{projectName}}</h2>
|
||||
</div>
|
||||
|
||||
<dl class="uk-description-list-horizontal custom-description-list-horizontal">
|
||||
<dl class="uk-description-list">
|
||||
<dt *ngIf="projectInfo.title != undefined && projectInfo.title != ''">Title: </dt>
|
||||
<dd *ngIf="projectInfo.title != undefined && projectInfo.title != ''">{{projectInfo.title}}</dd>
|
||||
<dt *ngIf="projectInfo.funding != undefined && projectInfo.funding != ''">Funding: </dt>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<showTitle [title]="publicationInfo.title"></showTitle>
|
||||
|
||||
<div *ngIf="publicationInfo.underCurationMessage">
|
||||
<span data-uk-tooltip="{pos:'right', cls:'tooltip uk-text-center uk-contrast'}"
|
||||
<span data-uk-tooltip="pos:right; delay:10"
|
||||
title="{{buildCurationTooltip()}}">
|
||||
<i>Record in preview</i>
|
||||
<i class="uk-icon-info-circle"></i>
|
||||
|
@ -22,7 +22,7 @@
|
|||
<span *ngIf="publicationInfo.date != ''">({{publicationInfo.date}})</span>
|
||||
</div>
|
||||
|
||||
<dl class="uk-description-list-horizontal custom-description-list-horizontal">
|
||||
<dl class="uk-description-list">
|
||||
<dt *ngIf="publicationInfo.publisher != undefined && publicationInfo.publisher != ''">Publisher: </dt>
|
||||
<dd *ngIf="publicationInfo.publisher != undefined && publicationInfo.publisher != ''">{{publicationInfo.publisher}}</dd>
|
||||
<dt *ngIf="publicationInfo.journal != undefined && publicationInfo.journal['journal'] != ''">Journal: </dt>
|
||||
|
@ -228,11 +228,9 @@
|
|||
<div *ngIf="organization.country != undefined && organization.country != ''">Country: {{organization.country}}</div>
|
||||
</td>
|
||||
<td>
|
||||
<div *ngIf="organization['trust'] != undefined && organization['trust'] != ''"
|
||||
class="uk-progress uk-progress-warning">
|
||||
<div class="uk-progress-bar" role="progressbar" aria-valuenow="29" aria-valuemin="0" aria-valuemax="100" [style.width] = "organization['trust']">
|
||||
{{organization['trust']}}
|
||||
</div>
|
||||
<div *ngIf="organization['trust'] != undefined && organization['trust'] != ''" title="{{organization['trust']}}%" >
|
||||
<div class="uk-text-center">{{organization['trust']}}%</div>
|
||||
<progress class="uk-progress uk-margin-remove" value="{{organization['trust']}}" max="100"></progress>
|
||||
</div>
|
||||
<div *ngIf="organization['trust'] == undefined || organization['trust'] == ''">
|
||||
<p>no trust found</p>
|
||||
|
@ -326,12 +324,11 @@
|
|||
<dl class="uk-description-list-line">
|
||||
<dt class="title">Download from</dt>
|
||||
<dd class="line"
|
||||
*ngFor="let key of publicationInfo.downloadFrom.keys() let i=index"
|
||||
data-uk-tooltip="{pos:'right', cls:'tooltip uk-text-center uk-contrast'}"
|
||||
[title]="publicationInfo.downloadFrom.get(key)['accessMode']">
|
||||
*ngFor="let key of publicationInfo.downloadFrom.keys() let i=index" >
|
||||
<div *ngIf="i<5 || showAllDownloadFrom"
|
||||
class="{{publicationInfo.downloadFrom.get(key)['bestAccessMode']}}">
|
||||
<span class="uk-icon-external-link custom-icon">
|
||||
<span class="uk-icon-external-link custom-icon" data-uk-tooltip="pos:right; delay:10"
|
||||
[title]="publicationInfo.downloadFrom.get(key)['accessMode']">
|
||||
<div *ngIf="publicationInfo.downloadFrom.get(key)['url'].length > 1">
|
||||
{{key}}
|
||||
<span *ngFor="let url of publicationInfo.downloadFrom.get(key)['url']; let i=index;">
|
||||
|
@ -365,10 +362,10 @@
|
|||
<dl class="uk-description-list-line">
|
||||
<dt class="title">Published in</dt>
|
||||
<dd class="line" *ngFor="let key of publicationInfo.publishedIn.keys() let i=index"
|
||||
data-uk-tooltip="{pos:'right', cls:'tooltip uk-text-center uk-contrast'}"
|
||||
[title]="publicationInfo.publishedIn.get(key)['accessMode']">
|
||||
>
|
||||
<div *ngIf="i<5 || showAllPublishedIn" class="{{publicationInfo.publishedIn.get(key)['bestAccessMode']}}">
|
||||
<span class="uk-icon-external-link custom-icon">
|
||||
<span class="uk-icon-external-link custom-icon" data-uk-tooltip="pos:right; delay:10"
|
||||
[title]="publicationInfo.publishedIn.get(key)['accessMode']">
|
||||
<div *ngIf="publicationInfo.publishedIn.get(key)['url'].length > 1">
|
||||
{{key}}
|
||||
<span *ngFor="let url of publicationInfo.publishedIn.get(key)['url']; let i=index">
|
||||
|
@ -406,8 +403,8 @@
|
|||
<dd class="line"
|
||||
*ngFor="let item of publicationInfo.fundedByProjects let i=index">
|
||||
<div *ngIf="i<5 || showAllFundedBy">
|
||||
<span data-uk-tooltip="{pos:'right', cls:'tooltip uk-text-center uk-contrast'}"
|
||||
title="{{buildFundingTooltip(item)}}">
|
||||
<span data-uk-tooltip="pos:right; delay:10"
|
||||
title="{{buildFundingTooltip(item)}}" >
|
||||
|
||||
<!--a *ngIf="!item['inline']" href="{{item['url']}}"-->
|
||||
<a *ngIf="!item['inline'] && item.id"
|
||||
|
|
|
@ -171,24 +171,24 @@ export class PublicationService {
|
|||
if(this.publicationInfo.relatedResearchResults == undefined) {
|
||||
this.publicationInfo.relatedResearchResults =
|
||||
new Map<string, { "name": string, "id": string, "date": string,
|
||||
"trust": string, "class": string}[]>();
|
||||
"trust": number, "class": string}[]>();
|
||||
}
|
||||
|
||||
if(!this.publicationInfo.relatedResearchResults.has(provenanceAction)) {
|
||||
this.publicationInfo.relatedResearchResults.set(provenanceAction,
|
||||
new Array<{ "name": string, "id": string, "date": string,
|
||||
"trust": string, "class": string}>());
|
||||
"trust": number, "class": string}>());
|
||||
}
|
||||
/*
|
||||
if(this.publicationInfo.relatedResearchResults == undefined) {
|
||||
this.publicationInfo.relatedResearchResults = new Array<{
|
||||
"name": string, "id": string, "date": string,
|
||||
"trust": string, "class": string}>();
|
||||
"trust": number, "class": string}>();
|
||||
}
|
||||
*/
|
||||
|
||||
counter = this.publicationInfo.relatedResearchResults.get(provenanceAction).length;
|
||||
this.publicationInfo.relatedResearchResults.get(provenanceAction)[counter] = {"name": "", "id": "", "date": "", "trust": "", "class": ""}
|
||||
this.publicationInfo.relatedResearchResults.get(provenanceAction)[counter] = {"name": "", "id": "", "date": "", "trust": null, "class": ""}
|
||||
|
||||
//let url;
|
||||
if(relation['resulttype'].classname == "publication") {
|
||||
|
@ -204,17 +204,17 @@ export class PublicationService {
|
|||
let titleName = Array.isArray(relation['title']) ? relation['title'][0].content : relation['title'].content;
|
||||
this.publicationInfo.relatedResearchResults.get(provenanceAction)[counter]['name'] = titleName;
|
||||
this.publicationInfo.relatedResearchResults.get(provenanceAction)[counter]['date'] = relation.dateofacceptance.substring(0,4);;
|
||||
this.publicationInfo.relatedResearchResults.get(provenanceAction)[counter]['trust'] = Math.round(relation.trust*100)+"%";
|
||||
this.publicationInfo.relatedResearchResults.get(provenanceAction)[counter]['trust'] = Math.round(relation.trust*100);
|
||||
|
||||
} else if(relation['to'].class == "hasAmongTopNSimilarDocuments") {
|
||||
if(this.publicationInfo.similarResearchResults == undefined) {
|
||||
this.publicationInfo.similarResearchResults = new Array<{
|
||||
"name": string, "id": string, "date": string,
|
||||
"trust": string, "class": string}>();
|
||||
"trust": number, "class": string}>();
|
||||
}
|
||||
|
||||
counter = this.publicationInfo.similarResearchResults.length;
|
||||
this.publicationInfo.similarResearchResults[counter] = {"name": "", "id": "", "date": "", "trust": "", "class": ""}
|
||||
this.publicationInfo.similarResearchResults[counter] = {"name": "", "id": "", "date": "", "trust": null, "class": ""}
|
||||
|
||||
//let url;
|
||||
if(relation['resulttype'].classname == "publication") {
|
||||
|
@ -230,23 +230,23 @@ export class PublicationService {
|
|||
let titleName = Array.isArray(relation['title']) ? relation['title'][0].content : relation['title'].content;
|
||||
this.publicationInfo.similarResearchResults[counter]['name'] = titleName;
|
||||
this.publicationInfo.similarResearchResults[counter]['date'] = relation.dateofacceptance.substring(0,4);;
|
||||
this.publicationInfo.similarResearchResults[counter]['trust'] = Math.round(relation.trust*100)+"%";
|
||||
this.publicationInfo.similarResearchResults[counter]['trust'] = Math.round(relation.trust*100);
|
||||
} else if(relation['to'].class == "hasAuthorInstitution") {
|
||||
if(this.publicationInfo.organizations == undefined) {
|
||||
this.publicationInfo.organizations = new Array<{
|
||||
"name": string, "shortname": string,
|
||||
"id": string, "websiteUrl": string,
|
||||
"country": string, "trust": string}>();
|
||||
"country": string, "trust": number}>();
|
||||
}
|
||||
|
||||
let organization: {
|
||||
"name": string, "shortname": string,
|
||||
"id": string, "websiteUrl": string,
|
||||
"country": string, "trust": string
|
||||
"country": string, "trust": number
|
||||
} = {
|
||||
"name": "", "shortname": "",
|
||||
"id": "", "websiteUrl": "",
|
||||
"country": "", "trust": ""
|
||||
"country": "", "trust": null
|
||||
};
|
||||
|
||||
organization.id = relation['to'].content;
|
||||
|
@ -257,7 +257,7 @@ export class PublicationService {
|
|||
organization.country = relation.country.classname;
|
||||
}
|
||||
if(relation.trust) {
|
||||
organization.trust = Math.round(relation.trust*100)+"%";
|
||||
organization.trust = Math.round(relation.trust*100);
|
||||
}
|
||||
|
||||
this.publicationInfo.organizations.push(organization);
|
||||
|
|
|
@ -7,7 +7,7 @@ import {Component, Input} from '@angular/core';
|
|||
<h2 *ngIf="title != undefined">
|
||||
<span *ngIf="title['url'] != undefined && title['url'] != null && title['url'] != ''"
|
||||
class="uk-icon-external-link custom-icon {{title['accessMode']}}"
|
||||
data-uk-tooltip="{cls:'tooltip uk-text-center uk-contrast'}"
|
||||
data-uk-tooltip="pos:bottom-right"
|
||||
[title]="title['accessMode']">
|
||||
<a *ngIf="title['name'] != undefined && title['name'] != ''"
|
||||
href="{{title['url']}}" target="_blank"
|
||||
|
@ -21,14 +21,14 @@ import {Component, Input} from '@angular/core';
|
|||
<span *ngIf="(title['name'] != undefined && title['name'] != '') &&
|
||||
(title['url'] == undefined || title['url'] == null || title['url'] == '')"
|
||||
[class]="title['accessMode']"
|
||||
data-uk-tooltip="{cls:'tooltip uk-text-center uk-contrast'}"
|
||||
data-uk-tooltip="pos:bottom-right"
|
||||
[title]="title['accessMode']"
|
||||
[innerHTML]="title['name']">
|
||||
</span>
|
||||
<span *ngIf="(title['name'] == undefined || title['name'] == '') &&
|
||||
(title['url'] == undefined || title['url'] == null || title['url'] == '')"
|
||||
[class]="title['accessMode']"
|
||||
data-uk-tooltip="{cls:'tooltip uk-text-center uk-contrast'}"
|
||||
data-uk-tooltip="pos:bottom-right"
|
||||
[title]="title['accessMode']">
|
||||
[no title available]
|
||||
</span>
|
||||
|
|
|
@ -9,7 +9,7 @@ import {OpenaireProperties} from '../utils/properties/openaireProperties';
|
|||
<thead>
|
||||
<tr>
|
||||
<th>Title</th>
|
||||
<th>Trust</th>
|
||||
<th width="20%">Trust</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -38,14 +38,12 @@ import {OpenaireProperties} from '../utils/properties/openaireProperties';
|
|||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<div *ngIf="item['trust'] != ''" class="uk-progress uk-progress-warning">
|
||||
<div class="uk-progress-bar" role="progressbar" aria-valuenow="29" aria-valuemin="0" aria-valuemax="100" [style.width] = "item['trust']">
|
||||
{{item['trust']}}
|
||||
</div>
|
||||
<!--div class="uk-progress-bar" style="width: 40%;">40%</div-->
|
||||
<div *ngIf="item['trust'] != ''" title="{{item['trust']}}%" >
|
||||
<div class="uk-text-center">{{item['trust']}}%</div>
|
||||
<progress class="uk-progress uk-margin-remove" value="{{item['trust']}}" max="100"></progress>
|
||||
</div>
|
||||
<div *ngIf="item['trust'] == ''">
|
||||
<p>no trust found</p>
|
||||
<p>No trust available</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -56,7 +54,7 @@ import {OpenaireProperties} from '../utils/properties/openaireProperties';
|
|||
})
|
||||
|
||||
export class TabTableComponent {
|
||||
@Input() info: { "name": string, "url": string, "date": string, "trust": string}[];//Map<string, string[]>;
|
||||
@Input() info: { "name": string, "url": string, "date": string, "trust": number}[];//Map<string, string[]>;
|
||||
|
||||
public routerHelper:RouterHelper = new RouterHelper();
|
||||
public searchLinkToPublication: string;
|
||||
|
|
|
@ -25,7 +25,9 @@ export class RefineResultsUtils {
|
|||
value.name = field[i].name;
|
||||
value.number = field[i].count;
|
||||
value.id = field[i].id;
|
||||
if(RefineResultsUtils.includeValue(value)){
|
||||
filter.values.push(value);
|
||||
}
|
||||
|
||||
}
|
||||
filters.push(filter);
|
||||
|
@ -34,5 +36,11 @@ export class RefineResultsUtils {
|
|||
}
|
||||
return filters;
|
||||
}
|
||||
private static includeValue (field):boolean {
|
||||
if( field.name == "unidentified"){
|
||||
return false;
|
||||
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ export class DatasetInfo {
|
|||
"funderShortname": string, "funderName": string,
|
||||
"funding": string, "inline": boolean}[];
|
||||
provenanceVocabulary: {"iis": string, "sysimport": string, "user": string} = {"iis": "Inferred", "sysimport": "Harvested", "user": "Claimed"};
|
||||
relatedResearchResults: Map<string, { "name": string, "id": string, "date": string, "trust": string, "class": string}[]>;
|
||||
similarResearchResults: { "name": string, "id": string, "date": string, "trust": string, "class": string}[];
|
||||
relatedResearchResults: Map<string, { "name": string, "id": string, "date": string, "trust": number, "class": string}[]>;
|
||||
similarResearchResults: { "name": string, "id": string, "date": string, "trust": number, "class": string}[];
|
||||
contexts: { "labelContext": string, "labelCategory": string, "labelConcept": string, "inline": boolean}[];
|
||||
}
|
||||
|
|
|
@ -23,14 +23,14 @@ export class PublicationInfo {
|
|||
"funding": string, "code": string, inline: boolean}[];
|
||||
bioentities: Map<string, Map<string, string>>; //<site name, <>>
|
||||
software: { "name": string, "url": string}[]; //<site name, <>>
|
||||
//relatedPublications: { "name": string, "url": string, "date": string, "trust": string}[];
|
||||
//relatedResearchData: { "name": string, "url": string, "date": string, "trust": string}[];
|
||||
//similarPublications: {"name": string, "url": string, "date": string, "trust": string}[];
|
||||
//similarDatasets: {"name": string, "url": string, "date": string, "trust": string}[];
|
||||
//relatedPublications: { "name": string, "url": string, "date": string, "trust": number}[];
|
||||
//relatedResearchData: { "name": string, "url": string, "date": string, "trust": number}[];
|
||||
//similarPublications: {"name": string, "url": string, "date": string, "trust": number}[];
|
||||
//similarDatasets: {"name": string, "url": string, "date": string, "trust": number}[];
|
||||
provenanceVocabulary: {"iis": string, "sysimport": string, "user": string} = {"iis": "Inferred", "sysimport": "Harvested", "user": "Claimed"};
|
||||
relatedResearchResults: Map<string, { "name": string, "id": string, "date": string, "trust": string, "class": string}[]>;
|
||||
similarResearchResults: { "name": string, "id": string, "date": string, "trust": string, "class": string}[];
|
||||
relatedResearchResults: Map<string, { "name": string, "id": string, "date": string, "trust": number, "class": string}[]>;
|
||||
similarResearchResults: { "name": string, "id": string, "date": string, "trust": number, "class": string}[];
|
||||
references: { "name": string, "url": string}[];
|
||||
contexts: { "labelContext": string, "labelCategory": string, "labelConcept": string, "inline": boolean}[];
|
||||
organizations: {"name": string, "shortname":string, "id": string, "websiteUrl": string, "country": string, "trust": string}[];
|
||||
organizations: {"name": string, "shortname":string, "id": string, "websiteUrl": string, "country": string, "trust": number}[];
|
||||
}
|
||||
|
|
|
@ -47,6 +47,38 @@ export class EntitiesSearchService {
|
|||
url += "&page=0&size=10";
|
||||
url += "&format=json";
|
||||
|
||||
// let url = OpenaireProperties. getSearchAPIURLLast()+"projects?"+((keyword && keyword.length > 0)?("q=" +keyword):"")+((funderId && funderId.length > 0 )?"&fq=funderid exact " + '"'+funderId+ '"':"")+"&size=10&page=0&format=json";
|
||||
return this.http.get(url).toPromise()
|
||||
.then(request =>
|
||||
{
|
||||
request = request.json().results;
|
||||
console.log(request);
|
||||
this.ready = true;
|
||||
return this.parse(request,"oaf:organization","organization");
|
||||
}).catch((ex) => {
|
||||
console.error('An error occured', ex);
|
||||
return [{id:'-2',label:'Error'}];;
|
||||
});
|
||||
}
|
||||
searchDataProvidersBySubjects(keyword:string, DepositType:string):any {
|
||||
this.ready = false;
|
||||
console.info("In searchOrganizationsforDeposit");
|
||||
|
||||
let link = OpenaireProperties.getSearchResourcesAPIURL();
|
||||
|
||||
let url = link+"?query=";
|
||||
if(keyword!= null && keyword != '' ) {
|
||||
url += "((oaftype exact datasource and deletedbyinference=false and "+
|
||||
"(reldatasourcecompatibilityid=driver or reldatasourcecompatibilityid=driver-openaire2.0 or reldatasourcecompatibilityid=openaire2.0 or reldatasourcecompatibilityid=openaire3.0 or reldatasourcecompatibilityid=openaire2.0_data or reldatasourcecompatibilityid=hostedBy or relprojectid=*))"+
|
||||
" and (datasourcesubjects all "+'"'+keyword+'") "' +
|
||||
// "and " + this.quote(params) + " " +
|
||||
"and (collectedfrom exact "+StringUtils.quote(StringUtils.URIEncode(DepositType))+")) ";
|
||||
|
||||
}
|
||||
|
||||
url += "&page=0&size=10";
|
||||
url += "&format=json";
|
||||
|
||||
// let url = OpenaireProperties. getSearchAPIURLLast()+"projects?"+((keyword && keyword.length > 0)?("q=" +keyword):"")+((funderId && funderId.length > 0 )?"&fq=funderid exact " + '"'+funderId+ '"':"")+"&size=10&page=0&format=json";
|
||||
return this.http.get(url).toPromise()
|
||||
.then(request =>
|
||||
|
|
|
@ -92,7 +92,6 @@ export class SearchFields {
|
|||
["datasourcecompatibilityname"]:{name:"Compatibility Level", type:"vocabulary", param:"compatibility", equalityOperator: " exact "},
|
||||
["relorganizationid"]:{name:"Organization", type:"entity", param:"organization", equalityOperator: " exact "},
|
||||
["collectedfromdatasourceid"]:{name:"Collected from Data Provider", type:"entity", param:"collectedFrom", equalityOperator: " exact "}
|
||||
|
||||
};
|
||||
|
||||
public COMPATIBLE_DATAPROVIDER_FIELDS:string[] = ["datasourcetypeuiname","datasourcecompatibilityname"];
|
||||
|
|
Loading…
Reference in New Issue