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 <aspect> element
028 *
029 * @author David Huen
030 * @since 1.8
031 */
032public class GAMESeqRelPropHandler extends StAXPropertyHandler {
033  // the <seq> element supplies clone name and length.
034  // other data includes a description of the sequence.
035  // we will stuff the name as clone_name in an annotation.
036
037  // set up factory method
038  public static final StAXHandlerFactory GAME_SEQREL_PROP_HANDLER_FACTORY
039    = new StAXHandlerFactory() {
040    public StAXContentHandler getHandler(StAXFeatureHandler staxenv) {
041      return new GAMESeqRelPropHandler(staxenv);
042    }
043  };
044
045  GAMESeqRelPropHandler(StAXFeatureHandler staxenv) {
046    // execute superclass method to setup environment
047    super(staxenv);
048    setHandlerCharacteristics("seq_relationship", false);
049
050    // setup handlers
051    super.addHandler(new ElementRecognizer.ByLocalName("span"),
052      GAMESpanPropHandler.GAME_SPAN_PROP_HANDLER_FACTORY);
053  }
054/*
055  public void startElementHandler(
056                String nsURI,
057                String localName,
058                String qName,
059                Attributes attrs)
060         throws SAXException
061  {
062    System.out.println("GAMESeqRelPropHandler.startElementHandler entered.");
063  }*/
064}
065