Skip to content
This repository has been archived by the owner on Jan 28, 2021. It is now read-only.

Commit

Permalink
remove the relatedIdentifier for now
Browse files Browse the repository at this point in the history
  • Loading branch information
Rory McNicholl committed Jul 13, 2017
1 parent 3ac5bf6 commit be7a6c2
Showing 1 changed file with 18 additions and 17 deletions.
35 changes: 18 additions & 17 deletions lib/plugins/EPrints/Plugin/Export/DataCiteXML.pm
Original file line number Diff line number Diff line change
Expand Up @@ -247,23 +247,24 @@ sub output_dataobj

if ($dataobj->exists_and_set( "repo_link" )) {


#If we have a custom override
if( $repo->can_call( "datacite_custom_repo_link" ) ){
my $relatedIdentifiers = $repo->call( "datacite_custom_repo_link", $xml, $entry, $dataobj );
$entry->appendChild( $relatedIdentifiers ) if (defined $relatedIdentifiers);
#default action
}else{
my $theurls = $dataobj->get_value( "repo_link" );
my $relatedIdentifiers = $xml->create_element( "relatedIdentifiers" );
foreach my $theurl ( @$theurls ) {
my $linkk = $theurl->{link};
if (!$linkk eq ''){
$relatedIdentifiers->appendChild( $xml->create_data_element( "relatedIdentifier", $linkk, relatedIdentifierType=>"URL", relationType=>"IsReferencedBy" ) );
}
$entry->appendChild( $relatedIdentifiers );
}
}
# RelatedIdentifier should be more careful in identifying the relationType so we will revisit after more input from the DataCite community probably for milestone 1.3

# #If we have a custom override
# if( $repo->can_call( "datacite_custom_repo_link" ) ){
# my $relatedIdentifiers = $repo->call( "datacite_custom_repo_link", $xml, $entry, $dataobj );
# $entry->appendChild( $relatedIdentifiers ) if (defined $relatedIdentifiers);
# #default action
# }else{
# my $theurls = $dataobj->get_value( "repo_link" );
# my $relatedIdentifiers = $xml->create_element( "relatedIdentifiers" );
# foreach my $theurl ( @$theurls ) {
# my $linkk = $theurl->{link};
# if (!$linkk eq ''){
# $relatedIdentifiers->appendChild( $xml->create_data_element( "relatedIdentifier", $linkk, relatedIdentifierType=>"URL", relationType=>"IsReferencedBy" ) );
# }
# $entry->appendChild( $relatedIdentifiers );
# }
# }
}

if ($dataobj->exists_and_set( "abstract" )) {
Expand Down

0 comments on commit be7a6c2

Please sign in to comment.