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.util.RefineHolder;
19 * Interface for builders of 'uses' statement.
21 public interface UsesNodeBuilder extends GroupingMember {
24 * Get parent of this uses node. Since uses can be defined only under on of
25 * module, container, list, case, grouping, input, output, notification or
26 * augment, return type is DataNodeContainerBuilder.
28 DataNodeContainerBuilder getParent();
31 * Get grouping path as string.
33 * @return grouping path as String
35 String getGroupingPathAsString();
40 * @return grouping path as SchemaPath
42 SchemaPath getGroupingPath();
45 * Get grouping definition.
47 * @return GroupingDefinition if present, null otherwise
49 GroupingDefinition getGroupingDefinition();
52 * Set grouping definition.
54 * @param groupingDefinition
55 * GroupingDefinition object
57 void setGroupingDefinition(GroupingDefinition groupingDefinition);
60 * Get grouping builder.
62 * @return GroupingBuilder if present, null otherwise
64 GroupingBuilder getGroupingBuilder();
67 * Set grouping builder.
70 * GroupingBuilder object
72 void setGrouping(GroupingBuilder grouping);
75 * Get information if this uses node is defined in augment.
77 * @return true, if this node is defined under augment statement, false
80 boolean isAugmenting();
83 * Set information if this uses node is defined in augment.
87 void setAugmenting(boolean augmenting);
90 * Get augmentations defined in this uses node.
92 * @return set of augmentations defined in this node
94 Set<AugmentationSchemaBuilder> getAugmentations();
97 * Add augment builder.
100 * new builder of augment statement
102 void addAugment(AugmentationSchemaBuilder builder);
105 * Get refine statements.
107 * @return list of RefineHolder objects
109 List<RefineHolder> getRefines();
114 * @return List of refined SchemaNodeBuilder objects
116 List<SchemaNodeBuilder> getRefineNodes();
119 * Add refine statement.
122 * new RefineHolder object
124 void addRefine(RefineHolder refine);
130 * refined DataSchemaNodeBuilder object
132 void addRefineNode(DataSchemaNodeBuilder refineNode);
135 * Build new UsesNode object.
139 boolean isResolved();
141 void setResolved(boolean resolved);