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.leaf_list;
10 import org.opendaylight.yangtools.yang.model.api.YangStmtMapping;
11 import org.opendaylight.yangtools.yang.parser.spi.meta.SubstatementValidator;
14 * Class providing necessary support for processing YANG 1.1 leaf-list statement.
16 public final class LeafListStatementRFC7950Support extends AbstractLeafListStatementSupport {
17 private static final SubstatementValidator SUBSTATEMENT_VALIDATOR = SubstatementValidator.builder(YangStmtMapping
19 .addOptional(YangStmtMapping.CONFIG)
20 .addAny(YangStmtMapping.DEFAULT)
21 .addOptional(YangStmtMapping.DESCRIPTION)
22 .addAny(YangStmtMapping.IF_FEATURE)
23 .addOptional(YangStmtMapping.MIN_ELEMENTS)
24 .addOptional(YangStmtMapping.MAX_ELEMENTS)
25 .addAny(YangStmtMapping.MUST)
26 .addOptional(YangStmtMapping.ORDERED_BY)
27 .addOptional(YangStmtMapping.REFERENCE)
28 .addOptional(YangStmtMapping.STATUS)
29 .addMandatory(YangStmtMapping.TYPE)
30 .addOptional(YangStmtMapping.UNITS)
31 .addOptional(YangStmtMapping.WHEN)
35 protected SubstatementValidator getSubstatementValidator() {
36 return SUBSTATEMENT_VALIDATOR;