}
@Rfc6020AbnfRule("numerical-restrictions")
+ // FIXME: 6.0.0: this interface does not have an implementation
interface NumericalRestrictions extends TypeStatement {
-
+ // FIXME: 6.0.0: this is not accurate, 'range' is an optional statement
default @NonNull RangeStatement getRange() {
return findFirstDeclaredSubstatement(RangeStatement.class).get();
}
}
@Rfc6020AbnfRule("string-restrictions")
+ // FIXME: 6.0.0: this interface does not have an implementation
interface StringRestrictions extends TypeStatement {
default @Nullable LengthStatement getLength() {
final Optional<LengthStatement> opt = findFirstDeclaredSubstatement(LengthStatement.class);
+++ /dev/null
-/*
- * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.yangtools.yang.parser.rfc7950.stmt.type;
-
-import org.opendaylight.yangtools.yang.model.api.stmt.TypeStatement.NumericalRestrictions;
-import org.opendaylight.yangtools.yang.parser.rfc7950.stmt.DeclaredEffectiveStatementBase;
-import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
-
-// FIXME: this class is not used anywhere, decide its future
-final class NumericalRestrictionsEffectiveStatement
- extends DeclaredEffectiveStatementBase<String, NumericalRestrictions> {
-
- NumericalRestrictionsEffectiveStatement(final StmtContext<String, NumericalRestrictions, ?> ctx) {
- super(ctx);
- }
-}
+++ /dev/null
-/*
- * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.yangtools.yang.parser.rfc7950.stmt.type;
-
-import org.opendaylight.yangtools.yang.model.api.stmt.TypeStatement.NumericalRestrictions;
-import org.opendaylight.yangtools.yang.parser.spi.meta.AbstractDeclaredStatement;
-import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
-
-// FIXME: this class is not used anywhere, decide its future
-final class NumericalRestrictionsImpl extends AbstractDeclaredStatement<String> implements NumericalRestrictions {
- NumericalRestrictionsImpl(final StmtContext<String, NumericalRestrictions, ?> context) {
- super(context);
- }
-}
+++ /dev/null
-/*
- * Copyright (c) 2017 Pantheon Technologies, s.r.o. and others. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.yangtools.yang.parser.rfc7950.stmt.type;
-
-import org.opendaylight.yangtools.yang.model.api.YangStmtMapping;
-import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement;
-import org.opendaylight.yangtools.yang.model.api.stmt.TypeStatement.NumericalRestrictions;
-import org.opendaylight.yangtools.yang.parser.spi.meta.AbstractStatementSupport;
-import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
-import org.opendaylight.yangtools.yang.parser.spi.meta.SubstatementValidator;
-
-// FIXME: this class is not used anywhere, decide its future
-final class NumericalRestrictionsSupport extends
- AbstractStatementSupport<String, NumericalRestrictions, EffectiveStatement<String, NumericalRestrictions>> {
- private static final SubstatementValidator SUBSTATEMENT_VALIDATOR = SubstatementValidator.builder(YangStmtMapping
- .TYPE)
- .addMandatory(YangStmtMapping.RANGE)
- .build();
-
- NumericalRestrictionsSupport() {
- super(YangStmtMapping.TYPE);
- }
-
- @Override
- public String parseArgumentValue(final StmtContext<?, ?, ?> ctx, final String value) {
- return value;
- }
-
- @Override
- public NumericalRestrictions createDeclared(final StmtContext<String, NumericalRestrictions, ?> ctx) {
- return new NumericalRestrictionsImpl(ctx);
- }
-
- @Override
- public EffectiveStatement<String, NumericalRestrictions> createEffective(
- final StmtContext<String, NumericalRestrictions,
- EffectiveStatement<String, NumericalRestrictions>> ctx) {
- return new NumericalRestrictionsEffectiveStatement(ctx);
- }
-
- @Override
- protected SubstatementValidator getSubstatementValidator() {
- return SUBSTATEMENT_VALIDATOR;
- }
-}
\ No newline at end of file
+++ /dev/null
-/*
- * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.yangtools.yang.parser.rfc7950.stmt.type;
-
-import org.opendaylight.yangtools.yang.model.api.stmt.TypeStatement.StringRestrictions;
-import org.opendaylight.yangtools.yang.parser.rfc7950.stmt.DeclaredEffectiveStatementBase;
-import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
-
-// FIXME: this class is not used anywhere, decide its future
-final class StringRestrictionsEffectiveStatement
- extends DeclaredEffectiveStatementBase<String, StringRestrictions> {
- StringRestrictionsEffectiveStatement(final StmtContext<String, StringRestrictions, ?> ctx) {
- super(ctx);
- }
-}
+++ /dev/null
-/*
- * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.yangtools.yang.parser.rfc7950.stmt.type;
-
-import org.opendaylight.yangtools.yang.model.api.stmt.TypeStatement;
-import org.opendaylight.yangtools.yang.parser.spi.meta.AbstractDeclaredStatement;
-import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
-
-// FIXME: this class is not used anywhere, decide its future
-final class StringRestrictionsImpl extends AbstractDeclaredStatement<String> implements
- TypeStatement.StringRestrictions {
- StringRestrictionsImpl(final StmtContext<String, StringRestrictions, ?> context) {
- super(context);
- }
-}
+++ /dev/null
-/*
- * Copyright (c) 2017 Pantheon Technologies, s.r.o. and others. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.yangtools.yang.parser.rfc7950.stmt.type;
-
-import org.opendaylight.yangtools.yang.model.api.YangStmtMapping;
-import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement;
-import org.opendaylight.yangtools.yang.model.api.stmt.TypeStatement.StringRestrictions;
-import org.opendaylight.yangtools.yang.parser.spi.meta.AbstractStatementSupport;
-import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
-import org.opendaylight.yangtools.yang.parser.spi.meta.SubstatementValidator;
-
-//FIXME: this class is not used anywhere, decide its future
-final class StringRestrictionsSupport
- extends AbstractStatementSupport<String, StringRestrictions, EffectiveStatement<String, StringRestrictions>> {
- private static final SubstatementValidator SUBSTATEMENT_VALIDATOR = SubstatementValidator.builder(YangStmtMapping
- .TYPE)
- .addOptional(YangStmtMapping.LENGTH)
- .addAny(YangStmtMapping.PATTERN)
- .build();
-
- StringRestrictionsSupport() {
- super(YangStmtMapping.TYPE);
- }
-
- @Override
- public String parseArgumentValue(final StmtContext<?, ?, ?> ctx, final String value) {
- return value;
- }
-
- @Override
- public StringRestrictions createDeclared(final StmtContext<String, StringRestrictions, ?> ctx) {
- return new StringRestrictionsImpl(ctx);
- }
-
- @Override
- public EffectiveStatement<String, StringRestrictions> createEffective(
- final StmtContext<String, StringRestrictions, EffectiveStatement<String, StringRestrictions>> ctx) {
- return new StringRestrictionsEffectiveStatement(ctx);
- }
-
- @Override
- protected SubstatementValidator getSubstatementValidator() {
- return SUBSTATEMENT_VALIDATOR;
- }
-}
\ No newline at end of file