Populate model/ hierarchy
[yangtools.git] / model / yang-model-api / src / main / java / org / opendaylight / yangtools / yang / model / api / ExtensionDefinition.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.model.api.stmt.ExtensionEffectiveStatement;
11
12 /**
13  * Contains the methods for getting the data which are part of the YANG {@code extensoion} statement.
14  */
15 public interface ExtensionDefinition extends SchemaNode, EffectiveStatementEquivalent<ExtensionEffectiveStatement> {
16     /**
17      * Returns the <code>String</code> that is the name of argument to the
18      * Keyword. If no argument statement is present the method will return
19      * <code>null</code> <br>
20      * The argument statement is defined in <a
21      * href="https://tools.ietf.org/html/rfc6020#section-7.17.2">[RFC-6020] The
22      * argument Statement</a>
23      *
24      * @return the <code>String</code> that is the name of argument to the
25      *         Keyword. If no argument statement is present the method will
26      *         return <code>null</code>
27      */
28     String getArgument();
29
30     /**
31      * This statement indicates if the argument is mapped to an XML element in
32      * YIN or to an XML attribute.<br>
33      * By contract if implementation of ExtensionDefinition does not specify the
34      * yin-element statement the return value is by default set to
35      * <code>false</code>
36      *
37      * <p>
38      * For more specific definition please look into <a
39      * href="https://tools.ietf.org/html/rfc6020#section-7.17.2.2">[RFC-6020]
40      * The yin-element Statement</a>
41      *
42      * @return <code>true</code> if the argument is mapped to an XML element in
43      *         YIN or returns <code>false</code> if the argument is mapped to an
44      *         XML attribute.
45      */
46     boolean isYinElement();
47 }