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;
023
024import org.biojava.utils.ChangeType;
025import org.biojava.utils.ChangeVetoException;
026import org.biojava.utils.Changeable;
027
028
029/**
030 * A simple ranked comment designed to be used for BioEntry comments
031 * in BioSQL. The Comment field is intended to be set by the constructor
032 * and is immuntable; the Rank field is changeable.
033 * @author Richard Holland
034 * @author gwaldon
035 * @see org.biojavax.bio.BioEntry
036 * @since 1.5
037 */
038public interface Comment extends Comparable, Changeable {
039    
040    public static final ChangeType RANK = new ChangeType(
041            "This comment's rank has changed",
042            "org.biojavax.Comment",
043            "RANK"
044            );
045    
046    /**
047     * Returns the comment part of this comment.
048     * @return a comment.
049     */
050    public String getComment();
051    
052    /**
053     * Returns the rank of this comment.
054     * @return the rank.
055     */
056    public int getRank();
057    
058    /**
059     * Sets the rank of this comment.
060     * @param rank the rank to use.
061     * @throws ChangeVetoException if the new rank is unacceptable.
062     */
063    public void setRank(int rank) throws ChangeVetoException;
064    
065}