Add clarification around NormalizedNode being identifiable
[yangtools.git] / yang / rfc8528-data-api / src / main / java / org / opendaylight / yangtools / rfc8528 / data / api / MountPointNode.java
1 /*
2  * Copyright (c) 2019 PANTHEON.tech s.r.o. and others. All rights reserved.
3  *
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
7  */
8 package org.opendaylight.yangtools.rfc8528.data.api;
9
10 import com.google.common.annotations.Beta;
11 import java.util.Collection;
12 import org.eclipse.jdt.annotation.NonNull;
13 import org.opendaylight.yangtools.yang.common.QName;
14 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument;
15 import org.opendaylight.yangtools.yang.data.api.schema.DataContainerChild;
16 import org.opendaylight.yangtools.yang.data.api.schema.DataContainerNode;
17 import org.opendaylight.yangtools.yang.data.api.schema.MixinNode;
18
19 /**
20  * Common NormalizedNode representation of a YANG mount point.
21  *
22  * <p>
23  * These nodes are not meant to be stored in a DataTree and most NormalizedNode utilities will be confused when
24  * they see them. The purpose of this interface is making data interchange between mount point-aware components more
25  * seamless.
26  */
27 /*
28  * FIXME: 7.0.0: The above is not quite right. DataTree instances should be able to handle mount points and correctly
29  *               handle them, provided they get enough support from MountPointContext.
30  */
31 @Beta
32 public interface MountPointNode extends MixinNode, DataContainerNode<MountPointIdentifier>,
33         DataContainerChild<MountPointIdentifier, Collection<DataContainerChild<? extends PathArgument, ?>>> {
34     @Override
35     default QName getNodeType() {
36         return getIdentifier().getLabel();
37     }
38
39     /**
40      * Return the underlying mount point context.
41      *
42      * @return Underlying mount point context
43      */
44     @NonNull MountPointContext getMountPointContext();
45
46     /*
47      * FIXME: consider whether this interface should contain some information based on 'parent-reference':
48      *        - List<YangXPathExpression.QualifiedBound> getParentReference()
49      *        - the node-set required to maintain referential integrity in the subtree of this node
50      */
51 }