Remove SchemaNode.getPath()
[yangtools.git] / model / yang-model-api / src / main / java / org / opendaylight / yangtools / yang / model / api / SchemaNode.java
index d4f70a1efe41a1bca707b76d1c04d671a0de42d1..9ba302f2f99436a8df91aa2a6e4deee9b4c5d387 100644 (file)
@@ -20,31 +20,4 @@ public interface SchemaNode extends DocumentedNode.WithStatus {
      * @return QName with the name of the schema node
      */
     @NonNull QName getQName();
-
-    /**
-     * Returns the schema path of the instance of the type {@code SchemaNode}.
-     *
-     * <p>
-     * The default implementation throws an {@link UnsupportedOperationException}.
-     *
-     * @return schema path of the schema node
-     * @throws UnsupportedOperationException when the implementation does not support per-node unique paths
-     * @deprecated The idea of identifying SchemaNodes through a global path does not work. There are two problems:
-     *             <ul>
-     *               <li>SchemaPath does not work because it does not discern namespaces, i.e. we do not known whether
-     *                   the {@code QName} refers to a {@code grouping}, a {@code typedef} or a {@code container}.
-     *               </li>
-     *               <li>Such a path needs to be maintained by each SchemaNode and requires us to instantiate each
-     *                   effective statement as a separate object (because {@link #getPath()} is effectively an
-     *                   identity within a given {@link EffectiveModelContext}.
-     *               </li>
-     *             </ul>
-     *             An alternative method of exchanging pointers to schema nodes (well, statements, really), exists in
-     *             the form of {@link EffectiveStatementInference} and its ecosystem. This method is scheduled for
-     *             removal in the next major release.
-     */
-    @Deprecated(forRemoval = true)
-    default @NonNull SchemaPath getPath() {
-        return SchemaNodeDefaults.throwUnsupported(this);
-    }
 }