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