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.Locator;
024import org.xml.sax.SAXException;
025
026/**
027 * Simple implementation of the <code>StAXContentHandler</code>
028 * interface, with empty implementations for all the methods.
029 *
030 * <p>
031 * This class is provided as a base for content handlers where
032 * the implementor does not wish to provide all the methods.
033 * </p>
034 *
035 * @author copied from Thomas Down
036 */
037public class StAXContentHandlerBase implements StAXContentHandler {
038    public void startTree()
039        throws SAXException
040    {
041    }
042
043    public void endTree()
044        throws SAXException
045    {
046    }
047
048    /**
049     * Signal a span of character data in the XML input.
050     *
051     * @param ch an array of characters
052     * @param start index of the first significant character for this event.
053     * @param length number of characters significant to this event.
054     */
055
056    public void characters(char[] ch,
057                           int start,
058                           int length)
059        throws SAXException
060    {
061    }
062
063    public void ignorableWhitespace(char[] ch,
064                                    int start,
065                                    int length)
066        throws SAXException
067    {
068    }
069
070    public void startPrefixMapping(String prefix, String uri)
071        throws SAXException
072    {
073    }
074
075    public void endPrefixMapping(String prefix)
076        throws SAXException
077    {
078    }
079
080    public void processingInstruction(String target, String data)
081        throws SAXException
082    {
083    }
084
085    public void setDocumentLocator(Locator locator)
086    {
087    }
088
089    public void skippedEntity(String name)
090        throws SAXException
091    {
092    }
093
094    public void startElement(String nsURI,
095                             String localName,
096                             String qName,
097                             Attributes attrs,
098                             DelegationManager dm)
099        throws SAXException
100    {
101    }
102
103    public void endElement(String nsURI,
104                           String localName,
105                           String qName,
106                           StAXContentHandler delegate)
107        throws SAXException
108    {
109    }
110}