Skip to content

Commit 2628b6c

Browse files
committed
Merge pull request #92 from fsteeg/examples
Fix examples and annotations on Flux command implementations
2 parents 205a527 + d624acb commit 2628b6c

File tree

6 files changed

+27
-3
lines changed

6 files changed

+27
-3
lines changed

examples/morph/morph-marc21.flux

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ open-file|
55
as-lines|
66
decode-marc21|
77
morph(FLUX_DIR + "morph-marc21.xml")|
8-
encode("literals")|
8+
encode-literals|
99
write("stdout");

src/main/java/org/culturegraph/mf/stream/converter/bib/MabDecoder.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
import org.culturegraph.mf.exceptions.FormatException;
2121
import org.culturegraph.mf.framework.DefaultObjectPipe;
2222
import org.culturegraph.mf.framework.StreamReceiver;
23+
import org.culturegraph.mf.framework.annotations.Description;
24+
import org.culturegraph.mf.framework.annotations.In;
25+
import org.culturegraph.mf.framework.annotations.Out;
2326

2427

2528
/**
@@ -31,6 +34,9 @@
3134
* @author Markus Michael Geipel, Christoph Böhme
3235
*
3336
*/
37+
@Description("Parses a raw Mab2 stream (UTF-8 encoding expected).")
38+
@In(String.class)
39+
@Out(StreamReceiver.class)
3440
public final class MabDecoder
3541
extends DefaultObjectPipe<String, StreamReceiver> {
3642

src/main/java/org/culturegraph/mf/stream/converter/bib/MarcDecoder.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
import org.culturegraph.mf.exceptions.FormatException;
2121
import org.culturegraph.mf.framework.DefaultObjectPipe;
2222
import org.culturegraph.mf.framework.StreamReceiver;
23+
import org.culturegraph.mf.framework.annotations.Description;
24+
import org.culturegraph.mf.framework.annotations.In;
25+
import org.culturegraph.mf.framework.annotations.Out;
2326
import org.culturegraph.mf.stream.converter.IllegalEncodingException;
2427

2528

@@ -31,6 +34,9 @@
3134
*
3235
* @author Markus Michael Geipel, Christoph Böhme
3336
*/
37+
@Description("Parses a raw Marc string (UTF-8 encoding expected).")
38+
@In(String.class)
39+
@Out(StreamReceiver.class)
3440
public final class MarcDecoder
3541
extends DefaultObjectPipe<String, StreamReceiver> {
3642

src/main/java/org/culturegraph/mf/stream/pipe/ObjectTee.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
import org.culturegraph.mf.framework.DefaultTee;
1919
import org.culturegraph.mf.framework.ObjectPipe;
2020
import org.culturegraph.mf.framework.ObjectReceiver;
21+
import org.culturegraph.mf.framework.annotations.Description;
22+
import org.culturegraph.mf.framework.annotations.In;
23+
import org.culturegraph.mf.framework.annotations.Out;
2124

2225
/**
2326
* Sends an object to more than one receiver.
@@ -27,6 +30,9 @@
2730
* @author Christoph Böhme
2831
*
2932
*/
33+
@Description("Sends an object to more than one receiver.")
34+
@In(Object.class)
35+
@Out(Object.class)
3036
public final class ObjectTee<T> extends DefaultTee<ObjectReceiver<T>>
3137
implements ObjectPipe<T, ObjectReceiver<T>> {
3238

src/main/java/org/culturegraph/mf/stream/pipe/StreamTee.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,19 @@
1818
import org.culturegraph.mf.framework.DefaultTee;
1919
import org.culturegraph.mf.framework.StreamPipe;
2020
import org.culturegraph.mf.framework.StreamReceiver;
21+
import org.culturegraph.mf.framework.annotations.Description;
22+
import org.culturegraph.mf.framework.annotations.In;
23+
import org.culturegraph.mf.framework.annotations.Out;
2124

2225
/**
2326
* Replicates an event stream to an arbitrary number of {@link StreamReceiver}s.
2427
*
2528
* @author Christoph Böhme, Markus Michael Geipel
2629
*
2730
*/
31+
@Description("Replicates an event stream to an arbitrary number of stream receivers.")
32+
@In(StreamReceiver.class)
33+
@Out(StreamReceiver.class)
2834
public final class StreamTee extends DefaultTee<StreamReceiver>
2935
implements StreamPipe<StreamReceiver> {
3036

src/main/java/org/culturegraph/mf/stream/pipe/sort/TripleCount.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
*
2929
*/
3030
@Description("Counts triples")
31-
@In(NamedValue.class)
32-
@Out(NamedValue.class)
31+
@In(Triple.class)
32+
@Out(Triple.class)
3333
public final class TripleCount extends AbstractTripleSort {
3434

3535
public static final String DEFAULT_COUNTP_REDICATE = "count";

0 commit comments

Comments
 (0)