Remove IetfYangSmiv2Namespace
[yangtools.git] / yang / rfc6643-parser-support / src / main / java / org / opendaylight / yangtools / rfc6643 / parser / MaxAccessStatementSupport.java
1 /*
2  * Copyright (c) 2016, 2020 PANTHEON.tech, 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.rfc6643.parser;
9
10 import com.google.common.annotations.Beta;
11 import org.opendaylight.yangtools.rfc6643.model.api.IetfYangSmiv2ExtensionsMapping;
12 import org.opendaylight.yangtools.rfc6643.model.api.MaxAccessEffectiveStatement;
13 import org.opendaylight.yangtools.rfc6643.model.api.MaxAccessStatement;
14 import org.opendaylight.yangtools.yang.parser.spi.meta.AbstractStatementSupport;
15 import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
16 import org.opendaylight.yangtools.yang.parser.spi.meta.SubstatementValidator;
17
18 @Beta
19 public final class MaxAccessStatementSupport
20         extends AbstractStatementSupport<String, MaxAccessStatement, MaxAccessEffectiveStatement> {
21     private static final SubstatementValidator SUBSTATEMENT_VALIDATOR =
22             SubstatementValidator.builder(IetfYangSmiv2ExtensionsMapping.MAX_ACCESS).build();
23     private static final MaxAccessStatementSupport INSTANCE = new MaxAccessStatementSupport();
24
25     private MaxAccessStatementSupport() {
26         super(IetfYangSmiv2ExtensionsMapping.MAX_ACCESS);
27     }
28
29     public static MaxAccessStatementSupport getInstance() {
30         return INSTANCE;
31     }
32
33     @Override
34     public String parseArgumentValue(final StmtContext<?, ?, ?> ctx, final String value) {
35         return value;
36     }
37
38     @Override
39     protected SubstatementValidator getSubstatementValidator() {
40         return SUBSTATEMENT_VALIDATOR;
41     }
42
43     @Override
44     public MaxAccessStatement createDeclared(final StmtContext<String, MaxAccessStatement, ?> ctx) {
45         return new MaxAccessStatementImpl(ctx);
46     }
47
48     @Override
49     public MaxAccessEffectiveStatement createEffective(
50             final StmtContext<String, MaxAccessStatement, MaxAccessEffectiveStatement> ctx) {
51         return new MaxAccessEffectiveStatementImpl(ctx);
52     }
53 }