Class FeatureHandler

java.lang.Object
org.biojava.utils.stax.StAXContentHandlerBase
org.biojava.bio.program.xff.FeatureHandler
All Implemented Interfaces:
StAXContentHandler
Direct Known Subclasses:
StrandedFeatureHandler

StAX handler for the basic feature type of XFF. This class can also be subclassed to handle other XFF types.

In general, to handle a feature subclass, you will with to:

  • If necessary, override createFeatureTemplate to build the appropriate BioJava Feature.Template
  • Add your own startElement and endElement methods which handle extra extra elements in your feature type. These should normally pass on all the standard elements to super.startElement and super.endElement.

Note that, since FeatureHandler does some basic housekeeping, if you `consume' a startElement notification (i.e. don't pass it on to the superclass) you must also consume the matching endElement. Since FeatureHandler silently ignores all unrecognized elements, it is usually safe to pass on all startElement and endElement notifications -- even those which are specific to your feature type.

Since:
1.2
Author:
Thomas Down