Example #1
0
 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;
 }
Example #2
0
 public static Element forName(String localName, Element parentNode) {
   String modelName = parentNode.getModelName() + "-" + localName;
   final Element element = elements.get(modelName);
   return element == null ? UNKNOWN : element;
 }