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.biojavax;
023import org.biojava.utils.ChangeType;
024import org.biojava.utils.ChangeVetoException;
025import org.biojava.utils.Changeable;
026
027/**
028 * Allows cross-references to other databases to be ranked.
029 * @author Richard Holland
030 * @author gwaldon
031 * @see RankedCrossRefable
032 * @see CrossRef
033 * @since 1.5
034 */
035public interface RankedCrossRef extends Comparable,Changeable {
036    
037    public static final ChangeType RANK = new ChangeType(
038            "This ranked crossreference's rank has changed",
039            "org.biojavax.RankedCrossRef",
040            "RANK"
041            );
042    
043    /**
044     * Return the cross reference associated with this object.
045     * @return a crossref object.
046     */
047    public CrossRef getCrossRef();
048    
049    /**
050     * Return the rank associated with the cross reference.
051     * @return the rank.
052     */
053    public int getRank();
054    
055    /**
056     * Set the rank associated with the cross reference.
057     * @param rank the rank to use.
058     * @throws ChangeVetoException if the new rank is unacceptable.
059     */
060    public void setRank(int rank) throws ChangeVetoException;
061    
062}