API Clarity: Documented o.o.y.yang.parser.builder.api
[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 public interface AugmentationSchemaBuilder extends DataNodeContainerBuilder,DocumentedNodeBuilder {
17
18     /**
19      * Returns when condition
20      *
21      * If when condition is present node defined by the parent data definition
22      * statement is only valid when the returned XPath
23      * expression conceptually evaluates to "true"
24      * for a particular instance, then the node defined by the parent data
25      * definition statement is valid; otherwise, it is not.
26      *
27      *
28      * @return
29      */
30     String getWhenCondition();
31
32     /**
33      * Adds string representation of when condition.
34      *
35      * If when condition is present node defined by the parent data definition
36      * statement is only valid when the returned XPath
37      * expression conceptually evaluates to "true"
38      * for a particular instance, then the node defined by the parent data
39      * definition statement is valid; otherwise, it is not.
40      *
41      * @param whenCondition
42      */
43     void addWhenCondition(String whenCondition);
44
45     /**
46      * Returns target path representation as was present in schema source.
47      *
48      * @return path to target node as String
49      */
50     String getTargetPathAsString();
51
52     /**
53      * Get path to target node.
54      * <p>
55      * Note that individual parts of path contain only prefix relative to
56      * current context and name of node.
57      * </p>
58      *
59      * @return path to target node as SchemaPath
60      */
61     SchemaPath getTargetPath();
62
63     /**
64      * Get schema path of target node.
65      *
66      * @return SchemaPath of target node
67      */
68     SchemaPath getTargetNodeSchemaPath();
69
70     /**
71      * Set schema path of target node.
72      *
73      * @param path
74      *            SchemaPath of target node
75      */
76     void setTargetNodeSchemaPath(SchemaPath path);
77
78     @Override
79     AugmentationSchema build();
80
81     /**
82      * Get information about augmentation process.
83      *
84      * @return true, if augmentation process was performed already, false
85      *         otherwise
86      */
87     boolean isResolved();
88
89     /**
90      * Set information about augmentation process.
91      *
92      * @param resolved
93      */
94     void setResolved(boolean resolved);
95
96     /**
97      *
98      * Returns position of defining <code>augment</code> statement
99      * as was present in schema source.
100      *
101      * @return Position of definiing augment statement in source code.
102      */
103     int getOrder();
104
105 }