2 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
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
8 package org.opendaylight.yangtools.yang.parser.builder.api;
10 import org.opendaylight.yangtools.yang.model.api.AugmentationSchema;
11 import org.opendaylight.yangtools.yang.model.api.SchemaPath;
14 * Builder for {@link AugmentationSchema}, which represents 'augment' statement.
16 * @deprecated Pre-Beryllium implementation, scheduled for removal.
19 public interface AugmentationSchemaBuilder extends DataNodeContainerBuilder,DocumentedNodeBuilder {
22 * Returns when condition
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.
29 * @return when condition as string
31 String getWhenCondition();
34 * Adds string representation of when condition.
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.
42 * @param whenCondition string representation of when condition
44 void addWhenCondition(String whenCondition);
47 * Returns target path representation as was present in schema source.
49 * @return path to target node as String
51 String getTargetPathAsString();
54 * Get path to target node.
56 * Note that individual parts of path contain only prefix relative to
57 * current context and name of node.
60 * @return path to target node as SchemaPath
62 SchemaPath getTargetPath();
65 AugmentationSchema build();
68 * Get information about augmentation process.
70 * @return true, if augmentation process was performed already, false
76 * Set information about augmentation process.
78 * @param resolved information about augmentation process
80 void setResolved(boolean resolved);
84 * Returns position of defining <code>augment</code> statement
85 * as was present in schema source.
87 * @return Position of definiing augment statement in source code.
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.
95 * @param unsupportedTarget information about target of augment statement
97 void setUnsupportedTarget(boolean unsupportedTarget);
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.
103 * @return information about target of augment statement
105 boolean isUnsupportedTarget();