Package org.biojava.bio.seq.io.agave
Class StAXPropertyHandler
- java.lang.Object
-
- org.biojava.bio.seq.io.agave.StAXContentHandlerBase
-
- org.biojava.bio.seq.io.agave.StAXPropertyHandler
-
- All Implemented Interfaces:
StAXContentHandler
- Direct Known Subclasses:
AGAVEAltIdsPropHandler
,AGAVEAnnotationsHandler
,AGAVEDbIdPropHandler
,AGAVEDescPropHandler
,AGAVEElementIdPropHandler
,AGAVEExonsPropHandler
,AGAVEIdAliasPropHandler
,AGAVEKeywordPropHandler
,AGAVEMapLocationPropHandler
,AGAVEMapPositionPropHandler
,AGAVEMatchAlignPropHandler
,AGAVEMatchDescPropHandler
,AGAVEMatchRegionPropHandler
,AGAVENotePropHandler
,AGAVEQualifierPropHandler
,AGAVERelatedAnnotPropHandler
,AGAVEResultPropertyPropHandler
,AGAVESciPropertyPropHandler
,AGAVESeqLocationPropHandler
,AGAVESeqPropHandler
,AGAVEViewPropHandler
,AGAVEXrefPropHandler
,AGAVEXrefPropPropHandler
,AGAVEXrefsPropHandler
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.- Author:
- copied from Thomas Down, copied from David Huen, Hanning Ni Doubletwist Inc
-
-
Field Summary
Fields Modifier and Type Field Description protected SeqIOListener
featureListener
protected StAXFeatureHandler
staxenv
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.protected void
setProperty(String name, String value)
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.bio.seq.io.agave.StAXContentHandlerBase
characters, endPrefixMapping, endTree, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startPrefixMapping, startTree
-
-
-
-
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)
-
setProperty
protected void setProperty(String name, String value)
-
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 interfaceStAXContentHandler
- Overrides:
startElement
in classStAXContentHandlerBase
- 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 interfaceStAXContentHandler
- Overrides:
endElement
in classStAXContentHandlerBase
- Throws:
SAXException
-
-