[Library | new-theme]: resultLandingInfo.ts: Added export interface Context and set in ResultLandingInfo class contexts: Context[]; | parsingFunctions.class.ts: In method "parseContexts()" use interface Context.
This commit is contained in:
parent
d6e9ce2a5c
commit
84b3a8b75d
|
@ -1,5 +1,5 @@
|
|||
import {HostedByCollectedFrom, Journal, Project, RelationResult} from "../../utils/result-preview/result-preview";
|
||||
import {Reference} from "../../utils/entities/resultLandingInfo";
|
||||
import {Context, Reference} from "../../utils/entities/resultLandingInfo";
|
||||
import {Injectable} from '@angular/core';
|
||||
import {properties} from "../../../../environments/environment";
|
||||
import {StringUtils} from "../../utils/string-utils.class";
|
||||
|
@ -653,16 +653,8 @@ export class ParsingFunctions {
|
|||
return [subjects, otherSubjects, classifiedSubjects, fos, sdg];
|
||||
}
|
||||
|
||||
parseContexts(_contexts: any): {
|
||||
"labelContext": string, "idContext": string,
|
||||
"labelCategory": string, "idCategory": string,
|
||||
"labelConcept": string, "idConcept": string
|
||||
}[] {
|
||||
let contexts = new Array<{
|
||||
"labelContext": string, "idContext": string,
|
||||
"labelCategory": string, "idCategory": string,
|
||||
"labelConcept": string, "idConcept": string
|
||||
}>();
|
||||
parseContexts(_contexts: any): Context[] {
|
||||
let contexts = new Array<Context>();
|
||||
|
||||
let position = 0;
|
||||
let labels = "";
|
||||
|
|
|
@ -18,6 +18,17 @@ export interface Reference {
|
|||
ids: Id[];
|
||||
}
|
||||
|
||||
export interface Context {
|
||||
labelContext: string;
|
||||
idContext: string;
|
||||
labelCategory: string;
|
||||
idCategory: string;
|
||||
labelConcept: string;
|
||||
idConcept: string;
|
||||
link?: string;
|
||||
logo?: string;
|
||||
}
|
||||
|
||||
export class ResultLandingInfo {
|
||||
relcanId;
|
||||
objIdentifier: string;
|
||||
|
@ -112,9 +123,7 @@ export class ResultLandingInfo {
|
|||
relatedResults: RelationResult[];
|
||||
relatedClassFilters: Set<string> = new Set();
|
||||
|
||||
contexts: { "labelContext": string, "idContext": string,
|
||||
"labelCategory": string, "idCategory": string,
|
||||
"labelConcept": string, "idConcept": string}[];
|
||||
contexts: Context[];
|
||||
|
||||
deletedByInferenceIds: string[];
|
||||
|
||||
|
|
Loading…
Reference in New Issue