Remove binding spec2
[mdsal.git] / binding2 / mdsal-binding2-java-api-generator / src / main / twirl / org / opendaylight / mdsal / binding / javav2 / java / api / generator / unionTemplate.scala.txt
diff --git a/binding2/mdsal-binding2-java-api-generator/src/main/twirl/org/opendaylight/mdsal/binding/javav2/java/api/generator/unionTemplate.scala.txt b/binding2/mdsal-binding2-java-api-generator/src/main/twirl/org/opendaylight/mdsal/binding/javav2/java/api/generator/unionTemplate.scala.txt
deleted file mode 100644 (file)
index 1329156..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-@*
- * Copyright (c) 2016 Cisco Systems, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *@
-
-@import org.opendaylight.mdsal.binding.javav2.generator.util.Types.getOuterClassName
-@import org.opendaylight.mdsal.binding.javav2.java.api.generator.util.TextTemplateUtil.fieldName
-@import org.opendaylight.mdsal.binding.javav2.java.api.generator.util.TextTemplateUtil.asArguments
-@import org.opendaylight.mdsal.binding.javav2.model.api.GeneratedType
-@import org.opendaylight.mdsal.binding.javav2.model.api.GeneratedProperty
-
-@(baseType: GeneratedType, importedNames: Map[String, String], finalProperties: List[GeneratedProperty],
-parentProperties: List[GeneratedProperty], properties: List[GeneratedProperty], propertyList: String)
-@for(property <- parentProperties) {
-    public @{baseType.getName}(@{importedNames.get(property.getName)} @{fieldName(property)}) {
-        super(@{fieldName(property)});
-    }
-}
-
-@for(property <- finalProperties) {
-    @*TO DO parentProperties + #[property] as argument to method below see  unionTemplate 84 *@
-    public @{baseType.getName}(@{importedNames.get(property.getName)} @{fieldName(property)}) {
-        super();
-        this.@{fieldName(property)} = @{fieldName(property)};
-        @for(otherProperty <- finalProperties) {
-            @if(property != otherProperty && !"value".equals(otherProperty.getName)) {
-                this.@{fieldName(otherProperty)} = null;
-            }
-        }
-    }
-}
-
-@for(property <- properties) {
-    @if("char[]".equals(property.getReturnType.getName)) {
-        /**
-         * Constructor provided only for using in JMX. Don't use it for
-         * construction new object of this union type.
-         */
-        @@@{importedNames.get("constructorProperties")}("@{property.getName}")
-        public @{baseType.getName}(@{importedNames.get(property.getName)} @{fieldName(property)}) {
-            @{importedNames.get("string")} defVal = new @{importedNames.get("string")}(@{fieldName(property)});
-            @{baseType.getName} defInst = @{typeBuilder}.getDefaultInstance(defVal);
-            @for(otherProperty <- finalProperties) {
-                this.@{fieldName(otherProperty)} = defInst.@{fieldName(otherProperty)};
-            }
-
-            this.@{fieldName(property)} = @{fieldName(property)} == null ? null : @{fieldName(property)}.clone();
-        }
-    }
-}
-
-/**
- * Creates a copy from Source Object.
- *
- * @@param source Source object
- */
-public @{baseType.getName}(@{baseType.getName} source) {
-    @if(!parentProperties.isEmpty()) {
-        super(source);
-    } else {
-        @{propertyList}
-    }
-}
-
-@if(properties.isEmpty && !parentProperties.isEmpty) {
-    /**
-     * Creates a new instance from @{importedNames.get("superType")}
-     *
-     * @@param source Source object
-     */
-    public @{baseType.getName}(@{importedNames.get("superType")} source) {
-            super(source);
-    }
-}
-
-@typeBuilder() = {
-@if(getOuterClassName(baseType) != null) {
-    @{getOuterClassName(baseType)}@{baseType.getName}Builder
-} else {
-    @{baseType.getName}Builder
-}
-}
\ No newline at end of file