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.program.homologene;
023
024import java.util.Set;
025
026import org.biojava.utils.ChangeType;
027import org.biojava.utils.ChangeVetoException;
028
029/**
030 * represents the Homologene Group.
031 */
032public interface OrthoPairSet
033{
034
035    public static final ChangeType MODIFY =
036        new ChangeType("OrthoPairSet modified",
037            "org.biojava.bio.program.homologene.OrthoPairSet",
038            "MODIFY");
039
040    public interface Iterator
041    {
042        public boolean hasNext();
043
044        public OrthoPair nextOrthoPair();
045    }
046
047    /**
048     * retrieves name of this group.
049     * Homologene itself does not assign names
050     * or identifiers to groups.
051     */
052    public String getName();
053
054    /**
055     * set the name of this group.
056     */
057    public void setName(String name);
058
059    /**
060     * adds a specified OrthoPair relationship
061     * to this group.
062     */
063    public void addOrthoPair(OrthoPair orthology) throws ChangeVetoException;
064
065    /**
066     * removes a specified OrthoPair relationship
067     * from this group.
068     */
069    public void removeOrthoPair(OrthoPair orthology) throws ChangeVetoException;
070
071    /**
072     returns an iterator to the contents of the set.
073    /**
074     * no. of entries in this Homologene group
075     */
076    public int size();
077
078    /**
079     * returns an iterator to the members of this set
080     */
081    public Iterator iterator();
082    /**
083     * get the taxa represented in this group
084     */
085    public Set getTaxa();
086
087    /**
088     * get the lowest level of identity observed
089     * in this Group
090     */
091    public double getMinIdentity();
092
093     /**
094      * filter an OrthoPairSet
095      */
096    public OrthoPairSet filter(OrthoPairFilter filter);
097}
098