/* * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ package org.opendaylight.yangtools.yang.parser.rfc7950.stmt.module; import org.opendaylight.yangtools.openconfig.model.api.OpenConfigStatements; import org.opendaylight.yangtools.yang.model.api.YangStmtMapping; import org.opendaylight.yangtools.yang.parser.spi.meta.SubstatementValidator; public final class ModuleStatementRFC6020Support extends AbstractModuleStatementSupport { private static final SubstatementValidator SUBSTATEMENT_VALIDATOR = SubstatementValidator.builder(YangStmtMapping .MODULE) .addAny(YangStmtMapping.ANYXML) .addAny(YangStmtMapping.AUGMENT) .addAny(YangStmtMapping.CHOICE) .addOptional(YangStmtMapping.CONTACT) .addAny(YangStmtMapping.CONTAINER) .addOptional(YangStmtMapping.DESCRIPTION) .addAny(YangStmtMapping.DEVIATION) .addAny(YangStmtMapping.EXTENSION) .addAny(YangStmtMapping.FEATURE) .addAny(YangStmtMapping.GROUPING) .addAny(YangStmtMapping.IDENTITY) .addAny(YangStmtMapping.IMPORT) .addAny(YangStmtMapping.INCLUDE) .addAny(YangStmtMapping.LEAF) .addAny(YangStmtMapping.LEAF_LIST) .addAny(YangStmtMapping.LIST) .addMandatory(YangStmtMapping.NAMESPACE) .addAny(YangStmtMapping.NOTIFICATION) .addOptional(YangStmtMapping.ORGANIZATION) .addMandatory(YangStmtMapping.PREFIX) .addOptional(YangStmtMapping.REFERENCE) .addAny(YangStmtMapping.REVISION) .addAny(YangStmtMapping.RPC) .addAny(YangStmtMapping.TYPEDEF) .addAny(YangStmtMapping.USES) .addOptional(YangStmtMapping.YANG_VERSION) .addOptional(OpenConfigStatements.OPENCONFIG_VERSION) .build(); private static final ModuleStatementRFC6020Support INSTANCE = new ModuleStatementRFC6020Support(); private ModuleStatementRFC6020Support() { // Hidden } public static ModuleStatementRFC6020Support getInstance() { return INSTANCE; } @Override protected SubstatementValidator getSubstatementValidator() { return SUBSTATEMENT_VALIDATOR; } }