Skip to content
Snippets Groups Projects
Commit d0295afa authored by Martin Weise's avatar Martin Weise
Browse files

Merge branch '507-improve-doi-resolving' into 'dev'

Refactored DOI WIP

See merge request !398
parents 34e79afc 24f8498a
Branches
Tags
2 merge requests!400Need assets path,!398Refactored DOI WIP
Showing
with 1208 additions and 25 deletions
SET FOREIGN_KEY_CHECKS = 0;
BEGIN;
UPDATE mdb_users SET id = :old_id WHERE id = :new_id;
UPDATE mdb_have_access SET user_id = :old_id WHERE user_id = :new_id;
UPDATE mdb_databases SET owned_by = :old_id WHERE owned_by = :new_id;
UPDATE mdb_databases SET contact_person = :old_id WHERE contact_person = :new_id;
UPDATE mdb_tables SET owned_by = :old_id WHERE owned_by = :new_id;
UPDATE mdb_view SET owned_by = :old_id WHERE owned_by = :new_id;
UPDATE mdb_identifiers SET owned_by = :old_id WHERE owned_by = :new_id;
COMMIT;
SET FOREIGN_KEY_CHECKS = 1;
\ No newline at end of file
package at.tuwien.api.doi;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import lombok.extern.jackson.Jacksonized;
@Getter
@Setter
@Builder
@EqualsAndHashCode
@NoArgsConstructor
@AllArgsConstructor
@Jacksonized
@ToString
public class AffiliationDto {
@Schema(example = "ISE, TU Wien, Data Science Research Unit, Vienna, Austria")
private String name;
}
package at.tuwien.api.doi;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import lombok.extern.jackson.Jacksonized;
import java.util.List;
@Getter
@Setter
@Builder
@EqualsAndHashCode
@NoArgsConstructor
@AllArgsConstructor
@Jacksonized
@ToString
public class AuthorDto {
@Schema(example = "Weise")
private String family;
@Schema(example = "Martin")
private String given;
@JsonProperty("ORCID")
@Schema(example = "http://orcid.org/0000-0003-4216-302X")
private String orcid;
@Schema(example = "first")
private String sequence;
private List<AffiliationDto> affiliation;
}
package at.tuwien.api.doi;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.*;
import lombok.extern.jackson.Jacksonized;
import java.util.List;
@Getter
@Setter
@Builder
@EqualsAndHashCode
@NoArgsConstructor
@AllArgsConstructor
@Jacksonized
@ToString
public class DoiDto {
@NotNull
@Schema(example = "https://doi.org/10.5334/dsj-2022-004")
private String id;
@NotNull
private TimeRepresentationDto indexed;
private TimeRepresentationDto deposited;
private TimeRepresentationDto issued;
private TimeRepresentationDto published;
@JsonProperty("DOI")
@Schema(example = "10.5334/dsj-2022-004")
private String doi;
@NotNull
@Schema(example = "dataset")
private String type;
private List<AuthorDto> author;
@Schema(example = "Crossref")
private String source;
@Schema(example = "DBRepo: A Data Repository System for Research Data in Databases")
private String title;
@Schema(example = "10.1109")
private String prefix;
@Schema(example = "21")
private String volume;
@JsonProperty("is-referenced-by-count")
@Schema(example = "0")
private Integer isReferencedByCount;
@JsonProperty("reference-count")
@Schema(example = "28")
private Integer referenceCount;
@Schema(example = "IEEE")
private String publisher;
@Schema(example = "322-331")
private String page;
private String member;
@Schema(example = "2024 IEEE International Conference on Big Data (BigData)")
private String event;
private List<ReferenceDto> reference;
private Integer score;
@JsonProperty("URL")
private String url;
}
package at.tuwien.api.doi;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import lombok.extern.jackson.Jacksonized;
@Getter
@Setter
@Builder
@EqualsAndHashCode
@NoArgsConstructor
@AllArgsConstructor
@Jacksonized
@ToString
public class LicenseDto {
private TimeRepresentationDto start;
@JsonProperty("content-version")
@Schema(example = "stm-asf")
private String contentVersion;
@JsonProperty("delay-in-days")
@Schema(example = "0")
private Integer delayInDays;
@JsonProperty("URL")
@Schema(example = "https://doi.org/10.15223/policy-029")
private String url;
}
package at.tuwien.api.doi;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.*;
import lombok.extern.jackson.Jacksonized;
@Getter
@Setter
@Builder
@EqualsAndHashCode
@NoArgsConstructor
@AllArgsConstructor
@Jacksonized
@ToString
public class LinkDto {
@JsonProperty("URL")
@Schema(example = "http://xplorestaging.ieee.org/ielx8/10824975/10824942/10825401.pdf?arnumber=10825401")
private String url;
@JsonProperty("content-type")
@Schema(example = "unspecified")
private String contentType;
@JsonProperty("content-version")
@Schema(example = "vor")
private String contentVersion;
@JsonProperty("intended-application")
@Schema(example = "similarity-checking")
private String intendedApplication;
}
package at.tuwien.api.doi;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.*;
import lombok.extern.jackson.Jacksonized;
import java.util.List;
@Getter
@Setter
@Builder
@EqualsAndHashCode
@NoArgsConstructor
@AllArgsConstructor
@Jacksonized
@ToString
public class ReferenceDto {
@NotNull
@Schema(example = "ref1")
private String key;
@JsonProperty("doi-asserted-by")
@Schema(example = "publisher")
private String doiAssertedBy;
@JsonProperty("DOI")
@Schema(example = "10.1038/sdata.2016.18")
private String doi;
@Schema(example = "2024")
private String year;
@JsonProperty("article-title")
@Schema(example = "The Dryad Data Repository: a Singapore Framework metadata Architecture in a DSpace Environment")
private String articleTitle;
@JsonProperty("volume-title")
@Schema(example = "Proceedings of the 2008 International Conference on Dublin Core and Metadata Applications")
private String volumeTitle;
@JsonProperty("journal-title")
@Schema(example = "Libraries Research Publications")
private String journalTitle;
@Schema(example = "Witt")
private String author;
@JsonProperty("first-page")
@Schema(example = "157")
private String firstPage;
}
package at.tuwien.api.doi;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import lombok.extern.jackson.Jacksonized;
@Getter
@Setter
@Builder
@EqualsAndHashCode
@NoArgsConstructor
@AllArgsConstructor
@Jacksonized
@ToString
public class ResourceDto {
private ResourceRepresentationDto primary;
}
package at.tuwien.api.doi;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.*;
import lombok.extern.jackson.Jacksonized;
@Getter
@Setter
@Builder
@EqualsAndHashCode
@NoArgsConstructor
@AllArgsConstructor
@Jacksonized
@ToString
public class ResourceRepresentationDto {
@JsonProperty("URL")
private String url;
}
package at.tuwien.api.doi;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import lombok.extern.jackson.Jacksonized;
import java.time.Instant;
import java.util.List;
@Getter
@Setter
@Builder
@EqualsAndHashCode
@NoArgsConstructor
@AllArgsConstructor
@Jacksonized
@ToString
public class TimeRepresentationDto {
@JsonProperty("date-parts")
@Schema(example = "[[2025,1,18]]")
private List<List<Integer>> dateParts;
@JsonProperty("date-time")
@Schema(example = "2021-03-12T15:26:21Z")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssX", timezone = "UTC")
private Instant dateTime;
private Long timestamp;
}
...@@ -59,6 +59,7 @@ dbrepo: ...@@ -59,6 +59,7 @@ dbrepo:
brokerService: "${BROKER_SERVICE_ENDPOINT:http://broker-service:15672}" brokerService: "${BROKER_SERVICE_ENDPOINT:http://broker-service:15672}"
crossRefService: "${CROSSREF_ENDPOINT:http://data.crossref.org}" crossRefService: "${CROSSREF_ENDPOINT:http://data.crossref.org}"
dashboardService: "${DASHBOARD_SERVICE_ENDPOINT:http://dashboard-service:8080}" dashboardService: "${DASHBOARD_SERVICE_ENDPOINT:http://dashboard-service:8080}"
doiService: "${DOI_ENDPOINT:https://doi.org}"
dataService: "${DATA_SERVICE_ENDPOINT:http://data-service:8080}" dataService: "${DATA_SERVICE_ENDPOINT:http://data-service:8080}"
rorService: "${ROR_ENDPOINT:https://api.ror.org}" rorService: "${ROR_ENDPOINT:https://api.ror.org}"
searchService: "${SEARCH_SERVICE_ENDPOINT:http://search-service:8080}" searchService: "${SEARCH_SERVICE_ENDPOINT:http://search-service:8080}"
......
package at.ac.tuwien.ifs.dbrepo.gateway; package at.ac.tuwien.ifs.dbrepo.gateway;
import at.ac.tuwien.ifs.dbrepo.core.api.crossref.CrossrefDto; import at.ac.tuwien.ifs.dbrepo.core.api.crossref.CrossRefDto;
import at.ac.tuwien.ifs.dbrepo.core.exception.DoiNotFoundException; import at.ac.tuwien.ifs.dbrepo.core.exception.DoiNotFoundException;
import at.ac.tuwien.ifs.dbrepo.core.test.BaseTest; import at.ac.tuwien.ifs.dbrepo.core.test.BaseTest;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.http.HttpEntity; import org.springframework.http.HttpEntity;
...@@ -23,24 +24,25 @@ import static org.mockito.Mockito.*; ...@@ -23,24 +24,25 @@ import static org.mockito.Mockito.*;
@Log4j2 @Log4j2
@SpringBootTest @SpringBootTest
@ExtendWith(SpringExtension.class) @ExtendWith(SpringExtension.class)
public class CrossrefGatewayUnitTest extends BaseTest { public class CrossRefGatewayUnitTest extends BaseTest {
@MockBean @MockBean
@Qualifier("crossRefServiceRestTemplate")
private RestTemplate restTemplate; private RestTemplate restTemplate;
@Autowired @Autowired
private CrossrefGateway crossrefGateway; private CrossRefGateway crossRefGateway;
@Test @Test
public void findById_succeeds() throws DoiNotFoundException { public void findById_succeeds() throws DoiNotFoundException {
/* mock */ /* mock */
when(restTemplate.exchange(anyString(), eq(HttpMethod.GET), any(HttpEntity.class), eq(CrossrefDto.class))) when(restTemplate.exchange(anyString(), eq(HttpMethod.GET), eq(HttpEntity.EMPTY), eq(CrossRefDto.class)))
.thenReturn(ResponseEntity.status(HttpStatus.OK) .thenReturn(ResponseEntity.status(HttpStatus.OK)
.build()); .build());
/* test */ /* test */
crossrefGateway.findById("501100004729"); crossRefGateway.findById("501100004729");
} }
@Test @Test
...@@ -49,11 +51,11 @@ public class CrossrefGatewayUnitTest extends BaseTest { ...@@ -49,11 +51,11 @@ public class CrossrefGatewayUnitTest extends BaseTest {
/* mock */ /* mock */
doThrow(HttpServerErrorException.class) doThrow(HttpServerErrorException.class)
.when(restTemplate) .when(restTemplate)
.exchange(anyString(), eq(HttpMethod.GET), any(HttpEntity.class), eq(CrossrefDto.class)); .exchange(anyString(), eq(HttpMethod.GET), eq(HttpEntity.EMPTY), eq(CrossRefDto.class));
/* test */ /* test */
assertThrows(DoiNotFoundException.class, () -> { assertThrows(DoiNotFoundException.class, () -> {
crossrefGateway.findById("501100004729"); crossRefGateway.findById("501100004729");
}); });
} }
......
package at.ac.tuwien.ifs.dbrepo.service; package at.ac.tuwien.ifs.dbrepo.service;
import at.ac.tuwien.ifs.dbrepo.core.api.crossref.CrossrefDto; import at.ac.tuwien.ifs.dbrepo.core.api.crossref.CrossRefDto;
import at.ac.tuwien.ifs.dbrepo.core.api.orcid.OrcidDto; import at.ac.tuwien.ifs.dbrepo.core.api.orcid.OrcidDto;
import at.ac.tuwien.ifs.dbrepo.core.api.ror.RorDto; import at.ac.tuwien.ifs.dbrepo.core.api.ror.RorDto;
import at.ac.tuwien.ifs.dbrepo.core.api.user.external.ExternalMetadataDto; import at.ac.tuwien.ifs.dbrepo.core.api.user.external.ExternalMetadataDto;
import at.ac.tuwien.ifs.dbrepo.core.api.user.external.affiliation.ExternalAffiliationDto; import at.ac.tuwien.ifs.dbrepo.core.api.user.external.affiliation.ExternalAffiliationDto;
import at.ac.tuwien.ifs.dbrepo.core.exception.*; import at.ac.tuwien.ifs.dbrepo.core.exception.*;
import at.ac.tuwien.ifs.dbrepo.gateway.CrossrefGateway; import at.ac.tuwien.ifs.dbrepo.core.test.BaseTest;
import at.ac.tuwien.ifs.dbrepo.gateway.CrossRefGateway;
import at.ac.tuwien.ifs.dbrepo.gateway.OrcidGateway; import at.ac.tuwien.ifs.dbrepo.gateway.OrcidGateway;
import at.ac.tuwien.ifs.dbrepo.gateway.RorGateway; import at.ac.tuwien.ifs.dbrepo.gateway.RorGateway;
import at.ac.tuwien.ifs.dbrepo.oaipmh.OaiErrorType; import at.ac.tuwien.ifs.dbrepo.oaipmh.OaiErrorType;
import at.ac.tuwien.ifs.dbrepo.oaipmh.OaiListIdentifiersParameters; import at.ac.tuwien.ifs.dbrepo.oaipmh.OaiListIdentifiersParameters;
import at.ac.tuwien.ifs.dbrepo.oaipmh.OaiRecordParameters; import at.ac.tuwien.ifs.dbrepo.oaipmh.OaiRecordParameters;
import at.ac.tuwien.ifs.dbrepo.core.test.BaseTest;
import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
...@@ -48,7 +48,7 @@ public class MetadataServiceUnitTest extends BaseTest { ...@@ -48,7 +48,7 @@ public class MetadataServiceUnitTest extends BaseTest {
private RorGateway rorGateway; private RorGateway rorGateway;
@MockBean @MockBean
private CrossrefGateway crossrefGateway; private CrossRefGateway crossRefGateway;
@MockBean @MockBean
private IdentifierService identifierService; private IdentifierService identifierService;
...@@ -203,11 +203,11 @@ public class MetadataServiceUnitTest extends BaseTest { ...@@ -203,11 +203,11 @@ public class MetadataServiceUnitTest extends BaseTest {
@Test @Test
public void findByUrl_doi_succeeds() throws OrcidNotFoundException, RorNotFoundException, IOException, public void findByUrl_doi_succeeds() throws OrcidNotFoundException, RorNotFoundException, IOException,
DoiNotFoundException, IdentifierNotSupportedException { DoiNotFoundException, IdentifierNotSupportedException {
final CrossrefDto doi = objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false) final CrossRefDto doi = objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false)
.readValue(new File("src/test/resources/json/doi_ec.json"), CrossrefDto.class); .readValue(new File("src/test/resources/json/doi_ec.json"), CrossRefDto.class);
/* mock */ /* mock */
when(crossrefGateway.findById(FUNDER_1_IDENTIFIER_ID_ONLY)) when(crossRefGateway.findById(FUNDER_1_IDENTIFIER_ID_ONLY))
.thenReturn(doi); .thenReturn(doi);
/* test */ /* test */
...@@ -223,7 +223,7 @@ public class MetadataServiceUnitTest extends BaseTest { ...@@ -223,7 +223,7 @@ public class MetadataServiceUnitTest extends BaseTest {
/* mock */ /* mock */
doThrow(DoiNotFoundException.class) doThrow(DoiNotFoundException.class)
.when(crossrefGateway) .when(crossRefGateway)
.findById(anyString()); .findById(anyString());
/* test */ /* test */
......
{
"indexed": {
"date-parts": [
[
2024,
12,
11
]
],
"date-time": "2024-12-11T00:54:48Z",
"timestamp": 1733878488241,
"version": "3.30.1"
},
"reference-count": 0,
"publisher": "International STM Association",
"content-domain": {
"domain": [],
"crossmark-restriction": false
},
"DOI": "10.15223\/policy-037",
"type": "database",
"created": {
"date-parts": [
[
2021,
5,
3
]
],
"date-time": "2021-05-03T21:10:23Z",
"timestamp": 1620076223000
},
"source": "Crossref",
"is-referenced-by-count": 0,
"title": "Article Sharing Framework Policy #37",
"prefix": "10.15223",
"member": "5868",
"container-title": [],
"original-title": [],
"deposited": {
"date-parts": [
[
2021,
5,
3
]
],
"date-time": "2021-05-03T21:10:23Z",
"timestamp": 1620076223000
},
"score": 1,
"resource": {
"primary": {
"URL": "https:\/\/www.stm-assoc.org\/asf\/policy-037"
}
},
"subtitle": [],
"short-title": [],
"issued": {
"date-parts": [
[
null
]
]
},
"references-count": 0,
"URL": "http:\/\/dx.doi.org\/10.15223\/policy-037",
"relation": {},
"subject": []
}
\ No newline at end of file
{
"type": "dataset",
"id": "https://doi.org/10.5281/zenodo.1404173",
"author": [
{
"family": "Marshall",
"given": "Michael"
}
],
"issued": {
"date-parts": [
[
2018,
8,
27
]
]
},
"abstract": "<strong>Data Set Characteristics:</strong>\n\nNumber of Instances:\n150 (50 in each of three classes)\nNumber of Attributes:\n\n4 numeric, predictive attributes and the class\nAttribute Information:\n\n\n\tsepal length in cm\n\tsepal width in cm\n\tpetal length in cm\n\tpetal width in cm\n\t\n\tclass:\n\n\t\n\t\tIris-Setosa\n\t\tIris-Versicolour\n\t\tIris-Virginica",
"DOI": "10.5281/ZENODO.1404173",
"publisher": "Zenodo",
"title": "Scikit-Learn Iris",
"URL": "https://zenodo.org/record/1404173",
"copyright": "Creative Commons Attribution 4.0"
}
\ No newline at end of file
{
"indexed": {
"date-parts": [
[
2024,
7,
1
]
],
"date-time": "2024-07-01T09:15:12Z",
"timestamp": 1719825312147
},
"reference-count": 37,
"publisher": "Ubiquity Press, Ltd.",
"content-domain": {
"domain": [],
"crossmark-restriction": false
},
"published-print": {
"date-parts": [
[
2022,
2,
9
]
]
},
"DOI": "10.5334\/dsj-2022-004",
"type": "journal-article",
"created": {
"date-parts": [
[
2022,
2,
9
]
],
"date-time": "2022-02-09T11:11:20Z",
"timestamp": 1644405080000
},
"source": "Crossref",
"is-referenced-by-count": 5,
"title": "OSSDIP: Open Source Secure Data Infrastructure and Processes Supporting Data Visiting",
"prefix": "10.5334",
"volume": "21",
"author": [
{
"ORCID": "http:\/\/orcid.org\/0000-0003-4216-302X",
"authenticated-orcid": false,
"given": "Martin",
"family": "Weise",
"sequence": "first",
"affiliation": []
},
{
"ORCID": "http:\/\/orcid.org\/0000-0002-2854-0434",
"authenticated-orcid": false,
"given": "Filip",
"family": "Kovacevic",
"sequence": "additional",
"affiliation": []
},
{
"ORCID": "http:\/\/orcid.org\/0000-0003-4615-2774",
"authenticated-orcid": false,
"given": "Nikolas",
"family": "Popper",
"sequence": "additional",
"affiliation": []
},
{
"ORCID": "http:\/\/orcid.org\/0000-0002-9272-6225",
"authenticated-orcid": false,
"given": "Andreas",
"family": "Rauber",
"sequence": "additional",
"affiliation": []
}
],
"member": "3285",
"reference": [
{
"key": "key20220209060905_B1",
"volume-title": "Defenders\u2019 Guide to Container Infrastructure Security",
"year": "2019"
},
{
"issue": "2",
"key": "key20220209060905_B2",
"first-page": "315",
"article-title": "20 remoteneps: Data Dissemination in a Collaborative Workspace",
"volume": "14",
"year": "2011",
"journal-title": "Zeitschrift f\u00fcr Erziehungswissenschaft"
},
{
"issue": "1",
"key": "key20220209060905_B3",
"article-title": "Kadi4Mat: A Research Data Infrastructure for Materials Science",
"volume": "20",
"year": "2021",
"journal-title": "Data Science Journal"
},
{
"issue": "1",
"key": "key20220209060905_B4",
"doi-asserted-by": "crossref",
"first-page": "195",
"DOI": "10.1055\/s-0039-1677917",
"article-title": "The French Health Data Hub and the German Medical Informatics Initiatives: Two National Projects to Promote Data Sharing in Healthcare",
"volume": "28",
"year": "2019",
"journal-title": "EN. Yearbook of Medical Informatics"
},
{
"key": "key20220209060905_B5",
"article-title": "Five Safes: Designing data access for research [Online]",
"year": "2016",
"journal-title": "Economics Working Paper Series 1601"
},
{
"key": "key20220209060905_B6",
"article-title": "Remote Access to Official Microdata",
"year": "2020"
},
{
"key": "key20220209060905_B7",
"first-page": "554",
"article-title": "Role-Based Access Controls",
"year": "1992"
},
{
"key": "key20220209060905_B8",
"article-title": "De-identification of personal information",
"year": "2015",
"journal-title": "National institute of standards and technology"
},
{
"key": "key20220209060905_B9",
"first-page": "16",
"article-title": "Secure cloud computing with a virtualized network infrastructure",
"year": "2010"
},
{
"key": "key20220209060905_B10",
"doi-asserted-by": "crossref",
"first-page": "196",
"DOI": "10.1016\/j.jbi.2014.01.003",
"article-title": "A case study of the Secure Anonymous Information Linkage (SAIL) Gateway: A privacy-protecting remote access system for health-related research and evaluation",
"volume": "50",
"year": "2014",
"journal-title": "Journal of Biomedical Informatics"
},
{
"issue": "4",
"key": "key20220209060905_B11",
"doi-asserted-by": "crossref",
"first-page": "533",
"DOI": "10.1016\/j.giq.2010.10.008",
"article-title": "Key Issues in Data Center Security: An Investigation of Government Audit Reports",
"volume": "28",
"year": "2011",
"journal-title": "Government Information Quarterly"
},
{
"issue": "5",
"key": "key20220209060905_B12",
"doi-asserted-by": "crossref",
"first-page": "38",
"DOI": "10.1109\/MSEC.2020.2990230",
"article-title": "Dedicated Security Chips in the Age of Secure Enclaves",
"volume": "18",
"year": "2020",
"journal-title": "IEEE Security & Privacy"
},
{
"issue": "3",
"key": "key20220209060905_B13",
"first-page": "34",
"volume": "41",
"year": "2012",
"journal-title": "Temporal Features in SQL:2011"
},
{
"issue": "4",
"key": "key20220209060905_B14",
"article-title": "Watermill: An Optimized Fingerprinting System for Databases under Constraints",
"volume": "20",
"year": "2008",
"journal-title": "IEEE Transactions on Knowledge and Data Engineering"
},
{
"key": "key20220209060905_B15",
"article-title": "Keystone: An Open Framework for Architecting Trusted Execution Environments",
"year": "2020"
},
{
"key": "key20220209060905_B16",
"first-page": "106",
"article-title": "T-closeness: privacy beyond k-anonymity and l-diversity",
"year": "2007"
},
{
"issue": "1",
"key": "key20220209060905_B17",
"article-title": "Fingerprinting Relational Databases: Schemes and Specialties",
"volume": "2",
"year": "2005",
"journal-title": "Transactions on Dependable and Secure Computing"
},
{
"issue": "1",
"key": "key20220209060905_B18",
"doi-asserted-by": "crossref",
"first-page": "3",
"DOI": "10.1145\/1217299.1217302",
"article-title": "L-diversity: privacy beyond k-anonymity",
"volume": "1",
"year": "2007",
"journal-title": "Acm transactions on knowledge discovery from data (tkdd)"
},
{
"key": "key20220209060905_B19",
"first-page": "1",
"article-title": "Database security threats and challenges",
"year": "2020"
},
{
"key": "key20220209060905_B20",
"article-title": "Data grid concepts for data security in distributed computing",
"year": "2013",
"journal-title": "Arxiv preprint arxiv:1308.6058"
},
{
"key": "key20220209060905_B21",
"volume-title": "A vision of a Nordic secure digital infrastructure for health data: The Nordic Commons",
"year": "2019"
},
{
"key": "key20220209060905_B22",
"unstructured": "Peisert, S. 2021. An Examination and Survey of Data Confidentiality Issues and Solutions in Academic Research Computing. https:\/\/escholarship.org\/uc\/item\/7cz7m1ws. Online; accessed 22 December 2021."
},
{
"key": "key20220209060905_B23",
"first-page": "561",
"article-title": "Real-Time Screen Watermarking Using Overlaying Layer",
"year": "2014",
"journal-title": "2014 Ninth International Conference on Availability, Reliability and Security"
},
{
"issue": "4",
"key": "key20220209060905_B24",
"doi-asserted-by": "crossref",
"first-page": "203",
"DOI": "10.11128\/sne.27.tn.10396",
"article-title": "Planning Future Health: Developing Big Data and System Modelling Pipelines for Health System Research",
"volume": "27",
"year": "2017",
"journal-title": "Simulation Notes Europe"
},
{
"key": "key20220209060905_B25",
"first-page": "231",
"article-title": "Preventing Privilege Escalation",
"year": "2003"
},
{
"key": "key20220209060905_B26",
"year": "2015",
"journal-title": "Data Citation of Evolving Data: Recommendations of the Working Group on Data Citation (WGDC)"
},
{
"issue": "1",
"key": "key20220209060905_B27",
"article-title": "Identification of Reproducible Subsets for Data Citation, Sharing and Re-Use",
"volume": "12",
"year": "2016",
"journal-title": "Bulletin of the IEEE Technical Committe on Digital Libraries (TCDL)"
},
{
"key": "key20220209060905_B28",
"first-page": "199",
"article-title": "Hey, you, get off of my cloud: exploring information leakage in third-party compute clouds",
"year": "2009"
},
{
"key": "key20220209060905_B29",
"doi-asserted-by": "crossref",
"first-page": "221",
"DOI": "10.1109\/SERVICES.2015.40",
"volume-title": "2015 IEEE world congress on services",
"year": "2015"
},
{
"key": "key20220209060905_B30",
"doi-asserted-by": "crossref",
"first-page": "611",
"DOI": "10.1007\/978-3-658-11994-2_34",
"volume-title": "Methodological Issues of Longitudinal Surveys: The Example of the National Educational Panel Study",
"year": "2016"
},
{
"key": "key20220209060905_B31",
"first-page": "1",
"article-title": "A collective attestation scheme towards cloud system",
"year": "2020",
"journal-title": "Cluster computing"
},
{
"issue": "5",
"key": "key20220209060905_B32",
"doi-asserted-by": "crossref",
"first-page": "557",
"DOI": "10.1142\/S0218488502001648",
"article-title": "K-anonymity: a model for protecting privacy",
"volume": "10",
"year": "2002",
"journal-title": "International journal of uncertainty, fuzziness and knowledge-based systems"
},
{
"key": "key20220209060905_B33",
"unstructured": "United Kingdom Health Data Research Alliance. 2020. Trusted Research Environments [Online]. URL: https:\/\/ukhealthdata.org\/projects\/aligning-approach-to-trusted-research-environments\/. Accessed September 2020. Version 2.0."
},
{
"key": "key20220209060905_B34",
"first-page": "34",
"article-title": "FDA-DBRepo: A Data Preservation Repository Supporting FAIR Principles, Data Versioning and Reproducible Queries",
"year": "2021"
},
{
"key": "key20220209060905_B35",
"first-page": "51",
"article-title": "A Data-Visiting Infrastructure for Providing Access to Preserved Databases that Cannot be Shared or Made Publicly Accessible",
"year": "2021"
},
{
"key": "key20220209060905_B36",
"article-title": "OpenSAFELY: factors associated with COVID-19-related hospital death in the linked electronic health records of 17 million adult NHS patients",
"year": "2020",
"journal-title": "Medrxiv"
},
{
"key": "key20220209060905_B37",
"first-page": "305",
"article-title": "Cross-vm side channels and their use to extract private keys",
"year": "2012"
}
],
"container-title": "Data Science Journal",
"original-title": [],
"language": "en",
"link": [
{
"URL": "https:\/\/doi.org\/10.5334\/dsj-2022-004",
"content-type": "unspecified",
"content-version": "vor",
"intended-application": "similarity-checking"
}
],
"deposited": {
"date-parts": [
[
2022,
7,
11
]
],
"date-time": "2022-07-11T09:21:08Z",
"timestamp": 1657531268000
},
"score": 1,
"resource": {
"primary": {
"URL": "http:\/\/datascience.codata.org\/articles\/10.5334\/dsj-2022-004\/"
}
},
"subtitle": [],
"short-title": [],
"issued": {
"date-parts": [
[
2022
]
]
},
"references-count": 37,
"alternative-id": [
"10.5334\/dsj-2022-004"
],
"URL": "http:\/\/dx.doi.org\/10.5334\/dsj-2022-004",
"relation": {},
"ISSN": [
"1683-1470"
],
"subject": [],
"published": {
"date-parts": [
[
2022
]
]
}
}
\ No newline at end of file
{
"indexed": {
"date-parts": [
[
2025,
1,
18
]
],
"date-time": "2025-01-18T05:07:56Z",
"timestamp": 1737176876420,
"version": "3.33.0"
},
"reference-count": 28,
"publisher": "IEEE",
"license": [
{
"start": {
"date-parts": [
[
2024,
12,
15
]
],
"date-time": "2024-12-15T00:00:00Z",
"timestamp": 1734220800000
},
"content-version": "stm-asf",
"delay-in-days": 0,
"URL": "https:\/\/doi.org\/10.15223\/policy-029"
},
{
"start": {
"date-parts": [
[
2024,
12,
15
]
],
"date-time": "2024-12-15T00:00:00Z",
"timestamp": 1734220800000
},
"content-version": "stm-asf",
"delay-in-days": 0,
"URL": "https:\/\/doi.org\/10.15223\/policy-037"
}
],
"funder": [
{
"DOI": "10.13039\/100016234",
"name": "ASEAN-European Academic University Network",
"doi-asserted-by": "publisher",
"id": [
{
"id": "10.13039\/100016234",
"id-type": "DOI",
"asserted-by": "publisher"
}
]
}
],
"content-domain": {
"domain": [],
"crossmark-restriction": false
},
"published-print": {
"date-parts": [
[
2024,
12,
15
]
]
},
"DOI": "10.1109\/bigdata62323.2024.10825401",
"type": "proceedings-article",
"created": {
"date-parts": [
[
2025,
1,
16
]
],
"date-time": "2025-01-16T18:31:23Z",
"timestamp": 1737052283000
},
"page": "322-331",
"source": "Crossref",
"is-referenced-by-count": 0,
"title": "DBRepo: A Data Repository System for Research Data in Databases",
"prefix": "10.1109",
"author": [
{
"given": "Martin",
"family": "Weise",
"sequence": "first",
"affiliation": [
{
"name": "ISE, TU Wien,Data Science Research Unit,Vienna,Austria"
}
]
},
{
"given": "Andreas",
"family": "Rauber",
"sequence": "additional",
"affiliation": [
{
"name": "ISE, TU Wien,Data Science Research Unit,Vienna,Austria"
}
]
}
],
"member": "263",
"reference": [
{
"key": "ref1",
"doi-asserted-by": "publisher",
"DOI": "10.1002\/0470867167.ch36"
},
{
"key": "ref2",
"doi-asserted-by": "publisher",
"DOI": "10.2218\/ijdc.v17i1.825"
},
{
"key": "ref3",
"doi-asserted-by": "publisher",
"DOI": "10.1145\/2380776.2380786"
},
{
"key": "ref4",
"doi-asserted-by": "publisher",
"DOI": "10.1038\/sdata.2016.18"
},
{
"year": "2024",
"key": "ref5",
"article-title": "DataCite Metadata Schema Documentation for the Publication and Citation of Research Data and Other Research Outputs v4.5"
},
{
"article-title": "Digital Cartographic Standard for Geologic Map Symbolization",
"volume-title": "Tech. Rep.",
"year": "2006",
"key": "ref6"
},
{
"article-title": "FAIR Digital Objects and FAIR Signposting",
"year": "2023",
"author": "Van de Sompel",
"key": "ref7"
},
{
"key": "ref8",
"doi-asserted-by": "publisher",
"DOI": "10.1086\/666656"
},
{
"key": "ref9",
"doi-asserted-by": "publisher",
"DOI": "10.1162\/99608f92.be565013"
},
{
"key": "ref10",
"doi-asserted-by": "publisher",
"DOI": "10.1045\/january2003-smith"
},
{
"key": "ref11",
"doi-asserted-by": "publisher",
"DOI": "10.1177\/0049124107306660"
},
{
"key": "ref12",
"first-page": "157",
"article-title": "The Dryad Data Repository: a Singapore Framework metadata Architecture in a DSpace Environment",
"volume-title": "Proceedings of the 2008 International Conference on Dublin Core and Metadata Applications",
"author": "White"
},
{
"key": "ref13",
"doi-asserted-by": "publisher",
"DOI": "10.5670\/oceanog.2014.50"
},
{
"key": "ref14",
"doi-asserted-by": "publisher",
"DOI": "10.1109\/SOCA.2016.15"
},
{
"key": "ref15",
"first-page": "83",
"article-title": "Introduction to Institutional Data Repositories Workshop",
"author": "Witt",
"year": "2008",
"journal-title": "Libraries Research Publications"
},
{
"key": "ref16",
"doi-asserted-by": "publisher",
"DOI": "10.1109\/ICDE.2018.00098"
},
{
"key": "ref17",
"doi-asserted-by": "publisher",
"DOI": "10.1145\/2737924.2737959"
},
{
"key": "ref18",
"doi-asserted-by": "publisher",
"DOI": "10.1109\/ICoDSE56892.2022.9971958"
},
{
"key": "ref19",
"doi-asserted-by": "publisher",
"DOI": "10.1016\/j.promfg.2019.03.032"
},
{
"key": "ref20",
"doi-asserted-by": "publisher",
"DOI": "10.1016\/j.trpro.2023.11.866"
},
{
"volume-title": "Emissionstrends 1990-2022",
"year": "2024",
"author": "Anderl",
"key": "ref21"
},
{
"key": "ref22",
"doi-asserted-by": "publisher",
"DOI": "10.1109\/TVCG.2018.2864903"
},
{
"key": "ref23",
"doi-asserted-by": "publisher",
"DOI": "10.1016\/j.scitotenv.2016.06.235"
},
{
"key": "ref24",
"doi-asserted-by": "publisher",
"DOI": "10.1186\/s12302-024-00862-4"
},
{
"key": "ref25",
"doi-asserted-by": "publisher",
"DOI": "10.1038\/533452a"
},
{
"key": "ref26",
"doi-asserted-by": "publisher",
"DOI": "10.18653\/v1\/2024.findings-acl.137"
},
{
"author": "Altug",
"key": "ref27",
"article-title": "Generating Semantic Context for Data Interoperability in Relational Databases using bge M3-Embeddings"
},
{
"key": "ref28",
"doi-asserted-by": "publisher",
"DOI": "10.1186\/s13643-019-1250-y"
}
],
"event": "2024 IEEE International Conference on Big Data (BigData)",
"container-title": "2024 IEEE International Conference on Big Data (BigData)",
"original-title": [],
"link": [
{
"URL": "http:\/\/xplorestaging.ieee.org\/ielx8\/10824975\/10824942\/10825401.pdf?arnumber=10825401",
"content-type": "unspecified",
"content-version": "vor",
"intended-application": "similarity-checking"
}
],
"deposited": {
"date-parts": [
[
2025,
1,
17
]
],
"date-time": "2025-01-17T07:55:27Z",
"timestamp": 1737100527000
},
"score": 1,
"resource": {
"primary": {
"URL": "https:\/\/ieeexplore.ieee.org\/document\/10825401\/"
}
},
"subtitle": [],
"short-title": [],
"issued": {
"date-parts": [
[
2024,
12,
15
]
]
},
"references-count": 28,
"URL": "http:\/\/dx.doi.org\/10.1109\/BigData62323.2024.10825401",
"relation": {},
"subject": [],
"published": {
"date-parts": [
[
2024,
12,
15
]
]
}
}
\ No newline at end of file
...@@ -36,6 +36,9 @@ public class GatewayConfig { ...@@ -36,6 +36,9 @@ public class GatewayConfig {
@Value("${dbrepo.endpoints.crossRefService}") @Value("${dbrepo.endpoints.crossRefService}")
private String crossRefEndpoint; private String crossRefEndpoint;
@Value("${dbrepo.endpoints.doiService}")
private String doiEndpoint;
@Value("${spring.rabbitmq.username}") @Value("${spring.rabbitmq.username}")
private String brokerUsername; private String brokerUsername;
...@@ -101,4 +104,18 @@ public class GatewayConfig { ...@@ -101,4 +104,18 @@ public class GatewayConfig {
return restTemplate; return restTemplate;
} }
@Bean("doiServiceRestTemplate")
public RestTemplate doiServiceRestTemplate() {
final RestTemplate restTemplate = new RestTemplate();
restTemplate.setUriTemplateHandler(new DefaultUriBuilderFactory(doiEndpoint));
return restTemplate;
}
@Bean("crossRefServiceRestTemplate")
public RestTemplate crossRefServiceRestTemplate() {
final RestTemplate restTemplate = new RestTemplate();
restTemplate.setUriTemplateHandler(new DefaultUriBuilderFactory(crossRefEndpoint));
return restTemplate;
}
} }
package at.ac.tuwien.ifs.dbrepo.gateway; package at.ac.tuwien.ifs.dbrepo.gateway;
import at.ac.tuwien.ifs.dbrepo.core.api.crossref.CrossrefDto; import at.ac.tuwien.ifs.dbrepo.core.api.crossref.CrossRefDto;
import at.ac.tuwien.ifs.dbrepo.core.exception.DoiNotFoundException; import at.ac.tuwien.ifs.dbrepo.core.exception.DoiNotFoundException;
public interface CrossrefGateway { public interface CrossRefGateway {
/** /**
* Retrieves metadata from the CrossRef funder database for a given CrossRef id. * Retrieves metadata from the CrossRef funder database for a given CrossRef id.
...@@ -12,5 +12,5 @@ public interface CrossrefGateway { ...@@ -12,5 +12,5 @@ public interface CrossrefGateway {
* @return The CrossRef metadata from the CrossRef funder database. * @return The CrossRef metadata from the CrossRef funder database.
* @throws DoiNotFoundException The metadata was not found in the CrossRef funder database. * @throws DoiNotFoundException The metadata was not found in the CrossRef funder database.
*/ */
CrossrefDto findById(String id) throws DoiNotFoundException; CrossRefDto findById(String id) throws DoiNotFoundException;
} }
package at.ac.tuwien.ifs.dbrepo.gateway.impl; package at.ac.tuwien.ifs.dbrepo.gateway.impl;
import at.ac.tuwien.ifs.dbrepo.core.api.crossref.CrossrefDto;
import at.ac.tuwien.ifs.dbrepo.config.GatewayConfig; import at.ac.tuwien.ifs.dbrepo.config.GatewayConfig;
import at.ac.tuwien.ifs.dbrepo.core.api.crossref.CrossRefDto;
import at.ac.tuwien.ifs.dbrepo.core.exception.DoiNotFoundException; import at.ac.tuwien.ifs.dbrepo.core.exception.DoiNotFoundException;
import at.ac.tuwien.ifs.dbrepo.gateway.CrossrefGateway; import at.ac.tuwien.ifs.dbrepo.gateway.CrossRefGateway;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.http.HttpEntity; import org.springframework.http.HttpEntity;
import org.springframework.http.HttpMethod; import org.springframework.http.HttpMethod;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
...@@ -15,24 +16,25 @@ import org.springframework.web.client.RestTemplate; ...@@ -15,24 +16,25 @@ import org.springframework.web.client.RestTemplate;
@Log4j2 @Log4j2
@Service @Service
public class CrossrefGatewayImpl implements CrossrefGateway { public class CrossRefGatewayImpl implements CrossRefGateway {
private final RestTemplate restTemplate; private final RestTemplate restTemplate;
private final GatewayConfig gatewayConfig; private final GatewayConfig gatewayConfig;
@Autowired @Autowired
public CrossrefGatewayImpl(RestTemplate restTemplate, GatewayConfig gatewayConfig) { public CrossRefGatewayImpl(@Qualifier("crossRefServiceRestTemplate") RestTemplate restTemplate,
GatewayConfig gatewayConfig) {
this.restTemplate = restTemplate; this.restTemplate = restTemplate;
this.gatewayConfig = gatewayConfig; this.gatewayConfig = gatewayConfig;
} }
@Override @Override
public CrossrefDto findById(String id) throws DoiNotFoundException { public CrossRefDto findById(String id) throws DoiNotFoundException {
final String path = "/fundingdata/funder/" + id; final String path = "/fundingdata/funder/" + id;
log.trace("find crossref metadata by id from endpoint {} with path {}", gatewayConfig.getCrossRefEndpoint(), path); log.trace("find crossref metadata by id from endpoint {} with path {}", gatewayConfig.getCrossRefEndpoint(), path);
final ResponseEntity<CrossrefDto> response; final ResponseEntity<CrossRefDto> response;
try { try {
response = restTemplate.exchange(gatewayConfig.getCrossRefEndpoint() + path, HttpMethod.GET, HttpEntity.EMPTY, CrossrefDto.class); response = restTemplate.exchange(gatewayConfig.getCrossRefEndpoint() + path, HttpMethod.GET, HttpEntity.EMPTY, CrossRefDto.class);
} catch (HttpServerErrorException e) { } catch (HttpServerErrorException e) {
log.error("Failed to retrieve crossref metadata: {}", e.getMessage()); log.error("Failed to retrieve crossref metadata: {}", e.getMessage());
throw new DoiNotFoundException("Failed to retrieve crossref metadata: " + e.getMessage(), e); throw new DoiNotFoundException("Failed to retrieve crossref metadata: " + e.getMessage(), e);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment