<artifactId>yang-data-api</artifactId>
<version>3.0.0-SNAPSHOT</version>
</dependency>
+ <dependency>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>yang-data-xpath-api</artifactId>
+ <version>0.1.0-SNAPSHOT</version>
+ </dependency>
<dependency>
<groupId>org.opendaylight.yangtools</groupId>
<artifactId>yang-data-impl</artifactId>
<type>xml</type>
<classifier>features</classifier>
</dependency>
+ <dependency>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>odl-yangtools-exp-data-xpath-api</artifactId>
+ <version>0.1.0-SNAPSHOT</version>
+ <type>xml</type>
+ <classifier>features</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>odl-yangtools-exp-data-xpath</artifactId>
+ <version>0.1.0-SNAPSHOT</version>
+ <type>xml</type>
+ <classifier>features</classifier>
+ </dependency>
<!-- Experimental features -->
<classifier>features</classifier>
<type>xml</type>
</dependency>
+
+ <dependency>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>odl-yangtools-exp-data-xpath-api</artifactId>
+ <classifier>features</classifier>
+ <type>xml</type>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>odl-yangtools-exp-data-xpath</artifactId>
+ <classifier>features</classifier>
+ <type>xml</type>
+ </dependency>
</dependencies>
</project>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright © 2016 Red Hat, 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
+ -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.opendaylight.odlparent</groupId>
+ <artifactId>single-feature-parent</artifactId>
+ <version>4.0.9</version>
+ <relativePath/>
+ </parent>
+
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>odl-yangtools-exp-data-xpath-api</artifactId>
+ <version>0.1.0-SNAPSHOT</version>
+ <packaging>feature</packaging>
+ <name>OpenDaylight :: Yangtools :: Experimental :: Data XPath API</name>
+ <description>YANG-modeled data XPath APIs</description>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>yangtools-artifacts</artifactId>
+ <version>3.0.0-SNAPSHOT</version>
+ <scope>import</scope>
+ <type>pom</type>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>odl-yangtools-data-api</artifactId>
+ <type>xml</type>
+ <classifier>features</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>odl-yangtools-xpath-api</artifactId>
+ <type>xml</type>
+ <classifier>features</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>yang-data-xpath-api</artifactId>
+ </dependency>
+ </dependencies>
+</project>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright © 2016 Red Hat, 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
+ -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.opendaylight.odlparent</groupId>
+ <artifactId>single-feature-parent</artifactId>
+ <version>4.0.9</version>
+ <relativePath/>
+ </parent>
+
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>odl-yangtools-exp-data-xpath</artifactId>
+ <version>0.1.0-SNAPSHOT</version>
+ <packaging>feature</packaging>
+ <name>OpenDaylight :: Yangtools :: Experimental :: Data XPath support</name>
+ <description>XPath support for YANG-modeled data</description>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>yangtools-artifacts</artifactId>
+ <version>3.0.0-SNAPSHOT</version>
+ <scope>import</scope>
+ <type>pom</type>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>odl-yangtools-xpath</artifactId>
+ <type>xml</type>
+ <classifier>features</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>odl-yangtools-exp-data-xpath-api</artifactId>
+ <type>xml</type>
+ <classifier>features</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>yang-data-jaxen</artifactId>
+ </dependency>
+ </dependencies>
+</project>
<artifactId>odl-yangtools-xpath-api</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>feature</packaging>
- <name>OpenDaylight :: Yangtools :: Experimental :: XPath API</name>
+ <name>OpenDaylight :: Yangtools :: XPath API</name>
<dependencyManagement>
<dependencies>
<version>3.0.0-SNAPSHOT</version>
<packaging>feature</packaging>
<name>OpenDaylight :: Yangtools :: XPath support</name>
- <description>XPath support for YANG-modeled data</description>
+ <description>YANG XPath support</description>
<dependencyManagement>
<dependencies>
<type>xml</type>
<classifier>features</classifier>
</dependency>
- <dependency>
- <groupId>org.opendaylight.yangtools</groupId>
- <artifactId>odl-yangtools-data-api</artifactId>
- <type>xml</type>
- <classifier>features</classifier>
- </dependency>
<dependency>
<groupId>org.opendaylight.yangtools</groupId>
<artifactId>odl-yangtools-xpath-api</artifactId>
<groupId>org.opendaylight.yangtools</groupId>
<artifactId>yang-xpath-impl</artifactId>
</dependency>
- <dependency>
- <groupId>org.opendaylight.yangtools</groupId>
- <artifactId>yang-data-jaxen</artifactId>
- </dependency>
</dependencies>
</project>
<module>features-yangtools</module>
<!-- Experimental features -->
+ <module>odl-yangtools-exp-data-xpath-api</module>
+ <module>odl-yangtools-exp-data-xpath</module>
<!-- Experimental feature repostitory -->
<module>features-yangtools-experimental</module>
<modules>
<module>yang-common</module>
<module>yang-data-api</module>
+ <module>yang-data-xpath-api</module>
<module>yang-data-jaxen</module>
<module>yang-data-util</module>
<module>yang-data-impl</module>
* APPLICATIONS WILLING TO USE THIS API PLEASE CONTACT
* <a href="mailto:yangtools-dev@lists.opendaylight.org">yangtools-dev</a>.
*/
-@Beta
@Deprecated
+@Beta
public interface LazyXPathExpression {
/**
* Evaluate this expression at the specified path in a document. If evaluation succeeds, it will return an
* the expression.
*/
@Beta
+@Deprecated
public interface OptimizableXPathExpression extends XPathExpression {
/**
* Perform optimization of this expression. If an implementation supports different levels of optimization, it
* A set of utility functions for dealing with common types of namespace mappings.
*/
@Beta
+@Deprecated
public final class PrefixConverters {
private PrefixConverters() {
throw new UnsupportedOperationException();
* moved either up or down in a SchemaPath tree, usually closer to their {@link #getApexPath()}.
*/
@Beta
+@Deprecated
public interface RelocatableXPathExpression extends XPathExpression {
/**
* Return a new XPathExpression relocated to a SchemaPath of the implementation's choosing. Note that
* An {@link XPathResult} containing a Boolean.
*/
@Beta
+@Deprecated
public interface XPathBooleanResult extends XPathResult<Boolean> {
}
* The notion of a document, modeled as a {@link NormalizedNode}.
*/
@Beta
+@Deprecated
public interface XPathDocument {
/**
* Return the root node of this document.
* evaluated on {@link XPathDocument}s from other context.
*/
@Beta
+@Deprecated
public interface XPathExpression {
/**
* Evaluate this expression at the specified path in a document. If evaluation succeeds, it will return an
* {@link YangInstanceIdentifier}.
*/
@Beta
+@Deprecated
public interface XPathNodesetResult
extends XPathResult<Collection<Entry<YangInstanceIdentifier, NormalizedNode<?, ?>>>> {
* An {@link XPathResult} containing a Number.
*/
@Beta
+@Deprecated
public interface XPathNumberResult extends XPathResult<Number> {
}
* @param <T> type of returned value
*/
@Beta
+@Deprecated
// FIXME: do we want to support all the modes of
// <a href="http://www.w3.org/TR/DOM-Level-3-XPath/xpath.html#XPathResultType">DOM XPath</a> ?
// The default DataTree (yang-data-impl) implementation can support ORDERED_NODE_SNAPSHOT_TYPE. The clustered
* a particular root node.
*/
@Beta
+@Deprecated
public interface XPathSchemaContext {
/**
* Compile an XPath expression for execution on {@link XPathDocument}s produced by this context.
* <p>
* Implementations are required to support {@link java.util.ServiceLoader}.
*/
+@Deprecated
@NonNullByDefault
public interface XPathSchemaContextFactory {
/**
* An {@link XPathResult} containing a String.
*/
@Beta
+@Deprecated
public interface XPathStringResult extends XPathResult<String> {
}
--- /dev/null
+/*
+ * Copyright (c) 2019 PANTHEON.tech, 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
+ */
+/**
+ * Deprecated APIs for evaluating XPath expressions on
+ * {@link org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode} trees.
+ *
+ * <p>
+ * This API is deprecated and will be removed in a future version. For replacement refer to
+ * {@code org.opendaylight.yang.data.api.xpath} package.
+ */
+@java.lang.Deprecated
+package org.opendaylight.yangtools.yang.data.api.schema.xpath;
\ No newline at end of file
<dependency>
<groupId>org.opendaylight.yangtools</groupId>
- <artifactId>yang-data-api</artifactId>
+ <artifactId>yang-data-xpath-api</artifactId>
</dependency>
<dependency>
<groupId>org.opendaylight.yangtools</groupId>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- vi: set et smarttab sw=4 tabstop=4: -->
+<!--
+ Copyright (c) 2013 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
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>bundle-parent</artifactId>
+ <version>3.0.0-SNAPSHOT</version>
+ <relativePath>../../bundle-parent</relativePath>
+ </parent>
+
+ <artifactId>yang-data-xpath-api</artifactId>
+ <packaging>bundle</packaging>
+ <version>0.1.0-SNAPSHOT</version>
+ <name>${project.artifactId}</name>
+ <description>${project.artifactId}</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>com.google.guava</groupId>
+ <artifactId>guava</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>concepts</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>util</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>yang-common</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>yang-data-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>yang-xpath-api</artifactId>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <configuration>
+ <propertyExpansion>checkstyle.violationSeverity=error</propertyExpansion>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>com.github.spotbugs</groupId>
+ <artifactId>spotbugs-maven-plugin</artifactId>
+ <configuration>
+ <failOnError>true</failOnError>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
--- /dev/null
+/*
+ * Copyright (c) 2019 PANTHEON.tech, 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.data.api.xpath;
+
+import com.google.common.annotations.Beta;
+import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeCandidate;
+
+/**
+ * An {@link XPathDocument} bound to a {@link DataTreeCandidate}.
+ *
+ * @author Robert Varga
+ */
+@Beta
+public interface DataTreeCandidateDocument extends XPathDocument<DataTreeCandidate> {
+
+}
--- /dev/null
+/*
+ * Copyright (c) 2019 PANTHEON.tech, 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.data.api.xpath;
+
+import com.google.common.annotations.Beta;
+import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
+
+/**
+ * An {@link XPathDocument} bound to a {@link NormalizedNode} tree.
+ *
+ * @author Robert Varga
+ */
+@Beta
+public interface NormalizedNodeDocument extends XPathDocument<NormalizedNode<?, ?>> {
+
+}
--- /dev/null
+/*
+ * Copyright (c) 2019 PANTHEON.tech, 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.data.api.xpath;
+
+import com.google.common.annotations.Beta;
+import org.eclipse.jdt.annotation.NonNull;
+
+/**
+ * The notion of a W3C documented bound to a specific object model. This binding is expressed in terms of the document
+ * exposing a root node from the object model.
+ *
+ * <p>
+ * This interface is not meant to be used directly. Refer to its specializations like {@link NormalizedNodeDocument}
+ * and {@link DataTreeCandidateDocument}.
+ *
+ * @param <T> Object model node type
+ * @author Robert Varga
+ */
+@Beta
+public interface XPathDocument<T> {
+ /**
+ * Return the root node of this document.
+ *
+ * @return This document's root node.
+ */
+ @NonNull T getRootNode();
+}
--- /dev/null
+/*
+ * Copyright (c) 2019 PANTHEON.tech, 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
+ */
+/**
+ * Experimental support for evaluating {@link org.opendaylight.yangtools.yang.xpath.api.YangXPathExpression}s on top
+ * of {@link org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode} trees.
+ *
+ * @author Robert Varga
+ */
+package org.opendaylight.yangtools.yang.data.api.xpath;
\ No newline at end of file