public HostInfo makeHost(JrdsDocument n) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException, ClassNotFoundException {
JrdsElement hostNode = n.getRootElement();
String hostName = hostNode.getAttribute("name");
String dnsHostname = hostNode.getAttribute("dnsName");
if(hostName == null) {
return null;
}
HostInfo host;
if(dnsHostname != null) {
host = new HostInfo(hostName, dnsHostname);
} else {
host = new HostInfo(hostName);
}
host.setHostDir(new File(pm.rrddir, host.getName()));
String hidden = hostNode.getAttribute("hidden");
host.setHidden(hidden != null && Boolean.parseBoolean(hidden));
Map<String, Set<String>> collections = new HashMap<String, Set<String>>();
parseFragment(hostNode, host, collections, null);
return host;
}