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;
13 import org.opendaylight.yangtools.yang.model.api.GroupingDefinition;
14 import org.opendaylight.yangtools.yang.model.api.SchemaPath;
15 import org.opendaylight.yangtools.yang.model.api.UsesNode;
16 import org.opendaylight.yangtools.yang.parser.builder.impl.UnknownSchemaNodeBuilder;
17 import org.opendaylight.yangtools.yang.parser.util.RefineHolder;
20 * Interface for builders of 'uses' statement.
22 public interface UsesNodeBuilder extends GroupingMember, Builder {
25 * Get parent of this uses node. Since uses can be defined only under on of
26 * module, container, list, case, grouping, input, output, notification or
27 * augment, return type is DataNodeContainerBuilder.
29 DataNodeContainerBuilder getParent();
32 * Get grouping path as string.
34 * @return grouping path as String
36 String getGroupingPathAsString();
41 * @return grouping path as SchemaPath
43 SchemaPath getGroupingPath();
46 * Get grouping definition.
48 * @return GroupingDefinition if present, null otherwise
50 GroupingDefinition getGroupingDefinition();
53 * Set grouping definition.
55 * @param groupingDefinition
56 * GroupingDefinition object
58 void setGroupingDefinition(GroupingDefinition groupingDefinition);
61 * Get grouping builder.
63 * @return GroupingBuilder if present, null otherwise
65 GroupingBuilder getGroupingBuilder();
68 * Set grouping builder.
71 * GroupingBuilder object
73 void setGrouping(GroupingBuilder grouping);
76 * Get augmentations defined in this uses node.
78 * @return set of augmentations defined in this node
80 Set<AugmentationSchemaBuilder> getAugmentations();
83 * Add augment builder.
86 * new builder of augment statement
88 void addAugment(AugmentationSchemaBuilder builder);
91 * Get refine statements.
93 * @return list of RefineHolder objects
95 List<RefineHolder> getRefines();
100 * @return List of refined SchemaNodeBuilder objects
102 List<SchemaNodeBuilder> getRefineNodes();
105 * Add refine statement.
108 * new RefineHolder object
110 void addRefine(RefineHolder refine);
116 * refined DataSchemaNodeBuilder object
118 void addRefineNode(DataSchemaNodeBuilder refineNode);
121 * Build new UsesNode object.
126 * Get child nodes defined in target grouping.
128 * @return set of DataSchemaNodeBuilder objects
130 Set<DataSchemaNodeBuilder> getTargetChildren();
133 * Set reference to target grouping child nodes.
135 * @param targetChildren
136 * set of child nodes defined in target grouping
138 void setTargetChildren(Set<DataSchemaNodeBuilder> targetChildren);
141 * Get groupings defined in target grouping.
143 * @return set of GroupingBuilder objects
145 Set<GroupingBuilder> getTargetGroupings();
148 * Set reference to target grouping groupings.
150 * @param targetGroupings
151 * set of groupings defined in target grouping
153 void setTargetGroupings(Set<GroupingBuilder> targetGroupings);
156 * Get type definitions defined in target grouping.
158 * @return set of typedefs defined in target grouping
160 Set<TypeDefinitionBuilder> getTargetTypedefs();
163 * Set reference to target grouping typedefs.
165 * @param targetTypedefs
166 * set of typedefs defined in target grouping
168 void setTargetTypedefs(Set<TypeDefinitionBuilder> targetTypedefs);
171 * Get unknown nodes defined in target grouping.
173 * @return list of unknown nodes defined in target grouping
175 List<UnknownSchemaNodeBuilder> getTargetUnknownNodes();
178 * Set reference to target grouping unknown nodes.
180 * @param targetUnknownNodes
181 * list of unknown nodes defined in target grouping.
183 void setTargetUnknownNodes(List<UnknownSchemaNodeBuilder> targetUnknownNodes);
187 * @return true, if this object was built based on another UsesNodeBuilder,
194 * @return true, if target grouping objects was loaded already, false
197 boolean isDataCollected();
200 * Set if target grouping objects was loaded already.
202 * @param dataCollected
204 void setDataCollected(boolean dataCollected);