f186dc3cf386b6d14aee2f25011f8082758f4758
[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.List;
11 import java.util.Set;
12 import org.opendaylight.yangtools.yang.model.api.GroupingDefinition;
13
14 /**
15  * Interface for builders of 'grouping' statement.
16  */
17 public interface GroupingBuilder extends DataNodeContainerBuilder, SchemaNodeBuilder, GroupingMember {
18
19     /**
20      * Build GroupingDefinition object from this builder.
21      *
22      * @return Instance of {@link GroupingDefinition} described by this builder.
23      */
24     @Override
25     GroupingDefinition build();
26
27     /**
28      *
29      * Returns instantiation of grouping child nodes under supplied builder.
30      *
31      * Supplied newParent is not modified.
32      *
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
36      * node.
37      *
38      * @param newParent Parent node, under which this grouping should be instantiated.
39      * @return List of new builders representing instantiation of this grouping.
40      */
41     List<DataSchemaNodeBuilder> instantiateChildNodes(Builder newParent);
42
43
44    /**
45     *
46     * Returns instantiation of grouping type definitions under supplied builder.
47     *
48     * Supplied newParent is not modified.
49     *
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
53     * node.
54     *
55     * @param newParent Parent node, under which this grouping should be instantiated.
56     * @return Set of new builders representing instantiation of this grouping.
57     */
58     Set<TypeDefinitionBuilder> instantiateTypedefs(Builder newParent);
59
60    /**
61     *
62     * Returns instantiation of grouping definitions under supplied builder.
63     *
64     * Supplied newParent is not modified.
65     *
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
69     * node.
70     *
71     * @param newParent Parent node, under which this grouping should be instantiated.
72     * @return Set of new builders representing instantiation of this grouping.
73     */
74     Set<GroupingBuilder> instantiateGroupings(Builder newParent);
75
76     /**
77     *
78     * Returns instantiation of unknown nodes under supplied builder.
79     *
80     * Supplied newParent is not modified.
81     *
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
85     * node.
86     *
87     * @param newParent Parent node, under which this grouping should be instantiated.
88     * @return Set of new builders representing instantiation of this grouping.
89     */
90     Set<UnknownSchemaNodeBuilder> instantiateUnknownNodes(Builder newParent);
91
92 }