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;
023import org.biojava.utils.ChangeType;
024import org.biojava.utils.ChangeVetoException;
025import org.biojava.utils.Changeable;
026import org.biojavax.ontology.ComparableTerm;
027
028
029/**
030 * Represents the relation between two bioentries. The bioentry_relationship in
031 * BioSQL is what this represents.
032 * @author Mark Schreiber
033 * @author Richard Holland
034 * @see BioEntry
035 * @since 1.5
036 */
037public interface BioEntryRelationship extends Comparable,Changeable {
038    
039    public static final ChangeType RANK = new ChangeType(
040            "This bioentry relationship's rank has changed",
041            "org.biojavax.bio.BioEntryRelationship",
042            "RANK"
043            );
044    
045    /**
046     * Sets the rank of this relationship. The rank may be null in
047     * the database, hence the use of an Integer object here and not
048     * an int primitive.
049     * @param rank Value of property rank.
050     * @throws ChangeVetoException if the rank rankles.
051     */
052    public void setRank(Integer rank) throws ChangeVetoException;
053    
054    /**
055     * Returns the rank of this relationship. The rank may be null in
056     * the database, hence the use of an Integer object here and not
057     * an int primitive.
058     * @return Value of property rank.
059     */
060    public Integer getRank();
061        
062    /**
063     * Returns the object of this relationship (ie. the BioEntry which
064     * this relationship starts from). This is an immutable
065     * property set by the constructor of an instantiating class.
066     * @return Value of property object.
067     */
068    public BioEntry getObject();
069    
070    /**
071     * Returns the subject of this relationship (ie. the BioEntry which
072     * this relationship targets). This is an immutable
073     * property set by the constructor of an instantiating class.
074     * @return Value of property subject.
075     */
076    public BioEntry getSubject();
077    
078    /**
079     * Returns the term describing the relationship. This is an immutable
080     * property set by the constructor of an instantiating class.
081     * @return Value of property term.
082     */
083    public ComparableTerm getTerm();
084}
085