Search: allow exact search with doi raw value - in case of full url doi

This commit is contained in:
argirok 2022-02-21 15:55:20 +02:00
parent 9bf905bc22
commit 49dfdd6e1b
1 changed files with 2 additions and 4 deletions

View File

@ -3,7 +3,7 @@ import {SearchCrossrefService} from '../../claim-utils/service/searchCrossref.se
import {SearchDataciteService} from '../../claim-utils/service/searchDatacite.service'; import {SearchDataciteService} from '../../claim-utils/service/searchDatacite.service';
import {ModalLoading} from '../../../utils/modal/loading.component'; 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 {EnvProperties} from '../../../utils/properties/env-properties';
import {ClaimEntity} from "../../claim-utils/claimHelper.class"; import {ClaimEntity} from "../../claim-utils/claimHelper.class";
import {Subscriber} from "rxjs"; import {Subscriber} from "rxjs";
@ -167,9 +167,7 @@ export class BulkClaimComponent {
let id = BulkClaimComponent.removeDoubleQuotes(values[0]); let id = BulkClaimComponent.removeDoubleQuotes(values[0]);
if (DOI.isValidDOI(id)) { if (DOI.isValidDOI(id)) {
if(id.indexOf("doi.org")!=-1 && id.split("doi.org/").length > 1){ id = Identifier.getRawDOIValue(id);
id = id.split("doi.org/")[1];
}
let accessMode = (values[1] != undefined) ? BulkClaimComponent.removeDoubleQuotes(values[1]) : "OPEN"; let accessMode = (values[1] != undefined) ? BulkClaimComponent.removeDoubleQuotes(values[1]) : "OPEN";
accessMode = (BulkClaimComponent.validateAccessMode(accessMode) ? accessMode : "OPEN"); accessMode = (BulkClaimComponent.validateAccessMode(accessMode) ? accessMode : "OPEN");
let embargoDate = (values[2] != undefined) ? Dates.getDateFromString(BulkClaimComponent.removeDoubleQuotes(values[2])) : Dates.getDateToday(); let embargoDate = (values[2] != undefined) ? Dates.getDateFromString(BulkClaimComponent.removeDoubleQuotes(values[2])) : Dates.getDateToday();