BUG-865: deprecate pre-Beryllium parser elements
[yangtools.git] / yang / yang-parser-impl / src / main / java / org / opendaylight / yangtools / yang / parser / builder / api / AugmentationSchemaBuilder.java
1 /*
2  * Copyright (c) 2013 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.parser.builder.api;
9
10 import org.opendaylight.yangtools.yang.model.api.AugmentationSchema;
11 import org.opendaylight.yangtools.yang.model.api.SchemaPath;
12
13 /**
14  * Builder for {@link AugmentationSchema}, which represents 'augment' statement.
15  *
16  * @deprecated Pre-Beryllium implementation, scheduled for removal.
17  */
18 @Deprecated
19 public interface AugmentationSchemaBuilder extends DataNodeContainerBuilder,DocumentedNodeBuilder {
20
21     /**
22      * Returns when condition
23      *
24      * If when condition is present node defined by the parent data definition
25      * statement is only valid when the returned XPath expression conceptually
26      * evaluates to "true" for a particular instance, then the node defined by
27      * the parent data definition statement is valid; otherwise, it is not.
28      *
29      * @return when condition as string
30      */
31     String getWhenCondition();
32
33     /**
34      * Adds string representation of when condition.
35      *
36      * If when condition is present node defined by the parent data definition
37      * statement is only valid when the returned XPath
38      * expression conceptually evaluates to "true"
39      * for a particular instance, then the node defined by the parent data
40      * definition statement is valid; otherwise, it is not.
41      *
42      * @param whenCondition string representation of when condition
43      */
44     void addWhenCondition(String whenCondition);
45
46     /**
47      * Returns target path representation as was present in schema source.
48      *
49      * @return path to target node as String
50      */
51     String getTargetPathAsString();
52
53     /**
54      * Get path to target node.
55      * <p>
56      * Note that individual parts of path contain only prefix relative to
57      * current context and name of node.
58      * </p>
59      *
60      * @return path to target node as SchemaPath
61      */
62     SchemaPath getTargetPath();
63
64     @Override
65     AugmentationSchema build();
66
67     /**
68      * Get information about augmentation process.
69      *
70      * @return true, if augmentation process was performed already, false
71      *         otherwise
72      */
73     boolean isResolved();
74
75     /**
76      * Set information about augmentation process.
77      *
78      * @param resolved information about augmentation process
79      */
80     void setResolved(boolean resolved);
81
82     /**
83      *
84      * Returns position of defining <code>augment</code> statement
85      * as was present in schema source.
86      *
87      * @return Position of definiing augment statement in source code.
88      */
89     int getOrder();
90
91     /**
92      *  Set true if target of augment is unsupported (e.g. node in body of extension).
93      *  In such case, augmentation is skipped and AugmentationSchema is not built.
94      *
95      *  @param unsupportedTarget information about target of augment statement
96      */
97     void setUnsupportedTarget(boolean unsupportedTarget);
98
99     /**
100      *  Return true if target of augment is unsupported (e.g. node in body of extension).
101      *  In such case, augmentation is skipped and AugmentationSchema is not built.
102      *
103      *  @return information about target of augment statement
104      */
105     boolean isUnsupportedTarget();
106 }