## org.biojava.bio.seq.io.game
Class StAXPropertyHandler

    java.lang.Object
      org.biojava.utils.stax.StAXContentHandlerBase
          org.biojava.bio.seq.io.game.StAXPropertyHandler

All Implemented Interfaces:
  StAXContentHandler

Direct Known Subclasses:
  GAMEAspectPropHandler, GAMEDbxrefPropHandler, GAMEFeatureSetPropHandler, GAMEGenePropHandler, GAMEMapPosPropHandler, GAMESeqPropHandler, GAMESeqRelPropHandler, GAMESpanPropHandler

    public class StAXPropertyHandler

extends StAXContentHandlerBase

StAX handler shamelessly ripped off from Thomas Down's XFFFeatureSetHandler. NOTE This class is not thread-safe -- it must only be used for one parse at any time. This class is the basis for classes that do not create a new feature but modify an existing feature. It is not compulsory for property handlers to subclass this class but those that don't but wish to use the handler stack facility need to use the StaxFeatureHandler's push and pop methods.

Since:
  1.8
Author:
  Thomas Down, David Huen

Field Summary
`protected SeqIOListener` `featureListener`
`protected StAXFeatureHandler` `staxenv`

Method Summary
`protected void` `addHandler(ElementRecognizer rec, StAXHandlerFactory handler)`
`void` `endElement(String nsURI, String localName, String qName, StAXContentHandler handler)`
`void` `endElementHandler(String nsURI, String localName, String qName, StAXContentHandler handler)` Element specific exit handler Subclass to do anything useful.
`protected ListIterator` `getHandlerStackIterator()` get iterator for current stack starting at the position below mine.
`void` `setHandlerCharacteristics(String localName, boolean hasCallback)` Sets the element name that the class responds to.
`void` `startElement(String nsURI, String localName, String qName, Attributes attrs, DelegationManager dm)` Override this to do any processing required but call this prior to returning.
`void` `startElementHandler(String nsURI, String localName, String qName, Attributes attrs)` Element-specific handler.

Methods inherited from class org.biojava.utils.stax.StAXContentHandlerBase
`characters, endPrefixMapping, endTree, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startPrefixMapping, startTree`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### featureListener

    protected SeqIOListener featureListener

### staxenv

    protected StAXFeatureHandler staxenv

Method Detail

### setHandlerCharacteristics

    public void setHandlerCharacteristics(String localName,
                                          boolean hasCallback)

  Sets the element name that the class responds to.

### getHandlerStackIterator

    protected ListIterator getHandlerStackIterator()
                                            throws ParseException

  get iterator for current stack starting at the position below mine.

  Throws:
    `ParseException`

### addHandler

    protected void addHandler(ElementRecognizer rec,
                              StAXHandlerFactory handler)

### startElementHandler

    public void startElementHandler(String nsURI,
                                    String localName,
                                    String qName,
                                    Attributes attrs)
                             throws SAXException

  Element-specific handler. Subclass this to do something useful!

  Throws:
    `SAXException`

### startElement

    public void startElement(String nsURI,
                             String localName,
                             String qName,
                             Attributes attrs,
                             DelegationManager dm)
                      throws SAXException

  Override this to do any processing required but call this prior to returning. Delegation occurs here!

  Specified by:
    `startElement` in interface `StAXContentHandler`
  Overrides:
    `startElement` in class `StAXContentHandlerBase`
  Throws:
    `SAXException`

### endElementHandler

    public void endElementHandler(String nsURI,
                                  String localName,
                                  String qName,
                                  StAXContentHandler handler)
                           throws SAXException

  Element specific exit handler Subclass to do anything useful.

  Throws:
    `SAXException`

### endElement

    public void endElement(String nsURI,
                           String localName,
                           String qName,
                           StAXContentHandler handler)
                    throws SAXException

  Specified by:
    `endElement` in interface `StAXContentHandler`
  Overrides:
    `endElement` in class `StAXContentHandlerBase`
  Throws:
    `SAXException`