01: package com.jeta.forms.store.jml.dom;
02:
03: import java.util.Collection;
04: import java.util.LinkedHashMap;
05:
06: import com.jeta.open.support.EmptyCollection;
07:
08: public abstract class AbstractJMLNode implements JMLNode {
09:
10: private LinkedHashMap m_attribs;
11:
12: public void setAttribute(String attribName, String attribValue) {
13: if (m_attribs == null)
14: m_attribs = new LinkedHashMap();
15:
16: m_attribs.put(attribName, attribValue);
17: }
18:
19: public Collection getAttributeNames() {
20: if (m_attribs == null)
21: return EmptyCollection.getInstance();
22:
23: return m_attribs.keySet();
24: }
25:
26: public String getAttribute(String attribName) {
27: return (String) m_attribs.get(attribName);
28: }
29:
30: }
|