Compare commits

..

2 Commits

Author SHA1 Message Date
Enrico Ottonello 8f281846a4 update test file 2022-02-28 13:37:53 +01:00
Enrico Ottonello f833de8a75 added relatedIdentifierType, fix IsCitedBy value 2022-02-28 13:37:28 +01:00
2 changed files with 5 additions and 2 deletions

View File

@ -36,7 +36,7 @@
], ],
"dates": [ "dates": [
{ {
"date": "2021-12-09T21:10:30", "date": "2021-12-10T11:11:09",
"dateType": "Collected" "dateType": "Collected"
} }
] ]

View File

@ -70,7 +70,7 @@ public class RDFConverter {
DataciteProtein dataciteProtein = new DataciteProtein(); DataciteProtein dataciteProtein = new DataciteProtein();
citations.forEach(citation -> { citations.forEach(citation -> {
addRelatedIdentifier(dataciteProtein, citation, "CitedBy"); addRelatedIdentifier(dataciteProtein, citation, "IsCitedBy");
}); });
DataciteProtein.Types types = new DataciteProtein.Types(); DataciteProtein.Types types = new DataciteProtein.Types();
@ -203,6 +203,9 @@ public class RDFConverter {
if (!relationType.isEmpty()) { if (!relationType.isEmpty()) {
relatedIdentifier.setRelationType(relationType); relatedIdentifier.setRelationType(relationType);
} }
if (relatedIdentifierValue.contains("http://") || relatedIdentifierValue.contains("https://")) {
relatedIdentifier.setRelatedIdentifierType("URL");
}
DataciteProtein.getRelatedIdentifiers().add(relatedIdentifier); DataciteProtein.getRelatedIdentifiers().add(relatedIdentifier);
} }