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.seq.io.game;
023
024import org.biojava.utils.stax.StAXContentHandler;
025
026/**
027 * Handles the GAME <feature_set> element
028 *
029 * @author David Huen
030 * @since 1.8
031 */
032public class GAMEFeatureSetPropHandler extends StAXPropertyHandler {
033  // while <feature_set> doesn't invoke creation of features, elements nested
034  // by it do.  This element just acts as a wrapper.
035  // there are attributes on this element.
036
037  // set up factory method
038  public static final StAXHandlerFactory GAME_FEATURESET_PROP_HANDLER_FACTORY
039    = new StAXHandlerFactory() {
040    public StAXContentHandler getHandler(StAXFeatureHandler staxenv) {
041      return new GAMEFeatureSetPropHandler(staxenv);
042    }
043  };
044
045  GAMEFeatureSetPropHandler(StAXFeatureHandler staxenv) {
046    // execute superclass method to setup environment
047    super(staxenv);
048    setHandlerCharacteristics("feature_set", false);
049
050    // setup handlers
051    // rather daft one, this: there's already an id attribute.
052    super.addHandler(new ElementRecognizer.ByLocalName("name"),
053      GAMENamePropHandler.GAME_NAME_PROP_HANDLER_FACTORY);
054    // rather daft one, this: there's already an id attribute.
055    super.addHandler(new ElementRecognizer.ByLocalName("feature_span"),
056      GAMEFeatureSpanHandler.GAME_FEATURESPAN_HANDLER_FACTORY);
057  }
058
059/*
060  public void startElementHandler(
061                String nsURI,
062                String localName,
063                String qName,
064                Attributes attrs)
065         throws SAXException
066  {
067  }
068*/
069}
070