001/*
002 * RichSeqIOAdapter.java
003 *
004 * Created on October 6, 2005, 4:53 PM
005 */
006
007/*
008 *                    BioJava development code
009 *
010 * This code may be freely distributed and modified under the
011 * terms of the GNU Lesser General Public Licence.  This should
012 * be distributed with the code.  If you do not have a copy,
013 * see:
014 *
015 *      http://www.gnu.org/copyleft/lesser.html
016 *
017 * Copyright for this code is held jointly by the individual
018 * authors.  These should be listed in @author doc comments.
019 *
020 * For more information on the BioJava project and its aims,
021 * or to join the biojava-l mailing list, visit the home page
022 * at:
023 *
024 *      http://www.biojava.org/
025 *
026 */
027
028package org.biojavax.bio.seq.io;
029
030import org.biojava.bio.seq.Feature;
031import org.biojava.bio.seq.io.ParseException;
032import org.biojava.bio.symbol.Alphabet;
033import org.biojava.bio.symbol.IllegalAlphabetException;
034import org.biojava.bio.symbol.Symbol;
035import org.biojavax.Namespace;
036import org.biojavax.RankedCrossRef;
037import org.biojavax.RankedDocRef;
038import org.biojavax.bio.BioEntryRelationship;
039import org.biojavax.bio.seq.RichFeature;
040import org.biojavax.bio.taxa.NCBITaxon;
041
042/**
043 * This class implements all methods of RichSeqIOListener and takes no action.
044 * It should be overridden to implement custom listeners that only listen for
045 * a small subset of events.
046 *
047 * @author Mark Schreiber
048 * @since 1.5
049 */
050public class RichSeqIOAdapter implements RichSeqIOListener {
051    
052    /**
053     * This is a dummy feature. It is returned by the method 
054     * {@link #getCurrentFeature() getCurrentFeature()}. Access is provided so
055     * you can override it.
056     */
057    protected RichFeature emptyFeature;
058    
059    /** Creates a new instance of RichSeqIOAdapter */
060    public RichSeqIOAdapter() {
061        emptyFeature = RichFeature.Tools.makeEmptyFeature();
062    }
063    
064    
065    
066    public void setAccession(String accession) throws ParseException{}
067    public void setIdentifier(String identifier) throws ParseException{}
068    public void setDivision(String division) throws ParseException{}
069    public void setDescription(String description)throws ParseException{}
070    public void setVersion(int version) throws ParseException{}
071    public void setSeqVersion(String version) throws ParseException{}
072    public void setComment(String comment) throws ParseException{}
073    public void setRankedDocRef(RankedDocRef ref) throws ParseException{}
074    public void setTaxon(NCBITaxon taxon) throws ParseException{}
075    public void setNamespace(Namespace namespace) throws ParseException{}
076    public void setRelationship(BioEntryRelationship relationship) throws ParseException{}
077    public void setRankedCrossRef(RankedCrossRef crossRef) throws ParseException{}
078    public void setURI(String uri) throws ParseException{}
079    public RichFeature getCurrentFeature() throws ParseException{return this.emptyFeature;}
080    public void setCircular(boolean circular) throws ParseException{}
081    public void addFeatureProperty(Object key, Object value) throws ParseException{}
082    public void endFeature() throws ParseException{}
083    public void startFeature(Feature.Template templ) throws ParseException{
084        this.emptyFeature = RichFeature.Tools.makeEmptyFeature();
085    }
086    public void addSequenceProperty(Object key, Object value) throws ParseException{}
087    public void addSymbols(Alphabet alpha, Symbol[] syms, int start, int length)
088    throws IllegalAlphabetException{}
089    public void setName(String name) throws ParseException{}
090    public void endSequence() throws ParseException{}
091    public void startSequence() throws ParseException{}
092}