Package org.biojava.bio.program.xff
Class XFFFeatureSetHandler
java.lang.Object
org.biojava.utils.stax.StAXContentHandlerBase
org.biojava.bio.program.xff.XFFFeatureSetHandler
- All Implemented Interfaces:
StAXContentHandler
StAX handler which converts and stream of parse events for an XFF
featureSet element into BioJava SeqIO events.
NOTE This class is not thread-safe -- it
must only be used for one parse at any time.
- Since:
- 1.2
- Author:
- Thomas Down
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConstruct a new XFFFeatureSetHandler with the default set of handlers. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addDetailHandler
(ElementRecognizer rec, XFFPartHandlerFactory handler) Extend this FeatureSetHandler to delegate certain detail elements to the specified handler type.void
addFeatureHandler
(ElementRecognizer rec, XFFPartHandlerFactory handler) Extend this FeatureSetHandler to delegate certain feature elements to the specified handler type.void
endElement
(String nsURI, String localName, String qName, StAXContentHandler handler) Return a handler for the XFFdetails
element.Return the object which receives startFeature/endFeature notifications.void
Set the object which receives startFeature/endFeature notifications.void
void
startElement
(String nsURI, String localName, String qName, Attributes attrs, DelegationManager dm) Methods inherited from class org.biojava.utils.stax.StAXContentHandlerBase
characters, endPrefixMapping, endTree, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startPrefixMapping, startTree
-
Field Details
-
PROPERTY_XFF_ID
- See Also:
-
-
Constructor Details
-
XFFFeatureSetHandler
public XFFFeatureSetHandler()Construct a new XFFFeatureSetHandler with the default set of handlers.
-
-
Method Details
-
setFeatureListener
Set the object which receives startFeature/endFeature notifications. -
getFeatureListener
Return the object which receives startFeature/endFeature notifications. -
setMergeAnnotation
-
getMergeAnnotation
-
addFeatureHandler
Extend this FeatureSetHandler to delegate certain feature elements to the specified handler type.- Parameters:
rec
- A selector for some sub-set of feature elements.handler
- A factory which returns StAX handlers for matching elements.
-
addDetailHandler
Extend this FeatureSetHandler to delegate certain detail elements to the specified handler type.- Parameters:
rec
- A selector for some sub-set of detail elements.handler
- A factory which returns StAX handlers for matching elements.
-
startElement
public void startElement(String nsURI, String localName, String qName, Attributes attrs, DelegationManager dm) throws SAXException - Specified by:
startElement
in interfaceStAXContentHandler
- Overrides:
startElement
in classStAXContentHandlerBase
- Throws:
SAXException
-
endElement
- Specified by:
endElement
in interfaceStAXContentHandler
- Overrides:
endElement
in classStAXContentHandlerBase
-
getDetailsHandler
Return a handler for the XFFdetails
element. This handler will, in turn, delegate to the specific detail handlers provided withaddDetailHandler
-