if (selectedServiceNode != null) {
SerRenLocal selectedService = selectedServiceNode.getDelegate();
try {
DelegateNode leaf = null;
if (aClass.equals(ContraindicationLocal.class)) {
leaf = new ContraindicationLocal(selectedService);
} else if (aClass.equals(CheckupLocal.class)) {
leaf = new CheckupLocal(selectedService);
} else if (aClass.equals(PrescriptionLocal.class)) {
leaf = new PrescriptionLocal(selectedService);
} else if (aClass.equals(DirectionLocal.class)) {