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 {
21 * All implementations should override this method.
22 * The default definition of this method is used only in YANG 1.0 (RFC6020) implementations of
23 * ModuleImport which do not allow a description statement.
24 * YANG import statement has been changed in YANG 1.1 (RFC7950) and can now contain a description statement.
26 * @return string that represents the argument of description statement
28 // FIXME: version 2.0.0: make this method non-default
29 @Nullable default String getDescription() {
34 * All implementations should override this method.
35 * The default definition of this method is used only in YANG 1.0 (RFC6020) implementations of
36 * ModuleImport which do not allow a reference statement.
37 * YANG import statement has been changed in YANG 1.1 (RFC7950) and can now contain a reference statement.
39 * @return string that represents the argument of reference statement
41 // FIXME: version 2.0.0: make this method non-default
42 @Nullable default String getReference() {
47 * Returns unknown schema nodes which belongs to this instance.
49 * @return list of unknown schema nodes defined under this node.
51 default @Nonnull List<UnknownSchemaNode> getUnknownSchemaNodes() {
52 return ImmutableList.of();
55 interface WithStatus extends DocumentedNode {
58 * Returns status of the instance of the type <code>SchemaNode</code>
60 * @return status of this node which represents the argument of the YANG
61 * <code>status</code> substatement
63 @Nonnull Status getStatus();