1 package net.jaekl.cfb.xml.messages;
3 import org.xml.sax.Attributes;
5 import net.jaekl.qd.xml.MissingAttributeException;
6 import net.jaekl.qd.xml.ParseResult;
7 import net.jaekl.qd.xml.XmlParseException;
9 public class BugCategory extends ParseResult {
10 static final String CATEGORY = "category"; // attribute name
11 static final String DESCRIPTION = "Description";
12 static final String ABBREVIATION = "Abbreviation";
13 static final String DETAILS = "Details";
15 static final String TAG = "BugCategory";
16 static final String[] INTERNAL = { DESCRIPTION, ABBREVIATION, DETAILS };
17 static final Object[][] EXTERNAL = { };
19 public static final BugCategory UNKNOWN = new BugCategory(-2);
29 super(TAG, INTERNAL, EXTERNAL);
31 m_category = m_descr = m_abbrev = m_details = "";
40 public String getCategory() { return m_category; }
41 public String getDescr() { return m_descr; }
42 public String getAbbrev() { return m_abbrev; }
43 public String getDetails() { return m_details; }
45 public void setId(long id) { m_id = id; }
46 public long getId() { return m_id; }
49 public void endContents(String uri, String localName, String qName, String chars) throws XmlParseException
51 if (DESCRIPTION.equals(localName)) {
54 else if (ABBREVIATION.equals(localName)) {
57 else if (DETAILS.equals(localName)) {
63 public void endExternal(String uri, String localName, String qName)
64 throws XmlParseException
69 // Called once for this tag itself
71 public void handleMainAttributes(Attributes attr) throws MissingAttributeException {
72 m_category = this.getRequiredAttr(TAG, attr, CATEGORY);