Populate xpath/ hierarchy
[yangtools.git] / yang / yang-parser-rfc7950 / src / main / java / org / opendaylight / yangtools / yang / parser / rfc7950 / stmt / notification / NotificationStatementRFC6020Support.java
1 /*
2  * Copyright (c) 2017 Pantheon Technologies, s.r.o. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.yangtools.yang.parser.rfc7950.stmt.notification;
9
10 import org.opendaylight.yangtools.yang.model.api.YangStmtMapping;
11 import org.opendaylight.yangtools.yang.parser.api.YangParserConfiguration;
12 import org.opendaylight.yangtools.yang.parser.spi.meta.SubstatementValidator;
13
14 public final class NotificationStatementRFC6020Support extends AbstractNotificationStatementSupport {
15     private static final SubstatementValidator SUBSTATEMENT_VALIDATOR =
16         SubstatementValidator.builder(YangStmtMapping.NOTIFICATION)
17             .addAny(YangStmtMapping.ANYXML)
18             .addAny(YangStmtMapping.CHOICE)
19             .addAny(YangStmtMapping.CONTAINER)
20             .addOptional(YangStmtMapping.DESCRIPTION)
21             .addAny(YangStmtMapping.GROUPING)
22             .addAny(YangStmtMapping.IF_FEATURE)
23             .addAny(YangStmtMapping.LEAF)
24             .addAny(YangStmtMapping.LEAF_LIST)
25             .addAny(YangStmtMapping.LIST)
26             .addOptional(YangStmtMapping.REFERENCE)
27             .addOptional(YangStmtMapping.STATUS)
28             .addAny(YangStmtMapping.TYPEDEF)
29             .addAny(YangStmtMapping.USES)
30             .build();
31
32     public NotificationStatementRFC6020Support(final YangParserConfiguration config) {
33         super(config, SUBSTATEMENT_VALIDATOR);
34     }
35 }