Added getParent() method to DataSchemaNode and DataNodeContainer. Fixed Bugs.
[yangtools.git] / yang / yang-model-api / src / main / java / org / opendaylight / yangtools / yang / model / api / DataSchemaNode.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 /**
11  *
12  * Contains the method which are used for getting metadata from the schema nodes
13  * which contains data.
14  *
15  */
16 public interface DataSchemaNode extends SchemaNode, YangNode {
17
18     YangNode getParent();
19
20     /**
21      * Returns <code>true</code> if the data node was added by augmentation,
22      * otherwise returns <code>false</code>
23      *
24      * @return <code>true</code> if the data node was added by augmentation,
25      *         otherwise returns <code>false</code>
26      */
27     boolean isAugmenting();
28
29     /**
30      * Returns <code>true</code> if the data node was added by uses statement,
31      * otherwise returns <code>false</code>
32      *
33      * @return <code>true</code> if the data node was added by uses statement,
34      *         otherwise returns <code>false</code>
35      */
36     boolean isAddedByUses();
37
38     /**
39      * Returns <code>true</code> if the data represents configuration data,
40      * otherwise returns <code>false</code>
41      *
42      * @return <code>true</code> if the data represents configuration data,
43      *         otherwise returns <code>false</code>
44      */
45     boolean isConfiguration();
46
47     /**
48      * Returns the constraints associated with Data Schema Node
49      *
50      * @return the constraints associated with Data Schema Node
51      */
52     ConstraintDefinition getConstraints();
53 }