export class Properties { private static productionMode:boolean = false; private static enablePiwikTrack:boolean = false; private static enableHelper:boolean = false; private static useCache:boolean = true; //base url private static baseLink = "https://demo.openaire.eu"; //landing Pages private static baseSearchLink="/"; private static searchLinkToPublication = "search/publication?articleId="; private static searchLinkToProject = "search/project?projectId="; private static searchLinkToDataProvider = "search/dataprovider?datasourceId="; private static searchLinkToDataset = "search/dataset?datasetId="; private static searchLinkToOrganization = "search/organization?organizationId="; //Search pages private static searchLinkToPublications = "search/find/publications"; private static searchLinkToDataProviders = "search/find/dataproviders"; private static searchLinkToProjects = "search/find/projects"; private static searchLinkToDatasets = "search/find/datasets"; private static searchLinkToSoftware = "search/find/software"; private static searchLinkToOrganizations = "search/find/organizations"; private static searchLinkToPeople = "search/find/people"; public static searchLinkToCompatibleDataProviders = "search/content-providers"; public static searchLinkToCompatibleDataProvidersTable = "search/content-providers-table"; public static searchLinkToEntityRegistriesDataProviders = "search/entity-registries"; public static searchLinkToEntityRegistriesDataProvidersTable = "search/entity-registries-table"; public static searchLinkToJournals = "search/journals"; public static searchLinkToJournalsTable = "search/journals-table"; //Advanced Search for pages public static searchLinkToAdvancedPublications = "search/advanced/publications"; public static searchLinkToAdvancedProjects = "search/advanced/projects"; public static searchLinkToAdvancedDatasets = "search/advanced/datasets"; public static searchLinkToAdvancedSoftware = "search/advanced/software"; public static searchLinkToAdvancedDataProviders = "search/advanced/dataproviders"; public static searchLinkToAdvancedOrganizations = "search/advanced/organizations"; public static searchLinkToAdvancedPeople = "search/advanced/people"; private static metricsAPIURL = "https://beta.services.openaire.eu/usagestats/"; private static framesAPIURL = "https://beta.openaire.eu/stats3/"; private static loginAPIURL = "http://rudie.di.uoa.gr:8080/dnet%2Dopenaire%2Dusers%2D1.0.0%2DSNAPSHOT/api/users/authenticates" //"http://scoobydoo.di.uoa.gr:8080/uoa-user-management-1.0.0-SNAPSHOT/api/users/authenticates"; private static loginAPIURL_pm = "https://beta.services.openaire.eu/uoa-user-management/api/users/authenticates"; private static claimsAPIURL = "http://scoobydoo.di.uoa.gr:8080/dnet-claims-service-2.0.0-SNAPSHOT/rest/claimsService/"; private static claimsAPIURL_pm = "https://beta.services.openaire.eu/claims/rest/claimsService/"; private static searchAPIURLLAst_pm = "https://beta.services.openaire.eu/search/v2/api/"; private static searchAPIURLLAst = "https://beta.services.openaire.eu/search/v2/api/"; // private static searchAPIURLLAst = "http://scoobydoo.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2/api/"; private static searchResourcesAPIURL_pm = "https://beta.services.openaire.eu/search/v2/api/resources"; private static searchResourcesAPIURL = "https://beta.services.openaire.eu/search/v2/api/resources"; // private static searchResourcesAPIURL = "http://scoobydoo.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2/api/resources"; private static csvAPIURL_pm = "https://beta.services.openaire.eu/search/v2/api/";//publications?format=csv // private static csvAPIURL = "http://rudie.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2/api/";//publications?format=csv private static csvAPIURL = "https://beta.services.openaire.eu/search/v2/api/";//publications?format=csv private static searchCrossrefAPIURL = "https://api.crossref.org/works"; // private static searchDataciteAPIURL = "https://search.datacite.org/api"; private static searchDataciteAPIURL = "https://api.datacite.org/works"; private static searchOrcidURL = "https://pub.orcid.org/"; // Identifiers private static pmidURL = "http://www.ncbi.nlm.nih.gov/pubmed/"; private static doiURL = "https://dx.doi.org/"; private static cordisURL = "http://cordis.europa.eu/projects/"; private static pmcURL = "http://europepmc.org/articles/"; private static handleURL = "http://hdl.handle.net/"; // Zenodo's url private static zenodo = "https://zenodo.org/"; // Open access link private static openAccess = "https://www.openaire.eu/support/faq#article-id-234"; // Open access repository link private static openAccessRepo = "https://www.openaire.eu/support/faq#article-id-310"; // FP7 link private static fp7Guidlines = "https://www.openaire.eu/open-access-in-fp7-seventh-research-framework-programme"; // H2020 link private static h2020Guidlines = "https://www.openaire.eu/oa-publications/h2020/open-access-in-horizon-2020"; // ERC Guidlines private static ercGuidlines = "http://erc.europa.eu/sites/default/files/document/file/ERC_Open_Access_Guidelines-revised_2014.pdf"; // helpdesk link private static helpdesk = "https://www.openaire.eu/support/helpdesk"; private static uploadService_pm = "https://demo.openaire.eu/upload"; private static uploadService = "http://scoobydoo.di.uoa.gr:8000/upload"; private static vocabulariesAPI ="https://beta.services.openaire.eu/provision/mvc/vocabularies/"; private static piwikBaseUrl =" https://analytics.openaire.eu/piwik.php?idsite=6"; private static loginUrl ="http://rudie.di.uoa.gr:8080/dnet-openaire-users-2.0.0-SNAPSHOT/openid_connect_login"; //"http://mpagasas.di.uoa.gr:8080/dnet-openaire-users-1.0.0-SNAPSHOT/openid_connect_login"; private static loginUrl_pm ="https://beta.services.openaire.eu/uoa-user-management/openid_connect_login"; private static logoutUrl ="https://aai.openminted.eu/proxy/saml2/idp/SingleLogoutService.php?ReturnTo="; private static logoutUrl_pm ="https://aai.openminted.eu/proxy/saml2/idp/SingleLogoutService.php?ReturnTo="; private static logoutOpenaireUrl ="http://dl067.madgik.di.uoa.gr/idp/profile/Logout"; private static logoutOpenaireUrl_pm ="http://dl067.madgik.di.uoa.gr/idp/profile/Logout"; private static cookieDomain =".di.uoa.gr"; private static cookieDomain_pm =".openaire.eu"; private static feedbackmail ="openaire.test@gmail.com"; private static helperPageUrl ="http://scoobydoo.di.uoa.gr:16000/api/page/route"; private static cache ="http://scoobydoo.di.uoa.gr:3000/get?url="; private static cache_pm ="https://demo.openaire.eu/cache/get?url="; public static getBaseLink():string{ return this.baseLink; } //landing Pages' getters public static getsearchLinkToPublication():string{ return this.baseSearchLink + this.searchLinkToPublication; } public static getsearchLinkToDataset():string{ return this.baseSearchLink + this.searchLinkToDataset; } public static getsearchLinkToProject():string{ return this.baseSearchLink + this.searchLinkToProject; } public static getsearchLinkToOrganization():string{ return this.searchLinkToOrganization; } public static getsearchLinkToDataProvider():string{ return this.searchLinkToDataProvider; } //searchPages public static getLinkToSearchPublications():string{ return this.baseSearchLink + this.searchLinkToPublications; } public static getLinkToSearchProjects():string{ return this.baseSearchLink + this.searchLinkToProjects; } public static getLinkToSearchDataProviders():string{ return this.baseSearchLink + this.searchLinkToDataProviders; } public static getLinkToSearchCompatibleDataProviders():string{ return this.baseSearchLink + this.searchLinkToCompatibleDataProviders; } public static getLinkToSearchCompatibleDataProvidersTable():string{ return this.baseSearchLink + this.searchLinkToCompatibleDataProvidersTable; } public static getLinkToSearchEntityRegistries():string{ return this.baseSearchLink + this.searchLinkToEntityRegistriesDataProviders; } public static getLinkToSearchEntityRegistriesTable():string{ return this.baseSearchLink + this.searchLinkToEntityRegistriesDataProvidersTable; } public static getLinkToSearchJournals():string{ return this.baseSearchLink + this.searchLinkToJournals; } public static getLinkToSearchJournalsTable():string{ return this.baseSearchLink + this.searchLinkToJournalsTable; } public static getLinkToSearchDatasets():string{ return this.baseSearchLink + this.searchLinkToDatasets; } public static getLinkToSearchSoftware():string{ return this.baseSearchLink + this.searchLinkToSoftware; } public static getLinkToSearchOrganizations():string{ return this.baseSearchLink + this.searchLinkToOrganizations; } public static getLinkToSearchPeople():string{ return this.baseSearchLink + this.searchLinkToPeople; } //Advanced searchPages public static getLinkToAdvancedSearchPublications():string{ return this.baseSearchLink + this.searchLinkToAdvancedPublications; } public static getLinkToAdvancedSearchProjects():string{ return this.baseSearchLink + this.searchLinkToAdvancedProjects; } public static getLinkToAdvancedSearchDataProviders():string{ return this.baseSearchLink + this.searchLinkToAdvancedDataProviders; } public static getLinkToAdvancedSearchDatasets():string{ return this.baseSearchLink + this.searchLinkToAdvancedDatasets; } public static getLinkToAdvancedSearchSoftware():string{ return this.baseSearchLink + this.searchLinkToAdvancedSoftware; } public static getLinkToAdvancedSearchOrganizations():string{ return this.baseSearchLink + this.searchLinkToAdvancedOrganizations; } public static getLinkToAdvancedSearchPeople():string{ return this.baseSearchLink + this.searchLinkToAdvancedPeople; } // Services - APIs' getters // public static getSearchAPIURL():string{ // return this.searchAPIURL; // } // Services - APIs' getters public static getCsvAPIURL(): string { if(this.productionMode){ return this.csvAPIURL_pm; }else{ return this.csvAPIURL; } // return this.csvAPIURL; } public static getFramesAPIURL(): string { return this.framesAPIURL; } public static getMetricsAPIURL(): string { return this.metricsAPIURL; } public static getLoginAPIURL(): string { if(this.productionMode){ return this.loginAPIURL_pm; }else{ return this.loginAPIURL; } // return this.loginAPIURL; } public static getSearchAPIURLLast():string{ if(this.productionMode){ return this.searchAPIURLLAst_pm; }else{ return this.searchAPIURLLAst; } // return this.searchAPIURLLAst; } //query using full query: // public static getSearchResourcesAPIURL():string{ if(this.productionMode){ return this.searchResourcesAPIURL_pm; }else{ return this.searchResourcesAPIURL; } // return this.searchResourcesAPIURL; } public static getSearchAPIURLForEntity(entityType:string):string{ var suffix = ""; if(entityType == "project"){ suffix="projects/"; }else if(entityType == "publication"){ suffix="publications/"; }else if(entityType == "dataset"){ suffix="datasets/"; } else if(entityType == "software"){ suffix="software/"; }else if(entityType == "organization"){ suffix="organizations/"; }else if(entityType == "dataprovider"){ suffix="datasources/"; }else if(entityType == "person"){ suffix="people/"; } return (this.productionMode?this.searchAPIURLLAst_pm:this.searchAPIURLLAst) + suffix; } public static getClaimsAPIURL():string{ if(this.productionMode){ return this.claimsAPIURL_pm; }else{ return this.claimsAPIURL; } } public static getSearchCrossrefAPIURL():string{ return this.searchCrossrefAPIURL; } public static getSearchDataciteAPIURL():string{ return this.searchDataciteAPIURL; } public static getSearchOrcidURL():string{ return this.searchOrcidURL; } // Identifiers' getters public static getPmidURL():string{ return this.pmidURL; } public static getDoiURL():string{ return this.doiURL; } public static getCordisURL():string{ return this.cordisURL; } public static getPmcURL():string{ return this.pmcURL; } public static getHandleURL():string{ return this.handleURL; } // Zenodo's getter public static getZenodoURL():string{ return this.zenodo; } // Open access getter public static getOpenAccess():string{ return this.openAccess; } // Open access repository getter public static getOpenAccessRepo():string{ return this.openAccessRepo; } // FP7 link getter public static getFP7Guidlines():string{ return this.fp7Guidlines; } // H2020 link getter public static getH2020Guidlines():string{ return this.h2020Guidlines; } // ERC Guidlines getter public static getERCGuidlines():string{ return this.ercGuidlines; } // helpdesk link getter public static getHelpdesk():string{ return this.helpdesk; } //upload service for bulk claim - upload csv file public static getUploadServiceUrl():string{ if(this.productionMode){ return this.uploadService_pm; }else{ return this.uploadService; } } //vocabularies API public static getVocabulariesAPI():string{ return this.vocabulariesAPI; } public static getPiwikBaseURL():string{ return this.piwikBaseUrl; } public static isPiwikTrackEnabled():boolean{ return this.enablePiwikTrack; } public static getLoginURL():string{ if(this.productionMode){ return this.loginUrl_pm; }else{ return this.loginUrl; } } public static getLogoutURL():string{ if(this.productionMode){ return this.logoutUrl_pm; }else{ return this.logoutUrl; } } public static getLogoutOpenaireURL():string{ if(this.productionMode){ return this.logoutOpenaireUrl_pm; }else{ return this.logoutOpenaireUrl; } } public static getCookieDomain():string{ if(this.productionMode){ return this.cookieDomain_pm; }else{ return this.cookieDomain; } } public static getFeedbackMail():string{ return this.feedbackmail; } public static getHelperPageUrl():string{ return this.helperPageUrl; } public static isHelperEnabled():boolean{ return this.enableHelper; } public static getCacheUrl():string{ if(this.productionMode){ return this.cache_pm; }else{ return this.cache; } } public static isCacheEnabled():boolean{ return this.useCache; } } export class ErrorCodes { public LOADING = 0; public DONE = 1; public NONE = 2; public ERROR = 3; public NOT_AVAILABLE = 4; public OUT_OF_BOUND = 5; public NOT_FOUND = 6; }