diff --git a/plugin/src/main/java/de/intranda/goobi/plugins/DocumentManager.java b/plugin/src/main/java/de/intranda/goobi/plugins/DocumentManager.java index 3831bbd..95e4a44 100644 --- a/plugin/src/main/java/de/intranda/goobi/plugins/DocumentManager.java +++ b/plugin/src/main/java/de/intranda/goobi/plugins/DocumentManager.java @@ -153,6 +153,14 @@ public void addNodeIdToTopStruct(String nodeId) throws MetadataTypeNotAllowedExc addNodeId(logical, nodeId); } + public void addCatalogueId(String id) throws MetadataTypeNotAllowedException { + if (StringUtils.isNotBlank(id)) { + Metadata cid = new Metadata(prefs.getMetadataTypeByName("CatalogIDDigital")); + cid.setValue(id); + logical.addMetadata(cid); + } + } + private void addNodeId(DocStruct ds, String nodeId) throws MetadataTypeNotAllowedException { if (StringUtils.isNotBlank(nodeId)) { Metadata nodeid = new Metadata(prefs.getMetadataTypeByName("NodeId")); diff --git a/plugin/src/main/java/de/intranda/goobi/plugins/HuImporterWorkflowPlugin.java b/plugin/src/main/java/de/intranda/goobi/plugins/HuImporterWorkflowPlugin.java index 0e3f6d1..bf1513a 100644 --- a/plugin/src/main/java/de/intranda/goobi/plugins/HuImporterWorkflowPlugin.java +++ b/plugin/src/main/java/de/intranda/goobi/plugins/HuImporterWorkflowPlugin.java @@ -409,6 +409,7 @@ public void startImport(ImportSet importSet) { } try { dManager.addNodeIdToTopStruct(nodeId); + dManager.addCatalogueId(nodeId); } catch (MetadataTypeNotAllowedException e) { updateLog( "Metadata field definition for nodeId is missing (needed to link document with ead-nodes)! Please update the ruleset.",