}
// add this element to the meta-model
if (element.getTagName().equals("menu"))
{
Menu menu = new Menu(name, parent);
menu.setLabel(label);
menu.setGroup(group);
menu.setGroupRead(groupRead);
menu.setNamespace(namespace);
if (group != null && groupRead != null && group.equals(groupRead))
{
throw new MolgenisModelException(
"You cannot assign both read/write and read rights on a single menu");
}
if (element.getAttribute("position") == null || !element.getAttribute("position").isEmpty())
{
menu.setPosition(Menu.Position.getPosition(element.getAttribute("position")));
}
new_parent = menu;
}
else if (element.getTagName().equals("form"))