public void processVersion () String version = _root.getAttribute("version", "DTD"); if ("DTD".equals(version)) String s = (String)_root.getAttribute("metadata-complete"); if (s == null) _metaDataComplete = MetaDataComplete.NotSet;
public void visitServlet(WebAppContext context, Descriptor descriptor, XmlParser.Node node) String id = node.getAttribute("id");
/** * Recursively go through the entire tree starting at node. * Return the value for the first node with the name set, * e.g. [Set name="name"]value[/Set] * @param name case insensitive */ public static String getValue(Node node, String name) { String nameLC = name.toLowerCase(Locale.US); for (Object o : node) { if (!(o instanceof Node)) continue; Node n = (Node) o; String tag = n.getTag(); if (tag != null && "set".equals(tag.toLowerCase(Locale.US))) { String aname = n.getAttribute("name"); if (aname != null && aname.toLowerCase(Locale.US).equals(nameLC)) return n.toString(false); } else { String rv = getValue(n, name); if (rv != null) return rv; } } return null; }
private static Class<?> nodeClass(XmlParser.Node node) throws ClassNotFoundException { String className = node.getAttribute("class"); if (className == null) return null; return Loader.loadClass(className); }
/** * Get an element attribute. * * @return attribute or null. */ public String getAttribute(String name) { return getAttribute(name, null); }
private static Class<?> nodeClass(XmlParser.Node node) throws ClassNotFoundException { String className = node.getAttribute("class"); if (className == null) return null; return Loader.loadClass(XmlConfiguration.class,className,true); }
/** * Get an element attribute. * * @return attribute or null. */ public String getAttribute(String name) { return getAttribute(name, null); }
private Object refObj(Object obj, XmlParser.Node node) throws Exception { String refid = node.getAttribute("refid"); if (refid==null) refid = node.getAttribute("id"); obj = _idMap.get(refid); if (obj == null && node.size()>0) throw new IllegalStateException("No object for refid=" + refid); configure(obj,node,0); return obj; }
private void put(Object obj, XmlParser.Node node) throws Exception { if (!(obj instanceof Map)) throw new IllegalArgumentException("Object for put is not a Map: " + obj); @SuppressWarnings("unchecked") Map<Object, Object> map = (Map<Object, Object>)obj; String name = node.getAttribute("name"); Object value = value(obj,node); map.put(name,value); if (LOG.isDebugEnabled()) LOG.debug("XML " + obj + ".put(" + name + "," + value + ")"); }
private static Class<?> nodeClass(XmlParser.Node node) throws ClassNotFoundException { String className = node.getAttribute("class"); if (className == null) return null; return Loader.loadClass(XmlConfiguration.class,className,true); }
private void put(Object obj, XmlParser.Node node) throws Exception { if (!(obj instanceof Map)) throw new IllegalArgumentException("Object for put is not a Map: " + obj); @SuppressWarnings("unchecked") Map<Object, Object> map = (Map<Object, Object>)obj; String name = node.getAttribute("name"); Object value = value(obj,node); map.put(name,value); if (LOG.isDebugEnabled()) LOG.debug("XML " + obj + ".put(" + name + "," + value + ")"); }
private Object refObj(Object obj, XmlParser.Node node) throws Exception { String refid = node.getAttribute("refid"); if (refid==null) refid = node.getAttribute("id"); obj = _idMap.get(refid); if (obj == null && node.size()>0) throw new IllegalStateException("No object for refid=" + refid); configure(obj,node,0); return obj; }
private void put(Object obj, XmlParser.Node node) throws Exception { if (!(obj instanceof Map)) throw new IllegalArgumentException("Object for put is not a Map: " + obj); @SuppressWarnings("unchecked") Map<Object, Object> map = (Map<Object, Object>)obj; String name = node.getAttribute("name"); Object value = value(obj,node); map.put(name,value); if (LOG.isDebugEnabled()) LOG.debug("XML " + obj + ".put(" + name + "," + value + ")"); }
/** * Get an element attribute. * * @return attribute or null. */ public String getAttribute(String name) { return getAttribute(name, null); }
private Object refObj(Object obj, XmlParser.Node node) throws Exception { String id = node.getAttribute("id"); obj = _configuration.getIdMap().get(id); if (obj == null) throw new IllegalStateException("No object for id=" + id); configure(obj,node,0); return obj; }
private Object refObj(Object obj, XmlParser.Node node) throws Exception { String id = node.getAttribute("id"); obj = _configuration.getIdMap().get(id); if (obj == null) throw new IllegalStateException("No object for id=" + id); configure(obj,node,0); return obj; }
private Object refObj(Object obj, XmlParser.Node node) throws Exception { String id = node.getAttribute("id"); obj = _configuration.getIdMap().get(id); if (obj == null) throw new IllegalStateException("No object for id=" + id); configure(obj,node,0); return obj; }
private void put(Object obj, XmlParser.Node node) throws Exception { if (!(obj instanceof Map)) throw new IllegalArgumentException("Object for put is not a Map: " + obj); @SuppressWarnings("unchecked") Map<Object, Object> map = (Map<Object, Object>)obj; String name = node.getAttribute("name"); Object value = value(obj,node); map.put(name,value); if (LOG.isDebugEnabled()) LOG.debug("XML " + obj + ".put(" + name + "," + value + ")"); }
/** * Get an element attribute. * * @return attribute or null. */ public String getAttribute(String name) { return getAttribute(name, null); }
String tag = n.getTag(); if (tag != null && "set".equals(tag.toLowerCase(Locale.US))) { String aname = n.getAttribute("name"); if (aname != null && aname.toLowerCase(Locale.US).equals(nameLC)) {