Adjust to yangtools-2.0.0 changes
[mdsal.git] / binding2 / mdsal-binding2-generator-impl / src / main / twirl / org / opendaylight / mdsal / binding / javav2 / generator / impl / yangTemplateWriteAugments.scala.txt
index 64d851d90b813f489aa0307cd92fcb79140ba523..7f22c44a9772acabb4bfa478881aa75634dd3228 100644 (file)
 ***********************************************************@
 
 @import org.opendaylight.mdsal.binding.javav2.generator.impl.util.YangTextTemplate
-@import org.opendaylight.yangtools.yang.model.api.AugmentationSchema
+@import org.opendaylight.yangtools.yang.model.api.AugmentationSchemaNode
 @import org.opendaylight.yangtools.yang.model.api.Module
 @import org.opendaylight.yangtools.yang.model.api.Status
 
-@(augments: Set[_ <: AugmentationSchema], module: Module)
+@(augments: Set[_ <: AugmentationSchemaNode], module: Module)
 @for(augment <- augments) {
     @if(augment != null) {
         augment "@{YangTextTemplate.formatToAugmentPath(augment.getTargetPath().getPathFromRoot())}" {
             @if(augment.getWhenCondition() != null && !augment.getWhenCondition().toString().isEmpty()) {
                 when "@augment.getWhenCondition().toString()";
             }
-            @if(augment.getDescription() != null && !augment.getDescription().isEmpty()) {
-                description "@augment.getDescription().toString()";
+            @if(augment.getDescription().isPresent()) {
+                description "@augment.getDescription().get()";
             }
-            @if(augment.getReference() != null && !augment.getReference().isEmpty()) {
-                reference "@augment.getReference().toString()";
+            @if(augment.getReference().isPresent()) {
+                reference "@augment.getReference().get()";
             }
             @if(augment.getStatus() != Status.CURRENT) {
                 status "@augment.getStatus()";
@@ -45,4 +45,4 @@
             }
         }
     }
-}
\ No newline at end of file
+}