Revision 58497
Added by Konstantina Galouni almost 4 years ago
claimResultSearchForm.component.ts | ||
---|---|---|
180 | 180 |
this.crossrefStatus = this.errorCodes.LOADING; |
181 | 181 |
// this.crossrefResultsNum = null; |
182 | 182 |
if (this.DOIs.length > 0) { |
183 |
this._searchCrossrefService.searchCrossrefByDOIs(this.DOIs, this.properties.searchCrossrefAPIURL, true).subscribe(
|
|
183 |
this._searchCrossrefService.searchCrossrefByDOIs(this.DOIs, this.properties, true).subscribe( |
|
184 | 184 |
data => { |
185 | 185 |
if (data != null) { |
186 | 186 |
this.crossrefResults = data[1]; |
187 | 187 |
this.crossrefPage = page; |
188 | 188 |
this.crossrefResultsNum = data[0]; |
189 | 189 |
if (this.crossrefResultsNum == 0) { |
190 |
this._searchCrossrefService.searchCrossrefResults(term, size, page, this.properties.searchCrossrefAPIURL, true).subscribe(
|
|
190 |
this._searchCrossrefService.searchCrossrefResults(StringUtils.URIEncode(term), size, page, this.properties, true).subscribe(
|
|
191 | 191 |
data => { |
192 | 192 |
if (data != null) { |
193 | 193 |
this.crossrefResults = data[1]; |
... | ... | |
217 | 217 |
err => { |
218 | 218 |
ClaimResultSearchFormComponent.handleError("Error getting crossref by DOIs: " + JSON.stringify(this.DOIs), err); |
219 | 219 |
|
220 |
this._searchCrossrefService.searchCrossrefResults(term, size, page, this.properties.searchCrossrefAPIURL, true).subscribe(
|
|
220 |
this._searchCrossrefService.searchCrossrefResults(StringUtils.URIEncode(term), size, page, this.properties, true).subscribe(
|
|
221 | 221 |
data => { |
222 | 222 |
this.crossrefResults = data[1]; |
223 | 223 |
this.crossrefPage = page; |
... | ... | |
237 | 237 |
} else { |
238 | 238 |
|
239 | 239 |
|
240 |
this._searchCrossrefService.searchCrossrefResults(term, size, page, this.properties.searchCrossrefAPIURL, true).subscribe(
|
|
240 |
this._searchCrossrefService.searchCrossrefResults(StringUtils.URIEncode(term), size, page, this.properties, true).subscribe(
|
|
241 | 241 |
data => { |
242 | 242 |
if (data != null) { |
243 | 243 |
this.crossrefResults = data[1]; |
... | ... | |
374 | 374 |
private getOrcidAuthor(term: string, addId) { |
375 | 375 |
this.orcidResultsNum = null; |
376 | 376 |
//passing structures in order to fill them in service |
377 |
this._searchOrcidService.searchOrcidAuthor(term.replace(/\s/g, ""), this.authorIds,
|
|
377 |
this._searchOrcidService.searchOrcidAuthor(StringUtils.URIEncode(term.replace(/\s/g, "")), this.authorIds,
|
|
378 | 378 |
this.authors, this.properties, addId).subscribe( |
379 | 379 |
data => { |
380 | 380 |
if (data != null && data == true && addId) { |
... | ... | |
404 | 404 |
this.selectAuthorId = "0"; |
405 | 405 |
this.orcidStatus = this.errorCodes.LOADING; |
406 | 406 |
//passing structures in order to fill them in service |
407 |
this._searchOrcidService.searchOrcidAuthors(term, this.properties).subscribe(
|
|
407 |
this._searchOrcidService.searchOrcidAuthors(StringUtils.URIEncode(term), this.properties).subscribe(
|
|
408 | 408 |
data => { |
409 | 409 |
this.authorIds = data; |
410 | 410 |
if (data != null) { |
... | ... | |
490 | 490 |
private enhanceInfoFromDOI(entity: ClaimEntity) { |
491 | 491 |
|
492 | 492 |
if (entity.result.DOI != null) { |
493 |
this._searchCrossrefService.searchCrossrefByDOIs([entity.result.DOI], this.properties.searchCrossrefAPIURL, true).subscribe(
|
|
493 |
this._searchCrossrefService.searchCrossrefByDOIs([entity.result.DOI], this.properties, true).subscribe( |
|
494 | 494 |
data => { |
495 | 495 |
if (data != null && data[0] > 0 && data[1]) { |
496 | 496 |
let crossrefResult: ClaimEntity = data[1][0]; |
... | ... | |
661 | 661 |
this.dataciteResultsNum = this.dataciteResults.length; |
662 | 662 |
this.dataciteStatus = this.errorCodes.DONE; |
663 | 663 |
if (this.dataciteResultsNum == 0) { |
664 |
this._searchDataciteService.searchDataciteResults(term, size, page, this.properties, true).subscribe(
|
|
664 |
this._searchDataciteService.searchDataciteResults(StringUtils.URIEncode(term), size, page, this.properties, true).subscribe(
|
|
665 | 665 |
data => { |
666 | 666 |
this.dataciteResults = data[1]; |
667 | 667 |
this.datacitePage = page; |
... | ... | |
686 | 686 |
} else { |
687 | 687 |
|
688 | 688 |
|
689 |
this._searchDataciteService.searchDataciteResults(term, size, page, this.properties, true).subscribe(
|
|
689 |
this._searchDataciteService.searchDataciteResults(StringUtils.URIEncode(term), size, page, this.properties, true).subscribe(
|
|
690 | 690 |
data => { |
691 | 691 |
this.dataciteResults = data[1]; |
692 | 692 |
this.datacitePage = page; |
Also available in: Unified diff
[Trunk | Library]:
1. entitiesAutoComplete.component.ts: [Bug fix] Add missing encoding in autocomplete term (problem when query uses cache).
2. newSearchPage.component.ts:
a. [Bug fix] Add missing keyword encoding for simple search form (problem when query uses cache).
b. [Bug fix] In advanced search, when "all fields" (field id="q") is added more than once in form, add both values (params "+=" and not "=" in "getSearchAPIQueryForAdvancedSearhField()" method).
3. searchAll.component.ts: Decode keyword parameter from url (to show it properly in search form).
4. searchAll.component.ts:
a. [Bug fix] Add missing encoding in search term, used by datacite, crossref and orcid search services (problem when query uses cache).
b. In methods of crossref service pass properties, instead of url - url will be built in service.
5. searchCrossref.service.ts:
a. In all methods, pass properties, instead of url.
b. Use cache when available.
6. ISVocabularies.service.ts: [Bug fix]: Return "accessMode.json" vocabulary when: entity == "result" (case added in if statement).