openaire-library/utils/entities/dataProviderInfo.ts

201 lines
9.2 KiB
TypeScript
Raw Normal View History

import {properties} from "../../../../environments/environment";
export class DataproviderProvenance {
provenance: Map<string, {"urlPrefix": string, "name": string}>;
constructor() {
this.provenance = new Map();
this.provenance.set("opendoar____::", {"urlPrefix": properties.openDoarURL, "name": "OpenDOAR"});//, "idRegexPrefix": ""});
this.provenance.set("re3data_____::", {"urlPrefix": properties.r3DataURL, "name": "re3data.org"});
this.provenance.set("fairsharing_::", {"urlPrefix": properties.fairSharingURL, "name": "FAIRsharing"});
this.provenance.set("eosc________::", {"urlPrefix": properties.eoscMarketplaceURL, "name": "EOSC Service Catalogue"});
}
}
export class DataProviderInfo {
[Library | new-theme]: Allow also ?pid url parameter in datasource landing | Fixes in newSearchPage for service filters. 1. dataProvider.component.ts: [Bug fix] Allow also ?pid url parameter, query accordingly and set canonicalUrl to use it in seoService and scema2jsonld. 2. dataProvider.component.html: Set canonicalUrl into URL of <schema2jsonld> | Use <landing-header> instead of <showTitle>. 3. dataProvider.service.ts: Set url for querying a datasource by pid (if ?pid in landing url param) and parse also the whole record, the objIdentifier and the relcanId. 4. landing-header.component.ts: Added @Input() isSticky: boolean = false; to set less margins when sticky. 5. resultLanding.component.html: Use <landing-header> instead of <showTitle>. 6. resultLanding.component.ts: Use renamed Identifier.getResultPIDFromIdentifiers --> Identifier.getPIDFromIdentifiers. 7. metrics.service.ts: Removed console.log. 8. searchDataproviders.service.ts: Added parsing for relcanId. 9. dataProviderInfo.ts: Added relcanId, objIdentifier, record. 10. result-preview.component.ts: Use renamed Identifier.getResultPIDFromIdentifiers --> Identifier.getPIDFromIdentifiers. 11. string-utils.class.ts: Renamed Identifier.getResultPIDFromIdentifiers --> Identifier.getPIDFromIdentifiers. 12. [SITEMAPS] extractUrlsFromSearch.ts: Use renamed Identifier.getResultPIDFromIdentifiers --> Identifier.getPIDFromIdentifiers. 13. newSearchPage.component.ts: [Bug fix] a. entityType for datasources is "dataprovider". b. Added service filter options only when entityType == "service".
2022-05-30 09:39:10 +02:00
relcanId;
objIdentifier: string;
record;
title: { "name": string, "url": string };
officialName: string;
type: string;
registry: boolean;
compatibility: { "info": string, "name": string, "id": string };
oaiPmhURL: string;
openDoarId: string;
r3DataId: string;
provenance: Map<string, {"url": string[]}>;
originalId: string;
countries: string[];
journal: {"journal": "", "issn": string, "lissn": string, "eissn": string};
description: string[] = [];
subjects: string[];
jurisdiction: string;
thematic: boolean;
contentpolicy: string;
identifiers: Map<string, string[]>; //key is the classname
fundedContent: string; // search query
//collected from datasource api
// aggregationStatus: {"fundedContent": string, "indexRecords": string, "fulltexts": string, "lastUpdateDate": string};
aggregationStatus: {"fulltexts": string};
tabs: {"name": string, "content": string}[];
tabs2: string[] =[];
tabsInTypes = {
"publicationsTab": new Set<string>(
[ "aggregator::datarepository",
"aggregator::pubsrepository::institutional",
"aggregator::pubsrepository::unknown",
"aggregator::pubsrepository::journals",
"crissystem",
"datarepository::unknown",
"infospace",
"pubsrepository::institutional",
"pubsrepository::journal",
"pubsrepository::unknown",
"scholarcomminfra",
"pubsrepository::thematic",
"pubscatalogue::unknown",
"orprepository"
]),
"datasetsTab": new Set<string>(
[ "aggregator::datarepository",
"aggregator::pubsrepository::institutional",
"aggregator::pubsrepository::unknown",
"aggregator::pubsrepository::journals",
"crissystem",
"datarepository::unknown",
"infospace",
"pubsrepository::institutional",
"pubsrepository::journal",
"pubsrepository::unknown",
"scholarcomminfra",
"pubsrepository::thematic",
"pubscatalogue::unknown",
"orprepository"
]),
"statisticsTab": new Set<string>(
[ "aggregator::datarepository",
"aggregator::pubsrepository::institutional",
"aggregator::pubsrepository::unknown",
"aggregator::pubsrepository::journals",
"crissystem",
"datarepository::unknown",
"pubsrepository::institutional",
"pubsrepository::journal",
"pubsrepository::unknown",
"pubsrepository::thematic",
"pubscatalogue::unknown",
"orprepository"
]),
// "organizationsTab": new Set<string>(
// [ "entityregistry::projects",
// "entityregistry::repositories"
// ]),
"projectsTab": new Set<string>(["entityregistry::projects"]),
"datasourcesTab": new Set<string>(["entityregistry::repositories"]),
"relatedDatasourcesTab": new Set<string>(
[ "aggregator::pubsrepository::unknown",
"aggregator::pubsrepository::journals",
"aggregator::pubsrepository::institutional",
"aggregator::datarepository"
]),
"softwareTab": new Set<string>(
[
"aggregator::datarepository",
"aggregator::pubsrepository::institutional",
"aggregator::pubsrepository::unknown",
"aggregator::pubsrepository::journals",
"crissystem",
"datarepository::unknown",
"infospace",
"pubsrepository::institutional",
"pubsrepository::journal",
"pubsrepository::unknown",
"scholarcomminfra",
"pubsrepository::thematic",
"pubscatalogue::unknown",
"softwarerepository",
"aggregator::softwarerepository",
"orprepository"
]),
"orpsTab": new Set<string>(
[
"aggregator::datarepository",
"aggregator::pubsrepository::institutional",
"aggregator::pubsrepository::unknown",
"aggregator::pubsrepository::journals",
"crissystem",
"datarepository::unknown",
"infospace",
"pubsrepository::institutional",
"pubsrepository::journal",
"pubsrepository::unknown",
"scholarcomminfra",
"pubsrepository::thematic",
"pubscatalogue::unknown",
"softwarerepository",
"aggregator::softwarerepository",
"orprepository"
]),
"metricsTab": new Set<string>(
[ "aggregator::datarepository",
"aggregator::pubsrepository::institutional",
"aggregator::pubsrepository::unknown",
"aggregator::pubsrepository::journals",
"crissystem",
"datarepository::unknown",
"infospace",
"pubsrepository::institutional",
"pubsrepository::journal",
"websource",
"pubsrepository::unknown",
"scholarcomminfra",
"pubsrepository::thematic",
"pubscatalogue::unknown",
"softwarerepository",
"aggregator::softwarerepository",
"orprepository"
])
};
resultsBy: string;
resultTypes = {
"collectedFrom": new Set<string>(
[ "aggregator::datarepository",
"aggregator::pubsrepository::institutional",
"aggregator::pubsrepository::unknown",
"aggregator::pubsrepository::journals",
"entityregistry::projects",
"entityregistry::repositories",
"infospace",
"scholarcomminfra",
"pubscatalogue::unknown",
"aggregator::softwarerepository"
]),
"hostedBy": new Set<string>(
[ "crissystem",
"datarepository::unknown",
"pubsrepository::institutional",
"pubsrepository::journal",
"pubsrepository::unknown",
"pubsrepository::thematic",
"softwarerepository",
"orprepository"
])
};
organizations: {"acronym": string, "name": string, "id": string}[] = [];
//publications: any;
//datasets: any;
statistics: any;
//projects: any;
datasources: any;
//relatedDatasources: Map<string, {"name": string, "countPublications": string, "countDatasets": string, "countSoftware": string, "countOrps": string}>;
relatedDatasources: {"id": string, "name": string, "count": number}[] = [];
}