X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=yang%2Fyang-parser-impl%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fyangtools%2Fyang%2Fparser%2Fbuilder%2Fapi%2FAugmentationSchemaBuilder.java;h=c6dcc41f553d5d6248e83c50d6c3eab1e029ec52;hb=42abb28b99a02f9580f4676ce5c315628e5bcd24;hp=ebe587afef8d23fcc68f119036c677d7d09548e9;hpb=e98a1027fca4e4b27c0e7e00a3723993935c34ad;p=yangtools.git diff --git a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/builder/api/AugmentationSchemaBuilder.java b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/builder/api/AugmentationSchemaBuilder.java index ebe587afef..c6dcc41f55 100644 --- a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/builder/api/AugmentationSchemaBuilder.java +++ b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/builder/api/AugmentationSchemaBuilder.java @@ -7,31 +7,44 @@ */ package org.opendaylight.yangtools.yang.parser.builder.api; -import org.opendaylight.yangtools.yang.model.api.*; +import org.opendaylight.yangtools.yang.model.api.AugmentationSchema; +import org.opendaylight.yangtools.yang.model.api.SchemaPath; /** - * Interface for builders of 'augment' statement. + * Builder for {@link AugmentationSchema}, which represents 'augment' statement. + * + * @deprecated Pre-Beryllium implementation, scheduled for removal. */ -public interface AugmentationSchemaBuilder extends DataNodeContainerBuilder { +@Deprecated +public interface AugmentationSchemaBuilder extends DataNodeContainerBuilder,DocumentedNodeBuilder { + /** + * Returns when condition + * + * If when condition is present node defined by the parent data definition + * statement is only valid when the returned XPath expression conceptually + * evaluates to "true" for a particular instance, then the node defined by + * the parent data definition statement is valid; otherwise, it is not. + * + * @return when condition as string + */ String getWhenCondition(); + /** + * Adds string representation of when condition. + * + * If when condition is present node defined by the parent data definition + * statement is only valid when the returned XPath + * expression conceptually evaluates to "true" + * for a particular instance, then the node defined by the parent data + * definition statement is valid; otherwise, it is not. + * + * @param whenCondition string representation of when condition + */ void addWhenCondition(String whenCondition); - String getDescription(); - - void setDescription(String description); - - String getReference(); - - void setReference(String reference); - - Status getStatus(); - - void setStatus(Status status); - /** - * Get path to target node as single string. + * Returns target path representation as was present in schema source. * * @return path to target node as String */ @@ -48,21 +61,7 @@ public interface AugmentationSchemaBuilder extends DataNodeContainerBuilder { */ SchemaPath getTargetPath(); - /** - * Get schema path of target node. - * - * @return SchemaPath of target node - */ - SchemaPath getTargetNodeSchemaPath(); - - /** - * Set schema path of target node. - * - * @param path - * SchemaPath of target node - */ - void setTargetNodeSchemaPath(SchemaPath path); - + @Override AugmentationSchema build(); /** @@ -76,8 +75,32 @@ public interface AugmentationSchemaBuilder extends DataNodeContainerBuilder { /** * Set information about augmentation process. * - * @param resolved + * @param resolved information about augmentation process */ void setResolved(boolean resolved); + /** + * + * Returns position of defining augment statement + * as was present in schema source. + * + * @return Position of definiing augment statement in source code. + */ + int getOrder(); + + /** + * Set true if target of augment is unsupported (e.g. node in body of extension). + * In such case, augmentation is skipped and AugmentationSchema is not built. + * + * @param unsupportedTarget information about target of augment statement + */ + void setUnsupportedTarget(boolean unsupportedTarget); + + /** + * Return true if target of augment is unsupported (e.g. node in body of extension). + * In such case, augmentation is skipped and AugmentationSchema is not built. + * + * @return information about target of augment statement + */ + boolean isUnsupportedTarget(); }