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.biojava.bio.molbio;
023
024import org.biojava.bio.seq.StrandedFeature;
025
026/**
027 * <code>RestrictionSite</code> represents the recognition site of a
028 * restriction enzyme.
029 *
030 * @author Keith James
031 * @since 1.3
032 */
033public interface RestrictionSite extends StrandedFeature
034{
035    /**
036     * <code>getPosition</code> returns the common, forward strand cut
037     * site. Note that some enzymes cut in more than one
038     * position. Such supplementary sites may be calculated by
039     * retrieving the <code>RestrictionEnzyme</code> instance and
040     * using its methods to calculate the position.
041     *
042     * @return an <code>int</code> indicating the base immediately
043     * before the cleavage site on the forward strand.
044     */
045    public int getPosition();
046
047    /**
048     * <code>getEnzyme</code> returns the enzyme which cuts at this
049     * site. A sequence which is the target for several different
050     * enzymes is expected to have a corresponding
051     * <code>RestrictionSite</code> feature for each.
052     *
053     * @return a <code>RestrictionEnzyme</code>.
054     */
055    public RestrictionEnzyme getEnzyme();
056
057    /**
058     * <code>Template</code> for construction of
059     * <code>RestrictionSite</code>s.
060     */
061    public static class Template extends StrandedFeature.Template
062    {
063        /**
064         * <code>enzyme</code> <code>RestrictionEnzyme</code> field.
065         */
066        public RestrictionEnzyme enzyme;
067    }
068}