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.model.api.YangNode;
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 information if this uses node is defined in augment.
78 * @return true, if this node is defined under augment statement, false
81 boolean isAugmenting();
84 * Set information if this uses node is defined in augment.
88 void setAugmenting(boolean augmenting);
91 * Get augmentations defined in this uses node.
93 * @return set of augmentations defined in this node
95 Set<AugmentationSchemaBuilder> getAugmentations();
98 * Add augment builder.
101 * new builder of augment statement
103 void addAugment(AugmentationSchemaBuilder builder);
106 * Get refine statements.
108 * @return list of RefineHolder objects
110 List<RefineHolder> getRefines();
115 * @return List of refined SchemaNodeBuilder objects
117 List<SchemaNodeBuilder> getRefineNodes();
120 * Add refine statement.
123 * new RefineHolder object
125 void addRefine(RefineHolder refine);
131 * refined DataSchemaNodeBuilder object
133 void addRefineNode(DataSchemaNodeBuilder refineNode);
136 * Build new UsesNode object.
138 UsesNode build(YangNode parent);
140 boolean isResolved();
142 void setResolved(boolean resolved);