Skip to content

Commit

Permalink
Merge pull request #92 from fsteeg/examples
Browse files Browse the repository at this point in the history
Fix examples and annotations on Flux command implementations
  • Loading branch information
cboehme committed Jun 14, 2013
2 parents 205a527 + d624acb commit 2628b6c
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/morph/morph-marc21.flux
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ open-file|
as-lines|
decode-marc21|
morph(FLUX_DIR + "morph-marc21.xml")|
encode("literals")|
encode-literals|
write("stdout");
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
import org.culturegraph.mf.exceptions.FormatException;
import org.culturegraph.mf.framework.DefaultObjectPipe;
import org.culturegraph.mf.framework.StreamReceiver;
import org.culturegraph.mf.framework.annotations.Description;
import org.culturegraph.mf.framework.annotations.In;
import org.culturegraph.mf.framework.annotations.Out;


/**
Expand All @@ -31,6 +34,9 @@
* @author Markus Michael Geipel, Christoph Böhme
*
*/
@Description("Parses a raw Mab2 stream (UTF-8 encoding expected).")
@In(String.class)
@Out(StreamReceiver.class)
public final class MabDecoder
extends DefaultObjectPipe<String, StreamReceiver> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
import org.culturegraph.mf.exceptions.FormatException;
import org.culturegraph.mf.framework.DefaultObjectPipe;
import org.culturegraph.mf.framework.StreamReceiver;
import org.culturegraph.mf.framework.annotations.Description;
import org.culturegraph.mf.framework.annotations.In;
import org.culturegraph.mf.framework.annotations.Out;
import org.culturegraph.mf.stream.converter.IllegalEncodingException;


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

Expand Down
6 changes: 6 additions & 0 deletions src/main/java/org/culturegraph/mf/stream/pipe/ObjectTee.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
import org.culturegraph.mf.framework.DefaultTee;
import org.culturegraph.mf.framework.ObjectPipe;
import org.culturegraph.mf.framework.ObjectReceiver;
import org.culturegraph.mf.framework.annotations.Description;
import org.culturegraph.mf.framework.annotations.In;
import org.culturegraph.mf.framework.annotations.Out;

/**
* Sends an object to more than one receiver.
Expand All @@ -27,6 +30,9 @@
* @author Christoph Böhme
*
*/
@Description("Sends an object to more than one receiver.")
@In(Object.class)
@Out(Object.class)
public final class ObjectTee<T> extends DefaultTee<ObjectReceiver<T>>
implements ObjectPipe<T, ObjectReceiver<T>> {

Expand Down
6 changes: 6 additions & 0 deletions src/main/java/org/culturegraph/mf/stream/pipe/StreamTee.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,19 @@
import org.culturegraph.mf.framework.DefaultTee;
import org.culturegraph.mf.framework.StreamPipe;
import org.culturegraph.mf.framework.StreamReceiver;
import org.culturegraph.mf.framework.annotations.Description;
import org.culturegraph.mf.framework.annotations.In;
import org.culturegraph.mf.framework.annotations.Out;

/**
* Replicates an event stream to an arbitrary number of {@link StreamReceiver}s.
*
* @author Christoph Böhme, Markus Michael Geipel
*
*/
@Description("Replicates an event stream to an arbitrary number of stream receivers.")
@In(StreamReceiver.class)
@Out(StreamReceiver.class)
public final class StreamTee extends DefaultTee<StreamReceiver>
implements StreamPipe<StreamReceiver> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
*
*/
@Description("Counts triples")
@In(NamedValue.class)
@Out(NamedValue.class)
@In(Triple.class)
@Out(Triple.class)
public final class TripleCount extends AbstractTripleSort {

public static final String DEFAULT_COUNTP_REDICATE = "count";
Expand Down

0 comments on commit 2628b6c

Please sign in to comment.