/* * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ package org.opendaylight.yangtools.yang.parser.builder.api; import java.util.List; import java.util.Set; import org.opendaylight.yangtools.yang.model.api.GroupingDefinition; import org.opendaylight.yangtools.yang.model.api.SchemaPath; import org.opendaylight.yangtools.yang.model.api.UsesNode; import org.opendaylight.yangtools.yang.parser.builder.impl.UnknownSchemaNodeBuilder; import org.opendaylight.yangtools.yang.parser.util.RefineHolder; /** * Interface for builders of 'uses' statement. */ public interface UsesNodeBuilder extends GroupingMember, Builder { /** * Get parent of this uses node. Since uses can be defined only under on of * module, container, list, case, grouping, input, output, notification or * augment, return type is DataNodeContainerBuilder. */ DataNodeContainerBuilder getParent(); /** * Get grouping path as string. * * @return grouping path as String */ String getGroupingPathAsString(); /** * Get grouping path. * * @return grouping path as SchemaPath */ SchemaPath getGroupingPath(); /** * Get grouping definition. * * @return GroupingDefinition if present, null otherwise */ GroupingDefinition getGroupingDefinition(); /** * Set grouping definition. * * @param groupingDefinition * GroupingDefinition object */ void setGroupingDefinition(GroupingDefinition groupingDefinition); /** * Get grouping builder. * * @return GroupingBuilder if present, null otherwise */ GroupingBuilder getGroupingBuilder(); /** * Set grouping builder. * * @param grouping * GroupingBuilder object */ void setGrouping(GroupingBuilder grouping); /** * Get information if this uses node is defined in augment. * * @return true, if this node is defined under augment statement, false * otherwise */ boolean isAugmenting(); /** * Set information if this uses node is defined in augment. * * @param augmenting */ void setAugmenting(boolean augmenting); /** * Get augment under which was this uses node was defined. *
* Note: This method may return different object than {@link #getParent()} * if this node is a copy of other uses node. If the uses node is copied, * its parent has changed, but parent augment is always same. *
* * @return AugmentationSchemaBuilder under which was this node defined */ AugmentationSchemaBuilder getParentAugment(); /** * Set augment under which was this uses node was defined. * * @param augment */ void setParentAugment(AugmentationSchemaBuilder augment); /** * Get augmentations defined in this uses node. * * @return set of augmentations defined in this node */ Set