diff --git a/landingPages/feedback/feedback.component.html b/landingPages/feedback/feedback.component.html index 837c76bc..9a569781 100644 --- a/landingPages/feedback/feedback.component.html +++ b/landingPages/feedback/feedback.component.html @@ -9,7 +9,8 @@ + [year]="resultLandingInfo.date" [embargoEndDate]="resultLandingInfo.embargoEndDate" + [publiclyFunded]="resultLandingInfo.publiclyFunded" [projects]="resultLandingInfo.fundedByProjects"> -
+
{{instance.types.join(" . ")}} . {{instance.years.join(" . ")}} + . + Peer-reviewed
License: diff --git a/landingPages/landing-utils/entity-metadata.component.ts b/landingPages/landing-utils/entity-metadata.component.ts index 62f8a0a9..d9e0cf98 100644 --- a/landingPages/landing-utils/entity-metadata.component.ts +++ b/landingPages/landing-utils/entity-metadata.component.ts @@ -148,6 +148,9 @@ import {RouterHelper} from "../../utils/routerHelper.class"; Thematic + + Publicly funded + @@ -244,6 +247,7 @@ export class EntityMetadataComponent { @Input() type; // data provider landing @Input() provenanceAction: string; // search result @Input() relationName: string; // search result + @Input() publiclyFunded: boolean; // search result @Input() projects: Project[]; @Input() organizations: Organization[]; @Input() subjects: string[]; diff --git a/landingPages/landing-utils/landing-header/landing-header.component.ts b/landingPages/landing-utils/landing-header/landing-header.component.ts index adfe3268..649a6ec1 100644 --- a/landingPages/landing-utils/landing-header/landing-header.component.ts +++ b/landingPages/landing-utils/landing-header/landing-header.component.ts @@ -21,7 +21,7 @@ import {AlertModal} from "../../../utils/modal/alert"; [languages]="languages" [programmingLanguages]="programmingLanguages" [compatibility]="compatibility" [aggregationStatus]="aggregationStatus" [thematic]="thematic" [type]="type" [prevPath]="prevPath" - [countries]="countries" [projects]="projects" + [countries]="countries" [publiclyFunded]="publiclyFunded" [projects]="projects" >
@@ -63,5 +63,6 @@ export class LandingHeaderComponent { @Input() type; // data provider landing @Input() prevPath: string = ""; @Input() countries; + @Input() publiclyFunded; @Input() projects; } diff --git a/landingPages/landing-utils/parsingFunctions.class.ts b/landingPages/landing-utils/parsingFunctions.class.ts index 112eb192..105c54cf 100644 --- a/landingPages/landing-utils/parsingFunctions.class.ts +++ b/landingPages/landing-utils/parsingFunctions.class.ts @@ -265,7 +265,8 @@ export class ParsingFunctions { "types": [], "years": [], "license": "", - "fulltext": "" + "fulltext": "", + "peerReviewed": null }; if (instance.hasOwnProperty("hostedby")) { @@ -358,6 +359,10 @@ export class ParsingFunctions { if(instance.hasOwnProperty("fulltext")) { available.fulltext = instance['fulltext']; } + + if(instance.hasOwnProperty("refereed") && instance.refereed.classname == "peerReviewed") { + available.peerReviewed = true; + } hostedBy_collectedFrom.push(available); } diff --git a/landingPages/result/resultLanding.component.html b/landingPages/result/resultLanding.component.html index 7d6a9ccd..63e7d5cd 100644 --- a/landingPages/result/resultLanding.component.html +++ b/landingPages/result/resultLanding.component.html @@ -228,6 +228,7 @@ [publisher]="resultLandingInfo.publisher" [journal]="resultLandingInfo.journal" [languages]="resultLandingInfo.languages" [programmingLanguages]="resultLandingInfo.programmingLanguages" [prevPath]="prevPath" [countries]="resultLandingInfo.countries" + [publiclyFunded]="resultLandingInfo.publiclyFunded" [projects]="resultLandingInfo.fundedByProjects"> @@ -522,6 +523,7 @@ [date]="resultLandingInfo.dateofacceptance" [embargoEndDate]="resultLandingInfo.embargoEndDate" [publisher]="resultLandingInfo.publisher" [journal]="resultLandingInfo.journal" [languages]="resultLandingInfo.languages" [programmingLanguages]="resultLandingInfo.programmingLanguages" + [publiclyFunded]="resultLandingInfo.publiclyFunded" [projects]="resultLandingInfo.fundedByProjects" [isMobile]="true" [prevPath]="prevPath">
diff --git a/landingPages/result/resultLanding.service.ts b/landingPages/result/resultLanding.service.ts index 263bba8e..85817115 100644 --- a/landingPages/result/resultLanding.service.ts +++ b/landingPages/result/resultLanding.service.ts @@ -141,6 +141,19 @@ export class ResultLandingService { this.resultLandingInfo.publisher = data[0].publisher; this.resultLandingInfo.description = this.parsingFunctions.parseDescription(data[0] && data[0].description ? data[0].description : []); this.resultLandingInfo.embargoEndDate = data[0].embargoenddate ? Dates.getDate(data[0].embargoenddate) : null; + + if(data[0].hasOwnProperty("publiclyfunded") && data[0].publiclyfunded) { + this.resultLandingInfo.publiclyFunded = data[0].publiclyfunded; + } + if((data[0].hasOwnProperty("isgreen") && data[0].isgreen) + || (data[0].hasOwnProperty("openaccesscolor") && data[0].openaccesscolor) + || (data[0].hasOwnProperty("isindiamondjournal") && data[0].isindiamondjournal)) { + this.resultLandingInfo.oaRoutes = { + "green": data[0].isgreen, + "oaColor": data[0].openaccesscolor, + "isInDiamondJournal":data[0].isindiamondjournal + }; + } } if (data[0]['bestaccessright'] && data[0]['bestaccessright'].hasOwnProperty("classname")) { diff --git a/services/searchResearchResults.service.ts b/services/searchResearchResults.service.ts index 388f109e..17719ce9 100644 --- a/services/searchResearchResults.service.ts +++ b/services/searchResearchResults.service.ts @@ -416,7 +416,21 @@ export class SearchResearchResultsService { result.hostedBy_collectedFrom = this.parsingFunctions.addPublisherToHostedBy_collectedFrom( result.hostedBy_collectedFrom, result.publisher, result['journal']?result['journal'].journal:null, result.identifiers); - + + + if(resData.hasOwnProperty("publiclyfunded") && resData.publiclyfunded) { + result.publiclyFunded = resData.publiclyfunded; + } + if((resData.hasOwnProperty("isgreen") && resData.isgreen) + || (resData.hasOwnProperty("openaccesscolor") && resData.openaccesscolor) + || (resData.hasOwnProperty("isindiamondjournal") && resData.isindiamondjournal)) { + result.oaRoutes = { + "green": resData.isgreen, + "oaColor": resData.openaccesscolor, + "isInDiamondJournal":resData.isindiamondjournal + }; + } + results.push(result); } return results; diff --git a/utils/entities/resultLandingInfo.ts b/utils/entities/resultLandingInfo.ts index 1e2f7740..16eb7ae1 100644 --- a/utils/entities/resultLandingInfo.ts +++ b/utils/entities/resultLandingInfo.ts @@ -1,7 +1,7 @@ import { Author, HostedByCollectedFrom, - Journal, + Journal, OARoutes, Organization, Project, RelationResult @@ -95,6 +95,9 @@ export class ResultLandingInfo { fos: {"id": string, "label": string}[] = []; sdg: string[]; eoscSubjects: any[]; + + oaRoutes: OARoutes; + publiclyFunded: boolean; // // percentage is for trust // relatedResearchResults: RelationResult[]; diff --git a/utils/entities/searchResult.ts b/utils/entities/searchResult.ts index c8221930..c8c73e67 100644 --- a/utils/entities/searchResult.ts +++ b/utils/entities/searchResult.ts @@ -1,4 +1,12 @@ -import {Author, HostedByCollectedFrom, Journal, Organization, Project, ResultTitle} from "../result-preview/result-preview"; +import { + Author, + HostedByCollectedFrom, + Journal, + OARoutes, + Organization, + Project, + ResultTitle +} from "../result-preview/result-preview"; import {Measure, Metric} from "./resultLandingInfo"; export class SearchResult { @@ -66,6 +74,9 @@ export class SearchResult { types: string[]; enermapsId: string; + oaRoutes: OARoutes; + publiclyFunded: boolean; + constructor() { } diff --git a/utils/result-preview/result-preview.component.html b/utils/result-preview/result-preview.component.html index 2e1e2358..e67e8eef 100644 --- a/utils/result-preview/result-preview.component.html +++ b/utils/result-preview/result-preview.component.html @@ -85,7 +85,8 @@ [embargoEndDate]="result.embargoEndDate" [publisher]="result.publisher" [countries]="result.countries" [languages]="result.languages" [programmingLanguages]="result.programmingLanguages" - [compatibilityString]="result.compatibility" [type]="type" [projects]="result.projects" + [compatibilityString]="result.compatibility" [type]="type" + [publiclyFunded]="result.publiclyFunded" [projects]="result.projects" [subjects]="showSubjects?result.subjects:null" [organizations]="showOrganizations?result.organizations:null" [relationName]="relationName" [provenanceAction]="provenanceAction" [prevPath]="prevPath" > diff --git a/utils/result-preview/result-preview.ts b/utils/result-preview/result-preview.ts index 11ee68c5..542e34f2 100644 --- a/utils/result-preview/result-preview.ts +++ b/utils/result-preview/result-preview.ts @@ -12,6 +12,7 @@ export interface HostedByCollectedFrom { accessRightIcon: string; license?: string; fulltext?: string; + peerReviewed?: boolean; } export interface Journal { @@ -72,6 +73,12 @@ export interface Organization { trust?: number; } +export interface OARoutes { + green: boolean; + oaColor: "gold" | "hybrid" | "bronze"; + isInDiamondJournal: boolean; +} + export class ResultPreview { objId: string; relcanId: string; @@ -148,6 +155,9 @@ export class ResultPreview { //enermaps id - image enermapsId: string; + oaRoutes: OARoutes; + publiclyFunded: boolean; + public static searchResultConvert(result: SearchResult, type: string): ResultPreview { let resultPreview: ResultPreview = new ResultPreview(); resultPreview.id = result.id; @@ -207,6 +217,9 @@ export class ResultPreview { resultPreview.enermapsId = result.enermapsId; resultPreview.measure = result.measure; resultPreview.hostedBy_collectedFrom = result.hostedBy_collectedFrom; + + resultPreview.oaRoutes = result.oaRoutes; + resultPreview.publiclyFunded = result.publiclyFunded; return resultPreview; } @@ -234,6 +247,9 @@ export class ResultPreview { resultPreview.resultType = type; resultPreview.identifiers = result.identifiers; resultPreview.hostedBy_collectedFrom = result.hostedBy_collectedFrom; + + resultPreview.oaRoutes = result.oaRoutes; + resultPreview.publiclyFunded = result.publiclyFunded; return resultPreview; }