2 * Copyright (c) 2013 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.model.api;
10 import com.google.common.annotations.Beta;
11 import org.eclipse.jdt.annotation.NonNull;
12 import org.opendaylight.yangtools.yang.xpath.api.YangXPathExpression;
13 import org.opendaylight.yangtools.yang.xpath.api.YangXPathExpression.QualifiedBound;
16 * Contains methods for getting data (concrete XPath) and metadata (is XPath absolute) from XPath instance.
18 // FIXME: 5.0.0: find a better name for this interface
19 public interface RevisionAwareXPath {
21 * Returns <code>true</code> if the XPapth starts in root of Yang model, otherwise returns <code>false</code>.
23 * @return <code>true</code> if the XPapth starts in root of Yang model, otherwise returns <code>false</code>
28 * Returns the XPath formatted string as is defined in model. For example:
29 * /prefix:container/prefix:container::cond[when()=foo]/prefix:leaf
31 * @return the XPath formatted string as is defined in model.
33 @NonNull String getOriginalString();
36 // FIXME: 5.0.0: integrate this interface into RevisionAwareXPath
37 interface WithExpression extends RevisionAwareXPath {
39 * Return the {@link YangXPathExpression} of this XPath. The expression is required to be at least
42 * @return The location path
44 @NonNull QualifiedBound getXPathExpression();