[angular-16-irish-monitor | DONE | ADDED]: Added parsing of peer-reviewed (refereed on instances), publicly funded and OA Routes (green, oa color, diamond journal) | Display peer-reviewed on instances and publicly funded (and projects) in metadata line (entity-metadata).

1. feedback.component.html & resultLanding.component.html: In <landing-header> added parameters publiclyFunded and projects.
2. landing-header.component.ts & result-preview.component.html: In <entity-metadata> added parameters publiclyFunded and projects | Added field @Input() publiclyFunded.
3. availableOn.component.ts: Display peer-reviewed.
4. entity-metadata.component.ts: Display publicly funded | Added field @Input() publiclyFunded: boolean.
5. parsingFunctions.class.ts: Added parsing of peer-reviewed (instance.refereed).
6. resultLanding.service.ts & searchResearchResults.service.ts: Added parsing of publicly funded and OA Routes (green, oa color, diamond journal).
7. resultLandingInfo.ts & searchResult.ts: In ResultLandingInfo and in SearchResult added fields oaRoutes: OARoutes; and publiclyFunded: boolean;
8. result-preview.ts: In HostedByCollectedFrom added field peerReviewed?: boolean; | Set interface OARoutes | In ResultPreview added fields oaRoutes: OARoutes; and publiclyFunded: boolean; | In methods "searchResultConvert()" and "resultLandingInfoConvert()" set oaRoutes and publiclyFunded.
This commit is contained in:
Konstantina Galouni 2023-12-20 23:55:00 +02:00
parent bbe1ced87a
commit 51dbad03d7
12 changed files with 81 additions and 8 deletions

View File

@ -9,7 +9,8 @@
<landing-header *ngIf="resultLandingInfo" [properties]="properties" [title]="title"
[subTitle]="resultLandingInfo.subtitle" [underCuration]="resultLandingInfo.underCurationMessage"
[entityType]="entityType" [types]="resultLandingInfo.types"
[year]="resultLandingInfo.date" [embargoEndDate]="resultLandingInfo.embargoEndDate">
[year]="resultLandingInfo.date" [embargoEndDate]="resultLandingInfo.embargoEndDate"
[publiclyFunded]="resultLandingInfo.publiclyFunded" [projects]="resultLandingInfo.fundedByProjects">
</landing-header>
<landing-header *ngIf="organizationInfo" [properties]="properties" [title]="title"
[subTitle]="(organizationInfo.name && organizationInfo.title.name !== organizationInfo.name)?organizationInfo.name:null"

View File

@ -82,10 +82,12 @@ import {RouterHelper} from "../../utils/routerHelper.class";
{{instance.downloadNames.join("; ")}}
</a>
</span>
<div *ngIf="instance.types?.length > 0 || instance.years?.length > 0" class="uk-text-meta">
<div *ngIf="instance.types?.length > 0 || instance.years?.length > 0 || instance.peerReviewed" class="uk-text-meta">
<span *ngIf="instance.types?.length > 0" class="uk-text-capitalize">{{instance.types.join(" . ")}}</span>
<span *ngIf="instance.types?.length > 0 && instance.years?.length > 0"> . </span>
<span *ngIf="instance.years?.length > 0">{{instance.years.join(" . ")}}</span>
<span *ngIf="(instance.types?.length > 0 || instance.years?.length > 0) && instance.peerReviewed"> . </span>
<span *ngIf="instance.peerReviewed">Peer-reviewed</span>
</div>
<div *ngIf="instance.license" class="uk-text-meta uk-text-truncate" uk-tooltip [title]="instance.license">
License:

View File

@ -148,6 +148,9 @@ import {RouterHelper} from "../../utils/routerHelper.class";
<ng-container *ngIf="thematic">
<span>Thematic</span>
</ng-container>
<ng-container *ngIf="publiclyFunded">
<span>Publicly funded</span>
</ng-container>
<!-- Projects -->
<span *ngIf="projects && projects.length > 0"
[attr.uk-tooltip]="projects.length > projectsLimit ? 'cls: uk-invisible' : 'pos: top; cls: uk-active'" title="Funded by">
@ -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[];

View File

@ -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"
></entity-metadata>
</div>
<div *ngIf="authors">
@ -63,5 +63,6 @@ export class LandingHeaderComponent {
@Input() type; // data provider landing
@Input() prevPath: string = "";
@Input() countries;
@Input() publiclyFunded;
@Input() projects;
}

View File

@ -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);
}

View File

@ -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">
</landing-header>
<!-- Labels -->
@ -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">
</landing-header>
<div class="uk-text-small">

View File

@ -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")) {

View File

@ -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;

View File

@ -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[];

View File

@ -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() {
}

View File

@ -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"
></entity-metadata>

View File

@ -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;
}