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 {
43 return Utils.qNameFromArgument(ctx, "input");
47 public InputStatement createDeclared(
48 StmtContext<QName, InputStatement, ?> ctx) {
49 return new InputStatementImpl(ctx);
53 public EffectiveStatement<QName, InputStatement> createEffective(
54 StmtContext<QName, InputStatement, EffectiveStatement<QName, InputStatement>> ctx) {
55 return new InputEffectiveStatementImpl(ctx);
61 public Collection<? extends TypedefStatement> getTypedefs() {
62 return allDeclared(TypedefStatement.class);
66 public Collection<? extends GroupingStatement> getGroupings() {
67 return allDeclared(GroupingStatement.class);
71 public Collection<? extends DataDefinitionStatement> getDataDefinitions() {
72 return allDeclared(DataDefinitionStatement.class);