Add _setSchemaLocation & _getSchemaLocation to javabean style.
Fix a bug in the javabean style's copy constructor where it didn't think that a property could be null, but TYPE_0_1 types can be null.
1.1 --- a/schema2beans/test/unit/src/TestMain.java Wed Mar 26 15:58:19 2003 +0000
1.2 +++ b/schema2beans/test/unit/src/TestMain.java Wed Mar 26 19:25:29 2003 +0000
1.3 @@ -179,7 +179,6 @@
1.4
1.5 ref("Bean Tree:");
1.6 ref(beanTreeFile);
1.7 - beanTreeFile.delete();
1.8
1.9 schemaFile = new File(dataDir, "simple.xsd");
1.10 dtdIn = new FileInputStream(schemaFile);
1.11 @@ -188,6 +187,7 @@
1.12 config.setMDDIn(null);
1.13 ref("Calling GenBeans.doIt");
1.14 GenBeans.doIt(config);
1.15 + beanTreeFile.delete();
1.16 ref("Compiling");
1.17 String cmd = "javac -classpath "+workDir.toString()+File.pathSeparator+dataDir.toString()+File.pathSeparator+theClassPath+" "+dataDir.toString()+"/"+testName+".java";
1.18 int result = runCommand(cmd);
2.1 --- a/schema2beans/test/unit/src/data/TestPurchaseOrder.java Wed Mar 26 15:58:19 2003 +0000
2.2 +++ b/schema2beans/test/unit/src/data/TestPurchaseOrder.java Wed Mar 26 19:25:29 2003 +0000
2.3 @@ -86,5 +86,8 @@
2.4 po.write(out);
2.5 po2.write(out);
2.6 */
2.7 +
2.8 + po._setSchemaLocation("flurp");
2.9 + po.write(out);
2.10 }
2.11 }
3.1 --- a/schema2beans/test/unit/src/data/TestWebApp.java Wed Mar 26 15:58:19 2003 +0000
3.2 +++ b/schema2beans/test/unit/src/data/TestWebApp.java Wed Mar 26 19:25:29 2003 +0000
3.3 @@ -61,5 +61,8 @@
3.4 filter.addDisplayName("filter GREEN");
3.5 webApp.setFilter2(filter);
3.6 webApp.write(out);
3.7 +
3.8 + WebApp copy1 = new WebApp(webApp);
3.9 + copy1.write(out);
3.10 }
3.11 }
4.1 --- a/schema2beans/test/unit/src/data/goldenfiles/TestMain/testPurchaseOrder.pass Wed Mar 26 15:58:19 2003 +0000
4.2 +++ b/schema2beans/test/unit/src/data/goldenfiles/TestMain/testPurchaseOrder.pass Wed Mar 26 19:25:29 2003 +0000
4.3 @@ -177,4 +177,36 @@
4.4 out: TestPurchaseOrder null po should not be po2 -> OK
4.5 out: TestPurchaseOrder null po should equal po2 -> OK
4.6 out: TestPurchaseOrder null po2 should equal po -> OK
4.7 +out: <?xml version='1.0' encoding='UTF-8' ?>
4.8 +out: <purchaseOrder xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='flurp' orderDate='20021010'>
4.9 +out: <shipTo country='B&B's are us'>
4.10 +out: <name>To you & me</name>
4.11 +out: <street></street>
4.12 +out: <city></city>
4.13 +out: <state></state>
4.14 +out: <zip>0</zip>
4.15 +out: </shipTo>
4.16 +out: <billTo country='US'>
4.17 +out: <name>C</name>
4.18 +out: <street></street>
4.19 +out: <city></city>
4.20 +out: <state></state>
4.21 +out: <zip>0</zip>
4.22 +out: </billTo>
4.23 +out: <comment>comment for the purchase order</comment>
4.24 +out: <items>
4.25 +out: <item partNum='123'>
4.26 +out: <productName>Stargazer lily</productName>
4.27 +out: <quantity>5</quantity>
4.28 +out: <USPrice>1.21</USPrice>
4.29 +out: <relatedpartnum></relatedpartnum>
4.30 +out: </item>
4.31 +out: <item partNum='124'>
4.32 +out: <productName>Red Rose</productName>
4.33 +out: <quantity>2</quantity>
4.34 +out: <USPrice>2</USPrice>
4.35 +out: <relatedpartnum></relatedpartnum>
4.36 +out: </item>
4.37 +out: </items>
4.38 +out: </purchaseOrder>
4.39 Finished running TestPurchaseOrder: 0
5.1 --- a/schema2beans/test/unit/src/data/goldenfiles/TestMain/testWebApp.pass Wed Mar 26 15:58:19 2003 +0000
5.2 +++ b/schema2beans/test/unit/src/data/goldenfiles/TestMain/testWebApp.pass Wed Mar 26 19:25:29 2003 +0000
5.3 @@ -258,4 +258,24 @@
5.4 out: <filter-class></filter-class>
5.5 out: </filter>
5.6 out: </web-app>
5.7 +out: <?xml version='1.0' encoding='UTF-8' ?>
5.8 +out: <web-app xmlns='http://java.sun.com/xml/ns/j2ee' version='2.4'>
5.9 +out: <description>This is my Web App</description>
5.10 +out: <display-name>MyWebApp</display-name>
5.11 +out: <distributable>true</distributable>
5.12 +out: <filter>
5.13 +out: <filter-name>Bob</filter-name>
5.14 +out: <filter-class></filter-class>
5.15 +out: </filter>
5.16 +out: <filter>
5.17 +out: <display-name xml:lang='en'>filter BLUE</display-name>
5.18 +out: <filter-name></filter-name>
5.19 +out: <filter-class></filter-class>
5.20 +out: </filter>
5.21 +out: <filter>
5.22 +out: <display-name>filter GREEN</display-name>
5.23 +out: <filter-name></filter-name>
5.24 +out: <filter-class></filter-class>
5.25 +out: </filter>
5.26 +out: </web-app>
5.27 Finished running TestWebApp: 0