1 package net.jaekl.cfb.xml;
3 import java.io.PrintWriter;
5 import org.xml.sax.Attributes;
7 import net.jaekl.qd.xml.MissingAttributeException;
8 import net.jaekl.qd.xml.ParseResult;
9 import net.jaekl.qd.xml.XmlParseException;
11 public class LocalVariable extends ParseResult {
13 static final String TAG = "LocalVariable";
14 static final String[] INTERNAL = { };
15 static final Object[][] EXTERNAL = { };
17 static final String NAME = "name";
18 static final String ROLE = "role";
23 public LocalVariable() {
24 super(TAG, INTERNAL, EXTERNAL);
26 m_name = m_role = null;
29 public String getName() { return m_name; }
30 public String getRole() { return m_role; }
33 public void handleMainAttributes(Attributes attr)
34 throws MissingAttributeException
36 m_name = getRequiredAttr(TAG, attr, NAME);
37 m_role = getRequiredAttr(TAG, attr, ROLE);
41 public void endContents(String uri, String localName, String qName, String chars)
42 throws XmlParseException
47 public void endExternal(String uri, String localName, String qName)
48 throws XmlParseException
54 public void dump(PrintWriter pw, int indent)
56 super.dump(pw, indent);
57 String tab = String.format("%" + (indent + 2) + "s", "");
59 pw.println(tab + NAME + "=" + m_name);
60 pw.println(tab + ROLE + "=" + m_role);