|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.biojava.utils.stax.StAXContentHandlerBase
org.biojava.bio.program.xff.FeatureHandler
public class FeatureHandler
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:
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.
| Field Summary | |
|---|---|
static XFFPartHandlerFactory |
FEATURE_HANDLER_FACTORY
|
| Constructor Summary | |
|---|---|
FeatureHandler(XFFFeatureSetHandler xffenv)
Construct a new Feature handler, passing in an XFF-parsing environment. |
|
| Method Summary | |
|---|---|
protected Feature.Template |
createFeatureTemplate()
Create a new template of the appropriate type. |
void |
endElement(String nsURI,
String localName,
String qName,
StAXContentHandler handler)
StAX callback for element ends. |
protected void |
fireEndFeature()
Fire the endFeature event. |
protected void |
fireStartFeature()
Fire the startFeature event. |
protected Feature.Template |
getFeatureTemplate()
Get the template for the feature being constructed. |
protected StAXContentHandler |
getLocationHandler()
|
protected StAXContentHandler |
getOldIDHandler()
|
protected StAXContentHandler |
getSourceHandler()
|
protected StAXContentHandler |
getTypeHandler()
|
XFFFeatureSetHandler |
getXFFEnvironment()
Return the XFF processing environment passed in when this handler was created. |
protected void |
setFeatureProperty(Object key,
Object value)
Set a property. |
void |
startElement(String nsURI,
String localName,
String qName,
Attributes attrs,
DelegationManager dm)
StAX callback for element starts. |
| 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 |
|---|
public static final XFFPartHandlerFactory FEATURE_HANDLER_FACTORY
| Constructor Detail |
|---|
public FeatureHandler(XFFFeatureSetHandler xffenv)
| Method Detail |
|---|
public XFFFeatureSetHandler getXFFEnvironment()
protected Feature.Template getFeatureTemplate()
createFeatureTemplate
for template construction.
protected Feature.Template createFeatureTemplate()
protected void fireStartFeature()
throws ParseException
ParseException - if the startFeature notification fails, or if
it has already been made.
protected void fireEndFeature()
throws ParseException
ParseException
protected void setFeatureProperty(Object key,
Object value)
throws ChangeVetoException,
ParseException
ChangeVetoException
ParseException
public void startElement(String nsURI,
String localName,
String qName,
Attributes attrs,
DelegationManager dm)
throws SAXException
startElement in interface StAXContentHandlerstartElement in class StAXContentHandlerBaseSAXException
public void endElement(String nsURI,
String localName,
String qName,
StAXContentHandler handler)
throws SAXException
endElement in interface StAXContentHandlerendElement in class StAXContentHandlerBaseSAXExceptionprotected StAXContentHandler getTypeHandler()
protected StAXContentHandler getSourceHandler()
protected StAXContentHandler getOldIDHandler()
protected StAXContentHandler getLocationHandler()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||