Package org.biojava.bio.program.xff
Interface ElementRecognizer
- All Known Implementing Classes:
ElementRecognizer.AllElementRecognizer
,ElementRecognizer.ByLocalName
,ElementRecognizer.ByNSName
,ElementRecognizer.HasAttribute
public interface ElementRecognizer
Simple interface for filtering SAX/StAX startElement events.
A number of standard implementations are provided for your convenience. To implement your own filters, just implement the filterStartElement method.
- Since:
- 1.2
- Author:
- Thomas Down, Matthew Pocock
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic class
static class
Filter elements by local name (not recommended).static class
Filter elements by name and namespace.static class
Filter elements on the existence of a specified attribute. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionboolean
filterStartElement
(String nsURI, String localName, String qName, Attributes attrs) Recognize an element based upon the start element parameters.
-
Field Details
-
ALL
-
-
Method Details
-
filterStartElement
Recognize an element based upon the start element parameters.- Parameters:
nsURI
- the uri of the element to filterlocalName
- the local name of the element to filterqName
- the qName of the element to filterattrs
- the attributes associated with the element to filter- Returns:
- true if this element is accepted, false otherwise
-