private static boolean isInnerType(final LeafSchemaNode leaf, final TypeDefinition<?> type) { // New parser with encapsulated type if (leaf.getPath().equals(type.getPath())) { return true; } // Embedded type definition with new parser. Also takes care of the old parser with bits if (leaf.getPath().equals(type.getPath().getParent())) { return true; } return false; }
private void emitLeaf(final LeafSchemaNode child) { super.writer.startLeafNode(child.getQName()); child.getWhenCondition().ifPresent(this::emitWhen); // FIXME: BUG-2444: *(ifFeatureNode ) emitTypeNode(child.getPath(), child.getType()); child.getType().getUnits().ifPresent(this::emitUnitsNode); child.getMustConstraints().forEach(this::emitMust); child.getType().getDefaultValue().ifPresent(this::emitDefaultNode); emitConfigNode(child.isConfiguration()); emitMandatoryNode(child.isMandatory()); emitDocumentedNode(child); emitUnknownStatementNodes(child.getUnknownSchemaNodes()); super.writer.endNode(); }
className = basePackageName + "." + BindingMapping.getClassName(typeQName); } else { final Iterator<QName> path = node.getPath().getPathFromRoot().iterator(); final QName first = path.next(); final Module parent = schemaContext.findModule(first.getModule()).orElse(null);
className = basePackageName + "." + BindingMapping.getClassName(typeQName); } else { Iterator<QName> path = node.getPath().getPathFromRoot().iterator(); QName first = path.next(); if (!(path.hasNext())) {
String className; Module parent = getParentModule(node); Iterator<QName> path = node.getPath().getPathFromRoot().iterator(); path.next(); if (!(path.hasNext())) { Module parentModule = getParentModule(node); String basePackageName = BindingMapping.getRootPackageName(parentModule.getQNameModule()); String packageName = packageNameForGeneratedType(basePackageName, node.getPath()); className = packageName + "." + BindingMapping.getClassName(node.getQName());
String className; final Module parent = getParentModule(node); final Iterator<QName> path = node.getPath().getPathFromRoot().iterator(); path.next(); if (!path.hasNext()) { final String basePackageName = BindingMapping.getRootPackageName(parentModule.getQNameModule()); final String packageName = BindingGeneratorUtil.packageNameForGeneratedType(basePackageName, node.getPath()); className = packageName + "." + BindingMapping.getClassName(node.getQName());
returnType = enumBuilder.toInstance(typeBuilder); ((TypeProviderImpl) typeProvider).putReferencedType(leaf.getPath(), returnType); } else if (typeDef instanceof UnionType) { genTOBuilder = addTOToTypeBuilder(typeDef, typeBuilder, leaf, parentModule);