01: package net.sourceforge.cruisecontrol.dashboard.saxhandler;
02:
03: import java.util.Map;
04:
05: import org.xml.sax.Attributes;
06: import org.xml.sax.helpers.DefaultHandler;
07:
08: public abstract class SAXBasedExtractor extends DefaultHandler {
09: public abstract void report(Map resultSet);
10:
11: private boolean canStop;
12:
13: public boolean canStop() {
14: return canStop;
15: }
16:
17: protected void canStop(boolean canStop) {
18: this .canStop = canStop;
19: }
20:
21: protected String getAttribute(Attributes attributes,
22: String attributeName) {
23: String attributeValue = attributes.getValue(attributeName);
24: return attributeValue == null ? "" : attributeValue;
25: }
26: }
|