Skip to content

Commit

Permalink
batchimport: log when skipping holding records due to library config… (
Browse files Browse the repository at this point in the history
…#1463)

…uration
  • Loading branch information
olovy authored Aug 7, 2024
1 parent 8a9e6ec commit b30b44f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions batchimport/src/main/java/whelk/importer/XL.java
Original file line number Diff line number Diff line change
Expand Up @@ -240,11 +240,15 @@ private String importNewRecord(MarcRecord marcRecord, String collection, String
String librarySystemId = m_whelk.getStorage().getSystemIdByIri(libraryUri);
if (librarySystemId == null)
{
logger.warn(String.format("Could not find %s. Not importing holding record for %s",
libraryUri, relatedWithBibResourceId));
return null;
}
Document libraryDoc = m_whelk.getDocument(librarySystemId);
if (!libraryDoc.libraryIsRegistrant())
{
logger.info(String.format("%s does not have category Registrant. Not importing holding record for %s",
libraryUri, relatedWithBibResourceId));
return null;
}
rdfDoc.setHoldingFor(relatedWithBibResourceId);
Expand Down

0 comments on commit b30b44f

Please sign in to comment.