package org.madore.damlengine; import java.util.Map; import java.util.HashMap; import org.w3c.dom.Element; import org.w3c.dom.Attr; public class TodoAttr extends TodoItem { protected static Map damlAttrHandlers; { damlAttrHandlers = new HashMap(); damlAttrHandlers.put("xempty", new XemptyAttrHandler()); } Attr attr; Element owner; Map context; Map options; public TodoAttr(Attr attr, Element owner, Map context, Map options) { this.attr = attr; this.owner = owner; this.context = context; this.options = options; } public void dispatch() { AttrHandler handler; String nsuri = attr.getNamespaceURI(); if ( nsuri != null && nsuri.equals(DamlEngine.DAML_NS) ) { handler = damlAttrHandlers.get(attr.getLocalName()); } else handler = null; if ( handler != null ) handler.handle(this); } }