import {properties} from "../../../../environments/environment"; import {BelongsTo, Measure} from "./resultLandingInfo"; export class DataproviderProvenance { provenance: Map; 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 Resource Hub" }); } } export class DataProviderInfo { 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; originalId: string; countries: string[]; journal: { "journal": "", "issn": string, "lissn": string, "eissn": string }; description: string; subjects: string[]; jurisdiction: string; thematic: boolean; contentpolicy: string; identifiers: Map; //key is the classname fundedContent: string; // search query measure: Measure; //collected from datasource api // aggregationStatus: {"fundedContent": string, "indexRecords": string, "fulltexts": string, "lastUpdateDate": string}; aggregationStatus: { "fulltexts": string }; /** @deprecated*/ tabs: { "name": string, "content": string }[]; /** @deprecated*/ tabs2: string[] = []; /** @deprecated*/ tabsInTypes = { "publicationsTab": new Set( ["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( ["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( ["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( // [ "entityregistry::projects", // "entityregistry::repositories" // ]), "projectsTab": new Set(["entityregistry::projects"]), "datasourcesTab": new Set(["entityregistry::repositories"]), "relatedDatasourcesTab": new Set( ["aggregator::pubsrepository::unknown", "aggregator::pubsrepository::journals", "aggregator::pubsrepository::institutional", "aggregator::datarepository" ]), "softwareTab": new Set( [ "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( [ "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( ["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( ["aggregator::datarepository", "aggregator::pubsrepository::institutional", "aggregator::pubsrepository::unknown", "aggregator::pubsrepository::journals", "entityregistry::projects", "entityregistry::repositories", "infospace", "scholarcomminfra", "pubscatalogue::unknown", "aggregator::softwarerepository" ]), "hostedBy": new Set( ["crissystem", "datarepository::unknown", "pubsrepository::institutional", "pubsrepository::journal", "pubsrepository::unknown", "pubsrepository::thematic", "softwarerepository", "orprepository" ]) }; organizations: { "acronym": string, "name": string, "id": string }[] = []; //publications: any; //datasets: any; /** @deprecated*/ statistics: any; //projects: any; /** @deprecated*/ datasources: any; //relatedDatasources: Map; // Search query relatedDatasources: { "id": string, "name": string, "count": number }[] = []; belongsTo: boolean = true; message: string; setBelongsTo(id: string) { this.belongsTo = !BelongsTo.datasource || BelongsTo.datasource.fields.findIndex(field => BelongsTo.check(this, field)) != -1; this.message = !this.belongsTo ? BelongsTo.datasource.message : null; if (this.message) { this.message = this.message.replace('((id))', id); } } }