@@ -0,0 +1,1686 @@
+/*%0A *                    BioJava development code%0A *%0A * This code may be freely distributed and modified under the%0A * terms of the GNU Lesser General Public Licence.  This should%0A * be distributed with the code.  If you do not have a copy,%0A * see:%0A *%0A *      http://www.gnu.org/copyleft/lesser.html%0A *%0A * Copyright for this code is held jointly by the individual%0A * authors.  These should be listed in @author doc comments.%0A *%0A * For more information on the BioJava project and its aims,%0A * or to join the biojava-l mailing list, visit the home page%0A * at:%0A *%0A *      http://www.biojava.org/%0A *%0A */%0A%0Apackage org.biojava.bio.seq.db;%0A%0Aimport java.io.*;%0Aimport java.util.*;%0Aimport java.lang.ref.*;%0A%0Aimport org.biojava.bio.symbol.*;%0Aimport org.biojava.bio.seq.*;%0Aimport org.biojava.bio.*;%0A%0A/**%0A * SequenceDB implementation that returns new SequenceView instances wrapping %0A * the sequences in an underlying database. One apropreate use of this would be%0A * to wrap a DB in one of these and then wrap this in an annotating db so that%0A * the annotation is added to views, not the underlying sequences.%0A * %0A * @author Matthew Pocock%0A * @since 1.2%0A */%0A%0Apublic class ViewingSequenceDB extends SequenceDBWrapper %7B%0A  /**%0A   * Create a new ViewingSequenceDB that views the sequences in parent.%0A   *%0A   * @param parent the SequenceDB to view%0A   */%0A  public ViewingSequenceDB(SequenceDB parent) %7B%0A    super(parent);%0A  %7D%0A  %0A  public String getName() %7B%0A    return getParent().getName();%0A  %7D%0A  %0A  public Sequence getSequence(String id) throws BioException %7B%0A    Sequence seq = getParent().getSequence(id);%0A    return new ViewSequence(seq);%0A  %7D%0A  %0A  public Set ids() %7B%0A    return getParent().ids();%0A  %7D%0A%7D%0A

ViewingSequenceDB produces a seqdb where every sequence is a ViewSequence.