Bug 6874: [YANG 1.1] Allow "description" and "reference" in "import" and "include"
[yangtools.git] / yang / yang-model-api / src / main / java / org / opendaylight / yangtools / yang / model / api / stmt / DocumentationGroup.java
1 /*
2  * Copyright (c) 2015 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.stmt;
9
10 import javax.annotation.Nullable;
11
12 public interface DocumentationGroup {
13
14     /**
15      * All implementations should override this method.
16      * The default definition of this method is used only in YANG 1.0 (RFC6020) implementations of
17      * ImportStatement and IncludeStatement which do not allow a description statement.
18      * These YANG statements have been changed in YANG 1.1 (RFC7950) and can now contain a description statement.
19      *
20      * @return description statement
21      */
22     // FIXME: version 2.0.0: make this method non-default
23     @Nullable default DescriptionStatement getDescription() {
24         return null;
25     }
26
27     /**
28      * All implementations should override this method.
29      * The default definition of this method is used only in YANG 1.0 (RFC6020) implementations of
30      * ImportStatement and IncludeStatement which do not allow a reference statement.
31      * These YANG statements have been changed in YANG 1.1 (RFC7950) and can now contain a reference statement.
32      *
33      * @return reference statement
34      */
35     // FIXME: version 2.0.0: make this method non-default
36     @Nullable default ReferenceStatement getReference() {
37         return null;
38     }
39
40     interface WithStatus extends DocumentationGroup {
41
42         @Nullable StatusStatement getStatus();
43     }
44 }