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;
12 import org.opendaylight.yangtools.yang.model.api.GroupingDefinition;
13 import org.opendaylight.yangtools.yang.model.api.SchemaPath;
14 import org.opendaylight.yangtools.yang.model.api.UsesNode;
17 * Builder for 'uses' statement.
19 public interface UsesNodeBuilder extends GroupingMember {
22 * Get parent of this uses node. Since uses can be defined only under on of
23 * module, container, list, case, grouping, input, output, notification or
24 * augment, return type is DataNodeContainerBuilder.
27 DataNodeContainerBuilder getParent();
30 * Get grouping path as string.
32 * @return grouping path as String
34 String getGroupingPathAsString();
39 * @return grouping path as SchemaPath
41 SchemaPath getGroupingPath();
44 * Get grouping definition.
46 * @return GroupingDefinition if present, null otherwise
48 GroupingDefinition getGroupingDefinition();
51 * Set grouping definition.
53 * @param groupingDefinition
54 * GroupingDefinition object
56 void setGroupingDefinition(GroupingDefinition groupingDefinition);
59 * Get grouping builder.
61 * @return GroupingBuilder if present, null otherwise
63 GroupingBuilder getGroupingBuilder();
66 * Set grouping builder.
69 * GroupingBuilder object
71 void setGrouping(GroupingBuilder grouping);
74 * Get information if this uses node is defined in augment.
76 * @return true, if this node is defined under augment statement, false
79 boolean isAugmenting();
82 * Set information if this uses node is defined in augment.
86 void setAugmenting(boolean augmenting);
89 * Get augmentations defined in this uses node.
91 * @return set of augmentations defined in this node
93 Set<AugmentationSchemaBuilder> getAugmentations();
96 * Add augment builder.
99 * new builder of augment statement
101 void addAugment(AugmentationSchemaBuilder builder);
104 * Get refine statements.
106 * @return list of RefineHolder objects
108 List<RefineBuilder> getRefines();
113 * @return List of refined SchemaNodeBuilder objects
115 List<SchemaNodeBuilder> getRefineNodes();
118 * Add refine statement.
121 * new RefineHolder object
123 void addRefine(RefineBuilder refine);
129 * refined DataSchemaNodeBuilder object
131 void addRefineNode(DataSchemaNodeBuilder refineNode);
134 * Build new UsesNode object.
137 * @return UsesNode Instance of {@link UsesNode} described by this builder.
144 * Returns true if uses node was resolved and {@link #getGroupingBuilder()}
145 * was instantiated for parent done of this node.
147 * @return true if uses node was resolved and associated nodes were instantiated in parent node.
149 boolean isResolved();
153 * Sets state of instantiation of {@link #getGroupingBuilder()}
154 * into parent node of this node.
156 * @deprecated Do not use this, this should be internal to the implementation
157 * and public API contract.
160 void setResolved(boolean resolved);