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);
75 boolean isAugmenting();
77 void setAugmenting(boolean augmenting);
79 AugmentationSchemaBuilder getParentAugment();
81 void setParentAugment(AugmentationSchemaBuilder augment);
84 * Get augmentations defined in this uses node.
86 * @return set of augmentations defined in this node
88 Set<AugmentationSchemaBuilder> getAugmentations();
91 * Add augment builder.
94 * new builder of augment statement
96 void addAugment(AugmentationSchemaBuilder builder);
99 * Get refine statements.
101 * @return list of RefineHolder objects
103 List<RefineHolder> getRefines();
108 * @return List of refined SchemaNodeBuilder objects
110 List<SchemaNodeBuilder> getRefineNodes();
113 * Add refine statement.
116 * new RefineHolder object
118 void addRefine(RefineHolder refine);
124 * refined DataSchemaNodeBuilder object
126 void addRefineNode(DataSchemaNodeBuilder refineNode);
129 * Build new UsesNode object.
134 * Get child nodes defined in target grouping.
136 * @return set of DataSchemaNodeBuilder objects
138 Set<DataSchemaNodeBuilder> getTargetChildren();
141 * Get groupings defined in target grouping.
143 * @return set of GroupingBuilder objects
145 Set<GroupingBuilder> getTargetGroupings();
148 * Get type definitions defined in target grouping.
150 * @return set of typedefs defined in target grouping
152 Set<TypeDefinitionBuilder> getTargetTypedefs();
155 * Get unknown nodes defined in target grouping.
157 * @return list of unknown nodes defined in target grouping
159 List<UnknownSchemaNodeBuilder> getTargetUnknownNodes();
163 * @return true, if this object was built based on another UsesNodeBuilder,
170 * @return true, if target grouping objects was loaded already, false
173 boolean isDataCollected();
176 * Set if target grouping objects was loaded already.
178 * @param dataCollected
180 void setDataCollected(boolean dataCollected);