Skip to content

Commit 32e0a10

Browse files
committed
Create mangling package
The `mangling` package contains modules that modify the object or event stream.
1 parent 5926120 commit 32e0a10

18 files changed

+42
-32
lines changed

src/main/java/org/culturegraph/mf/stream/pipe/DuplicateObjectFilter.java renamed to src/main/java/org/culturegraph/mf/mangling/DuplicateObjectFilter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package org.culturegraph.mf.stream.pipe;
16+
package org.culturegraph.mf.mangling;
1717

1818
import org.culturegraph.mf.framework.FluxCommand;
1919
import org.culturegraph.mf.framework.ObjectReceiver;

src/main/java/org/culturegraph/mf/stream/sink/EntityPathTracker.java renamed to src/main/java/org/culturegraph/mf/mangling/EntityPathTracker.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package org.culturegraph.mf.stream.sink;
16+
package org.culturegraph.mf.mangling;
1717

1818
import java.util.ArrayDeque;
1919
import java.util.Deque;
@@ -35,7 +35,7 @@
3535
* <p>The current path is returned from {@link #getCurrentPath()}.
3636
*
3737
* @author Christoph Böhme
38-
* @see org.culturegraph.mf.stream.pipe.StreamFlattener
38+
* @see StreamFlattener
3939
*/
4040
public class EntityPathTracker extends DefaultStreamReceiver {
4141

src/main/java/org/culturegraph/mf/stream/converter/LiteralToObject.java renamed to src/main/java/org/culturegraph/mf/mangling/LiteralToObject.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
/*
22
* Copyright 2016 Christoph Böhme
3-
* Copyright 2013, 2014 Deutsche Nationalbibliothek
43
*
54
* Licensed under the Apache License, Version 2.0 the "License";
65
* you may not use this file except in compliance with the License.
@@ -14,7 +13,7 @@
1413
* See the License for the specific language governing permissions and
1514
* limitations under the License.
1615
*/
17-
package org.culturegraph.mf.stream.converter;
16+
package org.culturegraph.mf.mangling;
1817

1918
import java.util.regex.Matcher;
2019
import java.util.regex.Pattern;

src/main/java/org/culturegraph/mf/stream/converter/ObjectToLiteral.java renamed to src/main/java/org/culturegraph/mf/mangling/ObjectToLiteral.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package org.culturegraph.mf.stream.converter;
16+
package org.culturegraph.mf.mangling;
1717

1818
import org.culturegraph.mf.framework.FluxCommand;
1919
import org.culturegraph.mf.framework.StreamReceiver;

src/main/java/org/culturegraph/mf/stream/pipe/RecordIdChanger.java renamed to src/main/java/org/culturegraph/mf/mangling/RecordIdChanger.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
/*
22
* Copyright 2016 Christoph Böhme
3-
* Copyright 2013, 2014 Deutsche Nationalbibliothek
43
*
54
* Licensed under the Apache License, Version 2.0 the "License";
65
* you may not use this file except in compliance with the License.
@@ -14,7 +13,7 @@
1413
* See the License for the specific language governing permissions and
1514
* limitations under the License.
1615
*/
17-
package org.culturegraph.mf.stream.pipe;
16+
package org.culturegraph.mf.mangling;
1817

1918
import org.culturegraph.mf.flowcontrol.StreamBuffer;
2019
import org.culturegraph.mf.framework.FluxCommand;
@@ -24,7 +23,6 @@
2423
import org.culturegraph.mf.framework.annotations.In;
2524
import org.culturegraph.mf.framework.annotations.Out;
2625
import org.culturegraph.mf.framework.helpers.DefaultStreamPipe;
27-
import org.culturegraph.mf.stream.sink.EntityPathTracker;
2826

2927
/**
3028
* Replaces the record id with the value of a literal from the record. The name

src/main/java/org/culturegraph/mf/stream/pipe/RecordToEntity.java renamed to src/main/java/org/culturegraph/mf/mangling/RecordToEntity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package org.culturegraph.mf.stream.pipe;
16+
package org.culturegraph.mf.mangling;
1717

1818
import org.culturegraph.mf.framework.FluxCommand;
1919
import org.culturegraph.mf.framework.StreamReceiver;

src/main/java/org/culturegraph/mf/stream/pipe/StreamEventDiscarder.java renamed to src/main/java/org/culturegraph/mf/mangling/StreamEventDiscarder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package org.culturegraph.mf.stream.pipe;
16+
package org.culturegraph.mf.mangling;
1717

1818
import java.util.EnumSet;
1919

src/main/java/org/culturegraph/mf/stream/pipe/StreamFlattener.java renamed to src/main/java/org/culturegraph/mf/mangling/StreamFlattener.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,14 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package org.culturegraph.mf.stream.pipe;
16+
package org.culturegraph.mf.mangling;
1717

1818
import org.culturegraph.mf.framework.FluxCommand;
1919
import org.culturegraph.mf.framework.StreamReceiver;
2020
import org.culturegraph.mf.framework.annotations.Description;
2121
import org.culturegraph.mf.framework.annotations.In;
2222
import org.culturegraph.mf.framework.annotations.Out;
2323
import org.culturegraph.mf.framework.helpers.DefaultStreamPipe;
24-
import org.culturegraph.mf.stream.sink.EntityPathTracker;
2524

2625
/**
2726
* Flattens all entities in a stream by prefixing the literals with the entity

src/main/java/org/culturegraph/mf/metamorph/Metamorph.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
import org.culturegraph.mf.framework.annotations.In;
3939
import org.culturegraph.mf.framework.annotations.Out;
4040
import org.culturegraph.mf.framework.helpers.DefaultStreamReceiver;
41+
import org.culturegraph.mf.mangling.StreamFlattener;
4142
import org.culturegraph.mf.metamorph.api.FlushListener;
4243
import org.culturegraph.mf.metamorph.api.InterceptorFactory;
4344
import org.culturegraph.mf.metamorph.api.Maps;
@@ -47,7 +48,6 @@
4748
import org.culturegraph.mf.metamorph.api.NamedValueReceiver;
4849
import org.culturegraph.mf.metamorph.api.NamedValueSource;
4950
import org.culturegraph.mf.metamorph.api.SourceLocation;
50-
import org.culturegraph.mf.stream.pipe.StreamFlattener;
5151
import org.xml.sax.InputSource;
5252

5353
/**

src/main/resources/flux-commands.properties

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,14 @@ log-object org.culturegraph.mf.stream.pipe.ObjectLogger
8181
log-time org.culturegraph.mf.stream.pipe.ObjectTimer
8282
log-stream-time org.culturegraph.mf.stream.pipe.StreamTimer
8383

84-
change-id org.culturegraph.mf.stream.pipe.RecordIdChanger
85-
flatten org.culturegraph.mf.stream.pipe.StreamFlattener
86-
record-to-entity org.culturegraph.mf.stream.pipe.RecordToEntity
84+
change-id org.culturegraph.mf.mangling.RecordIdChanger
85+
flatten org.culturegraph.mf.mangling.StreamFlattener
86+
record-to-entity org.culturegraph.mf.mangling.RecordToEntity
8787

8888
template org.culturegraph.mf.stream.converter.ObjectTemplate
8989
add-preamble-epilogue org.culturegraph.mf.stream.converter.PreambleEpilogueAdder
9090

91-
filter-duplicate-objects org.culturegraph.mf.stream.pipe.DuplicateObjectFilter
91+
filter-duplicate-objects org.culturegraph.mf.mangling.DuplicateObjectFilter
9292

9393
object-tee org.culturegraph.mf.plumbing.ObjectTee
9494
stream-tee org.culturegraph.mf.plumbing.StreamTee
@@ -109,8 +109,8 @@ match org.culturegraph.mf.stream.pipe.StringMatcher
109109

110110
stream-count org.culturegraph.mf.stream.pipe.Counter
111111

112-
literal-to-object org.culturegraph.mf.stream.converter.LiteralToObject
113-
object-to-literal org.culturegraph.mf.stream.converter.ObjectToLiteral
112+
literal-to-object org.culturegraph.mf.mangling.LiteralToObject
113+
object-to-literal org.culturegraph.mf.mangling.ObjectToLiteral
114114

115115
map-to-stream org.culturegraph.mf.stream.converter.MapToStream
116116
string-list-map-to-stream org.culturegraph.mf.stream.converter.StringListMapToStream
@@ -119,7 +119,7 @@ merge-batch-stream org.culturegraph.mf.plumbing.StreamBatchMerger
119119
merge-same-ids org.culturegraph.mf.plumbing.StreamMerger
120120

121121
filter-strings org.culturegraph.mf.stream.pipe.StringFilter
122-
discard-events org.culturegraph.mf.stream.pipe.StreamEventDiscarder
122+
discard-events org.culturegraph.mf.mangling.StreamEventDiscarder
123123

124124
draw-uniform-sample org.culturegraph.mf.stream.pipe.UniformSampler
125125

0 commit comments

Comments
 (0)