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;
17 * Node which can have documentation assigned.
20 public interface DocumentedNode {
23 * All implementations should override this method.
24 * The default definition of this method is used only in YANG 1.0 (RFC6020) implementations of
25 * ModuleImport which do not allow a description statement.
26 * YANG import statement has been changed in YANG 1.1 (RFC7950) and can now contain a description statement.
28 * @return string that represents the argument of description statement
30 // FIXME: version 2.0.0: make this method non-default
31 @Nullable default String getDescription() {
36 * All implementations should override this method.
37 * The default definition of this method is used only in YANG 1.0 (RFC6020) implementations of
38 * ModuleImport which do not allow a reference statement.
39 * YANG import statement has been changed in YANG 1.1 (RFC7950) and can now contain a reference statement.
41 * @return string that represents the argument of reference statement
43 // FIXME: version 2.0.0: make this method non-default
44 @Nullable default String getReference() {
49 * Returns unknown schema nodes which belongs to this instance.
51 * @return list of unknown schema nodes defined under this node.
53 default @Nonnull List<UnknownSchemaNode> getUnknownSchemaNodes() {
54 return ImmutableList.of();
57 interface WithStatus extends DocumentedNode {
60 * Returns status of the instance of the type <code>SchemaNode</code>
62 * @return status of this node which represents the argument of the YANG
63 * <code>status</code> substatement
65 @Nonnull Status getStatus();