import {Component, Input} from "@angular/core"; import {EnvProperties} from "../../utils/properties/env-properties"; import {properties} from "../../../../environments/environment"; import {OpenaireEntities} from "../../utils/properties/searchFields"; import {Organization, Project} from "../../utils/result-preview/result-preview"; @Component({ selector: 'entity-metadata', template: `
`, styleUrls: ['entity-metadata.component.less'] }) export class EntityMetadataComponent { @Input() entityType: string; @Input() types: string[]; @Input() year: string; // search result @Input() startDate: number; // project landing @Input() startYear: string; // search result @Input() endDate: number; // project landing @Input() endYear: string; // search result @Input() currentDate: number; // project landing @Input() status: string; // project landing @Input() openAccessMandatePublications: boolean // project landing @Input() openAccessMandateDatasets: boolean // project landing @Input() date: Date; @Input() embargoEndDate: Date | string; @Input() underCuration: boolean = false; @Input() publisher; // showPublisher component @Input() journal; // showPublisher component @Input() countries; @Input() languages; @Input() programmingLanguages; @Input() compatibilityString: string; @Input() compatibility; // data provider landing @Input() aggregationStatus; // data provider landing @Input() thematic: boolean; // data provider landing @Input() type; // data provider landing @Input() provenanceAction: string; // search result @Input() relationName: string; // search result @Input() projects: Project[]; @Input() organizations: Organization[]; @Input() subjects: string[]; properties: EnvProperties = properties; public openaireEntities = OpenaireEntities; public removeUnknown(array: string[], type: boolean = false): string[] { if (type) { return this.removeDuplicates(array).filter(value => value.toLowerCase() !== 'unknown'); } else { return array.filter(value => value.toLowerCase() !== 'unknown'); } } public removeDuplicates(array: string[]): string[] { return array.filter(value => value.toLowerCase() !== this.entityType); } public buildCurationTooltip(): string { let tooltipContent: string = "Bibliographic record accepted by the system, but not yet processed by
OpenAIRE tools for information quality improvement and de-duplication