Merge develop branch into new-search-json

This commit is contained in:
Konstantina Galouni 2024-10-29 16:25:17 +02:00
commit c697f4b27d
6 changed files with 14 additions and 5 deletions

View File

@ -22,7 +22,7 @@
(selectionChange)="entityChanged($event);advanced.focusNext(input, $event)"
(disableSelectEmitter)="disableSelectChange($event)"
[onChangeNavigate]="false"></entities-selection>
<div input #input class="uk-width-expand" placeholder="Scholary works" [searchable]="true"
<div input #input class="uk-width-expand" placeholder="Scholarly works" [searchable]="true"
[hint]="'Search in OpenAIRE'" [(value)]="keyword"></div>
</advanced-search-input>
</div>

View File

@ -28,7 +28,7 @@ export class ParsingFunctions {
public open = 'open_access';
public closed = 'closed_access';
public unknown = 'unknown_access';
public identifierTypes = ["doi", "pmc" , "handle", "pmid", "re3data", "swhid", "ROR", "ISNI", "Wikidata", "FundRef"];
public identifierTypes = ["doi", "pmc" , "handle", "pmid", "re3data", "swhid", "ROR", "ISNI", "Wikidata", "FundRef", "RRID"];
//TODO what are the names of Identifiers types e.g doi = Digital Object Identifier
// public identifierTypes = ["Digital Object Identifier", "pmc", "Handle", "PubMed ID", "re3data", "swhid",
// "ROR", "International Standard Name Identifier", "Wikidata", "FundRef"];

View File

@ -138,6 +138,8 @@ export class ShowIdentifiersComponent implements AfterViewInit {
return properties.wikiDataURL;
} else if(key == "FundRef") {
return properties.fundRefURL;
} else if(key == "RRID") {
return properties.rridURL;
}
}

View File

@ -51,6 +51,7 @@ export interface EnvProperties {
isniURL?: string;
wikiDataURL?: string;
fundRefURL?: string;
rridURL?: string;
fairSharingURL?: string,
openScienceCloudURL?: string,
eoscMarketplaceURL?: string,

View File

@ -24,6 +24,7 @@ export let common: EnvProperties = {
isniURL: "https://isni.org/isni/",
wikiDataURL: "https://www.wikidata.org/wiki/",
fundRefURL: "https://data.crossref.org/fundingdata/funder/",
rridURL: "https://scicrunch.org/resolver/",
fairSharingURL: "https://fairsharing.org/",
openScienceCloudURL: "https://open-science-cloud.ec.europa.eu/resources/services/",
sherpaURL: "http://sherpa.ac.uk/romeo/issn/",
@ -104,7 +105,6 @@ export let commonDev: EnvProperties = {
claimsAPIURL: "http://dl170.madgik.di.uoa.gr:19780/uoa-claims-service/claimsService/",
searchAPIURLLAst: "http://beta.services.openaire.eu:8480/test/rest/v2/api/",
searchResourcesAPIURL: "http://beta.services.openaire.eu:8480/test/rest/v2/api/resources",
openCitationsAPIURL: "https://services.openaire.eu/opencitations/getCitations?id=",
csvAPIURL: "https://beta.services.openaire.eu/search/v2/api/reports",
orcidAPIURL: "http://dl170.madgik.di.uoa.gr:19480/uoa-orcid-service/",

View File

@ -150,7 +150,7 @@ export class DOI {
}
export class Identifier {
class: "doi" | "pmc" | "pmid" | "handle" | "ORCID" | "re3data" | "swhid" | "ror" | "wikidata" | "fundref" | "isni" = null;
class: "doi" | "pmc" | "pmid" | "handle" | "ORCID" | "re3data" | "swhid" | "ror" | "wikidata" | "fundref" | "isni" | "RRID" = null;
id: string;
public static getDOIsFromString(str: string): string[] {
@ -213,13 +213,15 @@ export class Identifier {
return {"class": "wikidata", "id": pid};
} else if (Identifier.isValidIsni(pid)) {
return {"class": "isni", "id": pid};
} else if(Identifier.isValidRrid(pid)) {
return {"class": "RRID", "id": pid};
}
//set it as a doi, to catch the case that doi has not valid format
return (strict?null:{"class": "doi", "id": pid});
}
public static getPIDFromIdentifiers(identifiers: Map<string, string[]>): Identifier {
let classes:string [] = ["doi", "handle", "pmc", "pmid", "re3data", "swhid", "ror", "wikidata", "fundref", "isni"];
let classes:string [] = ["doi", "handle", "pmc", "pmid", "re3data", "swhid", "ror", "wikidata", "fundref", "isni", "rrid"];
if(identifiers && identifiers.size > 0) {
for (let cl of classes) {
if (identifiers.get(cl)) {
@ -303,6 +305,10 @@ export class Identifier {
return str.match(exp) != null;
}
public static isValidRrid(str: string): boolean {
let exp = /^RRID:.*$/g;
return str.match(exp) != null;
}
}
export class StringUtils {