2 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.yangtools.yang.parser.builder.api;
11 import org.opendaylight.yangtools.yang.model.api.GroupingDefinition;
14 * Interface for builders of 'grouping' statement.
16 public interface GroupingBuilder extends DataNodeContainerBuilder, SchemaNodeBuilder, GroupingMember {
19 * Build GroupingDefinition object from this builder.
21 * @return Instance of {@link GroupingDefinition} described by this builder.
24 GroupingDefinition build();
28 * Returns instantiation of grouping child nodes under supplied builder.
30 * Supplied newParent is not modified.
32 * For each {@link #getChildNodeBuilders()} new builder is created,
33 * which has supplied new parent set as their {@link Builder#getParent()}
34 * and QNames have updated namespace and revision per supplied parent
37 * @param newParent Parent node, under which this grouping should be instantiated.
38 * @return Set of new builders representing instantiation of this grouping.
40 Set<DataSchemaNodeBuilder> instantiateChildNodes(Builder newParent);
45 * Returns instantiation of grouping type definitions under supplied builder.
47 * Supplied newParent is not modified.
49 * For each {@link #getTypeDefinitionBuilders()} new builder is created,
50 * which has supplied new parent set as their {@link Builder#getParent()}
51 * and QNames have updated namespace and revision per supplied parent
54 * @param newParent Parent node, under which this grouping should be instantiated.
55 * @return Set of new builders representing instantiation of this grouping.
57 Set<TypeDefinitionBuilder> instantiateTypedefs(Builder newParent);
61 * Returns instantiation of grouping definitions under supplied builder.
63 * Supplied newParent is not modified.
65 * For each {@link #getGroupingBuilders()} new builder is created,
66 * which has supplied new parent set as their {@link Builder#getParent()}
67 * and QNames have updated namespace and revision per supplied parent
70 * @param newParent Parent node, under which this grouping should be instantiated.
71 * @return Set of new builders representing instantiation of this grouping.
73 Set<GroupingBuilder> instantiateGroupings(Builder newParent);
77 * Returns instantiation of unknown nodes under supplied builder.
79 * Supplied newParent is not modified.
81 * For each {@link #getUnknownNodes()} new builder is created,
82 * which has supplied new parent set as their {@link Builder#getParent()}
83 * and QNames have updated namespace and revision per supplied parent
86 * @param newParent Parent node, under which this grouping should be instantiated.
87 * @return Set of new builders representing instantiation of this grouping.
89 Set<UnknownSchemaNodeBuilder> instantiateUnknownNodes(Builder newParent);