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 */
021package org.biojava.bio.seq.io.agave;
022import org.xml.sax.Attributes;
023import org.xml.sax.SAXException;
024
025/**
026 *
027 * @author Hanning Ni    Doubletwist Inc
028 */
029public class AGAVEComputationHandler
030               extends StAXFeatureHandler
031
032{
033  public static final StAXHandlerFactory AGAVE_COMPUTATION_HANDLER_FACTORY
034    = new StAXHandlerFactory() {
035    public StAXContentHandler getHandler(StAXFeatureHandler staxenv) {
036      return new AGAVEComputationHandler(staxenv);
037    }
038  };
039
040  AGAVEComputationHandler(StAXFeatureHandler staxenv) {
041    // setup up environment stuff
042    super( staxenv );
043    featureListener = staxenv.featureListener;
044    setHandlerCharacteristics("computation", true);
045 }
046
047
048  /**
049   * currently we do not handler >computation< as subtag of sciobj yet
050   */
051  public void startElementHandler(
052                String nsURI,
053                String localName,
054                String qName,
055                Attributes attrs)
056                throws SAXException
057
058  {
059         throw new SAXException( "tag <computation> is not supported as sub-tag of sciobj yet") ;
060  }
061
062}