876645f9654b872044f17467430e41fb483bb5c1
[yangtools.git] / yang / yang-model-api / src / main / java / org / opendaylight / yangtools / yang / model / api / DocumentedNode.java
1 /*
2  * Copyright (c) 2014 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 com.google.common.collect.ImmutableList;
11 import java.util.List;
12 import javax.annotation.Nonnull;
13 import javax.annotation.Nullable;
14
15 /**
16  *
17  * Node which can have documentation assigned.
18  *
19  */
20 public interface DocumentedNode {
21
22     /**
23      * Returns description of the instance of the type <code>SchemaNode</code>
24      *
25      * @return string with textual description the node which represents the
26      *         argument of the YANG <code>description</code> substatement
27      */
28     @Nullable String getDescription();
29
30     /**
31      * Returns reference of the instance of the type <code>SchemaNode</code>
32      *
33      * The reference refers to external document that provides additional
34      * information relevant for the instance of this type.
35      *
36      * @return string with the reference to some external document which
37      *         represents the argument of the YANG <code>reference</code>
38      *         substatement
39      */
40     @Nullable String getReference();
41
42     /**
43      * Returns status of the instance of the type <code>SchemaNode</code>
44      *
45      * @return status of this node which represents the argument of the YANG
46      *         <code>status</code> substatement
47      */
48     @Nonnull Status getStatus();
49
50     /**
51      * Returns unknown schema nodes which belongs to this instance.
52      *
53      * @return list of unknown schema nodes defined under this node.
54      */
55     default @Nonnull List<UnknownSchemaNode> getUnknownSchemaNodes() {
56         return ImmutableList.of();
57     }
58 }