org.biojava.bio.seq.io.game12
Class StAXFeatureHandler

java.lang.Object
  extended by org.biojava.utils.stax.StAXContentHandlerBase
      extended by org.biojava.bio.seq.io.game12.StAXFeatureHandler
All Implemented Interfaces:
StAXContentHandler
Direct Known Subclasses:
GAMEAnnotationHandler, GAMEAspectHandler, GAMEDbxrefHandler, GAMEFeatureSetHandler, GAMEFeatureSpanHandler, GAMEGeneHandler, GAMEHandler, GAMEPropertyHandler, GAMESeqHandler, GAMESeqRelHandler, GAMESpanHandler

public class StAXFeatureHandler
extends StAXContentHandlerBase

StAX handler shamelessly ripped off from Thomas Down's XFFFeatureSetHandler. It was modified for greater generality. NOTE This class is not thread-safe -- it must only be used for one parse at any time.

Since:
1.2
Author:
Thomas Down, David Huen

Field Summary
 StAXFeatureHandler staxenv
          Nesting class that provides callback interfaces to nested class
 
Method Summary
protected  void addHandler(ElementRecognizer rec, StAXHandlerFactory handler)
          Adds a feature to the Handler attribute of the StAXFeatureHandler object
 void endElement(String nsURI, String localName, String qName, StAXContentHandler handler)
          Handles basic exit processing.
 void endElementHandler(String nsURI, String localName, String qName, StAXContentHandler handler)
          Element specific exit handler Subclass to do anything useful.
 void returnData(Object o)
          provides a standardised way of returning an object that represents the result of parsing the child element
 void startElement(String nsURI, String localName, String qName, Attributes attrs, DelegationManager dm)
          Handles basic entry processing for all feature handlers.
 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

staxenv

public StAXFeatureHandler staxenv
Nesting class that provides callback interfaces to nested class

Method Detail

addHandler

protected void addHandler(ElementRecognizer rec,
                          StAXHandlerFactory handler)
Adds a feature to the Handler attribute of the StAXFeatureHandler object

Parameters:
rec - The feature to be added to the Handler attribute
handler - The feature to be added to the Handler attribute

returnData

public void returnData(Object o)
provides a standardised way of returning an object that represents the result of parsing the child element


startElementHandler

public void startElementHandler(String nsURI,
                                String localName,
                                String qName,
                                Attributes attrs)
                         throws SAXException
Element-specific handler. Subclass this to do something useful!

Parameters:
nsURI - Description of the Parameter
localName - Description of the Parameter
qName - Description of the Parameter
attrs - Description of the Parameter
Throws:
SAXException - Description of the Exception

startElement

public void startElement(String nsURI,
                         String localName,
                         String qName,
                         Attributes attrs,
                         DelegationManager dm)
                  throws SAXException
Handles basic entry processing for all feature handlers.

Specified by:
startElement in interface StAXContentHandler
Overrides:
startElement in class StAXContentHandlerBase
Parameters:
nsURI - Description of the Parameter
localName - Description of the Parameter
qName - Description of the Parameter
attrs - Description of the Parameter
dm - Description of the Parameter
Throws:
SAXException - Description of the Exception

endElementHandler

public void endElementHandler(String nsURI,
                              String localName,
                              String qName,
                              StAXContentHandler handler)
                       throws SAXException
Element specific exit handler Subclass to do anything useful.

Parameters:
nsURI - Description of the Parameter
localName - Description of the Parameter
qName - Description of the Parameter
handler - Description of the Parameter
Throws:
SAXException - Description of the Exception

endElement

public void endElement(String nsURI,
                       String localName,
                       String qName,
                       StAXContentHandler handler)
                throws SAXException
Handles basic exit processing.

Specified by:
endElement in interface StAXContentHandler
Overrides:
endElement in class StAXContentHandlerBase
Parameters:
nsURI - Description of the Parameter
localName - Description of the Parameter
qName - Description of the Parameter
handler - Description of the Parameter
Throws:
SAXException - Description of the Exception