Copyright (C) 2024 The Open Library Foundation
This software is distributed under the terms of the Apache License, Version 2.0. See the file "LICENSE" for more information.
This software uses a copyleft (LGPL-2.1-or-later) licensed software library: marc4j
Lib-linked-data-marc4ld is a Java library designed for converting MARC records to Linked Data Graphs and vice versa.
mvn clean installimport org.folio.ld.dictionary.model.Resource; import org.folio.marc4ld.service.marc2ld.bib.MarcBib2ldMapper; import org.springframework.stereotype.Service; @Service public class YourService { private final MarcBib2ldMapper mapper; public YourService(MarcBib2ldMapper mapper) { this.mapper = mapper; } public void yourMethod(String marcJson) { Resource resource = mapper.fromMarcJson(marcJson); // ... // ... } }import org.folio.ld.dictionary.model.Resource; import org.folio.marc4ld.service.marc2ld.authority.MarcAuthority2ldMapper; import org.springframework.stereotype.Service; @Service public class YourService { private final MarcAuthority2ldMapper mapper; public YourService(MarcAuthority2ldMapper mapper) { this.mapper = mapper; } public void yourMethod(String marcJson) { Resource resource = mapper.fromMarcJson(marcJson); // ... // ... } }import org.folio.ld.dictionary.model.Resource; import org.folio.marc4ld.service.ld2marc.Ld2MarcMapper; import org.springframework.stereotype.Service; @Service public class YourService { private final Ld2MarcMapper mapper; public YourService(Ld2MarcMapper mapper) { this.mapper = mapper; } public void yourMethod(Resource resource) { String marcJson = mapper.toMarcJson(resource); // ... // ... } }The built artifacts for this module are available. See configuration for repository access.