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 public interface AugmentationSchemaBuilder extends DataNodeContainerBuilder,DocumentedNodeBuilder {
19 * Returns when condition
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.
30 String getWhenCondition();
33 * Adds string representation of when condition.
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.
41 * @param whenCondition
43 void addWhenCondition(String whenCondition);
46 * Returns target path representation as was present in schema source.
48 * @return path to target node as String
50 String getTargetPathAsString();
53 * Get path to target node.
55 * Note that individual parts of path contain only prefix relative to
56 * current context and name of node.
59 * @return path to target node as SchemaPath
61 SchemaPath getTargetPath();
64 AugmentationSchema build();
67 * Get information about augmentation process.
69 * @return true, if augmentation process was performed already, false
75 * Set information about augmentation process.
79 void setResolved(boolean resolved);
83 * Returns position of defining <code>augment</code> statement
84 * as was present in schema source.
86 * @return Position of definiing augment statement in source code.