001package org.biojava.bio.program.unigene;
002
003import org.biojava.bio.BioException;
004import org.biojava.utils.ChangeVetoException;
005import org.biojava.utils.Changeable;
006
007/**
008 * A database of Unigene clusters.
009 *
010 * @author Matthew Pocock
011 */
012public interface UnigeneDB
013extends Changeable {
014  /**
015   * Fetch a cluster by its cluster id.
016   *
017   * @param clusterID  the cluster ID as a String
018   * @return the UnigeneCluster for that ID
019   * @throws BioException if there is no known cluster by that ID or if there
020   *         was an error fetching it
021   */
022  public UnigeneCluster getCluster(String clusterID)
023  throws BioException;
024
025  /**
026   * Add a cluster to a database.
027   *
028   * @param cluster  the UnigeneCluster to add
029   * @return a (possibly new) UnigeneCluster that is equivalent to
030   *         <code>cluster</code> but is served from this <code>UnigeneDB</code>
031   *         instance
032   */
033  public UnigeneCluster addCluster(UnigeneCluster cluster)
034  throws BioException, ChangeVetoException;
035}