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.InputEffectiveStatementImpl;
12 import org.opendaylight.yangtools.yang.common.QName;
13 import org.opendaylight.yangtools.yang.parser.spi.source.SourceException;
14 import java.util.Collection;
15 import org.opendaylight.yangtools.yang.model.api.stmt.DataDefinitionStatement;
16 import org.opendaylight.yangtools.yang.model.api.stmt.GroupingStatement;
17 import org.opendaylight.yangtools.yang.model.api.stmt.TypedefStatement;
18 import org.opendaylight.yangtools.yang.model.api.stmt.InputStatement;
19 import org.opendaylight.yangtools.yang.model.api.Rfc6020Mapping;
20 import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement;
21 import org.opendaylight.yangtools.yang.parser.spi.meta.AbstractDeclaredStatement;
22 import org.opendaylight.yangtools.yang.parser.spi.meta.AbstractStatementSupport;
23 import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
25 public class InputStatementImpl extends AbstractDeclaredStatement<QName>
26 implements InputStatement {
28 protected InputStatementImpl(StmtContext<QName, InputStatement, ?> context) {
32 public static class Definition
34 AbstractStatementSupport<QName, InputStatement, EffectiveStatement<QName, InputStatement>> {
37 super(Rfc6020Mapping.INPUT);
41 public QName parseArgumentValue(StmtContext<?, ?, ?> ctx, String value)
42 throws SourceException {
44 return Utils.qNameFromArgument(ctx, value);
48 public InputStatement createDeclared(
49 StmtContext<QName, InputStatement, ?> ctx) {
50 return new InputStatementImpl(ctx);
54 public EffectiveStatement<QName, InputStatement> createEffective(
55 StmtContext<QName, InputStatement, EffectiveStatement<QName, InputStatement>> ctx) {
56 return new InputEffectiveStatementImpl(ctx);
62 public Collection<? extends TypedefStatement> getTypedefs() {
63 return allDeclared(TypedefStatement.class);
67 public Collection<? extends GroupingStatement> getGroupings() {
68 return allDeclared(GroupingStatement.class);
72 public Collection<? extends DataDefinitionStatement> getDataDefinitions() {
73 return allDeclared(DataDefinitionStatement.class);