Merge develop branch into new-search-json
This commit is contained in:
commit
c697f4b27d
|
@ -22,7 +22,7 @@
|
||||||
(selectionChange)="entityChanged($event);advanced.focusNext(input, $event)"
|
(selectionChange)="entityChanged($event);advanced.focusNext(input, $event)"
|
||||||
(disableSelectEmitter)="disableSelectChange($event)"
|
(disableSelectEmitter)="disableSelectChange($event)"
|
||||||
[onChangeNavigate]="false"></entities-selection>
|
[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>
|
[hint]="'Search in OpenAIRE'" [(value)]="keyword"></div>
|
||||||
</advanced-search-input>
|
</advanced-search-input>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -28,7 +28,7 @@ export class ParsingFunctions {
|
||||||
public open = 'open_access';
|
public open = 'open_access';
|
||||||
public closed = 'closed_access';
|
public closed = 'closed_access';
|
||||||
public unknown = 'unknown_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
|
//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",
|
// public identifierTypes = ["Digital Object Identifier", "pmc", "Handle", "PubMed ID", "re3data", "swhid",
|
||||||
// "ROR", "International Standard Name Identifier", "Wikidata", "FundRef"];
|
// "ROR", "International Standard Name Identifier", "Wikidata", "FundRef"];
|
||||||
|
|
|
@ -138,6 +138,8 @@ export class ShowIdentifiersComponent implements AfterViewInit {
|
||||||
return properties.wikiDataURL;
|
return properties.wikiDataURL;
|
||||||
} else if(key == "FundRef") {
|
} else if(key == "FundRef") {
|
||||||
return properties.fundRefURL;
|
return properties.fundRefURL;
|
||||||
|
} else if(key == "RRID") {
|
||||||
|
return properties.rridURL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -51,6 +51,7 @@ export interface EnvProperties {
|
||||||
isniURL?: string;
|
isniURL?: string;
|
||||||
wikiDataURL?: string;
|
wikiDataURL?: string;
|
||||||
fundRefURL?: string;
|
fundRefURL?: string;
|
||||||
|
rridURL?: string;
|
||||||
fairSharingURL?: string,
|
fairSharingURL?: string,
|
||||||
openScienceCloudURL?: string,
|
openScienceCloudURL?: string,
|
||||||
eoscMarketplaceURL?: string,
|
eoscMarketplaceURL?: string,
|
||||||
|
|
|
@ -24,6 +24,7 @@ export let common: EnvProperties = {
|
||||||
isniURL: "https://isni.org/isni/",
|
isniURL: "https://isni.org/isni/",
|
||||||
wikiDataURL: "https://www.wikidata.org/wiki/",
|
wikiDataURL: "https://www.wikidata.org/wiki/",
|
||||||
fundRefURL: "https://data.crossref.org/fundingdata/funder/",
|
fundRefURL: "https://data.crossref.org/fundingdata/funder/",
|
||||||
|
rridURL: "https://scicrunch.org/resolver/",
|
||||||
fairSharingURL: "https://fairsharing.org/",
|
fairSharingURL: "https://fairsharing.org/",
|
||||||
openScienceCloudURL: "https://open-science-cloud.ec.europa.eu/resources/services/",
|
openScienceCloudURL: "https://open-science-cloud.ec.europa.eu/resources/services/",
|
||||||
sherpaURL: "http://sherpa.ac.uk/romeo/issn/",
|
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/",
|
claimsAPIURL: "http://dl170.madgik.di.uoa.gr:19780/uoa-claims-service/claimsService/",
|
||||||
searchAPIURLLAst: "http://beta.services.openaire.eu:8480/test/rest/v2/api/",
|
searchAPIURLLAst: "http://beta.services.openaire.eu:8480/test/rest/v2/api/",
|
||||||
searchResourcesAPIURL: "http://beta.services.openaire.eu:8480/test/rest/v2/api/resources",
|
searchResourcesAPIURL: "http://beta.services.openaire.eu:8480/test/rest/v2/api/resources",
|
||||||
|
|
||||||
openCitationsAPIURL: "https://services.openaire.eu/opencitations/getCitations?id=",
|
openCitationsAPIURL: "https://services.openaire.eu/opencitations/getCitations?id=",
|
||||||
csvAPIURL: "https://beta.services.openaire.eu/search/v2/api/reports",
|
csvAPIURL: "https://beta.services.openaire.eu/search/v2/api/reports",
|
||||||
orcidAPIURL: "http://dl170.madgik.di.uoa.gr:19480/uoa-orcid-service/",
|
orcidAPIURL: "http://dl170.madgik.di.uoa.gr:19480/uoa-orcid-service/",
|
||||||
|
|
|
@ -150,7 +150,7 @@ export class DOI {
|
||||||
}
|
}
|
||||||
|
|
||||||
export class Identifier {
|
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;
|
id: string;
|
||||||
|
|
||||||
public static getDOIsFromString(str: string): string[] {
|
public static getDOIsFromString(str: string): string[] {
|
||||||
|
@ -213,13 +213,15 @@ export class Identifier {
|
||||||
return {"class": "wikidata", "id": pid};
|
return {"class": "wikidata", "id": pid};
|
||||||
} else if (Identifier.isValidIsni(pid)) {
|
} else if (Identifier.isValidIsni(pid)) {
|
||||||
return {"class": "isni", "id": 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
|
//set it as a doi, to catch the case that doi has not valid format
|
||||||
return (strict?null:{"class": "doi", "id": pid});
|
return (strict?null:{"class": "doi", "id": pid});
|
||||||
}
|
}
|
||||||
|
|
||||||
public static getPIDFromIdentifiers(identifiers: Map<string, string[]>): Identifier {
|
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) {
|
if(identifiers && identifiers.size > 0) {
|
||||||
for (let cl of classes) {
|
for (let cl of classes) {
|
||||||
if (identifiers.get(cl)) {
|
if (identifiers.get(cl)) {
|
||||||
|
@ -303,6 +305,10 @@ export class Identifier {
|
||||||
return str.match(exp) != null;
|
return str.match(exp) != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static isValidRrid(str: string): boolean {
|
||||||
|
let exp = /^RRID:.*$/g;
|
||||||
|
return str.match(exp) != null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class StringUtils {
|
export class StringUtils {
|
||||||
|
|
Loading…
Reference in New Issue