Integer idAttrib = from.getAttributeAsInt("id");
String nameAttrib = from.getAttribute(NAME.propertyName());
String descriptionAttrib = from.getAttribute(DESCRIPTION.propertyName());
String typeNameAttrib = from.getAttribute(TYPE.propertyName());
ResourceGroup rg = new ResourceGroup(nameAttrib);
rg.setId(idAttrib);
rg.setDescription(descriptionAttrib);
if (typeNameAttrib != null) {
ResourceType rt = new ResourceType();
rt.setName(typeNameAttrib);
String pluginNameAttrib = from.getAttribute(PLUGIN.propertyName());
rt.setPlugin(pluginNameAttrib);
rg.setResourceType(rt);
}
Long explicitCount = Long.valueOf(from.getAttribute("explicitCount"));
Long explicitDown = Long.valueOf(from.getAttribute("explicitDown"));
Long explicitUnknown = Long.valueOf(from.getAttribute("explicitUnknown"));