01: package org.geotools.xml.impl;
02:
03: import javax.xml.namespace.QName;
04:
05: import org.geotools.xml.Configuration;
06:
07: public class ElementNameStreamingParserHandler extends
08: StreamingParserHandler {
09:
10: /**
11: * The name of elements to stream
12: */
13: QName name;
14:
15: public ElementNameStreamingParserHandler(Configuration config,
16: QName name) {
17: super (config);
18:
19: this .name = name;
20: }
21:
22: protected boolean stream(ElementHandler handler) {
23: return name.getNamespaceURI().equals(
24: handler.getComponent().getNamespace())
25: && name.getLocalPart().equals(
26: handler.getComponent().getName());
27: }
28: }
|