Add _setSchemaLocation and _getSchemaLocation to BaseBean generated beans. BLD200303251330
authorcliffwd@netbeans.org
Tue, 25 Mar 2003 01:17:38 +0000
changeset 12528aa2bbe34d3f
parent 1251 c8b8619f64aa
child 1253 5879cf9fd75a
Add _setSchemaLocation and _getSchemaLocation to BaseBean generated beans.
Respect mutually exclusive elements more forcefully now. If you have a schema with (A|B|C) and setA is called, then setB(null) and setC(null) are called automatically.
schema2beans/test/unit/src/data/TestWebAppDelegatorBaseBean.java
schema2beans/test/unit/src/data/goldenfiles/TestMain/testWebAppDelegatorBaseBean.pass
     1.1 --- a/schema2beans/test/unit/src/data/TestWebAppDelegatorBaseBean.java	Mon Mar 24 13:35:37 2003 +0000
     1.2 +++ b/schema2beans/test/unit/src/data/TestWebAppDelegatorBaseBean.java	Tue Mar 25 01:17:38 2003 +0000
     1.3 @@ -122,5 +122,8 @@
     1.4          check("thing1".equals(webApp.getThing().getFilterName()), "thing1");
     1.5          check("thing2".equals(webApp.getThing2().getFilterName()), "thing2");
     1.6          check("thing3".equals(webApp.getThing3().getFilterName()), "thing3");
     1.7 +
     1.8 +        webApp._setSchemaLocation("http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd");
     1.9 +        webApp.write(out);
    1.10      }
    1.11  }
     2.1 --- a/schema2beans/test/unit/src/data/goldenfiles/TestMain/testWebAppDelegatorBaseBean.pass	Mon Mar 24 13:35:37 2003 +0000
     2.2 +++ b/schema2beans/test/unit/src/data/goldenfiles/TestMain/testWebAppDelegatorBaseBean.pass	Tue Mar 25 01:17:38 2003 +0000
     2.3 @@ -395,4 +395,36 @@
     2.4  out: TestWebAppDelegatorBaseBean null thing1 -> OK
     2.5  out: TestWebAppDelegatorBaseBean null thing2 -> OK
     2.6  out: TestWebAppDelegatorBaseBean null thing3 -> OK
     2.7 +out: <?xml version="1.0" encoding="UTF-8"?>
     2.8 +out: <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
     2.9 +out:   <description xml:lang="en">Changed the description</description>
    2.10 +out:   <description xml:lang="de">Das ist mein App.</description>
    2.11 +out:   <display-name>MyWebApp</display-name>
    2.12 +out:   <filter>
    2.13 +out:     <filter-name>Bob</filter-name>
    2.14 +out:     <filter-class>foo</filter-class>
    2.15 +out:   </filter>
    2.16 +out:   <thing>
    2.17 +out:     <filter-name>thing1</filter-name>
    2.18 +out:     <filter-class>A</filter-class>
    2.19 +out:   </thing>
    2.20 +out:   <thing>
    2.21 +out:     <filter-name>thing2</filter-name>
    2.22 +out:     <filter-class>B</filter-class>
    2.23 +out:   </thing>
    2.24 +out:   <thing>
    2.25 +out:     <filter-name>thing3</filter-name>
    2.26 +out:     <filter-class>C</filter-class>
    2.27 +out:   </thing>
    2.28 +out:   <security-constraint>
    2.29 +out:     <web-resource-collection>
    2.30 +out:       <web-resource-name>blue</web-resource-name>
    2.31 +out:       <url-pattern>*.html</url-pattern>
    2.32 +out:     </web-resource-collection>
    2.33 +out:     <auth-constraint>
    2.34 +out:       <goodPresidentCandidate>true</goodPresidentCandidate>
    2.35 +out:       <goodPresidentCandidate>false</goodPresidentCandidate>
    2.36 +out:     </auth-constraint>
    2.37 +out:   </security-constraint>
    2.38 +out: </web-app>
    2.39  Finished running TestWebAppDelegatorBaseBean: 0