@@ -0,0 +1,1908 @@
+package de.avgl.dmp.converter.pipe;%0A%0Aimport org.culturegraph.mf.framework.DefaultStreamPipe;%0Aimport org.culturegraph.mf.framework.StreamReceiver;%0Aimport org.culturegraph.mf.framework.annotations.Description;%0Aimport org.culturegraph.mf.framework.annotations.In;%0Aimport org.culturegraph.mf.framework.annotations.Out;%0A%0A%0A/**%0A * Leaves the event stream untouched but writes it to stdout, for debugging.%0A * The %7B@link StreamReceiver%7D may be %7B@code null%7D.%0A * In this case %7B@code StreamOutWriter%7D behaves as a sink, just logging.%0A */%0A@Description(%22dumps events on stdout%22)%0A@In(StreamReceiver.class)%0A@Out(StreamReceiver.class)%0Apublic final class StreamOutWriter extends DefaultStreamPipe%3CStreamReceiver%3E %7B%0A%0A%09public StreamOutWriter() %7B%0A%09%09super();%0A%09%7D%0A%0A%09@Override%0A%09public void startRecord(final String identifier) %7B%0A%09%09assert !isClosed();%0A%09%09System.out.println(%22start record = %22 + identifier);%0A%09%09if (null != getReceiver()) %7B%0A%09%09%09getReceiver().startRecord(identifier);%0A%09%09%7D%0A%09%7D%0A%0A%09@Override%0A%09public void endRecord() %7B%0A%09%09assert !isClosed();%0A%09%09System.out.println(%22end record%22);%0A%09%09if (null != getReceiver()) %7B%0A%09%09%09getReceiver().endRecord();%0A%09%09%7D%0A%09%7D%0A%0A%09@Override%0A%09public void startEntity(final String name) %7B%0A%09%09assert !isClosed();%0A%09%09System.out.println(%22start entity = %22 + name);%0A%09%09if (null != getReceiver()) %7B%0A%09%09%09getReceiver().startEntity(name);%0A%09%09%7D%0A%09%7D%0A%0A%09@Override%0A%09public void endEntity() %7B%0A%09%09assert !isClosed();%0A%09%09System.out.println(%22end entity%22);%0A%09%09if (null != getReceiver()) %7B%0A%09%09%09getReceiver().endEntity();%0A%09%09%7D%0A%0A%09%7D%0A%0A%09@Override%0A%09public void literal(final String name, final String value) %7B%0A%09%09assert !isClosed();%0A%09%09System.out.println(%22start literal = %22 + name + %22 : %22 + value);%0A%09%09if (null != getReceiver()) %7B%0A%09%09%09getReceiver().literal(name, value);%0A%09%09%7D%0A%09%7D%0A%0A%09@Override%0A%09protected void onResetStream() %7B%0A%09%09System.out.println(%22reset stream%22);%0A%09%7D%0A%0A%09@Override%0A%09protected void onCloseStream() %7B%0A%09%09System.out.println(%22close stream%22);%0A%09%7D%0A%0A%7D%0A

debug stream dumper