2 * Copyright (c) 2015 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.stmt.rfc6020;
10 import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective.RangeEffectiveStatementImpl;
12 import org.opendaylight.yangtools.yang.model.api.stmt.DescriptionStatement;
13 import org.opendaylight.yangtools.yang.model.api.stmt.ErrorAppTagStatement;
14 import org.opendaylight.yangtools.yang.model.api.stmt.ErrorMessageStatement;
15 import org.opendaylight.yangtools.yang.model.api.stmt.ReferenceStatement;
16 import org.opendaylight.yangtools.yang.model.api.Rfc6020Mapping;
17 import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement;
18 import org.opendaylight.yangtools.yang.model.api.stmt.RangeStatement;
19 import org.opendaylight.yangtools.yang.parser.spi.meta.AbstractDeclaredStatement;
20 import org.opendaylight.yangtools.yang.parser.spi.meta.AbstractStatementSupport;
21 import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
23 public class RangeStatementImpl extends AbstractDeclaredStatement<String>
24 implements RangeStatement {
26 protected RangeStatementImpl(
27 StmtContext<String, RangeStatement, ?> context) {
31 public static class Definition
33 AbstractStatementSupport<String, RangeStatement, EffectiveStatement<String, RangeStatement>> {
36 super(Rfc6020Mapping.RANGE);
40 public String parseArgumentValue(StmtContext<?, ?, ?> ctx, String value) {
45 public RangeStatement createDeclared(
46 StmtContext<String, RangeStatement, ?> ctx) {
47 return new RangeStatementImpl(ctx);
51 public EffectiveStatement<String, RangeStatement> createEffective(
52 StmtContext<String, RangeStatement, EffectiveStatement<String, RangeStatement>> ctx) {
53 return new RangeEffectiveStatementImpl(ctx);
59 public ErrorAppTagStatement getErrorAppTagStatement() {
60 return firstDeclared(ErrorAppTagStatement.class);
64 public ErrorMessageStatement getErrorMessageStatement() {
65 return firstDeclared(ErrorMessageStatement.class);
69 public DescriptionStatement getDescription() {
70 return firstDeclared(DescriptionStatement.class);
74 public ReferenceStatement getReference() {
75 return firstDeclared(ReferenceStatement.class);
79 public String getRange() {