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 java.util.Set;
025
026import org.biojava.bio.Annotatable;
027import org.biojava.utils.ChangeVetoException;
028
029
030/**
031 * Annotatable objects that can have rich annotations.
032 * @author Richard Holland
033 * @author George Waldon
034 * @see RichAnnotation
035 * @since 1.5
036 */
037public interface RichAnnotatable extends Annotatable {
038
039    /**
040      * Return the associated annotation object.
041      *
042      * @return a RichAnnotation object, never null
043      */
044    public RichAnnotation getRichAnnotation ();
045
046    /**
047     * Returns the set of notes associated with this object. Would normally
048     * delegate call to internal RichAnnotation instance.
049     * @return set a set of Note objects.
050     * @see Note
051     */
052    public Set<Note> getNoteSet();
053    
054    /**
055     * Clears the notes associated with this object and replaces them with
056     * the contents of this set. Would normally delegate call to internal
057     * RichAnnotation instance.
058     * @param notes the set of Note objects to replace the existing ones with.
059     * @throws ChangeVetoException if the set is null or contains any objects
060     * that are not Note objects.
061     * @see Note
062     */
063    public void setNoteSet(Set<Note> notes) throws ChangeVetoException;
064    
065}