From be7a6c2eec2aa91cc60cfdac4a29d8896b49d83c Mon Sep 17 00:00:00 2001 From: Rory McNicholl Date: Thu, 13 Jul 2017 04:33:21 +0100 Subject: [PATCH] remove the relatedIdentifier for now --- .../EPrints/Plugin/Export/DataCiteXML.pm | 35 ++++++++++--------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/lib/plugins/EPrints/Plugin/Export/DataCiteXML.pm b/lib/plugins/EPrints/Plugin/Export/DataCiteXML.pm index 47d90e4..7cc792b 100644 --- a/lib/plugins/EPrints/Plugin/Export/DataCiteXML.pm +++ b/lib/plugins/EPrints/Plugin/Export/DataCiteXML.pm @@ -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" )) {