Skip to content

Commit 6c175d6

Browse files
committed
Improve inline documentation
See #377.
1 parent ca6ab41 commit 6c175d6

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

metafacture-xml/src/main/java/org/metafacture/xml/GenericXmlHandler.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2013, 2014 Deutsche Nationalbibliothek
2+
* Copyright 2013, 2014, 2021 Deutsche Nationalbibliothek et al
33
*
44
* Licensed under the Apache License, Version 2.0 the "License";
55
* you may not use this file except in compliance with the License.
@@ -48,7 +48,8 @@ public final class GenericXmlHandler extends DefaultXmlPipe<StreamReceiver> {
4848
private boolean inRecord;
4949
private StringBuilder valueBuffer = new StringBuilder();
5050

51-
private boolean emitNamespace = false;
51+
public static final boolean EMIT_NAMESPACE = false;
52+
private boolean emitNamespace = EMIT_NAMESPACE;
5253

5354
public GenericXmlHandler() {
5455
super();
@@ -93,8 +94,11 @@ public String getRecordTagName() {
9394
}
9495

9596
/**
96-
* On entity level namespaces can be emitted, e.g.: "foo:bar". The default is to
97-
* ignore the namespace so that only "bar" is emitted.
97+
* Triggers namespace awareness. If set to "true" input data like "foo:bar"
98+
* will be passed through as "foo:bar". For backward compatibility the default
99+
* is set to "false", thus only "bar" is emitted.
100+
* <p>
101+
* <strong>Default value: {@value EMIT_NAMESPACE}</strong>
98102
*
99103
* @param emitNamespace set to "true" if namespace should be emitted. Defaults
100104
* to "false".

0 commit comments

Comments
 (0)