Added getParent() method to DataSchemaNode and DataNodeContainer. Fixed Bugs.
[yangtools.git] / yang / yang-model-api / src / main / java / org / opendaylight / yangtools / yang / model / api / UsesNode.java
1 /*
2  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.yangtools.yang.model.api;
9
10 import java.util.Map;
11 import java.util.Set;
12
13 /**
14  * Contains the methods for getting data and checking properties of the YANG
15  * <code>uses</code> substatement.
16  *
17  */
18 public interface UsesNode extends YangNode {
19
20     YangNode getParent();
21
22     /**
23      * Returns the schema path to used grouping.
24      *
25      * @return schema path to 'grouping' on which this 'uses' statement points
26      */
27     SchemaPath getGroupingPath();
28
29     /**
30      *
31      * Returns agumentations which were specified in this uses node.
32      *
33      * @return Set of augment statements defined under this uses node
34      */
35     Set<AugmentationSchema> getAugmentations();
36
37     /**
38      * Returns <code>true</code> if the data node was added by augmentation,
39      * otherwise returns <code>false</code>
40      *
41      * @return <code>true</code> if the data node was added by augmentation,
42      *         otherwise returns <code>false</code>
43      */
44     boolean isAugmenting();
45
46     /**
47      * Returns <code>true</code> if the data node was added by uses statement,
48      * otherwise returns <code>false</code>
49      *
50      * @return <code>true</code> if the data node was added by uses statement,
51      *         otherwise returns <code>false</code>
52      */
53     boolean isAddedByUses();
54
55     /**
56      * Some of the properties of each node in the grouping can be refined with
57      * the "refine" statement.
58      *
59      * @return Map, where key is schema path of refined node and value is
60      *         refined node
61      */
62     Map<SchemaPath, SchemaNode> getRefines();
63 }