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.model.api.RevisionAwareXPath;
11 import org.opendaylight.yangtools.yang.model.api.Rfc6020Mapping;
12 import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement;
13 import org.opendaylight.yangtools.yang.model.api.stmt.DescriptionStatement;
14 import org.opendaylight.yangtools.yang.model.api.stmt.ErrorAppTagStatement;
15 import org.opendaylight.yangtools.yang.model.api.stmt.ErrorMessageStatement;
16 import org.opendaylight.yangtools.yang.model.api.stmt.MustStatement;
17 import org.opendaylight.yangtools.yang.model.api.stmt.PathStatement;
18 import org.opendaylight.yangtools.yang.model.api.stmt.ReferenceStatement;
19 import org.opendaylight.yangtools.yang.model.util.RevisionAwareXPathImpl;
20 import org.opendaylight.yangtools.yang.parser.spi.meta.AbstractDeclaredStatement;
21 import org.opendaylight.yangtools.yang.parser.spi.meta.AbstractStatementSupport;
22 import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
23 import org.opendaylight.yangtools.yang.parser.spi.source.SourceException;
24 import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective.MustEffectiveStatementImpl;
25 import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective.PathEffectiveStatementImpl;
26 import sun.reflect.generics.reflectiveObjects.NotImplementedException;
28 import javax.annotation.Nonnull;
29 import javax.annotation.Nullable;
31 public class PathStatementImpl extends AbstractDeclaredStatement<RevisionAwareXPath> implements
34 protected PathStatementImpl(StmtContext<RevisionAwareXPath, PathStatement, ?> context) {
38 public static class Definition extends AbstractStatementSupport<RevisionAwareXPath,PathStatement,EffectiveStatement<RevisionAwareXPath,PathStatement>> {
41 super(Rfc6020Mapping.PATH);
44 @Override public RevisionAwareXPath parseArgumentValue(
45 StmtContext<?, ?, ?> ctx, String value) throws SourceException {
46 return new RevisionAwareXPathImpl(value, Utils.isXPathAbsolute(value));
49 @Override public PathStatement createDeclared(
50 StmtContext<RevisionAwareXPath, PathStatement, ?> ctx) {
51 return new PathStatementImpl(ctx);
54 @Override public EffectiveStatement<RevisionAwareXPath, PathStatement> createEffective(
55 StmtContext<RevisionAwareXPath, PathStatement, EffectiveStatement<RevisionAwareXPath, PathStatement>> ctx) {
56 return new PathEffectiveStatementImpl(ctx);
62 public String getValue() {