Add attribute defaults from XML Schemas. BLD200212130100
authorcliffwd@netbeans.org
Wed, 11 Dec 2002 21:40:00 +0000
changeset 11520ac5f00af04f
parent 1151 069e6563e1a0
child 1153 22aca970845b
Add attribute defaults from XML Schemas.
Pure java beans properties will now start with the defaults.
Refactor some more code into JavaUtil.
schema2beans/test/unit/src/data/goldenfiles/TestMain/testPurchaseOrder.pass
schema2beans/test/unit/src/data/goldenfiles/TestMain/testWebApp.pass
     1.1 --- a/schema2beans/test/unit/src/data/goldenfiles/TestMain/testPurchaseOrder.pass	Wed Dec 11 17:07:08 2002 +0000
     1.2 +++ b/schema2beans/test/unit/src/data/goldenfiles/TestMain/testPurchaseOrder.pass	Wed Dec 11 21:40:00 2002 +0000
     1.3 @@ -8,10 +8,17 @@
     1.4  out: <purchaseOrder orderDate='20021010'>
     1.5  out: 	<shipTo country='US'>
     1.6  out: 		<name>J</name>
     1.7 +out: 		<street></street>
     1.8  out: 		<city>Foster City</city>
     1.9 +out: 		<state></state>
    1.10 +out: 		<zip>0</zip>
    1.11  out: 	</shipTo>
    1.12  out: 	<billTo country='US'>
    1.13  out: 		<name>C</name>
    1.14 +out: 		<street></street>
    1.15 +out: 		<city></city>
    1.16 +out: 		<state></state>
    1.17 +out: 		<zip>0</zip>
    1.18  out: 	</billTo>
    1.19  out: 	<comment>comment for the purchase order</comment>
    1.20  out: 	<items>
    1.21 @@ -19,11 +26,13 @@
    1.22  out: 			<productName>Stargazer lily</productName>
    1.23  out: 			<quantity>5</quantity>
    1.24  out: 			<USPrice>1.21</USPrice>
    1.25 +out: 			<relatedpartnum></relatedpartnum>
    1.26  out: 		</item>
    1.27  out: 		<item partNum='124'>
    1.28  out: 			<productName>Red Rose</productName>
    1.29  out: 			<quantity>2</quantity>
    1.30  out: 			<USPrice>2</USPrice>
    1.31 +out: 			<relatedpartnum></relatedpartnum>
    1.32  out: 		</item>
    1.33  out: 	</items>
    1.34  out: </purchaseOrder>
    1.35 @@ -32,9 +41,17 @@
    1.36  out: <purchaseOrder orderDate='20021010'>
    1.37  out: 	<shipTo country='B&amp;B&apos;s are us'>
    1.38  out: 		<name>To you &amp; me</name>
    1.39 +out: 		<street></street>
    1.40 +out: 		<city></city>
    1.41 +out: 		<state></state>
    1.42 +out: 		<zip>0</zip>
    1.43  out: 	</shipTo>
    1.44  out: 	<billTo country='US'>
    1.45  out: 		<name>C</name>
    1.46 +out: 		<street></street>
    1.47 +out: 		<city></city>
    1.48 +out: 		<state></state>
    1.49 +out: 		<zip>0</zip>
    1.50  out: 	</billTo>
    1.51  out: 	<comment>comment for the purchase order</comment>
    1.52  out: 	<items>
    1.53 @@ -42,11 +59,13 @@
    1.54  out: 			<productName>Stargazer lily</productName>
    1.55  out: 			<quantity>5</quantity>
    1.56  out: 			<USPrice>1.21</USPrice>
    1.57 +out: 			<relatedpartnum></relatedpartnum>
    1.58  out: 		</item>
    1.59  out: 		<item partNum='124'>
    1.60  out: 			<productName>Red Rose</productName>
    1.61  out: 			<quantity>2</quantity>
    1.62  out: 			<USPrice>2</USPrice>
    1.63 +out: 			<relatedpartnum></relatedpartnum>
    1.64  out: 		</item>
    1.65  out: 	</items>
    1.66  out: </purchaseOrder>
    1.67 @@ -55,9 +74,17 @@
    1.68  out: <purchaseOrder orderDate='20021010'>
    1.69  out: 	<shipTo country='B&amp;B&apos;s are us'>
    1.70  out: 		<name>To you &amp; me</name>
    1.71 +out: 		<street></street>
    1.72 +out: 		<city></city>
    1.73 +out: 		<state></state>
    1.74 +out: 		<zip>0</zip>
    1.75  out: 	</shipTo>
    1.76  out: 	<billTo country='US'>
    1.77  out: 		<name>C</name>
    1.78 +out: 		<street></street>
    1.79 +out: 		<city></city>
    1.80 +out: 		<state></state>
    1.81 +out: 		<zip>0</zip>
    1.82  out: 	</billTo>
    1.83  out: 	<comment>comment for the purchase order</comment>
    1.84  out: 	<items>
    1.85 @@ -65,17 +92,20 @@
    1.86  out: 			<productName>Stargazer lily</productName>
    1.87  out: 			<quantity>5</quantity>
    1.88  out: 			<USPrice>1.21</USPrice>
    1.89 +out: 			<relatedpartnum></relatedpartnum>
    1.90  out: 		</item>
    1.91  out: 		<item partNum='124'>
    1.92  out: 			<productName>Red Rose</productName>
    1.93  out: 			<quantity>2</quantity>
    1.94  out: 			<USPrice>2</USPrice>
    1.95 +out: 			<relatedpartnum></relatedpartnum>
    1.96  out: 		</item>
    1.97 -out: 		<item>
    1.98 +out: 		<item partNum=''>
    1.99  out: 			<productName>Daffodil</productName>
   1.100  out: 			<quantity>3</quantity>
   1.101  out: 			<USPrice>1.00</USPrice>
   1.102  out: 			<comment>Yellow &amp; Green</comment>
   1.103 +out: 			<relatedpartnum></relatedpartnum>
   1.104  out: 		</item>
   1.105  out: 	</items>
   1.106  out: </purchaseOrder>
   1.107 @@ -85,9 +115,17 @@
   1.108  out: <purchaseOrder orderDate='20021010'>
   1.109  out: 	<shipTo country='B&amp;B&apos;s are us'>
   1.110  out: 		<name>To you &amp; me</name>
   1.111 +out: 		<street></street>
   1.112 +out: 		<city></city>
   1.113 +out: 		<state></state>
   1.114 +out: 		<zip>0</zip>
   1.115  out: 	</shipTo>
   1.116  out: 	<billTo country='US'>
   1.117  out: 		<name>C</name>
   1.118 +out: 		<street></street>
   1.119 +out: 		<city></city>
   1.120 +out: 		<state></state>
   1.121 +out: 		<zip>0</zip>
   1.122  out: 	</billTo>
   1.123  out: 	<comment>comment for the purchase order</comment>
   1.124  out: 	<items>
   1.125 @@ -95,11 +133,13 @@
   1.126  out: 			<productName>Stargazer lily</productName>
   1.127  out: 			<quantity>5</quantity>
   1.128  out: 			<USPrice>1.21</USPrice>
   1.129 +out: 			<relatedpartnum></relatedpartnum>
   1.130  out: 		</item>
   1.131  out: 		<item partNum='124'>
   1.132  out: 			<productName>Red Rose</productName>
   1.133  out: 			<quantity>2</quantity>
   1.134  out: 			<USPrice>2</USPrice>
   1.135 +out: 			<relatedpartnum></relatedpartnum>
   1.136  out: 		</item>
   1.137  out: 	</items>
   1.138  out: </purchaseOrder>
     2.1 --- a/schema2beans/test/unit/src/data/goldenfiles/TestMain/testWebApp.pass	Wed Dec 11 17:07:08 2002 +0000
     2.2 +++ b/schema2beans/test/unit/src/data/goldenfiles/TestMain/testWebApp.pass	Wed Dec 11 21:40:00 2002 +0000
     2.3 @@ -5,11 +5,12 @@
     2.4  out: TestWebApp - creating the bean graph
     2.5  out: TestWebApp - bean graph created
     2.6  out: <?xml version='1.0' encoding='UTF-8' ?>
     2.7 -out: <web-app xmlns='http://java.sun.com/xml/ns/j2ee'>
     2.8 +out: <web-app xmlns='http://java.sun.com/xml/ns/j2ee' version='2.4'>
     2.9  out: 	<description>This is my Web App</description>
    2.10  out: 	<display-name>MyWebApp</display-name>
    2.11  out: 	<filter>
    2.12  out: 		<filter-name>Bob</filter-name>
    2.13 +out: 		<filter-class></filter-class>
    2.14  out: 	</filter>
    2.15  out: </web-app>
    2.16  Finished running TestWebApp: 0