Skip to content

Commit b5fb327

Browse files
committed
Fix javadoc for module "mangling" (#396)
Also simplifies constructors.
1 parent 16fa34d commit b5fb327

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

metafacture-mangling/src/main/java/org/metafacture/mangling/ObjectToLiteral.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,11 @@ public final class ObjectToLiteral<T> extends
3737
public static final String DEFAULT_LITERAL_NAME = "obj";
3838
public static final String DEFAULT_RECORD_ID = "";
3939

40-
private String literalName;
41-
private String recordId;
40+
private String literalName = DEFAULT_LITERAL_NAME;
41+
private String recordId = DEFAULT_RECORD_ID;
4242
private int recordCount;
4343

4444
public ObjectToLiteral() {
45-
setLiteralName(DEFAULT_LITERAL_NAME);
46-
setRecordId(DEFAULT_RECORD_ID);
47-
recordCount = 0;
4845
}
4946

5047
public void setLiteralName(final String literalName) {

metafacture-mangling/src/main/java/org/metafacture/mangling/RecordPathFilter.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,21 +38,23 @@ public final class RecordPathFilter extends DefaultStreamPipe<StreamReceiver> {
3838

3939
private final EntityPathTracker entityPathTracker = new EntityPathTracker();
4040

41-
private String path;
42-
private String recordIdFormat;
41+
private String path = ROOT_PATH;
42+
private String recordIdFormat = DEFAULT_RECORD_ID_FORMAT;
4343
private String recordIdentifier;
4444
private boolean inMatch;
4545
private boolean recordStarted;
4646
private int recordCount;
4747

4848
public RecordPathFilter() {
49-
this(ROOT_PATH);
5049
}
5150

51+
/**
52+
* Constructs a RecordPathFilter with a given path.
53+
*
54+
* @param path the name of the path
55+
*/
5256
public RecordPathFilter(final String path) {
53-
resetRecord();
5457
setPath(path);
55-
setRecordIdFormat(DEFAULT_RECORD_ID_FORMAT);
5658
}
5759

5860
public void setEntitySeparator(final String entitySeparator) {

0 commit comments

Comments
 (0)