Add UnknownSchemaNodeMixin
[yangtools.git] / yang / yang-model-api / src / main / java / org / opendaylight / yangtools / yang / model / api / UnknownSchemaNode.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 org.opendaylight.yangtools.yang.common.QName;
11
12 /**
13  * Contains the methods for getting the details about the unknown node.
14  */
15 public interface UnknownSchemaNode extends SchemaNode, AddedByUsesAware {
16     /**
17      * Returns QName instance with the name of the unknown node.
18      *
19      * @return QName with name the name of the unknown node.
20      */
21     QName getNodeType();
22
23     /**
24      * Returns name of the unknown node.
25      *
26      * @return string with the name of unknown node.
27      */
28     String getNodeParameter();
29
30     /**
31      * Describes whether the node was added through <code>augment</code> YANG
32      * statement.
33      *
34      * @return boolean value which is <code>true</code> if the node is added by
35      *         <code>augment</code> YANG statement
36      *
37      * @deprecated This method exposes mechanism of how this node was instantiated. This runs contrary to the idea
38      *             that a SchemaNode is part of the effective model of the world. Examining a node's DeclaredStatement
39      *             world should be sufficient to ascertain its origin.
40      */
41     @Deprecated
42     // FIXME: 6.0.0: rename this to isAugmenting(), unifying this interface with CopyableNode
43     boolean isAddedByAugmentation();
44
45     /**
46      * Get extension definition which identifies this node.
47      *
48      * @return extension definition if exists, null otherwise
49      */
50     ExtensionDefinition getExtensionDefinition();
51 }