return e.hasAttribute(KIND_ATTRIBUTE) && KNOWN_KINDS.contains(e.getAttribute(KIND_ATTRIBUTE));
}
/** @return the view type of an element. */
private Type typeOf(Element e) {
Type type = e.hasAttribute(KIND_ATTRIBUTE) ? type(e.getAttribute(KIND_ATTRIBUTE)) : null;
if (type == null) {
throw new RuntimeException("element has no known kind: " + e.getAttribute(KIND_ATTRIBUTE));
} else {
return type;
}