XmlObject xmlObject = cursor.getObject();
if (SelectableItemType.type.isAssignableFrom(xmlObject.schemaType())) {
SelectableItemType item = (SelectableItemType) xmlObject;
if (item instanceof GroupType) {
GroupType node = (GroupType) item;
GroupImpl group = new GroupImpl(node, this);
addGroupInternal(group);
} else if (item instanceof RuleType) {
RuleType node = (RuleType) item;
RuleImpl rule = new RuleImpl(node, this);