static { final Map<String, Element> map = new HashMap<String, Element>(); for (Element element : values()) { final String name = element.getModelName(); if (name != null) map.put(name, element); } elements = map; }
public static Element forName(String localName, Element parentNode) { String modelName = parentNode.getModelName() + "-" + localName; final Element element = elements.get(modelName); return element == null ? UNKNOWN : element; }