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 TypeMethodDescriptionvoidaddDetailHandler(ElementRecognizer rec, XFFPartHandlerFactory handler) Extend this FeatureSetHandler to delegate certain detail elements to the specified handler type.voidaddFeatureHandler(ElementRecognizer rec, XFFPartHandlerFactory handler) Extend this FeatureSetHandler to delegate certain feature elements to the specified handler type.voidendElement(String nsURI, String localName, String qName, StAXContentHandler handler) Return a handler for the XFFdetailselement.Return the object which receives startFeature/endFeature notifications.voidSet the object which receives startFeature/endFeature notifications.voidvoidstartElement(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:
startElementin interfaceStAXContentHandler- Overrides:
startElementin classStAXContentHandlerBase- Throws:
SAXException
-
endElement
- Specified by:
endElementin interfaceStAXContentHandler- Overrides:
endElementin classStAXContentHandlerBase
-
getDetailsHandler
Return a handler for the XFFdetailselement. This handler will, in turn, delegate to the specific detail handlers provided withaddDetailHandler
-