Merge "BUG-597: removed dependency on GeneratedTOBuilderImpl from BindingGeneratorUti...
[yangtools.git] / yang / yang-parser-impl / src / main / java / org / opendaylight / yangtools / yang / parser / builder / api / GroupingBuilder.java
1 /*
2  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.yangtools.yang.parser.builder.api;
9
10 import java.util.Set;
11 import org.opendaylight.yangtools.yang.model.api.GroupingDefinition;
12
13 /**
14  * Interface for builders of 'grouping' statement.
15  */
16 public interface GroupingBuilder extends DataNodeContainerBuilder, SchemaNodeBuilder, GroupingMember {
17
18     /**
19      * Build GroupingDefinition object from this builder.
20      *
21      * @return Instance of {@link GroupingDefinition} described by this builder.
22      */
23     @Override
24     GroupingDefinition build();
25
26     /**
27      *
28      * Returns instantiation of grouping child nodes under supplied builder.
29      *
30      * Supplied newParent is not modified.
31      *
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
35      * node.
36      *
37      * @param newParent Parent node, under which this grouping should be instantiated.
38      * @return Set of new builders representing instantiation of this grouping.
39      */
40     Set<DataSchemaNodeBuilder> instantiateChildNodes(Builder newParent);
41
42
43    /**
44     *
45     * Returns instantiation of grouping type definitions under supplied builder.
46     *
47     * Supplied newParent is not modified.
48     *
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
52     * node.
53     *
54     * @param newParent Parent node, under which this grouping should be instantiated.
55     * @return Set of new builders representing instantiation of this grouping.
56     */
57     Set<TypeDefinitionBuilder> instantiateTypedefs(Builder newParent);
58
59    /**
60     *
61     * Returns instantiation of grouping definitions under supplied builder.
62     *
63     * Supplied newParent is not modified.
64     *
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
68     * node.
69     *
70     * @param newParent Parent node, under which this grouping should be instantiated.
71     * @return Set of new builders representing instantiation of this grouping.
72     */
73     Set<GroupingBuilder> instantiateGroupings(Builder newParent);
74
75     /**
76     *
77     * Returns instantiation of unknown nodes under supplied builder.
78     *
79     * Supplied newParent is not modified.
80     *
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
84     * node.
85     *
86     * @param newParent Parent node, under which this grouping should be instantiated.
87     * @return Set of new builders representing instantiation of this grouping.
88     */
89     Set<UnknownSchemaNodeBuilder> instantiateUnknownNodes(Builder newParent);
90
91 }