[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 {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 {Injectable} from '@angular/core';
|
||||||
import {properties} from "../../../../environments/environment";
|
import {properties} from "../../../../environments/environment";
|
||||||
import {StringUtils} from "../../utils/string-utils.class";
|
import {StringUtils} from "../../utils/string-utils.class";
|
||||||
|
@ -653,16 +653,8 @@ export class ParsingFunctions {
|
||||||
return [subjects, otherSubjects, classifiedSubjects, fos, sdg];
|
return [subjects, otherSubjects, classifiedSubjects, fos, sdg];
|
||||||
}
|
}
|
||||||
|
|
||||||
parseContexts(_contexts: any): {
|
parseContexts(_contexts: any): Context[] {
|
||||||
"labelContext": string, "idContext": string,
|
let contexts = new Array<Context>();
|
||||||
"labelCategory": string, "idCategory": string,
|
|
||||||
"labelConcept": string, "idConcept": string
|
|
||||||
}[] {
|
|
||||||
let contexts = new Array<{
|
|
||||||
"labelContext": string, "idContext": string,
|
|
||||||
"labelCategory": string, "idCategory": string,
|
|
||||||
"labelConcept": string, "idConcept": string
|
|
||||||
}>();
|
|
||||||
|
|
||||||
let position = 0;
|
let position = 0;
|
||||||
let labels = "";
|
let labels = "";
|
||||||
|
|
|
@ -18,6 +18,17 @@ export interface Reference {
|
||||||
ids: Id[];
|
ids: Id[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface Context {
|
||||||
|
labelContext: string;
|
||||||
|
idContext: string;
|
||||||
|
labelCategory: string;
|
||||||
|
idCategory: string;
|
||||||
|
labelConcept: string;
|
||||||
|
idConcept: string;
|
||||||
|
link?: string;
|
||||||
|
logo?: string;
|
||||||
|
}
|
||||||
|
|
||||||
export class ResultLandingInfo {
|
export class ResultLandingInfo {
|
||||||
relcanId;
|
relcanId;
|
||||||
objIdentifier: string;
|
objIdentifier: string;
|
||||||
|
@ -112,9 +123,7 @@ export class ResultLandingInfo {
|
||||||
relatedResults: RelationResult[];
|
relatedResults: RelationResult[];
|
||||||
relatedClassFilters: Set<string> = new Set();
|
relatedClassFilters: Set<string> = new Set();
|
||||||
|
|
||||||
contexts: { "labelContext": string, "idContext": string,
|
contexts: Context[];
|
||||||
"labelCategory": string, "idCategory": string,
|
|
||||||
"labelConcept": string, "idConcept": string}[];
|
|
||||||
|
|
||||||
deletedByInferenceIds: string[];
|
deletedByInferenceIds: string[];
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue