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 expression conceptually
23 * evaluates to "true" for a particular instance, then the node defined by
24 * the parent data definition statement is valid; otherwise, it is not.
26 * @return when condition as string
28 String getWhenCondition();
31 * Adds string representation of when condition.
33 * If when condition is present node defined by the parent data definition
34 * statement is only valid when the returned XPath
35 * expression conceptually evaluates to "true"
36 * for a particular instance, then the node defined by the parent data
37 * definition statement is valid; otherwise, it is not.
39 * @param whenCondition
41 void addWhenCondition(String whenCondition);
44 * Returns target path representation as was present in schema source.
46 * @return path to target node as String
48 String getTargetPathAsString();
51 * Get path to target node.
53 * Note that individual parts of path contain only prefix relative to
54 * current context and name of node.
57 * @return path to target node as SchemaPath
59 SchemaPath getTargetPath();
62 AugmentationSchema build();
65 * Get information about augmentation process.
67 * @return true, if augmentation process was performed already, false
73 * Set information about augmentation process.
77 void setResolved(boolean resolved);
81 * Returns position of defining <code>augment</code> statement
82 * as was present in schema source.
84 * @return Position of definiing augment statement in source code.