1616
1717import test .jaxb .Root_NONE ;
1818
19+ /**
20+ * see notes in jaxb/Root_NONE.java
21+ *
22+ * @author hansonr
23+ *
24+ */
1925@ XmlRegistry
2026public class Test_JAXB_NONE extends Test_ {
2127
28+ // Java read out:
29+ // getPropertyC is =getproPERtyC:propertyC01
30+ // getAToBe
31+ // getAToBe
32+ // getAToBe
33+ // isB2()
34+ // getB3()
35+ // private!getC
36+ // private!getC
37+ // private!getC
38+ // getPropertyAToBe
39+ // getPropertyAToBe
40+ // getPropertyAToBe
41+ //
42+ // <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
43+ // <ns2:RootNone xmlns:ns2="www.jalview.org" ang="?" pi1A="0" pi2A="0" pi3A="3">
44+ // <propertyC>propertyC0</propertyC>
45+ // <AToBe>getAtoBe</AToBe>
46+ // <b2>true</b2>
47+ // <b3>true</b3>
48+ // <c>getC</c>
49+ // <propertyAToBe>getPropertyAtoB</propertyAToBe>
50+ // <propc>=getproPERtyC:propertyC01</propc>
51+ // <propertyc>=getpropertyc:propertyC0</propertyc>
52+ // </ns2:RootNone>
53+ //
54+ // setAToBe:getAtoBe
55+ // setB2()
56+ // setB3()
57+ // private!setC
58+ // setPropertyAToBe:getPropertyAtoB
59+ // setProPERtyC:=getproPERtyC:propertyC01
60+ // setpropertyc:=getpropertyc:propertyC0
61+ // getPropertyAng[].length is 3
62+ // Test_JAXB_NONE OK
63+
64+ // JavaScript read out:
65+ // getPropertyC is =getproPERtyC:propertyC01
66+ // private!getC
67+ // isB2()
68+ // getB3()
69+ // getAToBe
70+ // getPropertyAToBe
71+ //
72+ // <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
73+ // <ns2:RootNone xmlns="www.jalview.org" xmlns:ns2="www.jalview.org" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" Ang="Å" pi1a="0" pi2a="0" pi3a="3">
74+ // <propertyC>propertyC0</propertyC>
75+ // <c>getC</c>
76+ // <propc>=getproPERtyC:propertyC01</propc>
77+ // <propertyc>=getpropertyc:propertyC0</propertyc>
78+ // <b2>true</b2>
79+ // <b3>true</b3>
80+ // <aToBe>getAtoBe</aToBe>
81+ // <propertyAToBe>=getPropertyAtoB</propertyAToBe>
82+ // </ns2:RootNone>
83+ // private!setC
84+ // setProPERtyC:=getproPERtyC:propertyC01
85+ // setpropertyc:=getpropertyc:propertyC0
86+ // setB2()
87+ // setB3()
88+ // setAToBe:getAtoBe
89+ // setPropertyAToBe:=getPropertyAtoB
90+ // getPropertyAng[].length is 3
91+ // Test_JAXB_NONE OK
92+
2293 @ XmlElementDecl (namespace = "www.jalview.org" , name = "Root" )
2394 public static JAXBElement <Root_NONE > createRootModel (Root_NONE value ) {
2495 return new JAXBElement <Root_NONE >(new QName ("www.jalview.org" , "Root" ), Root_NONE .class , null , value );
@@ -29,9 +100,8 @@ public static void main(String[] args) {
29100 try {
30101 jc = JAXBContext .newInstance (Root_NONE .class );
31102
32- Root_NONE root = new Root_NONE ();
33- System .out .println ("c is " + root .C ());
34- System .out .println ("getPropertyC is " + root .getPropertyC ());
103+ Root_NONE root = new Root_NONE ("test" );
104+ System .out .println ("getPropertyC is " + root .getproPERtyC ());
35105 Marshaller marshaller = jc .createMarshaller ();
36106 marshaller .setProperty (Marshaller .JAXB_FORMATTED_OUTPUT , true );
37107 ByteArrayOutputStream bos = new ByteArrayOutputStream ();
@@ -45,9 +115,6 @@ public static void main(String[] args) {
45115 ByteArrayInputStream is = new ByteArrayInputStream (s .getBytes ("UTF-8" ));
46116 Root_NONE r = (Root_NONE ) unmarshaller .unmarshal (is );
47117 assert (r .getPropertyAng ().equals ("\u212B " ));
48- System .out .println ("PropertyC is " + r .PC ());
49- System .out .println ("propertyc is " + r .pc ());
50- System .out .println ("propertyC is " + r .pC ());
51118 System .out .println ("getPropertyAng[].length is " + r .getPropertyAng ().getBytes ("utf-8" ).length );
52119 } catch (UnsupportedEncodingException e ) {
53120 // TODO Auto-generated catch block
0 commit comments