File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
mir-webapp/src/main/vue/name-search/src/api Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ import {i18n} from "@/api/I18N";
24
24
25
25
const VIAF_ID_PREFIX_1 = "http://viaf.org/viaf/" ;
26
26
const VIAF_ID_PREFIX_2 = "https://viaf.org/viaf/" ;
27
+ const ORCID_ID_PREFIX = "https://orcid.org/" ;
27
28
28
29
export class LobidSearchProvider implements SearchProvider {
29
30
@@ -95,7 +96,10 @@ export class LobidSearchProvider implements SearchProvider {
95
96
for ( const sameAsIndex in member . sameAs ) {
96
97
const sameAs = member . sameAs [ sameAsIndex ] ;
97
98
if ( "id" in sameAs ) {
98
- if ( sameAs . id . indexOf ( VIAF_ID_PREFIX_1 ) == 0 ) {
99
+ if ( sameAs . id . indexOf ( ORCID_ID_PREFIX ) == 0 ) {
100
+ const id = { type : "orcid" , value : sameAs . id . substr ( ORCID_ID_PREFIX . length ) } ;
101
+ searchResult . identifier . push ( id ) ;
102
+ } else if ( sameAs . id . indexOf ( VIAF_ID_PREFIX_1 ) == 0 ) {
99
103
const id = { type : "viaf" , value : sameAs . id . substr ( VIAF_ID_PREFIX_1 . length ) } ;
100
104
searchResult . identifier . push ( id ) ;
101
105
} else if ( sameAs . id . indexOf ( VIAF_ID_PREFIX_2 ) == 0 ) {
@@ -119,4 +123,4 @@ export class LobidSearchProvider implements SearchProvider {
119
123
return result ;
120
124
}
121
125
122
- }
126
+ }
You can’t perform that action at this time.
0 commit comments