diff --git a/claims/linking/bulkClaim/bulkClaim.component.ts b/claims/linking/bulkClaim/bulkClaim.component.ts index 4bad5180..38f2ccb6 100644 --- a/claims/linking/bulkClaim/bulkClaim.component.ts +++ b/claims/linking/bulkClaim/bulkClaim.component.ts @@ -3,7 +3,7 @@ import {SearchCrossrefService} from '../../claim-utils/service/searchCrossref.se import {SearchDataciteService} from '../../claim-utils/service/searchDatacite.service'; import {ModalLoading} from '../../../utils/modal/loading.component'; -import {Dates, DOI} from '../../../utils/string-utils.class'; +import {Dates, DOI, Identifier} from '../../../utils/string-utils.class'; import {EnvProperties} from '../../../utils/properties/env-properties'; import {ClaimEntity} from "../../claim-utils/claimHelper.class"; import {Subscriber} from "rxjs"; @@ -165,8 +165,9 @@ export class BulkClaimComponent { if (rows[i] && rows[i] != null && rows[i]!="") { const values = rows[i].split(','); - const id = BulkClaimComponent.removeDoubleQuotes(values[0]); + let id = BulkClaimComponent.removeDoubleQuotes(values[0]); if (DOI.isValidDOI(id)) { + id = Identifier.getRawDOIValue(id); let accessMode = (values[1] != undefined) ? BulkClaimComponent.removeDoubleQuotes(values[1]) : "OPEN"; accessMode = (BulkClaimComponent.validateAccessMode(accessMode) ? accessMode : "OPEN"); let embargoDate = (values[2] != undefined) ? Dates.getDateFromString(BulkClaimComponent.removeDoubleQuotes(values[2])) : Dates.getDateToday(); diff --git a/connect/connectHelper.ts b/connect/connectHelper.ts index 8d674afd..d98ce778 100644 --- a/connect/connectHelper.ts +++ b/connect/connectHelper.ts @@ -9,6 +9,9 @@ export class ConnectHelper { // domain = "aginfra.openaire.eu"; //for testing } domain = domain.indexOf("//") != -1? domain.split("//")[1]:domain; //remove https:// prefix + if (domain.indexOf('eosc-portal.eu') != -1) { + return "eosc"; + } if (domain.indexOf('openaire.eu') === -1) { return null; } diff --git a/searchPages/searchDataProviders.component.ts b/searchPages/searchDataProviders.component.ts index 704ba1a0..045a26bb 100644 --- a/searchPages/searchDataProviders.component.ts +++ b/searchPages/searchDataProviders.component.ts @@ -38,12 +38,11 @@ import {properties} from "../../../environments/environment"; [entitiesSelection]="type=='all'" [showSwitchSearchLink]="showSwitchSearchLink" [filters]="filters" [simpleView]="simpleView" formPlaceholderText="Search by name, description, subject..." - [showResultCount]="(type=='all' || type == 'deposit')" [showIndexInfo]="type!='deposit'" + [showResultCount]="true" [showIndexInfo]="type!='deposit'" [tableViewLink]="tableViewLink" [sort]="false" [showBreadcrumb]="showBreadcrumb" [basicMetaDescription]="metaDescription"> - ` }) @@ -140,13 +139,9 @@ export class SearchDataProvidersComponent { this.searchPage.keywordFields = this.searchFields.DEPOSIT_DATASOURCE_KEYWORD_FIELDS; this.searchPage.usedBy = "deposit"; } - // console.log(this.refineFields) this.searchPage.prepareSearchPage(this.fieldIds, this.selectedFields, this.refineFields, [], this.fieldIdsMap,this.customFilter,params, "dataprovider"); - if(refine && (this.type == "all" || this.type == "deposit")) { + if(refine) { this._getFilters(this.searchPage.getSearchAPIQueryForAdvancedSearhFields(), this.searchUtils.page, 0, true, this.searchPage.getSearchAPIQueryForRefineFields(params, firstLoad)); - } else if(refine) { // static filters - this.searchUtils.refineStatus = this.errorCodes.LOADING; - this.filters = DatasourcesHelperClass.createFilters(this.type); } else { this.searchUtils.refineStatus = this.errorCodes.DONE; } @@ -173,7 +168,7 @@ export class SearchDataProvidersComponent { this.searchPageUpdates.emit({disableForms: this.disableForms, disableRefineForms: this.disableRefineForms, searchUtils: this.searchUtils}); let datasourceQueryPrefix = DatasourcesHelperClass.getQueryPrefix(this.type); - this.searchFiltersSub = this._searchDataProvidersService.advancedSearchDataproviders( datasourceQueryPrefix +(datasourceQueryPrefix.length > 0 && parameters.length > 0 ?' and (':'') + parameters +(datasourceQueryPrefix.length > 0 && parameters.length > 0 ?' ) ':''), page, size, this.properties, (refine && (this.type=="all" || this.type == "deposit")) ? this.searchPage.getRefineFieldsQuery() : null, this.searchPage.getFields(), refineFieldsFilterQuery, (this.type == "deposit")) + this.searchFiltersSub = this._searchDataProvidersService.advancedSearchDataproviders( datasourceQueryPrefix +(datasourceQueryPrefix.length > 0 && parameters.length > 0 ?' and (':'') + parameters +(datasourceQueryPrefix.length > 0 && parameters.length > 0 ?' ) ':''), page, size, this.properties, (refine /*&& (this.type=="all" || this.type == "deposit")*/) ? this.searchPage.getRefineFieldsQuery() : null, this.searchPage.getFields(), refineFieldsFilterQuery, (this.type == "deposit")) //.switchMap( .subscribe( data => { @@ -198,7 +193,6 @@ export class SearchDataProvidersComponent { if (refine) { this.filters = this.searchPage.prepareFiltersToShow(filters, totalResults); } - this.searchUtils.refineStatus = this.errorCodes.DONE; if(totalResults == 0) { this.searchUtils.refineStatus = this.errorCodes.NONE; @@ -232,35 +226,22 @@ export class SearchDataProvidersComponent { size=0; } if(page <= this.pagingLimit || this.searchUtils.status == this.errorCodes.LOADING) { - // if(parameters!= null && parameters != '' ) { - // this.csvParams ="&fq=( "+this.resourcesQuery + "and (" + parameters + "))"; - // }else{ - // this.csvParams ="&fq="+this.resourcesQuery; - // } - // this.csvParams += (refineFieldsFilterQuery?refineFieldsFilterQuery:''); - + this.csvParams = (parameters ? ("&fq=("+parameters) : "") + (parameters ? ")" : ""); this.csvParams += (refineFieldsFilterQuery ? refineFieldsFilterQuery : ""); - //var errorCodes:ErrorCodes = new ErrorCodes(); this.searchUtils.status = this.errorCodes.LOADING; - //this.searchPage.openLoading(); this.disableForms = true; this.searchPageUpdates.emit({disableForms: this.disableForms, disableRefineForms: this.disableRefineForms, searchUtils: this.searchUtils}); this.results = []; this.searchUtils.totalResults = 0; - //console.info("Advanced Search for Content Providers: Execute search query "+parameters); let datasourceQueryPrefix = DatasourcesHelperClass.getQueryPrefix(this.type); - //this._searchDataProvidersService.advancedSearchDataproviders( datasourceQueryPrefix +(datasourceQueryPrefix.length > 0 && parameters.length > 0 ?' and (':'') + parameters +(datasourceQueryPrefix.length > 0 && parameters.length > 0 ?' ) ':''), page, size, this.properties, (refine && (this.type=="all" || this.type == "deposit")) ? this.searchPage.getRefineFieldsQuery() : null, this.searchPage.getFields(), refineFieldsFilterQuery, (this.type == "deposit")).subscribe( this.searchResultsSub = this._searchDataProvidersService.advancedSearchDataproviders( datasourceQueryPrefix +(datasourceQueryPrefix.length > 0 && parameters.length > 0 ?' and (':'') + parameters +(datasourceQueryPrefix.length > 0 && parameters.length > 0 ?' ) ':''), page, size, this.properties, null, this.searchPage.getFields(), refineFieldsFilterQuery, (this.type == "deposit")).subscribe( data => { let totalResults = data[0]; let results = data[1]; - if(refine && !(this.type == "all" || this.type == "deposit")){ - this.filtersReturned(refine, this.filters, totalResults, page); - } this.resultsReturned(refine, results, totalResults, page); }, err => { diff --git a/searchPages/searchUtils/datasourcesHelper.class.ts b/searchPages/searchUtils/datasourcesHelper.class.ts index fe16fd41..ce949974 100644 --- a/searchPages/searchUtils/datasourcesHelper.class.ts +++ b/searchPages/searchUtils/datasourcesHelper.class.ts @@ -1,5 +1,6 @@ import {Filter, Value} from "./searchHelperClasses.class"; import {SearchFields} from "../../utils/properties/searchFields"; +import {properties} from "../../../../environments/environment"; export class DatasourcesHelperClass { @@ -42,8 +43,11 @@ export class DatasourcesHelperClass { } } public static getQueryPrefix(type: "all" | "registries" | "journals" | "compatible" | "deposit"): string { + if(properties.environment == "production") { if (type == "registries") { - return ' datasourcetypeuiid = other '; + return ' (datasourcetypeuiid = "entityregistry" or datasourcetypeuiid = "entityregistry::products" or datasourcetypeuiid = "entityregistry::repositories" ' + + 'or datasourcetypeuiid = "entityregistry::organizations" or datasourcetypeuiid = "entityregistry::researchers" ) '; + } else if (type == "journals") { // return ' not(datasourcecompatibilityid = UNKNOWN) not(datasourcecompatibilityid = notCompatible) and (datasourcetypeuiid exact "pubsrepository::journal" or datasourcetypeuiid exact "aggregator::pubsrepository::journals" ) '; return 'oaftype exact datasource not datasourcecompatibilityid = notCompatible and (datasourcetypeuiid exact "pubsrepository::journal" or datasourcetypeuiid exact "aggregator::pubsrepository::journals" ) '; @@ -55,6 +59,21 @@ export class DatasourcesHelperClass { } else { return ""; } + }else{ + if (type == "registries") { + return 'datasourcetypeuiname exact "Registry"'; + } else if (type == "journals") { + // return ' not(datasourcecompatibilityid = UNKNOWN) not(datasourcecompatibilityid = notCompatible) and (datasourcetypeuiid exact "pubsrepository::journal" or datasourcetypeuiid exact "aggregator::pubsrepository::journals" ) '; + return 'oaftype exact datasource not datasourcecompatibilityid = notCompatible and datasourcetypeuiname exact "Journal archive" '; + + } else if (type == "compatible") { + return ' oaftype exact datasource and datasourcecompatibilityid <> notCompatible and datasourcetypeuiname exact "Repository" '; + }else if (type == "deposit") { + return ' oaftype exact datasource and (datasourcetypeuiname exact "Journal archive" or datasourcetypeuiname exact "Repository")'; + } else { + return ""; + } + } } public static createFilters(type: "all" | "registries" | "journals" | "compatible" | "deposit"): Filter[] { @@ -62,8 +81,8 @@ export class DatasourcesHelperClass { return this.createRegistriesFilters(); } else if (type == "journals") { return this.createJournalFilters(); - } else if (type == "compatible") { - return this.createCompatibleFilters(); +/* } else if (type == "compatible") { + return this.createCompatibleFilters();*/ } else { return []; } diff --git a/sharedComponents/navigationBar.component.html b/sharedComponents/navigationBar.component.html index e41bac00..d98e5150 100644 --- a/sharedComponents/navigationBar.component.html +++ b/sharedComponents/navigationBar.component.html @@ -176,18 +176,23 @@ alt="BETA" style="height: 102px; width: 102px">
-