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;
10 import java.util.List;
12 import org.opendaylight.yangtools.yang.model.api.GroupingDefinition;
15 * Interface for builders of 'grouping' statement.
17 public interface GroupingBuilder extends DataNodeContainerBuilder, SchemaNodeBuilder, GroupingMember {
20 * Build GroupingDefinition object from this builder.
22 * @return Instance of {@link GroupingDefinition} described by this builder.
25 GroupingDefinition build();
29 * Returns instantiation of grouping child nodes under supplied builder.
31 * Supplied newParent is not modified.
33 * For each {@link #getChildNodeBuilders()} new builder is created,
34 * which has supplied new parent set as their {@link Builder#getParent()}
35 * and QNames have updated namespace and revision per supplied parent
38 * @param newParent Parent node, under which this grouping should be instantiated.
39 * @return List of new builders representing instantiation of this grouping.
41 List<DataSchemaNodeBuilder> instantiateChildNodes(Builder newParent);
46 * Returns instantiation of grouping type definitions under supplied builder.
48 * Supplied newParent is not modified.
50 * For each {@link #getTypeDefinitionBuilders()} new builder is created,
51 * which has supplied new parent set as their {@link Builder#getParent()}
52 * and QNames have updated namespace and revision per supplied parent
55 * @param newParent Parent node, under which this grouping should be instantiated.
56 * @return Set of new builders representing instantiation of this grouping.
58 Set<TypeDefinitionBuilder> instantiateTypedefs(Builder newParent);
62 * Returns instantiation of grouping definitions under supplied builder.
64 * Supplied newParent is not modified.
66 * For each {@link #getGroupingBuilders()} new builder is created,
67 * which has supplied new parent set as their {@link Builder#getParent()}
68 * and QNames have updated namespace and revision per supplied parent
71 * @param newParent Parent node, under which this grouping should be instantiated.
72 * @return Set of new builders representing instantiation of this grouping.
74 Set<GroupingBuilder> instantiateGroupings(Builder newParent);
78 * Returns instantiation of unknown nodes under supplied builder.
80 * Supplied newParent is not modified.
82 * For each {@link #getUnknownNodes()} new builder is created,
83 * which has supplied new parent set as their {@link Builder#getParent()}
84 * and QNames have updated namespace and revision per supplied parent
87 * @param newParent Parent node, under which this grouping should be instantiated.
88 * @return Set of new builders representing instantiation of this grouping.
90 Set<UnknownSchemaNodeBuilder> instantiateUnknownNodes(Builder newParent);