From 6c175d625796d7f14088bccd83f64401e5f3ceda Mon Sep 17 00:00:00 2001 From: Pascal Christoph Date: Tue, 24 Aug 2021 17:01:10 +0200 Subject: [PATCH] Improve inline documentation See #377. --- .../java/org/metafacture/xml/GenericXmlHandler.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/metafacture-xml/src/main/java/org/metafacture/xml/GenericXmlHandler.java b/metafacture-xml/src/main/java/org/metafacture/xml/GenericXmlHandler.java index 2a28bfdc6..878623953 100644 --- a/metafacture-xml/src/main/java/org/metafacture/xml/GenericXmlHandler.java +++ b/metafacture-xml/src/main/java/org/metafacture/xml/GenericXmlHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2013, 2014 Deutsche Nationalbibliothek + * Copyright 2013, 2014, 2021 Deutsche Nationalbibliothek et al * * Licensed under the Apache License, Version 2.0 the "License"; * you may not use this file except in compliance with the License. @@ -48,7 +48,8 @@ public final class GenericXmlHandler extends DefaultXmlPipe { private boolean inRecord; private StringBuilder valueBuffer = new StringBuilder(); - private boolean emitNamespace = false; + public static final boolean EMIT_NAMESPACE = false; + private boolean emitNamespace = EMIT_NAMESPACE; public GenericXmlHandler() { super(); @@ -93,8 +94,11 @@ public String getRecordTagName() { } /** - * On entity level namespaces can be emitted, e.g.: "foo:bar". The default is to - * ignore the namespace so that only "bar" is emitted. + * Triggers namespace awareness. If set to "true" input data like "foo:bar" + * will be passed through as "foo:bar". For backward compatibility the default + * is set to "false", thus only "bar" is emitted. + *

+ * Default value: {@value EMIT_NAMESPACE} * * @param emitNamespace set to "true" if namespace should be emitted. Defaults * to "false".