Compare commits

..

No commits in common. "master" and "orcid-openaireId-claim" have entirely different histories.

17 changed files with 116 additions and 117 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="Scholarly works" [searchable]="true"
<div input #input class="uk-width-expand" placeholder="Scholary works" [searchable]="true"
[hint]="'Search in OpenAIRE'" [(value)]="keyword"></div>
</advanced-search-input>
</div>

View File

@ -19,7 +19,7 @@
<li *ngFor="let result of results">
<result-preview [properties]="properties" [showOrganizations]="true"
[showSubjects]="true" [result]="getResultPreview(result)" [promoteWebsiteURL]="true"
[isCard]="true" deposit="true" [isMobile]="isMobile" [compactView]="compactView">
[isCard]="true" deposit="true" [isMobile]="isMobile">
</result-preview>
</li>
</ul>

View File

@ -20,7 +20,7 @@ export class SearchResultsInDepositComponent {
@Input() type: string;
@Input() properties:EnvProperties = properties;
@Input() isMobile: boolean = false;
@Input() compactView: boolean = false;
public urlParam: string;
public linkToAdvancedSearchPage: string;

View File

@ -191,9 +191,7 @@ export class DataProviderComponent {
this.fetchOrps = new FetchResearchResults(this._searchResearchResultsService);
this.fetchProjects = new FetchProjects(this._searchProjectsService);
this.fetchDataproviders = new FetchDataproviders(this._searchDataprovidersService);
if(route.snapshot.data && route.snapshot.data['type']) {
this.type = route.snapshot.data['type'];
}
}
ngOnInit() {

View File

@ -598,8 +598,7 @@ export class ParsingFunctions {
if (pid.hasOwnProperty("classid") && pid['classid'] != "") {
if (pid.classid == "doi" || pid.classid == "pmc" || pid.classid == "handle" || pid.classid == "pmid" || pid.classid == "re3data"
|| pid.classid == "swhid"
|| pid.classid == "ROR" || pid.classid == "ISNI" || pid.classid == "Wikidata" || pid.classid == "FundRef"
|| pid.classid == "RRID") {
|| pid.classid == "ROR" || pid.classid == "ISNI" || pid.classid == "Wikidata" || pid.classid == "FundRef") {
if (!identifiers.has(pid.classid)) {
identifiers.set(pid.classid, new Array<string>());
}
@ -609,8 +608,7 @@ export class ParsingFunctions {
for (let i = 0; i < pid.length; i++) {
if (pid[i].classid == "doi" || pid[i].classid == "pmc" || pid[i].classid == "handle" || pid[i].classid == "pmid" || pid[i].classid == "re3data"
|| pid[i].classid == "swhid"
|| pid[i].classid == "ROR" || pid[i].classid == "ISNI" || pid[i].classid == "Wikidata" || pid[i].classid == "FundRef"
|| pid[i].classid == "RRID") {
|| pid[i].classid == "ROR" || pid[i].classid == "ISNI" || pid[i].classid == "Wikidata" || pid[i].classid == "FundRef") {
if (!identifiers.has(pid[i].classid)) {
identifiers.set(pid[i].classid, new Array<string>());
}

View File

@ -27,7 +27,7 @@ import {properties} from "../../../../environments/environment";
<span [class.uk-margin-small-left]="modal">
<ng-container *ngFor="let item of identifiers.get(key) let j=index">
<a *ngIf="key == 'doi' || key == 'pmc' || key == 'pmid' || key == 'handle' || key == 're3data' || key == 'swhid'
|| key == 'ROR' || key == 'ISNI' || key == 'Wikidata' || key == 'FundRef' || key == 'RRID'"
|| key == 'ROR' || key == 'ISNI' || key == 'Wikidata' || key == 'FundRef'"
[href]="getUrl(key, item) + item" target="_blank" class="uk-display-inline-block custom-external">
{{item}}
</a>
@ -138,8 +138,6 @@ export class ShowIdentifiersComponent implements AfterViewInit {
return properties.wikiDataURL;
} else if(key == "FundRef") {
return properties.fundRefURL;
} else if(key == "RRID") {
return properties.rridURL;
}
}

View File

@ -1,33 +1,18 @@
import {
Component,
Inject,
InjectionToken,
Input,
OnChanges,
OnDestroy,
OnInit,
PLATFORM_ID,
SimpleChanges
} from "@angular/core";
import {Component, Inject, Input, OnChanges, OnDestroy, OnInit, PLATFORM_ID, SimpleChanges} from "@angular/core";
import {Report} from "./cache-indicators";
import {CacheIndicatorsService} from "./cache-indicators.service";
import {interval, Subject, Subscription} from "rxjs";
import {map, switchMap, takeUntil} from "rxjs/operators";
import {isPlatformBrowser} from "@angular/common";
@Component({
selector: 'cache-indicators',
template: `
<div *ngIf="report" class="cache-progress">
<div class="uk-position-relative" [attr.uk-tooltip]="'Caching indicators process for ' + alias">
<div class="uk-progress-circle" [attr.percentage]="report.percentage?report.percentage:0"
[style]="'--percentage: ' + (report.percentage?report.percentage:0)"></div>
<button *ngIf="report.percentage === 100" (click)="clear()"
class="uk-icon-button uk-icon-button-xsmall uk-button-default uk-position-top-right">
<icon name="close" [flex]="true" ratio="0.8"></icon>
</button>
</div>
</div>
<div *ngIf="report" class="cache-progress">
<div class="uk-position-relative" [attr.uk-tooltip]="'Caching indicators process for ' + alias">
<div class="uk-progress-circle" [attr.percentage]="report.percentage?report.percentage:0" [style]="'--percentage: ' + (report.percentage?report.percentage:0)"></div>
<button *ngIf="report.percentage === 100" (click)="clear()" class="uk-icon-button uk-icon-button-xsmall uk-button-default uk-position-top-right"><icon name="close" [flex]="true" ratio="0.8"></icon></button>
</div>
</div>
`,
styleUrls: ['cache-indicators.component.less']
})
@ -39,7 +24,7 @@ export class CacheIndicatorsComponent implements OnInit, OnChanges, OnDestroy {
@Input() alias: string;
constructor(private cacheIndicatorsService: CacheIndicatorsService,
@Inject(PLATFORM_ID) private platformId: any) {
@Inject(PLATFORM_ID) private platformId) {
}
ngOnInit() {
@ -47,30 +32,28 @@ export class CacheIndicatorsComponent implements OnInit, OnChanges, OnDestroy {
}
ngOnChanges(changes: SimpleChanges) {
if (changes.alias) {
this.clear();
if(changes.alias) {
this.getReport();
}
}
getReport() {
this.clear();
this.subscriptions.push(this.cacheIndicatorsService.getReport(this.alias).subscribe(report => {
this.getReportInterval(report);
}, error => {
this.report = null;
}));
}
getReportInterval(report: Report) {
if (this.isBrowser && (this.report || !report?.completed)) {
if(this.isBrowser && (this.report || !report?.completed)) {
this.report = report;
this.subscriptions.push(interval(this.interval).pipe(
map(() => this.cacheIndicatorsService.getReport(this.alias)),
switchMap(report => report),
takeUntil(this.destroy$)).
subscribe(report => {
takeUntil(this.destroy$)).subscribe(report => {
console.log(this.alias);
this.report = report;
if (this.report.completed) {
if(this.report.completed) {
this.destroy$.next();
}
}));
@ -79,15 +62,14 @@ export class CacheIndicatorsComponent implements OnInit, OnChanges, OnDestroy {
clear() {
this.subscriptions.forEach(subscription => {
if (subscription instanceof Subscription) {
subscription.unsubscribe();
}
});
subscription.unsubscribe();
})
this.report = null;
}
get isBrowser() {
return isPlatformBrowser(this.platformId);
return this.platformId === 'browser';
}
ngOnDestroy() {

View File

@ -201,18 +201,6 @@ export abstract class MonitorIndicatorStakeholderBaseComponent extends Indicator
}
}
protected get isChild(): boolean {
return !!this.stakeholder?.parent;
}
protected get aliasPrefix(): string {
if(this.isChild) {
return this.stakeholder.parent.alias + '/browse/' + this.stakeholder.type + '/';
} else {
return '/';
}
}
protected getFullUrl(indicatorPath: IndicatorPath) {
let fosValues = this.getSelectedFilterValues("fos");
return this.indicatorUtils.getFullUrlWithFilters(this.stakeholder, indicatorPath,null, this.periodFilter.selectedFromValue, this.periodFilter.selectedToValue, false, fosValues?fosValues.lvl1:[],fosValues?fosValues.lvl2:[], this.getSelectedFilterValues("publiclyfunded"));

View File

@ -17,7 +17,7 @@ export class HasDashboardGuard {
check(path: string, alias: string, type: string, child: string): Observable<boolean> | boolean {
return (child?this.stakeholderService.getChildStakeholder(alias, type, child):this.stakeholderService.getStakeholder(alias)).pipe(take(1), map(stakeholder => {
return stakeholder?.standalone || (!!stakeholder && !!child);
return stakeholder.standalone || (!!stakeholder && !!child);
}),tap(authorized => {
if(!authorized){
this.router.navigate([LinksResolver.default.errorLink], {queryParams: {'page': path}});

View File

@ -131,9 +131,9 @@ export class RoleVerificationComponent extends BaseComponent implements OnInit,
this.subscriptions.push(this.userRegistryService.getInvitation(params['verify']).subscribe(verification => {
this.verification = verification;
if (this.user.email === this.verification.email.toLowerCase() && this.id === this.verification.entity && this._type === this.verification.type) {
if (this.verification.verificationType.toLowerCase() === 'manager') {
if (this.verification.verificationType === 'manager') {
this.openManagerModal();
} else if (this.verification.verificationType.toLowerCase() === 'member') {
} else if (this.verification.verificationType === 'member') {
this.openMemberModal();
} else {
this.openErrorModal();

View File

@ -418,8 +418,7 @@
[type]="entityType"
[zenodoInformation]="zenodoInformation"
[properties]=properties
[isMobile]="mobile"
[compactView]="compactView">
[isMobile]="mobile">
</deposit-result>
<orcid-result *ngIf="usedBy == 'orcid'"
[results]="results"

View File

@ -54,6 +54,14 @@ export class HelpContentService {
.pipe(catchError(this.handleError));
}
// toggleEntity(selectedCommunityId: string, id : string,status : boolean) {
// let headers = new Headers({'Content-Type': 'application/json'});
// let options = new RequestOptions({headers: headers});
//
// return this.http.post(helpContentUrl + 'community/'+selectedCommunityId+'/entity/toggle?status='+ status.toString()+'&entityId='+id.toString(), options)
// .catch(this.handleError);
// }
getCommunityEntities(pid: string) {
return this.http.get<Array<Entity>>(properties.adminToolsAPIURL + properties.adminToolsPortalType + '/'+pid+'/entities')
.pipe(catchError(this.handleError));
@ -73,8 +81,27 @@ export class HelpContentService {
.pipe(catchError(this.handleError));
}
// getDivIdsFull(page_id: string, helpContentUrl:string, pid: string = null) {
// let parameters: string = "";
// if(page_id || pid) {
// parameters = "?";
// if(page_id) {
// parameters += "&page="+page_id;
// }
// if(pid) {
// parameters += "&portal="+pid;
// }
// }
//
// return this.http.get<Array<DivId>>(helpContentUrl + 'div/full'+parameters)
// //.map(res => <Array<DivId>> res.json())
// .pipe(catchError(this.handleError));
// }
// Replacing getDivIdsFull
getAllDivIdsFull() {
return this.http.get<Array<DivId>>(properties.adminToolsAPIURL + 'div/full')
//.map(res => <Array<DivId>> res.json())
.pipe(catchError(this.handleError));
}
@ -84,6 +111,7 @@ export class HelpContentService {
return this.http.get<Array<DivId>>(properties.adminToolsAPIURL + properties.adminToolsPortalType + '/'+pid + '/div/full'+parameters)
.pipe(catchError(this.handleError));
}
// End of replacing getDivIdsFull
// unused
getDivId(divId: string, helpContentUrl:string) {
@ -91,7 +119,6 @@ export class HelpContentService {
.pipe(catchError(this.handleError));
}
// unused
getDivIdFull(divId: string, helpContentUrl:string, pid: string) {
return this.http.get<DivId>(helpContentUrl + properties.adminToolsPortalType + "/" + pid + '/div/'+divId+"/full")
.pipe(catchError(this.handleError));
@ -146,6 +173,7 @@ export class HelpContentService {
}
toggleDivHelpContents(ids : string[], status : boolean, pid: string) {
return this.http.post(properties.adminToolsAPIURL + properties.adminToolsPortalType + '/' + pid + '/divhelpcontent/toggle?status='+ status.toString(),
JSON.stringify(ids), CustomOptions.getAuthOptionsWithBody())
.pipe(catchError(this.handleError));
@ -168,6 +196,7 @@ export class HelpContentService {
}
getPageHelpContent(id : string, helpContentUrl:string, pid: string) {
return this.http.get<PageHelpContent>(helpContentUrl + properties.adminToolsPortalType + '/' + pid + '/pagehelpcontent/' + id)
//.map(res => <PageHelpContent> res.json())
.pipe(catchError(this.handleError));
}
@ -179,7 +208,6 @@ export class HelpContentService {
.pipe(catchError(this.handleError));
}
// unused
updatePageHelpContent(pageHelpContent: PageHelpContent, helpContentUrl:string, pid: string) {
HelpContentService.removeNulls(pageHelpContent);
@ -188,43 +216,50 @@ export class HelpContentService {
.pipe(catchError(this.handleError));
}
deletePageHelpContents(ids: string[], pid: string) {
deletePageHelpContents(ids : string[], pid: string) {
return this.http.post(properties.adminToolsAPIURL + properties.adminToolsPortalType + '/' + pid + '/pagehelpcontent/delete',
JSON.stringify(ids), CustomOptions.getAuthOptionsWithBody())
.pipe(catchError(this.handleError));
}
togglePageHelpContents(ids : string[], status : boolean, pid: string) {
togglePageHelpContents(ids : string[],status : boolean, pid: string) {
return this.http.post(properties.adminToolsAPIURL + properties.adminToolsPortalType + '/' + pid + '/pagehelpcontent/toggle?status='+ status.toString(),
JSON.stringify(ids), CustomOptions.getAuthOptionsWithBody())
.pipe(catchError(this.handleError));
}
// unused
getCommunityPagesWithDivId(pid: string, helpContentUrl:string) {
return this.http.get<Array<Page>>(helpContentUrl + properties.adminToolsPortalType + '/'+pid+'/pages?div=true')
.pipe(catchError(this.handleError));
}
// getCommunityPages(pid: string, params: string, helpContentUrl:string) {
// return this.http.get<Array<Page>>(helpContentUrl + properties.adminToolsPortalType + '/'+pid+'/pages'+params, CustomOptions.getAuthOptions())
// //.map(res => <Array<Page>> res.json())
// .pipe(catchError(this.handleError));
// }
getCommunityPagesByRoute(pid: string, route: string) {
return this.http.get<Array<Page>>(properties.adminToolsAPIURL + properties.adminToolsPortalType + '/'+pid+'/pages'
+ (route ? '?page_route='+route : ''))
.pipe(map(pages => (pages.length>0?pages[0]:null)), catchError(this.handleError));
}
// Replacing getCommunityPages
getCommunityPagesByType(pid: string, type: string) {
return this.http.get<Array<Page>>(properties.adminToolsAPIURL + properties.adminToolsPortalType + '/'+pid+'/pages'
+ (type ? '?page_type='+type : ''))
.pipe(catchError(this.handleError));
}
// End of replacing getCommunityPages
// unused
// Replacing part of getPages (now getAllPages)
getCommunityPagesWithPositions(pid: string, helpContentUrl:string) {
return this.http.get<Array<Page>>(helpContentUrl + properties.adminToolsPortalType + '/'+pid+'/pages?with_positions=true')
.pipe(catchError(this.handleError));
}
// TODO: double check with konstantina - there is no param that we are asking the community pages. without pid we get all portalTypes
// End of replacing part of getPages (now getAllPages)
//TODO double check with konstantina - there is no param that we are asking the community pages. without pid we get all portalTypes
getAllPages(pid:string = null) {//with_positions:boolean=null) {
// let parameters: string = "";
// if(pid || with_positions == true || with_positions == false) {
@ -243,6 +278,7 @@ export class HelpContentService {
getAllPagesFull() {
return this.http.get<Array<Page>>(properties.adminToolsAPIURL + 'page/full')//+(pid?("?pid="+pid):""))
//.map(res => <Array<Page>> res.json())
.pipe(catchError(this.handleError));
}
@ -250,13 +286,10 @@ export class HelpContentService {
return this.http.get<Page>(properties.adminToolsAPIURL + properties.adminToolsPortalType + '/' + pid + '/page/'+pageId)
.pipe(catchError(this.handleError));
}
getPageById(pageId:string) {
return this.http.get<Page>(properties.adminToolsAPIURL + 'page/' + pageId)
.pipe(catchError(this.handleError));
}
// unused
getCommunityPageByRoute(route:string, helpContentUrl:string, pid: string) {
return this.http.get<Page>(helpContentUrl + properties.adminToolsPortalType +'/' + pid + '/page/?page_route='+route)
.pipe(catchError(this.handleError));
@ -266,10 +299,12 @@ export class HelpContentService {
HelpContentService.removeNulls(page);
return this.http.post<Page>(properties.adminToolsAPIURL + 'page/save', JSON.stringify(page), CustomOptions.getAuthOptionsWithBody())
//.map(res => <Page> res.json())
.pipe(catchError(this.handleError));
}
updatePage(page: Page) {
HelpContentService.removeNulls(page);
return this.http.post<Page>(properties.adminToolsAPIURL + 'page/update', JSON.stringify(page), CustomOptions.getAuthOptionsWithBody())
@ -277,12 +312,14 @@ export class HelpContentService {
}
togglePages(selectedPortalPid: string, ids : string[], status: boolean) {
return this.http.post(properties.adminToolsAPIURL + properties.adminToolsPortalType + '/' + selectedPortalPid + '/page/toggle?status='+ status.toString(),
JSON.stringify(ids), CustomOptions.getAuthOptionsWithBody())
.pipe(catchError(this.handleError));
}
deletePages(ids : string[]) {
return this.http.post(properties.adminToolsAPIURL + 'page/delete',JSON.stringify(ids), CustomOptions.getAuthOptionsWithBody())
.pipe(catchError(this.handleError));
}
@ -326,6 +363,7 @@ export class HelpContentService {
return this.http.post<Menu>(properties.adminToolsAPIURL + properties.adminToolsPortalType + "/" + portalPid + "/menu/align?alignment=" + alignment, {}, CustomOptions.getAuthOptionsWithBody())
.pipe(catchError(this.handleError));
}
// unused
getCommunities( helpContentUrl:string) {
@ -333,13 +371,11 @@ export class HelpContentService {
.pipe(catchError(this.handleError));
}
// unused
getCommunity(pid: string, helpContentUrl:string) {
return this.http.get<Portal>(helpContentUrl + properties.adminToolsPortalType + '/'+pid)
.pipe(catchError(this.handleError));
}
// unused
getCommunitiesFull( helpContentUrl:string) {
return this.http.get<Array<Portal>>(helpContentUrl + properties.adminToolsPortalType + '/full')
.pipe(catchError(this.handleError));
@ -347,16 +383,18 @@ export class HelpContentService {
getPortalsFull() {
return this.http.get<Array<Portal>>(properties.adminToolsAPIURL + 'portal/full')
//.map(res => <Array<Portal>> res.json())
.pipe(catchError(this.handleError));
}
// unused
getCommunityFull(portal_pid: string, helpContentUrl:string) {
return this.http.get<Portal>(helpContentUrl + properties.adminToolsPortalType + '/'+portal_pid+'/full')
.pipe(catchError(this.handleError));
}
saveCommunity(portal: Portal) {
// let headers = new Headers({'Content-Type': 'application/json'});
// let options = new RequestOptions({headers: headers});
HelpContentService.removeNulls(portal);
return this.http.post<Portal>(properties.adminToolsAPIURL + portal.type + '/save', JSON.stringify(portal), CustomOptions.getAuthOptionsWithBody())
@ -364,13 +402,19 @@ export class HelpContentService {
}
updateCommunity(portal: Portal) {
// let headers = new Headers({'Content-Type': 'application/json'});
// let options = new RequestOptions({headers: headers});
HelpContentService.removeNulls(portal);
return this.http.post<Portal>(properties.adminToolsAPIURL + portal.type + '/update', JSON.stringify(portal), CustomOptions.getAuthOptionsWithBody())
//.map(res => <Portal> res.json())
.pipe(catchError(this.handleError));
}
deleteCommunities(ids: string[], portalType:string) {
deleteCommunities(ids : string[], portalType:string) {
// let headers = new Headers({'Content-Type': 'application/json'});
// let options = new RequestOptions({headers: headers});
return this.http.post(properties.adminToolsAPIURL + portalType + '/delete',JSON.stringify(ids), CustomOptions.getAuthOptionsWithBody())
.pipe(catchError(this.handleError));
}
@ -382,6 +426,10 @@ export class HelpContentService {
return throwError(error.error || 'Server error');
}
// getDataProviders() {
// return this.http.get('https://beta.services.openaire.eu/search/v2/api/datasources?format=json').map(res => <any> res.json()).map(res => res.results).do(res => {console.log(res)}).catch(this.handleError);
// }
getCommunityStatistics(apiUrl: string, portalId: string): Observable<StatisticsSummary> {
const url = `${apiUrl}communities/${portalId}`;
//console.log(`getting statistics summary from: ${url}`);

View File

@ -71,7 +71,7 @@ export class UserRegistryService {
}
public getPending(type: string, id: string, role: "member" | "manager" = "manager", admin = false): Observable<any[]> {
let url = properties.registryUrl + 'invite/' + Role.GROUP + type + '/' +id + "/" + role + 's';
let url = properties.registryUrl + 'invite/' + Role.GROUP + type + '/' +id + "/" + role + 's/';
return this.http.get<any>((properties.useCache && !admin) ? (properties.cacheUrl + encodeURIComponent(url)) : url,
CustomOptions.registryOptions()).pipe(map((response: any) => response.response));
}

View File

@ -374,25 +374,21 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang
@Input()
set options(options: (Option | string | number) []) {
if(options) {
this.optionsArray = options.map(option => {
if (option === null) {
return {
label: this.noValueSelected,
value: ''
};
} else if (typeof option === 'string' || typeof option === 'number') {
return {
label: option.toString(),
value: option
};
} else {
return option;
}
});
} else {
this.optionsArray = [];
}
this.optionsArray = options.map(option => {
if (option === null) {
return {
label: this.noValueSelected,
value: ''
};
} else if (typeof option === 'string' || typeof option === 'number') {
return {
label: option.toString(),
value: option
};
} else {
return option;
}
});
if (!this.tooltip) {
this.tooltip = this.optionsArray.length > 0;
}

View File

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

View File

@ -24,7 +24,6 @@ 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/",
@ -102,23 +101,23 @@ export let commonDev: EnvProperties = {
statisticsAPIURL: "https://beta.services.openaire.eu/stats-api/",
statisticsFrameAPIURL: "https://beta.openaire.eu/stats/",
statisticsFrameNewAPIURL: "https://beta.services.openaire.eu/stats-tool/",
claimsAPIURL: "http://dl170.madgik.di.uoa.gr:19780/uoa-claims-service/claimsService/",
claimsAPIURL: "http://scoobydoo.di.uoa.gr:8880/dnet-claims-service-2.0.0-SNAPSHOT/rest/claimsService/",
searchAPIURLLAst: "http://beta.services.openaire.eu/search/v2/api/",
searchResourcesAPIURL: "https://beta.services.openaire.eu/search/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/",
orcidAPIURL: "http://duffy.di.uoa.gr:19480/uoa-orcid-service/",
orcidTokenURL: "https://sandbox.orcid.org/oauth/authorize?",
orcidClientId: "APP-A5M3KTX6NCN67L91",
utilsService: "http://dl170.madgik.di.uoa.gr:8000",
utilsService: "http://scoobydoo.di.uoa.gr:8000",
vocabulariesAPI: "https://services.openaire.eu/provision/mvc/vocabularies/",
loginServiceURL: "http://dl170.madgik.di.uoa.gr:19080/login-service/",
cookieDomain: ".di.uoa.gr",
feedbackmail: "kostis30fylloy@gmail.com",
cacheUrl: "http://dl170.madgik.di.uoa.gr:3000/get?url=",
monitorServiceAPIURL: "http://mpagasas.di.uoa.gr:19380/uoa-monitor-service/",
adminToolsAPIURL: "http://dl170.madgik.di.uoa.gr:19280/uoa-admin-tools/",
adminToolsAPIURL: "http://duffy.di.uoa.gr:19280/uoa-admin-tools/",
datasourcesAPI: "https://beta.services.openaire.eu/openaire/ds/api/",
contextsAPI: "https://dev-openaire.d4science.org/openaire/context",
communityAPI: "https://dev-openaire.d4science.org/openaire/community/",
@ -130,7 +129,7 @@ export let commonDev: EnvProperties = {
adminPortalURL: "https://beta.admin.connect.openaire.eu",
//connect
communitiesAPI: 'https://dev-openaire.d4science.org/openaire/community/communities',
registryUrl: 'http://dl170.madgik.di.uoa.gr:19180/uoa-user-management/api/registry/',
registryUrl: 'http://mpagasas.di.uoa.gr:8080/dnet-openaire-users-1.0.0-SNAPSHOT/api/registry/',
reCaptchaSiteKey: "6LcVtFIUAAAAAB2ac6xYivHxYXKoUvYRPi-6_rLu",
//admin
miningBackendURL: 'https://beta.services.openaire.eu/interactive-mining',

View File

@ -150,7 +150,7 @@ export class DOI {
}
export class Identifier {
class: "doi" | "pmc" | "pmid" | "handle" | "ORCID" | "re3data" | "swhid" | "ror" | "wikidata" | "fundref" | "isni" | "RRID" = null;
class: "doi" | "pmc" | "pmid" | "handle" | "ORCID" | "re3data" | "swhid" | "ror" | "wikidata" | "fundref" | "isni" = null;
id: string;
public static getDOIsFromString(str: string): string[] {
@ -213,15 +213,13 @@ 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", "rrid"];
let classes:string [] = ["doi", "handle", "pmc", "pmid", "re3data", "swhid", "ror", "wikidata", "fundref", "isni"];
if(identifiers && identifiers.size > 0) {
for (let cl of classes) {
if (identifiers.get(cl)) {
@ -305,10 +303,6 @@ 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 {