2 * Copyright (c) 2016 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.parser.rfc7950.stmt.submodule;
10 import com.google.common.annotations.Beta;
11 import org.opendaylight.yangtools.yang.model.api.YangStmtMapping;
12 import org.opendaylight.yangtools.yang.parser.spi.meta.SubstatementValidator;
15 * Class providing necessary support for processing YANG 1.1 Submodule statement.
18 public final class SubmoduleStatementRFC7950Support extends AbstractSubmoduleStatementSupport {
19 private static final SubstatementValidator SUBSTATEMENT_VALIDATOR = SubstatementValidator.builder(YangStmtMapping
21 .addAny(YangStmtMapping.ANYDATA)
22 .addAny(YangStmtMapping.ANYXML)
23 .addAny(YangStmtMapping.AUGMENT)
24 .addMandatory(YangStmtMapping.BELONGS_TO)
25 .addAny(YangStmtMapping.CHOICE)
26 .addOptional(YangStmtMapping.CONTACT)
27 .addAny(YangStmtMapping.CONTAINER)
28 .addOptional(YangStmtMapping.DESCRIPTION)
29 .addAny(YangStmtMapping.DEVIATION)
30 .addAny(YangStmtMapping.EXTENSION)
31 .addAny(YangStmtMapping.FEATURE)
32 .addAny(YangStmtMapping.GROUPING)
33 .addAny(YangStmtMapping.IDENTITY)
34 .addAny(YangStmtMapping.IMPORT)
35 .addAny(YangStmtMapping.INCLUDE)
36 .addAny(YangStmtMapping.LEAF)
37 .addAny(YangStmtMapping.LEAF_LIST)
38 .addAny(YangStmtMapping.LIST)
39 .addAny(YangStmtMapping.NOTIFICATION)
40 .addOptional(YangStmtMapping.ORGANIZATION)
41 .addOptional(YangStmtMapping.REFERENCE)
42 .addAny(YangStmtMapping.REVISION)
43 .addAny(YangStmtMapping.RPC)
44 .addAny(YangStmtMapping.TYPEDEF)
45 .addAny(YangStmtMapping.USES)
46 .addOptional(YangStmtMapping.YANG_VERSION)
48 private static final SubmoduleStatementRFC7950Support INSTANCE = new SubmoduleStatementRFC7950Support();
50 private SubmoduleStatementRFC7950Support() {
54 public static SubmoduleStatementRFC7950Support getInstance() {
59 protected SubstatementValidator getSubstatementValidator() {
60 return SUBSTATEMENT_VALIDATOR;