logger.error(message);
throw new MolgenisModelException(message);
}
// construct
Module module = new Module(model.getName() + "." + element.getAttribute("name").trim(), model);
if (element.getAttribute("label") != null && !element.getAttribute("label").isEmpty())
{
module.setLabel(element.getAttribute("label"));
}
// DESCRIPTION
NodeList elements = element.getElementsByTagName("description");
for (int j = 0; j < elements.getLength(); j++)
{
// parse the contents, including markup...
if (elements.item(j).getParentNode().equals(element))
{
module.setDescription(elementValueToString((Element) elements.item(j)));
}
}
// ENTITY
elements = element.getElementsByTagName("entity");
for (int j = 0; j < elements.getLength(); j++)
{
Element elem = (Element) elements.item(j);
Entity e = parseEntity(model, elem);
e.setNamespace(module.getName());
module.getEntities().add(e);
e.setModule(module);
}
}