Skip to content

Commit a3b5095

Browse files
committed
Javadoc fixes and improvements. (#396)
1 parent 7b96367 commit a3b5095

File tree

49 files changed

+137
-143
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+137
-143
lines changed

metafacture-biblio/src/main/java/org/metafacture/biblio/iso2709/Label.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
package org.metafacture.biblio.iso2709;
1818

1919
/**
20-
* Provides read access to the record label of a ISO 2709:2008 formatted
20+
* Provides read access to the record label of an ISO 2709:2008 formatted
2121
* record. The record label consists of the first 24 octets of the record.
2222
* <p>
2323
* Use {@link LabelBuilder} if write access to the label is required.

metafacture-biblio/src/main/java/org/metafacture/biblio/iso2709/RecordBuilder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ public void endDataField() {
311311
/**
312312
* Appends a subfield.
313313
*
314-
* @param value String of the to be appended subfield
314+
* @param value String of the subfield to be appended
315315
*/
316316
public void appendSubfield(final String value) {
317317
requireInDataField();
@@ -323,7 +323,7 @@ public void appendSubfield(final String value) {
323323
* Appends a subfield in dependency of an identifier.
324324
*
325325
* @param identifier char array of an identifier
326-
* @param value String of the to be appended subfield
326+
* @param value String of the subfield to be appended
327327
*/
328328
public void appendSubfield(final char[] identifier, final String value) {
329329
requireInDataField();

metafacture-biblio/src/main/java/org/metafacture/biblio/iso2709/RecordFormat.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ public final class RecordFormat {
5656
*
5757
* @param indicatorLength the length of the indicator
5858
* @param identifierLength the length of the identifier
59-
* @param fieldLengthLength the length of the field
60-
* @param fieldStartLength the length of the indicator
61-
* @param implDefinedPartLength the length of the part
59+
* @param fieldLengthLength the length of the field length
60+
* @param fieldStartLength the length of the field start
61+
* @param implDefinedPartLength the length of the defined part
6262
*/
6363
public RecordFormat(final int indicatorLength, final int identifierLength,
6464
final int fieldLengthLength, final int fieldStartLength,
@@ -201,9 +201,9 @@ public Builder withIdentifierLength(final int currentIdentifierLength) {
201201
}
202202

203203
/**
204-
* Returns a new Builder with defined field length.
204+
* Returns a new Builder with defined field length length.
205205
*
206-
* @param currentFieldLengthLength the length of the field
206+
* @param currentFieldLengthLength the length of the field length
207207
* @return Builder
208208
*/
209209
public Builder withFieldLengthLength(final int currentFieldLengthLength) {
@@ -229,7 +229,7 @@ public Builder withFieldStartLength(final int currentFieldStartLength) {
229229
/**
230230
* Returns a new Builder with defined part length.
231231
*
232-
* @param currentImplDefinedPartLength the length of the part
232+
* @param currentImplDefinedPartLength the length of the defined part
233233
* @return Builder
234234
*/
235235
public Builder withImplDefinedPartLength(final int currentImplDefinedPartLength) {

metafacture-biblio/src/main/java/org/metafacture/biblio/marc21/Marc21Encoder.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ public final class Marc21Encoder extends
8282

8383
/**
8484
* Initializes the encoder with MARC 21 constants and charset.
85-
*
8685
*/
8786
public Marc21Encoder() {
8887
builder = new RecordBuilder(Marc21Constants.MARC21_FORMAT);

metafacture-biblio/src/main/java/org/metafacture/biblio/marc21/MarcXmlEncoder.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -236,17 +236,19 @@ private void writeFooter() {
236236
writeRaw(ROOT_CLOSE);
237237
}
238238

239-
/** Writes a unescaped sequence
240-
* @param str
241-
* the unescaped sequence to be written
239+
/**
240+
* Writes an unescaped sequence.
241+
*
242+
* @param str the unescaped sequence to be written
242243
*/
243244
private void writeRaw(final String str) {
244245
builder.append(str);
245246
}
246247

247-
/** Writes a escaped sequence
248-
* @param str
249-
* the unescaped sequence to be written
248+
/**
249+
* Writes an escaped sequence.
250+
*
251+
* @param str the unescaped sequence to be written
250252
*/
251253
private void writeEscaped(final String str) {
252254
builder.append(XmlUtil.escape(str, false));

metafacture-biblio/src/main/java/org/metafacture/biblio/pica/PicaDecoder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ public boolean getIgnoreMissingIdn() {
219219
}
220220

221221
/**
222-
* Controls whether decomposed unicode characters in field values are
222+
* Controls whether decomposed Unicode characters in field values are
223223
* normalised to their precomposed version. By default no normalisation is
224224
* applied. The normalisation is only applied to values not to field or
225225
* subfield names.
@@ -229,7 +229,7 @@ public boolean getIgnoreMissingIdn() {
229229
* <p>
230230
* <strong>Default value: {@code false}</strong>
231231
*
232-
* @param normalizeUTF8 if true, decomposed unicode characters in values are
232+
* @param normalizeUTF8 if true, decomposed Unicode characters in values are
233233
* normalised to their precomposed version.
234234
*/
235235
public void setNormalizeUTF8(final boolean normalizeUTF8) {

metafacture-commons/src/main/java/org/metafacture/commons/ResourceUtil.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ public static Properties loadProperties(final InputStream stream)
164164
}
165165

166166
/**
167-
* Loads properties from an URL.
167+
* Loads properties from a URL.
168168
*
169169
* @param url properties as URL
170170
* @return Properties
@@ -177,7 +177,7 @@ public static Properties loadProperties(final URL url) throws IOException {
177177
/**
178178
* Loads a text file.
179179
*
180-
* @param location filename
180+
* @param location the filename
181181
* @return the content of the file
182182
* @throws IOException
183183
*/
@@ -198,8 +198,8 @@ public static String loadTextFile(final String location) throws IOException {
198198
* * Loads a text file.
199199
*
200200
* @param location the filename
201-
* @param list a List of Strings
202-
* @return a List of Strings of the content of the filename, line-by-line
201+
* @param list a List of Strings to append the lines of the file to
202+
* @return the List of Strings with the lines of the file appended
203203
* @throws IOException
204204
*/
205205
public static List<String> loadTextFile(final String location,

metafacture-commons/src/main/java/org/metafacture/commons/StringUtil.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ private StringUtil() {
3535
}
3636

3737
/**
38-
* Sets a fallback of an Object if the the Object is null.
38+
* Returns a fallback of an object if the object is null.
3939
*
40-
* @param <O> a class
41-
* @param value the Object
42-
* @param fallbackValue the default Object
43-
* @return an Object
40+
* @param <O> the type of the object
41+
* @param value the object
42+
* @param fallbackValue the default object
43+
* @return an object
4444
*/
4545
public static <O> O fallback(final O value, final O fallbackValue) {
4646
if (value == null) {

metafacture-commons/src/main/java/org/metafacture/commons/XmlUtil.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public static String nodeToString(final Node node) {
5353
* Converts a Node to a String, with or without an XML declaration
5454
*
5555
* @param node the Node
56-
* @param omitXMLDecl boolean if an XML declaration is ommited or not
56+
* @param omitXMLDecl boolean if an XML declaration is omitted or not
5757
* @return a String representation of the Node
5858
*/
5959
public static String nodeToString(final Node node,
@@ -90,7 +90,7 @@ public static String nodeToString(final Node node,
9090
* Converts a NodeList to a String.
9191
*
9292
* @param nodes the NodeList
93-
* @return a String representation od the NodeList
93+
* @return a String representation of the NodeList
9494
*/
9595
public static String nodeListToString(final NodeList nodes) {
9696
final StringBuilder builder = new StringBuilder();
@@ -103,10 +103,10 @@ public static String nodeListToString(final NodeList nodes) {
103103
}
104104

105105
/**
106-
* Checks if a String is an Xml Mime Type.
106+
* Checks if a String is an XML MIME type.
107107
*
108-
* @param mimeType the Mime Type
109-
* @return boolean if a String is an Xml Mime Type
108+
* @param mimeType the MIME type
109+
* @return boolean if a String is an XML MIME type
110110
*/
111111
public static boolean isXmlMimeType(final String mimeType) {
112112
if (mimeType == null) {
@@ -123,10 +123,10 @@ public static String escape(final String unescaped) {
123123

124124
/**
125125
* Escapes XML special characters. May also escape non-ASCII characters (aka
126-
* unicode).
126+
* Unicode).
127127
*
128128
* @param unescaped the String to be unescaped
129-
* @param escapeUnicode boolean if unicode should be also escaped
129+
* @param escapeUnicode boolean if Unicode should be also escaped
130130
* @return the escaped String
131131
*/
132132
public static String escape(final String unescaped, final boolean escapeUnicode) {

metafacture-commons/src/main/java/org/metafacture/commons/reflection/ConfigurableClass.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ public Class<T> getPlainClass() {
5555
}
5656

5757
/**
58-
* Gets all "public set" methods of this class.
58+
* Gets all public "set" methods of this class.
5959
*
60-
* @return the Map of all setter methods of this class
60+
* @return the Map of the setter methods of this class
6161
*/
6262
public Map<String, Method> getSetters() {
6363
if (settersCache == null) {
@@ -88,9 +88,9 @@ private boolean isSetter(final Method method) {
8888
}
8989

9090
/**
91-
* Gets the class types of the setter methods.
91+
* Gets the parameter types of the setter methods.
9292
*
93-
* @return a Map of the setter methods name and their types
93+
* @return a Map of the setter method names and their types
9494
*/
9595
public Map<String, Class<?>> getSetterTypes() {
9696
final Map<String, Class<?>> setterTypes = new HashMap<>();

0 commit comments

Comments
 (0)