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 * @deprecated Pre-Beryllium implementation, scheduled for removal.
22 public interface UsesNodeBuilder extends GroupingMember {
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.
30 DataNodeContainerBuilder getParent();
33 * Get target grouping path.
35 * @return target grouping path
37 SchemaPath getTargetGroupingPath();
42 * @return grouping path as SchemaPath
44 SchemaPath getGroupingPath();
47 * Get grouping definition.
49 * @return GroupingDefinition if present, null otherwise
51 GroupingDefinition getGroupingDefinition();
54 * Set grouping definition.
56 * @param groupingDefinition
57 * GroupingDefinition object
59 void setGroupingDefinition(GroupingDefinition groupingDefinition);
62 * Get grouping builder.
64 * @return GroupingBuilder if present, null otherwise
66 GroupingBuilder getGroupingBuilder();
69 * Set grouping builder.
72 * GroupingBuilder object
74 void setGrouping(GroupingBuilder grouping);
77 * Get information if this uses node is defined in augment.
79 * @return true, if this node is defined under augment statement, false
82 boolean isAugmenting();
85 * Set information if this uses node is defined in augment.
87 * @param augmenting information about augmentation
89 void setAugmenting(boolean augmenting);
92 * Get augmentations defined in this uses node.
94 * @return set of augmentations defined in this node
96 Set<AugmentationSchemaBuilder> getAugmentations();
99 * Add augment builder.
102 * new builder of augment statement
104 void addAugment(AugmentationSchemaBuilder builder);
107 * Get refine statements.
109 * @return list of RefineHolder objects
111 List<RefineBuilder> getRefines();
116 * @return List of refined SchemaNodeBuilder objects
118 List<SchemaNodeBuilder> getRefineNodes();
121 * Add refine statement.
124 * new RefineHolder object
126 void addRefine(RefineBuilder refine);
132 * refined DataSchemaNodeBuilder object
134 void addRefineNode(DataSchemaNodeBuilder refineNode);
137 * Build new UsesNode object.
140 * @return UsesNode Instance of {@link UsesNode} described by this builder.
147 * Returns true if uses node was resolved and {@link #getGroupingBuilder()}
148 * was instantiated for parent done of this node.
150 * @return true if uses node was resolved and associated nodes were instantiated in parent node.
152 boolean isResolved();
156 * Sets state of instantiation of {@link #getGroupingBuilder()}
157 * into parent node of this node.
159 * @deprecated Do not use this, this should be internal to the implementation
160 * and public API contract.
162 * @param resolved resolved
165 void setResolved(boolean resolved);