import static org.opendaylight.mdsal.binding.javav2.generator.impl.AuxiliaryGenUtils.createDescription;
import static org.opendaylight.mdsal.binding.javav2.generator.impl.GenHelperUtil.groupingsToGenTypes;
import static org.opendaylight.mdsal.binding.javav2.generator.impl.GenHelperUtil.moduleTypeBuilder;
+import static org.opendaylight.mdsal.binding.javav2.generator.impl.GenHelperUtil.processUsesImplements;
import static org.opendaylight.mdsal.binding.javav2.generator.impl.GenHelperUtil.resolveNotification;
import static org.opendaylight.mdsal.binding.javav2.generator.util.BindingTypes.NOTIFICATION_LISTENER;
import org.opendaylight.mdsal.binding.javav2.generator.yang.types.TypeProviderImpl;
import org.opendaylight.mdsal.binding.javav2.model.api.Type;
import org.opendaylight.mdsal.binding.javav2.model.api.type.builder.GeneratedTypeBuilder;
+import org.opendaylight.mdsal.binding.javav2.spec.runtime.BindingNamespaceType;
import org.opendaylight.mdsal.binding.javav2.util.BindingMapping;
import org.opendaylight.yangtools.yang.common.QName;
import org.opendaylight.yangtools.yang.model.api.DataSchemaNode;
genCtx = allTypeDefinitionsToGenTypes(module, genCtx, typeProvider);
genCtx = groupingsToGenTypes(module, module.getGroupings(), genCtx, schemaContext, verboseClassComments,
genTypeBuilders, typeProvider);
- genCtx = actionsAndRPCMethodsToGenType(module, genCtx, schemaContext, verboseClassComments,
- genTypeBuilders, typeProvider);
genCtx = allIdentitiesToGenTypes(module, schemaContext, genCtx, verboseClassComments, genTypeBuilders, typeProvider);
genCtx = notificationsToGenType(module, genCtx, schemaContext, genTypeBuilders, verboseClassComments, typeProvider);
genCtx.get(module).addModuleNode(moduleType);
final String basePackageName = BindingMapping.getRootPackageName(module);
GenHelperUtil.resolveDataSchemaNodes(module, basePackageName, moduleType, moduleType, module
- .getChildNodes(), genCtx, schemaContext, verboseClassComments, genTypeBuilders, typeProvider);
+ .getChildNodes(), genCtx, schemaContext, verboseClassComments, genTypeBuilders, typeProvider,
+ BindingNamespaceType.Data);
}
+ //after potential parent data schema nodes
+ genCtx = actionsAndRPCMethodsToGenType(module, genCtx, schemaContext, verboseClassComments,
+ genTypeBuilders, typeProvider);
+
return genCtx;
}
final String basePackageName = BindingMapping.getRootPackageName(module);
if (schemaIdentities != null && !schemaIdentities.isEmpty()) {
- Map<QName, GeneratedTOBuilderImpl> generatedIdentities = new HashMap<>();
for (final IdentitySchemaNode identity : schemaIdentities) {
GenHelperUtil.identityToGenType(module, basePackageName, identity, schemaContext, genCtx,
- verboseClassComments, genTypeBuilders, typeProvider, generatedIdentities);
+ verboseClassComments);
}
}
if (notification != null) {
resolveNotification(listenerInterface, null, basePackageName, notification, module, schemaContext,
verboseClassComments, genTypeBuilders, typeProvider, genCtx);
+ processUsesImplements(notification, module, schemaContext, genCtx, BindingNamespaceType.Data);
}
}
resolveNotification(listenerInterface, potential.getQName().getLocalName(), basePackageName,
tiedNotification, module, schemaContext, verboseClassComments, genTypeBuilders,
typeProvider, genCtx);
+ processUsesImplements(tiedNotification, module, schemaContext, genCtx, BindingNamespaceType.Data);
}
}
}