From 29d2d460f307d1a966541b80f688cfe55bca0d2a Mon Sep 17 00:00:00 2001 From: asivache Date: Fri, 20 Mar 2009 05:08:15 +0000 Subject: [PATCH] a trivial interface and even more trivial implementations that do nothing (ignore the data they receive) git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@107 348d0f76-0448-11de-a6fe-93d51630548a --- .../sting/indels/DiscardingPileReceiver.java | 19 ++++++++++++++++ .../sting/indels/DiscardingReceiver.java | 17 ++++++++++++++ .../sting/indels/RecordPileReceiver.java | 22 +++++++++++++++++++ .../sting/indels/RecordReceiver.java | 18 +++++++++++++++ 4 files changed, 76 insertions(+) create mode 100644 playground/java/src/org/broadinstitute/sting/indels/DiscardingPileReceiver.java create mode 100644 playground/java/src/org/broadinstitute/sting/indels/DiscardingReceiver.java create mode 100644 playground/java/src/org/broadinstitute/sting/indels/RecordPileReceiver.java create mode 100644 playground/java/src/org/broadinstitute/sting/indels/RecordReceiver.java diff --git a/playground/java/src/org/broadinstitute/sting/indels/DiscardingPileReceiver.java b/playground/java/src/org/broadinstitute/sting/indels/DiscardingPileReceiver.java new file mode 100644 index 000000000..1a7a1047f --- /dev/null +++ b/playground/java/src/org/broadinstitute/sting/indels/DiscardingPileReceiver.java @@ -0,0 +1,19 @@ +package org.broadinstitute.sting.indels; + +import net.sf.samtools.SAMRecord; + +import java.util.Collection; + +/** + * Created by IntelliJ IDEA. + * User: asivache + * Date: Mar 20, 2009 + * Time: 12:55:01 AM + * To change this template use File | Settings | File Templates. + */ +public class DiscardingPileReceiver implements RecordPileReceiver { + @Override + public void receive(Collection c) { + return ; // do nothing, discard the pile. + } +} diff --git a/playground/java/src/org/broadinstitute/sting/indels/DiscardingReceiver.java b/playground/java/src/org/broadinstitute/sting/indels/DiscardingReceiver.java new file mode 100644 index 000000000..981585ac6 --- /dev/null +++ b/playground/java/src/org/broadinstitute/sting/indels/DiscardingReceiver.java @@ -0,0 +1,17 @@ +package org.broadinstitute.sting.indels; + +import net.sf.samtools.SAMRecord; + +/** + * Created by IntelliJ IDEA. + * User: asivache + * Date: Mar 20, 2009 + * Time: 12:53:53 AM + * To change this template use File | Settings | File Templates. + */ +public class DiscardingReceiver implements RecordReceiver { + @Override + public void receive(SAMRecord r) { + return ;// do nothing, discard the record + } +} diff --git a/playground/java/src/org/broadinstitute/sting/indels/RecordPileReceiver.java b/playground/java/src/org/broadinstitute/sting/indels/RecordPileReceiver.java new file mode 100644 index 000000000..0853b0438 --- /dev/null +++ b/playground/java/src/org/broadinstitute/sting/indels/RecordPileReceiver.java @@ -0,0 +1,22 @@ +package org.broadinstitute.sting.indels; + +import net.sf.samtools.SAMRecord; + +import java.util.Collection; + +/** + * Created by IntelliJ IDEA. + * User: asivache + * Date: Mar 19, 2009 + * Time: 7:51:47 PM + * To change this template use File | Settings | File Templates. + */ + +/** This interface abstracts processing of piles (collections) of SAM records. + * Its only receive() method should be called to send a collection of records + * to the implementation. + */ + +public interface RecordPileReceiver { + public void receive(Collection c) ; +} diff --git a/playground/java/src/org/broadinstitute/sting/indels/RecordReceiver.java b/playground/java/src/org/broadinstitute/sting/indels/RecordReceiver.java new file mode 100644 index 000000000..378fe1fe9 --- /dev/null +++ b/playground/java/src/org/broadinstitute/sting/indels/RecordReceiver.java @@ -0,0 +1,18 @@ +package org.broadinstitute.sting.indels; + +import net.sf.samtools.SAMRecord; + +/** + * Created by IntelliJ IDEA. + * User: asivache + * Date: Mar 19, 2009 + * Time: 7:28:40 PM + * To change this template use File | Settings | File Templates. + */ + +/** This interface abstracts processing of SAM records. Its only receive() method should be called to send a record + * to the implementation. + */ +public interface RecordReceiver { + public void receive(SAMRecord r); +}