Package 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
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.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
-
-
-
-
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 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
-
-