From f81abb63881d5c8720ea151875318b00222c4285 Mon Sep 17 00:00:00 2001 From: Pascal Christoph Date: Mon, 15 Jul 2024 16:40:28 +0200 Subject: [PATCH] Add how to set an empty namespace (#552) The MARC21 namespace is checked by default. Sometimes there is MARC21 data without the proper namespace or none namespace at all. To make the handler run in such cases the namespace must be explicitly set as parameter to match the namespace used in the data. The @Description describes how to set an empty namespace if the namespace is missing. Ignoring the namepace at all can be done only via JAVA-API by setting it to null. --- .../java/org/metafacture/biblio/marc21/MarcXmlHandler.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/metafacture-biblio/src/main/java/org/metafacture/biblio/marc21/MarcXmlHandler.java b/metafacture-biblio/src/main/java/org/metafacture/biblio/marc21/MarcXmlHandler.java index 16632cc66..0fc7be509 100644 --- a/metafacture-biblio/src/main/java/org/metafacture/biblio/marc21/MarcXmlHandler.java +++ b/metafacture-biblio/src/main/java/org/metafacture/biblio/marc21/MarcXmlHandler.java @@ -32,7 +32,7 @@ * @author Markus Michael Geipel * */ -@Description("A marc xml reader") +@Description("A MARC XML reader. To read marc data without namespace specification set option `namespace=\"\"`") @In(XmlReceiver.class) @Out(StreamReceiver.class) @FluxCommand("handle-marcxml") @@ -63,7 +63,8 @@ public MarcXmlHandler() { * * Default value: {@value #NAMESPACE} * - * @param namespace the namespace + * @param namespace the namespace. Set to null if namespace shouldn't be checked. Set it empty + * if the namespace is missing in the data. */ public void setNamespace(final String namespace) { this.namespace = namespace;