@Override protected QName getQName(ContainerSchemaNode schema) { return schema.getQName(); }
protected ContainerNormalization(final ContainerSchemaNode schema) { super(new NodeIdentifier(schema.getQName()),schema, schema); }
StructuralContainerModificationStrategy(final ContainerSchemaNode schema, final DataTreeConfiguration treeConfig) { super(schema, treeConfig); this.emptyNode = ImmutableNodes.containerNode(schema.getQName()); }
StructuralContainerModificationStrategy(final ContainerSchemaNode schema, final DataTreeConfiguration treeConfig) { super(schema, treeConfig); this.emptyNode = ImmutableNodes.containerNode(schema.getQName()); }
protected ContainerContextNode(final ContainerSchemaNode schema) { super(NodeIdentifier.create(schema.getQName()), schema, schema); }
ContainerTransformation(final ContainerSchemaNode schema) { super(NodeIdentifier.create(schema.getQName()), schema); }
ContainerTransformation(final ContainerSchemaNode schema) { super(NodeIdentifier.create(schema.getQName()), schema); }
protected ContainerContextNode(final ContainerSchemaNode schema) { super(NodeIdentifier.create(schema.getQName()), schema, schema); }
private ImmutableContainerNodeSchemaAwareBuilder(final ContainerSchemaNode schema, final ImmutableContainerNode node) { super(node); this.validator = new DataNodeContainerValidator(schema); super.withNodeIdentifier(NodeIdentifier.create(schema.getQName())); }
/** * Since each case statement within a module must provide unique child nodes, it is allowed to wrap * the actual configuration with a container node with name equal to case name. * * @param choiceCaseNode state or configuration case statement * @return either choiceCaseNode or its only child container */ private static <HAS_CHILDREN_AND_QNAME extends DataNodeContainer & SchemaNode> HAS_CHILDREN_AND_QNAME getDataNodeContainer(final ChoiceCaseNode choiceCaseNode) { Collection<DataSchemaNode> childNodes = choiceCaseNode.getChildNodes(); if (childNodes.size() == 1) { DataSchemaNode onlyChild = childNodes.iterator().next(); if (onlyChild instanceof ContainerSchemaNode) { ContainerSchemaNode onlyContainer = (ContainerSchemaNode) onlyChild; if (Objects.equals(onlyContainer.getQName().getLocalName(), choiceCaseNode.getQName().getLocalName())) { // the actual configuration is inside dummy container return (HAS_CHILDREN_AND_QNAME) onlyContainer; } } } return (HAS_CHILDREN_AND_QNAME) choiceCaseNode; }
private ImmutableContainerNodeSchemaAwareBuilder(final ContainerSchemaNode schema, final ImmutableContainerNode node) { super(node); this.validator = new DataNodeContainerValidator(schema); super.withNodeIdentifier(NodeIdentifier.create(schema.getQName())); }
private ImmutableContainerNodeSchemaAwareBuilder(final ContainerSchemaNode schema) { this.validator = new DataNodeContainerValidator(schema); super.withNodeIdentifier(NodeIdentifier.create(schema.getQName())); }
private ImmutableContainerNodeSchemaAwareBuilder(final ContainerSchemaNode schema) { this.validator = new DataNodeContainerValidator(schema); super.withNodeIdentifier(NodeIdentifier.create(schema.getQName())); }
private void containerToGenType(final Module module, final String basePackageName, final GeneratedTypeBuilder parent, final GeneratedTypeBuilder childOf, final ContainerSchemaNode node) { final GeneratedTypeBuilder genType = processDataSchemaNode(module, basePackageName, childOf, node); if (genType != null) { constructGetter(parent, node.getQName().getLocalName(), node.getDescription(), genType); resolveDataSchemaNodes(module, basePackageName, genType, genType, node.getChildNodes()); } }
private void emitContainer(final ContainerSchemaNode child) { super.writer.startContainerNode(child.getQName()); child.getMustConstraints().forEach(this::emitMust); child.getWhenCondition().ifPresent(this::emitWhen); // FIXME: BUG-2444: whenNode //:Optional // FIXME: BUG-2444: *(ifFeatureNode ) emitPresenceNode(child.isPresenceContainer()); emitConfigNode(child.isConfiguration()); emitDocumentedNode(child); emitDataNodeContainer(child); emitUnknownStatementNodes(child.getUnknownSchemaNodes()); emitNotifications(child.getNotifications()); emitActions(child.getActions()); super.writer.endNode(); }
"Create stream RPC output can not be null!"); final QName outputQname = rpcSchemaNode.getOutput().getQName(); final QName streamNameQname = QName.create(rpcQName, "stream-name");
private Type createRpcContainer(final ModuleContext context, final String rpcName, final RpcDefinition rpc, final ContainerSchemaNode schema, final Type type) { processUsesAugments(schema, context); final GeneratedTypeBuilder outType = addRawInterfaceDefinition( JavaTypeName.create(context.modulePackageName(), rpcName + BindingMapping.getClassName(schema.getQName())), schema); addImplementedInterfaceFromUses(schema, outType); outType.addImplementsType(type); outType.addImplementsType(augmentable(outType)); annotateDeprecatedIfNecessary(rpc.getStatus(), outType); resolveDataSchemaNodes(context, outType, outType, schema.getChildNodes()); context.addChildNodeType(schema, outType); return outType.build(); }
public static CharSequence writeContSchemaNode(final ContainerSchemaNode contSchemaNode) { StringConcatenation _builder = new StringConcatenation(); _builder.append("container "); QName _qName = contSchemaNode.getQName(); String _localName = _qName.getLocalName(); _builder.append(_localName, "");