return root.getChildAt(index);
} else if (parent == SERVICES) {
return dsg.getItems().get(index);
} else if (parent instanceof DirectoryServicesGroupItem) {
try {
DirectoryServicesGroupItem item = (DirectoryServicesGroupItem) parent;
SelectorEditableExceptional<DirectoryServicesGroupItem> groups = item.getItems();
if (index < groups.size()) {
return groups.get(index);
} else {
return getServices(item).get(index - groups.size());
}
} catch (ClipsException ex) {
return new ErrorValue(ex);
}
} else if (parent == SERVICE_PACKETS) {
return packetList.get(index);
} else if (parent == medexamS) {
return medexamList.get(index);
} else if (parent == PROFCHECKUPS) {
return profcheckupList.get(index);
} else if (parent == DISPANSERS) {
return dispanserList.get(index);
} else if (parent instanceof DirectoryPacketTemplateItem) {
DirectoryPacketTemplateItem item = (DirectoryPacketTemplateItem) parent;
DirectoryPacketTemplateListItem pItem = item.getPacketItem(index);
Object s = pItem;
return s;
} else {
throw new IllegalArgumentException("Неизвестный элемент дерева");
}