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 Classes Modifier and Type Interface Description static class
ElementRecognizer.AllElementRecognizer
static class
ElementRecognizer.ByLocalName
Filter elements by local name (not recommended).static class
ElementRecognizer.ByNSName
Filter elements by name and namespace.static class
ElementRecognizer.HasAttribute
Filter elements on the existence of a specified attribute.
-
Field Summary
Fields Modifier and Type Field Description static ElementRecognizer
ALL
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
filterStartElement(String nsURI, String localName, String qName, Attributes attrs)
Recognize an element based upon the start element parameters.
-
-
-
Field Detail
-
ALL
static final ElementRecognizer ALL
-
-
Method Detail
-
filterStartElement
boolean filterStartElement(String nsURI, String localName, String qName, Attributes attrs)
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
-
-