Jump to content
Wiki Home
EPrints Home
Bazaar
Files
Main menu
Main menu
move to sidebar
hide
Navigation
Front Page
EPrints 3 Manual
EPrints Training Course
EPrints Glossary
Installing EPrints
How-to Configure EPrints
EPrints 3.2+ API
EPrints 3 Reference
EPrints Plugins
Wiki
All categories
Recent changes
Main Page
Help
EPrints Documentation
Search
Search
Appearance
Log in
Request account
Personal tools
Log in
Request account
Pages for logged out editors
learn more
Contributions
Talk
Editing
ORCID
(section)
Page
Discussion
British English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
= Add additional identifiers to creators = Another approach to storing ORCIDs is to add an additional sub-field to the creator field. This has been discussed on the Eprints tech list. If you know how to do this, please document it here! This is how University of Bath has done it. We're getting the ORCID data from another system, so have used a text field to capture it for display. At present there is no special rendering on it, it's just displaying as a number. <source lang="perl"> { name => 'creators', type => 'compound', multiple => 1, fields => [ { sub_name => 'name', type => 'name', hide_honourific => 1, hide_lineage => 1, family_first => 1, }, { sub_name => 'id', type => 'text', input_cols => 20, allow_null => 1, }, { sub_name => 'orcid', type => 'text', input_cols => 20, allow_null => 1, } ], input_boxes => 4, }, </source> This is how University of Pittsburgh has done it: <source lang="perl"> { 'name' => 'creators', 'type' => 'compound', 'multiple' => 1, 'fields' => [ { 'sub_name' => 'name', 'type' => 'name', 'hide_honourific' => 1, 'hide_lineage' => 1, 'family_first' => 1, }, { 'sub_name' => 'email', 'type' => 'text', 'input_cols' => 20, 'allow_null' => 1, }, { 'sub_name' => 'id', 'type' => 'text', 'input_cols' => 20, 'allow_null' => 1, }, { 'sub_name' => 'orcid', 'type' => 'id', 'input_cols' => 19, 'allow_null' => 1, }, ], 'input_boxes' => 4, 'render_value' => 'custom_render_creators_with_orcid', }, </source> ==Notes from Pittsburgh:== (Information courtesy of Brian Gregg - bdgregg@pitt.edu) We have added some ORCID functionality in our IR System here at the University of Pittsburgh. We however have not “linked” our IR with orcid.org in anyway such as we do not have a lookup user in ORCID or the ability to add publications from ORCID to our IR. The only link is the entering of the ORCID into the system so that it can be displayed. An example record is available here: [http://d-scholarship.pitt.edu/28114/ http://d-scholarship.pitt.edu/28114/] # Users have an ORCID field in their profile – user_fields.pl # Any “Creator” types have an ORCID field added to the workflow – eprint_fields.pl # We have added ORCID validation adhering to this document: [http://support.orcid.org/knowledgebase/articles/116780-structure-of-the-orcid-identifier] - eprint_validate.pl # We have added the ORCID to the “lookup” function to populate the ORCID field from any user entries in the database. – cgi/users/lookup/name # We display the ORCID as such on the input form, where the green icon links out to our own orcid.pitt.edu site, but could be to orcid.org by default. # We display the ORCID as such on the public display of the record where the ORCID is linked out to orcid.org (see [http://d-scholarship.pitt.edu/28114/ example record]) ORCID Validator - snippet for eprints_validate.pl <source lang="perl"> # ORCID ID Validator for individuals # Reference: http://support.orcid.org/knowledgebase/articles/116780-structure-of-the-orcid-identifier # REGEX: ^\d{4}-\d{4}-\d{4}-(\d{3}X|\d{4})$ # my @name_fields = qw( creators contributors exhibitors producers conductors lyricists ); #which ever name fields you added 'orcid' to. foreach my $name_field ( @name_fields ) { if( $eprint->is_set( $name_field ) ) { foreach my $creator ( @{ $eprint->value( $name_field ) } ) { my $orcid = $creator->{orcid}; next unless defined $orcid; if ($repository->get_repository->can_call ( "validators", "isValidORCID" ) ) { if (!$repository->get_repository->call( [ "validators", "isValidORCID" ], $orcid )) { my $field_text = $repository->html_phrase( "eprint_fieldname_$name_field" ); my $field_frag = $repository->make_element( "span", class=>"ep_problem_field:$name_field" ); $field_frag->appendChild($field_text); push @problems, $repository->html_phrase( "warnings:orcid_invalid", orcid => $repository->get_repository->make_text($orcid), field => $field_frag, ); } } else { $repository->get_repository->log( "Can not call isValidORCID." ); } } } } </source> Phrase for "warnings:orcid_invalid": <source lang="xml"> <epp:phrase id="warnings:orcid_invalid">The ORCID ID: <b><epc:pin name="orcid"/></b> is not a valid ORCID ID as it does not conform to the ORCID ID specification. Please edit the <epc:pin name="field"/> with the associated ORCID or remove it from the name completely.</epp:phrase> </source> Additional Function that can be placed either at the end of eprints_validate.pl (after the final };) or elsewhere: <source lang="perl"> ############################################ # Function: isValidORCID # Description: Used to validate ORCID IDs # # From: http://support.orcid.org/knowledgebase/articles/116780-structure-of-the-orcid-identifier (Checksum) # $c->{validators}->{isValidORCID} = sub { my $ORCID = $_[0]; #Check for valid length of 19 characters. my $size = length($ORCID); if ($size > 19 ) { return 0; } else { #Check actual validity of the ID mathematically. $ORCID =~ s/\-//g; my @chars = split(//, $ORCID); my $total = 0; for ( my $i=0; $i<15; $i++) { $total = ($total + $chars[$i]) *2; } my $remainder = $total % 11; my $result = (12 - $remainder) % 11; return ($chars[15] == ($result==10 ? 'X' : $result)) } }; </source> Additionally you will have to define a custom render to add the fields to be displayed in the abstract/summary page.
Summary:
Please note that all contributions to EPrints Documentation may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
EPrints Documentation:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)