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.bio.seq;
023import org.biojava.utils.ChangeType;
024import org.biojava.utils.ChangeVetoException;
025import org.biojava.utils.Changeable;
026import org.biojavax.ontology.ComparableTerm;
027
028/**
029 * Represents the relation between two features. The seqfeature_relationship 
030 * in BioSQL is what this is based on.
031 * @author Mark Schreiber
032 * @author Richard Holland
033 * @since 1.5
034 */
035public interface RichFeatureRelationship extends Comparable,Changeable {
036        
037    public static final ChangeType RANK = new ChangeType(
038            "This feature relationship's rank has changed",
039            "org.biojavax.bio.seq.RichFeatureRelationship",
040            "RANK"
041            );
042    
043    /**
044     * Sets the rank of this relationship.
045     * @param rank Value of property rank.
046     * @throws ChangeVetoException if the rank is untasty.
047     */
048    public void setRank(int rank) throws ChangeVetoException;
049    
050    /**
051     * Gets the rank of this relationship.
052     * @return Value of property rank.
053     */
054    public int getRank();
055        
056    /**
057     * Returns the object of this relationship (ie. the feature which
058     * this relationship starts from). This is an immutable
059     * property set by the constructor of an instantiating class.
060     * @return Value of property object.
061     */
062    public RichFeature getObject();
063    
064    /**
065     * Gets the feature that this relationship refers to. This is set
066     * at constructor time and is immutable.
067     * @return Value of property subject.
068     */
069    public RichFeature getSubject();
070    
071    /**
072     * Gets the term that describes this relationship. This is set
073     * at constructor time and is immutable.
074     * @return Value of property term.
075     */
076    public ComparableTerm getTerm();
077    
078}