2 * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
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
8 package org.opendaylight.yangtools.yang.model.api;
10 import com.google.common.collect.ImmutableList;
11 import java.util.List;
12 import javax.annotation.Nonnull;
13 import javax.annotation.Nullable;
16 * Node which can have documentation assigned.
18 public interface DocumentedNode {
20 * All implementations should override this method.
21 * The default definition of this method is used only in YANG 1.0 (RFC6020) implementations of
22 * ModuleImport which do not allow a description statement.
23 * YANG import statement has been changed in YANG 1.1 (RFC7950) and can now contain a description statement.
25 * @return string that represents the argument of description statement
27 // FIXME: version 2.0.0: make this method non-default
28 @Nullable default String getDescription() {
33 * All implementations should override this method.
34 * The default definition of this method is used only in YANG 1.0 (RFC6020) implementations of
35 * ModuleImport which do not allow a reference statement.
36 * YANG import statement has been changed in YANG 1.1 (RFC7950) and can now contain a reference statement.
38 * @return string that represents the argument of reference statement
40 // FIXME: version 2.0.0: make this method non-default
41 @Nullable default String getReference() {
46 * Returns unknown schema nodes which belongs to this instance.
48 * @return list of unknown schema nodes defined under this node.
50 default @Nonnull List<UnknownSchemaNode> getUnknownSchemaNodes() {
51 return ImmutableList.of();
54 interface WithStatus extends DocumentedNode {
56 * Returns status of the instance of the type <code>SchemaNode</code>.
58 * @return status of this node which represents the argument of the YANG
59 * <code>status</code> substatement
61 @Nonnull Status getStatus();