001/* 002 * BioJava development code 003 * 004 * This code may be freely distributed and modified under the 005 * terms of the GNU Lesser General Public Licence. This should 006 * be distributed with the code. If you do not have a copy, 007 * see: 008 * 009 * http://www.gnu.org/copyleft/lesser.html 010 * 011 * Copyright for this code is held jointly by the individual 012 * authors. These should be listed in @author doc comments. 013 * 014 * For more information on the BioJava project and its aims, 015 * or to join the biojava-l mailing list, visit the home page 016 * at: 017 * 018 * http://www.biojava.org/ 019 * 020 */ 021 022package org.biojava.bio.seq.db; 023 024import java.util.Set; 025 026import org.biojava.bio.seq.FeatureFilter; 027import org.biojava.bio.seq.FeatureHolder; 028import org.biojava.bio.seq.SequenceIterator; 029 030/** 031 * A database of sequences with accessible keys and iterators over all 032 * sequences. 033 * <p> 034 * This may have several implementations with rich behaviour, but basically most 035 * of the time you will just use the interface methods to do stuff. A sequence 036 * database contains a finite number of sequences stored under unique keys. 037 * 038 * @author Matthew Pocock 039 * @author <A href="mailto:Gerald.Loeffler@vienna.at">Gerald Loeffler</A> 040 * @author Thomas Down 041 */ 042public interface SequenceDB extends SequenceDBLite { 043 /** 044 * Get an immutable set of all of the IDs in the database. The ids are legal 045 * arguments to getSequence. 046 * 047 * @return a Set of ids - at the moment, strings 048 */ 049 Set ids(); 050 051 /** 052 * Returns a SequenceIterator over all sequences in the database. The order 053 * of retrieval is undefined. 054 * 055 * @return a SequenceIterator over all sequences 056 */ 057 SequenceIterator sequenceIterator(); 058 059 /** 060 * Query features attached to all sequences in this database. 061 * This is equivalent to applying <code>filter</code> to all 062 * sequences then merging the results. 063 * 064 * @param filter a <code>FeatureFilter</code>. 065 * @since 1.3 066 */ 067 068 public FeatureHolder filter(FeatureFilter filter); 069}