diff --git a/portal-2/src/app/landingPages/dataProvider/dataProvider.component.html b/portal-2/src/app/landingPages/dataProvider/dataProvider.component.html index 747d643c..942f6d2a 100644 --- a/portal-2/src/app/landingPages/dataProvider/dataProvider.component.html +++ b/portal-2/src/app/landingPages/dataProvider/dataProvider.component.html @@ -16,7 +16,7 @@ -
+
Type:
{{dataProviderInfo.type}}
Compatibility:
diff --git a/portal-2/src/app/landingPages/dataset/dataset.component.html b/portal-2/src/app/landingPages/dataset/dataset.component.html index e050c83b..33f6c9bf 100644 --- a/portal-2/src/app/landingPages/dataset/dataset.component.html +++ b/portal-2/src/app/landingPages/dataset/dataset.component.html @@ -9,7 +9,7 @@
- Record in preview @@ -26,7 +26,7 @@ ({{datasetInfo.date}})
-
+
Publisher:
{{datasetInfo.publisher}}
Type:
@@ -131,11 +131,11 @@
Download from
+ >
- +
{{key}} @@ -173,7 +173,7 @@
- (); + "trust": number, "class": string}>(); } */ if(this.datasetInfo.relatedResearchResults == undefined) { this.datasetInfo.relatedResearchResults = new Map(); + "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); } diff --git a/portal-2/src/app/landingPages/organization/organization.component.html b/portal-2/src/app/landingPages/organization/organization.component.html index aaeb7acd..9f2853fa 100644 --- a/portal-2/src/app/landingPages/organization/organization.component.html +++ b/portal-2/src/app/landingPages/organization/organization.component.html @@ -23,7 +23,7 @@ -
+
Name:
{{organizationInfo.name}}
Country:
diff --git a/portal-2/src/app/landingPages/person/person.component.html b/portal-2/src/app/landingPages/person/person.component.html index 7e1f4c6a..6028302f 100644 --- a/portal-2/src/app/landingPages/person/person.component.html +++ b/portal-2/src/app/landingPages/person/person.component.html @@ -6,7 +6,7 @@

{{personInfo.fullname}}

-
+
Last name:
{{personInfo.secondnames}}
First name:
diff --git a/portal-2/src/app/landingPages/project/project.component.html b/portal-2/src/app/landingPages/project/project.component.html index e8756d83..ae929fa4 100644 --- a/portal-2/src/app/landingPages/project/project.component.html +++ b/portal-2/src/app/landingPages/project/project.component.html @@ -11,7 +11,7 @@

{{projectName}}

-
+
Title:
{{projectInfo.title}}
Funding:
diff --git a/portal-2/src/app/landingPages/publication/publication.component.html b/portal-2/src/app/landingPages/publication/publication.component.html index 0e77fc8e..b53155c7 100644 --- a/portal-2/src/app/landingPages/publication/publication.component.html +++ b/portal-2/src/app/landingPages/publication/publication.component.html @@ -9,7 +9,7 @@
- Record in preview @@ -22,7 +22,7 @@ ({{publicationInfo.date}})
-
+
Publisher:
{{publicationInfo.publisher}}
Journal:
@@ -228,11 +228,9 @@
Country: {{organization.country}}
-
-
- {{organization['trust']}} -
+
+
{{organization['trust']}}%
+

no trust found

@@ -326,12 +324,11 @@
Download from
+ *ngFor="let key of publicationInfo.downloadFrom.keys() let i=index" >
- +
{{key}} @@ -365,10 +362,10 @@
Published in
+ >
- +
{{key}} @@ -406,8 +403,8 @@
- + (); + "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); diff --git a/portal-2/src/app/landingPages/showTitle.component.ts b/portal-2/src/app/landingPages/showTitle.component.ts index 33202d15..0959e07e 100644 --- a/portal-2/src/app/landingPages/showTitle.component.ts +++ b/portal-2/src/app/landingPages/showTitle.component.ts @@ -7,7 +7,7 @@ import {Component, Input} from '@angular/core';

[no title available] diff --git a/portal-2/src/app/landingPages/tabTable.component.ts b/portal-2/src/app/landingPages/tabTable.component.ts index 05be3f1e..7eacf7fc 100644 --- a/portal-2/src/app/landingPages/tabTable.component.ts +++ b/portal-2/src/app/landingPages/tabTable.component.ts @@ -9,7 +9,7 @@ import {OpenaireProperties} from '../utils/properties/openaireProperties'; Title - Trust + Trust @@ -38,14 +38,12 @@ import {OpenaireProperties} from '../utils/properties/openaireProperties'; -
-
- {{item['trust']}} -
- -
+
+
{{item['trust']}}%
+ +
-

no trust found

+

No trust available

@@ -56,7 +54,7 @@ import {OpenaireProperties} from '../utils/properties/openaireProperties'; }) export class TabTableComponent { - @Input() info: { "name": string, "url": string, "date": string, "trust": string}[];//Map; + @Input() info: { "name": string, "url": string, "date": string, "trust": number}[];//Map; public routerHelper:RouterHelper = new RouterHelper(); public searchLinkToPublication: string; diff --git a/portal-2/src/app/services/servicesUtils/refineResults.class.ts b/portal-2/src/app/services/servicesUtils/refineResults.class.ts index ba4efc88..2a8b3cae 100644 --- a/portal-2/src/app/services/servicesUtils/refineResults.class.ts +++ b/portal-2/src/app/services/servicesUtils/refineResults.class.ts @@ -25,7 +25,9 @@ export class RefineResultsUtils { value.name = field[i].name; value.number = field[i].count; value.id = field[i].id; - filter.values.push(value); + 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; +} } diff --git a/portal-2/src/app/utils/entities/datasetInfo.ts b/portal-2/src/app/utils/entities/datasetInfo.ts index d64669d1..05b8241a 100644 --- a/portal-2/src/app/utils/entities/datasetInfo.ts +++ b/portal-2/src/app/utils/entities/datasetInfo.ts @@ -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; - similarResearchResults: { "name": string, "id": string, "date": string, "trust": string, "class": string}[]; + relatedResearchResults: Map; + similarResearchResults: { "name": string, "id": string, "date": string, "trust": number, "class": string}[]; contexts: { "labelContext": string, "labelCategory": string, "labelConcept": string, "inline": boolean}[]; } diff --git a/portal-2/src/app/utils/entities/publicationInfo.ts b/portal-2/src/app/utils/entities/publicationInfo.ts index 5fd9ba2e..944480d5 100644 --- a/portal-2/src/app/utils/entities/publicationInfo.ts +++ b/portal-2/src/app/utils/entities/publicationInfo.ts @@ -23,14 +23,14 @@ export class PublicationInfo { "funding": string, "code": string, inline: boolean}[]; bioentities: Map>; //> software: { "name": string, "url": string}[]; //> - //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; - similarResearchResults: { "name": string, "id": string, "date": string, "trust": string, "class": string}[]; + relatedResearchResults: Map; + 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}[]; } diff --git a/portal-2/src/app/utils/entitiesAutoComplete/entitySearch.service.ts b/portal-2/src/app/utils/entitiesAutoComplete/entitySearch.service.ts index 81f907f5..a38e2a4b 100644 --- a/portal-2/src/app/utils/entitiesAutoComplete/entitySearch.service.ts +++ b/portal-2/src/app/utils/entitiesAutoComplete/entitySearch.service.ts @@ -60,6 +60,38 @@ export class EntitiesSearchService { 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 => + { + 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'}];; + }); + } searchByType(keyword:string,type:string){ if (type == "project"){ return this.searchEntity(keyword,"projects","oaf:project","project"); diff --git a/portal-2/src/app/utils/properties/searchFields.ts b/portal-2/src/app/utils/properties/searchFields.ts index d6ea60be..ac53114b 100644 --- a/portal-2/src/app/utils/properties/searchFields.ts +++ b/portal-2/src/app/utils/properties/searchFields.ts @@ -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"];