540a40fb51c67132f174d28ac9cbf92686657625
[yangtools.git] / yang / yang-data-api / src / main / java / org / opendaylight / yangtools / yang / data / api / schema / AugmentationNode.java
1 /*
2  * Copyright (c) 2014 Cisco Systems, Inc. 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.yang.data.api.schema;
9
10 import java.util.Collection;
11 import javax.annotation.Nonnull;
12 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.AugmentationIdentifier;
13 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument;
14 import org.opendaylight.yangtools.yang.model.api.AugmentationSchema;
15
16 /**
17  * Data instance of <code>augment</code> associated with parent node.
18  *
19  * <p>
20  * Augmentation is addition of subtree defined by other external YANG Model and
21  * is schema for subtree is described by instance of  {@link AugmentationSchema}
22  * associated with parent node of this node.
23  *
24  * <p>
25  * Augmentation node MUST NOT be direct child of other augmentation node.
26  */
27 public interface AugmentationNode extends MixinNode, DataContainerNode<AugmentationIdentifier>,
28     DataContainerChild<AugmentationIdentifier, Collection<DataContainerChild<? extends PathArgument, ?>>> {
29
30     /**
31      * Gets identifier of augmentation node. Returned identifier of augmentation node contains all possible
32      * direct child QNames.
33      *
34      * <p>
35      * This is sufficient to identify instance of augmentation, since RFC6020 states that <code>augment</code>
36      * that augment statement must not add multiple nodes from same namespace / module to the target node.
37      *
38      * @return Identifier which uniquely identifies augmentation in particular subtree.
39      */
40     @Override
41     @Nonnull AugmentationIdentifier getIdentifier();
42 }