Пример #1
0
 public Step(Resolver resolver, Map attributes) {
   this(resolver, "");
   Log.debug("Instantiating " + getClass());
   if (Log.expectDebugOutput) {
     Iterator iter = attributes.keySet().iterator();
     while (iter.hasNext()) {
       String key = (String) iter.next();
       Log.debug(key + "=" + attributes.get(key));
     }
   }
   parseStepAttributes(attributes);
 }
Пример #2
0
 /** Add an attribute to the given XML Element. Attributes are kept in alphabetical order. */
 protected Element addAttributes(Element el) {
   // Use a TreeMap to keep the attributes sorted on output
   Map atts = new TreeMap(getAttributes());
   Iterator iter = atts.keySet().iterator();
   while (iter.hasNext()) {
     String key = (String) iter.next();
     String value = (String) atts.get(key);
     if (value == null) {
       Log.warn("Attribute '" + key + "' value was null in step " + getXMLTag());
       value = "";
     }
     el.setAttribute(key, value);
   }
   return el;
 }