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.utils.ChangeVetoException; 027import org.biojava.utils.Changeable; 028 029/** 030 * Defines an object as being able to have ranked cross references associated 031 * with it. 032 * @author Richard Holland 033 * @see RankedCrossRef 034 * @since 1.5 035 */ 036public interface RankedCrossRefable extends Changeable { 037 038 /** 039 * Returns the set of all ranked cross references associated with an object. 040 * @return a set of RankedCrossRef objects. 041 */ 042 public Set<RankedCrossRef> getRankedCrossRefs(); 043 044 /** 045 * Sets the ranked cross references associated with an object. Null will 046 * throw an exception but the empty set is fine. 047 * @param crossrefs a set of RankedCrossRef objects. 048 * @throws ChangeVetoException if the set was null or any of its contents 049 * were not RankedCrossRef objects. 050 */ 051 public void setRankedCrossRefs(Set<RankedCrossRef> crossrefs) throws ChangeVetoException; 052 053 /** 054 * Adds a ranked cross reference to the existing set. If already present, this 055 * call is ignored. Null values are not acceptable. 056 * @param crossref the ranked cross reference to add. 057 * @throws ChangeVetoException if the parameter is null. 058 */ 059 public void addRankedCrossRef(RankedCrossRef crossref) throws ChangeVetoException; 060 061 /** 062 * Removes a ranked cross reference from the existing set. If not present, this 063 * call is ignored. Null values are not acceptable. 064 * @param crossref the ranked cross reference to remove. 065 * @throws ChangeVetoException if the parameter is null. 066 */ 067 public void removeRankedCrossRef(RankedCrossRef crossref) throws ChangeVetoException; 068}