simple-xml-2.3.2/0000755000175000017500000000000011342530531014464 5ustar sylvestresylvestresimple-xml-2.3.2/LICENSE.txt0000644000175000017500000002645011342530527016323 0ustar sylvestresylvestre Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. simple-xml-2.3.2/test/0000755000175000017500000000000011344247751015456 5ustar sylvestresylvestresimple-xml-2.3.2/test/build.xml0000644000175000017500000000571211342530527017276 0ustar sylvestresylvestre simple-xml-2.3.2/test/report/0000755000175000017500000000000011344247751016771 5ustar sylvestresylvestresimple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.stream.NodeWriterTest.txt0000644000175000017500000000473711342531437031324 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.stream.NodeWriterTest Tests run: 4, Failures: 0, Errors: 0, Time elapsed: 0.048 sec ------------- Standard Output --------------- I am a child of the child-of-root element and a grand child of the root element I am a sibling to child-of-root this element is a child of root some value for first child test valuesome value for second child some text for grand-child ------------- ---------------- --------------- ------------- Standard Error ----------------- org.simpleframework.xml.stream.NodeException: No root node at org.simpleframework.xml.stream.OutputDocument.commit(OutputDocument.java:332) at org.simpleframework.xml.stream.NodeWriterTest.testEarlyCommit(NodeWriterTest.java:15) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:421) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:912) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:766) ------------- ---------------- --------------- Testcase: testEarlyCommit took 0.018 sec Testcase: testBasicWrite took 0.02 sec Testcase: testWrite took 0.002 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.convert.ScannerBuilderTest.txt0000644000175000017500000000025111342531261032305 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.convert.ScannerBuilderTest Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.032 sec Testcase: testScannerBuilder took 0.028 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.transform.CurrencyTransformTest.txt0000644000175000017500000000025011342531441033425 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.transform.CurrencyTransformTest Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.008 sec Testcase: testCurrency took 0.002 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.SubstituteTest.txt0000644000175000017500000001331011342531371031032 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.SubstituteTest Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.268 sec ------------- Standard Output --------------- some example text some example text some example text >>>>> ELEMENT=[element substitute-example] >>>>> TYPE=[class org.simpleframework.xml.core.SubstituteTest$SubstituteExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] some example text >>>>> ELEMENT=[element SubstituteExample] >>>>> TYPE=[class org.simpleframework.xml.core.SubstituteTest$SubstituteExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] some example text some example text some example text >>>>> ELEMENT=[element substitute-example] >>>>> TYPE=[class org.simpleframework.xml.core.SubstituteTest$SubstituteExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] some example text >>>>> ELEMENT=[element SubstituteExample] >>>>> TYPE=[class org.simpleframework.xml.core.SubstituteTest$SubstituteExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] some example text some example text some example text >>>>> ELEMENT=[element substitute-example] >>>>> TYPE=[class org.simpleframework.xml.core.SubstituteTest$SubstituteExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] some example text >>>>> ELEMENT=[element SubstituteExample] >>>>> TYPE=[class org.simpleframework.xml.core.SubstituteTest$SubstituteExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] some example text some example text some example text >>>>> ELEMENT=[element substitute-example] >>>>> TYPE=[class org.simpleframework.xml.core.SubstituteTest$SubstituteExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] some example text >>>>> ELEMENT=[element SubstituteExample] >>>>> TYPE=[class org.simpleframework.xml.core.SubstituteTest$SubstituteExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ------------- ---------------- --------------- Testcase: testReplace took 0.211 sec Testcase: testResolve took 0.051 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.EnumTest.txt0000644000175000017500000000027111342531301027556 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.EnumTest Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.154 sec Testcase: testEnum took 0.142 sec Testcase: testVargsEnum took 0.008 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.transform.TimeZoneTransformTest.txt0000644000175000017500000000025011342531445033371 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.transform.TimeZoneTransformTest Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.008 sec Testcase: testTimeZone took 0.003 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.ScatterTest.txt0000644000175000017500000002600511342531364030273 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.ScatterTest Tests run: 6, Failures: 0, Errors: 0, Time elapsed: 0.412 sec ------------- Standard Output --------------- Some example message 1.0 2.0 3.0 Example 1 Example 2 Example 3 Some example message 1.0 2.0 3.0 Example 1 Example 2 Example 3 Some example message 1.0 2.0 3.0 Example 1 Example 2 Example 3 >>>>> ELEMENT=[element test] >>>>> TYPE=[class org.simpleframework.xml.core.ScatterTest$InlineTextList] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] Some example message 1.0 2.0 3.0 Example 1 Example 2 Example 3 >>>>> ELEMENT=[element Test] >>>>> TYPE=[class org.simpleframework.xml.core.ScatterTest$InlineTextList] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] Some example message 1.0 2.0 3.0 Example 1 Example 2 Example 3 Some example message 1.0 2.0 3.0 Example 1 Example 2 Example 3 Some example message 1.0 2.0 3.0 Example 1 Example 2 Example 3 >>>>> ELEMENT=[element test] >>>>> TYPE=[class org.simpleframework.xml.core.ScatterTest$InlineTextList] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] Some example message 1.0 2.0 3.0 Example 1 Example 2 Example 3 >>>>> ELEMENT=[element Test] >>>>> TYPE=[class org.simpleframework.xml.core.ScatterTest$InlineTextList] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] Some example message Example 1 Example 2 Example 3 Some example message Example 1 Example 2 Example 3 Some example message Example 1 Example 2 Example 3 >>>>> ELEMENT=[element test] >>>>> TYPE=[class org.simpleframework.xml.core.ScatterTest$InlinePrimitiveList] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] Some example message Example 1 Example 2 Example 3 >>>>> ELEMENT=[element Test] >>>>> TYPE=[class org.simpleframework.xml.core.ScatterTest$InlinePrimitiveList] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] Some example message Example 1 Example 2 Example 3 Some example message Example 1 Example 2 Example 3 Some example message Example 1 Example 2 Example 3 >>>>> ELEMENT=[element test] >>>>> TYPE=[class org.simpleframework.xml.core.ScatterTest$InlinePrimitiveList] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] Some example message Example 1 Example 2 Example 3 >>>>> ELEMENT=[element Test] >>>>> TYPE=[class org.simpleframework.xml.core.ScatterTest$InlinePrimitiveList] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] >>>>> ELEMENT=[element test] >>>>> TYPE=[class org.simpleframework.xml.core.ScatterTest$InlineNamedList] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] >>>>> ELEMENT=[element Test] >>>>> TYPE=[class org.simpleframework.xml.core.ScatterTest$InlineNamedList] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] >>>>> ELEMENT=[element simple-inline-list] >>>>> TYPE=[class org.simpleframework.xml.core.ScatterTest$SimpleInlineList] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] >>>>> ELEMENT=[element SimpleInlineList] >>>>> TYPE=[class org.simpleframework.xml.core.ScatterTest$SimpleInlineList] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] test test test >>>>> ELEMENT=[element simple-primitive-inline-list] >>>>> TYPE=[class org.simpleframework.xml.core.ScatterTest$SimplePrimitiveInlineList] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] test >>>>> ELEMENT=[element SimplePrimitiveInlineList] >>>>> TYPE=[class org.simpleframework.xml.core.ScatterTest$SimplePrimitiveInlineList] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ------------- ---------------- --------------- Testcase: testList took 0.272 sec Testcase: testPrimitiveList took 0.056 sec Testcase: testInlineNamedList took 0.037 sec Testcase: testSimpleList took 0.018 sec Testcase: testSimplePrimitiveList took 0.021 sec Testcase: testDirectory took 0.001 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.StyleTest.txt0000644000175000017500000004771211342531371027774 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.StyleTest Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.405 sec ------------- Standard Output --------------- one two three http://a.com/ http://b.com/ http://c.com/ example 4 example 5 example 6 example 9 example 6 example 7 example 8 http://a.com/ http://c.com/ http://b.com/ one two three http://a.com/ http://b.com/ http://c.com/ example 4 example 5 example 6 example 9 example 6 example 7 example 8 http://a.com/ http://c.com/ http://b.com/ one two three http://a.com/ http://b.com/ http://c.com/ example 4 example 5 example 6 example 9 example 6 example 7 example 8 http://a.com/ http://c.com/ http://b.com/ >>>>> ELEMENT=[element example] >>>>> TYPE=[class org.simpleframework.xml.core.StyleTest$CaseExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] one two three http://a.com/ http://b.com/ http://c.com/ example 4 example 5 example 6 example 9 example 6 example 7 example 8 http://a.com/ http://c.com/ http://b.com/ >>>>> ELEMENT=[element Example] >>>>> TYPE=[class org.simpleframework.xml.core.StyleTest$CaseExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] one two three http://a.com/ http://b.com/ http://c.com/ example 4 example 5 example 6 example 9 example 6 example 7 example 8 http://a.com/ http://c.com/ http://b.com/ one two three http://a.com/ http://b.com/ http://c.com/ example 4 example 5 example 6 example 9 example 6 example 7 example 8 http://a.com/ http://c.com/ http://b.com/ one two three http://a.com/ http://b.com/ http://c.com/ example 4 example 5 example 6 example 9 example 6 example 7 example 8 http://a.com/ http://c.com/ http://b.com/ >>>>> ELEMENT=[element example] >>>>> TYPE=[class org.simpleframework.xml.core.StyleTest$CaseExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] one two three http://a.com/ http://b.com/ http://c.com/ example 4 example 5 example 6 example 9 example 6 example 7 example 8 http://a.com/ http://c.com/ http://b.com/ >>>>> ELEMENT=[element Example] >>>>> TYPE=[class org.simpleframework.xml.core.StyleTest$CaseExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ------------- ---------------- --------------- ------------- Standard Error ----------------- one two three http://a.com/ http://b.com/ http://c.com/ example 4 example 5 example 6 example 9 example 6 example 7 example 8 http://a.com/ http://c.com/ http://b.com/ ------------- ---------------- --------------- Testcase: testCase took 0.397 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.PrimitiveKeyTest.txt0000644000175000017500000000112011342531357031300 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.PrimitiveKeyTest Tests run: 4, Failures: 0, Errors: 0, Time elapsed: 0.096 sec ------------- Standard Output --------------- example example ------------- ---------------- --------------- Testcase: testInlineString took 0.045 sec Testcase: testNotInlineString took 0.001 sec Testcase: testNoAttributeString took 0.044 sec Testcase: testAttributeNoKeyString took 0.002 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.CollectionEntryTest.txt0000644000175000017500000002034711342531267032010 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.CollectionEntryTest Tests run: 5, Failures: 0, Errors: 0, Time elapsed: 0.326 sec ------------- Standard Output --------------- one two three one two three one two three >>>>> ELEMENT=[element example-collection] >>>>> TYPE=[class org.simpleframework.xml.core.CollectionEntryTest$ExampleCollection] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] one two three >>>>> ELEMENT=[element ExampleCollection] >>>>> TYPE=[class org.simpleframework.xml.core.CollectionEntryTest$ExampleCollection] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] one two three one two three one two three >>>>> ELEMENT=[element example-inline-collection] >>>>> TYPE=[class org.simpleframework.xml.core.CollectionEntryTest$ExampleInlineCollection] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] one two three >>>>> ELEMENT=[element ExampleInlineCollection] >>>>> TYPE=[class org.simpleframework.xml.core.CollectionEntryTest$ExampleInlineCollection] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] a b c d a b c d a b c d >>>>> ELEMENT=[element example-primitive-inline-collection] >>>>> TYPE=[class org.simpleframework.xml.core.CollectionEntryTest$ExamplePrimitiveInlineCollection] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] a b c d >>>>> ELEMENT=[element ExamplePrimitiveInlineCollection] >>>>> TYPE=[class org.simpleframework.xml.core.CollectionEntryTest$ExamplePrimitiveInlineCollection] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] a b c d a b c d a b c d >>>>> ELEMENT=[element example-primitive-collection] >>>>> TYPE=[class org.simpleframework.xml.core.CollectionEntryTest$ExamplePrimitiveCollection] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] a b c d >>>>> ELEMENT=[element ExamplePrimitiveCollection] >>>>> TYPE=[class org.simpleframework.xml.core.CollectionEntryTest$ExamplePrimitiveCollection] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ------------- ---------------- --------------- Testcase: testExampleCollection took 0.21 sec Testcase: testExampleInlineCollection took 0.04 sec Testcase: testExamplePrimitiveInlineCollection took 0.029 sec Testcase: testExamplePrimitiveCollection took 0.038 sec Testcase: testDirectory took 0.001 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.transform.LocaleTransformTest.txt0000644000175000017500000000024411342531443033037 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.transform.LocaleTransformTest Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.007 sec Testcase: testLocale took 0.004 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.ValidateTest.txt0000644000175000017500000001746611342531375030434 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.ValidateTest Tests run: 5, Failures: 0, Errors: 0, Time elapsed: 0.155 sec ------------- Standard Error ----------------- org.simpleframework.xml.core.ValueRequiredException: Unable to satisfy @org.simpleframework.xml.Attribute(required=true, empty=, name=version) on field 'version' private org.simpleframework.xml.core.ValidateTest$Version org.simpleframework.xml.core.ValidateTest$TextEntry.version at line -1 at org.simpleframework.xml.core.Composite.validate(Composite.java:888) at org.simpleframework.xml.core.Composite.validateAttributes(Composite.java:735) at org.simpleframework.xml.core.Composite.validate(Composite.java:706) at org.simpleframework.xml.core.Composite.validate(Composite.java:683) at org.simpleframework.xml.core.Traverser.validate(Traverser.java:171) at org.simpleframework.xml.core.CompositeArray.validate(CompositeArray.java:212) at org.simpleframework.xml.core.CompositeArray.validate(CompositeArray.java:187) at org.simpleframework.xml.core.Composite.validate(Composite.java:862) at org.simpleframework.xml.core.Composite.validateElement(Composite.java:842) at org.simpleframework.xml.core.Composite.validateElements(Composite.java:763) at org.simpleframework.xml.core.Composite.validate(Composite.java:707) at org.simpleframework.xml.core.Composite.validate(Composite.java:683) at org.simpleframework.xml.core.Traverser.validate(Traverser.java:171) at org.simpleframework.xml.core.Persister.validate(Persister.java:1044) at org.simpleframework.xml.core.Persister.validate(Persister.java:1024) at org.simpleframework.xml.core.Persister.validate(Persister.java:1004) at org.simpleframework.xml.core.Persister.validate(Persister.java:938) at org.simpleframework.xml.core.Persister.validate(Persister.java:842) at org.simpleframework.xml.core.ValidateTest.testVersionMissing(ValidateTest.java:86) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:421) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:912) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:766) org.simpleframework.xml.core.ValueRequiredException: Unable to satisfy @org.simpleframework.xml.Attribute(required=true, empty=, name=name) on field 'name' private java.lang.String org.simpleframework.xml.core.ValidateTest$TextEntry.name at line -1 at org.simpleframework.xml.core.Composite.validate(Composite.java:888) at org.simpleframework.xml.core.Composite.validateAttributes(Composite.java:735) at org.simpleframework.xml.core.Composite.validate(Composite.java:706) at org.simpleframework.xml.core.Composite.validate(Composite.java:683) at org.simpleframework.xml.core.Traverser.validate(Traverser.java:171) at org.simpleframework.xml.core.CompositeArray.validate(CompositeArray.java:212) at org.simpleframework.xml.core.CompositeArray.validate(CompositeArray.java:187) at org.simpleframework.xml.core.Composite.validate(Composite.java:862) at org.simpleframework.xml.core.Composite.validateElement(Composite.java:842) at org.simpleframework.xml.core.Composite.validateElements(Composite.java:763) at org.simpleframework.xml.core.Composite.validate(Composite.java:707) at org.simpleframework.xml.core.Composite.validate(Composite.java:683) at org.simpleframework.xml.core.Traverser.validate(Traverser.java:171) at org.simpleframework.xml.core.Persister.validate(Persister.java:1044) at org.simpleframework.xml.core.Persister.validate(Persister.java:1024) at org.simpleframework.xml.core.Persister.validate(Persister.java:1004) at org.simpleframework.xml.core.Persister.validate(Persister.java:938) at org.simpleframework.xml.core.Persister.validate(Persister.java:842) at org.simpleframework.xml.core.ValidateTest.testNameMissing(ValidateTest.java:99) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:421) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:912) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:766) org.simpleframework.xml.core.PersistenceException: Element 'array' declared twice at line -1 at org.simpleframework.xml.core.Variable$Adapter.validate(Variable.java:382) at org.simpleframework.xml.core.Composite.validate(Composite.java:862) at org.simpleframework.xml.core.Composite.validateElement(Composite.java:842) at org.simpleframework.xml.core.Composite.validateElements(Composite.java:763) at org.simpleframework.xml.core.Composite.validate(Composite.java:707) at org.simpleframework.xml.core.Composite.validate(Composite.java:683) at org.simpleframework.xml.core.Traverser.validate(Traverser.java:171) at org.simpleframework.xml.core.Persister.validate(Persister.java:1044) at org.simpleframework.xml.core.Persister.validate(Persister.java:1024) at org.simpleframework.xml.core.Persister.validate(Persister.java:1004) at org.simpleframework.xml.core.Persister.validate(Persister.java:938) at org.simpleframework.xml.core.Persister.validate(Persister.java:842) at org.simpleframework.xml.core.ValidateTest.testExtraElement(ValidateTest.java:125) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:421) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:912) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:766) ------------- ---------------- --------------- Testcase: testVersionMissing took 0.131 sec Testcase: testNameMissing took 0.005 sec Testcase: testTextMissing took 0.005 sec Testcase: testExtraElement took 0.006 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.transform.DateFormatterTest.txt0000644000175000017500000000052111342531442032502 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.transform.DateFormatterTest Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.24 sec ------------- Standard Error ----------------- pool: 201, new: 1197, synchronized: 487------------- ---------------- --------------- Testcase: testFormatter took 0.02 sec Testcase: testPerformance took 0.218 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.convert.RegistryStrategyTest.txt0000644000175000017500000000116511342531260032744 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.convert.RegistryStrategyTest Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.194 sec ------------- Standard Output --------------- Kitty 2 ------------- ---------------- --------------- Testcase: testConverter took 0.19 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.MethodContactTest.txt0000644000175000017500000000023611342531313031412 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.MethodContactTest Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.072 sec Testcase: testContact took 0.069 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.ConversionTest.txt0000644000175000017500000000104511342531273031007 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.ConversionTest Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.362 sec ------------- Standard Output --------------- Kitty 2 ------------- ---------------- --------------- Testcase: testConverter took 0.355 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.strategy.ConverterMapTest.txt0000644000175000017500000001026611342531400032176 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.strategy.ConverterMapTest Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.242 sec ------------- Standard Output --------------- D A C F B E D A C F B E D A C F B E d D a A c C f F b B e E >>>>> ELEMENT=[element map-holder] >>>>> TYPE=[class org.simpleframework.xml.strategy.ConverterMapTest$MapHolder] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] d D a A c C f F b B e E >>>>> ELEMENT=[element MapHolder] >>>>> TYPE=[class org.simpleframework.xml.strategy.ConverterMapTest$MapHolder] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ------------- ---------------- --------------- Testcase: testMap took 0.235 sec Testcase: testDirectory took 0.001 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.util.WeakCacheTest.txt0000644000175000017500000000023011342531450030512 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.util.WeakCacheTest Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.423 sec Testcase: testCache took 0.419 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.convert.ConverterFactoryTest.txt0000644000175000017500000000024311342531257032712 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.convert.ConverterFactoryTest Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.01 sec Testcase: testFactory took 0.006 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.MapNullTest.txt0000644000175000017500000006517611342531311030242 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.MapNullTest Tests run: 10, Failures: 0, Errors: 0, Time elapsed: 0.581 sec ------------- Standard Output --------------- name.4
address.4
name.4
address.4
name.4
address.4
>>>>> ELEMENT=[element complex-map] >>>>> TYPE=[class org.simpleframework.xml.core.MapNullTest$ComplexMap] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] name.4
address.4
>>>>> ELEMENT=[element ComplexMap] >>>>> TYPE=[class org.simpleframework.xml.core.MapNullTest$ComplexMap] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] name.4
address.4
name.4
address.4
name.4
address.4
>>>>> ELEMENT=[element complex-map] >>>>> TYPE=[class org.simpleframework.xml.core.MapNullTest$ComplexMap] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] name.4
address.4
>>>>> ELEMENT=[element ComplexMap] >>>>> TYPE=[class org.simpleframework.xml.core.MapNullTest$ComplexMap] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] 3 3 3 3 3 3 >>>>> ELEMENT=[element complex-map] >>>>> TYPE=[class org.simpleframework.xml.core.MapNullTest$ComplexMap] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] 3 3 >>>>> ELEMENT=[element ComplexMap] >>>>> TYPE=[class org.simpleframework.xml.core.MapNullTest$ComplexMap] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] 3 3 3 3 3 3 >>>>> ELEMENT=[element complex-map] >>>>> TYPE=[class org.simpleframework.xml.core.MapNullTest$ComplexMap] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] 3 3 >>>>> ELEMENT=[element ComplexMap] >>>>> TYPE=[class org.simpleframework.xml.core.MapNullTest$ComplexMap] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] example
example
example
>>>>> ELEMENT=[element primitive-map] >>>>> TYPE=[class org.simpleframework.xml.core.MapNullTest$PrimitiveMap] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] example
>>>>> ELEMENT=[element PrimitiveMap] >>>>> TYPE=[class org.simpleframework.xml.core.MapNullTest$PrimitiveMap] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] example
example
example
>>>>> ELEMENT=[element primitive-map] >>>>> TYPE=[class org.simpleframework.xml.core.MapNullTest$PrimitiveMap] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] example
>>>>> ELEMENT=[element PrimitiveMap] >>>>> TYPE=[class org.simpleframework.xml.core.MapNullTest$PrimitiveMap] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] 4
4
4
>>>>> ELEMENT=[element primitive-map] >>>>> TYPE=[class org.simpleframework.xml.core.MapNullTest$PrimitiveMap] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] 4
>>>>> ELEMENT=[element PrimitiveMap] >>>>> TYPE=[class org.simpleframework.xml.core.MapNullTest$PrimitiveMap] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] 4
4
4
>>>>> ELEMENT=[element primitive-map] >>>>> TYPE=[class org.simpleframework.xml.core.MapNullTest$PrimitiveMap] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] 4
>>>>> ELEMENT=[element PrimitiveMap] >>>>> TYPE=[class org.simpleframework.xml.core.MapNullTest$PrimitiveMap] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] a 1 c b 2 4
a 1 c b 2 4
a 1 c b 2 4
>>>>> ELEMENT=[element primitive-map] >>>>> TYPE=[class org.simpleframework.xml.core.MapNullTest$PrimitiveMap] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] a 1 c b 2 4
>>>>> ELEMENT=[element PrimitiveMap] >>>>> TYPE=[class org.simpleframework.xml.core.MapNullTest$PrimitiveMap] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] name.1
address.1
1 1
name.2
address.2
2 2
name.4
address.4
3 3
name.1
address.1
1 1
name.2
address.2
2 2
name.4
address.4
3 3
name.1
address.1
1
name.2
address.2
2
name.4
address.4
3
>>>>> ELEMENT=[element complex-map] >>>>> TYPE=[class org.simpleframework.xml.core.MapNullTest$ComplexMap] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] name.1
address.1
1
name.2
address.2
2
name.4
address.4
3
>>>>> ELEMENT=[element ComplexMap] >>>>> TYPE=[class org.simpleframework.xml.core.MapNullTest$ComplexMap] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] name.1
address.1
1 1
name.2
address.2
2 2
name.4
address.4
3 3
name.1
address.1
1 1
name.2
address.2
2 2
name.4
address.4
3 3
name.1
address.1
1 1
name.2
address.2
2 2
name.4
address.4
3 3
>>>>> ELEMENT=[element complex-map] >>>>> TYPE=[class org.simpleframework.xml.core.MapNullTest$ComplexMap] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] name.1
address.1
1 1
name.2
address.2
2 2
name.4
address.4
3 3
>>>>> ELEMENT=[element ComplexMap] >>>>> TYPE=[class org.simpleframework.xml.core.MapNullTest$ComplexMap] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ------------- ---------------- --------------- Testcase: testEmptyCompositeValue took 0.21 sec Testcase: testEmptyCompositeBlankValue took 0.039 sec Testcase: testEmptyCompositeKey took 0.033 sec Testcase: testEmptyCompositeBlankKey took 0.032 sec Testcase: testEmptyPrimitiveValue took 0.049 sec Testcase: testEmptyPrimitiveBlankValue took 0.024 sec Testcase: testEmptyPrimitiveKey took 0.022 sec Testcase: testEmptyPrimitiveBlankKey took 0.02 sec Testcase: testNullValue took 0.145 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.PrimitiveArrayTest.txt0000644000175000017500000000027511342531356031637 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.PrimitiveArrayTest Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.093 sec Testcase: testZero took 0.085 sec Testcase: testTwo took 0.005 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.HierarchyTest.txt0000644000175000017500000000236311342531305030600 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.HierarchyTest Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.204 sec ------------- Standard Output --------------- a b 1 2 1 2.0 a b 1 2 1 2.0 a b 1 2 1 2.0 >>>>> ELEMENT=[element specialized] >>>>> TYPE=[class org.simpleframework.xml.core.HierarchyTest$Specialized] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] a b 1 2 1 2.0 >>>>> ELEMENT=[element Specialized] >>>>> TYPE=[class org.simpleframework.xml.core.HierarchyTest$Specialized] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ------------- ---------------- --------------- Testcase: testHierarchy took 0.198 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.convert.RegistryTest.txt0000644000175000017500000000023511342531260031216 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.convert.RegistryTest Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.018 sec Testcase: testRegistry took 0.014 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.AnonymousClassTest.txt0000644000175000017500000000030011342531262031627 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.AnonymousClassTest Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.008 sec Testcase: testA took 0.001 sec Testcase: testDirectory took 0.001 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.PrimitiveValueTest.txt0000644000175000017500000000114711342531360031627 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.PrimitiveValueTest Tests run: 4, Failures: 0, Errors: 0, Time elapsed: 0.054 sec ------------- Standard Output --------------- example example example example------------- ---------------- --------------- Testcase: testInlineString took 0.044 sec Testcase: testNotInlineString took 0.001 sec Testcase: testNoAttributeString took 0.001 sec Testcase: testAttributeNoKeyString took 0.002 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.strategy.PackageParserTest.txt0000644000175000017500000000043311342531404032300 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.strategy.PackageParserTest Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.159 sec ------------- Standard Output --------------- fast=81ms normal=65ms diff=0 ------------- ---------------- --------------- Testcase: testParser took 0.155 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.ConstructorInjectionTest.txt0000644000175000017500000001061711342531272033056 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.ConstructorInjectionTest Tests run: 5, Failures: 0, Errors: 0, Time elapsed: 0.292 sec ------------- Standard Output --------------- 12 text 12 text 12 text >>>>> ELEMENT=[element example] >>>>> TYPE=[class org.simpleframework.xml.core.ConstructorInjectionTest$Example] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] 12 text >>>>> ELEMENT=[element Example] >>>>> TYPE=[class org.simpleframework.xml.core.ConstructorInjectionTest$Example] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] 12 text 12 text 12 text >>>>> ELEMENT=[element example] >>>>> TYPE=[class org.simpleframework.xml.core.ConstructorInjectionTest$Example] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] 12 text >>>>> ELEMENT=[element Example] >>>>> TYPE=[class org.simpleframework.xml.core.ConstructorInjectionTest$Example] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] 12 12 12 >>>>> ELEMENT=[element example] >>>>> TYPE=[class org.simpleframework.xml.core.ConstructorInjectionTest$Example] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] 12 >>>>> ELEMENT=[element Example] >>>>> TYPE=[class org.simpleframework.xml.core.ConstructorInjectionTest$Example] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] entry one entry two entry three entry four entry five entry one entry two entry three entry four entry five entry one entry two entry three entry four entry five >>>>> ELEMENT=[element array-example] >>>>> TYPE=[class org.simpleframework.xml.core.ConstructorInjectionTest$ArrayExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] entry one entry two entry three entry four entry five >>>>> ELEMENT=[element ArrayExample] >>>>> TYPE=[class org.simpleframework.xml.core.ConstructorInjectionTest$ArrayExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ------------- ---------------- --------------- Testcase: testConstructor took 0.198 sec Testcase: testPartialConstructor took 0.024 sec Testcase: testBareConstructor took 0.023 sec Testcase: testArrayExample took 0.035 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.ContextualCallbackTest.txt0000644000175000017500000000056411342531272032431 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.ContextualCallbackTest Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.184 sec ------------- Standard Output --------------- default ------------- ---------------- --------------- Testcase: testReadCallbacks took 0.161 sec Testcase: testWriteCallbacks took 0.02 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.NamespaceDecoratorTest.txt0000644000175000017500000000120511342531323032413 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.NamespaceDecoratorTest Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.037 sec ------------- Standard Output --------------- this is the grand child ------------- ---------------- --------------- Testcase: testQualifier took 0.031 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.stream.StrategyTest.txt0000644000175000017500000000115311342531440031023 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.stream.StrategyTest Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.01 sec ------------- Standard Error ----------------- base-64-encoder base-64-encoder base-64-encoder base-64-encoder base-64-encoder base-64-encoder base-64-encoder URL-list base-64-encoder base-64-encoder base-64-encoder Base64Encoder Base64Encoder Base64Encoder Base64Encoder Base64Encoder Base64Encoder Base64Encoder URLList Base64Encoder Base64Encoder Base64Encoder ------------- ---------------- --------------- Testcase: testHyphenStrategy took 0.005 sec Testcase: testCamelCaseStrategy took 0.002 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.PrimitiveListTest.txt0000644000175000017500000000023211342531357031466 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.PrimitiveListTest Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.088 sec Testcase: testTwo took 0.084 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.MapTest.txt0000644000175000017500000013111011342531312027366 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.MapTest Tests run: 11, Failures: 0, Errors: 0, Time elapsed: 0.709 sec ------------- Standard Output --------------- d example 4 a example 1 c example 3 b example 2 d example 4 a example 1 c example 3 b example 2 d example 4 a example 1 c example 3 b example 2 >>>>> ELEMENT=[element entry-map] >>>>> TYPE=[class org.simpleframework.xml.core.MapTest$EntryMap] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] d example 4 a example 1 c example 3 b example 2 >>>>> ELEMENT=[element EntryMap] >>>>> TYPE=[class org.simpleframework.xml.core.MapTest$EntryMap] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] >>>>> ELEMENT=[element string-map] >>>>> TYPE=[class org.simpleframework.xml.core.MapTest$StringMap] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] >>>>> ELEMENT=[element StringMap] >>>>> TYPE=[class org.simpleframework.xml.core.MapTest$StringMap] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] name 3
address 3
c example 3
name 1
address 1
a example 1
name 2
address 2
b example 2
name 4
address 4
d example 4
name 3
address 3
c example 3
name 1
address 1
a example 1
name 2
address 2
b example 2
name 4
address 4
d example 4
name 3
address 3
c example 3
name 1
address 1
a example 1
name 2
address 2
b example 2
name 4
address 4
d example 4
>>>>> ELEMENT=[element complex-map] >>>>> TYPE=[class org.simpleframework.xml.core.MapTest$ComplexMap] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] name 3
address 3
c example 3
name 1
address 1
a example 1
name 2
address 2
b example 2
name 4
address 4
d example 4
>>>>> ELEMENT=[element ComplexMap] >>>>> TYPE=[class org.simpleframework.xml.core.MapTest$ComplexMap] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] one 1.0 two 2.0 four 4.0 three 3.0
one 1.0 two 2.0 four 4.0 three 3.0
one 1.0 two 2.0 four 4.0 three 3.0
>>>>> ELEMENT=[element primitive-map] >>>>> TYPE=[class org.simpleframework.xml.core.MapTest$PrimitiveMap] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] one 1.0 two 2.0 four 4.0 three 3.0
>>>>> ELEMENT=[element PrimitiveMap] >>>>> TYPE=[class org.simpleframework.xml.core.MapTest$PrimitiveMap] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] one 1.0 two 2.0 four 4.0 three 3.0 one 1.0 two 2.0 four 4.0 three 3.0 one 1.0 two 2.0 four 4.0 three 3.0 >>>>> ELEMENT=[element primitive-value-override-map] >>>>> TYPE=[class org.simpleframework.xml.core.MapTest$PrimitiveValueOverrideMap] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] one 1.0 two 2.0 four 4.0 three 3.0 >>>>> ELEMENT=[element PrimitiveValueOverrideMap] >>>>> TYPE=[class org.simpleframework.xml.core.MapTest$PrimitiveValueOverrideMap] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] one 1.0 two 2.0 four 4.0 three 3.0 one 1.0 two 2.0 four 4.0 three 3.0 one 1.0 two 2.0 four 4.0 three 3.0 >>>>> ELEMENT=[element primitive-value-key-override-map] >>>>> TYPE=[class org.simpleframework.xml.core.MapTest$PrimitiveValueKeyOverrideMap] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] one 1.0 two 2.0 four 4.0 three 3.0 >>>>> ELEMENT=[element PrimitiveValueKeyOverrideMap] >>>>> TYPE=[class org.simpleframework.xml.core.MapTest$PrimitiveValueKeyOverrideMap] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] name 3
address 3
c example 3
name 1
address 1
a example 1
name 2
address 2
b example 2
name 4
address 4
d example 4
name 3
address 3
c example 3
name 1
address 1
a example 1
name 2
address 2
b example 2
name 4
address 4
d example 4
name 3
address 3
c example 3
name 1
address 1
a example 1
name 2
address 2
b example 2
name 4
address 4
d example 4
>>>>> ELEMENT=[element complex-value-key-override-map] >>>>> TYPE=[class org.simpleframework.xml.core.MapTest$ComplexValueKeyOverrideMap] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] name 3
address 3
c example 3
name 1
address 1
a example 1
name 2
address 2
b example 2
name 4
address 4
d example 4
>>>>> ELEMENT=[element ComplexValueKeyOverrideMap] >>>>> TYPE=[class org.simpleframework.xml.core.MapTest$ComplexValueKeyOverrideMap] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] one 1.0 two 2.0 four 4.0 three 3.0 one 1.0 two 2.0 four 4.0 three 3.0 one 1.0 two 2.0 four 4.0 three 3.0 >>>>> ELEMENT=[element primitive-inline-map] >>>>> TYPE=[class org.simpleframework.xml.core.MapTest$PrimitiveInlineMap] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] one 1.0 two 2.0 four 4.0 three 3.0 >>>>> ELEMENT=[element PrimitiveInlineMap] >>>>> TYPE=[class org.simpleframework.xml.core.MapTest$PrimitiveInlineMap] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] a 1 c b 2 4
a 1 c b 2 4
a 1 c b 2 4
>>>>> ELEMENT=[element primitive-map] >>>>> TYPE=[class org.simpleframework.xml.core.MapTest$PrimitiveMap] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] a 1 c b 2 4
>>>>> ELEMENT=[element PrimitiveMap] >>>>> TYPE=[class org.simpleframework.xml.core.MapTest$PrimitiveMap] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] name.1
address.1
1 1
name.2
address.2
2 2
name.4
address.4
3 3
name.1
address.1
1 1
name.2
address.2
2 2
name.4
address.4
3 3
name.1
address.1
1
name.2
address.2
2
name.4
address.4
3
>>>>> ELEMENT=[element complex-map] >>>>> TYPE=[class org.simpleframework.xml.core.MapTest$ComplexMap] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] name.1
address.1
1
name.2
address.2
2
name.4
address.4
3
>>>>> ELEMENT=[element ComplexMap] >>>>> TYPE=[class org.simpleframework.xml.core.MapTest$ComplexMap] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] xyz foo, bar a, b, c TOKENIZED false true TOKENIZED false true xyz foo, bar a, b, c TOKENIZED false true TOKENIZED false true xyz foo, bar a, b, c TOKENIZED false true TOKENIZED false true >>>>> ELEMENT=[element index] >>>>> TYPE=[class org.simpleframework.xml.core.MapTest$IndexConfig] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] xyz foo, bar a, b, c TOKENIZED false true TOKENIZED false true >>>>> ELEMENT=[element Index] >>>>> TYPE=[class org.simpleframework.xml.core.MapTest$IndexConfig] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ------------- ---------------- --------------- Testcase: testEntryMap took 0.232 sec Testcase: testStringMap took 0.039 sec Testcase: testComplexMap took 0.074 sec Testcase: testPrimitiveMap took 0.049 sec Testcase: testPrimitiveValueOverrideMap took 0.055 sec Testcase: testPrimitiveValueKeyOverrideMap took 0.034 sec Testcase: testComplexValueKeyOverrideMap took 0.053 sec Testcase: testPrimitiveInlineMap took 0.029 sec Testcase: testNullValue took 0.089 sec Testcase: testIndexExample took 0.045 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.strategy.MapCycleTest.txt0000644000175000017500000002740211342531404031272 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.strategy.MapCycleTest Tests run: 4, Failures: 0, Errors: 0, Time elapsed: 0.342 sec ------------- Standard Output --------------- a example 1 b example 2 a example 1 b example 2 a example 1 b example 2 >>>>> ELEMENT=[element entry-map] >>>>> TYPE=[class org.simpleframework.xml.strategy.MapCycleTest$EntryMap] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] a example 1 b example 2 >>>>> ELEMENT=[element EntryMap] >>>>> TYPE=[class org.simpleframework.xml.strategy.MapCycleTest$EntryMap] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] name 3
address 3
b example 2
name 1
address 1
name 4
address 4
d example 4
name 3
address 3
b example 2
name 1
address 1
name 4
address 4
d example 4
name 3
address 3
b example 2
name 1
address 1
name 4
address 4
d example 4
>>>>> ELEMENT=[element complex-map] >>>>> TYPE=[class org.simpleframework.xml.strategy.MapCycleTest$ComplexMap] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] name 3
address 3
b example 2
name 1
address 1
name 4
address 4
d example 4
>>>>> ELEMENT=[element ComplexMap] >>>>> TYPE=[class org.simpleframework.xml.strategy.MapCycleTest$ComplexMap] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] one 1.0 two three 4.0 one 1.0 two three 4.0 one 1.0 two three 4.0 >>>>> ELEMENT=[element primitive-map] >>>>> TYPE=[class org.simpleframework.xml.strategy.MapCycleTest$PrimitiveMap] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] one 1.0 two three 4.0 >>>>> ELEMENT=[element PrimitiveMap] >>>>> TYPE=[class org.simpleframework.xml.strategy.MapCycleTest$PrimitiveMap] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ------------- ---------------- --------------- Testcase: testEntryMap took 0.23 sec Testcase: testComplexMap took 0.066 sec Testcase: testPrimitiveMap took 0.039 sec Testcase: testDirectory took 0.001 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.stream.StyleTest.txt0000644000175000017500000000114311342531440030320 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.stream.StyleTest Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.012 sec ------------- Standard Error ----------------- base-64-encoder base-64-encoder base-64-encoder base-64-encoder base-64-encoder base-64-encoder base-64-encoder URL-list base-64-encoder base-64-encoder base-64-encoder Base64Encoder Base64Encoder Base64Encoder Base64Encoder Base64Encoder Base64Encoder Base64Encoder URLList Base64Encoder Base64Encoder Base64Encoder ------------- ---------------- --------------- Testcase: testHyphenStyle took 0.005 sec Testcase: testCamelCaseStyle took 0.003 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.OriginalTest.txt0000644000175000017500000000026611342531327030432 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.OriginalTest Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.007 sec Testcase: testA took 0.001 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.transform.TimeTransformTest.txt0000644000175000017500000000550311342531445032543 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.transform.TimeTransformTest Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.289 sec ------------- Standard Output --------------- 2010-02-28 18:17:09.390 GMT 2010-02-28 18:17:09.390 GMT 2010-02-28 18:17:09.390 GMT >>>>> ELEMENT=[element time-example] >>>>> TYPE=[class org.simpleframework.xml.transform.TimeTransformTest$TimeExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] 2010-02-28 18:17:09.390 GMT >>>>> ELEMENT=[element TimeExample] >>>>> TYPE=[class org.simpleframework.xml.transform.TimeTransformTest$TimeExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ------------- ---------------- --------------- Testcase: testTime took 0.019 sec Testcase: testPersistence took 0.264 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.transform.FileTransformTest.txt0000644000175000017500000000024011342531443032513 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.transform.FileTransformTest Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.006 sec Testcase: testFile took 0.003 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.ErasureReflectorTest.txt0000644000175000017500000000031511342531302032126 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.ErasureReflectorTest Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.022 sec Testcase: testMethodReflection took 0.016 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.strategy.ArrayCycleTest.txt0000644000175000017500000002440211342531377031641 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.strategy.ArrayCycleTest Tests run: 4, Failures: 0, Errors: 0, Time elapsed: 0.341 sec ------------- Standard Output --------------- >>>>> ELEMENT=[element root] >>>>> TYPE=[class org.simpleframework.xml.strategy.ArrayCycleTest$ArrayCycleExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] >>>>> ELEMENT=[element Root] >>>>> TYPE=[class org.simpleframework.xml.strategy.ArrayCycleTest$ArrayCycleExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] Some text Example element text Some text Example element text Some text Example element text >>>>> ELEMENT=[element root] >>>>> TYPE=[class org.simpleframework.xml.strategy.ArrayCycleTest$NestedArrayCycleExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] Some text Example element text >>>>> ELEMENT=[element Root] >>>>> TYPE=[class org.simpleframework.xml.strategy.ArrayCycleTest$NestedArrayCycleExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] Example text Example text Example text >>>>> ELEMENT=[element value] >>>>> TYPE=[class org.simpleframework.xml.strategy.ArrayCycleTest$Value] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] Example text >>>>> ELEMENT=[element Value] >>>>> TYPE=[class org.simpleframework.xml.strategy.ArrayCycleTest$Value] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ------------- ---------------- --------------- Testcase: testCycle took 0.225 sec Testcase: testNestedExample took 0.079 sec Testcase: testPromotion took 0.028 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.MethodPartFactoryTest.txt0000644000175000017500000000024411342531313032254 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.MethodPartFactoryTest Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.034 sec Testcase: testMethodPart took 0.03 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.ReflectorTest.txt0000644000175000017500000000043611342531361030610 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.ReflectorTest Tests run: 4, Failures: 0, Errors: 0, Time elapsed: 0.014 sec Testcase: testCase took 0.003 sec Testcase: testFieldReflector took 0.005 sec Testcase: testCollectionReflector took 0.002 sec Testcase: testMapReflector took 0.001 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.util.ResolverTest.txt0000644000175000017500000001704211342531450030511 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.util.ResolverTest Tests run: 6, Failures: 0, Errors: 0, Time elapsed: 0.313 sec ------------- Standard Output --------------- >>>>> ELEMENT=[element test] >>>>> TYPE=[class org.simpleframework.xml.util.ResolverTest$ContentResolver] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] >>>>> ELEMENT=[element Test] >>>>> TYPE=[class org.simpleframework.xml.util.ResolverTest$ContentResolver] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] >>>>> ELEMENT=[element test] >>>>> TYPE=[class org.simpleframework.xml.util.ResolverTest$ContentResolver] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] >>>>> ELEMENT=[element Test] >>>>> TYPE=[class org.simpleframework.xml.util.ResolverTest$ContentResolver] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ------------- ---------------- --------------- Testcase: testResolver took 0.222 sec Testcase: testCache took 0.056 sec Testcase: testNoResolution took 0.004 sec Testcase: testNonGreedyMatch took 0.005 sec Testcase: testResolverCache took 0.017 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.TypeTest.txt0000644000175000017500000001603111342531373027605 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.TypeTest Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.296 sec ------------- Standard Output --------------- true 16 120 1234 1234.56 1234567 1234567.89 true 16 120 1234 1234.56 1234567 1234567.89 text value TWO true 16 120 1234 1234.56 1234567 1234567.89 true 16 120 1234 1234.56 1234567 1234567.89 text value TWO true 16 120 1234 1234.56 1234567 1234567.89 true 16 120 1234 1234.56 1234567 1234567.89 text value TWO >>>>> ELEMENT=[element test] >>>>> TYPE=[class org.simpleframework.xml.core.TypeTest$Entry] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] true 16 120 1234 1234.56 1234567 1234567.89 true 16 120 1234 1234.56 1234567 1234567.89 text value TWO >>>>> ELEMENT=[element Test] >>>>> TYPE=[class org.simpleframework.xml.core.TypeTest$Entry] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] true 16 120 1234 1234.56 1234567 1234567.89 true 16 120 1234 1234.56 1234567 1234567.89 text value TWO true 16 120 1234 1234.56 1234567 1234567.89 true 16 120 1234 1234.56 1234567 1234567.89 text value TWO true 16 120 1234 1234.56 1234567 1234567.89 true 16 120 1234 1234.56 1234567 1234567.89 text value TWO >>>>> ELEMENT=[element test] >>>>> TYPE=[class org.simpleframework.xml.core.TypeTest$Entry] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] true 16 120 1234 1234.56 1234567 1234567.89 true 16 120 1234 1234.56 1234567 1234567.89 text value TWO >>>>> ELEMENT=[element Test] >>>>> TYPE=[class org.simpleframework.xml.core.TypeTest$Entry] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ------------- ---------------- --------------- Testcase: testPrimitive took 0.288 sec Testcase: testDirectory took 0.001 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.stream.NodeBuilderTest.txt0000644000175000017500000000024211342531437031421 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.stream.NodeBuilderTest Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.069 sec Testcase: testNodeAdapter took 0.065 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.AnnotationHandlerTest.txt0000644000175000017500000000216011342531262032267 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.AnnotationHandlerTest Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.055 sec ------------- Standard Error ----------------- @org.simpleframework.xml.Element(required=true, name=, data=false) @org.simpleframework.xml.Element(required=true, data=false, name=) @org.simpleframework.xml.ElementList(required=true, inline=false, name=, type=void, empty=true, entry=, data=false) @org.simpleframework.xml.ElementList(inline=false, type=void, required=true, data=false, entry=, empty=true, name=) @org.simpleframework.xml.ElementMap(required=true, inline=false, keyType=void, valueType=void, value=, name=, key=, empty=true, entry=, data=false, attribute=false) @org.simpleframework.xml.ElementMap(key=, value=, inline=false, required=true, attribute=false, valueType=void, data=false, entry=, empty=true, name=, keyType=void) @org.simpleframework.xml.ElementArray(required=true, name=, empty=true, entry=, data=false) @org.simpleframework.xml.ElementArray(required=true, data=false, entry=, empty=true, name=) ------------- ---------------- --------------- Testcase: testHandler took 0.051 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.StrategyTest.txt0000644000175000017500000000052011342531367030465 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.StrategyTest Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.161 sec ------------- Standard Error ----------------- attribute-example-text ------------- ---------------- --------------- Testcase: testExampleStrategy took 0.157 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.stream.NodeReaderTest.txt0000644000175000017500000000042511342531437031240 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.stream.NodeReaderTest Tests run: 4, Failures: 0, Errors: 0, Time elapsed: 0.075 sec Testcase: testEmptySource took 0.062 sec Testcase: testSmallSource took 0.003 sec Testcase: testLargeSource took 0.002 sec Testcase: testSkip took 0.004 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.MissingGenericsTest.txt0000644000175000017500000000025011342531315031745 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.MissingGenericsTest Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.188 sec Testcase: testMissingGenerics took 0.183 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.transform.BigIntegerTransformTest.txt0000644000175000017500000000025411342531441033656 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.transform.BigIntegerTransformTest Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.008 sec Testcase: testBigInteger took 0.004 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.DefaultTest.txt0000644000175000017500000001051711342531276030255 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.DefaultTest Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.652 sec ------------- Standard Output --------------- Example 1 Example 2 Example 3 Example 1 Example 2 Example 3 Example 1 Example 2 Example 3 >>>>> ELEMENT=[element default-text-list] >>>>> TYPE=[class org.simpleframework.xml.core.DefaultTest$DefaultTextList] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] Example 1 Example 2 Example 3 >>>>> ELEMENT=[element DefaultTextList] >>>>> TYPE=[class org.simpleframework.xml.core.DefaultTest$DefaultTextList] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] Example 1 Example 2 Example 3 Example 1 Example 2 Example 3 Example 1 Example 2 Example 3 >>>>> ELEMENT=[element default-text-list] >>>>> TYPE=[class org.simpleframework.xml.core.DefaultTest$DefaultTextList] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] Example 1 Example 2 Example 3 >>>>> ELEMENT=[element DefaultTextList] >>>>> TYPE=[class org.simpleframework.xml.core.DefaultTest$DefaultTextList] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ------------- ---------------- --------------- Testcase: testList took 0.644 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.stream.NamespaceScopeTest.txt0000644000175000017500000000037011342531437032115 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.stream.NamespaceScopeTest Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.044 sec Testcase: testEmptyOverride took 0.029 sec Testcase: testDefaultFirst took 0.003 sec Testcase: testDirectory took 0.001 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.IndentTest.txt0000644000175000017500000000576211342531305030111 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.IndentTest Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.238 sec ------------- Standard Output ---------------
Some Title email@domain.com Name Surname
Some Title email@domain.com Name Surname
Some Title email@domain.com Name Surname
>>>>> ELEMENT=[element contact] >>>>> TYPE=[class org.simpleframework.xml.core.IndentTest$Contact] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl]
Some Title email@domain.com Name Surname
>>>>> ELEMENT=[element Contact] >>>>> TYPE=[class org.simpleframework.xml.core.IndentTest$Contact] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl]
Some Titleemail@domain.comName Surname
Some Titleemail@domain.comName Surname
Some Title email@domain.com Name Surname
>>>>> ELEMENT=[element contact] >>>>> TYPE=[class org.simpleframework.xml.core.IndentTest$Contact] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl]
Some Title email@domain.com Name Surname
>>>>> ELEMENT=[element Contact] >>>>> TYPE=[class org.simpleframework.xml.core.IndentTest$Contact] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ------------- ---------------- --------------- Testcase: testIndent took 0.198 sec Testcase: testNoIndent took 0.027 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.ScannerDefaultTest.txt0000644000175000017500000000432011342531363031557 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.ScannerDefaultTest Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.097 sec ------------- Standard Error ----------------- org.simpleframework.xml.core.MethodException: Annotations do not match for 'name' in class org.simpleframework.xml.core.ScannerDefaultTest$NonMatchingAnnotationExample at org.simpleframework.xml.core.MethodScanner.build(MethodScanner.java:428) at org.simpleframework.xml.core.MethodScanner.build(MethodScanner.java:391) at org.simpleframework.xml.core.MethodScanner.build(MethodScanner.java:370) at org.simpleframework.xml.core.MethodScanner.scan(MethodScanner.java:143) at org.simpleframework.xml.core.MethodScanner.(MethodScanner.java:123) at org.simpleframework.xml.core.Scanner.method(Scanner.java:639) at org.simpleframework.xml.core.Scanner.scan(Scanner.java:391) at org.simpleframework.xml.core.Scanner.(Scanner.java:115) at org.simpleframework.xml.core.ScannerDefaultTest.testNonMatchingAnnotationExample(ScannerDefaultTest.java:76) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:421) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:912) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:766) ------------- ---------------- --------------- Testcase: testNonMatchingAnnotationExample took 0.066 sec Testcase: testDuplicateExample took 0.022 sec Testcase: testScanner took 0.004 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.SimpleConstructorInjectionTest.txt0000644000175000017500000000044311342531364034226 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.SimpleConstructorInjectionTest Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.141 sec ------------- Standard Output --------------- message: null ------------- ---------------- --------------- Testcase: testConstructorInjection took 0.138 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.ExceptionTest.txt0000644000175000017500000000062711342531303030617 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.ExceptionTest Tests run: 7, Failures: 0, Errors: 0, Time elapsed: 0.189 sec Testcase: testValid took 0.155 sec Testcase: testNoAttribute took 0.005 sec Testcase: testNoElement took 0.002 sec Testcase: testExtraAttribute took 0.005 sec Testcase: testExtraElement took 0.004 sec Testcase: testMissingElement took 0.01 sec Testcase: testMissingAttribute took 0.002 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.EnumMapTest.txt0000644000175000017500000000651111342531300030216 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.EnumMapTest Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.224 sec ------------- Standard Output --------------- ONE 1 TWO 2 THREE 3 ONE 1 TWO 2 THREE 3 ONE 1 TWO 2 THREE 3 ONE 1 TWO 2 THREE 3 ONE 1 TWO 2 THREE 3 >>>>> ELEMENT=[element enum-map-example] >>>>> TYPE=[class org.simpleframework.xml.core.EnumMapTest$EnumMapExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ONE 1 TWO 2 THREE 3 >>>>> ELEMENT=[element EnumMapExample] >>>>> TYPE=[class org.simpleframework.xml.core.EnumMapTest$EnumMapExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ------------- ---------------- --------------- Testcase: testEnumMap took 0.218 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.transform.DateTransformTest.txt0000644000175000017500000001074611342531442032524 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.transform.DateTransformTest Tests run: 4, Failures: 0, Errors: 0, Time elapsed: 0.544 sec ------------- Standard Output --------------- 2010-02-28 18:17:06.380 GMT 2010-02-28 18:17:06.380 GMT 2010-02-28 18:17:06.380 GMT 2010-02-28 18:17:06.380 GMT 2010-02-28 18:17:06.380 GMT 2010-02-28 18:17:06.380 GMT 2010-02-28 18:17:06.380 GMT 2010-02-28 18:17:06.380 GMT 2010-02-28 18:17:06.380 GMT 2010-02-28 18:17:06.380 GMT 2010-02-28 18:17:06.380 GMT 2010-02-28 18:17:06.380 GMT >>>>> ELEMENT=[element date-example] >>>>> TYPE=[class org.simpleframework.xml.transform.DateTransformTest$DateExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] 2010-02-28 18:17:06.380 GMT 2010-02-28 18:17:06.380 GMT 2010-02-28 18:17:06.380 GMT 2010-02-28 18:17:06.380 GMT >>>>> ELEMENT=[element DateExample] >>>>> TYPE=[class org.simpleframework.xml.transform.DateTransformTest$DateExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] 2010-02-28 18:17:06.613 GMT 2010-02-28 18:17:06.613 GMT 2010-02-28 18:17:06.613 GMT >>>>> ELEMENT=[element date-example] >>>>> TYPE=[class org.simpleframework.xml.transform.DateTransformTest$DateExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] 2010-02-28 18:17:06.613 GMT >>>>> ELEMENT=[element DateExample] >>>>> TYPE=[class org.simpleframework.xml.transform.DateTransformTest$DateExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ------------- ---------------- --------------- Testcase: testDate took 0.018 sec Testcase: testPersistence took 0.232 sec Testcase: testCyclicPersistence took 0.285 sec Testcase: testDirectory took 0.001 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.DecoratorTest.txt0000644000175000017500000001637211342531274030616 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.DecoratorTest Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.317 sec ------------- Standard Output ---------------
14 High Steet London UK
14 Main Road London UK
14 High Steet London UK
14 Main Road London UK
14 High Steet London UK
14 Main Road
>>>>> ELEMENT=[element friend-list] >>>>> TYPE=[class org.simpleframework.xml.core.DecoratorTest$FriendList] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl]
14 High Steet London UK
14 Main Road
>>>>> ELEMENT=[element FriendList] >>>>> TYPE=[class org.simpleframework.xml.core.DecoratorTest$FriendList] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ------------- ---------------- --------------- Testcase: testDecorator took 0.313 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.MatcherTest.txt0000644000175000017500000000234011342531312030236 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.MatcherTest Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.188 sec ------------- Standard Output --------------- 12345 12345 12345 1 >>>>> ELEMENT=[element example] >>>>> TYPE=[class org.simpleframework.xml.core.MatcherTest$Example] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] 1 >>>>> ELEMENT=[element Example] >>>>> TYPE=[class org.simpleframework.xml.core.MatcherTest$Example] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ------------- ---------------- --------------- Testcase: testMatcher took 0.179 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.PerformanceTest.txt0000644000175000017500000011402211342531356031125 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.PerformanceTest Tests run: 5, Failures: 0, Errors: 0, Time elapsed: 22.145 sec ------------- Standard Output --------------- {no.override} {example.name} {example.path} Some example text where {example.name} is replaced with the system property value and the path is replaced with the path {example.path} this is the first element the second element the third elment value.1 value.2 value.1 value.2 value.4 value.4 value.5 {no.override} {example.name} {example.path} Some example text where {example.name} is replaced with the system property value and the path is replaced with the path {example.path} this is the first element the second element the third elment value.1 value.2 value.1 value.2 value.4 value.4 value.5 {no.override} {example.name} {example.path} Some example text where {example.name} is replaced with the system property value and the path is replaced with the path {example.path} this is the first element the second element the third elment value.1 value.2 value.1 value.2 value.4 value.4 value.5 {no.override} {example.name} {example.path} Some example text where {example.name} is replaced with the system property value and the path is replaced with the path {example.path} this is the first element the second element the third elment value.1 value.2 value.1 value.2 value.4 value.4 value.5 >>>>> ELEMENT=[element root] >>>>> TYPE=[class org.simpleframework.xml.core.PerformanceTest$RootEntry] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] {no.override} {example.name} {example.path} Some example text where {example.name} is replaced with the system property value and the path is replaced with the path {example.path} this is the first element the second element the third elment value.1 value.2 value.1 value.2 value.4 value.4 value.5 >>>>> ELEMENT=[element Root] >>>>> TYPE=[class org.simpleframework.xml.core.PerformanceTest$RootEntry] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] {no.override} {example.name} {example.path} Some example text where {example.name} is replaced with the system property value and the path is replaced with the path {example.path} this is the first element the second element the third elment value.1 value.2 value.1 value.2 value.4 value.4 value.5 some constant some name /some/path Some example text where some name is replaced with the system property value and the path is replaced with the path /some/path this is the first element the second element the third elment value.1 value.2 value.1 value.2 value.4 value.4 value.5 some constant some name /some/path Some example text where some name is replaced with the system property value and the path is replaced with the path /some/path this is the first element the second element the third elment value.1 value.2 value.1 value.2 value.4 value.4 value.5 some constant some name /some/path Some example text where some name is replaced with the system property value and the path is replaced with the path /some/path this is the first element the second element the third elment value.1 value.2 value.1 value.2 value.4 value.4 value.5 some constant some name /some/path Some example text where some name is replaced with the system property value and the path is replaced with the path /some/path this is the first element the second element the third elment value.1 value.2 value.1 value.2 value.4 value.4 value.5 >>>>> ELEMENT=[element root] >>>>> TYPE=[class org.simpleframework.xml.core.PerformanceTest$RootEntry] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] some constant some name /some/path Some example text where some name is replaced with the system property value and the path is replaced with the path /some/path this is the first element the second element the third elment value.1 value.2 value.1 value.2 value.4 value.4 value.5 >>>>> ELEMENT=[element Root] >>>>> TYPE=[class org.simpleframework.xml.core.PerformanceTest$RootEntry] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] some constant some name /some/path Some example text where some name is replaced with the system property value and the path is replaced with the path /some/path this is the first element the second element the third elment value.1 value.2 value.1 value.2 value.4 value.4 value.5 ${no.override} ${example.name} ${example.path} Some example text where ${example.name} is replaced with the system property value and the path is replaced with the path ${example.path} this is the first element the second element the third elment value.1 value.2 value.1 value.2 value.4 value.4 value.5 ${no.override} ${example.name} ${example.path} Some example text where ${example.name} is replaced with the system property value and the path is replaced with the path ${example.path} this is the first element the second element the third elment value.1 value.2 value.1 value.2 value.4 value.4 value.5 ${no.override} ${example.name} ${example.path} Some example text where ${example.name} is replaced with the system property value and the path is replaced with the path ${example.path} this is the first element the second element the third elment value.1 value.2 value.1 value.2 value.4 value.4 value.5 ${no.override} ${example.name} ${example.path} Some example text where ${example.name} is replaced with the system property value and the path is replaced with the path ${example.path} this is the first element the second element the third elment value.1 value.2 value.1 value.2 value.4 value.4 value.5 >>>>> ELEMENT=[element root] >>>>> TYPE=[class org.simpleframework.xml.core.PerformanceTest$RootEntry] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ${no.override} ${example.name} ${example.path} Some example text where ${example.name} is replaced with the system property value and the path is replaced with the path ${example.path} this is the first element the second element the third elment value.1 value.2 value.1 value.2 value.4 value.4 value.5 >>>>> ELEMENT=[element Root] >>>>> TYPE=[class org.simpleframework.xml.core.PerformanceTest$RootEntry] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ${no.override} ${example.name} ${example.path} Some example text where ${example.name} is replaced with the system property value and the path is replaced with the path ${example.path} this is the first element the second element the third elment value.1 value.2 value.1 value.2 value.4 value.4 value.5 >><< {example.name} {example.path} this is text>> some more<< this is the first element the second element the third elment value.1 value.2 value.1 value.2 value.4 value.4 value.5 >><< {example.name} {example.path} this is text>> some more<< this is the first element the second element the third elment value.1 value.2 value.1 value.2 value.4 value.4 value.5 >><< {example.name} {example.path} this is text>> some more<< this is the first element the second element the third elment value.1 value.2 value.1 value.2 value.4 value.4 value.5 >><< {example.name} {example.path} this is text>> some more<< this is the first element the second element the third elment value.1 value.2 value.1 value.2 value.4 value.4 value.5 >>>>> ELEMENT=[element root] >>>>> TYPE=[class org.simpleframework.xml.core.PerformanceTest$RootEntry] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] >><< {example.name} {example.path} this is text>> some more<< this is the first element the second element the third elment value.1 value.2 value.1 value.2 value.4 value.4 value.5 >>>>> ELEMENT=[element Root] >>>>> TYPE=[class org.simpleframework.xml.core.PerformanceTest$RootEntry] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] >><< {example.name} {example.path} this is text>> some more<< this is the first element the second element the third elment value.1 value.2 value.1 value.2 value.4 value.4 value.5 ------------- ---------------- --------------- ------------- Standard Error ----------------- Took '7607' ms to process 10000 documents Took '5852' ms to process 10000 documents with templates Took '5832' ms to process 10000 documents with an empty filter Took '2466' ms to write 10000 documents ------------- ---------------- --------------- Testcase: testBasicDocument took 7.851 sec Testcase: testTemplateDocument took 5.892 sec Testcase: testEmptyFilter took 5.895 sec Testcase: testBasicWrite took 2.497 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.convert.AnnotationStrategyTest.txt0000644000175000017500000000107111342531256033247 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.convert.AnnotationStrategyTest Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.19 sec ------------- Standard Output --------------- Old McDonald ------------- ---------------- --------------- Testcase: testAnnotationStrategy took 0.185 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.ReadOnlyTest.txt0000644000175000017500000000037611342531360030402 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.ReadOnlyTest Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.162 sec Testcase: testReadOnlyField took 0.145 sec Testcase: testReadOnlyMethod took 0.007 sec Testcase: testIllegalReadOnlyMethod took 0.006 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.strategy.AnnotationConverterTest.txt0000644000175000017500000000064211342531376033604 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.strategy.AnnotationConverterTest Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.394 sec ------------- Standard Output --------------- ------------- ---------------- --------------- Testcase: testAnnotationConversion took 0.387 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.stream.NamespaceAttributeTest.txt0000644000175000017500000000025011342531436033003 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.stream.NamespaceAttributeTest Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.072 sec Testcase: testAttributes took 0.068 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.filter.StackFilterTest.txt0000644000175000017500000000023511342531375031435 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.filter.StackFilterTest Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.009 sec Testcase: testFilter took 0.005 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.transform.ClassTransformTest.txt0000644000175000017500000000025311342531441032703 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.transform.ClassTransformTest Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.008 sec Testcase: testClassTransform took 0.002 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.EntryTest.txt0000644000175000017500000000022411342531300027750 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.EntryTest Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.031 sec Testcase: testEntry took 0.027 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.transform.TransformerTest.txt0000644000175000017500000000515611342531446032260 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.transform.TransformerTest Tests run: 24, Failures: 0, Errors: 0, Time elapsed: 0.047 sec ------------- Standard Error ----------------- org.simpleframework.xml.transform.InvalidFormatException: Cannot convert 'too long' to a character at org.simpleframework.xml.transform.CharacterTransform.read(CharacterTransform.java:56) at org.simpleframework.xml.transform.CharacterTransform.read(CharacterTransform.java:42) at org.simpleframework.xml.transform.Transformer.read(Transformer.java:104) at org.simpleframework.xml.transform.TransformerTest.testInvalidCharacter(TransformerTest.java:50) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:421) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:912) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:766) ------------- ---------------- --------------- Testcase: testInteger took 0.007 sec Testcase: testString took 0.001 sec Testcase: testCharacter took 0.001 sec Testcase: testInvalidCharacter took 0.008 sec Testcase: testFloat took 0.001 sec Testcase: testDouble took 0.001 sec Testcase: testBoolean took 0.001 sec Testcase: testLong took 0.002 sec Testcase: testShort took 0.001 sec Testcase: testPrimitiveIntegerArray took 0.003 sec Testcase: testPrimitiveLongArray took 0 sec Testcase: testPrimitiveShortArray took 0 sec Testcase: testPrimitiveByteArray took 0 sec Testcase: testPrimitiveFloatArray took 0 sec Testcase: testPrimitiveDoubleArray took 0 sec Testcase: testPrimitiveCharacterArray took 0.005 sec Testcase: testIntegerArray took 0 sec Testcase: testBooleanArray took 0 sec Testcase: testLongArray took 0 sec Testcase: testShortArray took 0 sec Testcase: testByteArray took 0 sec Testcase: testFloatArray took 0 sec Testcase: testDoubleArray took 0 sec Testcase: testCharacterArray took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.DefaultAnnotationTest.txt0000644000175000017500000000567711342531274032321 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.DefaultAnnotationTest Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.206 sec ------------- Standard Error ----------------- org.simpleframework.xml.core.MethodException: Annotations do not match for 'name' in class org.simpleframework.xml.core.DefaultAnnotationTest$TypeMisMatch at org.simpleframework.xml.core.MethodScanner.build(MethodScanner.java:428) at org.simpleframework.xml.core.MethodScanner.build(MethodScanner.java:391) at org.simpleframework.xml.core.MethodScanner.build(MethodScanner.java:370) at org.simpleframework.xml.core.MethodScanner.scan(MethodScanner.java:143) at org.simpleframework.xml.core.MethodScanner.(MethodScanner.java:123) at org.simpleframework.xml.core.Scanner.method(Scanner.java:639) at org.simpleframework.xml.core.Scanner.scan(Scanner.java:391) at org.simpleframework.xml.core.Scanner.(Scanner.java:115) at org.simpleframework.xml.core.ScannerFactory.getInstance(ScannerFactory.java:65) at org.simpleframework.xml.core.Support.getScanner(Support.java:170) at org.simpleframework.xml.core.Source.getScanner(Source.java:302) at org.simpleframework.xml.core.Source.getSchema(Source.java:348) at org.simpleframework.xml.core.Composite.read(Composite.java:183) at org.simpleframework.xml.core.Composite.read(Composite.java:133) at org.simpleframework.xml.core.Traverser.read(Traverser.java:92) at org.simpleframework.xml.core.Persister.read(Persister.java:602) at org.simpleframework.xml.core.Persister.read(Persister.java:583) at org.simpleframework.xml.core.Persister.read(Persister.java:564) at org.simpleframework.xml.core.Persister.read(Persister.java:501) at org.simpleframework.xml.core.Persister.read(Persister.java:410) at org.simpleframework.xml.core.DefaultAnnotationTest.testTypeMisMatch(DefaultAnnotationTest.java:123) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:421) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:912) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:766) ------------- ---------------- --------------- Testcase: testTypeMisMatch took 0.148 sec Testcase: testDefault took 0.053 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.OverrideTest.txt0000644000175000017500000000076711342531330030445 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.OverrideTest Tests run: 4, Failures: 0, Errors: 0, Time elapsed: 0.191 sec ------------- Standard Output --------------- replacement ------------- ---------------- --------------- Testcase: testComposite took 0.14 sec Testcase: testInterface took 0.005 sec Testcase: testList took 0.011 sec Testcase: testCopy took 0.03 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.InjectTest.txt0000644000175000017500000000022611342531305030072 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.InjectTest Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.138 sec Testcase: testInject took 0.134 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.transform.URLTransformTest.txt0000644000175000017500000000023611342531447032307 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.transform.URLTransformTest Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.011 sec Testcase: testURL took 0.007 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.CallbackTest.txt0000644000175000017500000000111011342531265030350 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.CallbackTest Tests run: 5, Failures: 0, Errors: 0, Time elapsed: 0.203 sec ------------- Standard Output --------------- default default ------------- ---------------- --------------- Testcase: testReadCallbacks took 0.157 sec Testcase: testWriteCallbacks took 0.027 sec Testcase: testExtendedReadCallbacks took 0.005 sec Testcase: testExtendedWriteCallbacks took 0.006 sec Testcase: testOverrideReadCallbacks took 0.003 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.EmptyMapEntryTest.txt0000644000175000017500000001273511342531277031454 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.EmptyMapEntryTest Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.242 sec ------------- Standard Output --------------- key1 value1 key3 key2 key4 key1 value1 key3 key2 key4 key1 value1 key3 key2 key4 >>>>> ELEMENT=[element simple-bug-1] >>>>> TYPE=[class org.simpleframework.xml.core.EmptyMapEntryTest$SimpleBug1] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] key1 value1 key3 key2 key4 >>>>> ELEMENT=[element SimpleBug1] >>>>> TYPE=[class org.simpleframework.xml.core.EmptyMapEntryTest$SimpleBug1] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ------------- ---------------- --------------- ------------- Standard Error ----------------- key1 value1 key3 key2 key4 ------------- ---------------- --------------- Testcase: testEmptyMapEntry took 0.235 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.StrictTest.txt0000644000175000017500000001361311342531370030134 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.StrictTest Tests run: 4, Failures: 0, Errors: 0, Time elapsed: 0.244 sec ------------- Standard Output --------------- value 1 value 2 value 3 123 value 1 value 2 value 3 123 value 1 value 2 value 3 123 >>>>> ELEMENT=[element root] >>>>> TYPE=[class org.simpleframework.xml.core.StrictTest$StrictExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] value 1 value 2 value 3 123 >>>>> ELEMENT=[element Root] >>>>> TYPE=[class org.simpleframework.xml.core.StrictTest$StrictExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] 123 test 123 test 123 test >>>>> ELEMENT=[element object] >>>>> TYPE=[class org.simpleframework.xml.core.StrictTest$NamedStrictObject] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] 123 test >>>>> ELEMENT=[element Object] >>>>> TYPE=[class org.simpleframework.xml.core.StrictTest$NamedStrictObject] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ------------- ---------------- --------------- ------------- Standard Error ----------------- org.simpleframework.xml.core.ValueRequiredException: Unable to satisfy @org.simpleframework.xml.Element(required=true, data=false, name=name) on field 'name' private java.lang.String org.simpleframework.xml.core.StrictTest$NamedStrictObject.name for class org.simpleframework.xml.core.StrictTest$NamedStrictObject at line -1 at org.simpleframework.xml.core.Composite.validate(Composite.java:651) at org.simpleframework.xml.core.Composite.readElements(Composite.java:468) at org.simpleframework.xml.core.Composite.read(Composite.java:350) at org.simpleframework.xml.core.Composite.readDefault(Composite.java:245) at org.simpleframework.xml.core.Composite.read(Composite.java:215) at org.simpleframework.xml.core.Composite.read(Composite.java:185) at org.simpleframework.xml.core.Composite.read(Composite.java:133) at org.simpleframework.xml.core.Traverser.read(Traverser.java:92) at org.simpleframework.xml.core.Persister.read(Persister.java:602) at org.simpleframework.xml.core.Persister.read(Persister.java:583) at org.simpleframework.xml.core.Persister.read(Persister.java:564) at org.simpleframework.xml.core.Persister.read(Persister.java:501) at org.simpleframework.xml.core.Persister.read(Persister.java:410) at org.simpleframework.xml.core.StrictTest.testNamedStrictMissingName(StrictTest.java:119) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:421) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:912) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:766) ------------- ---------------- --------------- Testcase: testStrict took 0.206 sec Testcase: testNamedStrict took 0.024 sec Testcase: testNamedStrictMissingName took 0.007 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.AnnotationProviderTest.txt0000644000175000017500000000024411342531262032505 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.AnnotationProviderTest Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.022 sec Testcase: testProvider took 0.018 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.ErasureHandlingTest.txt0000644000175000017500000012412411342531302031732 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.ErasureHandlingTest Tests run: 6, Failures: 0, Errors: 0, Time elapsed: 0.498 sec ------------- Standard Output --------------- a A 1 b B 2 c C 3 1 1 A 1 2 2 B 2 3 3 C 3 a A 1 b B 2 c C 3 1 1 A 1 2 2 B 2 3 3 C 3 a A 1 b B 2 c C 3 1 1 A 1 2 2 B 2 3 3 C 3 a A 1 b B 2 c C 3 >>>>> ELEMENT=[element erasure-example] >>>>> TYPE=[class org.simpleframework.xml.core.ErasureHandlingTest$ErasureExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] a A 1 b B 2 c C 3 >>>>> ELEMENT=[element ErasureExample] >>>>> TYPE=[class org.simpleframework.xml.core.ErasureHandlingTest$ErasureExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] a 2.0 b 1.2 c 5.4 7.8 8.7 1.2 2.1 3.1 1.3 a 2.0 b 1.2 c 5.4 7.8 8.7 1.2 2.1 3.1 1.3 a 2.0 b 1.2 c 5.4 7.8 8.7 1.2 2.1 3.1 1.3 a 2.0 b 1.2 c 5.4 7.8 8.7 1.2 2.1 3.1 1.3 >>>>> ELEMENT=[element erasure-example] >>>>> TYPE=[class org.simpleframework.xml.core.ErasureHandlingTest$ErasureExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] a 2.0 b 1.2 c 5.4 7.8 8.7 1.2 2.1 3.1 1.3 >>>>> ELEMENT=[element ErasureExample] >>>>> TYPE=[class org.simpleframework.xml.core.ErasureHandlingTest$ErasureExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] a A b B c C A B B C C D a A b B c C A B B C C D a A b B c C A B B C C D a A b B c C D >>>>> ELEMENT=[element erasure-example] >>>>> TYPE=[class org.simpleframework.xml.core.ErasureHandlingTest$ErasureExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] a A b B c C D >>>>> ELEMENT=[element ErasureExample] >>>>> TYPE=[class org.simpleframework.xml.core.ErasureHandlingTest$ErasureExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] A 1 B 2 C 3 A 1 B 2 C 3 A 1 B 2 C 3 A 1 B 2 C 3 A 1 B 2 C 3 >>>>> ELEMENT=[element erasure-with-map-inline-value-is-ignored-example] >>>>> TYPE=[class org.simpleframework.xml.core.ErasureHandlingTest$ErasureWithMapInlineValueIsIgnoredExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] A 1 B 2 C 3 >>>>> ELEMENT=[element ErasureWithMapInlineValueIsIgnoredExample] >>>>> TYPE=[class org.simpleframework.xml.core.ErasureHandlingTest$ErasureWithMapInlineValueIsIgnoredExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ------------- ---------------- --------------- ------------- Standard Error ----------------- org.simpleframework.xml.core.ElementException: Can not have class java.lang.Object as an attribute at org.simpleframework.xml.core.CompositeKey.write(CompositeKey.java:220) at org.simpleframework.xml.core.CompositeMap.write(CompositeMap.java:257) at org.simpleframework.xml.core.Composite.writeElement(Composite.java:1172) at org.simpleframework.xml.core.Composite.writeElement(Composite.java:1153) at org.simpleframework.xml.core.Composite.writeElements(Composite.java:1034) at org.simpleframework.xml.core.Composite.write(Composite.java:940) at org.simpleframework.xml.core.Composite.write(Composite.java:916) at org.simpleframework.xml.core.Traverser.write(Traverser.java:236) at org.simpleframework.xml.core.Traverser.write(Traverser.java:208) at org.simpleframework.xml.core.Traverser.write(Traverser.java:186) at org.simpleframework.xml.core.Persister.write(Persister.java:1099) at org.simpleframework.xml.core.Persister.write(Persister.java:1081) at org.simpleframework.xml.core.Persister.write(Persister.java:1062) at org.simpleframework.xml.core.Persister.write(Persister.java:1178) at org.simpleframework.xml.core.Persister.write(Persister.java:1160) at org.simpleframework.xml.core.Persister.write(Persister.java:1141) at org.simpleframework.xml.core.ErasureHandlingTest.testErasureWithMapAttributeIllegalExample(ErasureHandlingTest.java:150) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:421) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:912) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:766) ------------- ---------------- --------------- Testcase: testErasure took 0.3 sec Testcase: testPrimitiveErasure took 0.054 sec Testcase: testEnumErasure took 0.054 sec Testcase: testErasureWithMapAttributeIllegalExample took 0.004 sec Testcase: testErasureWithMapInlineValueIsIgnoredExample took 0.08 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.convert.RegistryCycleStrategyTest.txt0000644000175000017500000000147611342531260033731 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.convert.RegistryCycleStrategyTest Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.177 sec ------------- Standard Output --------------- Kitty 10 ------------- ---------------- --------------- Testcase: testCycle took 0.173 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.MethodScannerDefaultTest.txt0000644000175000017500000000057711342531313032725 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.MethodScannerDefaultTest Tests run: 5, Failures: 0, Errors: 0, Time elapsed: 0.088 sec Testcase: testNoAnnotationsWithNoDefaults took 0.009 sec Testcase: testMixedAnnotationsWithNoDefaults took 0.038 sec Testcase: testExtendedAnnotations took 0.025 sec Testcase: testMixedAnnotations took 0.006 sec Testcase: testNoAnnotations took 0.005 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.MultiElementMapTest.txt0000644000175000017500000000604211342531316031724 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.MultiElementMapTest Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.249 sec ------------- Standard Output --------------- int-value 42 boolean-value true string-value hello world int-value 42 boolean-value true string-value hello world int-value 42 boolean-value true string-value hello world >>>>> ELEMENT=[element properties] >>>>> TYPE=[class org.simpleframework.xml.core.MultiElementMapTest$Properties] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] int-value 42 boolean-value true string-value hello world >>>>> ELEMENT=[element Properties] >>>>> TYPE=[class org.simpleframework.xml.core.MultiElementMapTest$Properties] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ------------- ---------------- --------------- Testcase: testProperties took 0.243 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.transform.TimestampTransformTest.txt0000644000175000017500000000025211342531446033605 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.transform.TimestampTransformTest Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.024 sec Testcase: testTimestamp took 0.022 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.FieldScannerTest.txt0000644000175000017500000000023511342531304031212 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.FieldScannerTest Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.035 sec Testcase: testExample took 0.032 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.NamespaceDefaultTest.txt0000644000175000017500000000073611342531324032066 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.NamespaceDefaultTest Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.161 sec ------------- Standard Output --------------- d ------------- ---------------- --------------- Testcase: testScope took 0.154 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.stream.DocumentProviderTest.txt0000644000175000017500000000030511342531436032515 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.stream.DocumentProviderTest Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.031 sec Testcase: testReader took 0.025 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.InlineTest.txt0000644000175000017500000003331511342531310030075 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.InlineTest Tests run: 6, Failures: 0, Errors: 0, Time elapsed: 0.459 sec ------------- Standard Output --------------- Some example message Example 1 Example 2 Example 3 Some example message Example 1 Example 2 Example 3 Some example message Example 1 Example 2 Example 3 >>>>> ELEMENT=[element test] >>>>> TYPE=[class org.simpleframework.xml.core.InlineTest$InlineTextList] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] Some example message Example 1 Example 2 Example 3 >>>>> ELEMENT=[element Test] >>>>> TYPE=[class org.simpleframework.xml.core.InlineTest$InlineTextList] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] Some example message Example 1 Example 2 Example 3 Some example message Example 1 Example 2 Example 3 Some example message Example 1 Example 2 Example 3 >>>>> ELEMENT=[element test] >>>>> TYPE=[class org.simpleframework.xml.core.InlineTest$InlineTextList] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] Some example message Example 1 Example 2 Example 3 >>>>> ELEMENT=[element Test] >>>>> TYPE=[class org.simpleframework.xml.core.InlineTest$InlineTextList] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] Some example message Example 1 Example 2 Example 3 Some example message Example 1 Example 2 Example 3 Some example message Example 1 Example 2 Example 3 >>>>> ELEMENT=[element test] >>>>> TYPE=[class org.simpleframework.xml.core.InlineTest$InlinePrimitiveList] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] Some example message Example 1 Example 2 Example 3 >>>>> ELEMENT=[element Test] >>>>> TYPE=[class org.simpleframework.xml.core.InlineTest$InlinePrimitiveList] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] Some example message Example 1 Example 2 Example 3 Some example message Example 1 Example 2 Example 3 Some example message Example 1 Example 2 Example 3 >>>>> ELEMENT=[element test] >>>>> TYPE=[class org.simpleframework.xml.core.InlineTest$InlinePrimitiveList] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] Some example message Example 1 Example 2 Example 3 >>>>> ELEMENT=[element Test] >>>>> TYPE=[class org.simpleframework.xml.core.InlineTest$InlinePrimitiveList] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] >>>>> ELEMENT=[element simple-inline-list] >>>>> TYPE=[class org.simpleframework.xml.core.InlineTest$SimpleInlineList] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] >>>>> ELEMENT=[element SimpleInlineList] >>>>> TYPE=[class org.simpleframework.xml.core.InlineTest$SimpleInlineList] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] >>>>> ELEMENT=[element simple-name-inline-list] >>>>> TYPE=[class org.simpleframework.xml.core.InlineTest$SimpleNameInlineList] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] >>>>> ELEMENT=[element SimpleNameInlineList] >>>>> TYPE=[class org.simpleframework.xml.core.InlineTest$SimpleNameInlineList] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] test test test >>>>> ELEMENT=[element simple-primitive-inline-list] >>>>> TYPE=[class org.simpleframework.xml.core.InlineTest$SimplePrimitiveInlineList] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] test >>>>> ELEMENT=[element SimplePrimitiveInlineList] >>>>> TYPE=[class org.simpleframework.xml.core.InlineTest$SimplePrimitiveInlineList] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ------------- ---------------- --------------- Testcase: testList took 0.305 sec Testcase: testPrimitiveList took 0.051 sec Testcase: testSimpleList took 0.041 sec Testcase: testSimpleNameList took 0.034 sec Testcase: testSimplePrimitiveList took 0.015 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.AliasTest.txt0000644000175000017500000001163111342531262027713 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.AliasTest Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.254 sec ------------- Standard Output --------------- item item double 0.0 string test integer 1 item item double 0.0 string test integer 1 item double 0.0 string test integer 1 >>>>> ELEMENT=[element multi-value-map] >>>>> TYPE=[class org.simpleframework.xml.core.AliasTest$MultiValueMap] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] item double 0.0 string test integer 1 >>>>> ELEMENT=[element MultiValueMap] >>>>> TYPE=[class org.simpleframework.xml.core.AliasTest$MultiValueMap] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ------------- ---------------- --------------- ------------- Standard Error ----------------- item item double 0.0 string test integer 1 ------------- ---------------- --------------- Testcase: testMap took 0.248 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.strategy.CycleStrategyTest.txt0000644000175000017500000000035311342531401032350 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.strategy.CycleStrategyTest Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.076 sec Testcase: testArray took 0.069 sec Testcase: testObject took 0.002 sec Testcase: testReference took 0.001 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.MethodTest.txt0000644000175000017500000001343511342531314030104 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.MethodTest Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.35 sec ------------- Standard Output --------------- true 16 1234567.89 1234.56 1234 1234567 120 true 16 1234567.89 1234.56 1234 1234567 120 true 16 1234567.89 1234.56 1234 1234567 120 >>>>> ELEMENT=[element test] >>>>> TYPE=[class org.simpleframework.xml.core.MethodTest$ExplicitMethodNameExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] true 16 1234567.89 1234.56 1234 1234567 120 >>>>> ELEMENT=[element Test] >>>>> TYPE=[class org.simpleframework.xml.core.MethodTest$ExplicitMethodNameExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] true 16 1234567.89 1234.56 1234 1234567 120 true 16 1234567.89 1234.56 1234 1234567 120 true 16 1234567.89 1234.56 1234 1234567 120 >>>>> ELEMENT=[element test] >>>>> TYPE=[class org.simpleframework.xml.core.MethodTest$ExplicitMethodNameExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] true 16 1234567.89 1234.56 1234 1234567 120 >>>>> ELEMENT=[element Test] >>>>> TYPE=[class org.simpleframework.xml.core.MethodTest$ExplicitMethodNameExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] true 16 1234567.89 1234.56 1234 1234567 120 true 16 1234567.89 1234.56 1234 1234567 120 true 16 1234567.89 1234.56 1234 1234567 120 >>>>> ELEMENT=[element implicit-method-name-example] >>>>> TYPE=[class org.simpleframework.xml.core.MethodTest$ImplicitMethodNameExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] true 16 1234567.89 1234.56 1234 1234567 120 >>>>> ELEMENT=[element ImplicitMethodNameExample] >>>>> TYPE=[class org.simpleframework.xml.core.MethodTest$ImplicitMethodNameExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] true 16 1234567.89 1234.56 1234 1234567 120 true 16 1234567.89 1234.56 1234 1234567 120 true 16 1234567.89 1234.56 1234 1234567 120 >>>>> ELEMENT=[element implicit-method-name-example] >>>>> TYPE=[class org.simpleframework.xml.core.MethodTest$ImplicitMethodNameExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] true 16 1234567.89 1234.56 1234 1234567 120 >>>>> ELEMENT=[element ImplicitMethodNameExample] >>>>> TYPE=[class org.simpleframework.xml.core.MethodTest$ImplicitMethodNameExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ------------- ---------------- --------------- Testcase: testExplicitMethodNameExample took 0.245 sec Testcase: testImplicitMethodNameExample took 0.098 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.InlineListWithDataTest.txt0000644000175000017500000000630311342531306032361 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.InlineListWithDataTest Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.246 sec ------------- Standard Output --------------- >>>>> ELEMENT=[element list-with-data-example] >>>>> TYPE=[class org.simpleframework.xml.core.InlineListWithDataTest$ListWithDataExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] >>>>> ELEMENT=[element ListWithDataExample] >>>>> TYPE=[class org.simpleframework.xml.core.InlineListWithDataTest$ListWithDataExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] >>>>> ELEMENT=[element map-with-data-example] >>>>> TYPE=[class org.simpleframework.xml.core.InlineListWithDataTest$MapWithDataExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] >>>>> ELEMENT=[element MapWithDataExample] >>>>> TYPE=[class org.simpleframework.xml.core.InlineListWithDataTest$MapWithDataExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ------------- ---------------- --------------- Testcase: testListWithData took 0.18 sec Testcase: testMapWithData took 0.058 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.ReplaceThisTest.txt0000644000175000017500000000202611342531361031063 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.ReplaceThisTest Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.177 sec ------------- Standard Output --------------- >>>>> ELEMENT=[element real-parent] >>>>> TYPE=[class org.simpleframework.xml.core.ReplaceThisTest$RealParent] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] >>>>> ELEMENT=[element RealParent] >>>>> TYPE=[class org.simpleframework.xml.core.ReplaceThisTest$RealParent] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ------------- ---------------- --------------- Testcase: testReplaceParent took 0.17 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.PrimitiveTest.txt0000644000175000017500000000031011342531357030627 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.PrimitiveTest Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.093 sec Testcase: testPrimitive took 0.083 sec Testcase: testPrimitiveCycle took 0.005 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.convert.AnnotationCycleStrategyTest.txt0000644000175000017500000000124011342531256034225 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.convert.AnnotationCycleStrategyTest Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.358 sec ------------- Standard Output --------------- A a B b C c ------------- ---------------- --------------- Testcase: testCycle took 0.209 sec Testcase: testDirectory took 0.001 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.EnumArrayTest.txt0000644000175000017500000000213211342531300030552 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.EnumArrayTest Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.189 sec ------------- Standard Output --------------- ONE, TWO, FOUR ONE, TWO, FOUR ONE, TWO, FOUR >>>>> ELEMENT=[element example] >>>>> TYPE=[class org.simpleframework.xml.core.EnumArrayTest$NumberArray] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ONE, TWO, FOUR >>>>> ELEMENT=[element Example] >>>>> TYPE=[class org.simpleframework.xml.core.EnumArrayTest$NumberArray] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ------------- ---------------- --------------- Testcase: testArrayElement took 0.183 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.StrictModeTest.txt0000644000175000017500000003047611342531367030755 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.StrictModeTest Tests run: 5, Failures: 0, Errors: 0, Time elapsed: 0.229 sec ------------- Standard Output --------------- 123
example name
example address
test
123
example name
example address
test
123
example name
example address
test
>>>>> ELEMENT=[element example-object-with-address] >>>>> TYPE=[class org.simpleframework.xml.core.StrictModeTest$ExampleObjectWithAddress] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] 123
example name
example address
test
>>>>> ELEMENT=[element ExampleObjectWithAddress] >>>>> TYPE=[class org.simpleframework.xml.core.StrictModeTest$ExampleObjectWithAddress] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ------------- ---------------- --------------- ------------- Standard Error ----------------- org.simpleframework.xml.core.AttributeException: Attribute 'name' does not have a match at line -1 at org.simpleframework.xml.core.Composite.readAttribute(Composite.java:513) at org.simpleframework.xml.core.Composite.readAttributes(Composite.java:435) at org.simpleframework.xml.core.Composite.read(Composite.java:349) at org.simpleframework.xml.core.Composite.readDefault(Composite.java:245) at org.simpleframework.xml.core.Composite.read(Composite.java:215) at org.simpleframework.xml.core.Composite.read(Composite.java:185) at org.simpleframework.xml.core.Composite.read(Composite.java:133) at org.simpleframework.xml.core.Traverser.read(Traverser.java:92) at org.simpleframework.xml.core.Persister.read(Persister.java:602) at org.simpleframework.xml.core.Persister.read(Persister.java:583) at org.simpleframework.xml.core.Persister.read(Persister.java:564) at org.simpleframework.xml.core.Persister.read(Persister.java:501) at org.simpleframework.xml.core.Persister.read(Persister.java:410) at org.simpleframework.xml.core.StrictModeTest.testStrictMode(StrictModeTest.java:60) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:421) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:912) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:766) org.simpleframework.xml.core.ValueRequiredException: Unable to satisfy @org.simpleframework.xml.Element(required=true, data=false, name=) on field 'name' java.lang.String org.simpleframework.xml.core.StrictModeTest$ExampleObjectWithAddress.name for class org.simpleframework.xml.core.StrictModeTest$ExampleObjectWithAddress at line -1 at org.simpleframework.xml.core.Composite.validate(Composite.java:651) at org.simpleframework.xml.core.Composite.readElements(Composite.java:468) at org.simpleframework.xml.core.Composite.read(Composite.java:350) at org.simpleframework.xml.core.Composite.readDefault(Composite.java:245) at org.simpleframework.xml.core.Composite.read(Composite.java:215) at org.simpleframework.xml.core.Composite.read(Composite.java:185) at org.simpleframework.xml.core.Composite.read(Composite.java:133) at org.simpleframework.xml.core.Traverser.read(Traverser.java:92) at org.simpleframework.xml.core.Persister.read(Persister.java:602) at org.simpleframework.xml.core.Persister.read(Persister.java:583) at org.simpleframework.xml.core.Persister.read(Persister.java:564) at org.simpleframework.xml.core.Persister.read(Persister.java:501) at org.simpleframework.xml.core.StrictModeTest.testNonStrictModeMissingName(StrictModeTest.java:87) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:421) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:912) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:766) org.simpleframework.xml.core.AttributeException: Attribute 'name' does not exist at line -1 at org.simpleframework.xml.core.Composite.validateAttribute(Composite.java:807) at org.simpleframework.xml.core.Composite.validateAttributes(Composite.java:733) at org.simpleframework.xml.core.Composite.validate(Composite.java:706) at org.simpleframework.xml.core.Composite.validate(Composite.java:683) at org.simpleframework.xml.core.Traverser.validate(Traverser.java:171) at org.simpleframework.xml.core.Persister.validate(Persister.java:1044) at org.simpleframework.xml.core.Persister.validate(Persister.java:1024) at org.simpleframework.xml.core.Persister.validate(Persister.java:1004) at org.simpleframework.xml.core.Persister.validate(Persister.java:938) at org.simpleframework.xml.core.Persister.validate(Persister.java:842) at org.simpleframework.xml.core.StrictModeTest.testValidation(StrictModeTest.java:102) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:421) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:912) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:766) org.simpleframework.xml.core.AttributeException: Attribute 'name' does not exist at line -1 at org.simpleframework.xml.core.Composite.validateAttribute(Composite.java:807) at org.simpleframework.xml.core.Composite.validateAttributes(Composite.java:733) at org.simpleframework.xml.core.Composite.validate(Composite.java:706) at org.simpleframework.xml.core.Composite.validate(Composite.java:683) at org.simpleframework.xml.core.Traverser.validate(Traverser.java:171) at org.simpleframework.xml.core.Persister.validate(Persister.java:1044) at org.simpleframework.xml.core.Persister.validate(Persister.java:1024) at org.simpleframework.xml.core.Persister.validate(Persister.java:1004) at org.simpleframework.xml.core.Persister.validate(Persister.java:938) at org.simpleframework.xml.core.Persister.validate(Persister.java:842) at org.simpleframework.xml.core.StrictModeTest.testValidation(StrictModeTest.java:108) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:421) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:912) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:766) org.simpleframework.xml.core.ValueRequiredException: Unable to satisfy @org.simpleframework.xml.Element(required=true, data=false, name=) on field 'name' java.lang.String org.simpleframework.xml.core.StrictModeTest$ExampleObjectWithAddress.name at line -1 at org.simpleframework.xml.core.Composite.validate(Composite.java:888) at org.simpleframework.xml.core.Composite.validateElements(Composite.java:765) at org.simpleframework.xml.core.Composite.validate(Composite.java:707) at org.simpleframework.xml.core.Composite.validate(Composite.java:683) at org.simpleframework.xml.core.Traverser.validate(Traverser.java:171) at org.simpleframework.xml.core.Persister.validate(Persister.java:1044) at org.simpleframework.xml.core.Persister.validate(Persister.java:1024) at org.simpleframework.xml.core.Persister.validate(Persister.java:1004) at org.simpleframework.xml.core.Persister.validate(Persister.java:938) at org.simpleframework.xml.core.StrictModeTest.testValidation(StrictModeTest.java:114) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:421) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:912) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:766) ------------- ---------------- --------------- Testcase: testStrictMode took 0.118 sec Testcase: testNonStrictMode took 0.089 sec Testcase: testNonStrictModeMissingName took 0.004 sec Testcase: testValidation took 0.012 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.strategy.VisitorStrategyTest.txt0000644000175000017500000000660411342531435032764 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.strategy.VisitorStrategyTest Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.244 sec ------------- Standard Output --------------- A B 2 TWO 1 ONE A B 2 TWO 1 ONE A B 2 TWO 1 ONE A B 2 TWO 1 ONE >>>>> ELEMENT=[element visitor-example] >>>>> TYPE=[class org.simpleframework.xml.strategy.VisitorStrategyTest$VisitorExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] A B 2 TWO 1 ONE >>>>> ELEMENT=[element VisitorExample] >>>>> TYPE=[class org.simpleframework.xml.strategy.VisitorStrategyTest$VisitorExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ------------- ---------------- --------------- Testcase: testStrategy took 0.237 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.strategy.PrimitiveCycleTest.txt0000644000175000017500000002047311342531405032527 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.strategy.PrimitiveCycleTest Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 1.053 sec ------------- Standard Output --------------- true 16 120 1234 1234.56 1234567 1234567.89 true 16 120 1234 1234.56 1234567 1234567.89 text value TWO true 16 120 1234 1234.56 1234567 1234567.89 true 16 120 1234 1234.56 1234567 1234567.89 text value TWO true 16 120 1234 1234.56 1234567 1234567.89 true 16 120 1234 1234.56 1234567 1234567.89 text value TWO >>>>> ELEMENT=[element test] >>>>> TYPE=[class org.simpleframework.xml.strategy.PrimitiveCycleTest$PrimitiveCycleEntry] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] true 16 120 1234 1234.56 1234567 1234567.89 true 16 120 1234 1234.56 1234567 1234567.89 text value TWO >>>>> ELEMENT=[element Test] >>>>> TYPE=[class org.simpleframework.xml.strategy.PrimitiveCycleTest$PrimitiveCycleEntry] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] a a a >>>>> ELEMENT=[element string-reference-example] >>>>> TYPE=[class org.simpleframework.xml.strategy.PrimitiveCycleTest$StringReferenceExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] a >>>>> ELEMENT=[element StringReferenceExample] >>>>> TYPE=[class org.simpleframework.xml.strategy.PrimitiveCycleTest$StringReferenceExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] a b a b a b >>>>> ELEMENT=[element string-reference-example] >>>>> TYPE=[class org.simpleframework.xml.strategy.PrimitiveCycleTest$StringReferenceExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] a b >>>>> ELEMENT=[element StringReferenceExample] >>>>> TYPE=[class org.simpleframework.xml.strategy.PrimitiveCycleTest$StringReferenceExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] 1 1 1 1 1 1 1 1 1 >>>>> ELEMENT=[element integer-reference-example] >>>>> TYPE=[class org.simpleframework.xml.strategy.PrimitiveCycleTest$IntegerReferenceExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] 1 1 1 >>>>> ELEMENT=[element IntegerReferenceExample] >>>>> TYPE=[class org.simpleframework.xml.strategy.PrimitiveCycleTest$IntegerReferenceExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] 1 1 1 1 1 1 >>>>> ELEMENT=[element integer-reference-example] >>>>> TYPE=[class org.simpleframework.xml.strategy.PrimitiveCycleTest$IntegerReferenceExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] 1 1 >>>>> ELEMENT=[element IntegerReferenceExample] >>>>> TYPE=[class org.simpleframework.xml.strategy.PrimitiveCycleTest$IntegerReferenceExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ------------- ---------------- --------------- Testcase: testPrimitive took 0.69 sec Testcase: testPrimitiveReference took 0.357 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.transform.PrimitiveArrayTransformTest.txt0000644000175000017500000002543011342531444034614 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.transform.PrimitiveArrayTransformTest Tests run: 5, Failures: 0, Errors: 0, Time elapsed: 0.728 sec ------------- Standard Output --------------- 1, 2, 3, 4 1, 2, 3, 4 1, 2, 3, 4 1, 2, 3, 4 1, 2, 3, 4 1, 2, 3, 4 1, 2, 3, 4 1, 2, 3, 4 1, 2, 3, 4 1, 2, 3, 4 1, 2, 3, 4 1, 2, 3, 4 1, 2, 3, 4 1, 2, 3, 4 1, 2, 3, 4 1, 2, 3, 4 >>>>> ELEMENT=[element integer-array-example] >>>>> TYPE=[class org.simpleframework.xml.transform.PrimitiveArrayTransformTest$IntegerArrayExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] 1, 2, 3, 4 1, 2, 3, 4 1, 2, 3, 4 1, 2, 3, 4 >>>>> ELEMENT=[element IntegerArrayExample] >>>>> TYPE=[class org.simpleframework.xml.transform.PrimitiveArrayTransformTest$IntegerArrayExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] >>>>> ELEMENT=[element integer-array-example] >>>>> TYPE=[class org.simpleframework.xml.transform.PrimitiveArrayTransformTest$IntegerArrayExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] >>>>> ELEMENT=[element IntegerArrayExample] >>>>> TYPE=[class org.simpleframework.xml.transform.PrimitiveArrayTransformTest$IntegerArrayExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] 1, 2, 3, 4 1, 2, 3, 4 1, 2, 3, 4 >>>>> ELEMENT=[element integer-array-example] >>>>> TYPE=[class org.simpleframework.xml.transform.PrimitiveArrayTransformTest$IntegerArrayExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] 1, 2, 3, 4 >>>>> ELEMENT=[element IntegerArrayExample] >>>>> TYPE=[class org.simpleframework.xml.transform.PrimitiveArrayTransformTest$IntegerArrayExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] >>>>> ELEMENT=[element integer-array-example] >>>>> TYPE=[class org.simpleframework.xml.transform.PrimitiveArrayTransformTest$IntegerArrayExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] >>>>> ELEMENT=[element IntegerArrayExample] >>>>> TYPE=[class org.simpleframework.xml.transform.PrimitiveArrayTransformTest$IntegerArrayExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ------------- ---------------- --------------- Testcase: testRead took 0.004 sec Testcase: testWrite took 0.001 sec Testcase: testPersistence took 0.313 sec Testcase: testCyclicPersistence took 0.404 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.OrderTest.txt0000644000175000017500000000562011342531327027740 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.OrderTest Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.28 sec ------------- Standard Output --------------- first second third fourth first second third fourth first second third fourth >>>>> ELEMENT=[element order-example] >>>>> TYPE=[class org.simpleframework.xml.core.OrderTest$OrderExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] first second third fourth >>>>> ELEMENT=[element OrderExample] >>>>> TYPE=[class org.simpleframework.xml.core.OrderTest$OrderExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] 1st 2nd 3rd 4th 1st 2nd 3rd 4th 1st 2nd 3rd 4th >>>>> ELEMENT=[element order-example] >>>>> TYPE=[class org.simpleframework.xml.core.OrderTest$OrderExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] 1st 2nd 3rd 4th >>>>> ELEMENT=[element OrderExample] >>>>> TYPE=[class org.simpleframework.xml.core.OrderTest$OrderExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ------------- ---------------- --------------- Testcase: testLinkedHashMapOrder took 0.001 sec Testcase: testSerializationOrder took 0.261 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.strategy.CycleTest.txt0000644000175000017500000002000511342531402030622 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.strategy.CycleTest Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 1.621 sec ------------- Standard Output --------------- one two three one two three one two three one two three >>>>> ELEMENT=[element example] >>>>> TYPE=[class org.simpleframework.xml.strategy.CycleTest$CycleExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] one two three >>>>> ELEMENT=[element Example] >>>>> TYPE=[class org.simpleframework.xml.strategy.CycleTest$CycleExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] one two three one two three one two three one two three >>>>> ELEMENT=[element example] >>>>> TYPE=[class org.simpleframework.xml.strategy.CycleTest$CycleExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] one two three >>>>> ELEMENT=[element Example] >>>>> TYPE=[class org.simpleframework.xml.strategy.CycleTest$CycleExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ------------- ---------------- --------------- Testcase: testCycle took 0.23 sec Testcase: testMemory took 1.383 sec Testcase: testDirectory took 0.001 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.FilterTest.txt0000644000175000017500000000034611342531304030105 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.FilterTest Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.166 sec Testcase: testSystem took 0.143 sec Testcase: testMap took 0.005 sec Testcase: testEnvironmentFilter took 0.015 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.StackOverflowTest.txt0000644000175000017500000375631011342531366031475 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.StackOverflowTest Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 1.59 sec ------------- Standard Output --------------- AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment >>>>> ELEMENT=[element delivery] >>>>> TYPE=[class org.simpleframework.xml.core.StackOverflowTest$Delivery] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment AAAAA 1046 A comment >>>>> ELEMENT=[element Delivery] >>>>> TYPE=[class org.simpleframework.xml.core.StackOverflowTest$Delivery] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ------------- ---------------- --------------- Testcase: testStackOverflow took 1.584 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.NullArrayEntryTest.txt0000644000175000017500000001240711342531326031620 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.NullArrayEntryTest Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.238 sec ------------- Standard Output --------------- a b e a b e a b e a b e >>>>> ELEMENT=[element example-array] >>>>> TYPE=[class org.simpleframework.xml.core.NullArrayEntryTest$ExampleArray] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] a b e >>>>> ELEMENT=[element ExampleArray] >>>>> TYPE=[class org.simpleframework.xml.core.NullArrayEntryTest$ExampleArray] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] a b e f a b e f a b e f a b e f >>>>> ELEMENT=[element example-primitive-array] >>>>> TYPE=[class org.simpleframework.xml.core.NullArrayEntryTest$ExamplePrimitiveArray] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] a b e f >>>>> ELEMENT=[element ExamplePrimitiveArray] >>>>> TYPE=[class org.simpleframework.xml.core.NullArrayEntryTest$ExamplePrimitiveArray] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ------------- ---------------- --------------- Testcase: testExampleArray took 0.202 sec Testcase: testExamplePrimitiveArray took 0.03 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.strategy.TreeStrategyTest.txt0000644000175000017500000011462611342531435032230 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.strategy.TreeStrategyTest Tests run: 5, Failures: 0, Errors: 0, Time elapsed: 23.141 sec ------------- Standard Output --------------- {no.override} {example.name} {example.path} Some example text where {example.name} is replaced with the system property value and the path is replaced with the path {example.path} this is the first element the second element the third elment value.1 value.2 value.1 value.2 value.4 value.4 value.5 {no.override} {example.name} {example.path} Some example text where {example.name} is replaced with the system property value and the path is replaced with the path {example.path} this is the first element the second element the third elment value.1 value.2 value.1 value.2 value.4 value.4 value.5 {no.override} {example.name} {example.path} Some example text where {example.name} is replaced with the system property value and the path is replaced with the path {example.path} this is the first element the second element the third elment value.1 value.2 value.1 value.2 value.4 value.4 value.5 {no.override} {example.name} {example.path} Some example text where {example.name} is replaced with the system property value and the path is replaced with the path {example.path} this is the first element the second element the third elment value.1 value.2 value.1 value.2 value.4 value.4 value.5 >>>>> ELEMENT=[element root] >>>>> TYPE=[class org.simpleframework.xml.strategy.TreeStrategyTest$RootEntry] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] {no.override} {example.name} {example.path} Some example text where {example.name} is replaced with the system property value and the path is replaced with the path {example.path} this is the first element the second element the third elment value.1 value.2 value.1 value.2 value.4 value.4 value.5 >>>>> ELEMENT=[element Root] >>>>> TYPE=[class org.simpleframework.xml.strategy.TreeStrategyTest$RootEntry] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] {no.override} {example.name} {example.path} Some example text where {example.name} is replaced with the system property value and the path is replaced with the path {example.path} this is the first element the second element the third elment value.1 value.2 value.1 value.2 value.4 value.4 value.5 some constant some name /some/path Some example text where some name is replaced with the system property value and the path is replaced with the path /some/path this is the first element the second element the third elment value.1 value.2 value.1 value.2 value.4 value.4 value.5 some constant some name /some/path Some example text where some name is replaced with the system property value and the path is replaced with the path /some/path this is the first element the second element the third elment value.1 value.2 value.1 value.2 value.4 value.4 value.5 some constant some name /some/path Some example text where some name is replaced with the system property value and the path is replaced with the path /some/path this is the first element the second element the third elment value.1 value.2 value.1 value.2 value.4 value.4 value.5 some constant some name /some/path Some example text where some name is replaced with the system property value and the path is replaced with the path /some/path this is the first element the second element the third elment value.1 value.2 value.1 value.2 value.4 value.4 value.5 >>>>> ELEMENT=[element root] >>>>> TYPE=[class org.simpleframework.xml.strategy.TreeStrategyTest$RootEntry] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] some constant some name /some/path Some example text where some name is replaced with the system property value and the path is replaced with the path /some/path this is the first element the second element the third elment value.1 value.2 value.1 value.2 value.4 value.4 value.5 >>>>> ELEMENT=[element Root] >>>>> TYPE=[class org.simpleframework.xml.strategy.TreeStrategyTest$RootEntry] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] some constant some name /some/path Some example text where some name is replaced with the system property value and the path is replaced with the path /some/path this is the first element the second element the third elment value.1 value.2 value.1 value.2 value.4 value.4 value.5 ${no.override} ${example.name} ${example.path} Some example text where ${example.name} is replaced with the system property value and the path is replaced with the path ${example.path} this is the first element the second element the third elment value.1 value.2 value.1 value.2 value.4 value.4 value.5 ${no.override} ${example.name} ${example.path} Some example text where ${example.name} is replaced with the system property value and the path is replaced with the path ${example.path} this is the first element the second element the third elment value.1 value.2 value.1 value.2 value.4 value.4 value.5 ${no.override} ${example.name} ${example.path} Some example text where ${example.name} is replaced with the system property value and the path is replaced with the path ${example.path} this is the first element the second element the third elment value.1 value.2 value.1 value.2 value.4 value.4 value.5 ${no.override} ${example.name} ${example.path} Some example text where ${example.name} is replaced with the system property value and the path is replaced with the path ${example.path} this is the first element the second element the third elment value.1 value.2 value.1 value.2 value.4 value.4 value.5 >>>>> ELEMENT=[element root] >>>>> TYPE=[class org.simpleframework.xml.strategy.TreeStrategyTest$RootEntry] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ${no.override} ${example.name} ${example.path} Some example text where ${example.name} is replaced with the system property value and the path is replaced with the path ${example.path} this is the first element the second element the third elment value.1 value.2 value.1 value.2 value.4 value.4 value.5 >>>>> ELEMENT=[element Root] >>>>> TYPE=[class org.simpleframework.xml.strategy.TreeStrategyTest$RootEntry] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ${no.override} ${example.name} ${example.path} Some example text where ${example.name} is replaced with the system property value and the path is replaced with the path ${example.path} this is the first element the second element the third elment value.1 value.2 value.1 value.2 value.4 value.4 value.5 >><< {example.name} {example.path} this is text>> some more<< this is the first element the second element the third elment value.1 value.2 value.1 value.2 value.4 value.4 value.5 >><< {example.name} {example.path} this is text>> some more<< this is the first element the second element the third elment value.1 value.2 value.1 value.2 value.4 value.4 value.5 >><< {example.name} {example.path} this is text>> some more<< this is the first element the second element the third elment value.1 value.2 value.1 value.2 value.4 value.4 value.5 >><< {example.name} {example.path} this is text>> some more<< this is the first element the second element the third elment value.1 value.2 value.1 value.2 value.4 value.4 value.5 >>>>> ELEMENT=[element root] >>>>> TYPE=[class org.simpleframework.xml.strategy.TreeStrategyTest$RootEntry] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] >><< {example.name} {example.path} this is text>> some more<< this is the first element the second element the third elment value.1 value.2 value.1 value.2 value.4 value.4 value.5 >>>>> ELEMENT=[element Root] >>>>> TYPE=[class org.simpleframework.xml.strategy.TreeStrategyTest$RootEntry] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] >><< {example.name} {example.path} this is text>> some more<< this is the first element the second element the third elment value.1 value.2 value.1 value.2 value.4 value.4 value.5 ------------- ---------------- --------------- ------------- Standard Error ----------------- Took '7986' ms to process 10000 documents Took '6219' ms to process 10000 documents with templates Took '6018' ms to process 10000 documents with an empty filter Took '2493' ms to write 10000 documents ------------- ---------------- --------------- Testcase: testBasicDocument took 8.24 sec Testcase: testTemplateDocument took 6.281 sec Testcase: testEmptyFilter took 6.085 sec Testcase: testBasicWrite took 2.524 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.RedundantOrderTest.txt0000644000175000017500000001213011342531361031575 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.RedundantOrderTest Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.105 sec ------------- Standard Error ----------------- org.simpleframework.xml.core.ElementException: Ordered element 'c' missing for class org.simpleframework.xml.core.RedundantOrderTest$ElementEntry at org.simpleframework.xml.core.Scanner.validateElements(Scanner.java:454) at org.simpleframework.xml.core.Scanner.validate(Scanner.java:408) at org.simpleframework.xml.core.Scanner.scan(Scanner.java:392) at org.simpleframework.xml.core.Scanner.(Scanner.java:115) at org.simpleframework.xml.core.ScannerFactory.getInstance(ScannerFactory.java:65) at org.simpleframework.xml.core.Support.getScanner(Support.java:170) at org.simpleframework.xml.core.Support.getName(Support.java:232) at org.simpleframework.xml.core.Source.getName(Source.java:271) at org.simpleframework.xml.core.Traverser.getName(Traverser.java:284) at org.simpleframework.xml.core.Traverser.write(Traverser.java:203) at org.simpleframework.xml.core.Traverser.write(Traverser.java:186) at org.simpleframework.xml.core.Persister.write(Persister.java:1099) at org.simpleframework.xml.core.Persister.write(Persister.java:1081) at org.simpleframework.xml.core.Persister.write(Persister.java:1062) at org.simpleframework.xml.core.Persister.write(Persister.java:1178) at org.simpleframework.xml.ValidationTestCase.validate(ValidationTestCase.java:95) at org.simpleframework.xml.core.RedundantOrderTest.testRedundantElementOrder(RedundantOrderTest.java:67) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:421) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:912) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:766) org.simpleframework.xml.core.AttributeException: Ordered attribute 'c' missing for class org.simpleframework.xml.core.RedundantOrderTest$AttributeEntry at org.simpleframework.xml.core.Scanner.validateAttributes(Scanner.java:481) at org.simpleframework.xml.core.Scanner.validate(Scanner.java:409) at org.simpleframework.xml.core.Scanner.scan(Scanner.java:392) at org.simpleframework.xml.core.Scanner.(Scanner.java:115) at org.simpleframework.xml.core.ScannerFactory.getInstance(ScannerFactory.java:65) at org.simpleframework.xml.core.Support.getScanner(Support.java:170) at org.simpleframework.xml.core.Support.getName(Support.java:232) at org.simpleframework.xml.core.Source.getName(Source.java:271) at org.simpleframework.xml.core.Traverser.getName(Traverser.java:284) at org.simpleframework.xml.core.Traverser.write(Traverser.java:203) at org.simpleframework.xml.core.Traverser.write(Traverser.java:186) at org.simpleframework.xml.core.Persister.write(Persister.java:1099) at org.simpleframework.xml.core.Persister.write(Persister.java:1081) at org.simpleframework.xml.core.Persister.write(Persister.java:1062) at org.simpleframework.xml.core.Persister.write(Persister.java:1178) at org.simpleframework.xml.ValidationTestCase.validate(ValidationTestCase.java:95) at org.simpleframework.xml.core.RedundantOrderTest.testRedundantAttributeOrder(RedundantOrderTest.java:81) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:421) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:912) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:766) ------------- ---------------- --------------- Testcase: testRedundantElementOrder took 0.09 sec Testcase: testRedundantAttributeOrder took 0.007 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.ClassScannerTest.txt0000644000175000017500000000024211342531265031240 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.ClassScannerTest Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.048 sec Testcase: testClassScanner took 0.045 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.transform.TypeMatcherTest.txt0000644000175000017500000000075711342531446032205 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.transform.TypeMatcherTest Tests run: 10, Failures: 0, Errors: 0, Time elapsed: 0.022 sec Testcase: testInteger took 0.005 sec Testcase: testString took 0.001 sec Testcase: testCharacter took 0.002 sec Testcase: testFloat took 0.001 sec Testcase: testDouble took 0 sec Testcase: testBoolean took 0.001 sec Testcase: testLong took 0.001 sec Testcase: testShort took 0 sec Testcase: testIntegerArray took 0.002 sec Testcase: testPrimitiveIntegerArray took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.stream.NamespaceMapTest.txt0000644000175000017500000000200111342531436031551 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.stream.NamespaceMapTest Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.056 sec ------------- Standard Output --------------- example text for yet another namespace very very last child other very very last child yet another very very last child ------------- ---------------- --------------- Testcase: testInputNode took 0.033 sec Testcase: testOutputNode took 0.015 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.PrologTest.txt0000644000175000017500000000252211342531360030122 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.PrologTest Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.186 sec ------------- Standard Output --------------- some name entry text some name entry text some name entry text >>>>> ELEMENT=[element prolog-example] >>>>> TYPE=[class org.simpleframework.xml.core.PrologTest$PrologExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] some name entry text >>>>> ELEMENT=[element PrologExample] >>>>> TYPE=[class org.simpleframework.xml.core.PrologTest$PrologExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ------------- ---------------- --------------- Testcase: testProlog took 0.179 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.NonFinalConstructorInjectionTest.txt0000644000175000017500000000226111342531326034477 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.NonFinalConstructorInjectionTest Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.179 sec ------------- Standard Output --------------- A a A a A a >>>>> ELEMENT=[element non-final-example] >>>>> TYPE=[class org.simpleframework.xml.core.NonFinalConstructorInjectionTest$NonFinalExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] A a >>>>> ELEMENT=[element NonFinalExample] >>>>> TYPE=[class org.simpleframework.xml.core.NonFinalConstructorInjectionTest$NonFinalExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ------------- ---------------- --------------- Testcase: testNonFinal took 0.173 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.InjectionTest.txt0000644000175000017500000000022711342531306030602 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.InjectionTest Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.16 sec Testcase: testFirst took 0.156 sec ././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootsimple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.DefaultWithParametersInGetterTest.txtsimple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.DefaultWithParametersInGetterTest.txt0000644000175000017500000001706111342531276034600 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.DefaultWithParametersInGetterTest Tests run: 4, Failures: 0, Errors: 0, Time elapsed: 0.194 sec ------------- Standard Output --------------- 100 100 100 100 >>>>> ELEMENT=[element default-test-class] >>>>> TYPE=[class org.simpleframework.xml.core.DefaultWithParametersInGetterTest$DefaultTestClass] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] 100 >>>>> ELEMENT=[element DefaultTestClass] >>>>> TYPE=[class org.simpleframework.xml.core.DefaultWithParametersInGetterTest$DefaultTestClass] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ------------- ---------------- --------------- ------------- Standard Error ----------------- org.simpleframework.xml.core.MethodException: Get method public java.lang.String org.simpleframework.xml.core.DefaultWithParametersInGetterTest$DefaultTestClassWithInvalidTransient.getWithParams(int) is not a valid property at org.simpleframework.xml.core.MethodPartFactory.getRead(MethodPartFactory.java:272) at org.simpleframework.xml.core.MethodPartFactory.getName(MethodPartFactory.java:126) at org.simpleframework.xml.core.MethodPartFactory.getInstance(MethodPartFactory.java:98) at org.simpleframework.xml.core.MethodScanner.remove(MethodScanner.java:325) at org.simpleframework.xml.core.MethodScanner.scan(MethodScanner.java:236) at org.simpleframework.xml.core.MethodScanner.scan(MethodScanner.java:181) at org.simpleframework.xml.core.MethodScanner.scan(MethodScanner.java:162) at org.simpleframework.xml.core.MethodScanner.scan(MethodScanner.java:141) at org.simpleframework.xml.core.MethodScanner.(MethodScanner.java:123) at org.simpleframework.xml.core.Scanner.method(Scanner.java:639) at org.simpleframework.xml.core.Scanner.scan(Scanner.java:391) at org.simpleframework.xml.core.Scanner.(Scanner.java:115) at org.simpleframework.xml.core.ScannerFactory.getInstance(ScannerFactory.java:65) at org.simpleframework.xml.core.Support.getScanner(Support.java:170) at org.simpleframework.xml.core.Support.getName(Support.java:232) at org.simpleframework.xml.core.Source.getName(Source.java:271) at org.simpleframework.xml.core.Traverser.getName(Traverser.java:284) at org.simpleframework.xml.core.Traverser.write(Traverser.java:203) at org.simpleframework.xml.core.Traverser.write(Traverser.java:186) at org.simpleframework.xml.core.Persister.write(Persister.java:1099) at org.simpleframework.xml.core.Persister.write(Persister.java:1081) at org.simpleframework.xml.core.Persister.write(Persister.java:1062) at org.simpleframework.xml.core.Persister.write(Persister.java:1178) at org.simpleframework.xml.core.Persister.write(Persister.java:1160) at org.simpleframework.xml.core.Persister.write(Persister.java:1141) at org.simpleframework.xml.core.DefaultWithParametersInGetterTest.testDefaultWithTransientErrors(DefaultWithParametersInGetterTest.java:72) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:421) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:912) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:766) org.simpleframework.xml.core.MethodException: Get method public java.lang.String org.simpleframework.xml.core.DefaultWithParametersInGetterTest$DefaultTestClassWithInvalidElement.getName(int) is not a valid property at org.simpleframework.xml.core.MethodPartFactory.getRead(MethodPartFactory.java:272) at org.simpleframework.xml.core.MethodPartFactory.getName(MethodPartFactory.java:126) at org.simpleframework.xml.core.MethodPartFactory.getInstance(MethodPartFactory.java:98) at org.simpleframework.xml.core.MethodScanner.process(MethodScanner.java:258) at org.simpleframework.xml.core.MethodScanner.scan(MethodScanner.java:233) at org.simpleframework.xml.core.MethodScanner.scan(MethodScanner.java:181) at org.simpleframework.xml.core.MethodScanner.scan(MethodScanner.java:162) at org.simpleframework.xml.core.MethodScanner.scan(MethodScanner.java:141) at org.simpleframework.xml.core.MethodScanner.(MethodScanner.java:123) at org.simpleframework.xml.core.Scanner.method(Scanner.java:639) at org.simpleframework.xml.core.Scanner.scan(Scanner.java:391) at org.simpleframework.xml.core.Scanner.(Scanner.java:115) at org.simpleframework.xml.core.ScannerFactory.getInstance(ScannerFactory.java:65) at org.simpleframework.xml.core.Support.getScanner(Support.java:170) at org.simpleframework.xml.core.Support.getName(Support.java:232) at org.simpleframework.xml.core.Source.getName(Source.java:271) at org.simpleframework.xml.core.Traverser.getName(Traverser.java:284) at org.simpleframework.xml.core.Traverser.write(Traverser.java:203) at org.simpleframework.xml.core.Traverser.write(Traverser.java:186) at org.simpleframework.xml.core.Persister.write(Persister.java:1099) at org.simpleframework.xml.core.Persister.write(Persister.java:1081) at org.simpleframework.xml.core.Persister.write(Persister.java:1062) at org.simpleframework.xml.core.Persister.write(Persister.java:1178) at org.simpleframework.xml.core.Persister.write(Persister.java:1160) at org.simpleframework.xml.core.Persister.write(Persister.java:1141) at org.simpleframework.xml.core.DefaultWithParametersInGetterTest.testDefaultWithElementErrors(DefaultWithParametersInGetterTest.java:87) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:421) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:912) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:766) ------------- ---------------- --------------- Testcase: testDefaultWithParameters took 0.172 sec Testcase: testDefaultWithTransientErrors took 0.01 sec Testcase: testDefaultWithElementErrors took 0.003 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.FieldScannerDefaultTest.txt0000644000175000017500000000033011342531304032513 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.FieldScannerDefaultTest Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.055 sec Testcase: testMixedAnnotations took 0.043 sec Testcase: testNoAnnotations took 0.008 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.TextTest.txt0000644000175000017500000002520511342531372027612 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.TextTest Tests run: 8, Failures: 0, Errors: 0, Time elapsed: 0.323 sec ------------- Standard Output --------------- >>>>> ELEMENT=[element test] >>>>> TYPE=[class org.simpleframework.xml.core.TextTest$TextList] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] >>>>> ELEMENT=[element Test] >>>>> TYPE=[class org.simpleframework.xml.core.TextTest$TextList] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] >>>>> ELEMENT=[element test] >>>>> TYPE=[class org.simpleframework.xml.core.TextTest$TextList] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] >>>>> ELEMENT=[element Test] >>>>> TYPE=[class org.simpleframework.xml.core.TextTest$TextList] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] This is hidden ]]> This is hidden ]]> This is hidden ]]>>>>>> ELEMENT=[element text] >>>>> TYPE=[class org.simpleframework.xml.core.TextTest$TextEntry] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] >>>>> ELEMENT=[element text] >>>>> TYPE=[class java.lang.String] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] This is hidden ]]>>>>>> ELEMENT=[element Text] >>>>> TYPE=[class org.simpleframework.xml.core.TextTest$TextEntry] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] >>>>> ELEMENT=[element Text] >>>>> TYPE=[class java.lang.String] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] This is hidden ]]> This is hidden ]]> This is hidden ]]>>>>>> ELEMENT=[element text] >>>>> TYPE=[class org.simpleframework.xml.core.TextTest$TextEntry] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] >>>>> ELEMENT=[element text] >>>>> TYPE=[class java.lang.String] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] This is hidden ]]>>>>>> ELEMENT=[element Text] >>>>> TYPE=[class org.simpleframework.xml.core.TextTest$TextEntry] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] >>>>> ELEMENT=[element Text] >>>>> TYPE=[class java.lang.String] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] >>>>> ELEMENT=[element text] >>>>> TYPE=[class org.simpleframework.xml.core.TextTest$OptionalTextEntry] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] >>>>> ELEMENT=[element text] >>>>> TYPE=[class java.lang.String] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] >>>>> ELEMENT=[element Text] >>>>> TYPE=[class org.simpleframework.xml.core.TextTest$OptionalTextEntry] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] >>>>> ELEMENT=[element Text] >>>>> TYPE=[class java.lang.String] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] >>>>> ELEMENT=[element text] >>>>> TYPE=[class org.simpleframework.xml.core.TextTest$OptionalTextEntry] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] >>>>> ELEMENT=[element text] >>>>> TYPE=[class java.lang.String] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] >>>>> ELEMENT=[element Text] >>>>> TYPE=[class org.simpleframework.xml.core.TextTest$OptionalTextEntry] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] >>>>> ELEMENT=[element Text] >>>>> TYPE=[class java.lang.String] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ------------- ---------------- --------------- ------------- Standard Error ----------------- org.simpleframework.xml.core.TextException: Cannot use @org.simpleframework.xml.Text(required=true, data=false, empty=) to represent field 'list' private java.util.List org.simpleframework.xml.core.TextTest$NonPrimitiveTextEntry.list at org.simpleframework.xml.core.TextLabel.getConverter(TextLabel.java:105) at org.simpleframework.xml.core.CacheLabel.getConverter(CacheLabel.java:161) at org.simpleframework.xml.core.Composite.readObject(Composite.java:605) at org.simpleframework.xml.core.Composite.read(Composite.java:569) at org.simpleframework.xml.core.Composite.readText(Composite.java:488) at org.simpleframework.xml.core.Composite.read(Composite.java:348) at org.simpleframework.xml.core.Composite.readDefault(Composite.java:245) at org.simpleframework.xml.core.Composite.read(Composite.java:215) at org.simpleframework.xml.core.Composite.read(Composite.java:185) at org.simpleframework.xml.core.Composite.read(Composite.java:133) at org.simpleframework.xml.core.Traverser.read(Traverser.java:92) at org.simpleframework.xml.core.Persister.read(Persister.java:602) at org.simpleframework.xml.core.Persister.read(Persister.java:583) at org.simpleframework.xml.core.Persister.read(Persister.java:564) at org.simpleframework.xml.core.Persister.read(Persister.java:501) at org.simpleframework.xml.core.Persister.read(Persister.java:410) at org.simpleframework.xml.core.TextTest.testNonPrimitive(TextTest.java:228) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:421) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:912) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:766) ------------- ---------------- --------------- Testcase: testText took 0.226 sec Testcase: testData took 0.036 sec Testcase: testDuplicate took 0.003 sec Testcase: testIllegalElement took 0.007 sec Testcase: testEmpty took 0.003 sec Testcase: testOptional took 0.036 sec Testcase: testNonPrimitive took 0.004 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.LiteralTest.txt0000644000175000017500000000070511342531310030250 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.LiteralTest Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.103 sec ------------- Standard Output --------------- <literal id='a' value='a'> <child>some example text</child> </literal> ------------- ---------------- --------------- Testcase: testLiteral took 0.097 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.EmptyTest.txt0000644000175000017500000003137711342531277027777 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.EmptyTest Tests run: 10, Failures: 0, Errors: 0, Time elapsed: 0.477 sec ------------- Standard Output --------------- >>>>> ELEMENT=[element test] >>>>> TYPE=[class org.simpleframework.xml.core.EmptyTest$EmptyCollection] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] >>>>> ELEMENT=[element Test] >>>>> TYPE=[class org.simpleframework.xml.core.EmptyTest$EmptyCollection] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] >>>>> ELEMENT=[element test] >>>>> TYPE=[class org.simpleframework.xml.core.EmptyTest$EmptyCollection] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] >>>>> ELEMENT=[element Test] >>>>> TYPE=[class org.simpleframework.xml.core.EmptyTest$EmptyCollection] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] Some description Some description Some description >>>>> ELEMENT=[element test] >>>>> TYPE=[class org.simpleframework.xml.core.EmptyTest$DefaultedAttribute] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] Some description >>>>> ELEMENT=[element Test] >>>>> TYPE=[class org.simpleframework.xml.core.EmptyTest$DefaultedAttribute] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] Some description Some description Some description >>>>> ELEMENT=[element test] >>>>> TYPE=[class org.simpleframework.xml.core.EmptyTest$DefaultedAttribute] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] Some description >>>>> ELEMENT=[element Test] >>>>> TYPE=[class org.simpleframework.xml.core.EmptyTest$DefaultedAttribute] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ------------- ---------------- --------------- ------------- Standard Error ----------------- org.simpleframework.xml.core.ValueRequiredException: Empty value for @org.simpleframework.xml.Element(required=true, data=false, name=empty) on field 'empty' private java.lang.String org.simpleframework.xml.core.EmptyTest$RequiredElement.empty in class org.simpleframework.xml.core.EmptyTest$RequiredElement at line -1 at org.simpleframework.xml.core.Composite.read(Composite.java:579) at org.simpleframework.xml.core.Composite.readElement(Composite.java:550) at org.simpleframework.xml.core.Composite.readElements(Composite.java:466) at org.simpleframework.xml.core.Composite.read(Composite.java:350) at org.simpleframework.xml.core.Composite.readDefault(Composite.java:245) at org.simpleframework.xml.core.Composite.read(Composite.java:215) at org.simpleframework.xml.core.Composite.read(Composite.java:185) at org.simpleframework.xml.core.Composite.read(Composite.java:133) at org.simpleframework.xml.core.Traverser.read(Traverser.java:92) at org.simpleframework.xml.core.Persister.read(Persister.java:602) at org.simpleframework.xml.core.Persister.read(Persister.java:583) at org.simpleframework.xml.core.Persister.read(Persister.java:564) at org.simpleframework.xml.core.Persister.read(Persister.java:501) at org.simpleframework.xml.core.Persister.read(Persister.java:410) at org.simpleframework.xml.core.EmptyTest.testRequiredEmpty(EmptyTest.java:113) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:421) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:912) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:766) org.simpleframework.xml.core.ValueRequiredException: Empty value for @org.simpleframework.xml.Element(required=true, data=false, name=) on method 'empty' in class org.simpleframework.xml.core.EmptyTest$RequiredMethodElement at line -1 at org.simpleframework.xml.core.Composite.read(Composite.java:579) at org.simpleframework.xml.core.Composite.readElement(Composite.java:550) at org.simpleframework.xml.core.Composite.readElements(Composite.java:466) at org.simpleframework.xml.core.Composite.read(Composite.java:350) at org.simpleframework.xml.core.Composite.readDefault(Composite.java:245) at org.simpleframework.xml.core.Composite.read(Composite.java:215) at org.simpleframework.xml.core.Composite.read(Composite.java:185) at org.simpleframework.xml.core.Composite.read(Composite.java:133) at org.simpleframework.xml.core.Traverser.read(Traverser.java:92) at org.simpleframework.xml.core.Persister.read(Persister.java:602) at org.simpleframework.xml.core.Persister.read(Persister.java:583) at org.simpleframework.xml.core.Persister.read(Persister.java:564) at org.simpleframework.xml.core.Persister.read(Persister.java:501) at org.simpleframework.xml.core.Persister.read(Persister.java:410) at org.simpleframework.xml.core.EmptyTest.testRequiredEmptyMethod(EmptyTest.java:125) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:421) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:912) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:766) org.simpleframework.xml.core.ValueRequiredException: Empty value for @org.simpleframework.xml.Element(required=true, data=false, name=empty) on field 'empty' private java.lang.String org.simpleframework.xml.core.EmptyTest$RequiredElement.empty in class org.simpleframework.xml.core.EmptyTest$RequiredElement at line -1 at org.simpleframework.xml.core.Composite.read(Composite.java:579) at org.simpleframework.xml.core.Composite.readElement(Composite.java:550) at org.simpleframework.xml.core.Composite.readElements(Composite.java:466) at org.simpleframework.xml.core.Composite.read(Composite.java:350) at org.simpleframework.xml.core.Composite.readDefault(Composite.java:245) at org.simpleframework.xml.core.Composite.read(Composite.java:215) at org.simpleframework.xml.core.Composite.read(Composite.java:185) at org.simpleframework.xml.core.Composite.read(Composite.java:133) at org.simpleframework.xml.core.Traverser.read(Traverser.java:92) at org.simpleframework.xml.core.Persister.read(Persister.java:602) at org.simpleframework.xml.core.Persister.read(Persister.java:583) at org.simpleframework.xml.core.Persister.read(Persister.java:564) at org.simpleframework.xml.core.Persister.read(Persister.java:501) at org.simpleframework.xml.core.Persister.read(Persister.java:410) at org.simpleframework.xml.core.EmptyTest.testRequiredBlank(EmptyTest.java:137) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:421) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:912) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:766) org.simpleframework.xml.core.ValueRequiredException: Empty value for @org.simpleframework.xml.Element(required=true, data=false, name=empty) on field 'empty' private java.lang.String org.simpleframework.xml.core.EmptyTest$RequiredElement.empty in class org.simpleframework.xml.core.EmptyTest$RequiredElement at line -1 at org.simpleframework.xml.core.Composite.read(Composite.java:579) at org.simpleframework.xml.core.Composite.readElement(Composite.java:550) at org.simpleframework.xml.core.Composite.readElements(Composite.java:466) at org.simpleframework.xml.core.Composite.read(Composite.java:350) at org.simpleframework.xml.core.Composite.readDefault(Composite.java:245) at org.simpleframework.xml.core.Composite.read(Composite.java:215) at org.simpleframework.xml.core.Composite.read(Composite.java:185) at org.simpleframework.xml.core.Composite.read(Composite.java:133) at org.simpleframework.xml.core.Traverser.read(Traverser.java:92) at org.simpleframework.xml.core.Persister.read(Persister.java:602) at org.simpleframework.xml.core.Persister.read(Persister.java:583) at org.simpleframework.xml.core.Persister.read(Persister.java:564) at org.simpleframework.xml.core.Persister.read(Persister.java:501) at org.simpleframework.xml.core.Persister.read(Persister.java:410) at org.simpleframework.xml.core.EmptyTest.testOptionalEmpty(EmptyTest.java:149) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:421) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:912) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:766) ------------- ---------------- --------------- Testcase: testRequiredEmpty took 0.123 sec Testcase: testRequiredEmptyMethod took 0.008 sec Testcase: testRequiredBlank took 0.004 sec Testcase: testOptionalEmpty took 0.004 sec Testcase: testOptionalBlank took 0.002 sec Testcase: testEmptyCollection took 0.086 sec Testcase: testRequiredEmptyAttribute took 0.008 sec Testcase: testOptionalEmptyAttribute took 0.003 sec Testcase: testDefaultedAttribute took 0.23 sec Testcase: testDirectory took 0 sec ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootsimple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.transform.GregorianCalendarTransformTest.txtsimple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.transform.GregorianCalendarTransformTest.t0000644000175000017500000000027211342531443034634 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.transform.GregorianCalendarTransformTest Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.022 sec Testcase: testGregorianCalendar took 0.019 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.CompositeInlineMapTest.txt0000644000175000017500000000146111342531270032420 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.CompositeInlineMapTest Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.102 sec ------------- Standard Output --------------- a 1 b 2 a 1 b 2 1 2 ------------- ---------------- --------------- Testcase: testNotInlineString took 0.053 sec Testcase: testNoAttributeString took 0.043 sec Testcase: testAttributeNoKeyString took 0.002 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.transform.BigDecimalTransformTest.txt0000644000175000017500000000025411342531440033616 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.transform.BigDecimalTransformTest Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.007 sec Testcase: testBigDecimal took 0.003 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.DataTest.txt0000644000175000017500000001632411342531273027541 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.DataTest Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.283 sec ------------- Standard Output --------------- { for $text in .//TITLE return $text } ]]> { for $text in .//B return $text } ]]> { for $text in .//TITLE return $text } ]]> { for $text in .//B return $text } ]]> { for $text in .//TITLE return $text } ]]> { for $text in .//B return $text } ]]> >>>>> ELEMENT=[element scrape] >>>>> TYPE=[class org.simpleframework.xml.core.DataTest$Scrape] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] { for $text in .//TITLE return $text } ]]> { for $text in .//B return $text } ]]> >>>>> ELEMENT=[element Scrape] >>>>> TYPE=[class org.simpleframework.xml.core.DataTest$Scrape] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] { for $text in .//TITLE return $text } ]]> { for $text in .//B return $text } ]]> { for $text in .//TITLE return $text } ]]> { for $text in .//B return $text } ]]> { for $text in .//TITLE return $text } ]]> { for $text in .//B return $text } ]]> >>>>> ELEMENT=[element scrape] >>>>> TYPE=[class org.simpleframework.xml.core.DataTest$Scrape] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] { for $text in .//TITLE return $text } ]]> { for $text in .//B return $text } ]]> >>>>> ELEMENT=[element Scrape] >>>>> TYPE=[class org.simpleframework.xml.core.DataTest$Scrape] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ------------- ---------------- --------------- Testcase: testData took 0.225 sec Testcase: testDataFromByteStream took 0.051 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.CompositeMapTest.txt0000644000175000017500000000165311342531271031265 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.CompositeMapTest Tests run: 4, Failures: 0, Errors: 0, Time elapsed: 0.106 sec ------------- Standard Output --------------- 1 2 a 1 b 2 a 1 b 2 1 2 ------------- ---------------- --------------- Testcase: testInlineString took 0.051 sec Testcase: testNotInlineString took 0.001 sec Testcase: testNoAttributeString took 0.045 sec Testcase: testAttributeNoKeyString took 0.002 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.ScannerTest.txt0000644000175000017500000000052111342531363030251 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.ScannerTest Tests run: 5, Failures: 0, Errors: 0, Time elapsed: 0.112 sec Testcase: testExample took 0.075 sec Testcase: testMixedExample took 0.01 sec Testcase: testDuplicateAttribute took 0.005 sec Testcase: testNonMatchingElement took 0.002 sec Testcase: testIllegalTextExample took 0.014 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.NamespaceVerbosityTest.txt0000644000175000017500000000064011342531325032463 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.NamespaceVerbosityTest Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.163 sec ------------- Standard Output --------------- b c e ------------- ---------------- --------------- Testcase: testScope took 0.155 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.EnumSetTest.txt0000644000175000017500000000364311342531301030240 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.EnumSetTest Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.195 sec ------------- Standard Output --------------- BEGINNER EXPERT BEGINNER EXPERT BEGINNER EXPERT BEGINNER EXPERT >>>>> ELEMENT=[element enum-set-example] >>>>> TYPE=[class org.simpleframework.xml.core.EnumSetTest$EnumSetExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] BEGINNER EXPERT >>>>> ELEMENT=[element EnumSetExample] >>>>> TYPE=[class org.simpleframework.xml.core.EnumSetTest$EnumSetExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ------------- ---------------- --------------- Testcase: testEnumSet took 0.188 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.strategy.CommentTest.txt0000644000175000017500000000100211342531400031157 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.strategy.CommentTest Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.117 sec ------------- Standard Output --------------- Some Name A value to use 9.99 ------------- ---------------- --------------- Testcase: testComment took 0.111 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.CollectionTest.txt0000644000175000017500000012162211342531267030764 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.CollectionTest Tests run: 21, Failures: 0, Errors: 0, Time elapsed: 0.656 sec ------------- Standard Output --------------- one two three one two three one two three >>>>> ELEMENT=[element test] >>>>> TYPE=[class org.simpleframework.xml.core.CollectionTest$EntrySortedSet] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] one two three >>>>> ELEMENT=[element Test] >>>>> TYPE=[class org.simpleframework.xml.core.CollectionTest$EntrySortedSet] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] one two three one two three one two three >>>>> ELEMENT=[element test] >>>>> TYPE=[class org.simpleframework.xml.core.CollectionTest$EntryList] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] one two three >>>>> ELEMENT=[element Test] >>>>> TYPE=[class org.simpleframework.xml.core.CollectionTest$EntryList] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] two three one two three one two three one >>>>> ELEMENT=[element test] >>>>> TYPE=[class org.simpleframework.xml.core.CollectionTest$EntrySet] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] two three one >>>>> ELEMENT=[element Test] >>>>> TYPE=[class org.simpleframework.xml.core.CollectionTest$EntrySet] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] one two three one two three one two three >>>>> ELEMENT=[element test] >>>>> TYPE=[class org.simpleframework.xml.core.CollectionTest$EntrySortedSet] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] one two three >>>>> ELEMENT=[element Test] >>>>> TYPE=[class org.simpleframework.xml.core.CollectionTest$EntrySortedSet] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] one two three one two three one two three >>>>> ELEMENT=[element test] >>>>> TYPE=[class org.simpleframework.xml.core.CollectionTest$EntryList] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] one two three >>>>> ELEMENT=[element Test] >>>>> TYPE=[class org.simpleframework.xml.core.CollectionTest$EntryList] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] one two three one two three one two three >>>>> ELEMENT=[element type-from-field-list] >>>>> TYPE=[class org.simpleframework.xml.core.CollectionTest$TypeFromFieldList] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] one two three >>>>> ELEMENT=[element TypeFromFieldList] >>>>> TYPE=[class org.simpleframework.xml.core.CollectionTest$TypeFromFieldList] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] one two three one two three one two three >>>>> ELEMENT=[element type-from-method-list] >>>>> TYPE=[class org.simpleframework.xml.core.CollectionTest$TypeFromMethodList] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] one two three >>>>> ELEMENT=[element TypeFromMethodList] >>>>> TYPE=[class org.simpleframework.xml.core.CollectionTest$TypeFromMethodList] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] one two three one two three one two three >>>>> ELEMENT=[element primitive-collection] >>>>> TYPE=[class org.simpleframework.xml.core.CollectionTest$PrimitiveCollection] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] one two three >>>>> ELEMENT=[element PrimitiveCollection] >>>>> TYPE=[class org.simpleframework.xml.core.CollectionTest$PrimitiveCollection] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] one two three one two three one two three >>>>> ELEMENT=[element composite-collection] >>>>> TYPE=[class org.simpleframework.xml.core.CollectionTest$CompositeCollection] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] one two three >>>>> ELEMENT=[element CompositeCollection] >>>>> TYPE=[class org.simpleframework.xml.core.CollectionTest$CompositeCollection] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] one two three one two three one two three >>>>> ELEMENT=[element primitive-default-collection] >>>>> TYPE=[class org.simpleframework.xml.core.CollectionTest$PrimitiveDefaultCollection] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] one two three >>>>> ELEMENT=[element PrimitiveDefaultCollection] >>>>> TYPE=[class org.simpleframework.xml.core.CollectionTest$PrimitiveDefaultCollection] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ------------- ---------------- --------------- ------------- Standard Error ----------------- two this is the second one one this is an extended entry three two this is the second one three one this is an extended entry org.simpleframework.xml.core.InstantiationException: Type class java.util.HashSet is not compatible with interface java.util.SortedSet at org.simpleframework.xml.core.Factory.getOverride(Factory.java:122) at org.simpleframework.xml.core.CollectionFactory.getInstance(CollectionFactory.java:87) at org.simpleframework.xml.core.CompositeList.read(CompositeList.java:110) at org.simpleframework.xml.core.Composite.readObject(Composite.java:626) at org.simpleframework.xml.core.Composite.read(Composite.java:569) at org.simpleframework.xml.core.Composite.readElement(Composite.java:550) at org.simpleframework.xml.core.Composite.readElements(Composite.java:466) at org.simpleframework.xml.core.Composite.read(Composite.java:350) at org.simpleframework.xml.core.Composite.readDefault(Composite.java:245) at org.simpleframework.xml.core.Composite.read(Composite.java:215) at org.simpleframework.xml.core.Composite.read(Composite.java:185) at org.simpleframework.xml.core.Composite.read(Composite.java:133) at org.simpleframework.xml.core.Traverser.read(Traverser.java:92) at org.simpleframework.xml.core.Persister.read(Persister.java:602) at org.simpleframework.xml.core.Persister.read(Persister.java:583) at org.simpleframework.xml.core.Persister.read(Persister.java:564) at org.simpleframework.xml.core.Persister.read(Persister.java:501) at org.simpleframework.xml.core.Persister.read(Persister.java:410) at org.simpleframework.xml.core.CollectionTest.testSetToSortedSet(CollectionTest.java:744) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:421) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:912) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:766) org.simpleframework.xml.core.InstantiationException: Type class java.util.ArrayList is not compatible with interface java.util.Set at org.simpleframework.xml.core.Factory.getOverride(Factory.java:122) at org.simpleframework.xml.core.CollectionFactory.getInstance(CollectionFactory.java:87) at org.simpleframework.xml.core.CompositeList.read(CompositeList.java:110) at org.simpleframework.xml.core.Composite.readObject(Composite.java:626) at org.simpleframework.xml.core.Composite.read(Composite.java:569) at org.simpleframework.xml.core.Composite.readElement(Composite.java:550) at org.simpleframework.xml.core.Composite.readElements(Composite.java:466) at org.simpleframework.xml.core.Composite.read(Composite.java:350) at org.simpleframework.xml.core.Composite.readDefault(Composite.java:245) at org.simpleframework.xml.core.Composite.read(Composite.java:215) at org.simpleframework.xml.core.Composite.read(Composite.java:185) at org.simpleframework.xml.core.Composite.read(Composite.java:133) at org.simpleframework.xml.core.Traverser.read(Traverser.java:92) at org.simpleframework.xml.core.Persister.read(Persister.java:602) at org.simpleframework.xml.core.Persister.read(Persister.java:583) at org.simpleframework.xml.core.Persister.read(Persister.java:564) at org.simpleframework.xml.core.Persister.read(Persister.java:501) at org.simpleframework.xml.core.Persister.read(Persister.java:410) at org.simpleframework.xml.core.CollectionTest.testListToSet(CollectionTest.java:756) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:421) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:912) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:766) org.simpleframework.xml.core.InstantiationException: Type is not a collection class java.lang.String at org.simpleframework.xml.core.CollectionFactory.getInstance(CollectionFactory.java:97) at org.simpleframework.xml.core.CompositeList.read(CompositeList.java:110) at org.simpleframework.xml.core.Composite.readObject(Composite.java:626) at org.simpleframework.xml.core.Composite.read(Composite.java:569) at org.simpleframework.xml.core.Composite.readElement(Composite.java:550) at org.simpleframework.xml.core.Composite.readElements(Composite.java:466) at org.simpleframework.xml.core.Composite.read(Composite.java:350) at org.simpleframework.xml.core.Composite.readDefault(Composite.java:245) at org.simpleframework.xml.core.Composite.read(Composite.java:215) at org.simpleframework.xml.core.Composite.read(Composite.java:185) at org.simpleframework.xml.core.Composite.read(Composite.java:133) at org.simpleframework.xml.core.Traverser.read(Traverser.java:92) at org.simpleframework.xml.core.Persister.read(Persister.java:602) at org.simpleframework.xml.core.Persister.read(Persister.java:583) at org.simpleframework.xml.core.Persister.read(Persister.java:564) at org.simpleframework.xml.core.Persister.read(Persister.java:501) at org.simpleframework.xml.core.Persister.read(Persister.java:410) at org.simpleframework.xml.core.CollectionTest.testInvalidList(CollectionTest.java:769) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:421) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:912) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:766) org.simpleframework.xml.core.InstantiationException: Cannot instantiate class org.simpleframework.xml.core.CollectionTest$UnknownCollection at org.simpleframework.xml.core.CollectionFactory.getConversion(CollectionFactory.java:145) at org.simpleframework.xml.core.CollectionFactory.getInstance(CollectionFactory.java:94) at org.simpleframework.xml.core.CompositeList.read(CompositeList.java:110) at org.simpleframework.xml.core.Composite.readObject(Composite.java:626) at org.simpleframework.xml.core.Composite.read(Composite.java:569) at org.simpleframework.xml.core.Composite.readElement(Composite.java:550) at org.simpleframework.xml.core.Composite.readElements(Composite.java:466) at org.simpleframework.xml.core.Composite.read(Composite.java:350) at org.simpleframework.xml.core.Composite.readDefault(Composite.java:245) at org.simpleframework.xml.core.Composite.read(Composite.java:215) at org.simpleframework.xml.core.Composite.read(Composite.java:185) at org.simpleframework.xml.core.Composite.read(Composite.java:133) at org.simpleframework.xml.core.Traverser.read(Traverser.java:92) at org.simpleframework.xml.core.Persister.read(Persister.java:602) at org.simpleframework.xml.core.Persister.read(Persister.java:583) at org.simpleframework.xml.core.Persister.read(Persister.java:564) at org.simpleframework.xml.core.Persister.read(Persister.java:501) at org.simpleframework.xml.core.Persister.read(Persister.java:410) at org.simpleframework.xml.core.CollectionTest.testUnknownCollectionList(CollectionTest.java:781) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:421) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:912) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:766) org.simpleframework.xml.core.InstantiationException: Cannot instantiate class org.simpleframework.xml.core.CollectionTest$AbstractList at org.simpleframework.xml.core.CollectionFactory.getConversion(CollectionFactory.java:145) at org.simpleframework.xml.core.CollectionFactory.getInstance(CollectionFactory.java:116) at org.simpleframework.xml.core.CollectionFactory.getInstance(CollectionFactory.java:91) at org.simpleframework.xml.core.CompositeList.read(CompositeList.java:110) at org.simpleframework.xml.core.Composite.readObject(Composite.java:626) at org.simpleframework.xml.core.Composite.read(Composite.java:569) at org.simpleframework.xml.core.Composite.readElement(Composite.java:550) at org.simpleframework.xml.core.Composite.readElements(Composite.java:466) at org.simpleframework.xml.core.Composite.read(Composite.java:350) at org.simpleframework.xml.core.Composite.readDefault(Composite.java:245) at org.simpleframework.xml.core.Composite.read(Composite.java:215) at org.simpleframework.xml.core.Composite.read(Composite.java:185) at org.simpleframework.xml.core.Composite.read(Composite.java:133) at org.simpleframework.xml.core.Traverser.read(Traverser.java:92) at org.simpleframework.xml.core.Persister.read(Persister.java:602) at org.simpleframework.xml.core.Persister.read(Persister.java:583) at org.simpleframework.xml.core.Persister.read(Persister.java:564) at org.simpleframework.xml.core.Persister.read(Persister.java:501) at org.simpleframework.xml.core.Persister.read(Persister.java:410) at org.simpleframework.xml.core.CollectionTest.testAbstractList(CollectionTest.java:793) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:421) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:912) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:766) org.simpleframework.xml.core.InstantiationException: Type class java.util.Hashtable is not compatible with interface java.util.List at org.simpleframework.xml.core.Factory.getOverride(Factory.java:122) at org.simpleframework.xml.core.CollectionFactory.getInstance(CollectionFactory.java:87) at org.simpleframework.xml.core.CompositeList.read(CompositeList.java:110) at org.simpleframework.xml.core.Composite.readObject(Composite.java:626) at org.simpleframework.xml.core.Composite.read(Composite.java:569) at org.simpleframework.xml.core.Composite.readElement(Composite.java:550) at org.simpleframework.xml.core.Composite.readElements(Composite.java:466) at org.simpleframework.xml.core.Composite.read(Composite.java:350) at org.simpleframework.xml.core.Composite.readDefault(Composite.java:245) at org.simpleframework.xml.core.Composite.read(Composite.java:215) at org.simpleframework.xml.core.Composite.read(Composite.java:185) at org.simpleframework.xml.core.Composite.read(Composite.java:133) at org.simpleframework.xml.core.Traverser.read(Traverser.java:92) at org.simpleframework.xml.core.Persister.read(Persister.java:602) at org.simpleframework.xml.core.Persister.read(Persister.java:583) at org.simpleframework.xml.core.Persister.read(Persister.java:564) at org.simpleframework.xml.core.Persister.read(Persister.java:501) at org.simpleframework.xml.core.Persister.read(Persister.java:410) at org.simpleframework.xml.core.CollectionTest.testNotACollection(CollectionTest.java:805) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:421) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:912) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:766) java.lang.ClassNotFoundException: example.MyCollection at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:316) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:280) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at org.simpleframework.xml.strategy.Loader.load(Loader.java:50) at org.simpleframework.xml.strategy.TreeStrategy.readValue(TreeStrategy.java:163) at org.simpleframework.xml.strategy.TreeStrategy.read(TreeStrategy.java:102) at org.simpleframework.xml.core.Source.getOverride(Source.java:391) at org.simpleframework.xml.core.Factory.getConversion(Factory.java:162) at org.simpleframework.xml.core.Factory.getOverride(Factory.java:115) at org.simpleframework.xml.core.CollectionFactory.getInstance(CollectionFactory.java:87) at org.simpleframework.xml.core.CompositeList.read(CompositeList.java:110) at org.simpleframework.xml.core.Composite.readObject(Composite.java:626) at org.simpleframework.xml.core.Composite.read(Composite.java:569) at org.simpleframework.xml.core.Composite.readElement(Composite.java:550) at org.simpleframework.xml.core.Composite.readElements(Composite.java:466) at org.simpleframework.xml.core.Composite.read(Composite.java:350) at org.simpleframework.xml.core.Composite.readDefault(Composite.java:245) at org.simpleframework.xml.core.Composite.read(Composite.java:215) at org.simpleframework.xml.core.Composite.read(Composite.java:185) at org.simpleframework.xml.core.Composite.read(Composite.java:133) at org.simpleframework.xml.core.Traverser.read(Traverser.java:92) at org.simpleframework.xml.core.Persister.read(Persister.java:602) at org.simpleframework.xml.core.Persister.read(Persister.java:583) at org.simpleframework.xml.core.Persister.read(Persister.java:564) at org.simpleframework.xml.core.Persister.read(Persister.java:501) at org.simpleframework.xml.core.Persister.read(Persister.java:410) at org.simpleframework.xml.core.CollectionTest.testMissingCollection(CollectionTest.java:817) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:421) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:912) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:766) ------------- ---------------- --------------- Testcase: testSet took 0.128 sec Testcase: testSortedSet took 0.098 sec Testcase: testList took 0.044 sec Testcase: testHashSet took 0.048 sec Testcase: testTreeSet took 0.04 sec Testcase: testArrayList took 0.045 sec Testcase: testSortedSetToSet took 0.003 sec Testcase: testExtendedEntry took 0.011 sec Testcase: testTypeFromFieldList took 0.065 sec Testcase: testTypeFromMethodList took 0.037 sec Testcase: testPrimitiveCollection took 0.026 sec Testcase: testCompositeCollection took 0.032 sec Testcase: testPrimitiveDefaultCollection took 0.023 sec Testcase: testSetToSortedSet took 0.006 sec Testcase: testListToSet took 0.002 sec Testcase: testInvalidList took 0.002 sec Testcase: testUnknownCollectionList took 0.002 sec Testcase: testAbstractList took 0.002 sec Testcase: testNotACollection took 0.004 sec Testcase: testMissingCollection took 0.004 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.strategy.AnnotationTypeTest.txt0000644000175000017500000000215411342531377032557 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.strategy.AnnotationTypeTest Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.373 sec ------------- Standard Output --------------- John Doe John Doe John Doe >>>>> ELEMENT=[element annotation-example] >>>>> TYPE=[class org.simpleframework.xml.strategy.AnnotationTypeTest$AnnotationExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] John Doe >>>>> ELEMENT=[element AnnotationExample] >>>>> TYPE=[class org.simpleframework.xml.strategy.AnnotationTypeTest$AnnotationExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ------------- ---------------- --------------- Testcase: testAnnotationType took 0.367 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.UnicodeTest.txt0000644000175000017500000034665711342531374030277 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.UnicodeTest Tests run: 5, Failures: 0, Errors: 0, Time elapsed: 0.743 sec ------------- Standard Output --------------- ἈÏχιμήδης Tor Ã…ge Bringsværd 심ì€í•˜ Søren Hauch-Fausbøll ì´ì„¤í¬ माधà¥à¤°à¥€ दिछित Johann Strauß 舒淇 Céline Dion Mylène Demongeot Sinéad O'Connor نصرت ÙØªØ­ علی خان ΓιώÏγος ÎταλάÏας Søren KierkegÃ¥rd Jean Réno テクス テクサン ኢትዮጵያ ×™×”×•×¨× ×’×ון Olga Tañón ä¹…ä¿ç”°Â    利伸 Lech Wałęsa ธงไชย à¹à¸¡à¹‡à¸„อินไตย์ Camille Saint-Saëns Brad Pitt Fabrizio De André Walter Schultheiß Михаил Горбачёв 森鷗外 안성기 çŽ‹è² Ð‘Ð¾Ñ€Ð¸Ñ Ð“Ñ€ÐµÐ±ÐµÐ½Ñ‰Ð¸ÐºÐ¾Ð² Nicole Kidman 林原 ã‚ãã¿ æŽå®‰ ﺃﻡ ﻛﻟﺛﻭﻡ Rudi Völler ኤርትራ ﻋﺑﺪïºï» ïº£ï»Ÿï»³ï»¢ ﺤﺎﻓﻅ François Truffaut ç« å­æ€¡ Björk Guðmundsdóttir Gérard Depardieu ????????? Tor ge Bringsv¾rd ??? S¿ren Hauch-Fausb¿ll ??? ?????? ????? Johann Strau§ ?? CŽline Dion Mylne Demongeot SinŽad O'Connor ???? ??? ??? ??? ??????? ???????? S¿ren KierkegŒrd Jean RŽno ??? ???? ????? ????? ???? Olga Ta–—n ???Ê Ê ?? Lech Wa??sa ????? ??????????? Camille Saint-Sa‘ns Brad Pitt Fabrizio De AndrŽ Walter Schulthei§ ?????? ???????? ??? ??? ?? ????? ??????????? Nicole Kidman ?? ??? ?? ?? ????? Rudi Všller ???? ????????? ???? Franois Truffaut ??? Bjšrk Gu?mundsd—ttir GŽrard Depardieu ἈÏχιμήδης Tor Ã…ge Bringsværd 심ì€í•˜ Søren Hauch-Fausbøll ì´ì„¤í¬ माधà¥à¤°à¥€ दिछित Johann Strauß 舒淇 Céline Dion Mylène Demongeot Sinéad O'Connor نصرت ÙØªØ­ علی خان ΓιώÏγος ÎταλάÏας Søren KierkegÃ¥rd Jean Réno テクス テクサン ኢትዮጵያ ×™×”×•×¨× ×’×ון Olga Tañón ä¹…ä¿ç”°Â    利伸 Lech Wałęsa ธงไชย à¹à¸¡à¹‡à¸„อินไตย์ Camille Saint-Saëns Brad Pitt Fabrizio De André Walter Schultheiß Михаил Горбачёв 森鷗外 안성기 çŽ‹è² Ð‘Ð¾Ñ€Ð¸Ñ Ð“Ñ€ÐµÐ±ÐµÐ½Ñ‰Ð¸ÐºÐ¾Ð² Nicole Kidman 林原 ã‚ãã¿ æŽå®‰ ﺃﻡ ﻛﻟﺛﻭﻡ Rudi Völler ኤርትራ ﻋﺑﺪïºï» ïº£ï»Ÿï»³ï»¢ ﺤﺎﻓﻅ François Truffaut ç« å­æ€¡ Björk Guðmundsdóttir Gérard Depardieu >>>>> ELEMENT=[element example] >>>>> TYPE=[class org.simpleframework.xml.core.UnicodeTest$UnicodeExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ἈÏχιμήδης Tor Ã…ge Bringsværd 심ì€í•˜ Søren Hauch-Fausbøll ì´ì„¤í¬ माधà¥à¤°à¥€ दिछित Johann Strauß 舒淇 Céline Dion Mylène Demongeot Sinéad O'Connor نصرت ÙØªØ­ علی خان ΓιώÏγος ÎταλάÏας Søren KierkegÃ¥rd Jean Réno テクス テクサン ኢትዮጵያ ×™×”×•×¨× ×’×ון Olga Tañón ä¹…ä¿ç”°Â    利伸 Lech Wałęsa ธงไชย à¹à¸¡à¹‡à¸„อินไตย์ Camille Saint-Saëns Brad Pitt Fabrizio De André Walter Schultheiß Михаил Горбачёв 森鷗外 안성기 çŽ‹è² Ð‘Ð¾Ñ€Ð¸Ñ Ð“Ñ€ÐµÐ±ÐµÐ½Ñ‰Ð¸ÐºÐ¾Ð² Nicole Kidman 林原 ã‚ãã¿ æŽå®‰ ﺃﻡ ﻛﻟﺛﻭﻡ Rudi Völler ኤርትራ ﻋﺑﺪïºï» ïº£ï»Ÿï»³ï»¢ ﺤﺎﻓﻅ François Truffaut ç« å­æ€¡ Björk Guðmundsdóttir Gérard Depardieu >>>>> ELEMENT=[element Example] >>>>> TYPE=[class org.simpleframework.xml.core.UnicodeTest$UnicodeExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ἈÏχιμήδης Tor Ã…ge Bringsværd 심ì€í•˜ Søren Hauch-Fausbøll ì´ì„¤í¬ माधà¥à¤°à¥€ दिछित Johann Strauß 舒淇 Céline Dion Mylène Demongeot Sinéad O'Connor نصرت ÙØªØ­ علی خان ΓιώÏγος ÎταλάÏας Søren KierkegÃ¥rd Jean Réno テクス テクサン ኢትዮጵያ ×™×”×•×¨× ×’×ון Olga Tañón ä¹…ä¿ç”°Â    利伸 Lech Wałęsa ธงไชย à¹à¸¡à¹‡à¸„อินไตย์ Camille Saint-Saëns Brad Pitt Fabrizio De André Walter Schultheiß Михаил Горбачёв 森鷗外 안성기 çŽ‹è² Ð‘Ð¾Ñ€Ð¸Ñ Ð“Ñ€ÐµÐ±ÐµÐ½Ñ‰Ð¸ÐºÐ¾Ð² Nicole Kidman 林原 ã‚ãã¿ æŽå®‰ ﺃﻡ ﻛﻟﺛﻭﻡ Rudi Völler ኤርትራ ﻋﺑﺪïºï» ïº£ï»Ÿï»³ï»¢ ﺤﺎﻓﻅ François Truffaut ç« å­æ€¡ Björk Guðmundsdóttir Gérard Depardieu ????????? Tor ge Bringsv¾rd ??? S¿ren Hauch-Fausb¿ll ??? ?????? ????? Johann Strau§ ?? CŽline Dion Mylne Demongeot SinŽad O'Connor ???? ??? ??? ??? ??????? ???????? S¿ren KierkegŒrd Jean RŽno ??? ???? ????? ????? ???? Olga Ta–—n ???Ê Ê ?? Lech Wa??sa ????? ??????????? Camille Saint-Sa‘ns Brad Pitt Fabrizio De AndrŽ Walter Schulthei§ ?????? ???????? ??? ??? ?? ????? ??????????? Nicole Kidman ?? ??? ?? ?? ????? Rudi Všller ???? ????????? ???? Franois Truffaut ??? Bjšrk Gu?mundsd—ttir GŽrard Depardieu ἈÏχιμήδης Tor Ã…ge Bringsværd 심ì€í•˜ Søren Hauch-Fausbøll ì´ì„¤í¬ माधà¥à¤°à¥€ दिछित Johann Strauß 舒淇 Céline Dion Mylène Demongeot Sinéad O'Connor نصرت ÙØªØ­ علی خان ΓιώÏγος ÎταλάÏας Søren KierkegÃ¥rd Jean Réno テクス テクサン ኢትዮጵያ ×™×”×•×¨× ×’×ון Olga Tañón ä¹…ä¿ç”°Â    利伸 Lech Wałęsa ธงไชย à¹à¸¡à¹‡à¸„อินไตย์ Camille Saint-Saëns Brad Pitt Fabrizio De André Walter Schultheiß Михаил Горбачёв 森鷗外 안성기 çŽ‹è² Ð‘Ð¾Ñ€Ð¸Ñ Ð“Ñ€ÐµÐ±ÐµÐ½Ñ‰Ð¸ÐºÐ¾Ð² Nicole Kidman 林原 ã‚ãã¿ æŽå®‰ ﺃﻡ ﻛﻟﺛﻭﻡ Rudi Völler ኤርትራ ﻋﺑﺪïºï» ïº£ï»Ÿï»³ï»¢ ﺤﺎﻓﻅ François Truffaut ç« å­æ€¡ Björk Guðmundsdóttir Gérard Depardieu >>>>> ELEMENT=[element example] >>>>> TYPE=[class org.simpleframework.xml.core.UnicodeTest$UnicodeExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ἈÏχιμήδης Tor Ã…ge Bringsværd 심ì€í•˜ Søren Hauch-Fausbøll ì´ì„¤í¬ माधà¥à¤°à¥€ दिछित Johann Strauß 舒淇 Céline Dion Mylène Demongeot Sinéad O'Connor نصرت ÙØªØ­ علی خان ΓιώÏγος ÎταλάÏας Søren KierkegÃ¥rd Jean Réno テクス テクサン ኢትዮጵያ ×™×”×•×¨× ×’×ון Olga Tañón ä¹…ä¿ç”°Â    利伸 Lech Wałęsa ธงไชย à¹à¸¡à¹‡à¸„อินไตย์ Camille Saint-Saëns Brad Pitt Fabrizio De André Walter Schultheiß Михаил Горбачёв 森鷗外 안성기 çŽ‹è² Ð‘Ð¾Ñ€Ð¸Ñ Ð“Ñ€ÐµÐ±ÐµÐ½Ñ‰Ð¸ÐºÐ¾Ð² Nicole Kidman 林原 ã‚ãã¿ æŽå®‰ ﺃﻡ ﻛﻟﺛﻭﻡ Rudi Völler ኤርትራ ﻋﺑﺪïºï» ïº£ï»Ÿï»³ï»¢ ﺤﺎﻓﻅ François Truffaut ç« å­æ€¡ Björk Guðmundsdóttir Gérard Depardieu >>>>> ELEMENT=[element Example] >>>>> TYPE=[class org.simpleframework.xml.core.UnicodeTest$UnicodeExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] Tor Ã…ge Bringsværd ἈÏχιμήδης 심ì€í•˜ Søren Hauch-Fausbøll माधà¥à¤°à¥€ दिछित ì´ì„¤í¬ Johann Strauß Céline Dion 舒淇 Mylène Demongeot Sinéad O'Connor نصرت ÙØªØ­ علی خان ΓιώÏγος ÎταλάÏας Søren KierkegÃ¥rd Jean Réno テクス テクサン ኢትዮጵያ ×™×”×•×¨× ×’×ון Olga Tañón ä¹…ä¿ç”°Â    利伸 Lech Wałęsa ธงไชย à¹à¸¡à¹‡à¸„อินไตย์ Camille Saint-Saëns Brad Pitt Fabrizio De André Walter Schultheiß 森鷗外 Михаил Горбачёв çŽ‹è² ì•ˆì„±ê¸° 林原 ã‚ãã¿ Nicole Kidman Ð‘Ð¾Ñ€Ð¸Ñ Ð“Ñ€ÐµÐ±ÐµÐ½Ñ‰Ð¸ÐºÐ¾Ð² æŽå®‰ ﺃﻡ ﻛﻟﺛﻭﻡ Rudi Völler ኤርትራ ﻋﺑﺪïºï» ïº£ï»Ÿï»³ï»¢ ﺤﺎﻓﻅ François Truffaut Björk Guðmundsdóttir ç« å­æ€¡ Gérard Depardieu Tor ge Bringsv¾rd ????????? ??? S¿ren Hauch-Fausb¿ll ?????? ????? ??? Johann Strau§ CŽline Dion ?? Mylne Demongeot SinŽad O'Connor ???? ??? ??? ??? ??????? ???????? S¿ren KierkegŒrd Jean RŽno ??? ???? ????? ????? ???? Olga Ta–—n ???Ê Ê ?? Lech Wa??sa ????? ??????????? Camille Saint-Sa‘ns Brad Pitt Fabrizio De AndrŽ Walter Schulthei§ ??? ?????? ???????? ?? ??? ?? ??? Nicole Kidman ????? ??????????? ?? ?? ????? Rudi Všller ???? ????????? ???? Franois Truffaut Bjšrk Gu?mundsd—ttir ??? GŽrard Depardieu Tor Ã…ge Bringsværd ἈÏχιμήδης 심ì€í•˜ Søren Hauch-Fausbøll माधà¥à¤°à¥€ दिछित ì´ì„¤í¬ Johann Strauß Céline Dion 舒淇 Mylène Demongeot Sinéad O'Connor نصرت ÙØªØ­ علی خان ΓιώÏγος ÎταλάÏας Søren KierkegÃ¥rd Jean Réno テクス テクサン ኢትዮጵያ ×™×”×•×¨× ×’×ון Olga Tañón ä¹…ä¿ç”°Â    利伸 Lech Wałęsa ธงไชย à¹à¸¡à¹‡à¸„อินไตย์ Camille Saint-Saëns Brad Pitt Fabrizio De André Walter Schultheiß 森鷗外 Михаил Горбачёв çŽ‹è² ì•ˆì„±ê¸° 林原 ã‚ãã¿ Nicole Kidman Ð‘Ð¾Ñ€Ð¸Ñ Ð“Ñ€ÐµÐ±ÐµÐ½Ñ‰Ð¸ÐºÐ¾Ð² æŽå®‰ ﺃﻡ ﻛﻟﺛﻭﻡ Rudi Völler ኤርትራ ﻋﺑﺪïºï» ïº£ï»Ÿï»³ï»¢ ﺤﺎﻓﻅ François Truffaut Björk Guðmundsdóttir ç« å­æ€¡ Gérard Depardieu >>>>> ELEMENT=[element example] >>>>> TYPE=[class org.simpleframework.xml.core.UnicodeTest$UnicodeExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] Tor Ã…ge Bringsværd ἈÏχιμήδης 심ì€í•˜ Søren Hauch-Fausbøll माधà¥à¤°à¥€ दिछित ì´ì„¤í¬ Johann Strauß Céline Dion 舒淇 Mylène Demongeot Sinéad O'Connor نصرت ÙØªØ­ علی خان ΓιώÏγος ÎταλάÏας Søren KierkegÃ¥rd Jean Réno テクス テクサン ኢትዮጵያ ×™×”×•×¨× ×’×ון Olga Tañón ä¹…ä¿ç”°Â    利伸 Lech Wałęsa ธงไชย à¹à¸¡à¹‡à¸„อินไตย์ Camille Saint-Saëns Brad Pitt Fabrizio De André Walter Schultheiß 森鷗外 Михаил Горбачёв çŽ‹è² ì•ˆì„±ê¸° 林原 ã‚ãã¿ Nicole Kidman Ð‘Ð¾Ñ€Ð¸Ñ Ð“Ñ€ÐµÐ±ÐµÐ½Ñ‰Ð¸ÐºÐ¾Ð² æŽå®‰ ﺃﻡ ﻛﻟﺛﻭﻡ Rudi Völler ኤርትራ ﻋﺑﺪïºï» ïº£ï»Ÿï»³ï»¢ ﺤﺎﻓﻅ François Truffaut Björk Guðmundsdóttir ç« å­æ€¡ Gérard Depardieu >>>>> ELEMENT=[element Example] >>>>> TYPE=[class org.simpleframework.xml.core.UnicodeTest$UnicodeExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ἈÏχιμήδης Tor Ã…ge Bringsværd 심ì€í•˜ Søren Hauch-Fausbøll ì´ì„¤í¬ माधà¥à¤°à¥€ दिछित Johann Strauß 舒淇 Céline Dion Mylène Demongeot Sinéad O'Connor نصرت ÙØªØ­ علی خان ΓιώÏγος ÎταλάÏας Søren KierkegÃ¥rd Jean Réno テクス テクサン ኢትዮጵያ ×™×”×•×¨× ×’×ון Olga Tañón ä¹…ä¿ç”°Â    利伸 Lech Wałęsa ธงไชย à¹à¸¡à¹‡à¸„อินไตย์ Camille Saint-Saëns Brad Pitt Fabrizio De André Walter Schultheiß Михаил Горбачёв 森鷗外 안성기 çŽ‹è² Ð‘Ð¾Ñ€Ð¸Ñ Ð“Ñ€ÐµÐ±ÐµÐ½Ñ‰Ð¸ÐºÐ¾Ð² Nicole Kidman 林原 ã‚ãã¿ æŽå®‰ ﺃﻡ ﻛﻟﺛﻭﻡ Rudi Völler ኤርትራ ﻋﺑﺪïºï» ïº£ï»Ÿï»³ï»¢ ﺤﺎﻓﻅ François Truffaut ç« å­æ€¡ Björk Guðmundsdóttir Gérard Depardieu ????????? Tor ge Bringsv¾rd ??? S¿ren Hauch-Fausb¿ll ??? ?????? ????? Johann Strau§ ?? CŽline Dion Mylne Demongeot SinŽad O'Connor ???? ??? ??? ??? ??????? ???????? S¿ren KierkegŒrd Jean RŽno ??? ???? ????? ????? ???? Olga Ta–—n ???Ê Ê ?? Lech Wa??sa ????? ??????????? Camille Saint-Sa‘ns Brad Pitt Fabrizio De AndrŽ Walter Schulthei§ ?????? ???????? ??? ??? ?? ????? ??????????? Nicole Kidman ?? ??? ?? ?? ????? Rudi Všller ???? ????????? ???? Franois Truffaut ??? Bjšrk Gu?mundsd—ttir GŽrard Depardieu ἈÏχιμήδης Tor Ã…ge Bringsværd 심ì€í•˜ Søren Hauch-Fausbøll ì´ì„¤í¬ माधà¥à¤°à¥€ दिछित Johann Strauß 舒淇 Céline Dion Mylène Demongeot Sinéad O'Connor نصرت ÙØªØ­ علی خان ΓιώÏγος ÎταλάÏας Søren KierkegÃ¥rd Jean Réno テクス テクサン ኢትዮጵያ ×™×”×•×¨× ×’×ון Olga Tañón ä¹…ä¿ç”°Â    利伸 Lech Wałęsa ธงไชย à¹à¸¡à¹‡à¸„อินไตย์ Camille Saint-Saëns Brad Pitt Fabrizio De André Walter Schultheiß Михаил Горбачёв 森鷗外 안성기 çŽ‹è² Ð‘Ð¾Ñ€Ð¸Ñ Ð“Ñ€ÐµÐ±ÐµÐ½Ñ‰Ð¸ÐºÐ¾Ð² Nicole Kidman 林原 ã‚ãã¿ æŽå®‰ ﺃﻡ ﻛﻟﺛﻭﻡ Rudi Völler ኤርትራ ﻋﺑﺪïºï» ïº£ï»Ÿï»³ï»¢ ﺤﺎﻓﻅ François Truffaut ç« å­æ€¡ Björk Guðmundsdóttir Gérard Depardieu >>>>> ELEMENT=[element example] >>>>> TYPE=[class org.simpleframework.xml.core.UnicodeTest$UnicodeExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ἈÏχιμήδης Tor Ã…ge Bringsværd 심ì€í•˜ Søren Hauch-Fausbøll ì´ì„¤í¬ माधà¥à¤°à¥€ दिछित Johann Strauß 舒淇 Céline Dion Mylène Demongeot Sinéad O'Connor نصرت ÙØªØ­ علی خان ΓιώÏγος ÎταλάÏας Søren KierkegÃ¥rd Jean Réno テクス テクサン ኢትዮጵያ ×™×”×•×¨× ×’×ון Olga Tañón ä¹…ä¿ç”°Â    利伸 Lech Wałęsa ธงไชย à¹à¸¡à¹‡à¸„อินไตย์ Camille Saint-Saëns Brad Pitt Fabrizio De André Walter Schultheiß Михаил Горбачёв 森鷗外 안성기 çŽ‹è² Ð‘Ð¾Ñ€Ð¸Ñ Ð“Ñ€ÐµÐ±ÐµÐ½Ñ‰Ð¸ÐºÐ¾Ð² Nicole Kidman 林原 ã‚ãã¿ æŽå®‰ ﺃﻡ ﻛﻟﺛﻭﻡ Rudi Völler ኤርትራ ﻋﺑﺪïºï» ïº£ï»Ÿï»³ï»¢ ﺤﺎﻓﻅ François Truffaut ç« å­æ€¡ Björk Guðmundsdóttir Gérard Depardieu >>>>> ELEMENT=[element Example] >>>>> TYPE=[class org.simpleframework.xml.core.UnicodeTest$UnicodeExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ------------- ---------------- --------------- Testcase: testUnicode took 0.37 sec Testcase: testWriteUnicode took 0.263 sec Testcase: testUnicodeFromByteStream took 0.093 sec Testcase: testIncorrectEncoding took 0.006 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.NamespaceInheritanceTest.txt0000644000175000017500000000122011342531324032720 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.NamespaceInheritanceTest Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.141 sec ------------- Standard Output --------------- ------------- ---------------- --------------- Testcase: testNamespace took 0.121 sec Testcase: testNamespacePrefix took 0.011 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.MissingArrayLengthTest.txt0000644000175000017500000000025611342531315032434 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.MissingArrayLengthTest Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.144 sec Testcase: testMissingArrayLength took 0.139 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.CompatibilityTest.txt0000644000175000017500000001576211342531270031503 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.CompatibilityTest Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.203 sec ------------- Standard Error ----------------- org.simpleframework.xml.core.ElementException: Element 'address' does not have a match at line -1 at org.simpleframework.xml.core.Composite.readElement(Composite.java:545) at org.simpleframework.xml.core.Composite.readElements(Composite.java:466) at org.simpleframework.xml.core.Composite.read(Composite.java:350) at org.simpleframework.xml.core.Composite.readDefault(Composite.java:245) at org.simpleframework.xml.core.Composite.read(Composite.java:215) at org.simpleframework.xml.core.Composite.read(Composite.java:185) at org.simpleframework.xml.core.Composite.read(Composite.java:133) at org.simpleframework.xml.core.Traverser.read(Traverser.java:92) at org.simpleframework.xml.core.Persister.read(Persister.java:602) at org.simpleframework.xml.core.Persister.read(Persister.java:583) at org.simpleframework.xml.core.Persister.read(Persister.java:564) at org.simpleframework.xml.core.Persister.read(Persister.java:501) at org.simpleframework.xml.core.Persister.read(Persister.java:410) at org.simpleframework.xml.core.CompatibilityTest.testCompatibility(CompatibilityTest.java:234) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:421) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:912) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:766) org.simpleframework.xml.core.ValueRequiredException: Unable to satisfy @org.simpleframework.xml.ElementList(inline=false, type=void, required=true, data=false, entry=, empty=true, name=) on field 'list' private java.util.List org.simpleframework.xml.core.CompatibilityTest$Example_v1.list for class org.simpleframework.xml.core.CompatibilityTest$Example_v1 at line -1 at org.simpleframework.xml.core.Composite.validate(Composite.java:651) at org.simpleframework.xml.core.Composite.readElements(Composite.java:468) at org.simpleframework.xml.core.Composite.read(Composite.java:350) at org.simpleframework.xml.core.Composite.readDefault(Composite.java:245) at org.simpleframework.xml.core.Composite.read(Composite.java:215) at org.simpleframework.xml.core.Composite.read(Composite.java:185) at org.simpleframework.xml.core.Composite.read(Composite.java:133) at org.simpleframework.xml.core.Traverser.read(Traverser.java:92) at org.simpleframework.xml.core.Persister.read(Persister.java:602) at org.simpleframework.xml.core.Persister.read(Persister.java:583) at org.simpleframework.xml.core.Persister.read(Persister.java:564) at org.simpleframework.xml.core.Persister.read(Persister.java:501) at org.simpleframework.xml.core.Persister.read(Persister.java:410) at org.simpleframework.xml.core.CompatibilityTest.testCompatibility(CompatibilityTest.java:243) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:421) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:912) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:766) org.simpleframework.xml.core.ValueRequiredException: Unable to satisfy @org.simpleframework.xml.Attribute(required=true, empty=, name=) on field 'key' private java.lang.String org.simpleframework.xml.core.CompatibilityTest$Example_v2.key for class org.simpleframework.xml.core.CompatibilityTest$Example_v2 at line -1 at org.simpleframework.xml.core.Composite.validate(Composite.java:651) at org.simpleframework.xml.core.Composite.readAttributes(Composite.java:437) at org.simpleframework.xml.core.Composite.read(Composite.java:349) at org.simpleframework.xml.core.Composite.readDefault(Composite.java:245) at org.simpleframework.xml.core.Composite.read(Composite.java:215) at org.simpleframework.xml.core.Composite.read(Composite.java:185) at org.simpleframework.xml.core.Composite.read(Composite.java:133) at org.simpleframework.xml.core.Traverser.read(Traverser.java:92) at org.simpleframework.xml.core.Persister.read(Persister.java:602) at org.simpleframework.xml.core.Persister.read(Persister.java:583) at org.simpleframework.xml.core.Persister.read(Persister.java:564) at org.simpleframework.xml.core.Persister.read(Persister.java:501) at org.simpleframework.xml.core.Persister.read(Persister.java:410) at org.simpleframework.xml.core.CompatibilityTest.testCompatibility(CompatibilityTest.java:279) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:421) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:912) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:766) ------------- ---------------- --------------- Testcase: testCompatibility took 0.199 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.InlineMapTest.txt0000644000175000017500000001412211342531307030534 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.InlineMapTest Tests run: 4, Failures: 0, Errors: 0, Time elapsed: 0.288 sec ------------- Standard Output --------------- a 1.100000000000000088817841970012523233890533447265625 b 2.20000000000000017763568394002504646778106689453125 a 1.100000000000000088817841970012523233890533447265625 b 2.20000000000000017763568394002504646778106689453125 a 1.100000000000000088817841970012523233890533447265625 b 2.20000000000000017763568394002504646778106689453125 >>>>> ELEMENT=[element primitive-inline-map] >>>>> TYPE=[class org.simpleframework.xml.core.InlineMapTest$PrimitiveInlineMap] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] a 1.100000000000000088817841970012523233890533447265625 b 2.20000000000000017763568394002504646778106689453125 >>>>> ELEMENT=[element PrimitiveInlineMap] >>>>> TYPE=[class org.simpleframework.xml.core.InlineMapTest$PrimitiveInlineMap] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] 1.100000000000000088817841970012523233890533447265625 2.20000000000000017763568394002504646778106689453125 1.100000000000000088817841970012523233890533447265625 2.20000000000000017763568394002504646778106689453125 1.100000000000000088817841970012523233890533447265625 2.20000000000000017763568394002504646778106689453125 >>>>> ELEMENT=[element primitive-inline-attribute-map] >>>>> TYPE=[class org.simpleframework.xml.core.InlineMapTest$PrimitiveInlineAttributeMap] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] 1.100000000000000088817841970012523233890533447265625 2.20000000000000017763568394002504646778106689453125 >>>>> ELEMENT=[element PrimitiveInlineAttributeMap] >>>>> TYPE=[class org.simpleframework.xml.core.InlineMapTest$PrimitiveInlineAttributeMap] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] 1.100000000000000088817841970012523233890533447265625 3.29999999999999982236431605997495353221893310546875 2.20000000000000017763568394002504646778106689453125 1.100000000000000088817841970012523233890533447265625 3.29999999999999982236431605997495353221893310546875 2.20000000000000017763568394002504646778106689453125 1.100000000000000088817841970012523233890533447265625 3.29999999999999982236431605997495353221893310546875 2.20000000000000017763568394002504646778106689453125 >>>>> ELEMENT=[element primitive-inline-attribute-value-map] >>>>> TYPE=[class org.simpleframework.xml.core.InlineMapTest$PrimitiveInlineAttributeValueMap] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] 1.100000000000000088817841970012523233890533447265625 3.29999999999999982236431605997495353221893310546875 2.20000000000000017763568394002504646778106689453125 >>>>> ELEMENT=[element PrimitiveInlineAttributeValueMap] >>>>> TYPE=[class org.simpleframework.xml.core.InlineMapTest$PrimitiveInlineAttributeValueMap] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ------------- ---------------- --------------- Testcase: testPrimitiveMap took 0.212 sec Testcase: testPrimitiveAttributeMap took 0.041 sec Testcase: testPrimitiveAttributeValueMap took 0.027 sec Testcase: testDirectory took 0.001 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.NamespaceTest.txt0000644000175000017500000001041711342531325030557 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.NamespaceTest Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.225 sec ------------- Standard Output --------------- Software Engineer Spam Soft 1000
Sesame Street
John Doe Person
Software Engineer Spam Soft 1000
Sesame Street
John Doe Person
Software Engineer Spam Soft 1000
Sesame Street
John Doe Person
Software Engineer Spam Soft 1000
Sesame Street
John Doe Person
>>>>> ELEMENT=[element person] >>>>> TYPE=[class org.simpleframework.xml.core.NamespaceTest$Person] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] Software Engineer Spam Soft 1000
Sesame Street
John Doe Person
>>>>> ELEMENT=[element Person] >>>>> TYPE=[class org.simpleframework.xml.core.NamespaceTest$Person] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ------------- ---------------- --------------- Testcase: testNamespace took 0.219 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.util.DictionaryTest.txt0000644000175000017500000000475411342531447031031 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.util.DictionaryTest Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.22 sec ------------- Standard Output --------------- three two one three two one three two one >>>>> ELEMENT=[element test] >>>>> TYPE=[class org.simpleframework.xml.util.DictionaryTest$PropertySet] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] three two one >>>>> ELEMENT=[element Test] >>>>> TYPE=[class org.simpleframework.xml.util.DictionaryTest$PropertySet] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ------------- ---------------- --------------- Testcase: testDictionary took 0.213 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.VersionTest.txt0000644000175000017500000000073511342531375030317 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.VersionTest Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.18 sec ------------- Standard Output --------------- text value example name text value text value ------------- ---------------- --------------- Testcase: testVersion1 took 0.166 sec Testcase: testVersion2 took 0.01 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.CollectionConstructorTest.txt0000644000175000017500000000043411342531266033226 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.CollectionConstructorTest Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.191 sec Testcase: testCollectionConstructor took 0.159 sec Testcase: testMapConstructor took 0.016 sec Testcase: testCollectionConstructorComposite took 0.011 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.strategy.ListCycleTest.txt0000644000175000017500000002351011342531403031463 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.strategy.ListCycleTest Tests run: 5, Failures: 0, Errors: 0, Time elapsed: 0.391 sec ------------- Standard Output --------------- >>>>> ELEMENT=[element root] >>>>> TYPE=[class org.simpleframework.xml.strategy.ListCycleTest$ListExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] >>>>> ELEMENT=[element Root] >>>>> TYPE=[class org.simpleframework.xml.strategy.ListCycleTest$ListExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] >>>>> ELEMENT=[element inline-list-example] >>>>> TYPE=[class org.simpleframework.xml.strategy.ListCycleTest$InlineListExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] >>>>> ELEMENT=[element InlineListExample] >>>>> TYPE=[class org.simpleframework.xml.strategy.ListCycleTest$InlineListExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] >>>>> ELEMENT=[element inline-primitive-list-example] >>>>> TYPE=[class org.simpleframework.xml.strategy.ListCycleTest$InlinePrimitiveListExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] >>>>> ELEMENT=[element InlinePrimitiveListExample] >>>>> TYPE=[class org.simpleframework.xml.strategy.ListCycleTest$InlinePrimitiveListExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] >>>>> ELEMENT=[element root] >>>>> TYPE=[class org.simpleframework.xml.strategy.ListCycleTest$NestedListExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] >>>>> ELEMENT=[element Root] >>>>> TYPE=[class org.simpleframework.xml.strategy.ListCycleTest$NestedListExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ------------- ---------------- --------------- Testcase: testCycle took 0.259 sec Testcase: testInlineList took 0.06 sec Testcase: testInlinePrimitiveList took 0.035 sec Testcase: testNestedExample took 0.028 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.convert.ContactEntryTest.txt0000644000175000017500000000166211342531257032036 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.convert.ContactEntryTest Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.15 sec ------------- Standard Output --------------- a A b B c C INHERIT inherit ------------- ---------------- --------------- Testcase: testContact took 0.144 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.MultiThreadedPersisterTest.txt0000644000175000017500000123044711342531323033325 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.MultiThreadedPersisterTest Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 4.413 sec ------------- Standard Output --------------- Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB Eample Name Some Value 10 2010-02-28 18:15:43.37 GMT en_GB ------------- ---------------- --------------- Testcase: testConcurrency took 4.41 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.CompositeTest.txt0000644000175000017500000000027611342531271030627 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.CompositeTest Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.14 sec Testcase: testComposite took 0.134 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.StaticTest.txt0000644000175000017500000001277211342531367030126 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.StaticTest Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.264 sec ------------- Standard Output --------------- Niall Gallagher niallg@users.sourceforge.net Stanford Press 2001
Palo Alto
1st 0-69-697269-4
First paragraph of document Second paragraph in the document Third and final paragraph
Niall Gallagher niallg@users.sourceforge.net Stanford Press 2001
Palo Alto
1st 0-69-697269-4
First paragraph of document Second paragraph in the document Third and final paragraph
Niall Gallagher niallg@users.sourceforge.net Stanford Press 2001
Palo Alto
1st 0-69-697269-4
First paragraph of document Second paragraph in the document Third and final paragraph
Niall Gallagher niallg@users.sourceforge.net Stanford Press 2001
Palo Alto
1st 0-69-697269-4
First paragraph of document Second paragraph in the document Third and final paragraph
>>>>> ELEMENT=[element document] >>>>> TYPE=[class org.simpleframework.xml.core.StaticTest$Document] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] Niall Gallagher niallg@users.sourceforge.net Stanford Press 2001
Palo Alto
1st 0-69-697269-4
First paragraph of document Second paragraph in the document Third and final paragraph
>>>>> ELEMENT=[element Document] >>>>> TYPE=[class org.simpleframework.xml.core.StaticTest$Document] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ------------- ---------------- --------------- Testcase: testStatic took 0.254 sec Testcase: testDirectory took 0.004 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.MixTest.txt0000644000175000017500000002207411342531316027422 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.MixTest Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.338 sec ------------- Standard Output --------------- text 1 true example 1 example 2 key 1 value 1 key 3 3 key 4 value 4 key 2 value 2 2010-02-28 18:15:41.932 GMT text 1 true example 1 example 2 key 3 3 key 4 value 4 key 1 value 1 key 2 value 2 2010-02-28 18:15:41.932 GMT text 1 true example 1 example 2 key 1 value 1 key 3 3 key 4 value 4 key 2 value 2 2010-02-28 18:15:41.932 GMT text 1 true example 1 example 2 key 1 value 1 key 3 3 key 4 value 4 key 2 value 2 2010-02-28 18:15:41.932 GMT text 1 true example 1 example 2 key 1 value 1 key 3 3 key 4 value 4 key 2 value 2 2010-02-28 18:15:41.932 GMT >>>>> ELEMENT=[element mix-example] >>>>> TYPE=[class org.simpleframework.xml.core.MixTest$MixExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] text 1 true example 1 example 2 key 1 value 1 key 3 3 key 4 value 4 key 2 value 2 2010-02-28 18:15:41.932 GMT >>>>> ELEMENT=[element MixExample] >>>>> TYPE=[class org.simpleframework.xml.core.MixTest$MixExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ------------- ---------------- --------------- Testcase: testMix took 0.333 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.NamespaceScopeTest.txt0000644000175000017500000000065711342531325031556 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.NamespaceScopeTest Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.15 sec ------------- Standard Output --------------- c e ------------- ---------------- --------------- Testcase: testScope took 0.144 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.MethodScannerTest.txt0000644000175000017500000000056011342531314031411 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.MethodScannerTest Tests run: 6, Failures: 0, Errors: 0, Time elapsed: 0.075 sec Testcase: testExample took 0.043 sec Testcase: testIllegalOverload took 0.004 sec Testcase: testNonMatchingMethods took 0.002 sec Testcase: testNotBeanMethod took 0.003 sec Testcase: testText took 0.004 sec Testcase: testCollection took 0.008 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.RootTest.txt0000644000175000017500000001077011342531362027611 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.RootTest Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.279 sec ------------- Standard Output --------------- Some text example Some text example Some text example >>>>> ELEMENT=[element root-example] >>>>> TYPE=[class org.simpleframework.xml.core.RootTest$RootExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] Some text example >>>>> ELEMENT=[element RootExample] >>>>> TYPE=[class org.simpleframework.xml.core.RootTest$RootExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] Some text example Some text example Some text example >>>>> ELEMENT=[element extended-root-example] >>>>> TYPE=[class org.simpleframework.xml.core.RootTest$ExtendedRootExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] Some text example >>>>> ELEMENT=[element ExtendedRootExample] >>>>> TYPE=[class org.simpleframework.xml.core.RootTest$ExtendedRootExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] Some text example Some text example Some text example >>>>> ELEMENT=[element extended-root-example] >>>>> TYPE=[class org.simpleframework.xml.core.RootTest$ExtendedRootExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] Some text example >>>>> ELEMENT=[element ExtendedRootExample] >>>>> TYPE=[class org.simpleframework.xml.core.RootTest$ExtendedRootExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] Some text example Some text example Some text example >>>>> ELEMENT=[element extended-overridden-root-example] >>>>> TYPE=[class org.simpleframework.xml.core.RootTest$ExtendedOverriddenRootExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] Some text example >>>>> ELEMENT=[element ExtendedOverriddenRootExample] >>>>> TYPE=[class org.simpleframework.xml.core.RootTest$ExtendedOverriddenRootExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] Some text example Some text example Some text example >>>>> ELEMENT=[element explicit-override] >>>>> TYPE=[class org.simpleframework.xml.core.RootTest$ExtendedExplicitlyOverriddenRootExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] Some text example >>>>> ELEMENT=[element ExplicitOverride] >>>>> TYPE=[class org.simpleframework.xml.core.RootTest$ExtendedExplicitlyOverriddenRootExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ------------- ---------------- --------------- Testcase: testRoot took 0.272 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.CaseTest.txt0000644000175000017500000001244111342531265027540 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.CaseTest Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.264 sec ------------- Standard Output --------------- one two three http://a.com/ http://b.com/ http://c.com/ example 4 example 5 example 6 one two three http://a.com/ http://b.com/ http://c.com/ example 4 example 5 example 6 one two three http://a.com/ http://b.com/ http://c.com/ example 4 example 5 example 6 >>>>> ELEMENT=[element example] >>>>> TYPE=[class org.simpleframework.xml.core.CaseTest$CaseExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] one two three http://a.com/ http://b.com/ http://c.com/ example 4 example 5 example 6 >>>>> ELEMENT=[element Example] >>>>> TYPE=[class org.simpleframework.xml.core.CaseTest$CaseExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ------------- ---------------- --------------- Testcase: testCase took 0.253 sec Testcase: testDirectory took 0.004 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.ArrayEntryTest.txt0000644000175000017500000001047311342531263030766 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.ArrayEntryTest Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.24 sec ------------- Standard Output --------------- one two three one two three one two three >>>>> ELEMENT=[element example-array] >>>>> TYPE=[class org.simpleframework.xml.core.ArrayEntryTest$ExampleArray] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] one two three >>>>> ELEMENT=[element ExampleArray] >>>>> TYPE=[class org.simpleframework.xml.core.ArrayEntryTest$ExampleArray] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] a b c d a b c d a b c d >>>>> ELEMENT=[element example-primitive-array] >>>>> TYPE=[class org.simpleframework.xml.core.ArrayEntryTest$ExamplePrimitiveArray] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] a b c d >>>>> ELEMENT=[element ExamplePrimitiveArray] >>>>> TYPE=[class org.simpleframework.xml.core.ArrayEntryTest$ExamplePrimitiveArray] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ------------- ---------------- --------------- Testcase: testExampleArray took 0.2 sec Testcase: testExamplePrimitiveArray took 0.031 sec Testcase: testDirectory took 0.001 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.convert.WrapperTest.txt0000644000175000017500000000070611342531261031032 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.convert.WrapperTest Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.194 sec ------------- Standard Error ----------------- name value ------------- ---------------- --------------- Testcase: testWrapper took 0.191 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.DefaultEmptyTest.txt0000644000175000017500000000373411342531275031276 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.DefaultEmptyTest Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.235 sec ------------- Standard Output --------------- some text some text some text some text >>>>> ELEMENT=[element default-example] >>>>> TYPE=[class org.simpleframework.xml.core.DefaultEmptyTest$DefaultExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] some text >>>>> ELEMENT=[element DefaultExample] >>>>> TYPE=[class org.simpleframework.xml.core.DefaultEmptyTest$DefaultExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] example text ------------- ---------------- --------------- Testcase: testDefaults took 0.228 sec Testcase: testDirectory took 0.001 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.transform.StringArrayTransformTest.txt0000644000175000017500000000637311342531445034120 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.transform.StringArrayTransformTest Tests run: 4, Failures: 0, Errors: 0, Time elapsed: 0.221 sec ------------- Standard Output --------------- one, two, three, four one, two, three, four one, two, three, four one, two, three, four one, two, three, four one, two, three, four one, two, three, four one, two, three, four one, two, three, four one, two, three, four one, two, three, four one, two, three, four >>>>> ELEMENT=[element string-array-example] >>>>> TYPE=[class org.simpleframework.xml.transform.StringArrayTransformTest$StringArrayExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] one, two, three, four one, two, three, four one, two, three, four one, two, three, four >>>>> ELEMENT=[element StringArrayExample] >>>>> TYPE=[class org.simpleframework.xml.transform.StringArrayTransformTest$StringArrayExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ------------- ---------------- --------------- ------------- Standard Error ----------------- one, two, three, four one, two, three, four one, two, three, four one, two, three, four ------------- ---------------- --------------- Testcase: testRead took 0.003 sec Testcase: testWrite took 0.001 sec Testcase: testPersistence took 0.211 sec Testcase: testDirectory took 0.001 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.stream.PrefixResolverTest.txt0000644000175000017500000000062611342531440032204 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.stream.PrefixResolverTest Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.024 sec ------------- Standard Output --------------- ------------- ---------------- --------------- Testcase: testPrefixResolver took 0.016 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.ArrayTest.txt0000644000175000017500000016716311342531264027756 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.ArrayTest Tests run: 14, Failures: 0, Errors: 0, Time elapsed: 1.072 sec ------------- Standard Output --------------- >>>>> ELEMENT=[element root] >>>>> TYPE=[class org.simpleframework.xml.core.ArrayTest$ArrayExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] >>>>> ELEMENT=[element Root] >>>>> TYPE=[class org.simpleframework.xml.core.ArrayTest$ArrayExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] >>>>> ELEMENT=[element root] >>>>> TYPE=[class org.simpleframework.xml.core.ArrayTest$ArrayExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] >>>>> ELEMENT=[element Root] >>>>> TYPE=[class org.simpleframework.xml.core.ArrayTest$ArrayExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] entry one entry two entry three entry four entry five entry one entry two entry three entry four entry five entry one entry two entry three entry four entry five >>>>> ELEMENT=[element root] >>>>> TYPE=[class org.simpleframework.xml.core.ArrayTest$PrimitiveArrayExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] entry one entry two entry three entry four entry five >>>>> ELEMENT=[element Root] >>>>> TYPE=[class org.simpleframework.xml.core.ArrayTest$PrimitiveArrayExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 >>>>> ELEMENT=[element root] >>>>> TYPE=[class org.simpleframework.xml.core.ArrayTest$PrimitiveIntegerArrayExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] 1 2 3 4 5 >>>>> ELEMENT=[element Root] >>>>> TYPE=[class org.simpleframework.xml.core.ArrayTest$PrimitiveIntegerArrayExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] 1, 2, 3, 4, 5, 6 2, 4, 6, 8, 10, 12 3, 6, 9, 12, 15, 18 4, 8, 12, 16, 20, 24 5, 10, 15, 20, 25, 30 1, 2, 3, 4, 5, 6 2, 4, 6, 8, 10, 12 3, 6, 9, 12, 15, 18 4, 8, 12, 16, 20, 24 5, 10, 15, 20, 25, 30 1, 2, 3, 4, 5, 6 2, 4, 6, 8, 10, 12 3, 6, 9, 12, 15, 18 4, 8, 12, 16, 20, 24 5, 10, 15, 20, 25, 30 >>>>> ELEMENT=[element root] >>>>> TYPE=[class org.simpleframework.xml.core.ArrayTest$PrimitiveMultidimensionalIntegerArrayExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] 1, 2, 3, 4, 5, 6 2, 4, 6, 8, 10, 12 3, 6, 9, 12, 15, 18 4, 8, 12, 16, 20, 24 5, 10, 15, 20, 25, 30 >>>>> ELEMENT=[element Root] >>>>> TYPE=[class org.simpleframework.xml.core.ArrayTest$PrimitiveMultidimensionalIntegerArrayExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] entry one entry two entry three entry four entry five entry one entry two entry three entry four entry five entry one entry two entry three entry four entry five >>>>> ELEMENT=[element root] >>>>> TYPE=[class org.simpleframework.xml.core.ArrayTest$DefaultPrimitiveArrayExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] entry one entry two entry three entry four entry five >>>>> ELEMENT=[element Root] >>>>> TYPE=[class org.simpleframework.xml.core.ArrayTest$DefaultPrimitiveArrayExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] entry two entry three entry two entry three entry two entry three >>>>> ELEMENT=[element root] >>>>> TYPE=[class org.simpleframework.xml.core.ArrayTest$PrimitiveArrayExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] entry two entry three >>>>> ELEMENT=[element Root] >>>>> TYPE=[class org.simpleframework.xml.core.ArrayTest$PrimitiveArrayExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] >>>>> ELEMENT=[element root] >>>>> TYPE=[class org.simpleframework.xml.core.ArrayTest$ParentCompositeArrayExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] >>>>> ELEMENT=[element Root] >>>>> TYPE=[class org.simpleframework.xml.core.ArrayTest$ParentCompositeArrayExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] >>>>> ELEMENT=[element root] >>>>> TYPE=[class org.simpleframework.xml.core.ArrayTest$DefaultCompositeArrayExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] >>>>> ELEMENT=[element Root] >>>>> TYPE=[class org.simpleframework.xml.core.ArrayTest$DefaultCompositeArrayExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] >>>>> ELEMENT=[element root] >>>>> TYPE=[class org.simpleframework.xml.core.ArrayTest$ParentCompositeArrayExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] >>>>> ELEMENT=[element Root] >>>>> TYPE=[class org.simpleframework.xml.core.ArrayTest$ParentCompositeArrayExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] a b c d e a b c d e a b c d e >>>>> ELEMENT=[element root] >>>>> TYPE=[class org.simpleframework.xml.core.ArrayTest$CharacterArrayExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] a b c d e >>>>> ELEMENT=[element Root] >>>>> TYPE=[class org.simpleframework.xml.core.ArrayTest$CharacterArrayExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] >>>>> ELEMENT=[element root] >>>>> TYPE=[class org.simpleframework.xml.core.ArrayTest$DifferentArrayExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] >>>>> ELEMENT=[element Root] >>>>> TYPE=[class org.simpleframework.xml.core.ArrayTest$DifferentArrayExample] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ------------- ---------------- --------------- Testcase: testExample took 0.122 sec Testcase: testBadExample took 0.006 sec Testcase: testWriteArray took 0.741 sec Testcase: testPrimitive took 0.013 sec Testcase: testPrimitiveInteger took 0.018 sec Testcase: testPrimitiveMultidimensionalInteger took 0.02 sec Testcase: testDefaultPrimitive took 0.013 sec Testcase: testPrimitiveNull took 0.046 sec Testcase: testParentComposite took 0.019 sec Testcase: testDefaultComposite took 0.021 sec Testcase: testParentCompositeNull took 0.019 sec Testcase: testCharacter took 0.013 sec Testcase: testDifferentArray took 0.015 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.TutorialTest.txt0000644000175000017500000000174011342531373030470 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.TutorialTest Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.193 sec ------------- Standard Output --------------- Niall Gallagher niallg@users.sourceforge.net Stanford Press 2001
Palo Alto
1st 0-69-697269-4
First paragraph of document Second paragraph in the document Third and final paragraph
------------- ---------------- --------------- Testcase: testTutorial took 0.189 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.RequiredTest.txt0000644000175000017500000000027711342531362030447 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.RequiredTest Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.146 sec Testcase: testComplete took 0.14 sec Testcase: testOptional took 0.002 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.TemplateTest.txt0000644000175000017500000000553311342531372030443 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.TemplateTest Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.222 sec ------------- Standard Output ---------------
Mr niallg@users.sf.net Niall Gallagher
Mr niallg@users.sf.net Niall Gallagher
Mr niallg@users.sf.net Niall Gallagher
>>>>> ELEMENT=[element test] >>>>> TYPE=[class org.simpleframework.xml.core.TemplateTest$Example] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl]
Mr niallg@users.sf.net Niall Gallagher
>>>>> ELEMENT=[element Test] >>>>> TYPE=[class org.simpleframework.xml.core.TemplateTest$Example] >>>>> SOURCE=[class com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl] ------------- ---------------- --------------- Testcase: testTemplate took 0.217 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.convert.CombinedStrategyTest.txt0000644000175000017500000000245311342531257032663 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.convert.CombinedStrategyTest Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.17 sec ------------- Standard Output --------------- 1 org.simpleframework.xml.convert.CombinedStrategyTest$RegistryItemConverter 1 org.simpleframework.xml.convert.CombinedStrategyTest$RegistryItemConverter ------------- ---------------- --------------- Testcase: testCombinedStrategy took 0.14 sec Testcase: testCombinationStrategyWithStyle took 0.018 sec Testcase: testDirectory took 0 sec simple-xml-2.3.2/test/report/TEST-org.simpleframework.xml.core.ExtendTest.txt0000644000175000017500000000037711342531303030112 0ustar sylvestresylvestreTestsuite: org.simpleframework.xml.core.ExtendTest Tests run: 4, Failures: 0, Errors: 0, Time elapsed: 0.16 sec Testcase: testFirst took 0.14 sec Testcase: testSecond took 0.003 sec Testcase: testThird took 0.004 sec Testcase: testFailure took 0.006 sec simple-xml-2.3.2/test/src/0000755000175000017500000000000011342530527016237 5ustar sylvestresylvestresimple-xml-2.3.2/test/src/org/0000755000175000017500000000000011342530527017026 5ustar sylvestresylvestresimple-xml-2.3.2/test/src/org/simpleframework/0000755000175000017500000000000011342530527022235 5ustar sylvestresylvestresimple-xml-2.3.2/test/src/org/simpleframework/xml/0000755000175000017500000000000011344247751023043 5ustar sylvestresylvestresimple-xml-2.3.2/test/src/org/simpleframework/xml/core/0000755000175000017500000000000011344247751023773 5ustar sylvestresylvestresimple-xml-2.3.2/test/src/org/simpleframework/xml/core/LiteralTest.java0000644000175000017500000000375311342530530027066 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Root; import org.simpleframework.xml.Text; import org.simpleframework.xml.ValidationTestCase; import org.simpleframework.xml.transform.Matcher; import org.simpleframework.xml.transform.Transform; public class LiteralTest extends ValidationTestCase { @Root(strict=false) private static class LiteralExample { @Attribute private String name; @Attribute private String key; @Text(required=false) private final Literal literal = new Literal( "\n"+ " some example text\n"+ "\n"); private LiteralExample() { super(); } public LiteralExample(String name, String key) { this.name = name; this.key = key; } public String getName() { return name; } } private static class LiteralMatcher implements Matcher { public Transform match(Class type) { if(type == Literal.class) { return new LiteralTransform(); } return null; } } private static class LiteralTransform implements Transform { public Object read(String value) throws Exception { return new Literal(value); } public String write(Object value) throws Exception { return value.toString(); } } private static class Literal { private final String content; public Literal(String content) { this.content = content; } public String toString() { return content; } } public void testLiteral() throws Exception { Matcher matcher = new LiteralMatcher(); Persister persister = new Persister(matcher); LiteralExample example = new LiteralExample("name", "key"); persister.write(example, System.out); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/AnnotationHandlerTest.java0000644000175000017500000000304111342530530031070 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import junit.framework.TestCase; import org.simpleframework.xml.Element; import org.simpleframework.xml.ElementArray; import org.simpleframework.xml.ElementList; import org.simpleframework.xml.ElementMap; public class AnnotationHandlerTest extends TestCase { @ElementArray @ElementList @ElementMap @Element public void testHandler() throws Exception { AnnotationHandler elementHandler = new AnnotationHandler(Element.class); Element element = getClass().getDeclaredMethod("testHandler").getAnnotation(Element.class); System.err.println(elementHandler); System.err.println(element); AnnotationHandler elementListHandler = new AnnotationHandler(ElementList.class); ElementList elementList = getClass().getDeclaredMethod("testHandler").getAnnotation(ElementList.class); System.err.println(elementListHandler); System.err.println(elementList); AnnotationHandler elementMapHandler = new AnnotationHandler(ElementMap.class); ElementMap elementMap = getClass().getDeclaredMethod("testHandler").getAnnotation(ElementMap.class); System.err.println(elementMapHandler); System.err.println(elementMap); AnnotationHandler elementArrayHandler = new AnnotationHandler(ElementArray.class); ElementArray elementArray = getClass().getDeclaredMethod("testHandler").getAnnotation(ElementArray.class); System.err.println(elementArrayHandler); System.err.println(elementArray); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/FieldScannerTest.java0000644000175000017500000000235211342530530030021 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import java.util.ArrayList; import java.util.Collection; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.ElementList; import org.simpleframework.xml.Root; import org.simpleframework.xml.core.Contact; import org.simpleframework.xml.core.FieldScanner; import junit.framework.TestCase; public class FieldScannerTest extends TestCase { @Root(name="name") public static class Example { @ElementList(name="list", type=Entry.class) private Collection list; @Attribute(name="version") private int version; @Attribute(name="name") private String name; } @Root(name="entry") public static class Entry { @Attribute(name="text") public String text; } public void testExample() throws Exception { FieldScanner scanner = new FieldScanner(Example.class); ArrayList list = new ArrayList(); for(Contact contact : scanner) { list.add(contact.getType()); } assertEquals(scanner.size(), 3); assertTrue(list.contains(Collection.class)); assertTrue(list.contains(String.class)); assertTrue(list.contains(int.class)); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/EnumArrayTest.java0000644000175000017500000000264311342530530027372 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Element; import org.simpleframework.xml.Root; import org.simpleframework.xml.ValidationTestCase; public class EnumArrayTest extends ValidationTestCase { private static final String SOURCE = ""+ " ONE,TWO,FOUR"+ ""; private static enum Number { ONE, TWO, THREE, FOUR } @Root(name="example") private static class NumberArray { @Element(name="array") private final Number[] array; private final int size; public NumberArray(@Element(name="array") Number[] array, @Attribute(name="size") int size) { this.array = array; this.size = size; } @Attribute(name="size") public int getLength() { return size; } } public void testArrayElement() throws Exception { Persister persister = new Persister(); NumberArray array = persister.read(NumberArray.class, SOURCE); assertEquals(array.array.length, 3); assertEquals(array.array[0], Number.ONE); assertEquals(array.array[1], Number.TWO); assertEquals(array.array[2], Number.FOUR); assertEquals(array.getLength(), array.size); assertEquals(array.array.length, array.size); validate(persister, array); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/IndentTest.java0000644000175000017500000000501611342530530026705 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import java.io.StringWriter; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Element; import org.simpleframework.xml.Root; import org.simpleframework.xml.ValidationTestCase; import org.simpleframework.xml.stream.Format; public class IndentTest extends ValidationTestCase { private static final String EXAMPLE = "\n"+ "\n"+ "
\n\r"+ " Some Title \n"+ " email@domain.com \n"+ " Name Surname \n"+ "
\n"+ "
"; @Root(name="contact") private static class Contact { @Attribute(name="id") private String id; @Element(name="details") private Details details; } @Root(name="details") private static class Details { @Element(name="title") private String title; @Element(name="mail") private String mail; @Element(name="name") private String name; } public void testIndent() throws Exception { Persister serializer = new Persister(new Format(5)); Contact contact = serializer.read(Contact.class, EXAMPLE); assertEquals(contact.id, "some id"); assertEquals(contact.details.title, "Some Title"); assertEquals(contact.details.mail, "email@domain.com"); assertEquals(contact.details.name, "Name Surname"); StringWriter buffer = new StringWriter(); serializer.write(contact, buffer); String text = buffer.toString(); assertTrue(text.indexOf(" ") > 0); // indents assertTrue(text.indexOf('\n') > 0); // line feed validate(contact, serializer); } public void testNoIndent() throws Exception { Persister serializer = new Persister(new Format(0)); Contact contact = serializer.read(Contact.class, EXAMPLE); assertEquals(contact.id, "some id"); assertEquals(contact.details.title, "Some Title"); assertEquals(contact.details.mail, "email@domain.com"); assertEquals(contact.details.name, "Name Surname"); StringWriter buffer = new StringWriter(); serializer.write(contact, buffer); String text = buffer.toString(); assertTrue(text.indexOf(" ") < 0); // no indents assertTrue(text.indexOf('\n') < 0); // no line feed assertTrue(text.indexOf('\r') < 0); // no carrige return validate(contact, serializer); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/PrimitiveValueTest.java0000644000175000017500000001717711342530530030444 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import java.io.PrintWriter; import java.lang.annotation.Annotation; import junit.framework.TestCase; import org.simpleframework.xml.ElementMap; import org.simpleframework.xml.strategy.TreeStrategy; import org.simpleframework.xml.stream.NodeBuilder; import org.simpleframework.xml.stream.OutputNode; public class PrimitiveValueTest extends TestCase { private static class MockElementMap implements ElementMap { private boolean attribute; private boolean data; private String entry; private boolean inline; private String key; private Class keyType; private String name; private boolean required; private String value; private Class valueType; public MockElementMap( boolean attribute, boolean data, String entry, boolean inline, String key, Class keyType, String name, boolean required, String value, Class valueType) { this.attribute = attribute; this.data = data; this.entry = entry; this.inline = inline; this.key = key; this.keyType = keyType; this.name = name; this.required = required; this.value = value; this.valueType = valueType; } public boolean empty() { return true; } public boolean attribute() { return attribute; } public boolean data() { return data; } public String entry() { return entry; } public boolean inline() { return inline; } public String key() { return key; } public Class keyType() { return keyType; } public String name() { return name; } public boolean required() { return required; } public String value() { return value; } public double since() { return 1.0; } public Class valueType() { return valueType; } public Class annotationType() { return ElementMap.class; } } private static class PrimitiveType { private MockElementMap map; private String string; private int number; private byte octet; public PrimitiveType(MockElementMap map) { this.map = map; } public Contact getString() throws Exception { return new FieldContact(PrimitiveType.class.getDeclaredField("string"), map); } public Contact getNumber() throws Exception { return new FieldContact(PrimitiveType.class.getDeclaredField("number"), map); } public Contact getOctet() throws Exception { return new FieldContact(PrimitiveType.class.getDeclaredField("octet"), map); } } public void testInlineString() throws Exception { Source source = new Source(new TreeStrategy(), new Support(), new DefaultStyle()); MockElementMap map = new MockElementMap(true, // attribute false, // data "entry", // entry true, // inline "key", // key String.class, // keyType "name", // name true, // required "value", // value String.class); // valueType PrimitiveType type = new PrimitiveType(map); Contact string = type.getString(); Entry entry = new Entry(string, map); PrimitiveValue value = new PrimitiveValue(source, entry, new ClassType(String.class)); OutputNode node = NodeBuilder.write(new PrintWriter(System.out)); value.write(node.getChild("inlineString"), "example"); node.commit(); } public void testNotInlineString() throws Exception { Source source = new Source(new TreeStrategy(), new Support(), new DefaultStyle()); MockElementMap map = new MockElementMap(false, // attribute false, // data "entry", // entry true, // inline "key", // key String.class, // keyType "name", // name true, // required "value", // value String.class); // valueType PrimitiveType type = new PrimitiveType(map); Contact string = type.getString(); Entry entry = new Entry(string, map); PrimitiveValue value = new PrimitiveValue(source, entry, new ClassType(String.class)); OutputNode node = NodeBuilder.write(new PrintWriter(System.out)); value.write(node.getChild("notInlineString"), "example"); node.commit(); } public void testNoAttributeString() throws Exception { Source source = new Source(new TreeStrategy(), new Support(), new DefaultStyle()); MockElementMap map = new MockElementMap(false, // attribute false, // data "entry", // entry true, // inline "", // key String.class, // keyType "name", // name true, // required "value", // value String.class); // valueType PrimitiveType type = new PrimitiveType(map); Contact string = type.getString(); Entry entry = new Entry(string, map); PrimitiveValue value = new PrimitiveValue(source, entry, new ClassType(String.class)); OutputNode node = NodeBuilder.write(new PrintWriter(System.out)); value.write(node.getChild("noAttributeString"), "example"); node.commit(); } public void testAttributeNoKeyString() throws Exception { Source source = new Source(new TreeStrategy(), new Support(), new DefaultStyle()); MockElementMap map = new MockElementMap(true, // attribute false, // data "entry", // entry true, // inline "", // key String.class, // keyType "name", // name true, // required "value", // value String.class); // valueType PrimitiveType type = new PrimitiveType(map); Contact string = type.getString(); Entry entry = new Entry(string, map); PrimitiveValue value = new PrimitiveValue(source, entry, new ClassType(String.class)); OutputNode node = NodeBuilder.write(new PrintWriter(System.out)); value.write(node.getChild("attributeNoKeyString"), "example"); node.commit(); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/AnonymousClassTest.java0000644000175000017500000000200411342530530030434 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Element; import org.simpleframework.xml.Namespace; import org.simpleframework.xml.Root; import org.simpleframework.xml.ValidationTestCase; public class AnonymousClassTest extends ValidationTestCase { @Root(name="anonymous") private static class Anonymous { @Element @Namespace(prefix="prefix", reference="http://www.domain.com/reference") private static Object anonymous = new Object() { @Attribute(name="attribute") private static final String attribute = "example attribute"; @Element(name="element") private static final String element = "example element"; }; } /* TODO fix this test public void testAnonymousClass() throws Exception { Persister persister = new Persister(); Anonymous anonymous = new Anonymous(); validate(persister, anonymous); } */ public void testA() {} } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/DefaultAnnotationTest.java0000644000175000017500000001375411342530530031113 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import java.util.HashMap; import java.util.List; import java.util.Map; import junit.framework.TestCase; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Default; import org.simpleframework.xml.DefaultType; import org.simpleframework.xml.Element; import org.simpleframework.xml.ElementList; import org.simpleframework.xml.Root; import org.simpleframework.xml.Transient; import org.simpleframework.xml.strategy.Strategy; import org.simpleframework.xml.strategy.TreeStrategy; import org.simpleframework.xml.stream.Style; public class DefaultAnnotationTest extends TestCase { private static final String SOURCE = ""+ " Some Example Value"+ " "+ " "+ " IR1234" + " 2"+ " 7.4"+ " "+ " John Doe"+ "
Sin City
"+ "
"+ "
"+ " "+ " TZ346" + " 2"+ " 10.4"+ " "+ " Jane Doe"+ "
Sesame Street
"+ "
"+ "
"+ "
"+ "
"; private static final String MISMATCH = ""; @Root @Default(DefaultType.PROPERTY) private static class OrderList { private List list; private String[] array; private String secret; private @Attribute int id; private @Element String value; @Transient public String getSecret() { return secret; } @Transient public void setSecret(String secret) { this.secret = secret; } @Attribute public String[] getArray() { return array; } @Attribute public void setArray(String[] array){ this.array = array; } public List getOrders() { return list; } public void setOrders(List list) { this.list = list; } } @Root @Default(DefaultType.FIELD) private static class OrderItem { private Customer customer; private String name; private int value; private double price; private @Transient String hidden; private @Transient String secret; } @Root @Default(DefaultType.FIELD) private static class Customer { private @Attribute int id; private String name; private String address; public Customer(@Element(name="name") String name) { this.name = name; } } @Root @Default(DefaultType.PROPERTY) private static class TypeMisMatch { public String name; public String getName() { return name; } @Attribute public void setName(String name) { this.name = name; } } public void testTypeMisMatch() throws Exception { Persister persister = new Persister(); boolean failure = false; try { TypeMisMatch type = persister.read(TypeMisMatch.class, SOURCE); assertNull(type); }catch(Exception e){ e.printStackTrace(); failure = true; } assertTrue(failure); } public void testDefault() throws Exception { MethodScanner methodScanner = new MethodScanner(OrderList.class, DefaultType.PROPERTY); Map map = new HashMap(); for(Contact contact : methodScanner) { map.put(contact.getName(), contact); } assertEquals(map.get("orders").getClass(), MethodContact.class); assertEquals(map.get("orders").getType(), List.class); assertEquals(map.get("orders").getAnnotation().annotationType(), ElementList.class); Scanner scanner = new Scanner(OrderList.class); Support support = new Support(); Strategy strategy = new TreeStrategy(); Style style = new DefaultStyle(); Context context = new Source(strategy, support, style); LabelMap attributes = scanner.getAttributes(context); LabelMap elements = scanner.getElements(context); assertEquals(elements.get("orders").getType(), List.class); assertEquals(elements.get("orders").getContact().getAnnotation().annotationType(), ElementList.class); assertEquals(attributes.get("array").getType(), String[].class); assertEquals(attributes.get("array").getContact().getAnnotation().annotationType(), Attribute.class); Persister persister = new Persister(); OrderList list = persister.read(OrderList.class, SOURCE); assertEquals(list.getArray()[0], "a"); assertEquals(list.getArray()[1], "b"); assertEquals(list.getArray()[2], "c"); assertEquals(list.getArray()[3], "d"); assertEquals(list.id, 100); assertEquals(list.value, "Some Example Value"); assertEquals(list.getOrders().get(0).name, "IR1234"); assertEquals(list.getOrders().get(0).hidden, null); assertEquals(list.getOrders().get(0).secret, null); assertEquals(list.getOrders().get(0).value, 2); assertEquals(list.getOrders().get(0).price, 7.4); assertEquals(list.getOrders().get(0).customer.id, 1); assertEquals(list.getOrders().get(0).customer.name, "John Doe"); assertEquals(list.getOrders().get(0).customer.address, "Sin City"); assertEquals(list.getOrders().get(1).name, "TZ346"); assertEquals(list.getOrders().get(0).hidden, null); assertEquals(list.getOrders().get(0).secret, null); assertEquals(list.getOrders().get(1).value, 2); assertEquals(list.getOrders().get(1).price, 10.4); assertEquals(list.getOrders().get(1).customer.id, 2); assertEquals(list.getOrders().get(1).customer.name, "Jane Doe"); assertEquals(list.getOrders().get(1).customer.address, "Sesame Street"); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/MixTest.java0000644000175000017500000000541111342530527026226 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import java.io.StringWriter; import java.util.ArrayList; import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar; import java.util.HashMap; import java.util.List; import java.util.Map; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Element; import org.simpleframework.xml.ElementList; import org.simpleframework.xml.ElementMap; import org.simpleframework.xml.Root; import org.simpleframework.xml.Serializer; import org.simpleframework.xml.Text; import org.simpleframework.xml.ValidationTestCase; import org.simpleframework.xml.core.Persister; public class MixTest extends ValidationTestCase { @Root private static class MixExample { @ElementList private List list; @ElementMap private Map map; @Element private Calendar calendar; public MixExample() { this.list = new ArrayList(); this.map = new HashMap(); } private void setTime(Date date) { calendar = new GregorianCalendar(); calendar.setTime(date); } public void put(Object key, Object value) { map.put(key, value); } public Object get(int index) { return list.get(index); } public void add(Object object) { list.add(object); } } @Root private static class Entry { @Attribute private String id; @Text private String text; public Entry() { super(); } public Entry(String id, String text) { this.id = id; this.text = text; } } public void testMix() throws Exception { Serializer serializer = new Persister(); MixExample example = new MixExample(); StringWriter source = new StringWriter(); example.setTime(new Date()); example.add("text"); example.add(1); example.add(true); example.add(new Entry("1", "example 1")); example.add(new Entry("2", "example 2")); example.put(new Entry("1", "key 1"), new Entry("1", "value 1")); example.put("key 2", "value 2"); example.put("key 3", 3); example.put("key 4", new Entry("4", "value 4")); serializer.write(example, System.out); serializer.write(example, source); serializer.validate(MixExample.class, source.toString()); MixExample other = serializer.read(MixExample.class, source.toString()); serializer.write(other, System.out); assertEquals(example.get(0), "text"); assertEquals(example.get(1), 1); assertEquals(example.get(2), true); validate(example, serializer); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/DefaultTest.java0000644000175000017500000001016611342530530027052 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import java.io.StringWriter; import java.util.ArrayList; import java.util.List; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.ElementList; import org.simpleframework.xml.Root; import org.simpleframework.xml.Text; import org.simpleframework.xml.ValidationTestCase; import org.simpleframework.xml.core.Persister; public class DefaultTest extends ValidationTestCase { private static final String SOURCE = "\n"+ " \r\n" + " Example 1\r\n"+ " Example 2\r\n"+ " Example 3\r\n"+ " \r\n"+ ""; @Root private static class DefaultTextList { @ElementList private List list; @Attribute private Version version; public TextEntry get(int index) { return list.get(index); } } @Root private static class TextEntry { @Attribute private String name; @Attribute private Version version; @Text private String text; } private enum Version { ONE, TWO, THREE } private Persister persister; public void setUp() throws Exception { persister = new Persister(); } public void testList() throws Exception { DefaultTextList list = persister.read(DefaultTextList.class, SOURCE); assertEquals(list.version, Version.ONE); assertEquals(list.get(0).version, Version.ONE); assertEquals(list.get(0).name, "a"); assertEquals(list.get(0).text, "Example 1"); assertEquals(list.get(1).version, Version.TWO); assertEquals(list.get(1).name, "b"); assertEquals(list.get(1).text, "Example 2"); assertEquals(list.get(2).version, Version.THREE); assertEquals(list.get(2).name, "c"); assertEquals(list.get(2).text, "Example 3"); StringWriter buffer = new StringWriter(); persister.write(list, buffer); String text = buffer.toString(); assertXpathExists("/defaultTextList/list[@class='java.util.ArrayList']", text); assertXpathExists("/defaultTextList/list/textEntry[@name='a']", text); assertXpathExists("/defaultTextList/list/textEntry[@name='b']", text); assertXpathExists("/defaultTextList/list/textEntry[@name='c']", text); assertXpathEvaluatesTo("Example 1", "/defaultTextList/list/textEntry[1]", text); assertXpathEvaluatesTo("Example 2", "/defaultTextList/list/textEntry[2]", text); assertXpathEvaluatesTo("Example 3", "/defaultTextList/list/textEntry[3]", text); validate(list, persister); list = persister.read(DefaultTextList.class, text); assertEquals(list.version, Version.ONE); assertEquals(list.get(0).version, Version.ONE); assertEquals(list.get(0).name, "a"); assertEquals(list.get(0).text, "Example 1"); assertEquals(list.get(1).version, Version.TWO); assertEquals(list.get(1).name, "b"); assertEquals(list.get(1).text, "Example 2"); assertEquals(list.get(2).version, Version.THREE); assertEquals(list.get(2).name, "c"); assertEquals(list.get(2).text, "Example 3"); buffer = new StringWriter(); persister.write(list, buffer); String copy = buffer.toString(); assertXpathExists("/defaultTextList/list[@class='java.util.ArrayList']", copy); assertXpathExists("/defaultTextList/list/textEntry[@name='a']", copy); assertXpathExists("/defaultTextList/list/textEntry[@name='b']", copy); assertXpathExists("/defaultTextList/list/textEntry[@name='c']", copy); assertXpathEvaluatesTo("Example 1", "/defaultTextList/list/textEntry[1]", copy); assertXpathEvaluatesTo("Example 2", "/defaultTextList/list/textEntry[2]", copy); assertXpathEvaluatesTo("Example 3", "/defaultTextList/list/textEntry[3]", copy); assertXMLEqual(text, copy); validate(list, persister); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/PrologTest.java0000644000175000017500000000302411342530527026731 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import java.io.StringReader; import java.io.StringWriter; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Element; import org.simpleframework.xml.Root; import org.simpleframework.xml.core.Persister; import org.simpleframework.xml.stream.Format; import org.simpleframework.xml.ValidationTestCase; public class PrologTest extends ValidationTestCase { private static final String SOURCE = "\n"+ " entry text \n\r"+ " some name \n"+ ""; @Root private static class PrologExample { @Attribute public int id; @Element public String name; @Element public String text; @Attribute public boolean flag; } private Persister serializer; public void setUp() { serializer = new Persister(new Format(4, "")); } public void testProlog() throws Exception { PrologExample example = serializer.read(PrologExample.class, SOURCE); assertEquals(example.id, 12); assertEquals(example.text, "entry text"); assertEquals(example.name, "some name"); assertTrue(example.flag); StringWriter buffer = new StringWriter(); serializer.write(example, buffer); String text = buffer.toString(); assertTrue(text.startsWith(" annotationType() { return ElementMap.class; } } private static class PrimitiveType { private MockElementMap map; private String string; private int number; private byte octet; public PrimitiveType(MockElementMap map) { this.map = map; } public Contact getString() throws Exception { return new FieldContact(PrimitiveType.class.getDeclaredField("string"), map); } public Contact getNumber() throws Exception { return new FieldContact(PrimitiveType.class.getDeclaredField("number"), map); } public Contact getOctet() throws Exception { return new FieldContact(PrimitiveType.class.getDeclaredField("octet"), map); } } public void testInlineString() throws Exception { Source source = new Source(new TreeStrategy(), new Support(), new DefaultStyle()); MockElementMap map = new MockElementMap(true, // attribute false, // data "entry", // entry true, // inline "key", // key String.class, // keyType "name", // name true, // required "value", // value String.class); // valueType PrimitiveType type = new PrimitiveType(map); Contact string = type.getString(); Entry entry = new Entry(string, map); PrimitiveKey value = new PrimitiveKey(source, entry, new ClassType(String.class)); OutputNode node = NodeBuilder.write(new PrintWriter(System.out)); value.write(node.getChild("inlineString"), "example"); node.commit(); } public void testNotInlineString() throws Exception { Source source = new Source(new TreeStrategy(), new Support(), new DefaultStyle()); MockElementMap map = new MockElementMap(false, // attribute false, // data "entry", // entry true, // inline "key", // key String.class, // keyType "name", // name true, // required "value", // value String.class); // valueType PrimitiveType type = new PrimitiveType(map); Contact string = type.getString(); Entry entry = new Entry(string, map); PrimitiveKey value = new PrimitiveKey(source, entry, new ClassType(String.class)); OutputNode node = NodeBuilder.write(new PrintWriter(System.out)); value.write(node.getChild("notInlineString"), "example"); node.commit(); } public void testNoAttributeString() throws Exception { Source source = new Source(new TreeStrategy(), new Support(), new DefaultStyle()); MockElementMap map = new MockElementMap(false, // attribute false, // data "entry", // entry true, // inline "", // key String.class, // keyType "name", // name true, // required "value", // value String.class); // valueType PrimitiveType type = new PrimitiveType(map); Contact string = type.getString(); Entry entry = new Entry(string, map); PrimitiveKey value = new PrimitiveKey(source, entry, new ClassType(String.class)); OutputNode node = NodeBuilder.write(new PrintWriter(System.out)); value.write(node.getChild("noAttributeString"), "example"); node.commit(); } public void testAttributeNoKeyString() throws Exception { Source source = new Source(new TreeStrategy(), new Support(), new DefaultStyle()); MockElementMap map = new MockElementMap(true, // attribute false, // data "entry", // entry true, // inline "", // key String.class, // keyType "name", // name true, // required "value", // value String.class); // valueType PrimitiveType type = new PrimitiveType(map); Contact string = type.getString(); Entry entry = new Entry(string, map); PrimitiveKey value = new PrimitiveKey(source, entry, new ClassType(String.class)); OutputNode node = NodeBuilder.write(new PrintWriter(System.out)); value.write(node.getChild("attributeNoKeyString"), "example"); node.commit(); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/PrimitiveTest.java0000644000175000017500000000353511342530530027440 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import java.io.StringReader; import junit.framework.TestCase; import org.simpleframework.xml.strategy.CycleStrategy; import org.simpleframework.xml.strategy.TreeStrategy; import org.simpleframework.xml.stream.InputNode; import org.simpleframework.xml.stream.NodeBuilder; public class PrimitiveTest extends TestCase { public static final String SOURCE = "some text"; public static final String CYCLE_1 = "some text"; public static final String CYCLE_2 = "some text"; public void testPrimitive() throws Exception { Context context = new Source(new TreeStrategy(), new Support(), new DefaultStyle()); Primitive primitive = new Primitive(context, new ClassType(String.class)); InputNode node = NodeBuilder.read(new StringReader(SOURCE)); Object value = primitive.read(node); assertEquals("some text", value); InputNode newNode = NodeBuilder.read(new StringReader(SOURCE)); assertTrue(primitive.validate(newNode)); } public void testPrimitiveCycle() throws Exception { Context context = new Source(new CycleStrategy(), new Support(), new DefaultStyle()); Primitive primitive = new Primitive(context, new ClassType(String.class)); InputNode node = NodeBuilder.read(new StringReader(CYCLE_1)); Object value = primitive.read(node); assertEquals("some text", value); // Need to use a different id for validate as reading has created the object // and an exception is thrown that the value already exists if id=1 is used InputNode newNode = NodeBuilder.read(new StringReader(CYCLE_2)); assertTrue(primitive.validate(newNode)); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/StrategyTest.java0000644000175000017500000000673211342530527027302 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import java.lang.reflect.Constructor; import java.util.Map; import junit.framework.TestCase; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Element; import org.simpleframework.xml.Root; import org.simpleframework.xml.Serializer; import org.simpleframework.xml.strategy.Type; import org.simpleframework.xml.strategy.Strategy; import org.simpleframework.xml.strategy.Value; import org.simpleframework.xml.stream.Node; import org.simpleframework.xml.stream.NodeMap; public class StrategyTest extends TestCase { private static final String ELEMENT_NAME = "example-attribute"; private static final String ELEMENT = "\n"+ "\n"+ " attribute-example-text \n\r"+ ""; @Root(name="root") private static abstract class Example { public abstract String getValue(); public abstract String getKey(); } private static class ExampleExample extends Example { @Attribute(name="key") public String key; @Element(name="text") public String text; public String getValue() { return text; } public String getKey() { return key; } } public class ExampleStrategy implements Strategy { private StrategyTest test; public ExampleStrategy(StrategyTest test){ this.test = test; } public Value read(Type field, NodeMap node, Map map) throws Exception { Node value = node.remove(ELEMENT_NAME); if(value == null) { return null; } String name = value.getValue(); Class type = Class.forName(name); return new SimpleType(type); } public boolean write(Type field, Object value, NodeMap node, Map map) throws Exception { if(field.getType() != value.getClass()) { node.put(ELEMENT_NAME, value.getClass().getName()); } return false; } } public static class SimpleType implements Value{ private Class type; public SimpleType(Class type) { this.type = type; } public int getLength() { return 0; } public Object getValue() { try { Constructor method = type.getDeclaredConstructor(); if(!method.isAccessible()) { method.setAccessible(true); } return method.newInstance(); }catch(Exception e) { throw new RuntimeException(e); } } public void setValue(Object value) { } public boolean isReference() { return false; } public Class getType() { return type; } } public void testExampleStrategy() throws Exception { ExampleStrategy strategy = new ExampleStrategy(this); Serializer persister = new Persister(strategy); Example example = persister.read(Example.class, ELEMENT); assertTrue(example instanceof ExampleExample); assertEquals(example.getValue(), "attribute-example-text"); assertEquals(example.getKey(), "attribute-example-key"); persister.write(example, System.err); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/ConstructorInjectionTest.java0000644000175000017500000001000111342530530031642 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Element; import org.simpleframework.xml.ElementArray; import org.simpleframework.xml.Root; import org.simpleframework.xml.ValidationTestCase; import org.simpleframework.xml.stream.CamelCaseStyle; import org.simpleframework.xml.stream.Format; import org.simpleframework.xml.stream.Style; public class ConstructorInjectionTest extends ValidationTestCase { private static final String SOURCE = ""+ " 12"+ " text"+ ""; private static final String PARTIAL = ""+ " 12"+ " text"+ ""; private static final String BARE = ""+ " 12"+ ""; private static final String ARRAY = ""+ " \n\r"+ " entry one \n\r"+ " entry two \n\r"+ " entry three \n\r"+ " entry four \n\r"+ " entry five \n\r"+ " \n\r"+ ""; @Root private static class Example { @Element private int integer; @Element(required=false) private String string; @Attribute(name="number", required=false) private long number; public Example(@Element(name="integer") int integer){ this.integer = integer; } public Example(@Element(name="integer") int integer, @Element(name="string", required=false) String string, @Attribute(name="number", required=false) long number){ this.integer = integer; this.string = string; this.number = number; } public Example(@Element(name="integer") int integer, @Element(name="string", required=false) String string){ this.integer = integer; this.string = string; } } @Root private static class ArrayExample { @ElementArray(name="array") private final String[] array; public ArrayExample(@ElementArray(name="array") String[] array) { this.array = array; } public String[] getArray() { return array; } } public void testConstructor() throws Exception { Persister persister = new Persister(); Example example = persister.read(Example.class, SOURCE); assertEquals(example.integer, 12); assertEquals(example.number, 32); assertEquals(example.string, "text"); validate(persister, example); } public void testPartialConstructor() throws Exception { Persister persister = new Persister(); Example example = persister.read(Example.class, PARTIAL); assertEquals(example.integer, 12); assertEquals(example.number, 0); assertEquals(example.string, "text"); validate(persister, example); } public void testBareConstructor() throws Exception { Persister persister = new Persister(); Example example = persister.read(Example.class, BARE); assertEquals(example.integer, 12); assertEquals(example.number, 0); assertEquals(example.string, null); validate(persister, example); } public void testArrayExample() throws Exception { Style style = new CamelCaseStyle(); Format format = new Format(style); Persister persister = new Persister(format); ArrayExample example = persister.read(ArrayExample.class, ARRAY); assertEquals(example.getArray().length, 5); assertEquals(example.getArray()[0], "entry one"); assertEquals(example.getArray()[1], "entry two"); assertEquals(example.getArray()[2], "entry three"); assertEquals(example.getArray()[3], "entry four"); assertEquals(example.getArray()[4], "entry five"); validate(persister, example); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/ReplaceThisTest.java0000644000175000017500000000421511342530527027675 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import java.io.StringWriter; import java.util.HashSet; import java.util.Set; import java.util.TreeSet; import org.simpleframework.xml.Element; import org.simpleframework.xml.ElementList; import org.simpleframework.xml.Root; import org.simpleframework.xml.ValidationTestCase; public class ReplaceThisTest extends ValidationTestCase { @Root public static class RealParent { @Element private ReplaceThisParent inner; public RealParent() { this.inner = new ReplaceThisParent(); } public RealParent(Set children) { this.inner = new ReplaceThisParent(children); } public ReplaceThisParent getInner() { return inner; } } @Root public static class ReplaceThisParent { @ElementList(required = false) Set children; public ReplaceThisParent() { this.children = new TreeSet(); } public ReplaceThisParent(Set children) { this.children = children; } @Replace private ReplaceThisParent replaceParent() { return new ReplaceThisParent(null); } public void setChildren(Set children) { this.children=children; } public Set getChildren() { return children; } } public void testReplaceParent() throws Exception { Persister persister = new Persister(); Set children = new HashSet(); RealParent parent = new RealParent(children); children.add("Tom"); children.add("Dick"); children.add("Harry"); StringWriter writer = new StringWriter(); persister.write(parent, writer); String text = writer.toString(); System.out.println(text); assertEquals(text.indexOf("Tom"), -1); assertEquals(text.indexOf("Dick"), -1); assertEquals(text.indexOf("Harry"), -1); validate(persister, parent); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/SimpleConstructorInjectionTest.java0000644000175000017500000000254111342530530033026 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import java.io.Serializable; import junit.framework.TestCase; import org.simpleframework.xml.Element; import org.simpleframework.xml.Root; import org.simpleframework.xml.Serializer; public class SimpleConstructorInjectionTest extends TestCase { public void testConstructorInjection() throws Exception{ String xml = "" + "" + "test" + "" + ""; Serializer serializer = new Persister(); Message example = serializer.read(Message.class, xml); System.out.println("message: "+example.getOptional()); } @Root public static class Message implements Serializable{ @Element private String necessary; @Element(required=false) private String optional; public Message(@Element(name="necessary") String necessary){ this.necessary = necessary; } public String getNecessary() { return necessary; } public void setNecessary(String necessary) { this.necessary = necessary; } public String getOptional() { return optional; } public void setOptional(String optional) { this.optional = optional; } } } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/StrictModeTest.java0000644000175000017500000000722111342530527027547 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Element; import org.simpleframework.xml.Root; import org.simpleframework.xml.ValidationTestCase; public class StrictModeTest extends ValidationTestCase { private static final String SOURCE = "\n" + " 123\n" + " \n" + " 12345\n" + " \n" + "
\n"+ " example name\n"+ "
example address
\n"+ " example city\n"+ "
\n"+ " test\n"+ "
\n"; private static final String SOURCE_MISSING_NAME = "\n" + " 123\n" + " \n" + " 12345\n" + " \n" + "
\n"+ " example name\n"+ "
example address
\n"+ " example city\n"+ "
\n"+ "
\n"; @Root private static class ExampleObject { @Element int integer; @Attribute double version; } @Root private static class Address { @Element String name; @Element String address; } @Root private static class ExampleObjectWithAddress extends ExampleObject { @Element Address address; @Element String name; } public void testStrictMode() throws Exception { boolean failure = false; try { Persister persister = new Persister(); ExampleObjectWithAddress object = persister.read(ExampleObjectWithAddress.class, SOURCE); assertNull(object); }catch(Exception e) { e.printStackTrace(); failure = true; } assertTrue("Serialzed correctly", failure); } public void testNonStrictMode() throws Exception { Persister persister = new Persister(); ExampleObjectWithAddress object = persister.read(ExampleObjectWithAddress.class, SOURCE, false); assertEquals(object.version, 1.0); assertEquals(object.integer, 123); assertEquals(object.address.name, "example name"); assertEquals(object.address.address, "example address"); assertEquals(object.name, "test"); validate(object, persister); } public void testNonStrictModeMissingName() throws Exception { boolean failure = false; try { Persister persister = new Persister(); ExampleObjectWithAddress object = persister.read(ExampleObjectWithAddress.class, SOURCE_MISSING_NAME, false); assertNull(object); }catch(Exception e) { e.printStackTrace(); failure = true; } assertTrue("Serialzed correctly", failure); } public void testValidation() throws Exception { Persister persister = new Persister(); assertTrue(persister.validate(ExampleObjectWithAddress.class, SOURCE, false)); try { assertFalse(persister.validate(ExampleObjectWithAddress.class, SOURCE)); assertFalse(true); }catch(Exception e){ e.printStackTrace(); } try { assertFalse(persister.validate(ExampleObjectWithAddress.class, SOURCE_MISSING_NAME)); assertFalse(true); }catch(Exception e){ e.printStackTrace(); } try { assertFalse(persister.validate(ExampleObjectWithAddress.class, SOURCE_MISSING_NAME, false)); assertFalse(true); }catch(Exception e){ e.printStackTrace(); } } } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/NamespaceVerbosityTest.java0000644000175000017500000000522111342530530031265 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import java.io.StringWriter; import org.simpleframework.xml.Element; import org.simpleframework.xml.Namespace; import org.simpleframework.xml.NamespaceList; import org.simpleframework.xml.Root; import org.simpleframework.xml.ValidationTestCase; public class NamespaceVerbosityTest extends ValidationTestCase { private static final String SOURCE = "\n"+ " b\n"+ " c\n"+ " \n"+ " e\n"+ " \n"+ "\n"; @Root @NamespaceList({ @Namespace(prefix="x", reference="http://domain/x"), @Namespace(prefix="y", reference="http://domain/y")}) private static class A { @Element @Namespace(prefix="i", reference="http://domain/x") // ignore prefix as inherited private String b; @Element @Namespace(prefix="j", reference="http://domain/y") // ignore prefix as inherited private String c; @Element @Namespace(prefix="k", reference="http://domain/x") // ignore prefix as inherited private D d; } @Root private static class D { @Element private String e; } public void testScope() throws Exception { Persister persister = new Persister(); StringWriter writer = new StringWriter(); A example = persister.read(A.class, SOURCE); assertEquals(example.b, "b"); assertEquals(example.c, "c"); assertEquals(example.d.e, "e"); assertElementHasNamespace(SOURCE, "/a", null); assertElementHasNamespace(SOURCE, "/a/b", "http://domain/x"); assertElementHasNamespace(SOURCE, "/a/c", "http://domain/y"); assertElementHasNamespace(SOURCE, "/a/d", "http://domain/x"); assertElementHasNamespace(SOURCE, "/a/d/e", null); persister.write(example, writer); String text = writer.toString(); System.out.println(text); assertElementHasNamespace(text, "/a", null); assertElementHasNamespace(text, "/a/b", "http://domain/x"); assertElementHasNamespace(text, "/a/c", "http://domain/y"); assertElementHasNamespace(text, "/a/d", "http://domain/x"); assertElementHasNamespace(text, "/a/d/e", null); assertElementHasAttribute(text, "/a", "xmlns:x", "http://domain/x"); assertElementHasAttribute(text, "/a", "xmlns:y", "http://domain/y"); assertElementDoesNotHaveAttribute(text, "/a/b", "xmlns:i", "http://domain/x"); assertElementDoesNotHaveAttribute(text, "/a/c", "xmlns:j", "http://domain/y"); assertElementDoesNotHaveAttribute(text, "/a/d", "xmlns:k", "http://domain/x"); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/TextTest.java0000644000175000017500000001517611342530527026426 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import java.io.StringWriter; import java.util.List; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Element; import org.simpleframework.xml.ElementArray; import org.simpleframework.xml.Root; import org.simpleframework.xml.Text; import org.simpleframework.xml.ValidationTestCase; import org.simpleframework.xml.core.Persister; import org.simpleframework.xml.core.TextException; import org.simpleframework.xml.core.ValueRequiredException; import org.simpleframework.xml.transform.TransformException; public class TextTest extends ValidationTestCase { private static final String TEXT_LIST = "\n"+ " \n"+ " Example 1\r\n"+ " Example 2\r\n"+ " Example 3\r\n"+ " \n\r"+ ""; private static final String DATA_TEXT = "\r\n"+ " \n"+ " This is hidden\n"+ " \n"+ " ]]>\n"+ "\r\n"; private static final String DUPLICATE_TEXT = "Example 1\r\n"; private static final String ILLEGAL_ELEMENT = "\r\n"+ " Example 1\n\r"+ " Not allowed\r\n"+ "\r\n"; private static final String EMPTY_TEXT = ""; @Root(name="test") private static class TextList { @ElementArray(name="array", entry="entry") private TextEntry[] array; } @Root(name="text") private static class TextEntry { @Attribute(name="name") private String name; @Attribute(name="version") private Version version; @Text(data=true) private String text; } @Root(name="text") private static class OptionalTextEntry { @Attribute(name="name") private String name; @Attribute(name="version") private Version version; @Text(required=false) private String text; } private static class DuplicateTextEntry extends TextEntry { @Text private String duplicate; } private static class IllegalElementTextEntry extends TextEntry { @Element(name="illegal") private String name; } private static class NonPrimitiveTextEntry { @Attribute(name="name") private String name; @Attribute(name="version") private Version version; @Text private List list; } private enum Version { ONE, TWO, THREE } private Persister persister; public void setUp() throws Exception { persister = new Persister(); } public void testText() throws Exception { TextList list = persister.read(TextList.class, TEXT_LIST); assertEquals(list.array[0].version, Version.ONE); assertEquals(list.array[0].name, "a"); assertEquals(list.array[0].text, "Example 1"); assertEquals(list.array[1].version, Version.TWO); assertEquals(list.array[1].name, "b"); assertEquals(list.array[1].text, "Example 2"); assertEquals(list.array[2].version, Version.THREE); assertEquals(list.array[2].name, "c"); assertEquals(list.array[2].text, "Example 3"); StringWriter buffer = new StringWriter(); persister.write(list, buffer); validate(list, persister); list = persister.read(TextList.class, buffer.toString()); assertEquals(list.array[0].version, Version.ONE); assertEquals(list.array[0].name, "a"); assertEquals(list.array[0].text, "Example 1"); assertEquals(list.array[1].version, Version.TWO); assertEquals(list.array[1].name, "b"); assertEquals(list.array[1].text, "Example 2"); assertEquals(list.array[2].version, Version.THREE); assertEquals(list.array[2].name, "c"); assertEquals(list.array[2].text, "Example 3"); validate(list, persister); } public void testData() throws Exception { TextEntry entry = persister.read(TextEntry.class, DATA_TEXT); assertEquals(entry.version, Version.ONE); assertEquals(entry.name, "a"); assertTrue(entry.text != null); StringWriter buffer = new StringWriter(); persister.write(entry, buffer); validate(entry, persister); entry = persister.read(TextEntry.class, buffer.toString()); assertEquals(entry.version, Version.ONE); assertEquals(entry.name, "a"); assertTrue(entry.text != null); validate(entry, persister); } public void testDuplicate() throws Exception { boolean success = false; try { persister.read(DuplicateTextEntry.class, DUPLICATE_TEXT); } catch(TextException e) { success = true; } assertTrue(success); } public void testIllegalElement() throws Exception { boolean success = false; try { persister.read(IllegalElementTextEntry.class, ILLEGAL_ELEMENT); } catch(TextException e) { success = true; } assertTrue(success); } public void testEmpty() throws Exception { boolean success = false; try { persister.read(TextEntry.class, EMPTY_TEXT); } catch(ValueRequiredException e) { success = true; } assertTrue(success); } public void testOptional() throws Exception { OptionalTextEntry entry = persister.read(OptionalTextEntry.class, EMPTY_TEXT); assertEquals(entry.version, Version.ONE); assertEquals(entry.name, "a"); assertTrue(entry.text == null); StringWriter buffer = new StringWriter(); persister.write(entry, buffer); validate(entry, persister); entry = persister.read(OptionalTextEntry.class, buffer.toString()); assertEquals(entry.version, Version.ONE); assertEquals(entry.name, "a"); assertTrue(entry.text == null); validate(entry, persister); } public void testNonPrimitive() throws Exception { boolean success = false; try { persister.read(NonPrimitiveTextEntry.class, DATA_TEXT); } catch(TextException e) { e.printStackTrace(); success = true; } assertTrue(success); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/EmptyTest.java0000644000175000017500000001300711342530530026561 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import java.io.StringWriter; import java.util.Collection; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Element; import org.simpleframework.xml.ElementList; import org.simpleframework.xml.Root; import org.simpleframework.xml.core.Persister; import org.simpleframework.xml.core.ValueRequiredException; import org.simpleframework.xml.ValidationTestCase; public class EmptyTest extends ValidationTestCase { private static final String EMPTY_ELEMENT = "\n"+ "\n"+ " \r\n"+ "\n"; private static final String BLANK_ELEMENT = "\n"+ "\n"+ " \r\n"+ ""; private static final String EMPTY_ATTRIBUTE = "\n"+ "\n"; private static final String DEFAULT_ATTRIBUTE = "\n"+ "\n"+ " Some description\r\n"+ ""; @Root(name="test") private static class RequiredElement { @Element(name="empty") private String empty; } @Root(name="test") private static class OptionalElement { @Element(name="empty", required=false) private String empty; } @Root(name="test") private static class EmptyCollection { @ElementList(required=false) private Collection empty; } @Root(name="test") private static class RequiredMethodElement { private String text; @Element private void setEmpty(String text) { this.text = text; } @Element private String getEmpty() { return text; } } @Root(name="test") private static class RequiredAttribute { @Attribute(name="attribute") private String attribute; } @Root(name="test") private static class OptionalAttribute { @Attribute(name="attribute", required=false) private String attribute; } @Root(name="test") private static class DefaultedAttribute { @Attribute(empty="NULL") private String name; @Attribute(empty="NULL") private String address; @Element private String description; } private Persister persister; public void setUp() throws Exception { persister = new Persister(); } public void testRequiredEmpty() throws Exception { boolean success = false; try { persister.read(RequiredElement.class, EMPTY_ELEMENT); } catch(ValueRequiredException e) { e.printStackTrace(); success = true; } assertTrue(success); } public void testRequiredEmptyMethod() throws Exception { boolean success = false; try { persister.read(RequiredMethodElement.class, EMPTY_ELEMENT); } catch(ValueRequiredException e) { e.printStackTrace(); success = true; } assertTrue(success); } public void testRequiredBlank() throws Exception { boolean success = false; try { persister.read(RequiredElement.class, BLANK_ELEMENT); } catch(ValueRequiredException e) { e.printStackTrace(); success = true; } assertTrue(success); } public void testOptionalEmpty() throws Exception { boolean success = false; try { persister.read(RequiredElement.class, EMPTY_ELEMENT); } catch(ValueRequiredException e) { e.printStackTrace(); success = true; } assertTrue(success); } public void testOptionalBlank() throws Exception { OptionalElement element = persister.read(OptionalElement.class, BLANK_ELEMENT); assertNull(element.empty); } public void testEmptyCollection() throws Exception { EmptyCollection element = persister.read(EmptyCollection.class, BLANK_ELEMENT); assertNotNull(element.empty); assertEquals(element.empty.size(), 0); validate(element, persister); element.empty = null; validate(element, persister); } public void testRequiredEmptyAttribute() throws Exception { RequiredAttribute entry = persister.read(RequiredAttribute.class, EMPTY_ATTRIBUTE); assertEquals(entry.attribute, ""); } public void testOptionalEmptyAttribute() throws Exception { OptionalAttribute entry = persister.read(OptionalAttribute.class, EMPTY_ATTRIBUTE); assertEquals(entry.attribute, ""); } public void testDefaultedAttribute() throws Exception { DefaultedAttribute entry = persister.read(DefaultedAttribute.class, DEFAULT_ATTRIBUTE); assertEquals(entry.name, "John Doe"); assertEquals(entry.address, null); assertEquals(entry.description, "Some description"); validate(entry, persister); entry.name = null; StringWriter out = new StringWriter(); persister.write(entry, out); String result = out.toString(); assertXpathExists("/test[@name='NULL']", result); assertXpathExists("/test[@address='NULL']", result); assertXpathEvaluatesTo("Some description", "/test/description", result); validate(entry, persister); } }simple-xml-2.3.2/test/src/org/simpleframework/xml/core/OriginalTest.java0000644000175000017500000001147511342530530027236 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import java.util.Collection; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.CopyOnWriteArrayList; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.ElementList; import org.simpleframework.xml.ElementMap; import org.simpleframework.xml.Namespace; import org.simpleframework.xml.NamespaceList; import org.simpleframework.xml.Root; import org.simpleframework.xml.ValidationTestCase; public class OriginalTest extends ValidationTestCase { private static final String SOURCE = "\n"+ " \n"+ " a\n"+ " b\n"+ " c\n"+ " d\n"+ " \n"+ " \n"+ " \n"+ " a\n"+ " 1.0\n"+ " \n"+ " \n"+ " b\n"+ " 2.0\n"+ " \n"+ " \n"+ " c\n"+ " 3.0\n"+ " \n"+ " \n"+ " \n"+ " \n"+ " \n"+ " \n"+ " \n"+ " 1.0\n"+ " \n"+ " \n"+ " \n"+ " 2.0\n"+ " \n"+ " \n"+ " \n"+ " 3.0\n"+ " \n"+ " \n"+ "\n"; @Root @Namespace(prefix="entry", reference="http://domain/entry") private static class Entry { @Attribute private String name; @Attribute private String value; public Entry() { super(); } public Entry(String name, String value) { this.name = name; this.value = value; } public boolean equals(Object entry) { if(entry instanceof Entry) { Entry other = (Entry) entry; return other.name.equals(name) && other.value.equals(value); } return false; } public int hashCode() { return name.hashCode() ^ value.hashCode(); } } /* @Root @NamespaceList({@Namespace(prefix="root", reference="http://domain/entry")}) private static class ExampleWithOriginals { @ElementList private Collection list = new CopyOnWriteArrayList(); @ElementMap private Map map = new ConcurrentHashMap(); @ElementList(inline=true, entry="listEntry") private Collection inlineList = new CopyOnWriteArrayList(); @ElementMap(inline=true, entry="mapEntry") private Map inlineMap = new ConcurrentHashMap(); public ExampleWithOriginals() { this.list.add("original from constructor"); this.map.put("original key", 1.0); this.inlineList.add(new Entry("original name", "original value")); this.inlineMap.put(7.0, new Entry("an original name", "an original value")); } } public void testOriginals() throws Exception { Persister persister = new Persister(); ExampleWithOriginals original = persister.read(ExampleWithOriginals.class, SOURCE); persister.write(original, System.out); assertTrue(original.list.contains("original from constructor")); assertTrue(original.list.contains("a")); assertTrue(original.list.contains("b")); assertTrue(original.list.contains("c")); assertTrue(original.list.contains("d")); assertEquals(original.map.get("original key"), 1.0); assertEquals(original.map.get("a"), 1.0); assertEquals(original.map.get("b"), 2.0); assertEquals(original.map.get("c"), 3.0); assertTrue(original.inlineList.contains(new Entry("original name", "original value"))); assertTrue(original.inlineList.contains(new Entry("a", "1"))); assertTrue(original.inlineList.contains(new Entry("b", "2"))); assertTrue(original.inlineList.contains(new Entry("c", "3"))); assertTrue(original.inlineList.contains(new Entry("d", "4"))); assertEquals(original.inlineMap.get(7.0), new Entry("an original name", "an original value")); assertEquals(original.inlineMap.get(1.0), (new Entry("a", "1"))); assertEquals(original.inlineMap.get(2.0), (new Entry("b", "2"))); assertEquals(original.inlineMap.get(3.0), (new Entry("c", "3"))); validate(persister, original); }*/ public void testA(){} } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/MatcherTest.java0000644000175000017500000000311311342530530027043 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Element; import org.simpleframework.xml.Namespace; import org.simpleframework.xml.Root; import org.simpleframework.xml.Serializer; import org.simpleframework.xml.ValidationTestCase; import org.simpleframework.xml.transform.Matcher; import org.simpleframework.xml.transform.Transform; public class MatcherTest extends ValidationTestCase { @Root @Namespace(prefix="foo", reference="http://www.domain.com/value") private static class Example { @Element private Integer value; @Attribute private Integer attr; public Example() { super(); } public Example(Integer value, Integer attr) { this.value = value; this.attr = attr; } } private static class ExampleMatcher implements Matcher, Transform { public Transform match(Class type) throws Exception { if(type == Integer.class) { return this; } return null; } public Integer read(String value) throws Exception { return Integer.valueOf(value); } public String write(Integer value) throws Exception { return "12345"; } } public void testMatcher() throws Exception { Matcher matcher = new ExampleMatcher(); Serializer serializer = new Persister(matcher); Example example = new Example(1, 9999); serializer.write(example, System.out); validate(serializer, example); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/EnumTest.java0000644000175000017500000000316711342530527026403 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import junit.framework.TestCase; import org.simpleframework.xml.Element; import org.simpleframework.xml.Root; import org.simpleframework.xml.Serializer; public class EnumTest extends TestCase { private static final String SOURCE = "\n"+ " A\n"+ ""; private static final String LIST = "\n"+ " A,B,A,A\n"+ ""; enum PartType { A, B } @Root public static class EnumBug { @Element private PartType type; public EnumBug(@Element(name="type") PartType type) { this.type = type; } public PartType getType() { return type; } } @Root public static class EnumVariableArgumentsBug { @Element private PartType[] types; public EnumVariableArgumentsBug(@Element(name="types") PartType... types) { this.types = types; } public PartType[] getTypes() { return types; } } public void testEnum() throws Exception { Serializer serializer = new Persister(); EnumBug bug = serializer.read(EnumBug.class, SOURCE); assertEquals(bug.getType(), PartType.A); } public void testVargsEnum() throws Exception { Serializer serializer = new Persister(); EnumVariableArgumentsBug bug = serializer.read(EnumVariableArgumentsBug.class, LIST); assertEquals(bug.getTypes()[0], PartType.A); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/InjectTest.java0000644000175000017500000000166511342530527026714 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import junit.framework.TestCase; import org.simpleframework.xml.Element; import org.simpleframework.xml.Root; public class InjectTest extends TestCase { private static final String SOURCE = ""+ " Some Name"+ " Some Value"+ ""; @Root private static class InjectExample { @Element private String name; @Element private String value; public String getName() { return name; } public String getValue() { return value; } } public void testInject() throws Exception { Persister persister = new Persister(); InjectExample example = new InjectExample(); persister.read(example, SOURCE); assertEquals(example.getName(), "Some Name"); assertEquals(example.getValue(), "Some Value"); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/MethodPartFactoryTest.java0000644000175000017500000000376011342530530031067 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import java.util.List; import java.util.Map; import junit.framework.TestCase; import org.simpleframework.xml.Element; import org.simpleframework.xml.ElementArray; import org.simpleframework.xml.ElementList; import org.simpleframework.xml.ElementMap; public class MethodPartFactoryTest extends TestCase { private static interface Bean { public int getInteger(); public void setInteger(int value); public List getList(); public void setList(List list); public Map getMap(); public void setMap(Map map); public String[] getArray(); public void setArray(String[] array); } public void testMethodPart() throws Exception { assertTrue(Element.class.isAssignableFrom(new MethodPartFactory().getInstance(Bean.class.getMethod("getInteger")).getAnnotation().getClass())); assertTrue(Element.class.isAssignableFrom(new MethodPartFactory().getInstance(Bean.class.getMethod("setInteger", int.class)).getAnnotation().getClass())); assertTrue(ElementMap.class.isAssignableFrom(new MethodPartFactory().getInstance(Bean.class.getMethod("getMap")).getAnnotation().getClass())); assertTrue(ElementMap.class.isAssignableFrom(new MethodPartFactory().getInstance(Bean.class.getMethod("setMap", Map.class)).getAnnotation().getClass())); assertTrue(ElementList.class.isAssignableFrom(new MethodPartFactory().getInstance(Bean.class.getMethod("getList")).getAnnotation().getClass())); assertTrue(ElementList.class.isAssignableFrom(new MethodPartFactory().getInstance(Bean.class.getMethod("setList", List.class)).getAnnotation().getClass())); assertTrue(ElementArray.class.isAssignableFrom(new MethodPartFactory().getInstance(Bean.class.getMethod("getArray")).getAnnotation().getClass())); assertTrue(ElementArray.class.isAssignableFrom(new MethodPartFactory().getInstance(Bean.class.getMethod("setArray", String[].class)).getAnnotation().getClass())); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/PrimitiveArrayTest.java0000644000175000017500000000352611342530530030437 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import java.io.StringReader; import junit.framework.TestCase; import org.simpleframework.xml.strategy.TreeStrategy; import org.simpleframework.xml.stream.InputNode; import org.simpleframework.xml.stream.NodeBuilder; public class PrimitiveArrayTest extends TestCase { public static final String ZERO = ""; public static final String TWO = ""+ " one" + " two" + ""; public void testZero() throws Exception { Context context = new Source(new TreeStrategy(), new Support(), new DefaultStyle()); PrimitiveArray primitive = new PrimitiveArray(context, new ClassType(String[].class), new ClassType(String.class), "entry"); InputNode node = NodeBuilder.read(new StringReader(ZERO)); Object value = primitive.read(node); assertEquals(value.getClass(), String[].class); InputNode newNode = NodeBuilder.read(new StringReader(ZERO)); assertTrue(primitive.validate(newNode)); } public void testTwo() throws Exception { Context context = new Source(new TreeStrategy(), new Support(), new DefaultStyle()); PrimitiveArray primitive = new PrimitiveArray(context, new ClassType(String[].class), new ClassType(String.class), "entry"); InputNode node = NodeBuilder.read(new StringReader(TWO)); Object value = primitive.read(node); assertEquals(value.getClass(), String[].class); String[] list = (String[]) value; assertEquals(list.length, 2); assertEquals(list[0], "one"); assertEquals(list[1], "two"); InputNode newNode = NodeBuilder.read(new StringReader(TWO)); assertTrue(primitive.validate(newNode)); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/CaseTest.java0000644000175000017500000000507711342530530026346 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import java.util.List; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Element; import org.simpleframework.xml.ElementList; import org.simpleframework.xml.Root; import org.simpleframework.xml.Text; import org.simpleframework.xml.ValidationTestCase; import org.simpleframework.xml.core.Persister; public class CaseTest extends ValidationTestCase { private static final String SOURCE = "\n"+ "\n"+ " \n"+ " \n"+ " one \n\r"+ " \n\r"+ " \n"+ " two \n\r"+ " \n"+ " \n"+ " three \n\r"+ " \n"+ " \n"+ " \n" + " example 4\n" + " \n" + " \n"+ " http://a.com/\n"+ " http://b.com/\n"+ " http://c.com/\n"+ " \n"+ " \n" + " example 5\n" + " \n" + " \n" + " example 6\n" + " \n" + ""; @Root(name="Example") private static class CaseExample { @ElementList(name="List", entry="ListEntry") private List list; @ElementList(name="URLList") private List domainList; @ElementList(name="TextList", inline=true) private List textList; @Attribute(name="Version") private float version; @Attribute(name="Name") private String name; @Attribute private String URL; // Java Bean property is URL } @Root(name="TextEntry") private static class TextEntry { @Attribute(name="id") private int id; @Element(name="Text") private String text; } @Root(name="URLEntry") private static class URLEntry { @Text private String location; } public void testCase() throws Exception { Persister persister = new Persister(); CaseExample example = persister.read(CaseExample.class, SOURCE); assertEquals(example.version, 1.0f); assertEquals(example.name, "example"); assertEquals(example.URL, "http://domain.com/"); validate(example, persister); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/HierarchyTest.java0000644000175000017500000000350511342530530027403 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import org.simpleframework.xml.Element; import org.simpleframework.xml.Serializer; import org.simpleframework.xml.ValidationTestCase; import org.simpleframework.xml.core.Persister; public class HierarchyTest extends ValidationTestCase { public static class Basic { @Element private String a; @Element private String b; private long one; private Basic() { super(); } public Basic(long one, String a, String b) { this.one = one; this.a = a; this.b = b; } @Element public long getOne() { return one; } @Element public void setOne(long one) { this.one = one; } } public static class Abstract extends Basic { @Element private int c; private Abstract() { super(); } public Abstract(long one, String a, String b, int c) { super(one, a, b); this.c = c; } } public static class Specialized extends Abstract { @Element private int d; private double two; private Specialized() { super(); } public Specialized(long one, double two, String a, String b, int c, int d) { super(one, a, b, c); this.two = two; this.d = d; } @Element public double getTwo() { return two; } @Element public void setTwo(double two) { this.two = two; } } public void testHierarchy() throws Exception { Serializer serializer = new Persister(); Specialized special = new Specialized(1L, 2.0, "a", "b", 1, 2); validate(special, serializer); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/CompositeInlineMapTest.java0000644000175000017500000001565711342530530031237 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import java.io.PrintWriter; import java.lang.annotation.Annotation; import java.util.HashMap; import java.util.Map; import junit.framework.TestCase; import org.simpleframework.xml.ElementMap; import org.simpleframework.xml.strategy.TreeStrategy; import org.simpleframework.xml.stream.Mode; import org.simpleframework.xml.stream.NodeBuilder; import org.simpleframework.xml.stream.OutputNode; public class CompositeInlineMapTest extends TestCase { private static class MockElementMap implements ElementMap { private boolean attribute; private boolean data; private String entry; private boolean inline; private String key; private Class keyType; private String name; private boolean required; private String value; private Class valueType; public MockElementMap( boolean attribute, boolean data, String entry, boolean inline, String key, Class keyType, String name, boolean required, String value, Class valueType) { this.attribute = attribute; this.data = data; this.entry = entry; this.inline = inline; this.key = key; this.keyType = keyType; this.name = name; this.required = required; this.value = value; this.valueType = valueType; } public boolean empty() { return true; } public boolean attribute() { return attribute; } public boolean data() { return data; } public String entry() { return entry; } public boolean inline() { return inline; } public String key() { return key; } public Class keyType() { return keyType; } public String name() { return name; } public boolean required() { return required; } public String value() { return value; } public double since() { return 1.0; } public Class valueType() { return valueType; } public Class annotationType() { return ElementMap.class; } } private static class PrimitiveType { private MockElementMap map; private String string; private int number; private byte octet; public PrimitiveType(MockElementMap map) { this.map = map; } public Contact getString() throws Exception { return new FieldContact(PrimitiveType.class.getDeclaredField("string"), map); } public Contact getNumber() throws Exception { return new FieldContact(PrimitiveType.class.getDeclaredField("number"), map); } public Contact getOctet() throws Exception { return new FieldContact(PrimitiveType.class.getDeclaredField("octet"), map); } } public void testNotInlineString() throws Exception { Source source = new Source(new TreeStrategy(), new Support(), new DefaultStyle()); MockElementMap map = new MockElementMap(false, // attribute false, // data "entry", // entry true, // inline "key", // key String.class, // keyType "name", // name true, // required "value", // value String.class); // valueType PrimitiveType type = new PrimitiveType(map); Contact string = type.getString(); Entry entry = new Entry(string, map); CompositeInlineMap value = new CompositeInlineMap(source, entry, new ClassType(Map.class)); OutputNode node = NodeBuilder.write(new PrintWriter(System.out)); Map exampleMap = new HashMap(); exampleMap.put("a", "1"); exampleMap.put("b", "2"); value.write(node.getChild("notInlineString").getChild("map"), exampleMap); node.commit(); } public void testNoAttributeString() throws Exception { Source source = new Source(new TreeStrategy(), new Support(), new DefaultStyle()); MockElementMap map = new MockElementMap(false, // attribute false, // data "entry", // entry true, // inline "", // key String.class, // keyType "name", // name true, // required "value", // value String.class); // valueType PrimitiveType type = new PrimitiveType(map); Contact string = type.getString(); Entry entry = new Entry(string, map); CompositeInlineMap value = new CompositeInlineMap(source, entry, new ClassType(Map.class)); OutputNode node = NodeBuilder.write(new PrintWriter(System.out)); Map exampleMap = new HashMap(); exampleMap.put("a", "1"); exampleMap.put("b", "2"); value.write(node.getChild("noAttributeString").getChild("map"), exampleMap); node.commit(); } public void testAttributeNoKeyString() throws Exception { Source source = new Source(new TreeStrategy(), new Support(), new DefaultStyle()); MockElementMap map = new MockElementMap(true, // attribute false, // data "entry", // entry true, // inline "", // key String.class, // keyType "name", // name true, // required "value", // value String.class); // valueType PrimitiveType type = new PrimitiveType(map); Contact string = type.getString(); Entry entry = new Entry(string, map); CompositeInlineMap value = new CompositeInlineMap(source, entry, new ClassType(Map.class)); OutputNode node = NodeBuilder.write(new PrintWriter(System.out)); Map exampleMap = new HashMap(); exampleMap.put("a", "1"); exampleMap.put("b", "2"); value.write(node.getChild("attributeNoKeyString").getChild("map"), exampleMap); node.commit(); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/MethodTest.java0000644000175000017500000001573511342530527026723 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import java.io.StringWriter; import org.simpleframework.xml.Element; import org.simpleframework.xml.Root; import org.simpleframework.xml.core.Persister; import org.simpleframework.xml.ValidationTestCase; public class MethodTest extends ValidationTestCase { private static final String SOURCE_EXPLICIT = "\n"+ "\n"+ " true\r\n"+ " 16 \n\r"+ " 120 \n\r"+ " 1234\n"+ " 1234.56 \n\r"+ " 1234567\n"+ " 1234567.89 \n\r"+ ""; private static final String SOURCE_IMPLICIT = "\n"+ "\n"+ " true\r\n"+ " 16 \n\r"+ " 120 \n\r"+ " 1234\n"+ " 1234.56 \n\r"+ " 1234567\n"+ " 1234567.89 \n\r"+ ""; @Root(name="test") private static class ExplicitMethodNameExample { protected boolean booleanValue; protected byte byteValue; protected short shortValue; protected int intValue; protected float floatValue; protected long longValue; protected double doubleValue; public ExplicitMethodNameExample() { super(); } @Element(name="boolean") public boolean getBooleanValue() { return booleanValue; } @Element(name="boolean") public void setBooleanValue(boolean booleanValue) { this.booleanValue = booleanValue; } @Element(name="byte") public byte getByteValue() { return byteValue; } @Element(name="byte") public void setByteValue(byte byteValue) { this.byteValue = byteValue; } @Element(name="double") public double getDoubleValue() { return doubleValue; } @Element(name="double") public void setDoubleValue(double doubleValue) { this.doubleValue = doubleValue; } @Element(name="float") public float getFloatValue() { return floatValue; } @Element(name="float") public void setFloatValue(float floatValue) { this.floatValue = floatValue; } @Element(name="int") public int getIntValue() { return intValue; } @Element(name="int") public void setIntValue(int intValue) { this.intValue = intValue; } @Element(name="long") public long getLongValue() { return longValue; } @Element(name="long") public void setLongValue(long longValue) { this.longValue = longValue; } @Element(name="short") public short getShortValue() { return shortValue; } @Element(name="short") public void setShortValue(short shortValue) { this.shortValue = shortValue; } } @Root private static class ImplicitMethodNameExample extends ExplicitMethodNameExample { @Element public boolean getBooleanValue() { return booleanValue; } @Element public void setBooleanValue(boolean booleanValue) { this.booleanValue = booleanValue; } @Element public byte getByteValue() { return byteValue; } @Element public void setByteValue(byte byteValue) { this.byteValue = byteValue; } @Element public double getDoubleValue() { return doubleValue; } @Element public void setDoubleValue(double doubleValue) { this.doubleValue = doubleValue; } @Element public float getFloatValue() { return floatValue; } @Element public void setFloatValue(float floatValue) { this.floatValue = floatValue; } @Element public int getIntValue() { return intValue; } @Element public void setIntValue(int intValue) { this.intValue = intValue; } @Element public long getLongValue() { return longValue; } @Element public void setLongValue(long longValue) { this.longValue = longValue; } @Element public short getShortValue() { return shortValue; } @Element public void setShortValue(short shortValue) { this.shortValue = shortValue; } } private Persister persister; public void setUp() throws Exception { persister = new Persister(); } public void testExplicitMethodNameExample() throws Exception { ExplicitMethodNameExample entry = persister.read(ExplicitMethodNameExample.class, SOURCE_EXPLICIT); assertEquals(entry.booleanValue, true); assertEquals(entry.byteValue, 16); assertEquals(entry.shortValue, 120); assertEquals(entry.intValue, 1234); assertEquals(entry.floatValue, 1234.56f); assertEquals(entry.longValue, 1234567l); assertEquals(entry.doubleValue, 1234567.89d); StringWriter buffer = new StringWriter(); persister.write(entry, buffer); validate(entry, persister); entry = persister.read(ExplicitMethodNameExample.class, buffer.toString()); assertEquals(entry.booleanValue, true); assertEquals(entry.byteValue, 16); assertEquals(entry.shortValue, 120); assertEquals(entry.intValue, 1234); assertEquals(entry.floatValue, 1234.56f); assertEquals(entry.longValue, 1234567l); assertEquals(entry.doubleValue, 1234567.89d); validate(entry, persister); } public void testImplicitMethodNameExample() throws Exception { ImplicitMethodNameExample entry = persister.read(ImplicitMethodNameExample.class, SOURCE_IMPLICIT); assertEquals(entry.booleanValue, true); assertEquals(entry.byteValue, 16); assertEquals(entry.shortValue, 120); assertEquals(entry.intValue, 1234); assertEquals(entry.floatValue, 1234.56f); assertEquals(entry.longValue, 1234567l); assertEquals(entry.doubleValue, 1234567.89d); StringWriter buffer = new StringWriter(); persister.write(entry, buffer); validate(entry, persister); entry = persister.read(ImplicitMethodNameExample.class, buffer.toString()); assertEquals(entry.booleanValue, true); assertEquals(entry.byteValue, 16); assertEquals(entry.shortValue, 120); assertEquals(entry.intValue, 1234); assertEquals(entry.floatValue, 1234.56f); assertEquals(entry.longValue, 1234567l); assertEquals(entry.doubleValue, 1234567.89d); validate(entry, persister); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/StaticTest.java0000644000175000017500000001077111342530527026725 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import java.util.ArrayList; import java.util.List; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Element; import org.simpleframework.xml.ElementList; import org.simpleframework.xml.Namespace; import org.simpleframework.xml.NamespaceList; import org.simpleframework.xml.Root; import org.simpleframework.xml.Text; import org.simpleframework.xml.ValidationTestCase; public class StaticTest extends ValidationTestCase { private static final String SOURCE = "\n"+ " Niall Gallagher\n"+ " niallg@users.sourceforge.net\n"+ " \n"+ " Stanford Press\n"+ " 2001\n"+ "
Palo Alto
\n"+ " 1st\n"+ " 0-69-697269-4\n"+ "
\n"+ "
\n"+ " First paragraph of document\n"+ " Second paragraph in the document\n"+ " Third and final paragraph\n"+ "
\n"+ "
"; @Root @Namespace(reference="http://www.domain.com/detail") private static class Detail { @Element private String publisher; @Element private String date; @Element private String address; @Element private String edition; @Element private String ISBN; private Detail() { super(); } public Detail(String publisher, String date, String address, String edition, String ISBN) { this.publisher = publisher; this.address = address; this.edition = edition; this.date = date; this.ISBN = ISBN; } } @Root @Namespace(reference = "http://www.domain.com/document") public static class Document { @Element(name="author") @Namespace(prefix="user", reference="http://www.domain.com/user") private static String AUTHOR = "Niall Gallagher"; @Element(name="contact") private static String CONTACT = "niallg@users.sourceforge.net"; @Element(name="detail") private static Detail DETAIL = new Detail( "Stanford Press", "2001", "Palo Alto", "1st", "0-69-697269-4"); @ElementList(inline = true) private List
list; @Attribute private String title; private Document() { super(); } public Document(String title) { this.list = new ArrayList
(); this.title = title; } public void add(Section section) { list.add(section); } } @Root @NamespaceList({ @Namespace(prefix="para", reference="http://www.domain.com/paragraph") }) private static class Section { @Attribute private String name; @ElementList(inline = true) private List list; private Section() { super(); } public Section(String name) { this.list = new ArrayList(); this.name = name; } public void add(Paragraph paragraph) { list.add(paragraph); } } @Root @Namespace(reference = "http://www.domain.com/paragraph") private static class Paragraph { private String text; @Text private String getContent() { return text; } @Text public void setContent(String text) { this.text = text; } } public void testStatic() throws Exception { Persister persister = new Persister(); Document document = new Document("Secret Document"); Section section = new Section("Introduction"); Paragraph first = new Paragraph(); Paragraph second = new Paragraph(); Paragraph third = new Paragraph(); first.setContent("First paragraph of document"); second.setContent("Second paragraph in the document"); third.setContent("Third and final paragraph"); section.add(first); section.add(second); section.add(third); document.add(section); persister.write(document, System.out); validate(persister, document); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/ScatterTest.java0000644000175000017500000002013611342530530027071 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import java.io.StringWriter; import java.util.ArrayList; import java.util.List; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Element; import org.simpleframework.xml.ElementList; import org.simpleframework.xml.Root; import org.simpleframework.xml.Text; import org.simpleframework.xml.Transient; import org.simpleframework.xml.ValidationTestCase; import org.simpleframework.xml.core.Persister; import org.simpleframework.xml.util.Dictionary; import org.simpleframework.xml.util.Entry; public class ScatterTest extends ValidationTestCase { private static final String INLINE_LIST = "\n"+ " Example 1\r\n"+ " Some example message\r\n"+ " Example 2\r\n"+ " 1.0\n" + " 2.0\n"+ " Example 3\r\n"+ " 3.0\n"+ ""; private static final String INLINE_PRIMITIVE_LIST = "\n"+ " Example 1\r\n"+ " Some example message\r\n"+ " Example 2\r\n"+ " Example 3\r\n"+ ""; private static final String INLINE_NAMED_LIST = "\n"+ " \r\n"+ " \r\n"+ " \r\n"+ " \r\n"+ " \r\n"+ ""; @Root(name="test") private static class InlineTextList { @Element private String message; @ElementList(inline=true) private List numbers; @Transient private List list; @Attribute private Version version; private List getNumbers() { return numbers; } @ElementList(inline=true) public void setList(List list) { this.list = new ArrayList(list); // ensure only set when fully read } @ElementList(inline=true) public List getList() { return list; } public TextEntry get(int index) { return list.get(index); } } @Root(name="test") private static class InlinePrimitiveList { @Element private String message; @ElementList(inline=true) private List list; @Attribute private Version version; public String get(int index) { return list.get(index); } } @Root(name="text") private static class TextEntry { @Attribute private String name; @Attribute private Version version; @Text private String text; } @Root private static class SimpleInlineList { @ElementList(inline=true) private ArrayList list = new ArrayList(); } @Root private static class SimpleEntry { @Attribute private String content; } @Root private static class SimplePrimitiveInlineList { @ElementList(inline=true) private ArrayList list = new ArrayList(); } @Root(name="test") private static class InlineNamedList { @ElementList(inline=true, entry="include") private Dictionary includeList; @ElementList(inline=true, entry="exclude") private Dictionary excludeList; @Attribute private Version version; public String getInclude(String name) { FileMatch match = includeList.get(name); if(match != null) { return match.file; } return null; } public String getExclude(String name) { FileMatch match = excludeList.get(name); if(match != null) { return match.file; } return null; } } @Root private static class FileMatch implements Entry { @Attribute private String file; @Attribute private String name; public String getName() { return name; } } private static enum Version { ONE, TWO, THREE } private Persister persister; public void setUp() throws Exception { persister = new Persister(); } public void testList() throws Exception { InlineTextList list = persister.read(InlineTextList.class, INLINE_LIST); assertEquals(list.version, Version.ONE); assertEquals(list.message, "Some example message"); assertEquals(list.get(0).version, Version.ONE); assertEquals(list.get(0).name, "a"); assertEquals(list.get(0).text, "Example 1"); assertEquals(list.get(1).version, Version.TWO); assertEquals(list.get(1).name, "b"); assertEquals(list.get(1).text, "Example 2"); assertEquals(list.get(2).version, Version.THREE); assertEquals(list.get(2).name, "c"); assertEquals(list.get(2).text, "Example 3"); assertTrue(list.getNumbers().contains(1.0)); assertTrue(list.getNumbers().contains(2.0)); assertTrue(list.getNumbers().contains(3.0)); StringWriter buffer = new StringWriter(); persister.write(list, buffer); validate(list, persister); list = persister.read(InlineTextList.class, buffer.toString()); assertEquals(list.version, Version.ONE); assertEquals(list.message, "Some example message"); assertEquals(list.get(0).version, Version.ONE); assertEquals(list.get(0).name, "a"); assertEquals(list.get(0).text, "Example 1"); assertEquals(list.get(1).version, Version.TWO); assertEquals(list.get(1).name, "b"); assertEquals(list.get(1).text, "Example 2"); assertEquals(list.get(2).version, Version.THREE); assertEquals(list.get(2).name, "c"); assertEquals(list.get(2).text, "Example 3"); validate(list, persister); } public void testPrimitiveList() throws Exception { InlinePrimitiveList list = persister.read(InlinePrimitiveList.class, INLINE_PRIMITIVE_LIST); assertEquals(list.version, Version.ONE); assertEquals(list.message, "Some example message"); assertEquals(list.get(0), "Example 1"); assertEquals(list.get(1), "Example 2"); assertEquals(list.get(2), "Example 3"); StringWriter buffer = new StringWriter(); persister.write(list, buffer); validate(list, persister); list = persister.read(InlinePrimitiveList.class, buffer.toString()); assertEquals(list.get(0), "Example 1"); assertEquals(list.get(1), "Example 2"); assertEquals(list.get(2), "Example 3"); validate(list, persister); } public void testInlineNamedList() throws Exception { InlineNamedList list = persister.read(InlineNamedList.class, INLINE_NAMED_LIST); assertEquals(list.getInclude("1"), "1.txt"); assertEquals(list.getInclude("2"), null); assertEquals(list.getInclude("3"), null); assertEquals(list.getInclude("4"), "4.txt"); assertEquals(list.getInclude("5"), null); assertEquals(list.getExclude("1"), null); assertEquals(list.getExclude("2"), "2.txt"); assertEquals(list.getExclude("3"), "3.txt"); assertEquals(list.getExclude("4"), null); assertEquals(list.getExclude("5"), "5.txt"); validate(list, persister); } public void testSimpleList() throws Exception{ SimpleInlineList list = new SimpleInlineList(); SimpleEntry entry = new SimpleEntry(); entry.content = "test"; list.list.add(entry); validate(list, persister); } public void testSimplePrimitiveList() throws Exception{ SimplePrimitiveInlineList list = new SimplePrimitiveInlineList(); list.list.add("test"); validate(list, persister); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/AliasTest.java0000644000175000017500000001324611342530527026527 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import java.io.StringReader; import java.io.StringWriter; import java.util.HashMap; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Element; import org.simpleframework.xml.ElementMap; import org.simpleframework.xml.Namespace; import org.simpleframework.xml.Root; import org.simpleframework.xml.ValidationTestCase; import org.simpleframework.xml.strategy.Type; import org.simpleframework.xml.strategy.Strategy; import org.simpleframework.xml.strategy.TreeStrategy; import org.simpleframework.xml.strategy.Value; import org.simpleframework.xml.stream.InputNode; import org.simpleframework.xml.stream.Node; import org.simpleframework.xml.stream.NodeMap; import org.simpleframework.xml.stream.OutputNode; import org.w3c.dom.Document; import org.xml.sax.InputSource; public class AliasTest extends ValidationTestCase { public class AliasStrategy implements Strategy { private final Strategy strategy; private final Map forward; private final Map backward; private AliasStrategy(Strategy strategy) { this.forward = new ConcurrentHashMap(); this.backward = new ConcurrentHashMap(); this.strategy = strategy; } public void addAlias(Class type, String name) { forward.put(type, name); backward.put(name, type); } public Value read(Type field, NodeMap node, Map map) throws Exception { Node entry = node.remove("type"); if(entry != null) { String value = entry.getValue(); Class type = backward.get(value); if(type == null) { throw new PersistenceException("Could not find class for alias %s", value); } node.put("class", type.getName()); } return strategy.read(field, node, map); } public boolean write(Type field, Object value, NodeMap node, Map map) throws Exception { boolean done = strategy.write(field, value, node, map); Node entry = node.remove("class"); if(entry != null) { String className = entry.getValue(); Class type = Class.forName(className); String name = forward.get(type); if(name == null) { throw new PersistenceException("Could not find alias for class %s", className); } node.put("type", name); } return done; } } @Root @Namespace(prefix="table", reference="http://simpleframework.org/map") private static class MultiValueMap { @ElementMap private Map map; public MultiValueMap() { this.map = new HashMap(); } public void add(String name, Object value) { map.put(name, value); } public Object get(String name) { return map.get(name); } } @Root @Namespace(prefix="item", reference="http://simpleframework.org/entry") private static class MultiValueEntry { @Attribute(name="name") private String name; @Element(name="value") private String value; public MultiValueEntry(@Attribute(name="name") String name, @Element(name="value") String value) { this.name = name; this.value = value; } } public void testMap() throws Exception { Strategy strategy = new TreeStrategy(); AliasStrategy alias = new AliasStrategy(strategy); Persister persister = new Persister(alias); MultiValueMap map = new MultiValueMap(); alias.addAlias(HashMap.class, "map"); alias.addAlias(Integer.class, "int"); alias.addAlias(Double.class, "float"); alias.addAlias(String.class, "text"); alias.addAlias(MultiValueEntry.class, "item"); map.add("integer", 1); map.add("double", 0.0d); map.add("string", "test"); map.add("item", new MultiValueEntry("example", "item")); StringWriter out = new StringWriter(); persister.write(map, out); String text = out.toString();//.replaceAll("entry", "table:entry"); System.err.println(text); MultiValueMap read = persister.read(MultiValueMap.class, text); assertEquals(read.get("integer"), 1); assertEquals(read.get("double"), 0.0d); assertEquals(read.get("string"), "test"); validate(persister, map); DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); // Ensure we know about namespaces factory.setNamespaceAware(true); factory.setValidating(false); DocumentBuilder builder = factory.newDocumentBuilder(); StringReader reader = new StringReader(text); InputSource source = new InputSource(reader); Document doc = builder.parse(source); org.w3c.dom.Element element = doc.getDocumentElement(); assertEquals("multiValueMap", element.getLocalName()); assertEquals("http://simpleframework.org/map", element.getNamespaceURI()); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/ErasureHandlingTest.java0000644000175000017500000001772611342530527030560 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import java.io.StringWriter; import java.util.HashMap; import java.util.LinkedHashMap; import java.util.Map; import org.simpleframework.xml.Default; import org.simpleframework.xml.Element; import org.simpleframework.xml.ElementMap; import org.simpleframework.xml.Root; import org.simpleframework.xml.ValidationTestCase; import org.simpleframework.xml.strategy.ClassToNamespaceVisitor; import org.simpleframework.xml.strategy.Strategy; import org.simpleframework.xml.strategy.Visitor; import org.simpleframework.xml.strategy.VisitorStrategy; public class ErasureHandlingTest extends ValidationTestCase { @Root @Default private static class ErasureExample { private Map list = new LinkedHashMap(); private Map doubleGeneric = new LinkedHashMap(); public void addItem(String key, T item) { list.put(key, item); } public T getItem(String key){ return list.get(key); } public void addDoubleGeneric(T key, T item) { doubleGeneric.put(key, item); } } @Root @Default private static class ErasureItem { private final String name; private final String value; public ErasureItem(@Element(name="name") String name, @Element(name="value") String value) { this.name = name; this.value = value; } } @Root private static class ErasureWithMapAttributeIllegalExample { @ElementMap(attribute=true) private Map erasedToString = new HashMap(); public void addItem(T key, String value){ erasedToString.put(key, value); } } @Root private static class ErasureWithMapInlineValueIsIgnoredExample { @ElementMap(attribute=true, inline=true, value="value", key="key") private Map erasedToString = new LinkedHashMap(); public void addItem(String key, T value){ erasedToString.put(key, value); } public T getItem(String key) { return erasedToString.get(key); } } private static enum ErasureEnum { A, B, C, D } public void testErasure() throws Exception { Visitor visitor = new ClassToNamespaceVisitor(); Strategy strategy = new VisitorStrategy(visitor); Persister persister = new Persister(strategy); ErasureExample example = new ErasureExample(); StringWriter writer = new StringWriter(); example.addItem("a", new ErasureItem("A", "1")); example.addItem("b", new ErasureItem("B", "2")); example.addItem("c", new ErasureItem("C", "3")); example.addDoubleGeneric(new ErasureItem("1", "1"), new ErasureItem("A", "1")); example.addDoubleGeneric(new ErasureItem("2", "2"), new ErasureItem("B", "2")); example.addDoubleGeneric(new ErasureItem("3", "3"), new ErasureItem("C", "3")); persister.write(example, writer); String text = writer.toString(); System.out.println(text); ErasureExample exampleCopy = persister.read(ErasureExample.class, text); assertEquals(exampleCopy.getItem("a").name, "A"); assertEquals(exampleCopy.getItem("b").name, "B"); assertEquals(exampleCopy.getItem("c").name, "C"); validate(example, persister); } public void testPrimitiveErasure() throws Exception { Visitor visitor = new ClassToNamespaceVisitor(); Strategy strategy = new VisitorStrategy(visitor); Persister persister = new Persister(strategy); ErasureExample example = new ErasureExample(); example.addItem("a", 2.0); example.addItem("b", 1.2); example.addItem("c", 5.4); example.addDoubleGeneric(7.8, 8.7); example.addDoubleGeneric(1.2, 2.1); example.addDoubleGeneric(3.1, 1.3); persister.write(example, System.out); validate(example, persister); } public void testEnumErasure() throws Exception { Visitor visitor = new ClassToNamespaceVisitor(); Strategy strategy = new VisitorStrategy(visitor); Persister persister = new Persister(strategy); ErasureExample example = new ErasureExample(); example.addItem("a", ErasureEnum.A); example.addItem("b", ErasureEnum.B); example.addItem("c", ErasureEnum.C); example.addDoubleGeneric(ErasureEnum.A, ErasureEnum.B); example.addDoubleGeneric(ErasureEnum.B, ErasureEnum.C); example.addDoubleGeneric(ErasureEnum.C, ErasureEnum.D); persister.write(example, System.out); validate(example, persister); } public void testErasureWithMapAttributeIllegalExample() throws Exception { Visitor visitor = new ClassToNamespaceVisitor(); Strategy strategy = new VisitorStrategy(visitor); Persister persister = new Persister(strategy); ErasureWithMapAttributeIllegalExample example = new ErasureWithMapAttributeIllegalExample(); boolean failure = false; example.addItem(ErasureEnum.A, "a"); example.addItem(ErasureEnum.B, "b"); example.addItem(ErasureEnum.C, "c"); try { persister.write(example, System.out); }catch(Exception e) { e.printStackTrace(); failure = true; } assertTrue("Attribute should not be possible with an erased key", failure); } public void testErasureWithMapInlineValueIsIgnoredExample() throws Exception { Persister persister = new Persister(); ErasureWithMapInlineValueIsIgnoredExample example = new ErasureWithMapInlineValueIsIgnoredExample(); StringWriter writer = new StringWriter(); example.addItem("a", new ErasureItem("A", "1")); example.addItem("b", new ErasureItem("B", "2")); example.addItem("c", new ErasureItem("C", "3")); persister.write(example, writer); String text = writer.toString(); System.out.println(text); assertElementHasAttribute(text, "/erasureWithMapInlineValueIsIgnoredExample/entry[0]", "key", "a"); assertElementHasAttribute(text, "/erasureWithMapInlineValueIsIgnoredExample/entry[1]", "key", "b"); assertElementHasAttribute(text, "/erasureWithMapInlineValueIsIgnoredExample/entry[2]", "key", "c"); assertElementHasAttribute(text, "/erasureWithMapInlineValueIsIgnoredExample/entry[0]/value", "class", ErasureItem.class.getName()); assertElementHasAttribute(text, "/erasureWithMapInlineValueIsIgnoredExample/entry[1]/value", "class", ErasureItem.class.getName()); assertElementHasAttribute(text, "/erasureWithMapInlineValueIsIgnoredExample/entry[2]/value", "class", ErasureItem.class.getName()); assertElementHasValue(text, "/erasureWithMapInlineValueIsIgnoredExample/entry[0]/value/name", "A"); assertElementHasValue(text, "/erasureWithMapInlineValueIsIgnoredExample/entry[1]/value/name", "B"); assertElementHasValue(text, "/erasureWithMapInlineValueIsIgnoredExample/entry[2]/value/name", "C"); assertElementHasValue(text, "/erasureWithMapInlineValueIsIgnoredExample/entry[0]/value/value", "1"); assertElementHasValue(text, "/erasureWithMapInlineValueIsIgnoredExample/entry[1]/value/value", "2"); assertElementHasValue(text, "/erasureWithMapInlineValueIsIgnoredExample/entry[2]/value/value", "3"); System.out.println(text); ErasureWithMapInlineValueIsIgnoredExample exampleCopy = persister.read(ErasureWithMapInlineValueIsIgnoredExample.class, text); assertEquals(exampleCopy.getItem("a").name, "A"); assertEquals(exampleCopy.getItem("b").name, "B"); assertEquals(exampleCopy.getItem("c").name, "C"); assertEquals(exampleCopy.getItem("a").value, "1"); assertEquals(exampleCopy.getItem("b").value, "2"); assertEquals(exampleCopy.getItem("c").value, "3"); validate(exampleCopy, persister); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/ValidateTest.java0000644000175000017500000000710411342530530027215 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import java.io.StringWriter; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.ElementArray; import org.simpleframework.xml.Root; import org.simpleframework.xml.Serializer; import org.simpleframework.xml.Text; import org.simpleframework.xml.ValidationTestCase; import org.simpleframework.xml.core.Persister; public class ValidateTest extends ValidationTestCase { private static final String VERSION_MISSING = "\n"+ " \n"+ " Example 1\r\n"+ " Example 2\r\n"+ " Example 3\r\n"+ " \n\r"+ ""; private static final String NAME_MISSING = "\n"+ " \n"+ " Example 1\r\n"+ " Example 2\r\n"+ " Example 3\r\n"+ " \n\r"+ ""; private static final String TEXT_MISSING = "\n"+ " \n"+ " Example 1\r\n"+ " Example 2\r\n"+ " \r\n"+ " \n\r"+ ""; private static final String EXTRA_ELEMENT = "\n"+ " \n"+ " Example 1\r\n"+ " Example 2\r\n"+ " Example 3\r\n"+ " \n\r"+ " \n"+ " Example 4\r\n"+ " \n"+ ""; @Root(name="test") private static class TextList { @ElementArray(name="array", entry="entry") private TextEntry[] array; } @Root(name="text") private static class TextEntry { @Attribute(name="name") private String name; @Attribute(name="version") private Version version; @Text(data=true) private String text; } private enum Version { ONE, TWO, THREE } public void testVersionMissing() throws Exception { Serializer persister = new Persister(); boolean success = false; try { success = persister.validate(TextList.class, VERSION_MISSING); } catch(Exception e) { e.printStackTrace(); success = true; } assertTrue(success); } public void testNameMissing() throws Exception { Serializer persister = new Persister(); boolean success = false; try { success = persister.validate(TextList.class, NAME_MISSING); } catch(Exception e) { e.printStackTrace(); success = true; } assertTrue(success); } public void testTextMissing() throws Exception { Serializer persister = new Persister(); boolean success = false; try { success = persister.validate(TextList.class, TEXT_MISSING); } catch(Exception e) { e.printStackTrace(); success = true; } assertTrue(success); } public void testExtraElement() throws Exception { Serializer persister = new Persister(); boolean success = false; try { success = persister.validate(TextList.class, EXTRA_ELEMENT); } catch(Exception e) { e.printStackTrace(); success = true; } assertTrue(success); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/SubstituteTest.java0000644000175000017500000001104511342530530027636 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import java.io.StringWriter; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Element; import org.simpleframework.xml.Root; import org.simpleframework.xml.Text; import org.simpleframework.xml.core.Persist; import org.simpleframework.xml.core.Persister; import org.simpleframework.xml.core.Replace; import org.simpleframework.xml.core.Resolve; import org.simpleframework.xml.core.Validate; import org.simpleframework.xml.ValidationTestCase; public class SubstituteTest extends ValidationTestCase { private static final String REPLACE_SOURCE = "\n"+ "\n"+ " some example text \n\r"+ ""; private static final String RESOLVE_SOURCE = "\n"+ "\n"+ " some example text \n\r"+ ""; @Root private static class SubstituteExample { @Element public Substitute substitute; public SubstituteExample() { super(); } public SubstituteExample(Substitute substitute) { this.substitute = substitute; } } @Root private static class Substitute { @Text public String text; } private static class SimpleSubstitute extends Substitute { @Replace public Substitute replace() { return new OtherSubstitute("this is the other substitute", text); } @Persist public void persist() { throw new IllegalStateException("Simple substitute should never be written only read"); } } private static class OtherSubstitute extends Substitute { @Attribute public String name; public OtherSubstitute() { super(); } public OtherSubstitute(String name, String text) { this.text = text; this.name = name; } } private static class YetAnotherSubstitute extends Substitute { public YetAnotherSubstitute() { super(); } @Validate public void validate() { return; } @Resolve public Substitute resolve() { return new LargeSubstitute(text, "John Doe", "Sesame Street", "Metropilis"); } } private static class LargeSubstitute extends Substitute { @Attribute private String name; @Attribute private String street; @Attribute private String city; public LargeSubstitute() { super(); } public LargeSubstitute(String text, String name, String street, String city) { this.name = name; this.street = street; this.city = city; this.text = text; } } private Persister serializer; public void setUp() { serializer = new Persister(); } public void testReplace() throws Exception { SubstituteExample example = serializer.read(SubstituteExample.class, REPLACE_SOURCE); assertEquals(example.substitute.getClass(), SimpleSubstitute.class); assertEquals(example.substitute.text, "some example text"); validate(example, serializer); StringWriter out = new StringWriter(); serializer.write(example, out); String text = out.toString(); example = serializer.read(SubstituteExample.class, text); assertEquals(example.substitute.getClass(), OtherSubstitute.class); assertEquals(example.substitute.text, "some example text"); validate(example, serializer); } public void testResolve() throws Exception { SubstituteExample example = serializer.read(SubstituteExample.class, RESOLVE_SOURCE); assertEquals(example.substitute.getClass(), LargeSubstitute.class); assertEquals(example.substitute.text, "some example text"); validate(example, serializer); StringWriter out = new StringWriter(); serializer.write(example, out); String text = out.toString(); example = serializer.read(SubstituteExample.class, text); assertEquals(example.substitute.getClass(), LargeSubstitute.class); assertEquals(example.substitute.text, "some example text"); validate(example, serializer); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/OrderTest.java0000644000175000017500000000543611342530527026553 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import java.io.StringWriter; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.Map; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Element; import org.simpleframework.xml.Order; import org.simpleframework.xml.Root; import org.simpleframework.xml.Serializer; import org.simpleframework.xml.ValidationTestCase; import org.simpleframework.xml.core.Persister; public class OrderTest extends ValidationTestCase { @Root @Order(elements={"first", "second", "third", "fourth"}, attributes={"one", "two", "three"}) private static class OrderExample { @Attribute private int one; @Attribute private double two; @Attribute private long three; @Element private String first; @Element private String fourth; @Element private String second; @Element private String third; public OrderExample() { super(); } public OrderExample(String first, String second, String third, String fourth, long one, int two, double three) { this.first = first; this.second = second; this.third = third; this.fourth = fourth; this.three = one; this.one = two; this.two = three; } } public void testLinkedHashMapOrder() { Map map = new LinkedHashMap(); map.put("first", null); map.put("second", null); map.put("third", null); map.put("fourth", null); map.put("third", "third"); map.put("fourth", "fourth"); map.put("first", "first"); map.put("second", "second"); Iterator values = map.values().iterator(); assertEquals("first", values.next()); assertEquals("second", values.next()); assertEquals("third", values.next()); assertEquals("fourth", values.next()); } public void testSerializationOrder() throws Exception { Serializer serializer = new Persister(); OrderExample example = new OrderExample("first", "second", "third", "fourth", 1, 2, 3.0); StringWriter writer = new StringWriter(); serializer.write(example, writer); validate(example, serializer); String text = writer.toString(); assertTrue(text.indexOf("first") < text.indexOf("second")); assertTrue(text.indexOf("second") < text.indexOf("third")); assertTrue(text.indexOf("third") < text.indexOf("fourth")); assertTrue(text.indexOf("one") < text.indexOf("two")); assertTrue(text.indexOf("two") < text.indexOf("three")); example = new OrderExample("1st", "2nd", "3rd", "4th", 10, 20, 30.0); validate(example, serializer); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/ErasureReflectorTest.java0000644000175000017500000002125711342530530030745 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import java.lang.reflect.Constructor; import java.lang.reflect.Field; import java.lang.reflect.Method; import java.util.Collection; import java.util.Map; import org.simpleframework.xml.ValidationTestCase; public class ErasureReflectorTest extends ValidationTestCase { private static class MapErasure { public static Field getField(String name) throws Exception { return MapErasure.class.getField(name); } public static Method getMethod(String name) throws Exception { if(name.startsWith("set")) { return MapErasure.class.getMethod(name, Map.class); } return MapErasure.class.getMethod(name); } public static Constructor getConstructor() throws Exception { return MapErasure.class.getDeclaredConstructors()[0]; } private Map erasedToErased; private Map erasedToString; private Map stringToErased; private Map stringToString; public MapErasure( Map erasedToErased, Map erasedToString, Map stringToErased, Map stringToString) { } public Map getErasedToErased() { return erasedToErased; } public Map getErasedToString() { return erasedToString; } public Map getStringToErased() { return stringToErased; } public Map getStringToString() { return stringToString; } public void setErasedToErased(Map erasedToErased) { this.erasedToErased = erasedToErased; } public void setErasedToString(Map erasedToString) { this.erasedToString = erasedToString; } public void setStringToErased(Map stringToErased) { this.stringToErased = stringToErased; } public void setStringToString(Map stringToString) { this.stringToString = stringToString; } } private static class CollectionErasure { public static Field getField(String name) throws Exception { return CollectionErasure.class.getField(name); } public static Method getMethod(String name) throws Exception { if(name.startsWith("set")) { return CollectionErasure.class.getMethod(name, Collection.class); } return CollectionErasure.class.getMethod(name); } public static Constructor getConstructor() throws Exception { return CollectionErasure.class.getDeclaredConstructors()[0]; } private Collection erased; private Collection string; public CollectionErasure( Collection erased, Collection string) { } public Collection getErased() { return erased; } public Collection getString() { return string; } public void setErased(Collection erased) { this.erased = erased; } public void setString(Collection string) { this.string = string; } } public void tesFieldReflection() throws Exception { assertEquals(Object.class, Reflector.getDependent(CollectionErasure.getField("erased"))); assertEquals(String.class, Reflector.getDependent(CollectionErasure.getField("string"))); assertEquals(Object.class, Reflector.getDependent(MapErasure.getField("erasedToErased"))); assertEquals(Object.class, Reflector.getDependent(MapErasure.getField("erasedToString"))); assertEquals(String.class, Reflector.getDependent(MapErasure.getField("stringToErased"))); assertEquals(String.class, Reflector.getDependent(MapErasure.getField("stringToString"))); assertEquals(Object.class, Reflector.getDependents(MapErasure.getField("erasedToErased"))[0]); assertEquals(Object.class, Reflector.getDependents(MapErasure.getField("erasedToString"))[0]); assertEquals(String.class, Reflector.getDependents(MapErasure.getField("stringToErased"))[0]); assertEquals(String.class, Reflector.getDependents(MapErasure.getField("stringToString"))[0]); assertEquals(Object.class, Reflector.getDependents(MapErasure.getField("erasedToErased"))[1]); assertEquals(String.class, Reflector.getDependents(MapErasure.getField("erasedToString"))[1]); assertEquals(Object.class, Reflector.getDependents(MapErasure.getField("stringToErased"))[1]); assertEquals(String.class, Reflector.getDependents(MapErasure.getField("stringToString"))[1]); } public void testMethodReflection() throws Exception { assertEquals(Object.class, Reflector.getReturnDependent(CollectionErasure.getMethod("getErased"))); assertEquals(String.class, Reflector.getReturnDependent(CollectionErasure.getMethod("getString"))); assertEquals(null, Reflector.getReturnDependent(CollectionErasure.getMethod("setErased"))); assertEquals(null, Reflector.getReturnDependent(CollectionErasure.getMethod("setString"))); assertEquals(Object.class, Reflector.getParameterDependent(CollectionErasure.getConstructor(), 0)); // Collection assertEquals(String.class, Reflector.getParameterDependent(CollectionErasure.getConstructor(), 1)); // Collection assertEquals(Object.class, Reflector.getParameterDependents(CollectionErasure.getConstructor(), 0)[0]); // Collection assertEquals(String.class, Reflector.getParameterDependents(CollectionErasure.getConstructor(), 1)[0]); // Collection assertEquals(Object.class, Reflector.getReturnDependent(MapErasure.getMethod("getErasedToErased"))); assertEquals(Object.class, Reflector.getReturnDependent(MapErasure.getMethod("getErasedToString"))); assertEquals(String.class, Reflector.getReturnDependent(MapErasure.getMethod("getStringToErased"))); assertEquals(String.class, Reflector.getReturnDependent(MapErasure.getMethod("getStringToString"))); assertEquals(null, Reflector.getReturnDependent(MapErasure.getMethod("setErasedToErased"))); assertEquals(null, Reflector.getReturnDependent(MapErasure.getMethod("setErasedToString"))); assertEquals(null, Reflector.getReturnDependent(MapErasure.getMethod("setStringToErased"))); assertEquals(null, Reflector.getReturnDependent(MapErasure.getMethod("setStringToString"))); assertEquals(Object.class, Reflector.getReturnDependents(MapErasure.getMethod("getErasedToErased"))[0]); assertEquals(Object.class, Reflector.getReturnDependents(MapErasure.getMethod("getErasedToString"))[0]); assertEquals(String.class, Reflector.getReturnDependents(MapErasure.getMethod("getStringToErased"))[0]); assertEquals(String.class, Reflector.getReturnDependents(MapErasure.getMethod("getStringToString"))[0]); assertEquals(Object.class, Reflector.getReturnDependents(MapErasure.getMethod("getErasedToErased"))[1]); assertEquals(String.class, Reflector.getReturnDependents(MapErasure.getMethod("getErasedToString"))[1]); assertEquals(Object.class, Reflector.getReturnDependents(MapErasure.getMethod("getStringToErased"))[1]); assertEquals(String.class, Reflector.getReturnDependents(MapErasure.getMethod("getStringToString"))[1]); assertEquals(Object.class, Reflector.getParameterDependent(MapErasure.getConstructor(), 0)); // Map assertEquals(Object.class, Reflector.getParameterDependent(MapErasure.getConstructor(), 1)); // Map assertEquals(String.class, Reflector.getParameterDependent(MapErasure.getConstructor(), 2)); // Map assertEquals(String.class, Reflector.getParameterDependent(MapErasure.getConstructor(), 3)); // Map assertEquals(Object.class, Reflector.getParameterDependents(MapErasure.getConstructor(), 0)[0]); // Map assertEquals(Object.class, Reflector.getParameterDependents(MapErasure.getConstructor(), 1)[0]); // Map assertEquals(String.class, Reflector.getParameterDependents(MapErasure.getConstructor(), 2)[0]); // Map assertEquals(String.class, Reflector.getParameterDependents(MapErasure.getConstructor(), 3)[0]); // Map assertEquals(Object.class, Reflector.getParameterDependents(MapErasure.getConstructor(), 0)[1]); // Map assertEquals(String.class, Reflector.getParameterDependents(MapErasure.getConstructor(), 1)[1]); // Map assertEquals(Object.class, Reflector.getParameterDependents(MapErasure.getConstructor(), 2)[1]); // Map assertEquals(String.class, Reflector.getParameterDependents(MapErasure.getConstructor(), 3)[1]); // Map } } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/TutorialTest.java0000644000175000017500000000763011342530530027273 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import java.util.ArrayList; import java.util.List; import junit.framework.TestCase; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Element; import org.simpleframework.xml.ElementList; import org.simpleframework.xml.Namespace; import org.simpleframework.xml.NamespaceList; import org.simpleframework.xml.Root; import org.simpleframework.xml.Text; public class TutorialTest extends TestCase { private static final String SOURCE = "\n"+ " Niall Gallagher\n"+ " niallg@users.sourceforge.net\n"+ " \n"+ " Stanford Press\n"+ " 2001\n"+ "
Palo Alto
\n"+ " 1st\n"+ " 0-69-697269-4\n"+ "
\n"+ "
\n"+ " First paragraph of document\n"+ " Second paragraph in the document\n"+ " Third and final paragraph\n"+ "
\n"+ "
\n"; @Root @Namespace(reference = "http://www.domain.com/document") public static class Document { @Element(name="author") @Namespace(prefix="user", reference="http://www.domain.com/user") private static final String AUTHOR = "Niall Gallagher"; @Element(name="contact") private static final String CONTACT = "niallg@users.sourceforge.net"; @Element(name="detail") private static final Detail DETAIL = new Detail( "Stanford Press", "2001", "Palo Alto", "1st", "0-69-697269-4"); @ElementList(inline=true) private List
list; @Attribute private String title; private Document() { super(); } public Document(String title) { this.list = new ArrayList
(); this.title = title; } public void add(Section section) { list.add(section); } } @Root @Namespace(reference="http://www.domain.com/detail") public static class Detail { @Element private String publisher; @Element private String date; @Element private String address; @Element private String edition; @Element private String ISBN; private Detail() { super(); } public Detail(String publisher, String date, String address, String edition, String ISBN) { this.publisher = publisher; this.address = address; this.edition = edition; this.date = date; this.ISBN = ISBN; } } @Root @NamespaceList({ @Namespace(prefix="para", reference="http://www.domain.com/paragraph")}) public static class Section { @Attribute private String name; @ElementList(inline = true) private List list; private Section() { super(); } public Section(String name) { this.list = new ArrayList(); this.name = name; } public void add(Paragraph paragraph) { list.add(paragraph); } } @Root @Namespace(reference = "http://www.domain.com/paragraph") public static class Paragraph { private String text; @Text private String getContent() { return text; } @Text public void setContent(String text) { this.text = text; } } public void testTutorial() throws Exception { Persister persister = new Persister(); Document document = persister.read(Document.class, SOURCE); persister.write(document,System.out); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/FieldScannerDefaultTest.java0000644000175000017500000001257211342530530031333 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; import junit.framework.TestCase; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Default; import org.simpleframework.xml.DefaultType; import org.simpleframework.xml.Element; import org.simpleframework.xml.ElementArray; import org.simpleframework.xml.ElementList; import org.simpleframework.xml.ElementMap; import org.simpleframework.xml.Root; import org.simpleframework.xml.Transient; public class FieldScannerDefaultTest extends TestCase { @Default(DefaultType.FIELD) private static class NoAnnotations { private String name; private int value; private Date date; private Locale locale; private int[] array; private List list; private Map map; } @Default(DefaultType.FIELD) private static class MixedAnnotations { private String name; private @Attribute int value; private @Transient Date date; private List list; } public void testMixedAnnotations() throws Exception { Map map = getContacts(MixedAnnotations.class, DefaultType.FIELD); assertEquals(map.size(), 3); assertFalse(map.get("name").isReadOnly()); assertFalse(map.get("value").isReadOnly()); assertFalse(map.get("list").isReadOnly()); assertEquals(String.class, map.get("name").getType()); assertEquals(int.class, map.get("value").getType()); assertEquals(List.class, map.get("list").getType()); assertEquals(Element.class, map.get("name").getAnnotation().annotationType()); assertEquals(Attribute.class, map.get("value").getAnnotation().annotationType()); assertEquals(ElementList.class, map.get("list").getAnnotation().annotationType()); assertEquals(Element.class, map.get("name").getAnnotation(Element.class).annotationType()); assertEquals(Attribute.class, map.get("value").getAnnotation(Attribute.class).annotationType()); assertEquals(ElementList.class, map.get("list").getAnnotation(ElementList.class).annotationType()); assertNull(map.get("name").getAnnotation(Root.class)); assertNull(map.get("value").getAnnotation(Root.class)); assertNull(map.get("list").getAnnotation(Root.class)); } public void testNoAnnotations() throws Exception { Map map = getContacts(NoAnnotations.class, DefaultType.FIELD); assertFalse(map.get("name").isReadOnly()); assertFalse(map.get("value").isReadOnly()); assertFalse(map.get("date").isReadOnly()); assertFalse(map.get("locale").isReadOnly()); assertFalse(map.get("array").isReadOnly()); assertFalse(map.get("list").isReadOnly()); assertFalse(map.get("map").isReadOnly()); assertEquals(String.class, map.get("name").getType()); assertEquals(int.class, map.get("value").getType()); assertEquals(Date.class, map.get("date").getType()); assertEquals(Locale.class, map.get("locale").getType()); assertEquals(int[].class, map.get("array").getType()); assertEquals(List.class, map.get("list").getType()); assertEquals(Map.class, map.get("map").getType()); assertEquals(Element.class, map.get("name").getAnnotation().annotationType()); assertEquals(Element.class, map.get("value").getAnnotation().annotationType()); assertEquals(Element.class, map.get("date").getAnnotation().annotationType()); assertEquals(Element.class, map.get("locale").getAnnotation().annotationType()); assertEquals(ElementArray.class, map.get("array").getAnnotation().annotationType()); assertEquals(ElementList.class, map.get("list").getAnnotation().annotationType()); assertEquals(ElementMap.class, map.get("map").getAnnotation().annotationType()); assertEquals(Element.class, map.get("name").getAnnotation(Element.class).annotationType()); assertEquals(Element.class, map.get("value").getAnnotation(Element.class).annotationType()); assertEquals(Element.class, map.get("date").getAnnotation(Element.class).annotationType()); assertEquals(Element.class, map.get("locale").getAnnotation(Element.class).annotationType()); assertEquals(ElementArray.class, map.get("array").getAnnotation(ElementArray.class).annotationType()); assertEquals(ElementList.class, map.get("list").getAnnotation(ElementList.class).annotationType()); assertEquals(ElementMap.class, map.get("map").getAnnotation(ElementMap.class).annotationType()); assertNull(map.get("name").getAnnotation(Root.class)); assertNull(map.get("value").getAnnotation(Root.class)); assertNull(map.get("date").getAnnotation(Root.class)); assertNull(map.get("locale").getAnnotation(Root.class)); assertNull(map.get("array").getAnnotation(Root.class)); assertNull(map.get("list").getAnnotation(Root.class)); assertNull(map.get("map").getAnnotation(Root.class)); } private static Map getContacts(Class type, DefaultType defaultType) throws Exception { FieldScanner scanner = new FieldScanner(type, defaultType); Map map = new HashMap(); for(Contact contact : scanner) { map.put(contact.getName(), contact); } return map; } } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/StrictTest.java0000644000175000017500000000702311342530527026742 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import org.simpleframework.xml.Element; import org.simpleframework.xml.ElementArray; import org.simpleframework.xml.Root; import org.simpleframework.xml.ValidationTestCase; import org.simpleframework.xml.core.Persister; public class StrictTest extends ValidationTestCase { private static final String SOURCE = "\n" + " \n" + " \n" + " value 1\n" + " \n" + " \n" + " value 2\n" + " \n" + " \n" + " value 3\n" + " \n" + " \n" + " \n" + " 123\n" + " \n" + " 12345\n" + " \n" + " \n" + ""; private static final String SIMPLE = "\n" + " 123\n" + " \n" + " 12345\n" + " \n" + " test\n"+ "\n"; private static final String SIMPLE_MISSING_NAME = "\n" + " 123\n" + " \n" + " 12345\n" + " \n" + "\n"; @Root(name="root", strict=false) private static class StrictExample { @ElementArray(name="list", entry="item") private StrictEntry[] list; @Element(name="object") private StrictObject object; } @Root(name="entry", strict=false) private static class StrictEntry { @Element(name="value") private String value; } @Root(strict=false) private static class StrictObject { @Element(name="integer") private int integer; } @Root(name="object", strict=false) private static class NamedStrictObject extends StrictObject { @Element(name="name") private String name; } private Persister persister; public void setUp() throws Exception { persister = new Persister(); } public void testStrict() throws Exception { StrictExample example = persister.read(StrictExample.class, SOURCE); assertEquals(example.list.length, 3); assertEquals(example.list[0].value, "value 1"); assertEquals(example.list[1].value, "value 2"); assertEquals(example.list[2].value, "value 3"); assertEquals(example.object.integer, 123); validate(example, persister); } //public void testUnnamedStrict() throws Exception { // boolean success = false; // // try { // persister.read(StrictObject.class, SIMPLE); // } catch(RootException e) { // success = true; // } // assertTrue(success); //} public void testNamedStrict() throws Exception { StrictObject object = persister.read(NamedStrictObject.class, SIMPLE); assertEquals(object.integer, 123); validate(object, persister); } public void testNamedStrictMissingName() throws Exception { boolean failure = false; try { StrictObject object = persister.read(NamedStrictObject.class, SIMPLE_MISSING_NAME); assertNotNull(object); }catch(Exception e) { e.printStackTrace(); failure = true; } assertTrue("Did not fail", failure); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/MultiThreadedPersisterTest.java0000644000175000017500000000551311342530530032122 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import java.io.StringWriter; import java.util.Date; import java.util.Locale; import java.util.Queue; import java.util.concurrent.BlockingQueue; import java.util.concurrent.CountDownLatch; import java.util.concurrent.LinkedBlockingQueue; import junit.framework.Assert; import junit.framework.TestCase; import org.simpleframework.xml.Default; import org.simpleframework.xml.Root; import org.simpleframework.xml.Serializer; public class MultiThreadedPersisterTest extends TestCase { @Root @Default private static class Example { private String name; private String value; private int number; private Date date; private Locale locale; } private static enum Status { ERROR, SUCCESS } private static class Worker extends Thread { private final CountDownLatch latch; private final Serializer serializer; private final Queue queue; private final Example example; public Worker(CountDownLatch latch, Serializer serializer, Queue queue, Example example) { this.serializer = serializer; this.example = example; this.latch = latch; this.queue = queue; } public void run() { try { latch.countDown(); latch.await(); for(int i = 0; i < 100; i++) { StringWriter writer = new StringWriter(); serializer.write(example, writer); String text = writer.toString(); Example copy = serializer.read(Example.class, text); Assert.assertEquals(example.name, copy.name); Assert.assertEquals(example.value, copy.value); Assert.assertEquals(example.number, copy.number); Assert.assertEquals(example.date, copy.date); Assert.assertEquals(example.locale, copy.locale); System.out.println(text); } queue.offer(Status.SUCCESS); }catch(Exception e) { e.printStackTrace(); queue.offer(Status.ERROR); } } } public void testConcurrency() throws Exception { Persister persister = new Persister(); CountDownLatch latch = new CountDownLatch(20); BlockingQueue status = new LinkedBlockingQueue(); Example example = new Example(); example.name = "Eample Name"; example.value = "Some Value"; example.number = 10; example.date = new Date(); example.locale = Locale.UK; for(int i = 0; i < 20; i++) { Worker worker = new Worker(latch, persister, status, example); worker.start(); } for(int i = 0; i < 20; i++) { assertEquals("Serialization fails when used concurrently", status.take(), Status.SUCCESS); } } } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/InlineMapTest.java0000644000175000017500000000517411342530527027353 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import java.math.BigDecimal; import java.util.HashMap; import java.util.Map; import org.simpleframework.xml.ElementMap; import org.simpleframework.xml.Root; import org.simpleframework.xml.Serializer; import org.simpleframework.xml.ValidationTestCase; import org.simpleframework.xml.core.Persister; public class InlineMapTest extends ValidationTestCase { @Root private static class PrimitiveInlineMap { @ElementMap(entry="entity", inline=true) private Map map; public PrimitiveInlineMap() { this.map = new HashMap(); } public BigDecimal getValue(String name) { return map.get(name); } } @Root private static class PrimitiveInlineAttributeMap { @ElementMap(entry="entity", attribute=true, inline=true) private Map map; public PrimitiveInlineAttributeMap() { this.map = new HashMap(); } public BigDecimal getValue(String name) { return map.get(name); } } @Root private static class PrimitiveInlineAttributeValueMap { @ElementMap(entry="entity", value="value", attribute=true, inline=true) private Map map; public PrimitiveInlineAttributeValueMap() { this.map = new HashMap(); } public BigDecimal getValue(String name) { return map.get(name); } } public void testPrimitiveMap() throws Exception { PrimitiveInlineMap map = new PrimitiveInlineMap(); Serializer serializer = new Persister(); map.map.put("a", new BigDecimal(1.1)); map.map.put("b", new BigDecimal(2.2)); validate(map, serializer); } public void testPrimitiveAttributeMap() throws Exception { PrimitiveInlineAttributeMap map = new PrimitiveInlineAttributeMap(); Serializer serializer = new Persister(); map.map.put("a", new BigDecimal(1.1)); map.map.put("b", null); map.map.put("c", new BigDecimal(2.2)); map.map.put("d", null); validate(map, serializer); } public void testPrimitiveAttributeValueMap() throws Exception { PrimitiveInlineAttributeValueMap map = new PrimitiveInlineAttributeValueMap(); Serializer serializer = new Persister(); map.map.put("a", new BigDecimal(1.1)); map.map.put("b", new BigDecimal(2.2)); map.map.put(null, new BigDecimal(3.3)); map.map.put("d", null); validate(map, serializer); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/ConversionTest.java0000644000175000017500000001653211342530527027624 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import java.io.StringWriter; import java.util.HashMap; import java.util.Map; import org.simpleframework.xml.ElementList; import org.simpleframework.xml.Root; import org.simpleframework.xml.ValidationTestCase; import org.simpleframework.xml.strategy.Type; import org.simpleframework.xml.strategy.Strategy; import org.simpleframework.xml.strategy.TreeStrategy; import org.simpleframework.xml.strategy.Value; import org.simpleframework.xml.stream.InputNode; import org.simpleframework.xml.stream.NodeMap; import org.simpleframework.xml.stream.OutputNode; import org.simpleframework.xml.util.Dictionary; public class ConversionTest extends ValidationTestCase { public static interface Converter { public T read(InputNode node) throws Exception; public void write(OutputNode node, T value) throws Exception; } public static class Registry { private final Map registry; public Registry() { this.registry = new HashMap(); } public Converter resolve(Class type) throws Exception{ Class converter = registry.get(type); if(converter != null){ return (Converter)converter.newInstance(); } return null; } public void register(Class type, Class converter) { registry.put(type, converter); } } public static class Interceptor implements Strategy { private final Registry registry; private final Strategy strategy; public Interceptor(Strategy strategy, Registry registry){ this.registry = registry; this.strategy = strategy; } public Value read(Type field, NodeMap node, Map map) throws Exception { Value value = strategy.read(field, node, map); Class type = value == null ? field.getType() : value.getType(); Converter converter = registry.resolve(type); if(converter != null) { InputNode source = node.getNode(); Object data = converter.read(source); return new Wrapper(value, data); } return value; } public boolean write(Type field, Object value, NodeMap node, Map map) throws Exception { boolean reference = strategy.write(field, value, node, map); if(!reference) { Class type = value.getClass(); Converter converter = registry.resolve(type); OutputNode source = node.getNode(); if(converter != null) { converter.write(source, value); return true; } return false; } return reference; } } public static class Wrapper implements Value { private Value value; private Object data; public Wrapper(Value value, Object data){ this.value = value; this.data = data; } public int getLength() { return value.getLength(); } public Class getType() { return value.getType(); } public Object getValue() { return data; } public boolean isReference() { return true; } public void setValue(Object data) { this.data = data; } } public static class Pet implements org.simpleframework.xml.util.Entry{ private final String name; private final int age; public Pet(String name, int age){ this.name = name; this.age = age; } public String getName() { return name; } public int getAge(){ return age; } } public static class Cat extends Pet{ public Cat(String name, int age) { super(name, age); } } public static class Dog extends Pet{ public Dog(String name, int age) { super(name, age); } } /** * This will serialize a cat object into a custom XML format * without the use of annotations to transform the object. * It looks like the following. * * Kitty * 2 * */ public static class CatConverter implements Converter{ private static final String ELEMENT_NAME = "name"; private static final String ELEMENT_AGE = "age"; public Cat read(InputNode source) throws Exception{ int age = 0; String name = null; while(true) { InputNode node = source.getNext(); if(node == null) { break; }else if(node.getName().equals(ELEMENT_NAME)) { name = node.getValue(); }else if(node.getName().equals(ELEMENT_AGE)){ age = Integer.parseInt(node.getValue().trim()); } } return new Cat(name, age); } public void write(OutputNode node, Cat cat)throws Exception { OutputNode name = node.getChild(ELEMENT_NAME); name.setValue(cat.getName()); OutputNode age = node.getChild(ELEMENT_AGE); age.setValue(String.valueOf(cat.getAge())); } } /** * This will serialize a dog into a custom XML format without * the need for annotations. * */ public static class DogConverter implements Converter{ private static final String ELEMENT_NAME = "name"; private static final String ELEMENT_AGE = "age"; public Dog read(InputNode node) throws Exception{ String name = node.getAttribute(ELEMENT_NAME).getValue(); String age = node.getAttribute(ELEMENT_AGE).getValue(); return new Dog(name, Integer.parseInt(age)); } public void write(OutputNode node, Dog dog)throws Exception { node.setAttribute(ELEMENT_NAME, dog.getName()); node.setAttribute(ELEMENT_AGE, String.valueOf(dog.getAge())); } } @Root private static class PetShop { private @ElementList Dictionary pets; public PetShop(){ this.pets = new Dictionary(); } public void addPet(Pet pet) { pets.add(pet); } public Pet getPet(String name){ return pets.get(name); } } public void testConverter() throws Exception { Registry registry = new Registry(); Strategy strategy = new TreeStrategy(); Strategy interceptor = new Interceptor(strategy, registry); Persister persister = new Persister(interceptor); StringWriter writer = new StringWriter(); PetShop shop = new PetShop(); registry.register(Dog.class, DogConverter.class); registry.register(Cat.class, CatConverter.class); shop.addPet(new Dog("Lassie", 10)); shop.addPet(new Cat("Kitty", 2)); persister.write(shop, writer); persister.write(shop, System.out); String text = writer.toString(); PetShop newShop = persister.read(PetShop.class, text); assertEquals("Lassie", newShop.getPet("Lassie").getName()); assertEquals(10, newShop.getPet("Lassie").getAge()); assertEquals("Kitty", newShop.getPet("Kitty").getName()); assertEquals(2, newShop.getPet("Kitty").getAge()); assertXpathExists("/petShop/pets/pet[@name='Lassie']", text); assertXpathExists("/petShop/pets/pet[@age='10']", text); assertXpathExists("/petShop/pets/pet/name", text); assertXpathExists("/petShop/pets/pet/age", text); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/PerformanceTest.java0000644000175000017500000002117111342530530027725 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import java.io.StringWriter; import java.util.Collection; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Element; import org.simpleframework.xml.ElementList; import org.simpleframework.xml.Root; import org.simpleframework.xml.core.Persister; import org.simpleframework.xml.filter.Filter; import org.simpleframework.xml.ValidationTestCase; public class PerformanceTest extends ValidationTestCase { public static final int ITERATIONS = 10000; public static final int MAXIMUM = 1000; public static final String BASIC_ENTRY = "\n"+ "\n"+ " {example.name} \n\r"+ " {example.path}\n"+ " {no.override}\n"+ " \n"+ " Some example text where {example.name} is replaced\n"+ " with the system property value and the path is\n"+ " replaced with the path {example.path}\n"+ " \n"+ " \n"+ " this is the first element\n"+ " the second element\n"+ " the third elment\n"+ " \n"+ " \n"+ " value.1\n"+ " \n"+ " \n"+ " value.2\n"+ " \n"+ " \n"+ " \n"+ " \n"+ " \n"+ " value.1\n"+ " \n"+ " \n"+ " value.2\n"+ " \n"+ " \n"+ " value.4\n"+ " \n"+ " \n"+ " value.4\n"+ " \n"+ " \n"+ " value.5\n"+ " \n"+ " \n"+ ""; public static final String TEMPLATE_ENTRY = "\n"+ "\n"+ " ${example.name} \n\r"+ " ${example.path}\n"+ " ${no.override}\n"+ " \n"+ " Some example text where ${example.name} is replaced\n"+ " with the system property value and the path is \n"+ " replaced with the path ${example.path}\n"+ " \n"+ " \n"+ " this is the first element\n"+ " the second element\n"+ " the third elment\n"+ " \n"+ " \n"+ " value.1\n"+ " \n"+ " \n"+ " value.2\n"+ " \n"+ " \n"+ " \n"+ " \n"+ " \n"+ " value.1\n"+ " \n"+ " \n"+ " value.2\n"+ " \n"+ " \n"+ " value.4\n"+ " \n"+ " \n"+ " value.4\n"+ " \n"+ " \n"+ " value.5\n"+ " \n"+ " \n"+ ""; @Root(name="root") public static class RootEntry { @Attribute(name="number") private int number; @Attribute(name="flag") private boolean bool; @Element(name="constant") private String constant; @Element(name="name") private String name; @Element(name="path") private String path; @Element(name="text") private String text; @Element(name="child") private ChildEntry entry; @ElementList(name="list", type=ElementEntry.class) private Collection list; } @Root(name="child") public static class ChildEntry { @Attribute(name="name") private String name; @Element(name="one") private String one; @Element(name="two") private String two; @Element(name="three") private String three; @Element(name="grand-child") private GrandChildEntry grandChild; } @Root(name="grand-child") public static class GrandChildEntry { @Element(name="entry-one") private ElementEntry entryOne; @Element(name="entry-two") private ElementEntry entryTwo; } @Root(name="entry") public static class ElementEntry { @Attribute(name="key") private String name; @Element(name="value") private String value; } private static class EmptyFilter implements Filter { public String replace(String name) { return null; } } static { System.setProperty("example.name", "some name"); System.setProperty("example.path", "/some/path"); System.setProperty("no.override", "some constant"); } private Persister systemSerializer; public void setUp() throws Exception { systemSerializer = new Persister(); } public void testBasicDocument() throws Exception { RootEntry entry = (RootEntry)systemSerializer.read(RootEntry.class, BASIC_ENTRY); long start = System.currentTimeMillis(); for(int i = 0; i < ITERATIONS; i++) { systemSerializer.read(RootEntry.class, BASIC_ENTRY); } long duration = System.currentTimeMillis() - start; System.err.printf("Took '%s' ms to process %s documents\n", duration, ITERATIONS); systemSerializer.write(entry, System.out); StringWriter out = new StringWriter(); systemSerializer.write(entry, out); validate(entry, systemSerializer); entry = (RootEntry)systemSerializer.read(RootEntry.class, out.toString()); systemSerializer.write(entry, System.out); } public void testTemplateDocument() throws Exception { RootEntry entry = (RootEntry)systemSerializer.read(RootEntry.class, TEMPLATE_ENTRY); long start = System.currentTimeMillis(); for(int i = 0; i < ITERATIONS; i++) { systemSerializer.read(RootEntry.class, TEMPLATE_ENTRY); } long duration = System.currentTimeMillis() - start; System.err.printf("Took '%s' ms to process %s documents with templates\n", duration, ITERATIONS); systemSerializer.write(entry, System.out); StringWriter out = new StringWriter(); systemSerializer.write(entry, out); validate(entry, systemSerializer); entry = (RootEntry)systemSerializer.read(RootEntry.class, out.toString()); systemSerializer.write(entry, System.out); } public void testEmptyFilter() throws Exception { systemSerializer = new Persister(new EmptyFilter()); RootEntry entry = (RootEntry)systemSerializer.read(RootEntry.class, TEMPLATE_ENTRY); long start = System.currentTimeMillis(); for(int i = 0; i < ITERATIONS; i++) { systemSerializer.read(RootEntry.class, TEMPLATE_ENTRY); } long duration = System.currentTimeMillis() - start; System.err.printf("Took '%s' ms to process %s documents with an empty filter\n", duration, ITERATIONS); systemSerializer.write(entry, System.out); StringWriter out = new StringWriter(); systemSerializer.write(entry, out); validate(entry, systemSerializer); entry = (RootEntry)systemSerializer.read(RootEntry.class, out.toString()); systemSerializer.write(entry, System.out); } public void testBasicWrite() throws Exception { RootEntry entry = (RootEntry)systemSerializer.read(RootEntry.class, BASIC_ENTRY); long start = System.currentTimeMillis(); entry.constant = ">><<"; // this should be escaped entry.text = "this is text>> some more<<"; // this should be escaped for(int i = 0; i < ITERATIONS; i++) { systemSerializer.write(entry, new StringWriter()); } long duration = System.currentTimeMillis() - start; System.err.printf("Took '%s' ms to write %s documents\n", duration, ITERATIONS); systemSerializer.write(entry, System.out); StringWriter out = new StringWriter(); systemSerializer.write(entry, out); validate(entry, systemSerializer); entry = (RootEntry)systemSerializer.read(RootEntry.class, out.toString()); systemSerializer.write(entry, System.out); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/ScannerTest.java0000644000175000017500000001307211342530530027056 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import java.util.ArrayList; import java.util.Collection; import junit.framework.TestCase; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Element; import org.simpleframework.xml.ElementList; import org.simpleframework.xml.Root; import org.simpleframework.xml.Text; import org.simpleframework.xml.strategy.Strategy; import org.simpleframework.xml.strategy.TreeStrategy; import org.simpleframework.xml.stream.Style; public class ScannerTest extends TestCase { @Root(name="name") public static class Example { @ElementList(name="list", type=Entry.class) private Collection list; @Attribute(name="version") private int version; @Attribute(name="name") private String name; } @Root(name="entry") public static class Entry { @Attribute(name="text") public String text; } @Root(name="name", strict=false) public static class MixedExample extends Example { private Entry entry; private String text; @Element(name="entry", required=false) public void setEntry(Entry entry) { this.entry = entry; } @Element(name="entry", required=false) public Entry getEntry() { return entry; } @Element(name="text") public void setText(String text) { this.text = text; } @Element(name="text") public String getText() { return text; } } public static class DuplicateAttributeExample extends Example { private String name; @Attribute(name="name") public void setName(String name) { this.name = name; } @Attribute(name="name") public String getName() { return name; } } public static class NonMatchingElementExample { private String name; @Element(name="name", required=false) public void setName(String name) { this.name = name; } @Element(name="name") public String getName() { return name; } } public static class IllegalTextExample extends MixedExample { @Text private String text; } public void testExample() throws Exception { Support context = new Support(); Strategy strategy = new TreeStrategy(); Style style = new DefaultStyle(); Source source = new Source(strategy, context, style); Scanner scanner = new Scanner(Example.class); ArrayList types = new ArrayList(); assertEquals(scanner.getElements(source).size(), 1); assertEquals(scanner.getAttributes(source).size(), 2); assertNull(scanner.getText()); assertTrue(scanner.isStrict()); for(Label label : scanner.getElements(source)) { assertTrue(label.getName() == intern(label.getName())); assertTrue(label.getEntry() == intern(label.getEntry())); types.add(label.getType()); } assertTrue(types.contains(Collection.class)); for(Label label : scanner.getAttributes(source)) { assertTrue(label.getName() == intern(label.getName())); assertTrue(label.getEntry() == intern(label.getEntry())); types.add(label.getType()); } assertTrue(types.contains(int.class)); assertTrue(types.contains(String.class)); } public void testMixedExample() throws Exception { Support context = new Support(); Strategy strategy = new TreeStrategy(); Style style = new DefaultStyle(); Source source = new Source(strategy, context, style); Scanner scanner = new Scanner(MixedExample.class); ArrayList types = new ArrayList(); assertEquals(scanner.getElements(source).size(), 3); assertEquals(scanner.getAttributes(source).size(), 2); assertNull(scanner.getText()); assertFalse(scanner.isStrict()); for(Label label : scanner.getElements(source)) { assertTrue(label.getName() == intern(label.getName())); assertTrue(label.getEntry() == intern(label.getEntry())); types.add(label.getType()); } assertTrue(types.contains(Collection.class)); assertTrue(types.contains(Entry.class)); assertTrue(types.contains(String.class)); for(Label label : scanner.getAttributes(source)) { assertTrue(label.getName() == intern(label.getName())); assertTrue(label.getEntry() == intern(label.getEntry())); types.add(label.getType()); } assertTrue(types.contains(int.class)); assertTrue(types.contains(String.class)); } public void testDuplicateAttribute() { boolean success = false; try { new Scanner(DuplicateAttributeExample.class); } catch(Exception e) { success = true; } assertTrue(success); } public void testNonMatchingElement() { boolean success = false; try { new Scanner(NonMatchingElementExample.class); } catch(Exception e) { success = true; } assertTrue(success); } public void testIllegalTextExample() { boolean success = false; try { new Scanner(IllegalTextExample.class); } catch(Exception e) { success = true; } assertTrue(success); } private static String intern(String text) { if(text != null) { return text.intern(); } return null; } } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/InlineTest.java0000644000175000017500000001367211342530530026711 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import java.io.StringWriter; import java.util.ArrayList; import java.util.List; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Element; import org.simpleframework.xml.ElementList; import org.simpleframework.xml.Root; import org.simpleframework.xml.Text; import org.simpleframework.xml.core.Persister; import org.simpleframework.xml.ValidationTestCase; public class InlineTest extends ValidationTestCase { private static final String INLINE_LIST = "\n"+ " Some example message\r\n"+ " Example 1\r\n"+ " Example 2\r\n"+ " Example 3\r\n"+ ""; private static final String INLINE_PRIMITIVE_LIST = "\n"+ " Some example message\r\n"+ " Example 1\r\n"+ " Example 2\r\n"+ " Example 3\r\n"+ ""; @Root(name="test") private static class InlineTextList { @Element private String message; @ElementList(inline=true) private List list; @Attribute private Version version; public TextEntry get(int index) { return list.get(index); } } @Root(name="test") private static class InlinePrimitiveList { @Element private String message; @ElementList(inline=true) private List list; @Attribute private Version version; public String get(int index) { return list.get(index); } } @Root(name="text") private static class TextEntry { @Attribute private String name; @Attribute private Version version; @Text private String text; } @Root private static class SimpleInlineList { @ElementList(inline=true) private ArrayList list = new ArrayList(); } @Root private static class SimpleEntry { @Attribute private String content; } @Root private static class SimplePrimitiveInlineList { @ElementList(inline=true) private ArrayList list = new ArrayList(); } @Root private static class SimpleNameInlineList { @ElementList(inline=true, entry="item") private ArrayList list = new ArrayList(); } private static enum Version { ONE, TWO, THREE } private Persister persister; public void setUp() throws Exception { persister = new Persister(); } public void testList() throws Exception { InlineTextList list = persister.read(InlineTextList.class, INLINE_LIST); assertEquals(list.version, Version.ONE); assertEquals(list.message, "Some example message"); assertEquals(list.get(0).version, Version.ONE); assertEquals(list.get(0).name, "a"); assertEquals(list.get(0).text, "Example 1"); assertEquals(list.get(1).version, Version.TWO); assertEquals(list.get(1).name, "b"); assertEquals(list.get(1).text, "Example 2"); assertEquals(list.get(2).version, Version.THREE); assertEquals(list.get(2).name, "c"); assertEquals(list.get(2).text, "Example 3"); StringWriter buffer = new StringWriter(); persister.write(list, buffer); validate(list, persister); list = persister.read(InlineTextList.class, buffer.toString()); assertEquals(list.version, Version.ONE); assertEquals(list.message, "Some example message"); assertEquals(list.get(0).version, Version.ONE); assertEquals(list.get(0).name, "a"); assertEquals(list.get(0).text, "Example 1"); assertEquals(list.get(1).version, Version.TWO); assertEquals(list.get(1).name, "b"); assertEquals(list.get(1).text, "Example 2"); assertEquals(list.get(2).version, Version.THREE); assertEquals(list.get(2).name, "c"); assertEquals(list.get(2).text, "Example 3"); validate(list, persister); } public void testPrimitiveList() throws Exception { InlinePrimitiveList list = persister.read(InlinePrimitiveList.class, INLINE_PRIMITIVE_LIST); assertEquals(list.version, Version.ONE); assertEquals(list.message, "Some example message"); assertEquals(list.get(0), "Example 1"); assertEquals(list.get(1), "Example 2"); assertEquals(list.get(2), "Example 3"); StringWriter buffer = new StringWriter(); persister.write(list, buffer); validate(list, persister); list = persister.read(InlinePrimitiveList.class, buffer.toString()); assertEquals(list.get(0), "Example 1"); assertEquals(list.get(1), "Example 2"); assertEquals(list.get(2), "Example 3"); validate(list, persister); } public void testSimpleList() throws Exception{ SimpleInlineList list = new SimpleInlineList(); for(int i = 0; i < 10; i++) { SimpleEntry entry = new SimpleEntry(); entry.content = String.format("test %s", i); list.list.add(entry); } validate(list, persister); } public void testSimpleNameList() throws Exception{ SimpleNameInlineList list = new SimpleNameInlineList(); for(int i = 0; i < 10; i++) { SimpleEntry entry = new SimpleEntry(); entry.content = String.format("test %s", i); list.list.add(entry); } validate(list, persister); } public void testSimplePrimitiveList() throws Exception{ SimplePrimitiveInlineList list = new SimplePrimitiveInlineList(); list.list.add("test"); validate(list, persister); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/InlineListWithDataTest.java0000644000175000017500000000510711342530530031165 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import java.io.StringWriter; import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import org.simpleframework.xml.ElementList; import org.simpleframework.xml.ElementMap; import org.simpleframework.xml.Root; import org.simpleframework.xml.ValidationTestCase; public class InlineListWithDataTest extends ValidationTestCase { @Root private static class ListWithDataExample { private @ElementList(inline=true, data=true) List list; public ListWithDataExample(){ this.list = new ArrayList(); } public void addValue(String value) { list.add(value); } public List getList() { return list; } } @Root private static class MapWithDataExample { private @ElementMap(inline=true, data=true, attribute=true) Map map; public MapWithDataExample(){ this.map = new LinkedHashMap(); } public void putValue(String name, String value) { map.put(name, value); } public Map getList() { return map; } } public void testListWithData() throws Exception { Persister persister = new Persister(); ListWithDataExample example = new ListWithDataExample(); StringWriter writer = new StringWriter(); example.addValue("A"); example.addValue("B"); example.addValue("C"); persister.write(example, writer); String text = writer.toString(); System.out.println(text); assertElementHasCDATA(text, "/listWithDataExample/string[0]", "A"); assertElementHasCDATA(text, "/listWithDataExample/string[1]", "B"); assertElementHasCDATA(text, "/listWithDataExample/string[2]", "C"); validate(example, persister); } public void testMapWithData() throws Exception { Persister persister = new Persister(); MapWithDataExample example = new MapWithDataExample(); StringWriter writer = new StringWriter(); example.putValue("A", "1"); example.putValue("B", "2"); example.putValue("C", "3"); persister.write(example, writer); String text = writer.toString(); System.out.println(text); assertElementHasCDATA(text, "/mapWithDataExample/entry[0]", "1"); assertElementHasCDATA(text, "/mapWithDataExample/entry[1]", "2"); assertElementHasCDATA(text, "/mapWithDataExample/entry[2]", "3"); validate(example, persister); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/NamespaceDecoratorTest.java0000644000175000017500000000461211342530530031224 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import java.io.StringWriter; import java.lang.annotation.Annotation; import org.simpleframework.xml.Namespace; import org.simpleframework.xml.ValidationTestCase; import org.simpleframework.xml.core.NamespaceDecorator; import org.simpleframework.xml.stream.NodeBuilder; import org.simpleframework.xml.stream.OutputNode; public class NamespaceDecoratorTest extends ValidationTestCase { private static class MockNamespace implements Namespace { private final String prefix; private final String reference; public MockNamespace(String prefix, String reference) { this.prefix = prefix; this.reference = reference; } public String reference() { return reference; } public String prefix() { return prefix; } public Class annotationType() { return Namespace.class; } } public void testQualifier() throws Exception { NamespaceDecorator global = new NamespaceDecorator(); NamespaceDecorator qualifier = new NamespaceDecorator(); NamespaceDecorator attribute = new NamespaceDecorator(); global.add(new MockNamespace("global", "http://www.domain.com/global")); qualifier.add(new MockNamespace("a", "http://www.domain.com/a")); qualifier.add(new MockNamespace("b", "http://www.domain.com/b")); qualifier.add(new MockNamespace("c", "http://www.domain.com/c")); attribute.add(new MockNamespace("d", "http://www.domain.com/d")); global.set(new MockNamespace("first", "http://www.domain.com/ignore")); qualifier.set(new MockNamespace("a", "http://www.domain.com/a")); attribute.set(new MockNamespace("b", "http://www.domain.com/b")); StringWriter out = new StringWriter(); OutputNode top = NodeBuilder.write(out); OutputNode root = top.getChild("root"); root.setAttribute("version", "1.0"); qualifier.decorate(root, global); OutputNode child = root.getChild("child"); child.setAttribute("name", "John Doe"); OutputNode name = child.getAttributes().get("name"); attribute.decorate(name); OutputNode grandChild = child.getChild("grandChild"); grandChild.setValue("this is the grand child"); root.commit(); validate(out.toString()); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/MapTest.java0000644000175000017500000004433311342530530026206 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import java.io.StringWriter; import java.math.BigDecimal; import java.util.HashMap; import java.util.Map; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Element; import org.simpleframework.xml.ElementMap; import org.simpleframework.xml.Root; import org.simpleframework.xml.Serializer; import org.simpleframework.xml.ValidationTestCase; import org.simpleframework.xml.core.Persister; public class MapTest extends ValidationTestCase { private static final String ENTRY_MAP = "\n"+ " \n"+ " " + " \n" + " a\n"+ " example 1\n"+ " " + " " + " " + " \n" + " b\n"+ " example 2\n"+ " " + " " + " " + " \n" + " c\n"+ " example 3\n"+ " " + " " + " " + " \n" + " d\n"+ " example 4\n"+ " " + " " + " \n"+ ""; private static final String STRING_MAP = "\n"+ " \n"+ " example 1\n" + " example 2\n" + " example 3\n" + " example 4\n" + " \n"+ ""; private static final String COMPLEX_VALUE_KEY_OVERRIDE_MAP = "\n"+ " \n"+ " " + " \n" + " name 1\n" + "
address 1
\n" + "
\n" + " \n" + " a\n"+ " example 1\n"+ " " + "
" + " " + " \n" + " name 2\n" + "
address 2
\n" + "
\n" + " \n" + " b\n"+ " example 2\n"+ " " + "
" + " " + " \n" + " name 3\n" + "
address 3
\n" + "
\n" + " \n" + " c\n"+ " example 3\n"+ " " + "
" + " " + " \n" + " name 4\n" + "
address 4
\n" + "
\n" + " \n" + " d\n"+ " example 4\n"+ " " + "
" + "
\n"+ "
"; private static final String COMPLEX_MAP = "\n"+ " \n"+ " " + " \n" + " name 1\n" + "
address 1
\n" + "
\n" + " \n" + " a\n"+ " example 1\n"+ " " + "
" + " " + " \n" + " name 2\n" + "
address 2
\n" + "
\n" + " \n" + " b\n"+ " example 2\n"+ " " + "
" + " " + " \n" + " name 3\n" + "
address 3
\n" + "
\n" + " \n" + " c\n"+ " example 3\n"+ " " + "
" + " " + " \n" + " name 4\n" + "
address 4
\n" + "
\n" + " \n" + " d\n"+ " example 4\n"+ " " + "
" + "
\n"+ "
"; private static final String PRIMITIVE_MAP = "\n"+ " \n"+ " \n" + " one\n" + " 1.0\n" + " \n"+ " " + " two\n" + " 2.0\n" + " \n"+ " " + " three\n" + " 3.0\n" + " \n"+ " " + " four\n" + " 4.0\n" + " \n"+ "
\n"+ "
"; private static final String PRIMITIVE_VALUE_OVERRIDE_MAP = "\n"+ " \n"+ " \n" + " one\n" + " 1.0\n" + " \n"+ " " + " two\n" + " 2.0\n" + " \n"+ " " + " three\n" + " 3.0\n" + " \n"+ " " + " four\n" + " 4.0\n" + " \n"+ " \n"+ ""; private static final String PRIMITIVE_VALUE_KEY_OVERRIDE_MAP = "\n"+ " \n"+ " \n" + " one\n" + " 1.0\n" + " \n"+ " " + " two\n" + " 2.0\n" + " \n"+ " " + " three\n" + " 3.0\n" + " \n"+ " " + " four\n" + " 4.0\n" + " \n"+ " \n"+ ""; private static final String PRIMITIVE_INLINE_MAP = "\n"+ " \n" + " one\n" + " 1.0\n" + " \n"+ " " + " two\n" + " 2.0\n" + " \n"+ " " + " three\n" + " 3.0\n" + " \n"+ " " + " four\n" + " 4.0\n" + " \n"+ ""; private static final String INDEX_EXAMPLE = "\r\n" + "\r\n" + " xyz\r\n" + " \r\n" + " foo,bar\r\n" + " a,b,c\r\n" + " \r\n" + " \r\n" + " \r\n" + " \r\n" + " TOKENIZED\r\n" + " false\r\n" + " true\r\n" + " \r\n" + " \r\n" + " \r\n" + " \r\n" + " TOKENIZED\r\n" + " false\r\n" + " true\r\n" + " \r\n" + " \r\n" + " \r\n" + "\r\n"; @Root(name="index", strict=false) public static class IndexConfig { @Attribute private String id; @Element private String database; @Element private Query query; @ElementMap(name="fields", entry="field", key="id", attribute=true, keyType=String.class, valueType=Lucene.class) private HashMap fields = new HashMap(); } @Root public static class Field { @Attribute private String id; @Element private Lucene lucene; } @Root(strict=false) public static class Lucene { @Element private String index; @Element private boolean store; @Element(name="default") private boolean flag; } @Root private static class Query { @Element private String[] columns; @Element private String[] tables; } @Root private static class EntryMap { @ElementMap(key="key", attribute=true) private Map map; public String getValue(String name) { return map.get(name).value; } } @Root private static class MapEntry { @Element private String name; @Element private String value; public MapEntry() { super(); } public MapEntry(String name, String value) { this.name = name; this.value = value; } } @Root private static class StringMap { @ElementMap(key="letter", attribute=true, data=true) private Map map; public String getValue(String name) { return map.get(name); } } @Root private static class ComplexMap { @ElementMap private Map map; public ComplexMap() { this.map = new HashMap(); } public String getValue(CompositeKey key) { return map.get(key).value; } } @Root private static class CompositeKey { @Element private String name; @Element private String address; public CompositeKey() { super(); } public CompositeKey(String name, String address) { this.name = name; this.address = address; } public int hashCode() { return name.hashCode() + address.hashCode(); } public boolean equals(Object item) { if(item instanceof CompositeKey) { CompositeKey other = (CompositeKey)item; return other.name.equals(name) && other.address.equals(address); } return false; } } @Root private static class PrimitiveMap { @ElementMap(name="table") private Map map; public PrimitiveMap() { this.map = new HashMap(); } public BigDecimal getValue(String name) { return map.get(name); } } @Root private static class PrimitiveValueOverrideMap { @ElementMap(value="decimal") private Map map; public BigDecimal getValue(String name) { return map.get(name); } } @Root private static class PrimitiveValueKeyOverrideMap { @ElementMap(value="decimal", key="text", entry="item") private Map map; public BigDecimal getValue(String name) { return map.get(name); } } @Root private static class ComplexValueKeyOverrideMap { @ElementMap(key="key", value="value", entry="item") private Map map; public ComplexValueKeyOverrideMap() { this.map = new HashMap(); } public String getValue(CompositeKey key) { return map.get(key).value; } } @Root private static class PrimitiveInlineMap { @ElementMap(entry="entity", inline=true) private Map map; public BigDecimal getValue(String name) { return map.get(name); } } public void testEntryMap() throws Exception { Serializer serializer = new Persister(); EntryMap example = serializer.read(EntryMap.class, ENTRY_MAP); assertEquals("example 1", example.getValue("a")); assertEquals("example 2", example.getValue("b")); assertEquals("example 3", example.getValue("c")); assertEquals("example 4", example.getValue("d")); validate(example, serializer); } public void testStringMap() throws Exception { Serializer serializer = new Persister(); StringMap example = serializer.read(StringMap.class, STRING_MAP); assertEquals("example 1", example.getValue("a")); assertEquals("example 2", example.getValue("b")); assertEquals("example 3", example.getValue("c")); assertEquals("example 4", example.getValue("d")); validate(example, serializer); } public void testComplexMap() throws Exception { Serializer serializer = new Persister(); ComplexMap example = serializer.read(ComplexMap.class, COMPLEX_MAP); assertEquals("example 1", example.getValue(new CompositeKey("name 1", "address 1"))); assertEquals("example 2", example.getValue(new CompositeKey("name 2", "address 2"))); assertEquals("example 3", example.getValue(new CompositeKey("name 3", "address 3"))); assertEquals("example 4", example.getValue(new CompositeKey("name 4", "address 4"))); validate(example, serializer); } public void testPrimitiveMap() throws Exception { Serializer serializer = new Persister(); PrimitiveMap example = serializer.read(PrimitiveMap.class, PRIMITIVE_MAP); assertEquals(new BigDecimal("1.0"), example.getValue("one")); assertEquals(new BigDecimal("2.0"), example.getValue("two")); assertEquals(new BigDecimal("3.0"), example.getValue("three")); assertEquals(new BigDecimal("4.0"), example.getValue("four")); validate(example, serializer); } public void testPrimitiveValueOverrideMap() throws Exception { Serializer serializer = new Persister(); PrimitiveValueOverrideMap example = serializer.read(PrimitiveValueOverrideMap.class, PRIMITIVE_VALUE_OVERRIDE_MAP); assertEquals(new BigDecimal("1.0"), example.getValue("one")); assertEquals(new BigDecimal("2.0"), example.getValue("two")); assertEquals(new BigDecimal("3.0"), example.getValue("three")); assertEquals(new BigDecimal("4.0"), example.getValue("four")); validate(example, serializer); } public void testPrimitiveValueKeyOverrideMap() throws Exception { Serializer serializer = new Persister(); PrimitiveValueKeyOverrideMap example = serializer.read(PrimitiveValueKeyOverrideMap.class, PRIMITIVE_VALUE_KEY_OVERRIDE_MAP); assertEquals(new BigDecimal("1.0"), example.getValue("one")); assertEquals(new BigDecimal("2.0"), example.getValue("two")); assertEquals(new BigDecimal("3.0"), example.getValue("three")); assertEquals(new BigDecimal("4.0"), example.getValue("four")); validate(example, serializer); } public void testComplexValueKeyOverrideMap() throws Exception { Serializer serializer = new Persister(); ComplexValueKeyOverrideMap example = serializer.read(ComplexValueKeyOverrideMap.class, COMPLEX_VALUE_KEY_OVERRIDE_MAP); assertEquals("example 1", example.getValue(new CompositeKey("name 1", "address 1"))); assertEquals("example 2", example.getValue(new CompositeKey("name 2", "address 2"))); assertEquals("example 3", example.getValue(new CompositeKey("name 3", "address 3"))); assertEquals("example 4", example.getValue(new CompositeKey("name 4", "address 4"))); validate(example, serializer); } public void testPrimitiveInlineMap() throws Exception { Serializer serializer = new Persister(); PrimitiveInlineMap example = serializer.read(PrimitiveInlineMap.class, PRIMITIVE_INLINE_MAP); assertEquals(new BigDecimal("1.0"), example.getValue("one")); assertEquals(new BigDecimal("2.0"), example.getValue("two")); assertEquals(new BigDecimal("3.0"), example.getValue("three")); assertEquals(new BigDecimal("4.0"), example.getValue("four")); validate(example, serializer); } public void testNullValue() throws Exception { Serializer serializer = new Persister(); PrimitiveMap primitiveMap = new PrimitiveMap(); primitiveMap.map.put("a", new BigDecimal(1)); primitiveMap.map.put("b", new BigDecimal(2)); primitiveMap.map.put("c", null); primitiveMap.map.put(null, new BigDecimal(4)); StringWriter out = new StringWriter(); serializer.write(primitiveMap, out); primitiveMap = serializer.read(PrimitiveMap.class, out.toString()); assertEquals(primitiveMap.map.get(null), new BigDecimal(4)); assertEquals(primitiveMap.map.get("c"), null); assertEquals(primitiveMap.map.get("a"), new BigDecimal(1)); assertEquals(primitiveMap.map.get("b"), new BigDecimal(2)); validate(primitiveMap, serializer); ComplexMap complexMap = new ComplexMap(); complexMap.map.put(new CompositeKey("name.1", "address.1"), new MapEntry("1", "1")); complexMap.map.put(new CompositeKey("name.2", "address.2"), new MapEntry("2", "2")); complexMap.map.put(null, new MapEntry("3", "3")); complexMap.map.put(new CompositeKey("name.4", "address.4"), null); validate(complexMap, serializer); } public void testIndexExample() throws Exception { Serializer serializer = new Persister(); IndexConfig config = serializer.read(IndexConfig.class, INDEX_EXAMPLE); validate(config, serializer); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/ExceptionTest.java0000644000175000017500000002033511342530530027423 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import java.io.StringReader; import java.io.StringWriter; import java.util.ArrayList; import java.util.List; import java.util.Vector; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Element; import org.simpleframework.xml.ElementList; import org.simpleframework.xml.Root; import org.simpleframework.xml.core.AttributeException; import org.simpleframework.xml.core.ElementException; import org.simpleframework.xml.core.Persister; import org.simpleframework.xml.core.RootException; import org.simpleframework.xml.core.ValueRequiredException; import junit.framework.TestCase; public class ExceptionTest extends TestCase { private static final String VALID = "\n"+ "\n"+ " some text element\n"+ " \n"+ " \n"+ " some example text \n\r"+ " \n\r"+ " \n"+ " other example \n\r"+ " \n"+ " \n"+ " final example \n\r"+ " \n"+ " \n"+ ""; private static final String NO_NAME_ATTRIBUTE = "\n"+ "\n"+ " some text element\n"+ " \n"+ " \n"+ " some example text \n\r"+ " \n\r"+ " \n"+ " other example \n\r"+ " \n"+ " \n"+ " final example \n\r"+ " \n"+ " \n"+ ""; private static final String NO_TEXT_ELEMENT = "\n"+ "\n"+ " \n"+ " \n"+ " some example text \n\r"+ " \n\r"+ " \n"+ " other example \n\r"+ " \n"+ " \n"+ " final example \n\r"+ " \n"+ " \n"+ ""; private static final String EXTRA_ELEMENT = "\n"+ "\n"+ " this is an extra element\n"+ " some text element\n"+ " \n"+ " \n"+ " some example text \n\r"+ " \n\r"+ " \n"+ " other example \n\r"+ " \n"+ " \n"+ " final example \n\r"+ " \n"+ " \n"+ ""; private static final String EXTRA_ATTRIBUTE = "\n"+ "\n"+ " some text element\n"+ " \n"+ " \n"+ " some example text \n\r"+ " \n\r"+ " \n"+ " other example \n\r"+ " \n"+ " \n"+ " final example \n\r"+ " \n"+ " \n"+ ""; private static final String MISSING_ROOT = "\n"+ "\n"+ " some text element\n"+ " \n"+ " \n"+ " some example text \n\r"+ " \n\r"+ " \n"+ " other example \n\r"+ " \n"+ " \n"+ " final example \n\r"+ " \n"+ " \n"+ " \n"+ " \n"+ " some text\n"+ " \n"+ " \n"+ ""; private static final String LIST_ENTRY_WITH_NO_ROOT = "\n"+ "\n"+ " \n"+ " \n"+ " some example text \n\r"+ " \n\r"+ " \n"+ " this is the value\n"+ " other example \n\r"+ " \n"+ " \n"+ " this is some other value\n"+ " final example \n\r"+ " \n"+ " \n"+ ""; @Root(name="entry") private static class Entry { @Attribute(name="id", required=false) private int id; @Element(name="text", required=true) private String text; } @Root(name="root") private static class EntryList { @ElementList(name="list", type=Entry.class, required=false) private List list; @Attribute(name="name", required=true) private String name; @Element(name="text", required=true) private String text; } private static class ListEntry { @Attribute(name="id", required=false) private int id; @Element(name="text", required=true) private String text; } @Root(name="entry") private static class RootListEntry extends ListEntry { @Attribute(name="value", required=true) private String value; } private static class NoRootListEntry extends ListEntry { @Element(name="value", required=true) private String value; } @Root(name="root") private static class ListEntryList { @ElementList(name="list", type=ListEntry.class, required=true) private List list; } private Persister serializer; public void setUp() { serializer = new Persister(); } public void testValid() { try { serializer.read(EntryList.class, VALID); }catch(Exception e) { assertTrue(false); } } public void testNoAttribute() throws Exception { boolean success = false; try { serializer.read(EntryList.class, NO_NAME_ATTRIBUTE); }catch(ValueRequiredException e) { success = true; } assertTrue(success); } public void testNoElement() throws Exception { boolean success = false; try { serializer.read(EntryList.class, NO_TEXT_ELEMENT); }catch(ValueRequiredException e) { success = true; } assertTrue(success); } public void testExtraAttribute() throws Exception { boolean success = false; try { serializer.read(EntryList.class, EXTRA_ATTRIBUTE); }catch(AttributeException e) { success = true; } assertTrue(success); } public void testExtraElement() throws Exception { boolean success = false; try { serializer.read(EntryList.class, EXTRA_ELEMENT); }catch(ElementException e) { success = true; } assertTrue(success); } public void testMissingElement() throws Exception { boolean success = false; try { Entry entry = new Entry(); entry.id = 1; serializer.write(entry, new StringWriter()); } catch(ElementException e) { success = true; } assertTrue(success); } public void testMissingAttribute() throws Exception { boolean success = false; try { EntryList list = new EntryList(); list.text = "some text"; serializer.write(list, new StringWriter()); } catch(AttributeException e) { success = true; } assertTrue(success); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/MissingGenericsTest.java0000644000175000017500000000450511342530530030557 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import java.io.StringWriter; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import junit.framework.TestCase; import org.simpleframework.xml.ElementList; import org.simpleframework.xml.ElementMap; import org.simpleframework.xml.Root; public class MissingGenericsTest extends TestCase { @Root private static class MissingGenerics { @SuppressWarnings("unchecked") @ElementMap(keyType=String.class, valueType=String.class) private Map map = new HashMap(); @SuppressWarnings("unchecked") @ElementList(type=String.class) private List list = new ArrayList(); @SuppressWarnings("unchecked") public Map getMap() { return map; } @SuppressWarnings("unchecked") public List getList() { return list; } } @SuppressWarnings("unchecked") public void testMissingGenerics() throws Exception { MissingGenerics example = new MissingGenerics(); Persister persister = new Persister(); Map map = example.getMap(); map.put("a", "A"); map.put("b", "B"); map.put("c", "C"); map.put("d", "D"); map.put("e", "E"); List list = example.getList(); list.add("1"); list.add("2"); list.add("3"); list.add("4"); list.add("5"); StringWriter out = new StringWriter(); persister.write(example, out); String text = out.toString(); MissingGenerics recovered = persister.read(MissingGenerics.class, text); assertEquals(recovered.getMap().size(), 5); assertEquals(recovered.getMap().get("a"), "A"); assertEquals(recovered.getMap().get("b"), "B"); assertEquals(recovered.getMap().get("c"), "C"); assertEquals(recovered.getMap().get("d"), "D"); assertEquals(recovered.getMap().get("e"), "E"); assertTrue(recovered.getList().contains("1")); assertTrue(recovered.getList().contains("2")); assertTrue(recovered.getList().contains("3")); assertTrue(recovered.getList().contains("4")); assertTrue(recovered.getList().contains("5")); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/TypeTest.java0000644000175000017500000001145611342530530026412 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import java.io.StringWriter; import org.simpleframework.xml.Element; import org.simpleframework.xml.Root; import org.simpleframework.xml.core.Persister; import org.simpleframework.xml.ValidationTestCase; public class TypeTest extends ValidationTestCase { private static final String SOURCE = "\n"+ "\n"+ " \n"+ " true\r\n"+ " 16 \n\r"+ " 120 \n\r"+ " 1234\n"+ " 1234.56 \n\r"+ " 1234567\n"+ " 1234567.89 \n\r"+ " \n"+ " \n"+ " true\r\n"+ " 16 \n\r"+ " 120 \n\r"+ " 1234\n"+ " 1234.56 \n\r"+ " 1234567\n"+ " 1234567.89 \n\r"+ " text value\n\r"+ " TWO\n"+ " \n\r"+ ""; @Root(name="test") private static class Entry { @Element(name="primitive") private PrimitiveEntry primitive; @Element(name="object") private ObjectEntry object; } private static class PrimitiveEntry { @Element(name="boolean") private boolean booleanValue; @Element(name="byte") private byte byteValue; @Element(name="short") private short shortValue; @Element(name="int") private int intValue; @Element(name="float") private float floatValue; @Element(name="long") private long longValue; @Element(name="double") private double doubleValue; } private static class ObjectEntry { @Element(name="Boolean") private Boolean booleanValue; @Element(name="Byte") private Byte byteValue; @Element(name="Short") private Short shortValue; @Element(name="Integer") private Integer intValue; @Element(name="Float") private Float floatValue; @Element(name="Long") private Long longValue; @Element(name="Double") private Double doubleValue; @Element(name="String") private String stringValue; @Element(name="Enum") private TestEnum enumValue; } private static enum TestEnum { ONE, TWO, THREE } private Persister persister; public void setUp() throws Exception { persister = new Persister(); } public void testPrimitive() throws Exception { Entry entry = persister.read(Entry.class, SOURCE); assertEquals(entry.primitive.booleanValue, true); assertEquals(entry.primitive.byteValue, 16); assertEquals(entry.primitive.shortValue, 120); assertEquals(entry.primitive.intValue, 1234); assertEquals(entry.primitive.floatValue, 1234.56f); assertEquals(entry.primitive.longValue, 1234567l); assertEquals(entry.primitive.doubleValue, 1234567.89d); assertEquals(entry.object.booleanValue, Boolean.TRUE); assertEquals(entry.object.byteValue, new Byte("16")); assertEquals(entry.object.shortValue, new Short("120")); assertEquals(entry.object.intValue, new Integer(1234)); assertEquals(entry.object.floatValue, new Float(1234.56)); assertEquals(entry.object.longValue, new Long(1234567)); assertEquals(entry.object.doubleValue, new Double(1234567.89)); assertEquals(entry.object.stringValue, "text value"); assertEquals(entry.object.enumValue, TestEnum.TWO); StringWriter buffer = new StringWriter(); persister.write(entry, buffer); validate(entry, persister); entry = persister.read(Entry.class, buffer.toString()); assertEquals(entry.primitive.booleanValue, true); assertEquals(entry.primitive.byteValue, 16); assertEquals(entry.primitive.shortValue, 120); assertEquals(entry.primitive.intValue, 1234); assertEquals(entry.primitive.floatValue, 1234.56f); assertEquals(entry.primitive.longValue, 1234567l); assertEquals(entry.primitive.doubleValue, 1234567.89d); assertEquals(entry.object.booleanValue, Boolean.TRUE); assertEquals(entry.object.byteValue, new Byte("16")); assertEquals(entry.object.shortValue, new Short("120")); assertEquals(entry.object.intValue, new Integer(1234)); assertEquals(entry.object.floatValue, new Float(1234.56)); assertEquals(entry.object.longValue, new Long(1234567)); assertEquals(entry.object.doubleValue, new Double(1234567.89)); assertEquals(entry.object.stringValue, "text value"); assertEquals(entry.object.enumValue, TestEnum.TWO); validate(entry, persister); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/NonFinalConstructorInjectionTest.java0000644000175000017500000000157211342530530033304 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import org.simpleframework.xml.Element; import org.simpleframework.xml.Root; import org.simpleframework.xml.ValidationTestCase; public class NonFinalConstructorInjectionTest extends ValidationTestCase { @Root private static class NonFinalExample { @Element private String name; @Element private String value; public NonFinalExample(@Element(name="name") String name, @Element(name="value") String value) { this.name = name; this.value = value; } public String getName(){ return name; } public String getValue(){ return value; } } public void testNonFinal() throws Exception { Persister persister = new Persister(); NonFinalExample example = new NonFinalExample("A", "a"); validate(example, persister); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/ExtendTest.java0000644000175000017500000000513211342530530026712 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import java.io.StringReader; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Element; import org.simpleframework.xml.Root; import org.simpleframework.xml.core.Persister; import junit.framework.TestCase; public class ExtendTest extends TestCase { private static final String FIRST = "\n"+ "\n"+ " entry text \n\r"+ ""; private static final String SECOND = "\n"+ "\n"+ " entry text \n\r"+ " some name \n\r"+ ""; private static final String THIRD = "\n"+ "\n"+ " entry text \n\r"+ " some name \n"+ " added to schema\n"+ ""; @Root(name="root") private static class First { @Attribute(name="id") public int id; @Element(name="text") public String text; } private static class Second extends First { @Element(name="name") public String name; } @Root(name="override") private static class Third extends Second { @Attribute(name="flag") public boolean bool; @Element(name="third") public String third; } private Persister serializer; public void setUp() { serializer = new Persister(); } public void testFirst() throws Exception { First first = serializer.read(First.class, new StringReader(FIRST)); assertEquals(first.id, 12); assertEquals(first.text, "entry text"); } public void testSecond() throws Exception { Second second = serializer.read(Second.class, new StringReader(SECOND)); assertEquals(second.id, 12); assertEquals(second.text, "entry text"); assertEquals(second.name, "some name"); } public void testThird() throws Exception { Third third = serializer.read(Third.class, new StringReader(THIRD)); assertEquals(third.id, 12); assertEquals(third.text, "entry text"); assertEquals(third.name, "some name"); assertEquals(third.third, "added to schema"); assertTrue(third.bool); } public void testFailure() throws Exception { boolean fail = false; try { Third third = serializer.read(Third.class, new StringReader(SECOND)); }catch(Exception e) { fail = true; } assertTrue(fail); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/EntryTest.java0000644000175000017500000001007311342530530026564 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import java.lang.annotation.Annotation; import java.lang.reflect.Field; import java.util.Map; import junit.framework.TestCase; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.ElementMap; import org.simpleframework.xml.Root; import org.simpleframework.xml.core.Contact; import org.simpleframework.xml.core.Entry; import org.simpleframework.xml.core.FieldContact; public class EntryTest extends TestCase { @Root private static class CompositeKey { @Attribute private String value; public String getValue() { return value; } } @ElementMap private Map defaultMap; @ElementMap(keyType=Integer.class, valueType=Long.class) private Map annotatedMap; @ElementMap(value="value") private Map bodyMap; @ElementMap(value="value", key="key", attribute=true) private Map attributeMap; @ElementMap(entry="entry") private Map entryMap; @ElementMap private Map compositeMap; public void testEntry() throws Exception { Entry entry = getEntry(EntryTest.class, "defaultMap"); assertEquals(entry.getKeyType().getType(), String.class); assertEquals(entry.getValueType().getType(), String.class); assertEquals(entry.getValue(), null); assertEquals(entry.getKey(), null); assertEquals(entry.getEntry(), "entry"); entry = getEntry(EntryTest.class, "annotatedMap"); assertEquals(entry.getKeyType().getType(), Integer.class); assertEquals(entry.getValueType().getType(), Long.class); assertEquals(entry.getValue(), null); assertEquals(entry.getKey(), null); assertEquals(entry.getEntry(), "entry"); entry = getEntry(EntryTest.class, "bodyMap"); assertEquals(entry.getKeyType().getType(), String.class); assertEquals(entry.getValueType().getType(), String.class); assertEquals(entry.getValue(), "value"); assertEquals(entry.getKey(), null); assertEquals(entry.getEntry(), "entry"); entry = getEntry(EntryTest.class, "attributeMap"); assertEquals(entry.getKeyType().getType(), String.class); assertEquals(entry.getValueType().getType(), String.class); assertEquals(entry.getValue(), "value"); assertEquals(entry.getKey(), "key"); assertEquals(entry.getEntry(), "entry"); entry = getEntry(EntryTest.class, "entryMap"); assertEquals(entry.getKeyType().getType(), Double.class); assertEquals(entry.getValueType().getType(), String.class); assertEquals(entry.getValue(), null); assertEquals(entry.getKey(), null); assertEquals(entry.getEntry(), "entry"); entry = getEntry(EntryTest.class, "compositeMap"); assertEquals(entry.getKeyType().getType(), CompositeKey.class); assertEquals(entry.getValueType().getType(), String.class); assertEquals(entry.getValue(), null); assertEquals(entry.getKey(), null); assertEquals(entry.getEntry(), "entry"); } public Entry getEntry(Class type, String name) throws Exception { Contact contact = getContact(EntryTest.class, name); ElementMap label = getField(EntryTest.class, name).getAnnotation(ElementMap.class); Entry entry = new Entry(contact, label); return entry; } public Contact getContact(Class type, String name) throws Exception { Field field = getField(type, name); Annotation label = field.getAnnotation(ElementMap.class); return new FieldContact(field, label); } public Annotation getAnnotation(Field field) { Annotation[] list = field.getDeclaredAnnotations(); for(Annotation label : list) { if(label instanceof ElementMap) { return label; } } return null; } public Field getField(Class type, String name) throws Exception { return type.getDeclaredField(name); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/CallbackTest.java0000644000175000017500000001334111342530530027160 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import junit.framework.TestCase; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Element; import org.simpleframework.xml.Root; public class CallbackTest extends TestCase { private static final String SOURCE = "\n"+ "\n"+ " complete \n\r"+ ""; @Root(name="root") private static class Entry { @Attribute(name="number", required=false) private int number = 9999; @Attribute(name="flag") private boolean bool; @Element(name="value", required=false) private String value = "default"; private boolean validated; private boolean committed; private boolean persisted; private boolean completed; public Entry() { super(); } @Validate public void validate() { validated = true; } @Commit public void commit() { if(validated) { committed = true; } } @Persist public void persist() { persisted = true; } @Complete public void complete() { if(persisted) { completed = true; } } public boolean isCommitted() { return committed; } public boolean isValidated() { return validated; } public boolean isPersisted() { return persisted; } public boolean isCompleted() { return completed; } public int getNumber() { return number; } public boolean getFlag() { return bool; } public String getValue() { return value; } } private static class ExtendedEntry extends Entry { public boolean completed; public boolean committed; public boolean validated; public boolean persisted; public ExtendedEntry() { super(); } @Validate public void extendedValidate() { validated = true; } @Commit public void extendedCommit() { if(validated) { committed = true; } } @Persist public void extendedPersist() { persisted = true; } @Complete public void extendedComplete() { if(persisted) { completed = true; } } public boolean isExtendedCommitted() { return committed; } public boolean isExtendedValidated() { return validated; } public boolean isExtendedPersisted() { return persisted; } public boolean isExtendedCompleted() { return completed; } } private static class OverrideEntry extends Entry { public boolean validated; @Override public void validate() { validated = true; } public boolean isOverrideValidated() { return validated; } } private Persister persister; public void setUp() { persister = new Persister(); } public void testReadCallbacks() throws Exception { Entry entry = persister.read(Entry.class, SOURCE); assertEquals("complete", entry.getValue()); assertEquals(1234, entry.getNumber()); assertEquals(true, entry.getFlag()); assertTrue(entry.isValidated()); assertTrue(entry.isCommitted()); } public void testWriteCallbacks() throws Exception { Entry entry = new Entry(); assertFalse(entry.isCompleted()); assertFalse(entry.isPersisted()); persister.write(entry, System.out); assertEquals("default", entry.getValue()); assertEquals(9999, entry.getNumber()); assertTrue(entry.isPersisted()); assertTrue(entry.isCompleted()); } public void testExtendedReadCallbacks() throws Exception { ExtendedEntry entry = persister.read(ExtendedEntry.class, SOURCE); assertEquals("complete", entry.getValue()); assertEquals(1234, entry.getNumber()); assertEquals(true, entry.getFlag()); assertFalse(entry.isValidated()); assertFalse(entry.isCommitted()); assertTrue(entry.isExtendedValidated()); assertTrue(entry.isExtendedCommitted()); } public void testExtendedWriteCallbacks() throws Exception { ExtendedEntry entry = new ExtendedEntry(); assertFalse(entry.isCompleted()); assertFalse(entry.isPersisted()); assertFalse(entry.isExtendedCompleted()); assertFalse(entry.isExtendedPersisted()); persister.write(entry, System.out); assertEquals("default", entry.getValue()); assertEquals(9999, entry.getNumber()); assertFalse(entry.isPersisted()); assertFalse(entry.isCompleted()); assertTrue(entry.isExtendedCompleted()); assertTrue(entry.isExtendedPersisted()); } public void testOverrideReadCallbacks() throws Exception { OverrideEntry entry = persister.read(OverrideEntry.class, SOURCE); assertEquals("complete", entry.getValue()); assertEquals(1234, entry.getNumber()); assertEquals(true, entry.getFlag()); assertFalse(entry.isValidated()); assertTrue(entry.isOverrideValidated()); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/ScannerDefaultTest.java0000644000175000017500000000623311342530530030364 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import junit.framework.TestCase; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Default; import org.simpleframework.xml.DefaultType; import org.simpleframework.xml.Root; import org.simpleframework.xml.Transient; import org.simpleframework.xml.strategy.Strategy; import org.simpleframework.xml.strategy.TreeStrategy; import org.simpleframework.xml.stream.Style; public class ScannerDefaultTest extends TestCase { @Root @Default(DefaultType.FIELD) private static class OrderItem { private Customer customer; private String name; @Transient private double price; // should be transient to avoid having prices as an attribute and an element, which is legal @Attribute private double getPrice() { return price; } @Attribute private void setPrice(double price) { this.price = price; } } @Root @Default(DefaultType.PROPERTY) private static class Customer { private String name; private String getName() { return name; } public void setName(String name){ this.name = name; } } @Root @Default(DefaultType.FIELD) private static class DuplicateExample { private int id; @Attribute public int getId() { return id; } @Attribute public void setId(int id){ this.id = id; } } @Root @Default(DefaultType.PROPERTY) private static class NonMatchingAnnotationExample { private String name; private String getName() { return name; } @Attribute public void setName(String name) { this.name = name; } } public void testNonMatchingAnnotationExample() throws Exception { boolean failure = false; try { new Scanner(NonMatchingAnnotationExample.class); }catch(Exception e) { e.printStackTrace(); failure = true; } assertTrue("Failure should occur when annotations do not match", failure); } public void testDuplicateExample() throws Exception { Scanner scanner = new Scanner(DuplicateExample.class); Support support = new Support(); Strategy strategy = new TreeStrategy(); Style style = new DefaultStyle(); Context context = new Source(strategy, support, style); LabelMap attributes = scanner.getAttributes(context); LabelMap elements = scanner.getElements(context); assertEquals(attributes.get("id").getType(), int.class); assertEquals(elements.get("id").getType(), int.class); } public void testScanner() throws Exception { Scanner scanner = new Scanner(OrderItem.class); Support support = new Support(); Strategy strategy = new TreeStrategy(); Style style = new DefaultStyle(); Context context = new Source(strategy, support, style); LabelMap attributes = scanner.getAttributes(context); LabelMap elements = scanner.getElements(context); assertEquals(attributes.get("price").getType(), double.class); assertEquals(elements.get("customer").getType(), Customer.class); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/StyleTest.java0000644000175000017500000001005411342530527026570 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import java.util.List; import java.util.Map; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Element; import org.simpleframework.xml.ElementArray; import org.simpleframework.xml.ElementList; import org.simpleframework.xml.ElementMap; import org.simpleframework.xml.Root; import org.simpleframework.xml.Text; import org.simpleframework.xml.ValidationTestCase; import org.simpleframework.xml.core.Persister; import org.simpleframework.xml.stream.Format; import org.simpleframework.xml.stream.HyphenStyle; import org.simpleframework.xml.stream.Style; public class StyleTest extends ValidationTestCase { private static final String SOURCE = "\n"+ "\n"+ " \n"+ " \n"+ " one \n\r"+ " \n\r"+ " \n"+ " two \n\r"+ " \n"+ " \n"+ " three \n\r"+ " \n"+ " \n"+ " \n" + " example 4\n" + " \n" + " \n"+ " http://a.com/\n"+ " http://b.com/\n"+ " http://c.com/\n"+ " \n"+ " \n" + " example 5\n" + " \n" + " \n" + " example 6\n" + " \n" + " \n"+ " \n" + " example 6\n" + " \n" + " \n" + " example 7\n" + " \n" + " \n" + " example 8\n" + " \n" + " \n"+ " \n" + " example 9\n" + " \n" + " \n"+ " \n"+ " http://a.com/\n"+ " \n"+ " \n"+ " http://b.com/\n"+ " \n"+ " \n"+ " http://c.com/\n"+ " \n"+ " \n"+ ""; @Root(name="Example") private static class CaseExample { @ElementList(name="List", entry="ListEntry") private List list; @ElementList(name="URLList") private List domainList; @ElementList(name="TextList", inline=true) private List textList; @ElementArray(name="TextArray", entry="TextEntry") private TextEntry[] textArray; @ElementMap(name="URLMap", entry="URLItem", key="Key", value="URLItem", attribute=true) private Map domainMap; @Attribute(name="Version") private float version; @Attribute(name="Name") private String name; @Attribute private String URL; // Java Bean property is URL } @Root(name="TextEntry") private static class TextEntry { @Attribute(name="id") private int id; @Element(name="Text") private String text; } @Root(name="URLEntry") private static class URLEntry { @Text private String location; } public void testCase() throws Exception { Style style = new HyphenStyle(); Format format = new Format(style); Persister writer = new Persister(format); Persister reader = new Persister(); CaseExample example = reader.read(CaseExample.class, SOURCE); assertEquals(example.version, 1.0f); assertEquals(example.name, "example"); assertEquals(example.URL, "http://domain.com/"); writer.write(example, System.err); validate(example, reader); validate(example, writer); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/ClassScannerTest.java0000644000175000017500000000141311342530527030046 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import junit.framework.TestCase; import org.simpleframework.xml.Namespace; import org.simpleframework.xml.Order; import org.simpleframework.xml.Root; public class ClassScannerTest extends TestCase { @Root @Order(elements={"a", "b"}, attributes={"A", "B"}) @Namespace(prefix="prefix", reference="http://domain/reference") private static class Example { @Commit public void commit() { return; } @Validate public void validate() { return; } } public void testClassScanner() throws Exception { ClassScanner scanner = new ClassScanner(Example.class); assertNotNull(scanner.getRoot()); assertNotNull(scanner.getOrder()); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/PrimitiveListTest.java0000644000175000017500000000227511342530530030274 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import java.io.StringReader; import java.util.List; import java.util.Vector; import junit.framework.TestCase; import org.simpleframework.xml.strategy.TreeStrategy; import org.simpleframework.xml.stream.InputNode; import org.simpleframework.xml.stream.NodeBuilder; public class PrimitiveListTest extends TestCase { public static final String TWO = ""+ " one" + " two" + ""; public void testTwo() throws Exception { Context context = new Source(new TreeStrategy(), new Support(), new DefaultStyle()); PrimitiveList primitive = new PrimitiveList(context, new ClassType(List.class), new ClassType(String.class), "entry"); InputNode node = NodeBuilder.read(new StringReader(TWO)); Object value = primitive.read(node); assertEquals(value.getClass(), Vector.class); Vector vector = (Vector) value; assertEquals(vector.get(0), "one"); assertEquals(vector.get(1), "two"); InputNode newNode = NodeBuilder.read(new StringReader(TWO)); assertTrue(primitive.validate(newNode)); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/ReflectorTest.java0000644000175000017500000001053111342530530027407 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import java.lang.reflect.Field; import java.lang.reflect.Method; import java.util.Collection; import java.util.Map; import org.simpleframework.xml.core.Reflector; import junit.framework.TestCase; public class ReflectorTest extends TestCase { public Collection genericList; public Collection normalList; public Map genericMap; public Map normalMap; public void genericMethodMapParameter(Map map) {} public void normalMethodMapParameter(Map map) {} public void genericMethodCollectionParameter(Collection list) {} public void normalMethodCollectionParameter(Collection list){} public Map genericMethodMapReturn() {return null;} public Map normalMethodMapReturn() {return null;} public Collection genericMethodCollectionReturn() {return null;} public Collection normalMethodCollectionReturn() {return null;} public void testFieldReflector() throws Exception { Field field = getField(ReflectorTest.class, "genericMap"); Class[] types = Reflector.getDependents(field); assertEquals(types.length, 2); assertEquals(types[0], Float.class); assertEquals(types[1], Double.class); field = getField(ReflectorTest.class, "normalMap"); types = Reflector.getDependents(field); assertEquals(types.length, 0); field = getField(ReflectorTest.class, "genericList"); types = Reflector.getDependents(field); assertEquals(types.length, 1); assertEquals(types[0], String.class); field = getField(ReflectorTest.class, "normalList"); types = Reflector.getDependents(field); assertEquals(types.length, 0); } public void testCollectionReflector() throws Exception { Method method = getMethod(ReflectorTest.class, "genericMethodCollectionParameter", Collection.class); Class[] types = Reflector.getParameterDependents(method, 0); assertEquals(types.length, 1); assertEquals(types[0], String.class); method = getMethod(ReflectorTest.class, "normalMethodCollectionParameter", Collection.class); types = Reflector.getParameterDependents(method, 0); assertEquals(types.length, 0); method = getMethod(ReflectorTest.class, "genericMethodCollectionReturn"); types = Reflector.getReturnDependents(method); assertEquals(types.length, 1); assertEquals(types[0], Float.class); method = getMethod(ReflectorTest.class, "normalMethodCollectionReturn"); types = Reflector.getReturnDependents(method); assertEquals(types.length, 0); } public void testMapReflector() throws Exception { Method method = getMethod(ReflectorTest.class, "genericMethodMapParameter", Map.class); Class[] types = Reflector.getParameterDependents(method, 0); assertEquals(types.length, 2); assertEquals(types[0], String.class); assertEquals(types[1], Integer.class); method = getMethod(ReflectorTest.class, "normalMethodMapParameter", Map.class); types = Reflector.getParameterDependents(method, 0); assertEquals(types.length, 0); method = getMethod(ReflectorTest.class, "genericMethodMapReturn"); types = Reflector.getReturnDependents(method); assertEquals(types.length, 2); assertEquals(types[0], String.class); assertEquals(types[1], Boolean.class); method = getMethod(ReflectorTest.class, "normalMethodMapReturn"); types = Reflector.getReturnDependents(method); assertEquals(types.length, 0); } public Method getMethod(Class type, String name, Class... types) throws Exception { return type.getDeclaredMethod(name, types); } public Field getField(Class type, String name) throws Exception { return type.getDeclaredField(name); } public void testCase() throws Exception { assertEquals("URL", Support.getName("URL")); assertEquals("getEntry", Support.getName("getEntry")); assertEquals("iF", Support.getName("iF")); assertEquals("if", Support.getName("if")); assertEquals("URLConnection", Support.getName("URLConnection")); assertEquals("type", Support.getName("Type")); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/RootTest.java0000644000175000017500000000663011342530530026412 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Element; import org.simpleframework.xml.Root; import org.simpleframework.xml.core.Persister; import org.simpleframework.xml.ValidationTestCase; public class RootTest extends ValidationTestCase { private static final String ROOT_EXAMPLE = "\n"+ " Some text example\n"+ ""; private static final String EXTENDED_ROOT_EXAMPLE = "\n"+ " Some text example\n"+ ""; private static final String EXTENDED_OVERRIDDEN_ROOT_EXAMPLE = "\n"+ " Some text example\n"+ ""; private static final String EXTENDED_EXPLICITLY_OVERRIDDEN_ROOT_EXAMPLE = "\n"+ " Some text example\n"+ ""; @Root private static class RootExample { private int version; private String text; public RootExample() { super(); } @Attribute public void setVersion(int version) { this.version = version; } @Attribute public int getVersion() { return version; } @Element public void setText(String text) { this.text = text; } @Element public String getText() { return text; } } private static class ExtendedRootExample extends RootExample { public ExtendedRootExample() { super(); } } @Root private static class ExtendedOverriddenRootExample extends ExtendedRootExample { public ExtendedOverriddenRootExample() { super(); } } @Root(name="explicitOverride") private static class ExtendedExplicitlyOverriddenRootExample extends ExtendedRootExample { public ExtendedExplicitlyOverriddenRootExample() { super(); } } private Persister persister; public void setUp() { this.persister = new Persister(); } public void testRoot() throws Exception { RootExample example = persister.read(RootExample.class, ROOT_EXAMPLE); assertEquals(example.version, 1); assertEquals(example.text, "Some text example"); validate(example, persister); example = persister.read(ExtendedRootExample.class, ROOT_EXAMPLE); assertEquals(example.version, 1); assertEquals(example.text, "Some text example"); validate(example, persister); example = persister.read(ExtendedRootExample.class, EXTENDED_ROOT_EXAMPLE); assertEquals(example.version, 1); assertEquals(example.text, "Some text example"); validate(example, persister); example = persister.read(ExtendedOverriddenRootExample.class, EXTENDED_OVERRIDDEN_ROOT_EXAMPLE); assertEquals(example.version, 1); assertEquals(example.text, "Some text example"); validate(example, persister); example = persister.read(ExtendedExplicitlyOverriddenRootExample.class, EXTENDED_EXPLICITLY_OVERRIDDEN_ROOT_EXAMPLE); assertEquals(example.version, 1); assertEquals(example.text, "Some text example"); validate(example, persister); } }simple-xml-2.3.2/test/src/org/simpleframework/xml/core/CompositeMapTest.java0000644000175000017500000002007111342530530030062 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import java.io.PrintWriter; import java.lang.annotation.Annotation; import java.util.HashMap; import java.util.Map; import junit.framework.TestCase; import org.simpleframework.xml.ElementMap; import org.simpleframework.xml.strategy.TreeStrategy; import org.simpleframework.xml.stream.NodeBuilder; import org.simpleframework.xml.stream.OutputNode; public class CompositeMapTest extends TestCase { private static class MockElementMap implements ElementMap { private boolean attribute; private boolean data; private String entry; private boolean inline; private String key; private Class keyType; private String name; private boolean required; private String value; private Class valueType; public MockElementMap( boolean attribute, boolean data, String entry, boolean inline, String key, Class keyType, String name, boolean required, String value, Class valueType) { this.attribute = attribute; this.data = data; this.entry = entry; this.inline = inline; this.key = key; this.keyType = keyType; this.name = name; this.required = required; this.value = value; this.valueType = valueType; } public boolean empty() { return true; } public boolean attribute() { return attribute; } public boolean data() { return data; } public String entry() { return entry; } public boolean inline() { return inline; } public String key() { return key; } public Class keyType() { return keyType; } public String name() { return name; } public boolean required() { return required; } public String value() { return value; } public double since() { return 1.0; } public Class valueType() { return valueType; } public Class annotationType() { return ElementMap.class; } } private static class PrimitiveType { private MockElementMap map; private String string; private int number; private byte octet; public PrimitiveType(MockElementMap map) { this.map = map; } public Contact getString() throws Exception { return new FieldContact(PrimitiveType.class.getDeclaredField("string"), map); } public Contact getNumber() throws Exception { return new FieldContact(PrimitiveType.class.getDeclaredField("number"), map); } public Contact getOctet() throws Exception { return new FieldContact(PrimitiveType.class.getDeclaredField("octet"), map); } } public void testInlineString() throws Exception { Source source = new Source(new TreeStrategy(), new Support(), new DefaultStyle()); MockElementMap map = new MockElementMap(true, // attribute false, // data "entry", // entry true, // inline "key", // key String.class, // keyType "name", // name true, // required "value", // value String.class); // valueType PrimitiveType type = new PrimitiveType(map); Contact string = type.getString(); Entry entry = new Entry(string, map); CompositeMap value = new CompositeMap(source, entry, new ClassType(Map.class)); OutputNode node = NodeBuilder.write(new PrintWriter(System.out)); Map exampleMap = new HashMap(); exampleMap.put("a", "1"); exampleMap.put("b", "2"); value.write(node.getChild("inlineString"), exampleMap); node.commit(); } public void testNotInlineString() throws Exception { Source source = new Source(new TreeStrategy(), new Support(), new DefaultStyle()); MockElementMap map = new MockElementMap(false, // attribute false, // data "entry", // entry true, // inline "key", // key String.class, // keyType "name", // name true, // required "value", // value String.class); // valueType PrimitiveType type = new PrimitiveType(map); Contact string = type.getString(); Entry entry = new Entry(string, map); CompositeMap value = new CompositeMap(source, entry, new ClassType(Map.class)); OutputNode node = NodeBuilder.write(new PrintWriter(System.out)); Map exampleMap = new HashMap(); exampleMap.put("a", "1"); exampleMap.put("b", "2"); value.write(node.getChild("notInlineString"), exampleMap); node.commit(); } public void testNoAttributeString() throws Exception { Source source = new Source(new TreeStrategy(), new Support(), new DefaultStyle()); MockElementMap map = new MockElementMap(false, // attribute false, // data "entry", // entry true, // inline "", // key String.class, // keyType "name", // name true, // required "value", // value String.class); // valueType PrimitiveType type = new PrimitiveType(map); Contact string = type.getString(); Entry entry = new Entry(string, map); CompositeMap value = new CompositeMap(source, entry, new ClassType(Map.class)); OutputNode node = NodeBuilder.write(new PrintWriter(System.out)); Map exampleMap = new HashMap(); exampleMap.put("a", "1"); exampleMap.put("b", "2"); value.write(node.getChild("noAttributeString"), exampleMap); node.commit(); } public void testAttributeNoKeyString() throws Exception { Source source = new Source(new TreeStrategy(), new Support(), new DefaultStyle()); MockElementMap map = new MockElementMap(true, // attribute false, // data "entry", // entry true, // inline "", // key String.class, // keyType "name", // name true, // required "value", // value String.class); // valueType PrimitiveType type = new PrimitiveType(map); Contact string = type.getString(); Entry entry = new Entry(string, map); CompositeMap value = new CompositeMap(source, entry, new ClassType(Map.class)); OutputNode node = NodeBuilder.write(new PrintWriter(System.out)); Map exampleMap = new HashMap(); exampleMap.put("a", "1"); exampleMap.put("b", "2"); value.write(node.getChild("attributeNoKeyString"), exampleMap); node.commit(); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/EnumMapTest.java0000644000175000017500000000325011342530527027032 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import java.io.StringWriter; import java.util.EnumMap; import org.simpleframework.xml.ElementMap; import org.simpleframework.xml.Root; import org.simpleframework.xml.ValidationTestCase; public class EnumMapTest extends ValidationTestCase { private static enum Number { ONE, TWO, THREE, FOUR } @Root private static class EnumMapExample { @ElementMap private EnumMap numbers = new EnumMap(Number.class); private EnumMapExample() { super(); } public EnumMapExample(EnumMap numbers) { this.numbers = numbers; } public String get(Number number) { return numbers.get(number); } } public void testEnumMap() throws Exception { EnumMap numbers = new EnumMap(Number.class); numbers.put(Number.ONE, "1"); numbers.put(Number.TWO, "2"); numbers.put(Number.THREE, "3"); EnumMapExample example = new EnumMapExample(numbers); Persister persister = new Persister(); StringWriter out = new StringWriter(); persister.write(example, System.out); persister.write(example, out); EnumMapExample other = persister.read(EnumMapExample.class, out.toString()); assertEquals(other.get(Number.ONE), "1"); assertEquals(other.get(Number.TWO), "2"); assertEquals(other.get(Number.THREE), "3"); assertEquals(other.get(Number.FOUR), null); persister.write(example, System.out); validate(persister, example); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/NamespaceTest.java0000644000175000017500000000650711342530530027366 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Element; import org.simpleframework.xml.Namespace; import org.simpleframework.xml.NamespaceList; import org.simpleframework.xml.Root; import org.simpleframework.xml.ValidationTestCase; import org.simpleframework.xml.core.Persister; public class NamespaceTest extends ValidationTestCase { @Root @NamespaceList({ @Namespace(prefix="tax", reference="http://www.domain.com/tax"), @Namespace(reference="http://www.domain.com/default") }) @Namespace(prefix="per", reference="http://www.domain.com/person") private static class Person { @Element private Profession job; @Element private String name; @Element private String value; @Attribute private int age; private Person() { super(); } public Person(String name, String value, int age, Profession job) { this.name = name; this.value = value; this.age = age; this.job = job; } public Profession getJob() { return job; } public String getName() { return name; } } @Root @Namespace(prefix="jb", reference="http://www.domain.com/job") private static class Profession { @Element private String title; @Attribute @Namespace(reference="http://www.domain.com/tax") private int salary; @Attribute private int experience; @Namespace @Element private Employer employer; private Profession() { super(); } public Profession(String title, int salary, int experience, Employer employer) { this.title = title; this.salary = salary; this.experience = experience; this.employer = employer; } public Employer getEmployer() { return employer; } public String getTitle() { return title; } } @Root private static class Employer { @Element @Namespace(reference="http://www.domain.com/employer") private String name; @Element @Namespace(prefix="count", reference="http://www.domain.com/count") private int employees; @Element private String address; @Attribute private boolean international; private Employer() { super(); } public Employer(String name, String address, boolean international, int employees) { this.name = name; this.employees = employees; this.address = address; this.international = international; } public String getAddress() { return address; } public String getName() { return name; } } public void testNamespace() throws Exception { Persister persister = new Persister(); Employer employer = new Employer("Spam Soft", "Sesame Street", true, 1000); Profession job = new Profession("Software Engineer", 10, 12, employer); Person person = new Person("John Doe", "Person", 30, job); persister.write(person, System.out); validate(persister, person); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/MultiElementMapTest.java0000644000175000017500000000640011342530530030524 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import java.util.Date; import java.util.Map; import org.simpleframework.xml.Element; import org.simpleframework.xml.ElementMap; import org.simpleframework.xml.Root; import org.simpleframework.xml.Transient; import org.simpleframework.xml.ValidationTestCase; public class MultiElementMapTest extends ValidationTestCase { private static final String SOURCE = "\n"+ " \n"+ " boolean-value\n"+ " \n"+ " true\n"+ " \n"+ " \n"+ " \n"+ " string-value\n"+ " \n"+ " hello world\n"+ " \n"+ " \n"+ " \n"+ " int-value\n"+ " \n"+ " 42\n"+ " \n"+ " \n"+ ""; @Root private static class Value { @Element(name="boolean", required=false) private Boolean booleanValue; @Element(name="byte", required=false) private Byte byteValue; @Element(name="double", required=false) private Double doubleValue; @Element(name="float", required=false) private Float floatValue; @Element(name="int", required=false) private Integer intValue; @Element(name="long", required=false) private Long longValue; @Element(name="short", required=false) private Short shortValue; @Element(name="dateTime", required=false) private Date dateTime; @Element(name="string", required=false) private String string; @Transient private Object value; @Validate private void commit() { if(booleanValue != null) { value = booleanValue; } if(byteValue != null) { value = byteValue; } if(doubleValue != null) { value = doubleValue; } if(floatValue != null) { value = floatValue; } if(intValue != null) { value = intValue; } if(longValue != null) { value = longValue; } if(shortValue != null) { value = shortValue; } if(dateTime != null) { value = dateTime; } if(string != null) { value = string; } } public Object get() { return value; } public void set(Object value) { this.value = value; } } @Root private static class Properties { @ElementMap(key="key", value="value", inline=true) private Map map; public Object get(String name) { return map.get(name).get(); } } public void testProperties() throws Exception { Persister persister = new Persister(); Properties properties = persister.read(Properties.class, SOURCE); assertEquals(true, properties.get("boolean-value")); assertEquals("hello world", properties.get("string-value")); assertEquals(42, properties.get("int-value")); validate(persister, properties); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/DefaultEmptyTest.java0000644000175000017500000000347111342530530030072 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import java.util.List; import java.util.Map; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Element; import org.simpleframework.xml.ElementArray; import org.simpleframework.xml.ElementList; import org.simpleframework.xml.ElementMap; import org.simpleframework.xml.Root; import org.simpleframework.xml.ValidationTestCase; import org.simpleframework.xml.core.Persister; public class DefaultEmptyTest extends ValidationTestCase { private static final String SOURCE = "\n" + " some text\n"+ ""; @Root private static class DefaultExample { @ElementList(empty=false, required=false) private List stringList; @ElementMap(empty=false, required=false) private Map stringMap; @ElementArray(empty=false, required=false) private String[] stringArray; @Attribute private String name; @Element private String text; public DefaultExample() { super(); } public DefaultExample(String name, String text) { this.name = name; this.text = text; } } public void testDefaults() throws Exception { Persister persister = new Persister(); DefaultExample example = persister.read(DefaultExample.class, SOURCE); assertEquals(example.name, "test"); assertEquals(example.text, "some text"); assertNotNull(example.stringList); assertNotNull(example.stringMap); assertNotNull(example.stringArray); persister.write(example, System.out); validate(persister, example); persister.write(new DefaultExample("name", "example text"), System.out); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/ReadOnlyTest.java0000644000175000017500000000554511342530530027210 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import junit.framework.TestCase; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Element; import org.simpleframework.xml.Root; public class ReadOnlyTest extends TestCase { private static final String SOURCE = ""+ " some text here"+ ""; @Root(name="example") private static class ReadOnlyFieldExample { @Attribute(name="name") private final String name; @Element(name="value") private final String value; public ReadOnlyFieldExample(@Attribute(name="name") String name, @Element(name="value") String value) { this.name = name; this.value = value; } } @Root(name="example") private static class ReadOnlyMethodExample { private final String name; private final String value; public ReadOnlyMethodExample(@Attribute(name="name") String name, @Element(name="value") String value) { this.name = name; this.value = value; } @Attribute(name="name") public String getName() { return name; } @Element(name="value") public String getValue() { return value; } } @Root(name="example") private static class IllegalReadOnlyMethodExample { private final String name; private final String value; public IllegalReadOnlyMethodExample(@Attribute(name="name") String name, @Element(name="value") String value) { this.name = name; this.value = value; } @Attribute(name="name") public String getName() { return name; } @Element(name="value") public String getValue() { return value; } @Element(name="illegal") public String getIllegalValue() { return value; } } public void testReadOnlyField() throws Exception { Persister persister = new Persister(); ReadOnlyFieldExample example = persister.read(ReadOnlyFieldExample.class, SOURCE); assertEquals(example.name, "name"); assertEquals(example.value, "some text here"); } public void testReadOnlyMethod() throws Exception { Persister persister = new Persister(); ReadOnlyMethodExample example = persister.read(ReadOnlyMethodExample.class, SOURCE); assertEquals(example.getName(), "name"); assertEquals(example.getValue(), "some text here"); } public void testIllegalReadOnlyMethod() throws Exception { boolean failure = false; try { Persister persister = new Persister(); IllegalReadOnlyMethodExample example = persister.read(IllegalReadOnlyMethodExample.class, SOURCE); }catch(Exception e) { failure = true; } assertTrue(failure); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/OverrideTest.java0000644000175000017500000001017111342530530027241 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import java.io.StringReader; import java.io.StringWriter; import java.util.ArrayList; import java.util.List; import java.util.Vector; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Element; import org.simpleframework.xml.ElementList; import org.simpleframework.xml.Root; import org.simpleframework.xml.core.Persister; import junit.framework.TestCase; public class OverrideTest extends TestCase { private static final String LIST = "\n"+ "\n"+ " \n"+ " \n"+ " some example text \n\r"+ " \n\r"+ " \n"+ " other example \n\r"+ " \n"+ " \n"+ " final example \n\r"+ " \n"+ " \n"+ ""; private static final String ENTRY = "\n"+ "\n"+ " entry text \n\r"+ ""; private static final String INTERFACE = "\n"+ " entry text \n\r"+ ""; private static interface EntryInterface { public int getId(); public String getText(); } @Root(name="entry") private static class Entry implements EntryInterface { @Attribute(name="id") private int id; @Element(name="text") private String text; public int getId() { return id; } public String getText() { return text; } } @Root(name="root") private static class EntryList { @ElementList(name="list", type=Entry.class) private List list; @Attribute(name="name") private String name; public Entry getEntry(int index) { return (Entry) list.get(index); } } private Persister serializer; public void setUp() { serializer = new Persister(); } public void testComposite() throws Exception { Entry entry = serializer.read(Entry.class, new StringReader(ENTRY)); assertEquals(entry.id, 12); assertEquals(entry.text, "entry text"); } public void testInterface() throws Exception { EntryInterface entry = serializer.read(EntryInterface.class, new StringReader(INTERFACE)); assertEquals(entry.getId(), 12); assertEquals(entry.getText(), "entry text"); } public void testList() throws Exception { EntryList list = serializer.read(EntryList.class, new StringReader(LIST)); assertEquals(list.name, "example"); assertTrue(list.list instanceof Vector); Entry entry = list.getEntry(0); assertEquals(entry.id, 12); assertEquals(entry.text, "some example text"); entry = list.getEntry(1); assertEquals(entry.id, 34); assertEquals(entry.text, "other example"); entry = list.getEntry(2); assertEquals(entry.id, 56); assertEquals(entry.text, "final example"); } public void testCopy() throws Exception { EntryList list = serializer.read(EntryList.class, new StringReader(LIST)); assertEquals(list.name, "example"); assertTrue(list.list instanceof Vector); Entry entry = new Entry(); entry.id = 1234; entry.text = "replacement"; list.list = new ArrayList(); list.name = "change"; list.list.add(entry); StringWriter writer = new StringWriter(); serializer.write(list, writer); serializer.write(list, System.out); assertTrue(writer.toString().indexOf("java.util.ArrayList") > 0); assertTrue(writer.toString().indexOf("change") > 0); list = serializer.read(EntryList.class, new StringReader(writer.toString())); assertEquals(list.name, "change"); assertTrue(list.list instanceof ArrayList); entry = list.getEntry(0); assertEquals(entry.id, 1234); assertEquals(entry.text, "replacement"); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/ContextualCallbackTest.java0000644000175000017500000000616711342530530031237 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import junit.framework.TestCase; import java.util.Map; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Element; import org.simpleframework.xml.ElementList; import org.simpleframework.xml.Root; import org.simpleframework.xml.core.Commit; import org.simpleframework.xml.core.Complete; import org.simpleframework.xml.core.Persist; import org.simpleframework.xml.core.Persister; import org.simpleframework.xml.core.Validate; public class ContextualCallbackTest extends TestCase { private static final String SOURCE = "\n"+ "\n"+ " complete \n\r"+ ""; @Root(name="root") private static class Entry { @Attribute(name="number", required=false) private int number = 9999; @Attribute(name="flag") private boolean bool; @Element(name="value", required=false) private String value = "default"; private boolean validated; private boolean committed; private boolean persisted; private boolean completed; public Entry(){} @Validate public void validate(Map map) { validated = true; } @Commit public void commit(Map map) { if(validated) { committed = true; } } @Persist public void persist(Map map) { persisted = true; } @Complete public void complete(Map map) { if(persisted) { completed = true; } } public boolean isCommitted() { return committed; } public boolean isValidated() { return validated; } public boolean isPersisted() { return persisted; } public boolean isCompleted() { return completed; } public int getNumber() { return number; } public boolean getFlag() { return bool; } public String getValue() { return value; } } private Persister persister; public void setUp() { persister = new Persister(); } public void testReadCallbacks() throws Exception { Entry entry = persister.read(Entry.class, SOURCE); assertEquals("complete", entry.getValue()); assertEquals(1234, entry.getNumber()); assertEquals(true, entry.getFlag()); assertTrue(entry.isValidated()); assertTrue(entry.isCommitted()); } public void testWriteCallbacks() throws Exception { Entry entry = new Entry(); assertFalse(entry.isCompleted()); assertFalse(entry.isPersisted()); persister.write(entry, System.out); assertEquals("default", entry.getValue()); assertEquals(9999, entry.getNumber()); assertTrue(entry.isPersisted()); assertTrue(entry.isCompleted()); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/TemplateTest.java0000644000175000017500000000434011342530530027236 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import java.io.StringReader; import org.simpleframework.xml.ValidationTestCase; import java.io.StringWriter; import java.util.List; import java.util.Map; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Element; import org.simpleframework.xml.ElementList; import org.simpleframework.xml.Root; import org.simpleframework.xml.core.Commit; import org.simpleframework.xml.core.Persister; public class TemplateTest extends ValidationTestCase { private static final String EXAMPLE = "\n"+ "\n"+ " \n"+ " \n"+ " \n"+ " \n"+ " \n"+ "
\n\r"+ " ${title} \n"+ " ${mail} \n"+ " ${name} \n"+ "
\n"+ "
"; @Root(name="var") private static class Variable { @Attribute(name="name") private String name; @Attribute(name="value") private String value; @Commit public void commit(Map map) { map.put(name, value); } } @Root(name="test") private static class Example { @Attribute(name="name") private String name; @ElementList(name="config", type=Variable.class) private List list; @Element(name="details") private Details details; } private static class Details { @Element(name="title") private String title; @Element(name="mail") private String mail; @Element(name="name") private String name; } private Persister serializer; public void setUp() { serializer = new Persister(); } public void testTemplate() throws Exception { Example example = serializer.read(Example.class, EXAMPLE); assertEquals(example.name, "test"); assertEquals(example.details.title, "Mr"); assertEquals(example.details.mail, "niallg@users.sf.net"); assertEquals(example.details.name, "Niall Gallagher"); validate(example, serializer); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/MethodScannerDefaultTest.java0000644000175000017500000002451611342530530031531 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; import junit.framework.TestCase; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Default; import org.simpleframework.xml.DefaultType; import org.simpleframework.xml.Element; import org.simpleframework.xml.ElementArray; import org.simpleframework.xml.ElementList; import org.simpleframework.xml.ElementMap; import org.simpleframework.xml.Root; public class MethodScannerDefaultTest extends TestCase { @Default(DefaultType.PROPERTY) public static class NoAnnotations { private String[] array; private Map map; private List list; private Date date; private String customer; private String name; private int price; public Date getDate() { return date; } public void setArray(String[] array) { this.array = array; } public String[] getArray() { return array; } public void setMap(Map map) { this.map = map; } public Map getMap() { return map; } public void setList(List list) { this.list = list; } public List getList() { return list; } public void setDate(Date date) { this.date = date; } public String getCustomer() { return customer; } public void setCustomer(String customer) { this.customer = customer; } public String getName() { return name; } public void setName(String name) { this.name = name; } public int getPrice() { return price; } public void setPrice(int price) { this.price = price; } } @Default(DefaultType.PROPERTY) public static class MixedAnnotations { private String[] array; private Map map; private String name; private int value; @Attribute public String getName() { return name; } @Attribute public void setName(String name) { this.name = name; } @Element(data=true) public int getValue() { return value; } @Element(data=true) public void setValue(int value) { this.value = value; } public void setArray(String[] array) { this.array = array; } public String[] getArray() { return array; } public void setMap(Map map) { this.map = map; } public Map getMap() { return map; } } public static class ExtendedAnnotations extends MixedAnnotations { @Element public String[] getArray() { return super.getArray(); } @Element public void setArray(String[] array) { super.setArray(array); } } public void testNoAnnotationsWithNoDefaults() throws Exception { Map map = getContacts(NoAnnotations.class, null); assertTrue(map.isEmpty()); } public void testMixedAnnotationsWithNoDefaults() throws Exception { Map map = getContacts(MixedAnnotations.class, null); assertEquals(map.size(), 2); assertFalse(map.get("name").isReadOnly()); assertFalse(map.get("value").isReadOnly()); assertEquals(int.class, map.get("value").getType()); assertEquals(String.class, map.get("name").getType()); assertEquals(Attribute.class, map.get("name").getAnnotation().annotationType()); assertEquals(Element.class, map.get("value").getAnnotation().annotationType()); assertEquals(Attribute.class, map.get("name").getAnnotation(Attribute.class).annotationType()); assertEquals(Element.class, map.get("value").getAnnotation(Element.class).annotationType()); assertNull(map.get("name").getAnnotation(Root.class)); assertNull(map.get("value").getAnnotation(Root.class)); } public void testExtendedAnnotations() throws Exception { Map map = getContacts(ExtendedAnnotations.class, DefaultType.PROPERTY); assertFalse(map.get("array").isReadOnly()); assertFalse(map.get("map").isReadOnly()); assertFalse(map.get("name").isReadOnly()); assertFalse(map.get("value").isReadOnly()); assertEquals(String[].class, map.get("array").getType()); assertEquals(Map.class, map.get("map").getType()); assertEquals(int.class, map.get("value").getType()); assertEquals(String.class, map.get("name").getType()); assertEquals(Attribute.class, map.get("name").getAnnotation().annotationType()); assertEquals(Element.class, map.get("value").getAnnotation().annotationType()); assertEquals(ElementMap.class, map.get("map").getAnnotation().annotationType()); assertEquals(Element.class, map.get("array").getAnnotation().annotationType()); assertEquals(Attribute.class, map.get("name").getAnnotation(Attribute.class).annotationType()); assertEquals(Element.class, map.get("value").getAnnotation(Element.class).annotationType()); assertEquals(ElementMap.class, map.get("map").getAnnotation(ElementMap.class).annotationType()); assertEquals(Element.class, map.get("array").getAnnotation(Element.class).annotationType()); assertNull(map.get("name").getAnnotation(Root.class)); assertNull(map.get("value").getAnnotation(Root.class)); assertNull(map.get("map").getAnnotation(Root.class)); assertNull(map.get("array").getAnnotation(Root.class)); } public void testMixedAnnotations() throws Exception { Map map = getContacts(MixedAnnotations.class, DefaultType.PROPERTY); assertFalse(map.get("array").isReadOnly()); assertFalse(map.get("map").isReadOnly()); assertFalse(map.get("name").isReadOnly()); assertFalse(map.get("value").isReadOnly()); assertEquals(String[].class, map.get("array").getType()); assertEquals(Map.class, map.get("map").getType()); assertEquals(int.class, map.get("value").getType()); assertEquals(String.class, map.get("name").getType()); assertEquals(Attribute.class, map.get("name").getAnnotation().annotationType()); assertEquals(Element.class, map.get("value").getAnnotation().annotationType()); assertEquals(ElementMap.class, map.get("map").getAnnotation().annotationType()); assertEquals(ElementArray.class, map.get("array").getAnnotation().annotationType()); assertEquals(Attribute.class, map.get("name").getAnnotation(Attribute.class).annotationType()); assertEquals(Element.class, map.get("value").getAnnotation(Element.class).annotationType()); assertEquals(ElementMap.class, map.get("map").getAnnotation(ElementMap.class).annotationType()); assertEquals(ElementArray.class, map.get("array").getAnnotation(ElementArray.class).annotationType()); assertNull(map.get("name").getAnnotation(Root.class)); assertNull(map.get("value").getAnnotation(Root.class)); assertNull(map.get("map").getAnnotation(Root.class)); assertNull(map.get("array").getAnnotation(Root.class)); } public void testNoAnnotations() throws Exception { Map map = getContacts(NoAnnotations.class, DefaultType.PROPERTY); assertFalse(map.get("date").isReadOnly()); assertFalse(map.get("customer").isReadOnly()); assertFalse(map.get("name").isReadOnly()); assertFalse(map.get("price").isReadOnly()); assertFalse(map.get("list").isReadOnly()); assertFalse(map.get("map").isReadOnly()); assertFalse(map.get("array").isReadOnly()); assertEquals(Date.class, map.get("date").getType()); assertEquals(String.class, map.get("customer").getType()); assertEquals(String.class, map.get("name").getType()); assertEquals(int.class, map.get("price").getType()); assertEquals(List.class, map.get("list").getType()); assertEquals(Map.class, map.get("map").getType()); assertEquals(String[].class, map.get("array").getType()); assertEquals(Element.class, map.get("date").getAnnotation().annotationType()); assertEquals(Element.class, map.get("customer").getAnnotation().annotationType()); assertEquals(Element.class, map.get("name").getAnnotation().annotationType()); assertEquals(Element.class, map.get("price").getAnnotation().annotationType()); assertEquals(ElementList.class, map.get("list").getAnnotation().annotationType()); assertEquals(ElementMap.class, map.get("map").getAnnotation().annotationType()); assertEquals(ElementArray.class, map.get("array").getAnnotation().annotationType()); assertEquals(Element.class, map.get("date").getAnnotation(Element.class).annotationType()); assertEquals(Element.class, map.get("customer").getAnnotation(Element.class).annotationType()); assertEquals(Element.class, map.get("name").getAnnotation(Element.class).annotationType()); assertEquals(Element.class, map.get("price").getAnnotation(Element.class).annotationType()); assertEquals(ElementList.class, map.get("list").getAnnotation(ElementList.class).annotationType()); assertEquals(ElementMap.class, map.get("map").getAnnotation(ElementMap.class).annotationType()); assertEquals(ElementArray.class, map.get("array").getAnnotation(ElementArray.class).annotationType()); assertNull(map.get("date").getAnnotation(Root.class)); assertNull(map.get("customer").getAnnotation(Root.class)); assertNull(map.get("name").getAnnotation(Root.class)); assertNull(map.get("price").getAnnotation(Root.class)); assertNull(map.get("list").getAnnotation(Root.class)); assertNull(map.get("map").getAnnotation(Root.class)); assertNull(map.get("array").getAnnotation(Root.class)); } private static Map getContacts(Class type, DefaultType defaultType) throws Exception { MethodScanner scanner = new MethodScanner(type, defaultType); Map map = new HashMap(); for(Contact contact : scanner) { map.put(contact.getName(), contact); } return map; } } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/RequiredTest.java0000644000175000017500000000357211342530530027251 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import java.io.StringReader; import java.util.HashMap; import java.util.Collection; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Element; import org.simpleframework.xml.ElementList; import org.simpleframework.xml.Root; import org.simpleframework.xml.core.Persister; import junit.framework.TestCase; public class RequiredTest extends TestCase { private static final String COMPLETE = "\n"+ "\n"+ " complete \n\r"+ ""; private static final String OPTIONAL = "\n"+ ""; @Root(name="root") private static class Entry { @Attribute(name="number", required=false) private int number = 9999; @Attribute(name="flag") private boolean bool; @Element(name="value", required=false) private String value = "default"; public int getNumber() { return number; } public boolean getFlag() { return bool; } public String getValue() { return value; } } private Persister persister; public void setUp() { persister = new Persister(); } public void testComplete() throws Exception { Entry entry = persister.read(Entry.class, new StringReader(COMPLETE)); assertEquals("complete", entry.getValue()); assertEquals(1234, entry.getNumber()); assertEquals(true, entry.getFlag()); } public void testOptional() throws Exception { Entry entry = persister.read(Entry.class, new StringReader(OPTIONAL)); assertEquals("default", entry.getValue()); assertEquals(9999, entry.getNumber()); assertEquals(true, entry.getFlag()); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/core/DataTest.java0000644000175000017500000001017111342530530026333 0ustar sylvestresylvestrepackage org.simpleframework.xml.core; import java.io.ByteArrayInputStream; import java.io.InputStream; import java.io.StringWriter; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Element; import org.simpleframework.xml.ElementList; import org.simpleframework.xml.Root; import org.simpleframework.xml.ValidationTestCase; import org.simpleframework.xml.util.Dictionary; import org.simpleframework.xml.util.Entry; public class DataTest extends ValidationTestCase { private static final String SOURCE = "\n"+ "\n"+ " \n"+ " \n"+ " \n"+ " \n"+ " { \n"+ " for $text in .//TITLE\n"+ " return $text\n"+ " }\n"+ " \n"+ " ]]>\n"+ " \n"+ " \n"+ " \n"+ " \n"+ " \n"+ " { \n"+ " for $text in .//B\n"+ " return $text\n"+ " }\n"+ " \n"+ " ]]>\n"+ " \n"+ " \n"+ " \n"+ ""; @Root(name="scrape") private static class Scrape { @Attribute(name="section") private String section; @Attribute(name="address") private String address; @ElementList(name="query-list", type=Query.class) private Dictionary list; } @Root(name="query") private static class Query implements Entry { @Attribute(name="type") private String type; @Element(name="data", data=true) private String data; @Attribute private String name; public String getName() { return name; } } private Persister serializer; public void setUp() { serializer = new Persister(); } public void testData() throws Exception { Scrape scrape = serializer.read(Scrape.class, SOURCE); assertEquals(scrape.section, "one"); assertEquals(scrape.address, "http://localhost:9090/"); assertEquals(scrape.list.get("title").type, "text"); assertTrue(scrape.list.get("title").data.indexOf("") > 0); assertEquals(scrape.list.get("news").type, "image"); assertTrue(scrape.list.get("news").data.indexOf("<news>") > 0); validate(scrape, serializer); String news = scrape.list.get("news").data; String title = scrape.list.get("title").data; StringWriter out = new StringWriter(); serializer.write(scrape, out); String text = out.toString(); Scrape copy = serializer.read(Scrape.class, text); assertEquals(news, copy.list.get("news").data); assertEquals(title, copy.list.get("title").data); } public void testDataFromByteStream() throws Exception { byte[] data = SOURCE.getBytes("UTF-8"); InputStream source = new ByteArrayInputStream(data); Scrape scrape = serializer.read(Scrape.class, source); assertEquals(scrape.section, "one"); assertEquals(scrape.address, "http://localhost:9090/"); assertEquals(scrape.list.get("title").type, "text"); assertTrue(scrape.list.get("title").data.indexOf("<title>") > 0); assertEquals(scrape.list.get("news").type, "image"); assertTrue(scrape.list.get("news").data.indexOf("<news>") > 0); validate(scrape, serializer); String news = scrape.list.get("news").data; String title = scrape.list.get("title").data; StringWriter out = new StringWriter(); serializer.write(scrape, out); String text = out.toString(); Scrape copy = serializer.read(Scrape.class, text); assertEquals(news, copy.list.get("news").data); assertEquals(title, copy.list.get("title").data); } } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/core/NamespaceDefaultTest.java��������������������0000644�0001750�0001750�00000005062�11342530527�030674� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.simpleframework.xml.core; import java.io.StringWriter; import org.simpleframework.xml.Element; import org.simpleframework.xml.Namespace; import org.simpleframework.xml.NamespaceList; import org.simpleframework.xml.Root; import org.simpleframework.xml.ValidationTestCase; public class NamespaceDefaultTest extends ValidationTestCase { private static final String SOURCE = "<a xmlns:x='http://domain/x' xmlns='http://domain/z'>\n"+ " <y:b xmlns:y='http://domain/y'>\n"+ " <c xmlns='http://domain/c'>\n"+ " <d xmlns='http://domain/z'>d</d>\n"+ " </c>\n"+ " </y:b>\n"+ "</a>\n"; @Root @NamespaceList({ @Namespace(prefix="x", reference="http://domain/x"), @Namespace(prefix="z", reference="http://domain/z")}) @Namespace(reference="http://domain/z") private static class A { @Element @Namespace(prefix="y", reference="http://domain/y") private B b; } @Root private static class B { @Element @Namespace(reference="http://domain/c") private C c; } @Root private static class C{ @Element @Namespace(reference="http://domain/z") private String d; } public void testScope() throws Exception { Persister persister = new Persister(); StringWriter writer = new StringWriter(); A example = persister.read(A.class, SOURCE); assertEquals(example.b.c.d, "d"); assertElementHasNamespace(SOURCE, "/a", "http://domain/z"); assertElementHasNamespace(SOURCE, "/a/b", "http://domain/y"); assertElementHasNamespace(SOURCE, "/a/b/c", "http://domain/c"); assertElementHasNamespace(SOURCE, "/a/b/c/d", "http://domain/z"); persister.write(example, writer); String text = writer.toString(); System.out.println(text); assertElementHasNamespace(text, "/a", "http://domain/z"); assertElementHasNamespace(text, "/a/b", "http://domain/y"); assertElementHasNamespace(text, "/a/b/c", "http://domain/c"); assertElementHasNamespace(text, "/a/b/c/d", "http://domain/z"); assertElementHasAttribute(text, "/a", "xmlns", "http://domain/z"); assertElementDoesNotHaveAttribute(text, "/a", "xmlns:z", "http://domain/z"); assertElementHasAttribute(text, "/a", "xmlns:x", "http://domain/x"); assertElementHasAttribute(text, "/a/b", "xmlns:y", "http://domain/y"); assertElementHasAttribute(text, "/a/b/c", "xmlns", "http://domain/c"); assertElementHasAttribute(text, "/a/b/c/d", "xmlns", "http://domain/z"); } } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/core/CompatibilityTest.java�����������������������0000644�0001750�0001750�00000016515�11342530530�030303� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.simpleframework.xml.core; import java.util.List; import java.util.Map; import junit.framework.TestCase; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Element; import org.simpleframework.xml.ElementList; import org.simpleframework.xml.ElementMap; import org.simpleframework.xml.Namespace; import org.simpleframework.xml.Root; import org.simpleframework.xml.Version; public class CompatibilityTest extends TestCase { private static final String IMPLICIT_VERSION_1 = "<example>\n"+ " <name>example name</name>\n"+ " <value>example value</value>\n"+ " <list>\n"+ " <entry>entry 1</entry>\n"+ " <entry>entry 2</entry>\n"+ " </list>\n"+ "</example>"; private static final String EXPLICIT_VERSION_1 = "<example version='1.0'>\n"+ " <name>example name</name>\n"+ " <value>example value</value>\n"+ " <list>\n"+ " <entry>entry 1</entry>\n"+ " <entry>entry 2</entry>\n"+ " </list>\n"+ "</example>"; private static final String INVALID_EXPLICIT_VERSION_1 = "<example version='1.0'>\n"+ " <name>example name</name>\n"+ " <value>example value</value>\n"+ " <list>\n"+ " <entry>entry 1</entry>\n"+ " <entry>entry 2</entry>\n"+ " </list>\n"+ " <address>example address</address>\n"+ "</example>"; private static final String INVALID_IMPLICIT_VERSION_1 = "<example>\n"+ " <name>example name</name>\n"+ " <value>example value</value>\n"+ "</example>"; private static final String VALID_EXPLICIT_VERSION_1_1 = "<example version='1.1'>\n"+ " <name>example name</name>\n"+ " <value>example value</value>\n"+ " <address>example address</address>\n"+ " <list>\n"+ " <entry>entry 1</entry>\n"+ " <entry>entry 2</entry>\n"+ " </list>\n"+ "</example>"; public static interface Example { public double getVersion(); public String getName(); public String getValue(); } @Root(name="example") public static class Example_v1 implements Example { @Version private double version; @Element private String name; @Element private String value; @ElementList private List<String> list; public double getVersion() { return version; } public String getName() { return name; } public String getValue() { return value; } } private static final String VALID_EXPLICIT_VERSION_2 = "<example version='2.0' key='value'>\n"+ " <name>example name</name>\n"+ " <value>example value</value>\n"+ " <map>\n"+ " <entry>\n"+ " <key>key 1</key>\n"+ " <value>value 1</value>\n"+ " </entry>\n"+ " <entry>\n"+ " <key>key 1</key>\n"+ " <value>value 1</value>\n"+ " </entry>\n"+ " </map>\n"+ "</example>"; private static final String ACCEPTIBLE_INVALID_VERSION_1 = "<example>\n"+ " <name>example name</name>\n"+ " <value>example value</value>\n"+ "</example>"; private static final String INVALID_EXPLICIT_VERSION_2 = "<example version='2.0'>\n"+ " <name>example name</name>\n"+ " <value>example value</value>\n"+ " <map>\n"+ " <entry>\n"+ " <key>key 1</key>\n"+ " <value>value 1</value>\n"+ " </entry>\n"+ " <entry>\n"+ " <key>key 1</key>\n"+ " <value>value 1</value>\n"+ " </entry>\n"+ " </map>\n"+ "</example>"; @Root(name="example") public static class Example_v2 implements Example { @Version(revision=2.0) @Namespace(prefix="ver", reference="http://www.domain.com/version") private double version; @Element private String name; @Element private String value; @ElementMap private Map<String, String> map; @Attribute private String key; public double getVersion() { return version; } public String getKey() { return key; } public String getName() { return name; } public String getValue() { return value; } } @Root(name="example") public static class Example_v3 implements Example { @Version(revision=3.0) @Namespace(prefix="ver", reference="http://www.domain.com/version") private double version; @Element private String name; @Element private String value; @ElementMap private Map<String, String> map; @ElementList private List<String> list; @Attribute private String key; public double getVersion() { return version; } public String getKey() { return key; } public String getName() { return name; } public String getValue() { return value; } } public void testCompatibility() throws Exception { Persister persister = new Persister(); Example example = persister.read(Example_v1.class, IMPLICIT_VERSION_1); boolean invalid = false; assertEquals(example.getVersion(), 1.0); assertEquals(example.getName(), "example name"); assertEquals(example.getValue(), "example value"); example = persister.read(Example_v1.class, EXPLICIT_VERSION_1); assertEquals(example.getVersion(), 1.0); assertEquals(example.getName(), "example name"); assertEquals(example.getValue(), "example value"); try { invalid = false; example = persister.read(Example_v1.class, INVALID_EXPLICIT_VERSION_1); }catch(Exception e) { e.printStackTrace(); invalid = true; } assertTrue(invalid); try { invalid = false; example = persister.read(Example_v1.class, INVALID_IMPLICIT_VERSION_1); }catch(Exception e) { e.printStackTrace(); invalid = true; } assertTrue(invalid); example = persister.read(Example_v1.class, VALID_EXPLICIT_VERSION_1_1); assertEquals(example.getVersion(), 1.1); assertEquals(example.getName(), "example name"); assertEquals(example.getValue(), "example value"); Example_v2 example2 = persister.read(Example_v2.class, VALID_EXPLICIT_VERSION_2); assertEquals(example2.getVersion(), 2.0); assertEquals(example2.getName(), "example name"); assertEquals(example2.getValue(), "example value"); assertEquals(example2.getKey(), "value"); example2 = persister.read(Example_v2.class, IMPLICIT_VERSION_1); assertEquals(example2.getVersion(), 1.0); assertEquals(example2.getName(), "example name"); assertEquals(example2.getValue(), "example value"); assertEquals(example2.getKey(), null); example2 = persister.read(Example_v2.class, ACCEPTIBLE_INVALID_VERSION_1); assertEquals(example2.getVersion(), 1.0); assertEquals(example2.getName(), "example name"); assertEquals(example2.getValue(), "example value"); assertEquals(example2.getKey(), null); try { invalid = false; example = persister.read(Example_v2.class, INVALID_EXPLICIT_VERSION_2); }catch(Exception e) { e.printStackTrace(); invalid = true; } assertTrue(invalid); } } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/core/VersionTest.java�����������������������������0000644�0001750�0001750�00000007505�11342530530�027116� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.simpleframework.xml.core; import java.lang.reflect.Constructor; import junit.framework.TestCase; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Element; import org.simpleframework.xml.Namespace; import org.simpleframework.xml.Root; import org.simpleframework.xml.Serializer; import org.simpleframework.xml.Version; import org.simpleframework.xml.strategy.Value; public class VersionTest extends TestCase { private static final String VERSION_1 = "<?xml version=\"1.0\"?>\n"+ "<Example version='1.0'>\n"+ " <text>text value</text> \n\r"+ "</Example>"; private static final String VERSION_2 = "<?xml version=\"1.0\"?>\n"+ "<Example version='2.0'>\n"+ " <name>example name</name> \n\r"+ " <value>text value</value> \n"+ " <entry name='example'>\n"+ " <value>text value</value> \n"+ " </entry>\n"+ " <ignore>ignore this element</ignore>\n"+ "</Example>"; public interface Versionable { public double getVersion(); } @Root(name="Example") private static abstract class Example implements Versionable { @Version @Namespace(prefix="prefix", reference="http://www.domain.com/reference") private double version; public double getVersion() { return version; } public abstract String getValue(); } private static class Example1 extends Example { @Element(name="text") private String text; public String getValue() { return text; } } private static class Example2 extends Example { @Element(name="name") private String name; @Element(name="value") private String value; @Element(name="entry") private Entry entry; public String getValue() { return value; } } private static class Entry { @Attribute(name="name") private String name; @Element(name="value") private String value; } public static class SimpleType implements Value{ private Class type; public SimpleType(Class type) { this.type = type; } public int getLength() { return 0; } public Object getValue() { try { Constructor method = type.getDeclaredConstructor(); if(!method.isAccessible()) { method.setAccessible(true); } return method.newInstance(); }catch(Exception e) { throw new RuntimeException(e); } } public void setValue(Object value) { } public boolean isReference() { return false; } public Class getType() { return type; } } public void testVersion1() throws Exception { Serializer persister = new Persister(); Example example = persister.read(Example1.class, VERSION_1); assertTrue(example instanceof Example1); assertEquals(example.getValue(), "text value"); assertEquals(example.version, 1.0); persister.write(example, System.out); assertEquals(example.getValue(), "text value"); assertEquals(example.version, 1.0); } public void testVersion2() throws Exception { Serializer persister = new Persister(); Example example = persister.read(Example2.class, VERSION_2); assertTrue(example instanceof Example2); assertEquals(example.getValue(), "text value"); assertEquals(example.version, 2.0); persister.write(example, System.out); assertEquals(example.getValue(), "text value"); assertEquals(example.version, 2.0); } } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/core/MapNullTest.java�����������������������������0000644�0001750�0001750�00000026352�11342530530�027042� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.simpleframework.xml.core; import java.io.StringWriter; import java.math.BigDecimal; import java.util.HashMap; import java.util.Map; import org.simpleframework.xml.Element; import org.simpleframework.xml.ElementMap; import org.simpleframework.xml.Root; import org.simpleframework.xml.Serializer; import org.simpleframework.xml.ValidationTestCase; import org.simpleframework.xml.core.Persister; public class MapNullTest extends ValidationTestCase { private static final String EMPTY_AS_NULL = "<complexMap>\r\n" + " <map class='java.util.HashMap'>\r\n" + " <entry>\r\n" + " <mapEntry>\r\n" + " <name>3</name>\r\n" + " <value>3</value>\r\n" + " </mapEntry>\r\n" + " </entry>\r\n" + " <entry>\r\n" + " <compositeKey>\r\n" + " <name>name.1</name>\r\n" + " <address>address.1</address>\r\n" + " </compositeKey>\r\n" + " <mapEntry>\r\n" + " <name>1</name>\r\n" + " <value>1</value>\r\n" + " </mapEntry>\r\n" + " </entry>\r\n" + " <entry>\r\n" + " <compositeKey>\r\n" + " <name>name.2</name>\r\n" + " <address>address.2</address>\r\n" + " </compositeKey>\r\n" + " <mapEntry>\r\n" + " <name>2</name>\r\n" + " <value>2</value>\r\n" + " </mapEntry>\r\n" + " </entry>\r\n" + " <entry>\r\n" + " <compositeKey>\r\n" + " <name>name.4</name>\r\n" + " <address>address.4</address>\r\n" + " </compositeKey>\r\n" + " </entry>\r\n" + " </map>\r\n" + "</complexMap>\r\n"; private static final String EMPTY_COMPOSITE_VALUE = "<complexMap>\r\n" + " <map class='java.util.HashMap'>\r\n" + " <entry>\r\n" + " <compositeKey>\r\n" + " <name>name.4</name>\r\n" + " <address>address.4</address>\r\n" + " </compositeKey>\r\n" + " </entry>\r\n" + " </map>\r\n" + "</complexMap>\r\n"; private static final String EMPTY_COMPOSITE_BLANK_VALUE = "<complexMap>\r\n" + " <map class='java.util.HashMap'>\r\n" + " <entry>\r\n" + " <compositeKey>\r\n" + " <name>name.4</name>\r\n" + " <address>address.4</address>\r\n" + " </compositeKey>\r\n" + " <mapEntry/>\r\n" + " </entry>\r\n" + " </map>\r\n" + "</complexMap>\r\n"; private static final String EMPTY_COMPOSITE_KEY = "<complexMap>\r\n" + " <map class='java.util.HashMap'>\r\n" + " <entry>\r\n" + " <mapEntry>\r\n" + " <name>3</name>\r\n" + " <value>3</value>\r\n" + " </mapEntry>\r\n" + " </entry>\r\n" + " </map>\r\n" + "</complexMap>\r\n"; private static final String EMPTY_COMPOSITE_BLANK_KEY = "<complexMap>\r\n" + " <map class='java.util.HashMap'>\r\n" + " <entry>\r\n" + " <compositeKey/>\r\n" + " <mapEntry>\r\n" + " <name>3</name>\r\n" + " <value>3</value>\r\n" + " </mapEntry>\r\n" + " </entry>\r\n" + " </map>\r\n" + "</complexMap>\r\n"; private static final String EMPTY_PRIMITIVE_VALUE = "<primitiveMap>\r\n" + " <table class='java.util.HashMap'>\r\n" + " <entry>\r\n" + " <string>example</string>\r\n" + " </entry>\r\n" + " </table>\r\n" + "</primitiveMap>\r\n"; private static final String EMPTY_PRIMITIVE_BLANK_VALUE = "<primitiveMap>\r\n" + " <table class='java.util.HashMap'>\r\n" + " <entry>\r\n" + " <string>example</string>\r\n" + " <bigDecimal/>\r\n" + " </entry>\r\n" + " </table>\r\n" + "</primitiveMap>\r\n"; private static final String EMPTY_PRIMITIVE_KEY = "<primitiveMap>\r\n" + " <table class='java.util.HashMap'>\r\n" + " <entry>\r\n" + " <bigDecimal>4</bigDecimal>\r\n" + " </entry>\r\n" + " </table>\r\n" + "</primitiveMap>\r\n"; private static final String EMPTY_PRIMITIVE_BLANK_KEY = "<primitiveMap>\r\n" + " <table class='java.util.HashMap'>\r\n" + " <entry>\r\n" + " <string/>\r\n" + " <bigDecimal>4</bigDecimal>\r\n" + " </entry>\r\n" + " </table>\r\n" + "</primitiveMap>\r\n"; @Root private static class MapEntry { @Element private String name; @Element private String value; public MapEntry() { super(); } public MapEntry(String name, String value) { this.name = name; this.value = value; } public boolean equals(Object other) { if(other instanceof MapEntry) { MapEntry entry = (MapEntry) other; if(entry.value.equals(value)) { return entry.name.equals(name); } } return false; } } @Root private static class ComplexMap { @ElementMap private Map<CompositeKey, MapEntry> map; public ComplexMap() { this.map = new HashMap<CompositeKey, MapEntry>(); } public String getValue(CompositeKey key) { MapEntry entry = map.get(key); if(entry != null) { return entry.value; } return null; } } @Root private static class CompositeKey { @Element private String name; @Element private String address; public CompositeKey() { super(); } public CompositeKey(String name, String address) { this.name = name; this.address = address; } public int hashCode() { return name.hashCode() + address.hashCode(); } public boolean equals(Object item) { if(item instanceof CompositeKey) { CompositeKey other = (CompositeKey)item; return other.name.equals(name) && other.address.equals(address); } return false; } } @Root private static class PrimitiveMap { @ElementMap(name="table") private Map<String, BigDecimal> map; public PrimitiveMap() { this.map = new HashMap<String, BigDecimal>(); } public BigDecimal getValue(String name) { return map.get(name); } } public void testEmptyCompositeValue() throws Exception { Serializer serializer = new Persister(); ComplexMap value = serializer.read(ComplexMap.class, EMPTY_COMPOSITE_VALUE); boolean valid = serializer.validate(ComplexMap.class, EMPTY_COMPOSITE_VALUE); assertTrue(valid); validate(value, serializer); } public void testEmptyCompositeBlankValue() throws Exception { Serializer serializer = new Persister(); ComplexMap value = serializer.read(ComplexMap.class, EMPTY_COMPOSITE_BLANK_VALUE); boolean valid = serializer.validate(ComplexMap.class, EMPTY_COMPOSITE_BLANK_VALUE); assertTrue(valid); validate(value, serializer); } public void testEmptyCompositeKey() throws Exception { Serializer serializer = new Persister(); ComplexMap value = serializer.read(ComplexMap.class, EMPTY_COMPOSITE_KEY); boolean valid = serializer.validate(ComplexMap.class, EMPTY_COMPOSITE_KEY); assertTrue(valid); validate(value, serializer); } public void testEmptyCompositeBlankKey() throws Exception { Serializer serializer = new Persister(); ComplexMap value = serializer.read(ComplexMap.class, EMPTY_COMPOSITE_BLANK_KEY); boolean valid = serializer.validate(ComplexMap.class, EMPTY_COMPOSITE_BLANK_KEY); assertTrue(valid); validate(value, serializer); } public void testEmptyPrimitiveValue() throws Exception { Serializer serializer = new Persister(); PrimitiveMap value = serializer.read(PrimitiveMap.class, EMPTY_PRIMITIVE_VALUE); boolean valid = serializer.validate(PrimitiveMap.class, EMPTY_PRIMITIVE_VALUE); assertTrue(valid); validate(value, serializer); } public void testEmptyPrimitiveBlankValue() throws Exception { Serializer serializer = new Persister(); PrimitiveMap value = serializer.read(PrimitiveMap.class, EMPTY_PRIMITIVE_BLANK_VALUE); boolean valid = serializer.validate(PrimitiveMap.class, EMPTY_PRIMITIVE_BLANK_VALUE); assertTrue(valid); validate(value, serializer); } public void testEmptyPrimitiveKey() throws Exception { Serializer serializer = new Persister(); PrimitiveMap value = serializer.read(PrimitiveMap.class, EMPTY_PRIMITIVE_KEY); boolean valid = serializer.validate(PrimitiveMap.class, EMPTY_PRIMITIVE_KEY); assertTrue(valid); validate(value, serializer); } public void testEmptyPrimitiveBlankKey() throws Exception { Serializer serializer = new Persister(); PrimitiveMap value = serializer.read(PrimitiveMap.class, EMPTY_PRIMITIVE_BLANK_KEY); boolean valid = serializer.validate(PrimitiveMap.class, EMPTY_PRIMITIVE_BLANK_KEY); assertTrue(valid); validate(value, serializer); } public void testNullValue() throws Exception { Serializer serializer = new Persister(); PrimitiveMap primitiveMap = new PrimitiveMap(); primitiveMap.map.put("a", new BigDecimal(1)); primitiveMap.map.put("b", new BigDecimal(2)); primitiveMap.map.put("c", null); primitiveMap.map.put(null, new BigDecimal(4)); StringWriter out = new StringWriter(); serializer.write(primitiveMap, out); primitiveMap = serializer.read(PrimitiveMap.class, out.toString()); assertEquals(primitiveMap.map.get(null), new BigDecimal(4)); assertEquals(primitiveMap.map.get("c"), null); assertEquals(primitiveMap.map.get("a"), new BigDecimal(1)); assertEquals(primitiveMap.map.get("b"), new BigDecimal(2)); validate(primitiveMap, serializer); ComplexMap complexMap = new ComplexMap(); complexMap.map.put(new CompositeKey("name.1", "address.1"), new MapEntry("1", "1")); complexMap.map.put(new CompositeKey("name.2", "address.2"), new MapEntry("2", "2")); complexMap.map.put(null, new MapEntry("3", "3")); complexMap.map.put(new CompositeKey("name.4", "address.4"), null); validate(complexMap, serializer); ComplexMap emptyNull = serializer.read(ComplexMap.class, EMPTY_AS_NULL); assertEquals(emptyNull.getValue(new CompositeKey("name.1", "address.1")), "1"); assertEquals(emptyNull.getValue(new CompositeKey("name.2", "address.2")), "2"); assertEquals(emptyNull.getValue(null), "3"); assertEquals(emptyNull.getValue(new CompositeKey("name.4", "address.4")), null); validate(emptyNull, serializer); } // TODO test the null values and exceptions with the map } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/core/CompositeTest.java���������������������������0000644�0001750�0001750�00000007057�11342530530�027435� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.simpleframework.xml.core; import java.util.List; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Element; import org.simpleframework.xml.ElementList; import org.simpleframework.xml.Root; import org.simpleframework.xml.Text; import org.simpleframework.xml.ValidationTestCase; import org.simpleframework.xml.core.Persister; public class CompositeTest extends ValidationTestCase { private static final String SOURCE = "<compositeObject>" + " <interfaceEntry name='name.1' class='org.simpleframework.xml.core.CompositeTest$CompositeEntry'>value.1</interfaceEntry>" + " <objectEntry name='name.2' class='org.simpleframework.xml.core.CompositeTest$CompositeEntry'>value.2</objectEntry>" + " <interfaceList>" + " <interfaceEntry name='a' class='org.simpleframework.xml.core.CompositeTest$CompositeEntry'>a</interfaceEntry>" + " <interfaceEntry name='b' class='org.simpleframework.xml.core.CompositeTest$CompositeEntry'>b</interfaceEntry>" + " </interfaceList>" + " <objectList>" + " <objectEntry name='a' class='org.simpleframework.xml.core.CompositeTest$CompositeEntry'>a</objectEntry>" + " <objectEntry name='b' class='org.simpleframework.xml.core.CompositeTest$CompositeEntry'>b</objectEntry>" + " </objectList>" + "</compositeObject>"; private static interface Entry { public String getName(); public String getValue(); } @Root public static class CompositeEntry implements Entry { @Attribute private String name; @Text private String value; public String getName() { return name; } public String getValue() { return value; } } @Root private static class CompositeObject { @ElementList private List<Entry> interfaceList; @ElementList private List<Object> objectList; @Element private Entry interfaceEntry; @Element private Object objectEntry; public CompositeEntry getInterface() { return (CompositeEntry) interfaceEntry; } public CompositeEntry getObject() { return (CompositeEntry) objectEntry; } public List<Entry> getInterfaceList() { return interfaceList; } public List<Object> getObjectList() { return objectList; } } public void testComposite() throws Exception { Persister persister = new Persister(); CompositeObject object = persister.read(CompositeObject.class, SOURCE); CompositeEntry objectEntry = object.getObject(); CompositeEntry interfaceEntry = object.getInterface(); assertEquals(interfaceEntry.getName(), "name.1"); assertEquals(interfaceEntry.getName(), "name.1"); assertEquals(objectEntry.getName(), "name.2"); assertEquals(objectEntry.getValue(), "value.2"); List<Entry> interfaceList = object.getInterfaceList(); List<Object> objectList = object.getObjectList(); assertEquals(interfaceList.get(0).getName(), "a"); assertEquals(interfaceList.get(0).getValue(), "a"); assertEquals(interfaceList.get(1).getName(), "b"); assertEquals(interfaceList.get(1).getValue(), "b"); assertEquals(((Entry)objectList.get(0)).getName(), "a"); assertEquals(((Entry)objectList.get(0)).getName(), "a"); assertEquals(((Entry)objectList.get(1)).getName(), "b"); assertEquals(((Entry)objectList.get(1)).getName(), "b"); } } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/core/StackOverflowTest.java�����������������������0000644�0001750�0001750�00000004353�11342530530�030260� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.simpleframework.xml.core; import java.util.ArrayList; import java.util.List; import org.simpleframework.xml.Element; import org.simpleframework.xml.ElementList; import org.simpleframework.xml.Root; import org.simpleframework.xml.ValidationTestCase; public class StackOverflowTest extends ValidationTestCase { private static final int ITERATIONS = 1000; private static final String NEW_BENEFIT = "<newBenefit>"+ " <office>AAAAA</office>"+ " <recordNumber>1046</recordNumber>"+ " <type>A</type>"+ "</newBenefit>"; private static final String BENEFIT_MUTATION = "<benefitMutation>"+ " <office>AAAAA</office>"+ " <recordNumber>1046</recordNumber>"+ " <type>A</type>"+ " <comment>comment</comment>"+ "</benefitMutation>"; @Root public static class Delivery { @ElementList(inline = true, required = false, name = "newBenefit") private List<NewBenefit> listNewBenefit = new ArrayList<NewBenefit>(); @ElementList(inline = true, required = false, name = "benefitMutation") private List<BenefitMutation> listBenefitMutation = new ArrayList<BenefitMutation>(); } public static class NewBenefit { @Element private String office; @Element private String recordNumber; @Element private String type; } public static class BenefitMutation extends NewBenefit { @Element(required = false) private String comment; } public void testStackOverflow() throws Exception { StringBuilder builder = new StringBuilder(); Persister persister = new Persister(); builder.append("<delivery>"); boolean isNewBenefit = true; for(int i = 0; i < ITERATIONS; i++) { String text = null; if(isNewBenefit) { text = NEW_BENEFIT; } else { text = BENEFIT_MUTATION; } isNewBenefit = !isNewBenefit ; builder.append(text); } builder.append("</delivery>"); Delivery delivery = persister.read(Delivery.class, builder.toString()); assertEquals(delivery.listBenefitMutation.size() + delivery.listNewBenefit.size(), ITERATIONS); validate(persister, delivery); } } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/core/NamespaceScopeTest.java����������������������0000644�0001750�0001750�00000003726�11342530530�030360� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.simpleframework.xml.core; import java.io.StringWriter; import org.simpleframework.xml.Element; import org.simpleframework.xml.Namespace; import org.simpleframework.xml.Root; import org.simpleframework.xml.ValidationTestCase; public class NamespaceScopeTest extends ValidationTestCase { private static final String SOURCE = "<a xmlns='http://domain/a'>\n"+ " <pre:b xmlns:pre='http://domain/b'>\n"+ " <c>c</c>\n"+ " <d xmlns=''>\n"+ " <e>e</e>\n"+ " </d>\n"+ " </pre:b>\n"+ "</a>"; @Root @Namespace(reference="http://domain/a") private static class A { @Element @Namespace(prefix="pre", reference="http://domain/b") private B b; } @Root private static class B { @Element private String c; @Element @Namespace private D d; } @Root private static class D{ @Element private String e; } public void testScope() throws Exception { Persister persister = new Persister(); StringWriter writer = new StringWriter(); A example = persister.read(A.class, SOURCE); assertEquals(example.b.c, "c"); assertEquals(example.b.d.e, "e"); assertElementHasNamespace(SOURCE, "/a", "http://domain/a"); assertElementHasNamespace(SOURCE, "/a/b", "http://domain/b"); assertElementHasNamespace(SOURCE, "/a/b/c", "http://domain/a"); assertElementHasNamespace(SOURCE, "/a/b/d", null); assertElementHasNamespace(SOURCE, "/a/b/d/e", null); persister.write(example, writer); String text = writer.toString(); System.out.println(text); assertElementHasNamespace(text, "/a", "http://domain/a"); assertElementHasNamespace(text, "/a/b", "http://domain/b"); assertElementHasNamespace(text, "/a/b/c", "http://domain/a"); assertElementHasNamespace(text, "/a/b/d", null); assertElementHasNamespace(text, "/a/b/d/e", null); } } ������������������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/core/ArrayTest.java�������������������������������0000644�0001750�0001750�00000036255�11342530527�026561� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.simpleframework.xml.core; import java.io.StringWriter; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.ElementArray; import org.simpleframework.xml.Root; import org.simpleframework.xml.core.InstantiationException; import org.simpleframework.xml.core.Persister; import org.simpleframework.xml.ValidationTestCase; public class ArrayTest extends ValidationTestCase { private static final String SOURCE = "<?xml version=\"1.0\"?>\n"+ "<root>\n"+ " <array length='5'>\n\r"+ " <entry value='entry one'/> \n\r"+ " <entry value='entry two'/> \n\r"+ " <entry value='entry three'/> \n\r"+ " <entry value='entry four'/> \n\r"+ " <entry value='entry five'/> \n\r"+ " </array>\n\r"+ "</root>"; private static final String PRIMITIVE = "<?xml version=\"1.0\"?>\n"+ "<root>\n"+ " <array length='5'>\n\r"+ " <text>entry one</text> \n\r"+ " <text>entry two</text> \n\r"+ " <text>entry three</text> \n\r"+ " <text>entry four</text> \n\r"+ " <text>entry five</text> \n\r"+ " </array>\n\r"+ "</root>"; private static final String PRIMITIVE_INT = "<?xml version=\"1.0\"?>\n"+ "<root>\n"+ " <array length='5'>\n\r"+ " <text>1</text> \n\r"+ " <text>2</text> \n\r"+ " <text>3</text> \n\r"+ " <text>4</text> \n\r"+ " <text>5</text> \n\r"+ " </array>\n\r"+ "</root>"; private static final String PRIMITIVE_MULTIDIMENSIONAL_INT = "<?xml version=\"1.0\"?>\n"+ "<root>\n"+ " <array length='5'>\n\r"+ " <text> 1,2,3, 4, 5, 6</text> \n\r"+ " <text>2, 4, 6, 8, 10, 12</text> \n\r"+ " <text>3, 6 ,9,12, 15, 18</text> \n\r"+ " <text>4, 8, 12, 16, 20, 24</text> \n\r"+ " <text>5, 10,15,20,25,30</text> \n\r"+ " </array>\n\r"+ "</root>"; private static final String DEFAULT_PRIMITIVE = "<?xml version=\"1.0\"?>\n"+ "<root>\n"+ " <array length='5'>\n\r"+ " <string>entry one</string> \n\r"+ " <string>entry two</string> \n\r"+ " <string>entry three</string> \n\r"+ " <string>entry four</string> \n\r"+ " <string>entry five</string> \n\r"+ " </array>\n\r"+ "</root>"; private static final String COMPOSITE = "<?xml version=\"1.0\"?>\n"+ "<root>\n"+ " <array length='5'>\n\r"+ " <text value='entry one'/> \n\r"+ " <text value='entry two'/> \n\r"+ " <text value='entry three'/> \n\r"+ " <text value='entry four'/> \n\r"+ " <text value='entry five'/> \n\r"+ " </array>\n\r"+ "</root>"; private static final String DEFAULT_COMPOSITE = "<?xml version=\"1.0\"?>\n"+ "<root>\n"+ " <array length='5'>\n\r"+ " <text value='entry one'/> \n\r"+ " <text value='entry two'/> \n\r"+ " <text value='entry three'/> \n\r"+ " <text value='entry four'/> \n\r"+ " <text value='entry five'/> \n\r"+ " </array>\n\r"+ "</root>"; private static final String PRIMITIVE_NULL = "<?xml version=\"1.0\"?>\n"+ "<root>\n"+ " <array length='5'>\n\r"+ " <text/> \n\r"+ " <text>entry two</text> \n\r"+ " <text>entry three</text> \n\r"+ " <text/> \n\r"+ " <text/> \n\r"+ " </array>\n\r"+ "</root>"; private static final String COMPOSITE_NULL = "<?xml version=\"1.0\"?>\n"+ "<root>\n"+ " <array length='5'>\n\r"+ " <entry/>\r\n"+ " <entry value='entry two'/> \n\r"+ " <entry/>\r\n"+ " <entry/>\r\n"+ " <entry value='entry five'/> \n\r"+ " </array>\n\r"+ "</root>"; private static final String CHARACTER = "<?xml version=\"1.0\"?>\n"+ "<root>\n"+ " <array length='5'>\n\r"+ " <char>a</char> \n\r"+ " <char>b</char> \n\r"+ " <char>c</char> \n\r"+ " <char>d</char> \n\r"+ " <char>e</char> \n\r"+ " </array>\n\r"+ "</root>"; @Root(name="root") private static class ArrayExample { @ElementArray(name="array", entry="entry") public Text[] array; } @Root(name="root") private static class BadArrayExample { @ElementArray(name="array", entry="entry") public Text array; } @Root(name="text") private static class Text { @Attribute(name="value") public String value; public Text() { super(); } public Text(String value) { this.value = value; } } @Root(name="text") private static class ExtendedText extends Text { public ExtendedText() { super(); } public ExtendedText(String value) { super(value); } } @Root(name="root") private static class PrimitiveArrayExample { @ElementArray(name="array", entry="text") private String[] array; } @Root(name="root") private static class PrimitiveIntegerArrayExample { @ElementArray(name="array", entry="text") private int[] array; } @Root(name="root") private static class PrimitiveMultidimensionalIntegerArrayExample { @ElementArray(name="array", entry="text") private int[][] array; } @Root(name="root") private static class DefaultPrimitiveArrayExample { @ElementArray private String[] array; } @Root(name="root") private static class ParentCompositeArrayExample { @ElementArray(name="array", entry="entry") private Text[] array; } @Root(name="root") private static class DefaultCompositeArrayExample { @ElementArray private Text[] array; } @Root(name="root") private static class CharacterArrayExample { @ElementArray(name="array", entry="char") private char[] array; } @Root(name="root") private static class DifferentArrayExample { @ElementArray(name="array", entry="entry") private Text[] array; public DifferentArrayExample() { this.array = new Text[] { new ExtendedText("one"), null, null, new ExtendedText("two"), null, new ExtendedText("three") }; } } private Persister serializer; public void setUp() { serializer = new Persister(); } public void testExample() throws Exception { ArrayExample example = serializer.read(ArrayExample.class, SOURCE); assertEquals(example.array.length, 5); assertEquals(example.array[0].value, "entry one"); assertEquals(example.array[1].value, "entry two"); assertEquals(example.array[2].value, "entry three"); assertEquals(example.array[3].value, "entry four"); assertEquals(example.array[4].value, "entry five"); } public void testBadExample() throws Exception { boolean success = false; try { BadArrayExample example = serializer.read(BadArrayExample.class, SOURCE); } catch(InstantiationException e) { success = true; } assertTrue(success); } public void testWriteArray() throws Exception { ArrayExample example = new ArrayExample(); example.array = new Text[100]; for(int i = 0; i < example.array.length; i++) { example.array[i] = new Text(String.format("index %s", i)); } validate(example, serializer); StringWriter writer = new StringWriter(); serializer.write(example, writer); String content = writer.toString(); assertXpathExists("/root/array[@length='100']", content); assertXpathExists("/root/array/entry[1][@value='index 0']", content); assertXpathExists("/root/array/entry[100][@value='index 99']", content); ArrayExample deserialized = serializer.read(ArrayExample.class, content); assertEquals(deserialized.array.length, example.array.length); // Ensure serialization maintains exact content for(int i = 0; i < deserialized.array.length; i++) { assertEquals(deserialized.array[i].value, example.array[i].value); } for(int i = 0; i < example.array.length; i++) { if(i % 2 == 0) { example.array[i] = null; } } validate(example, serializer); StringWriter oddOnly = new StringWriter(); serializer.write(example, oddOnly); content = oddOnly.toString(); assertXpathExists("/root/array[@length='100']", content); assertXpathNotExists("/root/array/entry[1][@value='index 0']", content); assertXpathExists("/root/array/entry[2][@value='index 1']", content); assertXpathNotExists("/root/array/entry[3][@value='index 2']", content); assertXpathExists("/root/array/entry[100][@value='index 99']", content); deserialized = serializer.read(ArrayExample.class, content); for(int i = 0, j = 0; i < example.array.length; i++) { if(i % 2 != 0) { assertEquals(example.array[i].value, deserialized.array[i].value); } else { assertNull(example.array[i]); assertNull(deserialized.array[i]); } } } public void testPrimitive() throws Exception { PrimitiveArrayExample example = serializer.read(PrimitiveArrayExample.class, PRIMITIVE); assertEquals(example.array.length, 5); assertEquals(example.array[0], "entry one"); assertEquals(example.array[1], "entry two"); assertEquals(example.array[2], "entry three"); assertEquals(example.array[3], "entry four"); assertEquals(example.array[4], "entry five"); validate(example, serializer); } public void testPrimitiveInteger() throws Exception { PrimitiveIntegerArrayExample example = serializer.read(PrimitiveIntegerArrayExample.class, PRIMITIVE_INT); assertEquals(example.array.length, 5); assertEquals(example.array[0], 1); assertEquals(example.array[1], 2); assertEquals(example.array[2], 3); assertEquals(example.array[3], 4); assertEquals(example.array[4], 5); validate(example, serializer); } public void testPrimitiveMultidimensionalInteger() throws Exception { PrimitiveMultidimensionalIntegerArrayExample example = serializer.read(PrimitiveMultidimensionalIntegerArrayExample.class, PRIMITIVE_MULTIDIMENSIONAL_INT); assertEquals(example.array.length, 5); assertEquals(example.array[0][0], 1); assertEquals(example.array[0][1], 2); assertEquals(example.array[0][2], 3); assertEquals(example.array[0][3], 4); assertEquals(example.array[0][4], 5); assertEquals(example.array[0][5], 6); assertEquals(example.array[1][0], 2); assertEquals(example.array[1][1], 4); assertEquals(example.array[1][2], 6); assertEquals(example.array[1][3], 8); assertEquals(example.array[1][4], 10); assertEquals(example.array[1][5], 12); assertEquals(example.array[2][0], 3); assertEquals(example.array[2][1], 6); assertEquals(example.array[2][2], 9); assertEquals(example.array[2][3], 12); assertEquals(example.array[2][4], 15); assertEquals(example.array[2][5], 18); assertEquals(example.array[3][0], 4); assertEquals(example.array[3][1], 8); assertEquals(example.array[3][2], 12); assertEquals(example.array[3][3], 16); assertEquals(example.array[3][4], 20); assertEquals(example.array[3][5], 24); assertEquals(example.array[4][0], 5); assertEquals(example.array[4][1], 10); assertEquals(example.array[4][2], 15); assertEquals(example.array[4][3], 20); assertEquals(example.array[4][4], 25); assertEquals(example.array[4][5], 30); validate(example, serializer); } public void testDefaultPrimitive() throws Exception { DefaultPrimitiveArrayExample example = serializer.read(DefaultPrimitiveArrayExample.class, DEFAULT_PRIMITIVE); assertEquals(example.array.length, 5); assertEquals(example.array[0], "entry one"); assertEquals(example.array[1], "entry two"); assertEquals(example.array[2], "entry three"); assertEquals(example.array[3], "entry four"); assertEquals(example.array[4], "entry five"); validate(example, serializer); } public void testPrimitiveNull() throws Exception { PrimitiveArrayExample example = serializer.read(PrimitiveArrayExample.class, PRIMITIVE_NULL); assertEquals(example.array.length, 5); assertEquals(example.array[0], null); assertEquals(example.array[1], "entry two"); assertEquals(example.array[2], "entry three"); assertEquals(example.array[3], null); assertEquals(example.array[4], null); validate(example, serializer); } public void testParentComposite() throws Exception { ParentCompositeArrayExample example = serializer.read(ParentCompositeArrayExample.class, COMPOSITE); assertEquals(example.array.length, 5); assertEquals(example.array[0].value, "entry one"); assertEquals(example.array[1].value, "entry two"); assertEquals(example.array[2].value, "entry three"); assertEquals(example.array[3].value, "entry four"); assertEquals(example.array[4].value, "entry five"); validate(example, serializer); } public void testDefaultComposite() throws Exception { DefaultCompositeArrayExample example = serializer.read(DefaultCompositeArrayExample.class, DEFAULT_COMPOSITE); assertEquals(example.array.length, 5); assertEquals(example.array[0].value, "entry one"); assertEquals(example.array[1].value, "entry two"); assertEquals(example.array[2].value, "entry three"); assertEquals(example.array[3].value, "entry four"); assertEquals(example.array[4].value, "entry five"); validate(example, serializer); } public void testParentCompositeNull() throws Exception { ParentCompositeArrayExample example = serializer.read(ParentCompositeArrayExample.class, COMPOSITE_NULL); assertEquals(example.array.length, 5); assertEquals(example.array[0], null); assertEquals(example.array[1].value, "entry two"); assertEquals(example.array[2], null); assertEquals(example.array[3], null); assertEquals(example.array[4].value, "entry five"); validate(example, serializer); } public void testCharacter() throws Exception { CharacterArrayExample example = serializer.read(CharacterArrayExample.class, CHARACTER); assertEquals(example.array.length, 5); assertEquals(example.array[0], 'a'); assertEquals(example.array[1], 'b'); assertEquals(example.array[2], 'c'); assertEquals(example.array[3], 'd'); assertEquals(example.array[4], 'e'); validate(example, serializer); } public void testDifferentArray() throws Exception { DifferentArrayExample example = new DifferentArrayExample(); validate(example, serializer); } } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/core/RedundantOrderTest.java����������������������0000644�0001750�0001750�00000004115�11342530530�030403� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.simpleframework.xml.core; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Element; import org.simpleframework.xml.Order; import org.simpleframework.xml.Transient; import org.simpleframework.xml.ValidationTestCase; import org.simpleframework.xml.core.AttributeException; import org.simpleframework.xml.core.ElementException; import org.simpleframework.xml.core.Persister; public class RedundantOrderTest extends ValidationTestCase { @Order(elements={"a", "b", "c"}) public static class ElementEntry { @Element private String a; @Element private String b; @Transient private String c; private ElementEntry() { super(); } public ElementEntry(String a, String b, String c) { this.a = a; this.b = b; this.c = c; } } @Order(attributes={"a", "b", "c"}) public static class AttributeEntry { @Attribute private String a; @Attribute private String b; @Transient private String c; private AttributeEntry() { super(); } public AttributeEntry(String a, String b, String c) { this.a = a; this.b = b; this.c = c; } } public void testRedundantElementOrder() throws Exception { ElementEntry entry = new ElementEntry("a", "b", "c"); Persister persister = new Persister(); boolean exception = false; try { validate(entry, persister); }catch(ElementException e) { e.printStackTrace(); exception = true; } assertTrue(exception); } public void testRedundantAttributeOrder() throws Exception { AttributeEntry entry = new AttributeEntry("a", "b", "c"); Persister persister = new Persister(); boolean exception = false; try { validate(entry, persister); }catch(AttributeException e) { e.printStackTrace(); exception = true; } assertTrue(exception); } } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/core/DecoratorTest.java���������������������������0000644�0001750�0001750�00000032057�11342530530�027413� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.simpleframework.xml.core; import java.io.StringWriter; import java.util.ArrayList; import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Element; import org.simpleframework.xml.ElementList; import org.simpleframework.xml.Root; import org.simpleframework.xml.Serializer; import org.simpleframework.xml.Text; import org.simpleframework.xml.ValidationTestCase; import org.simpleframework.xml.strategy.Type; import org.simpleframework.xml.strategy.Strategy; import org.simpleframework.xml.strategy.TreeStrategy; import org.simpleframework.xml.strategy.Value; import org.simpleframework.xml.stream.InputNode; import org.simpleframework.xml.stream.NodeMap; import org.simpleframework.xml.stream.OutputNode; /** * This test is provided to demonstrate how simple it is to intercept * the serialization and deserialization process and manupulate the XML * according to requirements. It also shows how the serialized XML can * be written in a language neutral manner. * @author Niall Gallagher */ public class DecoratorTest extends ValidationTestCase { /** * This is used to intercept the read and write operations and * change the contents of the XML elements. * @author Niall Gallagher */ public static interface Interceptor { public void read(Class field, NodeMap<InputNode> node) throws Exception; public void write(Class field,NodeMap<OutputNode> node) throws Exception; } /** * This acts as a strategy and intercepts all XML elements that * are serialized and deserialized so that the XML can be manipulated * by the provided interceptor implementation. * @author Niall Gallagher */ public static class Decorator implements Strategy{ private final Interceptor interceptor; private final Strategy strategy; public Decorator(Interceptor interceptor, Strategy strategy){ this.interceptor = interceptor; this.strategy = strategy; } /** * Here we intercept the call to get the element value from the * strategy so that we can change the attributes in the XML element * to match what was change on writing the element. * @param node this is the XML element to be modified */ public Value read(Type field, NodeMap<InputNode> node, Map map) throws Exception { interceptor.read(field.getType(), node); return strategy.read(field, node, map); } /** * Here we change the XML element after it has been annotated by * the strategy. In this way we can ensure we write what we want * to the resulting XML document. * @param node this is the XML element that will be written */ public boolean write(Type field, Object value, NodeMap<OutputNode> node, Map map) throws Exception { boolean result = strategy.write(field, value, node, map); interceptor.write(field.getType(), node); return result; } } /** * The manipulator object is used to manipulate the attributes * added to the XML elements by the strategy in such a way that * they do not contain Java class names but rather neutral ones. * @author Niall Gallagher */ public static class Manipulator implements Interceptor { private final Map<String, String> read; private final Map<String, String> write; private final String label; private final String replace; private Manipulator(String label, String replace) { this.read = new ConcurrentHashMap<String, String>(); this.write = new ConcurrentHashMap<String, String>(); this.label = label; this.replace = replace; } /** * Here we are inserting an alias for a type. Each time the * specified type is written the provided name is used and * each time the name is found on reading it is substituted * for the type so that it can be interpreted correctly. * @param type this is the class to be given an alias * @param name this is the name to use */ public void resolve(Class type, String value) throws Exception{ String name = type.getName(); read.put(value, name); write.put(name, value); } public void read(Class field, NodeMap<InputNode> node) throws Exception{ InputNode value = node.remove(replace); if(value != null) { String name = value.getValue(); String type = read.get(name); if(type == null) { throw new PersistenceException("Could not match name %s", name); } node.put(label, type); } } public void write(Class field, NodeMap<OutputNode> node) throws Exception { OutputNode value = node.remove(label); if(value != null) { String type = value.getValue(); String name = write.get(type); if(name == null) { throw new PersistenceException("Could not match class %s", type); } node.put(replace, name); } } } @Root public static class FriendList { private final @ElementList List<Friend> list; public FriendList(@ElementList(name="list") List<Friend> list) { this.list = list; } public List<Friend> getFriends() { return list; } } @Root public static class Friend { private final @Element Member member; private final @ElementList List<Message> messages; private final @Attribute Status status; public Friend(@Element(name="member") Member member, @ElementList(name="messages") List<Message> messages, @Attribute(name="status") Status status) { this.messages = messages; this.member = member; this.status = status; } public Member getMember() { return member; } public Status getStatus(){ return status; } public List<Message> getMessages() { return messages; } } @Root public static class Member { private final @Element Address address; private final @Attribute String name; private final @Attribute int age; public Member(@Attribute(name="name") String name, @Attribute(name="age") int age, @Element(name="address") Address address) { this.address = address; this.name = name; this.age = age; } public boolean isPrivileged() { return false; } public Address getAddress() { return address; } public String getName(){ return name; } public int getAge() { return age; } } @Root public static class GoldMember extends Member{ public GoldMember(@Attribute(name="name") String name, @Attribute(name="age") int age, @Element(name="address") Address address) { super(name, age, address); } @Override public boolean isPrivileged() { return true; } } @Root public static class Person { private final @Element Address address; private final @Attribute String name; private final @Attribute int age; public Person(@Attribute(name="name") String name, @Attribute(name="age") int age, @Element(name="address") Address address) { this.address = address; this.name = name; this.age = age; } public Address getAddress() { return address; } public String getName(){ return name; } public int getAge() { return age; } } @Root public static class Address { private final @Element String street; private final @Element String city; private final @Element String country; public Address(@Element(name="street") String street, @Element(name="city") String city, @Element(name="country") String country) { this.street = street; this.city = city; this.country = country; } public String getStreet(){ return street; } public String getCity(){ return city; } public String getCountry() { return country; } } @Root public static class Message { private String title; private String text; public Message() { super(); } public Message(String title, String text){ this.title = title; this.text = text; } @Attribute public void setTitle(String title) { this.title = title; } @Attribute public String getTitle() { return title; } @Text(data=true) public void setText(String text) { this.text = text; } @Text(data=true) public String getText() { return text; } } public static enum Status { ACTIVE, INACTIVE, DELETED } /** * This test will use an interceptor to replace Java class names * with user specified tokens so that the object can be serialized * and deserialized without referencing specific classes. */ public void testDecorator() throws Exception { Strategy strategy = new TreeStrategy("class", "length"); Manipulator manipulator = new Manipulator("class", "type"); Decorator decorator = new Decorator(manipulator, strategy); Serializer serializer = new Persister(decorator); List<Friend> friends = new ArrayList<Friend>(); Address tomAddress = new Address("14 High Steet", "London", "UK"); Member tom = new Member("Tom", 30, tomAddress); List<Message> tomMessages = new ArrayList<Message>(); tomMessages.add(new Message("Hello", "Hi, this is a message, Bye")); tomMessages.add(new Message("Hi Tom", "This is another quick message")); Address jimAddress = new Address("14 Main Road", "London", "UK"); Member jim = new GoldMember("Jim", 30, jimAddress); List<Message> jimMessages = new LinkedList<Message>(); jimMessages.add(new Message("Hello Jim", "Hi Jim, here is a message")); jimMessages.add(new Message("Hi", "Yet another message")); friends.add(new Friend(tom, tomMessages, Status.ACTIVE)); friends.add(new Friend(jim, jimMessages, Status.INACTIVE)); FriendList original = new FriendList(friends); manipulator.resolve(ArrayList.class, "list"); manipulator.resolve(LinkedList.class, "linked-list"); manipulator.resolve(Member.class, "member"); manipulator.resolve(GoldMember.class, "gold-member"); StringWriter text = new StringWriter(); serializer.write(original, text); String result = text.toString(); FriendList recovered = serializer.read(FriendList.class, result); assertEquals(original.getFriends().getClass(), recovered.getFriends().getClass()); assertEquals(original.getFriends().get(0).getStatus(), recovered.getFriends().get(0).getStatus()); assertEquals(original.getFriends().get(0).getMember().getName(), recovered.getFriends().get(0).getMember().getName()); assertEquals(original.getFriends().get(0).getMember().getAge(), recovered.getFriends().get(0).getMember().getAge()); assertEquals(original.getFriends().get(0).getMember().getAddress().getCity(), recovered.getFriends().get(0).getMember().getAddress().getCity()); assertEquals(original.getFriends().get(0).getMember().getAddress().getCountry(), recovered.getFriends().get(0).getMember().getAddress().getCountry()); assertEquals(original.getFriends().get(0).getMember().getAddress().getStreet(), recovered.getFriends().get(0).getMember().getAddress().getStreet()); assertEquals(original.getFriends().get(1).getMember().getName(), recovered.getFriends().get(1).getMember().getName()); assertEquals(original.getFriends().get(1).getMember().getAge(), recovered.getFriends().get(1).getMember().getAge()); assertEquals(original.getFriends().get(1).getMember().getAddress().getCity(), recovered.getFriends().get(1).getMember().getAddress().getCity()); assertEquals(original.getFriends().get(1).getMember().getAddress().getCountry(), recovered.getFriends().get(1).getMember().getAddress().getCountry()); assertEquals(original.getFriends().get(1).getMember().getAddress().getStreet(), recovered.getFriends().get(1).getMember().getAddress().getStreet()); validate(serializer, original); } } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/core/FilterTest.java������������������������������0000644�0001750�0001750�00000007470�11342530530�026717� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.simpleframework.xml.core; import java.io.StringReader; import java.util.HashMap; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Element; import org.simpleframework.xml.Root; import org.simpleframework.xml.core.Persister; import org.simpleframework.xml.filter.EnvironmentFilter; import org.simpleframework.xml.filter.Filter; import org.simpleframework.xml.filter.SystemFilter; import junit.framework.TestCase; public class FilterTest extends TestCase { private static final String ENTRY = "<?xml version=\"1.0\"?>\n"+ "<root number='1234' flag='true'>\n"+ " <name>${example.name}</name> \n\r"+ " <path>${example.path}</path>\n"+ " <constant>${no.override}</constant>\n"+ " <text>\n"+ " Some example text where ${example.name} is replaced"+ " with the system property value and the path is "+ " replaced with the path ${example.path}"+ " </text>\n"+ "</root>"; @Root(name="root") private static class Entry { @Attribute(name="number") private int number; @Attribute(name="flag") private boolean bool; @Element(name="constant") private String constant; @Element(name="name") private String name; @Element(name="path") private String path; @Element(name="text") private String text; } static { System.setProperty("example.name", "some name"); System.setProperty("example.path", "/some/path"); System.setProperty("no.override", "some constant"); } private Persister systemSerializer; private Persister mapSerializer; public void setUp() { HashMap map = new HashMap(); map.put("example.name", "override name"); map.put("example.path", "/some/override/path"); systemSerializer = new Persister(); mapSerializer = new Persister(map); } public void testSystem() throws Exception { Entry entry = systemSerializer.read(Entry.class, new StringReader(ENTRY)); assertEquals(entry.number, 1234); assertEquals(entry.bool, true); assertEquals(entry.name, "some name"); assertEquals(entry.path, "/some/path"); assertEquals(entry.constant, "some constant"); assertTrue(entry.text.indexOf(entry.name) > 0); assertTrue(entry.text.indexOf(entry.path) > 0); } public void testMap() throws Exception { Entry entry = mapSerializer.read(Entry.class, new StringReader(ENTRY)); assertEquals(entry.number, 1234); assertEquals(entry.bool, true); assertEquals(entry.name, "override name"); assertEquals(entry.path, "/some/override/path"); assertEquals(entry.constant, "some constant"); assertTrue(entry.text.indexOf(entry.name) > 0); assertTrue(entry.text.indexOf(entry.path) > 0); } public void testEnvironmentFilter() throws Exception { Filter filter = new EnvironmentFilter(null); Persister persister = new Persister(filter); Entry entry = persister.read(Entry.class, new StringReader(ENTRY)); assertEquals(entry.number, 1234); assertEquals(entry.bool, true); assertEquals(entry.name, "${example.name}"); assertEquals(entry.path, "${example.path}"); Filter systemFilter = new SystemFilter(); Filter environmentFilter = new EnvironmentFilter(systemFilter); Persister environmentPersister = new Persister(environmentFilter); Entry secondEntry = environmentPersister.read(Entry.class, new StringReader(ENTRY)); assertEquals(secondEntry.number, 1234); assertEquals(secondEntry.bool, true); assertEquals(secondEntry.name, "some name"); assertEquals(secondEntry.path, "/some/path"); assertEquals(secondEntry.constant, "some constant"); } } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/core/AnnotationProviderTest.java������������������0000644�0001750�0001750�00000003467�11342530530�031321� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.simpleframework.xml.core; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.HashSet; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.Set; import java.util.TreeSet; import java.util.concurrent.ConcurrentHashMap; import junit.framework.TestCase; import org.simpleframework.xml.ElementList; import org.simpleframework.xml.ElementMap; public class AnnotationProviderTest extends TestCase { public void testProvider() throws Exception { assertTrue(ElementMap.class.isAssignableFrom(new AnnotationFactory().getInstance(Map.class).getClass())); assertTrue(ElementMap.class.isAssignableFrom(new AnnotationFactory().getInstance(HashMap.class).getClass())); assertTrue(ElementMap.class.isAssignableFrom(new AnnotationFactory().getInstance(ConcurrentHashMap.class).getClass())); assertTrue(ElementMap.class.isAssignableFrom(new AnnotationFactory().getInstance(LinkedHashMap.class).getClass())); assertTrue(ElementMap.class.isAssignableFrom(new AnnotationFactory().getInstance(Map.class).getClass())); assertTrue(ElementList.class.isAssignableFrom(new AnnotationFactory().getInstance(Set.class).getClass())); assertTrue(ElementList.class.isAssignableFrom(new AnnotationFactory().getInstance(Collection.class).getClass())); assertTrue(ElementList.class.isAssignableFrom(new AnnotationFactory().getInstance(List.class).getClass())); assertTrue(ElementList.class.isAssignableFrom(new AnnotationFactory().getInstance(TreeSet.class).getClass())); assertTrue(ElementList.class.isAssignableFrom(new AnnotationFactory().getInstance(HashSet.class).getClass())); assertTrue(ElementList.class.isAssignableFrom(new AnnotationFactory().getInstance(ArrayList.class).getClass())); } } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/core/ArrayEntryTest.java��������������������������0000644�0001750�0001750�00000004737�11342530527�027603� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.simpleframework.xml.core; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Element; import org.simpleframework.xml.ElementArray; import org.simpleframework.xml.Root; import org.simpleframework.xml.Serializer; import org.simpleframework.xml.ValidationTestCase; public class ArrayEntryTest extends ValidationTestCase { private static final String LIST = "<?xml version=\"1.0\"?>\n"+ "<exampleArray>\n"+ " <list length='3'>\n"+ " <substitute id='1'>\n"+ " <text>one</text> \n\r"+ " </substitute>\n\r"+ " <substitute id='2'>\n"+ " <text>two</text> \n\r"+ " </substitute>\n"+ " <substitute id='3'>\n"+ " <text>three</text> \n\r"+ " </substitute>\n"+ " </list>\n"+ "</exampleArray>"; private static final String PRIMITIVE_LIST = "<?xml version=\"1.0\"?>\n"+ "<examplePrimitiveArray>\n"+ " <list length='4'>\r\n" + " <substitute>a</substitute>\n"+ " <substitute>b</substitute>\n"+ " <substitute>c</substitute>\n"+ " <substitute>d</substitute>\n"+ " </list>\r\n" + "</examplePrimitiveArray>"; @Root private static class Entry { @Attribute private int id; @Element private String text; public String getText() { return text; } public int getId() { return id; } } @Root private static class ExampleArray { @ElementArray(name="list", entry="substitute") // XXX bad error if the length= attribute is missing private Entry[] list; public Entry[] getArray() { return list; } } @Root private static class ExamplePrimitiveArray { @ElementArray(name="list", entry="substitute") // XXX bad error if this was an array private Character[] list; public Character[] getArray() { return list; } } public void testExampleArray() throws Exception { Serializer serializer = new Persister(); ExampleArray list = serializer.read(ExampleArray.class, LIST); validate(list, serializer); } public void testExamplePrimitiveArray() throws Exception { Serializer serializer = new Persister(); ExamplePrimitiveArray list = serializer.read(ExamplePrimitiveArray.class, PRIMITIVE_LIST); validate(list, serializer); } } ���������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/core/EmptyMapEntryTest.java�����������������������0000644�0001750�0001750�00000004235�11342530530�030244� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.simpleframework.xml.core; import java.io.StringWriter; import java.util.HashMap; import org.simpleframework.xml.Element; import org.simpleframework.xml.ElementMap; import org.simpleframework.xml.Root; import org.simpleframework.xml.Serializer; import org.simpleframework.xml.ValidationTestCase; import org.simpleframework.xml.strategy.CycleStrategy; import org.simpleframework.xml.strategy.Strategy; public class EmptyMapEntryTest extends ValidationTestCase { /** * * @author Alan Deikman */ @Root public static class SimpleBug1 { @Element protected Mojo test1; public SimpleBug1() { test1 = new Mojo(); test1.data.put("key1", "value1"); test1.data.put("key2", "value1"); test1.data.put("key3", ""); test1.data.put("key4", ""); test1.data.put("", ""); } public static class Mojo { @ElementMap (empty=true) protected HashMap<String, Object> data; public Mojo() { data = new HashMap<String, Object>(); } } } /** * @param args the command line arguments */ public void testEmptyMapEntry() throws Exception { Strategy resolver = new CycleStrategy("id", "ref"); Serializer s = new Persister(resolver); StringWriter w = new StringWriter(); SimpleBug1 bug1 = new SimpleBug1(); assertEquals(bug1.test1.data.get("key1"), "value1"); assertEquals(bug1.test1.data.get("key2"), "value1"); assertEquals(bug1.test1.data.get("key3"), ""); assertEquals(bug1.test1.data.get(""), ""); s.write(bug1, w); System.err.println(w.toString()); SimpleBug1 bug2 = s.read(SimpleBug1.class, w.toString()); assertEquals(bug1.test1.data.get("key1"), bug2.test1.data.get("key1")); assertEquals(bug1.test1.data.get("key2"), bug2.test1.data.get("key2")); assertEquals(bug2.test1.data.get("key1"), "value1"); assertEquals(bug2.test1.data.get("key2"), "value1"); assertNull(bug2.test1.data.get("key3")); assertNull(bug2.test1.data.get(null)); validate(s, bug1); } } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/core/NamespaceInheritanceTest.java����������������0000644�0001750�0001750�00000006341�11342530527�031542� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.simpleframework.xml.core; import java.io.ByteArrayOutputStream; import org.simpleframework.xml.Element; import org.simpleframework.xml.Namespace; import org.simpleframework.xml.Serializer; import org.simpleframework.xml.ValidationTestCase; public class NamespaceInheritanceTest extends ValidationTestCase { @Namespace(reference="namespace1") private static class Aaa { @Element(name="bbb", required=false) public Bbb bbb; } @Namespace(reference="namespace2") private static class Bbb { @Element(name="aaa", required=false) public Aaa aaa; } @Namespace(prefix="aaa", reference="namespace1") private static class AaaWithPrefix { @Element(name="bbb", required=false) public BbbWithPrefix bbb; } @Namespace(prefix="bbb", reference="namespace2") private static class BbbWithPrefix { @Element(name="aaa", required=false) public AaaWithPrefix aaa; } public void testNamespace() throws Exception { Aaa parent = new Aaa(); Bbb child = new Bbb(); parent.bbb = child; Aaa grandchild = new Aaa(); child.aaa = grandchild; grandchild.bbb = new Bbb(); ByteArrayOutputStream tmp = new ByteArrayOutputStream(); Serializer serializer = new Persister(); serializer.write(parent, tmp); String result = new String(tmp.toByteArray()); System.out.println(result); assertElementHasAttribute(result, "/aaa", "xmlns", "namespace1"); assertElementHasAttribute(result, "/aaa/bbb", "xmlns", "namespace2"); assertElementHasAttribute(result, "/aaa/bbb/aaa", "xmlns", "namespace1"); assertElementHasAttribute(result, "/aaa/bbb/aaa/bbb", "xmlns", "namespace2"); assertElementHasNamespace(result, "/aaa", "namespace1"); assertElementHasNamespace(result, "/aaa/bbb", "namespace2"); assertElementHasNamespace(result, "/aaa/bbb/aaa", "namespace1"); assertElementHasNamespace(result, "/aaa/bbb/aaa/bbb", "namespace2"); } public void testNamespacePrefix() throws Exception { AaaWithPrefix parent = new AaaWithPrefix(); BbbWithPrefix child = new BbbWithPrefix(); parent.bbb = child; AaaWithPrefix grandchild = new AaaWithPrefix(); child.aaa = grandchild; grandchild.bbb = new BbbWithPrefix(); ByteArrayOutputStream tmp = new ByteArrayOutputStream(); Serializer serializer = new Persister(); serializer.write(parent, tmp); String result = new String(tmp.toByteArray()); System.out.println(result); assertElementHasAttribute(result, "/aaaWithPrefix", "xmlns:aaa", "namespace1"); assertElementHasAttribute(result, "/aaaWithPrefix/bbb", "xmlns:bbb", "namespace2"); assertElementDoesNotHaveAttribute(result, "/aaaWithPrefix/bbb/aaa", "xmlns:aaa", "namespace1"); assertElementDoesNotHaveAttribute(result, "/aaaWithPrefix/bbb/aaa/bbb", "xmlns:bbb", "namespace2"); assertElementHasNamespace(result, "/aaaWithPrefix", "namespace1"); assertElementHasNamespace(result, "/aaaWithPrefix/bbb", "namespace2"); assertElementHasNamespace(result, "/aaaWithPrefix/bbb/aaa", "namespace1"); assertElementHasNamespace(result, "/aaaWithPrefix/bbb/aaa/bbb", "namespace2"); } }�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/core/CollectionConstructorTest.java���������������0000644�0001750�0001750�00000007423�11342530530�032031� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.simpleframework.xml.core; import java.util.Map; import java.util.Vector; import junit.framework.TestCase; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Element; import org.simpleframework.xml.ElementList; import org.simpleframework.xml.ElementMap; import org.simpleframework.xml.Root; public class CollectionConstructorTest extends TestCase { private static final String LIST = "<example>"+ " <entry name='a' value='1'/>"+ " <entry name='b' value='2'/>"+ "</example>"; private static final String MAP = "<example>"+ " <element key='A'>"+ " <entry name='a' value='1'/>"+ " </element>"+ " <element key='B'>"+ " <entry name='b' value='2'/>"+ " </element>"+ "</example>"; private static final String COMPOSITE = "<composite>"+ " <example class='org.simpleframework.xml.core.CollectionConstructorTest$ExtendedCollectionConstructor'>"+ " <entry name='a' value='1'/>"+ " <entry name='b' value='2'/>"+ " </example>"+ "</composite>"; @Root(name="example") private static class MapConstructor { @ElementMap(name="list", entry="element", key="key", attribute=true, inline=true) private final Map<String, Entry> map; public MapConstructor(@ElementMap(name="list", entry="element", key="key", attribute=true, inline=true) Map<String, Entry> map) { this.map = map; } public int size() { return map.size(); } } @Root(name="example") private static class CollectionConstructor { @ElementList(name="list", inline=true) private final Vector<Entry> vector; public CollectionConstructor(@ElementList(name="list", inline=true) Vector<Entry> vector) { this.vector = vector; } public int size() { return vector.size(); } } @Root(name="entry") private static class Entry { @Attribute(name="name") private final String name; @Attribute(name="value") private final String value; public Entry(@Attribute(name="name") String name, @Attribute(name="value") String value) { this.name = name; this.value = value; } public String getName() { return name; } public String getValue() { return value; } } @Root(name="example") private static class ExtendedCollectionConstructor extends CollectionConstructor { public ExtendedCollectionConstructor(@ElementList(name="list", inline=true) Vector<Entry> vector) { super(vector); } } @Root(name="composite") private static class CollectionConstructorComposite { @Element(name="example") private CollectionConstructor collection; public CollectionConstructor getCollection() { return collection; } } public void testCollectionConstructor() throws Exception { Persister persister = new Persister(); CollectionConstructor constructor = persister.read(CollectionConstructor.class, LIST); assertEquals(constructor.size(), 2); } public void testMapConstructor() throws Exception { Persister persister = new Persister(); MapConstructor constructor = persister.read(MapConstructor.class, MAP); assertEquals(constructor.size(), 2); } public void testCollectionConstructorComposite() throws Exception { Persister persister = new Persister(); CollectionConstructorComposite composite = persister.read(CollectionConstructorComposite.class, COMPOSITE); assertEquals(composite.getCollection().getClass(), ExtendedCollectionConstructor.class); assertEquals(composite.getCollection().size(), 2); } } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/core/DefaultWithParametersInGetterTest.java�������0000644�0001750�0001750�00000005064�11342530530�033375� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.simpleframework.xml.core; import org.simpleframework.xml.Default; import org.simpleframework.xml.DefaultType; import org.simpleframework.xml.Element; import org.simpleframework.xml.Root; import org.simpleframework.xml.Transient; import org.simpleframework.xml.ValidationTestCase; public class DefaultWithParametersInGetterTest extends ValidationTestCase { @Root @Default(DefaultType.PROPERTY) static class DefaultTestClass { private int foo; public int getFoo() { return foo; } public void setFoo(int foo) { this.foo = foo; } public String getWithParams(int foo) { return "foo"; } } @Root @Default(DefaultType.PROPERTY) static class DefaultTestClassWithInvalidTransient { private int foo; public int getFoo() { return foo; } public void setFoo(int foo) { this.foo = foo; } @Transient public String getWithParams(int foo) { return "foo"; } } @Root @Default(DefaultType.PROPERTY) static class DefaultTestClassWithInvalidElement { private String name; @Element public String getName(int foo) { return name; } @Element public void setName(String name) { this.name = name; } } public void testDefaultWithParameters() throws Exception{ Persister persister = new Persister(); DefaultTestClass type = new DefaultTestClass(); type.foo = 100; persister.write(type, System.out); validate(type, persister); } public void testDefaultWithTransientErrors() throws Exception{ Persister persister = new Persister(); DefaultTestClassWithInvalidTransient type = new DefaultTestClassWithInvalidTransient(); type.foo = 100; boolean failure = false; try { persister.write(type, System.out); }catch(Exception e) { e.printStackTrace(); failure=true; } assertTrue("Annotation on a method which is not a property succeeded", failure); } public void testDefaultWithElementErrors() throws Exception{ Persister persister = new Persister(); DefaultTestClassWithInvalidElement type = new DefaultTestClassWithInvalidElement(); type.name = "name"; boolean failure = false; try { persister.write(type, System.out); }catch(Exception e) { e.printStackTrace(); failure=true; } assertTrue("Annotation on a method which is not a property succeeded", failure); } } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/core/CollectionTest.java��������������������������0000644�0001750�0001750�00000054770�11342530527�027600� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.simpleframework.xml.core; import java.io.StringWriter; import java.util.ArrayList; import java.util.Iterator; import java.util.Collection; import java.util.List; import java.util.SortedSet; import java.util.Set; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Element; import org.simpleframework.xml.ElementList; import org.simpleframework.xml.Root; import org.simpleframework.xml.core.InstantiationException; import org.simpleframework.xml.core.Persister; import junit.framework.TestCase; import org.simpleframework.xml.ValidationTestCase; public class CollectionTest extends ValidationTestCase { private static final String LIST = "<?xml version=\"1.0\"?>\n"+ "<test name='example'>\n"+ " <list>\n"+ " <entry id='1'>\n"+ " <text>one</text> \n\r"+ " </entry>\n\r"+ " <entry id='2'>\n"+ " <text>two</text> \n\r"+ " </entry>\n"+ " <entry id='3'>\n"+ " <text>three</text> \n\r"+ " </entry>\n"+ " </list>\n"+ "</test>"; private static final String ARRAY_LIST = "<?xml version=\"1.0\"?>\n"+ "<test name='example'>\n"+ " <list class='java.util.ArrayList'>\n"+ " <entry id='1'>\n"+ " <text>one</text> \n\r"+ " </entry>\n\r"+ " <entry id='2'>\n"+ " <text>two</text> \n\r"+ " </entry>\n"+ " <entry id='3'>\n"+ " <text>three</text> \n\r"+ " </entry>\n"+ " </list>\n"+ "</test>"; private static final String HASH_SET = "<?xml version=\"1.0\"?>\n"+ "<test name='example'>\n"+ " <list class='java.util.HashSet'>\n"+ " <entry id='1'>\n"+ " <text>one</text> \n\r"+ " </entry>\n\r"+ " <entry id='2'>\n"+ " <text>two</text> \n\r"+ " </entry>\n"+ " <entry id='3'>\n"+ " <text>three</text> \n\r"+ " </entry>\n"+ " </list>\n"+ "</test>"; private static final String TREE_SET = "<?xml version=\"1.0\"?>\n"+ "<test name='example'>\n"+ " <list class='java.util.TreeSet'>\n"+ " <entry id='1'>\n"+ " <text>one</text> \n\r"+ " </entry>\n\r"+ " <entry id='2'>\n"+ " <text>two</text> \n\r"+ " </entry>\n"+ " <entry id='3'>\n"+ " <text>three</text> \n\r"+ " </entry>\n"+ " </list>\n"+ "</test>"; private static final String ABSTRACT_LIST = "<?xml version=\"1.0\"?>\n"+ "<test name='example'>\n"+ " <list class='org.simpleframework.xml.core.CollectionTest$AbstractList'>\n"+ " <entry id='1'>\n"+ " <text>one</text> \n\r"+ " </entry>\n\r"+ " <entry id='2'>\n"+ " <text>two</text> \n\r"+ " </entry>\n"+ " <entry id='3'>\n"+ " <text>three</text> \n\r"+ " </entry>\n"+ " </list>\n"+ "</test>"; private static final String NOT_A_COLLECTION = "<?xml version=\"1.0\"?>\n"+ "<test name='example'>\n"+ " <list class='java.util.Hashtable'>\n"+ " <entry id='1'>\n"+ " <text>one</text> \n\r"+ " </entry>\n\r"+ " <entry id='2'>\n"+ " <text>two</text> \n\r"+ " </entry>\n"+ " <entry id='3'>\n"+ " <text>three</text> \n\r"+ " </entry>\n"+ " </list>\n"+ "</test>"; private static final String MISSING_COLLECTION = "<?xml version=\"1.0\"?>\n"+ "<test name='example'>\n"+ " <list class='example.MyCollection'>\n"+ " <entry id='1'>\n"+ " <text>one</text> \n\r"+ " </entry>\n\r"+ " <entry id='2'>\n"+ " <text>two</text> \n\r"+ " </entry>\n"+ " <entry id='3'>\n"+ " <text>three</text> \n\r"+ " </entry>\n"+ " </list>\n"+ "</test>"; private static final String EXTENDED_ENTRY_LIST = "<?xml version=\"1.0\"?>\n"+ "<test name='example'>\n"+ " <list>\n"+ " <extended-entry id='1' class='org.simpleframework.xml.core.CollectionTest$ExtendedEntry'>\n"+ " <text>one</text> \n\r"+ " <description>this is an extended entry</description>\n\r"+ " </extended-entry>\n\r"+ " <extended-entry id='2' class='org.simpleframework.xml.core.CollectionTest$ExtendedEntry'>\n"+ " <text>two</text> \n\r"+ " <description>this is the second one</description>\n"+ " </extended-entry>\n"+ " <entry id='3'>\n"+ " <text>three</text> \n\r"+ " </entry>\n"+ " </list>\n"+ "</test>"; private static final String TYPE_FROM_FIELD_LIST = "<?xml version=\"1.0\"?>\n"+ "<typeFromFieldList name='example'>\n"+ " <list>\n"+ " <entry id='1'>\n"+ " <text>one</text> \n\r"+ " </entry>\n\r"+ " <entry id='2'>\n"+ " <text>two</text> \n\r"+ " </entry>\n"+ " <entry id='3'>\n"+ " <text>three</text> \n\r"+ " </entry>\n"+ " </list>\n"+ "</typeFromFieldList>"; private static final String TYPE_FROM_METHOD_LIST = "<?xml version=\"1.0\"?>\n"+ "<typeFromMethodList name='example'>\n"+ " <list>\n"+ " <entry id='1'>\n"+ " <text>one</text> \n\r"+ " </entry>\n\r"+ " <entry id='2'>\n"+ " <text>two</text> \n\r"+ " </entry>\n"+ " <entry id='3'>\n"+ " <text>three</text> \n\r"+ " </entry>\n"+ " </list>\n"+ "</typeFromMethodList>"; private static final String PRIMITIVE_LIST = "<?xml version=\"1.0\"?>\n"+ "<primitiveCollection name='example'>\n"+ " <list>\n"+ " <text>one</text> \n\r"+ " <text>two</text> \n\r"+ " <text>three</text> \n\r"+ " </list>\n"+ "</primitiveCollection>"; private static final String COMPOSITE_LIST = "<?xml version=\"1.0\"?>\n"+ "<compositeCollection name='example'>\n"+ " <list>\n"+ " <entry id='1'>\n"+ " <text>one</text> \n\r"+ " </entry>\n\r"+ " <entry id='2'>\n"+ " <text>two</text> \n\r"+ " </entry>\n\r"+ " <entry id='3'>\n"+ " <text>three</text> \n\r"+ " </entry>\n\r"+ " </list>\n"+ "</compositeCollection>"; private static final String PRIMITIVE_DEFAULT_LIST = "<?xml version=\"1.0\"?>\n"+ "<primitiveDefaultCollection name='example'>\n"+ " <list>\n"+ " <string>one</string> \n\r"+ " <string>two</string> \n\r"+ " <string>three</string> \n\r"+ " </list>\n"+ "</primitiveDefaultCollection>"; @Root(name="entry") private static class Entry implements Comparable { @Attribute(name="id") private int id; @Element(name="text") private String text; public int compareTo(Object entry) { return id - ((Entry)entry).id; } } @Root(name="extended-entry") private static class ExtendedEntry extends Entry { @Element(name="description") private String description; } @Root(name="test") private static class EntrySet implements Iterable<Entry> { @ElementList(name="list", type=Entry.class) private Set<Entry> list; @Attribute(name="name") private String name; public Iterator<Entry> iterator() { return list.iterator(); } } @Root(name="test") private static class EntrySortedSet implements Iterable<Entry> { @ElementList(name="list", type=Entry.class) private SortedSet<Entry> list; @Attribute(name="name") private String name; public Iterator<Entry> iterator() { return list.iterator(); } } @Root(name="test") private static class EntryList implements Iterable<Entry> { @ElementList(name="list", type=Entry.class) private List<Entry> list; @Attribute(name="name") private String name; public Iterator<Entry> iterator() { return list.iterator(); } } @Root(name="test") public static class InvalidList { @ElementList(name="list", type=Entry.class) private String list; @Attribute(name="name") private String name; } @Root(name="test") public static class UnknownCollectionList implements Iterable<Entry> { @ElementList(name="list", type=Entry.class) private UnknownCollection<Entry> list; @Attribute(name="name") private String name; public Iterator<Entry> iterator() { return list.iterator(); } } @Root private static class TypeFromFieldList implements Iterable<Entry> { @ElementList private List<Entry> list; @Attribute private String name; public Iterator<Entry> iterator() { return list.iterator(); } } @Root private static class TypeFromMethodList implements Iterable<Entry> { private List<Entry> list; @Attribute private String name; @ElementList public List<Entry> getList() { return list; } @ElementList public void setList(List<Entry> list) { this.list = list; } public Iterator<Entry> iterator() { return list.iterator(); } } @Root private static class PrimitiveCollection implements Iterable<String> { @ElementList(name="list", type=String.class, entry="text") private List<String> list; @Attribute(name="name") private String name; public Iterator<String> iterator() { return list.iterator(); } } @Root private static class CompositeCollection implements Iterable<Entry> { @ElementList(name="list", entry="text") private List<Entry> list; @Attribute(name="name") private String name; public Iterator<Entry> iterator() { return list.iterator(); } } @Root private static class PrimitiveDefaultCollection implements Iterable<String> { @ElementList private List<String> list; @Attribute private String name; public Iterator<String> iterator() { return list.iterator(); } } private abstract class AbstractList<T> extends ArrayList<T> { public AbstractList() { super(); } } private abstract class UnknownCollection<T> implements Collection<T> { public UnknownCollection() { super(); } } private Persister serializer; public void setUp() { serializer = new Persister(); } public void testSet() throws Exception { EntrySet set = serializer.read(EntrySet.class, LIST); int one = 0; int two = 0; int three = 0; for(Entry entry : set) { if(entry.id == 1 && entry.text.equals("one")) { one++; } if(entry.id == 2 && entry.text.equals("two")) { two++; } if(entry.id == 3 && entry.text.equals("three")) { three++; } } assertEquals(one, 1); assertEquals(two, 1); assertEquals(three, 1); } public void testSortedSet() throws Exception { EntrySortedSet set = serializer.read(EntrySortedSet.class, LIST); int one = 0; int two = 0; int three = 0; for(Entry entry : set) { if(entry.id == 1 && entry.text.equals("one")) { one++; } if(entry.id == 2 && entry.text.equals("two")) { two++; } if(entry.id == 3 && entry.text.equals("three")) { three++; } } assertEquals(one, 1); assertEquals(two, 1); assertEquals(three, 1); validate(set, serializer); } public void testList() throws Exception { EntryList set = serializer.read(EntryList.class, LIST); int one = 0; int two = 0; int three = 0; for(Entry entry : set) { if(entry.id == 1 && entry.text.equals("one")) { one++; } if(entry.id == 2 && entry.text.equals("two")) { two++; } if(entry.id == 3 && entry.text.equals("three")) { three++; } } assertEquals(one, 1); assertEquals(two, 1); assertEquals(three, 1); validate(set, serializer); } public void testHashSet() throws Exception { EntrySet set = serializer.read(EntrySet.class, HASH_SET); int one = 0; int two = 0; int three = 0; for(Entry entry : set) { if(entry.id == 1 && entry.text.equals("one")) { one++; } if(entry.id == 2 && entry.text.equals("two")) { two++; } if(entry.id == 3 && entry.text.equals("three")) { three++; } } assertEquals(one, 1); assertEquals(two, 1); assertEquals(three, 1); validate(set, serializer); } public void testTreeSet() throws Exception { EntrySortedSet set = serializer.read(EntrySortedSet.class, TREE_SET); int one = 0; int two = 0; int three = 0; for(Entry entry : set) { if(entry.id == 1 && entry.text.equals("one")) { one++; } if(entry.id == 2 && entry.text.equals("two")) { two++; } if(entry.id == 3 && entry.text.equals("three")) { three++; } } assertEquals(one, 1); assertEquals(two, 1); assertEquals(three, 1); validate(set, serializer); } public void testArrayList() throws Exception { EntryList list = serializer.read(EntryList.class, ARRAY_LIST); int one = 0; int two = 0; int three = 0; for(Entry entry : list) { if(entry.id == 1 && entry.text.equals("one")) { one++; } if(entry.id == 2 && entry.text.equals("two")) { two++; } if(entry.id == 3 && entry.text.equals("three")) { three++; } } assertEquals(one, 1); assertEquals(two, 1); assertEquals(three, 1); validate(list, serializer); } public void testSortedSetToSet() throws Exception { EntrySet set = serializer.read(EntrySet.class, TREE_SET); int one = 0; int two = 0; int three = 0; for(Entry entry : set) { if(entry.id == 1 && entry.text.equals("one")) { one++; } if(entry.id == 2 && entry.text.equals("two")) { two++; } if(entry.id == 3 && entry.text.equals("three")) { three++; } } assertEquals(one, 1); assertEquals(two, 1); assertEquals(three, 1); } public void testExtendedEntry() throws Exception { EntrySet set = serializer.read(EntrySet.class, EXTENDED_ENTRY_LIST); int one = 0; int two = 0; int three = 0; for(Entry entry : set) { if(entry.id == 1 && entry.text.equals("one")) { one++; } if(entry.id == 2 && entry.text.equals("two")) { two++; } if(entry.id == 3 && entry.text.equals("three")) { three++; } } assertEquals(one, 1); assertEquals(two, 1); assertEquals(three, 1); StringWriter out = new StringWriter(); serializer.write(set, out); serializer.write(set, System.err); EntrySet other = serializer.read(EntrySet.class, out.toString()); for(Entry entry : set) { if(entry.id == 1 && entry.text.equals("one")) { one++; } if(entry.id == 2 && entry.text.equals("two")) { two++; } if(entry.id == 3 && entry.text.equals("three")) { three++; } } assertEquals(one, 2); assertEquals(two, 2); assertEquals(three, 2); serializer.write(other, System.err); } public void testTypeFromFieldList() throws Exception { TypeFromFieldList list = serializer.read(TypeFromFieldList.class, TYPE_FROM_FIELD_LIST); int one = 0; int two = 0; int three = 0; for(Entry entry : list) { if(entry.id == 1 && entry.text.equals("one")) { one++; } if(entry.id == 2 && entry.text.equals("two")) { two++; } if(entry.id == 3 && entry.text.equals("three")) { three++; } } assertEquals(one, 1); assertEquals(two, 1); assertEquals(three, 1); validate(list, serializer); } public void testTypeFromMethodList() throws Exception { TypeFromMethodList list = serializer.read(TypeFromMethodList.class, TYPE_FROM_METHOD_LIST); int one = 0; int two = 0; int three = 0; for(Entry entry : list) { if(entry.id == 1 && entry.text.equals("one")) { one++; } if(entry.id == 2 && entry.text.equals("two")) { two++; } if(entry.id == 3 && entry.text.equals("three")) { three++; } } assertEquals(one, 1); assertEquals(two, 1); assertEquals(three, 1); validate(list, serializer); } public void testPrimitiveCollection() throws Exception { PrimitiveCollection list = serializer.read(PrimitiveCollection.class, PRIMITIVE_LIST); int one = 0; int two = 0; int three = 0; for(String entry : list) { if(entry.equals("one")) { one++; } if(entry.equals("two")) { two++; } if(entry.equals("three")) { three++; } } assertEquals(one, 1); assertEquals(two, 1); assertEquals(three, 1); validate(list, serializer); } // XXX This test needs to inline the entry= attribute so that // XXX we can use it to name the inserted entries public void testCompositeCollection() throws Exception { CompositeCollection list = serializer.read(CompositeCollection.class, COMPOSITE_LIST); int one = 0; int two = 0; int three = 0; for(Entry entry : list) { if(entry.id == 1 && entry.text.equals("one")) { one++; } if(entry.id == 2 && entry.text.equals("two")) { two++; } if(entry.id == 3 && entry.text.equals("three")) { three++; } } assertEquals(one, 1); assertEquals(two, 1); assertEquals(three, 1); validate(list, serializer); } public void testPrimitiveDefaultCollection() throws Exception { PrimitiveDefaultCollection list = serializer.read(PrimitiveDefaultCollection.class, PRIMITIVE_DEFAULT_LIST); int one = 0; int two = 0; int three = 0; for(String entry : list) { if(entry.equals("one")) { one++; } if(entry.equals("two")) { two++; } if(entry.equals("three")) { three++; } } assertEquals(one, 1); assertEquals(two, 1); assertEquals(three, 1); validate(list, serializer); } public void testSetToSortedSet() throws Exception { boolean success = false; try { EntrySortedSet set = serializer.read(EntrySortedSet.class, HASH_SET); } catch(InstantiationException e) { e.printStackTrace(); success = true; } assertTrue(success); } public void testListToSet() throws Exception { boolean success = false; try { EntrySet set = serializer.read(EntrySet.class, ARRAY_LIST); } catch(InstantiationException e) { e.printStackTrace(); success = true; } assertTrue(success); } public void testInvalidList() throws Exception { boolean success = false; try { InvalidList set = serializer.read(InvalidList.class, LIST); } catch(InstantiationException e) { e.printStackTrace(); success = true; } assertTrue(success); } public void testUnknownCollectionList() throws Exception { boolean success = false; try { UnknownCollectionList set = serializer.read(UnknownCollectionList.class, LIST); } catch(InstantiationException e) { e.printStackTrace(); success = true; } assertTrue(success); } public void testAbstractList() throws Exception { boolean success = false; try { EntryList set = serializer.read(EntryList.class, ABSTRACT_LIST); } catch(InstantiationException e) { e.printStackTrace(); success = true; } assertTrue(success); } public void testNotACollection() throws Exception { boolean success = false; try { EntryList set = serializer.read(EntryList.class, NOT_A_COLLECTION); } catch(InstantiationException e) { e.printStackTrace(); success = true; } assertTrue(success); } public void testMissingCollection() throws Exception { boolean success = false; try { EntrySet set = serializer.read(EntrySet.class, MISSING_COLLECTION); } catch(ClassNotFoundException e) { e.printStackTrace(); success = true; } assertTrue(success); } } ��������simple-xml-2.3.2/test/src/org/simpleframework/xml/core/MissingArrayLengthTest.java������������������0000644�0001750�0001750�00000001765�11342530530�031245� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.simpleframework.xml.core; import junit.framework.TestCase; import org.simpleframework.xml.ElementArray; import org.simpleframework.xml.Root; public class MissingArrayLengthTest extends TestCase { private static final String SOURCE = "<missingArrayLengthExample>"+ " <array>"+ " <item>one</item>" + " <item>two</item>" + " <item>three</item>" + " </array>"+ "</missingArrayLengthExample>"; @Root private static class MissingArrayLengthExample { @ElementArray(entry="item") private String[] array; } public void testMissingArrayLength() throws Exception { Persister persister = new Persister(); boolean exception = false; try { MissingArrayLengthExample value = persister.read(MissingArrayLengthExample.class, SOURCE); } catch(ElementException e) { exception = true; } assertTrue("Exception not thrown", exception); } } �����������simple-xml-2.3.2/test/src/org/simpleframework/xml/core/MethodScannerTest.java�����������������������0000644�0001750�0001750�00000010715�11342530530�030220� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.simpleframework.xml.core; import java.util.ArrayList; import java.util.Collection; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Element; import org.simpleframework.xml.ElementList; import org.simpleframework.xml.Root; import org.simpleframework.xml.Text; import org.simpleframework.xml.core.Contact; import org.simpleframework.xml.core.MethodScanner; import junit.framework.TestCase; public class MethodScannerTest extends TestCase { @Root(name="name") public static class Example { private int version; private String name; @Element(name="version") public void setVersion(int version) { this.version = version; } @Element(name="version") public int getVersion() { return version; } @Attribute(name="name") public void setName(String name) { this.name = name; } @Attribute(name="name") public String getName() { return name; } } public static class IllegalOverload extends Example { private int name; @Attribute(name="name") public void setName(int name) { this.name = name; } } public static class NonMatchingMethods extends Example { private int type; @Attribute(name="type") public void setType(int type) { this.type = type; } } public static class NotBeanMethod extends Example { private String type; @Element(name="type") public void setType(String type) { this.type = type; } @Element(name="type") public String readType() { return type; } } public static class TextMethod extends Example { private long length; @Text public void setLength(long length) { this.length = length; } @Text public long getLength() { return length; } } public static class CollectionMethod extends TextMethod { private Collection list; @ElementList(name="list", type=Example.class) public void setList(Collection list) { this.list = list; } @ElementList(name="list", type=Example.class) public Collection getList() { return list; } } public void testExample() throws Exception { MethodScanner scanner = new MethodScanner(Example.class); ArrayList<Class> list = new ArrayList<Class>(); for(Contact contact : scanner) { list.add(contact.getType()); } assertEquals(scanner.size(), 2); assertTrue(list.contains(String.class)); assertTrue(list.contains(int.class)); } public void testIllegalOverload() throws Exception { boolean success = false; try { new MethodScanner(IllegalOverload.class); }catch(Exception e){ success = true; } assertTrue(success); } public void testNonMatchingMethods() throws Exception { boolean success = false; try { new MethodScanner(NonMatchingMethods.class); }catch(Exception e){ success = true; } assertTrue(success); } public void testNotBeanMethod() throws Exception { boolean success = false; try { new MethodScanner(NotBeanMethod.class); }catch(Exception e){ success = true; } assertTrue(success); } public void testText() throws Exception { MethodScanner scanner = new MethodScanner(TextMethod.class); ArrayList<Class> list = new ArrayList<Class>(); for(Contact contact : scanner) { list.add(contact.getType()); } assertEquals(scanner.size(), 3); assertTrue(list.contains(String.class)); assertTrue(list.contains(int.class)); assertTrue(list.contains(long.class)); } public void testCollection() throws Exception { MethodScanner scanner = new MethodScanner(CollectionMethod.class); ArrayList<Class> list = new ArrayList<Class>(); for(Contact contact : scanner) { list.add(contact.getType()); } assertEquals(scanner.size(), 4); assertTrue(list.contains(String.class)); assertTrue(list.contains(int.class)); assertTrue(list.contains(long.class)); assertTrue(list.contains(Collection.class)); } } ���������������������������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/core/InjectionTest.java���������������������������0000644�0001750�0001750�00000004457�11342530530�027416� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.simpleframework.xml.core; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Element; import org.simpleframework.xml.Root; import org.simpleframework.xml.Text; import org.simpleframework.xml.core.Commit; import org.simpleframework.xml.core.Persister; import junit.framework.TestCase; public class InjectionTest extends TestCase { private static final String SOURCE = "<?xml version=\"1.0\"?>\n"+ "<injectionExample id='12' flag='true'>\n"+ " <text>entry text</text> \n\r"+ " <date>01/10/1916</date> \n"+ " <message trim='true'>\r\n"+ " This is an example message.\r\n"+ " </message>\r\n"+ "</injectionExample>"; @Root private static class InjectionExample { @Attribute private boolean flag; @Attribute private int id; @Element private String text; @Element private String date; @Element private ExampleMessage message; private String name; public InjectionExample(String name) { this.name = name; } } private static class ExampleMessage { @Attribute private boolean trim; @Text private String text; @Commit private void prepare() { if(trim) { text = text.trim(); } } } private Persister serializer; public void setUp() { serializer = new Persister(); } public void testFirst() throws Exception { InjectionExample example = new InjectionExample("name"); assertEquals(example.flag, false); assertEquals(example.id, 0); assertEquals(example.text, null); assertEquals(example.date, null); assertEquals(example.name, "name"); assertEquals(example.message, null); InjectionExample result = serializer.read(example, SOURCE); assertEquals(example, result); assertEquals(example.flag, true); assertEquals(example.id, 12); assertEquals(example.text, "entry text"); assertEquals(example.date, "01/10/1916"); assertEquals(example.name, "name"); assertEquals(example.message.trim, true); assertEquals(example.message.text, "This is an example message."); } } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/core/MethodContactTest.java�����������������������0000644�0001750�0001750�00000005634�11342530530�030226� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.simpleframework.xml.core; import java.util.ArrayList; import java.util.Collection; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Element; import org.simpleframework.xml.ElementList; import org.simpleframework.xml.Root; import org.simpleframework.xml.core.Contact; import org.simpleframework.xml.core.ContactList; import org.simpleframework.xml.core.MethodScanner; import junit.framework.TestCase; public class MethodContactTest extends TestCase { @Root(name="name") public static class Example { private Collection<Entry> list; private float version; private String name; @ElementList(name="list", type=Entry.class) public void setList(Collection<Entry> list) { this.list = list; } @ElementList(name="list", type=Entry.class) public Collection<Entry> getList() { return list; } @Element(name="version") public void setVersion(float version) { this.version = version; } @Element(name="version") public float getVersion() { return version; } @Attribute(name="name") public void setName(String name) { this.name = name; } @Attribute(name="name") public String getName() { return name; } } @Root(name="entry") public static class Entry { @Attribute(name="text") public String text; } public void testContact() throws Exception { MethodScanner scanner = new MethodScanner(Example.class); ArrayList<Class> types = new ArrayList<Class>(); for(Contact contact : scanner) { types.add(contact.getType()); } assertEquals(scanner.size(), 3); assertTrue(types.contains(String.class)); assertTrue(types.contains(float.class)); assertTrue(types.contains(Collection.class)); ContactList contacts = scanner; Contact version = getContact(float.class, contacts); Example example = new Example(); version.set(example, 1.2f); assertEquals(example.version, 1.2f); assertNull(example.name); assertNull(example.list); Contact name = getContact(String.class, contacts); name.set(example, "name"); assertEquals(example.version, 1.2f); assertEquals(example.name, "name"); assertNull(example.list); Contact list = getContact(Collection.class, contacts); list.set(example, types); assertEquals(example.version, 1.2f); assertEquals(example.name, "name"); assertEquals(example.list, types); } public Contact getContact(Class type, ContactList from) { for(Contact contact : from) { if(type == contact.getType()) { return contact; } } return null; } } ����������������������������������������������������������������������������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/core/EnumSetTest.java�����������������������������0000644�0001750�0001750�00000002503�11342530530�027042� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.simpleframework.xml.core; import java.util.EnumSet; import java.util.Set; import org.simpleframework.xml.ElementList; import org.simpleframework.xml.Root; import org.simpleframework.xml.ValidationTestCase; public class EnumSetTest extends ValidationTestCase { private static enum Qualification { BEGINNER, EXPERIENCED, EXPERT, GURU } @Root private static class EnumSetExample { @ElementList private EnumSet<Qualification> set = EnumSet.noneOf(Qualification.class); public EnumSetExample() { super(); } public void add(Qualification qualification) { set.add(qualification); } public boolean contains(Qualification qualification) { return set.contains(qualification); } } public void testEnumSet() throws Exception { Persister persister = new Persister(); EnumSetExample example = new EnumSetExample(); example.add(Qualification.BEGINNER); example.add(Qualification.EXPERT); assertTrue(example.contains(Qualification.BEGINNER)); assertTrue(example.contains(Qualification.EXPERT)); assertFalse(example.contains(Qualification.GURU)); persister.write(example, System.out); validate(persister, example); } } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/core/UnicodeTest.java�����������������������������0000644�0001750�0001750�00000031120�11342530530�027045� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.simpleframework.xml.core; import java.io.ByteArrayInputStream; import java.io.InputStream; import java.io.InputStreamReader; import java.io.StringWriter; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Element; import org.simpleframework.xml.ElementList; import org.simpleframework.xml.Root; import org.simpleframework.xml.ValidationTestCase; import org.simpleframework.xml.util.Dictionary; import org.simpleframework.xml.util.Entry; public class UnicodeTest extends ValidationTestCase { private static final String SOURCE = "<?xml version='1.0' encoding='UTF-8'?>\n"+ "<example>\n"+ " <list>\n"+ " <unicode origin=\"Australia\" name=\"Nicole Kidman\">\n"+ " <text>Nicole Kidman</text>\n"+ " </unicode>\n"+ " <unicode origin=\"Austria\" name=\"Johann Strauss\">\n"+ " <text>Johann Strauß</text>\n"+ " </unicode>\n"+ " <unicode origin=\"Canada\" name=\"Celine Dion\">\n"+ " <text>Céline Dion</text>\n"+ " </unicode>\n"+ " <unicode origin=\"Democratic People's Rep. of Korea\" name=\"LEE Sol-Hee\">\n"+ " <text>ì´ì„¤í¬</text>\n"+ " </unicode>\n"+ " <unicode origin=\"Denmark\" name=\"Soren Hauch-Fausboll\">\n"+ " <text>Søren Hauch-Fausbøll</text>\n"+ " </unicode>\n"+ " <unicode origin=\"Denmark\" name=\"Soren Kierkegaard\">\n"+ " <text>Søren KierkegÃ¥rd</text>\n"+ " </unicode>\n"+ " <unicode origin=\"Egypt\" name=\"Abdel Halim Hafez\">\n"+ " <text>ﻋﺑﺪïºï» ïº£ï»Ÿï»³ï»¢ ﺤﺎﻓﻅ</text>\n"+ " </unicode>\n"+ " <unicode origin=\"Egypt\" name=\"Om Kolthoum\">\n"+ " <text>ﺃﻡ ﻛﻟﺛﻭﻡ</text>\n"+ " </unicode>\n"+ " <unicode origin=\"Eritrea\" name=\"Berhane Zeray\">\n"+ " <text>ኤርትራ</text>\n"+ " </unicode>\n"+ " <unicode origin=\"Ethiopia\" name=\"Haile Gebreselassie\">\n"+ " <text>ኢትዮጵያ</text>\n"+ " </unicode>\n"+ " <unicode origin=\"France\" name=\"Gerard Depardieu\">\n"+ " <text>Gérard Depardieu</text>\n"+ " </unicode>\n"+ " <unicode origin=\"France\" name=\"Jean Reno\">\n"+ " <text>Jean Réno</text>\n"+ " </unicode>\n"+ " <unicode origin=\"France\" name=\"Camille Saint-Saens\">\n"+ " <text>Camille Saint-Saëns</text>\n"+ " </unicode>\n"+ " <unicode origin=\"France\" name=\"Mylene Demongeot\">\n"+ " <text>Mylène Demongeot</text>\n"+ " </unicode>\n"+ " <unicode origin=\"France\" name=\"Francois Truffaut\">\n"+ " <text>François Truffaut</text>\n"+ " </unicode>\n"+ " <unicode origin=\"Germany\" name=\"Rudi Voeller\">\n"+ " <text>Rudi Völler</text>\n"+ " </unicode>\n"+ " <unicode origin=\"Germany\" name=\"Walter Schultheiss\">\n"+ " <text>Walter Schultheiß</text>\n"+ " </unicode>\n"+ " <unicode origin=\"Greece\" name=\"Giorgos Dalaras\">\n"+ " <text>ΓιώÏγος ÎταλάÏας</text>\n"+ " </unicode>\n"+ " <unicode origin=\"Iceland\" name=\"Bjork Gudmundsdottir\">\n"+ " <text>Björk Guðmundsdóttir</text>\n"+ " </unicode>\n"+ " <unicode origin=\"India (Hindi)\" name=\"Madhuri Dixit\">\n"+ " <text>माधà¥à¤°à¥€ दिछित</text>\n"+ " </unicode>\n"+ " <unicode origin=\"Ireland\" name=\"Sinead O'Connor\">\n"+ " <text>Sinéad O'Connor</text>\n"+ " </unicode>\n"+ " <unicode origin=\"Israel\" name=\"Yehoram Gaon\">\n"+ " <text>×™×”×•×¨× ×’×ון</text>\n"+ " </unicode>\n"+ " <unicode origin=\"Italy\" name=\"Fabrizio DeAndre\">\n"+ " <text>Fabrizio De André</text>\n"+ " </unicode>\n"+ " <unicode origin=\"Japan\" name=\"KUBOTA Toshinobu\">\n"+ " <text>ä¹…ä¿ç”°Â    利伸</text>\n"+ " </unicode>\n"+ " <unicode origin=\"Japan\" name=\"HAYASHIBARA Megumi\">\n"+ " <text>林原 ã‚ãã¿</text>\n"+ " </unicode>\n"+ " <unicode origin=\"Japan\" name=\"Mori Ogai\">\n"+ " <text>森鷗外</text>\n"+ " </unicode>\n"+ " <unicode origin=\"Japan\" name=\"Tex Texin\">\n"+ " <text>テクス テクサン</text>\n"+ " </unicode>\n"+ " <unicode origin=\"Norway\" name=\"Tor Age Bringsvaerd\">\n"+ " <text>Tor Ã…ge Bringsværd</text>\n"+ " </unicode>\n"+ " <unicode origin=\"Pakistan (Urdu)\" name=\"Nusrat Fatah Ali Khan\">\n"+ " <text>نصرت ÙØªØ­ علی خان</text>\n"+ " </unicode>\n"+ " <unicode origin=\"People's Rep. of China\" name=\"ZHANG Ziyi\">\n"+ " <text>ç« å­æ€¡</text>\n"+ " </unicode>\n"+ " <unicode origin=\"People's Rep. of China\" name=\"WONG Faye\">\n"+ " <text>王è²</text>\n"+ " </unicode>\n"+ " <unicode origin=\"Poland\" name=\"Lech Walesa\">\n"+ " <text>Lech Wałęsa</text>\n"+ " </unicode>\n"+ " <unicode origin=\"Puerto Rico\" name=\"Olga Tanon\">\n"+ " <text>Olga Tañón</text>\n"+ " </unicode>\n"+ " <unicode origin=\"Rep. of China\" name=\"Hsu Chi\">\n"+ " <text>舒淇</text>\n"+ " </unicode>\n"+ " <unicode origin=\"Rep. of China\" name=\"Ang Lee\">\n"+ " <text>æŽå®‰</text>\n"+ " </unicode>\n"+ " <unicode origin=\"Rep. of Korea\" name=\"AHN Sung-Gi\">\n"+ " <text>안성기</text>\n"+ " </unicode>\n"+ " <unicode origin=\"Rep. of Korea\" name=\"SHIM Eun-Ha\">\n"+ " <text>심ì€í•˜</text>\n"+ " </unicode>\n"+ " <unicode origin=\"Russia\" name=\"Mikhail Gorbachev\">\n"+ " <text>Михаил Горбачёв</text>\n"+ " </unicode>\n"+ " <unicode origin=\"Russia\" name=\"Boris Grebenshchikov\">\n"+ " <text>Ð‘Ð¾Ñ€Ð¸Ñ Ð“Ñ€ÐµÐ±ÐµÐ½Ñ‰Ð¸ÐºÐ¾Ð²</text>\n"+ " </unicode>\n"+ " <unicode origin=\"Syracuse (Sicily)\" name=\"Archimedes\">\n"+ " <text>ἈÏχιμήδης</text>\n"+ " </unicode>\n"+ " <unicode origin=\"Thailand\" name=\"Thongchai McIntai\">\n"+ " <text>ธงไชย à¹à¸¡à¹‡à¸„อินไตย์</text>\n"+ " </unicode>\n"+ " <unicode origin=\"U.S.A.\" name=\"Brad Pitt\">\n"+ " <text>Brad Pitt</text>\n"+ " </unicode>\n"+ " </list>\n"+ "</example>\n"; @Root(name="unicode") private static class Unicode implements Entry { @Attribute(name="origin") private String origin; @Element(name="text") private String text; @Attribute private String name; public String getName() { return name; } } @Root(name="example") private static class UnicodeExample { @ElementList(name="list", type=Unicode.class) private Dictionary<Unicode> list; public Unicode get(String name) { return list.get(name); } } private Persister persister; public void setUp() throws Exception { persister = new Persister(); } public void testUnicode() throws Exception { UnicodeExample example = persister.read(UnicodeExample.class, SOURCE); assertUnicode(example); validate(example, persister); // Ensure the deserialized object is valid } public void testWriteUnicode() throws Exception { UnicodeExample example = persister.read(UnicodeExample.class, SOURCE); assertUnicode(example); validate(example, persister); // Ensure the deserialized object is valid StringWriter out = new StringWriter(); persister.write(example, out); example = persister.read(UnicodeExample.class, out.toString()); assertUnicode(example); validate(example, persister); } public void testUnicodeFromByteStream() throws Exception { byte[] data = SOURCE.getBytes("UTF-8"); InputStream source = new ByteArrayInputStream(data); UnicodeExample example = persister.read(UnicodeExample.class, source); assertUnicode(example); validate(example, persister); // Ensure the deserialized object is valid } public void testIncorrectEncoding() throws Exception { byte[] data = SOURCE.getBytes("UTF-8"); InputStream source = new ByteArrayInputStream(data); UnicodeExample example = persister.read(UnicodeExample.class, new InputStreamReader(source, "ISO-8859-1")); assertFalse("Encoding of ISO-8859-1 did not work", isUnicode(example)); } public void assertUnicode(UnicodeExample example) throws Exception { assertTrue("Data was not unicode", isUnicode(example)); } public boolean isUnicode(UnicodeExample example) throws Exception { // Ensure text remailed unicode if(!example.get("Nicole Kidman").text.equals("Nicole Kidman")) return false; if(!example.get("Johann Strauss").text.equals("Johann Strauß")) return false; if(!example.get("Celine Dion").text.equals("Céline Dion")) return false; if(!example.get("LEE Sol-Hee").text.equals("ì´ì„¤í¬")) return false; if(!example.get("Soren Hauch-Fausboll").text.equals("Søren Hauch-Fausbøll")) return false; if(!example.get("Soren Kierkegaard").text.equals("Søren KierkegÃ¥rd")) return false; if(!example.get("Abdel Halim Hafez").text.equals("ﻋﺑﺪïºï» ïº£ï»Ÿï»³ï»¢ ﺤﺎﻓﻅ")) return false; if(!example.get("Om Kolthoum").text.equals("ﺃﻡ ﻛﻟﺛﻭﻡ")) return false; if(!example.get("Berhane Zeray").text.equals("ኤርትራ")) return false; if(!example.get("Haile Gebreselassie").text.equals("ኢትዮጵያ")) return false; if(!example.get("Gerard Depardieu").text.equals("Gérard Depardieu")) return false; if(!example.get("Jean Reno").text.equals("Jean Réno")) return false; if(!example.get("Camille Saint-Saens").text.equals("Camille Saint-Saëns")) return false; if(!example.get("Mylene Demongeot").text.equals("Mylène Demongeot")) return false; if(!example.get("Francois Truffaut").text.equals("François Truffaut")) return false; //if(!example.get("Rudi Voeller").text.equals("Rudi Völler")) return false; if(!example.get("Walter Schultheiss").text.equals("Walter Schultheiß")) return false; if(!example.get("Giorgos Dalaras").text.equals("ΓιώÏγος ÎταλάÏας")) return false; if(!example.get("Bjork Gudmundsdottir").text.equals("Björk Guðmundsdóttir")) return false; if(!example.get("Madhuri Dixit").text.equals("माधà¥à¤°à¥€ दिछित")) return false; if(!example.get("Sinead O'Connor").text.equals("Sinéad O'Connor")) return false; if(!example.get("Yehoram Gaon").text.equals("×™×”×•×¨× ×’×ון")) return false; if(!example.get("Fabrizio DeAndre").text.equals("Fabrizio De André")) return false; if(!example.get("KUBOTA Toshinobu").text.equals("ä¹…ä¿ç”°Â    利伸")) return false; if(!example.get("HAYASHIBARA Megumi").text.equals("林原 ã‚ãã¿")) return false; if(!example.get("Mori Ogai").text.equals("森鷗外")) return false; if(!example.get("Tex Texin").text.equals("テクス テクサン")) return false; if(!example.get("Tor Age Bringsvaerd").text.equals("Tor Ã…ge Bringsværd")) return false; if(!example.get("Nusrat Fatah Ali Khan").text.equals("نصرت ÙØªØ­ علی خان")) return false; if(!example.get("ZHANG Ziyi").text.equals("ç« å­æ€¡")) return false; if(!example.get("WONG Faye").text.equals("王è²")) return false; if(!example.get("Lech Walesa").text.equals("Lech Wałęsa")) return false; if(!example.get("Olga Tanon").text.equals("Olga Tañón")) return false; if(!example.get("Hsu Chi").text.equals("舒淇")) return false; if(!example.get("Ang Lee").text.equals("æŽå®‰")) return false; if(!example.get("AHN Sung-Gi").text.equals("안성기")) return false; if(!example.get("SHIM Eun-Ha").text.equals("심ì€í•˜")) return false; if(!example.get("Mikhail Gorbachev").text.equals("Михаил Горбачёв")) return false; if(!example.get("Boris Grebenshchikov").text.equals("Ð‘Ð¾Ñ€Ð¸Ñ Ð“Ñ€ÐµÐ±ÐµÐ½Ñ‰Ð¸ÐºÐ¾Ð²")) return false; if(!example.get("Archimedes").text.equals("ἈÏχιμήδης")) return false; if(!example.get("Thongchai McIntai").text.equals("ธงไชย à¹à¸¡à¹‡à¸„อินไตย์")) return false; if(!example.get("Brad Pitt").text.equals("Brad Pitt")) return false; return true; } } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/core/NullArrayEntryTest.java����������������������0000644�0001750�0001750�00000005346�11342530530�030425� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.simpleframework.xml.core; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Element; import org.simpleframework.xml.ElementArray; import org.simpleframework.xml.Root; import org.simpleframework.xml.Serializer; import org.simpleframework.xml.ValidationTestCase; public class NullArrayEntryTest extends ValidationTestCase { private static final String LIST = "<?xml version=\"1.0\"?>\n"+ "<exampleArray>\n"+ " <list length='3'>\n"+ " <substitute id='1'>\n"+ " <text>one</text> \n\r"+ " </substitute>\n\r"+ " <substitute/>\n"+ " <substitute/>\n"+ " </list>\n"+ "</exampleArray>"; private static final String PRIMITIVE_LIST = "<?xml version=\"1.0\"?>\n"+ "<examplePrimitiveArray>\n"+ " <list length='4'>\r\n" + " <substitute>a</substitute>\n"+ " <substitute>b</substitute>\n"+ " <substitute/>\r\n"+ " <substitute/>\r\n" + " </list>\r\n" + "</examplePrimitiveArray>"; @Root private static class Entry { @Attribute private int id; @Element private String text; public Entry() { super(); } public Entry(String text, int id) { this.id = id; this.text = text; } public String getText() { return text; } public int getId() { return id; } } @Root private static class ExampleArray { @ElementArray(name="list", entry="substitute") // XXX bad error if the length= attribute is missing private Entry[] list; public Entry[] getArray() { return list; } } @Root private static class ExamplePrimitiveArray { @ElementArray(name="list", entry="substitute") // XXX bad error if this was an array private String[] list; public String[] getArray() { return list; } } public void testExampleArray() throws Exception { Serializer serializer = new Persister(); ExampleArray list = serializer.read(ExampleArray.class, LIST); list.list = new Entry[] { new Entry("a", 1), new Entry("b", 2), null, null, new Entry("e", 5) }; serializer.write(list, System.out); validate(list, serializer); } public void testExamplePrimitiveArray() throws Exception { Serializer serializer = new Persister(); ExamplePrimitiveArray list = serializer.read(ExamplePrimitiveArray.class, PRIMITIVE_LIST); list.list = new String[] { "a", "b", null, null, "e", null, "f" }; serializer.write(list, System.out); validate(list, serializer); } } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/core/CollectionEntryTest.java���������������������0000644�0001750�0001750�00000010432�11342530530�030577� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.simpleframework.xml.core; import java.util.List; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Element; import org.simpleframework.xml.ElementList; import org.simpleframework.xml.Root; import org.simpleframework.xml.Serializer; import org.simpleframework.xml.ValidationTestCase; import org.simpleframework.xml.core.Persister; public class CollectionEntryTest extends ValidationTestCase { private static final String LIST = "<?xml version=\"1.0\"?>\n"+ "<exampleCollection>\n"+ " <list>\n"+ " <substitute id='1'>\n"+ " <text>one</text> \n\r"+ " </substitute>\n\r"+ " <substitute id='2'>\n"+ " <text>two</text> \n\r"+ " </substitute>\n"+ " <substitute id='3'>\n"+ " <text>three</text> \n\r"+ " </substitute>\n"+ " </list>\n"+ "</exampleCollection>"; private static final String INLINE_LIST = "<?xml version=\"1.0\"?>\n"+ "<exampleInlineCollection>\n"+ " <substitute id='1'>\n"+ " <text>one</text> \n\r"+ " </substitute>\n\r"+ " <substitute id='2'>\n"+ " <text>two</text> \n\r"+ " </substitute>\n"+ " <substitute id='3'>\n"+ " <text>three</text> \n\r"+ " </substitute>\n"+ "</exampleInlineCollection>"; private static final String INLINE_PRIMITIVE_LIST = "<?xml version=\"1.0\"?>\n"+ "<examplePrimitiveCollection>\n"+ " <substitute>a</substitute>\n"+ " <substitute>b</substitute>\n"+ " <substitute>c</substitute>\n"+ " <substitute>d</substitute>\n"+ "</examplePrimitiveCollection>"; private static final String PRIMITIVE_LIST = "<?xml version=\"1.0\"?>\n"+ "<examplePrimitiveCollection>\n"+ " <list>\r\n" + " <substitute>a</substitute>\n"+ " <substitute>b</substitute>\n"+ " <substitute>c</substitute>\n"+ " <substitute>d</substitute>\n"+ " </list>\r\n" + "</examplePrimitiveCollection>"; @Root private static class Entry { @Attribute private int id; @Element private String text; public String getText() { return text; } public int getId() { return id; } } @Root private static class ExampleCollection { @ElementList(name="list", entry="substitute") private List<Entry> list; public List<Entry> getList() { return list; } } @Root private static class ExampleInlineCollection { @ElementList(name="list", entry="substitute", inline=true) private List<Entry> list; public List<Entry> getList() { return list; } } @Root private static class ExamplePrimitiveCollection { @ElementList(name="list", entry="substitute") private List<Character> list; public List<Character> getList() { return list; } } @Root private static class ExamplePrimitiveInlineCollection { @ElementList(name="list", entry="substitute", inline=true) private List<String> list; public List<String> getList() { return list; } } public void testExampleCollection() throws Exception { Serializer serializer = new Persister(); ExampleCollection list = serializer.read(ExampleCollection.class, LIST); validate(list, serializer); } public void testExampleInlineCollection() throws Exception { Serializer serializer = new Persister(); ExampleInlineCollection list = serializer.read(ExampleInlineCollection.class, INLINE_LIST); validate(list, serializer); } public void testExamplePrimitiveInlineCollection() throws Exception { Serializer serializer = new Persister(); ExamplePrimitiveInlineCollection list = serializer.read(ExamplePrimitiveInlineCollection.class, INLINE_PRIMITIVE_LIST); validate(list, serializer); } public void testExamplePrimitiveCollection() throws Exception { Serializer serializer = new Persister(); ExamplePrimitiveCollection list = serializer.read(ExamplePrimitiveCollection.class, PRIMITIVE_LIST); validate(list, serializer); } } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/ValidationTestCase.java���������������������������0000644�0001750�0001750�00000042503�11342530527�027432� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.simpleframework.xml; import java.io.File; import java.io.FileOutputStream; import java.io.OutputStream; import java.io.OutputStreamWriter; import java.io.StringReader; import java.io.StringWriter; import java.io.Writer; import java.util.ArrayList; import java.util.LinkedList; import java.util.List; import java.util.Queue; import java.util.regex.Matcher; import java.util.regex.Pattern; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.transform.OutputKeys; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerFactory; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; import org.custommonkey.xmlunit.XMLTestCase; import org.simpleframework.xml.core.Persister; import org.simpleframework.xml.strategy.CycleStrategy; import org.simpleframework.xml.strategy.Strategy; import org.simpleframework.xml.strategy.Type; import org.simpleframework.xml.strategy.Visitor; import org.simpleframework.xml.strategy.VisitorStrategy; import org.simpleframework.xml.stream.CamelCaseStyle; import org.simpleframework.xml.stream.Format; import org.simpleframework.xml.stream.HyphenStyle; import org.simpleframework.xml.stream.InputNode; //import org.simpleframework.xml.stream.NodeAdapterBuilder; import org.simpleframework.xml.stream.NodeMap; import org.simpleframework.xml.stream.OutputNode; import org.simpleframework.xml.stream.Style; import org.w3c.dom.CDATASection; import org.w3c.dom.Document; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import org.xml.sax.InputSource; public class ValidationTestCase extends XMLTestCase { private static TransformerFactory transformerFactory; private static Transformer transformer; private static DocumentBuilderFactory builderFactory; private static DocumentBuilder builder; static { try { builderFactory = DocumentBuilderFactory.newInstance(); builderFactory.setNamespaceAware(true); builder = builderFactory.newDocumentBuilder(); transformerFactory = TransformerFactory.newInstance(); transformer = transformerFactory.newTransformer(); } catch(Exception cause) { cause.printStackTrace(); } } private static File directory; static { try { String path = System.getProperty("output"); directory = new File(path); } catch(Exception cause){ directory = new File("output"); } if(!directory.exists()) { directory.mkdirs(); } } public void testDirectory() throws Exception { assertTrue(directory.exists()); } public static synchronized void validate(Serializer out, Object type) throws Exception { validate(type, out); } public static synchronized void validate(Object type, Serializer out) throws Exception { File destination = new File(directory, type.getClass().getSimpleName() + ".xml"); OutputStream file = new FileOutputStream(destination); StringWriter buffer = new StringWriter(); out.write(type, buffer); String text = buffer.toString(); byte[] octets = text.getBytes("UTF-8"); System.out.write(octets); System.out.flush(); file.write(octets); file.close(); validate(text); File domDestination = new File(directory, type.getClass().getSimpleName() + ".dom.xml"); File asciiDestination = new File(directory, type.getClass().getSimpleName() + ".ascii-dom.xml"); OutputStream domFile = new FileOutputStream(domDestination); OutputStream asciiFile = new FileOutputStream(asciiDestination); Writer asciiOut = new OutputStreamWriter(asciiFile, "iso-8859-1"); /* * This DOM document is the result of serializing the object in to a * string. The document can then be used to validate serialization. */ Document doc = builder.parse(new InputSource(new StringReader(text))); transformer.setOutputProperty(OutputKeys.INDENT, "yes"); transformer.transform(new DOMSource(doc), new StreamResult(domFile)); transformer.transform(new DOMSource(doc), new StreamResult(asciiOut)); domFile.close(); asciiFile.close(); out.validate(type.getClass(), text); File hyphenFile = new File(directory, type.getClass().getSimpleName() + ".hyphen.xml"); Strategy strategy = new CycleStrategy("ID", "REFERER"); Visitor visitor = new DebugVisitor(); strategy = new VisitorStrategy(visitor, strategy); Style style = new HyphenStyle(); Format format = new Format(style); Persister hyphen = new Persister(strategy, format); hyphen.write(type, hyphenFile); hyphen.write(type, System.out); hyphen.read(type.getClass(), hyphenFile); File camelCaseFile = new File(directory, type.getClass().getSimpleName() + ".camel-case.xml"); Style camelCaseStyle = new CamelCaseStyle(true, false); Format camelCaseFormat = new Format(camelCaseStyle); Persister camelCase = new Persister(strategy, camelCaseFormat); camelCase.write(type, camelCaseFile); camelCase.write(type, System.out); camelCase.read(type.getClass(), camelCaseFile); } public static synchronized Document parse(String text) throws Exception { return builder.parse(new InputSource(new StringReader(text))); } public static synchronized void validate(String text) throws Exception { builder.parse(new InputSource(new StringReader(text))); System.out.println(text); } public void assertElementExists(String sourceXml, String pathExpression) throws Exception { assertMatch(sourceXml, pathExpression, new MatchAny(), true); } public void assertElementHasValue(String sourceXml, String pathExpression, String value) throws Exception { assertMatch(sourceXml, pathExpression, new ElementMatch(value), true); } public void assertElementHasCDATA(String sourceXml, String pathExpression, String value) throws Exception { assertMatch(sourceXml, pathExpression, new ElementCDATAMatch(value), true); } public void assertElementHasAttribute(String sourceXml, String pathExpression, String name, String value) throws Exception { assertMatch(sourceXml, pathExpression, new AttributeMatch(name, value), true); } public void assertElementHasNamespace(String sourceXml, String pathExpression, String reference) throws Exception { assertMatch(sourceXml, pathExpression, new OfficialNamespaceMatch(reference), true); } public void assertElementDoesNotExist(String sourceXml, String pathExpression) throws Exception { assertMatch(sourceXml, pathExpression, new MatchAny(), false); } public void assertElementDoesNotHaveValue(String sourceXml, String pathExpression, String value) throws Exception { assertMatch(sourceXml, pathExpression, new ElementMatch(value), false); } public void assertElementDoesNotHaveCDATA(String sourceXml, String pathExpression, String value) throws Exception { assertMatch(sourceXml, pathExpression, new ElementCDATAMatch(value), false); } public void assertElementDoesNotHaveAttribute(String sourceXml, String pathExpression, String name, String value) throws Exception { assertMatch(sourceXml, pathExpression, new AttributeMatch(name, value), false); } public void assertElementDoesNotHaveNamespace(String sourceXml, String pathExpression, String reference) throws Exception { assertMatch(sourceXml, pathExpression, new OfficialNamespaceMatch(reference), false); } private void assertMatch(String sourceXml, String pathExpression, ExpressionMatch match, boolean assertTrue) throws Exception { Document document = parse(sourceXml); ExpressionMatcher matcher = new ExpressionMatcher(pathExpression, match); if(!assertTrue) { assertFalse("Document does have expression '"+pathExpression+"' with "+match.getDescription()+" for "+sourceXml, matcher.matches(document)); } else { assertTrue("Document does not match expression '"+pathExpression+"' with "+match.getDescription()+" for "+sourceXml, matcher.matches(document)); } } private static class ExpressionMatcher { private Pattern pattern; private String[] segments; private ExpressionMatch match; private String pathExpression; public ExpressionMatcher(String pathExpression, ExpressionMatch match) { this.segments = pathExpression.replaceAll("^\\/", "").split("\\/"); this.pattern = Pattern.compile("^(.*)\\[([0-9]+)\\]$"); this.pathExpression = pathExpression; this.match = match; } public boolean matches(Document document) { org.w3c.dom.Element element = document.getDocumentElement(); if(!getLocalPart(element).equals(segments[0])) { return false; } for(int i = 1; i < segments.length; i++) { Matcher matcher = pattern.matcher(segments[i]); String path = segments[i]; int index = 0; if(matcher.matches()) { String value = matcher.group(2); index = Integer.parseInt(value); path = matcher.group(1); } List<org.w3c.dom.Element> list = getElementsByTagName(element, path); if(index >= list.size()) { return false; } element = list.get(index); if(element == null) { return false; } } return match.match(element); } public String toString() { return pathExpression; } } public static List<org.w3c.dom.Element> getElementsByTagName(org.w3c.dom.Element element, String name) { List<org.w3c.dom.Element> list = new ArrayList<org.w3c.dom.Element>(); NodeList allElements = element.getElementsByTagName("*"); for(int i = 0; i < allElements.getLength(); i++) { Node node = allElements.item(i); if(node instanceof org.w3c.dom.Element && node.getParentNode() == element) { org.w3c.dom.Element itemNode = (org.w3c.dom.Element)node; String localName = getLocalPart(itemNode); if(localName.equals(name)) { list.add(itemNode); } } } return list; } private static String getLocalPart(org.w3c.dom.Element element) { if(element != null) { String tagName = element.getTagName(); if(tagName != null) { return tagName.replaceAll(".*:", ""); } } return null; } private static String getPrefix(org.w3c.dom.Element element) { if(element != null) { String tagName = element.getTagName(); if(tagName != null && tagName.matches(".+:.+")) { return tagName.replaceAll(":.*", ""); } } return null; } public static interface ExpressionMatch{ public boolean match(org.w3c.dom.Element element); public String getDescription(); } public static class MatchAny implements ExpressionMatch { public boolean match(org.w3c.dom.Element element) { return element != null; } public String getDescription(){ return "path"; } } public static class ElementMatch implements ExpressionMatch { private final String text; public ElementMatch(String text){ this.text = text; } public boolean match(org.w3c.dom.Element element) { if(element != null) { Node value = element.getFirstChild(); return value != null && value.getNodeValue().equals(text); } return false; } public String getDescription() { return "text value equal to '"+text+"'"; } } public static class ElementCDATAMatch implements ExpressionMatch { private final String text; public ElementCDATAMatch(String text){ this.text = text; } public boolean match(org.w3c.dom.Element element) { if(element != null) { Node value = element.getFirstChild(); if(value instanceof CDATASection) { return value != null && value.getNodeValue().equals(text); } return false; } return false; } public String getDescription() { return "text value equal to '"+text+"'"; } } public static class NamespaceMatch implements ExpressionMatch { private final String reference; public NamespaceMatch(String reference) { this.reference = reference; } public boolean match(org.w3c.dom.Element element) { if(element != null) { String prefix = getPrefix(element); // a:element -> a if(prefix != null && prefix.equals("")) { prefix = null; } return match(element, prefix); } return false; } private boolean match(org.w3c.dom.Element element, String prefix) { if(element != null) { String currentPrefix = getPrefix(element); // if prefix is null, then this is inherited if((currentPrefix != null && prefix == null) ) { prefix = currentPrefix; // inherit parents } String name = "xmlns"; // default xmlns=<reference> if(prefix != null && !prefix.equals("")) { name = name + ":" + prefix; // xmlns:a=<reference> } String value = element.getAttribute(name); if(value == null || value.equals("")) { Node parent = element.getParentNode(); if(parent instanceof org.w3c.dom.Element) { return match((org.w3c.dom.Element)element.getParentNode(), prefix); } } return value != null && value.equals(reference); } return false; } public String getDescription(){ return "namespace reference as '"+reference+"'"; } } public static class OfficialNamespaceMatch implements ExpressionMatch { private final String reference; public OfficialNamespaceMatch(String reference) { this.reference = reference; } public boolean match(org.w3c.dom.Element element) { if(element != null) { String actual = element.getNamespaceURI(); if(actual == null){ return reference == null || reference.equals(""); } return element.getNamespaceURI().equals(reference); } return false; } public String getDescription(){ return "namespace reference as '"+reference+"'"; } } public static class AttributeMatch implements ExpressionMatch { private final String name; private final String value; public AttributeMatch(String name, String value) { this.name = name; this.value = value; } public boolean match(org.w3c.dom.Element element) { if(element != null) { String attribute = element.getAttribute(name); return attribute != null && attribute.equals(value); } return false; } public String getDescription() { return "attribute "+name+"='"+value+"'"; } } private static void print(Node node) { Queue<Node> nodes = new LinkedList<Node>(); nodes.add(node); while (!nodes.isEmpty()) { node = nodes.poll(); NodeList list = node.getChildNodes(); for (int i = 0; i < list.getLength(); i++) { if(list.item(i) instanceof org.w3c.dom.Element) { nodes.add(list.item(i)); } } System.out.format("name='%s' prefix='%s' reference='%s'%n", node.getPrefix(), node.getLocalName(), node.getNamespaceURI()); } } public static void dumpNamespaces(String xml) throws Exception { DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); dbf.setNamespaceAware(true); Document doc = dbf.newDocumentBuilder().parse( new InputSource(new StringReader(xml))); print(doc.getDocumentElement()); } public static class DebugVisitor implements Visitor { public void read(Type type, NodeMap<InputNode> node){ InputNode element = node.getNode(); if(element.isRoot()) { Object source = element.getSource(); Class sourceType = source.getClass(); Class itemType = type.getType(); System.out.printf(">>>>> ELEMENT=[%s]%n>>>>> TYPE=[%s]%n>>>>> SOURCE=[%s]%n", element, itemType, sourceType); } } public void write(Type type, NodeMap<OutputNode> node) throws Exception { if(!node.getNode().isRoot()) { node.getNode().setComment(type.getType().getName()); } } } } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/transform/����������������������������������������0000755�0001750�0001750�00000000000�11344247751�025056� 5����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/transform/GregorianCalendarTransformTest.java�����0000644�0001750�0001750�00000001217�11342530530�034011� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.simpleframework.xml.transform; import java.util.Date; import java.util.GregorianCalendar; import org.simpleframework.xml.transform.GregorianCalendarTransform; import junit.framework.TestCase; public class GregorianCalendarTransformTest extends TestCase { public void testGregorianCalendar() throws Exception { GregorianCalendar date = new GregorianCalendar(); GregorianCalendarTransform format = new GregorianCalendarTransform(); date.setTime(new Date()); String value = format.write(date); GregorianCalendar copy = format.read(value); assertEquals(date, copy); } } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/transform/BigDecimalTransformTest.java������������0000644�0001750�0001750�00000001030�11342530530�032413� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.simpleframework.xml.transform; import java.math.BigDecimal; import org.simpleframework.xml.transform.BigDecimalTransform; import junit.framework.TestCase; public class BigDecimalTransformTest extends TestCase { public void testBigDecimal() throws Exception { BigDecimal decimal = new BigDecimal("1.1"); BigDecimalTransform format = new BigDecimalTransform(); String value = format.write(decimal); BigDecimal copy = format.read(value); assertEquals(decimal, copy); } }��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/transform/FileTransformTest.java������������������0000644�0001750�0001750�00000000726�11342530530�031325� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.simpleframework.xml.transform; import java.io.File; import org.simpleframework.xml.transform.FileTransform; import junit.framework.TestCase; public class FileTransformTest extends TestCase { public void testFile() throws Exception { File file = new File(".."); FileTransform format = new FileTransform(); String value = format.write(file); File copy = format.read(value); assertEquals(file, copy); } }������������������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/transform/TimestampTransformTest.java�������������0000644�0001750�0001750�00000001224�11342530530�032403� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.simpleframework.xml.transform; import java.sql.Timestamp; import java.util.Date; import junit.framework.TestCase; import org.simpleframework.xml.transform.DateTransform; public class TimestampTransformTest extends TestCase { public void testTimestamp() throws Exception { long now = System.currentTimeMillis(); Timestamp date = new Timestamp(now); DateTransform format = new DateTransform(Timestamp.class); String value = format.write(date); Date copy = format.read(value); assertEquals(date, copy); assertEquals(copy.getTime(), now); assertTrue(copy instanceof Timestamp); } }����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/transform/TransformerTest.java��������������������0000644�0001750�0001750�00000030024�11342530530�031046� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.simpleframework.xml.transform; import org.simpleframework.xml.transform.Transformer; import junit.framework.TestCase; public class TransformerTest extends TestCase { private static class BlankMatcher implements Matcher { public Transform match(Class type) throws Exception { return null; } } private Transformer transformer; public void setUp() { this.transformer = new Transformer(new BlankMatcher()); } public void testInteger() throws Exception { Object value = transformer.read("1", Integer.class); String text = transformer.write(value, Integer.class); assertEquals(value, new Integer(1)); assertEquals(text, "1"); } public void testString() throws Exception { Object value = transformer.read("some text", String.class); String text = transformer.write(value, String.class); assertEquals("some text", value); assertEquals("some text", text); } public void testCharacter() throws Exception { Object value = transformer.read("c", Character.class); String text = transformer.write(value, Character.class); assertEquals(value, new Character('c')); assertEquals(text, "c"); } public void testInvalidCharacter() throws Exception { boolean success = false; try { transformer.read("too long", Character.class); }catch(InvalidFormatException e) { e.printStackTrace(); success = true; } assertTrue(success); } public void testFloat() throws Exception { Object value = transformer.read("1.12", Float.class); String text = transformer.write(value, Float.class); assertEquals(value, new Float(1.12)); assertEquals(text, "1.12"); } public void testDouble() throws Exception { Object value = transformer.read("12.33", Double.class); String text = transformer.write(value, Double.class); assertEquals(value, new Double(12.33)); assertEquals(text, "12.33"); } public void testBoolean() throws Exception { Object value = transformer.read("true", Boolean.class); String text = transformer.write(value, Boolean.class); assertEquals(value, Boolean.TRUE); assertEquals(text, "true"); } public void testLong() throws Exception { Object value = transformer.read("1234567", Long.class); String text = transformer.write(value, Long.class); assertEquals(value, new Long(1234567)); assertEquals(text, "1234567"); } public void testShort() throws Exception { Object value = transformer.read("12", Short.class); String text = transformer.write(value, Short.class); assertEquals(value, new Short((short)12)); assertEquals(text, "12"); } public void testPrimitiveIntegerArray() throws Exception { Object value = transformer.read("1, 2, 3, 4, 5", int[].class); String text = transformer.write(value, int[].class); assertTrue(value instanceof int[]); int[] array = (int[])value; assertEquals(array.length, 5); assertEquals(array[0], 1); assertEquals(array[1], 2); assertEquals(array[2], 3); assertEquals(array[3], 4); assertEquals(array[4], 5); assertEquals(text, "1, 2, 3, 4, 5"); } public void testPrimitiveLongArray() throws Exception { Object value = transformer.read("1, 2, 3, 4, 5", long[].class); String text = transformer.write(value, long[].class); assertTrue(value instanceof long[]); long[] array = (long[])value; assertEquals(array.length, 5); assertEquals(array[0], 1); assertEquals(array[1], 2); assertEquals(array[2], 3); assertEquals(array[3], 4); assertEquals(array[4], 5); assertEquals(text, "1, 2, 3, 4, 5"); } public void testPrimitiveShortArray() throws Exception { Object value = transformer.read("1, 2, 3, 4, 5", short[].class); String text = transformer.write(value, short[].class); assertTrue(value instanceof short[]); short[] array = (short[])value; assertEquals(array.length, 5); assertEquals(array[0], 1); assertEquals(array[1], 2); assertEquals(array[2], 3); assertEquals(array[3], 4); assertEquals(array[4], 5); assertEquals(text, "1, 2, 3, 4, 5"); } public void testPrimitiveByteArray() throws Exception { Object value = transformer.read("1, 2, 3, 4, 5", byte[].class); String text = transformer.write(value, byte[].class); assertTrue(value instanceof byte[]); byte[] array = (byte[])value; assertEquals(array.length, 5); assertEquals(array[0], 1); assertEquals(array[1], 2); assertEquals(array[2], 3); assertEquals(array[3], 4); assertEquals(array[4], 5); assertEquals(text, "1, 2, 3, 4, 5"); } public void testPrimitiveFloatArray() throws Exception { Object value = transformer.read("1.0, 2.0, 3.0, 4.0, 5.0", float[].class); String text = transformer.write(value, float[].class); assertTrue(value instanceof float[]); float[] array = (float[])value; assertEquals(array.length, 5); assertEquals(array[0], 1.0f); assertEquals(array[1], 2.0f); assertEquals(array[2], 3.0f); assertEquals(array[3], 4.0f); assertEquals(array[4], 5.0f); assertEquals(text, "1.0, 2.0, 3.0, 4.0, 5.0"); } public void testPrimitiveDoubleArray() throws Exception { Object value = transformer.read("1, 2, 3, 4, 5", double[].class); String text = transformer.write(value, double[].class); assertTrue(value instanceof double[]); double[] array = (double[])value; assertEquals(array.length, 5); assertEquals(array[0], 1.0d); assertEquals(array[1], 2.0d); assertEquals(array[2], 3.0d); assertEquals(array[3], 4.0d); assertEquals(array[4], 5.0d); assertEquals(text, "1.0, 2.0, 3.0, 4.0, 5.0"); } public void testPrimitiveCharacterArray() throws Exception { Object value = transformer.read("hello world", char[].class); String text = transformer.write(value, char[].class); assertTrue(value instanceof char[]); char[] array = (char[])value; assertEquals(array.length, 11); assertEquals(array[0], 'h'); assertEquals(array[1], 'e'); assertEquals(array[2], 'l'); assertEquals(array[3], 'l'); assertEquals(array[4], 'o'); assertEquals(array[5], ' '); assertEquals(array[6], 'w'); assertEquals(array[7], 'o'); assertEquals(array[8], 'r'); assertEquals(array[9], 'l'); assertEquals(array[10], 'd'); assertEquals(text, "hello world"); } // Java Language types public void testIntegerArray() throws Exception { Object value = transformer.read("1, 2, 3, 4, 5", Integer[].class); String text = transformer.write(value, Integer[].class); assertTrue(value instanceof Integer[]); Integer[] array = (Integer[])value; assertEquals(array.length, 5); assertEquals(array[0], new Integer(1)); assertEquals(array[1], new Integer(2)); assertEquals(array[2], new Integer(3)); assertEquals(array[3], new Integer(4)); assertEquals(array[4], new Integer(5)); assertEquals(text, "1, 2, 3, 4, 5"); } public void testBooleanArray() throws Exception { Object value = transformer.read("true, false, false, false, true", Boolean[].class); String text = transformer.write(value, Boolean[].class); assertTrue(value instanceof Boolean[]); Boolean[] array = (Boolean[])value; assertEquals(array.length, 5); assertEquals(array[0], Boolean.TRUE); assertEquals(array[1], Boolean.FALSE); assertEquals(array[2], Boolean.FALSE); assertEquals(array[3], Boolean.FALSE); assertEquals(array[4], Boolean.TRUE); assertEquals(text, "true, false, false, false, true"); } public void testLongArray() throws Exception { Object value = transformer.read("1, 2, 3, 4, 5", Long[].class); String text = transformer.write(value, Long[].class); assertTrue(value instanceof Long[]); Long[] array = (Long[])value; assertEquals(array.length, 5); assertEquals(array[0], new Long(1)); assertEquals(array[1], new Long(2)); assertEquals(array[2], new Long(3)); assertEquals(array[3], new Long(4)); assertEquals(array[4], new Long(5)); assertEquals(text, "1, 2, 3, 4, 5"); } public void testShortArray() throws Exception { Object value = transformer.read("1, 2, 3, 4, 5", Short[].class); String text = transformer.write(value, Short[].class); assertTrue(value instanceof Short[]); Short[] array = (Short[])value; assertEquals(array.length, 5); assertEquals(array[0], new Short((short)1)); assertEquals(array[1], new Short((short)2)); assertEquals(array[2], new Short((short)3)); assertEquals(array[3], new Short((short)4)); assertEquals(array[4], new Short((short)5)); assertEquals(text, "1, 2, 3, 4, 5"); } public void testByteArray() throws Exception { Object value = transformer.read("1, 2, 3, 4, 5", Byte[].class); String text = transformer.write(value, Byte[].class); assertTrue(value instanceof Byte[]); Byte[] array = (Byte[])value; assertEquals(array.length, 5); assertEquals(array[0], new Byte((byte)1)); assertEquals(array[1], new Byte((byte)2)); assertEquals(array[2], new Byte((byte)3)); assertEquals(array[3], new Byte((byte)4)); assertEquals(array[4], new Byte((byte)5)); assertEquals(text, "1, 2, 3, 4, 5"); } public void testFloatArray() throws Exception { Object value = transformer.read("1.0, 2.0, 3.0, 4.0, 5.0", Float[].class); String text = transformer.write(value, Float[].class); assertTrue(value instanceof Float[]); Float[] array = (Float[])value; assertEquals(array.length, 5); assertEquals(array[0], new Float(1.0f)); assertEquals(array[1], new Float(2.0f)); assertEquals(array[2], new Float(3.0f)); assertEquals(array[3], new Float(4.0f)); assertEquals(array[4], new Float(5.0f)); assertEquals(text, "1.0, 2.0, 3.0, 4.0, 5.0"); } public void testDoubleArray() throws Exception { Object value = transformer.read("1, 2, 3, 4, 5", Double[].class); String text = transformer.write(value, Double[].class); assertTrue(value instanceof Double[]); Double[] array = (Double[])value; assertEquals(array.length, 5); assertEquals(array[0], new Double(1.0d)); assertEquals(array[1], new Double(2.0d)); assertEquals(array[2], new Double(3.0d)); assertEquals(array[3], new Double(4.0d)); assertEquals(array[4], new Double(5.0d)); assertEquals(text, "1.0, 2.0, 3.0, 4.0, 5.0"); } public void testCharacterArray() throws Exception { Object value = transformer.read("hello world", Character[].class); String text = transformer.write(value, Character[].class); assertTrue(value instanceof Character[]); Character[] array = (Character[])value; assertEquals(array.length, 11); assertEquals(array[0], new Character('h')); assertEquals(array[1], new Character('e')); assertEquals(array[2], new Character('l')); assertEquals(array[3], new Character('l')); assertEquals(array[4], new Character('o')); assertEquals(array[5], new Character(' ')); assertEquals(array[6], new Character('w')); assertEquals(array[7], new Character('o')); assertEquals(array[8], new Character('r')); assertEquals(array[9], new Character('l')); assertEquals(array[10], new Character('d')); assertEquals(text, "hello world"); } } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/transform/URLTransformTest.java�������������������0000644�0001750�0001750�00000000742�11342530530�031106� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.simpleframework.xml.transform; import java.net.URL; import org.simpleframework.xml.transform.URLTransform; import junit.framework.TestCase; public class URLTransformTest extends TestCase { public void testURL() throws Exception { URL file = new URL("http://www.google.com/"); URLTransform format = new URLTransform(); String value = format.write(file); URL copy = format.read(value); assertEquals(file, copy); } }������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/transform/CurrencyTransformTest.java��������������0000644�0001750�0001750�00000001051�11342530530�032230� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.simpleframework.xml.transform; import java.util.Currency; import java.util.Locale; import org.simpleframework.xml.transform.CurrencyTransform; import junit.framework.TestCase; public class CurrencyTransformTest extends TestCase { public void testCurrency() throws Exception { Currency currency = Currency.getInstance(Locale.UK); CurrencyTransform format = new CurrencyTransform(); String value = format.write(currency); Currency copy = format.read(value); assertEquals(currency, copy); } } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/transform/DateFormatterTest.java������������������0000644�0001750�0001750�00000013544�11342530530�031315� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.simpleframework.xml.transform; import java.text.SimpleDateFormat; import java.util.Date; import java.util.concurrent.CountDownLatch; import java.util.concurrent.atomic.AtomicLong; import junit.framework.TestCase; public class DateFormatterTest extends TestCase { private static final String FORMAT = "yyyy-MM-dd HH:mm:ss.S z"; private static final int CONCURRENCY = 10; private static final int COUNT = 100; public void testFormatter() throws Exception { DateFormatter formatter = new DateFormatter(FORMAT); Date date = new Date(); String value = formatter.write(date); Date copy = formatter.read(value); assertEquals(date, copy); } public void testPerformance() throws Exception { CountDownLatch simpleDateFormatGate = new CountDownLatch(CONCURRENCY); CountDownLatch simpleDateFormatFinisher = new CountDownLatch(CONCURRENCY); AtomicLong simpleDateFormatCount = new AtomicLong(); for(int i = 0; i < CONCURRENCY; i++) { new Thread(new SimpleDateFormatTask(simpleDateFormatFinisher, simpleDateFormatGate, simpleDateFormatCount, FORMAT)).start(); } simpleDateFormatFinisher.await(); CountDownLatch synchronizedGate = new CountDownLatch(CONCURRENCY); CountDownLatch synchronizedFinisher = new CountDownLatch(CONCURRENCY); AtomicLong synchronizedCount = new AtomicLong(); SimpleDateFormat format = new SimpleDateFormat(FORMAT); for(int i = 0; i < CONCURRENCY; i++) { new Thread(new SynchronizedTask(synchronizedFinisher, synchronizedGate, synchronizedCount, format)).start(); } synchronizedFinisher.await(); CountDownLatch formatterGate = new CountDownLatch(CONCURRENCY); CountDownLatch formatterFinisher = new CountDownLatch(CONCURRENCY); AtomicLong formatterCount = new AtomicLong(); DateFormatter formatter = new DateFormatter(FORMAT, CONCURRENCY); for(int i = 0; i < CONCURRENCY; i++) { new Thread(new FormatterTask(formatterFinisher, formatterGate, formatterCount, formatter)).start(); } formatterFinisher.await(); System.err.printf("pool: %s, new: %s, synchronized: %s", formatterCount.get(), simpleDateFormatCount.get(), synchronizedCount.get()); //assertTrue(formatterCount.get() < simpleDateFormatCount.get()); //assertTrue(formatterCount.get() < synchronizedCount.get()); // Synchronized is faster? } private class FormatterTask implements Runnable { private DateFormatter formatter; private CountDownLatch gate; private CountDownLatch main; private AtomicLong count; public FormatterTask(CountDownLatch main, CountDownLatch gate, AtomicLong count, DateFormatter formatter) { this.formatter = formatter; this.count = count; this.gate = gate; this.main = main; } public void run() { long start = System.currentTimeMillis(); try { gate.countDown(); gate.await(); Date date = new Date(); for(int i = 0; i < COUNT; i++) { String value = formatter.write(date); Date copy = formatter.read(value); assertEquals(date, copy); } }catch(Exception e) { assertTrue(false); } finally { count.getAndAdd(System.currentTimeMillis() - start); main.countDown(); } } } private class SimpleDateFormatTask implements Runnable { private CountDownLatch gate; private CountDownLatch main; private AtomicLong count; private String format; public SimpleDateFormatTask(CountDownLatch main, CountDownLatch gate, AtomicLong count, String format) { this.format = format; this.count = count; this.gate = gate; this.main = main; } public void run() { long start = System.currentTimeMillis(); try { gate.countDown(); gate.await(); Date date = new Date(); for(int i = 0; i < COUNT; i++) { String value = new SimpleDateFormat(format).format(date); Date copy = new SimpleDateFormat(format).parse(value); assertEquals(date, copy); } }catch(Exception e) { assertTrue(false); } finally { count.getAndAdd(System.currentTimeMillis() - start); main.countDown(); } } } private class SynchronizedTask implements Runnable { private SimpleDateFormat format; private CountDownLatch gate; private CountDownLatch main; private AtomicLong count; public SynchronizedTask(CountDownLatch main, CountDownLatch gate, AtomicLong count, SimpleDateFormat format) { this.format = format; this.count = count; this.gate = gate; this.main = main; } public void run() { long start = System.currentTimeMillis(); try { gate.countDown(); gate.await(); Date date = new Date(); for(int i = 0; i < COUNT; i++) { synchronized(format) { String value = format.format(date); Date copy = format.parse(value); assertEquals(date, copy); } } }catch(Exception e) { assertTrue(false); } finally { count.getAndAdd(System.currentTimeMillis() - start); main.countDown(); } } } } ������������������������������������������������������������������������������������������������������������������������������������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/transform/DateTransformTest.java������������������0000644�0001750�0001750�00000007337�11342530527�031336� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.simpleframework.xml.transform; import java.io.StringWriter; import java.util.ArrayList; import java.util.Date; import java.util.List; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Element; import org.simpleframework.xml.ElementArray; import org.simpleframework.xml.ElementList; import org.simpleframework.xml.Root; import org.simpleframework.xml.ValidationTestCase; import org.simpleframework.xml.core.Persister; import org.simpleframework.xml.strategy.CycleStrategy; import org.simpleframework.xml.transform.DateTransform; public class DateTransformTest extends ValidationTestCase { @Root public static class DateExample { @ElementArray private Date[] array; @Element private Date element; @Attribute private Date attribute; @ElementList private List<Date> list; public DateExample() { super(); } public DateExample(Date date) { this.attribute = date; this.element = date; this.list = new ArrayList<Date>(); this.list.add(date); this.list.add(date); this.array = new Date[1]; this.array[0] = date; } } public void testDate() throws Exception { Date date = new Date(); DateTransform format = new DateTransform(Date.class); String value = format.write(date); Date copy = format.read(value); assertEquals(date, copy); } public void testPersistence() throws Exception { long now = System.currentTimeMillis(); Date date = new Date(now); Persister persister = new Persister(); DateExample example = new DateExample(date); StringWriter out = new StringWriter(); assertEquals(example.attribute, date); assertEquals(example.element, date); assertEquals(example.array[0], date); assertEquals(example.list.get(0), date); assertEquals(example.list.get(1), date); persister.write(example, out); String text = out.toString(); example = persister.read(DateExample.class, text); assertEquals(example.attribute, date); assertEquals(example.element, date); assertEquals(example.array[0], date); assertEquals(example.list.get(0), date); assertEquals(example.list.get(1), date); validate(example, persister); } public void testCyclicPersistence() throws Exception { long now = System.currentTimeMillis(); Date date = new Date(now); CycleStrategy strategy = new CycleStrategy(); Persister persister = new Persister(strategy); DateExample example = new DateExample(date); StringWriter out = new StringWriter(); assertEquals(example.attribute, date); assertEquals(example.element, date); assertEquals(example.array[0], date); assertEquals(example.list.get(0), date); assertEquals(example.list.get(1), date); persister.write(example, out); String text = out.toString(); assertXpathExists("/dateExample[@id='0']", text); assertXpathExists("/dateExample/array[@id='1']", text); assertXpathExists("/dateExample/array/date[@id='2']", text); assertXpathExists("/dateExample/element[@reference='2']", text); assertXpathExists("/dateExample/list[@id='3']", text); example = persister.read(DateExample.class, text); assertEquals(example.attribute, date); assertEquals(example.element, date); assertEquals(example.array[0], date); assertEquals(example.list.get(0), date); assertEquals(example.list.get(1), date); validate(example, persister); } } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/transform/ClassTransformTest.java�����������������0000644�0001750�0001750�00000000654�11342530530�031513� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.simpleframework.xml.transform; import java.util.Date; import junit.framework.TestCase; public class ClassTransformTest extends TestCase { public void testClassTransform() throws Exception { Class c = Date.class; ClassTransform transform = new ClassTransform(); String value = transform.write(c); Class copy = transform.read(value); assertEquals(c, copy); } } ������������������������������������������������������������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/transform/DateFormatter.java����������������������0000644�0001750�0001750�00000003635�11342530530�030455� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.simpleframework.xml.transform; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.atomic.AtomicInteger; import org.simpleframework.xml.transform.Transform; class DateFormatter implements Transform<Date> { private AtomicInteger count; private TaskQueue queue; private String format; public DateFormatter(String format) { this(format, 10); } public DateFormatter(String format, int count) { this.count = new AtomicInteger(count); this.queue = new TaskQueue(count); this.format = format; } public Date read(String value) throws Exception { return borrow().read(value); } public String write(Date value) throws Exception { return borrow().write(value); } private Task borrow() throws InterruptedException { int size = count.get(); if(size > 0) { int next = count.getAndDecrement(); if(next > 0) { return new Task(format); } } return queue.take(); } private void release(Task task) { queue.offer(task); } private class Task { private SimpleDateFormat format; public Task(String format) { this.format = new SimpleDateFormat(format); } public Date read(String value) throws ParseException { try { return format.parse(value); } finally { release(this); } } public String write(Date value) { try { return format.format(value); } finally { release(this); } } } private class TaskQueue extends LinkedBlockingQueue<Task> { public TaskQueue(int size) { super(size); } } }���������������������������������������������������������������������������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/transform/StringArrayTransformTest.java�����������0000644�0001750�0001750�00000010600�11342530530�032703� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.simpleframework.xml.transform; import java.io.StringWriter; import java.util.ArrayList; import java.util.List; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Element; import org.simpleframework.xml.ElementArray; import org.simpleframework.xml.ElementList; import org.simpleframework.xml.Root; import org.simpleframework.xml.ValidationTestCase; import org.simpleframework.xml.core.Persister; public class StringArrayTransformTest extends ValidationTestCase { @Root public static class StringArrayExample { @Attribute private String[] attribute; @Element private String[] element; @ElementList private List<String[]> list; @ElementArray private String[][] array; public StringArrayExample() { super(); } public StringArrayExample(String[] list) { this.attribute = list; this.element = list; this.list = new ArrayList<String[]>(); this.list.add(list); this.list.add(list); this.array = new String[1][]; this.array[0] = list; } } public void testRead() throws Exception { StringArrayTransform transform = new StringArrayTransform(); String[] list = transform.read("one,two,three,four"); assertEquals("one", list[0]); assertEquals("two", list[1]); assertEquals("three", list[2]); assertEquals("four", list[3]); list = transform.read(" this is some string ,\t\n "+ "that has each\n\r," + "string split,\t over\n,\n"+ "several lines\n\t"); assertEquals("this is some string", list[0]); assertEquals("that has each", list[1]); assertEquals("string split", list[2]); assertEquals("over", list[3]); assertEquals("several lines", list[4]); } public void testWrite() throws Exception { StringArrayTransform transform = new StringArrayTransform(); String value = transform.write(new String[] { "one", "two", "three", "four"}); assertEquals(value, "one, two, three, four"); value = transform.write(new String[] {"one", null, "three", "four"}); assertEquals(value, "one, three, four"); } public void testPersistence() throws Exception { String[] list = new String[] { "one", "two", "three", "four"}; Persister persister = new Persister(); StringArrayExample example = new StringArrayExample(list); StringWriter out = new StringWriter(); assertEquals(example.attribute[0], "one"); assertEquals(example.attribute[1], "two"); assertEquals(example.attribute[2], "three"); assertEquals(example.attribute[3], "four"); assertEquals(example.element[0], "one"); assertEquals(example.element[1], "two"); assertEquals(example.element[2], "three"); assertEquals(example.element[3], "four"); assertEquals(example.list.get(0)[0], "one"); assertEquals(example.list.get(0)[1], "two"); assertEquals(example.list.get(0)[2], "three"); assertEquals(example.list.get(0)[3], "four"); assertEquals(example.array[0][0], "one"); assertEquals(example.array[0][1], "two"); assertEquals(example.array[0][2], "three"); assertEquals(example.array[0][3], "four"); persister.write(example, out); String text = out.toString(); System.err.println(text); example = persister.read(StringArrayExample.class, text); assertEquals(example.attribute[0], "one"); assertEquals(example.attribute[1], "two"); assertEquals(example.attribute[2], "three"); assertEquals(example.attribute[3], "four"); assertEquals(example.element[0], "one"); assertEquals(example.element[1], "two"); assertEquals(example.element[2], "three"); assertEquals(example.element[3], "four"); assertEquals(example.list.get(0)[0], "one"); assertEquals(example.list.get(0)[1], "two"); assertEquals(example.list.get(0)[2], "three"); assertEquals(example.list.get(0)[3], "four"); assertEquals(example.array[0][0], "one"); assertEquals(example.array[0][1], "two"); assertEquals(example.array[0][2], "three"); assertEquals(example.array[0][3], "four"); validate(example, persister); } } ��������������������������������������������������������������������������������������������������������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/transform/TypeMatcherTest.java��������������������0000644�0001750�0001750�00000006165�11342530530�031002� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.simpleframework.xml.transform; import junit.framework.TestCase; public class TypeMatcherTest extends TestCase { private static class BlankMatcher implements Matcher { public Transform match(Class type) throws Exception { return null; } } private Matcher matcher; public void setUp() { this.matcher = new DefaultMatcher(new BlankMatcher()); } public void testInteger() throws Exception { Transform transform = matcher.match(Integer.class); Object value = transform.read("1"); assertEquals(value, new Integer(1)); } public void testString() throws Exception { Transform transform = matcher.match(String.class); Object value = transform.read("some text"); assertEquals("some text", value); } public void testCharacter() throws Exception { Transform transform = matcher.match(Character.class); Object value = transform.read("c"); assertEquals(value, new Character('c')); } public void testFloat() throws Exception { Transform transform = matcher.match(Float.class); Object value = transform.read("1.12"); assertEquals(value, new Float(1.12)); } public void testDouble() throws Exception { Transform transform = matcher.match(Double.class); Object value = transform.read("12.33"); assertEquals(value, new Double(12.33)); } public void testBoolean() throws Exception { Transform transform = matcher.match(Boolean.class); Object value = transform.read("true"); assertEquals(value, Boolean.TRUE); } public void testLong() throws Exception { Transform transform = matcher.match(Long.class); Object value = transform.read("1234567"); assertEquals(value, new Long(1234567)); } public void testShort() throws Exception { Transform transform = matcher.match(Short.class); Object value = transform.read("12"); assertEquals(value, new Short((short)12)); } public void testIntegerArray() throws Exception { Transform transform = matcher.match(Integer[].class); Object value = transform.read("1, 2, 3, 4, 5"); assertTrue(value instanceof Integer[]); Integer[] array = (Integer[])value; assertEquals(array.length, 5); assertEquals(array[0], new Integer(1)); assertEquals(array[1], new Integer(2)); assertEquals(array[2], new Integer(3)); assertEquals(array[3], new Integer(4)); assertEquals(array[4], new Integer(5)); } public void testPrimitiveIntegerArray() throws Exception { Matcher matcher = new DefaultMatcher(new BlankMatcher()); Transform transform = matcher.match(int[].class); Object value = transform.read("1, 2, 3, 4, 5"); assertTrue(value instanceof int[]); int[] array = (int[])value; assertEquals(array.length, 5); assertEquals(array[0], 1); assertEquals(array[1], 2); assertEquals(array[2], 3); assertEquals(array[3], 4); assertEquals(array[4], 5); } } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/transform/PrimitiveArrayTransformTest.java��������0000644�0001750�0001750�00000017013�11342530530�033412� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.simpleframework.xml.transform; import java.io.StringWriter; import java.util.ArrayList; import java.util.List; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Element; import org.simpleframework.xml.ElementArray; import org.simpleframework.xml.ElementList; import org.simpleframework.xml.Root; import org.simpleframework.xml.ValidationTestCase; import org.simpleframework.xml.core.Persister; import org.simpleframework.xml.strategy.CycleStrategy; public class PrimitiveArrayTransformTest extends ValidationTestCase { @Root public static class IntegerArrayExample { @Attribute(required=false) private int[] attribute; @Element(required=false) private int[] element; @ElementList private List<int[]> list; @ElementArray private int[][] array; @Element private NonPrimitive test; @ElementList private List<NonPrimitive> testList; @ElementArray private NonPrimitive[] testArray; public IntegerArrayExample() { super(); } public IntegerArrayExample(int[] list) { this.attribute = list; this.element = list; this.list = new ArrayList<int[]>(); this.list.add(list); this.list.add(list); this.array = new int[1][]; this.array[0] = list; this.testList = new ArrayList<NonPrimitive>(); this.testList.add(null); this.testList.add(null); this.test = new NonPrimitive(); this.testArray = new NonPrimitive[1]; } } @Root private static class NonPrimitive { @Attribute private String value = "text"; } public void testRead() throws Exception { ArrayTransform transform = new ArrayTransform(new IntegerTransform(), int.class); int[] list = (int[])transform.read("1,2,3,4"); assertEquals(1, list[0]); assertEquals(2, list[1]); assertEquals(3, list[2]); assertEquals(4, list[3]); list = (int[])transform.read(" 123 ,\t\n "+ "1\n\r," + "100, 23, \t32,\t 0\n,\n"+ "3\n\t"); assertEquals(123, list[0]); assertEquals(1, list[1]); assertEquals(100, list[2]); assertEquals(23, list[3]); assertEquals(32, list[4]); assertEquals(0, list[5]); assertEquals(3, list[6]); } public void testWrite() throws Exception { ArrayTransform transform = new ArrayTransform(new IntegerTransform(), int.class); String value = transform.write(new int[] { 1, 2, 3, 4}); assertEquals(value, "1, 2, 3, 4"); value = transform.write(new int[] {1, 0, 3, 4}); assertEquals(value, "1, 0, 3, 4"); } public void testPersistence() throws Exception { int[] list = new int[] { 1, 2, 3, 4 }; Persister persister = new Persister(); IntegerArrayExample example = new IntegerArrayExample(list); StringWriter out = new StringWriter(); assertEquals(example.attribute[0], 1); assertEquals(example.attribute[1], 2); assertEquals(example.attribute[2], 3); assertEquals(example.attribute[3], 4); assertEquals(example.element[0], 1); assertEquals(example.element[1], 2); assertEquals(example.element[2], 3); assertEquals(example.element[3], 4); assertEquals(example.list.get(0)[0], 1); assertEquals(example.list.get(0)[1], 2); assertEquals(example.list.get(0)[2], 3); assertEquals(example.list.get(0)[3], 4); assertEquals(example.array[0][0], 1); assertEquals(example.array[0][1], 2); assertEquals(example.array[0][2], 3); assertEquals(example.array[0][3], 4); persister.write(example, out); String text = out.toString(); System.out.println(text); example = persister.read(IntegerArrayExample.class, text); assertEquals(example.attribute[0], 1); assertEquals(example.attribute[1], 2); assertEquals(example.attribute[2], 3); assertEquals(example.attribute[3], 4); assertEquals(example.element[0], 1); assertEquals(example.element[1], 2); assertEquals(example.element[2], 3); assertEquals(example.element[3], 4); assertEquals(example.list.get(0)[0], 1); assertEquals(example.list.get(0)[1], 2); assertEquals(example.list.get(0)[2], 3); assertEquals(example.list.get(0)[3], 4); assertEquals(example.array[0][0], 1); assertEquals(example.array[0][1], 2); assertEquals(example.array[0][2], 3); assertEquals(example.array[0][3], 4); validate(example, persister); example = new IntegerArrayExample(null); out = new StringWriter(); persister.write(example, out); text = out.toString(); validate(example, persister); example = persister.read(IntegerArrayExample.class, text); assertEquals(example.attribute, null); assertEquals(example.element, null); assertEquals(example.list.size(), 0); assertEquals(example.array[0], null); } public void testCyclicPersistence() throws Exception { int[] list = new int[] { 1, 2, 3, 4 }; CycleStrategy strategy = new CycleStrategy(); Persister persister = new Persister(strategy); IntegerArrayExample example = new IntegerArrayExample(list); StringWriter out = new StringWriter(); assertEquals(example.attribute[0], 1); assertEquals(example.attribute[1], 2); assertEquals(example.attribute[2], 3); assertEquals(example.attribute[3], 4); assertEquals(example.element[0], 1); assertEquals(example.element[1], 2); assertEquals(example.element[2], 3); assertEquals(example.element[3], 4); assertEquals(example.list.get(0)[0], 1); assertEquals(example.list.get(0)[1], 2); assertEquals(example.list.get(0)[2], 3); assertEquals(example.list.get(0)[3], 4); assertEquals(example.array[0][0], 1); assertEquals(example.array[0][1], 2); assertEquals(example.array[0][2], 3); assertEquals(example.array[0][3], 4); persister.write(example, out); String text = out.toString(); assertXpathExists("/integerArrayExample[@id='0']", text); assertXpathExists("/integerArrayExample/element[@id='1']", text); assertXpathExists("/integerArrayExample/list[@id='2']", text); assertXpathExists("/integerArrayExample/array[@id='3']", text); assertXpathExists("/integerArrayExample/list/int[@reference='1']", text); assertXpathExists("/integerArrayExample/array/int[@reference='1']", text); assertXpathEvaluatesTo("1, 2, 3, 4", "/integerArrayExample/element", text); validate(example, persister); example = new IntegerArrayExample(null); out = new StringWriter(); persister.write(example, out); text = out.toString(); validate(example, persister); example = persister.read(IntegerArrayExample.class, text); assertEquals(example.attribute, null); assertEquals(example.element, null); assertEquals(example.list.size(), 0); assertEquals(example.array[0], null); assertXpathExists("/integerArrayExample[@id='0']", text); assertXpathExists("/integerArrayExample/list[@id='1']", text); assertXpathExists("/integerArrayExample/array[@id='2']", text); } } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/transform/TimeTransformTest.java������������������0000644�0001750�0001750�00000003624�11342530530�031344� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.simpleframework.xml.transform; import java.sql.Time; import java.util.ArrayList; import java.util.Collection; import java.util.Date; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Element; import org.simpleframework.xml.ElementArray; import org.simpleframework.xml.ElementList; import org.simpleframework.xml.Root; import org.simpleframework.xml.ValidationTestCase; import org.simpleframework.xml.core.Persister; import org.simpleframework.xml.transform.DateTransform; public class TimeTransformTest extends ValidationTestCase { @Root public static class TimeExample { @Attribute private Date attribute; @Element private Date element; @Element private Time time; @ElementList private Collection<Time> list; @ElementArray private Time[] array; public TimeExample() { super(); } public TimeExample(long time) { this.attribute = new Time(time); this.element = new Time(time); this.time = new Time(time); this.list = new ArrayList<Time>(); this.list.add(new Time(time)); this.list.add(new Time(time)); this.array = new Time[1]; this.array[0] = new Time(time); } } public void testTime() throws Exception { long now = System.currentTimeMillis(); Time date = new Time(now); DateTransform format = new DateTransform(Time.class); String value = format.write(date); Date copy = format.read(value); assertEquals(date, copy); assertEquals(copy.getTime(), now); } public void testPersistence() throws Exception { long now = System.currentTimeMillis(); Persister persister = new Persister(); TimeExample example = new TimeExample(now); validate(example, persister); } }������������������������������������������������������������������������������������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/transform/LocaleTransformTest.java����������������0000644�0001750�0001750�00000001173�11342530527�031650� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.simpleframework.xml.transform; import java.util.Locale; import org.simpleframework.xml.transform.LocaleTransform; import junit.framework.TestCase; public class LocaleTransformTest extends TestCase { public void testLocale() throws Exception { Locale locale = Locale.UK; LocaleTransform format = new LocaleTransform(); String value = format.write(locale); Locale copy = format.read(value); assertEquals(locale, copy); locale = Locale.ENGLISH; value = format.write(locale); copy = format.read(value); assertEquals(locale, copy); } } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/transform/TimeZoneTransformTest.java��������������0000644�0001750�0001750�00000001000�11342530530�032162� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.simpleframework.xml.transform; import java.util.TimeZone; import org.simpleframework.xml.transform.TimeZoneTransform; import junit.framework.TestCase; public class TimeZoneTransformTest extends TestCase { public void testTimeZone() throws Exception { TimeZone zone = TimeZone.getTimeZone("GMT"); TimeZoneTransform format = new TimeZoneTransform(); String value = format.write(zone); TimeZone copy = format.read(value); assertEquals(zone, copy); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/transform/BigIntegerTransformTest.java������������0000644�0001750�0001750�00000001026�11342530530�032457� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.simpleframework.xml.transform; import java.math.BigInteger; import org.simpleframework.xml.transform.BigIntegerTransform; import junit.framework.TestCase; public class BigIntegerTransformTest extends TestCase { public void testBigInteger() throws Exception { BigInteger integer = new BigInteger("1"); BigIntegerTransform format = new BigIntegerTransform(); String value = format.write(integer); BigInteger copy = format.read(value); assertEquals(integer, copy); } }����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/strategy/�����������������������������������������0000755�0001750�0001750�00000000000�11344247751�024705� 5����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/strategy/ConverterMapTest.java��������������������0000644�0001750�0001750�00000005462�11342530530�031010� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.simpleframework.xml.strategy; import java.util.HashMap; import java.util.Map; import java.util.Set; import org.simpleframework.xml.Default; import org.simpleframework.xml.Element; import org.simpleframework.xml.ElementMap; import org.simpleframework.xml.Root; import org.simpleframework.xml.Serializer; import org.simpleframework.xml.ValidationTestCase; import org.simpleframework.xml.convert.AnnotationStrategy; import org.simpleframework.xml.convert.Convert; import org.simpleframework.xml.convert.Converter; import org.simpleframework.xml.core.Persister; import org.simpleframework.xml.stream.InputNode; import org.simpleframework.xml.stream.OutputNode; public class ConverterMapTest extends ValidationTestCase { private static class MapConverter implements Converter<java.util.Map> { public Map read(InputNode node) throws Exception{ java.util.Map map = new HashMap(); while(true) { InputNode next = node.getNext("entry"); if(next == null) { break; } Entry entry = readEntry(next); map.put(entry.name, entry.value); } return map; } public void write(OutputNode node, Map map) throws Exception { Set keys = map.keySet(); for(Object key : keys) { OutputNode next = node.getChild("entry"); next.setAttribute("key", key.toString()); OutputNode value = next.getChild("value"); value.setValue(map.get(key).toString()); } } private Entry readEntry(InputNode node) throws Exception { InputNode key = node.getAttribute("key"); InputNode value = node.getNext("value"); return new Entry(key.getValue(), value.getValue()); } private static class Entry { private String name; private String value; public Entry(String name, String value){ this.name = name; this.value = value; } } } @Root @Default private static class MapHolder { @Element @ElementMap @Convert(MapConverter.class) private Map<String, String> map = new HashMap<String, String>(); public void put(String name, String value){ map.put(name, value); } } public void testMap() throws Exception { Strategy strategy = new AnnotationStrategy(); Serializer serializer = new Persister(strategy); MapHolder holder = new MapHolder(); holder.put("a", "A"); holder.put("b", "B"); holder.put("c", "C"); holder.put("d", "D"); holder.put("e", "E"); holder.put("f", "F"); serializer.write(holder, System.out); validate(holder, serializer); } } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/strategy/ArrayCycleTest.java����������������������0000644�0001750�0001750�00000020602�11342530530�030432� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.simpleframework.xml.strategy; import java.io.StringWriter; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Element; import org.simpleframework.xml.ElementArray; import org.simpleframework.xml.Root; import org.simpleframework.xml.core.Persister; import org.simpleframework.xml.strategy.CycleStrategy; import org.simpleframework.xml.ValidationTestCase; public class ArrayCycleTest extends ValidationTestCase { private static final String SOURCE = "<?xml version=\"1.0\"?>\n"+ "<root id='main'>\n"+ " <one length='5' id='numbers'>\n\r"+ " <text value='entry one'/> \n\r"+ " <text value='entry two'/> \n\r"+ " <text value='entry three'/> \n\r"+ " <text value='entry four'/> \n\r"+ " <text value='entry five'/> \n\r"+ " </one>\n\r"+ " <two ref='numbers'/>\n"+ " <three length='3'>\n" + " <text value='tom'/> \n\r"+ " <text value='dick'/> \n\r"+ " <text value='harry'/> \n\r"+ " </three>\n"+ " <example ref='main'/>\n"+ "</root>"; private static final String NESTED = "<?xml version=\"1.0\"?>\n"+ "<root id='main'>\n"+ " <array id='array' length='2'>\n" + // NestedExample.array : Value[] " <entry> \n\r"+ " <list ref='array'/>\n"+ // Value.list : Value[] -> NestedArray.array : Value[] " </entry>\r\n"+ " <entry id='text'>\n"+ " <list length='3' id='foo'>\n"+ // Value.list : Value[] " <entry name='blah' class='org.simpleframework.xml.strategy.ArrayCycleTest$TextValue'>\n"+ // Value.list[0] : Value " <text>Some text</text>\n"+ // TextExample.text : String " <list ref='foo'/>\n"+ // TextExample.list : Value[] " </entry>\n"+ " <entry ref='text'/>\n"+ // Value.list[1] : Value " <entry class='org.simpleframework.xml.strategy.ArrayCycleTest$ElementValue'>\n"+ // Value.list[2] : Value " <element><![CDATA[Example element text]]></element>\n"+ // ElementExample.element : String " </entry>\n"+ " </list>\n"+ " </entry> \n\t\n"+ " </array>\n"+ "</root>"; private static final String PROMOTE = "<value>\n"+ " <list length='1' class='org.simpleframework.xml.strategy.ArrayCycleTest$ElementValue'>\n"+ " <entry class='org.simpleframework.xml.strategy.ArrayCycleTest$ElementValue'>\n"+ " <element>Example text</element>\n"+ " </entry>\n"+ " </list>\n"+ "</value>\n"; @Root(name="root") private static class ArrayCycleExample { @ElementArray(name="one", entry="entry") public Entry[] one; @ElementArray(name="two", entry="entry") public Entry[] two; @ElementArray(name="three", entry="entry") public Entry[] three; @Element(name="example") public ArrayCycleExample example; } @Root(name="text") private static class Entry { @Attribute(name="value") public String value; public Entry() { super(); } public Entry(String value) { this.value = value; } } @Root(name="root") private static class NestedArrayCycleExample { @ElementArray(name="array", entry="entry") public Value[] array; } @Root(name="value") private static class Value { @ElementArray(name="list", entry="entry", required=false) private Value[] list; } private static class TextValue extends Value { @Attribute(name="name") private String name; @Element(name="text") private String text; } private static class ElementValue extends Value { @Element(name="element") private String element; } private Persister persister; public void setUp() throws Exception { persister = new Persister(new CycleStrategy("id", "ref")); } public void testCycle() throws Exception { ArrayCycleExample example = persister.read(ArrayCycleExample.class, SOURCE); assertEquals(example.one.length, 5); assertEquals(example.one[0].value, "entry one"); assertEquals(example.one[1].value, "entry two"); assertEquals(example.one[2].value, "entry three"); assertEquals(example.one[3].value, "entry four"); assertEquals(example.one[4].value, "entry five"); assertEquals(example.two.length, 5); assertEquals(example.two[0].value, "entry one"); assertEquals(example.two[1].value, "entry two"); assertEquals(example.two[2].value, "entry three"); assertEquals(example.two[3].value, "entry four"); assertEquals(example.two[4].value, "entry five"); assertEquals(example.three.length, 3); assertEquals(example.three[0].value, "tom"); assertEquals(example.three[1].value, "dick"); assertEquals(example.three[2].value, "harry"); assertTrue(example.one == example.two); assertTrue(example == example.example); StringWriter out = new StringWriter(); persister.write(example, out); example = persister.read(ArrayCycleExample.class, SOURCE); assertEquals(example.one.length, 5); assertEquals(example.one[0].value, "entry one"); assertEquals(example.one[1].value, "entry two"); assertEquals(example.one[2].value, "entry three"); assertEquals(example.one[3].value, "entry four"); assertEquals(example.one[4].value, "entry five"); assertEquals(example.two.length, 5); assertEquals(example.two[0].value, "entry one"); assertEquals(example.two[1].value, "entry two"); assertEquals(example.two[2].value, "entry three"); assertEquals(example.two[3].value, "entry four"); assertEquals(example.two[4].value, "entry five"); assertEquals(example.three.length, 3); assertEquals(example.three[0].value, "tom"); assertEquals(example.three[1].value, "dick"); assertEquals(example.three[2].value, "harry"); assertTrue(example.one == example.two); assertTrue(example == example.example); validate(example, persister); } public void testNestedExample() throws Exception { NestedArrayCycleExample root = persister.read(NestedArrayCycleExample.class, NESTED); assertEquals(root.array.length, 2); assertTrue(root.array[0].list == root.array); assertTrue(root.array[1].list[0] instanceof TextValue); assertTrue(root.array[1].list == root.array[1].list[0].list); assertTrue(root.array[1] == root.array[1].list[1]); assertTrue(root.array[1].list == root.array[1].list[0].list); assertTrue(root.array[1].list[2] instanceof ElementValue); ElementValue element = (ElementValue) root.array[1].list[2]; TextValue text = (TextValue) root.array[1].list[0]; assertEquals(element.element, "Example element text"); assertEquals(text.name, "blah"); assertEquals(text.text, "Some text"); validate(root, persister); StringWriter out = new StringWriter(); persister.write(root, out); // Ensure references survive serialization root = persister.read(NestedArrayCycleExample.class, out.toString()); assertEquals(root.array.length, 2); assertTrue(root.array[0].list == root.array); assertTrue(root.array[1].list[0] instanceof TextValue); assertTrue(root.array[1].list == root.array[1].list[0].list); assertTrue(root.array[1] == root.array[1].list[1]); assertTrue(root.array[1].list == root.array[1].list[0].list); assertTrue(root.array[1].list[2] instanceof ElementValue); element = (ElementValue) root.array[1].list[2]; text = (TextValue) root.array[1].list[0]; assertEquals(element.element, "Example element text"); assertEquals(text.name, "blah"); assertEquals(text.text, "Some text"); } public void testPromotion() throws Exception { Value example = persister.read(Value.class, PROMOTE); assertEquals(example.list.length, 1); assertTrue(example.list instanceof ElementValue[]); ElementValue value = (ElementValue) example.list[0]; assertEquals(value.element, "Example text"); validate(example, persister); } } ������������������������������������������������������������������������������������������������������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/strategy/CycleTest.java���������������������������0000644�0001750�0001750�00000007655�11342530530�027450� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.simpleframework.xml.strategy; import java.io.StringWriter; import java.util.ArrayList; import java.util.List; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Element; import org.simpleframework.xml.ElementList; import org.simpleframework.xml.Root; import org.simpleframework.xml.Text; import org.simpleframework.xml.core.Persister; import org.simpleframework.xml.strategy.CycleStrategy; import org.simpleframework.xml.ValidationTestCase; public class CycleTest extends ValidationTestCase { private static final int ITERATIONS = 1000; @Root(name="example") public static class CycleExample { @ElementList(name="list", type=Entry.class) private List<Entry> list; @Element(name="cycle") private CycleExample cycle; public CycleExample() { this.list = new ArrayList(); this.cycle = this; } public void add(Entry entry) { list.add(entry); } public Entry get(int index) { return list.get(index); } } @Root(name="entry") public static class Entry { @Attribute(name="key") private String name; @Element(name="value") private String value; protected Entry() { super(); } public Entry(String name, String value) { this.name = name; this.value = value; } } private Persister persister; public void setUp() throws Exception { persister = new Persister(new CycleStrategy("id", "ref")); } public void testCycle() throws Exception { CycleExample example = new CycleExample(); Entry one = new Entry("1", "one"); Entry two = new Entry("2", "two"); Entry three = new Entry("3", "three"); Entry threeDuplicate = new Entry("3", "three"); example.add(one); example.add(two); example.add(three); example.add(one); example.add(two); example.add(threeDuplicate); assertEquals(example.get(0).value, "one"); assertEquals(example.get(1).value, "two"); assertEquals(example.get(2).value, "three"); assertEquals(example.get(3).value, "one"); assertEquals(example.get(4).value, "two"); assertEquals(example.get(5).value, "three"); assertTrue(example.get(0) == example.get(3)); assertTrue(example.get(1) == example.get(4)); assertFalse(example.get(2) == example.get(5)); StringWriter out = new StringWriter(); persister.write(example, System.out); persister.write(example, out); example = persister.read(CycleExample.class, out.toString()); assertEquals(example.get(0).value, "one"); assertEquals(example.get(1).value, "two"); assertEquals(example.get(2).value, "three"); assertEquals(example.get(3).value, "one"); assertEquals(example.get(4).value, "two"); assertTrue(example.get(0) == example.get(3)); assertTrue(example.get(1) == example.get(4)); assertFalse(example.get(2) == example.get(5)); validate(example, persister); } public void testMemory() throws Exception { CycleExample example = new CycleExample(); Entry one = new Entry("1", "one"); Entry two = new Entry("2", "two"); Entry three = new Entry("3", "three"); Entry threeDuplicate = new Entry("3", "three"); example.add(one); example.add(two); example.add(three); example.add(one); example.add(two); example.add(threeDuplicate); StringWriter out = new StringWriter(); persister.write(example, System.out); persister.write(example, out); for(int i = 0; i < ITERATIONS; i++) { persister.write(example, new StringWriter()); } for(int i = 0; i < ITERATIONS; i++) { persister.read(CycleExample.class, out.toString()); } validate(example, persister); } } �����������������������������������������������������������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/strategy/AnnotationTypeTest.java������������������0000644�0001750�0001750�00000006357�11342530530�031363� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.simpleframework.xml.strategy; import java.io.StringWriter; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.util.Map; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Element; import org.simpleframework.xml.Root; import org.simpleframework.xml.ValidationTestCase; import org.simpleframework.xml.core.Persister; import org.simpleframework.xml.stream.InputNode; import org.simpleframework.xml.stream.NodeMap; import org.simpleframework.xml.stream.OutputNode; public class AnnotationTypeTest extends ValidationTestCase { private static final String SOURCE = "<?xml version=\"1.0\"?>\n"+ "<annotationExample age='10'>\n"+ " <name key='name'>John Doe</name>\n"+ "</annotationExample>"; @Retention(RetentionPolicy.RUNTIME) private static @interface Component { public String name(); } @Root private static class AnnotationExample { @Component(name="name") @Element private String name; @Component(name="age") @Attribute private int age; public AnnotationExample(@Element(name="name") String name, @Attribute(name="age") int age) { this.name = name; this.age = age; } } private static class AnnotationStrategy implements Strategy { private static final String KEY = "key"; private final Strategy strategy; private AnnotationStrategy() { this.strategy = new TreeStrategy(); } public Value read(Type type, NodeMap<InputNode> node, Map map) throws Exception { Component component = type.getAnnotation(Component.class); if(component != null) { String name = component.name(); InputNode value = node.get(KEY); if(!value.getValue().equals(name)) { throw new IllegalStateException("Component name incorrect, expected '"+name+"' but was '"+value.getValue()+"'"); } } return strategy.read(type, node, map); } public boolean write(Type type, Object value, NodeMap<OutputNode> node, Map map) throws Exception { Component component = type.getAnnotation(Component.class); if(component != null) { String name = component.name(); if(name != null) { node.put(KEY, name); } } return strategy.write(type, value, node, map); } } public void testAnnotationType() throws Exception { Strategy strategy = new AnnotationStrategy(); Persister persister = new Persister(strategy); StringWriter writer = new StringWriter(); AnnotationExample example = persister.read(AnnotationExample.class, SOURCE); persister.write(example, writer); String text = writer.toString(); assertXpathExists("/annotationExample[@age='10']", text); assertXpathExists("/annotationExample/name[@key='name']", text); AnnotationExample result = persister.read(AnnotationExample.class, text); assertEquals(example.name, result.name); assertEquals(example.age, result.age); validate(result, persister); } } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/strategy/PrimitiveCycleTest.java������������������0000644�0001750�0001750�00000020454�11342530530�031331� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.simpleframework.xml.strategy; import java.io.StringWriter; import org.simpleframework.xml.Element; import org.simpleframework.xml.Root; import org.simpleframework.xml.core.Persister; import org.simpleframework.xml.strategy.CycleStrategy; import org.simpleframework.xml.ValidationTestCase; public class PrimitiveCycleTest extends ValidationTestCase { private static final String SOURCE = "<?xml version=\"1.0\"?>\n"+ "<test>\n"+ " <primitive>\n"+ " <boolean>true</boolean>\r\n"+ " <byte>16</byte> \n\r"+ " <short>120</short> \n\r"+ " <int>1234</int>\n"+ " <float>1234.56</float> \n\r"+ " <long>1234567</long>\n"+ " <double>1234567.89</double> \n\r"+ " </primitive>\n"+ " <object>\n"+ " <Boolean>true</Boolean>\r\n"+ " <Byte>16</Byte> \n\r"+ " <Short>120</Short> \n\r"+ " <Integer>1234</Integer>\n"+ " <Float>1234.56</Float> \n\r"+ " <Long>1234567</Long>\n"+ " <Double>1234567.89</Double> \n\r"+ " <String>text value</String>\n\r"+ " <Enum>TWO</Enum>\n"+ " </object>\n\r"+ "</test>"; @Root(name="test") private static class PrimitiveCycleEntry { @Element(name="primitive") private PrimitiveEntry primitive; @Element(name="object") private ObjectEntry object; } private static class PrimitiveEntry { @Element(name="boolean") private boolean booleanValue; @Element(name="byte") private byte byteValue; @Element(name="short") private short shortValue; @Element(name="int") private int intValue; @Element(name="float") private float floatValue; @Element(name="long") private long longValue; @Element(name="double") private double doubleValue; } private static class ObjectEntry { @Element(name="Boolean") private Boolean booleanValue; @Element(name="Byte") private Byte byteValue; @Element(name="Short") private Short shortValue; @Element(name="Integer") private Integer intValue; @Element(name="Float") private Float floatValue; @Element(name="Long") private Long longValue; @Element(name="Double") private Double doubleValue; @Element(name="String") private String stringValue; @Element(name="Enum") private TestEnum enumValue; } private static enum TestEnum { ONE, TWO, THREE } @Root private static class StringReferenceExample { @Element private String a; @Element private String b; @Element private String c; public StringReferenceExample() { super(); } public StringReferenceExample(String a, String b, String c) { this.a = a; this.b = b; this.c = c; } } @Root private static class IntegerReferenceExample { @Element private Integer a; @Element private Integer b; @Element private Integer c; public IntegerReferenceExample() { super(); } public IntegerReferenceExample(Integer a, Integer b, Integer c) { this.a = a; this.b = b; this.c = c; } } private Persister persister; public void setUp() throws Exception { persister = new Persister(new CycleStrategy()); } public void testPrimitive() throws Exception { PrimitiveCycleEntry entry = persister.read(PrimitiveCycleEntry.class, SOURCE); assertEquals(entry.primitive.booleanValue, true); assertEquals(entry.primitive.byteValue, 16); assertEquals(entry.primitive.shortValue, 120); assertEquals(entry.primitive.intValue, 1234); assertEquals(entry.primitive.floatValue, 1234.56f); assertEquals(entry.primitive.longValue, 1234567l); assertEquals(entry.primitive.doubleValue, 1234567.89d); assertEquals(entry.object.booleanValue, Boolean.TRUE); assertEquals(entry.object.byteValue, new Byte("16")); assertEquals(entry.object.shortValue, new Short("120")); assertEquals(entry.object.intValue, new Integer(1234)); assertEquals(entry.object.floatValue, new Float(1234.56)); assertEquals(entry.object.longValue, new Long(1234567)); assertEquals(entry.object.doubleValue, new Double(1234567.89)); assertEquals(entry.object.stringValue, "text value"); assertEquals(entry.object.enumValue, TestEnum.TWO); StringWriter out = new StringWriter(); persister.write(entry, out); String text = out.toString(); assertXpathExists("/test[@id='0']", text); assertXpathExists("/test/primitive[@id='1']", text); assertXpathExists("/test/object[@id='2']", text); assertXpathEvaluatesTo("true", "/test/primitive/boolean", text); assertXpathEvaluatesTo("16", "/test/primitive/byte", text); assertXpathEvaluatesTo("120", "/test/primitive/short", text); assertXpathEvaluatesTo("1234", "/test/primitive/int", text); assertXpathEvaluatesTo("1234.56", "/test/primitive/float", text); assertXpathEvaluatesTo("1234567", "/test/primitive/long", text); assertXpathEvaluatesTo("1234567.89", "/test/primitive/double", text); assertXpathEvaluatesTo("true", "/test/object/Boolean", text); assertXpathEvaluatesTo("16", "/test/object/Byte", text); assertXpathEvaluatesTo("120", "/test/object/Short", text); assertXpathEvaluatesTo("1234", "/test/object/Integer", text); assertXpathEvaluatesTo("1234.56", "/test/object/Float", text); assertXpathEvaluatesTo("1234567", "/test/object/Long", text); assertXpathEvaluatesTo("1234567.89", "/test/object/Double", text); assertXpathEvaluatesTo("text value", "/test/object/String", text); assertXpathEvaluatesTo("TWO", "/test/object/Enum", text); validate(entry, persister); } public void testPrimitiveReference() throws Exception { StringReferenceExample example = new StringReferenceExample("a", "a", "a"); StringWriter out = new StringWriter(); persister.write(example, out); String text = out.toString(); assertXpathExists("/stringReferenceExample[@id='0']", text); assertXpathExists("/stringReferenceExample/a[@id='1']", text); assertXpathExists("/stringReferenceExample/b[@reference='1']", text); assertXpathExists("/stringReferenceExample/c[@reference='1']", text); validate(example, persister); example = new StringReferenceExample("a", "b", "a"); out = new StringWriter(); persister.write(example, out); text = out.toString(); assertXpathExists("/stringReferenceExample[@id='0']", text); assertXpathExists("/stringReferenceExample/a[@id='1']", text); assertXpathExists("/stringReferenceExample/b[@id='2']", text); assertXpathExists("/stringReferenceExample/c[@reference='1']", text); validate(example, persister); Integer one = new Integer(1); Integer two = new Integer(1); Integer three = new Integer(1); IntegerReferenceExample integers = new IntegerReferenceExample(one, two, three); out = new StringWriter(); persister.write(integers, out); text = out.toString(); assertXpathExists("/integerReferenceExample[@id='0']", text); assertXpathExists("/integerReferenceExample/a[@id='1']", text); assertXpathExists("/integerReferenceExample/b[@id='2']", text); assertXpathExists("/integerReferenceExample/c[@id='3']", text); validate(integers, persister); integers = new IntegerReferenceExample(one, one, two); out = new StringWriter(); persister.write(integers, out); text = out.toString(); assertXpathExists("/integerReferenceExample[@id='0']", text); assertXpathExists("/integerReferenceExample/a[@id='1']", text); assertXpathExists("/integerReferenceExample/b[@reference='1']", text); assertXpathExists("/integerReferenceExample/c[@id='2']", text); validate(integers, persister); } } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/strategy/CommentTest.java�������������������������0000644�0001750�0001750�00000003401�11342530530�027774� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.simpleframework.xml.strategy; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import org.simpleframework.xml.Default; import org.simpleframework.xml.Root; import org.simpleframework.xml.ValidationTestCase; import org.simpleframework.xml.core.Persister; import org.simpleframework.xml.stream.InputNode; import org.simpleframework.xml.stream.NodeMap; import org.simpleframework.xml.stream.OutputNode; public class CommentTest extends ValidationTestCase { @Retention(RetentionPolicy.RUNTIME) private static @interface Comment { public String value(); } @Root @Default private static class CommentExample { @Comment("This represents the name value") private String name; @Comment("This is a value to be used") private String value; @Comment("Yet another comment") private Double price; } private static class CommentVisitor implements Visitor { public void read(Type type, NodeMap<InputNode> node) throws Exception {} public void write(Type type, NodeMap<OutputNode> node) throws Exception { if(!node.getNode().isRoot()) { Comment comment = type.getAnnotation(Comment.class); if(comment != null) { node.getNode().setComment(comment.value()); } } } } public void testComment() throws Exception { Visitor visitor = new CommentVisitor(); Strategy strategy = new VisitorStrategy(visitor); Persister persister = new Persister(strategy); CommentExample example = new CommentExample(); example.name = "Some Name"; example.value = "A value to use"; example.price = 9.99; persister.write(example, System.out); } } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/strategy/ListCycleTest.java�����������������������0000644�0001750�0001750�00000021143�11342530530�030270� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.simpleframework.xml.strategy; import java.io.StringWriter; import java.util.List; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Element; import org.simpleframework.xml.ElementList; import org.simpleframework.xml.Root; import org.simpleframework.xml.core.Persister; import org.simpleframework.xml.strategy.CycleStrategy; import org.simpleframework.xml.ValidationTestCase; public class ListCycleTest extends ValidationTestCase { private static final String SOURCE = "<?xml version=\"1.0\"?>\n"+ "<root id='main'>\n"+ " <one length='5' id='numbers'>\n\r"+ " <text value='entry one'/> \n\r"+ " <text value='entry two'/> \n\r"+ " <text value='entry three'/> \n\r"+ " <text value='entry four'/> \n\r"+ " <text value='entry five'/> \n\r"+ " </one>\n\r"+ " <two ref='numbers'/>\n"+ " <three length='3'>\n" + " <text value='tom'/> \n\r"+ " <text value='dick'/> \n\r"+ " <text value='harry'/> \n\r"+ " </three>\n"+ " <example ref='main'/>\n"+ "</root>"; private static final String NESTED = "<?xml version=\"1.0\"?>\n"+ "<root id='main'>\n"+ " <list id='list'>\n" + " <value> \n\r"+ " <list ref='list'/>\n"+ " </value>\r\n"+ " </list>\n"+ "</root>"; private static final String INLINE_LIST = "<?xml version=\"1.0\"?>\n"+ "<inlineListExample id='main'>\n"+ " <text value='entry one'/> \n\r"+ " <text value='entry two'/> \n\r"+ " <text value='entry three'/> \n\r"+ " <text value='entry four'/> \n\r"+ " <text value='entry five'/> \n\r"+ " <example ref='main'/>\n"+ "</inlineListExample>"; private static final String INLINE_PRIMITIVE_LIST = "<?xml version=\"1.0\"?>\n"+ "<inlinePrimitiveListExample id='main'>\n"+ " <string>entry one</string> \n\r"+ " <string>entry two</string> \n\r"+ " <string>entry three</string> \n\r"+ " <string>entry four</string> \n\r"+ " <string>entry five</string> \n\r"+ " <example ref='main'/>\n"+ "</inlinePrimitiveListExample>"; @Root(name="root") private static class ListExample { @ElementList(name="one", type=Entry.class) public List<Entry> one; @ElementList(name="two", type=Entry.class) public List<Entry> two; @ElementList(name="three", type=Entry.class) public List<Entry> three; @Element(name="example") public ListExample example; } @Root private static class InlineListExample { @ElementList(inline=true) public List<Entry> list; @Element public InlineListExample example; } @Root private static class InlinePrimitiveListExample { @ElementList(inline=true, data=true) public List<String> list; @Element public InlinePrimitiveListExample example; } @Root(name="text") private static class Entry { @Attribute(name="value") public String value; public Entry() { super(); } public Entry(String value) { this.value = value; } } @Root(name="root") private static class NestedListExample { @ElementList(name="list", type=Value.class) public List<Value> list; } @Root(name="value") private static class Value { @ElementList(name="list", type=Value.class, required=false) private List<Value> list; } private Persister persister; public void setUp() throws Exception { persister = new Persister(new CycleStrategy("id", "ref")); } public void testCycle() throws Exception { ListExample example = persister.read(ListExample.class, SOURCE); assertEquals(example.one.size(), 5); assertEquals(example.one.get(0).value, "entry one"); assertEquals(example.one.get(1).value, "entry two"); assertEquals(example.one.get(2).value, "entry three"); assertEquals(example.one.get(3).value, "entry four"); assertEquals(example.one.get(4).value, "entry five"); assertEquals(example.two.size(), 5); assertEquals(example.two.get(0).value, "entry one"); assertEquals(example.two.get(1).value, "entry two"); assertEquals(example.two.get(2).value, "entry three"); assertEquals(example.two.get(3).value, "entry four"); assertEquals(example.two.get(4).value, "entry five"); assertEquals(example.three.size(), 3); assertEquals(example.three.get(0).value, "tom"); assertEquals(example.three.get(1).value, "dick"); assertEquals(example.three.get(2).value, "harry"); assertTrue(example.one == example.two); assertTrue(example == example.example); StringWriter out = new StringWriter(); persister.write(example, out); example = persister.read(ListExample.class, SOURCE); assertEquals(example.one.size(), 5); assertEquals(example.one.get(0).value, "entry one"); assertEquals(example.one.get(1).value, "entry two"); assertEquals(example.one.get(2).value, "entry three"); assertEquals(example.one.get(3).value, "entry four"); assertEquals(example.one.get(4).value, "entry five"); assertEquals(example.two.size(), 5); assertEquals(example.two.get(0).value, "entry one"); assertEquals(example.two.get(1).value, "entry two"); assertEquals(example.two.get(2).value, "entry three"); assertEquals(example.two.get(3).value, "entry four"); assertEquals(example.two.get(4).value, "entry five"); assertEquals(example.three.size(), 3); assertEquals(example.three.get(0).value, "tom"); assertEquals(example.three.get(1).value, "dick"); assertEquals(example.three.get(2).value, "harry"); assertTrue(example.one == example.two); assertTrue(example == example.example); validate(example, persister); } public void testInlineList() throws Exception { InlineListExample example = persister.read(InlineListExample.class, INLINE_LIST); assertEquals(example.list.size(), 5); assertEquals(example.list.get(0).value, "entry one"); assertEquals(example.list.get(1).value, "entry two"); assertEquals(example.list.get(2).value, "entry three"); assertEquals(example.list.get(3).value, "entry four"); assertEquals(example.list.get(4).value, "entry five"); assertTrue(example == example.example); StringWriter out = new StringWriter(); persister.write(example, out); example = persister.read(InlineListExample.class, INLINE_LIST); assertEquals(example.list.size(), 5); assertEquals(example.list.get(0).value, "entry one"); assertEquals(example.list.get(1).value, "entry two"); assertEquals(example.list.get(2).value, "entry three"); assertEquals(example.list.get(3).value, "entry four"); assertEquals(example.list.get(4).value, "entry five"); assertTrue(example == example.example); validate(example, persister); } public void testInlinePrimitiveList() throws Exception { InlinePrimitiveListExample example = persister.read(InlinePrimitiveListExample.class, INLINE_PRIMITIVE_LIST); assertEquals(example.list.size(), 5); assertEquals(example.list.get(0), "entry one"); assertEquals(example.list.get(1), "entry two"); assertEquals(example.list.get(2), "entry three"); assertEquals(example.list.get(3), "entry four"); assertEquals(example.list.get(4), "entry five"); assertTrue(example == example.example); StringWriter out = new StringWriter(); persister.write(example, out); example = persister.read(InlinePrimitiveListExample.class, INLINE_PRIMITIVE_LIST); assertEquals(example.list.size(), 5); assertEquals(example.list.get(0), "entry one"); assertEquals(example.list.get(1), "entry two"); assertEquals(example.list.get(2), "entry three"); assertEquals(example.list.get(3), "entry four"); assertEquals(example.list.get(4), "entry five"); assertTrue(example == example.example); validate(example, persister); } public void testNestedExample() throws Exception { NestedListExample root = persister.read(NestedListExample.class, NESTED); assertEquals(root.list.size(), 1); assertTrue(root.list.get(0).list == root.list); validate(root, persister); } } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/strategy/PackageParser.java�����������������������0000644�0001750�0001750�00000004311�11342530530�030243� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.simpleframework.xml.strategy; import java.net.URI; class PackageParser { private static final String scheme = "http://"; public Class revert(String reference) throws Exception { URI uri = new URI(reference); String domain = uri.getHost(); String path = uri.getPath(); String[] list = domain.split("\\."); if(list.length > 1) { domain = list[1] + "." + list[0]; } else { domain = list[0]; } String type = domain + path.replaceAll("\\/+", "."); return Class.forName(type); } public String parse(String className) throws Exception { return new Convert(className).fastParse(); } public String parse(Class type) throws Exception { return new Convert(type.getName()).fastParse(); } public static class Convert { private char[] array; private int count; private int mark; private int size; private int pos; public Convert(String type) { this.array = type.toCharArray(); } public String fastParse() throws Exception { char[] work = new char[array.length + 10]; scheme(work); domain(work); path(work); return new String(work, 0, pos); } private void scheme(char[] work) { "http://".getChars(0, 7, work, 0); pos += 7; } private void path(char[] work) { for(int i = size; i < array.length; i++) { if(array[i] == '.') { work[pos++] = '/'; } else { work[pos++] = array[i]; } } } private void domain(char[] work) { while(size < array.length) { if(array[size] == '.') { if(count++ == 1) { break; } mark = size + 1; } size++; } for(int i = 0; i < size - mark; i++) { work[pos++] = array[mark + i]; } work[pos++] = '.'; work[size + 7] = '/'; for(int i = 0; i < mark - 1; i++) { work[pos++] = array[i]; } } } }�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/strategy/AnnotationConverterTest.java�������������0000644�0001750�0001750�00000015660�11342530530�032406� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.simpleframework.xml.strategy; import java.io.StringWriter; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.reflect.Constructor; import java.util.Map; import org.simpleframework.xml.Element; import org.simpleframework.xml.Root; import org.simpleframework.xml.Serializer; import org.simpleframework.xml.ValidationTestCase; import org.simpleframework.xml.core.Persister; import org.simpleframework.xml.stream.InputNode; import org.simpleframework.xml.stream.NodeMap; import org.simpleframework.xml.stream.OutputNode; public class AnnotationConverterTest extends ValidationTestCase { @Retention(RetentionPolicy.RUNTIME) private static @interface Convert{ public Class<? extends Converter> value(); } private static interface Converter<T> { public T read(InputNode node) throws Exception; public void write(OutputNode node, T value) throws Exception; } private static class CowConverter implements Converter<Cow> { public Cow read(InputNode node) throws Exception { String name = node.getAttribute("name").getValue(); String age = node.getAttribute("age").getValue(); return new Cow(name, Integer.parseInt(age)); } public void write(OutputNode node, Cow cow) throws Exception { node.setAttribute("name", cow.getName()); node.setAttribute("age", String.valueOf(cow.getAge())); node.setAttribute("legs", String.valueOf(cow.getLegs())); } } private static class ChickenConverter implements Converter<Chicken> { public Chicken read(InputNode node) throws Exception { String name = node.getAttribute("name").getValue(); String age = node.getAttribute("age").getValue(); return new Chicken(name, Integer.parseInt(age)); } public void write(OutputNode node, Chicken chicken) throws Exception { node.setAttribute("name", chicken.getName()); node.setAttribute("age", String.valueOf(chicken.getAge())); node.setAttribute("legs", String.valueOf(chicken.getLegs())); } } private static class Animal { private final String name; private final int age; private final int legs; public Animal(String name, int age, int legs) { this.name = name; this.legs = legs; this.age = age; } public String getName() { return name; } public int getAge(){ return age; } public int getLegs() { return legs; } } private static class Chicken extends Animal { public Chicken(String name, int age) { super(name, age, 2); } } private static class Cow extends Animal { public Cow(String name, int age) { super(name, age, 4); } } private static class AnnotationStrategy implements Strategy { private final Strategy strategy; public AnnotationStrategy(Strategy strategy) { this.strategy = strategy; } public Value read(Type type, NodeMap<InputNode> node, Map map) throws Exception { Value value = strategy.read(type, node, map); Convert convert = type.getAnnotation(Convert.class); InputNode parent = node.getNode(); if(convert != null) { Class<? extends Converter> converterClass = convert.value(); Constructor<? extends Converter> converterConstructor = converterClass.getDeclaredConstructor(); if(!converterConstructor.isAccessible()) { converterConstructor.setAccessible(true); } Converter converter = converterConstructor.newInstance(); Object result = converter.read(parent); return new Wrapper(result); } return value; } public boolean write(Type type, Object value, NodeMap<OutputNode> node, Map map) throws Exception { Convert convert = type.getAnnotation(Convert.class); OutputNode parent = node.getNode(); if(convert != null) { Class<? extends Converter> converterClass = convert.value(); Constructor<? extends Converter> converterConstructor = converterClass.getDeclaredConstructor(); if(!converterConstructor.isAccessible()) { converterConstructor.setAccessible(true); } Converter converter = converterConstructor.newInstance(); converter.write(parent, value); return true; } return strategy.write(type, value, node, map); } } public static class Wrapper implements Value { private Object data; public Wrapper(Object data){ this.data = data; } public int getLength() { return 0; } public Class getType() { return data.getClass(); } public Object getValue() { return data; } public boolean isReference() { return true; } public void setValue(Object data) { this.data = data; } } private static final String SOURCE = "<farmExample>"+ " <chicken name='Hen' age='1' legs='2'/>"+ " <cow name='Bull' age='4' legs='4'/>"+ "</farmExample>"; @Root private static class FarmExample { @Element @Convert(ChickenConverter.class) private Chicken chicken; @Element @Convert(CowConverter.class) private Cow cow; public FarmExample(@Element(name="chicken") Chicken chicken, @Element(name="cow") Cow cow) { this.chicken = chicken; this.cow = cow; } public Chicken getChicken() { return chicken; } public Cow getCow() { return cow; } } public void testAnnotationConversion() throws Exception { Strategy strategy = new TreeStrategy(); Strategy converter = new AnnotationStrategy(strategy); Serializer serializer = new Persister(converter); StringWriter writer = new StringWriter(); FarmExample example = serializer.read(FarmExample.class, SOURCE); assertEquals(example.getCow().getName(), "Bull"); assertEquals(example.getCow().getAge(), 4); assertEquals(example.getCow().getLegs(), 4); assertEquals(example.getChicken().getName(), "Hen"); assertEquals(example.getChicken().getAge(), 1); assertEquals(example.getChicken().getLegs(), 2); serializer.write(example, System.out); serializer.write(example, writer); String text = writer.toString(); assertXpathExists("/farmExample/chicken[@name='Hen']", text); assertXpathExists("/farmExample/chicken[@age='1']", text); assertXpathExists("/farmExample/chicken[@legs='2']", text); assertXpathExists("/farmExample/cow[@name='Bull']", text); assertXpathExists("/farmExample/cow[@age='4']", text); assertXpathExists("/farmExample/cow[@legs='4']", text); } } ��������������������������������������������������������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/strategy/PackageParserTest.java�������������������0000644�0001750�0001750�00000004547�11342530530�031116� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.simpleframework.xml.strategy; import java.net.URI; import java.util.HashMap; import junit.framework.TestCase; import org.simpleframework.xml.Element; import org.simpleframework.xml.ElementList; import org.w3c.dom.Node; public class PackageParserTest extends TestCase { private static final int ITERATIONS = 100000; /* * javax.xml.namespace.NamespaceContext.getNamespaceURI(String prefix) * * e.g * * String reference = context.getNamespaceURI("class") * Class type = parser.parse(reference); * * <element xmlns:class='http://util.java/ArrayList'> * <name>name</name> * <value>value</value> * </element> * */ public void testParser() throws Exception { assertEquals("http://util.java/HashMap", parse(HashMap.class)); assertEquals("http://simpleframework.org/xml/Element", parse(Element.class)); assertEquals("http://simpleframework.org/xml/ElementList", parse(ElementList.class)); assertEquals("http://w3c.org/dom/Node", parse(Node.class)); assertEquals("http://simpleframework.org/xml/strategy/PackageParser", parse(PackageParser.class)); assertEquals(HashMap.class, revert("http://util.java/HashMap")); assertEquals(Element.class, revert("http://simpleframework.org/xml/Element")); assertEquals(ElementList.class, revert("http://simpleframework.org/xml/ElementList")); assertEquals(Node.class, revert("http://w3c.org/dom/Node")); assertEquals(PackageParser.class, revert("http://simpleframework.org/xml/strategy/PackageParser")); long start = System.currentTimeMillis(); for(int i = 0; i < ITERATIONS; i++) { fastParse(ElementList.class); } long fast = System.currentTimeMillis() - start; start = System.currentTimeMillis(); for(int i = 0; i < ITERATIONS; i++) { parse(ElementList.class); } long normal = System.currentTimeMillis() - start; System.out.printf("fast=%sms normal=%sms diff=%s%n", fast, normal, normal / fast); } public String fastParse(Class type) throws Exception { return new PackageParser().parse(type); } public String parse(Class type) throws Exception { return new PackageParser().parse(type); } public Class revert(String type) throws Exception { return new PackageParser().revert(type); } }���������������������������������������������������������������������������������������������������������������������������������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/strategy/CycleStrategyTest.java�������������������0000644�0001750�0001750�00000005517�11342530527�031174� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.simpleframework.xml.strategy; import java.io.StringReader; import java.lang.annotation.Annotation; import java.util.HashMap; import java.util.Map; import junit.framework.TestCase; import org.simpleframework.xml.stream.InputNode; import org.simpleframework.xml.stream.NodeBuilder; import org.simpleframework.xml.stream.NodeMap; public class CycleStrategyTest extends TestCase { private static final String ARRAY = "<array id='1' length='12' class='java.lang.String'/>"; private static final String OBJECT = "<array id='1' class='java.lang.String'/>"; private static final String REFERENCE = "<array reference='1' class='java.lang.String'/>"; private static class Entry implements Type { private final Class type; public Entry(Class type) { this.type = type; } public <T extends Annotation> T getAnnotation(Class<T> type) { return null; } public Class getType() { return type; } } public void testArray() throws Exception { Map map = new HashMap(); StringReader reader = new StringReader(ARRAY); CycleStrategy strategy = new CycleStrategy(); InputNode event = NodeBuilder.read(reader); NodeMap attributes = event.getAttributes(); Value value = strategy.read(new Entry(String[].class), attributes, map); assertEquals(12, value.getLength()); assertEquals(null, value.getValue()); assertEquals(String.class, value.getType()); assertEquals(false, value.isReference()); } public void testObject() throws Exception { Map map = new HashMap(); StringReader reader = new StringReader(OBJECT); CycleStrategy strategy = new CycleStrategy(); InputNode event = NodeBuilder.read(reader); NodeMap attributes = event.getAttributes(); Value value = strategy.read(new Entry(String.class), attributes, map); assertEquals(0, value.getLength()); assertEquals(null, value.getValue()); assertEquals(String.class, value.getType()); assertEquals(false, value.isReference()); } public void testReference() throws Exception { StringReader reader = new StringReader(REFERENCE); Contract contract = new Contract("id", "reference", "class", "length"); ReadGraph graph = new ReadGraph(contract, new Loader()); InputNode event = NodeBuilder.read(reader); NodeMap attributes = event.getAttributes(); graph.put("1", "first text"); graph.put("2", "second text"); graph.put("3", "third text"); Value value = graph.read(new Entry(String.class), attributes); assertEquals(0, value.getLength()); assertEquals("first text", value.getValue()); assertEquals(String.class, value.getType()); assertEquals(true, value.isReference()); } } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/strategy/MapCycleTest.java������������������������0000644�0001750�0001750�00000016311�11342530530�030073� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.simpleframework.xml.strategy; import java.util.HashMap; import java.util.Map; import org.simpleframework.xml.Element; import org.simpleframework.xml.ElementMap; import org.simpleframework.xml.Root; import org.simpleframework.xml.Serializer; import org.simpleframework.xml.ValidationTestCase; import org.simpleframework.xml.core.Persister; import org.simpleframework.xml.strategy.CycleStrategy; import org.simpleframework.xml.strategy.Strategy; public class MapCycleTest extends ValidationTestCase { private static final String ENTRY_MAP = "<entryMap>\n"+ " <map id='map'>\n"+ " <entry key='a'>" + " <mapEntry id='a'>\n" + " <name>a</name>\n"+ " <value>example 1</value>\n"+ " </mapEntry>" + " </entry>" + " <entry key='b'>" + " <mapEntry id='b'>\n" + " <name>b</name>\n"+ " <value>example 2</value>\n"+ " </mapEntry>" + " </entry>" + " <entry key='c'>" + " <mapEntry reference='a'/>\n" + " </entry>" + " <entry key='d'>" + " <mapEntry reference='a'/>\n" + " </entry>\n" + " </map>\n"+ "</entryMap>"; private static final String COMPLEX_MAP = "<complexMap>\n"+ " <map>\n"+ " <entry>" + " <compositeKey id='1'>\n" + " <name>name 1</name>\n" + " <address>address 1</address>\n" + " </compositeKey>\n" + " <mapEntry>\n" + " <name>a</name>\n"+ " <value>example 1</value>\n"+ " </mapEntry>" + " </entry>" + " <entry>" + " <compositeKey reference='1'/>\n" + " <mapEntry id='2'>\n" + " <name>b</name>\n"+ " <value>example 2</value>\n"+ " </mapEntry>" + " </entry>" + " <entry>" + " <compositeKey>\n" + " <name>name 3</name>\n" + " <address>address 3</address>\n" + " </compositeKey>\n" + " <mapEntry reference='2'/>\n" + " </entry>" + " <entry>" + " <compositeKey>\n" + " <name>name 4</name>\n" + " <address>address 4</address>\n" + " </compositeKey>\n" + " <mapEntry>\n" + " <name>d</name>\n"+ " <value>example 4</value>\n"+ " </mapEntry>" + " </entry>" + " </map>\n"+ "</complexMap>"; private static final String PRIMITIVE_MAP = "<primitiveMap>\n"+ " <map>\n"+ " <entry>\n" + " <string>one</string>\n" + // one " <double id='one'>1.0</double>\n" + " </entry>\n"+ " <entry>" + " <string>two</string>\n" + // two " <double reference='one'/>\n" + " </entry>\n"+ " <entry>" + " <string id='three'>three</string>\n" + // three " <double>3.0</double>\n" + " </entry>\n"+ " <entry>" + " <string reference='three'/>\n" + // three " <double>4.0</double>\n" + " </entry>\n"+ " </map>\n"+ "</primitiveMap>"; @Root private static class EntryMap { @ElementMap(key="key", attribute=true) private Map<String, MapEntry> map; public String getValue(String name) { return map.get(name).value; } public MapEntry getEntry(String name) { return map.get(name); } } @Root private static class MapEntry { @Element private String name; @Element private String value; } @Root private static class StringMap { @ElementMap(key="letter", attribute=true) private Map<String, String> map; public String getValue(String name) { return map.get(name); } } @Root private static class ComplexMap { @ElementMap private Map<CompositeKey, MapEntry> map; public String getValue(CompositeKey key) { return map.get(key).value; } } @Root private static class CompositeKey { @Element private String name; @Element private String address; public CompositeKey() { super(); } public CompositeKey(String name, String address) { this.name = name; this.address = address; } public int hashCode() { return name.hashCode() + address.hashCode(); } public boolean equals(Object item) { if(item instanceof CompositeKey) { CompositeKey other = (CompositeKey)item; return other.name.equals(name) && other.address.equals(address); } return false; } } @Root private static class BadMap { @ElementMap private Map<CompositeKey, String> map; public BadMap() { this.map = new HashMap<CompositeKey, String>(); } public String getValue(CompositeKey key) { return map.get(key); } public void setValue(CompositeKey key, String value) { map.put(key, value); } } @Root private static class PrimitiveMap { @ElementMap private Map<String, Double> map; public double getValue(String name) { return map.get(name); } } public void testEntryMap() throws Exception { Strategy strategy = new CycleStrategy(); Serializer serializer = new Persister(strategy); EntryMap example = serializer.read(EntryMap.class, ENTRY_MAP); assertEquals("example 1", example.getValue("a")); assertEquals("example 2", example.getValue("b")); assertEquals("example 1", example.getValue("c")); assertEquals("example 1", example.getValue("d")); MapEntry a = example.getEntry("a"); MapEntry b = example.getEntry("b"); MapEntry c = example.getEntry("c"); MapEntry d = example.getEntry("d"); assertTrue(a == c); assertTrue(c == d); assertFalse(a == b); validate(example, serializer); } public void testComplexMap() throws Exception { Strategy strategy = new CycleStrategy(); Serializer serializer = new Persister(strategy); ComplexMap example = serializer.read(ComplexMap.class, COMPLEX_MAP); assertEquals("example 2", example.getValue(new CompositeKey("name 1", "address 1"))); assertEquals("example 2", example.getValue(new CompositeKey("name 3", "address 3"))); assertEquals("example 4", example.getValue(new CompositeKey("name 4", "address 4"))); validate(example, serializer); } public void testPrimitiveMap() throws Exception { Strategy strategy = new CycleStrategy(); Serializer serializer = new Persister(strategy); PrimitiveMap example = serializer.read(PrimitiveMap.class, PRIMITIVE_MAP); assertEquals(1.0, example.getValue("one")); assertEquals(1.0, example.getValue("two")); assertEquals(4.0, example.getValue("three")); validate(example, serializer); } } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/strategy/ClassToNamespaceVisitor.java�������������0000644�0001750�0001750�00000002360�11342530530�032302� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.simpleframework.xml.strategy; import org.simpleframework.xml.core.PersistenceException; import org.simpleframework.xml.stream.InputNode; import org.simpleframework.xml.stream.NodeMap; import org.simpleframework.xml.stream.OutputNode; public class ClassToNamespaceVisitor implements Visitor { public void read(Type field, NodeMap<InputNode> node) throws Exception { String namespace = node.getNode().getReference(); if(namespace != null && namespace.length() > 0) { String type = new PackageParser().revert(namespace).getName(); if(type == null) { throw new PersistenceException("Could not match name %s", namespace); } node.put("class", type); } } public void write(Type field, NodeMap<OutputNode> node) throws Exception { OutputNode value = node.remove("class"); if(value != null) { String type = value.getValue(); String name = new PackageParser().parse(type); if(name == null) { throw new PersistenceException("Could not match class %s", type); } node.getNode().setComment(type); node.getNode().getNamespaces().put(name, "class"); node.getNode().setReference(name); } } }��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/strategy/VisitorStrategyTest.java�����������������0000644�0001750�0001750�00000003615�11342530530�031563� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.simpleframework.xml.strategy; import java.io.StringWriter; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.simpleframework.xml.Default; import org.simpleframework.xml.Root; import org.simpleframework.xml.ValidationTestCase; import org.simpleframework.xml.core.PersistenceException; import org.simpleframework.xml.core.Persister; import org.simpleframework.xml.stream.InputNode; import org.simpleframework.xml.stream.NodeMap; import org.simpleframework.xml.stream.OutputNode; public class VisitorStrategyTest extends ValidationTestCase { @Root @Default private static class VisitorExample { private List<String> items; private Map<String, String> map; public VisitorExample() { this.map = new HashMap<String, String>(); this.items = new ArrayList<String>(); } public void put(String name, String value) { map.put(name, value); } public void add(String value) { items.add(value); } } public void testStrategy() throws Exception { Visitor visitor = new ClassToNamespaceVisitor(); Strategy strategy = new VisitorStrategy(visitor); Persister persister = new Persister(strategy); VisitorExample item = new VisitorExample(); StringWriter writer = new StringWriter(); item.put("1", "ONE"); item.put("2", "TWO"); item.add("A"); item.add("B"); persister.write(item, writer); String text = writer.toString(); System.out.println(text); VisitorExample recover = persister.read(VisitorExample.class, text); assertTrue(recover.map.containsKey("1")); assertTrue(recover.map.containsKey("2")); assertTrue(recover.items.contains("A")); assertTrue(recover.items.contains("B")); validate(recover, persister); } } �������������������������������������������������������������������������������������������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/strategy/TreeStrategyTest.java��������������������0000644�0001750�0001750�00000021510�11342530530�031015� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.simpleframework.xml.strategy; import java.io.StringWriter; import java.util.Collection; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Element; import org.simpleframework.xml.ElementList; import org.simpleframework.xml.Root; import org.simpleframework.xml.ValidationTestCase; import org.simpleframework.xml.core.Persister; import org.simpleframework.xml.filter.Filter; import org.simpleframework.xml.strategy.Strategy; import org.simpleframework.xml.strategy.TreeStrategy; public class TreeStrategyTest extends ValidationTestCase { public static final int ITERATIONS = 10000; public static final int MAXIMUM = 1000; public static final String BASIC_ENTRY = "<?xml version=\"1.0\"?>\n"+ "<root number='1234' flag='true'>\n"+ " <name>{example.name}</name> \n\r"+ " <path>{example.path}</path>\n"+ " <constant>{no.override}</constant>\n"+ " <text>\n"+ " Some example text where {example.name} is replaced\n"+ " with the system property value and the path is\n"+ " replaced with the path {example.path}\n"+ " </text>\n"+ " <child name='first'>\n"+ " <one>this is the first element</one>\n"+ " <two>the second element</two>\n"+ " <three>the third elment</three>\n"+ " <grand-child>\n"+ " <entry-one key='name.1'>\n"+ " <value>value.1</value>\n"+ " </entry-one>\n"+ " <entry-two key='name.2'>\n"+ " <value>value.2</value>\n"+ " </entry-two>\n"+ " </grand-child>\n"+ " </child>\n"+ " <list TYPE='java.util.ArrayList'>\n"+ " <entry key='name.1'>\n"+ " <value>value.1</value>\n"+ " </entry>\n"+ " <entry key='name.2'>\n"+ " <value>value.2</value>\n"+ " </entry>\n"+ " <entry key='name.3'>\n"+ " <value>value.4</value>\n"+ " </entry>\n"+ " <entry key='name.4'>\n"+ " <value>value.4</value>\n"+ " </entry>\n"+ " <entry key='name.5'>\n"+ " <value>value.5</value>\n"+ " </entry>\n"+ " </list>\n"+ "</root>"; public static final String TEMPLATE_ENTRY = "<?xml version=\"1.0\"?>\n"+ "<root number='1234' flag='true'>\n"+ " <name>${example.name}</name> \n\r"+ " <path>${example.path}</path>\n"+ " <constant>${no.override}</constant>\n"+ " <text>\n"+ " Some example text where ${example.name} is replaced\n"+ " with the system property value and the path is \n"+ " replaced with the path ${example.path}\n"+ " </text>\n"+ " <child name='first'>\n"+ " <one>this is the first element</one>\n"+ " <two>the second element</two>\n"+ " <three>the third elment</three>\n"+ " <grand-child>\n"+ " <entry-one key='name.1'>\n"+ " <value>value.1</value>\n"+ " </entry-one>\n"+ " <entry-two key='name.2'>\n"+ " <value>value.2</value>\n"+ " </entry-two>\n"+ " </grand-child>\n"+ " </child>\n"+ " <list TYPE='java.util.ArrayList'>\n"+ " <entry key='name.1'>\n"+ " <value>value.1</value>\n"+ " </entry>\n"+ " <entry key='name.2'>\n"+ " <value>value.2</value>\n"+ " </entry>\n"+ " <entry key='name.3'>\n"+ " <value>value.4</value>\n"+ " </entry>\n"+ " <entry key='name.4'>\n"+ " <value>value.4</value>\n"+ " </entry>\n"+ " <entry key='name.5'>\n"+ " <value>value.5</value>\n"+ " </entry>\n"+ " </list>\n"+ "</root>"; @Root(name="root") public static class RootEntry { @Attribute(name="number") private int number; @Attribute(name="flag") private boolean bool; @Element(name="constant") private String constant; @Element(name="name") private String name; @Element(name="path") private String path; @Element(name="text") private String text; @Element(name="child") private ChildEntry entry; @ElementList(name="list", type=ElementEntry.class) private Collection list; } @Root(name="child") public static class ChildEntry { @Attribute(name="name") private String name; @Element(name="one") private String one; @Element(name="two") private String two; @Element(name="three") private String three; @Element(name="grand-child") private GrandChildEntry grandChild; } @Root(name="grand-child") public static class GrandChildEntry { @Element(name="entry-one") private ElementEntry entryOne; @Element(name="entry-two") private ElementEntry entryTwo; } @Root(name="entry") public static class ElementEntry { @Attribute(name="key") private String name; @Element(name="value") private String value; } private static class EmptyFilter implements Filter { public String replace(String name) { return null; } } static { System.setProperty("example.name", "some name"); System.setProperty("example.path", "/some/path"); System.setProperty("no.override", "some constant"); } private Persister systemSerializer; private Strategy strategy; public void setUp() throws Exception { strategy = new TreeStrategy("TYPE", "LENGTH"); systemSerializer = new Persister(strategy); } public void testBasicDocument() throws Exception { RootEntry entry = (RootEntry)systemSerializer.read(RootEntry.class, BASIC_ENTRY); long start = System.currentTimeMillis(); for(int i = 0; i < ITERATIONS; i++) { systemSerializer.read(RootEntry.class, BASIC_ENTRY); } long duration = System.currentTimeMillis() - start; System.err.printf("Took '%s' ms to process %s documents\n", duration, ITERATIONS); systemSerializer.write(entry, System.out); StringWriter out = new StringWriter(); systemSerializer.write(entry, out); validate(entry, systemSerializer); entry = (RootEntry)systemSerializer.read(RootEntry.class, out.toString()); systemSerializer.write(entry, System.out); } public void testTemplateDocument() throws Exception { RootEntry entry = (RootEntry)systemSerializer.read(RootEntry.class, TEMPLATE_ENTRY); long start = System.currentTimeMillis(); for(int i = 0; i < ITERATIONS; i++) { systemSerializer.read(RootEntry.class, TEMPLATE_ENTRY); } long duration = System.currentTimeMillis() - start; System.err.printf("Took '%s' ms to process %s documents with templates\n", duration, ITERATIONS); systemSerializer.write(entry, System.out); StringWriter out = new StringWriter(); systemSerializer.write(entry, out); validate(entry, systemSerializer); entry = (RootEntry)systemSerializer.read(RootEntry.class, out.toString()); systemSerializer.write(entry, System.out); } public void testEmptyFilter() throws Exception { systemSerializer = new Persister(strategy, new EmptyFilter()); RootEntry entry = (RootEntry)systemSerializer.read(RootEntry.class, TEMPLATE_ENTRY); long start = System.currentTimeMillis(); for(int i = 0; i < ITERATIONS; i++) { systemSerializer.read(RootEntry.class, TEMPLATE_ENTRY); } long duration = System.currentTimeMillis() - start; System.err.printf("Took '%s' ms to process %s documents with an empty filter\n", duration, ITERATIONS); systemSerializer.write(entry, System.out); StringWriter out = new StringWriter(); systemSerializer.write(entry, out); validate(entry, systemSerializer); entry = (RootEntry)systemSerializer.read(RootEntry.class, out.toString()); systemSerializer.write(entry, System.out); } public void testBasicWrite() throws Exception { RootEntry entry = (RootEntry)systemSerializer.read(RootEntry.class, BASIC_ENTRY); long start = System.currentTimeMillis(); entry.constant = ">><<"; // this should be escaped entry.text = "this is text>> some more<<"; // this should be escaped for(int i = 0; i < ITERATIONS; i++) { systemSerializer.write(entry, new StringWriter()); } long duration = System.currentTimeMillis() - start; System.err.printf("Took '%s' ms to write %s documents\n", duration, ITERATIONS); systemSerializer.write(entry, System.out); StringWriter out = new StringWriter(); systemSerializer.write(entry, out); validate(entry, systemSerializer); entry = (RootEntry)systemSerializer.read(RootEntry.class, out.toString()); systemSerializer.write(entry, System.out); } } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/filter/�������������������������������������������0000755�0001750�0001750�00000000000�11344247751�024330� 5����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/filter/StackFilterTest.java�����������������������0000644�0001750�0001750�00000002444�11342530530�030236� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.simpleframework.xml.filter; import java.util.ArrayList; import java.util.List; import junit.framework.TestCase; public class StackFilterTest extends TestCase { public static class ExampleFilter implements Filter { private List<String> list; private String name; public ExampleFilter(List<String> list, String name) { this.list = list; this.name = name; } public String replace(String token) { if(token == name) { list.add(name); return name; } return null; } } public void testFilter() { List<String> list = new ArrayList<String>(); StackFilter filter = new StackFilter(); filter.push(new ExampleFilter(list, "one")); filter.push(new ExampleFilter(list, "two")); filter.push(new ExampleFilter(list, "three")); String one = filter.replace("one"); String two = filter.replace("two"); String three = filter.replace("three"); assertEquals(one, "one"); assertEquals(two, "two"); assertEquals(three, "three"); assertEquals(list.size(), 3); assertEquals(list.get(0), "one"); assertEquals(list.get(1), "two"); assertEquals(list.get(2), "three"); } } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/stream/�������������������������������������������0000755�0001750�0001750�00000000000�11344247751�024336� 5����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/stream/NodeBuilderTest.java�����������������������0000644�0001750�0001750�00000007341�11342530530�030226� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.simpleframework.xml.stream; import java.io.Reader; import java.io.StringReader; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import junit.framework.TestCase; import org.w3c.dom.Document; import org.xml.sax.InputSource; public class NodeBuilderTest extends TestCase { private static final String SOURCE = "<?xml version='1.0'?>\n" + "<root version='2.1' id='234'>\n" + " <list type='sorted'>\n" + " <entry name='1'>\n" + " <value>value 1</value>\n" + " </entry>\n" + " <entry name='2'>\n" + " <value>value 2</value>\n" + " </entry>\n" + " <entry name='3'>\n" + " <value>value 3</value>\n" + " </entry>\n" + " </list>\n" + " <object name='name'>\n" + " <integer>123</integer>\n" + " <object name='key'>\n" + " <integer>12345</integer>\n" + " </object>\n" + " </object>\n" + "</root>"; public void testNodeAdapter() throws Exception { Reader reader = new StringReader(SOURCE); InputNode event = NodeBuilder.read(reader); assertTrue(event.isRoot()); assertEquals("root", event.getName()); assertEquals("2.1", event.getAttribute("version").getValue()); assertEquals("234", event.getAttribute("id").getValue()); NodeMap attrList = event.getAttributes(); assertEquals("2.1", attrList.get("version").getValue()); assertEquals("234", attrList.get("id").getValue()); InputNode list = event.getNext(); assertFalse(list.isRoot()); assertEquals("list", list.getName()); assertEquals("sorted", list.getAttribute("type").getValue()); InputNode entry = list.getNext(); InputNode value = list.getNext(); // same as entry.getNext() assertEquals("entry", entry.getName()); assertEquals("1", entry.getAttribute("name").getValue()); assertEquals("value", value.getName()); assertEquals("value 1", value.getValue()); assertEquals(null, value.getAttribute("name")); assertEquals(null, entry.getNext()); assertEquals(null, value.getNext()); entry = list.getNext(); value = entry.getNext(); // same as list.getNext() assertEquals("entry", entry.getName()); assertEquals("2", entry.getAttribute("name").getValue()); assertEquals("value", value.getName()); assertEquals("value 2", value.getValue()); assertEquals(null, value.getAttribute("name")); assertEquals(null, entry.getNext()); entry = list.getNext(); value = entry.getNext(); // same as list.getNext() assertEquals("entry", entry.getName()); assertEquals("3", entry.getAttribute("name").getValue()); assertEquals("value", value.getName()); assertEquals("value 3", value.getValue()); assertEquals(null, value.getAttribute("name")); assertEquals(null, entry.getNext()); assertEquals(null, list.getNext()); InputNode object = event.getNext(); InputNode integer = event.getNext(); // same as object.getNext() assertEquals("object", object.getName()); assertEquals("name", object.getAttribute("name").getValue()); assertEquals("integer", integer.getName()); assertEquals("123", integer.getValue()); object = object.getNext(); // same as event.getNext() integer = object.getNext(); assertEquals("object", object.getName()); assertEquals("key", object.getAttribute("name").getValue()); assertEquals("integer", integer.getName()); assertEquals("12345", integer.getValue()); } } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/stream/StrategyTest.java��������������������������0000644�0001750�0001750�00000003317�11342530527�027641� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.simpleframework.xml.stream; import junit.framework.TestCase; public class StrategyTest extends TestCase { public void testHyphenStrategy() { Style strategy = new HyphenStyle(); System.err.println(strategy.getElement("Base64Encoder")); System.err.println(strategy.getElement("Base64_Encoder")); System.err.println(strategy.getElement("Base64___encoder")); System.err.println(strategy.getElement("base64--encoder")); System.err.println(strategy.getElement("Base64encoder")); System.err.println(strategy.getElement("_Base64encoder")); System.err.println(strategy.getElement("__Base64encoder")); System.err.println(strategy.getElement("URLList")); System.err.println(strategy.getElement("__Base64encoder")); System.err.println(strategy.getElement("Base_64_Encoder")); System.err.println(strategy.getElement("base_64_encoder")); } public void testCamelCaseStrategy() { Style strategy = new CamelCaseStyle(); System.err.println(strategy.getElement("Base64Encoder")); System.err.println(strategy.getElement("Base64_Encoder")); System.err.println(strategy.getElement("Base64___encoder")); System.err.println(strategy.getElement("base64--encoder")); System.err.println(strategy.getElement("Base64encoder")); System.err.println(strategy.getElement("_Base64encoder")); System.err.println(strategy.getElement("__Base64encoder")); System.err.println(strategy.getElement("URLList")); System.err.println(strategy.getElement("__Base64encoder")); System.err.println(strategy.getElement("Base_64_Encoder")); System.err.println(strategy.getElement("base_64_encoder")); } } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/stream/NamespaceAttributeTest.java����������������0000644�0001750�0001750�00000003403�11342530527�031613� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.simpleframework.xml.stream; import java.io.StringReader; import junit.framework.TestCase; public class NamespaceAttributeTest extends TestCase { private static final String SOURCE = "<root xmlns='default' xmlns:a='A' xmlns:b='B'>" + " <child a:attributeA='valueA' b:attributeB='valueB'>"+ " <leaf b:attributeC='c'/>"+ " </child>+" + " <a:entry b:attributeD='valueD'/>"+ "</root>"; public void testAttributes() throws Exception { InputNode root = NodeBuilder.read(new StringReader(SOURCE)); InputNode child = root.getNext(); NodeMap<InputNode> map = child.getAttributes(); assertEquals(root.getReference(), "default"); assertEquals(child.getReference(), "default"); assertEquals(map.get("attributeA").getValue(), "valueA"); assertEquals(map.get("attributeA").getPrefix(), "a"); assertEquals(map.get("attributeA").getReference(), "A"); assertEquals(map.get("attributeB").getValue(), "valueB"); assertEquals(map.get("attributeB").getPrefix(), "b"); assertEquals(map.get("attributeB").getReference(), "B"); InputNode leaf = child.getNext(); assertEquals(leaf.getReference(), "default"); assertEquals(leaf.getAttribute("attributeC").getValue(), "c"); assertEquals(leaf.getAttribute("attributeC").getPrefix(), "b"); assertEquals(leaf.getAttribute("attributeC").getReference(), "B"); InputNode entry = root.getNext(); assertEquals(entry.getReference(), "A"); assertEquals(entry.getAttribute("attributeD").getValue(), "valueD"); assertEquals(entry.getAttribute("attributeD").getPrefix(), "b"); assertEquals(entry.getAttribute("attributeD").getReference(), "B"); } } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/stream/NodeReaderTest.java������������������������0000644�0001750�0001750�00000020614�11342530530�030040� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� package org.simpleframework.xml.stream; import junit.framework.TestCase; import java.io.StringReader; import org.simpleframework.xml.stream.InputNode; import org.simpleframework.xml.stream.NodeBuilder; import org.simpleframework.xml.stream.NodeMap; public class NodeReaderTest extends TestCase { private static final String SMALL_SOURCE = "<?xml version=\"1.0\"?>\n"+ "<override id='12' flag='true'>\n"+ " <text>entry text</text> \n\r"+ " <name>some name</name> \n"+ " <third>added to schema</third>\n"+ "</override>"; private static final String LARGE_SOURCE = "<?xml version='1.0'?>\n" + "<root version='2.1' id='234'>\n" + " <list type='sorted'>\n" + " <entry name='1'>\n" + " <value>value 1</value>\n" + " </entry>\n" + " <entry name='2'>\n" + " <value>value 2</value>\n" + " </entry>\n" + " <entry name='3'>\n" + " <value>value 3</value>\n" + " </entry>\n" + " </list>\n" + " <object name='name'>\n" + " <integer>123</integer>\n" + " <object name='key'>\n" + " <integer>12345</integer>\n" + " </object>\n" + " </object>\n" + "</root>"; public static final String EMPTY_SOURCE = "<root>\r\n" + " <empty/>\r\n" + " <notEmpty name='foo'/>\r\n" + " <empty></empty>\r\n" + "</root>"; public void testEmptySource() throws Exception { InputNode event = NodeBuilder.read(new StringReader(EMPTY_SOURCE)); assertTrue(event.isRoot()); assertFalse(event.isEmpty()); assertEquals("root", event.getName()); InputNode child = event.getNext(); assertTrue(child.isEmpty()); assertEquals("empty", child.getName()); child = event.getNext(); assertFalse(child.isEmpty()); assertEquals("notEmpty", child.getName()); assertEquals("foo", child.getAttribute("name").getValue()); child = event.getNext(); assertTrue(child.isEmpty()); assertEquals("empty", child.getName()); } public void testSmallSource() throws Exception { InputNode event = NodeBuilder.read(new StringReader(SMALL_SOURCE)); assertTrue(event.isRoot()); assertEquals("override", event.getName()); assertEquals("12", event.getAttribute("id").getValue()); assertEquals("true", event.getAttribute("flag").getValue()); NodeMap list = event.getAttributes(); assertEquals("12", list.get("id").getValue()); assertEquals("true", list.get("flag").getValue()); InputNode text = event.getNext(); assertFalse(text.isRoot()); assertTrue(event.isRoot()); assertEquals("text", text.getName()); assertEquals("entry text", text.getValue()); assertEquals(null, text.getNext()); InputNode name = event.getNext(); assertFalse(name.isRoot()); assertEquals("name", name.getName()); assertEquals("some name", name.getValue()); assertEquals(null, name.getNext()); assertEquals(null, text.getNext()); InputNode third = event.getNext(); assertTrue(event.isRoot()); assertFalse(third.isRoot()); assertEquals("third", third.getName()); assertEquals("text", text.getName()); assertEquals(null, text.getNext()); assertEquals("added to schema", third.getValue()); assertEquals(null, event.getNext()); } public void testLargeSource() throws Exception { InputNode event = NodeBuilder.read(new StringReader(LARGE_SOURCE)); assertTrue(event.isRoot()); assertEquals("root", event.getName()); assertEquals("2.1", event.getAttribute("version").getValue()); assertEquals("234", event.getAttribute("id").getValue()); NodeMap attrList = event.getAttributes(); assertEquals("2.1", attrList.get("version").getValue()); assertEquals("234", attrList.get("id").getValue()); InputNode list = event.getNext(); assertFalse(list.isRoot()); assertEquals("list", list.getName()); assertEquals("sorted", list.getAttribute("type").getValue()); InputNode entry = list.getNext(); InputNode value = list.getNext(); // same as entry.getNext() assertEquals("entry", entry.getName()); assertEquals("1", entry.getAttribute("name").getValue()); assertEquals("value", value.getName()); assertEquals("value 1", value.getValue()); assertEquals(null, value.getAttribute("name")); assertEquals(null, entry.getNext()); assertEquals(null, value.getNext()); entry = list.getNext(); value = entry.getNext(); // same as list.getNext() assertEquals("entry", entry.getName()); assertEquals("2", entry.getAttribute("name").getValue()); assertEquals("value", value.getName()); assertEquals("value 2", value.getValue()); assertEquals(null, value.getAttribute("name")); assertEquals(null, entry.getNext()); entry = list.getNext(); value = entry.getNext(); // same as list.getNext() assertEquals("entry", entry.getName()); assertEquals("3", entry.getAttribute("name").getValue()); assertEquals("value", value.getName()); assertEquals("value 3", value.getValue()); assertEquals(null, value.getAttribute("name")); assertEquals(null, entry.getNext()); assertEquals(null, list.getNext()); InputNode object = event.getNext(); InputNode integer = event.getNext(); // same as object.getNext() assertEquals("object", object.getName()); assertEquals("name", object.getAttribute("name").getValue()); assertEquals("integer", integer.getName()); assertEquals("123", integer.getValue()); object = object.getNext(); // same as event.getNext() integer = object.getNext(); assertEquals("object", object.getName()); assertEquals("key", object.getAttribute("name").getValue()); assertEquals("integer", integer.getName()); assertEquals("12345", integer.getValue()); } public void testSkip() throws Exception { InputNode event = NodeBuilder.read(new StringReader(LARGE_SOURCE)); assertTrue(event.isRoot()); assertEquals("root", event.getName()); assertEquals("2.1", event.getAttribute("version").getValue()); assertEquals("234", event.getAttribute("id").getValue()); NodeMap attrList = event.getAttributes(); assertEquals("2.1", attrList.get("version").getValue()); assertEquals("234", attrList.get("id").getValue()); InputNode list = event.getNext(); assertFalse(list.isRoot()); assertEquals("list", list.getName()); assertEquals("sorted", list.getAttribute("type").getValue()); InputNode entry = list.getNext(); InputNode value = list.getNext(); // same as entry.getNext() assertEquals("entry", entry.getName()); assertEquals("1", entry.getAttribute("name").getValue()); assertEquals("value", value.getName()); assertEquals("value 1", value.getValue()); assertEquals(null, value.getAttribute("name")); assertEquals(null, entry.getNext()); assertEquals(null, value.getNext()); entry = list.getNext(); entry.skip(); assertEquals(entry.getNext(), null); entry = list.getNext(); value = entry.getNext(); // same as list.getNext() assertEquals("entry", entry.getName()); assertEquals("3", entry.getAttribute("name").getValue()); assertEquals("value", value.getName()); assertEquals("value 3", value.getValue()); assertEquals(null, value.getAttribute("name")); assertEquals(null, entry.getNext()); assertEquals(null, list.getNext()); InputNode object = event.getNext(); InputNode integer = event.getNext(); // same as object.getNext() assertEquals("object", object.getName()); assertEquals("name", object.getAttribute("name").getValue()); assertEquals("integer", integer.getName()); assertEquals("123", integer.getValue()); object = object.getNext(); // same as event.getNext() integer = object.getNext(); assertEquals("object", object.getName()); assertEquals("key", object.getAttribute("name").getValue()); assertEquals("integer", integer.getName()); assertEquals("12345", integer.getValue()); } } ��������������������������������������������������������������������������������������������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/stream/DocumentProviderTest.java������������������0000644�0001750�0001750�00000003730�11342530530�031321� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.simpleframework.xml.stream; import java.io.StringReader; import org.simpleframework.xml.ValidationTestCase; public class DocumentProviderTest extends ValidationTestCase { private static final String SOURCE = "<root name='top'>\n"+ " <!-- child node -->\n"+ " <child a='A' b='B'>\n"+ " <leaf>leaf node</leaf>\n"+ " </child>\n"+ "</root>"; public void testReader() throws Exception { Provider provider = new DocumentProvider(); StringReader source = new StringReader(SOURCE); EventReader reader = provider.provide(source); assertEquals(reader.peek().getName(), "root"); assertEquals(reader.next().getName(), "root"); assertTrue(reader.peek().isText()); assertTrue(reader.next().isText()); while(reader.peek().isText()) { assertTrue(reader.next().isText()); // remove text from the document } assertEquals(reader.peek().getName(), "child"); assertEquals(reader.next().getName(), "child"); assertTrue(reader.peek().isText()); assertTrue(reader.next().isText()); while(reader.peek().isText()) { assertTrue(reader.next().isText()); // remove text from the document } assertEquals(reader.peek().getName(), "leaf"); assertEquals(reader.next().getName(), "leaf"); assertTrue(reader.peek().isText()); assertEquals(reader.peek().getValue(), "leaf node"); assertEquals(reader.next().getValue(), "leaf node"); assertTrue(reader.next().isEnd()); while(reader.peek().isText()) { assertTrue(reader.next().isText()); // remove text from the document } assertTrue(reader.next().isEnd()); while(reader.peek().isText()) { assertTrue(reader.next().isText()); // remove text from the document } } } ����������������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/stream/StyleTest.java�����������������������������0000644�0001750�0001750�00000003306�11342530530�027127� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.simpleframework.xml.stream; import junit.framework.TestCase; public class StyleTest extends TestCase { public void testHyphenStyle() { Style strategy = new HyphenStyle(); System.err.println(strategy.getElement("Base64Encoder")); System.err.println(strategy.getElement("Base64_Encoder")); System.err.println(strategy.getElement("Base64___encoder")); System.err.println(strategy.getElement("base64--encoder")); System.err.println(strategy.getElement("Base64encoder")); System.err.println(strategy.getElement("_Base64encoder")); System.err.println(strategy.getElement("__Base64encoder")); System.err.println(strategy.getElement("URLList")); System.err.println(strategy.getElement("__Base64encoder")); System.err.println(strategy.getElement("Base_64_Encoder")); System.err.println(strategy.getElement("base_64_encoder")); } public void testCamelCaseStyle() { Style strategy = new CamelCaseStyle(); System.err.println(strategy.getElement("Base64Encoder")); System.err.println(strategy.getElement("Base64_Encoder")); System.err.println(strategy.getElement("Base64___encoder")); System.err.println(strategy.getElement("base64--encoder")); System.err.println(strategy.getElement("Base64encoder")); System.err.println(strategy.getElement("_Base64encoder")); System.err.println(strategy.getElement("__Base64encoder")); System.err.println(strategy.getElement("URLList")); System.err.println(strategy.getElement("__Base64encoder")); System.err.println(strategy.getElement("Base_64_Encoder")); System.err.println(strategy.getElement("base_64_encoder")); } } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/stream/NamespaceMapTest.java����������������������0000644�0001750�0001750�00000006654�11342530527�030400� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.simpleframework.xml.stream; import java.io.StringReader; import java.io.StringWriter; import org.simpleframework.xml.ValidationTestCase; public class NamespaceMapTest extends ValidationTestCase { private static final String SOURCE = "<root a:name='value' xmlns:a='http://www.domain.com/a'>\n" + " <a:child>this is the child</a:child>\n" + "</root>"; public void testInputNode() throws Exception { StringReader reader = new StringReader(SOURCE); InputNode node = NodeBuilder.read(reader); NodeMap<InputNode> map = node.getAttributes(); InputNode attr = map.get("name"); assertEquals("value", attr.getValue()); assertEquals("a", attr.getPrefix()); assertEquals("http://www.domain.com/a", attr.getReference()); InputNode child = node.getNext(); assertEquals("this is the child", child.getValue()); assertEquals("a", child.getPrefix()); assertEquals("http://www.domain.com/a", child.getReference()); } public void testOutputNode() throws Exception { StringWriter out = new StringWriter(); OutputNode top = NodeBuilder.write(out); OutputNode root = top.getChild("root"); NamespaceMap map = root.getNamespaces(); root.setReference("http://www.sun.com/jsp"); map.put("http://www.w3c.com/xhtml", "xhtml"); map.put("http://www.sun.com/jsp", "jsp"); OutputNode child = root.getChild("child"); child.setAttribute("name.1", "1"); child.setAttribute("name.2", "2"); OutputNode attribute = child.getAttributes().get("name.1"); attribute.setReference("http://www.w3c.com/xhtml"); OutputNode otherChild = root.getChild("otherChild"); otherChild.setAttribute("name.a", "a"); otherChild.setAttribute("name.b", "b"); map = otherChild.getNamespaces(); map.put("http://www.w3c.com/xhtml", "ignore"); OutputNode yetAnotherChild = otherChild.getChild("yetAnotherChild"); yetAnotherChild.setReference("http://www.w3c.com/xhtml"); yetAnotherChild.setValue("example text for yet another namespace"); OutputNode finalChild = otherChild.getChild("finalChild"); map = finalChild.getNamespaces(); map.put("http://www.w3c.com/anonymous"); finalChild.setReference("http://www.w3c.com/anonymous"); OutputNode veryLastChild = finalChild.getChild("veryLastChild"); map = veryLastChild.getNamespaces(); map.put(""); OutputNode veryVeryLastChild = veryLastChild.getChild("veryVeryLastChild"); map = veryVeryLastChild.getNamespaces(); map.put(""); veryVeryLastChild.setReference(""); veryVeryLastChild.setValue("very very last child"); OutputNode otherVeryVeryLastChild = veryLastChild.getChild("otherVeryVeryLastChild"); // Problem here with anonymous namespace otherVeryVeryLastChild.setReference("http://www.w3c.com/anonymous"); otherVeryVeryLastChild.setValue("other very very last child"); OutputNode yetAnotherVeryVeryLastChild = veryLastChild.getChild("yetAnotherVeryVeryLastChild"); yetAnotherVeryVeryLastChild.setReference("http://www.w3c.com/xhtml"); yetAnotherVeryVeryLastChild.setValue("yet another very very last child"); root.commit(); validate(out.toString()); } } ������������������������������������������������������������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/stream/PrefixResolverTest.java��������������������0000644�0001750�0001750�00000001677�11342530530�031017� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.simpleframework.xml.stream; import java.io.StringWriter; import org.simpleframework.xml.ValidationTestCase; public class PrefixResolverTest extends ValidationTestCase { public void testPrefixResolver() throws Exception { StringWriter writer = new StringWriter(); OutputNode node = NodeBuilder.write(writer); // <root xmlns="ns1"> OutputNode root = node.getChild("root"); root.setReference("ns1"); root.getNamespaces().put("ns1", "n"); // <child xmlns="ns2"> OutputNode child = root.getChild("child"); child.setReference("ns2"); child.getNamespaces().put("ns2", "n"); // <grandchild xmlns="ns1"> OutputNode grandchild = child.getChild("grandchild"); grandchild.setReference("ns1"); grandchild.getNamespaces().put("ns1", "n"); root.commit(); String text = writer.toString(); System.out.println(text); } } �����������������������������������������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/stream/NodeWriterTest.java������������������������0000644�0001750�0001750�00000011004�11342530530�030103� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.simpleframework.xml.stream; import java.io.StringWriter; import org.simpleframework.xml.ValidationTestCase; public class NodeWriterTest extends ValidationTestCase { public void testEarlyCommit() throws Exception { StringWriter out = new StringWriter(); OutputNode root = NodeBuilder.write(out); boolean failure = false; try { root.commit(); }catch(Exception e) { e.printStackTrace(); failure = true; } assertTrue("Early commit should fail", failure); } public void testBasicWrite() throws Exception { StringWriter out = new StringWriter(); OutputNode root = NodeBuilder.write(out).getChild("root"); assertTrue(root.isRoot()); assertEquals("root", root.getName()); root.setAttribute("id", "test"); root.setAttribute("name", "testRoot"); assertEquals("test", root.getAttributes().get("id").getValue()); assertEquals("testRoot", root.getAttributes().get("name").getValue()); OutputNode childOfRoot = root.getChild("child-of-root"); childOfRoot.setAttribute("name", "child of root"); assertFalse(childOfRoot.isRoot()); assertEquals("child-of-root", childOfRoot.getName()); assertEquals("child of root", childOfRoot.getAttributes().get("name").getValue()); OutputNode childOfChildOfRoot = childOfRoot.getChild("child-of-child-of-root"); childOfChildOfRoot.setValue("I am a child of the child-of-root element and a grand child of the root element"); assertFalse(childOfChildOfRoot.isRoot()); assertEquals("child-of-child-of-root", childOfChildOfRoot.getName()); OutputNode anotherChildOfRoot = root.getChild("another-child-of-root"); anotherChildOfRoot.setAttribute("id", "yet another child of root"); anotherChildOfRoot.setValue("I am a sibling to child-of-root"); assertFalse(anotherChildOfRoot.isRoot()); assertEquals("another-child-of-root", anotherChildOfRoot.getName()); OutputNode finalChildOfRoot = root.getChild("final-child-of-root"); finalChildOfRoot.setValue("this element is a child of root"); assertFalse(finalChildOfRoot.isRoot()); assertTrue(root.isRoot()); root.commit(); validate(out.toString()); } public void testWrite() throws Exception { StringWriter out = new StringWriter(); OutputNode root = NodeBuilder.write(out).getChild("root"); root.setAttribute("version", "1.0"); assertTrue(root.isRoot()); assertEquals("root", root.getName()); OutputNode firstChild = root.getChild("first-child"); firstChild.setAttribute("key", "1"); firstChild.setValue("some value for first child"); assertFalse(firstChild.isRoot()); assertEquals("1", firstChild.getAttributes().get("key").getValue()); OutputNode secondChild = root.getChild("second-child"); secondChild.setAttribute("key", "2"); secondChild.setValue("some value for second child"); assertTrue(root.isRoot()); assertFalse(secondChild.isRoot()); assertEquals(firstChild.getChild("test"), null); OutputNode test = secondChild.getChild("test"); test.setValue("test value"); assertEquals(test.getName(), "test"); assertEquals(test.getValue(), "test value"); secondChild.commit(); assertEquals(secondChild.getChild("example"), null); OutputNode thirdChild = root.getChild("third-child"); thirdChild.setAttribute("key", "3"); thirdChild.setAttribute("name", "three"); assertEquals(thirdChild.getAttributes().get("key").getValue(), "3"); assertEquals(thirdChild.getAttributes().get("name").getValue(), "three"); thirdChild.commit(); assertEquals(thirdChild.getChild("foo"), null); assertEquals(thirdChild.getChild("bar"), null); OutputNode fourthChild = root.getChild("fourth-child"); fourthChild.setAttribute("key", "4"); fourthChild.setAttribute("name", "four"); OutputNode fourthChildChild = fourthChild.getChild("fourth-child-child"); fourthChildChild.setAttribute("name", "foobar"); fourthChildChild.setValue("some text for grand-child"); fourthChild.commit(); assertTrue(fourthChildChild.isCommitted()); assertTrue(fourthChild.isCommitted()); assertEquals(fourthChildChild.getChild("blah"), null); assertEquals(fourthChild.getChild("example"), null); root.commit(); validate(out.toString()); } } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������simple-xml-2.3.2/test/src/org/simpleframework/xml/stream/NamespaceScopeTest.java��������������������0000644�0001750�0001750�00000007345�11342530530�030724� 0����������������������������������������������������������������������������������������������������ustar �sylvestre�����������������������sylvestre��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������package org.simpleframework.xml.stream; import java.io.StringReader; import org.simpleframework.xml.ValidationTestCase; public class NamespaceScopeTest extends ValidationTestCase { private static final String EMPTY_OVERRIDE = "<root xmlns='http://www.default.com/'>\n"+ // http://www.default.com/ "<entry xmlns=''>\n"+ "<p:book xmlns:p='http://www.example.com/book'>\n"+ // http://www.example.com/book "<author>saurabh</author>\n"+ // empty "<p:title>simple xml</p:title>\n"+ // http://www.example.com/book "<p:isbn>ISB-16728-10</p:isbn>\n"+ // http://www.example.com/book "</p:book>\n"+ "</entry>\n"+ "</root>"; private static final String DEFAULT_FIRST = "<root xmlns='http://www.default.com/'>\n"+ // http://www.default.com/ "<p:book xmlns:p='http://www.example.com/book'>\n"+ // http://www.example.com/book "<author>saurabh</author>\n"+ // http://www.default.com/ "<title>simple xml\n"+ // http://www.default.com/ "ISB-16728-10\n"+ // http://www.default.com/ "\n"+ ""; public void testEmptyOverride() throws Exception { InputNode node = NodeBuilder.read(new StringReader(EMPTY_OVERRIDE)); String reference = node.getReference(); String prefix = node.getPrefix(); assertTrue(isEmpty(prefix)); assertEquals(reference, "http://www.default.com/"); node = node.getNext("entry"); reference = node.getReference(); prefix = node.getPrefix(); assertTrue(isEmpty(prefix)); assertTrue(isEmpty(reference)); node = node.getNext("book"); reference = node.getReference(); prefix = node.getPrefix(); assertEquals(prefix, "p"); assertEquals(reference, "http://www.example.com/book"); InputNode author = node.getNext("author"); reference = author.getReference(); prefix = author.getPrefix(); assertTrue(isEmpty(prefix)); assertTrue(isEmpty(reference)); InputNode title = node.getNext("title"); reference = title.getReference(); prefix = title.getPrefix(); assertEquals(prefix, "p"); assertEquals(reference, "http://www.example.com/book"); InputNode isbn = node.getNext("isbn"); reference = isbn.getReference(); prefix = isbn.getPrefix(); assertEquals(prefix, "p"); assertEquals(reference, "http://www.example.com/book"); } public void testDefaultFirst() throws Exception { InputNode node = NodeBuilder.read(new StringReader(DEFAULT_FIRST)); String reference = node.getReference(); String prefix = node.getPrefix(); assertTrue(isEmpty(prefix)); assertEquals(reference, "http://www.default.com/"); node = node.getNext("book"); reference = node.getReference(); prefix = node.getPrefix(); assertEquals(prefix, "p"); assertEquals(reference, "http://www.example.com/book"); InputNode author = node.getNext("author"); reference = author.getReference(); prefix = author.getPrefix(); assertTrue(isEmpty(prefix)); assertEquals(reference, "http://www.default.com/"); InputNode title = node.getNext("title"); reference = title.getReference(); prefix = title.getPrefix(); assertTrue(isEmpty(prefix)); assertEquals(reference, "http://www.default.com/"); InputNode isbn = node.getNext("isbn"); reference = isbn.getReference(); prefix = isbn.getPrefix(); assertTrue(isEmpty(prefix)); assertEquals(reference, "http://www.default.com/"); } private boolean isEmpty(String name) { return name == null || name.equals(""); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/convert/0000755000175000017500000000000011344247751024523 5ustar sylvestresylvestresimple-xml-2.3.2/test/src/org/simpleframework/xml/convert/AnnotationCycleStrategyTest.java0000644000175000017500000001003211342530530033023 0ustar sylvestresylvestrepackage org.simpleframework.xml.convert; import java.io.StringWriter; import java.util.ArrayList; import java.util.List; import org.simpleframework.xml.Element; import org.simpleframework.xml.ElementList; import org.simpleframework.xml.Root; import org.simpleframework.xml.ValidationTestCase; import org.simpleframework.xml.convert.ExampleConverters.Entry; import org.simpleframework.xml.convert.ExampleConverters.OtherEntryConverter; import org.simpleframework.xml.core.Persister; import org.simpleframework.xml.strategy.CycleStrategy; public class AnnotationCycleStrategyTest extends ValidationTestCase { @Root public static class EntryListExample { @ElementList(inline=true) private List list = new ArrayList(); @Element @Convert(OtherEntryConverter.class) private Entry primary; public Entry getPrimary() { return primary; } public void setPrimary(Entry primary) { this.primary = primary; } public void addEntry(Entry entry){ list.add(entry); } public List getEntries(){ return list; } } public void testCycle() throws Exception { CycleStrategy inner = new CycleStrategy(); AnnotationStrategy strategy = new AnnotationStrategy(inner); Persister persister = new Persister(strategy); EntryListExample list = new EntryListExample(); StringWriter writer = new StringWriter(); Entry a = new Entry("A", "a"); Entry b = new Entry("B", "b"); Entry c = new Entry("C", "c"); Entry primary = new Entry("PRIMARY", "primary"); list.setPrimary(primary); list.addEntry(a); list.addEntry(b); list.addEntry(c); list.addEntry(b); list.addEntry(c); persister.write(list, writer); persister.write(list, System.out); String text = writer.toString(); EntryListExample copy = persister.read(EntryListExample.class, text); assertEquals(copy.getEntries().get(0), list.getEntries().get(0)); assertEquals(copy.getEntries().get(1), list.getEntries().get(1)); assertEquals(copy.getEntries().get(2), list.getEntries().get(2)); assertEquals(copy.getEntries().get(3), list.getEntries().get(3)); assertEquals(copy.getEntries().get(4), list.getEntries().get(4)); assertTrue(copy.getEntries().get(2) == copy.getEntries().get(4)); // cycle assertTrue(copy.getEntries().get(1) == copy.getEntries().get(3)); // cycle assertElementExists(text, "/entryListExample"); assertElementExists(text, "/entryListExample/entry[0]"); assertElementExists(text, "/entryListExample/entry[0]/name"); assertElementExists(text, "/entryListExample/entry[0]/value"); assertElementHasValue(text, "/entryListExample/entry[0]/name", "A"); assertElementHasValue(text, "/entryListExample/entry[0]/value", "a"); assertElementExists(text, "/entryListExample/entry[1]/name"); assertElementExists(text, "/entryListExample/entry[1]/value"); assertElementHasValue(text, "/entryListExample/entry[1]/name", "B"); assertElementHasValue(text, "/entryListExample/entry[1]/value", "b"); assertElementExists(text, "/entryListExample/entry[2]/name"); assertElementExists(text, "/entryListExample/entry[2]/value"); assertElementHasValue(text, "/entryListExample/entry[2]/name", "C"); assertElementHasValue(text, "/entryListExample/entry[2]/value", "c"); assertElementExists(text, "/entryListExample/entry[3]"); assertElementExists(text, "/entryListExample/entry[4]"); assertElementHasAttribute(text, "/entryListExample/entry[3]", "reference", "2"); // cycle assertElementHasAttribute(text, "/entryListExample/entry[4]", "reference", "3"); // cycle assertElementExists(text, "/entryListExample/primary"); assertElementHasAttribute(text, "/entryListExample/primary", "name", "PRIMARY"); // other converter assertElementHasAttribute(text, "/entryListExample/primary", "value", "primary"); // other converter } } simple-xml-2.3.2/test/src/org/simpleframework/xml/convert/AnnotationStrategyTest.java0000644000175000017500000001001711342530530032046 0ustar sylvestresylvestrepackage org.simpleframework.xml.convert; import java.io.StringWriter; import java.util.List; import java.util.Vector; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Element; import org.simpleframework.xml.ElementList; import org.simpleframework.xml.Namespace; import org.simpleframework.xml.Root; import org.simpleframework.xml.Serializer; import org.simpleframework.xml.Text; import org.simpleframework.xml.ValidationTestCase; import org.simpleframework.xml.convert.ExampleConverters.Chicken; import org.simpleframework.xml.convert.ExampleConverters.ChickenConverter; import org.simpleframework.xml.convert.ExampleConverters.Cow; import org.simpleframework.xml.convert.ExampleConverters.CowConverter; import org.simpleframework.xml.core.Persister; import org.simpleframework.xml.strategy.Strategy; public class AnnotationStrategyTest extends ValidationTestCase { private static final String SOURCE = ""+ " "+ " "+ " Old McDonald"+ " "+ ""; @Root private static class Farmer { @Text @Namespace(prefix="man", reference="http://www.domain/com/man") private String name; @Attribute private int age; public Farmer() { super(); } public Farmer(String name, int age) { this.name = name; this.age = age; } } @Root private static class FarmExample { @Element @Namespace(prefix="c", reference="http://www.domain.com/test") @Convert(ChickenConverter.class) private Chicken chicken; @Element @Convert(CowConverter.class) private Cow cow; @Element private Farmer farmer; @ElementList(inline=true, entry="time") @Namespace(prefix="l", reference="http://www.domain.com/list") private List list = new Vector(); public FarmExample(@Element(name="chicken") Chicken chicken, @Element(name="cow") Cow cow) { this.farmer = new Farmer("Old McDonald", 80); this.chicken = chicken; this.cow = cow; } public List getTime() { return list; } public Chicken getChicken() { return chicken; } public Cow getCow() { return cow; } } public void testAnnotationStrategy() throws Exception { Strategy strategy = new AnnotationStrategy(); Serializer serializer = new Persister(strategy); StringWriter writer = new StringWriter(); FarmExample example = serializer.read(FarmExample.class, SOURCE); example.getTime().add(10); example.getTime().add(11); example.getTime().add(12); assertEquals(example.getCow().getName(), "Bull"); assertEquals(example.getCow().getAge(), 4); assertEquals(example.getCow().getLegs(), 4); assertEquals(example.getChicken().getName(), "Hen"); assertEquals(example.getChicken().getAge(), 1); assertEquals(example.getChicken().getLegs(), 2); serializer.write(example, System.out); serializer.write(example, writer); String text = writer.toString(); assertElementExists(text, "/farmExample/chicken"); assertElementExists(text, "/farmExample/cow"); assertElementHasNamespace(text, "/farmExample/chicken", "http://www.domain.com/test"); assertElementDoesNotHaveNamespace(text, "/farmExample/cow", "http://www.domain.com/test"); assertElementHasAttribute(text, "/farmExample/chicken", "name", "Hen"); assertElementHasAttribute(text, "/farmExample/chicken", "age", "1"); assertElementHasAttribute(text, "/farmExample/chicken", "legs", "2"); assertElementHasAttribute(text, "/farmExample/cow", "name", "Bull"); assertElementHasAttribute(text, "/farmExample/cow", "age", "4"); assertElementHasAttribute(text, "/farmExample/cow", "legs", "4"); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/convert/ScannerBuilderTest.java0000644000175000017500000000261711342530530031120 0ustar sylvestresylvestrepackage org.simpleframework.xml.convert; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import junit.framework.TestCase; public class ScannerBuilderTest extends TestCase { @Retention(RetentionPolicy.RUNTIME) public static @interface One{} @Retention(RetentionPolicy.RUNTIME) public static @interface Two{} @Retention(RetentionPolicy.RUNTIME) public static @interface Three{} @Retention(RetentionPolicy.RUNTIME) public static @interface Four{} @One @Two public class Base {} @Three @Four public class Extended extends Base{} public void testScannerBuilder() throws Exception { ScannerBuilder builder = new ScannerBuilder(); Scanner scanner = builder.build(Extended.class); assertNull(scanner.scan(Convert.class)); assertNotNull(scanner.scan(One.class)); assertNotNull(scanner.scan(Two.class)); assertNotNull(scanner.scan(Three.class)); assertNotNull(scanner.scan(Four.class)); assertEquals(scanner.scan(Convert.class), null); assertTrue(One.class.isAssignableFrom(scanner.scan(One.class).getClass())); assertTrue(Two.class.isAssignableFrom(scanner.scan(Two.class).getClass())); assertTrue(Three.class.isAssignableFrom(scanner.scan(Three.class).getClass())); assertTrue(Four.class.isAssignableFrom(scanner.scan(Four.class).getClass())); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/convert/ConverterFactoryTest.java0000644000175000017500000000222011342530530031505 0ustar sylvestresylvestrepackage org.simpleframework.xml.convert; import org.simpleframework.xml.stream.InputNode; import org.simpleframework.xml.stream.OutputNode; import junit.framework.TestCase; public class ConverterFactoryTest extends TestCase { private static class A implements Converter { public Object read(InputNode node) { return null; } public void write(OutputNode node, Object value) { return; } } private static class B extends A {} private static class C extends A {} public void testFactory() throws Exception { ConverterFactory factory = new ConverterFactory(); Converter a1 = factory.getInstance(A.class); Converter b1 = factory.getInstance(B.class); Converter c1 = factory.getInstance(C.class); Converter a2 = factory.getInstance(A.class); Converter b2 = factory.getInstance(B.class); Converter c2 = factory.getInstance(C.class); assertTrue(a1 == a2); assertTrue(b1 == b2); assertTrue(c1 == c2); assertEquals(a1.getClass(), A.class); assertEquals(b1.getClass(), B.class); assertEquals(c1.getClass(), C.class); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/convert/CombinedStrategyTest.java0000644000175000017500000001374611342530530031470 0ustar sylvestresylvestrepackage org.simpleframework.xml.convert; import java.io.StringWriter; import org.simpleframework.xml.Element; import org.simpleframework.xml.Root; import org.simpleframework.xml.ValidationTestCase; import org.simpleframework.xml.core.Persister; import org.simpleframework.xml.stream.Format; import org.simpleframework.xml.stream.HyphenStyle; import org.simpleframework.xml.stream.InputNode; import org.simpleframework.xml.stream.OutputNode; import org.simpleframework.xml.stream.Style; public class CombinedStrategyTest extends ValidationTestCase { private static class Item { private int value; public Item(int value) { this.value = value; } public int getValue(){ return value; } } @Root @Convert(ExtendedItemConverter.class) private static class ExtendedItem extends Item { public ExtendedItem(int value) { super(value); } } private static class AnnotationItemConverter implements Converter { public Item read(InputNode node) throws Exception { return new Item(Integer.parseInt(node.getAttribute("value").getValue())); } public void write(OutputNode node, Item value) throws Exception { node.setAttribute("value", String.valueOf(value.getValue())); node.setAttribute("type", getClass().getName()); } } private static class RegistryItemConverter implements Converter { public Item read(InputNode node) throws Exception { return new Item(Integer.parseInt(node.getNext().getValue())); } public void write(OutputNode node, Item value) throws Exception { node.getChild("value").setValue(String.valueOf(value.getValue())); node.getChild("type").setValue(getClass().getName()); } } private static class ExtendedItemConverter implements Converter { public ExtendedItem read(InputNode node) throws Exception { return new ExtendedItem(Integer.parseInt(node.getAttribute("value").getValue())); } public void write(OutputNode node, ExtendedItem value) throws Exception { node.setAttribute("value", String.valueOf(value.getValue())); node.setAttribute("type", getClass().getName()); } } @Root private static class CombinationExample { @Element private Item item; // handled by the registry @Element @Convert(AnnotationItemConverter.class) // handled by annotation private Item overriddenItem; @Element private Item extendedItem; // handled by class annotation public CombinationExample(int item, int overriddenItem, int extendedItem) { this.item = new Item(item); this.overriddenItem = new Item(overriddenItem); this.extendedItem = new ExtendedItem(extendedItem); } public Item getItem(){ return item; } public Item getOverriddenItem(){ return overriddenItem; } public Item getExtendedItem() { return extendedItem; } } public void testCombinedStrategy() throws Exception { Registry registry = new Registry(); AnnotationStrategy annotationStrategy = new AnnotationStrategy(); RegistryStrategy registryStrategy = new RegistryStrategy(registry, annotationStrategy); Persister persister = new Persister(registryStrategy); CombinationExample example = new CombinationExample(1, 2, 3); StringWriter writer = new StringWriter(); registry.bind(Item.class, RegistryItemConverter.class); persister.write(example, writer); String text = writer.toString(); System.out.println(text); assertElementExists(text, "/combinationExample/item/value"); assertElementHasValue(text, "/combinationExample/item/value", "1"); assertElementHasValue(text, "/combinationExample/item/type", RegistryItemConverter.class.getName()); assertElementExists(text, "/combinationExample/overriddenItem"); assertElementHasAttribute(text, "/combinationExample/overriddenItem", "value", "2"); assertElementHasAttribute(text, "/combinationExample/overriddenItem", "type", AnnotationItemConverter.class.getName()); assertElementExists(text, "/combinationExample/extendedItem"); assertElementHasAttribute(text, "/combinationExample/extendedItem", "value", "3"); assertElementHasAttribute(text, "/combinationExample/extendedItem", "type", ExtendedItemConverter.class.getName()); } public void testCombinationStrategyWithStyle() throws Exception { Registry registry = new Registry(); AnnotationStrategy annotationStrategy = new AnnotationStrategy(); RegistryStrategy registryStrategy = new RegistryStrategy(registry, annotationStrategy); Style style = new HyphenStyle(); Format format = new Format(style); Persister persister = new Persister(registryStrategy, format); CombinationExample example = new CombinationExample(1, 2, 3); StringWriter writer = new StringWriter(); registry.bind(Item.class, RegistryItemConverter.class); persister.write(example, writer); String text = writer.toString(); System.out.println(text); assertElementExists(text, "/combination-example/item/value"); assertElementHasValue(text, "/combination-example/item/value", "1"); assertElementHasValue(text, "/combination-example/item/type", RegistryItemConverter.class.getName()); assertElementExists(text, "/combination-example/overridden-item"); assertElementHasAttribute(text, "/combination-example/overridden-item", "value", "2"); assertElementHasAttribute(text, "/combination-example/overridden-item", "type", AnnotationItemConverter.class.getName()); assertElementExists(text, "/combination-example/extended-item"); assertElementHasAttribute(text, "/combination-example/extended-item", "value", "3"); assertElementHasAttribute(text, "/combination-example/extended-item", "type", ExtendedItemConverter.class.getName()); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/convert/RegistryCycleStrategyTest.java0000644000175000017500000000636011342530527032540 0ustar sylvestresylvestrepackage org.simpleframework.xml.convert; import java.io.StringWriter; import java.util.ArrayList; import java.util.List; import org.simpleframework.xml.ElementList; import org.simpleframework.xml.Root; import org.simpleframework.xml.ValidationTestCase; import org.simpleframework.xml.convert.ExampleConverters.Cat; import org.simpleframework.xml.convert.ExampleConverters.CatConverter; import org.simpleframework.xml.convert.ExampleConverters.Dog; import org.simpleframework.xml.convert.ExampleConverters.DogConverter; import org.simpleframework.xml.convert.ExampleConverters.Pet; import org.simpleframework.xml.core.Persister; import org.simpleframework.xml.strategy.CycleStrategy; public class RegistryCycleStrategyTest extends ValidationTestCase { @Root public static class PetBucket { @ElementList(inline=true) private List list = new ArrayList(); public void addPet(Pet pet){ list.add(pet); } public List getPets(){ return list; } } public void testCycle() throws Exception { Registry registry = new Registry(); CycleStrategy inner = new CycleStrategy(); RegistryStrategy strategy = new RegistryStrategy(registry, inner); Persister persister = new Persister(strategy); PetBucket bucket = new PetBucket(); StringWriter writer = new StringWriter(); registry.bind(Cat.class, CatConverter.class); registry.bind(Dog.class, DogConverter.class); Pet kitty = new Cat("Kitty", 10); Pet lassie = new Dog("Lassie", 7); Pet ben = new Dog("Ben", 8); bucket.addPet(kitty); bucket.addPet(lassie); bucket.addPet(ben); bucket.addPet(lassie); bucket.addPet(kitty); persister.write(bucket, writer); persister.write(bucket, System.out); String text = writer.toString(); PetBucket copy = persister.read(PetBucket.class, text); assertEquals(copy.getPets().get(0), bucket.getPets().get(0)); assertEquals(copy.getPets().get(1), bucket.getPets().get(1)); assertEquals(copy.getPets().get(2), bucket.getPets().get(2)); assertEquals(copy.getPets().get(3), bucket.getPets().get(3)); assertEquals(copy.getPets().get(4), bucket.getPets().get(4)); assertTrue(copy.getPets().get(0) == copy.getPets().get(4)); // cycle assertTrue(copy.getPets().get(1) == copy.getPets().get(3)); // cycle assertElementExists(text, "/petBucket"); assertElementExists(text, "/petBucket/pet"); assertElementHasAttribute(text, "/petBucket", "id", "0"); assertElementHasAttribute(text, "/petBucket/pet[0]", "id", "1"); assertElementHasAttribute(text, "/petBucket/pet[1]", "id", "2"); assertElementHasAttribute(text, "/petBucket/pet[2]", "id", "3"); assertElementHasAttribute(text, "/petBucket/pet[3]", "reference", "2"); assertElementHasAttribute(text, "/petBucket/pet[4]", "reference", "1"); assertElementHasValue(text, "/petBucket/pet[0]/name", "Kitty"); assertElementHasValue(text, "/petBucket/pet[0]/age", "10"); assertElementHasAttribute(text, "/petBucket/pet[0]", "class", Cat.class.getName()); assertElementHasAttribute(text, "/petBucket/pet[1]", "class", Dog.class.getName()); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/convert/WrapperTest.java0000644000175000017500000000541411342530527027644 0ustar sylvestresylvestrepackage org.simpleframework.xml.convert; import java.io.StringWriter; import junit.framework.TestCase; import org.simpleframework.xml.Default; import org.simpleframework.xml.Element; import org.simpleframework.xml.Root; import org.simpleframework.xml.Serializer; import org.simpleframework.xml.core.Persister; import org.simpleframework.xml.strategy.Strategy; import org.simpleframework.xml.stream.InputNode; import org.simpleframework.xml.stream.OutputNode; public class WrapperTest extends TestCase { private static class Wrapper { private final Object value; public Wrapper(Object value) { this.value = value; } public Object get(){ return value; } } private static class WrapperConverter implements Converter { private final Serializer serializer; public WrapperConverter(Serializer serializer) { this.serializer = serializer; } public Wrapper read(InputNode node) throws Exception { InputNode type = node.getAttribute("type"); InputNode child = node.getNext(); String className = type.getValue(); Object value = null; if(child != null) { value = serializer.read(Class.forName(className), child); } return new Wrapper(value); } public void write(OutputNode node, Wrapper wrapper) throws Exception { Object value = wrapper.get(); Class type = value.getClass(); String className = type.getName(); node.setAttribute("type", className); serializer.write(value, node); } } @Root @Default private static class Entry { private String name; private String value; public Entry(@Element(name="name") String name, @Element(name="value") String value){ this.name = name; this.value = value; } } @Root @Default private static class WrapperExample { @Convert(WrapperConverter.class) private Wrapper wrapper; public WrapperExample(@Element(name="wrapper") Wrapper wrapper) { this.wrapper = wrapper; } } public void testWrapper() throws Exception{ Registry registry = new Registry(); Strategy strategy = new RegistryStrategy(registry); Serializer serializer = new Persister(strategy); Entry entry = new Entry("name", "value"); Wrapper wrapper = new Wrapper(entry); WrapperExample example = new WrapperExample(wrapper); WrapperConverter converter = new WrapperConverter(serializer); StringWriter writer = new StringWriter(); registry.bind(Wrapper.class, converter); serializer.write(example, writer); serializer.read(WrapperExample.class, writer.toString()); System.err.println(writer.toString()); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/convert/ContactEntryTest.java0000644000175000017500000000734111342530530030634 0ustar sylvestresylvestrepackage org.simpleframework.xml.convert; import java.io.StringWriter; import java.util.ArrayList; import java.util.List; import org.simpleframework.xml.Element; import org.simpleframework.xml.ElementList; import org.simpleframework.xml.Root; import org.simpleframework.xml.Serializer; import org.simpleframework.xml.ValidationTestCase; import org.simpleframework.xml.convert.ExampleConverters.Entry; import org.simpleframework.xml.convert.ExampleConverters.EntryListConverter; import org.simpleframework.xml.convert.ExampleConverters.ExtendedEntry; import org.simpleframework.xml.convert.ExampleConverters.OtherEntryConverter; import org.simpleframework.xml.core.Persister; import org.simpleframework.xml.strategy.Strategy; public class ContactEntryTest extends ValidationTestCase { @Root public static class EntryList { @ElementList(inline=true) private List list; @Element @Convert(OtherEntryConverter.class) private Entry other; @Element private Entry inheritConverter; @Element private Entry polymorhic; @Element @Convert(EntryListConverter.class) private List otherList; public EntryList() { this("Default", "Value"); } public EntryList(String name, String value){ this.list = new ArrayList(); this.otherList = new ArrayList(); this.other = new Entry(name, value); this.inheritConverter = new Entry("INHERIT", "inherit"); this.polymorhic = new ExtendedEntry("POLY", "poly", 12); } public Entry getInherit() { return inheritConverter; } public Entry getOther() { return other; } public List getList() { return list; } public List getOtherList() { return otherList; } } public void testContact() throws Exception { Strategy strategy = new AnnotationStrategy(); Serializer serializer = new Persister(strategy); EntryList list = new EntryList("Other", "Value"); StringWriter writer = new StringWriter(); list.getList().add(new Entry("a", "A")); list.getList().add(new Entry("b", "B")); list.getList().add(new Entry("c", "C")); list.getOtherList().add(new Entry("1", "ONE")); list.getOtherList().add(new Entry("2", "TWO")); list.getOtherList().add(new Entry("3", "THREE")); serializer.write(list, writer); String text = writer.toString(); EntryList copy = serializer.read(EntryList.class, text); assertEquals(copy.getList().get(0).getName(), list.getList().get(0).getName()); assertEquals(copy.getList().get(0).getValue(), list.getList().get(0).getValue()); assertEquals(copy.getList().get(1).getName(), list.getList().get(1).getName()); assertEquals(copy.getList().get(1).getValue(), list.getList().get(1).getValue()); assertEquals(copy.getList().get(2).getName(), list.getList().get(2).getName()); assertEquals(copy.getList().get(2).getValue(), list.getList().get(2).getValue()); assertEquals(copy.getOtherList().get(0).getName(), list.getOtherList().get(0).getName()); assertEquals(copy.getOtherList().get(0).getValue(), list.getOtherList().get(0).getValue()); assertEquals(copy.getOtherList().get(1).getName(), list.getOtherList().get(1).getName()); assertEquals(copy.getOtherList().get(1).getValue(), list.getOtherList().get(1).getValue()); assertEquals(copy.getOtherList().get(2).getName(), list.getOtherList().get(2).getName()); assertEquals(copy.getOtherList().get(2).getValue(), list.getOtherList().get(2).getValue()); System.out.println(text); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/convert/RegistryTest.java0000644000175000017500000000142311342530530030022 0ustar sylvestresylvestrepackage org.simpleframework.xml.convert; import static org.simpleframework.xml.convert.ExampleConverters.*; import junit.framework.TestCase; public class RegistryTest extends TestCase { public void testRegistry() throws Exception { Registry registry = new Registry(); registry.bind(Cat.class, CatConverter.class); registry.bind(Dog.class, DogConverter.class); assertEquals(registry.lookup(Cat.class).getClass(), CatConverter.class); assertEquals(registry.lookup(Dog.class).getClass(), DogConverter.class); Converter cat = registry.lookup(Cat.class); Converter dog = registry.lookup(Dog.class); assertTrue(cat == registry.lookup(Cat.class)); assertTrue(dog == registry.lookup(Dog.class)); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/convert/ExampleConverters.java0000644000175000017500000001777711342530530031043 0ustar sylvestresylvestrepackage org.simpleframework.xml.convert; import java.util.ArrayList; import java.util.List; import org.simpleframework.xml.Root; import org.simpleframework.xml.stream.InputNode; import org.simpleframework.xml.stream.OutputNode; public class ExampleConverters { public static class CowConverter implements Converter { public Cow read(InputNode node) throws Exception { String name = node.getAttribute("name").getValue(); String age = node.getAttribute("age").getValue(); return new Cow(name, Integer.parseInt(age)); } public void write(OutputNode node, Cow cow) throws Exception { node.setAttribute("name", cow.getName()); node.setAttribute("age", String.valueOf(cow.getAge())); node.setAttribute("legs", String.valueOf(cow.getLegs())); } } public static class ChickenConverter implements Converter { public Chicken read(InputNode node) throws Exception { String name = node.getAttribute("name").getValue(); String age = node.getAttribute("age").getValue(); return new Chicken(name, Integer.parseInt(age)); } public void write(OutputNode node, Chicken chicken) throws Exception { node.setAttribute("name", chicken.getName()); node.setAttribute("age", String.valueOf(chicken.getAge())); node.setAttribute("legs", String.valueOf(chicken.getLegs())); } } public static class Animal { private final String name; private final int age; private final int legs; public Animal(String name, int age, int legs) { this.name = name; this.legs = legs; this.age = age; } public String getName() { return name; } public int getAge(){ return age; } public int getLegs() { return legs; } } public static class Chicken extends Animal { public Chicken(String name, int age) { super(name, age, 2); } } public static class Cow extends Animal { public Cow(String name, int age) { super(name, age, 4); } } @Root @Convert(EntryConverter.class) public static class Entry { private final String name; private final String value; public Entry(String name, String value) { this.name = name; this.value = value; } public String getName() { return name; } public String getValue() { return value; } public boolean equals(Object value){ if(value instanceof Entry) { return equals((Entry)value); } return false; } public boolean equals(Entry entry) { return entry.name.equals(name) && entry.value.equals(value); } } @Convert(ExtendedEntryConverter.class) public static class ExtendedEntry extends Entry { private final int code; public ExtendedEntry(String name, String value, int code) { super(name, value); this.code = code; } public int getCode() { return code; } } public static class ExtendedEntryConverter implements Converter { public ExtendedEntry read(InputNode node) throws Exception { String name = node.getAttribute("name").getValue(); String value = node.getAttribute("value").getValue(); String code = node.getAttribute("code").getValue(); return new ExtendedEntry(name, value, Integer.parseInt(code)); } public void write(OutputNode node, ExtendedEntry entry) throws Exception { node.setAttribute("name", entry.getName()); node.setAttribute("value", entry.getValue()); node.setAttribute("code", String.valueOf(entry.getCode())); } } public static class OtherEntryConverter implements Converter { public Entry read(InputNode node) throws Exception { String name = node.getAttribute("name").getValue(); String value = node.getAttribute("value").getValue(); return new Entry(name, value); } public void write(OutputNode node, Entry entry) throws Exception { node.setAttribute("name", entry.getName()); node.setAttribute("value", entry.getValue()); } } public static class EntryConverter implements Converter { public Entry read(InputNode node) throws Exception { String name = node.getNext("name").getValue(); String value = node.getNext("value").getValue(); return new Entry(name, value); } public void write(OutputNode node, Entry entry) throws Exception { node.getChild("name").setValue(entry.getName()); node.getChild("value").setValue(entry.getValue()); } } public static class EntryListConverter implements Converter> { private OtherEntryConverter converter = new OtherEntryConverter(); public List read(InputNode node) throws Exception { List entryList = new ArrayList(); while(true) { InputNode item = node.getNext("entry"); if(item == null) { break; } entryList.add(converter.read(item)); } return entryList; } public void write(OutputNode node, List entryList) throws Exception { for(Entry entry : entryList) { OutputNode item = node.getChild("entry"); converter.write(item, entry); } } } public static class Pet implements org.simpleframework.xml.util.Entry{ private final String name; private final int age; public Pet(String name, int age){ this.name = name; this.age = age; } public String getName() { return name; } public int getAge(){ return age; } public boolean equals(Object value) { if(value instanceof Pet) { return equals((Pet)value); } return false; } public boolean equals(Pet pet) { return pet.name.equals(name) && pet.age == age; } } public static class Cat extends Pet{ public Cat(String name, int age) { super(name, age); } } public static class Dog extends Pet{ public Dog(String name, int age) { super(name, age); } } public static class CatConverter implements Converter{ private static final String ELEMENT_NAME = "name"; private static final String ELEMENT_AGE = "age"; public Cat read(InputNode source) throws Exception{ int age = 0; String name = null; while(true) { InputNode node = source.getNext(); if(node == null) { break; }else if(node.getName().equals(ELEMENT_NAME)) { name = node.getValue(); }else if(node.getName().equals(ELEMENT_AGE)){ age = Integer.parseInt(node.getValue().trim()); } } return new Cat(name, age); } public void write(OutputNode node, Cat cat)throws Exception { OutputNode name = node.getChild(ELEMENT_NAME); name.setValue(cat.getName()); OutputNode age = node.getChild(ELEMENT_AGE); age.setValue(String.valueOf(cat.getAge())); } } public static class DogConverter implements Converter{ private static final String ELEMENT_NAME = "name"; private static final String ELEMENT_AGE = "age"; public Dog read(InputNode node) throws Exception{ String name = node.getAttribute(ELEMENT_NAME).getValue(); String age = node.getAttribute(ELEMENT_AGE).getValue(); return new Dog(name, Integer.parseInt(age)); } public void write(OutputNode node, Dog dog)throws Exception { node.setAttribute(ELEMENT_NAME, dog.getName()); node.setAttribute(ELEMENT_AGE, String.valueOf(dog.getAge())); } } } simple-xml-2.3.2/test/src/org/simpleframework/xml/convert/RegistryStrategyTest.java0000644000175000017500000000562111342530530031551 0ustar sylvestresylvestrepackage org.simpleframework.xml.convert; import java.io.StringWriter; import org.simpleframework.xml.ElementList; import org.simpleframework.xml.Namespace; import org.simpleframework.xml.Root; import org.simpleframework.xml.ValidationTestCase; import org.simpleframework.xml.convert.ExampleConverters.Cat; import org.simpleframework.xml.convert.ExampleConverters.CatConverter; import org.simpleframework.xml.convert.ExampleConverters.Dog; import org.simpleframework.xml.convert.ExampleConverters.DogConverter; import org.simpleframework.xml.convert.ExampleConverters.Pet; import org.simpleframework.xml.core.Persister; import org.simpleframework.xml.strategy.Strategy; import org.simpleframework.xml.util.Dictionary; public class RegistryStrategyTest extends ValidationTestCase { @Root @Namespace(prefix="a", reference="http://domain/a") private static class PetShop { @ElementList @Namespace(prefix="b", reference="http://domain/b") private Dictionary pets; public PetShop(){ this.pets = new Dictionary(); } public void addPet(Pet pet) { pets.add(pet); } public Pet getPet(String name){ return pets.get(name); } } public void testConverter() throws Exception { Registry registry = new Registry(); Strategy interceptor = new RegistryStrategy(registry); Persister persister = new Persister(interceptor); StringWriter writer = new StringWriter(); PetShop shop = new PetShop(); registry.bind(Dog.class, DogConverter.class) .bind(Cat.class, CatConverter.class); shop.addPet(new Dog("Lassie", 10)); shop.addPet(new Cat("Kitty", 2)); persister.write(shop, writer); persister.write(shop, System.out); String text = writer.toString(); PetShop newShop = persister.read(PetShop.class, text); assertEquals("Lassie", newShop.getPet("Lassie").getName()); assertEquals(10, newShop.getPet("Lassie").getAge()); assertEquals("Kitty", newShop.getPet("Kitty").getName()); assertEquals(2, newShop.getPet("Kitty").getAge()); assertElementExists(text, "/petShop"); assertElementExists(text, "/petShop/pets"); assertElementExists(text, "/petShop/pets/pet[0]"); assertElementExists(text, "/petShop/pets/pet[1]"); assertElementDoesNotExist(text, "/petShop/pets/pet[2]"); assertElementHasNamespace(text, "/petShop", "http://domain/a"); assertElementHasNamespace(text, "/petShop/pets", "http://domain/b"); assertElementHasNamespace(text, "/petShop/pets/pet[0]", null); assertElementHasAttribute(text, "/petShop/pets/pet[0]", "name", "Lassie"); assertElementHasAttribute(text, "/petShop/pets/pet[0]", "age", "10"); assertElementHasValue(text, "/petShop/pets/pet[1]/name", "Kitty"); assertElementHasValue(text, "/petShop/pets/pet[1]/age", "2"); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/util/0000755000175000017500000000000011344247751024020 5ustar sylvestresylvestresimple-xml-2.3.2/test/src/org/simpleframework/xml/util/DictionaryTest.java0000644000175000017500000000441311342530530027616 0ustar sylvestresylvestrepackage org.simpleframework.xml.util; import java.io.StringWriter; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.SortedSet; import java.util.Set; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Element; import org.simpleframework.xml.ElementList; import org.simpleframework.xml.Root; import org.simpleframework.xml.core.Persister; import org.simpleframework.xml.util.Dictionary; import org.simpleframework.xml.util.Entry; import org.simpleframework.xml.ValidationTestCase; public class DictionaryTest extends ValidationTestCase { private static final String LIST = "\n"+ "\n"+ " \n"+ " \n"+ " one \n\r"+ " \n\r"+ " \n"+ " two \n\r"+ " \n"+ " \n"+ " three \n\r"+ " \n"+ " \n"+ ""; @Root(name="property") private static class Property implements Entry { @Element(name="text") private String text; @Attribute private String name; public String getName() { return name; } } @Root(name="test") private static class PropertySet implements Iterable { @ElementList(name="list", type=Property.class) private Dictionary list; @Attribute(name="name") private String name; public Iterator iterator() { return list.iterator(); } public Property get(String name) { return list.get(name); } public int size() { return list.size(); } } private Persister serializer; public void setUp() { serializer = new Persister(); } public void testDictionary() throws Exception { PropertySet set = (PropertySet) serializer.read(PropertySet.class, LIST); assertEquals(3, set.size()); assertEquals("one", set.get("1").text); assertEquals("two", set.get("2").text); assertEquals("three", set.get("3").text); validate(set, serializer); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/util/WeakCacheTest.java0000644000175000017500000000126711342530530027330 0ustar sylvestresylvestrepackage org.simpleframework.xml.util; import java.util.HashMap; import junit.framework.TestCase; public class WeakCacheTest extends TestCase { private static final int LOAD_COUNT = 100000; public void testCache() { WeakCache cache = new WeakCache(); HashMap map = new HashMap(); for(int i = 0; i < LOAD_COUNT; i++) { String key = String.valueOf(i); cache.cache(key, key); map.put(key, key); } for(int i = 0; i < LOAD_COUNT; i++) { String key = String.valueOf(i); assertEquals(cache.fetch(key), key); assertEquals(map.get(key), cache.fetch(key)); } } } simple-xml-2.3.2/test/src/org/simpleframework/xml/util/ResolverTest.java0000644000175000017500000001242011342530530027307 0ustar sylvestresylvestrepackage org.simpleframework.xml.util; import java.util.Iterator; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.ElementList; import org.simpleframework.xml.Root; import org.simpleframework.xml.ValidationTestCase; import org.simpleframework.xml.core.Persister; public class ResolverTest extends ValidationTestCase { private static final String LIST = "\n"+ "\n"+ " \n"+ " \n"+ " \n"+ " \n"+ " \n"+ " \n"+ " \n"+ " \n"+ " \n"+ ""; @Root(name="match") private static class ContentType implements Match { @Attribute(name="value") private String value; @Attribute private String pattern; public ContentType() { super(); } public ContentType(String pattern, String value) { this.pattern = pattern; this.value = value; } public String getPattern() { return pattern; } public String toString() { return String.format("%s=%s", pattern, value); } } @Root(name="test") private static class ContentResolver implements Iterable { @ElementList(name="list", type=ContentType.class) private Resolver list; @Attribute(name="name") private String name; private ContentResolver() { this.list = new Resolver(); } public Iterator iterator() { return list.iterator(); } public void add(ContentType type) { list.add(type); } public ContentType resolve(String name) { return list.resolve(name); } public int size() { return list.size(); } } private Persister serializer; public void setUp() { serializer = new Persister(); } public void testResolver() throws Exception { ContentResolver resolver = (ContentResolver) serializer.read(ContentResolver.class, LIST); assertEquals(7, resolver.size()); assertEquals("image/jpeg", resolver.resolve("image.jpg").value); assertEquals("text/plain", resolver.resolve("README.txt").value); assertEquals("text/html", resolver.resolve("/index.html").value); assertEquals("text/html", resolver.resolve("/html/image.jpg").value); assertEquals("text/plain", resolver.resolve("/images/README.txt").value); assertEquals("text/plain", resolver.resolve("/log/access.log").value); validate(resolver, serializer); } public void testCache() throws Exception { ContentResolver resolver = (ContentResolver) serializer.read(ContentResolver.class, LIST); assertEquals(7, resolver.size()); assertEquals("image/jpeg", resolver.resolve("image.jpg").value); assertEquals("text/plain", resolver.resolve("README.txt").value); Iterator it = resolver.iterator(); while(it.hasNext()) { ContentType type = it.next(); if(type.value.equals("text/plain")) { it.remove(); break; } } resolver.add(new ContentType("*", "application/octetstream")); assertEquals("application/octetstream", resolver.resolve("README.txt").value); assertEquals("application/octetstream", resolver.resolve("README.txt").value); resolver.add(new ContentType("README.*", "text/html")); resolver.add(new ContentType("README.txt", "text/plain")); assertEquals("text/plain", resolver.resolve("README.txt").value); assertEquals("text/html", resolver.resolve("README.jsp").value); validate(resolver, serializer); } public void testNoResolution() throws Exception { ContentResolver resolver = (ContentResolver) serializer.read(ContentResolver.class, LIST); assertEquals(7, resolver.size()); assertEquals("text/plain", resolver.resolve("README.txt").value); assertEquals(null, resolver.resolve("README")); } public void testNonGreedyMatch() throws Exception { ContentResolver resolver = (ContentResolver) serializer.read(ContentResolver.class, LIST); assertEquals(7, resolver.size()); resolver.add(new ContentType("/*?/html/*", "text/html")); assertEquals(8, resolver.size()); assertEquals(null, resolver.resolve("/a/b/html/index.jsp")); assertEquals("text/html", resolver.resolve("/a/html/index.jsp").value); } public void testResolverCache() throws Exception { ContentResolver resolver = new ContentResolver(); for(int i = 0; i <= 2000; i++) { resolver.add(new ContentType(String.valueOf(i), String.valueOf(i))); } assertEquals(resolver.resolve("1").value, "1"); assertEquals(resolver.resolve("2000").value, "2000"); } } simple-xml-2.3.2/test/src/org/simpleframework/xml/util/Replace.java0000644000175000017500000000516011342530530026224 0ustar sylvestresylvestrepackage org.simpleframework.xml.util; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.InputStream; import java.io.OutputStream; import java.io.OutputStreamWriter; import java.util.ArrayList; import java.util.List; import java.util.regex.Pattern; public class Replace { private static final String LGPL = " \\* This library is free software.*02111-1307\\s+USA\\s+\\*\\/"; private static final String APACHE = " * Licensed under the Apache License, Version 2.0 (the \"License\");\n"+ " * you may not use this file except in compliance with the License.\n"+ " * You may obtain a copy of the License at\n"+ " *\n"+ " * http://www.apache.org/licenses/LICENSE-2.0\n"+ " *\n"+ " * Unless required by applicable law or agreed to in writing, software\n"+ " * distributed under the License is distributed on an \"AS IS\" BASIS,\n"+ " * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or \n"+ " * implied. See the License for the specific language governing \n"+ " * permissions and limitations under the License.\n"+ " */"; public static void main(String[] list) throws Exception{ List files = getFiles(new File(list[0])); Pattern pattern = Pattern.compile(LGPL, Pattern.DOTALL | Pattern.MULTILINE); for(File file : files) { String text = getFile(file); text = pattern.matcher(text).replaceAll(APACHE); save(file, text); } } public static void save(File file, String text) throws Exception { OutputStream out = new FileOutputStream(file); OutputStreamWriter utf = new OutputStreamWriter(out, "UTF-8"); utf.write(text); utf.flush(); utf.close(); out.flush(); out.close(); } public static String getFile(File file) throws Exception { InputStream in = new FileInputStream(file); ByteArrayOutputStream out = new ByteArrayOutputStream(); byte[] block = new byte[8192]; int count = 0; while((count = in.read(block)) != -1) { out.write(block, 0, count); } return out.toString("UTF-8"); } public static List getFiles(File root) { List files = new ArrayList(); File[] fileList = root.listFiles(); for(File file : fileList) { if(file.isDirectory() && !file.getName().equals(".svn")) { files.addAll(getFiles(file)); } else if(file.getName().endsWith(".java")){ files.add(file); } } return files; } } simple-xml-2.3.2/build.xml0000644000175000017500000000406611342530530016312 0ustar sylvestresylvestre simple-xml-2.3.2/doc/0000755000175000017500000000000011342530527015236 5ustar sylvestresylvestresimple-xml-2.3.2/doc/doc/0000755000175000017500000000000011342530527016003 5ustar sylvestresylvestresimple-xml-2.3.2/src/0000755000175000017500000000000011342530527015260 5ustar sylvestresylvestresimple-xml-2.3.2/src/org/0000755000175000017500000000000011342530527016047 5ustar sylvestresylvestresimple-xml-2.3.2/src/org/simpleframework/0000755000175000017500000000000011342530527021256 5ustar sylvestresylvestresimple-xml-2.3.2/src/org/simpleframework/xml/0000755000175000017500000000000011344247751022064 5ustar sylvestresylvestresimple-xml-2.3.2/src/org/simpleframework/xml/core/0000755000175000017500000000000011344247751023014 5ustar sylvestresylvestresimple-xml-2.3.2/src/org/simpleframework/xml/core/AnnotationFactory.java0000644000175000017500000000666411342530527027327 0ustar sylvestresylvestre/* * AnnotationFactory.java January 2010 * * Copyright (C) 2010, Niall Gallagher * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. */ package org.simpleframework.xml.core; import java.lang.annotation.Annotation; import java.lang.reflect.Proxy; import java.util.Collection; import java.util.Map; import org.simpleframework.xml.Element; import org.simpleframework.xml.ElementArray; import org.simpleframework.xml.ElementList; import org.simpleframework.xml.ElementMap; /** * The AnnotationFactory is used to create annotations * using a given class. This will classify the provided type as * either a list, map, array, or a default object. Depending on the * type provided a suitable annotation will be created. Annotations * produced by this will have default attribute values. * * @author Niall Gallagher * * @see org.simpleframework.xml.core.AnnotationHandler */ class AnnotationFactory { /** * This is used to create an annotation for the provided type. * Annotations created are used to match the type provided. So * a List will have an ElementList * annotation for example. Matching the annotation to the * type ensures the best serialization for that type. * * @param type the type to create the annotation for * * @return this returns the synthetic annotation to be used */ public Annotation getInstance(Class type) throws Exception { ClassLoader loader = getClassLoader(); if(Map.class.isAssignableFrom(type)) { return getInstance(loader, ElementMap.class); } if(Collection.class.isAssignableFrom(type)) { return getInstance(loader, ElementList.class); } if(type.isArray()) { return getInstance(loader, ElementArray.class); } return getInstance(loader, Element.class); } /** * This will create a synthetic annotation using the provided * interface. All attributes for the provided annotation will * have their default values. * * @param loader this is the class loader to load the annotation * @param label this is the annotation interface to be used * * @return this returns the synthetic annotation to be used */ private Annotation getInstance(ClassLoader loader, Class label) throws Exception { AnnotationHandler handler = new AnnotationHandler(label); Class[] list = new Class[] {label}; return (Annotation) Proxy.newProxyInstance(loader, list, handler); } /** * This is used to create a suitable class loader to be used to * load the synthetic annotation classes. The class loader * provided will be the same as the class loader that was used * to load this class. * * @return this returns the class loader that is to be used */ private ClassLoader getClassLoader() throws Exception { return AnnotationFactory.class.getClassLoader(); } } simple-xml-2.3.2/src/org/simpleframework/xml/core/Parameter.java0000644000175000017500000000462411342530527025577 0ustar sylvestresylvestre/* * Parameter.java July 2009 * * Copyright (C) 2009, Niall Gallagher * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. */ package org.simpleframework.xml.core; import java.lang.annotation.Annotation; /** * The Parameter is used to represent a constructor * parameter. It contains the XML annotation used on the parameter * as well as the name of the parameter and its position index. * A parameter is used to validate against the annotated methods * and fields and also to determine the deserialized values that * should be injected in to the constructor to instantiate it. * * @author Niall Gallagher */ interface Parameter { /** * This is used to acquire the name of the parameter that this * represents. The name is determined using annotation and * the name attribute of that annotation, if one is provided. * * @return this returns the name of the annotated parameter */ public String getName() throws Exception; /** * This is used to acquire the annotation that is used for the * parameter. The annotation provided will be an XML annotation * such as the Element or Attribute * annotation. * * @return this returns the annotation used on the parameter */ public Annotation getAnnotation(); /** * This is used to acquire the annotated type class. The class * is the type that is to be deserialized from the XML. This * is used to validate against annotated fields and methods. * * @return this returns the type used for the parameter */ public Class getType(); /** * This returns the index position of the parameter in the * constructor. This is used to determine the order of values * that are to be injected in to the constructor. * * @return this returns the index for the parameter */ public int getIndex(); } simple-xml-2.3.2/src/org/simpleframework/xml/core/ClassInstance.java0000644000175000017500000000677511342530527026422 0ustar sylvestresylvestre/* * ClassInstance.java January 2007 * * Copyright (C) 2007, Niall Gallagher * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. */ package org.simpleframework.xml.core; /** * The ClassInstance object is used to create an object * by using a Class to determine the type. If the given * class can not be instantiated then this throws an exception when * the instance is requested. For performance an instantiator is * given as it contains a reflection cache for constructors. * * @author Niall Gallagher */ class ClassInstance implements Instance { /** * This is the instantiator used to create the objects. */ private Instantiator creator; /** * This represents the value of the instance if it is set. */ private Object value; /** * This is the type of the instance that is to be created. */ private Class type; /** * Constructor for the ClassInstance object. This is * used to create an instance of the specified type. If the given * type can not be instantiated then an exception is thrown. * * @param creator this is the creator used for the instantiation * @param type this is the type that is to be instantiated */ public ClassInstance(Instantiator creator, Class type) { this.creator = creator; this.type = type; } /** * This method is used to acquire an instance of the type that * is defined by this object. If for some reason the type can * not be instantiated an exception is thrown from this. * * @return an instance of the type this object represents */ public Object getInstance() throws Exception { if(value == null) { value = creator.getObject(type); } return value; } /** * This method is used acquire the value from the type and if * possible replace the value for the type. If the value can * not be replaced then an exception should be thrown. This * is used to allow primitives to be inserted into a graph. * * @param value this is the value to insert as the type * * @return an instance of the type this object represents */ public Object setInstance(Object value) throws Exception { return this.value = value; } /** * This is the type of the object instance that will be created * by the getInstance method. This allows the * deserialization process to perform checks against the field. * * @return the type of the object that will be instantiated */ public Class getType() { return type; } /** * This is used to determine if the type is a reference type. * A reference type is a type that does not require any XML * deserialization based on its annotations. Values that are * references could be substitutes objects or existing ones. * * @return this returns true if the object is a reference */ public boolean isReference() { return false; } } simple-xml-2.3.2/src/org/simpleframework/xml/core/CompositeArray.java0000644000175000017500000002075211342530527026620 0ustar sylvestresylvestre/* * CompositeArray.java July 2006 * * Copyright (C) 2006, Niall Gallagher * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. */ package org.simpleframework.xml.core; import java.lang.reflect.Array; import org.simpleframework.xml.strategy.Type; import org.simpleframework.xml.stream.InputNode; import org.simpleframework.xml.stream.OutputNode; import org.simpleframework.xml.stream.Position; /** * The CompositeArray object is used to convert a list of * elements to an array of object entries. This in effect performs a * root serialization and deserialization of entry elements for the * array object. On serialization each objects type must be checked * against the array component type so that it is serialized in a form * that can be deserialized dynamically. *
 *
 *    <array length="2">
 *       <entry>
 *          <text>example text value</text>
 *       </entry>
 *       <entry>
 *          <text>some other example</text>
 *       </entry>
 *    </array>
 * 
 * 
* For the above XML element list the element entry is * contained within the array. Each entry element is deserialized as * a root element and then inserted into the array. For serialization * the reverse is done, each element taken from the array is written * as a root element to the parent element to create the list. Entry * objects do not need to be of the same type. * * @author Niall Gallagher * * @see org.simpleframework.xml.core.Traverser * @see org.simpleframework.xml.ElementArray */ class CompositeArray implements Converter { /** * This factory is used to create an array for the contact. */ private final ArrayFactory factory; /** * This performs the traversal used for object serialization. */ private final Traverser root; /** * This is the name to wrap each entry that is represented. */ private final String parent; /** * This is the entry type for elements within the array. */ private final Type entry; /** * Constructor for the CompositeArray object. This is * given the array type for the contact that is to be converted. An * array of the specified type is used to hold the deserialized * elements and will be the same length as the number of elements. * * @param context this is the context object used for serialization * @param type this is the field type for the array being used * @param entry this is the entry type for the array elements * @param parent this is the name to wrap the array element with */ public CompositeArray(Context context, Type type, Type entry, String parent) { this.factory = new ArrayFactory(context, type); this.root = new Traverser(context); this.parent = parent; this.entry = entry; } /** * This read method will read the XML element list from * the provided node and deserialize its children as entry types. * This ensures each entry type is deserialized as a root type, that * is, its Root annotation must be present and the * name of the entry element must match that root element name. * * @param node this is the XML element that is to be deserialized * * @return this returns the item to attach to the object contact */ public Object read(InputNode node) throws Exception{ Instance type = factory.getInstance(node); Object list = type.getInstance(); if(!type.isReference()) { return read(node, list); } return list; } /** * This read method will read the XML element list from * the provided node and deserialize its children as entry types. * This ensures each entry type is deserialized as a root type, that * is, its Root annotation must be present and the * name of the entry element must match that root element name. * * @param node this is the XML element that is to be deserialized * @param list this is the array that is to be deserialized * * @return this returns the item to attach to the object contact */ public Object read(InputNode node, Object list) throws Exception{ int length = Array.getLength(list); for(int pos = 0; true; pos++) { Position line = node.getPosition(); InputNode next = node.getNext(); if(next == null) { return list; } if(pos >= length){ throw new ElementException("Array length missing or incorrect at %s", line); } read(next, list, pos); } } /** * This is used to read the specified node from in to the list. If * the node is null then this represents a null element value in * the array. The node can be null only if there is a parent and * that parent contains no child XML elements. * * @param node this is the node to read the array value from * @param list this is the list to add the array value in to * @param index this is the offset to set the value in the array */ private void read(InputNode node, Object list, int index) throws Exception { Class type = entry.getType(); Object value = null; if(!node.isEmpty()) { value = root.read(node, type); } Array.set(list, index, value); } /** * This validate method will validate the XML element * list against the provided node and validate its children as entry * types. This ensures each entry type is validated as a root type, * that is, its Root annotation must be present and the * name of the entry element must match that root element name. * * @param node this is the XML element that is to be validated * * @return true if the element matches the XML schema class given */ public boolean validate(InputNode node) throws Exception{ Instance value = factory.getInstance(node); if(!value.isReference()) { Object result = value.setInstance(null); Class type = value.getType(); return validate(node, type); } return true; } /** * This validate method wll validate the XML element * list against the provided node and validate its children as entry * types. This ensures each entry type is validated as a root type, * that is, its Root annotation must be present and the * name of the entry element must match that root element name. * * @param node this is the XML element that is to be validated * @param type this is the array type used to create the array * * @return true if the element matches the XML schema class given */ private boolean validate(InputNode node, Class type) throws Exception{ for(int i = 0; true; i++) { InputNode next = node.getNext(); if(next == null) { return true; } if(!next.isEmpty()) { root.validate(next, type); } } } /** * This write method will write the specified object * to the given XML element as as array entries. Each entry within * the given array must be assignable to the array component type. * Each array entry is serialized as a root element, that is, its * Root annotation is used to extract the name. * * @param source this is the source object array to be serialized * @param node this is the XML element container to be populated */ public void write(OutputNode node, Object source) throws Exception { int size = Array.getLength(source); for(int i = 0; i < size; i++) { Object item = Array.get(source, i); Class type = entry.getType(); root.write(node, item, type, parent); } node.commit(); } } simple-xml-2.3.2/src/org/simpleframework/xml/core/Scanner.java0000644000175000017500000006600011342530527025244 0ustar sylvestresylvestre/* * Scanner.java July 2006 * * Copyright (C) 2006, Niall Gallagher * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. */ package org.simpleframework.xml.core; import java.lang.annotation.Annotation; import java.util.List; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Default; import org.simpleframework.xml.DefaultType; import org.simpleframework.xml.Element; import org.simpleframework.xml.ElementArray; import org.simpleframework.xml.ElementList; import org.simpleframework.xml.ElementMap; import org.simpleframework.xml.Order; import org.simpleframework.xml.Root; import org.simpleframework.xml.Text; import org.simpleframework.xml.Version; /** * The Scanner object performs the reflective inspection * of a class and builds a map of attributes and elements for each * annotated field. This acts as a cachable container for reflection * actions performed on a specific type. When scanning the provided * class this inserts the scanned field as a Label in to * a map so that it can be retrieved by name. Annotations classified * as attributes have the Attribute annotation, all other * annotated fields are stored as elements. * * @author Niall Gallagher * * @see org.simpleframework.xml.core.Schema */ class Scanner { /** * This method acts as a pointer to the types commit process. */ private ClassScanner scanner; /** * This is the default access type to be used for this scanner. */ private DefaultType access; /** * This is used to store all labels that are XML attributes. */ private LabelMap attributes; /** * This is used to store all labels that are XML elements. */ private LabelMap elements; /** * This is used to compare the annotations being scanned. */ private Comparer comparer; /** * This is the version label used to read the version attribute. */ private Label version; /** * This is used to store all labels that are XML text values. */ private Label text; /** * This is the name of the class as taken from the root class. */ private String name; /** * This is the type that is being scanned by this scanner. */ private Class type; /** * This is used to specify whether the type is a primitive class. */ private boolean primitive; /** * Constructor for the Scanner object. This is used * to scan the provided class for annotations that are used to * build a schema for an XML file to follow. * * @param type this is the type that is scanned for a schema */ public Scanner(Class type) throws Exception { this.scanner = new ClassScanner(type); this.attributes = new LabelMap(this); this.elements = new LabelMap(this); this.comparer = new Comparer(); this.type = type; this.scan(type); } /** * This is used to acquire the type that this scanner scans for * annotations to be used in a schema. Exposing the class that * this represents allows the schema it creates to be known. * * @return this is the type that this creator will represent */ public Class getType() { return type; } /** * This is used to create the object instance. It does this by * either delegating to the default no argument constructor or by * using one of the annotated constructors for the object. This * allows deserialized values to be injected in to the created * object if that is required by the class schema. * * @return this returns the creator for the class object */ public Creator getCreator() { return scanner.getCreator(); } /** * This is used to acquire the Decorator for this. * A decorator is an object that adds various details to the * node without changing the overall structure of the node. For * example comments and namespaces can be added to the node with * a decorator as they do not affect the deserialization. * * @return this returns the decorator associated with this */ public Decorator getDecorator() { return scanner.getDecorator(); } /** * This method is used to return the Caller for this * class. The caller is a means to deliver invocations to the * object for the persister callback methods. It aggregates all of * the persister callback methods in to a single object. * * @return this returns a caller used for delivering callbacks */ public Caller getCaller(Context context) { return new Caller(this, context); } /** * Returns a LabelMap that contains the details for * all fields marked as XML attributes. This returns a new map * each time the method is called, the goal is to ensure that any * object using the label map can manipulate it without changing * the core details of the schema, allowing it to be cached. * * @param context this is the context used to style the names * * @return map with the details extracted from the schema class */ public LabelMap getAttributes(Context context) throws Exception { return attributes.clone(context); } /** * Returns a LabelMap that contains the details for * all fields marked as XML elements. The annotations that are * considered elements are the ElementList and the * Element annotations. This returns a copy of the * details extracted from the schema class so this can be cached. * * @param context this is the context used to style the names * * @return a map containing the details for XML elements */ public LabelMap getElements(Context context) throws Exception { return elements.clone(context); } /** * This is the Version for the scanned class. It * allows the deserialization process to be configured such that * if the version is different from the schema class none of * the fields and methods are required and unmatched elements * and attributes will be ignored. * * @return this returns the version of the class that is scanned */ public Version getRevision() { if(version != null) { return version.getContact().getAnnotation(Version.class); } return null; } /** * This returns the Label that represents the version * annotation for the scanned class. Only a single version can * exist within the class if more than one exists an exception is * thrown. This will read only floating point types such as double. * * @return this returns the label used for reading the version */ public Label getVersion() { return version; } /** * This returns the Label that represents the text * annotation for the scanned class. Only a single text annotation * can be used per class, so this returns only a single label * rather than a LabelMap object. Also if this is * not null then the elements label map must be empty. * * @return this returns the text label for the scanned class */ public Label getText() { return text; } /** * This returns the name of the class processed by this scanner. * The name is either the name as specified in the last found * Root annotation, or if a name was not specified * within the discovered root then the Java Bean class name of * the last class annotated with a root annotation. * * @return this returns the name of the object being scanned */ public String getName() { return name; } /** * This method is used to retrieve the schema class commit method * during the deserialization process. The commit method must be * marked with the Commit annotation so that when the * object is deserialized the persister has a chance to invoke the * method so that the object can build further data structures. * * @return this returns the commit method for the schema class */ public Function getCommit() { return scanner.getCommit(); } /** * This method is used to retrieve the schema class validation * method during the deserialization process. The validation method * must be marked with the Validate annotation so that * when the object is deserialized the persister has a chance to * invoke that method so that object can validate its field values. * * @return this returns the validate method for the schema class */ public Function getValidate() { return scanner.getValidate(); } /** * This method is used to retrieve the schema class persistence * method. This is invoked during the serialization process to * get the object a chance to perform an nessecary preparation * before the serialization of the object proceeds. The persist * method must be marked with the Persist annotation. * * @return this returns the persist method for the schema class */ public Function getPersist() { return scanner.getPersist(); } /** * This method is used to retrieve the schema class completion * method. This is invoked after the serialization process has * completed and gives the object a chance to restore its state * if the persist method required some alteration or locking. * This is marked with the Complete annotation. * * @return returns the complete method for the schema class */ public Function getComplete() { return scanner.getComplete(); } /** * This method is used to retrieve the schema class replacement * method. The replacement method is used to substitute an object * that has been deserialized with another object. This allows * a seamless delegation mechanism to be implemented. This is * marked with the Replace annotation. * * @return returns the replace method for the schema class */ public Function getReplace() { return scanner.getReplace(); } /** * This method is used to retrieve the schema class replacement * method. The replacement method is used to substitute an object * that has been deserialized with another object. This allows * a seamless delegation mechanism to be implemented. This is * marked with the Replace annotation. * * @return returns the replace method for the schema class */ public Function getResolve() { return scanner.getResolve(); } /** * This is used to determine whether the scanned class represents * a primitive type. A primitive type is a type that contains no * XML annotations and so cannot be serialized with an XML form. * Instead primitives a serialized using transformations. * * @return this returns true if no XML annotations were found */ public boolean isPrimitive() { return primitive; } /** * This is used to determine whether the scanned class represents * a primitive type. A primitive type is a type that contains no * XML annotations and so cannot be serialized with an XML form. * Instead primitives a serialized using transformations. * * @return this returns true if no XML annotations were found */ private boolean isEmpty() { Root root = scanner.getRoot(); if(!elements.isEmpty()) { return false; } if(!attributes.isEmpty()) { return false; } if(text != null) { return false; } return root == null; } /** * This method is used to determine whether strict mappings are * required. Strict mapping means that all labels in the class * schema must match the XML elements and attributes in the * source XML document. When strict mapping is disabled, then * XML elements and attributes that do not exist in the schema * class will be ignored without breaking the parser. * * @return true if strict parsing is enabled, false otherwise */ public boolean isStrict() { return scanner.isStrict(); } /** * This is used to scan the specified object to extract the fields * and methods that are to be used in the serialization process. * This will acquire all fields and getter setter pairs that have * been annotated with the XML annotations. * * @param type this is the object type that is to be scanned */ private void scan(Class type) throws Exception { root(type); order(type); access(type); field(type); method(type); validate(type); } /** * This is used to validate the configuration of the scanned class. * If a Text annotation has been used with elements * then validation will fail and an exception will be thrown. * * @param type this is the object type that is being scanned * * @throws Exception if text and element annotations are present */ private void validate(Class type) throws Exception { Creator creator = scanner.getCreator(); Order order = scanner.getOrder(); validateElements(type, order); validateAttributes(type, order); validateParameters(creator); validateText(type); } /** * This is used to validate the configuration of the scanned class. * If a Text annotation has been used with elements * then validation will fail and an exception will be thrown. * * @param type this is the object type that is being scanned * * @throws Exception if text and element annotations are present */ private void validateText(Class type) throws Exception { if(text != null) { if(!elements.isEmpty()) { throw new TextException("Elements used with %s in %s", text, type); } } else { primitive = isEmpty(); } } /** * This is used to validate the configuration of the scanned class. * If an ordered element is specified but does not refer to an * existing element then this will throw an exception. * * @param type this is the object type that is being scanned * * @throws Exception if an ordered element does not exist */ private void validateElements(Class type, Order order) throws Exception { Creator factory = scanner.getCreator(); List builders = factory.getBuilders(); for(Builder builder : builders) { validateConstructor(builder, elements); } if(order != null) { for(String name : order.elements()) { Label label = elements.get(name); if(label == null) { throw new ElementException("Ordered element '%s' missing for %s", name, type); } } } } /** * This is used to validate the configuration of the scanned class. * If an ordered attribute is specified but does not refer to an * existing attribute then this will throw an exception. * * @param type this is the object type that is being scanned * * @throws Exception if an ordered attribute does not exist */ private void validateAttributes(Class type, Order order) throws Exception { Creator factory = scanner.getCreator(); List builders = factory.getBuilders(); for(Builder builder : builders) { validateConstructor(builder, elements); } if(order != null) { for(String name : order.attributes()) { Label label = attributes.get(name); if(label == null) { throw new AttributeException("Ordered attribute '%s' missing for %s", name, type); } } } } /** * This is used to ensure that final methods and fields have a * constructor parameter that allows the value to be injected in * to. Validating the constructor in this manner ensures that the * class schema remains fully serializable and deserializable. * * @param builder this is the builder to validate the labels with * @param map this is the map that contains the labels to validate * * @throws Exception this is thrown if the validation fails */ private void validateConstructor(Builder builder, LabelMap map) throws Exception { for(Label label : map) { if(label != null) { Contact contact = label.getContact(); String name = label.getName(); if(contact.isReadOnly()) { Parameter value = builder.getParameter(name); if(value == null) { throw new ConstructorException("No match found for %s in %s", contact, type); } } } } } /** * This is used to ensure that for each parameter in the builder * there is a matching method or field. This ensures that the * class schema is fully readable and writable. If not method or * field annotation exists for the parameter validation fails. * * @param creator this is the creator to validate the labels with * * @throws Exception this is thrown if the validation fails */ private void validateParameters(Creator creator) throws Exception { List list = creator.getParameters(); for(Parameter parameter : list) { String name = parameter.getName(); Label label = elements.get(name); if(label == null) { label = attributes.get(name); } if(label == null) { throw new ConstructorException("Parameter '%s' does not have a match in %s", name, type); } } } /** * This is used to acquire the optional Root from the * specified class. The root annotation provides information as * to how the object is to be parsed as well as other information * such as the name of the object if it is to be serialized. * * @param type this is the type of the class to be inspected */ private void root(Class type) { String real = type.getSimpleName(); Root root = scanner.getRoot(); String text = real; if(root != null) { text = root.name(); if(isEmpty(text)) { text = Support.getName(real); } name = text.intern(); } } /** * This is used to acquire the optional order annotation to provide * order to the elements and attributes for the generated XML. This * acts as an override to the order provided by the declaration of * the types within the object. * * @param type this is the type to be scanned for the order */ private void order(Class type) { Order order = scanner.getOrder(); if(order != null) { for(String name : order.elements()) { elements.put(name, null); } for(String name : order.attributes()) { attributes.put(name, null); } } } /** * This is used to determine the access type for the class. The * access type is specified by the DefaultType * enumeration. Setting a default access tells this scanner to * synthesize an XML annotation for all fields or methods that * do not have associated annotations. * * @param type this is the type to acquire the default type for */ private void access(Class type) { Default holder = scanner.getDefault(); if(holder != null) { access = holder.value(); } } /** * This method is used to determine if a root annotation value is * an empty value. Rather than determining if a string is empty * be comparing it to an empty string this method allows for the * value an empty string represents to be changed in future. * * @param value this is the value to determine if it is empty * * @return true if the string value specified is an empty value */ private boolean isEmpty(String value) { return value.length() == 0; } /** * This is used to acquire the contacts for the annotated fields * within the specified class. The field contacts are added to * either the attributes or elements map depending on annotation. * * @param type this is the object type that is to be scanned */ public void field(Class type) throws Exception { ContactList list = new FieldScanner(type, access); for(Contact contact : list) { scan(contact, contact.getAnnotation()); } } /** * This is used to acquire the contacts for the annotated fields * within the specified class. The field contacts are added to * either the attributes or elements map depending on annotation. * * @param type this is the object type that is to be scanned */ public void method(Class type) throws Exception { ContactList list = new MethodScanner(type, access); for(Contact contact : list) { scan(contact, contact.getAnnotation()); } } /** * This reflectively checks the annotation to determine the type * of annotation it represents. If it represents an XML schema * annotation it is used to create a Label which can * be used to represent the field within the context object. * * @param field the field that the annotation comes from * @param label the annotation used to model the XML schema * * @throws Exception if there is more than one text annotation */ private void scan(Contact field, Annotation label) throws Exception { if(label instanceof Attribute) { process(field, label, attributes); } if(label instanceof ElementList) { process(field, label, elements); } if(label instanceof ElementArray) { process(field, label, elements); } if(label instanceof ElementMap) { process(field, label, elements); } if(label instanceof Element) { process(field, label, elements); } if(label instanceof Version) { version(field, label); } if(label instanceof Text) { text(field, label); } } /** * This is used to process the Text annotations that * are present in the scanned class. This will set the text label * for the class and an ensure that if there is more than one * text label within the class an exception is thrown. * * @param field the field the annotation was extracted from * @param type the annotation extracted from the field * * @throws Exception if there is more than one text annotation */ private void text(Contact field, Annotation type) throws Exception { Label label = LabelFactory.getInstance(field, type); if(text != null) { throw new TextException("Multiple text annotations in %s", type); } text = label; } /** * This is used to process the Text annotations that * are present in the scanned class. This will set the text label * for the class and an ensure that if there is more than one * text label within the class an exception is thrown. * * @param field the field the annotation was extracted from * @param type the annotation extracted from the field * * @throws Exception if there is more than one text annotation */ private void version(Contact field, Annotation type) throws Exception { Label label = LabelFactory.getInstance(field, type); if(version != null) { throw new AttributeException("Multiple version annotations in %s", type); } version = label; } /** * This is used when all details from a field have been gathered * and a Label implementation needs to be created. * This will build a label instance based on the field annotation. * If a label with the same name was already inserted then it is * ignored and the value for that field will not be serialized. * * @param field the field the annotation was extracted from * @param type the annotation extracted from the field * @param map this is used to collect the label instance created * * @throws Exception thrown if the label can not be created */ private void process(Contact field, Annotation type, LabelMap map) throws Exception { Label label = LabelFactory.getInstance(field, type); String name = label.getName(); if(map.get(name) != null) { throw new PersistenceException("Annotation of name '%s' declared twice", name); } map.put(name, label); validate(label, name); } /** * This is used to validate the Parameter object that * exist in the constructors. Validation is performed against the * annotated methods and fields to ensure that they match up. * * @param field this is the annotated method or field to validate * @param name this is the name of the parameter to validate with * * @throws Exception thrown if the validation fails */ private void validate(Label field, String name) throws Exception { Creator factory = scanner.getCreator(); Parameter parameter = factory.getParameter(name); if(parameter != null) { validate(field, parameter); } } /** * This is used to validate the Parameter object that * exist in the constructors. Validation is performed against the * annotated methods and fields to ensure that they match up. * * @param field this is the annotated method or field to validate * @param parameter this is the parameter to validate with * * @throws Exception thrown if the validation fails */ private void validate(Label field, Parameter parameter) throws Exception { Contact contact = field.getContact(); Annotation label = contact.getAnnotation(); Annotation match = parameter.getAnnotation(); String name = field.getName(); if(!comparer.equals(label, match)) { throw new ConstructorException("Annotation does not match for '%s' in %s", name, type); } Class expect = contact.getType(); if(expect != parameter.getType()) { throw new ConstructorException("Parameter does not match field for '%s' in %s", name, type); } } } simple-xml-2.3.2/src/org/simpleframework/xml/core/ParameterFactory.java0000644000175000017500000001457411342530527027134 0ustar sylvestresylvestre/* * ParameterFactory.java July 2006 * * Copyright (C) 2006, Niall Gallagher * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. */ package org.simpleframework.xml.core; import java.lang.annotation.Annotation; import java.lang.reflect.Constructor; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Element; import org.simpleframework.xml.ElementArray; import org.simpleframework.xml.ElementList; import org.simpleframework.xml.ElementMap; /** * The ParameterFactory object is used to create instances * of the Parameter object. Each parameter created can be * used to validate against the annotated fields and methods to ensure * that the annotations are compatible. *

* The Parameter objects created by this are selected * using the XML annotation type. If the annotation type is not known * the factory will throw an exception, otherwise a parameter instance * is created that will expose the properties of the annotation. * * @author Niall Gallagher */ final class ParameterFactory { /** * Creates a Parameter using the provided constructor * and the XML annotation. The parameter produced contains all * information related to the constructor parameter. It knows the * name of the XML entity, as well as the type. * * @param method this is the constructor the parameter exists in * @param label represents the XML annotation for the contact * * @return returns the parameter instantiated for the field */ public static Parameter getInstance(Constructor method, Annotation label, int index) throws Exception { Constructor factory = getConstructor(label); if(!factory.isAccessible()) { factory.setAccessible(true); } return (Parameter)factory.newInstance(method, label, index); } /** * Creates a constructor that is used to instantiate the parameter * used to represent the specified annotation. The constructor * created by this method takes three arguments, a constructor, * an annotation, and the parameter index. * * @param label the XML annotation representing the label * * @return returns a constructor for instantiating the parameter * * @throws Exception thrown if the annotation is not supported */ private static Constructor getConstructor(Annotation label) throws Exception { return getEntry(label).getConstructor(); } /** * Creates an entry that is used to select the constructor for the * parameter. Each parameter must implement a constructor that takes * a constructor, and annotation, and the index of the parameter. If * the annotation is not know this method throws an exception. * * @param label the XML annotation used to create the parameter * * @return this returns the entry used to create a suitable * constructor for the parameter * * @throws Exception thrown if the annotation is not supported */ private static Entry getEntry(Annotation label) throws Exception{ if(label instanceof Element) { return new Entry(ElementParameter.class, Element.class); } if(label instanceof ElementList) { return new Entry(ElementListParameter.class, ElementList.class); } if(label instanceof ElementArray) { return new Entry(ElementArrayParameter.class, ElementArray.class); } if(label instanceof ElementMap) { return new Entry(ElementMapParameter.class, ElementMap.class); } if(label instanceof Attribute) { return new Entry(AttributeParameter.class, Attribute.class); } throw new PersistenceException("Annotation %s not supported", label); } /** * The Entry object is used to create a constructor * that can be used to instantiate the correct parameter for the * XML annotation specified. The constructor requires three * arguments, the constructor, the annotation, and the index. * * @see java.lang.reflect.Constructor */ private static class Entry { /** * This is the parameter type that is to be instantiated. */ public Class create; /** * This is the XML annotation type within the constructor. */ public Class type; /** * Constructor for the Entry object. This pairs * the parameter type with the annotation argument used within * the constructor. This allows constructor to be selected. * * @param create this is the label type to be instantiated * @param type the type that is used within the constructor */ public Entry(Class create, Class type) { this.create = create; this.type = type; } /** * Creates the constructor used to instantiate the parameter * for the XML annotation. The constructor returned will take * two arguments, a contact and the XML annotation type. * * @return returns the constructor for the parameter object */ public Constructor getConstructor() throws Exception { return getConstructor(Constructor.class, type, int.class); } /** * Creates the constructor used to instantiate the parameter * for the XML annotation. The constructor returned will take * three arguments, a constructor, an annotation and a type. * * @param types these are the arguments for the constructor * * @return returns the constructor for the parameter object */ private Constructor getConstructor(Class... types) throws Exception { return create.getConstructor(types); } } } simple-xml-2.3.2/src/org/simpleframework/xml/core/CompositeList.java0000644000175000017500000002151011342530527026446 0ustar sylvestresylvestre/* * CompositeList.java July 2006 * * Copyright (C) 2006, Niall Gallagher * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. */ package org.simpleframework.xml.core; import java.util.Collection; import org.simpleframework.xml.strategy.Type; import org.simpleframework.xml.stream.InputNode; import org.simpleframework.xml.stream.OutputNode; /** * The CompositeList object is used to convert an element * list to a collection of element entries. This in effect performs a * root serialization and deserialization of entry elements for the * collection object. On serialization each objects type must be * checked against the XML annotation entry so that it is serialized * in a form that can be deserialized. *

 *
 *    <list>
 *       <entry attribute="value">
 *          <text>example text value</text>
 *       </entry>
 *       <entry attribute="demo">
 *          <text>some other example</text>
 *       </entry>
 *    </list>
 * 
 * 
* For the above XML element list the element entry is * contained within the list. Each entry element is thus deserialized * as a root element and then inserted into the list. This enables * lists to be composed from XML documents. For serialization the * reverse is done, each element taken from the collection is written * as a root element to the owning element to create the list. * Entry objects do not need to be of the same type. * * @author Niall Gallagher * * @see org.simpleframework.xml.core.Traverser * @see org.simpleframework.xml.ElementList */ class CompositeList implements Converter { /** * This factory is used to create a suitable collection list. */ private final CollectionFactory factory; /** * This performs the traversal used for object serialization. */ private final Traverser root; /** * This represents the name of the entry elements to write. */ private final String name; /** * This is the entry type for elements within the list. */ private final Type entry; /** * Constructor for the CompositeList object. This is * given the list type and entry type to be used. The list type is * the Collection implementation that deserialized * entry objects are inserted into. * * @param context this is the context object used for serialization * @param type this is the collection type for the list used * @param entry the entry type to be stored within the list */ public CompositeList(Context context, Type type, Type entry, String name) { this.factory = new CollectionFactory(context, type); this.root = new Traverser(context); this.entry = entry; this.name = name; } /** * This read method will read the XML element list from * the provided node and deserialize its children as entry types. * This will each entry type is deserialized as a root type, that * is, its Root annotation must be present and the * name of the entry element must match that root element name. * * @param node this is the XML element that is to be deserialized * * @return this returns the item to attach to the object contact */ public Object read(InputNode node) throws Exception{ Instance type = factory.getInstance(node); Object list = type.getInstance(); if(!type.isReference()) { return populate(node, list); } return list; } /** * This read method will read the XML element map from * the provided node and deserialize its children as entry types. * Each entry type must contain a key and value so that the entry * can be inserted in to the map as a pair. If either the key or * value is composite it is read as a root object, which means its * Root annotation must be present and the name of the * object element must match that root element name. * * @param node this is the XML element that is to be deserialized * @param result this is the map object that is to be populated * * @return this returns the item to attach to the object contact */ public Object read(InputNode node, Object result) throws Exception { Instance type = factory.getInstance(node); if(type.isReference()) { return type.getInstance(); } type.setInstance(result); if(result != null) { return populate(node, result); } return result; } /** * This populate method wll read the XML element list * from the provided node and deserialize its children as entry types. * This will each entry type is deserialized as a root type, that * is, its Root annotation must be present and the * name of the entry element must match that root element name. * * @param node this is the XML element that is to be deserialized * @param result this is the collection that is to be populated * * @return this returns the item to attach to the object contact */ private Object populate(InputNode node, Object result) throws Exception { Collection list = (Collection) result; while(true) { InputNode next = node.getNext(); Class expect = entry.getType(); if(next == null) { return list; } list.add(root.read(next, expect)); } } /** * This validate method will validate the XML element * list from the provided node and deserialize its children as entry * types. This takes each entry type and validates it as a root type, * that is, its Root annotation must be present and the * name of the entry element must match that root element name. * * @param node this is the XML element that is to be validated * * @return true if the element matches the XML schema class given */ public boolean validate(InputNode node) throws Exception{ Instance value = factory.getInstance(node); if(!value.isReference()) { Object result = value.setInstance(null); Class type = value.getType(); return validate(node, type); } return true; } /** * This validate method will validate the XML element * list from the provided node and deserialize its children as entry * types. This takes each entry type and validates it as a root type, * that is, its Root annotation must be present and the * name of the entry element must match that root element name. * * @param node this is the XML element that is to be validated * @param type this is the type to validate against the input node * * @return true if the element matches the XML schema class given */ private boolean validate(InputNode node, Class type) throws Exception { while(true) { InputNode next = node.getNext(); Class expect = entry.getType(); if(next == null) { return true; } root.validate(next, expect); } } /** * This write method will write the specified object * to the given XML element as as list entries. Each entry within * the given collection must be assignable from the annotated * type specified within the ElementList annotation. * Each entry is serialized as a root element, that is, its * Root annotation is used to extract the name. * * @param source this is the source collection to be serialized * @param node this is the XML element container to be populated */ public void write(OutputNode node, Object source) throws Exception { Collection list = (Collection) source; for(Object item : list) { if(item != null) { Class expect = entry.getType(); Class type = item.getClass(); if(!expect.isAssignableFrom(type)) { throw new PersistenceException("Entry %s does not match %s", type, entry); } root.write(node, item, expect, name); } } } } simple-xml-2.3.2/src/org/simpleframework/xml/core/ElementListLabel.java0000644000175000017500000003160611342530527027044 0ustar sylvestresylvestre/* * ElementListLabel.java July 2006 * * Copyright (C) 2006, Niall Gallagher * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. */ package org.simpleframework.xml.core; import org.simpleframework.xml.ElementList; import org.simpleframework.xml.strategy.Type; import org.simpleframework.xml.stream.Style; /** * The ElementListLabel represents a label that is used * to represent an XML element list in a class schema. This element * list label can be used to convert an XML node into a collection of * composite objects. Each element converted with the converter this * creates must be an XML serializable element. * * @author Niall Gallagher * * @see org.simpleframework.xml.ElementList */ class ElementListLabel implements Label { /** * This is the decorator that is associated with the element. */ private Decorator decorator; /** * This references the annotation that the field uses. */ private ElementList label; /** * This contains the details of the annotated contact object. */ private Signature detail; /** * This is the type of collection this list will instantiate. */ private Class type; /** * Represents the type of objects this list will hold. */ private Class item; /** * This is the name of the XML entry from the annotation. */ private String entry; /** * This is the name of the element for this label instance. */ private String name; /** * Constructor for the ElementListLabel object. This * creates a label object, which can be used to convert an XML * node to a Collection of XML serializable objects. * * @param contact this is the contact that this label represents * @param label the annotation that contains the schema details */ public ElementListLabel(Contact contact, ElementList label) { this.detail = new Signature(contact, this); this.decorator = new Qualifier(contact); this.type = contact.getType(); this.entry = label.entry(); this.item = label.type(); this.name = label.name(); this.label = label; } /** * This is used to acquire the Decorator for this. * A decorator is an object that adds various details to the * node without changing the overall structure of the node. For * example comments and namespaces can be added to the node with * a decorator as they do not affect the deserialization. * * @return this returns the decorator associated with this */ public Decorator getDecorator() throws Exception { return decorator; } /** * This will create a Converter for transforming an XML * element into a collection of XML serializable objects. The XML * schema class for these objects must be present the element list * annotation. * * @param context this is the context object used for serialization * * @return this returns the converter for creating a collection */ public Converter getConverter(Context context) throws Exception { String entry = getEntry(context); if(!label.inline()) { return getConverter(context, entry); } return getInlineConverter(context, entry); } /** * This will create a Converter for transforming an XML * element into a collection of XML serializable objects. The XML * schema class for these objects must be present the element list * annotation. * * @param context this is the context object used for serialization * @param name this is the name of the XML entry element to use * * @return this returns the converter for creating a collection */ private Converter getConverter(Context context, String name) throws Exception { Type item = getDependent(); Type type = getContact(); if(!context.isPrimitive(item)) { return new CompositeList(context, type, item, name); } return new PrimitiveList(context, type, item, name); } /** * This will create a Converter for transforming an XML * element into a collection of XML serializable objects. The XML * schema class for these objects must be present the element list * annotation. * * @param context this is the context object used for serialization * * @return this returns the converter for creating a collection */ private Converter getInlineConverter(Context context, String name) throws Exception { Type item = getDependent(); Type type = getContact(); if(!context.isPrimitive(item)) { return new CompositeInlineList(context, type, item, name); } return new PrimitiveInlineList(context, type, item, name); } /** * This is used to acquire the name of the element or attribute * that is used by the class schema. The name is determined by * checking for an override within the annotation. If it contains * a name then that is used, if however the annotation does not * specify a name the the field or method name is used instead. * * @return returns the name that is used for the XML property */ public String getName(Context context) throws Exception{ Style style = context.getStyle(); String name = detail.getName(); return style.getElement(name); } /** * This is used to either provide the entry value provided within * the annotation or compute a entry value. If the entry string * is not provided the the entry value is calculated as the type * of primitive the object is as a simplified class name. * * @param context this is the context used to style the entry * * @return this returns the name of the XML entry element used */ private String getEntry(Context context) throws Exception { Style style = context.getStyle(); String entry = getEntry(); return style.getElement(entry); } /** * This is used to provide a configured empty value used when the * annotated value is null. This ensures that XML can be created * with required details regardless of whether values are null or * not. It also provides a means for sensible default values. * * @param context this is the context object for the serialization * * @return this returns the string to use for default values */ public Object getEmpty(Context context) throws Exception { Type list = new ClassType(type); Factory factory = new CollectionFactory(context, list); if(!label.empty()) { return factory.getInstance(); } return null; } /** * This is used to acquire the dependent type for the annotated * list. This will simply return the type that the collection is * composed to hold. This must be a serializable type, that is, * a type that is annotated with the Root class. * * @return this returns the component type for the collection */ public Type getDependent() throws Exception { Contact contact = getContact(); if(item == void.class) { item = contact.getDependent(); } if(item == null) { throw new ElementException("Unable to determine type for %s", contact); } return new ClassType(item); } /** * This is used to either provide the entry value provided within * the annotation or compute a entry value. If the entry string * is not provided the the entry value is calculated as the type * of primitive the object is as a simplified class name. * * @return this returns the name of the XML entry element used */ public String getEntry() throws Exception { if(detail.isEmpty(entry)) { entry = detail.getEntry(); } return entry; } /** * This is used to acquire the name of the element or attribute * that is used by the class schema. The name is determined by * checking for an override within the annotation. If it contains * a name then that is used, if however the annotation does not * specify a name the the field or method name is used instead. * * @return returns the name that is used for the XML property */ public String getName() throws Exception{ return detail.getName(); } /** * This acts as a convenience method used to determine the type of * contact this represents. This is used when an object is written * to XML. It determines whether a class attribute * is required within the serialized XML element, that is, if the * class returned by this is different from the actual value of the * object to be serialized then that type needs to be remembered. * * @return this returns the type of the contact class */ public Class getType() { return type; } /** * This is used to acquire the contact object for this label. The * contact retrieved can be used to set any object or primitive that * has been deserialized, and can also be used to acquire values to * be serialized in the case of object persistence. All contacts * that are retrieved from this method will be accessible. * * @return returns the contact that this label is representing */ public Contact getContact() { return detail.getContact(); } /** * This is used to acquire the name of the element or attribute * as taken from the annotation. If the element or attribute * explicitly specifies a name then that name is used for the * XML element or attribute used. If however no overriding name * is provided then the method or field is used for the name. * * @return returns the name of the annotation for the contact */ public String getOverride() { return name; } /** * This is used to determine whether the annotation requires it * and its children to be written as a CDATA block. This is done * when a primitive or other such element requires a text value * and that value needs to be encapsulated within a CDATA block. * * @return currently the element list does not require CDATA */ public boolean isData() { return label.data(); } /** * This method is used to determine if the label represents an * attribute. This is used to style the name so that elements * are styled as elements and attributes are styled as required. * * @return this is used to determine if this is an attribute */ public boolean isAttribute() { return false; } /** * This is used to determine if the label is a collection. If the * label represents a collection then any original assignment to * the field or method can be written to without the need to * create a new collection. This allows obscure collections to be * used and also allows initial entries to be maintained. * * @return true if the label represents a collection value */ public boolean isCollection() { return true; } /** * This is used to determine whether the XML element is required. * This ensures that if an XML element is missing from a document * that deserialization can continue. Also, in the process of * serialization, if a value is null it does not need to be * written to the resulting XML document. * * @return true if the label represents a some required data */ public boolean isRequired() { return label.required(); } /** * This is used to determine whether the list has been specified * as inline. If the list is inline then no overrides are needed * and the outer XML element for the list is not used. * * @return this returns whether the annotation is inline */ public boolean isInline() { return label.inline(); } /** * This is used to describe the annotation and method or field * that this label represents. This is used to provide error * messages that can be used to debug issues that occur when * processing a method. This will provide enough information * such that the problem can be isolated correctly. * * @return this returns a string representation of the label */ public String toString() { return detail.toString(); } } simple-xml-2.3.2/src/org/simpleframework/xml/core/ContactList.java0000644000175000017500000000250511342530527026102 0ustar sylvestresylvestre/* * ContactList.java April 2007 * * Copyright (C) 2007, Niall Gallagher * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. */ package org.simpleframework.xml.core; import java.util.ArrayList; /** * The ContactList object is used to represent a list * that contains contacts for an object. This is used to collect * the methods and fields within an object that are to be used in * the serialization and deserialization process. * * @author Niall Gallagher */ abstract class ContactList extends ArrayList { /** * Constructor for the ContactList object. This * must be subclassed by a scanning class which will fill the * list with the contacts from a specified class. */ protected ContactList() { super(); } } simple-xml-2.3.2/src/org/simpleframework/xml/core/EmptyMatcher.java0000644000175000017500000000314111342530527026252 0ustar sylvestresylvestre/* * EmptyMatcher.java May 2007 * * Copyright (C) 2007, Niall Gallagher * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. */ package org.simpleframework.xml.core; import org.simpleframework.xml.transform.Matcher; import org.simpleframework.xml.transform.Transform; /** * The EmptyMatcher object is used as a delegate type * that is used when no user specific matcher is specified. This * ensures that no transform is resolved for a specified type, and * allows the normal resolution of the stock transforms. * * @author Niall Gallagher * * @see org.simpleframework.xml.transform.Transformer */ class EmptyMatcher implements Matcher { /** * This method is used to return a null value for the transform. * Returning a null value allows the normal resolution of the * stock transforms to be used when no matcher is specified. * * @param type this is the type that is expecting a transform * * @return this transform will always return a null value */ public Transform match(Class type) throws Exception { return null; } } simple-xml-2.3.2/src/org/simpleframework/xml/core/PrimitiveArray.java0000644000175000017500000002146111342530527026624 0ustar sylvestresylvestre/* * PrimitiveArray.java July 2006 * * Copyright (C) 2006, Niall Gallagher * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. */ package org.simpleframework.xml.core; import java.lang.reflect.Array; import org.simpleframework.xml.strategy.Type; import org.simpleframework.xml.stream.InputNode; import org.simpleframework.xml.stream.OutputNode; import org.simpleframework.xml.stream.Position; /** * The PrimitiveArray object is used to convert a list of * elements to an array of object entries. This in effect performs a * serialization and deserialization of primitive elements for the * array object. On serialization each primitive type must be checked * against the array component type so that it is serialized in a form * that can be deserialized dynamically. *
 *
 *    <array>
 *       <entry>example text one</entry>
 *       <entry>example text two</entry>
 *       <entry>example text three</entry>
 *    </array>
 * 
 * 
* For the above XML element list the element entry is * contained within the array. Each entry element is deserialized as * a from a parent XML element, which is specified in the annotation. * For serialization the reverse is done, each element taken from the * array is written into an element created from the parent element. * * @author Niall Gallagher * * @see org.simpleframework.xml.core.Primitive * @see org.simpleframework.xml.ElementArray */ class PrimitiveArray implements Converter { /** * This factory is used to create an array for the contact. */ private final ArrayFactory factory; /** * This performs the serialization of the primitive element. */ private final Primitive root; /** * This is the name that each array element is wrapped with. */ private final String parent; /** * This is the type of object that will be held in the list. */ private final Type entry; /** * Constructor for the PrimitiveArray object. This is * given the array type for the contact that is to be converted. An * array of the specified type is used to hold the deserialized * elements and will be the same length as the number of elements. * * @param context this is the context object used for serialization * @param type this is the actual field type from the schema * @param entry the entry type to be stored within the array * @param parent this is the name to wrap the array element with */ public PrimitiveArray(Context context, Type type, Type entry, String parent) { this.factory = new ArrayFactory(context, type); this.root = new Primitive(context, entry); this.parent = parent; this.entry = entry; } /** * This read method will read the XML element list from * the provided node and deserialize its children as entry types. * This will deserialize each entry type as a primitive value. In * order to do this the parent string provided forms the element. * * @param node this is the XML element that is to be deserialized * * @return this returns the item to attach to the object contact */ public Object read(InputNode node) throws Exception{ Instance type = factory.getInstance(node); Object list = type.getInstance(); if(!type.isReference()) { return read(node, list); } return list; } /** * This read method will read the XML element list from * the provided node and deserialize its children as entry types. * This will deserialize each entry type as a primitive value. In * order to do this the parent string provided forms the element. * * @param node this is the XML element that is to be deserialized * @param list this is the array to read the array values in to * * @return this returns the item to attach to the object contact */ public Object read(InputNode node, Object list) throws Exception{ int length = Array.getLength(list); for(int pos = 0; true; pos++) { Position line = node.getPosition(); InputNode next = node.getNext(); if(next == null) { return list; } if(pos >= length){ throw new ElementException("Array length missing or incorrect at %s", line); } Array.set(list, pos, root.read(next)); } } /** * This validate method will validate the XML element list * from the provided node and validate its children as entry types. * This will validate each entry type as a primitive value. In order * to do this the parent string provided forms the element. * * @param node this is the XML element that is to be validated * * @return true if the element matches the XML schema class given */ public boolean validate(InputNode node) throws Exception{ Instance value = factory.getInstance(node); if(!value.isReference()) { Object result = value.setInstance(null); Class expect = value.getType(); return validate(node, expect); } return true; } /** * This validate method wll validate the XML element list * from the provided node and validate its children as entry types. * This will validate each entry type as a primitive value. In order * to do this the parent string provided forms the element. * * @param node this is the XML element that is to be validated * @param type this is the array type used to create the array * * @return true if the element matches the XML schema class given */ private boolean validate(InputNode node, Class type) throws Exception{ for(int i = 0; true; i++) { InputNode next = node.getNext(); if(next == null) { return true; } root.validate(next); } } /** * This write method will write the specified object * to the given XML element as as array entries. Each entry within * the given array must be assignable to the array component type. * This will deserialize each entry type as a primitive value. In * order to do this the parent string provided forms the element. * * @param source this is the source object array to be serialized * @param node this is the XML element container to be populated */ public void write(OutputNode node, Object source) throws Exception { int size = Array.getLength(source); for(int i = 0; i < size; i++) { OutputNode child = node.getChild(parent); if(child == null) { break; } write(child, source, i); } } /** * This write method will write the specified object * to the given XML element as as array entries. Each entry within * the given array must be assignable to the array component type. * This will deserialize each entry type as a primitive value. In * order to do this the parent string provided forms the element. * * @param source this is the source object array to be serialized * @param node this is the XML element container to be populated * @param index this is the position in the array to set the item */ private void write(OutputNode node, Object source, int index) throws Exception { Object item = Array.get(source, index); if(item != null) { if(!isOverridden(node, item)) { root.write(node, item); } } } /** * This is used to determine whether the specified value has been * overridden by the strategy. If the item has been overridden * then no more serialization is require for that value, this is * effectively telling the serialization process to stop writing. * * @param node the node that a potential override is written to * @param value this is the object instance to be serialized * * @return returns true if the strategy overrides the object */ private boolean isOverridden(OutputNode node, Object value) throws Exception{ return factory.setOverride(entry, value, node); } } simple-xml-2.3.2/src/org/simpleframework/xml/core/Entry.java0000644000175000017500000002325311342530527024757 0ustar sylvestresylvestre/* * Entry.java July 2007 * * Copyright (C) 2007, Niall Gallagher * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. */ package org.simpleframework.xml.core; import org.simpleframework.xml.ElementMap; import org.simpleframework.xml.strategy.Type; /** * The Entry object is used to provide configuration for * the serialization and deserialization of a map. Values taken from * the ElementMap annotation provide a means to specify * how to read and write the map as an XML element. Key and value * objects can be written as composite or primitive values. Primitive * key values can be written as attributes of the resulting entry * and value objects can be written inline if desired. * * @author Niall Gallagher */ class Entry { /** * Provides the default name for entry XML elements of the map. */ private static final String DEFAULT_NAME = "entry"; /** * Represents the annotation that the map object is labeled with. */ private ElementMap label; /** * Provides the point of contact in the object to the map. */ private Contact contact; /** * Provides the class XML schema used for the value objects. */ private Class valueType; /** * Provides the class XML schema used for the key objects. */ private Class keyType; /** * Specifies the name of the XML entry element used by the map. */ private String entry; /** * Specifies the name of the XML value element used by the map. */ private String value; /** * Specifies the name of the XML key node used by the map. */ private String key; /** * Determines whether the key object is written as an attribute. */ private boolean attribute; /** * Constructor for the Entry object. This takes the * element map annotation that provides configuration as to how * the map is serialized and deserialized from the XML document. * The entry object provides a convenient means to access the XML * schema configuration using defaults where necessary. * * @param contact this is the point of contact to the map object * @param label the annotation the map method or field uses */ public Entry(Contact contact, ElementMap label) { this.attribute = label.attribute(); this.entry = label.entry(); this.value = label.value(); this.key = label.key(); this.key = label.key(); this.contact = contact; this.label = label; } /** * Represents whether the key value is to be an attribute or an * element. This allows the key to be embedded within the entry * XML element allowing for a more compact representation. Only * primitive key objects can be represented as an attribute. For * example a java.util.Date or a string could be * represented as an attribute key for the generated XML. * * @return true if the key is to be inlined as an attribute */ public boolean isAttribute() { return attribute; } /** * Represents whether the value is to be written as an inline text * value within the element. This is only possible if the key has * been specified as an attribute. Also, the value can only be * inline if there is no wrapping value XML element specified. * * @return this returns true if the value can be written inline */ public boolean isInline() throws Exception { return isAttribute(); } /** * This is used to get the key converter for the entry. This knows * whether the key type is a primitive or composite object and will * provide the appropriate converter implementation. This allows * the root composite map converter to concern itself with only the * details of the surrounding entry object. * * @param context this is the root context for the serialization * * @return returns the converter used for serializing the key */ public Converter getKey(Context context) throws Exception { Type type = getKeyType(); if(context.isPrimitive(type)) { return new PrimitiveKey(context, this, type); } return new CompositeKey(context, this, type); } /** * This is used to get the value converter for the entry. This knows * whether the value type is a primitive or composite object and will * provide the appropriate converter implementation. This allows * the root composite map converter to concern itself with only the * details of the surrounding entry object. * * @param context this is the root context for the serialization * * @return returns the converter used for serializing the value */ public Converter getValue(Context context) throws Exception { Type type = getValueType(); if(context.isPrimitive(type)) { return new PrimitiveValue(context, this, type); } return new CompositeValue(context, this, type); } /** * This is used to acquire the dependent key for the annotated * map. This will simply return the type that the map object is * composed to hold. This must be a serializable type, that is, * it must be a composite or supported primitive type. * * @return this returns the key object type for the map object */ protected Type getKeyType() throws Exception { if(keyType == null) { keyType = label.keyType(); if(keyType == void.class) { keyType = getDependent(0); } } return new ClassType(keyType); } /** * This is used to acquire the dependent value for the annotated * map. This will simply return the type that the map object is * composed to hold. This must be a serializable type, that is, * it must be a composite or supported primitive type. * * @return this returns the value object type for the map object */ protected Type getValueType() throws Exception { if(valueType == null) { valueType = label.valueType(); if(valueType == void.class) { valueType = getDependent(1); } } return new ClassType(valueType); } /** * Provides the dependent class for the map as taken from the * specified index. This allows the entry to fall back on generic * declarations of the map if no explicit dependent types are * given within the element map annotation. * * @param index this is the index to acquire the parameter from * * @return this returns the generic type at the specified index */ private Class getDependent(int index) throws Exception { Class[] list = contact.getDependents(); if(list.length < index) { throw new PersistenceException("Could not find type for %s at index %s", contact, index); } return list[index]; } /** * This is used to provide a key XML element for each of the * keys within the map. This essentially wraps the entity to * be serialized such that there is an extra XML element present. * This can be used to override the default names of primitive * keys, however it can also be used to wrap composite keys. * * @return this returns the key XML element for each key */ public String getKey() throws Exception { if(key == null) { return key; } if(isEmpty(key)) { key = null; } return key; } /** * This is used to provide a value XML element for each of the * values within the map. This essentially wraps the entity to * be serialized such that there is an extra XML element present. * This can be used to override the default names of primitive * values, however it can also be used to wrap composite values. * * @return this returns the value XML element for each value */ public String getValue() throws Exception { if(value == null) { return value; } if(isEmpty(value)) { value = null; } return value; } /** * This is used to provide a the name of the entry XML element * that wraps the key and value elements. If specified the entry * value specified will be used instead of the default name of * the element. This is used to ensure the resulting XML is * configurable to the requirements of the generated XML. * * @return this returns the entry XML element for each entry */ public String getEntry() throws Exception { if(entry == null) { return entry; } if(isEmpty(entry)) { entry = DEFAULT_NAME; } return entry; } /** * This method is used to determine if a root annotation value is * an empty value. Rather than determining if a string is empty * be comparing it to an empty string this method allows for the * value an empty string represents to be changed in future. * * @param value this is the value to determine if it is empty * * @return true if the string value specified is an empty value */ private boolean isEmpty(String value) { return value.length() == 0; } } simple-xml-2.3.2/src/org/simpleframework/xml/core/MapFactory.java0000644000175000017500000001254411342530527025724 0ustar sylvestresylvestre/* * MapFactory.java July 2007 * * Copyright (C) 2007, Niall Gallagher * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. */ package org.simpleframework.xml.core; import java.util.HashMap; import java.util.Map; import java.util.TreeMap; import org.simpleframework.xml.strategy.Type; import org.simpleframework.xml.strategy.Value; import org.simpleframework.xml.stream.InputNode; /** * The MapFactory is used to create map instances that * are compatible with the field type. This performs resolution of * the map class by consulting the specified Strategy * implementation. If the strategy cannot resolve the map class * then this will select a type from the Java Collections framework, * if a compatible one exists. * * @author Niall Gallagher */ class MapFactory extends Factory { /** * Constructor for the MapFactory object. This is * given the field type as taken from the owning object. The * given type is used to determine the map instance created. * * @param context this is the context object for this factory * @param type this is the class for the owning object */ public MapFactory(Context context, Type type) { super(context, type); } /** * Creates a map object that is determined from the field type. * This is used for the ElementMap to get a map * that does not have any overrides. This must be done as the * inline list does not contain an outer element. * * @return a type which is used to instantiate the map */ public Object getInstance() throws Exception { Class type = getType(); Class real = type; if(!isInstantiable(real)) { real = getConversion(type); } if(!isMap(real)) { throw new InstantiationException("Type is not a collection %s", type); } return real.newInstance(); } /** * Creates the map object to use. The Strategy object * is consulted for the map object class, if one is not resolved * by the strategy implementation or if the collection resolved is * abstract then the Java Collections framework is consulted. * * @param node this is the input node representing the list * * @return this is the map object instantiated for the field */ public Instance getInstance(InputNode node) throws Exception { Value value = getOverride(node); Class type = getType(); if(value != null) { return getInstance(value); } if(!isInstantiable(type)) { type = getConversion(type); } if(!isMap(type)) { throw new InstantiationException("Type is not a map %s", type); } return context.getInstance(type); } /** * This creates a Map object instance from the type * provided. If the type provided is abstract or an interface then * this can promote the type to a map object type that can be * instantiated. This is done by asking the type to convert itself. * * @param value the type used to instantiate the map object * * @return this returns a compatible map object instance */ public Instance getInstance(Value value) throws Exception { Class type = value.getType(); if(!isInstantiable(type)) { type = getConversion(type); } if(!isMap(type)) { throw new InstantiationException("Type is not a map %s", type); } return new ConversionInstance(context, value, type); } /** * This is used to convert the provided type to a map object type * from the Java Collections framework. This will check to see if * the type is a Map or SortedMap and * return a HashMap or TreeSet type. If * no suitable match can be found this throws an exception. * * @param type this is the type that is to be converted * * @return a collection that is assignable to the provided type */ public Class getConversion(Class type) throws Exception { if(type.isAssignableFrom(HashMap.class)) { return HashMap.class; } if(type.isAssignableFrom(TreeMap.class)) { return TreeMap.class; } throw new InstantiationException("Cannot instantiate %s", type); } /** * This determines whether the type provided is a object map type. * If the type is assignable to a Map object then * this returns true, otherwise this returns false. * * @param type given to determine whether it is a map type * * @return true if the provided type is a map object type */ private boolean isMap(Class type) { return Map.class.isAssignableFrom(type); } }simple-xml-2.3.2/src/org/simpleframework/xml/core/Caller.java0000644000175000017500000001523111342530527025055 0ustar sylvestresylvestre/* * Caller.java June 2007 * * Copyright (C) 2007, Niall Gallagher * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. */ package org.simpleframework.xml.core; /** * The Caller acts as a means for the schema to invoke * the callback methods on an object. This ensures that the correct * method is invoked within the schema class. If the annotated method * accepts a map then this will provide that map to the method. This * also ensures that if specific annotation is not present in the * class that no action is taken on a persister callback. * * @author Niall Gallagher */ class Caller { /** * This is the pointer to the schema class commit function. */ private final Function commit; /** * This is the pointer to the schema class validation function. */ private final Function validate; /** * This is the pointer to the schema class persist function. */ private final Function persist; /** * This is the pointer to the schema class complete function. */ private final Function complete; /** * This is the pointer to the schema class replace function. */ private final Function replace; /** * This is the pointer to the schema class resolve function. */ private final Function resolve; /** * This is the context that is used to invoke the functions. */ private final Context context; /** * Constructor for the Caller object. This is used * to wrap the schema class such that callbacks from the persister * can be dealt with in a seamless manner. This ensures that the * correct function and arguments are provided to the functions. * element and attribute XML annotations scanned from * * @param schema this is the scanner that contains the functions * @param context this is the context used to acquire the session */ public Caller(Scanner schema, Context context) { this.validate = schema.getValidate(); this.complete = schema.getComplete(); this.replace = schema.getReplace(); this.resolve = schema.getResolve(); this.persist = schema.getPersist(); this.commit = schema.getCommit(); this.context = context; } /** * This is used to replace the deserialized object with another * instance, perhaps of a different type. This is useful when an * XML schema class acts as a reference to another XML document * which needs to be loaded externally to create an object of * a different type. * * @param source the source object to invoke the function on * * @return this returns the object that acts as the replacement * * @throws Exception if the replacement function cannot complete */ public Object replace(Object source) throws Exception { if(replace != null) { return replace.call(context, source); } return source; } /** * This is used to replace the deserialized object with another * instance, perhaps of a different type. This is useful when an * XML schema class acts as a reference to another XML document * which needs to be loaded externally to create an object of * a different type. * * @param source the source object to invoke the function on * * @return this returns the object that acts as the replacement * * @throws Exception if the replacement function cannot complete */ public Object resolve(Object source) throws Exception { if(resolve != null) { return resolve.call(context, source); } return source; } /** * This method is used to invoke the provided objects commit function * during the deserialization process. The commit function must be * marked with the Commit annotation so that when the * object is deserialized the persister has a chance to invoke the * function so that the object can build further data structures. * * @param source this is the object that has just been deserialized * * @throws Exception thrown if the commit process cannot complete */ public void commit(Object source) throws Exception { if(commit != null) { commit.call(context, source); } } /** * This method is used to invoke the provided objects validation * function during the deserialization process. The validation function * must be marked with the Validate annotation so that * when the object is deserialized the persister has a chance to * invoke that function so that object can validate its field values. * * @param source this is the object that has just been deserialized * * @throws Exception thrown if the validation process failed */ public void validate(Object source) throws Exception { if(validate != null) { validate.call(context, source); } } /** * This method is used to invoke the provided objects persistence * function. This is invoked during the serialization process to * get the object a chance to perform an necessary preparation * before the serialization of the object proceeds. The persist * function must be marked with the Persist annotation. * * @param source the object that is about to be serialized * * @throws Exception thrown if the object cannot be persisted */ public void persist(Object source) throws Exception { if(persist != null) { persist.call(context, source); } } /** * This method is used to invoke the provided objects completion * function. This is invoked after the serialization process has * completed and gives the object a chance to restore its state * if the persist function required some alteration or locking. * This is marked with the Complete annotation. * * @param source this is the object that has been serialized * * @throws Exception thrown if the object cannot complete */ public void complete(Object source) throws Exception { if(complete != null) { complete.call(context, source); } } } simple-xml-2.3.2/src/org/simpleframework/xml/core/ConversionInstance.java0000644000175000017500000001137711342530527027474 0ustar sylvestresylvestre/* * CoversionInstance.java April 2007 * * Copyright (C) 2007, Niall Gallagher * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. */ package org.simpleframework.xml.core; import org.simpleframework.xml.strategy.Value; /** * The ConversionInstance object is used to promote the * type to some more specialized type. For example if a field or * method that represents a List is annotated then this * might create a specialized type such as a Vector. It * typically used to promote a type either because it is abstract * or because another type is required. *

* This is used by the CollectionFactory to convert the * type of a collection field from an abstract type to a instantiable * type. This is used to simplify strategy implementations. * * @author Niall Gallagher * * @see org.simpleframework.xml.core.CollectionFactory */ class ConversionInstance implements Instance { /** * This is the context that is used to create the instance. */ private final Context context; /** * This is the new class that is used for the type conversion. */ private final Class convert; /** * This is the value object that will be wrapped by this. */ private final Value value; /** * This is used to specify the creation of a conversion type that * can be used for creating an instance with a class other than * the default class specified by the Value object. * * @param context this is the context used for instantiation * @param value this is the type used to create the instance * @param convert this is the class the type is converted to */ public ConversionInstance(Context context, Value value, Class convert) throws Exception { this.context = context; this.convert = convert; this.value = value; } /** * This method is used to acquire an instance of the type that * is defined by this object. If for some reason the type can * not be instantiated an exception is thrown from this. * * @return an instance of the type this object represents */ public Object getInstance() throws Exception { if(value.isReference()) { return value.getValue(); } Object created = getInstance(convert); if(created != null) { setInstance(created); } return created; } /** * This method is used to acquire an instance of the type that * is defined by this object. If for some reason the type can * not be instantiated an exception is thrown from this. * * @param type this is the type of the instance to create * * @return an instance of the type this object represents */ public Object getInstance(Class type) throws Exception { Instance value = context.getInstance(type); Object object = value.getInstance(); return object; } /** * This method is used acquire the value from the type and if * possible replace the value for the type. If the value can * not be replaced then an exception should be thrown. This * is used to allow primitives to be inserted into a graph. * * @param object this is the object to insert as the value * * @return an instance of the type this object represents */ public Object setInstance(Object object) throws Exception { if(value != null) { value.setValue(object); } return object; } /** * This is the type of the object instance that will be created * by the getInstance method. This allows the * deserialization process to perform checks against the field. * * @return the type of the object that will be instantiated */ public Class getType() { return convert; } /** * This will return true if the Value object provided * is a reference type. Typically a reference type refers to a * type that is substituted during the deserialization process * and so constitutes an object that does not need initialization. * * @return this returns true if the type is a reference type */ public boolean isReference() { return value.isReference(); } } simple-xml-2.3.2/src/org/simpleframework/xml/core/VersionLabel.java0000644000175000017500000002330411342530527026240 0ustar sylvestresylvestre/* * VersionLabel.java July 2008 * * Copyright (C) 2008, Niall Gallagher * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. */ package org.simpleframework.xml.core; import org.simpleframework.xml.Version; import org.simpleframework.xml.strategy.Type; import org.simpleframework.xml.stream.Style; /** * The VersionLabel object is used convert any double * retrieved from an XML attribute to a version revision. The version * is used to determine how to perform serialization of a composite * by determining version compatibility. * * @author Niall Gallagher */ class VersionLabel implements Label { /** * This is the decorator that is associated with the attribute. */ private Decorator decorator; /** * This contains the details of the annotated contact object. */ private Signature detail; /** * Represents the annotation used to label the field. */ private Version label; /** * This is the type that the field object references. */ private Class type; /** * This is the name of the element for this label instance. */ private String name; /** * Constructor for the VersionLabel object. This is * used to create a label that can convert from a double to an * XML attribute and vice versa. This requires the annotation and * contact extracted from the XML schema class. * * @param contact this is the field from the XML schema class * @param label represents the annotation for the field */ public VersionLabel(Contact contact, Version label) { this.detail = new Signature(contact, this); this.decorator = new Qualifier(contact); this.type = contact.getType(); this.name = label.name(); this.label = label; } /** * This is used to acquire the Decorator for this. * A decorator is an object that adds various details to the * node without changing the overall structure of the node. For * example comments and namespaces can be added to the node with * a decorator as they do not affect the deserialization. * * @return this returns the decorator associated with this */ public Decorator getDecorator() throws Exception { return decorator; } /** * Creates a Converter that can convert an attribute * to a double value. This requires the context object used for * the current instance of XML serialization being performed. * * @param context this is context object used for serialization * * @return this returns the converted for this attribute object */ public Converter getConverter(Context context) throws Exception { String ignore = getEmpty(context); Type type = getContact(); if(!context.isFloat(type)) { throw new AttributeException("Cannot use %s to represent %s", label, type); } return new Primitive(context, type, ignore); } /** * This is used to provide a configured empty value used when the * annotated value is null. This ensures that XML can be created * with required details regardless of whether values are null or * not. It also provides a means for sensible default values. * * @param context this is the context object for the serialization * * @return this returns the string to use for default values */ public String getEmpty(Context context) { return null; } /** * This is used to acquire the name of the element or attribute * that is used by the class schema. The name is determined by * checking for an override within the annotation. If it contains * a name then that is used, if however the annotation does not * specify a name the the field or method name is used instead. * * @param context the context object used to style the name * * @return returns the name that is used for the XML property */ public String getName(Context context) throws Exception { Style style = context.getStyle(); String name = detail.getName(); return style.getAttribute(name); } /** * This is used to acquire the name of the element or attribute * that is used by the class schema. The name is determined by * checking for an override within the annotation. If it contains * a name then that is used, if however the annotation does not * specify a name the the field or method name is used instead. * * @return returns the name that is used for the XML property */ public String getName() throws Exception { return detail.getName(); } /** * This is used to acquire the name of the element or attribute * as taken from the annotation. If the element or attribute * explicitly specifies a name then that name is used for the * XML element or attribute used. If however no overriding name * is provided then the method or field is used for the name. * * @return returns the name of the annotation for the contact */ public String getOverride(){ return name; } /** * This is used to acquire the contact object for this label. The * contact retrieved can be used to set any object or primitive that * has been deserialized, and can also be used to acquire values to * be serialized in the case of object persistence. All contacts * that are retrieved from this method will be accessible. * * @return returns the contact that this label is representing */ public Contact getContact() { return detail.getContact(); } /** * This acts as a convenience method used to determine the type of * the contact this represents. This will be a primitive type of a * primitive type from the java.lang primitives. * * @return this returns the type of the contact class */ public Class getType() { return type; } /** * This is typically used to acquire the entry value as acquired * from the annotation. However given that the annotation this * represents does not have a entry attribute this will always * provide a null value for the entry string. * * @return this will always return null for the entry value */ public String getEntry() { return null; } /** * This is used to acquire the dependent class for this label. * This returns null as there are no dependents to the attribute * annotation as it can only hold primitives with no dependents. * * @return this is used to return the dependent type of null */ public Type getDependent() { return null; } /** * This method is used to determine if the label represents an * attribute. This is used to style the name so that elements * are styled as elements and attributes are styled as required. * * @return this is used to determine if this is an attribute */ public boolean isAttribute() { return true; } /** * This is used to determine if the label is a collection. If the * label represents a collection then any original assignment to * the field or method can be written to without the need to * create a new collection. This allows obscure collections to be * used and also allows initial entries to be maintained. * * @return true if the label represents a collection value */ public boolean isCollection() { return false; } /** * This is used to determine whether the attribute is required. * This ensures that if an attribute is missing from a document * that deserialization can continue. Also, in the process of * serialization, if a value is null it does not need to be * written to the resulting XML document. * * @return true if the label represents a some required data */ public boolean isRequired() { return label.required(); } /** * Because the attribute can contain only simple text values it * is never required to specified as anything other than text. * Therefore this will always return false as CDATA does not * apply to the attribute values. * * @return this will always return false for XML attributes */ public boolean isData() { return false; } /** * This method is used by the deserialization process to check * to see if an annotation is inline or not. If an annotation * represents an inline XML entity then the deserialization * and serialization process ignores overrides and special * attributes. By default all attributes are not inline items. * * @return this always returns false for attribute labels */ public boolean isInline() { return false; } /** * This is used to describe the annotation and method or field * that this label represents. This is used to provide error * messages that can be used to debug issues that occur when * processing a method. This will provide enough information * such that the problem can be isolated correctly. * * @return this returns a string representation of the label */ public String toString() { return detail.toString(); } } simple-xml-2.3.2/src/org/simpleframework/xml/core/MethodScanner.java0000644000175000017500000004331711342530527026413 0ustar sylvestresylvestre/* * MethodScanner.java April 2007 * * Copyright (C) 2007, Niall Gallagher * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. */ package org.simpleframework.xml.core; import static org.simpleframework.xml.DefaultType.PROPERTY; import java.lang.annotation.Annotation; import java.lang.reflect.Method; import java.util.Iterator; import java.util.LinkedHashMap; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.DefaultType; import org.simpleframework.xml.Element; import org.simpleframework.xml.ElementArray; import org.simpleframework.xml.ElementList; import org.simpleframework.xml.ElementMap; import org.simpleframework.xml.Text; import org.simpleframework.xml.Transient; import org.simpleframework.xml.Version; /** * The MethodScanner object is used to scan an object * for matching get and set methods for an XML annotation. This will * scan for annotated methods starting with the most specialized * class up the class hierarchy. Thus, annotated methods can be * overridden in a type specialization. *

* The annotated methods must be either a getter or setter method * following the Java Beans naming conventions. This convention is * such that a method must begin with "get", "set", or "is". A pair * of set and get methods for an annotation must make use of the * same type. For instance if the return type for the get method * was String then the set method must have a single * argument parameter that takes a String type. *

* For a method to be considered there must be both the get and set * methods. If either method is missing then the scanner fails with * an exception. Also, if an annotation marks a method which does * not follow Java Bean naming conventions an exception is thrown. * * @author Niall Gallagher */ class MethodScanner extends ContactList { /** * This is a factory used for creating property method parts. */ private final MethodPartFactory factory; /** * This is used to acquire the hierarchy for the class scanned. */ private final Hierarchy hierarchy; /** * This is the default access type to be used for this scanner. */ private final DefaultType access; /** * This is used to collect all the set methods from the object. */ private final PartMap write; /** * This is used to collect all the get methods from the object. */ private final PartMap read; /** * This is the type of the object that is being scanned. */ private final Class type; /** * Constructor for the MethodScanner object. This is * used to create an object that will scan the specified class * such that all bean property methods can be paired under the * XML annotation specified within the class. * * @param type this is the type that is to be scanned for methods * * @throws Exception thrown if there was a problem scanning */ public MethodScanner(Class type) throws Exception { this(type, null); } /** * Constructor for the MethodScanner object. This is * used to create an object that will scan the specified class * such that all bean property methods can be paired under the * XML annotation specified within the class. * * @param type this is the type that is to be scanned for methods * * @throws Exception thrown if there was a problem scanning */ public MethodScanner(Class type, DefaultType access) throws Exception { this.factory = new MethodPartFactory(); this.hierarchy = new Hierarchy(type); this.write = new PartMap(); this.read = new PartMap(); this.access = access; this.type = type; this.scan(type); } /** * This method is used to scan the class hierarchy for each class * in order to extract methods that contain XML annotations. If * a method is annotated it is converted to a contact so that * it can be used during serialization and deserialization. * * @param type this is the type to be scanned for methods * * @throws Exception thrown if the object schema is invalid */ private void scan(Class type) throws Exception { for(Class next : hierarchy) { scan(next, access); } for(Class next : hierarchy) { scan(next, type); } build(); validate(); } /** * This is used to scan the declared methods within the specified * class. Each method will be checked to determine if it contains * an XML element and can be used as a Contact for * an entity within the object. * * @param real this is the actual type of the object scanned * @param type this is one of the super classes for the object * * @throws Exception thrown if the class schema is invalid */ private void scan(Class type, Class real) throws Exception { Method[] list = type.getDeclaredMethods(); for(Method method : list) { scan(method); } } /** * This is used to scan all annotations within the given method. * Each annotation is checked against the set of supported XML * annotations. If the annotation is one of the XML annotations * then the method is considered for acceptance as either a * get method or a set method for the annotated property. * * @param method the method to be scanned for XML annotations * * @throws Exception if the method is not a Java Bean method */ private void scan(Method method) throws Exception { Annotation[] list = method.getDeclaredAnnotations(); for(Annotation label : list) { scan(method, label); } } /** * This is used to scan all the methods of the class in order to * determine if it should have a default annotation. If the method * should have a default XML annotation then it is added to the * list of contacts to be used to form the class schema. * * @param type this is the type to have its methods scanned * @param access this is the default access type for the class */ private void scan(Class type, DefaultType access) throws Exception { Method[] list = type.getDeclaredMethods(); if(access == PROPERTY) { for(Method method : list) { Class value = factory.getType(method); if(value != null) { process(method); } } } } /** * This reflectively checks the annotation to determine the type * of annotation it represents. If it represents an XML schema * annotation it is used to create a Contact which * can be used to represent the method within the source object. * * @param method the method that the annotation comes from * @param label the annotation used to model the XML schema * * @throws Exception if there is more than one text annotation */ private void scan(Method method, Annotation label) throws Exception { if(label instanceof Attribute) { process(method, label); } if(label instanceof ElementList) { process(method, label); } if(label instanceof ElementArray) { process(method, label); } if(label instanceof ElementMap) { process(method, label); } if(label instanceof Element) { process(method, label); } if(label instanceof Transient) { remove(method, label); } if(label instanceof Version) { process(method, label); } if(label instanceof Text) { process(method, label); } } /** * This is used to classify the specified method into either a get * or set method. If the method is neither then an exception is * thrown to indicate that the XML annotations can only be used * with methods following the Java Bean naming conventions. Once * the method is classified is is added to either the read or * write map so that it can be paired after scanning is complete. * * @param method this is the method that is to be classified * @param label this is the annotation applied to the method */ private void process(Method method, Annotation label) throws Exception { MethodPart part = factory.getInstance(method, label); MethodType type = part.getMethodType(); if(type == MethodType.GET) { process(part, read); } if(type == MethodType.IS) { process(part, read); } if(type == MethodType.SET) { process(part, write); } } /** * This is used to classify the specified method into either a get * or set method. If the method is neither then an exception is * thrown to indicate that the XML annotations can only be used * with methods following the Java Bean naming conventions. Once * the method is classified is is added to either the read or * write map so that it can be paired after scanning is complete. * * @param method this is the method that is to be classified */ private void process(Method method) throws Exception { MethodPart part = factory.getInstance(method); MethodType type = part.getMethodType(); if(type == MethodType.GET) { process(part, read); } if(type == MethodType.IS) { process(part, read); } if(type == MethodType.SET) { process(part, write); } } /** * This is used to determine whether the specified method can be * inserted into the given PartMap. This ensures * that only the most specialized method is considered, which * enables annotated methods to be overridden in subclasses. * * @param method this is the method part that is to be inserted * @param map this is the part map used to contain the method */ private void process(MethodPart method, PartMap map) { String name = method.getName(); if(name != null) { map.put(name, method); } } /** * This method is used to remove a particular method from the list * of contacts. If the Transient annotation is used * by any method then this method must be removed from the schema. * In particular it is important to remove methods if there are * defaults applied to the class. * * @param method this is the method that is to be removed * @param label this is the label associated with the method */ private void remove(Method method, Annotation label) throws Exception { MethodPart part = factory.getInstance(method, label); MethodType type = part.getMethodType(); if(type == MethodType.GET) { remove(part, read); } if(type == MethodType.IS) { remove(part, read); } if(type == MethodType.SET) { remove(part, write); } } /** * This is used to remove the method part from the specified map. * Removal is performed using the name of the method part. If it * has been scanned and added to the map then it will be removed * and will not form part of the class schema. * * @param part this is the part to be removed from the map * @param map this is the map to removed the method part from */ private void remove(MethodPart part, PartMap map) throws Exception { String name = part.getName(); if(name != null) { map.remove(name); } } /** * This method is used to pair the get methods with a matching set * method. This pairs methods using the Java Bean method name, the * names must match exactly, meaning that the case and value of * the strings must be identical. Also in order for this to succeed * the types for the methods and the annotation must also match. * * @throws Exception thrown if there is a problem matching methods */ private void build() throws Exception { for(String name : read) { MethodPart part = read.get(name); if(part != null) { build(part, name); } } } /** * This method is used to pair the get methods with a matching set * method. This pairs methods using the Java Bean method name, the * names must match exactly, meaning that the case and value of * the strings must be identical. Also in order for this to succeed * the types for the methods and the annotation must also match. * * @param read this is a get method that has been extracted * @param name this is the Java Bean methods name to be matched * * @throws Exception thrown if there is a problem matching methods */ private void build(MethodPart read, String name) throws Exception { MethodPart match = write.take(name); if(match != null) { build(read, match); } else { build(read); // read only } } /** * This method is used to create a read only contact. A read only * contact object is used when there is constructor injection used * by the class schema. So, read only methods can be used in a * fully serializable and deserializable object. * * @param read this is the part to add as a read only contact * * @throws Exception thrown if there is a problem matching methods */ private void build(MethodPart read) throws Exception { add(new MethodContact(read)); } /** * This method is used to pair the get methods with a matching set * method. This pairs methods using the Java Bean method name, the * names must match exactly, meaning that the case and value of * the strings must be identical. Also in order for this to succeed * the types for the methods and the annotation must also match. * * @param read this is a get method that has been extracted * @param write this is the write method to compare details with * * @throws Exception thrown if there is a problem matching methods */ private void build(MethodPart read, MethodPart write) throws Exception { Annotation label = read.getAnnotation(); String name = read.getName(); if(!write.getAnnotation().equals(label)) { throw new MethodException("Annotations do not match for '%s' in %s", name, type); } Class type = read.getType(); if(type != write.getType()) { throw new MethodException("Method types do not match for %s in %s", name, type); } add(new MethodContact(read, write)); } /** * This is used to validate the object once all the get methods * have been matched with a set method. This ensures that there * is not a set method within the object that does not have a * match, therefore violating the contract of a property. * * @throws Exception thrown if there is a unmatched set method */ private void validate() throws Exception { for(String name : write) { MethodPart part = write.get(name); if(part != null) { validate(part, name); } } } /** * This is used to validate the object once all the get methods * have been matched with a set method. This ensures that there * is not a set method within the object that does not have a * match, therefore violating the contract of a property. * * @param write this is a get method that has been extracted * @param name this is the Java Bean methods name to be matched * * @throws Exception thrown if there is a unmatched set method */ private void validate(MethodPart write, String name) throws Exception { MethodPart match = read.take(name); Method method = write.getMethod(); if(match == null) { throw new MethodException("No matching get method for %s in %s", method, type); } } /** * The PartMap is used to contain method parts using * the Java Bean method name for the part. This ensures that the * scanned and extracted methods can be acquired using a common * name, which should be the parsed Java Bean method name. * * @see org.simpleframework.xml.core.MethodPart */ private class PartMap extends LinkedHashMap implements Iterable{ /** * This returns an iterator for the Java Bean method names for * the MethodPart objects that are stored in the * map. This allows names to be iterated easily in a for loop. * * @return this returns an iterator for the method name keys */ public Iterator iterator() { return keySet().iterator(); } /** * This is used to acquire the method part for the specified * method name. This will remove the method part from this map * so that it can be checked later to ensure what remains. * * @param name this is the method name to get the method with * * @return this returns the method part for the given key */ public MethodPart take(String name) { return remove(name); } } }simple-xml-2.3.2/src/org/simpleframework/xml/core/CompositeMap.java0000644000175000017500000002252111342530527026253 0ustar sylvestresylvestre/* * CompositeMap.java July 2007 * * Copyright (C) 2007, Niall Gallagher * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. */ package org.simpleframework.xml.core; import java.util.Map; import org.simpleframework.xml.strategy.Type; import org.simpleframework.xml.stream.InputNode; import org.simpleframework.xml.stream.OutputNode; import org.simpleframework.xml.stream.Style; /** * The CompositeMap is used to serialize and deserialize * maps to and from a source XML document. The structure of the map in * the XML format is determined by the annotation. Keys can be either * attributes or elements, and values can be inline. This can perform * serialization and deserialization of the key and value objects * whether the object types are primitive or composite. *

 * 
 *    <map>
 *       <entry key='1'>           
 *          <value>one</value>
 *       </entry>
 *       <entry key='2'>
 *          <value>two</value>
 *       </entry>      
 *    </map>
 *    
 * 
* For the above XML element map the element entry is * used to wrap the key and value such that they can be grouped. This * element does not represent any real object. The names of each of * the XML elements serialized and deserialized can be configured. * * @author Niall Gallagher * * @see org.simpleframework.xml.core.Entry */ class CompositeMap implements Converter { /** * The factory used to create suitable map object instances. */ private final MapFactory factory; /** * This is the type that the value objects are instances of. */ private final Converter value; /** * This is the name of the entry wrapping the key and value. */ private final Converter key; /** * This is the style used to style the names used for the XML. */ private final Style style; /** * The entry object contains the details on how to write the map. */ private final Entry entry; /** * Constructor for the CompositeMap object. This will * create a converter that is capable of writing map objects to * and from XML. The resulting XML is configured by an annotation * such that key values can attributes and values can be inline. * * @param context this is the root context for the serialization * @param entry this provides configuration for the resulting XML * @param type this is the map type that is to be converted */ public CompositeMap(Context context, Entry entry, Type type) throws Exception { this.factory = new MapFactory(context, type); this.value = entry.getValue(context); this.key = entry.getKey(context); this.style = context.getStyle(); this.entry = entry; } /** * This read method will read the XML element map from * the provided node and deserialize its children as entry types. * Each entry type must contain a key and value so that the entry * can be inserted in to the map as a pair. If either the key or * value is composite it is read as a root object, which means its * Root annotation must be present and the name of the * object element must match that root element name. * * @param node this is the XML element that is to be deserialized * * @return this returns the item to attach to the object contact */ public Object read(InputNode node) throws Exception{ Instance type = factory.getInstance(node); Object map = type.getInstance(); if(!type.isReference()) { return populate(node, map); } return map; } /** * This read method will read the XML element map from * the provided node and deserialize its children as entry types. * Each entry type must contain a key and value so that the entry * can be inserted in to the map as a pair. If either the key or * value is composite it is read as a root object, which means its * Root annotation must be present and the name of the * object element must match that root element name. * * @param node this is the XML element that is to be deserialized * @param result this is the map object that is to be populated * * @return this returns the item to attach to the object contact */ public Object read(InputNode node, Object result) throws Exception { Instance type = factory.getInstance(node); if(type.isReference()) { return type.getInstance(); } type.setInstance(result); if(result != null) { return populate(node, result); } return result; } /** * This populate method will read the XML element map * from the provided node and deserialize its children as entry types. * Each entry type must contain a key and value so that the entry * can be inserted in to the map as a pair. If either the key or * value is composite it is read as a root object, which means its * Root annotation must be present and the name of the * object element must match that root element name. * * @param node this is the XML element that is to be deserialized * @param result this is the map object that is to be populated * * @return this returns the item to attach to the object contact */ private Object populate(InputNode node, Object result) throws Exception { Map map = (Map) result; while(true) { InputNode next = node.getNext(); if(next == null) { return map; } Object index = key.read(next); Object item = value.read(next); map.put(index, item); } } /** * This validate method will validate the XML element * map from the provided node and validate its children as entry * types. Each entry type must contain a key and value so that the * entry can be inserted in to the map as a pair. If either the key * or value is composite it is read as a root object, which means its * Root annotation must be present and the name of the * object element must match that root element name. * * @param node this is the XML element that is to be validate * * @return true if the element matches the XML schema class given */ public boolean validate(InputNode node) throws Exception{ Instance value = factory.getInstance(node); if(!value.isReference()) { Object result = value.setInstance(null); Class type = value.getType(); return validate(node, type); } return true; } /** * This validate method will validate the XML element * map from the provided node and validate its children as entry * types. Each entry type must contain a key and value so that the * entry can be inserted in to the map as a pair. If either the key * or value is composite it is read as a root object, which means its * Root annotation must be present and the name of the * object element must match that root element name. * * @param node this is the XML element that is to be validate * @param type this is the type to validate the input node against * * @return true if the element matches the XML schema class given */ private boolean validate(InputNode node, Class type) throws Exception { while(true) { InputNode next = node.getNext(); if(next == null) { return true; } if(!key.validate(next)) { return false; } if(!value.validate(next)) { return false; } } } /** * This write method will write the key value pairs * within the provided map to the specified XML node. This will * write each entry type must contain a key and value so that * the entry can be deserialized in to the map as a pair. If the * key or value object is composite it is read as a root object * so its Root annotation must be present. * * @param node this is the node the map is to be written to * @param source this is the source map that is to be written */ public void write(OutputNode node, Object source) throws Exception { Map map = (Map) source; for(Object index : map.keySet()) { String root = entry.getEntry(); String name = style.getElement(root); OutputNode next = node.getChild(name); Object item = map.get(index); key.write(next, index); value.write(next, item); } } } simple-xml-2.3.2/src/org/simpleframework/xml/core/ConstructorException.java0000644000175000017500000000420011342530527030051 0ustar sylvestresylvestre/* * ConstructorException.java July 2009 * * Copyright (C) 2009, Niall Gallagher * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. */ package org.simpleframework.xml.core; /** * The ConstructorException is used to represent any * errors where an annotated constructor parameter is invalid. This * is thrown when constructor injection is used and the schema is * invalid. Invalid schemas are schemas where an annotated method * or field does not match an annotated constructor parameter. * * @author Niall Gallagher */ public class ConstructorException extends PersistenceException { /** * Constructor for the ConstructorException object. * This constructor takes a format string an a variable number of * object arguments, which can be inserted into the format string. * * @param text a format string used to present the error message * @param list a list of arguments to insert into the string */ public ConstructorException(String text, Object... list) { super(text, list); } /** * Constructor for the ConstructorException object. * This constructor takes a format string an a variable number of * object arguments, which can be inserted into the format string. * * @param cause the source exception this is used to represent * @param text a format string used to present the error message * @param list a list of arguments to insert into the string */ public ConstructorException(Throwable cause, String text, Object... list) { super(cause, text, list); } }simple-xml-2.3.2/src/org/simpleframework/xml/core/Factory.java0000644000175000017500000001623011342530527025262 0ustar sylvestresylvestre/* * Factory.java July 2006 * * Copyright (C) 2006, Niall Gallagher * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. */ package org.simpleframework.xml.core; import java.lang.reflect.Modifier; import org.simpleframework.xml.strategy.Type; import org.simpleframework.xml.strategy.Value; import org.simpleframework.xml.stream.InputNode; import org.simpleframework.xml.stream.OutputNode; /** * The Factory object provides a base class for factories * used to produce field values from XML elements. The goal of this * type of factory is to make use of the Strategy object * to determine the type of the field value. The strategy class must be * assignable to the field class type, that is, it must extend it or * implement it if it represents an interface. If the strategy returns * a null Value then the subclass implementation determines * the type used to populate the object field value. * * @author Niall Gallagher */ abstract class Factory { /** * This is the context object used for the serialization process. */ protected Context context; /** * This is used to translate all of the primitive type strings. */ protected Support support; /** * This is the field type that the class must be assignable to. */ protected Type type; /** * Constructor for the Factory object. This is given * the class type for the field that this factory will determine * the actual type for. The actual type must be assignable to the * field type to insure that any instance can be set. * * @param context the contextual object used by the persister * @param type this is the property representing the field */ protected Factory(Context context, Type type) { this.support = context.getSupport(); this.context = context; this.type = type; } /** * This is used to extract the type this factory is using. Each * factory represents a specific class, which it instantiates if * required. This method provides the represented class. * * @return this returns the class represented by the factory */ public Class getType() { return type.getType(); } /** * This is used to create a default instance of the field type. It * is up to the subclass to determine how to best instantiate an * object of the field type that best suits. This is used when the * empty value is required or to create the default type instance. * * @return a type which is used to instantiate the collection */ public Object getInstance() throws Exception { Class type = getType(); if(!isInstantiable(type)) { throw new InstantiationException("Type %s can not be instantiated", type); } return type.newInstance(); } /** * This is used to get a possible override from the provided node. * If the node provided is an element then this checks for a * specific class override using the Strategy object. * If the strategy cannot resolve a class then this will return * null. If the resolved Value is not assignable to * the field then this will thrown an exception. * * @param node this is the node used to search for the override * * @return this returns null if no override type can be found * * @throws Exception if the override type is not compatible */ protected Value getOverride(InputNode node) throws Exception { Value value = getConversion(node); if(value != null) { Class type = value.getType(); Class expect = getType(); if(!isCompatible(expect, type)) { throw new InstantiationException("Type %s is not compatible with %s", type, expect); } } return value; } /** * This method is used to set the override class within an element. * This delegates to the Strategy implementation, which * depending on the implementation may add an attribute of a child * element to describe the type of the object provided to this. * * @param type this is the class of the field type being serialized * @param node the XML element that is to be given the details * * @throws Exception thrown if an error occurs within the strategy */ public boolean setOverride(Type type, Object value, OutputNode node) throws Exception { Class expect = type.getType(); if(!expect.isPrimitive()) { return context.setOverride(type, value, node); } return false; } /** * This performs the conversion from the element node to a type. This * is where the Strategy object is consulted and asked * for a class that will represent the provided XML element. This will, * depending on the strategy implementation, make use of attributes * and/or elements to determine the type for the field. * * @param node this is the element used to extract the override * * @return this returns null if no override type can be found * * @throws Exception thrown if the override class cannot be loaded */ public Value getConversion(InputNode node) throws Exception { return context.getOverride(type, node); } /** * This is used to determine whether the provided base class can be * assigned from the issued type. For an override to be compatible * with the field type an instance of the override type must be * assignable to the field value. * * @param expect this is the field value present the the object * @param type this is the specialized type that will be assigned * * @return true if the field type can be assigned the type value */ public static boolean isCompatible(Class expect, Class type) { if(expect.isArray()) { expect = expect.getComponentType(); } return expect.isAssignableFrom(type); } /** * This is used to determine whether the type given is instantiable, * that is, this determines if an instance of that type can be * created. If the type is an interface or an abstract class then * this will return false. * * @param type this is the type to check the modifiers of * * @return false if the type is an interface or an abstract class */ public static boolean isInstantiable(Class type) { int modifiers = type.getModifiers(); if(Modifier.isAbstract(modifiers)) { return false; } return !Modifier.isInterface(modifiers); } } simple-xml-2.3.2/src/org/simpleframework/xml/core/PrimitiveList.java0000644000175000017500000002154511342530527026464 0ustar sylvestresylvestre/* * PrimitiveList.java July 2006 * * Copyright (C) 2006, Niall Gallagher * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. */ package org.simpleframework.xml.core; import java.util.Collection; import org.simpleframework.xml.strategy.Type; import org.simpleframework.xml.stream.InputNode; import org.simpleframework.xml.stream.OutputNode; /** * The PrimitiveList object is used to convert an element * list to a collection of element entries. This in effect performs a * serialization and deserialization of primitive entry elements for * the collection object. On serialization each objects type must be * checked against the XML annotation entry so that it is serialized * in a form that can be deserialized. *
 *
 *    <list>
 *       <entry>example one</entry>
 *       <entry>example two</entry>
 *       <entry>example three</entry>
 *       <entry>example four</entry>
 *    </list>
 * 
 * 
* For the above XML element list the element entry is * used to wrap the primitive string value. This wrapping XML element * is configurable and defaults to the lower case string for the name * of the class it represents. So, for example, if the primitive type * is an int the enclosing element will be called int. * * @author Niall Gallagher * * @see org.simpleframework.xml.core.Primitive * @see org.simpleframework.xml.ElementList */ class PrimitiveList implements Converter { /** * This factory is used to create a suitable collection list. */ private final CollectionFactory factory; /** * This performs the serialization of the primitive element. */ private final Primitive root; /** * This is the name that each array element is wrapped with. */ private final String parent; /** * This is the type of object that will be held within the list. */ private final Type entry; /** * Constructor for the PrimitiveList object. This is * given the list type and entry type to be used. The list type is * the Collection implementation that deserialized * entry objects are inserted into. * * @param context this is the context object used for serialization * @param type this is the collection type for the list used * @param entry the primitive type to be stored within the list * @param parent this is the name to wrap the list element with */ public PrimitiveList(Context context, Type type, Type entry, String parent) { this.factory = new CollectionFactory(context, type); this.root = new Primitive(context, entry); this.parent = parent; this.entry = entry; } /** * This read method will read the XML element list from * the provided node and deserialize its children as entry types. * This will deserialize each entry type as a primitive value. In * order to do this the parent string provided forms the element. * * @param node this is the XML element that is to be deserialized * * @return this returns the item to attach to the object contact */ public Object read(InputNode node) throws Exception{ Instance type = factory.getInstance(node); Object list = type.getInstance(); if(!type.isReference()) { return populate(node, list); } return list; } /** * This read method will read the XML element map from * the provided node and deserialize its children as entry types. * Each entry type must contain a key and value so that the entry * can be inserted in to the map as a pair. If either the key or * value is composite it is read as a root object, which means its * Root annotation must be present and the name of the * object element must match that root element name. * * @param node this is the XML element that is to be deserialized * @param result this is the map object that is to be populated * * @return this returns the item to attach to the object contact */ public Object read(InputNode node, Object result) throws Exception { Instance type = factory.getInstance(node); if(type.isReference()) { return type.getInstance(); } type.setInstance(result); if(result != null) { return populate(node, result); } return result; } /** * This populate method wll read the XML element list * from the provided node and deserialize its children as entry types. * This will deserialize each entry type as a primitive value. In * order to do this the parent string provided forms the element. * * @param node this is the XML element that is to be deserialized * @param result this is the collection that is to be populated * * @return this returns the item to attach to the object contact */ private Object populate(InputNode node, Object result) throws Exception { Collection list = (Collection) result; while(true) { InputNode next = node.getNext(); if(next == null) { return list; } list.add(root.read(next)); } } /** * This validate method wll validate the XML element list * from the provided node and validate its children as entry types. * This will validate each entry type as a primitive value. In order * to do this the parent string provided forms the element. * * @param node this is the XML element that is to be deserialized * * @return true if the element matches the XML schema class given */ public boolean validate(InputNode node) throws Exception{ Instance value = factory.getInstance(node); if(!value.isReference()) { Object result = value.setInstance(null); Class expect = value.getType(); return validate(node, expect); } return true; } /** * This validate method will validate the XML element list * from the provided node and validate its children as entry types. * This will validate each entry type as a primitive value. In order * to do this the parent string provided forms the element. * * @param node this is the XML element that is to be deserialized * @param type this is the type to validate against the input node * * @return true if the element matches the XML schema class given */ private boolean validate(InputNode node, Class type) throws Exception { while(true) { InputNode next = node.getNext(); if(next == null) { return true; } root.validate(next); } } /** * This write method will write the specified object * to the given XML element as as list entries. Each entry within * the given list must be assignable to the given primitive type. * This will deserialize each entry type as a primitive value. In * order to do this the parent string provided forms the element. * * @param source this is the source object array to be serialized * @param node this is the XML element container to be populated */ public void write(OutputNode node, Object source) throws Exception { Collection list = (Collection) source; for(Object item : list) { if(item != null) { OutputNode child = node.getChild(parent); if(!isOverridden(child, item)) { root.write(child, item); } } } } /** * This is used to determine whether the specified value has been * overridden by the strategy. If the item has been overridden * then no more serialization is require for that value, this is * effectively telling the serialization process to stop writing. * * @param node the node that a potential override is written to * @param value this is the object instance to be serialized * * @return returns true if the strategy overrides the object */ private boolean isOverridden(OutputNode node, Object value) throws Exception{ return factory.setOverride(entry, value, node); } } simple-xml-2.3.2/src/org/simpleframework/xml/core/AnnotationHandler.java0000644000175000017500000001366411342530527027273 0ustar sylvestresylvestre/* * AnnotationHandler.java December 2009 * * Copyright (C) 2009, Niall Gallagher * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. */ package org.simpleframework.xml.core; import java.lang.annotation.Annotation; import java.lang.reflect.InvocationHandler; import java.lang.reflect.Method; /** * The AnnotationHandler object is used to handle all * invocation made on a synthetic annotation. This is required so * that annotations can be created without an implementation. The * java.lang.reflect.Proxy object is used to wrap this * invocation handler with the annotation interface. * * @author Niall Gallagher */ class AnnotationHandler implements InvocationHandler { /** * This is the method used to acquire the associated type. */ private static final String CLASS = "annotationType"; /** * This is used to acquire a string value for the annotation. */ private static final String STRING = "toString"; /** * This is used to perform a comparison of the annotations. */ private static final String EQUAL = "equals"; /** * This is used to perform a comparison of the annotations. */ private final Comparer comparer; /** * This is annotation type associated with this handler. */ private final Class type; /** * Constructor for the AnnotationHandler object. This * is used to create a handler for invocations on a synthetic * annotation. The annotation type wrapped must be provided. * * @param type this is the annotation type that this is wrapping */ public AnnotationHandler(Class type) { this.comparer = new Comparer(); this.type = type; } /** * This is used to handle all invocations on the wrapped annotation. * Typically the response to an invocation will result in the * default value of the annotation attribute being returned. If the * method is an equals or toString then * this will be handled by an internal implementation. * * @param proxy this is the proxy object the invocation was made on * @param method this is the method that was invoked on the proxy * @param list this is the list of parameters to be used * * @return this is used to return the result of the invocation */ public Object invoke(Object proxy, Method method, Object[] list) throws Throwable { String name = method.getName(); if(name.equals(STRING)) { return toString(); } if(name.equals(EQUAL)) { return equals(proxy, list); } if(name.equals(CLASS)) { return type; } return method.getDefaultValue(); } /** * This is used to determine if two annotations are equals based * on the attributes of the annotation. The comparison done can * ignore specific attributes, for instance the name attribute. * * @param proxy this is the annotation the invocation was made on * @param list this is the parameters provided to the invocation * * @return this returns true if the annotations are equals */ private boolean equals(Object proxy, Object[] list) throws Throwable { Annotation left = (Annotation) proxy; Annotation right = (Annotation) list[0]; return comparer.equals(left, right); } /** * This is used to build a string from the annotation. The string * produces adheres to the typical string representation of a * normal annotation. This ensures that an exceptions that are * thrown with a string representation of the annotation are * identical to those thrown with a normal annotation. * * @return returns a string representation of the annotation */ public String toString() { StringBuilder builder = new StringBuilder(); if(type != null) { name(builder); attributes(builder); } return builder.toString(); } /** * This is used to build a string from the annotation. The string * produces adheres to the typical string representation of a * normal annotation. This ensures that an exceptions that are * thrown with a string representation of the annotation are * identical to those thrown with a normal annotation. * * @param builder this is the builder used to compose the text */ private void name(StringBuilder builder) { String name = type.getName(); if(name != null) { builder.append('@'); builder.append(name); builder.append('('); } } /** * This is used to build a string from the annotation. The string * produces adheres to the typical string representation of a * normal annotation. This ensures that an exceptions that are * thrown with a string representation of the annotation are * identical to those thrown with a normal annotation. * * @param builder this is the builder used to compose the text */ private void attributes(StringBuilder builder) { Method[] list = type.getDeclaredMethods(); for(int i = 0; i < list.length; i++) { String attribute = list[i].getName(); Object value = list[i].getDefaultValue(); if(i > 0) { builder.append(','); builder.append(' '); } builder.append(attribute); builder.append('='); builder.append(value); } builder.append(')'); } }simple-xml-2.3.2/src/org/simpleframework/xml/core/PrimitiveFactory.java0000644000175000017500000001252411342530527027155 0ustar sylvestresylvestre/* * PrimitiveFactory.java July 2006 * * Copyright (C) 2006, Niall Gallagher * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. */ package org.simpleframework.xml.core; import org.simpleframework.xml.strategy.Type; import org.simpleframework.xml.strategy.Value; import org.simpleframework.xml.stream.InputNode; /** * The PrimitiveFactory object is used to create objects * that are primitive types. This creates primitives and enumerated * types when given a string value. The string value is parsed using * a matched Transform implementation. The transform is * then used to convert the object instance to an from a suitable XML * representation. Only enumerated types are not transformed using * a transform, instead they use Enum.name. * * @author Niall Gallagher * * @see org.simpleframework.xml.transform.Transformer */ class PrimitiveFactory extends Factory { /** * Constructor for the PrimitiveFactory object. This * is provided the field type that is to be instantiated. This * must be a type that contains a Transform object, * typically this is a java.lang primitive object * or one of the primitive types such as int. Also * this can be given a class for an enumerated type. * * @param context this is the context used by this factory * @param type this is the field type to be instantiated */ public PrimitiveFactory(Context context, Type type) { super(context, type); } /** * This method will instantiate an object of the field type, or if * the Strategy object can resolve a class from the * XML element then this is used instead. If the resulting type is * abstract or an interface then this method throws an exception. * * @param node this is the node to check for the override * * @return this returns an instance of the resulting type */ public Instance getInstance(InputNode node) throws Exception { Value value = getOverride(node); Class type = getType(); if(value == null) { return context.getInstance(type); } return new ObjectInstance(context, value); } /** * This will instantiate an object of the field type using the * provided string. Typically this string is transformed in to the * type using a Transform object. However, if the * values is an enumeration then its value is created using the * Enum.valueOf method. Also string values typically * do not require conversion of any form and are just returned. * * @param text this is the value to be transformed to an object * * @return this returns an instance of the field type */ public Object getInstance(String text) throws Exception { Class type = getType(); if(type == String.class) { return text; } return getInstance(text, type); } /** * This will instantiate an object of the field type using the * provided string. Typically this string is transformed in to the * type using a Transform object. However, if the * values is an enumeration then its value is created using the * Enum.valueOf method. Also string values typically * do not require conversion of any form and are just returned. * * @param text this is the value to be transformed to an object * @param type this is the type of the primitive to instantiate * * @return this returns an instance of the field type */ public Object getInstance(String text, Class type) throws Exception { if(type == String.class) { return text; } if(type.isEnum()) { return Enum.valueOf(type, text); } return support.read(text, type); } /** * This is used to acquire a text value for the specified object. * This will convert the object to a string using the transformer * so that it can be deserialized from the generate XML document. * However if the type is an Enum type then the text * value is taken from Enum.name so it can later be * deserialized easily using the enumeration class and name. * * @param source this is the object instance to get the value of * * @return this returns a string representation of the object * * @throws Exception if the object could not be transformed */ public String getText(Object source) throws Exception { Class type = source.getClass(); if(type.isEnum()) { Enum value = (Enum)source; return value.name(); } return support.write(source, type); } } simple-xml-2.3.2/src/org/simpleframework/xml/core/FieldContact.java0000644000175000017500000001751311342530527026217 0ustar sylvestresylvestre/* * FieldContact.java April 2007 * * Copyright (C) 2007, Niall Gallagher * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. */ package org.simpleframework.xml.core; import java.lang.annotation.Annotation; import java.lang.reflect.Field; import java.lang.reflect.Modifier; /** * The FieldContact object is used to act as a contact * for a field within an object. This allows a value to be set on an * object field during deserialization and acquired from the same * field during serialization. * * @author Niall Gallagher * * @see org.simpleframework.xml.core.FieldScanner */ class FieldContact implements Contact { /** * This is the label that marks the field within the object. */ private Annotation label; /** * This represents the field within the schema class object. */ private Field field; /** * This is the name for this contact as taken from the field. */ private String name; /** * This is the modifiers for the field that this represents. */ private int modifier; /** * Constructor for the FieldContact object. This is * used as a point of contact for a field within a schema class. * Values can be read and written directly to the field with this. * * @param field this is the field that is the point of contact * @param label this is the annotation that is used by the field */ public FieldContact(Field field, Annotation label) { this.modifier = field.getModifiers(); this.label = label; this.field = field; } /** * This is used to determine if the annotated contact is for a * read only variable. A read only variable is a field that * can be set from within the constructor such as a blank final * variable. It can also be a method with no set counterpart. * * @return this returns true if the contact is a constant one */ public boolean isReadOnly() { return !isStatic() && isFinal(); } /** * This is used to determine if the annotated contact is for a * static field or method. A static field or method is one that * contains the "static" keyword. Any static final fields will * be read only and does not require any matching annotation. * * @return this returns true if the contact is a static one */ public boolean isStatic() { return Modifier.isStatic(modifier); } /** * This is used to identify annotated methods are fields that * can not be modified. Such field will require that there is * a constructor that can have the value injected in to it. * * @return this returns true if the field or method is final */ public boolean isFinal() { return Modifier.isFinal(modifier); } /** * This will provide the contact type. The contact type is the * class that is to be set and get on the object. This represents * the return type for the get and the parameter for the set. * * @return this returns the type that this contact represents */ public Class getType() { return field.getType(); } /** * This provides the dependent class for the contact. This will * actually represent a generic type for the actual type. For * contacts that use a Collection type this will * be the generic type parameter for that collection. * * @return this returns the dependent type for the contact */ public Class getDependent() { return Reflector.getDependent(field); } /** * This provides the dependent classes for the contact. This will * typically represent a generic types for the actual type. For * contacts that use a Map type this will be the * generic type parameter for that map type declaration. * * @return this returns the dependent type for the contact */ public Class[] getDependents() { return Reflector.getDependents(field); } /** * This is used to acquire the name of the field. This will return * the name of the field which can then be used to determine the * XML attribute or element the contact represents. This ensures * that the name provided string is internalized for performance. * * @return this returns the name of the field represented */ public String getName() { if(name == null) { name = getName(field); } return name; } /** * This is used to acquire the name of the field such that it is * an internalized string. Internalization of the contact name * ensures that comparisons can be made to annotation names with * a simple reference comparison rather than a string comparison. * * @param field the field to acquire the internalized name from * * @return this returns the name of the string, internalized */ private String getName(Field field) { String name = field.getName(); if(name != null) { name = name.intern(); } return name; } /** * This is the annotation associated with the point of contact. * This will be an XML annotation that describes how the contact * should be serialized and deserialized from the object. * * @return this provides the annotation associated with this */ public Annotation getAnnotation() { return label; } /** * This is the annotation associated with the point of contact. * This will be an XML annotation that describes how the contact * should be serialized and deserialized from the object. * * @param type this is the type of the annotation to acquire * * @return this provides the annotation associated with this */ public T getAnnotation(Class type) { if(type == label.annotationType()) { return (T) label; } return field.getAnnotation(type); } /** * This is used to set the specified value on the provided object. * The value provided must be an instance of the contact class so * that it can be set without a runtime class compatibility error. * * @param source this is the object to set the value on * @param value this is the value that is to be set on the object */ public void set(Object source, Object value) throws Exception { if(!isFinal()) { field.set(source, value); } } /** * This is used to get the specified value on the provided object. * The value returned from this method will be an instance of the * contact class type. If the returned object is of a different * type then the serialization process will fail. * * @param source this is the object to acquire the value from * * @return this is the value that is acquired from the object */ public Object get(Object source) throws Exception { return field.get(source); } /** * This is used to describe the contact as it exists within the * owning class. It is used to provide error messages that can * be used to debug issues that occur when processing a contact. * The string provided is the generic field string. * * @return this returns a string representation of the contact */ public String toString() { return String.format("field '%s' %s", getName(), field.toString()); } } simple-xml-2.3.2/src/org/simpleframework/xml/core/ElementMapLabel.java0000644000175000017500000002705411342530527026650 0ustar sylvestresylvestre/* * ElementMapLabel.java July 2007 * * Copyright (C) 2007, Niall Gallagher * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. */ package org.simpleframework.xml.core; import org.simpleframework.xml.ElementMap; import org.simpleframework.xml.strategy.Type; import org.simpleframework.xml.stream.Style; /** * The ElementMapLabel represents a label that is used * to represent an XML element map in a class schema. This element * list label can be used to convert an XML node into a map object * of composite or primitive key value pairs. Each element converted * with the converter this creates must be an XML serializable element. * * @author Niall Gallagher * * @see org.simpleframework.xml.ElementMap */ class ElementMapLabel implements Label { /** * This is the decorator that is associated with the element. */ private Decorator decorator; /** * This references the annotation that the field uses. */ private ElementMap label; /** * This contains the details of the annotated contact object. */ private Signature detail; /** * The entry object contains the details on how to write the map. */ private Entry entry; /** * This is the type of map object this list will instantiate. */ private Class type; /** * Represents the type of objects this map object will hold. */ private Class[] items; /** * This is the name of the XML entry from the annotation. */ private String parent; /** * This is the name of the element for this label instance. */ private String name; /** * Constructor for the ElementMapLabel object. This * creates a label object, which can be used to convert an XML * node to a Map of XML serializable objects. * * @param contact this is the contact that this label represents * @param label the annotation that contains the schema details */ public ElementMapLabel(Contact contact, ElementMap label) { this.detail = new Signature(contact, this); this.decorator = new Qualifier(contact); this.entry = new Entry(contact, label); this.type = contact.getType(); this.name = label.name(); this.label = label; } /** * This is used to acquire the Decorator for this. * A decorator is an object that adds various details to the * node without changing the overall structure of the node. For * example comments and namespaces can be added to the node with * a decorator as they do not affect the deserialization. * * @return this returns the decorator associated with this */ public Decorator getDecorator() throws Exception { return decorator; } /** * This method returns a Converter which can be used to * convert an XML node into an object value and vice versa. The * converter requires only the context object in order to perform * serialization or deserialization of the provided XML node. * * @param context this is the context object for the serialization * * @return this returns an object that is used for conversion */ public Converter getConverter(Context context) throws Exception { Type type = getMap(); if(!label.inline()) { return new CompositeMap(context, entry, type); } return new CompositeInlineMap(context, entry, type); } /** * This is used to acquire the name of the element or attribute * that is used by the class schema. The name is determined by * checking for an override within the annotation. If it contains * a name then that is used, if however the annotation does not * specify a name the the field or method name is used instead. * * @param context this is the context used to style the name * * @return returns the name that is used for the XML property */ public String getName(Context context) throws Exception { Style style = context.getStyle(); String name = entry.getEntry(); if(!label.inline()) { name = detail.getName(); } return style.getElement(name); } /** * This is used to provide a configured empty value used when the * annotated value is null. This ensures that XML can be created * with required details regardless of whether values are null or * not. It also provides a means for sensible default values. * * @param context this is the context object for the serialization * * @return this returns the string to use for default values */ public Object getEmpty(Context context) throws Exception { Type map = new ClassType(type); Factory factory = new MapFactory(context, map); if(!label.empty()) { return factory.getInstance(); } return null; } /** * This is used to acquire the dependent type for the annotated * list. This will simply return the type that the map object is * composed to hold. This must be a serializable type, that is, * a type that is annotated with the Root class. * * @return this returns the component type for the map object */ public Type getDependent() throws Exception { Contact contact = getContact(); if(items == null) { items = contact.getDependents(); } if(items == null) { throw new ElementException("Unable to determine type for %s", contact); } if(items.length == 0) { return new ClassType(Object.class); } return new ClassType(items[0]); } /** * This is used to either provide the entry value provided within * the annotation or compute a entry value. If the entry string * is not provided the the entry value is calculated as the type * of primitive the object is as a simplified class name. * * @return this returns the name of the XML entry element used */ public String getEntry() throws Exception { if(detail.isEmpty(parent)) { parent = detail.getEntry(); } return parent; } /** * This is used to acquire the name of the element or attribute * that is used by the class schema. The name is determined by * checking for an override within the annotation. If it contains * a name then that is used, if however the annotation does not * specify a name the the field or method name is used instead. * * @return returns the name that is used for the XML property */ public String getName() throws Exception{ if(label.inline()) { return entry.getEntry(); } return detail.getName(); } /** * This returns the map type for this label. The primary type * is the type of the Map that this creates. The key * and value types are the types used to populate the primary. * * @return this returns the map type to use for the label */ private Type getMap() { return new ClassType(type); } /** * This acts as a convenience method used to determine the type of * contact this represents. This is used when an object is written * to XML. It determines whether a class attribute * is required within the serialized XML element, that is, if the * class returned by this is different from the actual value of the * object to be serialized then that type needs to be remembered. * * @return this returns the type of the contact class */ public Class getType() { return type; } /** * This is used to acquire the contact object for this label. The * contact retrieved can be used to set any object or primitive that * has been deserialized, and can also be used to acquire values to * be serialized in the case of object persistence. All contacts * that are retrieved from this method will be accessible. * * @return returns the contact that this label is representing */ public Contact getContact() { return detail.getContact(); } /** * This is used to acquire the name of the element or attribute * as taken from the annotation. If the element or attribute * explicitly specifies a name then that name is used for the * XML element or attribute used. If however no overriding name * is provided then the method or field is used for the name. * * @return returns the name of the annotation for the contact */ public String getOverride() { return name; } /** * This is used to determine whether the annotation requires it * and its children to be written as a CDATA block. This is done * when a primitive or other such element requires a text value * and that value needs to be encapsulated within a CDATA block. * * @return currently the element list does not require CDATA */ public boolean isData() { return label.data(); } /** * This method is used to determine if the label represents an * attribute. This is used to style the name so that elements * are styled as elements and attributes are styled as required. * * @return this is used to determine if this is an attribute */ public boolean isAttribute() { return false; } /** * This is used to determine if the label is a collection. If the * label represents a collection then any original assignment to * the field or method can be written to without the need to * create a new collection. This allows obscure collections to be * used and also allows initial entries to be maintained. * * @return true if the label represents a collection value */ public boolean isCollection() { return true; } /** * This is used to determine whether the XML element is required. * This ensures that if an XML element is missing from a document * that deserialization can continue. Also, in the process of * serialization, if a value is null it does not need to be * written to the resulting XML document. * * @return true if the label represents a some required data */ public boolean isRequired() { return label.required(); } /** * This is used to determine whether the list has been specified * as inline. If the list is inline then no overrides are needed * and the outer XML element for the list is not used. * * @return this returns whether the annotation is inline */ public boolean isInline() { return label.inline(); } /** * This is used to describe the annotation and method or field * that this label represents. This is used to provide error * messages that can be used to debug issues that occur when * processing a method. This will provide enough information * such that the problem can be isolated correctly. * * @return this returns a string representation of the label */ public String toString() { return detail.toString(); } } simple-xml-2.3.2/src/org/simpleframework/xml/core/PersistenceException.java0000644000175000017500000000424311342530527030017 0ustar sylvestresylvestre/* * PersistenceException.java July 2006 * * Copyright (C) 2006, Niall Gallagher * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. */ package org.simpleframework.xml.core; /** * The PersistenceException is thrown when there is a * persistance exception. This exception this will be thrown from the * Persister should serialization or deserialization * of an object fail. Error messages provided to this exception are * formatted similar to the PrintStream.printf method. * * @author Niall Gallagher */ public class PersistenceException extends Exception { /** * Constructor for the PersistenceException object. * This constructor takes a format string an a variable number of * object arguments, which can be inserted into the format string. * * @param text a format string used to present the error message * @param list a list of arguments to insert into the string */ public PersistenceException(String text, Object... list) { super(String.format(text, list)); } /** * Constructor for the PersistenceException object. * This constructor takes a format string an a variable number of * object arguments, which can be inserted into the format string. * * @param cause the source exception this is used to represent * @param text a format string used to present the error message * @param list a list of arguments to insert into the string */ public PersistenceException(Throwable cause, String text, Object... list) { super(String.format(text, list), cause); } } simple-xml-2.3.2/src/org/simpleframework/xml/core/Criteria.java0000644000175000017500000000535211342530527025420 0ustar sylvestresylvestre/* * Criteria.java December 2009 * * Copyright (C) 2009, Niall Gallagher * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. */ package org.simpleframework.xml.core; /** * The Criteria object represents the criteria used to * create an object and populate its methods and fields. This allows * all deserialized information for a single object to be stored in * a single location. All deserialized variables are accessible from * the get method. * * @author Niall Gallagher */ interface Criteria { /** * This is used to get the Variable that represents * a deserialized object. The variable contains all the meta * data for the field or method and the value that is to be set * on the method or field. * * @param name this is the name of the variable to be acquired * * @return this returns the named variable if it exists */ public Variable get(String name); /** * This is used to remove the Variable from this * criteria object. When removed, the variable will no longer be * used to set the method or field when the commit * method is invoked. * * @param name this is the name of the variable to be removed * * @return this returns the named variable if it exists */ public Variable remove(String name); /** * This is used to create a Variable and set it for * this criteria. The variable can be retrieved at a later stage * using the name of the label. This allows for repeat reads as * the variable can be used to acquire the labels converter. * * @param label this is the label used to create the pointer * @param value this is the value of the object to be read */ public void set(Label label, Object value) throws Exception; /** * This is used to set the values for the methods and fields of * the specified object. Invoking this performs the population * of an object being deserialized. It ensures that each value * is set after the XML element has been fully read. * * @param source this is the object that is to be populated */ public void commit(Object source) throws Exception; }simple-xml-2.3.2/src/org/simpleframework/xml/core/ScannerFactory.java0000644000175000017500000000452611342530527026601 0ustar sylvestresylvestre/* * ScannerFactory.java July 2006 * * Copyright (C) 2006, Niall Gallagher * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. */ package org.simpleframework.xml.core; /** * The ScannerFactory is used to create scanner objects * that will scan a class for its XML class schema. Caching is done * by this factory so that repeat retrievals of a Scanner * will not require repeat scanning of the class for its XML schema. * * @author Niall Gallagher * * @see org.simpleframework.xml.core.Context */ class ScannerFactory { /** * This is used to cache all schemas built to represent a class. */ private final ScannerCache cache; /** * Constructor for the ScannerFactory object. This is * used to create a factory that will create and cache scanned * data for a given class. Scanning the class is required to find * the fields and methods that have been annotated. */ public ScannerFactory() { this.cache = new ScannerCache(); } /** * This creates a Scanner object that can be used to * examine the fields within the XML class schema. The scanner * maintains information when a field from within the scanner is * visited, this allows the serialization and deserialization * process to determine if all required XML annotations are used. * * @param type the schema class the scanner is created for * * @return a scanner that can maintains information on the type * * @throws Exception if the class contains an illegal schema */ public Scanner getInstance(Class type) throws Exception { Scanner schema = cache.get(type); if(schema == null) { schema = new Scanner(type); cache.put(type, schema); } return schema; } } simple-xml-2.3.2/src/org/simpleframework/xml/core/Builder.java0000644000175000017500000001337311342530527025246 0ustar sylvestresylvestre/* * Builder.java April 2009 * * Copyright (C) 2009, Niall Gallagher * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. */ package org.simpleframework.xml.core; import java.lang.reflect.Constructor; import java.util.List; /** * The Builder object is used to represent an single * constructor within an object. It contains the actual constructor * as well as the list of parameters. Each builder will score its * weight when given a Criteria object. This allows * the deserialization process to find the most suitable one to * use when instantiating an object. * * @author Niall Gallagher */ class Builder { /** * This is the list of parameters in the order of declaration. */ private final List list; /** * This is the factory that is used to instantiate the object. */ private final Constructor factory; /** * This is the map that contains the parameters to be used. */ private final Index index; /** * Constructor for the Builder object. This is used * to create a factory like object used for instantiating objects. * Each builder will score its suitability using the parameters * it is provided. * * @param factory this is the factory used for instantiation * @param index this is the map of parameters that are declared */ public Builder(Constructor factory, Index index) { this.list = index.getParameters(); this.factory = factory; this.index = index; } /** * This is used to determine if this Builder is a * default constructor. If the class does contain a no argument * constructor then this will return true. * * @return true if the class has a default constructor */ public boolean isDefault() { return index.size() == 0; } /** * This is used to acquire the named Parameter from * the builder. A parameter is taken from the constructor which * contains annotations for each object that is required. These * parameters must have a matching field or method. * * @param name this is the name of the parameter to be acquired * * @return this returns the named parameter for the builder */ public Parameter getParameter(String name) { return index.get(name); } /** * This is used to instantiate the object using the default no * argument constructor. If for some reason the object can not be * instantiated then this will throw an exception with the reason. * * @return this returns the object that has been instantiated */ public Object getInstance() throws Exception { if(!factory.isAccessible()) { factory.setAccessible(true); } return factory.newInstance(); } /** * This is used to instantiate the object using a constructor that * takes deserialized objects as arguments. The object that have * been deserialized can be taken from the Criteria * object which contains the deserialized values. * * @param criteria this contains the criteria to be used * * @return this returns the object that has been instantiated */ public Object getInstance(Criteria criteria) throws Exception { Object[] values = list.toArray(); for(int i = 0; i < list.size(); i++) { String name = list.get(i).getName(); Variable variable = criteria.remove(name); Object value = variable.getValue(); values[i] = value; } return getInstance(values); } /** * This is used to instantiate the object using a constructor that * takes deserialized objects as arguments. The objects that have * been deserialized are provided in declaration order so they can * be passed to the constructor to instantiate the object. * * @param list this is the list of objects used for instantiation * * @return this returns the object that has been instantiated */ private Object getInstance(Object[] list) throws Exception { if(!factory.isAccessible()) { factory.setAccessible(true); } return factory.newInstance(list); } /** * This is used to score this Builder object so that * it can be weighed amongst other constructors. The builder that * scores the highest is the one that is used for instantiation. * * @param criteria this contains the criteria to be used * * @return this returns the score based on the criteria provided */ public int score(Criteria criteria) throws Exception { int score = 0; for(int i = 0; i < list.size(); i++) { String name = list.get(i).getName(); Label label = criteria.get(name); if(label == null) { return -1; } score++; } return score; } /** * This is used to acquire a descriptive name for the builder. * Providing a name is useful in debugging and when exceptions are * thrown as it describes the constructor the builder represents. * * @return this returns the name of the constructor to be used */ public String toString() { return factory.toString(); } }simple-xml-2.3.2/src/org/simpleframework/xml/core/PrimitiveKey.java0000644000175000017500000002651111342530527026277 0ustar sylvestresylvestre/* * PrimitiveKey.java July 2007 * * Copyright (C) 2007, Niall Gallagher * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. */ package org.simpleframework.xml.core; import org.simpleframework.xml.strategy.Type; import org.simpleframework.xml.stream.InputNode; import org.simpleframework.xml.stream.OutputNode; import org.simpleframework.xml.stream.Style; /** * The PrimitiveKey is used to serialize a primitive key * to and from a node. If a key name is provided in the annotation * then this will serialize and deserialize that key with the given * name, if the key is an attribute, then it is written using the * provided name. *
 * 
 *    <entry key="one">example one</entry>
 *    <entry key="two">example two</entry>
 *    <entry key="three">example three</entry>    
 * 
 * 
* Allowing the key to be written as either an XML attribute or an * element enables a more flexible means for representing the key. * Composite elements can not be used as attribute values as they do * not serialize to a string. Primitive keys as elements can be * maintained as references using the cycle strategy. * * @author Niall Gallagher * * @see org.simpleframework.xml.core.CompositeMap */ class PrimitiveKey implements Converter { /** * The primitive factory used to resolve the primitive to a string. */ private final PrimitiveFactory factory; /** * This is the context used to support the serialization process. */ private final Context context; /** * The primitive converter used to read the key from the node. */ private final Primitive root; /** * This is the style used to style the XML elements for the key. */ private final Style style; /** * The entry object contains the details on how to write the key. */ private final Entry entry; /** * Represents the primitive type the key is serialized to and from. */ private final Type type; /** * Constructor for the PrimitiveKey object. This is * used to create the key object which converts the map key to an * instance of the key type. This can also resolve references. * * @param context this is the context object used for serialization * @param entry this is the entry object that describes entries * @param type this is the type that this converter deals with */ public PrimitiveKey(Context context, Entry entry, Type type) { this.factory = new PrimitiveFactory(context, type); this.root = new Primitive(context, type); this.style = context.getStyle(); this.context = context; this.entry = entry; this.type = type; } /** * This method is used to read the key value from the node. The * value read from the node is resolved using the template filter. * If the key value can not be found according to the annotation * attributes then an exception is thrown. * * @param node this is the node to read the key value from * * @return this returns the value deserialized from the node */ public Object read(InputNode node) throws Exception { Class expect = type.getType(); String name = entry.getKey(); if(name == null) { name = context.getName(expect); } if(!entry.isAttribute()) { return readElement(node, name); } return readAttribute(node, name); } /** * This method is used to read the key value from the node. The * value read from the node is resolved using the template filter. * If the key value can not be found according to the annotation * attributes then an exception is thrown. * * @param node this is the node to read the key value from * @param value this is the value to deserialize in to * * @return this returns the value deserialized from the node * * @throws Exception if value is not null an exception is thrown */ public Object read(InputNode node, Object value) throws Exception { Class expect = type.getType(); if(value != null) { throw new PersistenceException("Can not read key of %s", expect); } return read(node); } /** * This method is used to read the key value from the node. The * value read from the node is resolved using the template filter. * If the key value can not be found according to the annotation * attributes then an null is assumed and returned. * * @param node this is the node to read the key value from * @param key this is the name of the attribute used by the key * * @return this returns the value deserialized from the node */ private Object readAttribute(InputNode node, String key) throws Exception { String name = style.getAttribute(key); InputNode child = node.getAttribute(name); if(child == null) { return null; } return root.read(child); } /** * This method is used to read the key value from the node. The * value read from the node is resolved using the template filter. * If the key value can not be found according to the annotation * attributes then null is assumed and returned. * * @param node this is the node to read the key value from * @param key this is the name of the element used by the key * * @return this returns the value deserialized from the node */ private Object readElement(InputNode node, String key) throws Exception { String name = style.getElement(key); InputNode child = node.getNext(name); if(child == null) { return null; } return root.read(child); } /** * This method is used to read the key value from the node. The * value read from the node is resolved using the template filter. * If the key value can not be found according to the annotation * attributes then the node is considered as null and is valid. * * @param node this is the node to read the key value from * * @return this returns the value deserialized from the node */ public boolean validate(InputNode node) throws Exception { Class expect = type.getType(); String name = entry.getKey(); if(name == null) { name = context.getName(expect); } if(!entry.isAttribute()) { return validateElement(node, name); } return validateAttribute(node, name); } /** * This method is used to read the key value from the node. The * value read from the node is resolved using the template filter. * If the key value can not be found according to the annotation * attributes then the node is considered as null and is valid. * * @param node this is the node to read the key value from * @param key this is the name of the attribute used by the key * * @return this returns the value deserialized from the node */ private boolean validateAttribute(InputNode node, String key) throws Exception { String name = style.getElement(key); InputNode child = node.getAttribute(name); if(child == null) { return true; } return root.validate(child); } /** * This method is used to read the key value from the node. The * value read from the node is resolved using the template filter. * If the key value can not be found according to the annotation * attributes then the node is considered as null and is valid. * * @param node this is the node to read the key value from * @param key this is the name of the element used by the key * * @return this returns the value deserialized from the node */ private boolean validateElement(InputNode node, String key) throws Exception { String name = style.getElement(key); InputNode child = node.getNext(name); if(child == null) { return true; } return root.validate(child); } /** * This method is used to write the value to the specified node. * The value written to the node can be an attribute or an element * depending on the annotation attribute values. This method will * maintain references for serialized elements. * * @param node this is the node that the value is written to * @param item this is the item that is to be written */ public void write(OutputNode node, Object item) throws Exception { if(!entry.isAttribute()) { writeElement(node, item); } else if(item != null) { writeAttribute(node, item); } } /** * This method is used to write the value to the specified node. * This will write the item as an element to the provided node, * also this enables references to be used during serialization. * * @param node this is the node that the value is written to * @param item this is the item that is to be written */ private void writeElement(OutputNode node, Object item) throws Exception { Class expect = type.getType(); String key = entry.getKey(); if(key == null) { key = context.getName(expect); } String name = style.getElement(key); OutputNode child = node.getChild(name); if(item != null) { if(!isOverridden(child, item)) { root.write(child, item); } } } /** * This method is used to write the value to the specified node. * This will write the item as an attribute to the provided node, * the name of the attribute is taken from the annotation. * * @param node this is the node that the value is written to * @param item this is the item that is to be written */ private void writeAttribute(OutputNode node, Object item) throws Exception { Class expect = type.getType(); String text = factory.getText(item); String key = entry.getKey(); if(key == null) { key = context.getName(expect); } String name = style.getAttribute(key); if(text != null) { node.setAttribute(name, text); } } /** * This is used to determine whether the specified value has been * overridden by the strategy. If the item has been overridden * then no more serialization is require for that value, this is * effectively telling the serialization process to stop writing. * * @param node the node that a potential override is written to * @param value this is the object instance to be serialized * * @return returns true if the strategy overrides the object */ private boolean isOverridden(OutputNode node, Object value) throws Exception{ return factory.setOverride(type, value, node); } } simple-xml-2.3.2/src/org/simpleframework/xml/core/ElementMapParameter.java0000644000175000017500000001223511342530527027544 0ustar sylvestresylvestre/* * ElementMapParameter.java July 2009 * * Copyright (C) 2009, Niall Gallagher * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. */ package org.simpleframework.xml.core; import java.lang.annotation.Annotation; import java.lang.reflect.Constructor; import org.simpleframework.xml.ElementMap; /** * The ElementMapParameter represents a constructor * parameter. It contains the XML annotation used on the parameter * as well as the name of the parameter and its position index. * A parameter is used to validate against the annotated methods * and fields and also to determine the deserialized values that * should be injected in to the constructor to instantiate it. * * @author Niall Gallagher */ class ElementMapParameter implements Parameter { /** * This is the constructor the parameter was declared in. */ private final Constructor factory; /** * This is the contact used to determine the parameter name. */ private final Contact contact; /** * This is the label that will create the parameter name. */ private final Label label; /** * This is the actual name that has been determined. */ private final String name; /** * This is the index that the parameter was declared at. */ private final int index; /** * Constructor for the ElementMapParameter object. * This is used to create a parameter that can be used to * determine a consistent name using the provided XML annotation. * * @param factory this is the constructor the parameter is in * @param value this is the annotation used for the parameter * @param index this is the index the parameter appears at */ public ElementMapParameter(Constructor factory, ElementMap value, int index) throws Exception { this.contact = new Contact(value, factory, index); this.label = new ElementMapLabel(contact, value); this.name = label.getName(); this.factory = factory; this.index = index; } /** * This is used to acquire the name of the parameter that this * represents. The name is determined using annotation and * the name attribute of that annotation, if one is provided. * * @return this returns the name of the annotated parameter */ public String getName() { return name; } /** * This is used to acquire the annotated type class. The class * is the type that is to be deserialized from the XML. This * is used to validate against annotated fields and methods. * * @return this returns the type used for the parameter */ public Class getType() { return factory.getParameterTypes()[index]; } /** * This is used to acquire the annotation that is used for the * parameter. The annotation provided will be an XML annotation * such as the Element or Attribute * annotation. * * @return this returns the annotation used on the parameter */ public Annotation getAnnotation() { return contact.getAnnotation(); } /** * This returns the index position of the parameter in the * constructor. This is used to determine the order of values * that are to be injected in to the constructor. * * @return this returns the index for the parameter */ public int getIndex() { return index; } /** * The Contact represents a contact object that is * to be used for a label in order to extract a parameter name. * The parameter name is taken from the XML annotation. * * @author Niall Gallagher */ private static class Contact extends ParameterContact { /** * Constructor for the Contact object. This is * used to create an object that acts like an adapter so that * the label can create a consistent name for the parameter. * * @param label this is the annotation for the parameter * @param factory this is the constructor the parameter is in * @param index this is the index for the parameter */ public Contact(ElementMap label, Constructor factory, int index) { super(label, factory, index); } /** * This returns the name of the parameter as taken from the XML * annotation. The name provided here is taken by the label * and used to compose a name consistent with how fields and * methods are named by the system. * * @return this returns the name of the annotated parameter */ public String getName() { return label.name(); } } }simple-xml-2.3.2/src/org/simpleframework/xml/core/ConstructorCache.java0000644000175000017500000000314611342530527027126 0ustar sylvestresylvestre/* * ConstructorCache.java July 2006 * * Copyright (C) 2006, Niall Gallagher * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. */ package org.simpleframework.xml.core; import java.lang.reflect.Constructor; import java.util.concurrent.ConcurrentHashMap; /** * The ConstructorCache object is a typed hash map used * to store the constructors used in converting a primitive type to * a primitive value using a string. This cache is used to reduce the * time taken to convert the primitives by reducing the amount of * reflection required and eliminate type resolution. * * @author Niall Gallagher * * @see org.simpleframework.xml.core.PrimitiveFactory */ class ConstructorCache extends ConcurrentHashMap { /** * Constructor for the ConstructorCache object. It * is used to create a typed hash table that can be used to map * the constructors used to convert strings to primitive types. * If the class is unloaded then the cached constructor is lost. */ public ConstructorCache() { super(); } } simple-xml-2.3.2/src/org/simpleframework/xml/core/TemplateEngine.java0000644000175000017500000001443611342530527026562 0ustar sylvestresylvestre/* * TemplateEngine.java May 2005 * * Copyright (C) 2005, Niall Gallagher * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. */ package org.simpleframework.xml.core; import org.simpleframework.xml.filter.Filter; /** * The TemplateEngine object is used to create strings * which have system variable names replaced with their values. * This is used by the Source context object to ensure * that values taken from an XML element or attribute can be values * values augmented with system or environment variable values. *
 *
 *    tools=${java.home}/lib/tools.jar
 * 
 * 
* Above is an example of the use of an system variable that * has been inserted into a plain Java properties file. This will * be converted to the full path to tools.jar when the system * variable "java.home" is replaced with the matching value. * * @author Niall Gallagher */ class TemplateEngine { /** * This is used to store the text that are to be processed. */ private Template source; /** * This is used to accumulate the bytes for the variable name. */ private Template name; /** * This is used to accumulate the transformed text value. */ private Template text; /** * This is the filter used to replace templated variables. */ private Filter filter; /** * This is used to keep track of the buffer seek offset. */ private int off; /** * Constructor for the TemplateEngine object. This is * used to create a parsing buffer, which can be used to replace * filter variable names with their corrosponding values. * * @param filter this is the filter used to provide replacements */ public TemplateEngine(Filter filter) { this.source = new Template(); this.name = new Template(); this.text = new Template(); this.filter = filter; } /** * This method is used to append the provided text and then it * converts the buffered text to return the corrosponding text. * The contents of the buffer remain unchanged after the value * is buffered. It must be cleared if used as replacement only. * * @param value this is the value to append to the buffer * * @return returns the value of the buffer after the append */ public String process(String value) { if(value.indexOf('$') < 0) { return value; } try { source.append(value); parse(); return text.toString(); }finally { clear(); } } /** * This extracts the value from the Java properties text. This * will basically ready any text up to the first occurance of * an equal of a terminal. If a terminal character is read * this returns without adding the terminal to the value. */ private void parse(){ while(off < source.count){ char next = source.buf[off++]; if(next == '$') { if(off < source.count) if(source.buf[off++] == '{') { name(); continue; } else { off--; } } text.append(next); } } /** * This method is used to extract text from the property value * that matches the pattern "${ *TEXT }". Such patterns within * the properties file are considered to be system * variables, this will replace instances of the text pattern * with the matching system variable, if a matching * variable does not exist the value remains unmodified. */ private void name() { while(off < source.count) { char next = source.buf[off++]; if(next == '}') { replace(); break; } else { name.append(next); } } if(name.length() >0){ text.append("${"); text.append(name); } } /** * This will replace the accumulated for an system variable * name with the value of that system variable. If a value * does not exist for the variable name, then the name is put * into the value so that the value remains unmodified. */ private void replace() { if(name.length() > 0) { replace(name); } name.clear(); } /** * This will replace the accumulated for an system variable * name with the value of that system variable. If a value * does not exist for the variable name, then the name is put * into the value so that the value remains unmodified. * * @param name this is the name of the system variable */ private void replace(Template name) { replace(name.toString()); } /** * This will replace the accumulated for an system variable * name with the value of that system variable. If a value * does not exist for the variable name, then the name is put * into the value so that the value remains unmodified. * * @param name this is the name of the system variable */ private void replace(String name) { String value = filter.replace(name); if(value == null) { text.append("${"); text.append(name); text.append("}"); }else { text.append(value); } } /** * This method is used to clear the contents of the buffer. This * includes the contents of all buffers used to transform the * value of the buffered text with system variable values. * Once invoked the instance can be reused as a clean buffer. */ public void clear() { name.clear(); text.clear(); source.clear(); off = 0; } } simple-xml-2.3.2/src/org/simpleframework/xml/core/SetPart.java0000644000175000017500000001354411342530527025242 0ustar sylvestresylvestre/* * SetPart.java April 2007 * * Copyright (C) 2007, Niall Gallagher * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. */ package org.simpleframework.xml.core; import java.lang.annotation.Annotation; import java.lang.reflect.Method; /** * The SetPart object represents the setter method for * a Java Bean property. This composes the set part of the method * contact for an object. The set part contains the method that is * used to set the value on an object and the annotation that tells * the deserialization process how to deserialize the value. * * @author Niall Gallagher * * @see org.simpleframework.xml.core.MethodContact */ class SetPart implements MethodPart { /** * This is the annotation for the set method provided. */ private final Annotation label; /** * This represents the method type for the set part method. */ private final MethodType type; /** * This method is used to set the value during deserialization. */ private final Method method; /** * This represents the name of this set part instance. */ private final String name; /** * Constructor for the SetPart object. This is * used to create a method part that will provide a means for * the deserialization process to set a value to a object. * * @param method the method that is used to set the value * @param label this describes how to deserialize the value */ public SetPart(MethodName method, Annotation label) { this.method = method.getMethod(); this.name = method.getName(); this.type = method.getType(); this.label = label; } /** * This provides the name of the method part as acquired from the * method name. The name represents the Java Bean property name * of the method and is used to pair getter and setter methods. * * @return this returns the Java Bean name of the method part */ public String getName() { return name; } /** * This is used to acquire the type for this method part. This * is used by the serializer to determine the schema class that * is used to match the XML elements to the object details. * * @return this returns the schema class for this method */ public Class getType() { return method.getParameterTypes()[0]; } /** * This is used to acquire the dependent class for the method * part. The dependent type is the type that represents the * generic type of the type. This is used when collections are * annotated as it allows a default entry class to be taken * from the generic information provided. * * @return this returns the generic dependent for the type */ public Class getDependent() { return Reflector.getParameterDependent(method, 0); } /** * This is used to acquire the dependent classes for the method * part. The dependent types are the types that represents the * generic types of the type. This is used when collections are * annotated as it allows a default entry classes to be taken * from the generic information provided. * * @return this returns the generic dependents for the type */ public Class[] getDependents() { return Reflector.getParameterDependents(method, 0); } /** * This is used to acquire the annotation that was used to label * the method this represents. This acts as a means to match the * set method with the get method using an annotation comparison. * * @return this returns the annotation used to mark the method */ public Annotation getAnnotation() { return label; } /** * This is the annotation associated with the point of contact. * This will be an XML annotation that describes how the contact * should be serialized and deserialized from the object. * * @param type this is the type of the annotation to acquire * * @return this provides the annotation associated with this */ public T getAnnotation(Class type) { return method.getAnnotation(type); } /** * This is the method type for the method part. This is used in * the scanning process to determine which type of method a * instance represents, this allows set and get methods to be * paired. * * @return the method type that this part represents */ public MethodType getMethodType() { return type; } /** * This is used to acquire the method that can be used to invoke * the Java Bean method on the object. If the method represented * by this is inaccessible then this will set it as accessible. * * @return returns the method used to interface with the object */ public Method getMethod() { if(!method.isAccessible()) { method.setAccessible(true); } return method; } /** * This is used to describe the method as it exists within the * owning class. This is used to provide error messages that can * be used to debug issues that occur when processing a method. * This returns the method as a generic string representation. * * @return this returns a string representation of the method */ public String toString() { return method.toGenericString(); } } simple-xml-2.3.2/src/org/simpleframework/xml/core/Traverser.java0000644000175000017500000002521211342530527025630 0ustar sylvestresylvestre/* * Traverser.java July 2006 * * Copyright (C) 2006, Niall Gallagher * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. */ package org.simpleframework.xml.core; import org.simpleframework.xml.strategy.Type; import org.simpleframework.xml.stream.InputNode; import org.simpleframework.xml.stream.OutputNode; import org.simpleframework.xml.stream.Style; /** * The Traverser object is used to traverse the XML class * schema and either serialize or deserialize an object. This is the * root of all serialization and deserialization operations. It uses * the Root annotation to ensure that the XML schema * matches the provided XML element. If no root element is defined the * serialization and deserialization cannot be performed. * * @author Niall Gallagher */ class Traverser { /** * This is the context object used for the traversal performed. */ private final Context context; /** * This is the style that is used to style the XML roots. */ private final Style style; /** * Constructor for the Traverser object. This creates * a traverser that can be used to perform serialization or * or deserialization of an object. This requires a source object. * * @param context the context object used for the traversal */ public Traverser(Context context) { this.style = context.getStyle(); this.context = context; } /** * This will acquire the Decorator for the type. * A decorator is an object that adds various details to the * node without changing the overall structure of the node. For * example comments and namespaces can be added to the node with * a decorator as they do not affect the deserialization. * * @param type this is the type to acquire the decorator for * * @return this returns the decorator associated with this */ private Decorator getDecorator(Class type) throws Exception { return context.getDecorator(type); } /** * This read method is used to deserialize an object * from the provided XML element. The class provided acts as the * XML schema definition used to control the deserialization. If * the XML schema does not have a Root annotation * this throws an exception. Also if the root annotation name is * not the same as the XML element name an exception is thrown. * * @param node this is the node that is to be deserialized * @param type this is the XML schema class to be used * * @return an object deserialized from the XML element * * @throws Exception if the XML schema does not match the node */ public Object read(InputNode node, Class type) throws Exception { Composite factory = getComposite(type); Object value = factory.read(node); if(value != null) { Class real = value.getClass(); return read(node, real, value); } return null; } /** * This read method will read the contents of the XML * document from the provided source and populate the object with * the values deserialized. This is used as a means of injecting an * object with values deserialized from an XML document. If the * XML source cannot be deserialized or there is a problem building * the object graph an exception is thrown. * * @param node this is the node that is to be deserialized * @param value this is the value that is to be deserialized * * @return an object deserialized from the XML element * * @throws Exception if the XML schema does not match the node */ public Object read(InputNode node, Object value) throws Exception { Class type = value.getClass(); Composite factory = getComposite(type); Object real = factory.read(node, value); return read(node, type, real); } /** * This read method is used to deserialize an object * from the provided XML element. The class provided acts as the * XML schema definition used to control the deserialization. If * the XML schema does not have a Root annotation * this throws an exception. Also if the root annotation name is * not the same as the XML element name an exception is thrown. * * @param node this is the node that is to be deserialized * @param value this is the XML schema object to be used * * @return an object deserialized from the XML element * * @throws Exception if the XML schema does not match the XML */ private Object read(InputNode node, Class type, Object value) throws Exception { String root = getName(type); if(root == null) { throw new RootException("Root annotation required for %s", type); } return value; } /** * This validate method will validate the contents of * the XML document against the specified XML class schema. This is * used to perform a read traversal of the class schema such that * the document can be tested against it. This is preferred to * reading the document as it does not instantiate the objects or * invoke any callback methods, thus making it a safe validation. * * @param type this is the class type to be validated against XML * @param node this provides the source of the XML document * * @return true if the document matches the class XML schema * * @throws Exception if the class XML schema does not fully match */ public boolean validate(InputNode node, Class type) throws Exception { Composite factory = getComposite(type); String root = getName(type); if(root == null) { throw new RootException("Root annotation required for %s", type); } return factory.validate(node); } /** * This write method is used to convert the provided * object to an XML element. This creates a child node from the * given OutputNode object. Once this child element * is created it is populated with the fields of the source object * in accordance with the XML schema class. * * @param source this is the object to be serialized to XML * * @throws Exception thrown if there is a problem serializing */ public void write(OutputNode node, Object source) throws Exception { write(node, source, source.getClass()); } /** * This write method is used to convert the provided * object to an XML element. This creates a child node from the * given OutputNode object. Once this child element * is created it is populated with the fields of the source object * in accordance with the XML schema class. * * @param source this is the object to be serialized to XML * @param expect this is the class that is expected to be written * * @throws Exception thrown if there is a problem serializing */ public void write(OutputNode node, Object source, Class expect) throws Exception { Class type = source.getClass(); String root = getName(type); if(root == null) { throw new RootException("Root annotation required for %s", type); } write(node, source, expect, root); } /** * This write method is used to convert the provided * object to an XML element. This creates a child node from the * given OutputNode object. Once this child element * is created it is populated with the fields of the source object * in accordance with the XML schema class. * * @param source this is the object to be serialized to XML * @param expect this is the class that is expected to be written * @param name this is the name of the root annotation used * * @throws Exception thrown if there is a problem serializing */ public void write(OutputNode node, Object source, Class expect, String name) throws Exception { OutputNode child = node.getChild(name); Type type = getType(expect); if(source != null) { Class actual = source.getClass(); if(!context.setOverride(type, source, child)) { Converter convert = getComposite(actual); Decorator decorator = getDecorator(actual); decorator.decorate(child); convert.write(child, source); } } child.commit(); } /** * This will create a Composite object using the XML * schema class provided. This makes use of the source object that * this traverser has been given to create a composite converter. * * @param expect this is the XML schema class to be used * * @return a converter for the specified XML schema class */ private Composite getComposite(Class expect) throws Exception { Type type = getType(expect); if(expect == null) { throw new RootException("Can not instantiate null class"); } return new Composite(context, type); } /** * This is used to acquire a type for the provided class. This will * wrap the class in a Type wrapper object. Wrapping * the class allows it to be used within the framework. * * @param type this is the type that is to be wrapped for use * * @return this returns the type that wraps the specified class */ private Type getType(Class type) { return new ClassType(type); } /** * Extracts the Root annotation from the provided XML * schema class. If no annotation exists in the provided class the * super class is checked and so on until the Object * is encountered, if no annotation is found this returns null. * * @param type this is the XML schema class to use * * @return this returns the root annotation for the XML schema */ protected String getName(Class type) throws Exception { String root = context.getName(type); String name = style.getElement(root); return name; } } simple-xml-2.3.2/src/org/simpleframework/xml/core/Signature.java0000644000175000017500000001767111342530527025626 0ustar sylvestresylvestre/* * Signature.java February 2005 * * Copyright (C) 2005, Niall Gallagher * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. */ package org.simpleframework.xml.core; import java.lang.annotation.Annotation; import org.simpleframework.xml.Root; import org.simpleframework.xml.strategy.Type; /** * The Signature object is used to determine the details * to use for an annotated field or method using both the field an * annotation details. This allows defaults to be picked up from the * method or field type if that have not been explicitly overridden * in the annotation. * * @author Niall Gallagher */ class Signature { /** * This is the actual annotation from the specified contact. */ private Annotation marker; /** * This is the field or method contact that has been annotated. */ private Contact contact; /** * This is the label used to expose the annotation details. */ private Label label; /** * Constructor for the Signature object. This is * used to create an object that will use information available * within the field and annotation to determine exactly what * the name of the XML element is to be and the type to use. * * @param contact this is the method or field contact used * @param label this is the annotation on the contact object */ public Signature(Contact contact, Label label) { this.marker = contact.getAnnotation(); this.contact = contact; this.label = label; } /** * This is used to acquire the Contact for this. The * contact is the actual method or field that has been annotated * and is used to set or get information from the object instance. * * @return the method or field that this signature represents */ public Contact getContact() { return contact; } /** * This returns the dependent type for the annotation. This type * is the type other than the annotated field or method type that * the label depends on. For the ElementList this * can be the generic parameter to an annotated collection type. * * @return this is the type that the annotation depends on */ public Type getDependent() throws Exception { return label.getDependent(); } /** * This method is used to get the entry name of a label using * the type of the label. This ensures that if there is no * entry XML element name declared by the annotation that a * suitable name can be calculated from the annotated type. * * @return this returns a suitable XML entry element name */ public String getEntry() throws Exception { Type depend = getDependent(); Class type = depend.getType(); if(type.isArray()) { type = type.getComponentType(); } String name = getName(type); if(name == null) { return null; } return name.intern(); } /** * This is used to acquire the name of the specified type using * the Root annotation for the class. This will * use either the name explicitly provided by the annotation or * it will use the name of the class that the annotation was * placed on if there is no explicit name for the root. * * @param type this is the type to acquire the root name for * * @return this returns the name of the type from the root * * @throws Exception if the class contains an illegal schema */ private String getName(Class type) throws Exception { String name = getRoot(type); if(name != null) { return name; } else { name = type.getSimpleName(); } return Support.getName(name); } /** * This will acquire the name of the Root annotation * for the specified class. This will traverse the inheritance * hierarchy looking for the root annotation, when it is found it * is used to acquire a name for the XML element it represents. * * @param type this is the type to acquire the root name with * * @return the root name for the specified type if it exists */ private String getRoot(Class type) { Class real = type; while(type != null) { String name = getRoot(real, type); if(name != null) { return name; } type = type.getSuperclass(); } return null; } /** * This will acquire the name of the Root annotation * for the specified class. This will traverse the inheritance * hierarchy looking for the root annotation, when it is found it * is used to acquire a name for the XML element it represents. * * @param real the actual type of the object being searched * @param type this is the type to acquire the root name with * * @return the root name for the specified type if it exists */ private String getRoot(Class real, Class type) { String name = type.getSimpleName(); if(type.isAnnotationPresent(Root.class)) { Root root = type.getAnnotation(Root.class); String text = root.name(); if(!isEmpty(text)) { return text; } return Support.getName(name); } return null; } /** * This is used to determine the name of the XML element that the * annotated field or method represents. This will determine based * on the annotation attributes and the dependent type required * what the name of the XML element this represents is. * * @return this returns the name of the XML element expected */ public String getName() throws Exception { String entry = label.getEntry(); if(!label.isInline()) { entry = getDefault(); } return entry.intern(); } /** * This is used to acquire the name for an element by firstly * checking for an override in the annotation. If one exists * then this is returned if not then the name of the field * or method contact is returned. * * @return this returns the XML element name to be used */ private String getDefault() throws Exception { String name = label.getOverride(); if(!isEmpty(name)) { return name; } return contact.getName(); } /** * This method is used to determine if a root annotation value is * an empty value. Rather than determining if a string is empty * be comparing it to an empty string this method allows for the * value an empty string represents to be changed in future. * * @param value this is the value to determine if it is empty * * @return true if the string value specified is an empty value */ public boolean isEmpty(String value) { if(value != null) { return value.length() == 0; } return true; } /** * This method is used to construct a string that describes the * signature of an XML annotated field or method. This will use * the Contact object and the annotation used for * that contact to construct a string that has sufficient * information such that it can be used in error reporting. * * @return returns a string used to represent this signature */ public String toString() { return String.format("%s on %s", marker, contact); } } simple-xml-2.3.2/src/org/simpleframework/xml/core/ObjectFactory.java0000644000175000017500000000540311342530527026411 0ustar sylvestresylvestre/* * ObjectFactory.java July 2006 * * Copyright (C) 2006, Niall Gallagher * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. */ package org.simpleframework.xml.core; import org.simpleframework.xml.strategy.Type; import org.simpleframework.xml.strategy.Value; import org.simpleframework.xml.stream.InputNode; /** * The ObjectFactory is the most basic factory. This will * basically check to see if there is an override type within the XML * node provided, if there is then that is instantiated, otherwise the * field type is instantiated. Any type created must have a default * no argument constructor. If the override type is an abstract class * or an interface then this factory throws an exception. * * @author Niall Gallagher */ class ObjectFactory extends PrimitiveFactory { /** * Constructor for the ObjectFactory class. This is * given the field class that this should create object instances * of. If the field type is abstract then the XML node must have * sufficient information for the Strategy object to * resolve the implementation class to be instantiated. * * @param context the contextual object used by the persister * @param type this is the object type to use for this factory */ public ObjectFactory(Context context, Type type) { super(context, type); } /** * This method will instantiate an object of the field type, or if * the Strategy object can resolve a class from the * XML element then this is used instead. If the resulting type is * abstract or an interface then this method throws an exception. * * @param node this is the node to check for the override * * @return this returns an instance of the resulting type */ @Override public Instance getInstance(InputNode node) throws Exception { Value value = getOverride(node); Class type = getType(); if(value == null) { if(!isInstantiable(type)) { throw new InstantiationException("Cannot instantiate %s", type); } return context.getInstance(type); } return new ObjectInstance(context, value); } } simple-xml-2.3.2/src/org/simpleframework/xml/core/Index.java0000644000175000017500000000547411342530527024732 0ustar sylvestresylvestre/* * Index.java April 2009 * * Copyright (C) 2009, Niall Gallagher * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. */ package org.simpleframework.xml.core; import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.List; /** * The Index object is used to represent an index * of parameters iterable in declaration order. This is used so * that parameters can be acquired by name for validation. It is * also used to create an array of Parameter objects * that can be used to acquire the correct deserialized values * to use in order to instantiate the object. * * @author Niall Gallagher */ class Index extends LinkedHashMap { /** * This is the type that the parameters are created for. */ private final Class type; /** * Constructor for the Index object. This is * used to create a hash map that can be used to acquire * parameters by name. It also provides the parameters in * declaration order within a for each loop. * * @param type this is the type the map is created for */ public Index(Class type) { this.type = type; } /** * This is used to acquire a Parameter using the * position of that parameter within the constructor. This * allows a builder to determine which parameters to use.. * * @param ordinal this is the position of the parameter * * @return this returns the parameter for the position */ public Parameter getParameter(int ordinal) { return getParameters().get(ordinal); } /** * This is used to acquire an list of Parameter * objects in declaration order. This list will help with the * resolution of the correct constructor for deserialization * of the XML. It also provides a faster method of iteration. * * @return this returns the parameters in declaration order */ public List getParameters() { return new ArrayList(values()); } /** * This is the type that this class map represents. It can be * used to determine where the parameters stored are declared. * * @return returns the type that the parameters are created for */ public Class getType() { return type; } }simple-xml-2.3.2/src/org/simpleframework/xml/core/MethodContact.java0000644000175000017500000001702511342530527026412 0ustar sylvestresylvestre/* * MethodContact.java April 2007 * * Copyright (C) 2007, Niall Gallagher * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. */ package org.simpleframework.xml.core; import java.lang.annotation.Annotation; import java.lang.reflect.Method; /** * The MethodContact object is acts as a contact that * can set and get data to and from an object using methods. This * requires a get method and a set method that share the same class * type for the return and parameter respectively. * * @author Niall Gallagher * * @see org.simpleframework.xml.core.MethodScanner */ class MethodContact implements Contact { /** * This is the label that marks both the set and get methods. */ private Annotation label; /** * This is the set method which is used to set the value. */ private MethodPart set; /** * This is the dependent types as taken from the get method. */ private Class[] items; /** * This is the dependent type as taken from the get method. */ private Class item; /** * This is the type associated with this point of contact. */ private Class type; /** * This is the get method which is used to get the value. */ private Method get; /** * This represents the name of the method for this contact. */ private String name; /** * Constructor for the MethodContact object. This is * used to compose a point of contact that makes use of a get and * set method on a class. The specified methods will be invoked * during the serialization process to get and set values. * * @param get this forms the get method for the object */ public MethodContact(MethodPart get) { this(get, null); } /** * Constructor for the MethodContact object. This is * used to compose a point of contact that makes use of a get and * set method on a class. The specified methods will be invoked * during the serialization process to get and set values. * * @param get this forms the get method for the object * @param set this forms the get method for the object */ public MethodContact(MethodPart get, MethodPart set) { this.label = get.getAnnotation(); this.items = get.getDependents(); this.item = get.getDependent(); this.get = get.getMethod(); this.type = get.getType(); this.name = get.getName(); this.set = set; } /** * This is used to determine if the annotated contact is for a * read only variable. A read only variable is a field that * can be set from within the constructor such as a blank final * variable. It can also be a method with no set counterpart. * * @return this returns true if the contact is a constant one */ public boolean isReadOnly() { return set == null; } /** * This is the annotation associated with the point of contact. * This will be an XML annotation that describes how the contact * should be serialized and deserialized from the object. * * @return this provides the annotation associated with this */ public Annotation getAnnotation() { return label; } /** * This is the annotation associated with the point of contact. * This will be an XML annotation that describes how the contact * should be serialized and deserialized from the object. * * @param type this is the type of the annotation to acquire * * @return this provides the annotation associated with this */ public T getAnnotation(Class type) { T result = get.getAnnotation(type); if(type == label.annotationType()) { return (T) label; } if(result == null && set != null) { return set.getAnnotation(type); } return result; } /** * This will provide the contact type. The contact type is the * class that is to be set and get on the object. This represents * the return type for the get and the parameter for the set. * * @return this returns the type that this contact represents */ public Class getType() { return type; } /** * This provides the dependent class for the contact. This will * actually represent a generic type for the actual type. For * contacts that use a Collection type this will * be the generic type parameter for that collection. * * @return this returns the dependent type for the contact */ public Class getDependent() { return item; } /** * This provides the dependent classes for the contact. This will * typically represent a generic types for the actual type. For * contacts that use a Map type this will be the * generic type parameter for that map type declaration. * * @return this returns the dependent type for the contact */ public Class[] getDependents() { return items; } /** * This is used to acquire the name of the method. This returns * the name of the method without the get, set or is prefix that * represents the Java Bean method type. Also this decapitalizes * the resulting name. The result is used to represent the XML * attribute of element within the class schema represented. * * @return this returns the name of the method represented */ public String getName() { return name; } /** * This is used to set the specified value on the provided object. * The value provided must be an instance of the contact class so * that it can be set without a runtime class compatibility error. * * @param source this is the object to set the value on * @param value this is the value that is to be set on the object */ public void set(Object source, Object value) throws Exception{ Class type = getType(); if(set == null) { throw new MethodException("Method '%s' of '%s' is read only", name, type); } set.getMethod().invoke(source, value); } /** * This is used to get the specified value on the provided object. * The value returned from this method will be an instance of the * contact class type. If the returned object is of a different * type then the serialization process will fail. * * @param source this is the object to acquire the value from * * @return this is the value that is acquired from the object */ public Object get(Object source) throws Exception { return get.invoke(source); } /** * This is used to describe the contact as it exists within the * owning class. It is used to provide error messages that can * be used to debug issues that occur when processing a contact. * The string provided contains both the set and get methods. * * @return this returns a string representation of the contact */ public String toString() { return String.format("method '%s'", name); } } simple-xml-2.3.2/src/org/simpleframework/xml/core/LabelMap.java0000644000175000017500000000757611342530527025345 0ustar sylvestresylvestre/* * LabelMap.java July 2006 * * Copyright (C) 2006, Niall Gallagher * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. */ package org.simpleframework.xml.core; import java.util.LinkedHashMap; import java.util.Iterator; /** * The LabelMap object represents a map that contains * string label mappings. This is used for convenience as a typedef * like construct to avoid having declare the generic type whenever * it is referenced. Also this allows Label values * from the map to be iterated within for each loops. * * @author Niall Gallagher * * @see org.simpleframework.xml.core.Label */ class LabelMap extends LinkedHashMap implements Iterable