Skip to content

Commit a69bd87

Browse files
committed
Fix javadoc for module "xml" (#396)
1 parent e54ce38 commit a69bd87

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ public final class GenericXmlHandler extends DefaultXmlPipe<StreamReceiver> {
4444

4545
private static final Pattern TABS = Pattern.compile("\t+");
4646

47+
private static final String METAMORPH_RECORD_TAG = "org.culturegraph.metamorph.xml.recordtag";
48+
4749
private String attributeMarker = DEFAULT_ATTRIBUTE_MARKER;
4850
private String recordTagName = DEFAULT_RECORD_TAG;
4951
private String valueTagName = DEFAULT_VALUE_TAG;
@@ -53,8 +55,12 @@ public final class GenericXmlHandler extends DefaultXmlPipe<StreamReceiver> {
5355

5456
private boolean emitNamespace = EMIT_NAMESPACE;
5557

58+
/**
59+
* Constructs a GenericXmlHandler by loading the system property
60+
* {@value #METAMORPH_RECORD_TAG} if that system property was set.
61+
*/
5662
public GenericXmlHandler() {
57-
final String recordTagNameProperty = System.getProperty("org.culturegraph.metamorph.xml.recordtag");
63+
final String recordTagNameProperty = System.getProperty(METAMORPH_RECORD_TAG);
5864
if (recordTagNameProperty != null) {
5965
recordTagName = recordTagNameProperty;
6066
}

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,11 @@ public String getValueTag() {
105105
return valueTag;
106106
}
107107

108+
/**
109+
* Loads namespaces from a file.
110+
*
111+
* @param file the name of the file to load the namespace properties from
112+
*/
108113
public void setNamespaceFile(final String file) {
109114
final Properties properties;
110115
try {
@@ -118,6 +123,11 @@ public void setNamespaceFile(final String file) {
118123
}
119124
}
120125

126+
/**
127+
* Loads namespaces from a URL.
128+
*
129+
* @param url the URL to load the namespace properties from.
130+
*/
121131
public void setNamespaceFile(final URL url) {
122132
final Properties properties;
123133
try {

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ public final class XmlDecoder extends DefaultObjectPipe<Reader, XmlReceiver> {
5050

5151
private final XMLReader saxReader;
5252

53+
/**
54+
* Constructs an XmlDecoder by obtaining a new instance of a {@link
55+
* org.xml.sax.XMLReader}.
56+
*/
5357
public XmlDecoder() {
5458
try {
5559
saxReader = XMLReaderFactory.createXMLReader();

0 commit comments

Comments
 (0)