1 package net.jaekl.cfb.xml;
3 import java.io.PrintWriter;
4 import java.util.ArrayList;
6 import net.jaekl.qd.xml.ParseResult;
7 import net.jaekl.qd.xml.XmlParseException;
9 public class BugCollection extends ParseResult {
11 static final String TAG = "BugCollection";
12 static final String[] INTERNAL = { };
13 static final Object[][] EXTERNAL = { { BugInstance.TAG, BugInstance.class} };
15 ArrayList<BugInstance> m_bugs;
17 public BugCollection() {
18 super(TAG, INTERNAL, EXTERNAL);
19 m_bugs = new ArrayList<BugInstance>();
23 public void endContents(String uri, String localName, String qName, String chars)
24 throws XmlParseException
30 public void endExternal(String uri, String localName, String qName)
31 throws XmlParseException
33 if (BugInstance.TAG.equals(localName)) {
34 ParseResult[] collected = collectParsedChildren(BugInstance.class);
35 for (ParseResult pr : collected) {
36 assert(pr instanceof BugInstance);
37 m_bugs.add((BugInstance) pr);
43 public void dump(PrintWriter pw, int indent) {
44 super.dump(pw, indent);
45 for (BugInstance bug : m_bugs) {
46 bug.dump(pw, indent + 2);