private static QName createQNameFromSuperNode(final Module module, final Object node, final SchemaNode superChildNode) {
QName childNodeQName = null;
if (node instanceof Module) {
private static QName createQNameFromSuperNode(final Module module, final Object node, final SchemaNode superChildNode) {
QName childNodeQName = null;
if (node instanceof Module) {
} else if (node instanceof AugmentationSchema) {
childNodeQName = QName.create(module.getNamespace(), module.getRevision(), superChildNode.getQName().getLocalName());
} else {
} else if (node instanceof AugmentationSchema) {
childNodeQName = QName.create(module.getNamespace(), module.getRevision(), superChildNode.getQName().getLocalName());
} else {
final Object node, final Module module, final SchemaContext schemaContext,
Map<Module, ModuleContext> genCtx, final BindingNamespaceType namespaceType) {
final Object node, final Module module, final SchemaContext schemaContext,
Map<Module, ModuleContext> genCtx, final BindingNamespaceType namespaceType) {
if (superChildNode instanceof DataNodeContainer || superChildNode instanceof ChoiceSchemaNode) {
final QName childQName = createQNameFromSuperNode(module, node, superChildNode);
if (superChildNode instanceof DataNodeContainer || superChildNode instanceof ChoiceSchemaNode) {
final QName childQName = createQNameFromSuperNode(module, node, superChildNode);
Preconditions.checkNotNull(childNode, node.toString() + "->" + childQName.toString());
final GeneratedTypeBuilder type = genCtx.get(module).getChildNode(childNode.getPath());
final GeneratedTypeBuilder superType = genCtx.get(superModule).getChildNode(superChildNode.getPath());
Preconditions.checkNotNull(childNode, node.toString() + "->" + childQName.toString());
final GeneratedTypeBuilder type = genCtx.get(module).getChildNode(childNode.getPath());
final GeneratedTypeBuilder superType = genCtx.get(superModule).getChildNode(superChildNode.getPath());
Preconditions.checkNotNull(type, module.toString() + "->" + childNode.getPath().toString());
Preconditions.checkNotNull(superType, superModule.toString() + "->" + superChildNode.getPath().toString());
type.addImplementsType(superType);
Preconditions.checkNotNull(type, module.toString() + "->" + childNode.getPath().toString());
Preconditions.checkNotNull(superType, superModule.toString() + "->" + superChildNode.getPath().toString());
type.addImplementsType(superType);
Preconditions.checkNotNull(caseNode, node.toString() + "->" + childQName.toString());
final GeneratedTypeBuilder type = genCtx.get(module).getCase(caseNode.getPath());
Preconditions.checkNotNull(caseNode, node.toString() + "->" + childQName.toString());
final GeneratedTypeBuilder type = genCtx.get(module).getCase(caseNode.getPath());
static Map<Module, ModuleContext> processUsesImplements(final Object node, final Module module,
final SchemaContext schemaContext, Map<Module, ModuleContext> genCtx, final BindingNamespaceType namespaceType) {
if (node instanceof DataNodeContainer) {
static Map<Module, ModuleContext> processUsesImplements(final Object node, final Module module,
final SchemaContext schemaContext, Map<Module, ModuleContext> genCtx, final BindingNamespaceType namespaceType) {
if (node instanceof DataNodeContainer) {
final GroupingDefinition grouping = findGroupingNodeFromUses(module, schemaContext, node, usesNode);
final Module superModule = SchemaContextUtil.findParentModule(schemaContext, grouping);
addUsesImplements(grouping, superModule, node, module, schemaContext, genCtx, namespaceType);
final GroupingDefinition grouping = findGroupingNodeFromUses(module, schemaContext, node, usesNode);
final Module superModule = SchemaContextUtil.findParentModule(schemaContext, grouping);
addUsesImplements(grouping, superModule, node, module, schemaContext, genCtx, namespaceType);
- static GeneratedTypeBuilder findKeyByPath(final SchemaPath path, final Map<Module, ModuleContext> genCtx) {
- for (final ModuleContext ctx : genCtx.values()) {
- final GeneratedTypeBuilder result = ctx.getKeyType(path);
- if (result != null) {
- return result;
- }
- }
- return null;
- }
-
static Map<Module, ModuleContext> addRawAugmentGenTypeDefinition(final Module module, final String augmentPackageName,
final Type targetTypeRef, final SchemaNode targetNode, final List<AugmentationSchema> schemaPathAugmentListEntry,
final Map<String, Map<String, GeneratedTypeBuilder>> genTypeBuilders, final Map<Module, ModuleContext> genCtx,
static Map<Module, ModuleContext> addRawAugmentGenTypeDefinition(final Module module, final String augmentPackageName,
final Type targetTypeRef, final SchemaNode targetNode, final List<AugmentationSchema> schemaPathAugmentListEntry,
final Map<String, Map<String, GeneratedTypeBuilder>> genTypeBuilders, final Map<Module, ModuleContext> genCtx,