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;
12 import org.opendaylight.yangtools.yang.model.api.GroupingDefinition;
13 import org.opendaylight.yangtools.yang.parser.builder.impl.UnknownSchemaNodeBuilder;
16 * Interface for builders of 'grouping' statement.
18 public interface GroupingBuilder extends DataNodeContainerBuilder, SchemaNodeBuilder, GroupingMember {
21 * Build GroupingDefinition object from this builder.
23 * @return Instance of {@link GroupingDefinition} described by this builder.
26 GroupingDefinition build();
30 * Returns instantiation of grouping child nodes under supplied builder.
32 * Supplied newParent is not modified.
34 * For each {@link #getChildNodeBuilders()} new builder is created,
35 * which has supplied new parent set as their {@link Builder#getParent()}
36 * and QNames have updated namespace and revision per supplied parent
39 * @param newParent Parent node, under which this grouping should be instantiated.
40 * @return Set of new builders representing instantiation of this grouping.
42 Set<DataSchemaNodeBuilder> instantiateChildNodes(Builder newParent);
47 * Returns instantiation of grouping type definitions under supplied builder.
49 * Supplied newParent is not modified.
51 * For each {@link #getTypeDefinitionBuilders()} new builder is created,
52 * which has supplied new parent set as their {@link Builder#getParent()}
53 * and QNames have updated namespace and revision per supplied parent
56 * @param newParent Parent node, under which this grouping should be instantiated.
57 * @return Set of new builders representing instantiation of this grouping.
59 Set<TypeDefinitionBuilder> instantiateTypedefs(Builder newParent);
63 * Returns instantiation of grouping definitions under supplied builder.
65 * Supplied newParent is not modified.
67 * For each {@link #getGroupingBuilders()} new builder is created,
68 * which has supplied new parent set as their {@link Builder#getParent()}
69 * and QNames have updated namespace and revision per supplied parent
72 * @param newParent Parent node, under which this grouping should be instantiated.
73 * @return Set of new builders representing instantiation of this grouping.
75 Set<GroupingBuilder> instantiateGroupings(Builder newParent);
79 * Returns instantiation of unknown nodes under supplied builder.
81 * Supplied newParent is not modified.
83 * For each {@link #getUnknownNodes()} new builder is created,
84 * which has supplied new parent set as their {@link Builder#getParent()}
85 * and QNames have updated namespace and revision per supplied parent
88 * @param newParent Parent node, under which this grouping should be instantiated.
89 * @return Set of new builders representing instantiation of this grouping.
91 Set<UnknownSchemaNodeBuilder> instantiateUnknownNodes(Builder newParent);