de0caedd78c3dbd1a2d429eb4c56026a45605db1
[yangtools.git] / yang / yang-model-api / src / main / java / org / opendaylight / yangtools / yang / model / api / AugmentationSchema.java
1 /*
2  * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
3  * This program and the accompanying materials are made available under the
4  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
5  * and is available at http://www.eclipse.org/legal/epl-v10.html
6  */
7 package org.opendaylight.yangtools.yang.model.api;
8
9 import java.util.List;
10
11 import com.google.common.base.Optional;
12
13 /**
14  * AugmentationSchema represents augment definition. The "augment" statement
15  * allows a module or submodule to add to the schema tree defined in an external
16  * module, or the current module and its submodules, and to add to the nodes
17  * from a grouping in a "uses" statement.
18  */
19 public interface AugmentationSchema extends DataNodeContainer {
20
21     /**
22      *
23      * Returns when statement
24      *
25      * If when condition is present node defined by the parent data definition
26      * statement is only valid when the returned XPath
27      * expression conceptually evaluates to "true"
28      * for a particular instance, then the node defined by the parent data
29      * definition statement is valid; otherwise, it is not.
30      *
31      * @return XPath condition
32      */
33     RevisionAwareXPath getWhenCondition();
34
35     /**
36      * @return textual description of this augment.
37      */
38     String getDescription();
39
40     /**
41      * @return textual cross-reference to an external document that provides
42      *         additional information relevant to this node.
43      */
44     String getReference();
45
46     /**
47      * @return actual status of this node.
48      */
49     Status getStatus();
50
51     /**
52      * @return SchemaPath that identifies a node in the schema tree. This node
53      *         is called the augment's target node. The target node MUST be
54      *         either a container, list, choice, case, input, output, or
55      *         notification node. It is augmented with the nodes defined as
56      *         child nodes of this AugmentationSchema.
57      */
58     SchemaPath getTargetPath();
59
60     /**
61      * @return collection of all unknown nodes defined in this augmentation
62      */
63     List<UnknownSchemaNode> getUnknownSchemaNodes();
64
65     /**
66      * Returns Augmentation Definition from which this augmentation is derived
67      * if augmentation was added transitively via augmented uses.
68      *
69      * @return ugmentation Definition from which this augmentation is derived
70      *         if augmentation was added transitively via augmented uses.
71      */
72     Optional<AugmentationSchema> getOriginalDefinition();
73
74 }