[pkg-java] r3047 - trunk/libxsd2jibx-java/debian/patches

Eric Lavarde ewl-guest at alioth.debian.org
Sat Mar 10 18:31:57 CET 2007


Author: ewl-guest
Date: 2007-03-10 17:31:57 +0000 (Sat, 10 Mar 2007)
New Revision: 3047

Added:
   trunk/libxsd2jibx-java/debian/patches/10_freemind_fix.patch
Log:
Add patch required by FreeMind and created by Christian Foltin


Added: trunk/libxsd2jibx-java/debian/patches/10_freemind_fix.patch
===================================================================
--- trunk/libxsd2jibx-java/debian/patches/10_freemind_fix.patch	2007-03-10 17:14:06 UTC (rev 3046)
+++ trunk/libxsd2jibx-java/debian/patches/10_freemind_fix.patch	2007-03-10 17:31:57 UTC (rev 3047)
@@ -0,0 +1,78 @@
+diff -U 3 -r ../../xsd2jibx/src/main/org/jibx/xsd2jibx/JSource.java ./src/main/org/jibx/xsd2jibx/JSource.java
+--- ../../xsd2jibx/src/main/org/jibx/xsd2jibx/JSource.java    2005-02-14 09:29:40.000000000 +0100
++++ ./src/main/org/jibx/xsd2jibx/JSource.java    2006-02-07 22:28:00.000000000 +0100
+@@ -89,6 +89,11 @@
+             jm.addParam(jqname, element.getFieldName());
+             jm.addLine(element.getFieldList() + ".add(" + element.getFieldName() + ");");
+ 
++            // create add to position method:
++            jm = source.newJavaMethod(element.getAddPositionMethod(), JQName.VOID.getJavaQName(), PUBLIC);
++            jm.addParam(JQName.INT.getJavaQName(), "position");
++            jm.addParam(jqname, element.getFieldName());
++            jm.addLine(element.getFieldList() + ".add(position, " + element.getFieldName() + ");");
+             // create getMethod
+             jm = source.newJavaMethod(element.getGetMethod(), jqname, PUBLIC);
+             jm.addParam(JQName.INT.getJavaQName(), "index");
+@@ -97,6 +102,12 @@
+             //create size method
+             jm = source.newJavaMethod(element.getSizeMethod(), JQName.INT.getJavaQName(), JavaSource.PUBLIC);
+             jm.addLine("return " + element.getFieldList() + ".size();");
++            //create clear method
++            jm = source.newJavaMethod(element.getClearMethod(), JQName.VOID.getJavaQName(), JavaSource.PUBLIC);
++            jm.addLine(element.getFieldList() + ".clear();");
++            //create unmodified method
++            jm = source.newJavaMethod(element.getListMethod(), "java.util.List", JavaSource.PUBLIC);
++            jm.addLine("return java.util.Collections.unmodifiableList("+element.getFieldList() + ");");
+         } else { // it is not a collection
+             newBeanProperty(element);
+         }
+@@ -198,4 +209,4 @@
+     public String toString(){
+         return "JSource[ name: "+ source.getClassName() +" ]";
+     }
+-}
+\ Kein Zeilenumbruch am Dateiende.
++}
+diff -U 3 -r ../../xsd2jibx/src/main/org/jibx/xsd2jibx/XsdElement.java ./src/main/org/jibx/xsd2jibx/XsdElement.java
+--- ../../xsd2jibx/src/main/org/jibx/xsd2jibx/XsdElement.java    2005-02-19 21:02:31.000000000 +0100
++++ ./src/main/org/jibx/xsd2jibx/XsdElement.java    2006-02-07 22:24:13.000000000 +0100
+@@ -60,6 +60,12 @@
+         return sb.toString();
+     }
+ 
++    public String getAddPositionMethod() {
++        StringBuffer sb = new StringBuffer("addAt");
++        sb.append(NameUtil.toUpperCamelCase(getJavaName()));
++        return sb.toString();
++    }
++
+     public String getSizeMethod() {
+         StringBuffer sb = new StringBuffer("size");
+         sb.append(NameUtil.toUpperCamelCase(getJavaName()));
+@@ -67,6 +73,19 @@
+         return sb.toString();
+     }
+ 
++    public String getClearMethod() {
++        StringBuffer sb = new StringBuffer("clear");
++        sb.append(NameUtil.toUpperCamelCase(getJavaName()));
++        sb.append(NameUtil.addListSuffix);
++        return sb.toString();
++    }
++    public String getListMethod() {
++        StringBuffer sb = new StringBuffer("getList");
++        sb.append(NameUtil.toUpperCamelCase(getJavaName()));
++        sb.append(NameUtil.addListSuffix);
++        return sb.toString();
++    }
++   
+     protected void importRef() {
+        
+         if (this.ref != null) {
+@@ -204,4 +223,4 @@
+     public void setComplexType(XsdComplexType complexType) {
+         this.complexType = complexType;
+     }
+-}
+\ Kein Zeilenumbruch am Dateiende.
++}




More information about the pkg-java-commits mailing list