axiom-1.2.8/0000755000000000000000000000000011131640476011340 5ustar rootrootaxiom-1.2.8/LICENSE.txt0000644000000000000000000002613711131637500013166 0ustar rootroot 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. axiom-1.2.8/README.txt0000777000000000000000000000121511131637500013036 0ustar rootroot====================================================== Apache AXIOM 1.2.8 (January 15, 2009) http://ws.apache.org/commons/axiom/ ------------------------------------------------------ ___________________ Documentation =================== Documentation can be found within this release and in the main site. ___________________ Support =================== Any problem with this release can be reported to ws-commons mailing list. If you are sending an email to the mailing list make sure to add the [AXIOM] prefix to the subject. Mailing list subscription: commons-dev-subscribe@ws.apache.org Thank you for using AXIOM! The Apache AXIOM Team. axiom-1.2.8/legal/0000755000000000000000000000000011131637460012423 5ustar rootrootaxiom-1.2.8/legal/commons-logging-LICENSE.txt0000644000000000000000000002613711131637460017354 0ustar rootroot 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. axiom-1.2.8/legal/wstx-LICENSE.txt0000644000000000000000000002613711131637460015262 0ustar rootroot 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. axiom-1.2.8/legal/geronimo-stax-api-LICENSE.txt0000644000000000000000000002613711131637460017620 0ustar rootroot 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. axiom-1.2.8/legal/geronimo-activation-LICENSE.txt0000644000000000000000000002613711131637460020233 0ustar rootroot 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. axiom-1.2.8/legal/jaxen-LICENSE.txt0000644000000000000000000002613611131637460015361 0ustar rootroot 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. axiom-1.2.8/legal/geronimo-javamail-LICENSE.txt0000644000000000000000000002613711131637460017656 0ustar rootroot 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. axiom-1.2.8/src/0000755000000000000000000000000011131637462012130 5ustar rootrootaxiom-1.2.8/src/site/0000755000000000000000000000000011131637462013074 5ustar rootrootaxiom-1.2.8/src/site/xdoc/0000755000000000000000000000000011131637462014031 5ustar rootrootaxiom-1.2.8/src/site/xdoc/navigation.xml0000644000000000000000000000345711131637462016723 0ustar rootroot Web Services Commons : AXIOM Implemenation axiom-1.2.8/src/site/xdoc/download.xml0000644000000000000000000010202511131637462016362 0ustar rootroot :: Apache AXIOM Releases ::

Releases

AXIOM is becoming more and more stable and the latest official version available for download is AXIOM 1.2.8. All the releases are available for download as source or binary. For more information, please see Apache Release FAQ

Please select the AXIOM version you want to download.

Name Type Distribution Date Description
1.2.8 Release Source Distribution zip MD5 PGP
Binary Distribution zip MD5 PGP
01 - 15 - 2009 1.2.8 Release (Mirrored)
1.2.6 Release Source Distribution zip MD5 PGP
Binary Distribution zip MD5 PGP
04 - 09 - 2007 1.2.6 Release (Mirrored)
1.2.5 Release Source Distribution zip MD5 PGP
Binary Distribution zip MD5 PGP
05 - 07 - 2007 1.2.5 Release (Mirrored)
1.2.4 Release Source Distribution zip MD5 PGP
Binary Distribution zip MD5 PGP
20 - 04 - 2007 1.2.4 Release (Archived)
1.2.3 Release Source Distribution zip MD5 PGP
Binary Distribution zip MD5 PGP
03 - 04 - 2007 1.2.3 Release (Archived)
1.2.1 Release Source Distribution zip MD5 PGP
Binary Distribution zip MD5 PGP
09 - 01 - 2001 1.2.2 Release (Archived)
1.2.1 Release Source Distribution zip MD5 PGP
Binary Distribution zip MD5 PGP
30 - 11 - 2006 1.2.1 Release (Archived)
1.2 Release Source Distribution zip MD5 PGP
Binary Distribution zip MD5 PGP
13 - 11 - 2006 1.2 Release (Archived)
1.1.1 Release Source Distribution zip MD5 PGP
Binary Distribution zip MD5 PGP
18 - 09 - 2006 1.1.1 Release (Archived)
1.1 Release Source Distribution zip MD5 PGP
Binary Distribution zip MD5 PGP
15 - 09 - 2006 1.1 Release (Archived)
Note : This released was compiled using JDK 1.5 and will not work with JDK 1.4. Please move to AXIOM 1.1.1.
1.0 Release Source Distribution zip MD5 PGP
Binary Distribution zip MD5 PGP
02 - 05 - 2006 1.0 Release (Archived)
0.95 Release Source Distribution zip MD5 PGP
Binary Distribution zip MD5 PGP
23 - 03 - 2006 0.95 Release (Archived)

[if-any logo] [end] The currently selected mirror is [preferred] . If you encounter a problem with this mirror, please select another mirror. If all mirrors are failing, there are backup mirrors (at the end of the mirrors list) that should be available.

Other mirrors:

You may also consult the complete list of mirrors .

Note: when downloading from a mirror please check the md5sum and verify the OpenPGP compatible signature from the main Apache site. These can be downloaded by following the links above. This KEYS file contains the public keys used for signing release. It is recommended that (when possible) a web of trust is used to confirm the identity of these keys.

axiom-1.2.8/src/site/xdoc/OMTutorial.xml0000644000000000000000000007252211131637462016622 0ustar rootroot OM Tutorial

Introduction

What is OM?

OM stands for Object Model (also known as AXIOM - AXis Object Model) and refers to the XML infoset model that is initially developed for Apache Axis2. XML infoset refers to the information included inside the XML, and for programmatic manipulation it is convenient to have a representation of this XML infoset in a language specific manner. For an object oriented language the obvious choice is a model made up of objects. DOM and JDOM are two such XML models. OM is conceptually similar to such an XML model by its external behavior but deep down it is very much different. The objective of this tutorial is to introduce the basics of OM and explain the best practices to be followed while using OM. However, before diving in to the deep end of OM it is better to skim the surface and see what it is all about!

For whom is this Tutorial?

This tutorial can be used by anyone who is interested in OM and needs to gain a deeper knowledge about the model. However, it is assumed that the reader has a basic understanding of the concepts of XML (such as Namespaces) and a working knowledge of tools such as Ant. Knowledge in similar object models such as DOM will be quite helpful in understanding OM, mainly to highlight the differences and similarities between the two, but such knowledge is not assumed. Several links are listed in the Appendix that will help understand the basics of XML.

What is Pull Parsing?

Pull parsing is a recent trend in XML processing. The previously popular XML processing frameworks such as SAX and DOM were "push-based" which means the control of the parsing was in the hands of the parser itself. This approach is fine and easy to use, but it was not efficient in handling large XML documents since a complete memory model will be generated in the memory. Pull parsing inverts the control and hence the parser only proceeds at the users command. The user can decide to store or discard events generated from the parser. OM is based on pull parsing. To learn more about XML pull parsing see the XML pull parsing introduction.

A Bit of History

The original OM was proposed as a store for the pull parser events for later processing, at the Axis summit held in Colombo, Sri Lanka, in September 2004. However, this approach was soon improved and OM was pursued as a complete XML infoset model due to its flexibility. Several implementation techniques were attempted during the initial phases. The two most promising techniques were the table based technique and the link list based technique. During the intermediate performance tests the link list based technique proved to be much more memory efficient for smaller and mid sized XML documents. The advantage of the table based OM was only visible for the large and very large XML documents, and hence, the link list based technique was chosen as the most suitable. Initial efforts were focused on implementing the XML infoset (XML Information Set) items which are relevant to the SOAP specification (DTD support, Processing Instruction support, etc were not considered). The advantage of having a tight integration was evident at this stage and this resulted in having SOAP specific interfaces as part of OM rather than a layer on top of it. OM was deliberately made API centric. It allows the implementations to take place independently and swapped without affecting the program later.

Features of OM

OM is a lightweight, deferred built XML infoset representation based on StAX (JSR 173), which is the standard streaming pull parser API. The object model can be manipulated as flexibly as any other object model (Such as JDOM), but underneath, the objects will be created only when they are absolutely required. This leads to much less memory intensive programming. Following is a short feature overview of OM.

Remember this OM is tightly bound to StAX API. To work with OM a StAX compliant parser and the API must be present in the classpath.

The Following image shows how OM API is viewed by the user



Figure 1


OM Builder wraps the raw xml character stream through the StAX reader API. Hence, the complexities of the pull event stream is transparent to the user.

A Bit About Caching

Since OM is a deferred built object model, It incorporates the concept of caching. Caching refers to the creation of the objects while parsing the pull stream. The reason why this is so important is because caching can be turned off in certain situations. If so the parser proceeds without building the object structure. User can extract the raw pull stream from OM and use that instead of the OM. In this case it is sometimes beneficial to switch off caching. The Advanced Operations section explains more on accessing the raw pull stream and switching on and off the caching.

Where Does SOAP Come into Play?

In a nutshell SOAP is an information exchange protocol based on XML. SOAP has a defined set of XML elements that should be used in messages. Since Axis2 is a "SOAP Engine" and OM is built for Axis2, a set of SOAP specific objects were also defined along with OM. These SOAP Objects are extensions of the general OM objects.

Working with OM

Obtaining the OM Binary

There are two methods through which the OM-binary can be obtained:

  1. The easiest way to obtain the OM binary is to download the latest release. After the source download, OM-binary can be built. For both MS Windows and Linux, move it to the project directory and execute the command "maven jar". All other necessary jars will be automatically downloaded. When the build is completed successfully, the axiom-api-<version>.jar and axiom-impl-<version>.jar can be found in the newly created "targets" directory.
  2. However, more adventurous users can build the OM from source, which is described in the next section. Detailed information on getting source from SVN repository is found here.

Once the OM-binary is obtained by any of the above ways , it should be included in the classpath for any of the OM based programs to work. Subsequent sections of this tutorial assume that this build step is complete and axiom-api-<version>.jar and axiom-impl-<version>.jar are present in the classpath along with the StAX API jar file and a StAX implementation.

Creation

Creation is the first and foremost action when using an Object representation. This part explains how OM can be built from an existing document or simply programmatically. OM provides a notion of a factory and a builder to create objects. The factory helps to keep the code at the interface level and the implementations separately as shown in Figure 2. Since OM is tightly bound to StAX, a StAX compliant reader should be created first with the desired input stream. Then one can select one of the different builders available.

StAXOMBuilder will build pure XML infoset compliant object model whilst the SOAPModelBuilder returns SOAP specific objects (such as the SOAPEnvelope, which are sub classes of the OMElement) through its builder methods. The following piece of code shows the correct method of creating an OM document from an input stream.

Code Listing 1

//create the parser
XMLStreamReader parser = XMLInputFactory.newInstance().createXMLStreamReader(new FileInputStream(file));
//create the builder
StAXOMBuilder builder = new StAXOMBuilder(parser); //get the root element (in this case the envelope)
OMElement documentElement = builder.getDocumentElement();

As the example shows, creating an OM from an input stream is pretty straightforward. However, elements and nodes can be created programmatically to modify the structure as well. The recommended way to create OM objects programmatically is to use the factory. OMAbstractFactory.getOMFactory() will return the proper factory and the creator methods for each type that should be called. Currently OM has two builders, namely the OM builder (StAXOMBuilder) and the SOAP model builder (StAXSOAPModelBuilder). These builders provide the necessary information to the XML infoset model to build itself.


OM Structure 2


Figure 2


A simple example is shown below:

Code Listing 2

//create a factory
OMFactory factory = OMAbstractFactory.getOMFactory();
//use the factory to create two namespace objects
OMNamespace ns1 = factory.createOMNamespace("bar","x");
OMNamespace ns2 = factory.createOMNamespace("bar1","y");
//use the factory to create three elements
OMElement root = factory.createOMElement("root",ns1);
OMElement elt11 = factory.createOMElement("foo1",ns1);
OMElement elt12 = factory.createOMElement("foo2",ns1);

The reason as to have a set of factory.createXXX methods is to cater for different implementations, but keep the programmers code intact. Its highly recommended to use the factory for creating OM objects as this will ease the switching of different OM implementations. Several differences exist between a programmatically created OMNode and a conventionally built OMNode. The most important difference is that the former will have no builder object enclosed, where as the latter always carries a reference to its builder.

As stated earlier in this tutorial, since the object model is built as and when required, each and every OMNode should have a reference to its builder. If this information is not available, it is due to the object being created without a builder. This difference becomes evident when the user tries to get a non caching pull parser from the OMElement. This will be discussed in more detail in the Advanced Operations section.

In order to understand the requirement of the builder reference in each and every OMNode, consider the following scenario. Assume that the parent element is built but the children elements are not. If the parent is asked to iterate through its children, this information is not readily available to the parent element and it should build its children first before attempting to iterate them. In order to provide a reference of the builder, each and every node of an OM structure should carry the reference to its builder. Each and every OMNode carries a flag that states its build status. Apart from this restriction there are no other constraints that keep the programmer away from mixing up programmatically made OMNode objects with OMNode objects built from builders.

The SOAP object hierarchy is made in the most natural way for a programmer. An inspection of the API will show that it is quite close to the SAAJ API but with no bindings to DOM or any other model. The SOAP classes extend basic OM classes (such as the OMElement) hence, one can access a SOAP document either with the abstraction of SOAP or drill down to the underlying XML Object model with a simple casting.

Addition of Nodes

Addition and removal methods are primarily defined in the OMElement interface. The following are the most important in adding nodes.

Code Listing 3

public void addChild(OMNode omNode);
public void addAttribute(OMAttribute attr);

This code segment shows how the addition takes place. Note that it is related to the code listings 1 & 2 in the Creation section.

Code Listing 4

//set the children
elt11.addChild(elt21);
elt12.addChild(elt22);
root.addChild(elt11);
root.addChild(elt12);

Following are the important methods available in OMElement to handle namespaces.

Code Listing 5

public OMNamespace declareNamespace(String uri, String prefix);
public OMNamespace declareNamespace(OMNamespace namespace);
public OMNamespace findNamespace(String uri, String prefix) throws OMException;

The declareNamespaceXX methods are fairly straightforward. Add a namespace to namespace declarations section. Note that a namespace declaration that has already being added will not be added twice. findNamespace is a very handy method to locate a namespace object higher up the object tree. It searches for a matching namespace in its own declarations section and jumps to the parent if it's not found. The search progresses up the tree until a matching namespace is found or the root has been reached.

During the serialization a directly created namespace from the factory will only be added to the declarations when that prefix is encountered by the serializer. More of the serialization matters will be discussed in the Serializer section.

The following simple code segment shows how the namespaces are dealt in OM

Code Listing 6

OMFactory factory = OMAbstractFactory.getOMFactory();
OMNamespace ns1 = factory.createOMNamespace("bar","x");
OMElement root = factory.createOMElement("root",ns1);
OMNamespace ns2 = root.declareNamespace("bar1","y");
OMElement elt1 = factory.createOMElement("foo",ns1);
OMElement elt2 = factory.createOMElement("yuck",ns2);
OMText txt1 = factory.createOMText(elt2,"blah");
elt2.addChild(txt1);
elt1.addChild(elt2);
root.addChild(elt1);

Serialization of the root element produces the following XML:

<x:root xmlns:x="bar" xmlns:y="bar1"><x:foo><y:yuck>blah</y:yuck></x:foo></x:root>

Traversing

Traversing the object structure can be done in the usual way by using the list of children. Note however, that the child nodes are returned as an iterator. The Iterator supports the 'OM way' of accessing elements and is more convenient than a list for sequential access. The following code sample shows how the children can be accessed. The children are of the type OMNode that can either be OMText or OMElement.

Code Listing 7

Iterator children = root.getChildren();
while(children.hasNext()){
        OMNode node = (OMNode)children.next();
}

Apart from this, every OMNode has links to its siblings. If more thorough navigation is needed the nextSibling() and PreviousSibling() methods can be used. A more selective set can be chosen by using the getChildrenWithName(QName) methods. The getChildWithName(Qname) method returns the first child that matches the given QName and getChildrenWithName(QName) returns a collection containing all the matching children. The advantage of these iterators is that they won't build the whole object structure at once, until its required.

Remember this All iterator implementations internally stay one step ahead of their apparent location to provide the correct value for the hasNext() method. This hidden advancement can build elements that are not intended to be built at all. Hence these iterators are recommended only when caching is not a concern.

Serializer

OM can be serialized either as the pure object model or the pull event stream. The serialization uses a XMLStreamWriter object to write out the output and hence, the same serialization mechanism can be used to write different types of outputs (such as text, binary, etc.).

A caching flag is provided by OM to control the building of the in-memory OM. The OMNode has two methods, serializeAndConsume and serialize. When serializeAndConsume is called the cache flag is reset and the serializer does not cache the stream. Hence, the object model will not be built if the cache flag is not set.

The serializer serializes namespaces in the following way:

  1. When a namespace that is in the scope but not yet declared is encountered, it will then be declared.
  2. When a namespace that is in scope and already declared is encountered, the existing declarations prefix is used.
  3. When the namespaces are declared explicitly using the elements declareNamespace() method, they will be serialized even if those namespaces are not used in that scope.

Because of this behavior, if a fragment of the XML is serialized, it will also be namespace qualified with the necessary namespace declarations.

Here is an example that shows how to write the output to the console, with reference to the earlier code sample- Code Listing 1 that created a SOAP envelope.

Code Listing 8

XMLStreamWriter writer = XMLOutputFactory.newInstance().createXMLStreamWriter(System.out);
//dump the output to console with caching
envelope.serialize(writer); 
writer.flush();

or simply

System.out.println(root.toStringWithConsume()); 

The above mentioned features of the serializer forces a correct serialization even if only a part of the OM tree is serialized. The following serializations show how the serialization mechanism takes the trouble to accurately figure out the namespaces. The example is from Code Listing 6 which creates a small OM programmatically. Serialization of the root element produces the following:

<x:root xmlns:x="bar" xmlns:y="bar1"><x:foo><y:yuck>blah</y:yuck></x:foo></x:root>

However, serialization of only the foo element produces the following:

<x:foo xmlns:x="bar"><y:yuck xmlns:y="bar1">blah</y:yuck></x:foo>

Note how the serializer puts the relevant namespace declarations in place.

Complete Code for the OM based Document Building and Serialization

The following code segment shows how to use the OM for completely building a document and then serializing it into text pushing the output to the console. Only the important sections are shown here. The complete program listing can be found in the Appendix.

Code Listing 9

//create the parser
XMLStreamReader parser = XMLInputFactory.newInstance().createXMLStreamReader(new FileInputStream(file));
//create the builder
StAXOMBuilder builder = new StAXOMBuilder(parser);

//get the root element (in this case the envelope)
OMElement documentElement = builder.getDocumentElement();

//dump the out put to console with caching
System.out.println(documentElement.toStringWithConsume()); 

Advanced Operations with OM

Use of the OMNavigator for Traversal

OM provides a utility class to navigate the OM structure. The navigator provides an in-order traversal of the OM tree up to the last-built node. The Navigator has two states called the navigable state and the completion state. Since the navigator provides the navigation starting from an OMElement, it is deemed to have completed the navigation when the starting node is reached again. This state is known as the completion state. Once the navigator has reached the complete status its navigation is done and it cannot proceed.

It is possible that the OM tree does not get built completely when it is navigated. The navigable status shows whether the tree structure is navigable. When the navigator is complete it is not navigable anymore. However, it is possible for a navigator to become non-navigable without being complete. The following code sample shows how the navigator should be used and handled using its states.

Code Listing 10

//Create a navigator
OMNavigator navigator = new OMNavigator(envelope);
OMNode node = null;
while (navigator.isNavigable()) {
     node = navigator.next();
}

Accessing the Pull Parser

OM is tightly integrated with StAX and the getXMLStreamReader()/getXMLStreamReaderWithoutCaching() methods in the OMElement provides a XMLStreamReader object. This XMLStreamReader instance has a special capability of switching between the underlying stream and the OM object tree if the cache setting is off. However, this functionality is completely transparent to the user. This is further explained in the following paragraphs.

OM has the concept of caching, and OM is the actual cache of the events fired. However, the requester can choose to get the pull events from the underlying stream rather than the OM tree. This can be achieved by getting the pull parser with the cache off. If the pull parser was obtained without switching off cache, the new events fired will be cached and the tree updated. This returned pull parser will switch between the object structure and the stream underneath, and the users need not worry about the differences caused by the switching. The exact pull stream the original document would have provided would be produced even if the OM tree was fully or partially built. The getXMLStreamReaderWithoutCaching() method is very useful when the events need to be handled in a pull based manner without any intermediate models. This makes such operations faster and efficient.

Remember this For consistency reasons once the cache is switched off it cannot be switched on again.

Summary

This is meant to be a small yet comprehensive introduction to AXIOM. AXIOM however, is a lot more than what is described in this tutorial. Readers are welcome to explore AXIOM, especially it's capabilities to handle binary content.

Appendix

Program Listing for Complete OM - Build and Serialize

import org.apache.axiom.om.OMElement;
import org.apache.axiom.om.impl.builder.StAXOMBuilder;

import javax.xml.stream.XMLInputFactory;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
import java.io.FileInputStream;
import java.io.FileNotFoundException;

public class TestOMBuilder {

    /**
     * Pass the file name as an argument
     * @param args
     */
    public static void main(String[] args) {
        try {
            //create the parser
            XMLStreamReader parser = XMLInputFactory.newInstance().createXMLStreamReader(new FileInputStream(args[0]));
            StAXOMBuilder builder = new StAXOMBuilder(parser);
            //get the root element
            OMElement documentElement = builder.getDocumentElement();

            //dump the out put to console with caching
            System.out.println(documentElement.toStringWithConsume()); 

        } catch (XMLStreamException e) {
            e.printStackTrace();
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }
    }


}

Links

For basics in XML
axiom-1.2.8/src/site/xdoc/download.cgi0000644000000000000000000000035311131637462016325 0ustar rootroot#!/bin/sh # Wrapper script around mirrors.cgi script # (we must change to that directory in order for python to pick up the # python includes correctly) cd /www/www.apache.org/dyn/mirrors /www/www.apache.org/dyn/mirrors/mirrors.cgi $*axiom-1.2.8/src/site/apt/0000755000000000000000000000000011131637460013656 5ustar rootrootaxiom-1.2.8/src/site/apt/index.apt0000644000000000000000000001361111131637460015475 0ustar rootroot ----------------------------------- Apache Axiom - The XML Object Model ----------------------------------- Welcome to Apache Axiom AXIOM stands for AXis Object Model (also known as OM - Object Model) and refers to the XML infoset model that was initially developed for Apache Axis2. XML infoset refers to the information included inside the XML and for programmatical manipulation it is convenient to have a representation of this XML infoset in a language specific manner. For an object oriented language the obvious choice is a model made up of objects. DOM and JDOM are two such XML models. OM is conceptually similar to such an XML model by its external behavior but deep down it is very much different. Latest Release <<15th January 2009 - Apache Axiom Version 1.2.8 Released!>> \[{{{http://ws.apache.org/commons/axiom/download.cgi}Download AXIOM 1.2.8}}\] Apache AXIOM is a StAX-based, XML Infoset compliant object model which supports on-demand building of the object tree. It supports a novel "pull-through" model which allows one to turn off the tree building and directly access the underlying pull event stream. It also has built in support for XML Optimized Packaging (XOP) and MTOM, the combination of which allows XML to carry binary data efficiently and in a transparent manner. The combination of these is an easy to use API with a very high performant architecture! Developed as part of Apache Axis2, Apache AXIOM is the core of Apache Axis2. However, it is a pure standalone XML Infoset model with novel features and can be used independently of Apache Axis2. Key Features * Full XML Infoset compliant XML object model * StAX based builders with on-demand building and pull-through * XOP/MTOM support offering direct binary support * Convenient SOAP Infoset API on top of AXIOM * Two implementations included: * Linked list based implementation * W3C DOM supporting implementation * Highly performant * Improved XML serialization * Improved Builder hierarchy * Improved MTOM handling What's New in This Release * WSCOMMONS-434 org.apache.axiom.om.impl.dom.NodeImpl#getTextContent() and org.apache.axiom.om.impl.dom.NodeImpl#setTextContent(String arg0) are not implemented * WSCOMMONS-429 XOPAwareStAXOMBuilder / MTOMStAXSOAPModelBuilder should use UTF-8 to decode cid: URIs * WSCOMMONS-427 StreamingOMSerializer#serializeXOPInclude doesn't decode cid: URLs * WSCOMMONS-424 BufferUtils#doesDataHandlerExceedLimit needs review * WSCOMMONS-423 DOOM doesn't correctly enforce hierarchy constraints on Document * WSCOMMONS-420 Attempted validation of DomSource leads to "java.lang.UnsupportedOperationException: TODO" from "org.apache.axiom.om.impl.dom.DocumentImpl.getDoctype" * WSCOMMONS-415 Provide implementations of javax.xml.transform.Source and javax.xml.transform.Result * WSCOMMONS-413 Build failure with JDK 1.4.2 * WSCOMMONS-412 Get rid of the setDOOMRequired hack * WSCOMMONS-394 StAXUtils: Add Network Detached XMLStreamReader capability * WSCOMMONS-393 Error using AxiomSoapMessageFactory with comments in request * WSCOMMONS-386 Exception thrown is not descriptive, if content-type missing boundary parameter * WSCOMMONS-381 StringIndexOutOfBoundsException in org.apache.axiom.attachments.impl.PartFactory.readHeader() * WSCOMMONS-373 SAXOMBuilder needs to support default namespaces * WSCOMMONS-372 Sometimes accessing an AXIOM tree while the underlying input stream is closed causes an OutOfMemoryError * WSCOMMONS-357 NPE will result in Axiom code if MD5 algorithm is not in classpath * WSCOMMONS-340 Error calling getTextCharacters() on a comment node * WSCOMMONS-337 insertSiblingAfter() method doesn't set last child * WSCOMMONS-336 Inconsistent specification for OMDataSource#serialize(OutputStream, OMOutputFormat) * WSCOMMONS-335 Add a getOutputFormat method to MTOMXMLStreamWriter * WSCOMMONS-334 OMSourcedElementImpl#serialize produces wrong result when element is expanded * WSCOMMONS-333 Add an addNamespaces(OMElement) method to AXIOMXPath * WSCOMMONS-329 org.apache.axiom.attachments.Attachments#getSOAPPartContentID() does not parse content ids correctly. * WSCOMMONS-328 Failure in boundaryPosition condition for checking position validity * WSCOMMONS-327 Namespace High verbosity combined with XMLBeans * WSCOMMONS-323 XML Element lost when there is an OMException inside OMChildrenIterator.next() * WSCOMMONS-317 Reverted code, need to review code * WSCOMMONS-281 xmlns:xml declaration is unnecessary and fails in some parsers * WSCOMMONS-255 AXIOM DOM based org.w3c.dom.Element.getElementsByTagName and getElementsByTagNameNS do not funcion according to spec * WSCOMMONS-254 AXIOM DOM based implementation fails to parse documents that start with xml comment. * WSCOMMONS-253 mvn: creating axiom.jar (bundle of axiom-api.jar, axiom-dom.jar and axiom-impl.jar) * WSCOMMONS-239 org.apache.axiom.om.OMElement#getText() is not documented sufficiently * WSCOMMONS-237 Can't retrieve children from OMDocument * WSCOMMONS-233 SecurityException thrown in OMAbstractFactory when run from an applet (2) * WSCOMMONS-207 Finding namespace based on prefix is broken * WSCOMMONS-197 SOAP headers added using DOOM are lost during serialization * WSCOMMONS-182 Infinite loop in OMElement possible * WSCOMMONS-121 Handling of xml documents with two top level elements is errorneous * WSCOMMONS-115 Problem in serialization when comments presents * WSCOMMONS-101 axiom base64 encoding is incorrect axiom-1.2.8/src/site/resources/0000755000000000000000000000000011131637462015106 5ustar rootrootaxiom-1.2.8/src/site/resources/svn.html0000644000000000000000000001451311131637462016606 0ustar rootroot Developing Apache Axiom

Developing Apache Axiom

This document will give you information on how to use SVN (Subversion) in order to get an SVN checkout/update and making commits to repository etc in the process of contributing to Apache projects (specifically Axiom). Instructions on configuring IDEs for development and using Maven1/Maven2 to build the project is also included here.

Content

Working with Subversion (SVN)

The Axiom development team uses Subversion (SVN) for source control. Subversion is a compelling replacement for CVS (Concurrent Versioning System), developed under the auspices of the Tigris community and is licensed under an Apache compatible license. To learn more about Subversion or to download the latest distribution, visit the Subversion project site. If you are looking for guidance on setting up and installing Subversion, please read the ASF Source Code Repositories page.

Checkout Axiom From Subversion

When checking out the latest version of Axiom from the Foundation's Subversion repository you must use one of the following URLs depending on your level of access to the Axiom source code:

If you are a committer, make sure that you have selected an svnpasswd. To do this you must log into svn.apache.org. For more information, please read the ASF Source Code Repositories page.

Once you have successfully installed Subversion, you can check out Axiom trunk by following these steps:

  1. Run svn co <repository URL> axiom where repository URL is one of the URLs from the previous list.
  2. This step will checkout the latest version of the Axiom codebase to a directory named "axiom". The second parameter to the svn co selects a directory to create on your local machine. If you want to checkout Axiom to a different directory, feel free to change Axiom to any other directory name.
  3. To update your working copy to the latest version from the repository. Execute the svn update command.
  4. If you would like to submit a patch, you can execute svn diff to create a unified diff for submission to the WS-Commons JIRA issue tracker.

Installing Maven

Axiom's build currently supports Maven2 as well as Maven1. Maven is a build system that allows for the reuse of common build projects across multiple projects. For information about obtaining, installing, and configuring Maven, please see the Maven project page.

To use Maven1 to build the Axiom project, follow these simple steps:

  1. Install Maven1. See here for instructions.
  2. Go to the axiom folder in the command prompt and type maven.
  3. Maven will then automatically download all the jars, compile, test and build the Axiom deliverables.

To use Maven2 to build the Axiom project, follow these simple steps:

  1. Install Maven2. See here for instructions.
  2. Go to the axiom folder in the command prompt and type mvn install.
  3. Maven2 will then automatically download all the jars, compile, test and build the Axiom deliverables.

Configuring your IDE

The Axiom development team uses a variety of development tools from vi to emacs to eclipse to IntelliJ IDEA. The following section is not an endorsement of a specific set of tools, it is simply meant as a pointer to ease the process of getting started with Axiom development.

With Maven 1:

axiom-1.2.8/src/site/resources/images/0000755000000000000000000000000011131637462016353 5ustar rootrootaxiom-1.2.8/src/site/resources/images/archi006.jpg0000644000000000000000000003557411131637462020407 0ustar rootrootÿØÿàJFIF``ÿÛC    $.' ",#(7),01444'9=82<.342ÿÛC  2!!22222222222222222222222222222222222222222222222222ÿÀê"ÿÄ ÿĵ}!1AQa"q2‘¡#B±ÁRÑð$3br‚ %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyzƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖרÙÚáâãäåæçèéêñòóôõö÷øùúÿÄ ÿĵw!1AQaq"2B‘¡±Á #3RðbrÑ $4á%ñ&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz‚ƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖרÙÚâãäåæçèéêòóôõö÷øùúÿÚ ?ö]s\x¶¡e¿‘rªßv5þûûz¤þ$r²ý¾á÷Üë:‹?¬Sy*>Š˜ýr}Ík\ꚵ̟ëöH¾‹È£òú±õ§ÛNÎi÷íYJNö—&¥e º|ž(»KÖénÚ£?†iÿl·þÒþÍÿ„Žÿíûw}›ûIüÌc9Ûœôæ¼}Ã1ø R²Õm·x°Í pÑ“;NXíe?ÝõÇ¿5£uö­?ÅZÕÐÝ£Á¦OpYw &qÛæÏHìûŒôû{Ë{»Éìí¼G}5;|ècÔœ¼x8ù†xçŠ.o-¬®`¶ºñôÅ&¤êÒãåçž+†øbö>/¸YWmÄú<73 `ï’Mç>¸ÜÐ Çñt·Ú爵«ë .öö=-c‚ÖæØI‘ROQòàã­wÜ\û=Çýuoü“üi‘ÛWÕ•TI¾“§­púEáñWç¸]BõlÆ›mw´Èq@>¹gëU|7¨‹ûfºÔ5û±®N·‰s¦Ü€*œ)OùfCwÎ2ikÜG{nÂòÕ.­µÍJkw’Xõ*ÃÔûS-®a½Š m|C“¤ø"âÚþðÿh´ÐO“‹`ΧAƒÎzæ³ü-!ŸUðÅåÅäítÚeËÂ䨖e•Â'^r@{Ó³î3Ø~Ï?ýuoü“üi ª–m[V ’o¤μ¿Âú¾½rÆú=V ›·Óîk»y¥yT6Òb*Xl 2=hóíoü¨Êàz|qË,I,zƪñº†V[ù`yÓ¾ÍqÿA]_ÿ¤ÿóMWµÑõKd“YuÓ$ðØhZk¢ñ™ÁË$ãpä`r1Š‡Â¯w¯j¾³½Õõ!š3Ï0†íÈÂw’}9ëÆ:QgÜG¨ýžãþ‚º·þIþ4}žú jßø'ø×™éÚ¦·yãfÕ`¶¸UxÒ[·ÜðàX•Æ2Cçñ¯S¤îºÙçÿ ¶­ÿÒgŸþ‚Ú·þIþ5=®ÀƒìóÿÐ[VÿÀé?ƳÏÿAm[ÿ¤ÿžŠ.ÀƒìóÿÐ[VÿÀé?ƳÏÿAm[ÿ¤ÿžŠ.ÀƒìóÿÐ[VÿÀé?ƳÏÿAm[ÿ¤ÿžŠ.ÀƒìóÿÐ[VÿÀé?ƳÏÿAm[ÿ¤ÿžŠ.ÀƒìóÿÐ[VÿÀé?ƳÏÿAm[ÿ¤ÿžŠ.ÀƒìóÿÐ[VÿÀé?ƳÏÿAm[ÿ¤ÿžŠ.ÀƒìóÿÐ[VÿÀé?ƳÏÿAm[ÿ¤ÿžŠ.ÀƒìóÿÐ[VÿÀé?ƳÏÿAm[ÿ¤ÿžŠ.ÀƒìóÿÐ[VÿÀé?ƳÏÿAm[ÿ¤ÿžŠ.ÀƒìóÿÐ[VÿÀé?ƳÏÿAm[ÿ¤ÿžŠ.ÀƒìóÿÐ[VÿÀé?ƳÏÿAm[ÿ¤ÿžŠ.ÀƒìóÿÐ[VÿÀé?ƳÏÿAm[ÿ¤ÿžŠ.ÀƒìóÿÐ[VÿÀé?ƳÏÿAm[ÿ¤ÿžŠ.ÀƒìóÿÐ[VÿÀé?ƳÏÿAm[ÿ¤ÿžŠ.ÀƒìóÿÐ[VÿÀé?ƳÏÿAm[ÿ¤ÿžŠ.ÀƒìóÿÐ[VÿÀé?ƳÏÿAm[ÿ¤ÿžŠ.ÀƒìóÿÐ[VÿÀé?ƳÏÿAm[ÿ¤ÿžŠ.ÀƒìóÿÐ[VÿÀé?ƳÏÿAm[ÿ¤ÿžŠ.ÀƒìóÿÐ[VÿÀé?ƳÏÿAm[ÿ¤ÿžŠ.ÀƒìóÿÐ[VÿÀé?ƳÏÿAm[ÿ¤ÿžŠ.ÀƒìóÿÐ[VÿÀé?Æ•#»‰ƒÇ¬jªã¡k¢àÀ[ þ ÔÔQv·¯Üµâéú£Æï Ì(»„uFÀnüpF}+§¯2ÕØÇ¤ÜN§[¯Ú#>ŽŸ0ýF>„×¥¡ÜŠOqšÖ.èg[ÿÇÖ§ÿaŸýjz‚ßþ>µ?ûÜÿèÃSÖRÜDfÞ¸[†‚:Œ L`¸ú7ZF¶·s!{xXÈ´`ï oQõ©h¤’O1bdÚxPAŸOj#†(•–8£EbY‚(“Ôœu&ŸEE­½¹ÌðÄq·1ÆNJQo™æD%my Ì= êEIED-mÂÆ¢Þ±sŒ'û¼qøSE• inG1þìú¯~=A rÉ,pÆ’I÷ÝP©êÚ2”‚2ÿ¬+gûÞ¿IEAö0‘§Øí¶FKF¾Já ê@ÇéNŽÖÞ&VŠÞÙWj”Œ«×žÕ-‘Ÿö&/<.ß7`ßMÝqRQEVN«®ÿf_YÙE¦ÞßÝ]¬VФ…Ln'sï “JÖí5[X%MÐK3ÉÛÏ…“|g¸çç§`4¨¬KßXYe¾kˆ¶FÂHòù@sÃuãzñVnµÝ>×V¶Òüô–òyÄKDJ³ã9…4Y¥ES®šÑM(Ô-LpÉäÊâeÄoœmcž{TWÝ”M"A,Z„…!š68FrÄçîáO"•€Ñ¢±¯6Ñlnlía¸Kû›·Ù6’ÆÌ=ÎXœñÜö­k}_L»YÚ×R³mÆfhæVVÁã¡ëNÌ ”U!¬éfÅo†¥gö7m‹q篖[¦gö«´€(¢Š(¢Š(¢Š(¢Š(¢²um~ .êÞÍm®ooîhí-T4…W9 í’hZŠå/¾ i:vº„ö÷€‹¯²Mm°yÐI‚pëŸAÔšºÞ-Ó×ÅV¾Ü5ÕÌ"e“`…(\d“œãÛ½;07¨¬/xªÇÂÐ[Éw ó4åöG°‹¹›’þtÛß[Û\iVö¶ºŒÚ¤{d´U%ˆŽÇ4Y¿Es–~4Ó/®t«x¢¹ê2M «("u~zò:fº:V°Q@Q@Q@Q@Q@Q@Q@Q@u¯ùê?õë'þ‚kÓ#ÿTŸîŠó=kþ@:ýzÉÿ šôÈÿÕ'û¢´¦3έÿãëSÿ°ÏþŒ5=AoÿZŸý„nôa©ê%¸‚Š(¤EPEPEPEPEPEP)âÏ]kž—u µì6±Ì²C=ÛÛä¾Ý¤2 ñ´ñTì¼5­éCJ¹³[9e²¸¹‘,æ¹mG*€dÛ–Áò9ÝŽÕÛÑO™ç–þÖ#³†9ÐȰEmà²Þ™Î8é´þ|U¨ü#©&³n|­;ìj_nREˬªÃcøKל˜®æŠ|Ì9±ø}{o£Ïi?Ù䑞Ú"Zwuš(åIar£yç<ó]_ˆ4yµÓE˜†8íe•ŠŸ”к¬+nŠ\ÌïÀ·3hÖvpGc‘h­e!§ßgÈ%æ÷©ãð}ô¾/X¸[xâi!¹hâ¸|[º&Ó¨88n0 à×oEÌ3Ið|¶øm^ÞÄIaȺ` ïy z|ÜõÍcZø Z6÷©sö’{Há—tlÑʲP*…FnÑœuç5é”QÌÀá5 jz½¥¤¦ÓM³ž+‰žK+9š(ÝdP»Œ€rÃo?/ ãŠì´ëA§é––A· xR Üó´c¾OçVh¡»€QE€(¢Š(¢Š(¢Š+œÖtmGþ[é>D×@ö²ÚÜ?–²FÙ9ÁÚº:(L?›ÀúÚÃss5»]ÜkQê7±£á#C.Ô8ùŽ^)tOjZn·¢jÍ Ÿdk´~ô± ѬqÈç ƒ5ßÑUÌÀäõ _kž,ût×ïgc™·ƒìûF/÷òHµeà+ù&Ð-õ"âËJ[˜X¤ì¬èÇ1‘·#¿5è”Ræ`r×>xƒÃ7\0[éúQœÉâç\?¼sÔ“]MQp (¢Q@Q@Q@Q@Q@Q@Q@u¯ùê?õë'þ‚kÓ#ÿTŸîŠó=kþ@:ýzÉÿ šôÈÿÕ'û¢´¦3έÿãëSÿ°ÏþŒ5=AoÿZŸý„nôa©ê%¸‚Š(¤EPEPEPEPEPEPEPEPE*Ì©ÅskÚ•Ô"h¬lÄl[nû—Î#œ'µT!)»EÕ­N’æ¨ìŽŠŠÂMgP[›hî,í9¦X‹G;]ÝðPgó­Ú' AÚHT«S¬¹©» ¢Š*MBŠ( Š( Š( Š( Š( Š( ŠdÒy6òËŒùhÏ\ × Ä[¹"GE¸ ¡€ûSwÿ€U(¹liN”ê| ç}ErzŒgÕµ˜l%Ó¢„JŽÂDœ¾6Œô*+¬¤ÓZ1Nƒå’Ô(¢ŠDQ@Q@Q@Q@Q@Q@Q@Q@u¯ùê?õë'þ‚kÓ#ÿTŸîŠó=kþ@:ýzÉÿ šôÈÿÕ'û¢´¦3έÿãëSÿ°ÏþŒ5=AoÿZŸý„nôa©ê%¸‚Š(¤EPEPEPEPEPEPEPEP“ýbýErGü‚ ÿÿèm]z¬_¨®CHÿTð?ý «¯ñ³É΀½FO7ü|éÿõûó5ÓW37ü|éÿõûó5ÓQŒø× ²oà?_ÑQ\‡®QEQEQEQEQEQECyÿ_õÁÿô^-mÿ×5þB½¦óþ<.¿ëƒÿè&¼ZÛþ= ÿ®kü…oG©éå»Ëäoø?þFû/úç7þ^¡^_àÿùì¿ëœßúz…M_ˆÃüfQEdq…Q@Q@Q@Q@Q@Q@Q@Q@u¯ùê?õë'þ‚kÓ#ÿTŸîŠó=kþ@:ýzÉÿ šôÈÿÕ'û¢´¦3έÿãëSÿ°ÏþŒ5=AoÿZŸý„nôa©ê%¸‚Š(¤EPEPEPEPEPEPEPEP“ýbýErGü‚ ÿÿèm]z¬_¨®CHÿTð?ý «¯ñ³É΀½FO7ü|éÿõûó5ÓW37ü|éÿõûó5ÓQŒø× ²oà?_ÑQ\‡®QEQEQEQEQEQECyÿ_õÁÿô^-mÿ×5þB½¦óþ<.¿ëƒÿè&¼ZÛþ= ÿ®kü…oG©éå»Ëäoø?þFû/úç7þ^¡^_àÿùì¿ëœßúz…M_ˆÃüfQEdq…Q@Q@Q@Q@Q@Q@Q@Q@u¯ùê?õë'þ‚kÓ#ÿTŸîŠó=kþ@:ýzÉÿ šôÈÿÕ'û¢´¦3έÿãëSÿ°ÏþŒ5=AoÿZŸý„nôa©ê%¸‚Š(¤EPEPEPEPEPEPEPEP“ýbýErGü‚ ÿÿèm]z¬_¨®CHÿTð?ý «¯ñ³É΀½FO7ü|éÿõûó5ÓW37ü|éÿõûó5ÓQŒø× ²oà?_ÑQ\‡®QEQEQEQEQEQECyÿ_õÁÿô^-mÿ×5þB½¦óþ<.¿ëƒÿè&¼ZÛþ= ÿ®kü…oG©éå»Ëäoø?þFû/úç7þ^¡^_àÿùì¿ëœßúz…M_ˆÃüfQEdq…Q@Q@Q@Q@Q@Q@Q@Q@u¯ùê?õë'þ‚kÓ#ÿTŸîŠó=kþ@:ýzÉÿ šôÈÿÕ'û¢´¦3έÿãëSÿ°ÏþŒ5=W·ÿ­OþÂ7?ú0ҽà ¼‹{iî§À%!^=71À_Äç¾+*³Œ/)»%Ü-}‰è¨6ë?ôü Žº×ýßÿãÿâþÓÁÿÏØýè®Iv'¢ Û­Ð ÿð.?ñ£n³ÿ@7ÿÀ¸ÿÆí,üýÞƒ’]‰è¨6ë_ôü ühÛ­Ð ÿð.?ñ£ûKÿ?c÷ ä—bz* º×ýŸÿãÿ6ë_ôü ühþÓÁÿÏØýè9%ØžŠƒn³ÿ@7ÿÀ¸ÿƺ×ýŸÿãÿ?´°óö?zIv'¢ Û­Ð ÿð.?ñ£nµÿ@7ÿÀ¸ÿÆí<üýÞƒ’]‰è¨6ë_ôü ühÛ­Ð ÿð.?ñ£ûOÿ?c÷ ä—bz* º×ýŸÿ㦼÷vª^ÿL¹·ŒrdR²ªVÛÈüª£˜a&ùcR7õBä—b͈ë"+£FV ZZì$r¬_¨®CHÿTð?ý «¯Oõ‹õÈiò ƒþÿ¡µuàþ6y9Ïð¯èÉæÿ?þ¿bþfºjæfÿ?þ¿bþfºj1ŸôMüëú ¢Š+õŠ( Š( Š( Š( Š( Š( o?ãÂëþ¸?þ‚kÅ­¿ãÒúæ¿ÈW´ÞÇ…×ýpý׋[ǤõÍ­èõ=<·y|ÿÿÈßeÿ\æÿÐ+Ô+Ëüÿ#}—ýs›ÿ@¯P©«ñc¿ŒÂŠ(¬Ž0¢Š(¢Š(¢›$‰ O,Œ4RÌÇ dšƒN¾SÓmï¢GHç@ê² 0„v4fŠ( Š( Š( Š( Š(  :×ü€uúõ“ÿA5é‘ÿªO÷Eyžµÿ Gþ½dÿÐMzdê“ýÑZSæO4˨¬*­q6©¸óyÞ.«Fo«í}oç§àþ[›SÕÑ7µhô]v[¨ °–-Wû:ÆâYSb’ÁInÃ`ËÜâ¤ÞEàk‰àš+9LZœ1í"|7–Lmœg8aŽqé[¿ð„èçX}FUžm÷ uöYdß™”«8CÜ‚}¿!RGàí+Á«‹kÝNxêÞ!c†äp88³Íq¯ã_Øi:´‚è^][ÁŸf¾²ûÅ»4 ÛÊÈœýàN:ƒ^…káÝ:×EŸG4º|ÆLÁ+–UW9(¾‹ÏµeEðÿFKK¸'—P¼76âØÍutÒI@† Œ~è úYáñ8(În¤n›º÷VÝ·Óåkõo`j] “ü@k(õio´;‹h4±O'žŽ¾s„+Ç^_º g½W¸øo†mõ¨4¹%I%’Uî5@fûùÈÆÐsÏLVòø?K:^¡§Ïö‹˜ïÝd瘴…ÕUC†êlSŸQš‚ëÀÚ]å­”RϨù¶#­È»o9̃¹úÀ}‡§írÇ-`÷óÚÞ½ÿO0´û™s|IDpðhW·¢;IXä@Wí* j‘–ËõÍZ»ñeÔþ×uh-ZÃPÓVâ'ŠFYrÆ=G :UÈ<£ÛÛ¼ ö‚ŒmO2ôäy@qÐ`늶þÓŸIÕtÒ%û>©,²Üüüî“ï`ö«—«rAè×}´¾ï×ðRêqº‹õ!«Oö­J}KNµ²{›ö¸Ó~Ç%¨ ¹J¯WÝ‚1ŽÙÍ_³ø›m ^êVÚl¬ö’ÆNˆ_;XÈp£¡ÈäƒÞºKß i×ú…½ìèæX­ÞÕ€o–h\|ÑÈ?‰xÏֳπôƒ£f™µE–9¢™®Ý¥ˆÇ÷1è÷­|º¥¥8;é¶uÚÉéé÷«µi™±üE:Žg>•£Ý\ÝÝA<í :~æ8˜£>â@o›“žÕñ.Ú3áý>þ7šööÎÚK™£y”Âÿ$óº+Yþh¯i ¿™~žSK‰Ré–FYdFaË+1,AîjÍ¿‚´‹[›áûTfÒíö¥Ã*ΑÝù påq‘š\²Ír>¾½m­ÿ§½ÂÓ&ðïˆ&ñÝMý™-­¬3<1Í$ŠÂfGdm r+ÔúûVåRÒ´»mÇì–»ü¯6I~vÉÜî]¿V5v¼¼C¤ê7IZ= W¶¡EV#9{¸¬ xÆ-®•æ@†@Ùp=ŽíØí†õŸRxƒþBúGý·ÿÐG_£d•§W7v®¾ãŽª´‡'úÅúŠä4ùAÿÿÐÚºôÿX¿Q\†‘ÿ ¨?àúWÐàþ6x¹Ïð¯èÉæÿ?þ¿bþfºjæfÿ?þ¿bþfºj1ŸôMüëú ¢Š+õŠ( Š( Š( Š( Š( Š( o?ãÂëþ¸?þ‚kÅ­¿ãÒúæ¿ÈW´ÞÇ…×ýpý׋[ǤõÍ­èõ=<·y|ÿÿÈßeÿ\æÿÐ+Ô+Ëüÿ#}—ýs›ÿ@¯P©«ñc¿ŒÂŠ(¬Ž0¢Š(¢Š†êæ;;g¸—%Pp£«ÀQîI}h•ó}²þ-8ª]³ÜŸQ»äOÄ‚O²ûÑáïù¬ë™ÿÐ&Ħr įæÌG÷ÏQôì)|;ÿ"íýs?ú®ìEeF)îÍgX£NŠ(® ¢Š(¢Š(¢Š(¢Š(޵ÿ Gþ½dÿÐMzdê“ýÑ^g­ÈQÿ¯Y?ô^™ú¤ÿtV”Æy‰ÿÌö0Ëüä®Ö¸£ÿ!˜ÿìa—ùÉ]­|OÿŸ£üΊ0¢ŠçüCrñ_ØBfÔc…㙜XF]É]˜È N9?|Å:n¤¹Q»v: +˜MrîßL·ds9f¶i÷y’D1·r¢“¸çЙÁâ–DñÃ$¶ÌŠØypÙò£dVF>二zçÒº~¡]¦Òºþ¿ÈždtÔV5ΡpºM–¢¸IXÆM²Â]øùÇÞçƒÇ=xÍgk^Åq¥ÝµÚÉk,sKvŠ¿*®øÐ`õ sëóTÃ9«¦·k溒:ª+”´Õ¯î¼F™Ÿ3ÌžDAGú¿.~IêwÃ}1]¢.Œ‚Ð7䌌ãÕPÚ5î<òH‰H}ß¼sÇoZ•€®Õíø¯PæGSE"¶å ê3K\…Q@÷ˆ?ä1¤ÛýTu'ˆ?ä1¤ÛýTuú¸ÇÕþg%oŒr¬_¨®CHÿTð?ý «¯Oõ‹õÈiò ƒþÿ¡µ}6ãg‰œÿzþŒžoøùÓÿëö/æk¦®foøùÓÿëö/æk¦£ñ¯AdßÀ~¿¢ (¢¹\(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š†óþ<.¿ëƒÿè&¼ZÛþ= ÿ®kü…{Mçüx]×ÿÐMxµ·üzAÿ\×ù ÞSÓËw—Èßðüö_õÎoý½B¼¿Áÿò7Ù×9¿ô õ š¿†;øÌ(¢ŠÈã (¢€ Éþݪlÿ—{ýùˆþJüOµ[ÔnÚÒИ€k™O—âr?'؆ÚÝmmÖbØåœõv<–>ääþ5߀¡Ï>w²5¥»“'ß_­ehúµ¥žkmqö”š%*ëöYNOp¸­P2@õ¬­Ä~ K¶²k9‚O5BüÃÓ“ÅzXŠ­hÉØÞqR²eßíý;û÷ø 7ÿGöþýûü›ÿˆªZˆ,üGc-݈˜E­ y«´îÜñÈ­@Ù ‘ê r¬ºœ•ÔŒÕúoéß߸ÿÀI¿øŠ?·ôïïÜà$ßüEO»œnôÏ4n«øÓþ͇ó1û܃ûNþýÇþMÿÄRÿoéçøî?ðoþ"¦Éõ§!;מôfÃù˜{Ü–Úâ+»hî }ðÈ»‘°FGãRÖo‡¿ä^±ÿ®ÔÖ•y2V“G; (¢¤Ekþ@:ýzÉÿ šôÈÿÕ'û¢¼ÏZÿ£ÿ^²è&½2?õIþè­)Œóÿ!˜ÿìa—ùÉ]­qGþC1ÿØÃ/ó’»Zøž+þ=?Gù6g9©xŽòÓVžÊÛO‚e…P³ËrS%<‡ÓÖ³n|Ou-ýÖ™aÙчš÷ì+œþï)5Oùõ/÷ ÿÐZ¹_ZE?….放mÔ:!UÉe`88íšóð¸j3œ!%½µ×¯Ìõa‡ƒ£íÔØÔõëkãkû; bê‡û^Hw ² ùI‘Ò§}R+{èºlv×Åk“¨>@ÛƒåõéƒÔñX­Å…Ÿ‹Ö]Z[x­_Mt‰®HØ_ÌËžûqŸQXícÿ…®n|ás Å¢ª´‡4ƒ®pNÜ{ ô¡…‹„.ݺ»uóéoÄ™P¤¥%m¿à™ÝÞøÍl¯-Mõ¦•o>·Iu½xùWËǶ ‚óÄö¶×æË*›´dI©²—@8_/©*9ÅršäöÚŸ‰WR’Ý}61h'Æ\mpBgý¼p;Ö}ÌÛiÞ ¶Õ^5Ô¦²¶ÉpA•Ï’ÙžOï3Ó¡É¢ž_IÅJÏT¶o­¶×¥õ©SRjÇmyâ E¾·²žÒÂÚ÷ˆcW’)p¡•@ÂÑÜ{æ´Ä zdÚu«ùŠÅmJF‘À9$N29íÅyæ©,Øø’ÒæH—Xšâ²Ç!s‘„ÙÜüÁ±Ž‡5½skt»€d2Ïms¿{–(Àzw4ªà©Æ×mèÞït”´×Ïð(Ó};~.Ƨöõ©½:kÁg%þõ#ëR4à¯Ì¸%798÷5mµfo'O]*Ò7‚-ÉZœˆâ2qÉ ’¤Œzq\/›möu²Eýµý¿¿ÊÈóöù¹Ýë/¿Lq[V¶‘ZüB»1 O¦‰\¼…ŽLÄqžƒÐ:¸hÂ;½{½ÕµßÌ!BœžÝÏüaâ ;íQíâ´Ó¤º…ÖG´‡WpÇ· c Œª:vm5rÆK4Ñì Emöi"‹å"~pwÆq×Ú¸MkW‹Â¶Öï ÔດÞF„y¨ÉæoïÔ®s׎µ~ÖË욟‹­¬LÍ+ZÂÈZBÎ]£““œçü)ÖÂF ÆïEÝ÷å﵂iÊÚV¹ÙYxòKé$†Æ *áááÒ-D±NÜâ:C—íû²HoÝñÁ¸ k ÍOÃɦK´¹RïìÄ€ªìàsÍ@lþËáZY‰ŽéÀùË1\e²O'Œçñ¬§–aÔùmÛ{ÿ7/˜F”½¿+žeãɵ(ÞK m.éc8s [i÷ÄuÖé·Ú]¥æÏ/í¤»3»€8Ï~µäúmÅß‹§›I–Þ[EÓ$kb6ÞJƒŽûsôéþÿ‘gJÿ¯8¿ô^fe…§BÜŠÛwó2«¨'ˆ?ä1¤ÛýTu'ˆ?ä1¤ÛýTuõœ=þãWùžmoŒr¬_¨®CHÿTð?ý «¯Oõ‹õÈiò ƒþÿ¡µ}6ãg‰œÿzþŒžoøùÓÿëö/æk¦®foøùÓÿëö/æk¦£ñ¯AdßÀ~¿¢ (¢¹\(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š†óþ<.¿ëƒÿè&¼ZÛþ= ÿ®kü…{Mçüx]×ÿÐMxµ·üzAÿ\×ù ÞSÓËw—Èßðüö_õÎoý½B¼¿Áÿò7Ù×9¿ô õ š¿†;øÌ(¢ŠÈã (¢€2fËxƒpÛ6ã±Éćë¡÷âÕ&§k%Ű’Üwó í“Ý>Œ8ü½)–óÇuO%dg¨õÜ+ÚËê'O“ª:hÉ5bTáÔŸZó?ëznÿ ¶­y•Âß¼¾Lçc2ã°=ýUéuNïHÓu —ºu¥Ì€`4Ы>¤W\àÛRŽèѧ{£ÉtËYeøYpçPþ̆]Q¤ófGÙ2i* ÚOᑊØð…Ä–~#Ô¬"Ó¡·Ô ‰™…È’ÎB;yÁ'¶+Òže€Á$1¼%v˜ÙR=1Óže§#%½ª1Ë" ÷À¬£‡i§}‰TícÄtd¸’ÇQMjÎÓ[kÆó Ë3ÜÈIÆÖŒ)>¾üûuÚŽe®üdº³¿G’Øië'–²€¸Î;sŸÀW~š^Ÿë^Çal—lI3¬*ç¯ÍŒóOV¢ðÞ hEÑ]†}ƒy_MÝqJ8k+7Ô=,OJŸ}~´”äûëõ®³B¿‡¿ä^±ÿ®ÔÖ•fø{þEëúçýMiWÌTøß©Â÷ (¢ Ekþ@:ýzÉÿ šôÈÿÕ'û¢¼ÏZÿ£ÿ^²è&½2?õIþè­)Œóÿ!˜ÿìa—ùÉ]­qGþC1ÿØÃ/ó’»Zøž+þ=?Gù6g¬­Ä>$½“ì7²Ç*E±á¶yàyQTÝÞD(úV¤êz«XHAü6סÑ^q–IríæzÅNåIs0ûB…ŸG¿•AÈiÒ0ñZ{;¸ô­I€ €ÖÐýÚô:)ýwû¿‰]©Ù_3ÎdQ3#K£ßÈÈr¥ôçb§Û+Å¢YI4{÷‘>ã¶œä¯Ð•⽊^þïâ/®Ô쿯™ç,¡æYŸG¿iSîÈÚs–_¡Û‘O.åÃ+R. €ÆÂLŒõÁÛ^‡E/®ÿwñ×jv_×Ìóœ?ÏþÇ¿ó±3û9÷cÓ;sOÞû÷ÿeê[ñ·wØ$Î=3·¥z}wû¿ˆ}v§eý|Ï9U 3Lš=úÊÿzA§8fú¹4ðî®Î4½H;cs 2qÓ'mz}wû¿ˆ}v§eý|Ï9D,í9ËÓK}p¼ÓÕÝKÒµ Xå±a Ü}OËÍz}vÿgñ®Ô쿯™ç1¯Œ°h÷ñÉéÒ('ðZí´¤ƒÃÚlR£G"ZÄ®Œ0T…´(¬«â}¬mcµåU$ú÷ˆ?ä1¤ÛýTu'ˆ?ä1¤ÛýTu÷=þãWùžuoŒr¬_¨®CHÿTð?ý «¯Oõ‹õÈiò ƒþÿ¡µ}6ãg‰œÿzþŒžoøùÓÿëö/æk¦®foøùÓÿëö/æk¦£ñ¯AdßÀ~¿¢ (¢¹\(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š†óþ<.¿ëƒÿè&¼ZÛþ= ÿ®kü…{Mçüx]×ÿÐMxµ·üzAÿ\×ù ÞSÓËw—Èßðüö_õÎoý½B¼¿Áÿò7Ù×9¿ô õ š¿†;øÌ(¢ŠÈã (¢€ Éuû©°qoxY×ý™º°ú0ù¾¡½kZ«ßZ-õ”¶å¶GÀàå[ð Ö…WJjH¨Ë•ÜbrëŸZÊÑô¸ot{[™æ½i¥RÎÂòQ““Ø6^±¸7( Šhä1ÊŸÝpyüQìE'‡ä]±ÿ®gÿB5écê>HÊsj¯DÐaYÿÏKïü ›ÿŠ£û Ïþz_àlßüUiÑ^_µ©üÏï0æ}ÌÏì+?ùé}ÿ³ñTaYÿÏKïü ›ÿŠ­:(öµ?™ýáÌû™ŸØVóÒûÿfÿâ©F…f?å¥÷þÍÿÅV•{Yÿ3ûÙ÷"¶¶ŠÎÖ+hlQ.ÔRIÀúžMKE (¢€(ë_òÔëÖOýצGþ©?Ýæz×ü€uúõ“ÿA5é‘ÿªO÷EiLg™<2K. Ð[ˆuYæ„·@ë!ëìA ûêtýBFØÍå*Å$¾ôl:©÷®vßþ>µ?ûÜÿèÃJö În š[[‚0e€€Xv !±Û ã¶+ÅÎ2µŽâí5·oF]:œ¬ë(®SÍÖÿè3þ/ÿG›­ÿÐj?ü_þ*¾cý[Æÿwïÿ€oí¢utW)æëôÿ—ÿŠ£ÍÖÿè5þ/ÿGú·þïßÿ=´N®Šå<ÝoþƒQÿàÿñTyºßý£ÿÀ%ÿâ¨ÿVñ¿ÝûÿඉÕÑ\§›­ÿÐj?ü_þ*7[ÿ Ôø¿üUêÞ7û¿üöÑ:º+”óu¿ú Gÿ€KÿÅQæëôÿ—ÿŠ£ý[Æÿwïÿ€Ú'WEržn·ÿA¨ÿð øª<ÝoþƒQÿàÿñT«xßîýÿðÛDêè®SÍÖÿè5þ/ÿG›­ÿÐj?ü_þ*õoýß¿þ{h]Êyºßý£ÿÀ%ÿâ©’Áwx»5FK˜¿ç”h!Fÿ{iË}3j¨pÖ-É)4—õä'Z$÷— ©kxŽëkDx‘»4„áÈövç¹'ÒMDH£XãEDQ…Uz)ÕöXL40´cF#žRæwc“ýbýErGü‚ ÿÿèm]z¬_¨®CHÿTð?ý «ÔÁülñóŸà/_Ñ“Íÿ:ý~ÅüÍtÕÌÍÿ:ý~ÅüÍtÔc>5è,›ø×ôAEW!ë…Q@Q@Q@Q@Q@Q@ÞÇ…×ýpý׋[Ǥõͯi¼ÿ ¯úàÿú ¯¶ÿH?ëšÿ![Ñêzynòùþÿ‘¾Ëþ¹Íÿ W¨W—ø?þFû/úç7þ^¡SWâ0Ç…QYaEPEPeâý‹QŠøq¤Gsèÿè'ØJ<=ÿ"õýs?ú­ bIáxePÑÈ¥YOpx5›bºn›mb’<©'ÞosïZº­ÓP} 溱jŠ(¬‰ (¢€ (¢€ (¢€ (¢€(ë_òÔëÖOýצGþ©?Ýæz×ü€uúõ“ÿA5é‘ÿªO÷EiLg[ÿÇÖ§ÿaŸýjz‚ßþ>µ?ûÜÿèÃSÔKqQHŠ( Š( Š( Š( Š( Š( Š( Š( 'úÅúŠä4ùAÿÿÐÚºôÿX¿Q\†‘ÿ ¨?àúW^ãg“œÿzþŒžoøùÓÿëö/æk¦®foøùÓÿëö/æk¦£ñ¯AdßÀ~¿¢ (¢¹\(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š†óþ<.¿ëƒÿè&¼ZÛþ= ÿ®kü…{Mçüx]×ÿÐMxµ·üzAÿ\×ù ÞSÓËw—Èßðüö_õÎoý½B¼¿Áÿò7Ù×9¿ô õ š¿†;øÌ(¢ŠÈã (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€(ë_òÔëÖOýצGþ©?Ýæz×ü€uúõ“ÿA5é‘ÿªO÷EiLg[ÿÇÖ§ÿaŸýjz‚ßþ>µ?ûÜÿèÃSÔKqQHŠ( Š( Š( Š( Š( Š( Š( Š( 'úÅúŠä4ùAÿÿÐÚºôÿX¿Q\†‘ÿ ¨?àúW^ãg“œÿzþŒžoøùÓÿëö/æk¦®foøùÓÿëö/æk¦£ñ¯AdßÀ~¿¢ (¢¹\(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š†óþ<.¿ëƒÿè&¼ZÛþ= ÿ®kü…{Mçüx]×ÿÐMxµ·üzAÿ\×ù ÞSÓËw—Èßðüö_õÎoý½B¼¿Áÿò7Ù×9¿ô õ š¿†;øÌ(¢ŠÈã (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€(ë_òÔëÖOýצGþ©?Ýæz×ü€uúõ“ÿA5é‘ÿªO÷EiLg[ÿÇÖ§ÿaŸýjz‚ßþ>µ?ûÜÿèÃSÔKqQHŠ( Š( Š( Š( Š( Š( Š( Š( 'úÅúŠä4ùAÿÿÐÚºôÿX¿Q\†‘ÿ ¨?àúW^ãg“œÿzþŒžoøùÓÿëö/æk¦®foøùÓÿëö/æk¦£ñ¯AdßÀ~¿¢ (¢¹\(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š†óþ<.¿ëƒÿè&¼ZÛþ= ÿ®kü…{Mçüx]×ÿÐMxµ·üzAÿ\×ù ÞSÓËw—Èßðüö_õÎoý½B¼¿Áÿò7Ù×9¿ô õ š¿†;øÌ(¢ŠÈã (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€(ë_òÔëÖOýצGþ©?Ýæz×ü€uúõ“ÿA5é‘ÿªO÷EiLg[ÿÇÖ§ÿaŸýjz‚.õ0x?Ú7ÀÍOQ-ÄQE (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€Ÿëê+Ò?äüÿCjë”áô9®nßCÕm`X"ºÓÚ5-´¼Rg“ÎÞº0Õ# 7#Ḭ̈õ+ÒQ¦®î2oøùÓÿëö/æk¦¬Ñõ&º¶{‹›/*–R"ý†N+zŒMHÎIÄ2Ü=Jœj+;…Q\ç QEQEQEQEQEQECyÿ_õÁÿô^-mÿ×5þB½²hüëybÎ<ÄdϦF+áæ£hƒU³!T.~Îý‡ûÕ­)(Þçv ¼)9s½Êÿ‘¾Ëþ¹Íÿ W¨W#¡x:ïIÖ¡¿žþÞU‰vG);†:’k®¥Q¦îŒ±U#R§4v (¢³9‚Š( Š( Š( Š( Š( Š( Š( Š(  :×ü€uúõ“ÿA5é‘ÿªO÷EyžµÎ‡~£’Öîª=XŒõ$ø×¦GÄj\ Ò˜ÎKÄT–W—´ d¶Ÿk] hؾ`õÛh#½fDéq’YPôhÈ`^…\/Št­954e°µRñïr!Q¹‰9'ŽM9FúÇþéü¨ØÿÝ?•cÿgXÿÏ•¿ýú_ð£û:Çþ|­ÿïÒÿ…O ýÓùQ±ÿº*ÇþαÿŸ+ûô¿áGöuüù[ÿߥÿ 9ØØÿÝ?•û§ò¬ìëùò·ÿ¿KþgXÿÏ•¿ýú_ð£ ýÓùQ±ÿº*ÇþαÿŸ+ûô¿áGöuüù[ÿߥÿ 9ØØÿÝ?•û§ò¬ìëùò·ÿ¿KþgXÿÏ•¿ýú_ð£ ýÓùQ±ÿº*ÇþαÿŸ+ûô¿áGöuüù[ÿߥÿ 9ØØÿÝ?•û§ò¬ìëùò·ÿ¿KþgXÿÏ•¿ýú_ð£ ýÓùQ±ÿº*ÇþαÿŸ+ûô¿áGöuüù[ÿߥÿ 9ØØÿÝ?•û§ò¬ìëùò·ÿ¿KþgXÿÏ•¿ýú_ð£ ýÓùQ±ÿº*ÇþαÿŸ+ûô¿áGöuüù[ÿߥÿ 9ØØÿÝ?•û§ò¬ìëùò·ÿ¿KþgXÿÏ•¿ýú_ð£ ýÓùQ±ÿº*ÇþαÿŸ+ûô¿áGöuüù[ÿߥÿ 9ØØÿÝ?•û§ò¬ìëùò·ÿ¿KþgXÿÏ•¿ýú_ð£ ýÓùQ±ÿº*ÇþαÿŸ+ûô¿áGöuüù[ÿߥÿ 9ØØÿÝ?•û§ò¬ìëùò·ÿ¿KþgXÿÏ•¿ýú_ð£ ýÓùQ±ÿº*ÇþαÿŸ+ûô¿áGöuüù[ÿߥÿ 9ØØÿÝ?•û§ò¬ìëùò·ÿ¿KþgXÿÏ•¿ýú_ð£ ýÓùQ±ÿº*ÇþαÿŸ+ûô¿áGöuüù[ÿߥÿ 9ØØÿÝ?•û§ò¬ìëùò·ÿ¿KþgXÿÏ•¿ýú_ð£ ýÓùQ±ÿº*ÇþαÿŸ+ûô¿áGöuüù[ÿߥÿ 9ØØÿÝ?•û§ò¬ìëùò·ÿ¿KþgXÿÏ•¿ýú_ð£ ýÓùQ±ÿº*ÇþαÿŸ+ûô¿áGöuüù[ÿߥÿ 9ØØÿÝ?•û§ò¬ìëùò·ÿ¿KþgXÿÏ•¿ýú_ð£ ýÓùQ±ÿº*ÇþαÿŸ+ûô¿áGöuüù[ÿߥÿ 9ØØÿÝ?•û§ò¬ìëùò·ÿ¿KþgXÿÏ•¿ýú_ð£ ýÓùQ±ÿº*ÇþαÿŸ+ûô¿áGöuüù[ÿߥÿ 9ØØÿÝ?•û§ò¬ìëùò·ÿ¿KþgXÿÏ•¿ýú_ð£ ýÓùQ±ÿº*ÇþαÿŸ+ûô¿áGöuüù[ÿߥÿ 9ØØÿÝ?•#ŠYÆÕIàVGöuüù[ÿߥÿ ÐÐô­:]bÝ$Óí] 9V…H?)ö£ ô»!âÄT%´Ø]dšeû²²°"5=ù’3ЧŽû*ª(UPªRÖ‰XgÿÙaxiom-1.2.8/src/site/resources/images/sw_min.gif0000644000000000000000000000005511131637462020336 0ustar rootrootGIF89a€ÿÿÿÿÿÿ!ù,D–P;axiom-1.2.8/src/site/resources/images/expanded.gif0000644000000000000000000000006411131637462020632 0ustar rootrootGIF89a€!ù , „j œ´Î;axiom-1.2.8/src/site/resources/images/product_logo.gif0000644000000000000000000000125011131637462021540 0ustar rootrootGIF89aгÿÿÿ±ÀÑßåì3f5]†¥¼¿ÌÙïòõu‘¬¦¸ÉÏÙâÿÿÿ!ù ,ŠÿÈI«½8ëÍ»ÿ`(Ždižhª®,™A°m}/Ï…ƒ˜0€HølŠ¡’v$é”1cS„*'œ¡‡J¥‰€tš ÆãÂâ{2DSO¦„Kî —½ÈMBcuTwM}‚%O k2 {B“10b/g[‘n1{f ˆ£–V&^¢ˆ¦Pr“•—fbOCh ÃBÅšxµÄCÈJ&ÂJ¤Îš1̼¾P à š±[g±›Íz F¦ê AåfÛY€š#äO®ß$„cC`—L=Ììé“ëD—<¢ƒí‹ÎÿôðÂŒI QÆ àî¡T,»Y8S„&O`{Ó‚]FM0cLnÁ%)˜Òƒ®é£G;0ÀmR-z”ÆøÃ‚›ÊY&])t‚G !­pÓY!m¥iE8ñ¬ÑgP eÇÎ*{4i6YCêúµÐG]Óo •9‹"ë_QN¶•ùr‚»˜ñ,W®Àø·Á‘nìµ²‚O,KS$‰»s+f?ZOX-\T š0MÀd툆ãôhºœ(i…‚€çLž¡./UeV×5¾sÈånÔ@bžUËдÝ1«¶ÐÑvçÏht Сk°žlO®%D³•Um¦Mó…˜Ö ¡ÀMö'A„ÓáwuLõ”Eªì€I:C aì}2G(°Ü@Õl*6]#`•Gfs`ôöóTxAdÉ&cÆ&T˜+rÆ>rÇ?R.Ew(hŸF= cÃ&a¿&a»&fÁ-iÅ/hÂ0c¸.jÂ3j»4l¾6i·4sÌ;,JxÊEŸ­–›¤•a¹"`³&_«(rº?°º©àèÚ6X¢T—Y£ ]Ÿ(S’[”(P‰Lq(-O…JvN|!1Knjoc#Ed?P 9=þþüýùºþö°þö±ûð§þò§ùè”ûëšðá•þïžÿç‡ÿèŠÿéÿì—äÌwÞÆtéÑzíÖ~äÝÃиkÁªc͵jÕ½oηp§‡'³—D¼¤\À¨b«i¿©gº¤f  §TžŠX›r•M–€P•…`¡hˆrFmEnG†rJþþþÌÌÌÿÿÿ!ù™,Ü3 H° A‚’ JÔG ˆpÀ ÐÑ6nèø!€ÇBâcçN<…2mpà@€ :4 ´§œ7„2•øÈÓÒ?yâÈ”©‚G ’2`ÁÈ =•RàùqM¤I(¥z4é‚+ZÈh"%“L<^RB "Bx̘’Ç N uà¢Æ’A†1‚Æ2X˜ ÃŽ@ž@Á¢E‰‚ ŒˆpÃÇ‘(W¬l#&Œˆ2!H°ÃI•,^¾”1ƒ&MALc¸ô Ò…Ì5Š;axiom-1.2.8/src/site/resources/images/nw_min_hi.gif0000644000000000000000000000005611131637462021012 0ustar rootrootGIF89a€ÿÿÿÿÿÿ!ù,„sËP;axiom-1.2.8/src/site/resources/images/update.gif0000644000000000000000000000030011131637462020315 0ustar rootrootGIF89a³ Ù•\ëÒª?!y‰’ÄÄ~LWA(ç²xdG¬ûüúϾ¯V.°®¸Ü6+Vqg·!ù ,mPÉI«½8ëØßä!HhyÁ7’åE"[š¢\Ó¬'à O†ÜH °vhzÈ߉u  À"yÚ.ŽF#øJ‡¬Ã*ö` Ž<ñ ²cÀ`Ð Af{ €‹‰ŽŽ;axiom-1.2.8/src/site/resources/images/nw_med_hi.gif0000644000000000000000000000005711131637462020775 0ustar rootrootGIF89a€ÿÿÿÿÿÿ!ù,„a¡ ;axiom-1.2.8/src/site/resources/images/folder-open.gif0000644000000000000000000000034511131637462021256 0ustar rootrootGIF89a³ ™™™ŠŠŠÿÿÿìììÌÌÌfff³³³ºººªªªvvváááÿÿÿ!ù ,’pÉI«½xª ! À0d@ ‚@Çð:m.4RÛ €@ñá @žÐ‚J‚ …ìåC£PÀD%l¹ "(ÆÊñ`@@ {Ôê´¶uNo lO)L&s# ƒ!PxYE<'…ˆ–—M4%w L¥œBªŸ|;axiom-1.2.8/src/site/resources/images/collapsed.gif0000644000000000000000000000006511131637462021011 0ustar rootrootGIF89a€!ù , DŽ`ºçžcŠ5 ;axiom-1.2.8/src/site/resources/images/icon_arrowfolderclosed1_sml.gif0000644000000000000000000000067111131637462024532 0ustar rootrootGIF89aÕÿÿÿâæë€€üùÙúò®üöºûöÉýûçøì¤òã•õçœä×™ëà§ñÞˆòàëÙ‹íÕ|âÊvàÈußÇtÙÂqÕ¾oîÖ}åÎxéÑ{íÖ~ïÙƒÕÁ{Ì´iØÀpѹlÏ·kɱhÜÄsÓ¼n¿«lÕ„¼¥`· ]±šZÅ­eÁ©c ˆO«”W¥ŽT”}IŽwF™‚L†oB­¬ªh=u^7jR0VUU’‘‘þþþòòòmmmÿÿÿ!ù;,ÖÀpH,žŽH¢ÄÓQŸÆá€(¡V0—;oPa…aP±Z(‡q ®¯-¼#L ƒq0$+_sP(w‹ ‚D722…E, & 0_”–C,x€¢¤’2¶¨;!&' ¯"Äqµ:¹;#+'°ÆC7ÈÊB1' "#æ3_Ét4+¢ã &15,rt;/+ï-4hˆ€²ˆ¾a `Ô¸†–ôF4œ¸ãD Za‚;axiom-1.2.8/src/site/resources/images/OM004.jpg0000644000000000000000000007126011131637462017622 0ustar rootrootÿØÿàJFIF``ÿÛC    $.' ",#(7),01444'9=82<.342ÿÛC  2!!22222222222222222222222222222222222222222222222222ÿÀV|"ÿÄ ÿĵ}!1AQa"q2‘¡#B±ÁRÑð$3br‚ %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyzƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖרÙÚáâãäåæçèéêñòóôõö÷øùúÿÄ ÿĵw!1AQaq"2B‘¡±Á #3RðbrÑ $4á%ñ&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz‚ƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖרÙÚâãäåæçèéêòóôõö÷øùúÿÚ ?÷ú(¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¤Í-”PÑFh Š3EQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQERdQšZ))h¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š( rsø Ä÷yž-rfã%^ êÛ¥yiÖtÍOQ±Êù­¸Ü˜íê9=?J»’JÇ6!É%ÊkÿÂÀ·^a€€ÈñTäŒN„ý*Ô>/3*Ÿ68‹©eY£;€=±Îkû+AyÍo&pÌò³n'9É'’yëI5¦¥fxD6Ÿ2v$‚\ŸF8ö5Íí%ÜåueÜèŒâÜŠ/m r ÉïïÇCϵ ã”&omNý»qÎsŒ¾õÍ}›Ã;ƒyÐgq;¹÷÷?*Ûxi Knq´‰ÏÀý±G´—q{Y÷g¡èzö¥›\ Dß…húZ•áí¢Ñü»2¦Ü9ØU²1õ­úí¦ïÏF›¼ (¢¬°¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢ŠC@Í爽õÜx¶¤SÕÉüe? ‰¤—fâÀ+BCpô÷ ¸õÍgêÖ‰7ˆõ+2»§$ÇpþX €Á>EC.—¡7•æª3.Y¥b{rNy?w¯ ô®NJNç*“Ri›Pxâ †eK»pCmùÆÞrF9ú/Z³câÕ¾»Ž.mÝŒ É‘ÏNz×3.á¸d«l…€bR7 3Ï#ùU"ßC‹V·{€Ü—UÊÈYˆÝ“Ôþ´£RWÜQ«'%©é”Rw¥®óÒ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€çWœ=ž˜——79É»{6üa˜œxžÞ¾õé Ò¹ù|?$ÅË\FU›8hÉïŸZ´e$¹NlD%4¹NKþ$ñ  >S€î$z~ýj¹õœkI/*àŽ˜ˆÅmÿÂ&›·n·ÝÁÏ‘ÿ׬í_F‡I´IŒPË™6$8;z³uþ Øö¬=ŒûßW©ØˆÞÛÚgLã8ÝÛÿ OáIöÛc´ ˆÎã…ùºœã™^¿³¹³’ЩNÄ3DŸ0Âî üÝ¿°Ýý¢j#»µš2Ë,DÜÌ»Iã¶s×Ò§ØÔì/«ÔìoxnTšÆY#pèd8aÐð+j±¼:èö“lg,²”‘^"…X‘ƒœýA"¶k¶šj)3ЦšŠL(¢Š²ÂŠ( Š( Š( Š( Š( Š( Š( Š( Š( Š( Š( Š( Š( Š( Š( Š( Š( Š( Š( Š( Š( Š( Š( Š( Š( '5J}cN¶ g½·‹nwn•F1×<ñUäÕ̲4ø~×(8glHÚ_a“Y¶ÚȺ¹ŠëìÍg4Ÿhv†0­#7XÏ}™Îrs\€r7·Ú-ÇŠ¯F^Q)Þâç ~m™éœþ'5;ÿc§ÏŒŸ»òîÏ>߀®žçÂÜj]‰0^O0+n*黽¨>MÛ‹Û猟$öéÞ¸çJnZ5(ÎRº0ÖúÊÞ$%5P2p9ïéÔUËyã{ÛxÖE.dR<à0ÏzD7—×V®°FÑ;ØÅ‘2ŒaÏfÈ#·^õ¦þB`žxÞÝ€WŒFFWÓ¯•§± 4Ó±ÑîëÁ¥#5Æ%£Ùß[XÛÚÝ-\K3Ã+"Ëû¼gi$ã+þÉõÕYÞCyè0^q†SèAäc]§¢Z¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¤Å-V.µm¨4ö÷6q[ʰ,„Å)l± €†€+IçZ³Ê‹<ÈåG”¸ù;Ý2=ªè ޹¥ª^CÛMºÙ# $¥¦RHΈ{çóæ€.ÑPAw ÄBXIèËÒ§ Š( Š( Š( Š( Š( Š( Š( Š( Š( Š( Š( Š( Š( Š( Š( Š( Š( ƒE!é@Mw¶YUò5ö•Ÿü÷OΰWÙ¼¶ó·}ïl~µÇê?ð‘}®Cd —¹ÆÒ¸ïžv}x®iVq•ŽIâ%8£Óÿ´¬ÿçá?:?´¬ÿçá?:ò¨ÏŠámÅlE÷Y——ÀëÏL“ÿ|Õ™®¼M½ü«m¹ãq·ñ~•>ÞDýfG¦iYÿÏÂ~tiYÿÏÄ÷ÕymËx¢[–0F‘&víV\`’22z€sÿÅI-ljÙWe” µ·pÀd÷O=3Ç¿µÞAõ™•6¯aEÞéÎÐË1ì“ì*¸mSR(m>Ø÷`wNB®OÒ³ü)É\]żØW ä]8®ˆ>h¦uS“”T™VËO¶±FE†s—v;Ï«1äÕ¼J(«,(¢Š(¢Ð«éáˆ7‘dqÔlißóùýõ^e¨¦¥ä•†MÏç9c Û9ÚxÎqšÊuñ9ºo˜ÛÁvîùsÇ\d7æk¯êѱ‡µg­ÝêÖ¯lÂÚößÎà¦óÆsþENº¾øü‹þú¯ ó¼Kö@ŸeŒJcåÃ)`ØíÎ\}zsOâMÈëiÕ—pÆ8ÚzýŸգÜ=¤]þØÓ¿çò/ûêí;þ"ÿ¾«ÉÖë[–î8šÝÐÌëÆyÆO§a[gïU,"}EíYݾ³§*ûd@’wUØÙe‰d^UÔ}A¯4Ÿþ=åÿq¿•z=üx[×%þB°­ESµ)ÍËq—¶^¢¬©’‡(êvºU#‘UcmBÉ–)É»·è.bEÿ}Gê?*Õ¦I-¾†°f…UÔ­;Ο/öŸüü'ç\§U]ÆDFëÌ>W“ýÍݳÆí½=ñYÇâsxË!‘m€b§rn8Vع%r}@í\ŸX‘Åõ™©ý¥gÿ?þtiYÿÏÂ~uæ°Éâ|BФÁ|°%r ýö8#§8µlMɳSx1>æ,qÛÓÛ¾±$'Š’èvßÚVóñçHu+0úD]ÕÉÓdÿVÿîš_Y}‰XÉv;„`Ê9‘N¨­ÿãÞ/÷ò©k±‚ (¢˜¥P{}þuÀy•þ|ªŽ¨¤ã“øÕŠ© ª_Üb¥Ñ¥ì瑨~b­ÐZ¤[_e#•…ËåÈ9U!zã¶@ý^¨®"ÛIfPêFä8#ÜZ–€AªÖ³«‰‰DÛÈ1¸Ô{µ@æ‰ã—Ήœ…FÝ óž¹ö?ϽO¾tHûYC(;]pÃØŽÆ¥ÅQžÞDynm‘MÁP¸v!Xß'š½EA ñI½V@̵À<©ÇCSÐEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEv s^ÿÔÿ®Ö°/Eñò…‘‹ï3¦8Åkø’dÔ"1ÞIòЍsϸ&°^-SÌa±ìó .O;sÀééþMyÕ~6yu—ïZ(¼Dù“Zî ‘ž@>:gô÷«šzj),Ÿndd<¦Ò “žƒÓ±Á|ð¨–í¢un J­¸`uÈúÒý’ëòŸþýÇÿÄÖw2fsÚkí.RéÁ¤Ï9É#Ž:c4¾Gˆ7Au²“Î1Áéë’~¼sZdºÿ œÿ÷ê?þ&iuÿA9ÿïÜ_üMUÇsÂBäAp/ ·.í\ ék𺀠諾—ÀN‡ðÐQE¡¨QERZNôæòÞ?ûÇùÖEÊêáäh$ˆ ?*q’3üÀþURÛJÕ`Ôoæ{ça#?– €–ãtoδ6jerdˆ6sÁÿët¯V2¼QÆô{•c‹^ùƒÏnâA9àtô'ò§õæL™­ÕÁà.1ù‘WŒ †ûl‘ä ª¢|df“ì·ô›þýÇÿÄÕXn¢Ô¥³a”Gp#!ʾ~0sŽG^1Þª-¶¼®X]Äܵç§\§&´~Ír?æ!7ýûÿ‰£ì·ô›þýÇÿÄÑ`)*k!Ý®$€ÀU·=8=8ú~>Õëv?ñámÿ\—ù òémçÈMü¬œ©9öûµê6?ò¶ÿ®Kü…qâºQêX¦Iþ­¾†ŸL—ý[óŽ:×#5{WCYS&´Ï(ŽKtB[Ë#¨ÃÔTò[Þ‹yWÏ$§wª(\öGáQ˜µrEà°Î1Ó§Ö¼¾§Ö¥/Ä,˜2Û»8LqƒÇnArâ;÷±„FÃí~ókíÉÚztÎ;t#Úܳ±]Fu’Gÿ¾i¿dºÿ œÿ÷î?þ&\Ì[?æúê<7<“Ç\ÐTâ=sÏ $–þ@:ŽNß^qÁý8«Ÿdºÿ œÿ÷î?þ&ƒkr –Ôg`ʘãÁöái¦;õ¿ü{EþàþU5Eoÿñÿº?•K^’ØõÖÁESQEM™SRE3ïb.Ç|߆qøÕ±Ò«Ì²}®Ý’$1€ÁÜýåàcSVJZ PÂ-È»’YQ!ÞŠ28çßãWGAAPzŠ©¦;–µš}òÒ +“?®:~TrŒŠZ(´ÖÌåZ|—Ü  ï±§[Üý¡ ò¤Œ«e‘pAÌ{ÔõZke’H愱ga @ät#¸  4U[{–p©8HîvnxƒŽq‘ê=êÕQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEyß´;­SW†[uû°yùÆQ¸ù³Ç<} A5½Ù¸Aƒ:±òÙb¾ c È®Û^šâßJšKYÖ†6›‹”ï€ó‚z¡áûŸPºÔ ¤ðÊm÷\äÊÇï9-Ügc—Ž+Òæw9êPçw¹Ìý†üD#û\„Ìožœó^s×µYŽ •€#ÜM¿<²ÅÔ~#éùW `QŠ«®ä}Uw8 173¨Ûÿ<†ÏÝö?ŸÒˆÒI9c¹™ãaË!Ç<ä/¸éè+¾eH zŒu®3HŒÚ\ÛXéÆh Ú ³·0§…ÛÓ{.Fïž…}Ywª.淆ѕn7o< Üë´±Ç^ƒô­újŽ:º!XØé„yb¢QEQAEPGz)(Ŭ´[Ë]VöàÜñ#Ès•îÃÑA/sÖ´µî?ãð‘Øãßóæ¨ZèØj7×~mÆ%wlùr| ‘×#üêÌ1\ÝÇÐ^Í,@å^(ƒpGP0y¯JInrÉ6É~É{å”û^G<œçó§%µÚȬיPy\{sM—âEo2ààŽ<‰9dtïÖ¬˜§$á¯FFû9㎿wñ«RrlÈþËqÿAÿïÜüMe¸ÿ „ÿ÷ÄüMIäϹNoNHû9çœãîþ äÛ[4·WPÆ¿zY!Ún¥qÖŸ4{ŽÌIm§HMôÌœ©D玟v½FÇþ<-¿ë’ÿ!^dñÌñHéö¹Ô•ÜàýÞ•é¶@‹ `AD¹·¹1M6¬kI5¹b¢¸­ä©RåRÒÅrG¤hÖ73ÈY &DŸ—„/rzÖ˜°Ô «5ä„®ì-¿ ŒW¤`TW3}žÖY„rKå¡o.5ÜÍÐZÁÐMîs<2osÏVÞð]&o +†1ìlíϧày«^Tä’..ˆqÀçîý:ÓÑ.­®µæœN²^Ïlÿi\1”uÂ`ó…ÞG×>µÕâ§ê˹?T]ÎC0*|ûŒ£ÊòO÷}ÿO­ Še^ežLÁ‹¸ö_^ïñF(ú²î »‘À6ÛÆ;…Ê¥¤–ºQÖQEQES¾1£Z¼žgË8 ³ûÌ óíóU±÷EAx]`Ìr"0e;Ÿ¦23úTã¥-Q@VºŠW02$ ‚×#ˆ«4„db€"¶ž)áÃ"¼mÑ”ç55Rɵ¹ ˜R 1°”™ $ýs×ð5tt Š(  ÷6æeb…c—iT—h%sõíÀâ™oqºWà bU,v¬u?[ª×V‰s–Í"áƒF*Aô`Ã"–©ÅtÊíÂ$L\¬_8>`õþ¢®PEPEPEPEPEPEPEPEPEPEPEPEPEPEPL•Ò8ÙÝ‚¢Œ³7@sO¬iöÝÓ@üKíßÓÈ?€z¨=}O-œoª\&£2•·Cþ‰ qÿ=õ=½õ5±H8´QETOdeÜFàFTà¥KES¶”£ý‘üÖ’\ÈëĀޠŽ3sWÍW¸·ó‚,‘”pà£c8ì}A¢Öãí‰<§Œ’AG Ž(ÅQ@Q@!4¦²ïîå–°Y6'*Yq‘ÿïÃñé@ÌÎúŒ²ùjvÑm’ålü§hûýy;x>µ¿¥Ú}‡L·¶ï|ØîÇ–?™5%µ”6–é ª(ãžO©'¹=sS@ F=袀ÔÕMNÓíÚmŶpdBžÍÔÀàÕÊ(“Ñæxõf0O§Ú\ǵ nI¿‹å?s¡ÛŒnäúWV§Uîl⺷x&‘ÇÍÏ?QèG­T±¹š ìëÇÝ:‚ÑJåºÿïãñï@”QEÖÎÞ)ÕSP‘Ñ£’GÎ"%hÇÌ  Peú:9€C#åäN¸fäóõ«tÔ ”ê(¢Š(¢Š(¢Š(¢Š­¨*=„Êñ—a>XêØçaNTQL˜”1RA‡jŽÅÖK&ó—`ýï÷øë@(¢Š(¢ŠŠxRu 识 7 áÈ?¦Z¼¯ùáVP1"«dV*”‘›{¡4P†2°Y˜ |tühí‹È¥ Š( ¥‚9vo[cRGÝaÜ{Õh'’bµº“̙Ñc*¬üÆ8úÕêŽX„±4lNpp1Ò€Fij”r=´‚ÞUc"…¸w9éƒïÓëš¶Žôê(¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€8£5•â+ïìÝâó2Ü|±–#Ú¹KÄóiÐÂþdÏæ#K†}„ Æz÷ù†e:ªÖ1©YBVhô<Ñšò¨<}5Ó¬p¤åÙÂa¦Àäúzjž/Û¼r3Ü\£#ì*윞‡è¹¨öë±»Ey¢xæÒD,·wDü‡©ÉþŸÊµ,µ‹‹ë(®’i•%PÍÎ3ÇøÐñ t%âÒèt—÷\\ >ÍÊ»g˜Ë>ŸíƒÓ“Ú®Û[ÅkA b8mU…r‚îàDî êAÆißnºÿŸ‰?犯­D>¹Ç_‘K\Εuq.­o3²Ü•'Ž1](­á55ttS¨§¡hÍÏøªúk€ÌI„dÅÛ ò}«XÇ™¤ŠnÊæþhÝë^Kuã[»Y.IrR"Ê—“´¨n;›Z†ˆK$k$·QïRã÷°ïÌü¿øõmõiw3U|`<Š¥t¦ÞCv‘Í#ÚcŒðFzãÔs^gb• ¦¡y´.ìyöúÔ7Õ‰ÝÈŠ›™÷íÇÿAϽV—pö¾G¯ƒòŒÒ漎oˆÎ>ÛtX0 Ô3‚Ù¤>=B¦òó©ç$öíÒ«K¸{UØõÚJòÈ´µB5’Éã‹÷ÓDîÄÊΕ߹@?Jº®¬ƒÐШ¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(=(¦I4qdu@NcŒŸJ£­Œé’}Gó®NãÈXZ[…B‘ûAÛÔWQâtÒeh¢2¶Wä <úž+ŸQk(\Z: rÜ—×!{矊¿:)ɪè›St2î&Â62>†Ÿ­¤Íp°¬ ³°PÆ<`~DT‰nî¨lH(Œœgü*QumÃI»ÝëöuÏó¬N{ꎘäMl­¤²¢ñœãާ¡úTQø“MR«Ã;IPõíþ5m®ÑØ3éWŒÀ`I­!¹ˆ€“t@è ºñúÒÐ-ÜŒx‡N-³|ÏE)‚ýgЉ£6™£ZM¹žF¹ ·nzƒÏQ]4šSM›Ocžº{khši£B…bPý}k9õ­&4¢À,kB Î8üéñjþm¼M-«fHÃŽ Éãã§©©VæÙç“ý»Œ¬jÄÿë¯Rë¡ÈAý±£ªœ¢ªq˜pw©í¯´ûËÃn‘8ƒÃÄà?¡éRˆÎÓ.xÿ¦ þ4 ”WÞºuÐoï?ži\ Rë6ÊUìòHÞ¤*Çq_ÀðzóBëzGÊ A\¹ä‚ÃŽ˜«¾|y'û6ç,rO¼ŸSÍ|{·f\nõû:çùÐ2ŠëMœm¢'a8D@{óõÀ©ˆ´ño1Ï'€¾˜Ï呟ëV<øóŸìËœç?ñî¿ãIçÆs2ääçþ=ׯçNþc-[Ü%Ô 4G1¸àŸð©*¢ÝíP«axè çKöÓÿ>W¿÷è;¢lZ£&ªý´ÿÏ•ïýúãGÛOüù^ÿß¡þ4î‚ÆÖ€ë– \ñþé®ïÒ¼ÿÃs™µû``ž,næT?)éɯ@«ÎÅ|gE/„ZÄñGü‚Gýu_ë[uËxòõì<8fŽ?1üøÔ.3Ô‘ê+*. 9k¦†$¸š5e‰‹…žµý³¥…ÙåàtÚbÄðúâ›g­<ö~eͰå2UGáNÒ9õÅYŽêÝîûó6|¸AŸ\C^¥ÓÕ–¶…eÖ´v(6çŒ#Cê0*|wº]Ýä1G˜c& H?ÓúU>= f\cÓìëçJ.0q¦Ü†¹­óu›[Fdx™Q \`pN;sùæ¯Znü»¾l0 <}jo´!,N›rK}â`^~¼óA¸CÉÓnN:fÿ.›{…º¶Žt$ƒ 7ZUïb…[ µQÐ@õ¥ûiÿŸ+ßûô?ÆÐXµFe$r:J«öÓÿ>W¿÷èôÿÏïýúãEж=Ãà ÓÝ?ÌÖfxþ@6ŸîækN¼‰nÎÕ°QE†QEZ8]Ü 3å1ê9Ïãš³UÅÕ°w‰KK”€Nדùк(¢€ (¢€ (¢€Ã5N·¦Ü¼Ïç•7r«ŒesøäïéWª ¨š[gHåhd?vE•?Ö€'¢ µ¹Žæ"èz;!`‚ÇáSÐEPEPYAAê P i‰"NŠ"H wFAíŒü¸ÏÓ£HT¢€:+)XdЊuP›Î³ynO:9Qä(Ë /CîG·uOsøÐ¨¢Š(¢Š(¢Š(¢Š(¢«Ý^ÛY®ë‹ˆ¡ÈÞÀf€,QY_ÛI.•µÕÙ?Å[SþúlË4oÖ§%¥šŸï±•Çà0æhPœU[JÎÌâææ›û¬àË­UþÉi†ooîî}U_ÊOÉ1ú“PEq¤ÙHcÓ-y‡m# F}_ üMXþÙiãÏO»¸ôfO)7Áý+IJêe´–æÆÎUûl!mQƒ»’ØáŸjçŽë[^^­x›$vá‹÷’cýãòÀ­6oÙKk2všUÛö—mò)ìAlàƒÏ¥qš”·ºuž©q™%¼ÐB— µ¼yuÀ+ŸšB2rGÓ½m/[ž{=Ô–.yM¹ ×ÉzW¢Ã¦ÁŸÙv–LîbÄîvêXžäž´‡G²ÇúŸü}¿Æ°«M͜ը¹½=e\¹6Ò„VÚ¯øqRÛjêC@êÀd8ãמ•ÒÝAh—Ëa¸7,žfé]‚*÷=~cì?St=.)ô˜f»Ý4’–3|¥‰^é·—Õ™Õ$`ù×3ö3»?wÎ_O_Òœe˜ÔÌ_˜g¯·×[ýeÿ<ýôÆìkùáÿñ¥õi ê’96qŸôFû¹ÿZ½qÓóÈü)D³ ÚSæ/ËÏøsZº¦”ðêö&ÒEH¥WŒÃ(&6|Ë’AÀnG àÕ­*ÞÇS´óþÄÑáÊÿ¬,¬AÆTƒÊúV}RG+s12Û4ë{lÛˆCnùË8}¬>LäG8­=?íÛð›m ÙN¶½n‰+!Þ£!ÃtÈ=O¡®™4›(ܺ۩%JÄTõ§†íRy&Ý p'YHhPtE=×$œõôº)ÁÆ6g]8FÌŸûZx8½Ó.£ä„yËõù~oÒ¹_ˆ:ÜGA·šÃ˺Ût©"ü¤¦Aê¡úû×S·W³)PŒvlE.>¿tþ•ÊøóY¸M l-äŽì\ªH“ BªCw<Áä+h|H¹lsöš™[ аr™Â|` ˜jŠg1yäXý?ýU®¡w%œ2=«¹uËïï€)Étc öO’NçééÖ½DÎA[Uˆ1T„`œúãÛüæ¥[¹$MÐÚ;ÅYKª•ÇÖ‹{™åË[0eè3´7Ó5(’rW6ÇϘ8çü9¦‡r/>ïþÍÿÒ>ïþíÿÒž$Ÿf~Èwzy«þzñN2M–Å·àãžɦ+‘y÷ôoûþ”y÷ôoûþ•'™?üûvÿž‹×?>)|ɲ¿èØò|Åãüð."óîÿèß÷ý(óîÿèß÷ý)þmÆÐ~Èsýß1}?ÇŠw™6[Ùð|ÁÏ=.ä^}ßýÛþÿ¥}ßýÛþÿ¥IæOÿ>§îçýbõÇOéJ$›pgàžNñÇ?áÍ ¹£á¹&}~ØKlav ‘[?)ô®üv® Ã#k–ÆH¼³ó` üÒ»Ñ^~+ã:)|"šä¾ O%·†^H¢>0C züÜW[\§®§³ðãMn?yçÆ ’žzñùÖPø‘rØátP¶œ$’,ómDUÆ@8㌂NM[:ªþ¢\ñqßüŠ«¦êwÓX¤“Be“øÊcƒ•ààæ­-õÖæÝføãiÏò¯R;ÌSpDNT¶3øý*E¼i­Üm¥‚ð}ÏZÝO3H$¶t Œg# õçÔTžmÆÒ~Êwzy«éëõâ™$h»ÿ {ßô£Ï»ÿ {ßô©L“e€¶àñÏ?äÒy“ÿÏ·lÿ¬^¸éùñ@\Ï»ÿ {ßô£Ï»ÿ {ßô©|ɲ¿èØò|Åãüõ¦ù·Aû!Ï÷|Åôÿ)…Æy÷ôoûþ”}¢ìÌ9¿ïúT¾dÙl[d‡ÌóþÒ &Ü3l@ÆIóƒéùñ@\ïü?ŸìL‚ÃÁúšÓ¬ÏŒhVƒý“üÍiד/‰‹`¢Š*FQEYþ]B/ßí Œ<£üDó~Ö¬Õi·ýªØ¬Ææ ùæ1´œþ$øÐš(¢€ (¢€ (¢€ B2)h  Wök…–IÂÛ°T¯ñ’0sïœ~UpGEpC ‚9«YÊä˜&š9.#}œv’;dÐк(¢€ (¢€ (¢€*@ªÕ­_6©Yeß:’rr9eìCŽÿZФ* Eos ÌK$,ˆx §#޵5T–7Š_:ÅQX´*ï çóÏó©#¹V¶¾bB»š6•úç¥OEgfбXî\u[t/úŽçL7Zœøû=ŒpüWRsÿ|®yühH°·0À›æ•#N›‚Ö¨>òá¿ÒuIB‘÷-D?>[õ©aÑtè_xµG“ûò“#~m“@rÕò-c¸¼?ôï#þú8_Ö›æê÷êím­GMÓÈdoûåxÿÇ«Oh¡Š¢–$’N  ßì™æÿ½Næ@‚!_üwŸÖ¥·Ò¬,ß|6‘+ç>a\±>»5Ö¢‘™,b’ú@p|ò)÷sòÿ3íMò5K³þ‘r–‘ž±Û|Íø¹È~4rëPµ±PngH³÷C™¾ƒ©ª†öúí±geå!ÿ–×yOÉÌU«]2ÎÍ‹ÃóOÞ•‰go«jÖÑšËþÆê72^Ó3òD?à¯ãšÑމ#EDFü*J(¢Š(¤=)k+R’K¹†™d¸uàÇ×ûÍÐ~'µVk(¼E,“O»ìqnŽÔ£bÝU#‘ÝGâ{ÖÔ0¬Ç c „QèˆcH¢XãP¨ *¨èè*JLQŠZ(ž¡§C©[ˆ.¯ò±SsÔsÏCê  Dºc(Š8!° ÅÎvùmž0:m9ï¡èqW¨ª—z}½ò"\Çæ91?…[¢‹ÎÜøNÕåó­dh›1ÈYã?†AüWþͲ¶$j;ªùmo+ÊŸˆÎáùcÞº¬SvƒUÏ.â²ìb[é Ü~e¼I2wd™Ž>¼ñTµ 6ÂË{+m9D³‚Vyæq‘Ûƒ–nûxúÖÝΓg<¦(Åqÿ=¡bø‘×ñÍ`=¥þ§#¼¡5 6&eY¼©º9 xîsÒŽyw "®áS%‘¸þÑ’ã|ÒûBeJ ci Ž{ÖÑã€þÿD(þ;[–'þùb?hé÷ö6ÐÁ`<ËWB$WCk8àôcô&µ@ÏZ9åÜ,Žj; 3ˆå‰­¤þåËIÿÇ5 <=¤0 -ID¯ÏëZH…C¡ê¬2 P}È1{q%¬‡ø­ä)ú}ÓøŠ9åÜ,ˆ¿áÒ3ÿ¿ùÿÆ—þ½'þ}Oýýñ§¬•¸>]äW>‚â=§þú_ð4¿ÚWÿÇÖŸ:ïÃûÕý>oÒŽyw "?øFôŸùõÿȯþ4Â7¤ÿÏ©ÿ¿¯þ5fßT²º.¨šOùç» ùjàéG<»…‘‡§ÚγÛÁ²UèÛØãó5¢--·¸Â«]ÙÃ{•p›Ó9Æâ9ü*Í“ÿæ•ÞØŸûjÿãGü#zOüúÿäWÿÖ¢«ž]ÅddÿÂ7¤ÿϯþEñ£þ½'þ}ò+ÿkQG<»…‘“ÿÞ“ÿ>§þþ¿øÑÿÞ“ÿ>§þþ¿øÖµs˸Y?ðé?óêïëÿðé?óëÿ‘_ükZŠ9åÜ,ŒŸøFôŸùõ?÷õÿƃá½+µ¯þDñ­j(ç—påD6ÖñÚÛ¤®ÈÐaW9ÅME# (¢€ (¢€ §|Ñ¢E$²_˜0G™÷z÷  Ö–š´ê)3Jk3RÔÍ„‘®ÅbùÆ[*e%vL¤¢®Í*+˜—ÆÖòoð€ßBj=´ ý¼žŠæañtyp˜d}¡°²gƒŒ1RªÍå2D%À;<ÎNsä*^ÚíàtUVé K Äp3p|¾àn¿þºËÿ„ÿçÝï¯þµ!×ݸ6êGûßýj~ÞÅõŠ}ÍØØ4jÊÁƒ ‚ŸY:EËIn·ŽËFÏF=±úÖ¡lv5¢wW6Nê㨪Í…³”’å<ÌãËC½³é´dÕiµ¢´¢Êâ8×¼¸_,ÀóùCvWÒWf¾EÊßxˆ óŬ²¶«)gö¨Eªi2íyYoK9@n.L€° »Óž•Ÿ¶—·ÔÉ­X+K3à·S+~KšoÛ/æ#ìús(?Çs @?à#'ùV-·‹´ý±Gnm@á7á~«ÃÄÇú:óÓç£Û@_X§Ü»ö=Bn'¿òÔõ[hÂÿãÍ“øŒThvÑ»ÝEl·{@Ýu#>ì|€zòVÄË*oŽ8ÙsŒ‰2:âŸÿ Ï?ð:^ÚõŠ}͘&ÃG&b;]ø¥KkÞ÷íbiËÇgä²$8*ëÏ œqŠX5õ½F:u•ÍÉT³/— ãïžÿw5¬Z’º6Œ”•ѵ‘U.õ+K& 4ê$o»‚ÎßEšª,/®ù¼¾òõ†Ï募˜þ«–ºu­"Þ?xó7ÔžOãLeO´jw‡ýÕm#?òÖë–üOó"œº4R0{ée½qÏïÈ>ˆ>_ÐÖ–)hªªŠT*ŽS¨¢€ JZ«}uö;Y' aNNçI»j&í©fŠç&ñTvÛ<õŠ=íµwIŒŸN•x¾ÚD)D—‚ç¢ýk?m¬SgOEr£ÆÖM·[ϰ~÷«z~µeüJ xÑK¶ÕþñçùÊmûx÷ielÓ0,G‹ÕØð{“ÅG§YÉm<ìæS¾g z`8.©ç^CpðäÂÄßò‚‹§\d~&¬Â@ÿóî¿÷×ÿZ—·‡q}bŸs{¥-eéÚ›_ÜIŒ&Ä ÁÎrOøV˜­SRWF±’’ºŠ+#WÖLx• y€ž[ÅTbäì†ÚJìÖ¢¸Ñãë_Ÿþ=þFØÇÎèyàñì*X¼}m<‹KnîØ!Vläc>žœÖžÂ§b=¤N½Ð8Á÷äwíUm¦òå[[‰‹Ül/»n.qŸLôÍaÂ\ç²'NÒõª½ç‹‚Û1Ü1(”n£½Â}ƒÚDìºÑ\¨ñk¢uÿžŸýjHübedŽÖ7FèVLçô£ØO°ý¤N®“"¹aâéKD>þgÿZš|`B6ÑÄeãóŧ`ö‘5¯ä{«ìÛv!wNêÕÇéþór¶O¥iEÅ¢¨TP¨èí\u¯‰áµß¶(žIdgfiÆç?—aŽ; UÏøKdÿŸ4ÿ¿Ÿýj=…NÁí"t“ÁÄF)¢IõWPAüëÇ£~ÔY¹²¶¼]·6ðÌ?é¢þuU´¼Ú^]Z‘Ð+ï_ûå²*Œž$$Žñ"¤dîbü.:æ ‹Æ6³¸Xžbž`^«ëY{hûxñ:¶þ[Õö&þ£ùPu¨¡?é–×v˜êÒDYü r?â‹+cÌ.:Ê¿ÀÌ1?Ãg/s¡Çs¨µñº&ʔ۷@ÇLsß®q“Їþ?Î ¾bQZ2ùiU>€mýjíäv·Ê±=ÉO.@HF'°#¿Z§‡`ì$K¹dÚ·ïÝŽ9ãŸJáLó“ é÷Ki"ß vò˜UéÀqÞ‹MM²ºYVì¼±>ò$‘x°ävÀcúU?H¶Ó®ä¸ŠyÝì§ÔûœÔ3øzÊæQ$“ÊHÈP@’HéÏ'ô\<®kG,RçË•v°?ÊŸŸ¥bÙe ¹›åM€o\c9ôüè>²;ÇÚ& à¾`ÀúR°¬Ž¢ÊÛP»Óc’Þ{xãÝà"=Ò3d÷'9ô<Ò‡G†áUïžêáÈ Ry¾U'¨Ú¸_éNðôk‰ hU,ª cV>Íy„†B· Yܪ0vÎ?:ô¡ð£Ö§ð¢Ì¶öɲÞâQÆ#P£ô¬¯[Eu£Io*“§cyÁ¶Tåk#ÄSE›¾iR$ónv 3õ4ª|,U~q÷<Ú$©²ìHÐŒŒrqŸÈÕ#á{BÈÏurÒª…FÜ£T/ }Ðj5Õ¥ÌOÝÆU‘²ÑÈ8^„ç¶+,hJ¾˜º(/Ê1ÔqÇÿXWœ®)6‡Má›–1’@¢?,Æ›~qœ“’ ÉîGÒ£›Ãz[<^ẻ$H›Gš ßùú °º šÎ’‰å0‡¨8õÇÏÖ¦½Ò­¯¤‘¥™‚È0ʬ£¶3ž½? wfRø_NiÖ8oÝ‚³ SÍRÙçŽ:–úvÅmišl:]©·…äu.\´‡'&³ãðÝ”pÉÝN<Ç2Þ¹Üzž”õðõŠ2íž`c`Ã}­Pzõ:­ÆÒòæi'†9š¡7üÁNxéŸ~µ½5²I$RŒ«Å˜b##¸éùV„-"²‚æI(Ää’s]5wÑøéPþ*ÚÎïµ'Çq·sD$ ã#ÔUª­=±‘Y‘–9‚•Iv‚W?äRAq™^Ý÷y±¨f;VÏu=ùÏÒ´6-QEQEVOˆmã»Ðî­æÇ*í`8&µ«/]š(4™žY4Ë;#¹¨ŸÂÈ©ð3Š½Ñ­ï¡¶žXáƒîªÈÆ1“ÈéÔ{Õcá»S凹œº2²6å2… pqùÖ“ÜÚÜDc[¨ñ*²«G í×t5˜4M>P¨/&b+‡\ãàc¿¿(éÐU;Ÿ XÇU¿h¥#ä2ºàv,€ONüš¼4 ?´C?Ú&-‰.Ü3œwïëSêU¶¤ÄÍ3…`+Î3ŽHÈëNã¹jµ…Ú)c0&ðHÇÿ=ê~•ˆ<7e°¨¹˜`Çç\’=x瓚yðýžðÂæpÙä‰?_óëJÈ\¨ë<Ÿç¥knÞ4—QçÃVfT“|Á|‡pàãŽ:ã•8øzÙži ÷älî 8ãt­mËýáùѹ¼?:vA©Þµ,XÍ>â1¼0 ׿ð[™ ™çÉÎp@ëÛ§OAÛ¥kn_ïÎËýáùÑd™+áûxå‰ÒYBÆCmãæ ‚On~µë:wüƒmëŠè"¼ì°*~aÓÖ½Oÿm¯ýqOýW&/¡µ¥Œ d±G*l’5u뵆EIHzâ7<ñô»qí¼EãNÍ#¸äžp#ðª)á»Hâ(×7 $‚㺀Ç8Î1ZfþÈ´¤]ÀB[l€íÇ8äV|úeŒÓË$—²fG;—zã$Žž™¯2í\ñîîÆ§†´è­Ù»Œ(ß# ª)(=8Áüyªçšl,ÍupŠ›yi^Go_çïS·‡,ž\ÎAràäÓ§ù<õ«¦Âc§žÁaÆ×È'Žüw¢ás!|5¤ÆáÍô™`G3( ÇôÇ¿5 ð†œø+4ØÉeÚWŸlsßó©"ðÝŒ ­Ä ¨8˃Œç§rIúšTðåŠB#3ü£ Þ`Èúqÿëæ‹…üÅOYÁ,ùó³Û»Kf’G9ãæã¿l×¥[¢Éc º†SðÃ#¥yí¶•kg)š9]ÜFP`zÿ^Õè–¿ñéû‹ü«§ ÔëÂu)I¡Xï/Ik!þ+i  àþTÃoªÀ~Køî"þ%¸‡ f\Ì~5­L—[ÓÒö;Çž6‘oö ‹8K“;;C““ÃdLU1á«$…‘î. \ç{ÁÛ»œgæÚ¹ôÇkH_Ù¸b—p0\gl±“ÓÞ³åÒì&–B÷¯û×9AŒ‘ÓßÛÓò¯3[³ÈÖämá];ÉT•¤f#°Ý›ôãÄ´Ãá>Ü{©ãA(nœ` ÿ*”xrÍWi¸œœ’K:äœý:óÖ®Ía ÖPÛyì¢!…|©?t¯9èiÜ.eCáÍ&ÞîÞàÞ3´m¼#J»\äõú~žÕÑ AGCXqøjÂ<¹æ\)QóŽô㎧ó§XˆÂ ‰²£·Œè8éÿ×õ¡«‰¤oÙ0½ŠägÍÑt»k=vÎhÞBû v­ÿÖ€¯A®Ì:÷C ¤¢Š+s¤(¢Š(=(¤= W²!dBÈÀ(èFIÈúõ«5RȨ–î1+;$ß0a÷ Pp=°GçVè5Èø¿Q³Óæ´7`Ÿ02Æ2ä‘N•Öšæ‘PfÞ ÈýùÀúU;=/.¤¶¶·VẊ%±ƒŽHÁæ¸ý”ÎB}†®¥ºî[;6SÜD¿áKý›¦ÿϧýúZÓ‹ÃÇå­µ³.s‡·ó_aKÿÕÀÿ—+/»·¯lcw¦8¥ì§Ø^§c/û3MÿŸ+O§”¿áGöf™Œ›+?ûô¿áZ¿ðÜ‚¤YÙ‚§*Cr§9ãåãži¿ðŒÏ³gج¶údc¦?»éÅÊ}…ì*v7|>èñª€3€@7»sÜ[¼,Î¡Æ #`p}j *Ú[M=!˜(pÌHS‘É&¯Wt¢®zpVŠL­k9•]J:´nc;Ç,G¡ëY¾(¸Š×H3N A"ŒÜI'¯]·Ù¥e¤òÑvº È ‘Î=¿–jŸˆô„×4–²x’U2+fÛÐç® WVÕâÑÆÆúf­̤…a±AÌdƒ†à~ Óã¶Ó<ÂQÑŠ® ™20xçÔUëoýšÜ[ÅkŒ n1Œtô©„f>Dyàçí œãžæ¸½Œû°Ÿc=l4§,©gfÅX“ƒNþÌÓqŸ±Ùÿߥ«Éá¹tøæœC \¾éÉ/=1Û£OM‚ê A Ê#àÆ#or? ^Ê}…ì*v*ÿfiœÿ¡Z}<¥£û3MÿŸ+O_õKZ¿ðÜ’ÄÙÚܱ-לóòúóGü#Wóåe÷võ1Œ}Þ˜âe>Áì*v.ø^( [¨á#@Ë…Et=…tU‘¢ióX,ÂT‘µc9¯°õ­zí¦šŠLô)& “ÍAql·l/"aƒFÚAõ=f…hî[qI‘";ʧΘ1œŽÿ‡µX"¢š”.è•ö°eÈèGqïUâ–X^+k™7Îûв!PÀýÁzŠ@AïK@k#ÄwÚè—3ܪŒo—wqÚ¶+/^ÓWÒ.,^5‘&fÆy¯n•2Õ%x´q &›«CÀŠß&sÎéô"Ÿ®š³ ’&ø€;|κz¹ià±[}ž 8<ž<ãííì*Uð„«ÒÚ xçí Û>Þæ¸½”ºs¡>ˆ –S³*ZY³)Á%ëNþÌÓqŸ±Z}|¥­¼/=©.°À\Ó’úvÇéUôÝ/ûWO[‹{Q ³ ’`GËÈÛéúKÙO°½…NÅìÍ7þ|­?ïÒÿ…LÓçÊÐwÿTµ¨|7rKgfK±-Ôç<ü¾¼Ódðü±.é-¬Û–p>\cw¦8¥ì§Ø=…B׆ ‚Þîá-âŽ4òÔ‘€3“é]?zå4y­té¥>d @T³\œ’~èÀ<ÖÈÔndèú]Ógø¦+ürsúWm$ÔlÎú1q‚LÒcŽÕç-ôÉçÒÿ´K‚ †-‘$ñÔx­›ùd>"„_~îyíJà ¥Ûo[9'€óŽÞÕÌxòÞÂÝtÕצ7nÆG· ",a~PÇþ§½tRøÑs؉lôü#ü£ä\|øù@ãéO¶ Z2"}øÊÈÁDZ¨U4ÆØCRqtLjšaŒ:¿ãæ óŠô‘ÊìMö]/qE˜#¯È¼S¾Ã§Ùm0z|‹Q-¶žÈ$òc/ÁàsïŠw•¦UaláW*d*Ä/^§·zdûÿ>–¿÷íhûÿ>¶¿÷íi‚ (6D±À“œ>)<#nï*Ço®ÔÇLÿ*cº$ûÿ>¶¿÷íi~çÏ­¯ýûZa·Ò Ãd œ•89Çóâ“ÈÒç•—Mßu:c9úcšè“ì:wüúÚÿßµ£ì:wüúÚÿßµ¨þÏ¥d&Ë,pÔçœqøÒyZNÝÞ]Žß]©Ž™þ\ÐD¿aÓ¿çÖ×þý­aÓ¿çÖ×þý­3ìúP, 6YS‚6§8þ|Ry:Oüò±û»¾êtÆsôÇ4Ñ'Ø´ñȶµrEë^™§È:×þ¸§òæ ,V+0Äü¤*äœãÇŠôý<ìë_úâŸú®<_Cj=KT‡Ðu¥¤5Ænyªêf¡5Õ¢žT°”(8#8nýGçA²ÒÑV=êà(ó¾÷È~”Ãáý/MÔnå·µŠK·f2¥»´…I!Žp¸^ƒ‚z}kBÏÃ]ÚÃt,V!"ïÉ9Êäcœ¸5Ã*R¾ˆó¥FWÑÚÓKwPðÚÉ!ê¬Ì“×Òý™¦ô6VƒþÙ-__ L¬¬ ŒAÏÚ¨éÛÐS Ü’I³³É?7lcw¦*]ö#ØTìefi¿óãiÏOÝ-ÙºgüùZߥÿ Õ¹H³³NTîèsž>_ZOøFgÛ·ì6[}21ÓÝôâe>Âö;ÙÚre–ÎØ0ääÊ»ë_øô‡ýÅþUËÂ9v 2ÚÚnKäž¹?/­uP!ŽÞ$=U@?•oB259Füĵä,2Ð)&¤¦H»ãeëEt³©žkþ™ª,Öà2¨\È3wüGçN6Z^äŒÈ7•nIäUË_¥œ²K œ>d˜ÞÍ9$ôÿgØ~U?ü!ò('ìðóu±ƒ×µpºR¾ˆóeBWÑšÓK–_šÞÍä›%–ç¯çKý™¦óþ…h?í’ÓåÑD½µ—êmÒ³1Tg,qÆqëƒéZGÃw’l¬²F[¨àcîûʧÙO±>§c(išnqö+Oûô´ŸÙºn?ãÊÓõÉkXxnäE˜#¡ Ó©ãå÷?™¤ÿ„f}¡~Ãe´sŒŒè>Ãò£ÙO°{ Šºe¥¥¾±dÖöðFÆ\~ëuÅw5ÌXè6úŒÞÚ0’nvF冰Ï'5ÔWU¸ÆÌíÃÁÆ6aEVÆáEPAéE¥W‹Ís†TmRŒ>ósŸÒ¬U"#][;dó^ nþ¡º}rÕv€ (¤c…'Ò€35Ë9/,ÂBß¿W±ùŽÎ;¯9#úÒiÜ+ÝÏwG<ÒýÔmÀ"€«ƒéÁ>£uY‚´Nn§„$©º8Žüü™ëè Ç劶‘@ Š1EbŒQEQE!꫈fkI'ifÈ …Ž{ã§åWjµÔr”_"@’%wd’¿ˆ  ¸¨mî#¹%‰ÃÆã*ýM@šÜ7:sCkruóä(0rà HéÞ¡ðð»kiçžÞ;x®\\CÈ\ eùF>lŸÆµÜ|¤ôã­A`\ÙCæJ“I±wHŸuÎ9#ë@qF(¢€ (¢€ (¢€ ŽX„¨ÊIiÁ©*µÅý¥ &âê@ï$E ½¼žLÚ5@ðùÏLçWAÈÍcÜjÚ}Ô/ Ã=ê7 °Û³©\`þ¡:¦© 6í9#R¸”&3À w~çh~›»šÌ0ëq%íµ¿=!€¹ÇÕô¥þÆYH77×נͱOÔ Phô×VöÊLóÅÝÂÿ:¤uÛ8ä¹nÂÞ&“?ˆýj[}M¶`ÑY@tr›ó<ÕÐè(T—PÔìZÚÓL‘D¤+µÄ«cÏÌ7‘ÇNõ”º½Ì×7*–ÖÓ•eL™œ8Ê7P ¾µÒ65³k +—‰yt ȵ_0žN§sгý–ò¯Ôo$öWütùšTÒ4èØ0´‰›9A¼þmš‹íš¥Ïü{X%ºžD—oÏýð¹?™f\\ôÝJwãƒ÷)ú|Çó  7Öv*÷D{)<Ÿ¢õ5[ûZk…ÿAÓ®&¤—÷(ù¿%5j×L±±É¶µŠ6< ó©êjÖÑ@ÝÆ©O©¥ÅÄ|ÑÉ …ã)”ˆXç—?x`Öªj~µ¿ŽYH1»HIf1| (À+®( )àSM§t&®q§ÀùmÎ1ÝŸñª^K{˜­´NÈ]8H\¼Ì<þµÙ]jB)¾Ío¹»Æ|¤8Ú=XôQõçЧ6‘=äbK«Ç[ÄmÑKÂÁØ…®FA'×µiíêw'ÙÄæ´Ÿ]ܽÒ ¶†)6‡Îýíü\˜àu<çÒµ?á¸ÿŸ˜?ïÙÿé­mâ·¶ŽWdqª¾€Tø§íêwg’ÿ„Jãô¨xÿ¦gühÿ„Jãñõýû?ã]m¥íêwg’ÿ„Jãþ~¡ÿ¿gük6-)ßW¸Óä–8Ú=¢9<¬¹PÄx#=QÏ­wÇ¥rºÕ•ð’îO2l¦ži”š0©eì¤yã?J~Þ§pöq<%qÁûT÷ìÿðˆÜÏÔ÷ìÿuhE’@䞦Š^Þ§pöq9/øD®3ÿPÿß³þ4Â#qÿ?Pß³þ5ÖâŒQíêwg€Õ´;ýî¬×*Š¿^§òšMì+¤N¢KWHÿ}¤t?ˆÁükF±…Õ´ZÃ\%ÌLÑ…—÷ƒ†_ºHü^þÒ±ÿŸÈ?ï±G+ìEº*§ö•—üýÁÿ}Š?´¬¿çîûìQgØ.‹Dàf«Ï>É"EGv‘¶£…õ'ÐU{N÷¬å€;åÀ ÜûñÚ’ÞãM_eÔC{—bÒî$Ÿ©¢Ï°]-­Ú ­3‰¦ƒ)@ çta”0*@*F= VþÒ±ÿŸÈ?ïà£ûJÇþ ÿ¾Å¯°]Ž‹$½„²Y9çÆOº?,SMÞ¡d?Ó-<øÇü¶´çñ(y5kûN˵Ü÷Ø© ž+¨¼ÈdW\‘¹NFAÁ¤Ó[…ÐËKû[å-m:IŽ pËõ‘øÕŒZ©u¥Ú^0y¢jýÙPíuú0檘µ;2<‰’ö!ÿ,çù$ü Ä~4 Ö¢©.¥o€'–8$ÇÍȹSèpißÚV?ó÷ýüìû è·ETþÒ±ÿŸ¸?ï±Gö•üýÁÿ¯°]誟ÚV?óùýö(þÒ±ÿŸÈ?ï±EŸ`º-æ«]tXãTbÎé·?7׊oö•üýÁÿ}Ьnìý%yâýÒæŒe¸<~}ͯ°]j01ŠZ©ý¥cÿ?ßbí+ùüƒþûYö ¢ÝSûJÇþ~àÿ¾ÅÚV?ó÷ýö(³ìEº*§öüþAÿ}Š–˜î#ó!a"dËÈÈàÒi­ÂèQé·[~÷”øÏÐ×”]¶©ØyÏúG–£gn¤œÖ½fûþA÷?õÉ¿‘¯;Ò»0ªé˜Öz£žké HâTwܪÐ2ê=‰à½iaO,¢I_|aü­ªs€§ùõéÞ­3khT……Á ȹÿ=i‘Â@#S µÞ dg†=ùì?Ä×UŒŠ×¾"xC§,raY›‚;d`Ÿ­=/µØ„>ž­o;ˆä’:¥NÇ_Ú¬¾àyLúþujñ/Úå «b=¸a¸}½ý(µÂåkIµy­n¤’Ý#”„0+pç'ÿ¬i¤ëþs~îØ!Æ2GýÎ ‡\pÊn [ål‚Êqž1“Æ~•1Ì^RF!™|¿Ý€%Îzjv¶ÿÛkzÃäs´Ž88#¿\qU§‡^0°‚UFöCƒ’8õèkRÀ]-”KxC\ó‘ŒøUŠvŽW\PŠžN ùšB—ÛßùÒ·öë+€¶È‡9ÿñ­z(åÌbÚê"°9lŽƒåàà“éÓó¯NðÈaáë0äyìz俏ªêteÕI·[w³ŠêÎÇæ=†üÍrb•¢i=NŽšì¨…‚¨ä’pfÿeÝËÿ:½Ë{B«#ÐàúÒNÜH î?ŠâF”ÿãÄ×Ðq~'k¿í-Mà(ß»‹–Ý·ÜàûW0eñŠ'Xd.P Œ¨Èl–=˜„Ú»-mBkª€v€a´Vÿö˜f6F-¡27Œ’yãêA{ˆä“÷™—ÿ¶–C•’8BˆÂ)2IÝ—òÏ'¾1V »ÖÉEû”%WtÇkc»?:‘º@ÊÀ»¹;±•¿?ZCý¾K.-€ ò‘Œ±þÿ!Ua}·_óÆœ›pÁžŽýÆyüi¿Ú:õűh´ÕPÑ–GIì0OáÏ_jÔ#P}0îÚ—ŸìŽ¿—J¤Ñë¦Ü‘Ø‹:N@ã€xëéïNÁr6Ôu´OŸLÌv Š9†$}…[VÕ•©H£3•o8>øȦ,:Är°¤ƒk°zž) ×K±d·T«ŸN½ÿN” ˆëøÃ¥©<žHù¿.ŸýaëRÂ5V·‘g ¸2íde WÞÀôö©4÷ÕÁ¾Ž%C8\nÝÆr>¹ÿõÖ…;†ÐëÞt$J† s&Ò žÇ>„gñ5+n…;VÛ!~]Ø;Ž;úw­z)r…Ìfó"-Õ³’£¯×Ú¥…õyʱVEgun\žõà~u©@ûëþðþt8èÁ3·ûV­sͽŒvÈz=Ûå¿ï…þ¤R .yÏúv£s0ÿžq~å?ñߘþu¬(¯ í(ŧYØÁ µµŠ"Tå•y?SÔ×–_¶©µ¯¦IL¿½òPco¾îŸZõéÔ¿û¦¼ØtÙ„W¹…n‡<òx…fP³¨pòd( r‹ìWo'œæ˜ÿð‘G»e¤g”–P‹”^8cÐÏ­^µ¥y"Bäc sƒŸÊ…þÝÀìØP:àî8úw®«'ÔuÈ×Ím="Š2]Ï]Êã®GSŽ1ÜÕg‹^ÞÞ\Š€>vSƒÔ‘ÇCŒèknŠ®P¹Œ‹¯+mÄ%JšB ¿ðüéÄë¤8+l¸0ÁÏOËֵ裔.bâ‰T¬ #+rùN3úW¦ø[#A‹=w¾~»qµÙøcþ@qÿ×I?ô#\¸¥h£Z_³IŠZ+„è<ãÄj¶¦Ñm#iò•WæßsJæm¦×‰%‚F`­ˆÙPN îv8ô®»YÿÍßûÿÒ°ï´ÅÀ6~O”#ÉÉ-“Çå^¤¸Ž9|LËŒx—÷EІˆ"HWÄ3 tãú•$7šúÀVM9^EÛƒ‘ó{<ñS#xŸ%mÕ.7c+Ç<}iÄëÅ\bÙp>Rçü;ŸÂ©_íž ¾4ÔdgÀÏD{ò:Ÿð¤–ÿ]¶³ié$Q»mr9eÏúÒ´ÔŸK í[½Ül#sǰ¨=oÍÊ:l–× yáxà`ƒÏqE€X¥ÕäŠW6é…#òѱŒå·~8Úp}i ×Lã n±‘ƒÐíùºã¿ËúŠ-r%SÐÎF3¿ž\Sx‡†1Û‚ †{¯ùëNÂe‹C«}¯7i…ÈR>SÛê«Å®—c‹´…3.AêHã¡èìkj0â$Ò`n cžôê|· ˜Èºò¶ßÜ• |ÎA ÷à~Ÿ8uƒ –ËÁ$ôü»ŸÂµè¥Ê1×ÖR°;²·Í€6œdútæ½7ÂãY9;ß?]ƸÚí„©¯ÒôJÒ\s°©!@$nÎvõ޽qS„m\u’:*€¶¿ùqt¹$sÏ=:sS4E‰[öPN@òPâ»/äabÍgj1j2:ýŠ_,|¼ä9;²çŒc?Ùîÿè"ß÷á(û=ßýþü%6ÆR5¥BÌQ¤$7®Å¶1’Aã>žôíà>í¹8å d÷Oð÷«¿g»ÿ ƒß„£ì÷ôoûð•6`S·:è–sä y¡p1ëóÅkU_³ÝÿÐE¿ïÂQö{¿ú·ýøJk@-QU~ÏwÿAÿ¿ GÙîÿè"ß÷á(¸Xµ]¿‡¿ämôoýן}žïþ‚-ÿ~½ÃÀÔž'׿5Ë‹øQ­ÍjJ)Já:^ÿÝÏÔ!YÕkÄ6¬úíÛ­ÍÂçPÃ`ùG¶ZÄ6·ÿ*ý­p£òzwúŠõi?qsK™š4UA ÙTÍîÆ 5`OãÍ/Ùîÿè ß÷á?´¹6%ºYš ûù€HÏ À8ïY0î_>`ñ€wÝUŽzsŒ qúÖÙîÿè Øÿ® GÙîÿè ß÷á*FRíã•Á°~'?_Òš¾U²-×cKzóþzš¿ö{¿ú·ýøJ>ÏwÿAÿ¿ E€–ØÎm£ûHQ>ßœ)ã5-Uû=ßý[þü%g»ÿ ‹ß„§p±jŠ«ö{¿ú·ýøJ>ÏwÿAÿ¿ EÂŪß_÷‡óª¿g»ÿ ‹ß„§ÅÊÍ=éu 2¾JŒóê)7 $z˜¢Š+È;FKþ©ÿÝ?ʼØ"½ì´”/RŒå^5¦é…´²;¸„¡Tã|¼ž‡“ë]xWk˜ÕGAEg­®¢qºSÈ8äÙ*v‚è±"ý”g…òPâ»oäsسT5(ïäP,¤Øvãp mlŽNG#üj_³ÝÿÐE¿ïÂQö{¿ú·ýøJb”qëK¹¤eg'*×jŽüc“ÜS[þåí[cÝÀ`?¥_û=ßýþü%g»ÿ ƒß„¥`)/öîø™Å¹ùÕHsÏ?OçZõWì÷ôoûð”}žïþ‚-ÿ~šÐ TU_³ÝÿÐE¿ïÂQö{¿ú·ýøJ.-WUáøó»ÿ®ÿû*×ö{¿ú7ýøJì|¬–*òOËà ü£°®|WðÍ)|GKA¢ƒ^yÒp¾(†v׋¥ÉHÄi”òÁÏ\óÖ¹Õ]MY•ŒeA%NFqÛüû ·ã*þïÅÑÜÁ.ØRÁC‚žüôô¨<›ã!?iP2z¾«Ñ¢ïrÍ{¢êPàW Éu-‘øïK³PÿžÖŸ÷åÿøªŒA~ ?iBÛq‚8ϯO¥7ìÚ‡Ì>Ô$œõ#Ðtõ­ˆÐ›f¡ÿ=­?ïËÿñTlÔ?çµ§ýùþ*”ÁtØ"ô§å©úži>ÍwÿAÿ¿ B  Ù¨ÏkOûòÿüU5ùíkÿ~_ÿŠ£ì÷ôoûð”}žïþ‚ ÿ~ƒ@Ù¨Ïk_ûòÿüU5ùíkÿ~_ÿŠ£ì÷ôoûð”}šïþ‚ ÿ~€¸lÔ?絯ýùþ*š‡üö´ÿ¿/ÿÅQök¿ú·ýøJ>ÏwÿAÿ¿ þÂè6jóÚÓþü¿ÿFÍCþ{Zÿß—ÿâ¨û5ßýþü%ÚìÿÌA¿ïÂPA³P='´ÿ¿-ÿÅWyálÿ`Ÿ‚ÛäÎx×ö{¿ú7ýøJï|,Ðb·ï“ëóäÅ|(Ö–æÍ!éKHÝ p³ ó½jŸíËÇDǼâ?)xãûßZÇEÕDxcà1G'=Ͻ?]ÒµñÅÅìr›vJ¯M€½×¹ãœ}jÄK³PÿžÖ¿÷åÿøª6jóÚ×þü¿ÿGÙîÏ"üŒö¡£ì÷ôoûð”Ä5ùíkÿ~_ÿŠ£f¡ÿ=­?ïËÿñT}šïþ‚ ÿ~³]ÿÐA¿ïÂQ`º š‡üöµÿ¿/ÿÅQ³PÿžÖŸ÷åÿøª>ÏwÿAÿ¿ þ}šïþ‚ ÿ~‹ÐlÔ?çµ§ýùþ*š‡üöµÿ¿/ÿÅQök³ÿ1ÿ¿ GÙîÿè ß÷á?˜]ÍCë­?ïËñUÞx_pТÜA;ß$>ñ®ì÷ôoûð•Ýøa[û /Ÿ$;‚qÔî5ËŠøQ­-Ëú¨-¥]¨m¤ÂàO”׎èz]å•´¨º•¼ÌÄs8äžp:óúW±êq´Ú]ÔIÏ ¨Ú2yR8÷¯*Òü'ªØÂèëzK ÍÓ'Ð`sÇÒ±Ã4¯rê&ÉþÏ~Gü|©9ãòç©­o¨íKÆ{“ïÇáSÿÂ=©™„^—€L-ÆHÿ ‘4-MfRôõÈò[ž¸ü«¯ž=ÿH®^‡;®† |¹ÛéÔbök¿ú¿ýùOð«§H¿É>N¡Ïm‡ŽsLJғûÿþxê_woÝ>˜ÏN½þµ\ÑïøŠÒ)}žïþ‚ÿ~Sü)~ÏwÿAÿ¿)þpi7ùSäj'8(py·Òè÷û6ùZ—=öœôǧù4sG¿â‘Sì÷ôûòŸáGÙîÿè ÿ÷å?®"ü–>F¡Ïm‡ŽsLJғûÿêu»·îŸLg§^ÿZ9£ßñ H§ö{¼ÈAÿïÊ…g»ÿ ƒÿß”ÿ ¸4›ðTù‰ÁÎ6yÏÏwù¿ýøOð«ƒH¾>F¢p1‚‡ž¾Þÿ ô iàÝj\»O==½¿SG4{þ!iþÏwÿAÿ¿)þ}žïþ‚ÿ~Sü*çö=þòuŸö}½ÿAAÒ/É'ÈÔÀCÇOooÔÑÍÿˆZE/³ÝÿÐAÿïÊ…/Ùîÿè ÿ÷å?® "ÿ*|G¸yë×ÐQý|ýΣÁÏÝ<ôàñíúš9£ßñ H§ö{¿ú?ýùOð§ÅÊË=뺆S€yõdè÷ääê=s÷O}½ÿAOJ¾Y•þÍ|Ù#†CÓžžß©¤ç·Œ®z7zZNôµådj^ÖU ·(Ã>œñK¹´–᣿´ràHH;GN:qú×´]!’ÚUYˆ¯%Óü)ªÛI#ÉØÜpŠÄœ”`qÓšèô›¹Erg¶ÔJ =1ÛòúÒµ½ñÂý¥q³òp=ºuüêQáíO!ˆ¾,¹Áò[ŒôïOMTY–O.ðí=<–éé]œñïø˜rÈ ¼î†ÞrÎ8úuÏ4¿g»éý ÿ÷å?®"ü’|Ddcî:r8öýMH¾O‘¨v(yë×ÐUsG¿â+H§ö{¿ú¿ýøOð£ì÷ôûòŸáVÆ~+RàõÚrz{{~¦—ûûŸÜê#'?pñ×§ÿ £š=ÿ´Šf»ÿ ƒÿß”ÿ >ÏwÿAÿ¿)þsû"ÿ'÷:L}ÃíÏOoÔÐ4‹ðTù¨yë×ÐQÍÿˆZE?³ÝÿÐAÿïÊ…g»ÿ ‹ý|”ÿ ·ý}€Äû%Üò²%%¿/'ätçéøQ¶aÿ/ýܨïŒg§¯5ê”Qõ¹vd»žY¶\ƒçK€rG‘ן§§›fÚGÚ%ϯÙǧÓךõJ(úÜ»±]Ï,"R[J9Ǒӟ§§›f?òÞ_»õ®:ôüq^©E[}ƒÙ.ç–b\ŒÍ)ò<޼çÓJnÙ¶ãí2îõû8ôôǯ5ê´Qõ¹vd»žY‰2}. ày=9úzqI¶nóËÓê;ã¯O^kÕ(£ërìÉw<° ASçË€yGQœã§á]׆3ý‡AÔÜ–Ùüxô«@Kò,ƒxrNäg×ó¯S¢«ëo±>ËÌò½³#í2ä÷û8ôúzóJD¤¶&”zy9úzqø×©ÑGÖåØ=’îy^ÉIÿ_/ÝÇú×z~4»eã3Ê@<#¨ÏÓðükÔè£ërìÉw<¯lÛãæ]Þ¿gž˜õæ—dþúPAäôä{~z}n]ƒÙ.ç•í—¼òôÇúŽøëÓ×ð¥ (ÚLòœG‘מ? õ:(úÛìÉw<¨¬Ûqö‰sýï³O¥w~_ø‘Ÿw¿Qâ5³HTµJîjÖ*0åIE‰ QÅR¢Š(¢Š(¢Š(¢Š(¥¢Š`QE”Q@QHŠ( Š( Š( Š( Š( –Š)€RQE (¢„EPEPEPŠ(¢€ (¢„ÑEÀ(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢ŠÿÙaxiom-1.2.8/src/site/resources/images/OM1.png0000644000000000000000000003360611131637462017465 0ustar rootroot‰PNG  IHDR 2:.Û¡gAMA± üa7=IDATx^íK’¤8¶@ã™õ 9ÉIoÄ÷TK*³ØF¯ çé‹©š…Y â Wô9aiÝ™áBHG€Ÿººÿ÷ýýýÁ @€€$0?€ @’À‡úÇø @øÏ”­†„9B€ Á LŠˆ! ~ Ð}@€l× @À¸ @€@Š1¤!>‡ @`<ÒxcN!@HÀR„ø€ ñ`Hã9=† @ ECJâs@€Æ#€!7æô€  )EˆÏ!@†4Þ˜Óc@€R0¤!>‡ @`<ÒxcN!@HÀR„ø€ ñ`Hã9=† @ ECJâs@€Æ#€!7æô€  )EˆÏ!@†4Þ˜Óc@€R0¤!>‡ @`<ÒxcN!@HÀR„ø€ ñ`Hã9=† @ ECJâs@€Æ#€!7æô€  )EˆÏ!@†4Þ˜Óc@€R0¤!>‡ @`<ÒxcN!@HÀR„ø€ ñ`Hã9=† @ ECJâs@€Æ#€!7æô€  )EˆÏ!@†4Þ˜Óc@€R0¤!>‡ @`<ÒxcN!@HÀR„ø€ ñ`Hã9=† @ ECJâs@€Æ#€!7æô€  )EˆÏ!@†4Þ˜Óc@€R0¤!>‡ @`<ÒxcNKøúú*]%õA€ÀÍ0¤›€ÓwNàß¿;ï ݃ Ð) ©Ó¥[×@€®á¼ý,ö¶3ã@À €!qA@ Ÿ*Mw?(1–Ô@`&€!q@ 0é¦úãõóý||??ÄŸéŸü)E`«ª2OØ•“}Þ+|]S†#€! 7ätø<ê»ùùüÄ„n%0;Óããc–Ô×3nç]óÔ Ž `H.]»„À;Vaº‘ l¨h‡õþY–€"¬TËß'Oúþ~^rp@ 7Ro#Jn! æÔä,RY  6×;¥ù?Õ‘¤[. N ´KCjwìhy-TôèiäElÆÍžQ…½_ö9Y;¡syO¤c-ÖI#ªQ<æFÔâ16«mñ¦zZK$©–[…v@ )RSÃEcë#àËÈŽ„:´ XóAÚWô|D䌒T«¤c醅JFòÊKE°¼ÓaÞóº¿ÌoƒÁ¹³n$‰ä¤ún&Zº`Hu­i‹@8÷Èkóº‘ð°Ž E›Ü€“Uy\Ñv$Eí8$E‹¸šånÉdc$U=‰$µusÑZÜNCº}h@«¹Gõ¿uÒJz’û±tÁk‘£¼Næþ2?x“YRÆxrâgª®º„çÃ1¤Vï4Ú ›`H7ç´íxRNHà züüùSïߣvQzïŸušçŒ|; Ìf V¹;ö¶¬~÷YÝ"(ê(½Á£ú{Æb¦¹ÅÖX‘j³ÙwËê"á´¸!~i̵M‹Ù3©ýÛ@à<Òyl©¹gb~Mfy¿×½A Õr””˜F²Ä<„7¬A”)%Ü1¤5 ãû4fT:C\ꑵ¶ÏÛ ˆ‘ÞÁ1$ï4™4ш•ú§ØÞ¹ð³)²þ¿ç;“¾A  ©Kj‰€Ïäl‘þ»û]>ÿFE^¤ýÉö_de®Výþ÷ïßÏ\¿yì\³ñ²æÑfÉ3Ë,œˆÔn1²¢bræÑjm(ñÈšhËÏs2&Ý0¤‘nSú C0¤Cø8xLæÜÓ:[dî úý:æÆf¤ÙÄ éù|ªHóò5þ¤Ú°;ÙÈœ›[5%ðûݪ䆂– «5:¯mIž7CRªäY×6æeL¯!8 ‰+› ËÎ1b<2†¤g‚¦oñÀ<×z¬Ž!½jðdùh³±âIŽÆ-&'bZF¼Ç1$ÃÀÌ8ÖRÕÔ$·ýÞh™t¸÷žRkœLÏ? \c]ì%#:"³yÈ9†4Þ˜ÓãcÌùµdHCN·é¨Ò2«åd[Û‘íú]o–¯øìg]©O_ v#+ÆÜ“o–-˜÷mÙÕ Ïdå}[YGn%²ÞO•cYùRæ[ð–(‘#FÆ Ý?Ž]  ACb˜édA‡ iUm0"£¿Ë½Ù92[È;[§ç§ÖHL8âexƒeòŸr6Ð]+§-MŒ8ã| Ù;™cn:K¤~=G¦ÌÙÇÜͯò+ì”F¾vÁ›‚ª Ð% ©Ëa¥S'ØeHžY0çxLQ gFÉÊÎY綬UñN†õz.esÈdÍwcZËo¢±#.%Ì­R«çÌLpOÚoc›w=ÐuNmvÏõë^8³þIFç-.†’¯}âBÕè…†ÔËHÒ«ì2$k–ûÏE)¬Lmu.=G&cNrÊ›9îæ!Eß—ŒN-â•jÃjr*t$& —92áRKÄËÍOwgÙ¦£Tû'U2cT^û4biRFÕß1¤«nΆ `H M¿…À.C’I?îºú5ý(¼–mÍѶÌCÌaÙõÈïEsr~ʳg’“3´æ6™ùÑ2`³Ôc­\“þôŽåxájQºÙά¢áybr-–“tª!]`‘ú½5CاÀÈ7—m¶"X2Wiꦻ«“ZÑfÚÕiÛnH:*¶FÔòWû—•ë®Ô÷™Š´_U¦¿0®ïg„Àõ0¤ë™sƶ ì2$ïz+#wØYîjP¤ù‘wÝœ÷\2Ê»øËý¥Ìa²N ä¸ù@Þ k[b¢ÙÖÉ Q¼ÀìdqC:h ]âûzÚPi*vÀv£ãÀA ì2$o I Jä=â.™Ž"sqv»…·ödŸ“(*`›×Õèv×0¤®‡—ÎE ȯ|T» ÉË Bñ$c™˜“Xã­ÖJXv=#3ž¤Oí5•Щ½a')ˆqŒXcf%Imš»#cHØ@ÎÅ¿‰RN…”@ý0¤úLjžE òМr¯!¹+­Ü+ïIšÿ²ìÍkfî[Ò`dÄkßáÞSê¦Þ:’ÿ­Ö%Øf½ùÜÈ[js„iõBCâR—@þƒ^2ÚeH–¸¸£õ"2q&ƒ:®ôXb‘?³f:ÇÒ¬FzÿªGF°\²bHV—C®–´.£…jWn}aÅqo¡WîvþÏÈ è{‹0¤G6%ÿL÷–4ߌ–üzŽ'ëÈoýø“é±lC ‡U,’‰L‡yCJ¡¶åL«yCAn Ì‹ÂíÎVà6ÿˆ½°>~Ó=50'ºÞ ©¥Ñ¢­ûlzv'§ÞvÅ~©çîÎ|¹Îš ŨâÂ$Íɵ¥ü–_Srn¡kHÆuõïßû.3ŽR¶Þnpƒ@µ0¤j‡††m&°õÑœ_þð,Û5_ÿ2¤ä &…¢PËqgÐ"Â$ëÊ.'Ïe±SÒ¼©?'È¿ÅÈX:y(¨~ i5޹—À¦ÇîÁÂnO+Ž!¹éMÞy7#ŽاÛkÑ0Åž«|ˆ='“ÊrsÈ~H___÷^Þ½ž=ÿNì•ýjކÔÜ ×àük~Éät@„r•†äu£HÄhiŠ¿É$ŽÔò$gWî›5È÷Ö‘¥IÉ#‡»Í.ìðÖûô¦q*0$.ˆêä?@3K†zè=<‰£JCòºˆ=µ¤A½åãׯ_S_Þ–ãIW2ÇžnÓËÁ¬wë¾Þ­Vù[b¹GÉëþœ9·ð9g¦V¤ `HiF”8›@ÎS2§ÌÖvZufÞš!yrŒTÎïß¿•!½ßVk˜z+œÏŸÖÝÜ·­|ëva²7G †”yµ_VìŒü²Æs¢^ `H½Žl½ýÊyÆË”ê›>˦ ë6$7n¤„fÍ¡¶²…LË‘ëí¥!Ù æU…QCª3’´´*fHÄ“6Ý¥ ç<JŸ“ú à'€!qeœN ç‘)szû6ž nC EkVsR¨õ ÔCòº”?Ï)lH· †´ñª¿¡xÎsã†fqÊ‘`H#öU}Íy´5¤D¶º )²œm‰ú¨ö¿gÖæð’Š*9ùCî,Û:¿¦{TFbN· “D…!]õ08zžÌ‡ÉÑÓp<|0$®‹22dÞbeZpU-µ’œÕ’;7³]VÔGMÀ9ÙË\[ò½fS¨žÛõÈÓ éªÛ¥Øy2Ÿ0ÅÎGExmª0|¨ÿÓÿâ2X²XHk5$¹]¤»udz#³_FyW•,7Rsv¯ö·7>ÀÚ½3Ÿ<ív–×CCªg,hIæ³iÉti C{šX¥!%÷CúPkÓâ#(öF²ŒGæzSªß1rkÃö\ú•“ó8ª¬É4§1RcvqssžAV™‹[xýéª4¤È›@–x’š_±#Τ?uóŠÌü$kÙ¼qÞvbHÒõ7ÎygL>¦Î;55÷MCê{|÷ô.ù¸é —h—÷1µ’µÎß^Ÿ^³6—œ4hê—ØÍÈ5³v ðLä‰jÌ=ò÷1íõýý@5+ÚZ¼m£6ðz’»w‘å7þ9µpLÈ^Íø®‘Ñà?~ÌÃ;G›.úv ãIíŒUí-Åj¡SÛ·CŒNmO+•WoHvÉ÷þW\";@z6æv^-Rój{6°•+vî&|¸í®™Ç!€!3ÖFO“]`P@©n»+¿Þưî¸(v²®!ŽÒqÜÝ äœ ü” ¤Ô•ÝÝç„”ºÒë:„!]Ǻ†3eŠQ M­¼ Ñl$÷…u¾‚£]gr×î¹ÛAùGíÊﬓš‡'¶ïj1¤¾Çwé]Ž ¢\'¿¾¾Ä\›¥¨ÿÍö}µÐ Yn´&!ÍC–ü™ò“HQJRj³žÔæ¸ÝÖj é6ôœ1:²ù{ý=í¦ì¤7+êKY® MÅ×î¹ûg.»‡ŸzIPy+"ÏÆVº@;/ €!]ù†SàF×@ϵUºÆ“ôV–:näîJ°¸ók×Ü …RCƒuKS1¤[°ŸxRîùáʪ_s1¼s=DNò$k»{íÞ;GÞ˜nS†4M^t…pšFðÌld nh&†tô“NºÏO:Õ* ûû}ɽ­O2ªµ&Ý aö‡t3P%naI`‡'é¯OHöJCj~d£†ÐÌI²R‘Зâ¬ILwµÿrFõ6º®ÚÐ|Ob?”&ô`#1¤ƒï<7º“¾snr’nÍ7·&4g"÷¨ª{¤¡Æ$S¹e†úES7À6᪥0nTËH¨v¼‡›3nìTÊq.@ éæ±ÆnN@ (ë©^´î* müvCS.?%†t9rqB¯ÝÙ Î @ JVÜhÇœ‡äP—@=±º».I é.òžk·5…C¨˜€ûÕþççóñ|~<¿ùSœÀöÇ’¹}i ³Ñ†tÏS¡³0ì=9+ 0éiùçç'>TÜ„’>žßÓŸ¹ØãñóçÏ®5»‹ÒÕƒÎ.GWç|€@³¦/æ°Cº6„öxüóÏ?Í^J{Ž!í¡¶ï²Žöqã(@`@êIô(é9»ÀFšãIÏÑ"IÒEOôè"МhŽ€³€<îFëìyHgÇçFŠ$aH=KH<º4§š%0-žš•Sš0YGgG†vׯ"I‹:ô¾7†tú³„Ä£Ós@  ¸Ñnq¹øÀAfÜ0¤Ÿ+̬—ª!îȼlþ¢¾û­^,ÞÎÅþúÍ{î1ý«ç éÄÑ%zt"\ª†ú"ðÊ=²w9BŒª–³Þs’0¤³ž1$E–z!μÞö% ‰\ì{Å(.¦ruÛ41ÚÙÅ(»ƒ!2¸èÑ)X©蔀š_Û1ÚTø^áèõìj÷íN/ɹ[RáÁef­0Pªƒz'Ü÷ªÐ±ÖAé7 C*üì!zT(ÕAxÍ£…ú¡ ªÐ„ÒMÂ:¸C/èztdNôD€þi9k[ÈB/-Ázº!Oê ztXª…:&€!µnHïÄ,[™'zT†#µ@ƒ†Ä,[‹¶Ôq¾6†Tài„€H€Àä.‘-úmƆ¼qó:åq¢ CR ± R‹¾…!qcû  G\€Ž ©E+’m&éÈõßó±Òzî'}ƒ p ©CêußHòößôéQx3’ý8€À1m¹ä®Ï1Ëvìèñhæ×zUú\MàFCJ¾}L¼€lΑ*챪*Xs©nªC*wÏôÉh,€Tn© €@A7Ò&Ø]8?]ªRNÒºUæ.Ó Þ=T…õ0Šô¨€@[†tÄB’Ç& ì¶´SÄJßFG’´!•æry}êeIÇåÔ8! PŒ@=†”œt›<#)19±ŸL_¹ò\™MòÃŠÝ T4éѯåÞF§0¡6ƉVB`,w’×?Ü_&5%顬#™ä”¬Dp LÕs¼ùm°JbH%îX7PñïßV¾sÿTòTÛO{JW⢣@ rwR@ž;DáF;Q­½·Rá[LÛï_¿žŸÏççwC>>“mLwuCmÖMš­à3³Vøš¦:@`{ Iív¨žŠ~N[{†¤¾ûߟ~ÊO_±ûXU>Ô#Y>tÆÅÏ©’ÄûX©@ ïlÁ|~~òŠNvy^nјµ(Cñ6+Ï›Ç5w=þ8€@„@M†d8ÐLzùЧ?­ß+Wp­Åu#9Éðç§sÞ—ýxÍì1zꙊéInYÝŽØÁC0¤7x»q—þôH÷hº»zÝ µÀ%K€Àùî2¤efêå"ýõ—ú¯w¯m#Cù¿3¥ßDJZæ´¤‰81Sör2iHæFOõŸ¸‘6”žM‡cHGï’i,‰UkZÓÍöõõµŒ1!¥£;ÇCÜeHz>K’ŒýXFbÍÄ…ææÔïÍz–™8Ë¥ÞùCY<Ǥ²ÈÒÍô–,¨¹†¼¢W¼ud:Ç+ߨ¥d£ÁZÛíõÝÎHK!0(›¿ãE iCÞO (dH‰>¾j3æÚ^¿ùüüœ¾=õ<Ú*mùm.·x$ªD iÿ­Kô¨ÙšîÃýÃÌ‘€v¸Ë<3b‹©ØùÚ2Þ³XT äTçÿû_ô^Ñ O¦‘pOöRÜ^uª™A2µw]t¹CzGÈËn#~¶änç^<”ƒ p”À†$gÄæMÀfÜ ¡—¸1¤©N;>äÄu¼Giòeˆ¯¹Sº%wªÜ”„¤2Ç™eÛs¼HR†4¯Ø3Ì@`/» Éuožµ½Õo]›Øûqv£GŽu¹H†bHKäéñ§­,¯ßx¼ê’95ן0¤=×>ók­Ì¯ÉvYÛ{†c l p£!Yó_ñÝŒrv* Eƒ’³löÎF2ò$fôdýY­½Ä™0¤ —».Š!5jH{›c ì"PÐrfš¬|笵úï[«Ççãœý³l¹‘'q.ËØ1r×·á ³òÈ@jQ^mf®mÃýCQ@à ‚†”™@£ß«àݘuÿ õεõVêý'ë¦j¯Tù&¼ÄrnÊ@eœjH×Ó®o ½@Ó}‰Ìãv3‡Þ¯µ÷C e[ûM†de/M_Lª Ê„–Oi­œ²7 ©Ìõ­åDCºL¦È‡i9‹©L–ºÞþ´ºŽÚ¥I÷9e`o+šk˜þ©;8}ÚlÄÈ•¤nW%\p;q @`+S ÉUšÝÂŽôÈ|Onõszíú¸X‹þf‘.eØÌë…²î¹ÔT 1!èìÍmÙ˜œÝ{­Œ[͉Õþ[¯·MåO1¤;2V+z1¡Õ‡T«ôfí:”C2 IZ…acÝx{#mº‹( ì&p¹!M«úÿÔžñÞëhVϾGê—Á÷²Ùïk3ó„æcÕo"oXójæ­>'²šˆ!í¾äòìÆfkQ®cùÙtm©Y¶€!ÉøSpjL’k~Ú·TJlåŸúåë7ºþuîOÖ©=L¢ê¼Þ81¤ü[ˆ’€ÀwRl¢ü=Ü’Aky'Þó2ÏÛgÝ)Õš±òC:rÕeÛ›!)×–|Ú™Ô\˜þ_=³ŽÙ±"%.fý2†¤ÿ¾(k‘ªï)Ê%ß;Ý!:#J·_•WçÊkaÉÌ' )óþ¡ pÀ•†² OºÒ{WkÇíf&¹ñ¡Ðüú}8çiÎ+zœ–8–gŸÉ×LÜôóÊ@Z£S̲¼üâ‡÷fHN i5åFÊNäÌšt—ø4™2‘©½¬üÒ#+Î$3œ¦¿‹\¨ÙfÔl Ì‘’-±Ž}û\I Šwv:ã©W•C˜\cHÒ*²Î(ÞÞA{ƒSeâqiT¡y7¹ë’û¦6÷¸Ò©7QyCšÞý¬ú²—q—÷×ÿ’‘§"1)CÊÚûÛ<‹‘µmù™ÌyR÷ƒZ^§WØY+é\C’«í®\ÈšÿSï:*‡4,_¹dçÃÌÍ(f`ÇÈm·ó†4›Êõ13¯Ò{Þj.óžÛšÿ>»Å?ŒÙ´·-ñ¤×¼˜1ËöªÙˆý¸ñ!ׄQ®,‡+‘0Ί¶m×<¥!}0¤Ö• CÚvå_oH–‰Ù.¯!=Õ —róXÿ4–[¿6!™ùôþûjHÓYâö3µDûYÜœ®ÜijÉ Ü6ꔆ °†„!m¿j.:¢ü,ÛÔð[ iºÍä~Er5™Î­¶²³UÜÈ óÆ“¬<;YF›»îLgYkÙ”ÃéÄ=™©íU–Õˆ­vH¦öE÷§Àð0$ ©Ú›à˦z¯Ì,.%ÔÃ:ÿjïU. `HRµ6†T~ŠªqÍšWÿU{½Ò0@ 3†Tí%}–!1ÑÖ¨'‘Tí½Jà Ð% CªöÂ>ÑäÞ‰ê€Íf'¤jïU. `HRµö‰†4õÙzÙ€ÂÑV—§GUµW* ƒº$€!aHÕ^Ø'Ò¿«?’ù²‘êmé9_ ¯ã€À50$ éš+mÇYN0$³ÓÒñ×»ZIˆ®H;îÀ0¤ƒ—Ðy‡ŸnH*’ÄÊÿºñ9‰ìr‘C:ïn£f@À!€!aHÕÞE I̯Y¾þMmuI]ñ¤éí¹lYí-Jà Ð7 Cªö /jHÑ^¾ßêZ— .Rê»Õ^4 è›ÀôßfSûñ|¶n #·¾^Wù\gHê>Ÿ¾_»™t³)Nnd\ÓL®õýEDï P1é{èÏÏO<©UÍz<ž_]Gšvµ!©¶NgU?ä']Äš¬Hó< ’täNâX@`÷ªgmHÓ—m«¢0FË=„!í¸òsѪÄ_®!ô(çz¥  p²‘öB ©ÀMñþî#)Xߨ@¨ÀµA€ÀØÈFjѦ‰Ñ¾3Yo˜eëÆ¦+cõ¤nžn“ºJ:F¨/²‘š“¤ÉÖb¹Ø65óCÚÔ¾š Ëy±šÛIÛ ÔOCjÎ>þù§þKkw 1¤ÝèÖ|s¥Jû+âH@ÃqkæÚ“¤~3Ôíˆ!z,¹éÕ‡ªã`@x¿ÊCjźŸ_à <‡B Ð TM€†"ð^ù¯{rvz<çë“b-Š¡œ*’z¤êåæ)É—º TC€iµj†â¬†`Hg‘ E’N?'€ 3 °ZíLºÕ!]1D’® Ì9 œL€9'®«z é¢ñ@’.Íi œ@7:jíUbH×’tkÎ@ ܨÈöªÁ®3<éj✀À.¸Ñ.lý„!Ý0–HÒ Ð9% l¸Q6ªž bH÷Œ.’twÎ @ J âFî~.°ì›†tÛø"I·¡çÄ€¸…ECºù’À“nN O7þðÀª¸0¬û³Š6Ñ@½ÀzáCýÃá+x0Á¤‚0/ªêß¿¿§?ü@ À´«›Œ!]MïíZKãh$ðõõÕ`«iòéX§v:â^N€!Õ5’xR]ãq 5Ó×3ßÐøe á,LzÀ¸6À6Ẩ03n.w÷«Zþ&ÏçÓƒŒadÞ³ÜUÝSM¸QO£yY_0¤ËPo;Á¤m¼ª,­ñùüü~>øSŽÀÇ÷Sý™©þñÇõt!½«òn¸§Q$Ýý—³bHõŽ$’TïØD[¦núÚ.'Ø•K@KÒâIJ˜”-Íðù›@2096zŸECÊÂtW!$é.ò¹ç5çtÔx‰ˆ‘üçïe Hg²liþçããOʽŒû*‡õ5žwöCº“~æ¹C7|æá»†@ØôwyYE¹¶ © YlÔ“'}?¯¹8˽’b¤¿íîm'goˆ†ÔÌ`Oªy¨ÞsjrÆÇú»‘:#¾Ý½þ¤¿û#Ÿz-A•wåɪG– y†;å­Ù;Û¥“„\‘-´æÎv;_¨×˼[ÍWm;N éFÇOA cÀw<©¶ Ϭ¹R1 KY䱑HIÄ{ÖDæw:”T4Ë`\S åý„æ¶¼K ã¶´I\qŒ¡øùó'3nµÝ8ÇÛ“#‚FÇ!^†ÔÞÀ¤[cöÊ@R3kÏeZhÆ'$F‘ȇ7~câ¾¥+wÝËHm‹Ââ–‰¹îåºQdRl“ÅCV!±[2“˜q«âÞ9ÖÄè?ŽÞ@CÚ«ª¢‘ÇDUíì»1"÷È2€¸ý„fšÜ‰9w*->3šbÓ5» ³ñÖïm°Ugä@} ×`"ž1§œzì“Ú9I¼4¦©›1jj¸:i,†Ôö@âIwß´éŽXÏ x§ÏüÑ&¹¯Ï²dÝŸTdÇQÔº-w)¸¥ë|¯°[´Æ÷û¥ZU›¹‡Óƒg1Úàûý"UfmVËåTàîH’«•®º-'b®í®ûåÈyq£#ô8ö é½ZŽÅ“n‰ÔŽGɯ|#œ£LÂJm*Ž­õ‡ Iem›Ÿ†\gÍãqœfi§Êæ1sÒWóp|q©PÖ¶¥$+·@hBÍ w­¶¤|Q]*¼®ä–[fÓI£M¸(| é ª7ÔšÜРÞO^ÛŸ?7´&ëx#=–÷8v²(‚úýôõð¹˜.£ÉlÿªGzßEaBÊ-ÔoÜ“Ϩ¼<ÇVÞí&‘²zdØ$ÙH•ßI7ª¼ý4¯R7C9wOºl8 $÷+9’0dÇ?2f¯VG1ó‡ÜEëÂDÑöû÷o}‘¼sÌ=báÄ«bg‰F†dO—h–y^9#¶CŒÜy:+ÑÊvHºìÙt"¬h. _CCº†ó¥gÁ“ÎÆ-ã+¾Í‡¶~Ó‡ìgµ5Ã¥FÖ<»Ç]^këì\%Uï_¿¢Nê@;æ¤ãÄÖ9;5¨lIžåíOOë²”³‡ò#™/%5g÷öåw“tö±­~¬h/J_NCºùU'Ä“Î#½Ýìi,sÇÈù›Û—å³z€ÎR²¢;Öœ—˜M³²•H’“…­ã.†!½iÏŽ™svƧ2›JÎÊM±+exÖ|¢ì—ö¿÷î KÍ>/Üì òy?~ü8ïÚ æ8¤éï$HBàvÒíCpn’Ï£sOßcíæüÚÖ¯ê5÷È}¯­¶5j"šâÆuyòRh[m'Û)‰‘1­5×Û—3î!Iƒ gj»ëìüç}׿¦`ï†?û(ÙH—Ýɧ*pY{82 `H™ Ú.–ó„j»‡¶þ°!Efˆ ïQBò9ó%vÍeC/ùÚ>÷RÑ&+æä‰ é½1eËÌ òd‹Ç ÉÆyË‹yC#±i˧‘D6ÒÙwLÎ3G—9»1Ô}0¤}ÜZ=*ùØjµc¶û˜!%hd#¦âds¯1wX­ÝT†ÐTLejgÌú I©XØÖ\lw†ÎYmço¿ôBgÝÜþ ‘¹uøÜNbHÅošäãÅ*P¼T²0¤²<Û¨-çAÖFOîhå.Cr7ïYãÛ¡ÑͲ²¹˜PëãÎЩ2*‡Ú‰$y32çúÕegZgÖôÊ8ãq×µ%gÙ¬¹E%p2ï[¼×ewÉžÜÄŽß:9·ÌñóR.#€!]†ºÆå<ãjl÷­mÚeHVðÃX‘Ž”¬V4)ˆˆý̇öu´b<«Íȵ`ÖNKfFÔÒÔè:²åìfDÊm•ý›pÖ”DOùùö0DmË,›1ÒÖ{(çYm¥JùÊ `H•ÐEÍË|ü]ÔšºOsجumÞUfó/ÍÕm‰ìiá žý!UTF¯3gʼSWžuû2\¹KÊüyÜ2ŸÉŒfÙYá–\JξYÁ§¹w̲Eî³Ì‚·ØT­þ^©ûV¦uHÀ¸D ™OÆ‘©2¤õK]¾=ÍåÚ7(žK$ Æ™S[LÏgù‚1žµfïèNhï€X’Ž{ÉöÈÝÔï½ëà¤Û•؆CÚs×G#?è{Ç0¤Ž÷h×òmi¨ÿdÜkHn*Òº!¤Þ§Q2w²­ÿ0MÂ]†¶DntUŽK--qæÚt{Ö,(m3oGYËȽô§:êÈLò¯ð·z­sž|3‰zå]2n)0´!eÞ×ÉbGŸ/ê `HÕQ L>.e:š|V+vRHä{+›XúŠ•|£×»I=²Ê{§¢’™Î¡ŒroÛ¤‚È&ÉS[SŠº˜¬ÐMÒr5H×Y$i CÚtçÆ ŸuGQ/j%€!Õ:2·kß3·âmkÚ.C }åGRjâÙ6®…xÃr)Ý O.”»ƒ¥ûê™í$6aÒž'ÿbGÈDý9^hiùŽ`ÒfCÒ×ü¶kåòÒûîMïQ—·B :RuCÒVƒö=‘Ûê£ÕÚB†ä†|BqkÍš ‹Dwr"F®Çx#C‘ÖZîo¥q9!%¯*¹nò¤\Cr/ï.Ý}7ñ¡ÆŽ6´ECjk¼joíÁgwíÝ{µo¯!Yê ¿ã­)¤PÉ­Zàž">‰æ³ó†…¼îåP“]³ŽŠ”¹]<®–/I CŠ\Æg_¢ï ÌÃÏîõC RãXc/2Ö™Ånì¡ÛÂŒ=©3¿­Ý¯|+ÏÆu7œš2s§ö"ù=ræËŠZy½Êª*’oä yOáÚ˜+‹ÉÀXy¿!å\Šn@1ç¨{ËÜxïpj4MCjzøZjü½_eϾÝ"y?–ñxµ&ë[_¾M¼gÍR+Pä&*yÏeYŽÛknÎ ÉN…¤0$C9}ßZÆ0¤²×ÆíµµôP ­¨›†T÷øtÚºÛ¿E6`»!mý ?XÞk!kñZšWž¬ Aל"q ƒ*xø²æÁËà®Ã;}*Ð-TGCªnH†mÐ]ß7;Î[Ÿ!ycT2ÇÙ›ÁcMŸ¹ ò!yº"Ó^í'T•ѹ§öŽ à¼C†½ýé8*$€!U8(4ÉCà¼ï¤dÍnê‰ù^Ø ¾Ý7"’E¤g»¬l'C²f»Ü˜Œ-Yq©øìÛ¦^œZx’uµp¯BÀ:\ºv ÃkÙNúîωå¬eäŽØæ{<²”쀩"K †›Ä¬JN’ûh'ñH’¡¥ñ«žŒ÷ÛAüH®4/Å_Ä--Sˆ±Ìƒ‘ÓŽz|Ù®^U[ß [éFáït¸|N–Ö³HIó"!³óz}:f„Ÿp=™Ä‘"¼ž"ÔÑ[î³ßà¡=iþEÑ汎¹ûaÿ ñ-zi5O >àïoY:J|ÒÁ¥û@‰H°ªzö"½[_ÕÆ…àIµ Û^;$Xûl¡Wõ9ü(i÷R1$Ùò|CªI޾]þì~B¤û=×ýõü ?á^CðóVÓô½b};O¹f[Í/ÌbÑÛu± œñŸjسñ¿eðØx®ëUkˉ—ÊŠÝ EŽ2dÚàeˆÁôJ}ÀôGŠx¼šö¬ˆ:³ÞàÄŠ 7KwW KÃŒzô®Ævºµ—€uØ5-f=M Vò!h•%F.¹È^62;Ñu¨ëEÒiWZÔ ¾Ð§¸+%º*ÂÉ«Æ0Ù£^â;ÅŽwUd×µfVû¥oréÇ4ï³ÝÐoXÿÀÃþå^–úoø~o·Ì‘E µßÙâ0·F0¡¶ò@Ï5©áoø«W¾Ó5·»—M»iÈxcKxÔ)‰ÜHÇ9ïCO¸Ï@û=×ýõü ?áG‘rI\Ö/¥r¿×üEmk®¾³ ½µÕÌ}áP¨ƒ ln¦@FyãÚ¹MSÖt¿Ù^Ŭ\9¾ñÙ¦YF~s’3–ã>˜â‹>â=kì÷_ôÖ?ð0ÿ…/Ùî¿è7¬àaÿ óïxŸYÓuOÃi|Ñ%…¥´–ÊO–Îèò9È'¯­ZÖumwD·ÑlÆ¡ww¬K–– h¼È” %"S’XrDZ£^àvÿgºÿ Þ±ÿ‡ü(û=×ýõü ?áXþºÖît‰F½o$W1NÉJª¯$|f ÀI܃?!ç·n+¢¢‹°9¡à/ˆobû,ì/‘RäµË³HƒI9Î@æµu-NÕì"³¾·2C Vˆ‡*ѲŒVƒŽõ¡E`SÒô«-ÈZXCåĹËgcÉfcÉ>æ®QE )7 8.¹ôÜ)h¢“p鑟­.@ê@ÍQA ’÷ Š( Š)2 Hêé@ EPEPEPEPEPEPE„…ûÌÔ B@ÆHé“Ö”€O@MPH$€=I¤Ü¸ÎåÇ®x ¢2He u ÒõäPEPEPEPEPEPEPEPEPEP¼>µ»àoù­¿ëµÇþzÂx}kwÀßò)[×kýõpÜbßþ?µû ÏüÅYªÖÿñý¬ØNæ*ÍL·¢Š)QEQEQEQEQEQEQEä:®š··ž/•t½&y–öP—W¾UÄXE?»SÁÇQ“×5Ó¿‹^8u‰âA -½Õ˜¹ ¯æ:7P~ñ$/×I?†ô+«¶»¸Ñ¬&¹vÜÒÉn¬Äú’EMy£éš…ÂÜ^éÖ—3"•Y&…Y€=#§&«™çy-ö¯o$â?5õ=Gu@¬Ìð±9Ç^zzS¢Ö¯µ_×·Z•£,º¼›4¸Ð -¼µuäõ9ï‘üKŠô1¥iÁƒ `Á£`|±Ã ÂªŽ¥7ûLÆøiÖ¢ñœHg®òÀv3œϽ>džéÞ7ñÞ—ªßH°"}‚{˜>h‰Ðà(PKÏ;À9­Ï¥ò|-ÕR¼K«™-ÖBñÄ#U ÈBè=O5Ô +NkÅ…°ûgü|â!ûï÷ÿ½×½M=­½Í«ZÏrÛ²…hAR@G§•Ð%þ»âµ©E©B¶znª–‰hmTùªÍ!Ÿ¨À~1Ï_jÌYÕô=7Sò5!u=ο5 Ü‘«@rs&XãæÀ6cŠô—ÓldŠhžÎŽy²©ŒbGÃ7©àsì)’id¦ìɧZ¹¼ÇÚKD§ÎÇMÿÞǽ@rVZLjõ›­Ê+ë}:k›{‡¸•bKŒ˜T2àíÉÏ#8ëí\Æ%ö‰áÛ«IWRÕæ¸g"Õ ²ˆÙ† »’[ž@ëIgkI´HðGåBÊ€Ó•}j¯6‡¤ÜZEi6™g%´L^8^*ŒrIOçG0T>)Õõ;}1¶,4vm)o常ˆ2ÎûÊ•ônN9榺ñn²¾4kxà6VóAˆ^5‰;Æã¿<œqÍuòèšMÄ1C6™g$P¹’$xT„brHà“VÆÒKèïžÖ»‰JG9ŒE=ƒuš.€œðqET€QEQEQEQEWŸ4Ý_â6¹i┎[{h#:|WLR1ûì¼€NqÏ_ʽ©j>™ªùÚ:}­ß—ž|Aöç®3ÒšvÆîcº×¼9áû'–å­ßYž =ÉÚæ«åáQž2¥hZ_I®xÿÂúä¨Ñù³}•SÌܹŽߌóìÃ߯X}>ÊO²ï´¾ÈA·Ìc÷$t+éÓµ146#lc°¶CjÌÐmˆ(·R¾„÷ªæ‘ø“yæ&¡®'û}Ð’xm£/#Ã,ÿÓ#î×yzáYë:‘Ošn§Ž”(ë ±d ?‡¿5ìÆÊÕ¯VôÛDnÕ<µœ ÞС¹Ñ´»Éd–çNµšIB‰H.‘Ÿ\v¤¥`<úûúVâME­l´«GÒš°XÌÒ$’|Æ$ 8®ÛÂò'hŸõãþ€+Rx!º‚H."Ia‘v¼n2¬=î)a†;xc†Ö8£P¨ˆ0€†î€}QREPEPEPEPEPEPEPEP¼>µ»àoù­¿ëµÇþzÂx}kwÀßò)[×kýõpÜbßþ?µû ÏüÅYªÖÿñý¬ØNæ*ÍL·¢Š)QEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQE£ï­nøþE+oúíqÿ£Þ°‡ÞZÝð7üŠVßõÚãÿG½\7˜·ÿícþÂsÿ1Vjµ¿üköŸùгS-À(¢Š@QEQEQEQEQEQEQEQEQEÌIq¨ÜjZˆMRx#†äÅqÇB)êÊOR{×O\¼?òÕÿëù¿ôZVøh©T³8s“§‡rƒ³Ðp‘?ò»ÿ¿Pÿñ±£\Ku¡ØÜNûæ’gl¸ã“Åg¢®ø{þE½7þ½ÓùVتqŠ\¨ãÊqjÊJ¤¯kTQEqÐQEQEQEQEQEQEQEô¯w4g:œg)#õ¯.‹Å^"xcs«¾YA?¸‹ÓýÚôíSþ@÷ÿõë/þ€kÆíÿãÚ÷ùVÔ’w¹è`)B£—2¹Ðé¾&×dÖ4øfÔÚH¥¹Ž7C c*Ìä.kÓkÇ´Ïùé_õûþ†+ØiUI= ñ´ã ‰E[@¢Š+#Œ(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢ŠQ÷‡Ö·| ÿ"•·ýv¸ÿÑïXCï­nøþE+oúíqÿ£Þ®Ì[ÿÇö±ÿa9ÿ˜«5Zßþ?µû ÏüÅY©–àQE (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ åáÿޝÿ_Íÿ¢ÒºŠåáÿޝÿ_Íÿ¢ÒºpŸÄ<ì×ýÙü¿2Èê*ä[ÓëÝ?•RE]ð÷ü‹zoý{§ò­ñ›#ƒ$ø§ò4¨¢ŠóÏ  (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€*êŸò¿ÿ¯Yô^7oÿÐÿ¸¿Ê½“Tÿ=ÿýzËÿ ñ»øö‡ýÅþU½§©–ï/‘wLÿî•ÿ_°ÿèb½†¼{Lÿî•ÿ_°ÿèb½†•m̳â¯@¢Š+€(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢ŠQ÷‡Ö·| ÿ"•·ýv¸ÿÑïXCï­nøþE+oúíqÿ£Þ®Ì[ÿÇö±ÿa9ÿ˜«5Zßþ?µû ÏüÅY©–àQE (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ åáÿޝÿ_Íÿ¢ÒºŠåáÿޝÿ_Íÿ¢ÒºpŸÄ<ì×ýÙü¿2Èê*ä[ÓëÝ?•RE]ð÷ü‹zoý{§ò­ñ›#ƒ$ø§ò4¨¢ŠóÏ  (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€*êŸò¿ÿ¯Yô^7oÿÐÿ¸¿Ê½“Tÿ=ÿýzËÿ ñ»øö‡ýÅþU½§©–ï/‘wLÿî•ÿ_°ÿèb½†¼{Lÿî•ÿ_°ÿèb½†•m̳â¯@¢Š+€(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢ŠQ÷‡Ö·| ÿ"•·ýv¸ÿÑïXCï­nøþE+oúíqÿ£Þ®Ì[ÿÇö±ÿa9ÿ˜«5Zßþ?µû ÏüÅY©–àQE (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ åáÿޝÿ_Íÿ¢ÒºŠåáÿޝÿ_Íÿ¢ÒºpŸÄ<ì×ýÙü¿2Èê*ä[ÓëÝ?•RE]ð÷ü‹zoý{§ò­ñ›#ƒ$ø§ò4¨¢ŠóÏ  (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€*êŸò¿ÿ¯Yô^7oÿÐÿ¸¿Ê½“Tÿ=ÿýzËÿ ñ»øö‡ýÅþU½§©–ï/‘wLÿî•ÿ_°ÿèb½†¼{Lÿî•ÿ_°ÿèb½†•m̳â¯@¢Š+€(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢ŠQ÷‡Ö·| ÿ"•·ýv¸ÿÑïXCï­nøþE+oúíqÿ£Þ®Ì[ÿÇö±ÿa9ÿ˜«5Zßþ?µû ÏüÅ d½¹’nⳆ[™1-×bÆGrsŒL1¡B.¥Gd†“nȳEKÿ´Dáõ}X¹8¹ÛŸRS†myÖ¨B}ü^ý߯W‰þ²`»Kîÿ‚kìd6Šü"öß'üN5_Ÿîÿ¦}îüqÍ6_ YÁ7[Õ#ÏM÷¸Ïæ(ÿXð{Z_rÿ0ö2Š—þHmþÖÕó×k?áGü"pÿÐ[WÿÀ³þ¬˜.Òû—ù‡±‘/ü"pÿÐ[WÿÀ³þÂ'ýµü ?áKýeÁv—Ü¿Ì=Œˆ¨©¶襛WÕ•@É&ó~•^±ŠÅ®jr2B_gù ë&{Kî_æÆAEKÿœ?ôÕÿð,ÿ…ð‰ÃÿAm_ÿÏøRÿYp]¥÷/óc"**AákfvA¬jÅ—ïyÈúñKÿœ?ôÕÿð,ÿ…?õ“Ú_rÿ0ö2"¢¥ÿ„Nú jÿøÂøDáÿ ¶¯ÿgü)¬¸.Òû—ù‡±‘/ü"pÿÐ[WÿÀ³þÚ¡d¥ì¯ší¨»Æâ?Ù ç¯Þ°â´§Ä8Ë•¶½VŸ…ÄèÉ EEoqÕ´sÅŽ3†#ÔØŽ„v5-{†A\¼?òÕÿëù¿ôZWQ\¼?òÕÿëù¿ôZWNø‡šÿ»?—æYE]ð÷ü‹zoý{§òªC¨«¾ÿ‘oMÿ¯tþU¾3dpdŸþF•Q^yôEPEPEPEPEPEPEP]Sþ@÷ÿõë/þ€kÆíÿãÚ÷ùW²jŸò¿ÿ¯Yô^7oÿÐÿ¸¿Ê·£Ôõ2Ýåò.éŸòÒ¿ëöý W°×iŸòÒ¿ëöý W°Ò­¹–aüUèQEbpQ@Q@UmBïìVm*®ùXˆâOïÈÇ ??оˆ 4Vo‡¦¸¸ðý”·sy× ‡Ì—ÞCœvéZTÚ³°QHŠ( Š( Š( Š( x}kwÀßò)[×kýõ„>ðúÖï¿äR¶ÿ®×ú=êá¸mÔ²FÚÂÂÛ%ŸW{t“û†GTÝønÏáX3Ó´ëmlÀeÑ®RßOñ.Ö·Dªƒv^ zocØç89»uÿW¿ö0§þŽ» ý+NÕ<±¨iö·b2J}¢“i>™WÍçØ·†­M»Ùßo—õ¥Ÿ™½(Ý3Êô­V=?ÄVºÃk–öxi.RÎûkÉ"+?îËcsWvG$cµ?À·/g¬µŽ±§ß[C­ØI-Ëj…I®³ÈAåLnAfÁÂ-z…Þ“¦êE%æŸirðÿ«i¡W)ô$qRÜÙÚÞ*­Õ´3…$¨•`AÆ}‰xUsŠU"ãɺ³Õ_­¬íÝësUºž]àO"_Aì’5¼R yá@xwì§9f ´ 󳚗ÇÐYËâiÞâ}í’Ä3iúÖè•SæËÁ/@Äà9àr+ÒþÃi›söX?Ñ¿Ô~ì~ëŒ|¿ÝãŽ;TwÚVªÆ¡§Ú݈É)öˆVM§Û â±y¤^%V³JÖÑùþ»»YÞîáÉ¥mJêÊæMWOÖï-xP\ZÛ^ˆÞVÁ“K ±wä ‘ŒñZ~$ñ/Šô1¤Ù¦© ³ÜÛ=óÝH°Û£0Çî~~6“€wŸZôë­/O¾t{» [†EdF–rªÃ ŽN¸Óì®Ò$¹³·™!`ñ,‘+aЮGzŠÞy½ Ê.T“µïtŸ¦¶¾‚Pk©åž(ñ¶»c¬DÖššÄÑEd÷"8„Iæãp,çÌœÿ{Õ§Ö¼SsªŸ³ëé øŠ}"(š8Ž0ïÏRÃhÇo\×¢Ýhúeíȹ»Ó¬î'PK, Ìç#$gž=é馨¦Ý–V˲S2â%d<}ï~µšÌ°ª1JŠºò_åÿ|¹ÂϨÞê|C&¡qö‹ˆb¾·3ld³ $ •‰¢iRi¾3ðúÝiº^„í Mo6›¸‹ÿ“æ…Øã›ö5êÿ`³²Z‹H¼»¼È¼±±÷rÙrsëDö6—+ ÜZÁ*ÂÁâFFá\ô#ÔTSÌãOš1…”›ztº¶?K…Ï+ðC©y¨\ÛAoöîFLr5›ÇÆK‡Àî’@Çz¯§xçÄ1é:á—SI¼¡f`»¸HY I™•¤u‡å@ ´äŽõëqéöQIs$v–è÷'3²Ä ÊÚþ÷SÖ¡·Ñ4›HÚ;m.ÊthÙc·E[ªCÜV2Á»þáknÝ>_/>ÁÉ.ç’¿ˆu _]Øê°j—wajÚ’,hJ8ÞzÆÀ?.*Û±×)ü*(¢¼óèŠ( Š( Š( Š( Š( Š( Š(  º§üïÿëÖ_ý×ÛÿÇ´?î/ò¯dÕ?äÿ^²ÿè¼nßþ=¡ÿq•oG©êe»Ëä]Ó?ä;¥×ì?ú¯a¯Ó?ä;¥×ì?ú¯a¥[s,Ãø«Ð(¢ŠÄà (¢€ (¢€ Èÿ´5´ºÖÔ˜ ôy3‡ÃAÿ{Ö¬j·RCn¶öÍ‹»¢c„ÿsŒ³Ÿe©´ZA¬P[Â1@"a^†‡<½£ÙQÝÈ|7ÿ"å—û­ÿ¡µjÖ_†ÿä\²ÿu¿ô6­JáŸÄ̘QE" (¢€ (¢€ (¢€ (¢€}áõ­ßÈ¥mÿ]®?ô{ÖûÃë[¾ÿ‘JÛþ»\è÷«†àqw_ñõ{ÿc èøë»ï\%×ü}^ÿØÂŸú>:îû×ÇqgÇKçú4:…U ni-ô Fx\¤‘ÚÊèëÕHBAòQ4”{›—è®OM»UÔ"K ½Vå•wÝG~®¡c*pWz¯Í¸1ïšXü`æè#ÁÂÀ?™ ŒÂ4ˆÁ˜®ÒÃÌ^žþÙëX Òv‚¿^ߟ¡<Èêè¬+?‹Û¸-’Ø«Ë3cyÆa HqÎxÇãÏ«¨]i÷ïo Êm¹T!¤ç줶ÝÇý“Ñsü^Ý&8:®~ÍèÙZçCErñêóiZæ§ýÃI¦¦Ä…œ ѺB¬ÀžåÁ${©õ¨ôýR}kÊÔ'$³]?“€` r‰ï´; ÷É«X ´äšµ¯×µÿ@æGYETÔ…ÛXJ,Ž'ã3ŒÛsÆìgã8Ís…Ö§Ü>æð],ýŸVV$fTRUðAl ÆáÐõÏ…•{(½[·õä6ìvTW1/‰î- ¸šîÞÒÞ5ºk(®Ö”g,ÇoÊœRqÓšqñP“LŽx¯œÒ´%žSå3(ä |ä`ë‘Ûš–¼]šüP¹‘ÒÑ\Ÿü%·rX½ìr µK‰·ÊUŽ]Ôª‚½s~luç·¦ß\Ü\ÝÚÞAWÌ»¼§,¤0Èä€sëSWZ’njÖó_×T5$Í(¢¹FQE09[þF¨?ëÁÿôbRÒjßò5Aÿ^ÿ£–¿EÈ¿Ü)üÿ6qÕøØW/ü„uúþoý•ÔW/ü„uúþoý•ôOâVkþìþ_™duwÃßò-é¿õîŸÊ©¢®ø{þE½7þ½ÓùVøÍ‘Á’|SùTQEyçÐQ@Q@Q@Q@Q@Q@Q@uOùßÿ׬¿ú¯·ÿhÜ_å^ɪÈÿþ½eÿÐ xÝ¿ü{Cþâÿ*ÞSÔËw—È»¦ÈwJÿ¯Øô1^Ã^=¦ÈwJÿ¯Øô1^ÃJ¶æY‡ñW QE‰ÀQE~ {š+/V•§h´Ø\‡› ;)ÁHAçþú#hü}8¨EÎJ+¨Ò»± “ý¾âMM¾ëæ;`xÄ õú±ú`}o¡Ã©>´ÕUEUE ªUÐ p õô”©ªpQGlcʬdhú°Ò-í'Óõ!,A•¶Z3¼OuëW·¡ÿŸ Wÿž©è¾!°×ä½K)6rùRù‰·æç§<ô4šWˆ¬5›ýBÊÐËçiòysïM£9#ƒžyS\FZóncì£Ü»ý½üøj¿øôoCÿ>¯þ=Z*@É¥ÐôªþÍ§ÝØ"¯öô?óáªÿàÑý½üøj¿øõgœÍ)uQý›O»`Š¿ÛÐÿφ«ÿ€OAñ²•ó-5•S|–Œª OnH«5Ÿ­È7þÛÁÿ£’¦Yu5îÄè¤Ê)OSõ¤¯ ç (¢€}áõ­ßÈ¥mÿ]®?ô{ÖûÃë[¾ÿ‘JÛþ»\è÷«†àqw_ñõ{ÿc èøë»=k„ºÿ«ßûSÿGÇ]ßzøî,øé|ÿC¦‡S+Z×F6Èm'¹’á˜"BPchÉ$±±îüN/l§µ—BÔ|¹ãhßl°†8ùýéþ-ÿ–õŸÿ@¬¹UÚXßË© ûwm8àã¿Ò¼:©òFMkóîû¦ °æ“e»v©#i4GrFѳB7# oÞr:¨ž.-ÙYgÓu»öv¶A%;"F*~P ‚ŠA9΀I{q¿¯o¡4å×àÅÈ“Ã÷ó‚|Ó$°1#²ýþì?¯5Åè©ue®x£Ï¼k«„Ž ÌF|¦# 8zVnco§[øSW¶Œ¥þ¡*­Üʼn3 #fmÙ8éwÒ_8PyÑ„¾>j¨%ºŒ{u5»¬X[k^4µÓ5EÅ”vR\I <À™8ëÓÒ²þÌ¢¾Õ÷û?>¿ÓaM««ôêºüŽê?¹‚)t‹ØViR#)ü*(¢¼óèŠ( Š( Š( Š( Š( Š( Š(  º§üïÿëÖ_ý×ÛÿÇ´?î/ò¯dÕ?äÿ^²ÿè¼nßþ=¡ÿq•oG©êe»Ëä]Ó?ä;¥×ì?ú¯a¯Ó?ä;¥×ì?ú¯a¥[s,Ãø«Ð(¢ŠÄà (¢€Ö±4ÂgûUäœO4ì®§¬aÕOÀ ûîÏ#·Yiö Q.÷®#›Ñeƽ·´ûí®¼ã «›©¥&”µ-Ó“ï¯ÔSh¯|ë<óás ¾ñ:PÿoÎÒyÆ_œVG†æžæ_Í¥^Å ÒJ –pŠ2ïÎãÀÈè}ë¸Õ¼ áÝjõ¯/,H¸o¾ðÈc/îqÔÖ…Ž¥iºSé–¶1%œŠVHÏ>fFãÔäW"£;(½‘Ÿ#ÑY¦Ï.‰ªi«A©ióÉ&Ѩ[\›ˆ/~a÷$O]§ð«¾'Ÿˆ>!_é";†ŠÊÜùÅx¶ý@ýæX|ÜžƒÓÒ»{OèSÅ$v’:ÂåáŠiÙ㉉ÎU À5&¹àýÄW1ÜêVŒóÆ»D‘ÈQˆô$u©ú¼ùZþ¿/Ð\ŽÖ8ËÙµx¾ß®¥y×0J‘Ç5½ÂÈvLêNO$zãÔxFNЭ¯¾Õwqq}m’µÄ»€ùrŽÀg€­9¼7¤Ïáÿì#jNÀTlW¡Îr9ÎFIïWí-b±²‚ÒÝJÃk`œ `sZ‹RMôE(YÝ“V~µÿ ßûoþŽJЬýkþA¿öÞý•­O•-™º~ñúÒRŸ¼~´•óQE£ï­nøþE+oúíqÿ£Þ°‡ÞZÝð7üŠVßõÚãÿG½\7‹ºÿ«ßûSÿGÇ]ßzá.¿ãê÷þÆÿÑñ×vz×ÇqgÇKçú4:œ·‹u-³ÿ蛵¿º*ëu=OÖ%¿¶‰dË*HÁÁVwü!~ÿ þF“ÿН–"”i¨Ê÷^^oÍ• W²-®röúM½·Û¶Æì·Ò´³«ò e @ôOJðÅž‘r.!’ögX¼˜¾Ó9D™ÎÔ à~UÚÂáïúÿäi?øª?á ð÷ýÿò4ŸüUt¬Â)5Í-wÑ™[†žæÇ3› ¾£y|Šþuß—æî9_``vàÖ}‡…ltëøî¡kÇò·˜!–bñC»®Å=;×mÿ_‡¿èÿ‘¤ÿâ¨ÿ„/ÃßôÿÈÒñT,Æ*ö”µò^ûÅÁ𭮤—±µáòäib·y‰†'lå•:Éüè–1êbùZócp¶Æb`YV Ó=ë¶ÿ„/ÃßôÿÈÒñTÂáïúÿäi?øª¯í=oÏ.ÛÁÖiÿ!ÌɧE.©¢Ë'ŸO`ñµˆ'#ðŸsáK ­Iï]¯™"Ë-ºND2ºã ÉОå]·ü!~ÿ þF“ÿŠ£þ¿Ð?ÿ#IÿÅTÃ0Œ5Œ¤ºl¿Ìo o™ºÓb»¼²º•_̳v’, ²•9õàÕ O¶Z­ÛÜL÷±™QRxàœÆ“¨è¾•ÚÿÂáïúÿäi?øª?á ð÷ýÿò4ŸüUÌ#œe%o%ë߸<\%£Ì^ép_­²ÌŽÚt¸Œ'dû¿‡µTÕ|9k«Î³Ë-í¼¢3=¬Æ2èNv¶:Šì¿á ð÷ýÿò4ŸüUð…ø{þÿùOþ*”sE¦¥/¹uùâàôp9K½ÖóH]-ât´QUŒà€„úMÕ´85y!–Y.íç‡vÉ­e18 Ôdv8W[ÿ_‡¿èÿ‘¤ÿâ¨ÿ„/ÃßôÿÈÒñT, ÝJ]z.»õê­Èr¶öé°iVvÈË 7–ʹ9?ëW’{“ë^“XøCB·¸Šx¬I‰™°ÀäŽ m×.¼k4Óo}üþlæ­UTjÊÖ9[þF¨?ëÁÿôbRÒjßò5Aÿ^ÿ£–¾ë"ÿp§óüÙæÕøØW/ü„uúþoý•ÔW/ü„uúþoý•ôOâVkþìþ_™duwÃßò-é¿õîŸÊ©¢®ø{þE½7þ½ÓùVøÍ‘Á’|SùTQEyçÐQ@Q@Q@Q@Q@Q@Q@uOùßÿ׬¿ú¯·ÿhÜ_å^ɪÈÿþ½eÿÐ xÝ¿ü{Cþâÿ*ÞSÔËw—È»¦ÈwJÿ¯Øô1^Ã^=¦ÈwJÿ¯Øô1^ÃJ¶æY‡ñW QE‰ÀQEÍ´W–²ÛL3¨Q€ô?Ö¥¢€2,&•¢{k’ ݱÌGFã!dz~¹ªâŒ°¦ªjËö9UN‘ÈõˆŸ½õRsôÜ*âq"ýE{øJþÖž»£®œ¹‘“`úΣcäri±¤¹*„€ŽHoj±ö]wþ~4¿ûó/ÿRxoþEË/÷[ÿCjÔ¯.XºÊMs{Iw1þË®ÿÏÆ—ÿ~eÿâ¨û.»ÿ?_ýù—ÿŠ­Š*~¹_ùƒÚK¹ö]wþ~4¿ûó/ÿGÙußùøÒÿïÌ¿üUlQG×+ÿ0{Iw1þË®ÿÏÆ—ÿ~eÿâª9ôÍ^í)î´á™·— ›°®-ŽÕ¹EY«9 ÚK¸Nh¢Šæ (¢ŠQ÷‡Ö·| ÿ"•·ýv¸ÿÑïXCï­nøþE+oúíqÿ£Þ®ÅÞªLAÙo­™äÀÉ’£1Ç|MwJÊêHe# ƒG­rPou@ êS‚È#ŠšÇR}˜.UßLy2¨.Öÿì°ìônÃÅ|ïeõ10U)jã}<ŸcjSQvgQEgÇ®éF®º™VΣúÓ¿¶´¯ú ÙàB|+¥4ìâþãªåê*öÖ•ÿA;/üOñ£ûkJÿ —þ'øÒösìÂåê*öÖ•ÿA;/üOñ£ûkJÿ —þ'øÑìçÙ…ËÔUí­+þ‚v_øŸãGöÖ•ÿA;/üOñ£Ùϳ —¨ª?ÛZWýì¿ð!?Æí­+þ‚v_øŸãG³Ÿf/QT¶´¯ú ÙàBÛZWýì¿ð!?Æg>Ì.^¢¨ÿmi_ô²ÿÀ„ÿ?¶´¯ú ÙàBÎ}˜\½EQþÚÒ¿è'eÿ þ4mi_ô²ÿÀ„ÿ=œû0¹zŠ£ýµ¥ÐNËÿüj•׉m•š9¡p:ˆHòÓýé>èú ŸjÖŽµirS‹lNIjÊz› ª~Sí´÷­š¡©Û»ÇݺæêÔ—Œ}‰Ôtô Õц­ìª'иK•‘xoþEË/÷[ÿCjÔ¬ ȳx_O• (ñ–\ŒpYˆ­zÆ%…QR ¢Š(¢Š(¢Š(¢Š(GÞZÝð7üŠVßõÚãÿG½a¼>µ»àoù­¿ëµÇþz¸n1oÿÚÇý„çþb¬ôªÖÿñý¬ØNæ*ÍL·,í%ròZ[»·%ž%$ýIßìûùñµÿ¿ þbŠ.À¯ýŸcÿ>6¿÷áÂìûùñµÿ¿ þbŠ.À¯ýŸcÿ>6¿÷áÂìûùñµÿ¿ þbŠ.À¯ýŸcÿ>6¿÷áÂìûùñµÿ¿ þbŠ.À¯ýŸcÿ>6¿÷áÂìûùñµÿ¿ þbŠ.À¯ýŸcÿ>6¿÷áÂìûùñµÿ¿ þbŠ.À¯ýŸcÿ>6¿÷áÂìûùñµÿ¿ þbŠ.À¯ýŸcÿ>6¿÷áÂìûùñµÿ¿ þbŠ.À¯ýŸcÿ>6¿÷á§DHÐ$h¨‹ÑTÐ Z)\Š( ¹xä#«ÿ×óè´®¢¹xä#«ÿ×óè´®œ'ñ;5ÿv/̲:Š»áïùôßú÷OåT‡QW|=ÿ"Þ›ÿ^éü«|fÈàÉ>)ü*(¢¼óèŠ( Š( Š( Š( Š( Š( Š(  º§üïÿëÖ_ý×ÛÿÇ´?î/ò¯dÕ?äÿ^²ÿè¼nßþ=¡ÿq•oG©êe»Ëä]Ó?ä;¥×ì?ú¯a¯Ó?ä;¥×ì?ú¯a¥[s,Ãø«Ð(¢ŠÄà (¢€ (¢€ (¢€zKEQEQEQEQEQE£ï­nøþE+oúíqÿ£Þ°‡ÞZÝð7üŠVßõÚãÿG½\7˜·ÿícþÂsÿ1Vjµ¿üköŸùгS-À(¢Š@QEQEQEQEQEQEQEQEQEËÃÿ!_þ¿›ÿE¥uËÃÿ!_þ¿›ÿE¥tá?ˆyÙ¯û³ù~e‘ÔUßÈ·¦ÿ׺*¤:Š»áïùôßú÷Oå[ã6GIñOäiQEçŸ@QEQEQEQEQEQEQEUÕ?äÿ^²ÿè¼nßþ=¡ÿq•{&©ÿ {ÿúõ—ÿ@5ãvÿñíû‹ü«z=OS-Þ_"î™ÿ!Ý+þ¿aÿÐÅ{ xö™ÿ!Ý+þ¿aÿÐÅ{ *Û™fÅ^EV'QEQEQEQEQEQEQEQEQE£ï­nøþE+oúíqÿ£Þ°‡ÞZÝð7üŠVßõÚãÿG½\7˜·ÿícþÂsÿ1Vjµ¿üköŸùгS-À(¢Š@QEQEQEQEQEQEQEQEQEËÃÿ!_þ¿›ÿE¥uËÃÿ!_þ¿›ÿE¥tá?ˆyÙ¯û³ù~e‘ÔUßÈ·¦ÿ׺*¤:Š»áïùôßú÷Oå[ã6GIñOäiQEçŸ@QEQEQEQEQEQEQEUÕ?äÿ^²ÿè¼nßþ=¡ÿq•{&©ÿ {ÿúõ—ÿ@5ãvÿñíû‹ü«z=OS-Þ_"î™ÿ!Ý+þ¿aÿÐÅ{ xö™ÿ!Ý+þ¿aÿÐÅ{ *Û™fÅ^EV'QEQEQEQEQEQEQEQEQE£ï­nøþE+oúíqÿ£Þ°‡ÞZÝð7üŠVßõÚãÿG½\7˜·ÿícþÂsÿ1Vjµ¿üköŸùгS-À(¢Š@QEQEQEQEQEQEQEQEQEËÃÿ!_þ¿›ÿE¥uËÃÿ!_þ¿›ÿE¥tá?ˆyÙ¯û³ù~e‘ÔUßÈ·¦ÿ׺*¤:Š»áïùôßú÷Oå[ã6GIñOäiQEçŸ@QEQEQEQEQEQEQEUÕ?äÿ^²ÿè¼nßþ=¡ÿq•{&©ÿ {ÿúõ—ÿ@5ãvÿñíû‹ü«z=OS-Þ_"î™ÿ!Ý+þ¿aÿÐÅ{ xö™ÿ!Ý+þ¿aÿÐÅ{ *Û™fÅ^EV'QEQEQEQEQEQEQEQEQE£ï­nøþE+oúíqÿ£Þ°‡ÞZÝð7üŠVßõÚãÿG½\7˜·ÿícþÂsÿ1Vi“Ûµ‡ˆ5[GÏï&ûdL$?“?/QO©–àQE (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ ã›Q²´Õµhîná†Cz[lŽÁDæ»3ZR©ìåÌa‰Ã¬E7M»ˆÖô¬ø˜ÚÿßÑ[ž9ðÖ˜}mþ•¥“E]jî¢JÆ< pÍ´ïp¢Š+¸(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š«©ó¤_×ìÒÿè¼V ¨¼@Ê „\½җ'Ö®å:pø‡FöW¹ã:DñI¯éJ޾Ûýá^ËK“ëIDçÌɯYÖ—3V (¢ À(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢ŠQ÷‡Ö·| ÿ"•·ýv¸ÿÑï\ôÓ%´O+mŽ5.LJó®¯ÂÖRiþ°‚d)9Ì™IÎÙ—aôÜÆ®M¬hðêöÊŽÆ)ã; GÍPzЊãn¡ÕtÖÙ}¦Ï -¤ÈÊÿƒ•#õþ´QZ8¦2¿Ûfÿ ]÷çÿ£í³Ð.ûó‡ÿŽQEO"ûlßô ¾üáÿã”}¶oúß~pÿñÊ(£‘}¶oúß~pÿñÊ>Û7ýï¿8øåQÈ€>Û7ýï¿8øåm›þwßœ?ürŠ(ä@m›þwßœ?ür¶Íÿ@»ïÎþ9Er ¶Íÿ@»ïÎþ9GÛfÿ ]÷çÿ¢Š9Ûfÿ ]÷çÿ£í³Ð.ûó‡ÿŽQEˆí³Ð.ûó‡ÿŽQöÙ¿è}ùÃÿÇ(¢ŽDöÙ¿è}ùÃÿÇ(ûlßô ¾üáÿã”QG"ûlßô ¾üáÿã”}¶oúß~pÿñÊ(£‘}¶oúß~pÿñÊ>Û7ýï¿8øåQÈ€>Û7ýï¿8øåm›þwßœ?ürŠ(ä@m›þwßœ?ür¶Íÿ@»ïÎþ9Er ¶Íÿ@»ïÎþ9GÛfÿ ]÷çÿ¢Š9Ûfÿ ]÷çÿ£í³Ð.ûó‡ÿŽQEˆí³Ð.ûó‡ÿŽQöÙ¿è}ùÃÿÇ(¢ŽDöÙ¿è}ùÃÿÇ(ûlßô ¾üáÿã”QG"ûlßô ¾üáÿã”}¶oúß~pÿñÊ(£‘}¶oúß~pÿñÊ>Û7ýï¿8øåQÈ€>Û7ýï¿8øåm›þwßœ?ürŠ(ä@m›þwßœ?ür¶Íÿ@»ïÎþ9Er ¶Íÿ@»ïÎþ9GÛfÿ ]÷çÿ¢Š9Ûfÿ ]÷çÿ£í³Ð.ûó‡ÿŽQEˆí³Ð.ûó‡ÿŽQöÙ¿è}ùÃÿÇ(¢ŽDöÙ¿è}ùÃÿÇ(ûlßô ¾üáÿã”QG"ûlßô ¾üáÿã”}¶oúß~pÿñÊ(£‘}¶oúß~pÿñÊ>Û7ýï¿8øåQÈ€>Û7ýï¿8øåm›þwßœ?ürŠ(ä@m›þwßœ?ür¶Íÿ@»ïÎþ9Er ¶Íÿ@»ïÎþ9GÛfÿ ]÷çÿ¢Š9Ûfÿ ]÷çÿ£í³Ð.ûó‡ÿŽQEˆí³Ð.ûó‡ÿŽS’êæWXâÒ¯F;T3Â'¦O˜qEr 7´Ÿ ÞKwî¬!ao2+HÎÿ› íБ“€ÁÉÀÇYEIXÿÙaxiom-1.2.8/src/site/resources/images/icon_arrowusergroups2_sml.gif0000644000000000000000000000206411131637462024302 0ustar rootrootGIF89a÷ÿÿÿõ÷ôJ»SÄ SÃAb.i‰VmŒ[™®ŒDCˆY±^·#T£"[–5bŽFI®K¥ /a P¤RŸª²¤¡š@;€%P<} f|T:{:u!=¤¨›†‰|±²­ª­œþþü××Öýùºþö°þö±VNþò¤þò¥þò¦þò§þò¨ÿì•ùè”þîœðá•þïžÕÉŒÿç‡ÿèŠÿéÿì—ÿò¼ÿò¾ÿôÆüöÛÿùßäÌwÞÆtîÖ}êÒ{éÑzíÖ~äÝÃÓ̴иkÁªc͵j˳iÕ½oÓ¼nηp­œhǵxæÕœ¹®‹§‡'³—D¼¤\À¨b«i¿©gº¤fº®Œ¸±ž­•W§T ŒY›ršw“|I˜L•M“}L–€P•…`¡hŒuHˆrFŠtH†rJ…ya‘Š|jZAzTl_KoHwS(QF9Ÿ]ˆOVK?U*êwçvãsÞrÛpßvãzàyÔs¬_ßyÜzêƒâ"ãƒ$`8æˆ*±r4°x>ze¾²¦÷õóálÖl ÏiÚwÛvÙ|'²¡‘¨“ëáØP%ÁZËaÈd}m_š’‹¿W¸R´O¿]‹IJ®KM% ªF¥D Cž<0=ƒ%;7 3 2åããVUU’‘‘ÓÓÓ«««lllÿÿÿ!ùµ,ÿk H° Áƒ",c…É"a)<ØE† 3ªD|5‘3OjbãÆ S ÂrÅaœ,VˆÑÁE‰-\HQ)KVKƒj€ÔPA#Gš#F|Àˆ…§¬Y? ºYäE“^¶PAò#LħO£ \ó%‰0=H9M‘¯³h‰˜ ±4%Ê4I"I*ãέ…À„ ÀñÃçÐ"J‚µ!KîÁ <p!…C„öôôÒʃk)Ѐ„ rî Ê£§‘#Lž L]kA 0høƒ'P¤K–8…"%jâ@2tðða£K›:2u*•*çKˆ1"Ou**…j«V;axiom-1.2.8/src/site/resources/images/icon_sortdown.gif0000644000000000000000000000016511131637462021733 0ustar rootrootGIF89a³ÿÿÿj´?S‡-˜ðZ}­ZÜ÷ÈJt)ÿÿÿ!ù,"ÉI«½8ë½…ÿàQ†AE1ˆÖq¦k檬\ÔÎí|ŸE;axiom-1.2.8/src/site/resources/images/se_maj_rond.gif0000644000000000000000000000006211131637462021320 0ustar rootrootGIF89a€ÿÿÿÿÿÿ!ù, Œ ‡ yšœ;axiom-1.2.8/src/site/resources/images/none.png0000644000000000000000000000166211131637462020025 0ustar rootroot‰PNG  IHDRóŒ§ágAMA±Ž|ûQ“ cHRMz%€ƒùÿ€éu0ê`:˜o’_ÅFPLTEÿÿÿÿÿÿße¯ tRNSÿå·0J pHYs  šœIDATc`„i”2ag~IEND®B`‚axiom-1.2.8/src/site/resources/images/nw_maj.gif0000644000000000000000000000006111131637462020312 0ustar rootrootGIF89a€ÿÿÿÿÿÿ!ù,„‘ áíB;axiom-1.2.8/src/site/resources/images/OM005.gif0000644000000000000000000000062711131637462017607 0ustar rootrootGIF89a#9w1!þSoftware: Microsoft Office!ù,#9‚ÛÛÛ×××ÿÿÿÿÜ¡0B×d¤Ôbgç»ÜzÂt[yªZ±¥(~B-¬ ÙjíÍØ?NØjA_;ŸPd8 “Ñôlt“$Vô´>uMóx-%Z®^6|«˜; ›—©æÇ)Gn~wv„#ƒv^wytHxX&rQ1FrWc˜™šlŸXžk£6¥¦Ÿgª•}Kªl¨²‰_…m¶³e›±»oAtÀU;Ä,zÇÈ/ÎÎÄ[ÏÉTÕÓÙÖiÛ‘ÃUÎ æçÜLÏåêïè ÐÝíÛçóòðõ0Ô øí›÷ Ó €àPKCÜ4 6œè®E:Ȉ±>¡E‡/º˜HÏaÆ…#=–,yr@G•![¾„É’ã¿“5Eº¸—1gÄ4 ?êtôä®–6"EIl©?e †JH;axiom-1.2.8/src/site/resources/images/help_logo.gif0000644000000000000000000000410111131637462021006 0ustar rootrootGIF89a”4÷ÿÿÿîîî111üüïþþôþþûÿÿþýûÀúùÞýùºýú¼ÿþîüö´ýø·ýø¸ü÷¸ýø½üøÁüúâûùáúùêýõ®ûô¯ýö±üõ±ûô°þúÓþüêþýóûñ¨ýó«üó­ýøÖüùâÿüæþûåÿþöüí›ûíüð¢øë¡úî¤þõ¾ýöÍüùçùç“ñàùé–ûë™øè˜úëšmb6»©aüä…³¢_ûä‡üæ‰òÜ…øã‰öá‰õáŒ÷äûè“ùæ‘ñßüè–! 1*KB!_T,^S,ZP*OF%SJ'dY0nb5l`4h]3ˆyCi]4‹|E•…K~GˆzDwk<©˜V‰{F–†Mɵh¹¥`¨–WëÓ{äÌwâÊvàÈußÇtÜÅsØÂqϹlÁ­e¼¨b§•W£’UõÝóÛ€ï×~îÖ}ìÔ|èÐzçÐyçÏyåÎxåÍxʵjµ¢_³¡^¯\«™Zª™Y¨–Xúâ„ùá„øàƒöÞ‚ðØéÒ{Ô¿pÓ¾pðÙ'! ;3SI'иkÌ´iʳhȰgÁªc–„MÚÂqÖ¾oÓ»mѹlÏ·k͵j¬™YÙÁq׿pÕ½oÓ¼nưg¥“V¡T+$‹yFÁ©b´œ[²šZÀ¨b¾¦a¼¤`»£_º¢_¹¡^· ]·Ÿ]‘J}I{HÆ®fÅ­eëd”‚L’€K ˆO­•W«“V©’U©‘U§T¥S£‹R¢ŠQ°˜Y®–X’zG—J“{HxFž†Nœ„M˜K”|I›ƒM™L—€KuD‹sC‰qB…n@xF†oAg<}f;{d:ƒk>|e;x`8t]6r[5{c:w_8nV2qY4áááÕÕÕÈÈȼ¼¼¯¯¯¢¢¢–––‰‰‰}}}pppcccWWWJJJ>>>ÿÿÿ!ùæ,”4ÿÍ H° Áƒ*\Ȱ¡Ã‡#JœH±¢Å‹3jÜȱ£Ç CŠI²¤É“(Sª\ɲ¥Ë—0cÊœI³¦Í›8sêÜɳ§ÏŸ@ƒ Jt¤Ka’6¢TÉ‘¥K IB”H‘¨HEwZ ¢`Áƒ(°ˆ 44€æTVœ—bHH@ B‡ xE´A‚=|ø AÃF×Ûš_^(¨`€Ã mäÉ£gàÀƒÓ¤¹´êðLH(Ø€"äÉ•-cF£¹O5µ<ˬô¡@ §óÔ0BDÐ#VX·V£faÙ0-Y!j&‚¢KÔ$Íëâl¸ÈBó'POÿ™Nž öì~bswyˆ©{G‡rÅôMkзysˤ¶mÙ\”7ô_€.IâÁ 1X–…tJÜpÓáÇ~qx‹Iâ àEÝ âuø¡K‰xà‰ N\A ãEGÈmÀÑÅa£‰Ùe#¢7Ûl£ 9â`c‘,)r «¹1!r<1ÝvdF”ó£‡A’9¤™q39…sä“h²ÄŠ >d–†rI!Ó%qG_RâÈ#ÂŒy¢APZ‘7ˆ3šå˜¨J‹ÈÀƒp×­!…tƒT‡d0u‰TÊ(zФe*£Ž”“pªÿºR()ôàqù±„tXl‘‰•XòH$Tc*¢q»j£©¾4ŠdŠ^Ñ’‰˜ zU«°‚Œ²A‰7áˆ7ášIà«Ý”{.BvHκžå6߈#Ž7ºê¾ßô{Ñ)Òrqáp”aÆšŒ•$‰t»H'É€;‘Ý”3¢ˆM $ä‘äl<À8°$²ˆIŠè±™Øt¸q9Ý ¢È1cäI®cèÅt“<2•"¬´ÒI(£<3æÉ"Ÿ¨¦‡NjÓa8+Ÿ8b9ß$ùÆã”$8#'‰Í6*Ç*Ð8]›3®ÆÚ¤q8Ûp㦬éÂFvmä¸cÓm±ÐD—ÿr 3G#=â‰!£;6!§ýñå¤=6×\«M¢Ø!fM£P[NÐ6Érp]|ÙH%Ó1ÒíУøíÉ'ÒŒ N’´ÓNö‡Ú¬iÐ7d.þÍîÌD¹@ž‹í¦äa£²‘Lw„Ë]xaz%PM÷Ê" ˆâz.ºè²ŒÅQ›Ãh9ú–/NÈŽ.zA`—sÐðæ$Öæë‹2œ¬Q.LÕ!SqÅ+P‘ Qâ¯ÓE,dá‹R€OlŒ³Ô§µ°M.xñ $x?ñ‘mDȳ2NbU…T'L@îÉ‚ˆÆBP%65µªYæQÍ‘¹÷aP~d"Ûúÿ’n­%»È.@Do­k¡gQ fTƒ!4ófŽ~-î†8|xC ~ˆkc,×ÁŒüâÀ1‚Á ^4ƒ…Ÿàž3Œq d˜âLp Ÿ9¸F²Ç•#‹#¬°Áµ¬Q|?Ô ™˜‡h?Â+’—ÒÌ2é f$ß¡FhÐB ”)ÅH‰h^a”Ú¶á cŽÌpd¬œ$5ùA…Ãqâs&Õ’(’k؆Û!I’8)È#ÙHBþƒÍ“Xƒ¶p†LÚ¸†øbÐXDLèYO†ô‚û\f?…ÂÏò¤ Õ‰¾Ú™Ð†:ô¡ ;axiom-1.2.8/src/site/resources/images/icon_error_lrg.gif0000644000000000000000000000277311131637462022060 0ustar rootrootGIF89a ÷ÿÿÿþþþŠŸ¿Ž ‘ † i c _¨FGŸBC£fg§ w t [ ž¼¹³­¤ ¡ Ÿ – “ Š ‰ ‡ ~ | z r p n f ¶µ¯©§ š  Ž … ‚  y w j  t s g ÆÈ·É!{lZ$&FHÄil®fh¬jm“dfÙ¨ªÄ#¹"¢!Ê)¾!,¼U[áÐÑÌ".Æ$1Ë&2Í,;¹)6ºW`“)Ì1BJL¥-;v!*Û¯´ëáâÏ6H".Ë8KPÑ:Nh']"†-9ä±·¿8KÐAWÆ>RÓCYÍBXDš=L•S]ãÕ×àÓÕÓG^¼@UÓJbF!H"M%ܶ½ÖOiT*ÖPjÖQlÑPj½IaH%£Zh]#0’9L= ×UqÑToÆOi¢[jØXv×YxØZyJ*ÊXvÚ`Ö^~e-<˜E\å¼Ç^*9Ûe‡Öc„ÛhŠÇw޾s‰{:NÛiÐ~—Þo•ŸQl…Ia‹Sn’[z±o•µvž™eˆ·{¤º€ªbƒ¢s™™m’¨}¦«„ªýýþøùûœ«Æ­ÇÑÙæÐØåÙàëîñö[wŸXsšTn“Lc…G\|CWuWq—RjŽPh‹Ne‡Ka‚I_H]}DXvb©_z£[uœ5D[gƒ«q‹±{“¶~•¸—¹„š»ƒ™º…›¼†œ¼‰ž¾ˆ½‹ ¿¡À’¦Ã˜«Æ¯É¡²Ë¨¸Ï§·Î¬»Ñ±¿Ô³ÁÕµÂÖ·Ä׏Ũ½ÉÛ¿ËܾÊÛÃÎÞÂÍÝÄÏßÉÓâÈÒáÇÑàÆÐßËÔâÍÖäÌÕãÓÛçôöù*7I–ªÅš­ÇŸ±Ê¤µÍ¯¾ÓºÇÙ¹ÆØßåíãèïÛâëçìòêîóñô÷öøúûüýúûü‘3.¢@?›=<ÝÐÐÛÐÐÿÿÿ!ùÿ, ÿÿ H° Áƒ«±ZÅʸ‡†÷-›4„»Ø@€ÇÏÓvêF‚ï@ªüXï3’§.žüWÍc7e8q‚¤wMÌSìfN[IÜ0˜øòÉDÍ#¥>„¢J•ʆ—¶«ïà ;ÙTÀ”`Êå,]º[Ī àê‘ɾ·pãòÓGW3ok1v½4©¯_¿¦—*5j©O¢´1% ²\(L˜,ARd(7™²ìÊm€çÏŒ=Ž<ùP Ÿæ½7ª7}UúÃCKÍ, ™}•KGò‹Û_·úê:Hÿ…øÊ-Érü¤µŽHÇû™`Gø0æ~í“þsíé/ é”}{éîk1[š)$Ökºvý75ž¡ØÛ?–·ëÆúÅ”Êëê™Ý%¯÷äæoqÛMUÕ”ì\†º×nÙµùÓ±ˆK „äqƒþPÂSÇïû|Y#ÿ…µ3áë†pÉá BRÿ™)Çþsè .4}VúÎí›~·Ú}Aº¸¡¾à?9Ÿ¬û¹QV¾²:÷c7ë…‡!ÜêE-Þ=Õý§~Õkî¼·þ-Åÿ…ó?ú¥¯Ätþh’ãÝõOëSD»ëmÍ'®Ÿ÷!?üÑúÙÿÏ]ÿû?÷¡/ºòßø·þÌÿê•qÝ?ƒÒÙÔú}Y܆2ñ[Œvíçþ1Š-êý-ÅàeÓ5îÞÒö‚Ý¡Ï~æ“íýo³þ/ô‹›wÕ­$†;ë]¤ý ÓŒÒ}¤{µÈüÇmC?W>°ý¤b®í;wŠ ú›ÒûFýˆ}×þ,Åþ'3ÿªÄtÿÍzcÖú8ÿµ´&,i€dµÎƒíg·é¢³¨à>ÖÒÌŠÝk€-`p$‡Q†?–Ïs.>¨ýhfÚÛõªÆ˜ö´b°{[_è·r·Ó~¬õì^£•×ߟMsþÌêÀâXúg¬ý»=_ÜB\¾G5ŠDDDy‹—õ}X"«?ºÿÐõT—Ê©$§èz]p4õaËÝž@#%Ì»k±ý×éæ~·özr}J¬| ?IöfzÑÕêEYþ°×U{²=]ðÍÕ6¼ŸD ÚÊnci¶Ì‡ûÿGnOèªþuxI)úC§tj¨êeWžûê¶§ ñÃÝ ®Çî«ÒÙnßB¦·f?è÷³ô¾•ßà•L®‹Òe•·¨²§°:šs«²Á–÷ŸÙy.}®»/ ÿ¶ýŸÕß‘“u¶z¶Ùm+礒Sïú¹Ó[~!««2EÏ8ÎÜòÆíf+†C[öª1Ý_¡uuúgô=l[•œî‰FVVuµõFc¶Ç~±[4‚ÑŒû™¶öû}&Qêú,ÃɳÌ´d[WÓùé$”ý_ÕúšòÆuK7Ùëòlu¯³ÔÃsÞë¶ÌJ‘S6þ›ÔªÛ¢Ô«³êÝ~”?«ïkqì¤ÃžÖÃædÞý™[œ÷Øÿò¦ë?O”Êìýókçô’Sô}' ÆâQ™œ]h¦ª¨{Ú­¦ë[c?MWÚwÕêýÕYú*ÿJ›¨tž—~NMÙ9a—\æµ6ŠÞ){ú!kë¬ÃõýÿÎý|â’J}ÿ#êñ¶Ë€êf1.õ×¹°ýõº¶dVÛIvË?O{21?›éÞž?úK½?¥cbuvØüödå4äì®Ír n8÷[ê?Ö÷»£­í¢¿ÔþËVÏæ­_9¤’ŸÿÙ8BIM!Version compatibility infoUAdobe PhotoshopAdobe Photoshop 6.08BIM JPEG QualityÿîAdobed€ÿÛ„            ÿÀZ¯"ÿÝÿÄ?   3!1AQa"q2‘¡±B#$RÁb34r‚ÑC%’Sðáñcs5¢²ƒ&D“TdE£t6ÒUâeò³„ÃÓuãóF'”¤…´•ÄÔäô¥µÅÕåõVfv†–¦¶ÆÖæö7GWgw‡—§·Ç×ç÷5!1AQaq"2‘¡±B#ÁRÑð3$bár‚’CScs4ñ%¢²ƒ&5ÂÒD“T£dEU6teâò³„ÃÓuãóF”¤…´•ÄÔäô¥µÅÕåõVfv†–¦¶ÆÖæö'7GWgw‡—§·ÇÿÚ ?õT”-Ýé»i-0aÂ$yÛš¹{þ¼UÒ²†/]¡ÔÔHkséÔϦ«Ýv?þ ÿ’ž­%_ ? ¨c·'úòhVàáãù¿œ³º¿Xvï©ÐÚý æ8&ÍÞæ;÷?Gûé)ÙIbÕõ“¾–þ£–í•WËcÝ3³ÓÚÂoYgüft0â>P&[\é’:nÍ‹–͘^8´zä–'×O«yEnck{Äí´:°©Ñp›“²–úaƒef5?KÛüä¬ÿ²u*6†–ä27»Cßò3óÔøø jQâñ¨ÿŠé`—3ËÂ'‚^Ùõ í'I¶‰&uЯA¼—°Ë[éÇÃþ§ýkÆûq­Ãí,}N$¸—Ikõ‡ýõŒ¦9®x°=Ñ ™v¼½Íþª–Ç?–Cû¿)û¸¾-§«Õ-o‹þ~ïï½_Oúåõƒ èå:æ’ eÿ¥´Þÿs°õÕ⌬5£3ƼÀ.ª5pk¶=yˆ¼±±:¥QfÖÉ™îûÔÁ’]]icäyš2€Œ«ŠR‡ ÿ‡Ãó,o´ã}gèyc–ÆXþaØgOiÝí÷nöþúÓ#P¼&«C½Ñ>Qøûžÿõÿ„Z¸ŸYúÕVúƒ>öVFžàù÷Y`uÛôÓ8¤>aö52|pä½8ˆÉø|±$¼ÕŸã#¬4éRð¡x;Œ~sf¶ûû•­¿Æ[\aø@™Ô‹ßüýÉ{‘ëcèÖŸÂ9È‹àÕ”^å%ÌaŒ‰‘¥ûñŸ'B Ä~þêÛô\·±ºŽTý›"»Ky p$wNc»S//›ó˜å1§øÍ”’I%$’I)I$’JRI$’”’I$¥$’I)I$’JRI$’”’I$¥$’I)I$’JRI,O¬ Ë·¨tz±oû3ß‘hu»CÈhǼ»kú=ÿñ‰)ÛIpS7¬äaæZsoÆéYôؽؙ/ÃõÛý ·WM~êÿšÿµ.ê½^œž ÿ·Öæt¼œ\q‹é·uâê°ì°½Óê1÷Y“wÙ=ðŸé’SÕ¤°ú½þžnÚMXÇ#©e< ±N8"šÝ¹nUñ¿eþºÃ¯­õ~N5 ì5u<ÂKqnõrz«7~sñòXöoÿ^E))î\nwÖ´ÜL|úíôñ_M¹¶zLªËk¤Ù» Ìœ[ì¦Û0þÉ·Ö~/ë>²ÚëýC&Šñ*Á}‚ü»ki­µÌkkýµ¾œZüÞë2_ôS°’ãzw\êýM´Öz…X$Q•kìs*yqÆÊ· –;kßéúUµù_g~Ïô¡Ùõ««ZÜ|ê÷×Vü*ï£Ó©´µù-Ʋü{íɹ™¶dmÊýتý³Õÿ ’žÙ%ÅõN£Ôoè9yvgÔS2꯰ÇÒ_é²»}oV–Súß«ÿ€£õ.¯×:e÷ôÿ\æÚó„j½µÔdzíOͪÖ1—[Šïèq¾ÑwÓ¿ôž¿øD§­Iat¾©Ô¿cõ ŒÚ‹²z{­kãO¨ñ]l½‚ö`]•UûßéleŸðž•~¢ÍÈë=kšÚÌê³-ÍÆ¯%–ŠšK‘‡‹ mný&=ìͳÑõ?Kú³ÿL’ž½%Éçõ.³ŠÜçþÑcf]ŽmUÍâáM®¹ûvmsþÒülCc=L[?]bJÿÑõUG­õŒn‰Òîêym{èÇÛ½µ^w½”·h{«oÒ³÷Õå…õÛ¦æõ_«¸úÙWz^{šÙÛmV¿ßk˜Ï Ç~r›–Ž9gŧ‡²B9 <5ŽRõž/Ñô ÝìàÙþ6þ­=…¿fÍ×ùïJųëÏÕ[/õ_šu˜ÙWþô,?ümþºåwþ Gþ—Kÿ®Ÿù]ÿƒQÿ¥×Mþøþ(‡þÔA‡/oÁlΫÒz‡PµØo²†XMƒíA­Ô™{™eMeO g°ÆØ±'V¹¿ÉrNÿŸ\Èÿ“¿ðj?ôº_T¿ÆšF#Ý[zOº§0}»[òÝôV??ðÎ_øùNk£¿·,°'ün'k”øÜãŒbæqû‘„LzgÃëþ¤h¾§€ñîãr«oLĵîŠÃ,,Ó@75mÙÖË‹ºŽ©|Aunal6›ÝîÝüµ ŒoKcØàZí7w¼Ç³ó}¥P—0céÉËMÁãÿÔ1r\ÏÉ’§+ý\ÅKèóǧåW›ÝCZñ"þsû‰Õ(pkØÛ@‡<òæý/ä»ýèrprqEVX!¶6j:Ao.Ûÿn!ße-e–01–·séNí>ŸÒüÔØóXQ1n^½¨¦_ ^,»“ÃGÓ1ßËü£‡ûQÍ Ôú½Óºýc·þ¥½Sï`€9všëùÏ…xÔÀcA¶Ž?ÕÈ/ÀDzÂ][\O2ðN÷ u$ÛˆÞ«î¼ô/‡ •ë+ðñÿüE«Ëeƒ{^ žÄvÿÌ1Herv°r||‡úÿé4ѰåÄ×ÈÒ ûôC³¤ìpm6XÆiìk´Ÿ"ˆöìé{‰-”ùøðñCAÒ.“m?F ñçð~{¿×þ6õ<«HÇ¡ÄV9'ã·üVc±²*iä?i'éAçÚ~ÿ9Nšs+is.k÷s¹‘ýWµ(á„Aœ¡ÄOówÃÀ%âº|îiÖ3ŽqŒ}YxxgÇ´?Õ½Ön¥ÓØÚq2nõÕÅî{F›C+Çqu_øþ£éú×~¥[‹º½ì¶ˆ[êNº7ÒØßüø¼Þƒ[‹‹*xtD7c‡þwúý1™”\\úƒš;1ÒÍpb‹&è$WÍ)~÷nÑ@ÉÊ儆\FÈ}<8ø¥~÷»óˆúàÿÝ!Ö:ºñr¬-$nh¤œßW&·mQ¿üdtìj½kúgRª©î¦°$ÿèBó¾™sòynÝΚÝa~ŽýÿæµtøýgƒP~>Mvd­ÖÓq¤67ì6T,·3Úßßô_üçè”gœ¤#“–j¬FY1䮿¥?ú o—å¢GÝòNV?HzAÿ #þ7¾­ƒ8Ø×Wþô¦ÿÇê×ýÆÍÿ¶êÿÞ•‡Ôhú«ÔqK¯{1ï³{ªpÛU…ú»uîw£ŒÖ~ýæ_úUÎ?êoR» WÒÝ^un±Á쨙¾†Cë[Éð>kÓ”då2þîyðã—û<ß'øÜ~HfŽ¢¤?ª÷ÿøïýZÿ¸Ù¿öÝ_ûÒ—þ;ÿV¿î6oý·Wþô®ÿ®‡þó¿ðz?ôºümþºåwþ Gþ—ZŸèßÿâˆíD?òöüãÿÿ«_÷7þÛ«ÿzRÿÇê×ýÆÍÿ¶êÿÞ•ÃÿãoõÓÿ+¿ðj?ôº_øÛýtÿÊïüý.—ú7àø¢ûQûåqåíø=Çþ;ÿV¿î6oý·Wþô¥ÿŽÿÕ¯û›ÿmÕÿ½+‡ÿÆßë§þWàÔét¿ñ·úéÿ•ßø5ú]/ôoÀÿñD?ö¢÷ÊãËÛð{üwþ­Ülßûn¯ýéKÿÿ«_÷7þÛ«ÿzWÿ¿×Oü®ÿÁ¨ÿÒéãoõÓÿ+¿ðj?ôº_èßÿâˆíD?ï•Ç—·à÷øïýZÿ¸Ù¿öÝ_ûÒ—þ;ÿV¿î6oý·Wþô®ÿ®Ÿù]ÿƒQÿ¥ÒÿÆßë§þWàÔét¿Ñ¿ÿÅÿÚˆß+/oÁî?ñßúµÿq³íº¿÷¥/üwþ­Ülßûn¯ýé\?þ6ÿ]?ò»ÿ£ÿK¥ÿ¿×Oü®ÿÁ¨ÿÒé£~ÿŠ!ÿµÿ¾W^߃Üã¿õkþãfÿÛuïJ_øïýZÿ¸Ù¿öÝ_ûÒ¸ümþºåwþ Gþ—Kÿ®Ÿù]ÿƒQÿ¥ÒÿFüÿCÿj!ÿ|®<½¿¸ÿÇê×ýÆÍÿ¶êÿÞ”¿ñßúµÿq³íº¿÷¥pÿøÛýtÿÊïüý.—þ6ÿ]?ò»ÿ£ÿK¥þøþ(‡þÔCþù\y{~qÿŽÿÕ¯û›ÿmÕÿ½*/ÿ?U^öXü<·>¢Mn5RKIŽ,wÚ=›˜í‹‰ÿÆßë§þWàÔét¿ñ·úéÿ•ßø5ú]/ôoÀÿñD?ö¢÷ÊãËÛðz÷ÿŒ¿©-/éw¸°ÚXN>9ƒ~ã—·ôþßµoÚ?Ó„Upþ½ýCÄË·.¾™yµö6Êö|ph §SŒá~êªÙˆ×{5ÿ¿×Oü®ÿÁ¨ÿÒéãoõÓÿ+¿ðj?ôº_èßÿâˆíD?ï•Ç—·àöüfýJ-±§¦^[s^ËA¢ˆ{ls®¹–~ŸÞÛ­²ËmÝüå–)Ûþ4þ§Þòûº~M¯5º’çÓC§dz´Ë²?š·c}Jþƒ×ÿ¿×Oü®ÿÁ¨ÿÒéãoõÓÿ+¿ðj?ôº_èßÿâˆíD?ï•Ç—·àõùã/ê>W£öž—}ÿf3êcã¿Ó"?™ßyô¾æ&Éÿ_QòëuY]*ëë{ýW²Ü|wµÖFÏUÍ}îÝnÆíõ#ÿ¿×Oü®ÿÁ¨ÿÒéãoõÓÿ+¿ðj?ôº_èßÿâˆíD?ï•Ç—·àôúõõ ̦_gK¹õVÂÚñÝŽkkËÍæö4ßµ¶ïwÒV.ÿßPïÉû]ý"Ûr`7×~6;¬†ýú®¿µrøÛýtÿÊïüý.—þ6ÿ]?ò»ÿ£ÿK¥þøþ(‡þÔCþù\y{~ZÆGÔW]nCºMÆì†í¾Ó¾Æþí¯õ÷Xßë¢Ýþ4~§d Eý;&Ñ{]ÁôÐíìas«ªÝÙ¤­Ž¶Ç1ÿHõÆÿãoõÓÿ+¿ðj?ôº_øÛýtÿÊïüý.—ú7àø¢ûQûåqåíø=ã?êf3*¯¦äRÊ'ÑmtPÐÍßOÒk/žÿÎØ‡OøÈú‹Clm&ê›{…—cã´=í;Ùe›o÷½¯÷ïrä¿ñ·úéÿ•ßø5ú]/ümþºåwþ Gþ—Kýð?üQý¨‡ýò¸òöüþ£õÛêŸUêUå]VdM~Êç„;Ó§-ö»'›£ôì­ÿñ~žõêKÄ*ÿ\ÛkztàOé¨ñÿ^Þ²~/Ër8N/¹äŽN.?s‡$spððp|¿/é/ÆdoˆSÿÒõT’I%)$’IJLZ×"S¤’šy3ðC˜5XYÿS1n’ÁÉu)$§Ï2~¦f ½XÿD;x®NÝÑ·~Ï£¿oç*6ôµ^)ÂøÓ¹¬sAÚAݺ·}Ør뾸ýlÕÚñ›ˆsòr=KHvÝ´PÃvVAv×ÿ6Ý«oÌ\Ìj²¨‡Ó{enñkÆö;üÒša¼AÖöê¾9rF„g(Ñâ"=½ýçÉ-èYõhÚ ·è‘:*ÿ³2êútîñæÊöGaã»–'ô¬7ˆ,r\ìÙűþT+Ô#-²ˆx,­íi凱ò瘚Ê+uci{^Ù$=º˜ænvçWgþ|^´ÿ«¸3°}È/ú­€ïÌ{c¹eæÀŠ&ëÍòaMolXèw$Dq§µßÔýÿø´ßgmnŽaÐÆŸ8w½¿ëÿ½ª}UÃÅÂÉÍ û=V]³‰Ø×Y·þŠ­õêöXèØLÔ*ûUbÏL‰í»Úˆ‰¸‹ÏÆs™‰ˆcxûç‚·¦{©x~ï¤Â"'6ÒIøt–cCõ;6–¸7k]Zôáõ/ ÷Bqõ3 ghK†_¿/Ÿé|õòcÞǧkÿ ó*h·7Ô®æA`GøF»Gµßþ¾¢ÚÁúÅ}UzY”ú’w°C÷¦>ÖÝÿ ³ôŸ¹êYm«½¯ê¶gýUÀq3&d;5·ûì9yü¹A㌠í.Gû¦/wÖ[¹”ã>æ:\`ØCÜ5{×YéîÝg©úG×gú:ÙìDé-êÕä;¶=šµžèþ¹÷­¿¬?`è#ªâÑ^wجey55à9Œ|íß¶ÚýZßé­ž¥•Óú7DÉë `}Xô˜8Òjdÿ»cPÇËâ†±Ž½ËXÎGréboô[¿˜FX?Sþ²¿ë×_ö,¼[EøÛ·m€×±òZÏkØôN‘õ‚ΩÖú¾( ÅéO®‘“ºM–9»®fÈöz.~š™k´’K§}`~gÖ^­ÐÍ!ém¡Í¸:KýzÅÚ³o³dþòJv’IVê9øÝ7üü§mÇÅ­ÖØF¦'Ú?9ÎüÔ”ÙIqôýfúë—ŠÞ§‡õ~·`XÑeTÙ’úÈÜ×µ»61Ö7èV·¾¯õÜN¿Ò©êxÌe²×ÖýÇ´í²§ÿUÉ)ÒI$’R’I %÷Wkñëõ¯kêª$7{À–W½ÞÖow·rJJ’­ÓnÍ¿›sñÆ&[Û7c‡‹ûž«=VRR’I$”¤’I%)%‘•×›GÖ ºFÖŠÆ#órò^í­©í¢¥íý-›ÿ?ó°!À9¦AÔÁ )t’\ÿÖϬy½ôú°0Û›“Ô¯û=u¾ÏHn"[ïÚä”ô .?+ë_Öþ—C³º·Õæ·r,ÇÊec?:ßGoéÅÕbeQ›‹N^3·ÑÆÛSÇv¼oaÿ4¤¤É$’JRJMÉê—¿,u 1†Ú¯}xŽ6ÏZ‘üÖIÙüÏ©þ‰þõy%)$’IJIft½×qò2q«}uãäYúH—¶ï|4»kw9i¤§ÿÓõT’I%)$’IJI$’R’IVêLÎOÉgNsšúÜÜwÚHcl#kòÆØÿc½ßA%>|ß­¿WìúãÕóº«ì~>=_³0Xʬµ¥€»íön©®génöÿÅ-oñaÕèÉéy]"»gì›Ý]x-{±¬.³ïcÃ^ßnö-諾 tƒ‰ÒÉk­¥“{Û$:ןR÷‡:æúŽönüÅZϮ4uü'ÖÜ{q‹ÔªypsÃNükikXö9ìwµûß_èÒSÇ}Eú©ÿ8þ¬37«gæ>ÂëY…²ç4Rãúf¶I{®ßî·ü§ZÐÀêÙÝCü_ßûC«þÌȽøy=P‚ç¹µ<Ñíslõí­Ì¯Ôgé–gø¿Æúêߪµþ¿ ì¹o·\ ÿSáÆ§ÙO¦]ÍvÏSmŸáWA›õÿóG¢àd´æad78]x&»¯î³í ÿBÿWùB´”ñÙ¹ý§åô¼ïªwu!q̪¼Œ‹ý_³Ý[çslvFÝöYÍíþoÖ]Yªÿ¬]?æíùcôœ!•‘M5›ì{ö5–½žïE¬wÑUúßÕ¯?X©ÆPÈéø¯Á½—чO«é½Í>ë22,±›Y¿Òeu­~»õ{«þÛ§ëÕû©¯¨²Ÿ²äãd‡z7U»ÔÔ«ß]Œwþ‹IMaõg# ôþ¸Ü|Û.è÷aZh¸ºÇS`­ûÍw<ÿ4æþbæ1¾«°ÿ‹¦u÷æå§Šr1,®×1”¶²]]Tͬ۱¿¤óž¢ê±>®ýcÊwTêo.¯¶ça¿ Ö}––¸:ÿSÜûwŸ§éÿ¤ýôz¾­ç3êú¶l«í§ ØÞ¤»ÒÞàFíû=Mšÿ¢IO3õƒë&N]_W:~[òÆ7PÀ¯?©œÒo´¹ÙK6C«§Õßë(ôLÖtï¬}>¿«Ø½Z®–óGPÅΪÃKC¿™Ê¦Ë]g¤úìþwù {/êTnBÊé™5cõÞ…ŒÌ`÷îv=­¶›©²,ô·7ôoôÿõžƒõ×/ªÑ›×2±ððñC£¼‹œGÒʲïÌg浩)é\KD¸´$¯:·ªu ÌÃõß;'êývÚ±qÙèãX'@þ³[²fæÿ8ÍøËÑÔ.¦›êu7ÖÛjx‡ÖðÒ?”×{\’œVý\èŽú±•Ò:=uW…›M®¨ïkžöúm¼Û/õ_ígé7ÿƒ\‹³ìëSþ¬ô“ëõ,–bf0ý/GÇí{Çïm¢—®û¥ôn™Ñê¶Ž™ŽÜZn´ÜúÙ;w¹¬­Îc Û_¶¦{+ö.s¢}IËéß[²úÅ×Tþºû:} ./®Ì£[òæ¹cí±ÙcÒS&ÛWBú÷™ê~­a ¡Ù¾¾,½¬oþý+×Þ¥•ÑúU»*¯ùÑ——Ôº“°Z]’êým÷~™ßc›ô+þÚî>½ýWÎúÃCzeµãçã=á–Ü\ÖúWVülª·VË_úF=Ÿ˜Ÿ­ýQ³# ¥{q:—A ¼Me¡­¦ÊokeÞ¬­©)ä°sié}k§[õk¬×Mײޣ‹™UŽ¥ÔØv; :Ãg§}÷«­è ëŸãë>U÷Wƒ]x޾Š^kõ]èV)m¶3ôž•¤~Ïߨ·q0~½gu[ºÆV.#·¿§› ²B÷ßô(þOþ¬Ur~­ýkÄú×Õ>±ôkñÍm5³ Ùk+®«}c[èØË*ßG¦û?áS/ªŸiéYú§Õs‘fN4×™‚nq{êká–Ñê;ݳ{½‹¡ëõô»ºFV?W½˜Ø9 5[umA»ýý-žÆ¿wÐY¿V>¯u,ÌîµÖî®þ¯Ô‹E‚€E5UXбéßîwòÞïýIfŸ\èø½o¤äô¼¹ä³ipå®>»üªìk^’ž^Œñ‹õ{˜øâuì v†S]ÓN@­£ôlkå´û[ìý%–*½Kë£Ô›óz>1éyïË91ƒ}?¬=¬`¯Õ·Ò£úOê+øØã3§ã7§SwL̪¶ŠéοÕm¡€miºšÆÇXÖÿ_ù{ÔÙþ/éwÕ|®‘•”ësó¯9·õ ý¬ñs?A»v۟ͤ§‘Ê· f}^£¯×Öé-{oȪײòõ™[œæ9–7wÑbÝë4[×¾¹ô|;í¿7¥›³1˜÷Vç ηÐ~Øs?IéúŸÈý¼ìñ•™S:vNn´]Ô±}C’ö4æëxm5ÙgøE§oÕü·}oÂëm±‡ ø¯kÜãq{œ\×ý Žoï~‘%9øÿócë¾vÚî—Ö1 6×¹ûr1ýó¹ÿé)Úßå¾Å_¦ädõK>¸uÿUÿfew`à4Enõn¬½µ?zÞúçõ{3®têMµ˜ýO"¼œ;ì%­k˜aû[lÐwî}=Š=êÅ/êaè sSñ­e–‚v®ÞýÛ}OM¯³oóͤ§–½G/ê÷Õ…V]¸Ç­‡ý¯*·iª,¶¶Ú}Íu¾¢èp¾§~Áê´õ‘›uX cÇQ½ﹶéì¶½îýÍwçêD >¥uõw¢ãQ“Uk ‘f5àÒ]þ§ËYg£o³ü6'GúÝÔºÆ'PúÃ~66/OÜê°ðaØá·~S®ÿßÍ­%ÏC‹*¯Ôæ±Û6ûÞæÿ8¶hÎúÝÔ~ gãã3,çâd)ºÆ²®Äõ»Ýö¯EÞ›öûÿã.ZX}ëŸÕ±vÕËprzU–:Ìjó}FÙ¼îusG¶Ú·-õw¯¿êÕ˜u«¿l>Ï\g°–µ¯Ý¿ìík}ßdÿ·ÿT¤§—ú³‘õU½{ögPÎèÙÍqf_LêÝö’á·Óyµþ‹-ßô?ð:W¦®##êïÖÿ¬5}c=>ŒL ÙëqÝu®¯è±Ž¸~‚«?Â.Ë(dkF)hÈ,w¢_£wÁô÷Ã_ìßô½‰)æ~¯ccõŽ£õ‹ªeVÛ±rïýS%¦ŒVú6óþëßjÄγ¥ôL“õ3ªd»:IýŠÓŸŽLû·Ö÷lÂ÷9gګغÎõnŒ?ªôô Ð/a¤×™´¸ a6eEžËvÙe–{ÿœZ?¦tþ™@ÆéøÕâÒ?2¦†‹¶ý'$¤}þ«‘ÒñîëìÄêi7Ñ[·5§s¶ívçý*ö;é®_üc[“NgÕ»q(û^K:€uXûÅ~£ƒ}µúÏöW»÷Ü»eƒõ¡eõ\þ‹“ŽúØÎ™˜2oXÑ«c¹ÿר’œŽ«•õÿ®tûúKz]-™¬uåÝ™UáµØ=;b¬vú›½79TúÓҬķê‡@ÄÊ·ïĶڜX÷VÚêeÜ~}Œõ6ÿ£^€°zÿBËê]g¡çÐúÛWK¾Ëok˃œ×µ¬o£µkíü÷V’œ¯Ó>ÏÔú7Ô®™“‘‡Ó³ ùY–6×œÊÆöãW{¦ÆVç7k”®éßó7ëG+"óÓz½Ç+ ëkCÈýE&Ó¹ÝüâÚúÓõs7©d`õn‘Ì^±ÒÜçcºÐMV2Á¶Ü{ö{ö?÷Ûÿ©â}_úÇÔúÞXúÏn-uôÍÎÂÁÂÞZmxÚëò,»ó¿Ñ±¿úSÕJpõ‡?¤t®YõXçdSÕï£Ï;…{ìm-Ø?Í5ûØÅ›ìú0ÎWL¯ë ~°VÝìβ«Kl´{¶ßSœêý ]ìÙ³þÜ[¿Vú>/Ö ­ý6÷C/«ä†ÚÍ`‡6Ú­gæ»cÃ®Ž›þ2߆ÞìÜ ¨kEgª×êý§Ónm^ÚþÓ·ý=%5ú·Pê}+ê×D}—tÆu\weõ1Q5Ûú:ÃÎ+]üåmõ}F½ia}Gý›Ÿ`éù××Ñòñì£3Ëó¹à±·âÜçn¢Ý~š/Ö«ùg¦u•–ÚúÏGQvH.eÍ{};«Êôýÿ¥ýöÂ(tΑõ§/®SÖ>°äQMxu½˜Ø.°ÖçX6¾ì§[§òÿû‰)Êÿ}#?9´Ú321v¹åÌØÇVæ»Ó>ßWþw«—ú¡Ñ:ïBÉÏÃÊû5½.ûíÊǺ²ÿ[}®gèí­ÍôözcüõÔ$§ÿÔõT’I%)$’IJI$’R’I$”¤’I%5:gKÀé8mÁéÔŒ|f[[I ÎúeÎúJÚI$¥$’I)I$’JRI$’”’I$¥$’I)I$’JRI$’”’I$¥$’I)I$’JRI$’”’I$¥$’I)I$’JRI$’”’I$¥$’I)J¾~/Qû1ž®6CK-®\Ùiå»ë,{²åa$”Òé=¦ôl6àôÊŒÒ\ÒL“ôœçØ^÷»OÏrº’I)I$’JRI$’ŸÿÙaxiom-1.2.8/src/site/resources/images/nw_min.gif0000644000000000000000000000006311131637462020330 0ustar rootrootGIF89a‘ÿÿÿÿÿÿ!ù,Œ-!R;axiom-1.2.8/src/site/resources/images/icon_confirmsml.gif0000644000000000000000000000013611131637462022223 0ustar rootrootGIF89a‘ÿÿÿ™!ù,/Œ©‹Â+â´Ú(À´7ê­`Ÿ‘¤× ‡˜Øê™†+‰ÔB³·BÙÞãÈZ"£;axiom-1.2.8/src/site/resources/images/icon_success_lrg.gif0000644000000000000000000000272411131637462022373 0ustar rootrootGIF89a ÷ÿÿÿþþþŠŸ¿ýýþïñõøùûÙßêÑÙæÐØå]y¢XsšTn“Lc…G\|CWu[vžWq—RjŽPh‹Ne‡Ka‚I_H]}DXvb©5D[h„¬gƒ«pаt²{“¶–¸€—¹ƒ™º…›¼†œ¼‰ž¾ˆ½Ž¢Á‘¥Ã–©Å™¬Ç¯É¡²Ë¨¸Ï¬»Ñ±¿Ô°¾Ó³ÁÕ·Ä×¶Ã֏Ũ½ÉÛ¿ËܾÊÛÃÎÞÂÍÝÄÏßÉÓâÈÒáÇÑàËÔâÌÕãÓÛçôöù*7IŸ±Ê¤µÍºÇÙ¹ÆØàæîåêñðó÷ïòö`{œgƒ¤ÛâëçìòìðõêîóNd|Š¢»¦¸Ëñô÷öøúûüýúûüœ²’«½Vu‰v–ªQo}t˜£„ª«k•ŒRwnˆ±¤Šºšd™q@]G;Q@KuSGkM]“bš¼œqšp˦ۣ~¤|¢Ã «Ê©~¤zQƒKc™[ƒ¾zHpADi=Bd;£Û™”ЇŸÙ‘¬ãŸ©âš«ãœ>\5:U2§â•§â–©â™^Ÿ5X’1SŒ/Q†-J}*~ÌMvºH‰ÔW}ÂR|§_Œµr˜½{™h¯Éž¿Ó²¥´›¶Æ¬ÍÖÇöùô|ÍCvÄ@qº=o¸ƒÓJ€ÍJX‡7Ž«yÐÚÉíôèR„+Q‚+O~*N{)Jt)õ÷óÿÿÿ!ùÿ, ÿÿ H° Áƒ_$@àÇŽ‡ò衃F „qØ@€Çì¨A`F‚E@ªüeÆ’.žü÷Â#Ž8q‚t2£LCf¶XItǘV®ÈDÈÂc8m¢J•ªC«EŒ|8ÙT)Q˜ÂŠKKƒ!@¼ÀÕãµPpãÊ¥%çK˜0[\°ÅØõ›¿€§Ù†ϟ<[H´%ªr=%³añ˜3c.1‹ž=!rôe1cSØì4h’£K‹¤ðµ™Ó„‰¸A„-ú‘%PÆ`zÚc–;„ZC…ËT-NLˆ ¸¬31’%9¥i#¾jrzÿìª2©,‰&EºDIѶڦÑÓ2ž6NÛ#<¬‰”©Ò'O³²-ò¸cÈRuE€yUDìRÊ(³`³Ñ=ïˆs:`ÄP—sügKß\ó^öÄ#L8º¢A,\a@ƒJ<E_t"Ë,ßpÄQ=¹ˆ#Ì.¼˜QÐ ÞtœÈBÍ4ÖÈQ7Ëà 1Ũ²‰­@EŽHq„hPCÍ<ÓÄS7eóË)ªœ² +ÈÔA :Ѝ…4óÌSN:ê8 7Œ2¨°ÒL/¾$Kt¥àD™‘€å€c:ºŒ³Ê3ÁdsK+¯@ªŒ3ë,á±`¦“%ÄŒÂ03Œ1½¸M4Ь㌫í@“>~ DÂüÀ6p 3»“JͼòŒ+íϱûìÃO?Q ä=ˆ(BgÐánuØaG}"ˆ~4Ò#e,A9ÜP 1ÀàB D°°‚ )¤€Â Ü&‚'eP„ œðÂ?ñ"„Â'= ,,K Á4Ð@X`Áh0ÓÎ<;axiom-1.2.8/src/site/resources/images/icon_sortleft.gif0000644000000000000000000000017111131637462021713 0ustar rootrootGIF89a³ÿÿÿj´?S‡-˜ðZ}­ZÜ÷ÈJt)ÿÿÿ!ù,&ÉI«½XŠLÅášñq‚AŒXIœ™Jèu  Îö=ÄÙÁ÷  0;axiom-1.2.8/src/site/resources/images/external.png0000644000000000000000000000034611131637462020706 0ustar rootroot‰PNG  IHDR Óº&gAMA¯È7ŠétEXtSoftwareAdobe ImageReadyqÉe< PLTEuuuÿÿÿ™ÿÿÿÑðPtRNSÿÿÿ@*©ôPIDATxÚb`&& @ P6#@ `ÀÄÄäX˜Ć2™Ê« ›‰d@AÔ3ƒ (± *‡½ÜtIEND®B`‚axiom-1.2.8/src/site/resources/images/icon_infosml.gif0000644000000000000000000000011511131637462021516 0ustar rootrootGIF89a ‘ÿÿÿÿ!ù, ” w¡šƒ©›lzO=àwi€XMèbŒL[;axiom-1.2.8/src/site/resources/images/icon_arrowwaste1_sml.gif0000644000000000000000000000113611131637462023205 0ustar rootrootGIF89aæÿÿÿÚÞé4WžðòöùúüÒÙæÚà냗¹…™º±¾Ó°½ÒÑÙæÐØåÕÜè×Þé`}§\x Ph‹EYxb©Un“`{¤h„¬j…­l‡®k†­y‘µ˜ºŠŸ¿‰ž¾ˆ½˜«Æ—ªÅ¯É§·Î©¹Ð­¼Ò«ºÐ±¿Ô°¾Ó²ÀÔ³ÁÕµÂÖ¶ÃÖ¼ÈÚ¿ËÜÁÌÝÃÎÞÂÍÝÄÏßÈÒáÇÑàÆÐßËÔâÎ×äóõøc€©š­ÇŸ±Ê®½Ò¹ÆØàæîáçïðó÷îñõÜãìÛâëçìòæëñëïôêîóöøúåããVUU’‘‘«««lllÿÿÿ!ùO,»€O‚ƒ„…‚'!!;< F†‘† 3/6’ž‚)B—A‘KŸO+ 8—17*ªJŸ+?C77D6ªI¸’*5——C%9ªLLƆ* 11,(:ÐLMÓ„)7Ë2#"ÐMàâ å—8C-:ìNï‚'ñG,@¬3´¤I>I úù°aƒU%-ˆ± =n}BàbY=0FÒg(Œ"EÐ ‘‘Õ§0c ;axiom-1.2.8/src/site/resources/images/poweredby_036.gif0000644000000000000000000000145011131637462021432 0ustar rootrootGIF89af&³ÿÿÿßåì3f@p0YƒPs–q©ïòõ¡´ÆÏÙâÌÌÌÿÿÿ!ù ,f&ÿpÈI«½8ëÍ;`(Ždižhª®§Ä¾p,Ï;Sâ{ã5näŒ2[²Wc"ŸMf¥F§Ò˜Rë#±F*Tœ…bi[XÑ ®ÚŠïòðK ¢ÙÎöµJï“ýuv7$f€}W<V…VZ,s†A.cBi”hžž˜Ÿ¢£j¦§¨©ª«¬­®¯°±²³´µ¶·¸¹ ºÄ¬ %ÃËÒÓÒÚØÖÑÃÕÛáâ» Á !çË Ø   #PÎ…w¼`è»@ \ ð{˜¾óúU˜¨@2Ðÿ&¨4‡õ& ¼XÅ—ñ½ ©a¢šX¦@àH N`©e€,l C*43iÁ£FV2L¶ ZÐŒBÛЧÀ®"¯ZæðꄨV°vC\|8‡‚øï¡du‰Rˆ›€©Ô´ š)%@@S pÇVlê.» -ðCp€rNÉø ¸3f¡ãB] BÁ¯|éVqY3¾…›;»{XÐË÷jD°®±Á‚I5L8"¥lw¡Z`É—?w,"s¾‹ d÷‡Ü°åÔ ¨Ÿð¼ƒáÕÓ³ð.±g½½´apñ¾ÛïtÕÉL@^l*6]#`•Gfs`ôöóTxAdÉ&cÆ&T˜+rÆ>rÇ?R.Ew(hŸF= cÃ&a¿&a»&fÁ-iÅ/hÂ0c¸.jÂ3j»4l¾6i·4sÌ;,JxÊEŸ­–›¤•a¹"`³&_«(rº?°º©àèÚ6X¢T—Y£ ]Ÿ(S’[”(P‰Lq(-O…JvN|!1Knjoc#Ed?P 9=þþüýùºþö°þö±ûð§þò§ùè”ûëšðá•þïžÿç‡ÿèŠÿéÿì—äÌwÞÆtéÑzíÖ~äÝÃиkÁªc͵jÕ½oηp§‡'³—D¼¤\À¨b«i¿©gº¤f  §TžŠX›r•M–€P•…`¡hˆrFmEnG†rJåããVUU’‘‘þþþÌÌÌ«««lllÿÿÿ!ùŸ,ÿ? H° Áƒ*”„HP¢> ‚(P€ Íaã†Î¡ˆ? ƒ@H|ìÜiƒ§H‚8à†í©ç !™‚ Ši` ’H-ýñ“'ŽœA1]ºÄ‰S§NžŠ¬0Rƒ¯ X02HO¥‚˜ª^ÍZR’k"MzD)…Á´XµtÀ+ƒ V´ÑDJ &w;é%(a¤&(Ð "„ÇŒ)Ip¼¸‹Ä€^¸¨±$G!EŒ ñRà2X˜ ÃŽ@ž@Á¢EIëO :@00" G¢\±²Œ˜0¿E„@ð A‚Nªdñò¥Œ4i~Ü4†K*]ÈœQ£hQ@;axiom-1.2.8/src/site/resources/images/OM007.gif0000644000000000000000000000572011131637462017610 0ustar rootrootGIF89aŽTw1!þSoftware: Microsoft Office!ù,‰P‚ÀÀÀÛÛÛ×××ÿÿÿÿ±Üþ0ÊI«½8ëÍ»ÿ`(Ždižhª®,'¼p,Ïtmßx®ï|ïÿÀ pH,ȤrÉl:ŸPß"J­Z¯Ø¬vËíz¿àðk*.›Ïè´zÍn»—ä·|N¯Ûïø¼8®ïûÿ€‚ƒ_|59ˆ„‹ŒŽO†43•‘˜™š›œ‚“–2c ¢¡^SŸ€ªI©§­A¬=³ °‡·µn»ŸŠ Y|¯”§»8Æ6ÈÀPµqÊ:³Ï;ò¹gÒÓÖ@ʪÎÚ˼ߨ1ÞDؽ⥸Xëã¡ÍâÙ[äRòï\õ7ÔÛ÷…þýŒpûfΓ:€Éγ—™L"£¯š9_¢ÿ†ÆwGáÓöJcÈŒ¤6Âõd1”.Wr4ù’&HÝÞŒ©2¥Î–;‡qÄUÓÛË”ÄNît™°hQŸÑ†¶t·ôAÒ™ÖXÂd:²#Q¨G*}ÚÕ)1•2òÄãI ¦¸ b]ºÂ <Úõ,>¤%‹–‰“kÜ¡e¡þE,µ-_aƒ m<æ¬Ò¿‹3¤¨˜ÆÊ˜Ç)]ìèÏ¢17ækÉtßÅ£I«fwãéŸp=º. ¬ÎÄ™Î&ÝV2á˵‡ûÝw*"Ä»t!‚£Âøwí‚üʱ¾x0øë¾Õ#S޼Œ;Nó±þ^ÐøkÔ¥ÓŽÏÏ3É\ê•§?>¿~Öõÿ9Ñ÷›Pù§_lãygì ÇÞ}²sL(ÎUháÉQ÷˜uÚ!‡"µ—|â1h•wZˆ ö4AÖ!ö¡~l½—ÛyññdXržh‹€¥´gŠM¾Õ(¤‡2òÈ_ÚÒ#€LžG¤‚À8ˆÖpÂwdޏàÝ…ëTdU#’G”H¶¸`‰îM´á™¥å‡eZëyØ¡œp¦œ}ñè™Y€6)Ü„²›¡²á©¤{wv÷àœ.*£ßí©¦Š’Nª©v2Ð)t\Jr ~‰¨œŒV’hi›+‘Wß©hBêâHvRŠj«"ˆ[¨º)xë :C‰™Ân¹*‚Çæ¦h‡ÿz+hœ1F{¬j°îGé´Oòš«„Ì](‘]XX«¨NªWyMUã¦ö¹¡œXù”;Dj-Œ4ƛ&¥YãþûëŽCþë¢NJk‹ÏŠÄ®Ša>+¥flÑ "rç^Gï[3ý9ð:.—·$Gp,Gˆ‰ò^pèŒË+' sÌÌÚ१%߬2Íò|ÅÎ=›t&núÐ :7`á%F7íôÓPw2Ësá:çÕ8K7tÔ\wíõ×/#4ÖJ'=3Øh§­öÚ,Ûlv]J3Ý9[_s¶ÁEÐ}·+·ÍÐßGË4ßFKS4·4<·4ÎFÇáÐÌW†˜”ïm¬àÿ€§¶¼y×IË=dþùtãÖ=x¦“níé› 32ÐÉ`T~Žåžó w«ºšû—O8:í˜ Ïºßm¤~¼È´O³—Þ†=Ö•É2 £Vt6p*´.LÓ·÷âõÛ{5$Ù/è{Z¶q‘yž¿UÄ6©kÿàðögƒÕÑϱk_A‹®ptql~cY—“¨¿*ýŠOøkëž—³—9FZ”A °¼'0ÓjÞc:Ó¢ . _íkÈ8óÑpf<ëà›Â“B þn9daÁÀs©"G‘bÌn.v›"^††pŒ ÅÇÃBñ*üRãÂ)#Úðd”ÜŠÿz­ø•?»*b©Ô„ÃB¨VÙ ŠÔÅ%ÔÀp;\ ^ÍÌVÙʇ7,—ï¸E1¶kY5S•¹âƇåàyR45¾ :LcŸïø(@/._6¤ ³R•©Ñc5q_G|äA4žq5#ä;©+6Ñ‘QÂb,=61YU2<¡ë"âÖrÃ,í*x»  É´àË{1±L_¼–ÈŠiÊã½ï••’'çHÆ2R‰{¶qÓ¶©Ë2m‹™Æ³å íèÈLmRaÏÌVgF].ó˜ŸÌV¿–÷‚×UmŠÄ䢼øD­1ÚꔤVA‡&~ ËŸ‡Êߥ¬)ŸàÈYÄjg2Ù³ÿÏ+Î Xt”!9ëõ*c½±N J#®Ø©@æ(¤ñlå+#ˆŒ’%2,Ø$_DKíA ‰äÜÆ26{ÝD_eü¡¿Ô(P¦ðœ4¼¨,]%ˆí”J¬ÜCCÙ1}]ŽaòiMÓù.8ð’Zu‹ýVŠLâÉLW“LÙÆV&ȱ­p Ã3¬®²a¨ Ê‹kÚʪ׾¢bfÑ¡‹_KØÂúµ4¬bËØÂÁì‘jÈkç¾f •¡C/’U¦Ý»‡9êsôF;ÚÚímx¨EFfQëLܱ֬ôTÝš$Û„fhµo­lÃÉÖÊ~¶w #-…ÌÎn·´-îÙ*â[Ùÿ ¸Ð}Æìê¸J$äövØ…kswùÚá:`´UÿÌr¿!¾å*¸YõVèM{EÓŸõÌû¿JÊt½JŸ|®˜¢†·†­+¥«R_ùð©³Ê¯UÍ—Sa“¥ %˜Cwä?òi2ï¯}™ÇZïZ@C$ô#ßÔ…Žªåð Š9hÛ!úI¾lD©BCÅbmΊTì2Sk  PK1ųŸgVìÕ²ÆW'„ÍŽA˜¤ž$UVo´"<±õÛÍ7Èr eâ¶ Ç*üc¬ R‰¦£Z‹š&#óƒa+Ò¸Ì3nrM¤EH ¯Â%弯ùÅ +2#ï<æ]ÓÿŒ"¦2”ÆaÁ‘vZÞ2¤·,é”Ö ¹Ì¥§”$üm3¦Dñ{‹ HýäQÊS‹Ô½}Æj«Ï9±‹¥òZžž%ÂÒôÌf‘tÓê4ò<¹9¼+c¹Ë“Î2.Ý„æÉÏhfv®uÌk9’_¦–(ª­]:8§™Öú3 ù¼*êrÛJ}26ÿ˜Ã94StôöïæFóÛæ¬m‡„ËhG{¤%We:zlŽY‹÷ævMunÍVÑTmæ´TY]ªþž¨ mÔÓíˆó Q-²ì,ÐXE\”ɤ8ÇSÃo÷»åŒÒxǸ+‚_@¸âÿí*SVæP~…¨<­eºRº^e1º¾Üi%ûÜ‚ß^K ½ Ð}Æš0’ß6}HOpÁÂÞ> ™è÷­áƒ=%³/]`ÔÓ3SÆQµàô®‡§ý½söï€<.«÷ÂûÜð¼âÏøÉ=ÖÒˆwö´ ßøÊ[þòÊÅ;ä îó ó ½èukÂçÝ»‘OøèWÏúÖW¦Ïûé#ÿì¶ã´®Ï½î {ϧ>ñµýÏð8áëþø”}<â¿›zÓ¿ «Bô‘O}?\V´‘Ÿ=å1ý¾›¹8åm ÜË¥N†ÜNŸ×÷¨~¾¸#pÁ_Jõç?|Ícù›ß~ÿµ—âk+ÑFB•D‡b~S¦G`DÑÔ+6'?†JJE˜ycRÍÇ}|¤Bå’E7&n‚)àÔbsfqTs'W€É((}g´§pÁ‚€èU°NF‚Ɇ~³1šòH6¸ga•G)„ÀsZ¿§XNn§ð–;µFDý7hvBnãvJ3%o(n×%„ZøZ@P„@'/¸J#j48qUˆcxÍ´ãÔG²„%enÓ·…«·3^|òkÀ$hñ¢j &l…TUßG|ýUvµ4~ ¶U¿&qt؈ô–FY¸7s舖•(‰ð_—؉P“‰žŠ¢(;“w8ЦxŠºPЍ¸Š¬¸ ªØŠ°‹óвX‹¶ˆ x‹º¸‹ûÇ‹¾ø‹³ŒÂ8Œ¨C‹ÄxŒÈhɸŒÌbÍøŒÐH8Ñ8ÔX|ÕxØØhÙ¸Õ˜‹ÜøŽ ÐäXŽæxŽè˜Žê¸ŽìØŽîøŽð ;axiom-1.2.8/src/site/resources/images/icon_info_sml.gif0000644000000000000000000000113611131637462021661 0ustar rootrootGIF89aæÿÿÿýýþùúüøùûÚàërƒžÑÙæÕÜè×ÞéÖÝè 'SG]}]y¢Vp–OgŠLc…J`EYxCWtI^~FZyeªh„¬gƒ«j…­l‡®mˆ¯pаXl‹t²v´dy˜w´|”·~•¸w­€—¹uŠ©nž„š»ƒ™º…›¼zŽ¬ŠŸ¿w‰¤‹ ¿¡À¤Â…—²™¬Ç˜«Æ‚’©’¢º†•«¡²Ë¦¶Î©¹Ð­¼Ò¬»ÑŸ¬À±¿Ô°¾ÓµÂ֏Ũ¼ÈÚÁÌÝÃÎÞÂÍݲ¼ËÉÓâÆÐßËÔâÍÖäÌÕãÓÛçÒÚæÈÏÙéíóãçíõ÷úôöùóõø@TpAUqyŽ«}ަ•©Åž°É§´Å¹ÆØÀÉÕàæîßåíáçïåêñäéððó÷ïòöÝäíÜãìÛâëçìòæëñìðõëïôêîóØßçâèïñô÷öøúûüýúûüþþþÿÿÿ!ùr,»€r‚ƒ„…‚`fg`l\d LGƒ^qqopnQmbj.‡™MObhNg r\oP6 [igŒ%‚d›mE4k_^eL‚ PRah YcHB‚ËjfV ‚FØ`\- 5Z=97‚D`] I' 1ì30‚@KICA@,¨"‹éøcÇ $X ñA‚ ?tàÀrå…Š!8h 2è† @ Pa†b ;axiom-1.2.8/src/site/resources/images/icon_success_sml.gif0000644000000000000000000000173611131637462022404 0ustar rootrootGIF89a÷ÿÿÿ„™º¦¶Î§·Î¼ÈÚÇÑà¿ÈÕc~¢¡±Çßåíw¬™´¦¸Ë—®¿³Ã©½ËSq‚*/‚¡­%(#8='*!37,/(CH'AF&>B/2*,)FI"!Prkœ¼´¢À¸j•†„¬œtœ‹¢Å²FcOƒ­7G;ÅÖÈÈ£¬Ö©·Û´¸ß²2B.²á¥³â¦·ã«¸ä¬¸ä­ºå¯¼å±Â€¶ã©²à¢²à£œÎˆ¬Þ˜«Ü™©Ù—«Û—]•BÎ…¢Ô‹©Û‘Í„­Õ—]”>¡Ô„çñሻf“Çr¿mˆ¶jÐæÂøûöbœ7Jw*U‡0WŠ2•ÑiÔäÈmª;Ag$r³?o¬=ež8fž8b›7ZŽ2YŠ1S‚.Jt)Qy1‰ËW…½Yu¤Qe‹FcˆE—¹{›½{“h­Î×Çîóê„ÊGv·@uµ?k¥:hž7`’3Jr(ÃE^‘3Q|,S~-Dh%}¼DEi&‹ÎQ²Å¢ÖàÍÏ×ÈãëÜIm&Qx+Ot)Mo(êïåLl&Ig%Gc$õ÷òþþþûûû÷÷÷ÿÿÿ!ù‹,» H° A!,X E aCF5pAÆ *01#†"NT0è‡A˜ ¡ =†Y²&€ NR¤I’1ÅÁbà€JðÃ'À:oŒ8bŠ˜3‡ˆ-ÃeË“‹„у™>Ô|‰Â¥ (ØÌq£Å‹•4häÔ±(Ћm®TÉ"Jž;*d(Å"4l¨p ,Pø°( ;axiom-1.2.8/src/site/resources/images/sw_maj_rond.gif0000644000000000000000000000006311131637462021343 0ustar rootrootGIF89a€ÿÿÿÿÿÿ!ù, D~†šÎš’²;axiom-1.2.8/src/site/resources/images/om3.png0000644000000000000000000011361211131637462017563 0ustar rootroot‰PNG  IHDRöÂ’b|PsRGB®ÎégAMA± üa cHRMz&€„ú€èu0ê`:˜pœºQ<—IDATx^íýw”\÷•ç ¾ ïÓûL’Rwïé©®’(† SuI%Ê•ªK")ÓýÇþµ[½H =R¦T3;gÏ‘› %•J¢—¦{Ï)„!Ò'¨Ù3s朙ݮjI%‘&Ì~îïù„!‘‰ DD¾›zJ"_~§Óé@ À ýQ ¨Ôjëf—½,[Pg2¿ßÏ;ð\óà ûÏ‹Œ¿---ñ› ñ1^°žý§ýä¥+¸ïë µ€Z@- (ž,“-¢Ý çBPógý²‡áØõì†ìûºòv5~®ÛØ¥;R ¨Ôj¼u~°ƒõß­ÖRHù÷`ÞƒxËq—æî?íCÝGñÆ+ݲZ@- P ZöÂዼmPŒºnYo=òBæ"ÊJ…?ÖÛ/täÁº•{Ü­°KýQ ¨Ôjb[ Ðç†À.ëí Ëzà®w^ˆt‘íÝ?\¤øØX«…{áX¡Ã¬Z@- P \ ¸pžŸŸ·»»HT矅ÒÍ¥‡”wõÝÙÂæÒØµ]¹æ²CÄu8IÝ…Z@- ð¬ Áë>4` ×£·‰4Wâ³xñ®í\)q¦úî‡ Wö¬ÅõÄÕjµÀõ±€‹\ w×ç.ä»=7{ÑI¸õ¢ø*«ªÃ~}®Ÿîå-péýéæ[Õí«®›\‘Üõ³ C¬ø5qW¸H}ô[š»IñîW¿Q]S-P< ¸ž‹›ö«þGñ¬­[.­}áí½ ÕÄ•æ]ß¹hô°ó¦J{žºwµÀe-`ýÍìºn®¥îèºY 0í…^ „Ip/LœÉÇTøò Á¯îé@‘¤(’ì­ÏõâÕ…/’u³å`‹ÒÛWzû±bŒ*.L”rÿÀ‹+Í…-+è1xÍ…rüEѧëædéŽÔEµ€ûxzìµ. 6®³ž×âñâ/Õ齆=ß²µ@ÞÑÉìjuj[> «páí÷×¥¼-.xñ)8eûm×ó” óglòï5º9ž²žžl¥XÀ­zQÄuÇoŸ6\­&¯Å~[=XåÎUØT?RT ¸îŒëãhĨ¨×—ÄV`q›ÂW{¥Í^éc}»k÷Hôn,žñų­n¹¬-à)Ä’½Ð.Ð/‹~w$(\Í®éßýçECˆåþe.û'Å}‘¾-Šø"V7[îðâÝ+?nÏﻳÖaç·ë¹Û¸»uä]ˆ»«]äþbúý‘펅å~ÇTæñ)â+óºéQ_³¼ƒø‹ÀíZ®P±¹Èœ.Ó ½{»Žû§ÂuÜãRÝæù‹tžk¾°º÷X@¯7„G-àÄ[LCd S÷…ë•óW; \ä†ÛõíŸxmz«¤2Ý]ǽ“®4¨> ¸dWQ¾¨ß@E|QÍ«/_ x ñ.[@UU•Ïçã›_è>Ûwø“=?üÓþzî®Ñìúö#¼¶”¿Tü¹Òå¿Ôs/|&(ß›¦L_My-,à)ÄÛÔËe‹c¿ùqÝmËk÷ñÜõâÝÔw;®îÂuÞß…/täÙãÕ¬¼WÛ»ÛPÄ{÷Ú{ü̽ƒx{¦Àú¢o»û€æµý'ø¶ÿttWÏqÝyû×Kc\^æÛ\é6³û²]XXðøÝX¼ÓWÄ϶ºå²¶€woÉëª.yî–à®,à 4÷`0Xˆx«ÞX÷ß-ÜtšBÕÅ•nxá®P(ûXâX¾öƒîAÚçw^ŠK…§S8œ¨ÚséWN_ÖÒƒ+ž¼ƒøËzñ»®2ã²ÕE0–G¸çŸnxÖ¢Ü\î»n¾Åºåíce®Åw¡ÄïRÞ^_»‚]Ù}¶`}ÏÝ)Çc×·Ûú…€ÂXqñn›ŠÛ²"¾â.™ðÚXÀ;ˆ·,¶^paæL¡_oi:¡ª]Ù•k\ªºL/ô¸ õw,±[su˜Â€{ñìÞí`7èâÞ¥RáF =w;~\ª½Ï|«µ¹i*p+Šø ¼hzÈkaï ¾0 ¦Ðõ¶ vâBÿÝ…² «¹Ãƒ%¯ë5Û4J{M,Í]eƦZ†B!4îÊ.¾YÙêB.âísÑûì¶û-Œ÷ÚOÙGEü¥ß EüZÐB·Qðâ/=,¯ î¾¶ô´¸u–]¸Û‹ ²#‘ˆ¥°MÔ)tÌ­ c?[HmûˆPˆ`»GWɱ?…B{T9ø¼ÏÓ†KvûÁ ¼¯Ç!+⯇•uehï ÞE³u–퉃H7ŸZÞõ¾­ ra-Rùmßw©êöR¬Û!÷Ù5¯­d?ëêìvƒ®ªS¸S>hQnìàºðîûöñBc­—ý–)âË>zH×Ã^C¼%¬¨‹ÑBíÅÂÔ®cLA¿ÔZXÁ¦Î…—ŠÜG;r°7[¦pT°oÚwÜáÄnÁ=*ûÜ`žÂø-°ãN¹²ëØsù®BÍ¥ßEüõ ‰î£ -à)Ä_¶žLáEq³eì›.+-@ ƒ´×õßÝÕ\¼P0q“)/]ÿ¢ûáÒÃ+Ä·. Ü-¸º´CÞu×ÿñ×ßæºÇ²°€§__íA¸C…uöqóuNìÕÛRõ¶Ò5וñt9 %¦Bu¾‚N¡T‡ªˆ/•åu¿%¶€"¾Ä`%»·«PùQÙý*í§ˆ¿JCéjëÍŠøJ¹¢…B&G®ôª)âWj1]X@_)Ò-uQL¸RŽ¿´Ç©ˆ/­ýuï%³€"¾d¦_íŽ/MïYí–<ô9E¼‡.¶žj¡ñ•r?\š?ã6•­”S(áq*âKh|Ýu)- ˆ/¥õWµowÎÔª>íÑ)â=záõ´ñzxÁŠx/\e=ÇËX@¯·…, ˆ÷ÂUÖsTÄë=àQ (â=záõ´Õ‹×{À PÄ{á*ë9ª¯÷€G- ˆ÷è…×ÓV/^ï/X@ï…«¬ç¨^¼Þµ€"Þ£^O[½x½¼`E¼®²ž£zñzxÔŠx^x=mõâõð‚ñ^¸ÊzŽêÅë=àQ (â=záõ´Õ‹×{À PÄ{á*ë9ª¯÷€G- ˆ÷è…×ÓV/^ï/X@ï…«¬ç¨^¼Þµ€"Þ£^O[½x½¼`E¼®²ž£zñzxÔŠx^x=mõâõð‚ñ^¸ÊzŽêÅë=àQ (â=záõ´Õ‹×{À PÄ{á*ë9ª¯÷€G- ˆ÷è…×ÓV/^ï/X@ï…«¬ç¨^¼Þµ€"Þ£^O[½x½¼`E¼®²žãuöâ—r¹ŒÝe6—ÉÊoY2™¥ln1—[ÌfÓò'³J:Íu© ,åÒó¹ÅE®#W”ËÈE”+,ÿZþá­ü…–?ü¡$ßCE|IÌ®;-½ŠéÅ">ÏwóM_ÌæÎó•“ŸãT±|ÁX•ãó;Ž.a¹rUaÇYb°–‹:ŸÍÌËž5ÿZú°+âKÿ]×#𤊌x(Œ'_rqöpØy Ù<×÷Ã[ÆÆkƦ†&ëM7œÑ¥2,ÀÅœ¬s:œlîŒÀ]žÇpÚÏfrg³9.zþǼ6#½"Þ“xÑ“.½Š…ø¼(sá»î"Þª7¸?þù÷FŽÝ22]78Swh¦þÐTÝ¡)~ëR ˜l<4Ùì´9K¹ÿU´·Œpý ¦¿×‹_~’SÄ—þ»®GàI  ñò…·Rì²çŠñ¹¥¥ôyôÇ^|rìÄíN5šj“eºåðT“.•b¡™§Ý™Ïͤsç„ï¨oF™'îb.ºøò˸·ïä3%ùž©_³ëNKo¢!Þ†X-èí×›EˆÏùæ;ðØ‹ß:rjÛàTÍáÙüO×éR)˜ªžm7^üÿ–A†‘KjbéV‹·ÿ×r”þ.—§FgM£ðû’ßâZmzMŽO7¢¸ÈÅD|aˆõ=»]\\Ä‹öå'G~yÇ‘é‡&[§›+Å{Õã 8™Š£Å/åÎØMRI—M^E¼²F-P(âóþ{aº$yâÅC­à3/í{í£#“©a\Â鯡©z]*Ç #3M5i´xû„Æ•wž›ÚÂÞzñæ.l/åý¾V®¶zñ¥¼ŠºïUX hˆﱘ§÷å´ùê“*ùì‹{‡Ol;4-.¡.g"ä.â-Û3&{Jî(QgÒöÖ2À/½\£ˆ_ô#ëÁŠøŠck™ðÄ ÐeÒÖrÐEót6Ÿ:ÉD7ãß›´ÊÒý(âKg{ÝsI- ˆ/bVÞaÌ6ä½xb5Ë’L]^öâó÷µzñ%ý‚ëνnE|å±µLt-ƒø¥ÜÿÕ)?âÓçó™‘ëüˆN#Á—´zñ^ž©, ˆWįΧë@¼s¨>áøª˜®ìºe)üüÓç£<…S&©“*Ô”Š0ºß[@¿:Àé§ñŽ˜K¡!CyCuþ-ˆç§ªªÊÈ7Ìz-qv¼"¾Ä ÑÝ—ÊŠx…õ*-€PÓyñU~}•!» Þ°Þzñ’]£ˆ/Õ7\÷ëq (âW ¸2ÄKw6£¡&ﳋ#ŸÇºõëqáñnõ8bôôKkE¼"~uÈkñV¨1*gDŸ±ÒͲ¯yñ¥ýŽëÞ=mEüê§ŸRÄkO£³RN^¯°^ñŠøJ¡œ§S¿:Àé§ñŠxO£³RN^¯°^ñŠøJ¡œ§S¿:Àé§ñŠxO£³RN^¯°^ñŠøJ¡œ§S¿:Àé§ñŠxO£³RNÞ;ˆ?0Y78+½aM6Òdjx¶õÀDÍÐlãAÞ—žStŽm;<Ózx¦™I=ðëàdíà }eë‡f›ø Óyñ>d?4S+MƧiRØb»ÑÚîHÆëGæÚN4±—¡YZoמ–­íŸL Î5dûsí¬|`¢…n¨ìèJë—Û ¢ˆWÄW å<}œÞA<üýþë±Ã³5ƒsµ`Ý "§gS`wÿ醃ã­§šAüÁiÖÂõ ž5YFδ˜¨…¿–õ—_loqƒï|ó¿™êÃ3ÕŒ"Œ%ƒ3u¼>8•¤E-ƒ‡]‡ÁæÐ”lŸ×ð}ÿD|h®öŠë—n"ëeÏW¯ˆ÷4:+å佂ø©–C“Gæ>Œ¿,¾¼Ð664'Þ?^=ö+ñ¸,‹¼0n»ë¹ƒ`øåyŸßW@Ù8öƶypÂê3"ýó›wéù+2‘Æ\ü}ÖW-þZ¾SZLøZ¬§Ÿ­` xñÓ ƒ“‡Ç›F¦Û†§Z‘Dö½^;8Ý*!ÖÉvh‹otù|@<2×a¡o)Üqðqáß7âº,ӻм܇fÚŒ78Ýqh¢cxºñÐDêè­ƒ¢Þ4àÈï;]m|+ú¿ÏúŠøkùš)â¯ÅzúÙ ¶€G?4Õ42Ó2<Ù24ÑÈrh¼vlG[4‡Ã³ ’ c²\ pÅs‡¹H(–õîW ·â›O›EòjÐgbªMLµeh’A¥]ö>Ýx˜Ñ‚팧@<Ï &†ßh<8b}FÖgÔ¹ìúC¾r¤·½ 5*ÔT0ø¼sè^AüÉmNÂûù“Ã'ožªk8„ªnDˆì|È9<µéàÄO òJöä{ã®ÎMŽë×_Æ¡Î#¾%zIÌ«çCS ð{*5xò£NÊþùÞÁc;F¦;QŠØ ûbˤN¢Îçó|.·þèT§MÁ,ŸE¯ˆ÷'+øL=‚øáÛhA÷ì‹{GOl"mq&A®$Ø1ùï¢ÆLÖIZúdãÈL“èõÓ©§'“ º’DÏ2×È0@JåÐtçñÆ#³mƒµÃSµ‡ÏTKnÌDÏûØO“ÉáI‘$mfßiTšŽÑ‰¦áɆLÖMÞî$£¯ Œ»eTü}yh ǹёçBSíG§Îð@ ÁØ#Óõ#Ó5û&k½Ñt`&µo*õôtÝ2ú'›†§›Ç&kŸyõcNÄùáó{_ßÊ.~0Û¶º]BÄï“ܹFã„"^_ÁàóΡ{ñÇw8açÙçÿ‡áã;DAv'Ä:Ù:<¹jï{]ôIQŸhšlAB9:×>6Þô£Ù“ÂØ€ãâGfR’ØŽ»=Ó°oVÈ‹þƒ¾¿¶wF¦G^ožlâãûgë÷ÍÕï?ƒ°Swt²æÙñê£3 c'n¦GÒ³/õœºãÀxçÁ©‡ðͧëñâ=ÁÆä§ÇSò0[Ç?G&b‡N…ü¿7<=ÎÀÓˆ#ÏÁØLóàxó³íOU?sjÛ|æùoÛ‚EŒåà$‘›¾Y,Ç_¯ˆ÷'+øL½‚x¼xPøÒÞáÛ%÷|p×_£üvþµƒÿ>:Û:8UƒO=2[+§“²<¾•x)AZçj†H 4¡Z( š8·aôt3X·-îXÆŽo;Bu®þûÓ5‡æj†OlÁËv^œèþñ•€?zô¹§F^ßvp¶öàlµ¨ö®?U¾‡ð¾ ˜8íÈÉÛŒ×ÿÝïmç8BgƒÙ ýóBÎàs}‡NîãL8NÀqü¾¾øÝ£¯n;2ÕréµgÚ]¥¨HÚŽ"^_ÁàóΡ{ñÛjñ'o†ªH¤™Þ²¡* X—™G“ü³Ùisœ¸3öŸÿÇÃ'·œº€Ž¼Ø?4±Ý5ðdT}ýà{äOø§›‡mgýg^þû±Û¾¾•õ‡_Ú½ÿØ-„g‘YœÍÎØëÍÏLuâz Ž­Xtl1U2yd™jÊ 5yÄ7PϹF†ž"èñ;c¯Ý1<Õ!cÆt»-ÃP$çÝݬ"^_ÁàóΡ{ñÆ‹áïD‹GÊ rºO¬“öŽP#õa¦k­PCFãN=âø«·úbÎO_þû‘ã·Ú¼—Áã2Tüøçß<~Å÷gý±¹š¡ñP&ˆŠ^Ï` šøñÛ  ¿5zj‡¤âÌÕŽœ¾ÿÙ—Ÿ=uz½©SÆÃDÃr¸U†HÀÐlçà4©úƒ¿¼U°þÜBÄ£ì7êüèåÿž¸1ó`‘€ÄaŸh8ròóþÞ¡ãÛö“ Š>C–åfŠž~£ˆWÄ{‡“|¦žBü³/|Dšp+I/H4BUñ£?윉#Ê3 Í]&CMµD4ÁÌçú€² þL£Óéà›ÿøù§ÿÓ-èãâõ£ÂÇ'v‚üæ¯!8~àÄÖáSÛEI~÷áccÀñäÕ¡æ©ÃÇo:#5jØ5î¿ ~¦Z­Sdj¶PÞ@2å§šŽœ¸KðýÊßߎ $!_ö…òö³£#?ïGÓçwF_Ø{ôõídÑH •Ò7o 7×bÅZ ëäx¢NÁ_ÿ‘ÅüÈ;˯sYþ—a)í—D§>•Öþº÷’YÀ[ˆñ©Ñ·@[“QS‡ø>ÂLשÁút‡àu"zµ“•†þi{P~þïñ‘%Ô‰æþÒÞgŽß…c§Meùìléjf'™n¬ÇÓ"Ô„Ÿ¼ø]"®h8Ìi’w0^xrô$5’(Qfñ¶ÄñŒè6‡ì<,d¢SÛØã‘vž¼‹±„í#èÞ0|jãÑÉg“3rºî™ãwH¦Ð ß9ˆ¢:fò+s^ÅΣWÄ«_2l鎯ÞAüÐÉ-øÔ£x¾'·"©ã;Ãw hä ·Âkñ¤¤0ÊL%r%'jœØŽÏ@ÉÃá}©g0QGg&[‡Æ[LK¾üÈDÝ —Ó5$ד`ãltHf<þgLt}iÏЫ[-~0ÙxÐL¿úá+O ýÓV“÷‚Ø’DÃa 0}ÿd5Ðy‚ úºƒãÉÑÓbyá;GOÝNv&Ú+ŒLÔŒŒ‹XÏ“‰ðƒ§wXñgäÕíÏá¹–}Óf›™Q¥5…ßõ⯞ ºæº²€W£ãÎÑ—¾^N5N%ǦkFg:Ÿn§6™ˆ0“”¦.˜È&v+3`_ýˆô•þá×o½ìÎ2A©uäÄlmè•=‡Æ?64q« /=IDôè)É´yé[û_ßEg¿É;]'ˤ‘Y¢ÎÑžd¼a0`ú’”BC깑½Sù)¦vl u¨aøtÓØlÇ¡_ â¼ò­¡c;y«dd¾ðÝ#¿Üú 4©– H$çàÅÿÃóO=óÚ-<@ì—)WÇã„$ÿR…šå/«"~]aKOæê-àÄ‹NF¹? r9yå ãòzä{¾ö§âGOIQx ŸòzÚF©7i‹à[b§0ý¤†hBüýýSä_š ­UäYùµ­LAÚ7Ût€ìø‰j"¥&“Ý/yë?ý©ãw~ôŸ¿5xJBµÈ;DhQu$M³Úèø,$Ðó›:„Xùl­3öòÞÁ×äÉctÖ I§ÊÏÏþçÿ~äõÛ$­“ýrFUÎ_ùÎØñ;jzæWí©nVL¾«ÏWL…š«çŒ®Y2 xñ(3ÀGåxÆÌD%¯Å\Þƒvzu0’ñ’l3Ñ‚œ-Ó\gÚFgÚ‡ÇaˆÊJžâÐ\+–Tu—ˆã™™mÀk& fxBšŠ ¤0 ±…Rè0£gªáò33†ÆÅ[Ç1:Õrød#É‘" M´:ÝBö$² ^¹,¼@ê™fÆl Ó¯dµ×kMuLÙ‡:‹’c=gÚž>¶#¤|>"™”³Í,¦®™æÅ¿ç;¥^|É£;.­<‚x™²4—oèþNY`4ÛeÉtì“ÆLÒé ÅÎ’/?#µklö¡T)˜–öLT¡A`Ÿ‚3³’O% œšyØúƒÓŒÍ”±”@. ¤Æúû©8O1Ëÿ¹ñû“Õ#gšM½É:É1I5" q‚o©fLÿ¿)Ƙöƒ¯7@v¦AI9ŠÒPa‚&-ƒ3ÔTh=0Õ:üÆFy0uç%ÕòŒ½! hßdýâÀWìNµf96nU/¾´ìÒ½_•¼ƒx¦; ži>À´ *Ï6>×´b“P’ôöYÚgÛJA-þ5ФºïÈ0=&y/|>CmHxÚÆ"mWM1éåDB=)˜¦=7/¤å÷LœEšÄBðY’ß™Žd*˜N­T›!ùRCmÊH;Ù™†¯×޼Ðdâ%ˆg¤£7¤Þ‡.GØÂÖØ>>Oƒ“‘C“aqÕIÇœ“ŠéW$M¢æK±b¸ajÕš1ý"åG¯ˆ¿*ÄèJ¥µ€wrLLÇ(3ÉkèIŠäÈ™FÛ2›Œx¡¶ôÁ “éÈxÐFj y–#s©Ãs)>8Bzåx«€[²Ýk'¤7Â=Î>‘XCðúCsuÁ=œL]03ý•¹Qøì²M¼lAÿ\#:þ𯀸pï~ßël–¾ƒ”?8žM’‹Ée´˜ŽËœ[éO"Ç ±ÙéF2#‡O·~]Æ$é$5ÃïV£êTSASíšQSZ¶èÞËÂÞA|žÂèïHçSƒèãR(¸ž¸ð¶)6þ2þ¯¸ÀÓíù÷¥ä/By5‹DVñ¦'£p–"b‚~dzSŸÒÔ?¨E~AoAŠA¨‘ø­a¤ÕÔD½i +húìwª‘,x©‰Æ1ÑŒôÏ0#M¦ÐÜÇ[ùˆºÐD›TĜݰŸ½œaÈ1Ýä IÃþ¹ä¡3Iž¤°m`Išœã×¼xE|Y F¢´ðâW˜aB­˜$Žö¾qÔ”–ú‘_µ|ÿt ˆ—¬¨:ðºCæ+MÖ™ªH‘//}ûNQÆ43fkm’z2R¸…Dxf*™YQÌ“aGf¢Òv†Ú¿t”|?…ˆ'¥ D›…Ñ-xâÌŒ¥bÿ ¿XúŒÖ¨‘\GDjJË.ÝûUY@YtÂÖ#ô÷OI¢ SÍ¢‰ÏÖ훈#¸tµm]ysp®ýàlç!pob§`z?š;å‚ ŸÎ!È´ï›h&ôJ±bb§De÷O›F"T„Ÿk"áR¼oæÇN×ñ nþ,>mT„—Ål ¿Ø.ù*ÆÕâñW…]©´PÄ_–nÒ%*f2Щ·Dt7þë£Vð霉©’3!EfœJêD$a±… ŸÁ=§T;S«$ gVÊÓKù0Sœ@§“I’ëññ%RÊgM𣠏óˆ<m’Ê9§^Œÿ>[t¯|¥”WÄ+âKË.ÝûUY@Y´QùËÌýÞè«2•Éf¹0}”Š4ƒ§¨Ó.ÙëèdRGæm$yFz%¥˜çÑɛą—`¬„^ÉÕi'Z;:Õa{ºÚÅŽÒ|JrøMĤ|ñºM ï˜Á£¼(¯ˆWÄ_bt¥ÒZ@Ä›â½T¦‰ðg¥‹ÅÈžë;rü6 ÕÎÑ„/qøt-¡Q1e¡3ÔT: õ¦.oÖ£Ì3ü«š¼Aœ!‡Ý$×72Ojp\|v‰Ê2 ÞN®ÎxÇ‘¹M£¦L1ù3ð½ÜànG¯ˆ/-»tïWeEü„)<@ŸÕá×n–¨é¬È,(0R˜LêG~{èŸn¥Ä ùòN«S•rªL1Ý¿ø-ºñ1¯jt®NÊDò% ~úóÇÿŒ©O¤`Rc *L!ª)8#?ÿÎàkw’Þ#Ê SUgSRÏ’rÁqçðk[A<Ð?2GkYI¦,79^¯ˆ¿*ÄèJ¥µ€"þ ˆ75&Ÿÿû£'ï>tšvа7#×Hñ¯ñ†£L€"ú …“Îà/¾{èÄ6’÷h:@QøôíR¤ìÅ=#“w§}z\Š‘˜Ù44w#s¦zpÌ¥ÁÓtµT¬”JµhúÃôx¢òû+{GNìÐñ?‘ª5)gÿ±­dÚ0'Öt˜*nY±•>+(âñ¥e—îýª, ˆ¿¢—Jetß t•ÁÄïvœ#/}ûàÄm?˜©#—F´r’QÞ¥æÅ{¥A E†GÿË6Ú"òzíV)b3'å ˜%½Xãþ ¶»ÌZšl;! ¸‡_¡ŠýpÏ:>#㣧[G&7P•^¤›) Ä™¥ˆ¿ª;úò+išk0ž~´’-píˆg üd2ïÛÖ'+6â—ü—@Ù²ª¥‘Å,ót˜T^гhîøÔ/÷8± þàÕç”@ëdR$÷1+J¡õ4tE®‘ŠqgøØ–gOÝ%][_ü.ªèß/%eÚÃ¥^¼i>xj;’ýðéÔ3¯m‘w^yjðäG˜7Ë,'©a “¡¤Ž<5јÄÄ.ÊP‘W/^½øJ&ŸgŽýÚ_÷|c·Kþ“ïòfz¿ñ Øïsþáçß|m 寙ï³R¡ ¨ë½¶½*äüô¹ï={ìîá×[O·ŽM¶ã¡}u} ~òÒSG_Ý:zLÚg;Á(•?|iÏmÇï¦ÇÓgšiÍ!…)#ÌÙúðÜ÷ÐÞ^¬þçî 8UÇïçÁ῾±ŸK:qßè•=0g2jf0sþ/"ûHÑ´IéÔZì+µ§"^ïLVò‰® âÓé´uä}>Ÿ¸é—zô^|6±^ü3/ìÁ‹§‹S7Ëmö¦­ó~ôùþ¡×n“Y¬o4ážk”öܸê?£éö6òÖ™Eé²§¬Áz¦õéID˜†Rê`Šl÷ä¡Ùþ8©ŽœØjõÑõ›øê>Jºóìb €ré5Ý!5§h Òð,ƒáVñßÉÀÙ ¾ØÂ¾©ÄÓ3ÉÌ&¤Jå S«GNÝÁ }b‰š›âŸYRù’0lñÛm¯È>šÏM®ˆ¯dòyæØ¯ñ®Ãèˆ¡Æ ·þø•oQ'Àzñå¶Hƒ”m(¿¼ªò=·ç豕öL5Cˆ6hñUÇä…¤ÌØ‘zÅ3”,®s:§Æ¶Ü }þ»‡Žß.édËБ•À,j|Ð}±÷èë[©kvt²cð”L›BÍ'džÑåðIiNk*™F;]¯5×ò¥ÔŒšk±ž~¶‚-p툗T™eY†/’}ý~B 5™¬Õâ!)¬í¸Tn”ß?^M„ÀÔ}”Êìƒ4á{cÓáéSm¸ ˆ³˜‚-Ò„ 3ÓqTšƒRB²NÜü Þ©>x¦‰®O„L©-, Lq`&@IÛ¦3mß?…$õøúÌíAÆR’)¯xýÓM„y¿Îö©k¯ˆ¿–¯™"þZ¬§Ÿ­` ¬ âÝ+_$ëÂ_ìÈ_¤Å$MJ‰vT,7Äçû©Ò0Ï´ýƒÂ´òëCÓI@ ÜG¦;mñéBÞ'à§nA‹¨óSµ0šª5,G¦)nc‹”Iî£é#(å &ë8{‘–ßRi’KÁú}T$¦óÔt«"ž®¡CH¦Ó¨P£BMSÏS‡¾Vˆÿ€í\!//~µ‰"¶ð õÛ)è(ŠöTbd.14“o—ÎvS¤““…"7ü}ŸŒCiÖ:+åÁ–t^½^Ïìˆ]Û9<+¸Çp¥¡No(_<Ž®Õ.Ëh5Kq4.é,HêŽüæAºúI=Ëb™nU-ÞS¨¬Ô“­TÄÓV[º°¶=}ºZð--­[×K=H—‡;°£Ç©¼yEêIlÃY Üë#Ù>Sv§ROØÃû<ÍXÄ›¾T HÌ$H‘ÆCQ3A¹¥MÊKËýâR^¯ˆ¯Têyê¸+ñä)J“Õæ‚"g/÷³nÀ±ÍóN0g|[á;~ýû AäóØéµèJ¯¡k,©2¦—SÞ%7ºÿ•“GmpéîMâ>ý»9kº,2CxëÆ©WÄ¿÷k¬Z¼§°¦'[°n¢£×þ¸þB *öÁñ88“¢êS’´.€ž”.z]”t©ëK…^S£ñʈw©*ÝŒ`’ïãZä<ŸBž×LñÓ˜ÚÒ£¬™p4?4‹$-Â…ôÖ0¥Û¥$äû"WÚFS­ oc¿×A‘wËòp츻êüe‘* 9¬6[Í"”Ÿ á_›Ñâ—åøeÐËÀö¾O-kBE¼"¾§‡X©ˆ?!Sžýùÿsôµ»ðX)·ûôx„U%Þh[ æ å%Ýå}­€• t8ëzñV_¾ÏFl˜—ßøïîîlöÒ…saâµ F&ÛGOí ÔðàÏ{GNÿûÓóB ´æ—<ô‹;Û@¯ˆW~V€*ñR 2éŒ>ÿø‘“7SÑ÷àDÓØ¯6“w(1É.–Å ©=@§l©p…$ÜgoÓi -ÿ¼g×úìˆ25ì”9®’}ož$®$Ô Q¥2áüè¿|—J–T°áñ…„K)x0C´™šs‚ÕÔÑç›]£áÖ‚ïßµK‘vc…ßE|N±boZv¼ð#¯m#ë¢!ǃxB¯ðÇö‚MÞú ©5’JxYFƒWf¥â¹»™‹×Á…—¼rfH½ÑÊoû aß¹’@d?òüÀÑ;L5y)XfºJJ“jϵ§Í¾XÛéÒ­©¯ˆW~V€*ñTtyñ©1ªÜäÈÔÿ¦x¯Tlß:ôªÔ‰”šÅ øy •F^Û&ÂÎǤº/ïV¾ô=i:Ý ˜ÏÎÖï£æÀ©[Mµ(0pøøÍƒst}ªuþ U$«‡ú3”3yí¶!Ä"z3ùÙdðÙ¾}ðÄGÌ$'ãGoeø©ò…ù?-D»ßœ‚ÀRÓ†ã4 ÿ(xpøµ?a_a'\¤<ï<õ±ýgö±f›ãð—õþñ¹Ý#'·JÃ?[š¸ÊùÑ~DU…Ÿül`ìøŸJ#oÚþ&ÍFL±ß_þîðk·HW)åéDJ)pœ çÈ«·üˆâ¦{‰}¬±O<ºXyxV¯ˆ¯Àé!V(âGMQßg^:}‹à/.ÕA9µm9°¡ÛqŠŸ™l¡ê óHG(ùv£mŬŸ®‘2aSMÒqiºñàé ˜ú‘Õ¦A3Pœ`zQ“à P"•¼ò½ÑcÛèÍ-ÕibΑS· OUÛA‚†Ó-£g6 X™%âxŒV’ú"¦‚|µ3ö‹~Š‹=sòNÀùÉsÿáwKë7êEMb6ìñ;¨óì/ž<ðêÇLÙé$µŸàêqÓüå¿:v×ðk.¯_ù.'+I¢“ÕH=Ô%¶ÙDr$§[8Ä$ö8ô‹þáSÛGÝÎ1ýìÛ<ÜÅ÷7ξM@"(½Â "E¼"^ùY¨XÄK±ß£Ï=u蘔ᥙê‘ÉÆÁéöÑ“wñþ^ù…Ý‘kFÇ;MÎà }V? âôÜ·†ŽßE¦ÃÌ:µ…2a£/ HQÉ ʇ_½t}á[£¯ßN-ý3-OÜÇŸyáï‡iÇŠœrºad¼yäÌÆCÇn €ûçFð»%_S=öº`”¾NøÝƒS5”.xæ˜4ùûñϾõ#<ñÍصœËšGžß;<.ňæª).hB S@ŸZç$åò2` Nýø6bG_Ü9|òfqêcÎØó}ƒ'>vøø-RŸò¥ï”²ÌLÚª;y+ýÑËO þR|K=ÏLûÑwðþ_Ù=têfQí…ò¢í˜œz J¯T»WÄ+â+pzˆŠøaú RÏýåÿqäØÁÉÄàlrp*4râ#RÏýåoÜ:2]GAÐ ÎÆ^ß"vL´Ðk{ßñ›¥ußK{„‰ûi‘NªôV}©oäø­¤'ÎÕá^9ùo/œéxzª‰~Ü‚Kž!N|”€§m²¶~èõ¬ÿÓ—¿wøøê‘š«ÛìÖ~ñ[ûáò¿u~0K©2ò›ä°Žþ§oƒf))Šø«¡†[¯ÆJºNY Ro Kiß1Jø"ML7#S ÀH+2m^z­œ`¤#• ƒž…À>¶šORÞ½åڴ㨷m@DÒGdz†PíG_úîÈk[¥k+ùòEy&@ö¸/ýýÈ?m;BW™FÙ‰ùÇåý*'à ˆBOÛ“0}üªhaø])“(þc³u&cGÑ—ð¾Ÿï‰^Q¤öSìl®~ôõ[DUGk÷;G^þÞØ«wò22Qs„ãGfy‘òË[䉄siàðé[nž^yòÐÉ[yžœ8è¿w„¾TÔ¦ŸH’QŠ“.µŽT^FκٖñAM"6ks.U‹¿Êï¤"þ* ¥«•‹*ñϾü$®øàgdö>©4Þ9b¯€l¢vøL‡èì³íâõ‡úwÑîi¥4FÓ¥_Þú?}jôõ;A!oÆNK#ŽŸ¼´÷Èñ[ÆÐ¦'¤Èèéê‘S5£SÈ,(øc“ÍG¦ëÉÔ4ÊxŽ? i<`™h‘ æüä¿ì=ýÑ}ãS8EÕIºˆü`×}èÔ6ô–ƒ§«¥#¶ñ‹#ˆ§ž]/íEঊ/Š ®±àòåo1ü+¦•Ö:™úá)ÑèG~Ösd⨊$jþdý${“ÚHë>úùLm£ÿŸ4üÞ3Øf9NS<¹nôuÉùaˆ=y‡ŒLÓ°EB¯¯7PRíÓ û(N0Û ÃÏx=Ahú?z®w䨖g^¿Ëˆ6ßyöµíGÝ*rÓ » /ï?]Ç1HŠ[~©_$û-O0è0£s5C¯þ©D)^þöð©?;<³”7s$åTµø«üB*â¯ÒPºZ¹X b/²ÃØ ß>¶]šíMÊdŸC3í4W²È‘“;¤±êt«üu¢V„iRÉ´9E¸µepÖLwšLŽÎÕIFʇCêGá/)„(g[l/*y˜lBàÆ³æõ÷™cõF+aXÑâ ~¾2 Yù§ZòkN5£·HÏUÄ™ÊT-{?S¿o¢ZÄ„f´J áZô™ª¤xñƒ Qvh'2t¦”Û¨À3Ùð I™æ˜Žß1ˆšDÏK{Q“䉄×/~‡×’M?%2‘²?#ý¡Äë— emæM Ù‹wO(ø…'MAJ›KcTÑâW5¦²<ƒ þ~g¾ø°Û ëB‰Ê•i5ŠxE|N±r/.ódŠR‹[m&â5üV‘qh¯g=Þ‚ÏKmÛóO¤vª²ŒKÒ$T`—‰ûèBØ–§OÓû”ô¸çä5Ö¿ÈJ¢ÊÃ[æ÷þÓÒwÛ–)fG¦,¥$¥šN Í™.}L5⯔¡Ÿ“€Ûh)’¤ÜÑgØ;¯è¾Í‰ð‚5÷K*† ©9e|ùÓ$Û™ÛÄ „©C“Qvþj:€S¢ ‰;r:³¤xÖBv¢ÇÌ™Bÿa<0¶™ªf˜N ÎÅy4q»=§:ßk…Õ D £¨%¢2ÀD8L ó#ï,¿Îeù_†¥´ß5­4YZûëÞKfŠE¼ô<²´Â3=4±áÐDÆ!‚še"èyó诚 ¥3Ôj{ó‘Ù¶áñ: Ô¡¾Øén8’(‰íÓ7Ml¦Ž#býØ™Z2Ó€2B6>òÑ3›¤6ýLãè\đǡ–ìûi†>+}S·(à3 5¦#kò=xå`޼£-š8ã‡hôFW90ÞLz%§À‹±760xÈpÅø4—Ø:Àñ›â9ÕLyåðOo88ݾL¡3­è6¢ÞL'@¿4ÀBÒ™m~£sªƒÊ„8þV»PUXžf6ÄPÒ¸Ü6toº¦¬òŠxõâK†-ÝñÕ[ RO嬙ŽC“"Sˆêb´â)JÅõž”ˆ¥m  É¢“ˆ02!àcB?Xк¶ Q`ăžHÁqù§y8À‹·)(àž'(ŒâaUû§[§ˆ‹ÊŽòr ÷¤`@ëÈìFs mÏ.FÐGžZ.;\Ø&ŨYY;oE¼"þê9£k–Ì•‹x«M£˜¾‹j)Ý®Í W#oÒoV\~ à¸D)©'C꺼–´_DÒ`¬B‚l´u„”|FŠdjÑad›àÕô—ßs©Ó±A˜ ÙqÞg[ð¦YAF‘©$ ?ä·Ø„Fg¬„ Úù-!_q½Eô—Ę ‘ã%_¶,õßeûyçZ¦&™gêËWK=ƒj;2’ÎßB+(Ä77AW,F¦H.tþ³‘^¶Ï^òe„M‰ù ž»zñW÷Ԥɫ³“®U6¨TįPUX© ¡ë Ô‹W/¾l0¦re (â?eºÂe- ˆWÄ+Y+ÀŠx%øê, ˆWÄWàôñ«œ~J¯ˆW~V€ñ ëÕY@¯ˆ¯Àé!*âW8ý”"^¯ü¬ (âÖ«³€"^_€ÓCTįpú)E¼"^ùYPÄ+¬WgE¼"¾§‡¨ˆ_àôSŠxE¼ò³, ˆWX¯ÎŠxE|NQ¿:Àé§ñŠxågX@¯°^ñŠø œ¢"~u€ÓO)âñÊÏ °€"^a½: (âñ8=DEüê§ŸRį ñô6\È-.ås,™L.“%+ 2ió/阖—ò“•õù¯èŽ˜åý%&ÚŠf¡bÐa© ÐIÑñ_謘o°¨ÿ)´&s­„Ťó$ÿV9á*'€1±f6³$–ÇàæZ,åÒÙ…–ç*IƒJsUä‡Õ–ìë¥ÜKÁŸÊnLQÄ+¬WgEüÊŸçƒáõ…%Os 7p±|*B ¨Šø`ÈqbAçÝôçÎç6.æÚ—rr7,änZÌm\ʵgr­Ù\+/–rº\Ö™\'&Êåš³¹¦l®9#vÃ’­çsÍgs-oçÚþ˜ÛiuÂ!ÚûýN àݱVøÎkÆåÅ, Ä› Äõ²Êeù£ˆ_àôSŠø"Þ%»8}¸óKéÜb:7ŸËËÉoñí™ÌÒÒ/qÊÁúïþÛ?žÍ|n>×>ŸkNçZÏåZæs­‹B¨†\®Ú,¼[¼ÓšÖër% 0ømb1&ÂVM,Ù\]6×ÎÕårm‹™–t®#—Ûp>Ó¸”kM§?È%Ç©l†+•Í[ÌþžßvôÍÓ™Å\Ö^¾w ¿Òø¢ˆWX¯ÎŠøU ^ü>!š‹Õi,)ð …ú™4Ç“ÏæBNè¿}e>ý™ù¸Ùx>× ÙÐB¶=—»Ñ¢j!×Îr.×yNV×,8øº\Á˜Ñ,Í ¹Ö…\碘Qzr¹Ó )ÛžÉBùélóBËwþqá³Ñ°ƒ Ïõôy·=OS˜.£µ(jÖ/ËEüê§ŸRįñÂÁPY&/Üäå]Äy#Î,E~´‚ßÍÿÅ|®ã|¶-—ÛÙç³M¹ÜæÅL$Êf7eEs@“iXÊ5qf£uÞñ=u¹²¬wßi\x~ãÎ߀\Ãët®e!ÝŒ%;_¦ÍÙÜŒ¯é\ûÙ\{ªÑ Á¼(ôi#Ô-Þ ©”%ÜóB“‘ÿˆ<\ã1~ÀPa„*û¤j]‚Ͼ¸wøÄ¶÷4‰Öެ•cEüJÏmÓç:{Ëb®|!Pf–øK ä¼™ùÌÛ9ƒ¶EÁ7.g zBq&˜wáj ¬ÏenÈe÷pŠ•uù ðˆÃ(ÈÐhGGÌÈoy‘¥«i>ËûPþp>S¿”«[dYBchM5sÅÇ/DÃó<ìçcç×Ñâ|\½xõÇWgEü g“¡Š·n£K!7ê8oÿúϧ?™Éµ¡Ás8ìàÄ¿!›Û´˜I  g!×p>×d%£Î³´_—ËZ€§œ<З=}ìÆ¸HÐufdŒ”''y±ÙDbEï·Ve=þžXÈÉeß5áÅL"û4V®J"~u€ÓO)âWˆxe¼Ýj5V‘‡ôèg3_8Ó¶”FŸÅ`IÜyùvÄÀdy„ÈÀ"þ»qíó b¼T]®dCvt?Ýd"奛l®-“m3öl!ôšË ÈË˵H ëÛÞ•õoD¾¯màºOpÑŒX#©®rMí?Ê2«F¯°^ñ+Fį2°ƒ¡*û'@– naÁ¼m}³,,Àõ¤xŸ½jUU~ŸÏÌ ·‹a¿¹“óaÆëvW_º£r@ürhN¦JfPâç3 ó¹ó¾„sné&m¬#µoZÈJpÏ$AêR2 ˜K þ;nж8ŒÄ7Íg7œ]ú«pÌYL3ZŸËJ–Ôø²ðe.½õ‹ŒxœñÜ—#L’3fŸN󦱊›z”Í2³ÏÕ´Ä”zúS¶‚s‰dq>'â8(,ÔMY=ˆ·“BJ}û—âñÛó·»L˜avëÞÍ¿¼ùòüÂ3±Å‘7‚rÁŠøZÀ$ÒŒežTÝù\Í¢èf¢Û˜÷[æç?e嚥S=ñMôšRßæ—s¢Šˆø bæ¾6jˆ_Ìœ³ïFÆ™ÏfyÊ1iyt½`¢üƒ¾R¾\ /|þ‰K*b|þl·nýG/Þ¦–øþ/ ÄK|.#™vi™/ßž_ßüíÏ/|f)#‘U  üžÍâËã3Ö¦”Ìõø®O^Ó&²hLb¥Y&…"Ha"Íé|®-ÖÊý}:ÿœjV†?EDü²{îžµû†D\Cƒ€µ¬ç±Þ.fnTéoÐçW…¦L- Êšã'ÊŠªFDA;Êšqáy½¬Õä½øR£Êñ2»ÕÈñòC¼•=îT½óß~6¿ôIt’7(NpVJ|h)³!+sp4£¦”#Üòœa®‚Ô,3‹L1ýä;1÷8Õâg%­&ù2$|3j “€ ž`ˆ9ç©¶xÛrV †¿g«¹‰¶,vË”sžˆo€.L7ˆw‚Aa½ùò,bœ‚`{)ïÿr@¼¹Áŵ19eK¹XØ!Q÷l®íœWI—¤Ê‰ðHR9Ò†ût)•lFú´Ì÷¼/ÏcV.×Q×Èý}‚ÜÁ¼WÊ;üŠû.¾¿Êk³µµA<°Œx£Å—CJÁ¾;åƒøÂX+kaA¯?d7ʾà+L”*Â?h»Šø‹Ñ&)ÞBpÜd!)~4H5Þ.õÓëÓ¹F|dgê·œ/¸KåæôŸÍÖšô’¦sâ\Ëü~›ß òH ² ÅsŒ×,BDzúy“‡ƒFöÂŽçå… fí¦ì ²»tnãYöÎÓƒø½!»ÐlÖ¤hÙÊÄãX7~=‡±§Ä.›ú² m ¶¾ñÁWÏw3H¸'Â"¢<Ûbö ±8·¸ ÞÎ÷)ßòA¼5ŽÌ6&³ž þT¢ìðÌ‘3B»êJ{ó+â/E<¼&¨ ¹.K3ñ€y $Þ$µÒ¦HKVê\"æ@Oã8óBÔ“M(õ/atw> Ð…õç–p½;ŒÎ#‚”ýè >J dÜy3˜ÏJeötzƒ]ìú¦æZë»ÙZ¶ ¦MÝGdÞÄUçh[³$5”»ðQ„ÕŒL$PΪ4¦Ž˜}áÖ ¦.Íê)_ˆx£Ò0œ´œ_ú\(ì˜<À2H .{/²»8`Hä; -,ô§‚,ÀØì:ò Þ:8%/ᡈ¿Œ@AŸ#(Oi3ï|.Û !^*EŒs @e\ £¢àKÙèIæ>‚Œ©Œ&=Ì¥Õ,ž7²8õQcŒN‚<®©ÇÛÀb Üg™¾›åù`ó»yÝœnVÒÐJ˜ŒÐŸäѳ¤>NÿB‰E›h#Œ­F£Ç­Þðn®…ê`,f_"‘K¥¬Ô‰4‹{ÊùO×2[¸ñvÛ?·øY¯^üŠÜ7׋·Þ«Î~ªP/ÞUØVtõ‹·²"þ2Z¼¸¢RG¢ ¼ò"ÊÏ6nŠÑš`ºß …œs™¿ÁÁÙøøó¹¥EFX"í!'ð‡ßüüóŸ„w (*ó_ ³ßøS$äïoRËeލq®›MõcdŸöwÎßC1/:‹G_Ôartð­·þËüâçL¼´ó…ÏnõEi  8i¹¦ý8;ýùOQ£ ¯áü§SJ$UÅàÛÿü2û">œ‘Ú> <7±Øî}Ëák Û®âñâ åóˆ7âC>;°xwðª·\>B=ûÛzñîó~%bγÇl6~Cy®  ±¨Ÿÿ†4à.yF ÌÅùÅ7'’‰€N¾fÃ;¹ÖX»SEm9jÊÙ¼XúT3õ¡ÊùÍoþq~‘O\þöd³J䳩aç|æ¯ð  {ÖÕ;Ñ"á E%_h¹„½ZL‡B|žÎ/}6žé9îT1$ð‰~ëùw–>OÔ÷\îÆ?ÌÿŸw©o'l™9-¯ò”wÂoþúÅs™Ï½³ôvͳ>ï¿ùëçß=ÿ…LîC& | 3y¤(¼iŒuMó ½xQ„²2dž]ø ^¼ ·jFÍÕ B2dù§L4Ü«9l]§ÐöÂñÛÕg. ¤—Ä\êÅ_ìÅãÞ¾kÒM$Ø­Kg>EŸÒtvœßÒœdñÐ?ŸéÜLÖO„ÅEja¢Å7’ŽNÙ 0Ž8 ÷d³è0ͼŸ`6—©]ûÞMÚÚ¢öˆæ¶cª¡mKSƒluÞžÿ<ŸâE$"µzsDP›çç?çÈû_¿ùÃùôç¨Û³”ë¨nvÈ4…ìo/Üónú³U1S0£Êyów/œÍJŸ[+ýÛY©Ì“Ú¿²Ó|²æªÓi. ·‚ø‹¼x7 ¼$7÷ûï´Ü¼x‹ƒ2qýÊðzUÄ!¹L/Œ¯”öÈñ—"¾õÝ\ÃÙ\ã¼܈0õµM‚]–·ÏßøE©oǹ™yçŸÿ³ùóŸk¬s"ˆ,âê;Áô§^_wòbfI@í?,ý¥éW•¾R>“P­húÙ õ Ž?" ïf>YÝäDcî?,}âÝõß>Îc«¾õÖÏÞ=ÿFÀÙ\ÝàTñôsþ¸pϹôçÙ…ùñýöÍÎ.|Úfè»_–hlWÛk]. ·2ŠœÏ4[-Þ‹’ñi«2—Ïõ¶ø6òÃcµû4½Ò#t¿Ï¼pÃk¥ý>ëÞÕY@iFM'eHF”i‰¼•éøp6vÒ³îïf€ò†w?mr|¿ÿÍ çÿ¿;š¿“ýTõ&‡¸è9©Ž¹±¥×­©&ÈÄ®EÄ“ÍÒóz‘üÈ&¤hè”ÒD«©m•}1œ,žûtKƒ<%Ä"ÎÒâ@í!ÿìÙOÄDÆ‘ÉÓ¿þõ+è!Ò‰)×ÔÂ~C¢ò§sŸ?»ð©R!ÞdýKš¦Í¨YZ²é4¥Ÿàwé×Þ¥3_+’¬N3µäüv§º¬n; &µ@‘, ˆ¿LÒd6Ó(Ì͈ì@.M]«ã:Ô¯wñ³aD>Ih°1$sñ€ó/xî­¥{jZ…ÎDeÓU×àýÿýŸÿ5äþìâ¿Ç+²ˆÈ)|o×ÌNBñßüv®ùì§Ä?÷ËÖð¾ñ…ú/Ëûí³g3Ÿ8Ÿþ‘UÑô¥(†DüÐÞo^"ËüúÅóç>?î¯K…x JgI•¤ÉHÔI§óÕTWê{} tKù@ P8¹tE».üN–ÏlÆ"‘B7[¡PÄ_ñ"U§%Þ$¤7 Ô ˆ£À,žÿ|.»ñÝEr™X´áís ¯MŽTð­7ë[Ä…‡°ççÿ¦ÙxÖ¿þ?þ?ˆ6ÄZ—2_úQr]¢Ò–G2vØ8¦˜µÄ°ñöâg磻°þÍOáû¹ùÏt)oäs~ûûiP΃[ðˆeTal1¥2ˆà¿ÿ!ó2,¥˜OæžR!~¹Y‡õâÍW¢§>¹é‰ŸûX…÷}ÙíT(ô°×«ñ—£EB‘å_ý!M! 4ž†Ñ±€söü§Íü&ÞlbŠé»çEG6!…ò­7_X\üB ÐÇåÿãü§¨ÓÂ_ý_ÿ™5xg!÷…†ññyóíw?ÉSÂbšJ#0©JJ»É(¹Å¯Â)''’V¢ÉœÐïþå¥ù³Ÿ=ûî§lŒPãûÝ[/½½ô“b/µ 2i‰ðú Ÿ65¥ÑâÉ1-̨±áÖ¹Æ×ae÷ËŒDc¿®V³¢½_äÅ»Oëz^•hEüeϬ%¢ˆç3$±ˆŠ‚÷Àbeüoýúùw?E¥°l®¦™p¨(ã¤OF~÷Ûÿ‰÷SÍN4)”Ç£?Ÿû”/.ÕFPôÿû‡ÿüÛy>жÍÉÅ4)Œ]‰ë6òÜPGP7ˆ_"Û=ߌçÛd€æ¿Qg1óEòë%lK|7à¼ùæ?üa¼{æÖnÊH¶û ć)©O¸µTˆG¨±uâÞÿ4BM*-ßÂYEv¢Êµ„a …éí•È=æuiEü¥5èìÒ».½Øž[$é¥yqá Ò…ÁÿúÖ/~½ðYJÄ ³€lšØÁÓsKI $"Ÿxîü“4˜³óIÿ#DtóPUð7ÿò³ÌÒgëeŽì;—þ…ÆXˆÁ2‡Ö8ò- ¤`d97ÏD'f¢Ê Xä zöÂ$(‚´çÿ"ýç‘æ·¿ýÉùÅO¤³„ :—šMf¤Ô)[˜/YF@Œ¡P¨)Ïp«ý2ÛL˜ÅEé´·ºWÞᢸs—V·)ý”Z PÄ_F‹_n.s HŽ”6¹Öšf3sÕ$½#¯3¹4(²¹ó»7_xg(߈Ø"’86óWÒ2ýGF¦G½õ3’ªQç#ñųEÆŽ)^ÆXÒDî<å0ÈzdáiÀ–é¯ÔN ØË3Û\ÌÜûîÙ/˜4M ´²M¥’üCª%[#{}_¤óÁq–D¨Á‹?Ÿfêl>£ÆR´ §>Êî6LZ8óèê¿fîv.J¾¼ú-èšjb[@1⥊€a—Zê¦. Ef:ß]ü¼™Ö´\ÿ“¹øIjœË5“JOÔ±%“pëüÂ_ÏŸÿ+^@Û……ÏŠþû\{¨ÝIFdÐyw¯M¿“òa(û¤9JXÕŒo¾ù³s‹÷˜4ùê‘áãŸÍ|>Ô­rþÿó÷ÑgFš½;¿ûíÏÞNöœ©õhËÍ›Jú­Œ.húäq’çIŽ ‰:ïòf¾À¤´ßcÊ•)—&UlÍúkÉŽ¿hvkaî]-`Pì/°n_-ðþPÄ_&/žºð¹ÌM¹,%‘J¤-‰¥!‰4¤KšþSˆÎ,&Ô™éI‡¢¾Âk©f¼éQÙ†Ìz©E¼tC.û!R ™ëDæ;þþrŠÉ—¯¦:M+ÊÏ»¹Moç6ð‚Jm©zÆ®y8^@Ùöô üKÁŽÄ¶F1…¨eFý[Q’ RRXª 3G—°°?3‡9rJ2ØaÀVM¸Âô¬lJT®žòŠøµš%«¨R ÊøË&cžb¿2ïßÑŸ_Bìîç²›¡9ÕA§ ÉvæLµ¦J™ÎxÍõÄQ39„òö¥l«ÑdnJg¥³R5°F7—z¿9éïÁ6—2 ’Œo>nþ$ì¦|˜qÏ% Íž¨Kœ‘yª ,fkw³Ø³ñLÇí´•2Míby¡¸‚¢îf­t­2ãÁZv}²ÃŒ–!+ÆU·©Xñ—:°H40êâÛç¥Rå$éÇd* |!µíÛ'Íÿ`ú¼i³G§Žwen”a7G‘L²ìÍ´))JcÐL`a.j;~´™¼ºÙ ÒRƒg|ySkL ÖÏ27J’pðô~v^ÖDdGÞÉ#¥û‡ŒÂ_ÆÓ¯ƒØé¦w—šé-E^ ÓkÙþBFzÉššï7.dÜË£‹¼6€–V!¦(?L幌¸ê¦‰à óÙMg—ä1¬##A<ËÆ\æÓ­pmZ‚¨_쯫n_-°R (â/§Å‹ðÜ¡0¿å@§ž/5Ȥó_¦F‹ /ý¡¤cŸ‘Ë›25ˆ*¦) òˆé…Fî%ùÒöYÅ[çMðŠÎgIf'– yyV¨C"÷…[ˆœAÃé I7B¡ c†4È6ê·Ý, 9ôõ–'£?”dÜ^êÑ›0ú*tjµÝHÞûñUÊñªÅ«¿Rèèú×ÓŠøË¢M i¼`©1`«Ê £yq½o4¸ÅõƯ§ ¥ñ©vsoZ0©“$³“]c;h,Eç1–Ϋ¦hROçBÚV”÷QlHø«i2%}šxE^¶“•†¨RcR-!SzvgøÎ;¶Ó·UÀݼsÙv†«Ï0ØIæD$;Ètå¶'h[u«¿ú/"~õ¶ÓOߊøK/SŸòq˼=£&DŠbzûÁPÉ1Ù5$ºH©²h ¬qêµxè¶ó†)9IöºHùÚTl—|R3Ñp—ŒoL@)"oAoi¤Õ†Í¨±É”R -ËN%Äj;².ËJ‚r4F ›Oi¼uàNÄU$Ó'–Å*6š4iké¬þG¿zÛé'‹o²@|–B&ÙÜB.·Hì*—!ýœ¶pB™TÑ”Ý×âr^K\Q?k-`.Š4ª•;’TJèXZJÉ# K7Õ7ÂÍ ®%¥&¥[]Yþ¬š×j;ei$=¨Š·@9 >“Ë2ƒ|)ËH§‹x©„n[K[/ÕÊÇâšä¿kJQX_›ä)Ç D&lK”B’;%©”ª ©ÇÐ(ˆ?)S[s‹î²,¿Vh^«íT/ñɼÃn&ÙÛp¢zñ%lŒš/‚(Š8™%K˜ .ÉB$}n¦àZ.w ~)}Ϋïœèy–ŸÊñò¿$M>̓ýRA~‰6¿ÿõOÏ/ÐeɿШ¸¢›=RbÌyùÀˆ32aÊεC¯-„`zŽ7Ñ2…Л֋/g1~­–µÚNùÁAh=X oì˜Í_Ê.ˆ/Ó>ÿïÞ|ñÜ¢ð2dgš˜ÕâK;Â埥lV¨)ẘR9¸öñÂøï¹¥ÕWê-îl­Ð¼VÛ)îÙêÖ½j²@|?~Y²5 5s¶/ˆ_gÐgDóõ²û\6ç.sÌ«|Î¥©Ê`çwΟÿ\’–~ó^‘D)?/Ï/×Z¡y­¶SžVÒ£ªt ”âA*ÅÿËæBNðwÿõÅw?kªø2wŸ¹›¿,ÝòÚüG>伕þ¥`(Æ{^ÊrÝHa/3•Ÿ¤=êmI÷ù À‡æÓàžbŠÐÇ:ËvZ?­«mÎúð K<™ú ·Ô¾§b”ï|7×FÛB%…êLjµ³Z¹Š6´R–?kå}¯ÕvÊÒHzPoÒ#ȽË-£!oWÀìíîþðÖKg>c\EiŽaR°Ï/6ÚzèK¹Úù\‘elúL’2éÛRôQµûµá¤hÏL”±\Xl;ö¯ãA'/È04Kö«¹¢™¢­Ëôk…æµÚNųDO ,-PzÄYƨµ ¢Ã›ø€KétšÊ¿ùÝ‹o-ý%åp©åk’¯M‹»,Sç¥ÿ‘™Z‰OáF›é!y–¶ñ…]ÖpžÞ ÷Ä@+*|F ÔœËþEUÜYB…—PŠT,@dËeÏ3<_4d—ÕW`­Ð¼VÛ)+ãèÁ¬ ”âá:s çß z±°ñþ2™ì¼i]í{ëw¯Ð«ú¬é_*íOͼy#ÊKu_³È`›cØžGš³æÃ›y<¢úØó¹ßYüB$äÐ+Üxëy‰†rrçLˆ5K:M~j«zñë†z"f2@¼õôx¨wåá‚&[Zº€V©r|!Ç÷Λ/¿“þKê³³0»ò¬TÙ½Q€y”w×s·…Ñ5›~-;Lm¸Ž?.Ü ;¡@Ð 2\¥t6›‘|x¼$ÜšY‰ÆüU3j*Œ z¸ëÈe€x+ш(ºmôî¾<ó[íïPœ€Œ;Î;ÿüÜ٥ϗméžz>SOë;ª¢Ø^¦¶¥‘&M®¹OçH˜‡*G²¸:’Ix•ç°wd`&¾j±ž1Ù¯yþ—ã7f­–µÚN9ÚH©ò-Pˆ_‘M-ĈøÍ¿üì÷éO‘lcš"½§]õ{×­¥»æÐ,ím†Ì9©3#Pl]þåÒðtÙ|Vš’Óߪãô=I¿s|å镯è&¿Bò~r×þX«í¬ôøu}µÀÕXàÚïp»—Âû<ßFg­6}ÑiØ TêËSç ÊÏ/Ç'ÿõYÉ¾Ê T9AÇ ;ü®â/Ž,úó~sa4¤0cÃ÷.þ`•µr3›LÁ竹³Ê~µBóZm§ì ¦X‘X+_?ÄK/mÔ_+òR  x9 GþjÞ¶‚uèIópÁT ÿ\ÈÏôø›ÆŽˆaäÀ¸Š™ÔþÌK,XÚüä¹—cìt_¾µBóZmg§ Q | *ñrNKB|o>9kKäE{«[l¹ùûŸ~þ61æ2.z6G‡–sfJÚ…3)“‰}=P~­Ð¼VÛùÀ类 X…*ñ2/^„ù=ŸŠ[Ÿ)&þggÌ/{úåšÑ±Š«U¤˜¸©TŒpÃÝËÏ@ç—rç3¹óò¾é¯k «ˆÏuPÄé¶ÔÍ®‰*ñäjœ·˜ƒ::™4uQÞ tqZy‡ømz]®`+yåU/ñå4VWºI/-XK¦çy±&7^é7²Vh^«í”Þ"zëÑ•ˆø õOøvI¶A/ÜZ7ÉÆ'%S—ËZÀúïd=¾kæ ]aòf0°yÏHò¬¬^¼zñë‘…ëôœ*ñV¥‘é6£-0Ý&CÅù •l–ý…˜¡ ñW¥Å/‡[óÖ[À'ߥöai}ü¬•÷½VÛYVÕ³(7 T$âË͈z<•hµBóEÛÁ瘗Z=FEtŸˆx"XMnWŽÞÄ„²Íð™ŸÄmžt© 0Û¸(Åø<äo›yøÆï4Y|Ö "ͯ,Êh+â+‘NzÌk`¢!>ÿ·ˆÏO#ÈÿGþIi‡…ÜÒùÜÂ;¹só9êøÈ¤nUŒl²7’¥°—¤“­Ë”¯ÂÂkÚ%¸ÏÁkp»®zŠøU›N?XÙ(âÍ·œ*Ð]Ja›ê›D«å”àÀñ 8ñ•©d~Çï“éyÌ8Ó¥R, Ž™‚TÏ6Ų%N…So¹¿ŒxS]„bë×—VÛTÄW6§ôèWmb!ÞTH5é§(º Â,Ïȃì[ïݺñíͽµ‰o†“]‘xo4ªK…X ÞOu¥œ9¿ËýVÒù–²HoËlËSÝü´å§·Uߥ×þAEüµÛP·P‘(â­:sÁwËÏ' m¼ôù|Û¾´½ãÁ¶DO<1ŠöÆA¼.•bh_8°ÇçüÿÏ$[Ít°ÄgÏOʱq»”òŠøŠÄ“ôµ[ ˆˆ¿ð· ¦î|1¦p,ñ ÿçÿñÎ 5‡º«Â=þxo0ÑIöêR)H¤z뜜ßäþÀÕE“?‡Rs!®¾ õÂðʵ߬װEü5O?ZÉ("âݹcrLMíc.•ï¶/nï|¤#Þ“¨hŒwUGz⑞˜.axW¼îñZg“óvî çétf.«m^Yøèf4:+Ä«_ÉœÐc¯X  ñ|Ý¥‹™+׸I5’2™•òÅw}e{ËCõÉþp´ËWÝIôDu© ðÔÚë8ÿÚù}î_ìœÀ|3z‰­ÚŸüpî&–ö+¢^|ií¯{/™Іøü-§B:wòåç+·ãþÛ;n'pW)´g¡¢Ýaç&ç¹ß¹þ¹}Z“;*c€oZðÞbú=…üJr¯+âKbvÝié- ˆWp¯Úο"Üú‹xÛÉ’jRðã½aö’«4ž"¾ô¬Ñ#(‰ñ«œÇ?ë‰4y©o=÷B/~~q¡ä%?ñ%Á‹î´ôPÄ{œÔ«>ýD_Ìù0Zü›…^¼iœC3ñèEçǼ.m¬U½øÒƒF TPįšqÿ xñÎ{ñ‚õL>WÊzñ¶OšP~ §àO%ºÑÕ‹/‘áu·¥¶€"Þã¤^õé‹“ñâ—.½–µxÁº9—tJõâKý-×ý{ØŠøU3N?â¤ã“‚5æÇWå÷û™·Ì¿}ó¢ªJ…ÓEO½ , ˆWR¯ÎÖ‹wâxPÐ/ žWËØÏ‹6¥¾ÕU¨)õÐý—ÈŠøÕN?…\Äç½øe¬Ë ¯BM‰¾Üº[µÀòü”k÷q®4TèÔ§u<(â!×þåQ©Šgõâ×1‚‹}jŠxE|ñФ[^ (â‹ÍÁu¼}E¼"~m0¤[)žñëÁÅ>5E¼"¾xhÒ-¯ñÅæà:Þ¾"^¿6Ò­ÏŠøuŒàbŸš"^_<4é–ׯŠøbspo_¯ˆ_ éVŠgEü:Fp±OM¯ˆ/štËkcE|±9¸Ž·¯ˆWį †t+ų€"~#¸Ø§¦ˆWÄMºåµ±€"¾Ø\ÇÛWÄ+â×Cº•âY@¿Ž\ìSSÄ+⋇&ÝòÚX@_l®ãí+âñkƒ!ÝJñ, ˆ_Ç.ö©)âñÅC“nym, ˆ/6×ñöñŠøµÁn¥xPįcûÔñŠøâ¡I·¼6PÄ›ƒëxûŠxEüÚ`H·R< (â×1‚‹}jŠxE|ñФ[^ (â‹ÍÁu¼}E¼"~m0¤[)žñëÁÅ>5E¼"¾xhÒ-¯ñÅæà:Þ¾"^¿6Ò­ÏŠøuŒàbŸš"^_<4é–ׯŠøbspo_¯ˆ_ éVŠg >Úõu…ã»S±'‚5=±¯{£‰Ý‘h_0ÖHöF»Â©®HmO°º;˜ìŠÇºã¾n| Z½3–z"ìvÂ{Cá>¤ÛI퇺ÑÞx´;X3 wG#}Ñà€p’»Âõ»’©]±TO8Úíì 9þª¾@¼;TÝ öÆ‚Ñè@(Üã‹tW%ú"‘]‘d_*Ôâu²?šìа»Ú®Ûá¨â½Ápo(ÐáSþ^_¤7”è‰'º¼ÏS»’Õ])N$ÚgN§'ïIð;Õ`IôÈ›E]ñŠøâ¡I·¼6ðâã½áx_ ÚU•ê ÖBî`ª/^µ+лCÑ`¤?À ßÞXÕ@ bÖõW×öÖÆŸHF»b‰Tl d èM¥ºR©ÞºèÎx}o,µ3œè®‰îJ…vú’ý·&Ù]d“½‰dO5ÿŒ ¤‚]ÑTuª;Q³»FÜ¯í«Ž?¬ëK¤º£C¤7é ³ÇX_,ØŠïNÀôpO1)Ñã#±®h’}õÅ ²ÃÞ`h ¨‰õ×D»ÃÕ òñÀãˆç0RqŽª§†×Eå;WÄ+â×Cº•âYÀ#ˆ‡˜xБ¾x²/).ü^azT^W‡žˆVwW×÷¤jvÅãݱXw,Þìò…|±þPNí¬†°á]ÁèîêpO2öD¸®Œ†ðñqÒ#ýÁd¿xÜ¡>~¢ß_ÝŠt…xHõ%Á´§ëƺ}Ñ]êê–;œç¶ûv´>Ô뉰N¼;’Ø öT™C^'w'c»åE|g(¹3šêÂaÅv%b»bÕ{"±n'²3XÓ_èÀª»â5 $=ÁDoïžOX¢œ²"Þýâ8޳&_¢ÂïK~‹kµé59>݈Zà" xñâÞö&”Á"nà÷ÇOûS#®`d ßqÛãýÉÄžd¸×©ÞJöTáõ×t'“=É`w öd$ùd ×;ÔëõGÄÅÆÍï‹$z!¬<ÔôD’Ý¡h_ ¶'Ùå$û‚5{£7;qçî/ÿEûƒ7>z£“pnÿÒ¶öG:ãÕ‘ž8‹Œ+â°«û 0¼ŽìŠ2qÑþX´?ë­Ž÷ᘧiªwGã{ÂÎN‡-G»|"Úô†xLAŸ©éFkЦºñúñnöµâ°"^Zað âj§ûBÉ=q„oœ_ün„x–P€Nʲ+ZÝ©E÷ØéÄ{ü(ãœè¾dxgD@Ü›ð÷ÆÂ»S¡žh¸;{2B¸ï«é¦;^ÓËð²N^mî ¡É ë£Ú·>ÚŒç¾åþ­m46=XãÔ:ÛþãÍÍÔÄz«;}u=Èè¢ÆÔu'«wE⻪’}þÔ€íq߃Ýì=Æïšîê¸?܈ DQ„R»#=uˆ3¸ó5]a¶v\xjÔ‹¯0Øyóp=‚xB£Á®xbw J7¬¥åñH 7ìüà:Ç UmÿÊŽÎGÚZþ¶Á©w>}Ï__¸*èó9w|ící5:ê4ö¤j—ˆ(¾?ʉó'¬»/ïCrá)¡;ä|ØÁOgi}¸O¿fw­sƒãÄØI8è?Ï_UùŸüôgŸSågþñÎöÚˆ»â¿·>ÐÂ}Ua§Ê¹õ¾-­ßlO A ;ÿÎA‡í»ÚÙ~ïÖŽÛ“}5á®T¤7…,C°—ƒ<ôFCýÑPãzñêÅ{“jzÖðâa*<™3’<ÓßøÈ`ºãþÛ7>Øê ºâxëmFTq’zÁÒXw”ËïàS×àËGû}‰~¡qÞ¯í!ÁO#‘w7>Ü‚w|qëÆÚnúæf6²í«·5?Ö,^<â̽ÛÛ¬ïx¨I€§ý›­>_°×aËQR}úkgœ9abdÅ<‘àx½2k;H|üþÛ6–ógÂHCAöYľI\—Å`%Â\dÊk¸UíJÓr·€w/àë–D$^‹_Œ<Ò…b“¼?âÜìLÇAÿöÖGê㻉?sÈ~aýH¯?ºÛÎÞö`#ø¾ó¾£­“0ƒ4÷EÖPµ?ìñÅ$±L§vùoz¸@ï`ý‡7w<´íßù¶nþF‡à¸?i։߸àîÿXë#í< ¬w»í?m­°‘Áß|#µw>Ü)!Ùû·4>ZC¢ØŽ:ùÔ-_ÞÚŒLÄàaüô²ZÔ‹W/¾H\ÒÍ®™<‚x|["¢Tñy‰£¢È7£zÇ`•/èøï¾ÿΖÛ£O8›lßùKwÞðomØ•HìL ÈGíýH%_º}Ó77¶?jpÿ•mµ’TSÓ›JîJeMâ´Ì¥Šõ§p´I°áxPW€õ­ÿqGÛ£lt"Îs7 8ÚLÈbHôV·C„#$xÇ ࿾*þ¾ûËŸÜð`;ë”ÜíÁ(âñkF"ÝP‘,àÄã0SŸúÉN‰ ƒà#£zƒW¦1™(²;îïƒÑ†ÝµAÒÙúå[® ï&öFñ²«wÇQðkûâ‰!~'{¢}µÑ½o ò8ï¤èàÅ×õ'úÉ‹'#žÜÄ¡íß'ƒ»¾²cӃ͛háá¾-m„X{SLr>ê ¸w<ÚÉr÷}w´=Ú!úû@0Öëg›¤Ð0ÃÖù·"+•åñŠø"qI7»fðâMÒd„À&!SÔ5ùì}±Ú^b›Q²Emïòµ="¡Ñ;¿zû†Ç;™…ð â£;£ÌÛ$û¾ý¡6 í~å¶ÆG[ZŸÍ}Ç—ïèx¼9Ü…Êwþ;‡ Pµ3 ìøâ-nbÎ*Âzë7ÚYsû_omy¢Ù¹Åa¬"~Õ÷½jñ«6~°²-àÄˤ§îe ‹8ÎÔP‘_€&¥cvÆn4^6ˆ‡Ûh&ò–ûîj¤ƒy§DSýÝULƒb*wtwO7ÑkRtv†(zÃS Üñ¨ˆ-wÜ»}ãÛÄs¿÷öÎ7uJ;¿wkçmäGJ8÷¾»7<܉jÞÀÓ'‹†ò8 !î*,$‹†0/k»jÈÜ—a¦Ì„xj4/¾²Ùç‘£÷âMѱX¸Ç/©/») Sµñ›Í„=}~Ü»Îr9I“}á6òXL¾¸­í55»™‘dö¾ºPw"²'ÕÈM Þ–KîªNíjHõ41STR »e“Ê„kXïì© >Ž P® :ÙSyBØÍšü–<ÅÞêMÜ(A×/ÿûM¶RˌɮA›®TõNÑâñÊ©4@a2QÐâû£LŒ’꤫€íKú»ªQð`z¨/êŽÕRžì‰[¨í®#Ëží¤žàâñþóW>\©wÖp] (â?𛬠>ÐDºByYÀ#ˆÇ¦Z@r  $o@& õÆPZ¤>LµÂH%°˜Z4u;±Ç}µý12å6Nö…¤ÂWU*ÉUoÂ÷ßòåí 4†÷ÈTR#×°5R'#v A¦'c‡è,eg`tO橦zk»Pÿ£ÕÔûEü!ÒÛ`e“í.ª øÈ>¤è0]Vž öFB½>Á}—$ï¯ÁÅ^_½xõâË gz4—ZàÚŸÉdìfÙª‡ý§Ý¬¼ÈñO³B–ÿÉO:½È;¬yÇWîìx¸ ‡ÿw¥<¢ð)‚“Ý~ËYSžEdq3@›]ж䙵º¤^Ør!uæ!¶ðAhîë÷Ibé‰6Ã;R¨½ÇÏúþÝNhŸÍnøz‡•)¦ÔEûEï^jCJevм¢ã' àëõAv,H¸$Zì÷S‚&Þ•äM3UUJÃ3l° –H—$é“k¹ì¾äòÏíwmWVÄ+âªånkG¼¡vÚž§Í[p¡YÄâ âoÿò”d±ˆ_z>ÈM4 µPŠ$‚ö½Ü"C¶)¥%q~¥2—Lû”ùýRóËÖr±E3áOuOÔ5ì¬'j I;L:w_J½Ëú¨4Õ}õ‰Ç«ºêÈbdœài€1Ãl¦†eE^¶5ëĺRõ»ª¥Ý‡˜Bæ¦ÂwS-’#—ñÃVŽdâ”%]Ǽbj”¥,]V¯ˆ/wÀéñ];â]‡}qqÑ"⿟É,YÄo¿÷¶ ve¸¶ TáÀJzb-Ú7“˜\Üd¾h~*|â³ÛNIÑluõ< ⥌p_œ€j ½;Bb{õn)(VÝŸBgT Œ0’zõd¾ãsú$Ç%–Rv‘²_Èî+D-±ÜÈN?FH⤯“dèSȾ?ŦL“©€jdOú ¢„QêE<é‹ó ˆ—Ë~IÕIÆÊu‡M•öÈâŒL<.ÐÔ ÏÌiæ×‘L³}´ º],Ëû²ÿH×1n;‹Õj¤¥ +|zXÃõñŠøuGÄuwBk‚x tW‘wú÷×âin‡O¯;뜮=R1&êÜýþ¼óÿvSô‰êÈ·Bþ>§±7ÒBþ"eÓ{Rh/xÄÐeF$ø.úö%X¬¶n¤méò!MO ýáZ§ÎÙú½¥éÑ&òXP{8$i–§ß Ñh»—Ä›Dt•„éh5ºyO‹\‘o>+å!)ûŽ@”è©§á*Å„íØÃ±™aCþÉÒúƒEþåÝF\¥Ôð.‰¯Ènk»²"^¿îˆ¸îNhMïºíPÞ‚Þúòò~]ÞHó™l†¤šì…Œ­xñÌ ‚;+E˜–™GÝÑÚ>QØEZé¯M¬2ÏJëÅ9^ÞAW‘®I]Â}ÑXzˆÍâþ‡šÿ¶VZm|áN¦¡Ú€'oR"†j”t| ÷'E®AP’>«’íÙ$ÌŒVymÞYq :7IæOwpÃã­ 0·~õßÞ°³%ÙM2e>rÀÄcO$xôõäËSÐøOËw~ƒûU0ñ×ø Ö¼øk4 ~üz[àÚïúì®8s•5hñnFÍJ…¥¬Ø@ˆÜsé{7¤}õað¾-ú%×Ð8é >Ñë3й2Â6—ÆüU„oþºù!©:yûýÞúàFzvËPÑ`J”´ë3n2JŽ´ßë¢õ6=Z}²A3!dœ°É—+j¤Ä˜dÓ‡Úh• 6÷ÝÝú@CuL:vÕX7ŸŽNŒ² ¤PšËw‰6¯\àRÄ_ãLÔ_o \;âßÿˆ/Í‹w“&é¸D^üJõ ©Ž‡[) pÇWvlüØ;ñÁïù«OPŒ€h/¡\$ –‡Û­Œ öm¦R¨0ßå“J¼s6>x#ÉŽþ¾`ÓãR]ÈòT!3˜A¨ OÉjþRÀˆkÇ7¥ŽÍ§ÿêgy7ìeóc›œ¥ÐH8Ÿ»çSü–òÄÎöûvt<´‰1C"dßw×%ºêL8Z&¬tP¡F…šë ,ÝßJ-P±ˆ—ºŒÛïßÞøP[ëc¦ÒzÒé||£t1[hÞþÅ;ox ³óo[¥^ã×îèƒcñÖïj{¬¥ñ‘:ªÁlýÚG)þÞúõf0î¿•Âî¶Žü]_üøM_ÿðƯßÀg·|eKçÃÔ™1Ȧw½–j)GÌÖ¢`ú¶MvÈ“t>þÕ;;¾Ñ±ñAiéwË}Û) ÜFÍZúÝ·mãch¸*Çs6üm PU†ô%š)R†ÿµÓïI˜]a)VÜ—¢¼3oe`` _ºKªÆÿ‰SßKÂò&©l#ór™7»;Ôø€´ÙÁSÈÛš¾!Íï¸OÊŸmxð&ÙcÊÙô@O6¡nµ0mß(›÷i§Y™4Ðóñ@¯ˆ_)ptýëm E<Ž­€ûËßøÐÆØ,¨½÷nèFDsñp{pœ% FȘr¶Ý{ó†Gë\ýžpdW•M¹ñ÷„¤üoO|ÓhÓq×—îÞD©H°Û%)+´ñ‹íF’æ|uý5R!2ålýÊv*D"›²)5­?'H)`{wÓy¿‡™¨E Œ±(—&$Ê‘l½GÃ#ÍÑ=1fN±wzõµ}óFS{òãítÊÇ“Îms+Íü(‡‰Ýñ $˜ ,MKþÌ 8á=Žìf#] ÊÚHÙ9NÐ× ?-µ‘¥÷G(zì¯ùFRºM}i;ã–ÈS ~4$±‹É’„…)lüy¥.¼"^+M^oZéþVa F|2¿Þ|Ã×Ef¹û+wt~½ lÕö‰¯ZEá—§ª²›l’:ì÷oo¡)ëŸ9UÈOÖ’¥pX_ŠÁ€òÒ[•Aâ‹wµ<ÔÌ:äªÓvµ¦?ëöÓ’y'Ò”âÀT ¼Ÿa`#Ó¬^dx | ï‹n` ç¶/áï7€Q"ºuÝuȬ'y_4ô=Iœzy¶øòŽëŒ}3©_Óm{ NZ Þ÷ï:kÆÑŽõa1#P+UæSN•aÆùó/m•]а›zôÉäÎ(ŸEÍ—ê:ýÒÈ»©»ºáñXl'HªbÝŽœE_¨ó|v|eGÇc›ã}5LÖåSfº–;×—©¹R@Ÿ V+º¥ˆWį8ú‘ëm E¼Õâo» j>n5^ðöû·4uÕú÷8RÕýOœÚžšš®úä5"¶HmÈ»:iøT3'­‰ƒù«"‰ „š¨ÙçkwŠŽ _#`5}õŒ„tè”Ýþ`½ìñ¾mmÒïIäo©8¿+îiœÝŒœBNΗ?ÞôX»®6ŸEp·Á„³áM„ x±õ‹·ÒÞ/2PX%C¦/¸áÑV#}]ž¼{†g“|„77>º™Òó¼¾ë¾»¨m  k{Bi¥Q ~z³ŸBÄy-Ó£új™üEqJ¤OPzÅ‚ø/݆”/%qöø¥Ò=g3i`9õS^/ÿse•vT¨Q¡æzK÷·R T,âE×Þñµ»šno¯qjÚþö†doSbwx»ýÁ`WUrO\*¼ù¶Íveÿ.š j)¤-Ùd—sõ#‘Gî½ ‹wÜSMÈ4Ø-즮é:øõÍ_¯Ü< ´>ÑA„–™J쥦‡‰Wád—¯óÁ‘Sî»MZ³þ‰ÈD$\ÆwK%Ëšž†Ú®¦do]Û¦½ß}[Qüù8+ÐËÉÿD°óáæý»6ý†ÎoˆŽëº»á››áé‹KkïZgÛ¼¥÷uB”¦¡¤Á@<0¥`W”âe쑱!¾3ÂSÝ“¬é‘†'±ÝaBÒŠäK·w|£ b¢òÿw¢¼LÔ É¢|&­HdöïÊ*âñ+Ž®½-P©ˆgêZü}wµ=´©Õ´ÄÛöŸ¶¶õlrz‚Ì=êf4ðëMl|dƒ5_ÚÖH;§›i³'SŸ(x@a÷@OÈ2¡©é¡ð |o@ïþwŽ­ˆP³·9Ò]ËüUi òxøÆÇ6³-÷ßÕð`{bw ¡NY³§–‰Kµ»PxrÞ»­íÁjöRK%ú2™ËÌJ5Ÿ&›Ùä¶ûoF^¯íI&»CÒ„do¢ÁèïwÐ$䑦6eÚ…w|}Cü›‰úþäÆ|—¨‹;OYª­ÑeМ#u†i‹Æ"µúBRޏHŽ9Ú•A…=~õöƇ[oì°dçÐk5EÙXD·YE: 5*Ô\oZéþVaJE¼jÈTA‹•Ý·½ýo;ºj6"¿ôW!j“(IÊ ·ÞÙñÈ âu d·t>T=ZM€”<–åç€Û;ê@.CÂWY§v#â ɽÛPÉÛÙ“Î]÷ß¶ñá)‰PC'&mòRz‚͈-Õ4õ¾sÓÃþ¶ÉtjÝÑþÍÖ&"4ã¾ÿ®öÛ¥ƒkµsëW¶V%H‹3Îè »ñ‘NÉçùÚm$ÆÐMP$£ûnm{¤15“éN¤xÖ9[¾vkÛãâ¹÷„qØeïÂ¥•¯|39êá´‰wßÉç¡'&^%û’Òx¬Û`é7Û„z=«È³Ù mL<žD ÙøP'š>Ûi~¸Ž-ƒupJÌ{|Õ=‰û9'$Ÿlw9*£Ñ߸S2dbp™£Ë´/ö¸<m‡’j~§íÑ:¶³ãohÞÆ1Û=š¢˜RË¡~§¸ðdÔw;,+-£¦^¼zñe2=”+Y BOùÚ]õÉoVSï·f Ý’ɨ}T5ˆJA±žpï–œqSÀ J&;Ò#dÔ Ä‚OTIãÝ5ážd¬¿O<12uz©4uäEäÁÛ ïŒÈ0`¦’²eBšèìð”ìÌÀNñSOVSÄm„róõOÔÕõV‡vŠ~èó»C¢11ug”Ú¿01°ËÇgEéûñ=Rö‚]ÉHÕŒŒ$YJ[¨Éš®ÚØ@”9J¾]<.pHR{‡ ÄQ9N¶Ã0Cö¤Ô/£BY¿9*š™tÇjv×Gž Ãâ{²®»¹¶§9ðD”^†f<°mL8`ªWRCM(ÑÌ|à•ÅZñŠxåjX B/2w¿TýE² E_x F6¤é• ô‡§=ñ] üGUÒäÉT!Ó¦/ÐAuhÛCŸ?©2Uà©êÅŸKƺ¤+7ånÑ#{cá=˜eÊ«TAØEª"¸M³3˜È_DN‘ñ€"bÂ¥ŠYŠƒ6~ñ=Òj §ž¨)’=È–*7½Ñð@„&pJ³êÓ$XÛakÕOÔVw×Ó¨„ hîõ}Õl™J‘áPrGc¨ùÒ¯ÊöºÚ¦:¦F” 3V)GÌøÔìq¨qÏ;2€1$˜zÅù"h¦§4–2Ë*¦k¸UíÀ8b…"NIš~¼WI#!†~§©Ý0KTxfôø»#Ñݵµ}ÕÉÇ):–"Ï·`£¿;Jj9D£M+®½)ò5P“b6P/â©°hë„.S°$†‰T<"ÈL¨'"daÖö6RP>²›R”>©6Ü/Ôp¥¥Yo¨n”#ŽíŠáY»á]~zÀ’²Bq1iÞWz,ë«ùx¯‘'Ü_EWBvÜIÓPdOØ·'èð‡z˜àê—¦Þh)ýøøRIG;øMŸD\ûê‚;$c’”Ëï« ã•ó8²+?O ×îNÕ>o”ê›ô"§^±dˆÚrlR_ª.KÍüו%VÄ+â=ÎÏ 8ý E¼-C&~n¿©D¶;ìò'wù‰µÖî”úï¼iаS1&"½>ðd»Æé"-–L[…žÉžZÊÔÈ Õ¾ åæƒQ¦¼ÂA Eö„ d GÐaÈ/ì ñWÛÄïÁwN00HLübž'z¥7L—®#ô¡YànJcnéÄÝÀ×&¾jš–Pêr˜ÁØa†é1òD@3ðð´Q½‡A+ÈÄ«ú½5 ]@_¸/UÏHÍ” /é&0 RñXÒu¤è1 ©D~`w(A$@JÞS3.…‘QêwJkÒ+k{)—fÎ…bœ¦§gL™6™Ž»Ò ®ŠxE|0Îã‡X¡ˆÇ]y€ õ·”¦÷“mà'=ù¨)•ß{C"=÷kúBxÓ(|„v$‰3yUZ8‰— ‹EëÀAm:ïB¬ð‘‰È"Uºvùj÷ ƒ‡(Ù‰¤#Ð9µ+fT)]iJ½KGñ'ꢤ)_L¨@¼ûž8Ò?ìF/ªÝ› >á ½0Ju³» ¹•2b‘ß©¨Áûnè­®A1ßc--D¼ |‚=œèòÕõ“`Lò°‡ ÃA1ÂDz˜È“D_„Z•ŒI’1Iú=¶Û­ÑÜmWÛÂE½ø«`fÔ\…‘t•r²@…"^à ˆŸn«ÄàÉŠmšð‰WÛí§B‹Ÿùœ2Q(IO´äAð@µjï—¾¢ãwÅd$ àW¿L¥“*J:+ðÓ¯#±3@GjL ³V—7Í ï­¦’ÿ¾[ŠÒઇºdûlPºÔ2ã4öd”g[¹ž ªL(E=ïç` DêJ„ÈÕ©Žî®–$¢³“ÛÃÓIœšõøþ¼æ\d:U ‘§zEG™aü8jOŒ3ïNñWYv“%q mв<Ô%¦êÎ@>lk:ÜÚÅ´F1mÍÕ‹ÿÀ¯¦"þM¤+”—*ñ¦!_0Õí—Ú¿¦./ÔH 2£Û¨Ps5ßLEüÕXI×)# T(âWêoêúŰ€jñªÅ—ËôP.kE|1Øç‘m*âñÊÕr·€"Þ#8.Æi*âñå8=>E|1Øç‘m*âñŠÐr·€"Þ#8.Æi*âñå8=>E|1Øç‘m*âñŠÐr·€"Þ#8.Æi*âñå8=>E|1Øç‘m*âñŠÐr·€"Þ#8.Æi*âñå8=>E|1Øç‘m*âñŠÐr·€"Þ#8.Æi*âñå8=>E|1Øç‘m*âñŠÐr·€"Þ#8.Æi*âñå8=>E|1Øç‘m*âñŠÐr·€"Þ#8.Æi*âñå8=>E|1Øç‘m*âñŠÐr·€"Þ#8.Æi*âñå8=>E|1Øç‘m*âñŠÐr·€"Þ#8.Æi*âñå8=>E|1Øç‘m*âñŠÐr·€"Þ#8.Æi*âñå8=>E|1Øç‘m*âñŠÐr·€"Þ#8.Æi*âñå8=>E|1Øç‘m*âñŠÐr·€"Þ#8.Æi*âñå8=>E|1Øç‘m*âñŠÐr·€"Þ#8.Æi*âñå8=>E|1Øç‘m*âñŠÐr·€"Þ#8.Æi*âñå8=>E|1Øç‘m*âñŠÐr·€"Þ#8.Æi*âñå8=>E|1Øç‘m*âñŠÐr·@‘ŸÍå–Ì‹l.“Î-™E~² ¹\&WåøîøÊ·Fº|ñ½þH_U¤7£ÝáÔ@‚±žH²?Îoà²ÒN3î XÄœ`K•¿Š‹êsüïÈ þËEçK.KÉ~8”5Ùwá÷%¿ÅµÚôšŸnD-p‘Š„xAû¢YÀ¼|µøé\Æ_~ ÁÝ÷ÿù†n¨ïi‰í¬IöÔFzb±>Y¢½Ñxœßî?y­KyY /8vœ¤ã÷[ª*GÌóñ_ƒø ì èKù³VVÄ—ò*ê¾Wab!^¸.ŒÇƒË·ùñä–æ—r‹NÔ¹ù¾?é|¸1ÕŽö"ýA–ÄîX¸'íãp| j_GzCº”›bÝñøãuοqœ”ay•Ïï û‹a|ñ~'(]î€Rºðì^¿ 8èGÖƒŠ„xW¨±J ÚÌ’|ÉÅ—ÏÊÂW.௠E‚–PUغ€…KÀç7Na•.eg*sUÄuw¸Lò¿ãç7„çùKéiNFzìKø…QÄ—ÐøºëRZ ˜ˆG‚·êûòo¾ãò–¼oÞ—ÒçsiøŸKóï÷þ$ô§|-€Ÿô; Ìáy•ò9a‡g3ãÓ›Ã6£µÏ€ÝjvŠøR~Óußµ@‘o¬i}v£ÎX Þ¾´/äwvIؾ´`"±†øòG»à úò>aþÙß*º”‡òaUûfiîó™8+!WÜ|‹xžÚ–ï%üŽ©_Bãë®Kib"^HMˆ•ÅÒݵʿÒÑsx‘g?ÿÎóùIÛž%ˆ.åfá7N»]o 9žœ‰µ.Ëñ¢È—8̺üÝRÄ—’2ºïZ xˆyf™ÞBmA|žò`ŸuV- êø³qîó^¼Ñᡇzîegô™  ä¬òaÞ^++Ó,k5Ë9U¥Ti¸ñ%„Œîº”(â¯ñ¬ÊW…Ö#[‰®ñ6X«+â×Ê’º ³€"~%¼ÒuWl2ù>(âËäBèa\o (âW -ýÀJ,p½oè+ìO_&Bãz[@¿^éº+¶Àõ¾¡ñebq=Œ2±€"~ÅÐÒ¬ÄerŸ«_&Bãz[@¿^éº+¶Àõ¾¡Õ‹/‹ëa”‰ñ+†–~`%(“û\½ø2¹z×ÛŠø•ðJ×]±®÷ ­^|™X\£L,P¶ˆ/ûèa¬ ¨¿>®£žÅŠ- ˆ_±ÉôhE|^4=äµ°€"~-¬¨Û(w (âËý éñÉŠø"V7[VPÄ—ÕåЃ¹~PÄ_?[ëžJgE|él¯{.©ñ%5¿îü:Y@ ­»)7 (âËíŠèñÊøbXU·YPÄWÀEÒC¼f (â¯Ù„ºÊ´€"¾2¯›õÊ, ˆ_™½tíucEüº¹”z"ïcE¼Þµ€"Þ£Þc§­ˆ÷Ø×Ó]¶€"^ï/X@ï…«¬çx (âõ¶ð‚ñ^¸ÊzŽŠx½ít:ÍéÛßö Éd¼l=÷uiîjU¹Ãù}íwxáS¯|gÜ/Ϻ´žÔ:°€½é]Ç~ôG-°ž,Àîóùì·õ)¯ˆ_ÐóÊ)Øï°:"^¹Þ>ÏÅÅE¿ßÏë5ò*â=|Uæ©[ÐãÅ[ÿýÚ¿•i=êunB-ÞõlVqΊøUM?R Xš»·,ß~pvì ýQ ¬3 ¸B"¾4Äѽ–Äöv÷…Ä/É‘èNÕŰ€û`Ê­¾´´dw±jÊ«_Œk¤Û,–¸ûmFþ¨Ö½ì­~j¤"~Ýß'ëêíýZ˜;±®NOOF-°|{»–(Ì^…yÞƒøÂØXÖ*¶¨Q ¨Ôj’[Ày8¼u '•\4†”üpõÔjµ€Z`EpgQÙOIÿ!%Ó:¨i+2¨®¬P ¨ÊÍðܦØ_˜Î[ÖÉ/œlRnÇ­Ç£P ¨ÔW²€+¶»)ö‚øB9^µx½{Ôjµ@¥[À–»yÆMWà”ªªªT¥©ôK«Ç¯P xÙî_iÒ4¨Ž|…^Z=lµ€Z@-€.*:/Q×BýÝ:ù¬W˜_éÎ-T¥^ï!µ€Z@-pÝ,à *Ô±Ú-ìÁñ »òÝý`^‹·ª]É]¯P¦çÍ………ëvbº#µ€Z@- ÂÀÝ%³uáÕBÊ£Á°‚[ÊÉ¾È 5îà`9NeúB9Þ­Œ£½Þsjµ€Zàú[àÒҼ㦹ó"úø®ô’ŸúTøyËq+×VÃÑRP×ÿºêÕj/[ÀҸз¾HZ·N9™2îšÖñwvaê“ì°àRÞºó¼©åk¼|Ÿé¹«Ôå`—Ýõ4¾Tºqy~!iÒúì…§aÿ‰¾Ãá¾o%ýQ ¨Ôjb[ÀÖÝü×£Ýql»×¸i!Æeê“ý€[¤Øe¿[»ÆþÕí³SC™ƒZ@- ðˆì(R(רFW6¸j%–‹\p }û©÷dÔØõ.z°oº#Ã:k£¥§£P ¨Êܸê…Gx¥±í"ÖÛÕò5õ4Õjµ€§, ˆ÷ÔåÖ“U ¨¼eÿ?!`Êõ’ȦjIEND®B`‚axiom-1.2.8/src/site/resources/images/icon_arrowmembers2_sml.gif0000644000000000000000000000206011131637462023512 0ustar rootrootGIF89a÷ÿÿÿŽ”ùúüÑÙæ×Þé4D[RjŽ4CY!*8˜º‰ž½‹ ¿t…Ÿds‰Ž¢Á¤Â^hw¦¶Îgp~¬»Ñ±¿Ô²ÀÔ½ÉÛ¿ËܾÊÛÃÎÞÄÏßÈÒáÆÐßÍÖäÌÕãÓÛç7H`=Pj•©Åš­ÇºÇÙàæîëïôßãè[jzñô÷YjnY[ZTlXC\A>l*6]#`•Gfs`ôöóTxAdÉ&cÆ&T˜+rÆ>rÇ?R.Ew(hŸF= cÃ&a¿&a»&fÁ-iÅ/hÂ0c¸.jÂ3j»4l¾6i·4sÌ;,JxÊEŸ­–›¤•a¹"`³&_«(rº?°º©àèÚ6X¢T—Y£ ]Ÿ(S’[”(P‰Lq(-O…JvN|!1Knjoc#Ed?P 9=þþüýùºþö°þö±ûð§þò§ùè”ûëšðá•þïžÿç‡ÿèŠÿéÿì—äÌwÞÆtéÑzíÖ~äÝÃиkÁªc͵jÕ½oηp§‡'³—D¼¤\À¨b«i¿©gº¤f  §TžŠX›r•M–€P•…`¡hˆrFmEnG†rJåããVUU’‘‘þþþÌÌÌ«««lllÿÿÿ!ùŸ,ÿ? H° Áƒ*”„HP¢>3)Q :šÃÆ C1%ü d€ !ñ±s§ žB3]ypC€\ÀСQ =uà¼!“'šK˜\jéŸö‹Y +ïñ@{‚ãÕ¯ ÆÁÚòìr|¡ã(ð¶Ù¿Xÿ'¶vù3lOŽñå=ŒÚé•4ãáð‰ø¶Œÿ€7< Vî@`èå¥#)é 0Bƒ_pV§¡y<$÷a ‰4þÅ\‹ :ÑT¼X"‹:ÕDs;d· Œcáˆ7þ¸CBÞP£ Ò ”‘=zˆ 4Ò醽€‡˜”¸`)K‡ sw¾S¦„$fRa`=Øf%úHsb &úà£0sÎäÍ›)¸iç™3œÔûÉeœ .£¥Rw¨8ƒl^á¥(y–Ù œyX_‘#ÕÀÇʨb@ŒÚ Ÿ#|z] E„m¡Â * ¦z&€\ÆàÏaù¸(G)𫠹ɑa kÚšÚ6MªàÀ¥ÿÌ`ÚHÃâ`[Ý•ð,(Í*µM¶4$;[~xQÀ l:V°Õ"ç]N2,tƒ¸¢ ZƒÓŽdï¼G!î¼àÀ»V¿Q!‘œ(/ûî¾+‚óï ¬ò[׊"ÚyQª®×ÒÃJç<ìCÇã‘w˜Br-…r¡ ÊÊrð‚¶´à€*ÛÃ0‰ñS @@$q=^µ¬FÄõCåÒ0{Ø®NIGSO­šÔX_4Ž 匵,÷lBD_Cµ³$º µ -¶J›¢6Û?7€ÉÆo¿€76{çí÷߀.øà„^G;axiom-1.2.8/src/site/resources/images/icon_doc_lrg.gif0000644000000000000000000000246711131637462021474 0ustar rootrootGIF89a ÷ÿÿÿýýþùúüøùûÚàëÑÙæÐØåÕÜèØßê×ÞéÖÝè]y¢[wŸYt›XsšUo•Sl‘OgŠLc…J`G\|CWua~¨ZuœWq—RjŽQiPh‹Ne‡Md†Ka‚I_H]}DXv?Rm5E\b©Un“LbƒI^~6F]3BXh„¬gƒ«mˆ¯pаrŒ²t²w´z’¶{“¶~•¸–¸˜º€—¹„š»ƒ™º…›¼†œ¼ŠŸ¿‰ž¾ˆ½‹ ¿Ž¢Á¡À¤Â’¦Ã˜«Æ—ªÅ¯Éœ®È¡²Ë¦¶Î¨¸Ï§·Î©¹Ð­¼Ò¬»Ñ«ºÐ±¿Ô°¾Ó²ÀÔ³ÁÕµÂÖ·Ä×¶Ã֏Ũ½ÉÛ¼ÈÚ¿ËܾÊÛÁÌÝÃÎÞÂÍÝÄÏßÉÓâÈÒáÇÑàÆÐßËÔâÍÖäÌÕãÎ×äÓÛçÒÚæéíóõ÷úôöùóõø^{¤*7Ic€©“§Ã•©Å”¨Äš­ÇŸ±Êž°É¤µÍ£´Ì¢³Ë®½ÒºÇÙ¹ÆØàæîßåíáçïåêñäéððó÷ïòöîñõÝäíÜãìÛâëçìòæëñìðõëïôêîóâèïñô÷öøúûüýúûüþûíÿž—þþþÿÿÿ!ù•, ÿ+ H° Áƒ+A9`à€0#B #æË% v À1¥ A¢ƒE•Œ÷„\ R •%`D åc—8q†DdÅELuP.aIŒŒ˜"ÍDˆä£P£J½ ‹Õ=|fdlJ σ¯`ÃzHñæ Pxlýè5¬[ #Rp3ċڄ\ ˆÙË·/–'yò\Aè.S¢ˆ)I¢$ˆPµ”¶LšL¹re2쀜8¤€ÌÖä€|§:RëÀ‘ÃÆgÚ ªÁ±€H±q4H‘­x?náA¼8qœ;vèÈAP£µA& ½{Ð"5ÎýzA:çiÕ«[¿ÿ>£M ÈŸ„nÓ˜"@ *ïpÅV†/Ž\9ó0]À±U$èÖ#‰Ò‡!,ÆdˆÑ…Y¸‘‘º•ÖÃwª±ælWLÑ@FGð¶H"h—”Æ^l±GSDá„¡#úíÇCË‘¡Äd$" €†Ca|Á|X!…O,GGDÑ)jÈajŽG„d´Ci˜ …WPEL$‘‡t1Ç@t ö¸Ìñàà ±ã!Ú8$t1‡@º•0cN,jEÄ!D’æp !dd `ð@˜HÐ|@(„P (õêk%;axiom-1.2.8/src/site/resources/images/icon_members_lrg.gif0000644000000000000000000000304211131637462022347 0ustar rootrootGIF89a! ÷ÿÿÿÿ燱¿Ô‹ ¿DXv]]b­®°ùúüøùûÚàëÑÙæÐØåÕÜèØßê×Þé&2CXsšSl‘Rk^z£Wq—H]}EYxd€©h„¬z’¶˜º‚•°¡²Ë§·Î²ÀÔ·Ä×¶ÃÖ½ÉÛ²¾ÏÁÌÝÃÎÞÂÍÝÄÏßÉÓâÇÑàÆÐß¹ÂÐŽ•ŸËÔâÌÕãÎ×äÓÛçéíóôöùóõø—«Æt‚•ž°É£´ÌºÇÙž¨¶áçïåêñäéððó÷ïòöÝäíÜãìÛâëæëñìðõëïôâæêñô÷öøúûüýúûüvyzáâ⢦¤ŽiƒT^sN†œq…Ù/‚Ñ-„Ö/ƒÕ/Î.†Ø3ŠÚ7‹×<ŽÜ>‘ÝC×E•ÝKn£9–×PœáV™ÜTžÛ\•Í\¢Ûe|¡T¶â†czK„¢e±ÕŠgxU…y}Å*{À)€Ì,~È+|Ã*…Æ8ŒÊE’ÓI–ÎTb‡8žÖ_¦Öm¦Ór¯Ü}wµ%{¿(y¹'x¶&z½(}¼-}¹.€½2„¼:’ËM“ÆRšÍ[˜Å`ŸÎeªÕt«ÕxLUAu²$t®#r©"u°$t¬#sª#v²%w±'z±,j›(~±5Š»F—ÄY¢Ìjœ¼p³º©r¦!p¢ o¡ q¥!q¤"t¤'ƒ°>ºR›Âb«ˆmšnžu¢*‡­Ek–i‘wŸ/Wq(gŒhy›4e‡g†"c™ †a|_w_yv€X^t]q[len;UcFK…†~HMW\*GJxylHKEFFFýýÃýýÄ?>ýüÁýú»ýø·þ÷³þô¬þðžlhNÿí–þæ†üä…øâ‡ÿéŒàÈußÇtÝÅsóÛ€îÖ}êÒ{æÎyåÍxåÎxúâ„øàƒôÜðØиkʳhȰgÔ¼nѹl͵jÛÃrÓ¼nÀ¨b¸¡^³›[ªd½¥aÅ­f«”W˜KyGŸ‡O›ƒMˆqAzf?ƒk?ƒlAoX4eM-e\PËÉÈþþþèèèØØØÿÿÿ!ùÿ,! ÿÿ H° Áƒ<·N»vî¸)œHp^»iÍž @Žʼnòª PV Y2fÓ´ûˆ°ß¼o–%[Æ ™±fæX„G.›·@—“æQ'Azä¶]‹TÀ4dÏÒ@µªUƒôÂQ×­©€bËŠ , ¬Y³ Úw›7hM“)kGG€òæ  -A{îÐq»Ö îFdÈÖM p#‚cÇ7ÊVU¡¢Þ:¶Ù®yóÖUÀ·w=P¢tigðC²¤^:sç¸eÆí[4Ð;¤ÞÍ_GâÍK'Ý9kÔ¸«WP÷n³«“$aÄǽ{íØWnÞ½ ÍÍ–ÿ @¾¼ùò+Þáˇ=z½˜øËý<úôêE˜@9S(?~eñ£Fhd2sŒw^y58_|!F/fõsFø‚ª!!u>q@Wd¡`€AÆe5q"xàÆ>¨àyÐEV`ÅrxA†Ma‡‡$9JöHD ;4QÅT€ÆXÆ!‡ sBˆ!†\r &ûtà7š÷RHFm¸Qpć ƒ bI!…ˆÂ„ V÷ä:üRÀY‡k¼1‡~H •TÊ¥²ØpÄ =¤Yqº!zôAÈy(Òˆ$”P (§œÿb ‚BYhÀÀ²!~üq‰"‹8ˆ&|bŠ*®¸¢ CÄ :á@ ¼Ð‚¥î±Ç–\BÉ#Œt²I)¤ Ò +°Àò ¶š+.  B0{ð‘j±ÇvÂI)¨¤ÂÊ+±ÌB .Ã@­µØj‹Â $°0I#‹k.ºêÿhpm¶d° "ˆ€! JH"¼ø 1ÄãL/4þ“ÉP38 ]ô×!ØPÁ?PvIX0Ð ÷ÜsDw¥wA;axiom-1.2.8/src/site/resources/images/icon_warning_sml.gif0000644000000000000000000000110011131637462022362 0ustar rootrootGIF89aæÿÿÿ¸œ§º¡«b`awr}“ޤ˜ º¡¨¿¬²Æ~ް„’²j| £¯ÇfsŠ„™º§·Î·Ä×ÄÏßËÔ⣴ÌÜãì[M@Kƒ? àk®T£N ”G J$ùwñsïrêpÛi×fÖfÔeÎcÍbÇ_¿[¼Z°T©Q¤OšJ E D E ƒ? i2 çnämÃ]¹X·WµV•H ‰A €= h2 ]-Ëbùzù{ìz&«Z¿i&×iù(Ëj&ùƒ1ùƒ2ú†7Ìm-D2%Ìp4úŠBúŽIØ|DÌu@ú”Yú˜aæ\Ì}R׈[¦v[úmI:2̓`û¡vû¤û§ƒÙ‘s=.()ûª‹+*û­‘ç ….!Ó—<,&é¤5&!:*%²‡y*Švp묜*,-¨‡‚š~zÇŸžÿÿÿ!ùv,€v‚ƒ„…† †…oae‹ƒd][s’v iT ‹u^PW†\Z¥MI…gXU¥GAD„SRQ¥?4ƒVONK¥)#C‚nJHFE0=7'6*v B@%¥+8, l !5"9¥.:/Lt"$&(-3:øc‡ Yìø‚f3càÄ‘#¦ ;;axiom-1.2.8/src/site/resources/images/icon_arrowfolder2_sml.gif0000644000000000000000000000207011131637462023334 0ustar rootrootGIF89a÷ÿÿÿÿþ—üø“þú•ýú•ýû•þü–ü÷’ü÷“ùðŽùîùï÷íŒöè‰õèˆæÙ€÷éŠ÷êŠîá…öæˆõå‡ôä‡áÑ{ëÖ~òðèÜÄrï×}íÕ|äÌwâÊvàÈußÇtÜÅsï×~îÖ}ìÔ|éÑzçÏyåÍxåÎxãËwðØÚÅtåÞÆÐ¸kζjÌ´iʲhȰgÁªcÚÂqÖ¾oÔ¼nÓ»mѹl͵j˳iÛÃrÕ½oÓ¼nËÁ åÞÈÁ©b¶ž\´œ[¿§a¾¦a½¥`¼¤`»£_º¢_¸¡^·Ÿ]· ]µ\³›[Æ®fÅ­eĬeëd¢—y©ž€ ˆO¡ŠP­•W«“V©‘U¨T§T¥S¤ŒR£‹R ‰Pœ…N°˜Y®–XŽwE—J•}Iœ„M˜K”|IŸ‡OŒ}\‡oAŒtDˆpB†oA„m@‘yGi=‚j>zb9ya9lY:nV2mU2kT1jZBdM.bM1bM2åããVUU’‘‘××׫««lllÿÿÿ!ù‚,ÿ H°`%H$y2pDN Jœø¥ ª ÄÈ b&Šxã‚T( €@Ài¾L13R"‰ "r– ñãË’+D p0Ñ¥¦Ä3#6`1²Ãƒ è fŸ«X³ò!xeÄ!  @À4\hÈgÏž? ´•à–-nذa‡3nÄøÁe ¸réJ¬r¢ÈŠ~Q„°CÆ‘)Hž[· p48¢F(F˜T c¥ @ ~H"ÆÀ/ž R% :~$Æ–HeŒNˆƒeL9=ŒNTæÉ%_®´ÁƒFúH7rŽ0Ñ'ï5߬!cçzé^ôD1;axiom-1.2.8/src/site/resources/images/icon_alertsml.gif0000644000000000000000000000023211131637462021672 0ustar rootrootGIF89a³ÿÿÿ®··’™™ËÓÓ¯´´äééüÿÿýÿÿz{{öaaj__ïïïÿÿÿ!ù ,G°ÉÙ¡Lþ€¢F„ãU6*’«J£°¢ôˆ|Þ¼H‘e®" q Ÿ°Æaá,Ž’‚ó r¾à0çb)›Ï–;axiom-1.2.8/src/site/resources/images/fix.gif0000644000000000000000000000026511131637462017633 0ustar rootrootGIF89a³-ƒ„„H/üƱ8)&#æè騦¨ûýûœrTö¶¦„:$TRTxwv˜˜–´¶·!ù,bÉ9 ½Ô^+â_'n¡¨YE1REãAÐeWÏáÜ®QŠ!{p¯ØãñKÐe×0`!…5 V©J…Å`ÕÍÀÔÐQ7­ ¿¦Ùëý‚ ÷)€ƒ„…;axiom-1.2.8/src/site/resources/images/newwindow-classic.png0000644000000000000000000000166711131637462022533 0ustar rootroot‰PNG  IHDR Óº&tIMEÔ 8e1 pHYsÁÁÃiTSgAMA± üaPLTE0`€€€ÿÿÿeŠtRNSÿÿ×Ê A+IDATxÚc`bbb€&›‰ L2022"ØÈâxØ0sÁ‚`d€ØÖ‡ZËïïIEND®B`‚axiom-1.2.8/src/site/resources/images/pdf.gif0000644000000000000000000000166611131637462017624 0ustar rootrootGIF89a ‡”¦ ­·¹¿³º»½¾? &·#º"¥5*»++°A:º@1»G8±Z>ŸecºGJ»^O¶[b½ha½eq¹mw³~z»xrÊÀÅÅ5Á'È Ä,9Î42Þ&(ÇITÌBYÇWLÄ\OÌ^]ØHHÓMTÂWaÇ[jÑLaÝ_tÃ`MÓdYÊarÊfpÒffÒinÑayÖrz×~xÙwvàKOâMSäKPìKQáPKåPJí^ZéCgìrqîvxÎs‚Ëy…Ùzšàw†ésƒç}‘̉oσu¥µÌ›”ЀƒÓ‡‰Ý†ÜŠŽÚ‰Þˆ“Ù‹˜ÝŠÓœ•ݙٞ˜Ú— Û§’ß§–Ü®žÎ½¡Ø¦§Þ¡°Ø½´ç툎éŽàŸ›é’˜ð‡„õ›ƒò“—õ››þ””ÿžœäŸ¤ÿŽ§äªžë¦Ÿæ¢¡æ¥«ä®¢î¨ ê¯±à³ â³¡ç°©ê½¸ý¥®ö«²ñµ«ò¶¬ó·¹ò¼¼÷¾ÄÝÃ´êÆ¶ÿÁ®òÁºÛÍÄÖÊÔÛÇÐØÐÃÝçÎÞáØßçÚÓÿðÓÿùÛóõêÃÄèÆÅïÌÆèÊÈïÏÒëÝÐêÜÓìÛÔéÛÚèÜÞõÅÃÿÂÀûÆÎÿÒÅüÑÈÿÒÎÿÛÌ÷Ó×ðÐÛÿÑÐÿÛØÿÞÞðÃàÿÕàÿ×ãûÙçÿßëäíÎïãÍååÙíàÚõáÆðàÑôáÚÿàÙÿâÜÿçÞäæãíäåïêþàÿïâÿìîÿíçöóàÿöàÿÿäÿÿíôþêýöëÿýïúüíÿÿòîëÿãâÿæåÿáéÿíæÿìèÿåöÿïòõÿäÿðïÿôêÿ÷êÿôíÿøæùÿïþýéþÿïñõøñÿööþñòûúñúÿòÿÿõÿÿûóðÿðòÿöñÿôôÿöõÿòúÿñÿÿòÿÿôùÿõþùÿñøÿóùÿôùÿöûÿöÿûóýøõÿøöÿûôÿýñÿüòÿÿñüÿôÿüöÿÿôÿþöøÿúúþþýùÿÿùÿÿúÿþþúüÿüÿüýÿýÿþÿÿ!ùõ, “ë 8c Aƒ*ÉrE 5¤ÈA¢ Þ.^`É“w£Ž¼&¼`s”)yBhÈË´‚À‰5]Œ¡’LJ“0 ™cÈU·*a A¢c!;‡=i±Q R¨Â7„Â*S¡ä¥áAbÄ([‚¶m’4©Õ@s´lQ1Oüp‰¢Ä™#Dȱ%  ;axiom-1.2.8/src/site/resources/images/icon_arrowusergroups1_sml.gif0000644000000000000000000000206011131637462024275 0ustar rootrootGIF89a÷ÿÿÿõ÷ôJ»SÄ SÃAb.i‰VmŒ[™®ŒDCˆY±^·#T£"[–5bŽFI®K¥ /a P¤RŸª²¤¡š@;€%P<} f|T:{:u!=¤¨›†‰|±²­ª­œþþü××Öýùºþö°þö±VNþò¤þò¥þò¦þò§þò¨ÿì•ùè”þîœðá•þïžÕÉŒÿç‡ÿèŠÿéÿì—ÿò¼ÿò¾ÿôÆüöÛÿùßäÌwÞÆtîÖ}êÒ{éÑzíÖ~äÝÃÓ̴иkÁªc͵j˳iÕ½oÓ¼nηp­œhǵxæÕœ¹®‹§‡'³—D¼¤\À¨b«i¿©gº¤fº®Œ¸±ž­•W§T ŒY›ršw“|I˜L•M“}L–€P•…`¡hŒuHˆrFŠtH†rJ…ya‘Š|jZAzTl_KoHwS(QF9Ÿ]ˆOVK?U*êwçvãsÞrÛpßvãzàyÔs¬_ßyÜzêƒâ"ãƒ$`8æˆ*±r4°x>ze¾²¦÷õóálÖl ÏiÚwÛvÙ|'²¡‘¨“ëáØP%ÁZËaÈd}m_š’‹¿W¸R´O¿]‹IJ®KM% ªF¥D Cž<0=ƒ%;7 3 2åããVUU’‘‘ÓÓÓ«««lllÿÿÿ!ùµ,ÿk H° Áƒ",c…É" #ì"ÊU$dãÄÌ“Zc†Ø¸qÇãÔ`±BŒ.J„ÔháBŠ@X8sê|EP *häHsĈ1¢ |åÊ•,Y³fÑâIÐÍ’ /šìð²… ’a ¾zuªÁ5_’hÓƒ™3aÐ18V*UƒY°@áKS¢L“!’DwÖ]‚@H`Á?|-¢$hPº(ð@À…v ÚÓÐ#HoP*Ѐ„ rî Ê£§‘#Lž ¡\B þà é’%N¡H‰BÉaC†>ÌatiS§Q¦N¥R…²V  F„  ó©N%P¥P­bÕ* ;axiom-1.2.8/src/site/resources/images/icon_warning_lrg.gif0000644000000000000000000000272311131637462022367 0ustar rootrootGIF89a ÷ÿÿÿþþþŠŸ¿®‘±’–fbd•Œœ…Šýýþˆ‹¦œ£»Š”°|‰©P]yl¤žº«µÉïñõùúüøùûex›VdzamÑÙæÐØåØßêÛáë]y¢XsšTn“Lc…G\|CWu[vžWq—RjŽPh‹Ne‡Ka‚I_H]}DXvb©5D[gƒ«hƒ«pаrŒ²Yl‰u²{“¶~•¸–¸€—¹ƒ™º…›¼†œ¼‰ž¾ˆ½Ž¢Á¤Â—ªÅ¯É¡²Ë¨¸Ï§·Î¬»Ñ±¿Ô°¾Ó³ÁÕµÂÖ·Ä×¶ÃÖµÂՏŨ½ÉÛ¿ËܾÊÛÃÎÞÂÍÝÄÏßÉÓâÈÒáÇÑàËÔâÌÕãÓÛçôöùóõø*7I“§Ã•©Åš­ÇŸ±Ê¤µÍºÇÙ¹ÆØàæîßåíåêñðó÷ïòöçìòìðõëïôêîóâèïñô÷öøúûüýúûükW?^P?eI+eVFmN/hK-\B(bG+¢n?›j6¼rJÌ|Qú›iãbé“g÷çß÷éâ÷óñörê—qû£|ÒŒlðyè˜våš{ó£ƒäž‡Ç›Ž¾”ˆÐ¢—Œxwÿÿÿ!ùÿ, ÿÿ H° Áƒ‰dÀÁŠ”‡N¡eI„ŸØ@€Ç¯Ha’àF‚`@ªü¨æÈ’ .žüGÄã8q‚<“äÌ^f YITÊ ˜nÞÈDÄ#¿sè¢J•N“«`ÂÌ8ÙT8A`ÊÍÃB‹–4ˆ àêž·pãæñƒ CÖbìÚoŸß¿€ù)ÈGOž<8ØU©DŸ½yîܵs¡ØÉ€Ë˜/ëÈqà¼ïÊùS¼Øc|õ8X7Â^›9wìÀA»FyëlÐM[8 LK{\`Ï:ÕÙ®M{\€åÌ—kðc×î8GiÏœ £r°«Ê¤°ÿcWNîО)Ûu¡;lœ²qÀ¨GŽÜ¸oª›ùºÅšƒ]%àÆ´‘#Ž7Ûd£/«¤â$˜@ÏaÖ‚9Ü`ƒÍ5ÒijQ<Ÿòˆ*¬“CA@¼Q f ¡Æþ`cM5Ñ<ÃL2%óI+¬H2 %sôCXÜŸÛD3Ëô¢K,´,"‹'†LRÉ%™#A?°aFd¬1FÔ,£Ì/»Ôò%ÅlTL'™`¢‰+œxrA>Șa ÁÜ‚J#F¢‰1 '›trÈ+ˆàœ@\œA†\‘> Š…x‚hÇŒ‚¤°€Š(È ´…™Jê°ˆ*«°Bˆ˜2Ë"§ØB ( Œ’)¥˜¢Ç@9h€S<Ñ„¹Y‰%˜¸rÈ(³ " )‰+Ë,ŠØâÀ@2TAE†7X|Ô!ÇvØÑÇ{è¡G CL:ÔN€±„E Ä@üÐ…[ôÀó݀ÂI+€Á#¬0ÃCŒÃ 6ÐÂI!p ‚ŒàÁÊ$P‚ |p ( ,̤óÎ;axiom-1.2.8/src/site/resources/images/nw_maj_rond.gif0000644000000000000000000000006311131637462021336 0ustar rootrootGIF89a€ÿÿÿÿÿÿ!ù, „¦Ê š“¡;axiom-1.2.8/src/site/resources/images/nw_med_rond.gif0000644000000000000000000000005611131637462021336 0ustar rootrootGIF89a€ÿÿÿÿÿÿ!ù,„©\;axiom-1.2.8/src/site/resources/images/OM008.gif0000644000000000000000000000300011131637462017576 0ustar rootrootGIF89aŽOw1!þSoftware: Microsoft Office!ù,‰J‚ÀÀÀÛÛÛ×××ÿÿÿÿºÜþ0ÊI«½8ëÍ»ÿ`(Ždižhª®œà¾p,Ïtmßx®ï|ïÿÀ pH,ȤrÉl:Ÿ=tJ­Z¯Ø¬vËíz¿`—4L.›Ïè´zÍn+Çî¸|N¯Ûïø0<Ïïûÿ€‚^{48‡ƒŠ‹ŒŽN…32”—˜™š›’•1 b ¡ œ§TžIªf¬5®/ £¦j°S¶Ÿ¨:¶ž‰¹©¤[ª¸º6cÄBÈ£HÇ´¿<¼´…ÍY’ÊQ¦¬×ÛFÝÕΆá0Á“ãMßUéÅÜÙç«ïà¯ñóˆÒñëAÖôGÚüæìnDkgj€Áû–+%«·OÍJiHP¡Ä`AQ$EÿœÆYÎ6ÂåPä8’G^œæ "Hs*ï¥tIð¤»s-jܹr'Ír-=ÊâH±d¹—³–å4™²hÓXE“:œ:åPžPcFõ&ȘJ±¶ú¡‚ƒgÍîÉ-佚¥ƒF:QQ–—™:<žG¡£¤—³9ª… ­®®£³'¾'7¶ƒ ¹º'::22¾5ÂTBź'¦ÊÌ'3 CÆ2£—ÉË'1Â@ÜÞݤ§Ê/ÂMQé®Ý»âîÂ>õ˜Æì’ˆàBXKÞtx¢…0¢èHÎ%$+„íˆjbB_ʆÃÁ]ã–1ä# ’˜˜ Ea¸KRZ"1!lÉÌš4a=Á©³„0?]AJÔåa4’5tHN—„)‘º”jS$„ÁàÊԪΠÂü5¥””LWi‘<vÀd”“S£Tu"Ã%a,<¡©´lN$H2+0ä$Юz› ø ŒY¯f]j¦âräÌH@Cá¹êÕ!ž‘˜÷ذ² Ïy0¹j&±]À`3Ö¸sÊðA„(ˆà`+;axiom-1.2.8/src/site/resources/images/icon_sortup.gif0000644000000000000000000000016511131637462021410 0ustar rootrootGIF89a³ÿÿÿj´?S‡-˜ðZ}­ZÜ÷ÈJt)ÿÿÿ!ù,"ÉI«½8ëÍ©è‚ql!AŒXIZ©ìÐVGmßn§ï<;axiom-1.2.8/src/site/resources/images/icon_info_lrg.gif0000644000000000000000000000254711131637462021661 0ustar rootrootGIF89a ÷ÿÿÿýýþùúüøùûÚàëUm“ÑÙæÐØåÕÜèØßê×ÞéÖÝè 'S(Bi+Fm6OsG_ƒH^€H^_|¦]y¢Yt›Vp–Sl‘RkLc…J``}§Xr™RjŽQiOf‰Ne‡Md†H]}b©LbƒI^~e©gƒ¬j…­l‡®mˆ¯o‰°WlŠpаq‹±t²u޳z’¶g|š{“¶~•¸l€˜º€—¹uŠ©x«ƒ™º…›¼zެ†œ¼ŠŸ¿‰ž¾t†¡~‘®w‰¤‹ ¿€“¯¡À”¯£Áz‹¥¤Â’¦Ã…—²|¦Ÿ¹™¬Ç˜«Æ—ªÅ—©Ã¯Éœ®È ¸¡²Ë•¤»¦¶Î¨¸Ï§·Î©¹Ðœª¿¬»Ñ«ºÐ¡®Â±¿Ô°¾Ó²ÀÔ³ÁÕµÂÖ¶ÃÖ§³Å¸ÅؽÉÛ¼ÈÚ¬·È¯ºÊ­¸È¿ËÜÁÌÝÃÎÞÂÍÝÄÏßÉÓâÈÒáÇÑàÆÐ߸ÁÎËÔâÍÖäÌÕãÎ×äÁÉÕÓÛçÒÚæéíóõ÷úôöùóõø\xŸc€©oƒŸ£¿“§Ã}ަ•©Å”¨Ä¨Šœµš­Çƒ“©“¤¼Ÿ±Ê¤µÍ£´Ì¢³Ë®½Ò¤±ÃºÇÙ¹ÆØ¯ºÉ®¹È³½ËÀÉÕàæîßåíáçïÙÞååêñäéððó÷ïòöîñõ¨µÅÝäíÜãìÛâëçìòæëñìðõëïôêîóÒÙá×Þæâèïñô÷öøúûüýúûüþþþÿÿÿ!ùµ, ÿk H° Áƒ*\ȰáBqôàÉsGΜ:qà´A“æL™1’Ò0Œƒ*­“RÊš5`þ‚…'ŠB8NÒJ)`%K—±þš)j(%ù|Ò©råOv‚…J”ªU¬ÜL:ˆeO§ì4h0!P ª£T±òƒêÓƒtx‚%KÂØ™B¥ÅŠ*¨WDÆ‘5—îŸw÷ŒÂê'Õ§W8ù8èæ'P¡Z9hÐH-ÛT7•2…ƒkKÃSCéõÜ÷¯hSÐ8h õ̪šÖ`b£ÆÕãMœLRÀAŒƒd0S-ªê„»¤:m®€A%9J.F¯p«±r®N3O²v´³x·µ{»@-EL6RO8V08G3O1:bGm3=4>7 C5AgOx?2ME7TmW†|d™}gŽu²š„Á^Vƒøððèààöððýýýûûûúúúôôôÿÿÿ!ù,Ï; H° AJýéÃg’ÁN’Þ´YcŒ—* FrÃM™/]¨HI‚h $5iÎŒ³å “%B€øéTÉ ™0P8ÁÒ$À“2,Êã…‹•,Z(µ¤D‡ŒðL‰¢É¥¨@¡€¢;GŒÉák$<Hd‡ >`ê'‘!\2ƒ†?v°hp‰‡  uÚ@‹ .¨Xñà = q˜0 )f$Tp„"F¼ˆQƒ´ÁGrểCÇÁ€;axiom-1.2.8/src/site/resources/images/icon_help_lrg.gif0000644000000000000000000000261211131637462021647 0ustar rootrootGIF89a ÷ÿÿÿüüïþþôþþûÿÿþýûÀúùÞýùºýú¼ÿþîüö´ýø·ýø¸ü÷¸ýø½üøÁüúâûùáúùêýõ®ûô¯ýö±üõ±ûô°þúÓþüêþýóûñ¨ýó«üó­ýøÖüùâÿüæþûåÿþöüí›ûíüð¢øë¡úî¤þõ¾ýöÍüùçùç“ñàùé–ûë™øè˜úëšmb6»©aüä…³¢_ûä‡üæ‰òÜ…øã‰öá‰õáŒ÷äûè“ùæ‘ñßüè–! 1*KB!_T,^S,ZP*OF%SJ'dY0nb5l`4h]3ˆyCi]4‹|E•…K~GˆzDwk<©˜V‰{F–†Mɵh¹¥`¨–WëÓ{äÌwâÊvàÈußÇtÜÅsØÂqϹlÁ­e¼¨b§•W£’UõÝóÛ€ï×~îÖ}ìÔ|èÐzçÐyçÏyåÎxåÍxʵjµ¢_³¡^¯\«™Zª™Y¨–Xúâ„ùá„øàƒöÞ‚ðØéÒ{Ô¿pÓ¾pðÙ'! ;3SI'иkÌ´iʳhȰgÁªc–„MÚÂqÖ¾oÓ»mѹlÏ·k͵j¬™YÙÁq׿pÕ½oÓ¼nưg¥“V¡T+$‹yFÁ©b´œ[²šZ¾¦a¼¤`»£_º¢_¹¡^· ]·Ÿ]‘J}I{HÆ®fÅ­eëd”‚L’€K ˆO­•W«“V©’U©‘U§T¥S£‹R¢ŠQ°˜Y®–X’zG—J“{HxFž†Nœ„M˜K”|I›ƒM™L—€KuD‹sC‰qB…n@xF†oAg<}f;{d:ƒk>|e;x`8t]6r[5{c:w_8nV2qY4ÿÿÿ!ùÕ, ÿ« H° Áƒv¡¦á"I“QªÔÈ$C‡}z”p % 8€Ð A‚ %?|À!ƒ`Hu¬#‚8HØ‚ˆ+~èÙ³çÌ™5·zq‘€B *jH­O=C‰Eƒ¦ªƒŽ*L0 á©U¯bÕz†+>idœä‰hñÐ(2D€#UÚºM“FMRƒ”*ˆr#í# `‚ná5[^lta‰´R$‹žrs¹ øàCm_ÈO¬ŠœIi6nh„ÔA ¬X"'±acŽd1}pÃéÒêà¡-t eF+sþ„†,H›7\¼€ÿéu‘…lÛŸljd%u–#IØÁT)zlEÓÇÏŸJƒH†„tÌ' #ürP"1ì ˜ejDY TÜQÆUbÑ1y‚ofÛGDv…—d1 %<‚Ñ0’ šFdƒ\R†%‚*©s)5n‘œoQ†˜ˆQ$‡™È&ÆÄɈF*×…d‘4r"©¨²‰' 0sÐ-k`ÆÆwá!™QŠI¦(¤$sÐ+GÂÁÅ|‹L"™"@Ž œtòÌAµ¸ÁE|NB‘d¬Lù ¡¶Ür 2ÙâH£rÑ*¬”bÊ'¡Rè-®¼²‹(Ó'E.fg”Ѝ§h2Š©•¾Ë/Ît„Ë!ž¦œƒâŠ*,²$#MGñÂK/ÀãK.¹(sk'•.3 1ÅŒÂ,³Ã`ëŠ0¬~kn3±Ü¢ª¹ìVCÍ,»jÖî·Ó3Ë2óš» 4Í$’¯¹ºDÓQ@;axiom-1.2.8/src/site/resources/images/icon_arrowfolder1_sml.gif0000644000000000000000000000207211131637462023335 0ustar rootrootGIF89a÷ÿÿÿÿþ—üø“þú•ýú•ýû•þü–ü÷’ü÷“ùðŽùîùï÷íŒöè‰õèˆæÙ€÷éŠ÷êŠîá…öæˆõå‡ôä‡áÑ{ëÖ~òðèÜÄrï×}íÕ|äÌwâÊvàÈußÇtÜÅsï×~îÖ}ìÔ|éÑzçÏyåÍxåÎxãËwðØÚÅtåÞÆÐ¸kζjÌ´iʲhȰgÁªcÚÂqÖ¾oÔ¼nÓ»mѹl͵j˳iÛÃrÕ½oÓ¼nËÁ åÞÈÁ©b¶ž\´œ[¿§a¾¦a½¥`¼¤`»£_º¢_¸¡^·Ÿ]· ]µ\³›[Æ®fÅ­eĬeëd¢—y©ž€ ˆO¡ŠP­•W«“V©‘U¨T§T¥S¤ŒR£‹R ‰Pœ…N°˜Y®–XŽwE—J•}Iœ„M˜K”|IŸ‡OŒ}\‡oAŒtDˆpB†oA„m@‘yGi=‚j>zb9ya9lY:nV2mU2kT1jZBdM.bM1bM2åããVUU’‘‘××׫««lllÿÿÿ!ù‚,ÿ H°`%H$y2pDN Jœø¥ ª ÄÈ b&ö™8ðÆ…(¨P@€ 4Ò|™b†`>$‘"¢g ?¾,¹B]lîÁIò̈ XŒìð Âƒ:h¨9°ÏŸ?L%^ñAˆ$p€ Zl~–à–-nذa‡3nÄøÁE. ?t%V9QdÅ¿(BØ€!ãÈ$†ÕHœ N„¨‘Š&UÂX± H3ÉIĘÀãÅ"Aªd¡BÇM×9©Œ±ñ  `°Œ©3§GÁ›9ªaÓdˆ’/WÚàACróD7rŽ0Ñ'”èè¾YCÆÎôðyÑ}@;axiom-1.2.8/src/site/resources/images/file.gif0000644000000000000000000000023011131637462017754 0ustar rootrootGIF89a ³ ÌÌÌàààÿÿÿéé鯯¯îîî333™™™‰‰‰ÿÿÿ!ù , EHr#iÉD°p ø$€(1¬¬‰Ü6°­…Hƒ`°¸ Hánr “Ë lúÜI§ÔÂàŠÅr»°‹aL.";axiom-1.2.8/src/site/resources/images/icon_usergroups_sml.gif0000644000000000000000000000200211131637462023135 0ustar rootrootGIF89a÷ÿÿÿøùøõ÷ôJ»SÄ SÃAb.i‰VmŒ[™®ŒDCˆY±^·#T£"[–5bŽFI®K¥ /a P¤RŸª²¤¡š@;€%P<} f|T:{:u!=¤¨›†‰|±²­ª­œþþü××Öýùºþö°þö±VNþò¤þò¥þò¦þò§þò¨ÿþøÿì•ùè”þîœðá•þïžÕÉŒØ×Òþýøÿç‡ÿèŠÿéÿì—ÿò¼ÿò¾ÿôÆüöÛÿùßÿýõäÌwÞÆtîÖ}êÒ{éÑzíÖ~äÝÃÓ̴иkÁªc͵j˳iÕ½oÓ¼nηp­œhǵxæÕœ¹®‹§‡'³—D¼¤\À¨b«i¿©gº¤fº®Œ¸±ž­•W§T ŒY›ršw“|I˜L•M“}L–€P•…`¡hŒuHˆrFŠtH†rJ…ya‘Š|jZAzTl_KoHwS(QF9Ÿ]ˆOVK?U*êwçvãsÞrÛpßvãzàyÔs¬_ßyÜzêƒâ"ãƒ$`8æˆ*±r4°x>ze¾²¦÷õóálÖl ÏiÚwÛvÙ|'²¡‘¨“ëáØP%ÁZËaÈd}m_š’‹¿W¸R´O¿]‹IJ®KM% ªF¥D Cž<0=ƒ%;7 3 2õõõãããÓÓÓÿÿÿ!ù¶,ßm H° A‚j¶Dá’äà@14N¤¨¡¥`œ)k¨ØBƒDÇ<° ´“£‹3>Â<9’ÃÅ‹+ßɱÂF7L– ‘1ÃÊÀ9PŒÄòc ˜,Mˆ˜!‡Œ“/e‚”HÃÆL%½t©¤Ö'Gž0=jtI`‚\8PgP F2B$A`P±gQ"@‚ QªDg &P¸Ã‘Ÿ?’&u¥ˆ„ 2l ÔÇ%N›B™Juª >€À‰(Q¨V±rõÊ–‰!HˆÈCJ¦RªZÁŠ%+ ;axiom-1.2.8/src/site/resources/images/archi007.jpg0000644000000000000000000002711511131637462020400 0ustar rootrootÿØÿàJFIF``ÿÛC    $.' ",#(7),01444'9=82<.342ÿÛC  2!!22222222222222222222222222222222222222222222222222ÿÀö¤"ÿÄ ÿĵ}!1AQa"q2‘¡#B±ÁRÑð$3br‚ %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyzƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖרÙÚáâãäåæçèéêñòóôõö÷øùúÿÄ ÿĵw!1AQaq"2B‘¡±Á #3RðbrÑ $4á%ñ&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz‚ƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖרÙÚâãäåæçèéêòóôõö÷øùúÿÚ ?ö»­FY5¦iááP<ò¸Ê@§¦Gv<á}N8È4o4î¼Ô/n…˜Ä¿€L~¹ª~ù®5é—:œŠXõÀTÀÏ ®‚€3°l½yÿÓñt`Øÿzóÿ¦ÿâëJŠÍþÁ±þõçþMÿÅÑýƒcýëÏü›ÿ‹­*(7ûÇûןø7ÿGö ÷¯?ð:oþ.´¨  ßìï^àtßü]Ø6?Þ¼ÿÀé¿øºÒ¢€3°l½yÿÓñt`Øÿzóÿ¦ÿâëJŠÍþÁ±þõçþMÿÅÑýƒcýëÏü›ÿ‹­*(7ûÇûןø7ÿGö ÷¯?ð:oþ.´¨  ßìï^àtßü]Ø6?Þ¼ÿÀé¿øºÒ¢€3°l½yÿÓñt`Øÿzóÿ¦ÿâëJŠÍþÁ±þõçþMÿÅÑýƒcýëÏü›ÿ‹­*(7ûÇûןø7ÿQO¤é–°<÷ÜÅ csÉ&¡2ªRKñZõãùõ_úáýEAæøcþ‚ÿùT—ÿ‹¥ó|1ÿAüªKÿÅ×KEs^o†?è/ÿ•Iøº<ß Ð_ÿ*’ÿñuÒÑ@×›áú ÿåR_þ.7Ãôÿʤ¿ü]t´P5æøcþ‚ÿùT—ÿ‹£ÍðÇýÿò©/ÿ]-Íy¾ÿ ¿þU%ÿâèó|1ÿAüªKÿÅ×KEs^o†?è/ÿ•Iøº<ß Ð_ÿ*’ÿñuÒÑ@×›áú ÿåR_þ.7Ãôÿʤ¿ü]t´P5æøcþ‚ÿùT—ÿ‹£ÍðÇýÿò©/ÿ]-Íy¾ÿ ¿þU%ÿâèó|1ÿAüªKÿÅ×KEs^o†?è/ÿ•Iøº<ß Ð_ÿ*’ÿñuÒÑ@×›áú ÿåR_þ.7Ãôÿʤ¿ü]t´P5æøcþ‚ÿùT—ÿ‹£ÍðÇýÿò©/ÿ]-Íy¾ÿ ¿þU%ÿâêKhü=y8‚ÛRyf`H59K:ào®†¹ý[þFÿÿÛÏþ‹wû˨{Ð{{7øý1­5+ºÊèÝ ëÛrÝp2ûÙü+ZŠ©¦ê0ê–Iså•xÜa£qÃ+Ä(®Uá×u´‰Ú4ûZ¨p2`ˆ“êI?­áõºïý…eÿÐR·ëÂÿëußû Ëÿ ¥oÐEPEPEPEPEPEPEPEPEPEPX7ÿ‘/Uÿ®ÔVý`xßþD½Wþ¸Q@ôQEQEQEQHs´ã®8 ¢¼ÇHÐÔÛQ\\3xÆ]\­ìsAjÐZ˜~Ä0>™¼ä`ãíëXvkñ"ËA‚ ó^%µÞù †Fk¯30‚OQSÛ‘ÓŽz…çš½ï,-õíF{Ë{8¬íí¥±FHÌWtñž òáçŠßð^¡«ë3êúª˜VöS-¥©Œ+AD ܱ1äõâ€:J(¢€ (¢€ (¢€ (¢€ çõoùü;ÿo?ú,WA\þ­ÿ#‡íçÿEŠè(¢Šâfÿ‘‡[ÿ¯¤ÿÒxh¢oùu¿úúOý'†Š×ð¿úÝwþ²ÿè)[õáõºïý…eÿÐR·è¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¬ÿÈ—ªÿ×ê+~°°nòZG-ÈHDÇ`*Jç$@è*jFsZÂËOÃåÔ õÔ¯K±˜É>b9}Ø ¸67œcùéÚ¬i·sÜj÷‹-Óy~T2Enñ 2e¨ç¨÷­;IÚâÎÞà­,I!ô$Ö¥Éõ¥Ap¢Š+ŒA^ñþE[OúüúW WŸü_ÿ‘VÓþ¿þ€Õß–½ÓõÜóÉDðçý„­ÿô`¯·+â?ÉDðçý„­ÿô`¯·+ïMŠ( ¹ý[þFÿÿÛÏþ‹ÐW?«ÈßáßûyÿÑb€: (¢€8™¿äaÖÿëé?ôž(›þFoþ¾“ÿIᢀ5ü/þ·]ÿ°¬¿ú Vý`x_ýn»ÿaYô­ú(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š+Æÿò%ê¿õÃúŠß¬ÿÈ—ªÿ×ê(~Š(  =Añ®»?ãÚÓÿjÕˆ £Àº¯î/oöÖ¬éßò:ëŸõíiÿµjˆò"j¿õÍô5¡É?ßo©¦ÓŸï·ÔÓG¿5—ÄÎr´wö’D$ª–eØ.J±S×ÜR‹ˆüOØpÿ8ùO¿¥eÛè~Q™žHÝž aS³•/#¾ñà? ¯¨hr¾Vâ'xíc·Ù³†"Hر˜CÅuû;Ÿ*ž—_ðã6ZòÙbIDÈñ¼‹d;†æ8sQMmis{¿ÎeºŠ2‡Éœ£$Lã­W“K–k¡s#ÂŽåħa¾üóüG§Ó¶‚ð4*×NñÀY‘™Ø³ù‡Nþù©ŒiGU;0,´YBMÄa‘ôßiùÀKg=8úSþÇen¸óÞ#4žfÿ´°i€3’yà ŠÓGKi4Ö",íLñ¸Ÿ0ôû§óª‰áéc†4[²OÙÒ æUsÊ랇ÐsUî?ùxÿ¯êÿ04 –G²Ã"-U&Øì:í<äòIü}ê=ºMä,sÆ!É•¢Ÿb2»[{Žj'ÐÁ¶¼‰dMÓù!deË(Œ äõ9Ú:C¤\„²@'–@T°v'’AÇh¼-uQÞÿ×ã ‹«{aj"µ[˜AîŠ0à–p2=jËM*!¸€-ôõ¬øGgJ‹5¾%†æ&Ê±Ûæ° Œ’N1ŽM_›L‘žà£ÂÂæ%‰üÕ$Ævå?<à÷¢T°öMOQè_3²ˆŒÑ‰ ÀBãq?Nµ%d6†>ÏsÊ¥æ–2屌r{“°þu®NI5…HÓJð•ÿ¥ý|„çÿÿäU´ÿ¯Áÿ 5zyÿÅÿùm?ëðè ]9gûÝ?Q­Ï7ðü”OØJßÿF ûr¾#ðü”OØJßÿF ûr¾ôÜ(¢Š+ŸÕ¿äoðïý¼ÿè±]sú·üþÿ·Ÿý( ¢Š(‰›þFoþ¾“ÿIᢉ¿äaÖÿëé?ôž(_Âÿëußû Ëÿ ¥oÖ…ÿÖë¿ö—ÿAJß ŠÈÔu††ðiö(²ÞlóŸîB½‹c’O8QבTÖêá·Üêwlç´P{¼ãêI÷¯+œápRä¨ï.ËrãNRØé¨®WûÓÖëÿåÿâ¨þÇ´õºÿÀ¹øªó?Ö¼/òKðÿ2ý‹îuTW+ýiëuÿrÿñTcÚzÝà\¿üU/õ¯ ü’ü?Ì=‹îuTW+ýiëuÿrÿñTcÚzÝà\¿üUë^ù%ø˜{ÜꨮWûÓÖëÿåÿâ¨þÇ´õºÿÀ¹øª?Ö¼/òKðÿ0ö/¹ÕQ\¯ö=§­×þËÿÅQýiëuÿrÿñT­x_ä—áþaì_sª¢¹_ì{O[¯ü —ÿŠ£ûÓÖëÿåÿâ©ÿ­x_ä—áþaìsª¢¹u°xˆ6ú…ü$}Ñç—Qÿ|ƒøÕ¨5©í'Š P!I[j]Æ»Sq pIÚI8$é]Ø,û ‹š§ã'ÑõüÉ•)GSzŠ(¯hÌ(¢Š+Æÿò%ê¿õÃúŠß¬ÿÈ—ªÿ×ê(~Š(  ;þG]sþ½­?ö­AñþDMWþ¹¯þ†µ>Ÿÿ#®»ÿ^ÖŸûV£ñÌ]x+S†Þ&•£]±Æ¥˜áàM =þû}M6’Ge.æÖô(É$ÙË€?ïšÀÿ„çÂßôµÿǿ¿<–½ß¸þæaftW?ÿ Ï…¿è9kÿ…ðœø[þƒ–¿ø÷øTýV¿ò?¹…™ÐQ\ÿü'>ÿ å¯þ=þÂsáoúZÿãßáGÕkÿ#û˜YÏÿÂsáoúZÿãßáGü'>ÿ å¯þ=þ}V¿ò?¹…™ÐQ\ÿü'>ÿ å¯þ=þÂsáoúZÿãßáGÕkÿ#û˜YÏÿÂsáoúZÿãßáGü'>ÿ å¯þ=þ}V¿ò?¹…™ÐQ\ÿü'>ÿ å¯þ=þÂsáoúZÿãßáGÕkÿ#û˜YyÿÅÿùm?ëðè ]ü'>ÿ å¯þ=þÅüMñ¬xvÚßNÔa¹•nC”Lä ¬3È÷®Ü»Z8¨9A¥~Ìw8¿ÉDðçý„­ÿô`¯·+â?ÉDðçý„­ÿô`¯·+î Š( ¹ý[þFÿÿÛÏþ‹ÐW?«ÈßáßûyÿÑb€: (¢€8™¿äaÖÿëé?ôž(›þFoþ¾“ÿIᢀ5ü/þ·]ÿ°¬¿ú Vý`x_ýn»ÿaYô­úã´b^ó\•Žé¥*–=HP¡Gà8­Y:'úýoþ“ÿìµ­_–fí¼u[÷ge?…Q^qa\ÅÇ‹Ú]~ïEÑt¹u+»V»>jÂîåF[ïÏAzé뜺ðm¤šìÚÕ…íî—¨\&ˉ-q8ÆåueÈÇP®œ3 ¤ý·m7µüí­½:‰ß¡{ñ>ÊË@¾¿}:çíš}ÒZ^X–]ÑHĆV)ä~”Ýk╎‘ YjÙ—3¼áÌÖÊêÛco3“œ…ÿ ·?ÃM}ãJi/3up·W7~h3O"’Af#Ï ]Gᦇ©&²²µÊUÑ¥1²(+ÛËò‚Ã'Ô×§e7WRßÏm<öÝ÷Ð|ê…ÜBÀ^JÂ(D^k³œ\däû ãôˆöúÞ­ci&—uc¢’=…Ìäm¸ØØ#‰ê?ZèukÃÒh²ÜÜAm,k¼ ”²AëŽko†~h¬¾ÇjöR$°\Ú¾$}IÈ ÷õ®L7ÔTeíïvô·Em÷]}væèe\üW‚ Íb¦Ç·J™â—ÍÔ"‰äÛœ˜Ñ¹n°­Ë_Û^x›JÑ£±¹C¨Øä’a°¢üß+)ç?/ëV´oéš-î©w´òêW&êS8VÚç`ÿ†rñoýtoûû'ÿGü3—‹è#£ßÙ?øŠú~ŠùƒþËÅ¿ôÑ¿ïìŸüEðÎ^-ÿ Žÿdÿâ+éú(æøg/ÿÐGFÿ¿²ñÃ9x·þ‚:7ýý“ÿˆ¯§è ˜?᜼[ÿAþþÉÿÄQÿ åâßúèß÷öOþ"¾Ÿ¢€>`ÿ†rñoýtoûû'ÿGü3—‹è#£ßÙ?øŠú~ŠùƒþËÅ¿ôÑ¿ïìŸüEðÎ^-ÿ Žÿdÿâ+éú(æøg/ÿÐGFÿ¿²ñÃ9x·þ‚:7ýý“ÿ×ÓôPÎÞø â}ÅZN©q¥<6wqO"Ç,…Š«@Êx¯¢h¢€ (¢€ çõoùü;ÿo?ú,WA\þ­ÿ#‡íçÿEŠè(¢Šâfÿ‘‡[ÿ¯¤ÿÒxh¢oùu¿úúOý'†Š×ð¿úÝwþ²ÿè)[æ°aÔõ…°jV—cŽu±¾QÇÕNü«¥¨.l­oT-Õ´3¨è%Œ0xYŽAC?jŸ,¿ê!UÇC'ÌOï¯çG˜Ÿß_ή`hßô °ÿÀdÿ ?°4oúXà2…y?ê“ÿŸßù/üOoäSóûëùÑæ'÷×ó«ŸØ7ý,?ð?Âì þø ŸáGú¤ÿç÷þKÿ=¿‘OÌOï¯çG˜Ÿß_ή`hßô°ÿÀdÿ ?°4oúXà2…ê“ÿŸßù/üöþE?1?¾¿b}:¹ý£Ð"Ãÿ“ü(þÀÑ¿èaÿ€ÉþªOþä¿ðCÛùüÄþúþty‰ýõüêçöÿ@‹üOð£ûFÿ E‡þ'øQþ©?ùýÿ’ÿÁoäSóûëùÑæGýõüêçöÿ@‹üOð£ûFÿ E‡þ'øQþ©?ùýÿ’ÿÁoäfÜ_ZZ¨3ÜD™è ·Ðw¨>É?ˆ<Ëg†X4¶B³<ˆQç}Ô1ÕˆïÇr7í´Ë 7/kcmž­*§ôn»ð<5C5R¬¹Úò²ûµüÉ•fôB(ÀÀ¥¢ŠúC¢Š(¬ÿÈ—ªÿ×ê+~°…ÿ@ÝSþøÿ‹£þ>…ÿ@ÝSþøÿ‹£ÛÒþdY£üËï=Šóø\úýuOûâ?þ.ø\úýuOûâ?þ.oKù}fó/¼ôz+Î?ásè_ô Õ?ïˆÿøº?ásè_ô Õ?ïˆÿøº=½/æAõš?̾óÑè¯8ÿ…Ï¡Ð7Tÿ¾#ÿâèÿ…Ï¡Ð7Tÿ¾#ÿâèöô¿™Öhÿ2ûÏG¢¼ãþ>…ÿ@ÝSþøÿ‹£þ>…ÿ@ÝSþøÿ‹£ÛÒþdY£üËï=Šóø\úýuOûâ?þ.ø\úýuOûâ?þ.oKù}fó/¼ôz+Î?ásè_ô Õ?ïˆÿøºÒÐ>&é>!ÖàÒ­¬¯âšpÅZe@¿*–9ÃÐzSU©·e$8×¥'e$v´Qš+CP¢Š(®Vÿ‘¿Ã¿öóÿ¢ÅtÏêßò7øwþÞôX ‚Š( &oùu¿úúOý'†Š&ÿ‘‡[ÿ¯¤ÿÒxh   ÿ­×ì+/þ‚•¿Xÿ[®ÿØV_ý+~€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ Àñ¿ü‰z¯ýpþ¢·ëÆÿò%ê¿õÃúŠß¢Š(Nÿ‘×\ÿ¯kOý«T~&É6×ëØÿ1W´ïùuÏúö´ÿÚµGâgü“mwþ½óóÛ}ãõ¤¥o¼~´•ó¯så^áERQEQEQEQEQET–ž)—Áš¦¹ª\É 2Šƒ¹Hê*:ÄñOü‚“þºäkl?ñbtaSÔ¼;û@ê:ç‰tÍ)ôX’öê8E‰PÌ@ǽ{Õ|Gàù(žÿ°•¿þŒöå{§Ñ…Q@sú·üþÿ·Ÿý+ ®Vÿ‘¿Ã¿öóÿ¢ÅtQEq3Èíÿ×Òé<4Q7üŒ:ßý}'þ“ÃEkø_ýn»ÿaYô­úÀð¿úÝwþ²ÿè)[ôQEQEQEQEQEQEQEQEQEQEVÿäKÕë‡õ¿X7ÿ‘/Uÿ®ÔPýQ@:wüŽºçý{ZíZ£ñ3þI¶»ÿ^ÇùŠÐ6:¯ˆoõ X­&ŠêcÛ,Í)Mùèwʰ~#Kª·ÃÍlOgd‘™’陀Èè c?˜  o¼~´”­÷Ö’¾uî|«Ü(¨ÍÄJ ´Š ’O\u O$ PàdóÚŸ+ì>Yv5ȉˆX’íH.²[ŠÁKnÀ#ÄRJÖ­’¶T|ÛOQôïRbsɸJú‘Œ!V’KTh”Tuˆ$êåAËHþî=}»ÈBR3‡lôïÓ½27·G‘¼õfs–9»SœÛ%b˜=x?ãI¤žÂqIìB.¦2ªˆWWïuøSÚõªíùÈ'i=0q×´ãöX¥ÜJ,„ï7¯þtí_zåvÄ7$`õþµo•íGÈíh±ÑÜ ˜lF*T6ãÆÏo¦¨öÊɇ@_åïŽß­HfQYT7LšÎK]Œ–º!ôTm½Ò&™áŽê?-¤ŒËÏQž;PÌM÷Ö’½nãàÕœ6ÒÍý¹xJ!lSœ úWÎ_ð•j݃þø?ã^CÁU<7—Ö¿C²¢¸ßøJµîÁÿ|ñ£þ­Cû°ßüi}J¨¿³ëy•ÆÿÂU¨vûàÿð•j݃þø?ãGÔª‡ö}o#²¢¸ßøJµîÁÿ|ñ£þ­Cû°ßühú•PþÏ­ävTWÿ V¡ýØ?ïƒþ4ÂU¨vûàÿRªÙõ¼ŽÊŠãá*Ô?»ýðÆøJµîÁÿ|ñ£êUCû>·‘ÙQ\oü%Z‡÷`ÿ¾øÑÿ V¡ýØ?ïƒþ4}J¨gÖò;*ÄñOü‚“þºäk#þ­Cû°ßüj­ö·u¨À!b wʸ9üëZ8Jš“5¡‚« ŠNÖF€?ä¢xsþÂVÿú0WÛ•ñ€?ä¢xoþÂVÿú0WÛ•éžÀQEW?«ÈßáßûyÿÑbº çõoùü;ÿo?ú,PAEP7üŒ:ßý}'þ“ÃEÈíÿ×Òé<4P¿…ÿÖë¿ö—ÿAJ߬ ÿ­×ì+/þ‚•¿@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@`xßþD½Wþ¸Q[õãùõ_úáýEoÑEQEÙe£q•`TPk…ÿ…/ðûþ…äÿÀ™¿øºï( þ¿Ãïú“ÿfÿâèÿ…/ðûþ…äÿÀ™¿øºï( þ¿Ãïú“ÿfÿâèÿ…/ðûþ…äÿÀ™¿øºï( þ¿Ãïú“ÿfÿâèÿ…/ðûþ…äÿÀ™¿øºï( þ¿Ãïú“ÿfÿâèÿ…/ðûþ…äÿÀ™¿øºï( þ¿Ãïú“ÿfÿâèÿ…/ðûþ…äÿÀ™¿øºï( þ¿Ãïú“ÿfÿâèÿ…/ðûþ…äÿÀ™¿øºï( þ¿Ãïú“ÿfÿâèÿ…/ðûþ…äÿÀ™¿øºï( .Ãá/ôÍBÞþÏBH®m¤Yb´Jv²œƒ‚Øê+´¢Š(¢Š+ŸÕ¿äoðïý¼ÿè±]sú·üþÿ·Ÿý( ¢Š(‰›þFoþ¾“ÿIᢉ¿äaÖÿëé?ôž(_Âÿëußû Ëÿ ¥o×?áÿô]W[±›å®ÍÚïDê 0õåH>õÐPEPEPEPEPEPEPEPEPEPEPX7ÿ‘/Uÿ®ÔVýTÔôè5m6âÂç“:}†Ç±  tV_ö<ßôÔ¿ï¨ÿøŠ?±æÿ Î¥ÿ}GÿÄP¥—ý7ýu/ûê?þ"ìy¿è3©ßQÿñ©EeÿcÍÿAKþúÿˆ£ûoú ê_÷ÔüEjQYØóÐgRÿ¾£ÿâ(þÇ›þƒ:—ýõÿ@”V_ö<ßôÔ¿ï¨ÿøŠ?±æÿ Î¥ÿ}GÿÄP¥—ý7ýu/ûê?þ"ìy¿è3©ßQÿñ©EeÿcÍÿAKþúÿˆ£ûoú ê_÷ÔüEjQYØóÐgRÿ¾£ÿâ(þÇ›þƒ:—ýõÿ@”V_ö<ßôÔ¿ï¨ÿøŠ?±æÿ Î¥ÿ}GÿÄP¥—ý7ýu/ûê?þ"ìy¿è3©ßQÿñ©EeÿcÍÿAKþúÿˆ£ûoú ê_÷ÔüEjQYØóÐgRÿ¾£ÿâ(þÇ›þƒ:—ýõÿ@•Ïêßò7øwþÞôX«ŸØóÐgRÿ¾£ÿâ)±h1®¥m}5íå̶ÁÄBg]«¸`œâ€5¨¢Šâfÿ‘‡[ÿ¯¤ÿÒxh«}“ëz¦£ªÁ=áþ0ˆ‘îpA(qEtWútWë.ñOoŠxÎõ¸<Ö«Ö­GÌl®Ð¼Å¡cõÀaü¿ ( ÿhê¿ô³ÿÀÆÿãThê¿ô³ÿÀÆÿãTQ@öŽ«ÿ@û?ü oþ5GöŽ«ÿ@û?ü oþ5Ehê¿ô³ÿÀÆÿãThê¿ô³ÿÀÆÿãTQ@öŽ«ÿ@û?ü oþ5GöŽ«ÿ@û?ü oþ5Ehê¿ô³ÿÀÆÿãThê¿ô³ÿÀÆÿãTQ@öŽ«ÿ@û?ü oþ5GöŽ«ÿ@û?ü oþ5Ehê¿ô³ÿÀÆÿãThê¿ô³ÿÀÆÿãTQ@öŽ«ÿ@û?ü oþ5GöŽ«ÿ@û?ü oþ5Ehê¿ô³ÿÀÆÿãThê¿ô³ÿÀÆÿãTQ@öŽ«ÿ@û?ü oþ5GöŽ«ÿ@û?ü oþ5Ehê¿ô³ÿÀÆÿãThê¿ô³ÿÀÆÿãTQ@öŽ«ÿ@û?ü oþ5GöŽ«ÿ@û?ü oþ5Ehê¿ô³ÿÀÆÿãThê¿ô³ÿÀÆÿãTQ@öŽ«ÿ@û?ü oþ5GöŽ«ÿ@û?ü oþ5Ehê¿ô³ÿÀÆÿãThê¿ô³ÿÀÆÿãTQ@öŽ«ÿ@û?ü oþ5GöŽ«ÿ@û?ü oþ5Ehê¿ô³ÿÀÆÿãThê¿ô³ÿÀÆÿãTQ@öŽ«ÿ@û?ü oþ5GöŽ«ÿ@û?ü oþ5Ehê¿ô³ÿÀÆÿãThê¿ô³ÿÀÆÿãTQ@öŽ«ÿ@û?ü oþ5GöŽ«ÿ@û?ü oþ5Ehê¿ô³ÿÀÆÿãThê¿ô³ÿÀÆÿãTQ@öŽ«ÿ@û?ü oþ5GöŽ«ÿ@û?ü oþ5Ehê¿ô³ÿÀÆÿãThê¿ô³ÿÀÆÿãTQ@öŽ«ÿ@û?ü oþ5GöŽ«ÿ@û?ü oþ5E ýUˆQad àxçÿiÓ¿³ï/°5KˆÌ=í­Uo÷˜œ°öàzæŠ(McEDP¨£@ÀŠ( ÿÙaxiom-1.2.8/src/site/resources/images/icon_waste_sml.gif0000644000000000000000000000106211131637462022047 0ustar rootrootGIF89aæÿÿÿÚÞé4WžðòöùúüÒÙæÚà냗¹…™º±¾Ó°½ÒÑÙæÐØåÕÜè×Þé`}§\x Ph‹EYxb©Un“`{¤h„¬j…­l‡®k†­y‘µ˜ºŠŸ¿‰ž¾ˆ½˜«Æ—ªÅ¯É§·Î©¹Ð­¼Ò«ºÐ±¿Ô°¾Ó²ÀÔ³ÁÕµÂÖ¶ÃÖ¼ÈÚ¿ËÜÁÌÝÃÎÞÂÍÝÄÏßÈÒáÇÑàÆÐßËÔâÎ×äóõøc€©š­ÇŸ±Ê®½Ò¹ÆØàæîáçïðó÷îñõÜãìÛâëçìòæëñëïôêîóöøúÿÿÿ!ùI,€I‚'!!;< ‚ŒI 3/6I)B’A™+ 8’17*¤?C77D6™*5’’C%9¸ 11,(:™)7¼2#"ËÍ’8C-:™'ÕG, Ó Þ>6&™ 1¼@Ø:™.¼A=ó™I0EŠ A‚^?&Ì;axiom-1.2.8/src/site/resources/images/sw_med_rond.gif0000644000000000000000000000005611131637462021343 0ustar rootrootGIF89a€ÿÿÿÿÿÿ!ù,Dn˜ÀP;axiom-1.2.8/src/site/resources/images/icon_help_sml.gif0000644000000000000000000000177311131637462021665 0ustar rootrootGIF89a÷ÿÿÿÿÿþüö´ü÷·þüâüô¯üô°õî­ýúàùï©õì«þøÌþùÔþúÜÈÀŒúôÎþúàþúä‰~K|sHØÈ~ôê´þôÁñÚôÝéÓ{ðÛƒôáùæ‘*$6/KB"bW/aV/H¢‘R£‘S¨–W¨—Wï×}ëÓ{äÌwàÈußÇtÞÆtØÁq¯[õÝòÚñÙï×~îÖ}ìÔ|êÒ{éÑzçÏyæÎyåÎxãËwáÊvÞÇuÞÈuƱhôÜòÚ€íÕ}çÐzáÊwóÜ‚<4dW/rd8~G£SζjʳhȰg»¥`ÚÂqØÀpÒºmйl͵j˳iÀ©cÛÃr׿pÓ¼n4,±™Y´œ[®—XÀ¨b½¥`º¢_·Ÿ]µž\±šZÆ®fÅ­eªdǯg¯—X­•W«“V©‘U§T¥S¤ŒR¢ŠQ ‰P°˜YŽwE—J•}I“{Hž†N–~J”|IŸ‡O›ƒMuD‰qB…n@„m@‘yG{d:ƒk>|e;rZ4x`8t]6jS0nV2qY4iR0X@&ÿÿÿ!ù,Ø5J‚F7pèØ±B‹ÀF6.H( :À¢F` $Xx@aB… AftltÃA„ &ŒÈü@DH 7s4€!„‘"Œ¢À ÄÐàãÄ$?²hÉ#°"2fððÀ¥Ä*Wú”¡   F<¹r [h¤ÈÑ£I’%XÀˆñ"H ,¤TabD /kÚhfÊ+i¢”ù’ΞDçX‚&̘.lÞÈáSgÑÃ;uô¢ã'ÎCƒú>œÝˆD´s ,¤ˆÑì€;axiom-1.2.8/src/site/resources/images/icon_usergroups_lrg.gif0000644000000000000000000000276011131637462023141 0ustar rootrootGIF89a ÷ÿÿÿÌÌÌÿ燦 ‡ k ¿Ÿ@C¿_e &,2Æ&6à´ºÈ4J¡]hÊ>XN&ÓMgÖ]|Òtfbdb`arIj®z©‘gŽJ2M5=ñó÷ùúüÐØåØßê 'SG]~\wŸRi‹pН‡½ÈÒáõ÷ú–ªÆ£´Ì±ÀÔ¾ËÝ.?Sëïôâèïûüý,0FkD¥Ø•¸ß¬ÏÜÈ“Äv‰¬tN· sÂ?wÇDŒÑa’Ói™ÕrBV©q»;˜ðZ†ÉXŽÌcn²8€»PÜöÈ;{k©3\ƒ;‘Áhgž.Mh2x•[opnFhd’):PnXõöó|}y}~mšš“ŒþþüÿÿþððïÔÔÓýú”ýüÂóð°ýú»éçÂàÚŽýø·áÝ®ú÷Ïøîíå•÷ï¦þö²îé·ˆ‡}þó¨ÐÇŒB@0üùáÿþ÷õæˆþï*&óáþì–Æ¸xýå†ùâ…ûä‡úå‰ÿéçÙžÿóÀäÞÅMD%ÜÄríÕ|àÈuÁ­eóÛ€åÎxƱhûã…÷߃ðØиkȰgØÀpÔ¼nѹlË´iÓ¼nÀ«iÜÄ{§‡'³—DÀ¨b½¥`¹¡^³›[Æ®fĬeªdýùîRQNšƒLª“V”|IŸ‡O‹sC„m@íÉ^T?‰{_wb>;/•{_ëˆ(®o-],¨‚\ÈÅÂârÜtâzê€ë9ë™LÞ“P n@ªxJê­vÚ«€®–€Í¸¥ËaÏiÊeÔmÎlØx%Û€2܇=Û‹HZ<#Ø“YâženM1ƒfM†~w³­¨épÀ\‚> ¡OÆa«XÄdÎr)Ìw6ÓˆOÛ•_Çe¡‚kwmeíãÛ·SºXŽGù'Ãh&¿l4Ê{D¤Ž~®L ¯W"k:¥D Ä€ZÁ¡Ž™9W"œ@_?/§£¡1S…(z!:þ ›àÑÐÇ??øññÀ¿¿þþþýýýøøøñññèèèÚÚÚfffÿÿÿ!ùÿ, ÿÿ H° Áƒ*\È L—2YÊ4¨áBO–òÀ™3`@£M†4 .^Ôä´(dA~ž 8ãåÌ™“p-tôiÓ¢J€âóÔ衎HoÚ)Ò5!µü'ªÑ A…ÈÃeN%„>•D RÅQв£u—3L ‚ºÚ1/y@ŽzäÇh­^ÂXBxŠÑ £m^ú7J“YAvþv<‰ áÞ¾l¨áR (L|¯2”YÐ'š¬:jò4¿S•Bÿùsë'~EYZÄЙNÿå)6$F~± •PѨ‰ŠzÿÁÄh ¨ç>9òj!¨Q—*-ÿr*>û´„:UªÔ©4Ê”-Ó¢P“¨O˜Deú§ïÞ”T­“L?]‘.¹,ƒP?ËX‘Æ6ÑD2ÃÌB -µ¤1?­àâá2ú ÔO6ÔE?çá£E'«¨ââ,Þ¢à?Vã!‚®t:ìÀC þ³Ï¬Èbä‹0Þá-Ç4Ù¤.úhDAÑ# ÞÓI,F^xá1Â3 1ÄÔR‹1ÖXsiäC<ðSt‚Œ,±ÄBK,°ÀRK0Á„9L8ÄTch5íDá¦8à DD±+yÆRKŸ¿ó 0ÀLã)5Ô„#ª8Hàðƒ? Ĭ:ÁJŸ° ÍÌ/½ã‹/Ð@#Í7¼‚ãk2HüðC¤C$qıP¼úË/Áé1Ð4Ó 7Ülà 9Ø’ƒL¬ADD¡„N Ó ­¾S1ßL»Í»ã˜#ï:ë”3ÅÇŠ;®O8ÑG/¸F;mµÛŒ¯9鸣0<ïܳHŒûÄÄýBÀ,o: »<ñÄ“Í?WhqOTDLDQ Å”ÓM7oÜñÇ!¿S AWåó†'gc';ê¨óÎÑï°“MŽç¹$TÓOÿìtH;axiom-1.2.8/src/site/resources/images/nw_maj_hi.gif0000644000000000000000000000006311131637462020774 0ustar rootrootGIF89a€ÿÿÿÿÿÿ!ù, „¦Ê š“ ;axiom-1.2.8/src/site/resources/images/icon_arrowfolderopen2_sml.gif0000644000000000000000000000123011131637462024213 0ustar rootrootGIF89a!æÿÿÿâæëÿÿþ€€üùÙúò®üöºûöÉýûçþýôøì¤òã•õçœä×™ìÖ}ÞË~òàëÙ‹òè»íÕ|âÊvàÈußÇtÙÂqÕ¾oîÖ}åÎxéÑ{ÚÅtïÙƒèÓ‚ÕÁ{Ì´iØÀpѹlÏ·kɱhÜÄsÓ¼nDzn¿«lijzãÜż¥`· ]±šZÅ­eÁ©c ˆO«”W¥ŽT”}IŽwF™‚L†oB­¬ªh=u^7jR0Àª‰ìãÚVUU’‘‘þþþòòòmmmÿÿÿ!ùC,!õ€C‚ƒ„….-ˆ,,„"!0…‘’C0 )*,30%/1“£‚ 5¤¤2ª ¬®&#³´“3­!/6,-44C?ÓÔÕ>„1 "$Ï56-#-'‚>=88Bׄ2ÚÈ014<+ Ñùh÷.^¤( œQãÃ*XÚ>Ì@Gh ]y¢[wŸYt›XsšUo•J`\x RjŽDXvt²z’¶ŠŸ¿—ªÅ§·Î©¹Ð¬»Ñ°¾Ó³ÁÕµÂÖ¶ÃÖ½ÉÛ¿ËܾÊÛÁÌÝÂÍÝÇÑàÌÕãÎ×äÒÚæôöùóõø“§ÃŸ±Ê£´Ì¢³ËÇÑßßåíáçïäéðîñõÝäíÜãìâèïöøúúûüÿÿÿ!ù<,€@/µZ,&N($lòrh·˜Î[@À¬W'CH`Fh¬p(i4Ëå’‰8dV£ôñTîmo‚%'€d:5 $M2‚%ŒNd-4*#Nƒ vM.;63 ($ 1N9n‘%/¯M)"0/½¾·BÂÃÄBA;axiom-1.2.8/src/site/resources/images/icon_sortright.gif0000644000000000000000000000017211131637462022077 0ustar rootrootGIF89a³ÿÿÿj´?S‡-˜ðZ}­ZÜ÷ÈJt)ÿÿÿ!ù,'ÉI«½W`+Φ‚á}ˆ@ãfEš±¬[™Å Ïõ=Ûd©[¿žÐ;axiom-1.2.8/src/site/resources/images/icon_folder_lrg.gif0000644000000000000000000000301411131637462022167 0ustar rootrootGIF89a ÷ÿÿÿýý©ýýÄýýÎýýÒõõÏòòêõõîþþýõò™îë›õò¢õó¨ñï¯ôó´ôóÇòñÎïîÓ÷öÝíé“êæ‘åàŽëç’ëç˜èä¢âß­ìé¸êèºðîÄèæ¿÷õÌèæÄìêÉêèÈêéÒ÷öâåäÒÞ׈âÜ‘âÜ“ÞÙ“ãߪÝÚ´çä½äá»çä¾éæÁßÝÀîìÎÞÜÅêéÚóòãêéÛø÷ëñðäêáŠäÚ†õì‘ÝÖÛÔŒÓˉåá¼âßÀäáÃäâÎîìÛǽwÉÀyÊÁƒÏLjÐÊœðîÞøöæìêÛô䈾²p¾³uåÕÝÍzýå†ñÛ‚ÜÄrï×}íÕ|ëÓ{äÌwâÊvàÈußÇtÞÆtÝÅsÜÅsôÛ€óÛ€ñÙï×~îÖ}ìÔ|êÒ{éÑzèÐzçÏyæÎyåÍxåÎxãËwáÉvòÚ€ðØиkζjÌ´iʲhʳhɱgȰgǯfÁªcÚÂqØÀpÖ¾oÔ¼nÓ»mÒºmѹlÏ·k͵j˳iÛÃrÙÁq׿pÕ½oÓ¼n±™YÁ©b´œ[²šZÀ¨b¿§a¾¦a½¥`»£_º¢_¹¡^¸¡^·Ÿ]· ]µ\³›[Æ®fÅ­eĬeëdªd ˆO­•W«“V©‘U©’U§T¦ŽS¥S£‹R¢ŠQ°˜YèÈ|’zGŽwE—JxFœ„M–~J™L—€KàÀxuD‹sC‰qB‡oA…n@xFŽvEˆpB†oA„m@‘yGðÊïÉ€g<}f;{d:ƒk>i=~f<|e;„l?‚j>rZ4s\5r[5{c:ya9kT1fN.ÙªvÔ t節à¨|Þ¦{Û¢yߢ|ßž}àŸ~æ¡‚Ü›|ÿÿÿ!ùØ, ÿ± H° ÁƒñʳgŸ>nÞü„°"Á=m ظ‘„C¹HadHÔ¨MŒ N¤‘ãä\²£iQ©J’Œ‰¢Àƒ$«ÎyŠÑ£PtLh@BÁ‡.6>hyb‚›TyèLª5pÎ]Ší¢CB… N,\ɲE#JLš‘Q¢­oª [e ™2fÒêÃÈ‘£!+@ "‚…†A…f Ô‚Glß1wzIŸ+8:Ј°àÂ+Y1£F‹ B @¿r‹¢@l1Í5Ñì2Elxaod¤±ƒìÁ ÒÇ\@ƒX Q/ÐPó ðFÁ¥FHÄ$#w’È.¨Q5Ò˜òÞ Îw…}…¼Ñ‹A­ä¡%*¼ÔñhÝu¿™RäÑÀK~”2Ceˆqà“½ýVWlGqCä—H2ÂcP×F&†!Æg¦¹rÔ‘‹Aº&‰fT1EoaP±'§ù™Ð .‘‚(– A†aèÙWg¤¡\B¥s`r-Eé’Ê&€,)†UaF¤XlÈšnüÑê!Üb²¸Geü˜k°õ«|¼h&Š4â‰.-‹h¤‘jDËÅxPë pÚ±H'Ç(ƒ3³`Á_ZH!H…p œšâ 2ÂX„ 0\la ûöû»–hòH.Ǥb‘@¿ƒ‡ x BÈÁÊAÇ%™|2L2’\<*ªRˆC~À!ò%š°b ,*ÔJ,oô G#KŒ0Aå\Ð"ÀÄt˜„RL2“} ½XrÉ"®ø"™Ô’ˆ-¾°ÂõÅžÜÒÉØh§M@;axiom-1.2.8/src/site/resources/images/icon_folder_sml.gif0000644000000000000000000000117211131637462022201 0ustar rootrootGIF89aæÿÿÿÿþ—üø“þú•ýú•ýû•þü–ü÷’ü÷“ùðŽùîùï÷íŒöè‰õèˆæÙ€÷éŠ÷êŠîá…öæˆõå‡ôä‡áÑ{ëÖ~òðèÜÄrï×}íÕ|äÌwâÊvàÈußÇtÜÅsï×~îÖ}ìÔ|éÑzçÏyåÍxåÎxãËwðØÚÅtåÞÆÐ¸kζjÌ´iʲhȰgÁªcÚÂqÖ¾oÔ¼nÓ»mѹl͵j˳iÛÃrÕ½oÓ¼nËÁ åÞÈÁ©b¶ž\´œ[¿§a¾¦a½¥`¼¤`»£_º¢_¸¡^·Ÿ]· ]µ\³›[Æ®fÅ­eĬeëd¢—y©ž€ ˆO¡ŠP­•W«“V©‘U¨T§T¥S¤ŒR£‹R ‰Pœ…N°˜Y®–XŽwE—J•}Iœ„M˜K”|IŸ‡OŒ}\‡oAŒtDˆpB†oA„m@‘yGi=‚j>zb9ya9lY:nV2mU2kT1jZBdM.bM1bM2×××ÿÿÿ!ù|,×€eJHHIO|ˆ#!:Nˆ|_ UH`@F78bŽ7 * 4i_Sf$A"°%4?_KWD&]|g#XF;* f|W#B   4.Z|[#-7#)371?\|U'E+å(!602GSH|40p N„¨‘Š&UÂXáó!‰x¼xB$H•,TèìADeŒNˆƒeL9=©aÓdˆ’/WÚàAãÈ‘9G˜h‰“GJÍšoÖ±sç§Q/z¢ý;axiom-1.2.8/src/site/resources/images/OM003.jpg0000644000000000000000000002712011131637462017615 0ustar rootrootÿØÿàJFIF``ÿÛC    $.' ",#(7),01444'9=82<.342ÿÛC  2!!22222222222222222222222222222222222222222222222222ÿÀö¤"ÿÄ ÿĵ}!1AQa"q2‘¡#B±ÁRÑð$3br‚ %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyzƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖרÙÚáâãäåæçèéêñòóôõö÷øùúÿÄ ÿĵw!1AQaq"2B‘¡±Á #3RðbrÑ $4á%ñ&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz‚ƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖרÙÚâãäåæçèéêòóôõö÷øùúÿÚ ?ö»­FY5¦iááP<ò¸Ê@§¦Gv<á}N8È4o4î¼Ô/n…˜Ä¿€L~¹ª~ù®5é—:œŠXõÀTÀÏ ®‚€3°l½yÿÓñt`Øÿzóÿ¦ÿâëJŠÍþÁ±þõçþMÿÅÑýƒcýëÏü›ÿ‹­*(7ûÇûןø7ÿGö ÷¯?ð:oþ.´¨  ßìï^àtßü]Ø6?Þ¼ÿÀé¿øºÒ¢€3°l½yÿÓñt`Øÿzóÿ¦ÿâëJŠÍþÁ±þõçþMÿÅÑýƒcýëÏü›ÿ‹­*(7ûÇûןø7ÿGö ÷¯?ð:oþ.´¨  ßìï^àtßü]Ø6?Þ¼ÿÀé¿øºÒ¢€3°l½yÿÓñt`Øÿzóÿ¦ÿâëJŠÍþÁ±þõçþMÿÅÑýƒcýëÏü›ÿ‹­*(7ûÇûןø7ÿQO¤é–°<÷ÜÅ csÉ&¡2ªRKñZõãùõ_úáýEAæøcþ‚ÿùT—ÿ‹¥ó|1ÿAüªKÿÅ×KEs^o†?è/ÿ•Iøº<ß Ð_ÿ*’ÿñuÒÑ@×›áú ÿåR_þ.7Ãôÿʤ¿ü]t´P5æøcþ‚ÿùT—ÿ‹£ÍðÇýÿò©/ÿ]-Íy¾ÿ ¿þU%ÿâèó|1ÿAüªKÿÅ×KEs^o†?è/ÿ•Iøº<ß Ð_ÿ*’ÿñuÒÑ@×›áú ÿåR_þ.7Ãôÿʤ¿ü]t´P5æøcþ‚ÿùT—ÿ‹£ÍðÇýÿò©/ÿ]-Íy¾ÿ ¿þU%ÿâèó|1ÿAüªKÿÅ×KEs^o†?è/ÿ•Iøº<ß Ð_ÿ*’ÿñuÒÑ@×›áú ÿåR_þ.7Ãôÿʤ¿ü]t´P5æøcþ‚ÿùT—ÿ‹£ÍðÇýÿò©/ÿ]-Íy¾ÿ ¿þU%ÿâêKhü=y8‚ÛRyf`H59K:ào®†¹ý[þFÿÿÛÏþ‹wû˨{Ð{{7øý1­5+ºÊèÝ ëÛrÝp2ûÙü+ZŠ©¦ê0ê–Iså•xÜa£qÃ+Ä(®Uá×u´‰Ú4ûZ¨p2`ˆ“êI?­áõºïý…eÿÐR·ëÂÿëußû Ëÿ ¥oÐEPEPEPEPEPEPEPEPEPEPX7ÿ‘/Uÿ®ÔVý`xßþD½Wþ¸Q@ôQEQEQEQHs´ã®8 ¢¼ÇHÐÔÛQ\\3xÆ]\­ìsAjÐZ˜~Ä0>™¼ä`ãíëXvkñ"ËA‚ ó^%µÞù †Fk¯30‚OQSÛ‘ÓŽz…çš½ï,-õíF{Ë{8¬íí¥±FHÌWtñž òáçŠßð^¡«ë3êúª˜VöS-¥©Œ+AD ܱ1äõâ€:J(¢€ (¢€ (¢€ (¢€ çõoùü;ÿo?ú,WA\þ­ÿ#‡íçÿEŠè(¢Šâfÿ‘‡[ÿ¯¤ÿÒxh¢oùu¿úúOý'†Š×ð¿úÝwþ²ÿè)[õáõºïý…eÿÐR·è¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¬ÿÈ—ªÿ×ê+~°°nòZG-ÈHDÇ`*Jç$@è*jFsZÂËOÃåÔ õÔ¯K±˜É>b9}Ø ¸67œcùéÚ¬i·sÜj÷‹-Óy~T2Enñ 2e¨ç¨÷­;IÚâÎÞà­,I!ô$Ö¥Éõ¥Ap¢Š+ŒA^ñþE[OúüúW WŸü_ÿ‘VÓþ¿þ€Õß–½ÓõÜóÉDðçý„­ÿô`¯·+â?ÉDðçý„­ÿô`¯·+ïMŠ( ¹ý[þFÿÿÛÏþ‹ÐW?«ÈßáßûyÿÑb€: (¢€8™¿äaÖÿëé?ôž(›þFoþ¾“ÿIᢀ5ü/þ·]ÿ°¬¿ú Vý`x_ýn»ÿaYô­ú(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š+Æÿò%ê¿õÃúŠß¬ÿÈ—ªÿ×ê(~Š(  =Añ®»?ãÚÓÿjÕˆ £Àº¯î/oöÖ¬éßò:ëŸõíiÿµjˆò"j¿õÍô5¡É?ßo©¦ÓŸï·ÔÓG¿5—ÄÎr´wö’D$ª–eØ.J±S×ÜR‹ˆüOØpÿ8ùO¿¥eÛè~Q™žHÝž aS³•/#¾ñà? ¯¨hr¾Vâ'xíc·Ù³†"Hر˜CÅuû;Ÿ*ž—_ðã6ZòÙbIDÈñ¼‹d;†æ8sQMmis{¿ÎeºŠ2‡Éœ£$Lã­W“K–k¡s$£‡„ùq)ØDo¿<ÿéôÅAm ¼ µÓ¼pdfv,Ä‚>aÓ¿¾jcQÕNÌ -–P“qdpí7Ú~pÄ`ÙÏN>”ÿ±Ù[®<÷ˆÍ'™¿í,G äžx¢´ÑÒÚM5ˆ„‹;Séüê¢xzXáì“öt‚A¹•@\ò zç¡ôÕ{þ^?ëú¿Ì e§FÑÀ¬°È£ËUI¶;»O9<’zn“yËñˆ@òeh§Ø¤ ®ÖÁ㚉ô0m¯"YtþHYrÊ#9=NvŸÎé!,Iå•,‰äFqÇZ/ ]Tw¿õøè"êÞØZˆ­VæD;¢Œ8%£\ Z²ÓD…ʈ_î` }=kþÙÄR¢Ío‰a¹‰²¬vù¬#$“Œc“WæÓ$g¸(𰹉b5I1…]¹OÏ8=è•,=“SÔzÌð¬¢#4bBp¸ÜOÓ­IY ¡³ÜIJ©y¥…ÄŒ¹lF#žäì?k“’MaR4Ò¼%é_!yÿÅÿùm?ëðè ^^ñþE[OúüúWNYþ÷OÔksÍüÿ%ßö·ÿÑ‚¾Ü¯ˆüÿ%ßö·ÿÑ‚¾Ü¯½7 (¢€ çõoùü;ÿo?ú,WA\þ­ÿ#‡íçÿEŠè(¢Šâfÿ‘‡[ÿ¯¤ÿÒxh¢oùu¿úúOý'†Š×ð¿úÝwþ²ÿè)[õáõºïý…eÿÐR·è¢²5a¡¼}Š,·›<Çgû¯bØä“ÎuÁäUµº¸m÷:Û9í†À/8ú’}ëÊÇg8\¹*;˲ܸӔ¶:j+•þÇ´õºÿÀ¹øª?±í=n¿ð._þ*¼Ïõ¯ ü’ü?Ì¿bûUÊÿcÚzÝà\¿üUØöž·_ø/ÿKýkÂÿ$¿óbûUÊÿcÚzÝà\¿üUØöž·_ø/ÿGú×…þI~æÅ÷:ª+•þÇ´õºÿÀ¹øª?±í=n¿ð._þ*õ¯ ü’ü?Ì=‹îuTW+ýiëuÿrÿñTcÚzÝà\¿üUë^ù%ø˜{ÜꨮWûÓÖëÿåÿâ¨þÇ´õºÿÀ¹øªë^ù%ø˜{Üꨮ]l" ¾¡ tyåÔÀ_ þ5j j{IâƒTRVÚ—q®ÔÜH\v’NÉúWv >Âbæ©Å¸Éô}2eJQÔÞ¢Š+Ú3 (¢€ Àñ¿ü‰z¯ýpþ¢·ëÆÿò%ê¿õÃúŠß¢Š(Nÿ‘×\ÿ¯kOý«P|@ÿ‘Uÿ®kÿ¡­O§ÿÈë®ÿ×µ§þÕ¨üs×^ Ôá·†I¥h×lq©f8`x“C¾ßSM¤‘ÙK¹µ½ 2I6ràûæ°?á9ð·ý-ñïð¯Ï%…¯wî?¹˜YÏÿÂsáoúZÿãßáGü'>ÿ å¯þ=þ?U¯üîaftW?ÿ Ï…¿è9kÿ…ðœø[þƒ–¿ø÷øQõZÿÈþægAEsÿðœø[þƒ–¿ø÷øQÿ Ï…¿è9kÿ…U¯üîaftW?ÿ Ï…¿è9kÿ…ðœø[þƒ–¿ø÷øQõZÿÈþægAEsÿðœø[þƒ–¿ø÷øQÿ Ï…¿è9kÿ…U¯üîaftW?ÿ Ï…¿è9kÿ…ðœø[þƒ–¿ø÷øQõZÿÈþægA^ñþE[OúüúWAÿ Ï…¿è9kÿ…q|G£k¶·Óµne[å9k ò=ë·.ÃÖŽ*Pi_³Î/ÀòQ<9ÿa+ý+íÊøÀòQ<9ÿa+ý+íÊûƒp¢Š(®Vÿ‘¿Ã¿öóÿ¢ÅtÏêßò7øwþÞôX ‚Š( &oùu¿úúOý'†Š&ÿ‘‡[ÿ¯¤ÿÒxh   ÿ­×ì+/þ‚•¿Xÿ[®ÿØV_ý+~€8í—¼×%cºC©J¥R(QøkVN‰þ¿[ÿ°¤ÿû-kWå™»oVýÙÙOáAEWœXW1qâö—_»Ñt].]JîÅU®Ïš°¤;¹Q–ûÄóÐcÞºzç.¼i&»6µa{{¥ê ²âKF\N1¹]Yr1Ôk§ è)?mÛMí;koN¢wècÞüO²²Ð/¯ßN¹ûfŸt–—–%—tR1 a†U‡Êy¥7Zø¥c¤hZŸöeÌï8s5²º‡¶ØÁÌäãç!­ÏðÓCŸ@¸ÒšKÌÝ\-ÕÍßš ÓȤYˆÇsÀ­.£ð×CÔ“YYZåªèÒ˜ÙG”ƒmåùAa“êkÓŒ²›«©oç¶ž{nûèG¾uBî!`/%a"/5ÙÎ.2r}…qúÄ{}oV±´“Kº±ƒQIÂær6ÜllŽÄõ‡­t:΃µáé4Ynn ¶–5‰ÞÙlzãšÅ›áŸ†š+/±Ú¾Ÿqe"KÍ«â@WÔœ‚ZäÃ}EF^Þ÷oKtVß~þ» ót2®~+Áæ±ÓcÛ¥LñKæêDòmÎLhÜ·NƒØVå¯í¯æYQ&ff8`òjéÝM[¸3SC»’ÿ@Óo& %¸µŠWÚ072qíÍ_®cÃþ°O éksi*N¶q ¥mƒ ŒñÍiÂ7¥Ï»ÿßù?øªýˆà5h¬¯øFô¯ù÷ûÿ'ÿGü#zWüû¿ýÿ“ÿŠ  ZÀñ·> Õëþb­Â7¥Ï»ÿßù?øªÂñ–¦Ãá NDÃ,$ŒÌç¸ÿj€;*++þ½+þ}ßþÿÉÿÅQÿÞ•ÿ>ïÿäÿ⨶Ÿÿ#®¹ÿ^ÖŸûV·«šÑ,à±ñv¹ ºO³Ú-Ïï{’k¥ ®ci­f‰H èÊ õ"¾eÿ†rñoýtoûû'ÿ_OÑ@0Ã9x·þ‚:7ýý“ÿˆ£þËÅ¿ôÑ¿ïìŸüE}?E|Áÿ åâßúèß÷öOþ"øg/ÿÐGFÿ¿²ñôýóü3—‹è#£ßÙ?øŠ?᜼[ÿAþþÉÿÄWÓôPÌðÎ^-ÿ Žÿdÿâ(ÿ†rñoýtoûû'ÿ_OÑ@0Ã9x·þ‚:7ýý“ÿˆ£þËÅ¿ôÑ¿ïìŸüE}?E|Áÿ åâßúèß÷öOþ"øg/ÿÐGFÿ¿²ñôýóü3—‹è#£ßÙ?øŠ?᜼[ÿAþþÉÿÆëéú(ço |ñ>‹â­'T¸¿Òž;¸§‘c–BÅU eêÈêÄwã¹öÚe…›—µ±¶ÏVŠSú ·]ø¡‡š©V\íyY}Úþdʳz!``RÑE}!ˆQEVÿäKÕë‡õ¿X7ÿ‘/Uÿ®ÔPýQ@:wüŽºçý{ZíZÞ¬?þG]wþ½­?ö­]×u›èwzµÒHðZÇæ:Äb="€4h¯8ÿ…Í¡ƒÎ™ªßÿñtÂçпèªßÿñu—·¥üÈÇë4™}ç£Ñ^qÿ ŸBÿ n©ÿ|GÿÅÑÿ ŸBÿ n©ÿ|GÿÅÑíé2¬Ñþe÷žEyÇü.} þº§ýñÿGü.} þº§ýñÿG·¥üÈ>³Gù—Þz=çð¹ô/úêŸ÷Äü]ð¹ô/úêŸ÷Äü]Þ—ó úÍæ_yèôWœÂçпèªßÿñtÂçпèªßÿñt{z_̃ë4™}ç£Ñ^qÿ ŸBÿ n©ÿ|GÿÅÑÿ ŸBÿ n©ÿ|GÿÅÑíé2¬Ñþe÷žEyÇü.} þº§ýñÿGü.} þº§ýñÿG·¥üÈ>³Gù—Þz=çð¹ô/úêŸ÷Äü]ihtŸëpiVÖWñM8b­2 _•Ká‰è=)ªÔÛ²’kÒ“²’;Z(Í¡¨QEW?«ÈßáßûyÿÑbº çõoùü;ÿo?ú,PAEP7üŒ:ßý}'þ“ÃEÈíÿ×Òé<4P¿…ÿÖë¿ö—ÿAJ߬ ÿ­×ì+/þ‚•¿@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@`xßþD½Wþ¸Q[õãùõ_úáýEoÑEƒ§Èë®×µ§þÕª??ä›k¿õ옫ÚwüŽºçý{ZíZ£ñ3þI¶»ÿ^ÇùŠùí¾ñúÒR·Þ?ZJù×¹ò¯p¢Š)(¢Š(¢Š(¢Š(¢Š(¢Š*KOËàÍNÓ\‚Õ.d…™NÅAܤubx§þAIÿ]Gò5¶ø±:0¿Æ©ê^ý usĺf”ú ¬I{u "ÎĨf cÞ½ê¾#ðü”OØJßÿF ûr½ÓèŠ( ¹ý[þFÿÿÛÏþ‹ÐW?«ÈßáßûyÿÑb€: (¢€8™¿äaÖÿëé?ôž(›þFoþ¾“ÿIᢀ5ü/þ·]ÿ°¬¿ú Vý`x_ýn»ÿaYô­ú(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š+Æÿò%ê¿õÃúŠß¬ÿÈ—ªÿ×ê(~Š(  ;þG]sþ½­?ö­Qø™ÿ$Û]ÿ¯cüÅhN×Ä7ú…¬V“Eu 1í–f”¦üôFÈ;ÇåX?¥Õ[áæ¶'³²H¿ÌÉtÌÀdt1ŸÌP„·Þ?ZJVûÇëI_:÷>UîTfâ%PZEPI'®:Ð'ˆ’¨p2yíO•ö,» šäDÅB d€{R ¬–ÄGb°RÛ‡pãñ’µ«G$­‡U6ÓÔ};Ô˜\Åòn$¾¤cÈU¤’Õ%b :¹EPrÀ’?»_ƇŸnò”ŒáÛ=;ôïLíÑäo=YœåŽGnÔç6ä X¦CžøÒi'°œR{‹©Œª¢Á•ãûÝ@þö½E*»~r ÚOLuÇ­8ý–)w‹!;ÇÍëÆ {WÞ¹_ݱ É=­[å{DÑò;Z,twfŠ• ¸ñ€sÛð©ª=²²aÐùF;ã·ëR£TVgU Ó&³’×Dc%®ˆ}O0V‘ÄÔ•6h–šÜ+Å?ò Oúê?‘­ºÄñOü‚“þºäk\?ñbo…þ4}LÿÉDðçý„­ÿô`¯·+â?ÉDðçý„­ÿô`¯·+Ý>Œ(¢Š+ŸÕ¿äoðïý¼ÿè±]sú·üþÿ·Ÿý( ¢Š(‰›þFoþ¾“ÿIᢉ¿äaÖÿëé?ôž(_Âÿëußû Ëÿ ¥oÖ…ÿÖë¿ö—ÿAJß Š( Š( Š( Š( Š( Š( Š( Š( Š( Š( °{o¼~´”­÷Ö’¾uî|«Ü‚+aÆû³°¿oïÓ$´&EncWŽ¥†*Õ~ÒW½Ëö³½îV’Ù¦Œ¬’ ìÚ ®1Óü)M¨2–Üv—ÞFO\ç×¥X¢—´•¬ÒVµÈc·òÒ%ÝŸ-™ºuÎÆ£û9Yl±Ï rsØŠµEÒ]ÃÚÏW}Êëj¨+4^_Nyýi>Êÿ8ŒÞ8=q޹ö튳E?i.áígÜ«£DåÖEÉ}ÄmãîãÖ¤XZ0†7•e— ŠšŠNr{‰Ô”Ù]m¬Šáãò:c?ãV(¢”¤å¸¥'-±•ó—ü%Z‡÷`ÿ¾ø×ðUO åõ¯Ð쨮7þ­Cû°ßühÿ„«Pþì÷Áÿ_Rª/ìúÞGeEq¿ð•j݃þø?ãGü%Z‡÷`ÿ¾øÑõ*¡ýŸ[È쨮7þ­Cû°ßühÿ„«Pþì÷Áÿ>¥T?³ëy•ÆÿÂU¨vûàÿð•j݃þø?ãGÔª‡ö}o#²¢¸ßøJµîÁÿ|ñ£þ­Cû°ßühú•PþÏ­ävTWÿ V¡ýØ?ïƒþ4ÂU¨vûàÿRªÙõ¼ŽÊ±ÿ¡y?ð&oþ.»Ê(ƒÿ…/ðûþ…äÿÀ™¿øº?áKü>ÿ¡y?ð&oþ.»Ê(ƒÿ…/ðûþ…äÿÀ™¿øº?áKü>ÿ¡y?ð&oþ.»Ê(ƒÿ…/ðûþ…äÿÀ™¿øº?áKü>ÿ¡y?ð&oþ.»Ê(ƒÿ…/ðûþ…äÿÀ™¿øº?áKü>ÿ¡y?ð&oþ.»Ê(ƒÿ…/ðûþ…äÿÀ™¿øº?áKü>ÿ¡y?ð&oþ.»Ê(ƒÿ…/ðûþ…äÿÀ™¿øº?áKü>ÿ¡y?ð&oþ.»Ê(ƒÿ…/ðûþ…äÿÀ™¿øº?áKü>ÿ¡y?ð&oþ.»Ê(‹°øKà}3P·¿³Ð’+›iXŸí¬§ à¶:Ší(¢€ (¢€ çõoùü;ÿo?ú,WA\þ­ÿ#‡íçÿEŠè(¢Šâfÿ‘‡[ÿ¯¤ÿÒxh¢oùu¿úúOý'†Š×ð¿úÝwþ²ÿè)[õÏøýUÖìfùgk³vƒûÑ:¨ =yR½tQEQEQEQEQEQEQEQEQEQEVÿäKÕë‡õ¿U5=: [M¸°¹ßäÎ…ca±ìhÝ—ý7ýu/ûê?þ"ìy¿è3©ßQÿñ©EeÿcÍÿAKþúÿˆ£ûoú ê_÷ÔüEjQYØóÐgRÿ¾£ÿâ(þÇ›þƒ:—ýõÿ@”V_ö<ßôÔ¿ï¨ÿøŠ?±æÿ Î¥ÿ}GÿÄP¥—ý7ýu/ûê?þ"ìy¿è3©ßQÿñ©EeÿcÍÿAKþúÿˆ£ûoú ê_÷ÔüEjQYØóÐgRÿ¾£ÿâ(þÇ›þƒ:—ýõÿ@”V_ö<ßôÔ¿ï¨ÿøŠ?±æÿ Î¥ÿ}GÿÄP¥—ý7ýu/ûê?þ"ìy¿è3©ßQÿñ©EeÿcÍÿAKþúÿˆ£ûoú ê_÷ÔüEjQYØóÐgRÿ¾£ÿâ(þÇ›þƒ:—ýõÿ@”V_ö<ßôÔ¿ï¨ÿøŠ?±æÿ Î¥ÿ}GÿÄP¥sú·üþÿ·Ÿý*çö<ßôÔ¿ï¨ÿøŠlZ k©[_M{ys-°q™×jî'Fx  j(¢€8™¿äaÖÿëé?ôž*ÆŸdúÅÞ©¨Àê°OxDE¿Œ"${JQ@þúÆK¼SÄÛâž3‡CýAîuªÅµ«Qó+´ï1hXýp/Š(¿Ú:¯ýìÿð1¿øÕÚ:¯ýìÿð1¿øÕPý£ªÿÐ>ÏÿÿQý£ªÿÐ>ÏÿÿQEÚ:¯ýìÿð1¿øÕÚ:¯ýìÿð1¿øÕPý£ªÿÐ>ÏÿÿQý£ªÿÐ>ÏÿÿQEÚ:¯ýìÿð1¿øÕÚ:¯ýìÿð1¿øÕPý£ªÿÐ>ÏÿÿQý£ªÿÐ>ÏÿÿQEÚ:¯ýìÿð1¿øÕÚ:¯ýìÿð1¿øÕPý£ªÿÐ>ÏÿÿQý£ªÿÐ>ÏÿÿQEÚ:¯ýìÿð1¿øÕÚ:¯ýìÿð1¿øÕPý£ªÿÐ>ÏÿÿQý£ªÿÐ>ÏÿÿQEÚ:¯ýìÿð1¿øÕÚ:¯ýìÿð1¿øÕPý£ªÿÐ>ÏÿÿQý£ªÿÐ>ÏÿÿQEÚ:¯ýìÿð1¿øÕÚ:¯ýìÿð1¿øÕPý£ªÿÐ>ÏÿÿQý£ªÿÐ>ÏÿÿQEÚ:¯ýìÿð1¿øÕÚ:¯ýìÿð1¿øÕPý£ªÿÐ>ÏÿÿQý£ªÿÐ>ÏÿÿQEÚ:¯ýìÿð1¿øÕÚ:¯ýìÿð1¿øÕPý£ªÿÐ>ÏÿÿQý£ªÿÐ>ÏÿÿQEÚ:¯ýìÿð1¿øÕÚ:¯ýìÿð1¿øÕPý£ªÿÐ>ÏÿÿQý£ªÿÐ>ÏÿÿQEÚ:¯ýìÿð1¿øÕÚ:¯ýìÿð1¿øÕPý£ªÿÐ>ÏÿÿQý£ªÿÐ>ÏÿÿQEÚ:¯ýìÿð1¿øÕÚ:¯ýìÿð1¿øÕPý£ªÿÐ>ÏÿÿQý£ªÿÐ>ÏÿÿQEÿUbXYxÞ9ÿÚtïìûËì Râ3{k`U[ýæ',=¸¹¢ŠÓDXÑQ*(ÀP0¢Š(ÿÙaxiom-1.2.8/src/site/resources/images/icon_arrowwaste2_sml.gif0000644000000000000000000000114111131637462023202 0ustar rootrootGIF89aæÿÿÿÚÞé4WžðòöùúüÒÙæÚà냗¹…™º±¾Ó°½ÒÑÙæÐØåÕÜè×Þé`}§\x Ph‹EYxb©Un“`{¤h„¬j…­l‡®k†­y‘µ˜ºŠŸ¿‰ž¾ˆ½˜«Æ—ªÅ¯É§·Î©¹Ð­¼Ò«ºÐ±¿Ô°¾Ó²ÀÔ³ÁÕµÂÖ¶ÃÖ¼ÈÚ¿ËÜÁÌÝÃÎÞÂÍÝÄÏßÈÒáÇÑàÆÐßËÔâÎ×äóõøc€©š­ÇŸ±Ê®½Ò¹ÆØàæîáçïðó÷îñõÜãìÛâëçìòæëñëïôêîóöøúåããVUU’‘‘«««lllÿÿÿ!ùO,¾€O‚ƒ„…‚'!!;< F†‘† 3/6’ž‚)B—AŸž+ 8—17*ª’+?C77D6„KÂÃÄJ„*5——C%9…JIILLMMNÆÇ 11,(:†JÔÖØ†)7Ë2#"‘å×Ù…êË8C-:’JMõ Xwéˆ âùó¤€`6Lx°P+Ò‚Ë€èÓ¡¢!.–9Ѓ£GC`)"€‰Ž'QF˜9³P ;axiom-1.2.8/src/site/resources/images/strich.gif0000644000000000000000000000005311131637462020334 0ustar rootrootGIF89a€ÿÿÿ!ù, ;axiom-1.2.8/src/site/resources/images/OM006.gif0000644000000000000000000000011111131637462017574 0ustar rootrootGIF89a‰Bw1!þSoftware: Microsoft Office!ù,€D;axiom-1.2.8/src/site/resources/images/external-classic.png0000644000000000000000000000167411131637462022332 0ustar rootroot‰PNG  IHDR Óº&tIMEÔ 8è9‚ô pHYsÁÁÃiTSgAMA± üaPLTE0`€€€ÿÿÿeŠtRNSÿÿ×Ê A0IDATxÚ=ŒA0Â`ÿ´+¸q0u‰± È„ú®þGÁzZyý6ùSß±ÜÀèÕ^ȱIEND®B`‚axiom-1.2.8/src/site/resources/images/nw_med.gif0000644000000000000000000000006011131637462020307 0ustar rootrootGIF89a€ÿÿÿÿÿÿ!ù,„aÁÛÌ ;axiom-1.2.8/src/site/resources/images/om2.png0000644000000000000000000015375211131637462017573 0ustar rootroot‰PNG  IHDRÅ™î Û^sRGB®ÎégAMA± üa cHRMz&€„ú€èu0ê`:˜pœºQ<×hIDATx^ìý‰{\ç•æ ^l\Åà¾hKW÷tOeÚ’lY¶œrUVÚ²KÎ¥ªº»ªÒÓÓÃtwU®•UÙ3Ý]U™i‘Äî$v€ ¶Ø#Z\SóÌÓS™¶µSwb=æw΀(Y’ \} 7îýî{¿¸çýÎyÏ9…BÁû‚îOÙl¶ººš×¼Ã¯_´¿½o†€!`+\!_YQ9oãs¹\e¥\ /”TæóùÊJù ø2EøÜp÷>Ÿt/æßù¢Øû†€!`†€!°BÈå Øûl®É-ÿ<€R̿֫ãÌg.S\ŸûO²»û“{‘Éȇ=¨‹m†€!`†€!PfààŠ*½Š*_E&‡A x€ @#òyÜ ü^dóâ ù„óLÌ Ge•œ)í Æ:m3 CÀ0 òA ÚŠõ£}±Ñá`dVÁVUãeré;= Ÿq1ÜéøB>1çÜÈ8oD82‰Ãç‚Ñîòψ‘!`†€!`(¡xûHäÌ`𔼎õŒ„{ žºQ°e³Â-æcwïà#8'**½`è<4b8ÐŽö…¢Ýh[ zÖ6CÀ0 CÀ('£mCá± p‹6¸E Ú1iW§E¯¸+”Ud2)'¤p¡»óOäS‰‘À¹pô\4Þ‰÷Âg£‰8 G·Í0 CÀ0Ê ؃z) x Ú‚1~m'$(Áe‡ºa…B_ƒj!>ûï ã‰PXPw0ÒŽu"gB±â Üil3 CÀ0 ²@ 3?GŒƒŸH4ÿD8Ñ9>㜢ç¡y‰}|&ÝC¸…ç²62jæ ø/x•%^òi„£¼É¡!/Øiü!HÁ•PŒs÷…β¤&:&‚M†B&”àMâ#m ‡ û+ý‘ˆ šÈh{ÍÆ Cñ.>È”q(œ-máDÇpø4 wr…„±ñ>G£¸ÚáÈIâÆÆqЧãPüéšó¦È9¬;îÜ;êâ\:1j·é%ÃÅ>ÃÆ†Bœ½›“†ã½âù)D.Š_ÙÙ]5ûp@nƒ›\NüT v22Z”¯r öçƒÃ¡ Mñ)q.‹ŒµË`¢ç¹[œ‘7G¢'†"­‚^´Wn!#Œž ÆÏ)§“{̉T«产K j¶JßwûÿòxØ[Vä¡úÙÈ(øÏÝh‹&†€!`#¤ÿ„J/5DòN³ìŸÿ%>¡FQôŸ=jœÄ‚ù)Z/¡b\åMD_ |Nƒ.Ýì‰Iæ¯jMùµ+’pI$>8~À›Î„‹yÓ8 ü(š‚¦8ûê,"6X©§û­T@¬²2•¾HâüÀˆ˜pá:j>ÙŸ) òBL¬Rø»EGϱ MŒ4̆M.lƒýÅÀ Oê>9‚pábqãjÔ#]\#"X~b‰ÙA0 DrQ„‡¥vÞWö ¢Yަ$‰ éuû°¿aŽ-ñb0(ã–é…pÒ!CÑóÊ•œÅÅü;öã êÒÃHÜk¹üÑá4_0@Ž 8æçØÞP°]öÀ},YÉ0 CÀ!ðù|b(Äú¿ K­f¢¿¢Z\B)´®„c¤–:>¡\BèF2é€Éò·ÈMÔ3á65N#a¦¨Ew´Å­Úy%vI&ÅUžØB¡ b‰£cb,‹u)®pa X>5lÂ}xÛ¥À²a†ããƒJúû‡NceÅüÉz+ô¤`×'çbŸƒú*:¢cxSÄ¢L¢ƒàíPÿ„8$„ÙKp&YëjÂÅyP¼„J/`üØxç±€Ð8’ šHù«ÃÑavï#N‹¸\²ƒ^x'GV>$äI<° õ|82áTµ€#;G»•gt ÝxÅÛ¹Æ`¤Ÿ›">õâ‰Þ{çŸPoG{lœÅÙ£CŒóô|îxdAÁŸŽo1]G4Ja†€!ð@"ðù|™NgP07CÁ®ù¨‡ÓP8…&u4ç2Kó)µîƒ¬õÝZY=êŸD:Š–/†5•÷癄³^ÂÊUbÝ«WUpœŠ*G+Ĩ׬©@Ç¡ìD\’|"=kt«ŒÄœ[>Ò«Õ=ÅNWTVóÙH|˜Ïªg¢Wóð‹ó?ÖÆúÛå±TT® ¢äƒ‘k–‹¸1œ_A}mØ{ö×h˜ypQ¶!ãq‘ÝYxç’£y­ ƒ`•Õ‡Äp°‡„ž¥·BÆîAÓðå00vÓ«ö8‚М(ŸŒx³z?ŠÁá #v2é‹óÇD:F‚Ýœ·ªr G¤ê† I9SŒ¸ŒH:>y'Ü#zÕpqä Cކ‘?Šð8!’ÈKXX‘ò$Ž3§çpœ@Ü·¸„Ë„LÀ©8ftToŠF%œ–Xq(jA$0D4$Þ/;¨—HýŽäIpä Æ£,D<\”:'¸³Îße_*CÀ0 C`>" T‘pâE,#k]­HQLô êáIµnÕN`·FBýâ ÐäbtcÞºÌÅ>œæ«ãbÿ°dÑÁªª ôJ ¤dE$6@¢© ø¼¡f$8è¬é]D#q<@Ö÷q 8> ]3•êøD(Ò'¥/Ô6‹ AèXPØ;WVW 9J¥‡ !6ÖO()‹{Ý‚‘¡*õpj,èœ|Abn㯡ð€Œ9ÖCr¬^…„RB¡§pv#ž,™ƒÈûÕâK ‡Ãw´~áÎS" !@‘þbèG†Z{Ã!¬êΩ^U5ÕÔG;z4GΈ¤„{>qŠˆDX§˜q(î´ºdCž2Ë率ÃÂÀ$¶¥ü Ö"«WftÊ0 CàÓè²S’>Ü q«œ“`J9mñOò€YT‰­×·ó«kÒD1§ãÎ+¦šô ‰;Ä%§Ã¥ˆáÓà†˜¨È 柅>Å*x!&_ÿD¹îP¤×½ãöŒÅ"ê‡ð"±sC3‘¸89$O+®}Me¹ vQýbNΉRAD’µâd|<"û+ À£0ÂÑ‚‘¶H\F%5ÂçÂ.\ /quÌ—æÀŠcã!ÎîŽFpZè9»ãFÎ8‹T‚sU à @žÔõ²:ÓàH5›¼¨æ‚ÕKîÆÃÔÇ0oÚÖUô %4óNù°üÊ%“©;wEEôø¢ãöç¢xM¢²B}:‰ )% ¯…ÞáÞpŽ_5uŸH΋“КÂ0 CÀ˜GÀ‰ðpêÃ.1"Q~§Ätn‰yÿ„4úr)ˆšR!é ²}’1RtƒãKAÁ×ïòSEn§Ä·³sÑØðHdL];õ¯0êŽ%¸ÞÊ'Î+WÀ’ o¨¬¿ïG¤K´»¥6+~ vˆ ÇFbG1ój$„_Äy摨3CùÇÈÈ6NÅrVG"lm„DT&„…SpÖ=ççPѨКʑ`@Œ·uøC•6`BîZŠ(v(!1âpLHèˆIms!(ž‹‡îŒw¸˜…DI4O×ù*ªE‰ê<ÄÏ9 !¦ÇwŽ£R“Nvž×xh·~>Ej¢HR«T¶ð€Rö“z!î Š†8¢E_4aøE”mh2mJ Íïµx‡99 CÀ0>Ñfºâ ’B¨âý¢‚¢™Ê'œ‹Bù„£õððœS=¿Ä$”dö©Y øó1«¢H$Æ¢]ªV`zE`¡Êñ% ãc§{qÈÏK ;wªå<NGÂñ² 2ÕÁ e@©ªnV%mµ(8UöÀ8%%Uy"æR”²ÂÌ4”zr-zè[ºsîª%=ÿ+háÄŽ*9ZãÐ#Ëw®:ÖݰQÛÇ0 CÀpÜ/ŸÐjŒb˜¥€’Ö¾l“ʺâeÝÏ*96&¨ÐcâØCë‰Zº Ëíò2Ô?13¢V¢¥ðy!ØZTWëR>44ïËú`¸×°˜›ªBŠU¨%݃ã»Ç§€¦¿ªÚT”*0€ëHpAëd«Ad°çK€Í îü"ÿcf„Œ­ÃÐH‡óOˈ%©©ï¬V¯ ñ,}YÅ­Ò°L†ƒgÙãWV¬fäÐT  ¬ËÔó«pÙlªV‘•È:G€p®ÀØÔc!Ú‘@(øK|¢S²]´4–DˆÈÛ]cëbHøTÄߣ…Æ…HiZ©ËeµÍ0 CÀ¸ î‡OhÌÞÕ?À¹Êм ü/y η/2ÀAIRˆôSÕ!?¦Š¶$1jæ¤ë„Nt È6tÙ¬œCü5¢¡”ð 8–3O˜ ?/ DÍ¿(®ø²R7ÈDÑÜFÄBŠO‹{JêÊ|tÚA/,.”BtÁ^gòÐ’`D øòx»E¢’Q"ÞuQ0HÔ.ÞáƒF’_Ãñ³Ã”,wcÅEõFq‡¬Eb¥BˆV•°‘ú' Ð#29‹B®Hý±ø„/ˆ06§Ãðj‚Á°¨8çÎë’&¦Š‹e àåÑ —q½WTCÝq«·m\Ê0 Càî¸?>áVù¸(d9«=/\!j]ßáÕÇÏ-¦çœç5ÓRØ€#Ã#¼Óƒ]Ô@€8FÇ¢’kŠfSÙ¥5‡‡ã£òІéø'æ2$TŠo€šñ±àPá ÓH€ƒ8…œb@âŸTÔp}_d~bƒC| ÒIÕ5dš|ŸÌ 5íÔ¼1D¥·jµ\ãWf¡®q¾*bÒy? gDÉnâ›QÇ °Œ„4¤Ñ â5¢0ýtIòKç´–BS"ƒ.ZäØR·ãS|Br@äî85‰x†à[Êùð» ûpI7NÁJô„4`rî‚ÞýT³= CÀ0ÊûáZK<íZHÑ5“BŸ^p#N1 Õ¢$=Á•Áþ$¿£2 8¯ƒ3‡Ä*†GÄÊbŒµšÿ¯ŽÇaÈ$§ƒ|Q—}*Îr;Cçù,vWûdJ›1Ü ÅÕ¹Xèbµ†9>á2V$¬À`Ün5Ôé®úD™ˆžCJQ6h0¥¦¦ Æó+õf>å<1ÎÅÂÁç£C­ÁBµ g˱ú2r4sâQlˆÕUéa¸úŠdµ+&!Ê’¹¢:l§ý$ôC6ʧù„DŽ\–¤õ’+¬¨:•¨“P0l¨Ì\7É2>a†€!`Ü÷Ç'\—K×dËÕÝÄò!;ÿA¨{>~!â—Ë@N©“-Y!¢7TE…s!ÀõWÙm£Ë¥t|‚# ˆÄŽJfä”T• ‹rNù¨5Ú)™ U¤—·t+)j#ÄñpŸ(–ÓÐþ¨Ú‚ ùÂHàœ3ðõ/kÈ+aürñ̹"Qâ&_¦Ç”*á!‰²å@â0À•"Ñ"TªÐ’Î+SXâœÆDЗp¥âqqW4‡ˆãI\©à oºN!ôis NÅ_ÃzõI„%¨Câkù$Þ>¡ýG¤Ñ—»p©¼9-õ+×¹ìŸ7 …!`†€!ð«¸?>qwœ¥ŒÝ;vi†€!`†€!pßùÆ' CÀ0 CÀ¸ß|QCÐ0 CÀ0 ãæ¤2 CÀ0 ûGÀô¿Zcrÿ(Û CÀ0 òFÀø„ñ CÀ0 CÀ¸_ŒOÜ/‚åÍ7íê CÀ0 »AÀø„ñ CÀ0 CÀ¸_ŒOÜ/‚wÃÚlCÀ0 C ¼0>a|Â0 CÀ0îã÷‹`yóM»:CÀ0 Càn0>a|Â0 CÀ0îã÷‹àݰ6ÛÇ0 CÀ(oŒOŸ0 CÀ0 ûEÀøÄý"XÞ|Ó®Î0 CÀ¸ŒOŸ0 CÀ0 ûEÀøÄý"x7¬­Üö ž‰÷ ‡Ûh©7ig 'ºùˆv„â](ï·b§C‰³èÙ‘?;‘®pü\(ÖÃáD'ï³ GN†ìÌy_>áã¼Ó6=5:eÏ6Þá³Á(§8£Çìà8#áîp¼?í ÷0vã#z4U0ÚŠõq4F5âMnAuŸÕvFì ã‘ṑGºøŸå}öaœ#áNÝŸ¿²qmü•ÁpX¹F.!|Æ“ófd´G19ËþŒ‡xŸ Œœ Ç{§3ÂG΂{…NsØá0?eòÙè©È yÿ“3†‹³ˆwÀOéØÎé˜9©ŽÍ&ób"ÐŒŸaË„Œvƒ37—{çfPb'ãm2c#à߯kf,÷‘õŽtÊ”æŸÕ)Í¡ÜäuEÇzeÚG‡Æe~Fç™ÉL-ÙM¾2çÝœtw64Ö3—ï‚›u2†ØI¾ f _æm“‡)ÄTtc°Í(!Æ'ì+·px°ÂäÉnƒX(EÀº÷Ê1ÚŠžbtû‡C¼yŽMÉD/ÏG%ò¸dÿ"oˆˆeå¯Îð;sîJü¹¡ –r OóDñ9.OÛâ×™}ØŸ(GP²2÷ר ÏýK ß¹g½ &Ìa‹{7Ç~œ àÁÍ¡°÷\¬ãòXÎÑ£öCL>;ó¾3ÿrêxï`ð”œ%~ÆQ áÐOõ†cÁH?ì‡Ý¸.¡2±s±±~NWdcÊ¥ÜI•-ã‘Ñ"%šã+B× Y @Ç Î½œZÇæh“m‹„@´[-}?têÆýr3)ç8¥ ™-n±7ËqßóÃÜgøe0Âù„nÊÌŽ1%µ=íbŸø¹Á€0`^ …„wº/ï0OøƒŒuâ2½­áB5ø¦„»££ç…^C  ˜™x2'Ž,vCà®0>qW0Ù×òSèQ–×îÑÆÆãÌ«òd«ð¼J¯B_TVWð3–'£Ñ<éøàÜC³[Ì-΃⳸Ç!f¥Õ'¯+½plˆ'¦{ ën<=ñ œ­X%{bYçÉÓO‰÷ …ˆÏÃmœT÷ÁNÃfÜú׹"*õ ¼ÃU8â‚=P«Ì£™§¶¸ø¬³%^µ3`üüt'uËGþʵ3*¡ñs޾ƒ3Ï_…4TÖȵ2^02ÀÑÄHȺ¶ ¿…[àÊgÇúÅVÅÄÉÁ‚•ÏŠÓE]ŽpˆeÒµ©c9BÎdl²vÌÆìÇâ" \¡‹;Î ,Îm½‰n’»[©†\æŒL'7ó++"±°: º!±ÑáâÝgTz#!fiÕMÈ¥ó¥ ‡Ž÷º/Ž|wtçá rqa¥mì/•s§SU5§¬æ×‘3‡™&üò“™6J±¸óÁŽö«0>a|bá8ó6oäÄÁè–ç©<+çŸhîÁ‡5Õ5½¬«ÜòN êÎåËk¦Îc/,¡Ò EYÇËAä5ÏD [¨{@ÖßYèà)*ÑààP¯²,âçŽì‚kÌá œ¶RÄ<íp_¾bøcêF»y]U#û„"Aãö(-Æ'ì¼p\äÂ)œÞù'xÃûáÞ@¨'?ïlvQý€!×€ˆZtyÚÊr_êQ ÖÐ‰Ž„Xö—Yа •8HLD"bªõù^ŽF°åB$ZÜGx…e½c*b€c}üUÎÕx îh5ü2˜X'^bYéU¹Ž²Y)²§Ž¶u$ƒQWvÏp±ñ"I´W®^Á€xkâñHwº ’bí±®ªjmp4q½õëv¢÷ÐWJiËÁB(‘nâ¡QÊPP|ÊäÎÆÇ¹",Ž^8‘m‹†Ó&608Ò[$ê?™èZÎß”YÑÇnLgÚ™€7ȬSPÅÞ)ñOàR"Ò¡>0ÇWtŸ FOó)á ÑXPŽÃo•žh#TE! X߬ä æ+ ÷DâÝnr²Eãý¸¯îS]]Í7ÑøÄ¢MûfÝÆ'î &{LÑ+(“ÐP‚X2çæIÂ0G:b£ç¡îšÕêVF´èu@E(ΚÉÓ¶Ê¥E¢S¼òÔ’§³-a2ÛÙECxæ²³{pÃ<œÂÑÅGæ¬~\Áy,Ø­z5ŒAMB•¬áT¤Ù#ašP— :X‚¬,q‡0B·š”…ડ‘AqA«×¤fµ¬ùœûªÁGÜžb9ð{‡Ïq@YAêqÁþU«u-ëšœ¼JC?â”v è_…ÑÓ*#ó°} pzÞü-Â- )B]3ÕkôÕÂÏ "ÞŒKXD£éÆ'õ{*LNymÑU&Î0ñÄK¼Iî~M5®"z+†*Äo¡oÊ”à¹÷+««œkAuE¶ 㽩r håÙâ<o½²/÷Z椨ˆ„|3åÄÿÇ ó‚¡¡H¬?H¤,Ü.“¼Z¦]@aøtD‚ ^u$§=ß Ò!`|¢tX/êÃnY‡íBs¾waØ3÷4ŒÅCƒÃ]±Ä@ía@WK¸…u‘mžSEŒ¨£¢;4ˆÆ†áNçÅ GFäµ®º”ô¹UË25óŧj(<”?7jÓç¬.Ý0ü5UÃ#}šP´Sß›]UãÕ¬’Ç4\‡“†¢ípw¨‘`7®çgv§Ÿò_˜ƾx]î-¥8ç’8™çCÝÕUø–¡Dgôã5úЗç~UU§šapŠù£ÍíPYU%æ'•c²¾,®5ù [tJ¸Ð¸ˆ[ç=ÛŽî D'¨Š ˆîaf<H|T8Ê‹N%ØÅA§ë×À„ÒÄòÉâŒåWù< ÒAšƒÿ F^]B—»"ñÎáàéhB”ÎK!‰>•GÈf&ÌO0تËÝ!ÎÜW€og GûøsÛÍLüa±Qña0ÙØRkþ‰EžËúÔ] ×b|¦È˜×OÌ;'xÁÂzÞ*»bM+ªXKñàÃÀ} C¡n=ÑÏŠ|Á-ô…vû‹g©X‡‡F:xâË2.< †3@žþQÖj<€5–àOáÈ Ô„G |61~Þ=…‰Î`ÎÕ6ˆÃ!².<À&g1i§Gl»Xý(‹ӎë„ÂÃ\ËPgø]’‹ UÿñW>YÑ#{ÃNÈ„[ƒêh‡å,%H/ƒ¶¤ÿ¸j΋âDÃÌIQ k‘ âüU•u:ã}’3§®X Ï•À­ 3Á€u~ 狉 w˜´ÌO! sþ§Ht„;8?Kq¸×L×¢oƒ[¦Tر â|#¸ÅN£#A´HQÁÌ ð:ÄFE-áX,”Âàôwá©Â’‹žÝEæÌùŠãÐÕ^–QYŠÇÂnöõ¹ŒOØ„[8ÅÔ•MÌ ï¡øXœ{Ü5à {p²²b8–€d=rÒ©Ø$Sƒ BX=ò$§Cò)xMŒHØX_“ëáÄöb¶u¡ŠŒÌû<Š÷9Ášf÷‰…Æ`ÏË5œc.[D苤ÏQqH2…H1‹,¸<þâžß9ʳh9æ”wrË´"À£ßéF»[Ž£Æã“º0w\„{D½/þsá%0žx×PøXxôÌ`ð¤ScÌy«Åg.ûɪ™¸K?q+.ĶEDNHë´t2X•ãˆ@Ø©t‹TRf¯FëtÍÏÉH,,4‚ù€¿Í©(4¾æ²‚UEѦ Æè(•=@+«áÓ8Ìæ©6ü@¹)ä[<"êÙÒ*¤VÙr1\ÈaÑú(q‘¿ g……Xʨ}#J‰€ñ {/Ç'ÜÏy_…³y#ÁVTZnaÀ=OÙÎI‘(Ùz «¨P|õî9;”z>÷¢¨‡¨ñ†ESYäáAâüŠBÍÉ )ò/)jx§z•N#,D‹<@Åž.B“ TIê”kk€O¸§9œÀUÓRA†>ý9]1OOÿJ:žjé.&â8ÇüY8iq`ˆFU 2Ÿß¹‘“j1.ukWPw”B@˜`å^ mÅ$D¸EèÔ'š¾9y‡Z8 ]h¹ U¢Hhá·Ò>òeSÀñ {Ó¬`½#§]&…›Þ2áçf/;#³p¹£|œPFÔ?Ž0ÕC®€„äkB²Vi+²É9Í:3$æ¥ÿðÞ%Á«!YBJ&ô%ZOÅ {™6Èu‹3S£Æ'lz—ãö¾'ÜjX SjW¢˜á&E œ…ã‰éÞ&xºý ‘XTVó¢£,z‰CÉ×w{º<7YsÞÄÛ¯7ÒÄHSãÁ- ÃQgª—”´O‘CòÐ×:ƒb‰Es ëEF“2Pš" Ÿ’SÊ`æøÁ1 8¨GŠkÇHלB}†bª+\J^8. 8þE£qq™„Ï10ü(® †ü©Šã ЦÅejŒPvfPä.’Vêl•ªˆŒˆsCKˆbÔ…Õ]QQ‡ Z eR.L²WÆÚ‡"­Z÷³˜L[ÚgG)×=Ëq.M«q$@¦±§ zƒ´B¥›ŸEòÁsÖë˜%·[óŸõƒ©EœX9†êTÌš,Êý•$î/ª›+V•ð$VX]…W^àB“ÀŸžÍÍH@|ZŒU«gj‚¤G%ŠÑ@áaË]ŽisOÓrùæŸx oÿ=~ßœOB -$º]…é¢O^mJ—*k¦Ñ. æjn…ÓO`˜‡#Z(ºÇ­ðxDÂ'$ £èŸÏÐ| ¸…Z·(¯ô¨øÄâOl°.°4tr± g¡…jÈcZ#q¢¸Jîù+%¡Ä±¡ló%ÿ]}XÊ1æùãˆ_aγͥqÈè8«@‚Öò>˜¢[ŒMÑðsIOÕQ5—ãàkÑÚJ/>tFÅ•ºrÉ/êUU\ÔüŠ––b5ݨïgÈùº‹¹-Z~QY͹}óùóŸæR³ "èî)öžø÷ÂMoÞäNAD ¤“Y§¥óFHR´pP¤’ZÏíŽì©K1_ÛԕĆà:ï…«NA¶°Ë+ffÊÄ.êxÚqQàŸpùø'\1M> ¡ÔŸ²Íå”VŠn)ˆ~Âò;uJ˜±øŸ°)rO8ÿO4÷Âi4=aNF1'/‹dmçªJÈ3W*Áâ¢,@bxƒó³Üwë9ñ$‡‡Å?ì’ûÝrP×pî$’N†UˆWyΡ\]³š£¹jÖsžIß׆?³Ë¾S'‡ê'8ž‹n¨DNHÌœÁÑ ©  ¾œˆüÝ_篌Ù=tÌFÙCÑÁàöq®iÇ“ŠŸ-~XÊQÃ@óB»æ.“kÔh•¨*•0†?©•¤àQËKÏ(‰»€ÏÆô‹¼ÈÓŒ$§u-j#”Òï»Þ}œIZ°U¸uñΊB‚ Oa½ìY³ºR4zœ_J~•êUÅ4ÅhõÙæ3qØjRá…“Gw ôÄý h`N¿#JI‹Î å%Å“tñaÔ Ã0>±ÈS➕ҌOØY8¬Œ©íœ®Øv1_T j! $ÜÄLPãO*I»ŠÔó6˜?¹Å=–Rjb€`Ý/…€¤à•S èrPN10"š ·þ“si-B±µZíØ­ÅQ,úÈ„EœY‚IPÁ£+i%e¹eMßã"(ö]î¨<¦¥–ö‰ô:Ïu(^]–@ÉO:I§R! (Ѫ—TÐcÂ9¤˜àŒ†cô™" Sôʵ¢¢<%EEBZC¢È‹”¯h….7ZÉ*œ×ô9…Š“FS±qJ˜Ó MNñ =¼–|é9ç‡S­.ŠbDÃ1Z&‰ªˆ¤&:²JWI…Ý´aÞwaŠÂkç#Vìàf¬jt´¶[h®–FF¤b›“%IÕ3s0¤"g 4RÌg¦à¬Ô°—"ÜÚWL†'?e†}rB”#|§Ìeµä“ľqw `|báÖÔ&4‚ÊK*L“ÅÇ™vStå«yžb %Ø/1‰†èBJ„ Њe] –Ya©íŠ:ïU§È ž¿|ÄUþ)J´¶¦æî‹bѹ‘ÚÕÒÏ3vºØ+,‡Ô·qÞåRj ií(^ -¼í$l.7Ïŧ]½KÛÖÆ]RzH[…‰öÂåjâ…&éŸOI¬º\])׋ÄÅY$òâú‡)‰QÛ *'bu-¹(!4¨Ô Z`À5)=«e¶¥Õˆ;¬jHe7UðILÇ‘3×¥Ls@d‘jýÀý‹é4¼jû¹¹Ý„!ŠâQÃ0·™±$hœÁEጺYçÄ\ Ãõ¯˜Ö•—º«Ϊ=½Š-`Õo´±ÕVs"Øt§Ö &š ÷}q;G≮Áp[0!¢%Ý_z‰9N³è€Ø /EÀø„ñ‰…# ö²Øc>×C”®•†ÜꙤǑè àwõ¤U5&½ÎPóY´£bq%¢ÍÕÕ–@µ4“ŽÞp%¢ƒ-f +?G­&djv†.ûŠI¡î)¯ÝÆ‹ÝÕ¬¸R’®#úÊ`¤ WÔ–p$@"òhVc šJG˜œÍ _TÈ¥®Ç ;ôB¤[ºk… Ðî‘â#Ñî •R¥ÝPµ;¨ˆ7¥X¸öF/mÂî®KhD±ý©Ð5‡•õÈbä{pžvUnr©nÏ»ED@Õ»"µqÉÀê«ÝàÚ¨’Éqó͵_q¼Ó±Ux­¦ËkÆ®]ñ[£ݤÔ&óDHå‘.ÿH­L†bµxaϘuÆ;Ý»HÇóv´21ÈÖ©Z¨{ pÒMËEDÃeü*ŒO,Üšþ*LÍÃf†€!`a†€!`÷‹€ñ‰ûEðAc v½†€!`†À/#`|Âø„!`†€!`Ü/Æ'îAc©†€!`†€!`|Âø„!`†€!`Ü/Æ'îA㤆€!`†€!`|Âø„!`†€!`Ü/Æ'îA㤆€!`†€!`|Âø„!`†€!`Ü/Æ'îA㤆€!`†€!`|Âø„!`†€!`Ü/Æ'îA㤆€!`†€!`|Âø„!`†€!`Ü/Æ'îA㤆€!`†€!`|Âø„!`†€!`Ü/Æ'îA㤆€!`†€!`|Âø„!`†€!`Ü/Æ'îA㤆€!`†€!`|Âø„!`†€!`Ü/Æ'îA㤆€!`†€!`|Âø„!`†€!`Ü/Æ'îA㤆€!`†€!`|Âø„!`†€!`Ü/Æ'îAã¤þE =Š·ó“-kg D;‚±Î@¤K¶h‡nm_ºÉ>|ä³[´;Èf“Ǹfm#‘3áDq^1CBqlŸ7߃§bã=Ãá3nr†#~~Þ¼²ùf3m `|bÜ$ÿlŸTÇä`ðLtôœ0€hw(Öã^|áfS¸'`±ñ¾¡,VDl¬Ÿ9Æ‹/ši‘DßH¸s8Üía–ò‚òÓç_+ž!🸧‡Í§Og]í¹•Ÿ¸(ø‰7Â-?½)iû"’ñ9“Ä}ܨž!ð)§q9„â°Xœaâúr¯?w¾9¿¬‚ŸÐ\G/„ïÚ|³oÖŠDÀøÄмmö¿+x4ÛYüÁ*x²C&xÖÏ?èçÂ.êñe›ñCànp´À¹ÄŽÉÄûôöÉLsÇt1>å<à»9—ícøãÆ'Ê m„b²øu„㽸Xÿ¹%à[ûè&ËJôŸÞxÇôwÅÞü÷t+í°£Ý:Çdš9¯3m`ä,o~Ñ|ƒg ´` BxáTJDL¯SÚ{W®ÏÀR_—ñ‰R#nß“’!€“¹-;ÍcšN˜Ià~ð«4˜w.(MY²ûµÒO$Lt$*Ì€Ãa™xÌ·/ŸlC!vgÓRºñ‰•>ÌñŸ0>Q¶´C&‚ñSòb!Ú{îN’ùÉïâ!.›¼y.=/??ÙÄuQÔU”-Pæ³oѯZæ[(Á”#_ƒÈž†($¾d¾…cCÁ®påfŸþì DæôÂ6ß †€ñ‰vÃý!X¾ÞП FúáA¯Êó*<¯RþïyÕºñ¢RÞüÜMÿè6ub÷έ¶n^ÔY¾ÚWcAH˜£~À”“iãæÛBæ[Eµ'3ÖæÛ‚·ý‚€ñ ¿Ü 3K‹€ªë»†cø$úx²ÿåéS¿þÎøøslcåçøøwÇ.²=7>ª›þéŽ×ÏŽyï=ùz žU°¯Ì#àÔ”=ïOŸýoþÃ×þ௞øñ_íÇü”íÉâ¯ýµ?ü÷Oþ˜Í½ÿïžø^³óŸ}ûŸoñªÃ¡a-mÒ>œh‰KÎQ¨XéÄò‰ÿñ ‹~ù»l|b‘µï#ŒOØã²ÄŸ(1àv:?!`|ÂøDù"`|ÂOÏÍ¥ƒÅøÄÒakGö=Æ'Êךú~ò-¹1>as ÄŸ(1àv:?!`|ÂøDù"`|ÂOÏš%§~¸Xã~¸ 6†eBÀøDùZÓešR>2Æ'l”ã%ÜNç'ŒOŸ(_ŒOøéYã#¢¹t°ŸX:líȾGÀøDùZSßO¾%70Æ'l”ã%ÜNç'ŒOŸ(_ŒOøéY³äôÑk|ÂwÁưLŸ(_kºLSÊGfÃø„Í#`|¢Ä€Ûéü„€ñ ãå‹€ñ ?=k|D4—ãK‡­Ù÷Ÿ(_kêûɷ䯸„Í#`|¢Ä€Ûéü„€ñ ãå‹€ñ ?=k–œ>úábOøá.Ø– ãåkM—iJùÈlŸ°9PbŒO”p;Ÿ0>a|¢|0>á§gˆæÒÁb|bé°µ#ûãåkM}?ù–ÜÀŸ°9PbŒO”p;Ÿ0>a|¢|0>á§gÍ’ÓG?\¬ñ ?ÜÃ2!`|¢|­é2M)™ ã6JŒ€ñ‰n§óÆ'ŒO”/Æ'üô¬ñÑ\:XŒO,¶vdß#`|¢|­©ï'ß’ã6JŒ€ñ‰n§óÆ'ŒO”/Æ'üô¬Yrú臋5>ᇻ`cX&ŒO”¯5]¦)å#³a|Âæ@‰0>QbÀít~BÀø„ñ‰òEÀø„Ÿž5>"šK‹ñ‰¥ÃÖŽì{ŒO”¯5õýä[rc|Âæ@‰0>QbÀít~BÀø„ñ‰òEÀø„Ÿž5KNýp±Æ'üpl Ë„€ñ‰òµ¦Ë4¥|d6ŒOØ(1Æ'J ¸ÎOŸ0>Q¾ŸðÓ³ÆGDsé`1>±tØÚ‘}€ñ‰òµ¦¾Ÿ|Kn`ŒOØ(1Æ'J ¸ÎOŸ0>Q¾ŸðÓ³fÉé£.Öø„î‚a™0>Q¾Öt™¦”̆ñ ›%FÀøD‰·Óù ãÆ'Êã~zÖøˆh.,Æ'–[;²ï0>Q¾ÖÔ÷“oÉ Œñ ›%FÀøD‰·Óù ãÆ'Êã~zÖ,9}ôÃÅŸðÃ]°1,Æ'Êך.Ó”ò‘Ù0>as ÄŸ(1àv:?!`|ÂøDù"`|ÂOÏÍ¥ƒÅøÄÒakGö=Æ'Êךú~ò-¹1>as ÄŸ(1àv:?!`|ÂøDù"`|ÂOÏš%§~¸Xã~¸ 6†eBÀøDùZÓešR>2Æ'l”ã%ÜNç'ŒOŸ(_ŒOøéYã#¢¹t°ŸX:líȾGÀøDùZSßO¾%70Æ'l”ã%ÜNç'ŒOŸ(_ŒOøéY³äôÑk|ÂwÁưLŸ(_kºLSÊGfÃø„Í#`|¢Ä€Ûéü„€ñ ãå‹€ñ ?=k|D4—ãK‡­Ù÷Ÿ(_kêûɷ䯸„Í#`|¢Ä€Ûéü„€ñ ãå‹€ñ ?=k–œ>úábOøá.Ø– ãåkM—iJùÈlŸ°9PbŒO”p;Ÿ0>a|¢|0>á§gˆæÒÁb|bé°µ#ûãåkM}?ù–ÜÀŸ°9PbŒO”p;Ÿ0>a|¢|0>á§gÍ’ÓG?\¬ñ ?ÜÃ2!`|¢|­é2M)™ ã6JŒ€ñ‰n§óÆ'ŒO”/Æ'üô¬ñÑ\:XŒO,¶vdß#`|¢|­©ï'ß’ã6JŒ€ñ‰n§óÆ'ŒO”/Æ'üô¬Yrú臋5>ᇻ`cX&ŒO”¯5]¦)å#³a|Âæ@‰0>QbÀít~BÀø„ñ‰òEÀø„Ÿž5>"šK‹ñ‰¥ÃÖŽì{ŒO”¯5õýä[rc|Âæ@‰0>QbÀít~BÀø„ñ‰òEÀø„Ÿž5KNýp±Æ'üpl Ë„€ñ‰òµ¦Ë4¥|d6ŒOØ(1Æ'J ¸ÎOŸ0>Q¾ŸðÓ³ÆGDsé`1>±tØÚ‘}€ñ‰òµ¦¾Ÿ|Kn`ŒOØ(1Æ'J ¸ÎOŸ0>Q¾ŸðÓ³fÉé£.Öø„î‚a™0>Q¾Öt™¦”̆ñ ›%FÀøD‰·Óù ãÆ'Êã~zÖøˆh.,Æ'–[;²ï0>Q¾ÖÔ÷“oÉ Œñ ›%FÀøD‰·Óù ãÆ'Êã~zÖ,9}ôÃÅŸðÃ]°1,Æ'Êך.Ó”ò‘Ù0>as ÄŸ(1àv:?!`|ÂøDù"`|ÂOÏÍ¥ƒÅøÄÒakGö=Æ'Êךú~ò-¹1>as ÄŸ(1àv:?!`|ÂøDù"`|ÂOÏš%§~¸Xã~¸ 6†eBÀøDùZÓešR>2Æ'l”ã%ÜNç'ŒOŸ(_ŒOøéYã#¢¹t°ŸX:líȾGÀøDùZSßO¾%70Æ'l”ã%ÜNç'ŒOŸ(_ŒOøéY³äôÑk|ÂwÁưLŸ(_kºLSÊGfÃø„Í#`|¢Ä€Ûéü„€ñ ãå‹€ñ ?=k|D4—ãK‡­Ù÷Ÿ(_kêûɷ䯸„Í#`|¢Ä€Ûéü„€ñ ãå‹€ñ ?=k–œ>úábOøá.Ø– ãåkM—iJùÈlŸ°9PbŒO”p;Ÿ0>a|¢|0>á§gˆæÒÁb|bé°µ#ûãåkM}?ù–ÜÀŸ°9PbŒO”p;Ÿ0>a|¢|0>á§gÍ’ÓG?\¬ñ ?ÜÃ2!`|¢|­é2M)™ ã6JŒ€ñ‰n§óÆ'ŒO”/Æ'üô¬ñÑ\:XŒO,¶vdß#`|¢|­©ï'ß’ã6JŒ€ñ‰n§óÆ'ŒO”/Æ'üô¬Yrú臋5>ᇻ`cX&ŒO”¯5]¦)å#³a|Âæ@‰0>QbÀít~BÀø„ñ‰òEÀø„Ÿž5>"šK‹ñ‰¥ÃÖŽì{ŒO”¯5õýä[rc|Âæ@‰0>QbÀít~Bà¾øDû`ìÌp¢í|äT`¬s$ÞíŽu熣=ºuñëpììp¬M^D»x¾ÛV¾œŠŸŠs»¹éÃñÓ²É}ï ÷â=üid´}0Ñ=ë=íIôÄ—–RŸðÓ³fiïµO®ÔøÄ"Þˆápx"]3;ŒŸ‘_£ÃáÓÁXï„;Énþ:¿Û"žÝµpî‡OD»C‘¾Hì\(Ö6> vBÝ¡hw$Ú%[¬£¸E»bòNO(&vŶ²D€›Šõ…£}z÷{"‘ó‘ȹH¬-é …zƒ¡öX¢+9Íw„£íÁÛšãK ¯ü—0>±ˆ³Â±,#p‹v÷':xtÀ'¢£çØa©#‹xEå~¨ûãð¹`´/<Ú=Ó:Ht„Æ{G]Cñ6Ùb]C±ž¡X‡ÛXªÊ½ØVžps¹ËñŽÄÙ☿õm‘ Ý,/'#±þhl†çXêo—ñ‰¥FØŽÿŒO,î”P&!îÈÄHä¬ûF…Nã–u"=Î?Ánî…mËŠÀ}ò‰ÑÞþžíN8Äp¼;8Ö7î‰ï+Þ‹p˜k{4Ò‹´ñ3T\’º…©me…@(Ú wÇB½ÑH'[8ÒÍ&“;ÚM¼c0ÔW&8ÚIL$8Þ~.t"<ÞmñŽeýòÛÃwñ0>±ˆSZ]Eº L¢Ã½#oFes|2ÁûŽyض¬ÜŸÀ~À¢ñÎHì,ìHâ Qh¢‡x±.¶O”*žýDĶòE ŠÿI|É‘ÞOd"‘®pü\(z> FÔ{y62ê|˜Kûý7ÿÄR#lÇ7ÿÄÒÍçupLÂ9!ØpKÀ$x¤`Mäa–Kt VqvéFbG¾;îƒOp‚0êËH[8Ò¶EÂm‘Po•çU{«ª¼ê*¯Ò“üd«ö*ôE…¾gÿÊî¯ÛŠw¿ø[•Þyh0zv8|†ž‰¥vN0?OÜÝS`iYÝ5óO,âíž[u´…ÎFÇzÃñ^è«òˆ³³nQbÑ{~øL8ALD8‡mËŠÀ}ð âC£="ÔõÖÔx5^Åšo2û;S…ƒ©ÂþLao¦°#WØž“ŸnÛ™)ìÖ÷m+Kvs‹uÛŸ+Ìè–ÖÉ0]Ø5‘ùþºUÞ:Ï«©ð‘‘`´7Ùö’nÆ'–^;ø/#`|bg4"6ÞGd1D€)NMÈ«•`¤õ7|b$Ü?¢‚/» 3ü{:Ô}ð ÎGh£¢BîïÕ+=7ó/Mv¦ »’Â!öæ óù‡ÙÔºìÇ®°eŠ<£,­©]Ô^¨Û܆^ìÎË2¼¹?[xtºp`ªp`ý.ï¡Õ^lxUæ=ÍÚ»e!Æ'–^;¸ñ‰%ø$§#£âh$ÀÁFt£r•ã0‰H¢o8$QüÆ'–ô^ÜÝÁ?Í'2…t¶áv…B¼ÄÚC‘^Tu#Ñѓѓdpà ù3(JˆâßjŸJý£Bawª°3[Ø—?Ä®L~/"[؃+b¶°¦p€éždagEn¡ðh*Ï;Xš}l©¦hOªPËg …=Ê?Nž.ìNË‘wàØÈ°Írp9ËÙÔîBá@Ž’ÇníåEº°oZŽ¿g6W›/ìÊj3…­N!'ÂΜ‘ÁðZì\‰ü%y†«¦6]ØÁ©"UØ JŠƒp/3SØ“ær²\|kA¤p@¯8ÈËËæöfs8vrdàÕŸ[Ó…íÊä^F>—Ìs±{¸öùkܺÝ[½ÚK„G¢Áô›”09O*)¢Î˜ QõF{Ù$JkA'J²0É…ñ‰»{ Ü-?³£ýJÌ?ñ+!ºëÚQàñŧÄÑ èóÚ±.˜DGO7*…É9×DÂQ ;JB½ëÁ?˜ß©Ïø'ò…B¾ |"<¤·GãÜѾáØÀpx( GÏ!À ŽwV<äÍμXÈÄH¤ û¦ ÎÉöfŘaÀ`³Ù¸¾ÙAMþ#næÎ¶Ãò0ŒìVµîûÓÙ}˜Cå›3…혼åX\¨h2·»«d‚}j! jŒwLjù©¦²?þvaÓyl¶ ÌùÞõ'ÕùKÄYR }&Ïx°÷B”í+äöò0ªƒ8D”FΰÈ'ø(Ÿ‚K))dÿù >á b*‹¼3wÓ±%½­pG!U9¸fyóO‰vtˆªÂ0†H4áñS¡Ø)4¿¸Á`º-ì[j|Â%FÀøÄ¢NH4Œˆû<Wˆbd¤ Öà¹þ áHð<ùƒÃH¿ãX(«B±°gã¢Ý¦OŬ?Ã'²…B®€vn$2„à…Ç÷p‚‚†íC”2ŒqwÏÆ¨M„*ž÷VÕ¼÷qïlúyÜ ºôw¦+“߉‹ƒ1+?¤ò˜ùýùÂóémü)“ÛΆß³:[Ø?üᬪá¬_§³B#²²ñ'œÎÏñQO´5+^‡zpÖúâÞÀ2‰·#·MiÄ®tfo*÷p:ÿH^Vä¬ÝqˆnCÿŠi—½š[ñ|,±•ÝŸ”Á?’Ìq½g"ÇÄE3?z\öÁ¨pê@­¸Ø…Žÿ„Ââªa›Éƒô…Kã\ŽB¹0“@±\úç™à«àWuAÁ±vÌæ_FU1dž¨‡Ž÷‘e*¾1qKHQ¤ GÅ|òÝŒOÜ=V¶ç¢ `|bQ`t_ê`FǺxÂÈ­ª+ÖN½;ÜúÁ*og4 …‰tœ!‘Ò.-`ñNm‡º7~Ù?QÈ Ÿˆö‹Ô>寮D`ô,é T’` É™à‰·®÷Oe^HJBâ„<`ÙüNÌ›‹ÂH@N¼ü• ËG(dO2¿CââÕ€…ìšÍcZ-¾’β3fµVÍ-«mYµã¨€Fˆ“<·?™áƒ˜ç]86f {¦d7,èYâ'‰kèk9o1üŸPš‚¹% °]Cb_“ÐÐþ‚í÷Bí½ºL`<»`Q€£ÞñL$ 'ð vá\Á¸ÂŠX¸Ã z|TbËå÷¥srpü$å˜ð0qƨ?Fˆ”2‰¥æO_ˆ'—Æe²qs³óRÀ¥¸¹Ì+D="‘ÁH¢±5Â¥ÁıPü„¨«¤k¯ð‰H¿lEžq·sÝø„=aKŒ€ñ‰Eœ:ˉ~¾þÂb]œkCGß 7¿¿ÚÛ†‚RM±—2RíŠ}Ä‘¹°xè¢ u‰uå+gœŸæùB&¯|"„Â<ÇuQØŸŠI‘ ’ýÚ¨JTµÎ›Êý@íÓuH@âZ€Fäðºç±pðs¦°¥c(l™ÉnU‹r@×ëÏj±yè'xí˜6š‰Iì¢H+xGL>Vg"%†jÀQXÍ?ŒZ;„‘fç öÛŒÍæç.„x_,x IeX?ÌY¦ÃQT´!bµ¸.e‰6\pQS e4Ï%b<µÉ¶©Ç…kwÑœG®"… !m„s,}ýþE»´…<ÄVÔI?Í'w  @ó"Nf–†º!ÂG{ÃÁΈ”®:Û¸~¥7•|%›úÑšU^¥Ö ËcMÕꛟ›J¾Èj]äTæ¥õk½«—:Ò¹—E4€‚tìþÝ»¼ÕkeË翟-lÆÄªHbמ]ÞújïÖÕÞlö~ÍÔ˜ýÞºy39ûCUHˆFA¶]™Ù—6¬ñVU¦ª¨ô®Ýl›Hÿn85óƒõ5Þĵ®éÙ—U-s÷zŒ«¬ÔÕ "ŠÅ%#ÂZ¸êÙÔ+k×0ÀJ¯’¡V’ ³F3bV3¼ôIyÀ¯ ¢‡<-Xå@àïK&¿!W؆çc6ù#Rvm6ý‚²1qÕ`Åɵq¾Šò•E¨!”wÆ;4êÁ]ÆQ±#ì#ûW¯òA2>…FÄÎÈ&%ð„O¨ ó^Æ'VÔÃènÝN~¾(ã‹vwð=DÎ…GG¨0 ÷T{^°-žhx?Öøþ*ï!ò;¤å$|BZÛJ„Û¶-/ŸË'¼j¼IEJ!ÑëÞðéØx…ÉðLÜ.¼0UÀ÷°‹¬?o-õV“åáÊVU¯ñ¦ó¿ƒ‡Û¿q§WµÖ»róÜÌC½îHX…oªSÊv;õ"k÷™Â6‰ëç÷nßæU¯öjÖx³™—1±|¤v—WűWy3éH‘À߀óC™$JpØ g^S®Á@WǶeúÖZoÕjïã+]ÉÌTz‰)}‡D!OXO;L‚eñÒJ(Ä’Û35óB5U(c„Gð¨*]uÕµ+ƒÉÌïbò¡„ŠHn£n=Utb˜·Oe›«^N6ý¼ò Qž*¥àÈ.Ëc¡§XJÁ:JáBì@[³Á¬8ŠrsyòHkÚçÅßø3žH€‘ïH°Cª›^dñŽå}LØÙïã‹gÔÑe·údU@åš`ËûãM¹±#³£­ø'¶’1 ýEé¦U2]÷Q«?±xàßí„ÿô¹þD¾À‚?@ÞB6ŽˆbHè¸Øu.ÚÅ*ûöáÉÙf’/bË)!L¿,…ÜÁÔÔËx VC)<ïæåžäìKµÛ=Þ¹úql@s>÷â±XµFH@.ýk·H®àå«}Ô¿"ÁÒ»»zPŠÉÔKÎØ½i‡WõwéZ ƒ…~6·I#h"ýÒj<«½ÛùgÅšîÆWÁ;èj¯úÖåó™ôï’‹X³Î»v£}:ùX£ßÔtM±d¸I°ª2% u&|Aö ºÓÎPáO3ɪæÛOÐgß¶Z¯ ¿ÅZxøp½’1»ÀÁhpÇ¥®È$_®^ë^™ùx‡¸(\i©åòO¸ërLÂmNN¡¬ŽÄ<þ•ÚZ/6ö?Ô.f‡J%]-ë.Å4šÜÁD7ÿÄr?_îí©´‚?e|b§œtoˆôaw†ÛÇF›?ÿÉìźL¬é£Uè'BCÔ,‡C˜VÆtuŬL?±¼ßÏú'Ò…B†RÙÑ``8Ö‡3ê…ú)§˜–%õë}SÙWÙ°‘l׳/`§YÒ¢|ÄŠ¯zÈ{ûÃweõ ³ðª+<""ÞåÛSÉïgR/ãÓ^µÊKe^ÙR+ÎŒ«·úo§^&ضÏ}b­÷ÁÇVV¬bÏÛ³ØZ `l0ãºøðí¹¢õk¼™ÙWñjMðáNX F‹^U½¦Ê[{íòàLi¦ ßÌ¼ÊØø4W°š@N…wõfÏTúå©ä ÂcÖÂx~¸QÇ/þ˜ì˩ܫЅ*öõÖ\½:H€ƒ“¾%š.l¦.$"|BÞÇ!9¢©ÂöÉôø8þ˜‰ä‹¬Ô%Z1ûïÜýxP̶N¾‡¨XE<Å{÷ød©R:û‚È?1Õé p®Êùå=·2ßC°I8 œ¹—>|ŸJØìN¾$…:ŠâÉÑ\˜%—p&ES·À7C"ñ¯Ýšy‘k!3Y*OÄÚH=—Ð)¥l"è‚%VºÐã‹øp·CÝ Æ'¾¥;¬¾6ôr²‘ý­¤ž¡ktpGÙ¢£«Öy3™ïQ* ‘ãtê%ŒL;õJ¦~'“C,ù‰‘3¹-éÜjˆƒˆ¬Jf57nž›Ê¾<‘}™åøº ÞäôóÛaèHÎq*©š ñø–íb¤E }Þà%3?À6#ÕLêòq%Þ…\꟰W²R¹fµ7“§Â·TÊ"ž‚<";ù²³ l°šUk®|xu¾‘†%L\ëIf^„ÓˆW£Â«&þ²Æ»þæ $ïÃÖT¡CXÅΫ*Ä•BtW ã÷Plˆ#D®mí\» ÞúDÛ’ÍÞõÜoÝ–0„,Çñ¦@\ZåT /i¾ècé!õ¬Äi±°õ‡ñ‰>–wqSg7>ñ¥Sî‚#sŠ85³)BCÏÉ× „ÆAÞWí­>úóhãô…úÙ×̼Y?oz¯ÚÛŸ@]Ác8ÖF*é@L´ ]oØ·c±øl¼c¦PHc/…ýéÏ3åÉyàHR½ kD6G^*+¬ÛåU¬WÂ଩ç]»Ö?›þ=‘^vïÀ _E™zQ eæwnö­ñ®]ïN;˜Nýΰ`6ýªc&åaÇLa?œó¶Š¥>¾›ý·’/iªù#dZʆéu•Ñ[àrp]ǪjD¾qíjo&ù½‚$¦îÃÊ®[ï}t© :=ó òO(V÷òõsÓÙ'f~°Æ€W6SÇ@Œn]éO&¿¿}·yúàZ×Íüó· ?@–Û@šKÿÊJNÄšþæsâ¥ØáUlð*6z“ù§s?Ä®³Mç~D Il\5áñèÙ&ÇPäš®^o»•ú~2ÿ#¼ )9ë*Þíxà "ðô¼©{'g¿¿ag‘£Ìä^šNÿ6Ã^»„/Sx<ܹ›¿®Þ©ô¸^\&¯Éìói)KJ¦®sHà-úù;ÞY`f”‚ L2OuvÙ`ÈHÑðF‚"ÉtÏ'fÅÂCÆ'ûyQ&I11>q·|âí$Õ²!”³‹Œv9_Z=rDÉ]çÕÄŽ¿›829vxòõ#ÓfÈ]åm ±ä•|Ñn©Œ™ >f—Á[`½»% äÁ?Ã'2…BÿÄê‘pDèRá˜ÀVð½+Ý3¹ß#/å $‡så±C¬æ±¸N^ˆ5Éþh6O®æÖßìÛWFXO¥7³? `!’+ç 4 ‰pÞ~^hX]òHqzç2ÿd½x>8a͵û³i2;ÈþÀý ¹ Óõ@Vùkü”ê™ÙÚ;½5¬³¡UkªVyùß‘4]D^àä¡ÈÙ³/{ì³KÏ*üa”¤P q>h4DTUWaðk*.]ëH¥^¢~%”dúÕ5x#øÇŸQuä~xcæy¬þº5å4QŒJÐçjÏìô Ùä1Ïœ45ýû…ìã‘•HQșԤ u€“2‰U—¯ ÌΡHö÷&_†ñˆºµn°€ñ¸¨ÓdúE­¥±Ï‹(Ýœ…ß¼BäÈõv•«ÔsÓøõÆ•ötúEîÜèÊåó3Ùßå~:™+ÝM zTÛp,€Üçê^hG4Xªh@¤& ÛWïó¢ÿÈ%wŸª'm>Ä[¶Àø¨ñ‰ò¡¶œ¤ÇøÄ=ð -]u††ãN¯B¼‘~–ªg±cWGf.6¥Æë’‰ú4¿’/ ¡œÖÖÑ³Òæš×aqjÚ„_V>[Ï*SÈç0>°?ià†Ú%ÖÆOÌÒµÛ篥~*<’Q!â>›æföfR¿pËï×:a xÚñ^\ºÕË:þs´ /P•Ϊ*Wãí¿žþ¾Ö]Îa,Í·kÀ¤b1y7ST¹Ø§ôEÔ”ø0¤Ìv^ŠP‹Y+ÙÅÒ¼h;+ªñ@¤ò/nÙáU®ó>ºÖGhÝÆ"Äe²x;Ø×N&%Â¥¹’j¡œAG~¹#“úmœkuÝOÈ¥RL°¬ã3©Óé—×â«@ÿ1ƒ²’N";7îªAŽF6÷gðulCk*H-HÖß3É—8Ôdbêûê´Ø·CYˆDRßÃA”'—ü]N!Tc!ãA +x®ón¾7-»ö%g_…'1xŠNgÁ94(‰Ã@žDÉRQýáµþÉìïI”ð¯wsQT§pRM|xw\qiç¦ã¿'¢p—Ÿ’ Þ,-o%U4˜ Õè…¿˜Ïï(Ö³ÒD…~UŒO,1Ûÿ>0>qò=Å9áÈ„µSý^IžÉ¡¶p¢õ½±º[oŒÖ߈×O›Þ[åøDH"¡Â'ƒòÓŠY-ºìgûáž ¿£&Ä?!m™¸aÑ0A,25:pGk1Çý“3/±ºÅ²Î¤_Òò ¿Ff²°Q,Üå[çIÁØÄkU>Îf^œNýóIx»Í2Ýé]î$‹ñ/wâ±@!1•Û±u··ŸüG çÀÛ‘"×­å#™¬«!M¦ÆÎÉÜËÞ¯jƒfLäéFþgß½¹ÎûøzÃßOÌâò®éìX¾3*,}*ù£|VŠbÍæ^Å5ÂÆ"F¾ð89&´¾$§”¿º>UXà‰Ô«“éIvë*o*û½™¼( "L§¨r!ý8„!‰ªtàÖì?J^€ÓÔàÉS3T»å÷Д¤ÿ}—‚§DMæAÄ’üJ°£rÕê®wO%ÿ!¬\/ÐMå0ždîùÕÞ&Q_~íH¦°mböàçààS³ßO’ƒCD£mÄËZ4LÊrh»á:\#ÜèÊ^ñ'‰Öå‰H;P—ŒS’zä’ÈJ¡tî, ÞàP#úÈ̉]ø#y*¹â˜RÛêWœÆ'îáán¹ŒOÜz¡xÇ`ð”sKPm‚Æ¡´e9>öö…ÆÙñC™·Þ8”}³.?v$ký¨Ú[OއЎXûPüôÈhÇP¬¹Õ=,9îa´ö‘/FàsøDs/¾#|Ëq)+ÄÓÛ壞T–Hy”Œ7?êONÿˆ_µh÷Îõ1g_fîôW®œÉ'¿ŸŸýÂL©¬Uå}|µ-“y‰Ïâö¿|µŸp9{—Kþ¨–ÚY·“ßWå#ëuQBLLÿÖv´ k<Öî¬×Ñ* .akó¿C&zÍ:ïfò{f¼ 8u:³ Ó»M%ªÒkçP@n0Þh xu¤æY5ÏÃBÖm‚ÒD¾Þæ‘è{jIþ³ôï@EA6¢é'îü¥òd|6Þ‘#Þ]¦š©Ò=dq}TÁSþñíþë™ßFšPK³Oò H*(¦e"¡\ ɸy ­ƒ( ÉžP;ÿûàƒ÷pE`êPGfó0*jï§¥–{ÝZï£+½¤N¬WkôéÜ÷I§ÄÂêŸU;¦=•ù!ú­WBœMzD26á45œ·¦ŠØy ’ú»lda*³³_zŸ8«v­‹%5µ´.øîÚm:B„š(Ö¢üЇtí.­…UU%–Xƒ3•™b ÙÙW1Õœ’!ÈX壡f×ÕΩ܋ä& !èCÏU§ÎìO¾‚'€Nd~@=.Wèiñ ©¢ôLÿ~6K¬gÿBÇ£5¶wo€% »¨¨ª¨$„³4‚s¹¾*ŒPb+ÕRq ‚%Þˆ,µ¤ÄèðßÜLáM9¨mÜÁDÒgàIŽ^”B?!•Ñ©›)5R Š%“øºeVÄ.ü™¶-v¥Ñ¨è1e6.,äaþ‰å~¾Ü£ciåÛøÄÝÞ»OçwHQJk#™Š#ÔÎ3ù<ÊcïŒÖM]hÈ&^K]äŽÙÑ#7£­ïWxµ¢ð †{£Áž8Ä"zV‹ñ/,ÿën‡ºTÖ·ü¾ŸíßQà6TºË£±éº0ÖËݽz­w6õ’ÔEC‡½!Ø!ªgr½LóõË]dÒh‹NÊ¢jù{ òCþóÑÕŽ©äóêu?8%Ë÷=$S8 ãôì‹;jeÅ<ñqf‘ »Ü9“y^üZå‚Ôâ)Ôfv­ÆñpÌk*9µpŽ­mrö;D"f ÝNý¾ªdt}x þ‰Ä, ;ГºN›DU¸<ϯKe-w$•CrV5.#y¤©°ý0‰Ëï} )Öx7³/!(@M*Šz]½Ü=‘zÕ'ìDöÏ~Ö¥54e4ýCç3¸ZøíI©ò¹…LŠtn‡S¤ŠK¢‚œ—^ çeAã¹z¥o"ý¢xMjðÕ0à÷?|‡ë—OòyéðNÓä‹›•Ä—j®Ð¿-ûÛTÉ$À±u›¸‚&>ìd%0Eè Õ€,nÆm e!\ÿûÞÄZÁs¾È•Ô1KŒÿ‰è1õk|ió ãöÄ,1Æ'¾Ä^4ùÚÛO} bþ¥Nvô$k†þØñáñŽ¡èY”xcÇß{ýÈä…ºiÙŽÌÌoãu3Ñ–Kè'\}L'Þ”äRõpضÜܟа·ô¸b•<•ßJíÈ@¿P~îÆdò+KdÄ“™Íú¾´òÒf](:¥†Á0SB {F©Z†ò“.çÒ÷KÖÇÒrÓOÌçvçsÒ«‚`”ƒ”z—ä—R6Šd„ÙMŒA+OKåfM!˃rÔRœnaPÔ…ù4a“~TR BT¥œQ»ˆI}Æ\ á'‘‚NÚM[²0±je]÷2ÆÉðds» ™ýÙ´+jIûS©È”.<†AŠò×üBVvÓþ¢`­©Ï¡§&dCÿDÁ«&Æ€xóátFb w?†&GhOöí³9Z‹q±Ò` ™*ÚO°’+ÍkØEn“Ä/´âµôp‡¢éƯÒ#M+s?šÏÃ*\×4×$ö¢ þˆñ‰å~ ؃xÑ0>ñ%|‚è¹ä Îùµã†tø!;#6Œ …ûim½ÊÛª{ÿ#9¡Æ'VOº>¡-@É~âZ"BlÒT^BløÛÕ•µ£º%¹ ØQø´Á„mÀÀ;m¿$k}o¬8–OêLHg¯l-æPK]Á ø‡¥P}°ëÄM¤fU*^dv²¼–â·‡”hu&éžÏÕf³› 9zšS5KªyºVœ¤D’0ÂǃH>µ»:æ\—æ®[º˜a„Š˜|W2öàÂüP-v‰1ÆÛ×DúªÏæ "bŒ9 ¤ŠM 9ìMgiÖM‘äzUds²™É£kLkZ©öî‚ýÐðìnÇæ¥'|ëè‘¢é·q-¿–ÔNñ3Úÿ ddåŒr\OWG\4/”Mzš;=¦ )¤’7^KSŸÛø„ñ‰²AÀøÄÝJ-œ/]ýG)kDÚ`»è¬‰ª»Àz¬s(|"6Ú·x¨#mzÿ§ióO¬´ïÅ}ð é…!51±I˜vVçB#„CPíŠòæ>¥ ° ØÀcjç𨳠Çú•ØÌª3¬•ž¥˜–n|ܱU9HSrÖÐÓš,ªå&1ϘCj$Hì#]ØÆ ­Ã “Qaª°U߇ p|΋M•¿(6„‚@D„Fh#)z­Ÿ*®Åñd8Q§V£&8À0׋b<|„°„ݤªbƒñ.hJ&\†§íÔ¥B(jú 20.wvÓ¸+-AþùnÝœˆ$Oœ+Y’yöäÈÂu2iq®-µ h‚ÜÐê{ëÒî_ .S.ßï«¿´ù+âã.ïWòu•k¦Á 3%ÐO=Æ'VÚScÑVóåwáÆ'¾äžº ¦º·„tûu[`ôôHä ™¡iÞÐÙh¢ùÃÑ×,Þ±â¾h÷Å'vOd dˆ6/ÖKÝ(z-mÁs»u]Ž“@ÜøY±a,÷YÿZ:ƒ•% p0“euNôo?9‘}ªÍÄy€•óïÒ Ô¿'“¢N±ƒýô!£îE¡ð_PÞj6G¾¨ô«Tv²'™æ¼bé1üjÈk5r!Ks '‚PN”J‹o·L×·Bó$kgr›\¯v¦Ìe6M¢ƒÍfäb¡ÓY†Á`$’¢EjóÂ?ä …×ÎΫæ*#T–#–›y¿Pø¯²™ÇÑ¢j¥÷Am¤ŽncfÙ+ ÏÖtž4Ê^À®à+‚[F—ÒCDq”܈Œ{AÅ b"y¡;ò.JI’ds¨]/öìP§…é'ÆŸóÞ{òõÀ'Ý?­#+?‹hWt?ŸøBôæºuèWIh„dliÃ?Ò¸â»mÕ4"?~)Ò0{¡iRjNÔ)¥0ýÄŠ yÜŸÀkDCúXj3qÁãS9ÄRìR÷’ÇáVöê`(Jp'é€ù×èû‰6¡¬°5_QtvP3©#$±E )_-m>p*¸G×óZeÒ©Rk"}%¢Ú÷Ãjõ1Òœˆcr@^Àlœ†ƒãð'‰†h³1¸ˆ,Ç!ΙAE ¬étŽOqQH@¨Å0ËJ­q¶¯hÅ 6]ë§à%Ä>ÄÃUHl%…Ô˜Ÿ…ˆlWƒ4ÕÀ„È,t‡ƒéŒ6—  Ic³»: 5 ÇÑ _Œð+0¸‘•ÙŒš¹ê\>R9xÆW´Ù ÜâÅSÜE.¢=;Ü&ýWjµ óOܳÏú ã_~;\»`<ƒÚá‰z¸7ÉÑ c/Öôá…Ã…±Ã™×M?ñ€ù'4ê¿;“E*³E#â„—B‡ybØÚݹ¬T·dY씃tÔª•a ®õI-M¤Š¶H21ü*bY=ÑŒVØÈˆtðÙ‡grr.5`¿á"[Uß éPÕmàÌÇä‹ÍÆQ! <Õù¯‡Ú?-Ö«)c@:*vÚS”ް‰H¯ *K†¡#Ç‘PK´BÓV0[ØÂ¨t§ÀöC tØPT Ò UN-µÀ‘kÀ` ¼à×ý¬ûÕBTë.k}MR…úµê†áìÄD$t pÜýx´-çnª‹Ö²¨»DÕ!j ßS2!%¼”¥qùÒ•ƒká\œQ+‚s½n´¢9U>á|BƒJàœpRË]Ž/ÿŠ[ý¬€ŸøRý„Ë'ØÑéÊÉ„b§ØÂ‰ró‡O^Š4fiÒqñµ©Ÿ™x³n¢˜2jñŽ!ÞQgxiLše0>ad¢l0>ñ%ù¢D4Ð]Ò^|8ÚE÷/é»>It †;ª½uÑ£—(/q±áÖxÝñ×n½Q§É¢¦ŸX1dBd1¤çä ™¼Ô±Êñjõ¬ŒO,£ .§SŸ(kjb|âKô˜D7†CÝÁDï ° JQµI—¨Ð MûOEãG¯àœ ­ãõú¤Ÿx-mõ'VÚÊøDIJ6•“ù_ôk1>±Òž+ î°\Ÿø2>íŽõFÚc´Û8Nƒž¡Ñ®á`/|ãgÇǯ\<’¿p8›øÉÌ ©‹õæŸXq_4ãÆ'–ãËeüì¼‹Ž€ñ‰/Õcž FÚBc]8hßE¯ÄÉꪊè‰wÇŽL¿Þ0‹`⺩×L_¬K¾¦™¢ï°xÇ¢/aí€eŒ€ñ‰E·jvÀåBÀøÄ— ŽõÊ1ëõH“ñhûP¤{•·–êUo™E3AN‡dvš%_ôb}ÞøÄrMã{=¯ù'–{u^ÆDá./ÍøÄ½~{Wœ;´ül|âKô˜4GIZ­¼ áhßš*/p:¯ÿÍúäņ‰ õ·ßj>¢3ÙL¹Òž Æ'ŒO,7Æ'VÚS£üiÁ=ßã_LmùÛÁˆž¥íóHÓ{c … ù1‘Md/ÎáœxãðôxÝ­×Hî°ú˜+ë»f|b¹­é].âËx7ã÷l½ìƒ~CÀøÄ—Ü‘‘H{tô\ ÒK–”b]ŪXó;ãG¦ÆnÆn]lÌæx³.{ñµ¹å–/º’Ä¥ÍÕbS;µð6/¤_†–â–bJZ–[ŠPi!&)ÓDå%W:z!vÔ5É,ŠÖC¹>™´•RZlÚi“¶éü‰²Tœkﬔ°”N§Ô½¦¥<ù•œÚõCké8¥X8­Âøˆö?£¦¤+E-)òùû'óÛÙ´x*¥™û¥¢8 «SéJiÍ÷ö\Ð%—ÃÎÆ'üfm<÷Œ€ñ‰/‚ŽVç"gí#ÑSáX‡Wãõw$ÂM\¨Ÿk¸ ¥àçxýäxýôëGf^?œä'þ Þq’LRIÙxoù°ÚÛ Áþpô\ ,µºGBˆ3£¬à-Ú1o¦{¸‡MÜÏ¡øéþØIú²":Þ@ø,ٶñ³Ô{¸ç‰º4,©‚²ÓÒè’Þj>ÝOÊ_Rìò 6ÅžÚ/ƒŽ‰…ÖgZ í'¤©‡³ÜJS(L¹‰bšuªFÒ.„>XÚȃÒ×µô¿²ÓÚ;T[‡K WÝR9¤V!ÍD”@PÇ“±ížJ˧¤ª£¶Sÿ‚ýeü®ÕÖLVŠ‚ÓSƒFáз¿ÚÑ☕]•¨_ÆB(Z)øŠñ‰¥ùn¯,Oi™ŒÖøÄç‹ö†ƒÃÁsÑÑó@7ÕµGÎDÇ[¯Ž½–!ÌÁ6^—VÍ¢ØY”tÙà‡Óä‘^8’†mD[ß_åm¤j…ú9vvÁT¢Γ3"e7¥øæÊÝhbBéq©>îzšð:î†Úc *€‡EB]ñð¹h¸7FÜê·oMIù6ž~â4ÇrË}×8TëRk)kêCK‰è u ÷g3ÒMTÛ].Ȥ9ÃïZ[9V!¤µ[÷¯¥ól4ô¢=Ç#³iÚeÉž…Â߃…¤óÒìT:rIN8M±Í¦ÒõÇ’w´¡9Õ£E*µ´µ¦¸´øú‚ýe0Ôê¦j¶ð8î-ï-í@ç6¨ ދ͸@´“ªPŸ^o9ìo|ÂøDÙ `|â‹n¥4éˆõ#b+½ŠØ™÷ “£G&ßjH¾^w[JkK]íôë‡r¯¦êö Ô!Ñ0“¨OŽÕ¥e«ŸãÆÛ‘£ï¯ñ¶Wy5•^¹¦žç6^{ò¯r¥n ~ìî’ô÷ <9ÞêŠÊêþXç¹Ø™¡Dßùh_´opô=P|öÅ))ŸÀ[Pthìc~“¨Ž©,ÅpÔÒhÔu—X¸q-öþÐV›•¾HßÑÙ,”¢ØÌ"•Ûª­Ï÷á ~‘lå4靈¹ü¤§¨:èÞYì+¡~a64qûg 8¸ëŒªásöWÇÍQ¹ÌÝ„Wø ¶lvVøœZ] êAa“ެ%k™±p`—¸ŸðÙCÁo‹ž•4ã_Ì'pÔwFâ½x_•·:Üú‹±º)ªa¾q$…ûáCTÔMÂÝ(n¼–¢º½uhæ­C²'ADÝmÆ…†,i¥ä.Öeä ‡gVî†F0uZt~ÃUS;zèÊ6ï×G‡â‘PO<ÖŠ´…ã§C‰Ót¼CU4È.†9tÎêœv˜dÖîtÆzlFzYÕ²i£QQT,ÐòÍw±Âü»îVDÈãPß›´-Å=9a "¹H‡h ˆDð§¢]WŠŸà88T¤ÿ¸6,e7¸ˆ‹ƒˆÂc&‹‚ ‹5>³?‡¢O˜ú$PuH#´B~W6 q4… dTlrÎ/¶Lö7>a|¢l0>ñezÌx[p´Û«öúÛñ£—ÆÑ­#9~xöÂ""˜ ’•Æ8Èï@-‘NÔã–H o@BQ/> œ.&Bñ+)Î}˜úܳ^KJºékSŸ²ÄwZå•ðÚ©FàC ´#…åpúõúìï‰Ñ‘1ØØp(g)0:?KdÇg_œ’ú'œ íââKp¦—@&GgNŒnmV:vÈåær,p½îÈDQç¨gqrЇñ+Ðô\Éì ÅþdQˆAÔš¹Â>„¢pi_®R1La Ò×[ƒv-ÇÙÀGœÀâs÷‡OpÞii#.¤ÄÑå.°G¤ŠÁUJ"›k³ù mÆ'|öPXIþ¿Ag|âKôCÑó¡ÈH•ç…;FãÍ—‡¦ a@)Ä-ÕJárD%öá~%wTÝ3?ÕŸŽsˆ¯åfÝ­ ”¬h˜¢2·l’eú‰cc%¾vŽ0a¯¿ …ætdšÐVïïŽÄGNGcÝÑXo€6(´>ñ]öG ù„.è÷ÏÊOBøùO¾’)<ŽÖ–åûˆq`Î1ÿ¬û§ èO.T?1¯É¸³û6â|Ây¦DЀšá`R²-äøš Âw͈r§‚èæÒ.„p°9O‰Ê6QqJú ûÏ ù’ýÓBÂÓ…ý7eÿGnöN)î€Î¥¡|e>ÛÅø„—ÿ¢­îÛ¢«{´pšì.é`´xä_ž>õû¡áïŒ?Ç6vQ~Žwì"Ûs㣺éŸîxýìØ˜÷ðÞ“¯>‘>1°¹±ùïû|@Ù…,Æ'¾ÉöÀèi!GÿîBÓôØ‘Ù×sêSä‹^¨¿þ:dƒ*¦”²4/¾–ü8‡x,â I| ߯XÓl y&A“¦lŒ¿Ög$d%¸"¾`rÉÒ¾¤.—¨ ^…ª4µÝûûÑáh8B³3BªÙŽŸ[¬I»xÇ)!Ÿ¸#1Rr:æÖý;5‰tÏÆÞºÆ0L¸ D6UÕ«½©ôË \¬»øˆKO—Àü“б“lŽTê…m•Þ쇽·§^HJtCvc3©l©ö&/õL§^ÚvÐÃØ»ø(N;9çYÙQ{ÀƒU̦_ØTéM}Ô;“~™ ÆçîYA¥ëe¦°cÓoM·Ê«ä¹Ì™Ô+ Mlá@¸:ÔA²PþTäÃü‹÷}6>±ÌŸøBýD¤…a°ãÂ—Þø› "jVçÃ3’âqSšLH%+Ù>­¢U"üñSÊTüMúMòAÓòcúM,î¡Ûx2#Y¡ƒÿéáÛ?=„oF6ê™ÀS„h‹÷÷#ÁD?Á¤Œ¶Ðó=&ù,>{t”OhU 4ŒØïGS…¿—?„x\RÃŽ}tK߃F2ŸG´ø0¶6•z~ÕjïÊÕž©™äE`!™–*]ÄAfÄŽlcŒ«ƒuÿNjH_¸UØ:Q €Ä^BàƒZâQÈíÍfä‘RŠûÑmÛ…`éqìA±QÈÜ¿Û#_EÙÛ·y«k¼+Wú&s/3¶Bv_!‡Gaçì÷ÏšÕÞ­ÙN¤^åŵ«ðd‹— Ì#/ §m¦°ëvúù5k½ËwM¦~˜•ÑÚTòû몽W¦g_œM½ôÐjoâú¹É™—¸ÀY­½É D’Ë»Ì.vÇtn+‘Ó”¤Ä—ó(¿N  ˆ=³¼#Õ;ÔÛ±ƒ*j¤á¡kµŒ_½ [f 9›LŽÌØGÖ¥¨pœ¹*'juˆ@¤4ù&Æ'|öPðÛCj%çAâíã§è¢rvDÝïѾáXßH¬wDkBP&!¢ÎEÂüáDG$ܶÎóbgB¡æ¿mœ­/Œ.Œž|£~Bó;pò`].Y£âóo˜tìä•jJ¤ÃQñÃ)˜‰±Cø6f/ÖÍ^84 «xýðÄb€Óè*x“ƒ»ý畞ªÌ˜‚¤ÔãððùpÞë™óÓ¸&·x¿‰ºTØ@TªPÌ{pýôô(!Ÿ˜×cbÿT•¹MWÿ²(ß±Wl<æ\Ä´zDnÏÞÝ;§³µÓ…ÝÓ"ç$á®ðˆäƒˆrs7«>Î>…,ú†Ç y$ ÛÒù-ä‰èŠ."¶3) 1±·Ò/V­ñ>¾Ò•Ìþp:ù½Õë¼k7ÏLç¾Gm txJV­ò®\>—ÊÀö¸jW|0zu}µÇ6“~)•{e-G¸Ü3›þ½dÞÖ•¥*æŽjÁ.Ùvî÷È.AR€+d¶À™(DA(§v?^‡o§ÈH>ø¨c*ólCƒAÂ!Ôy#„ I€HUŒ4µ1 Y{áCØû¤äÂ3 ¾,„B™ÍËñ³…-IZ‘óÂK”:<žÉ!ø`¨ˆ^w$E— A4JùØŒ6v.ÕÖùxæ3e–Üb|ÂOO„•d¼}ˆÛƒÄ':éJÊ¢øÞálN´$Îzˆœ ¶ñÎùðYŠ2Á6ª½šÈñ·ÃGnÆŽÿ™ƒ%\lœ½Póbà åâ]p5¬œgBy€&æßQ‘¦Ú׺ixÂÉAàC†ÆJô'½IÙø+Š ×­T9„”Ú¯oQ<—ÏœÆ'`l´®æÇ>+f·keÎävïØï!nH¢KÈb Y1ãNà×Ý;ó Bä³ÏW¬—ˆH…W½¶Æ›MþîtòÕÊ Þ×ÛXýã“È¥?ê°#½j½wéã.¢Nú ?·es?ØXíM_˜yy6õòÚµÞµk]jÑÉŨݳf³ @¡Ì¹ ˜2Ú­¼‰ÂŽ-2Î]Sß_·Ö»q³}2ó4ât%qu5\BìTa{í#ìÿyN °"B$\,äcçoõj¯ŠãÊŠw?ú|ã?zË«YëÝʾ‚Ò‚Ý6ïð*ÖyÕy·f~ ÞˆN”_#L3…¿dW¡)Ë«ònϾDV*¼a÷ão¬õV¯’m&ýB*ÿ"{®ò¼‡FŽˆÃÖôØ]뜺ýâ—.]®ð*¯}Ü“N¾Ì¡Xšo=èÝ.lÃücæ§’/¬Zë}tu.®„h*ó;` xð‹Ò™’êœ$ƒ<:[8°õa_wíõˆV¨{€ì›*ìÛñ¨‡ Þq€1ìÇW±F<Yµ¥EëÈðæÂ®îçÜÌËDI®]ïNÍþ–ª%ÄI0#¾É(ÁÕ±~½÷ñGgj*ùʆJoc•¨F´ÜøîÉôð‚puÉì+ÉÌ8ÎëçÑ^$s{ål4ӌӃŒgíjïúå®TòGÛ¶ ¹|£çFò©Â?õÖz¸@Ò³¯€°l9ÈUà–>/II<÷†«¢AÑO  hy —+k|Âô˜‹ûÄ)ó£=@|"*Î §M†OÌW¥,ò0Þí¦ºöhG Òƒ*.Ôž¸Ðúîõ·‡/¿Ù|{ìðí×ñ.Ц\ZKÛÕŸ8œ•ÀG1g2Iµ -Ì bL\î§h,S±úÙ(š‰¡£GnB.6òëtüµküŒÕMÅêSNªéBú³x R1Ùü¦´0ÿÄì[²«OBZihÂd±/F:»ßA¬;’ÉmxûɱäçdöùšÞ{WOMæÀ ½ÂÍ«©$š¬ûΉÂKÕ¼Ë×:‘Y<|˺;9ûšÇ«—®¯ª^ûñÇçf’?„h.¨’B™ê‚¼M¼õ|á+¸4Xµ_»Ö6-q \’s1™%Q•\òGëVyW?:9“ú~6û2G¾y¥7™ùÁîýø?öb¶ÑX\¿:4ƒ¥—j®Ð…䦺2V.sD ð†è1×nô8Ýtê·òH(¤ˆæ|rê…õ«¼ë×ú'3¯Lf_­ÂSr½wz ½ÂŽmµJ ˆ#Š2)…ÉÿÞž½N¼fƒ÷ñµóì)µDóÛgÓßvu¥s"ù2̬Û'¢ŠÂΛDsœÎ#ùCÜ$…ÂWvìaü8K„´M¥‰79öÀÏâvgÝÒæë.`2ÜÉTÌ?qoKaû”x€ø„8‚±¶šˆØÑIÄPô#ýÁÐù`d`(Ö3’舞‰®öj¢§Þmü_›h#~r[*PÕåG㨘o¸9Þp]Ó#§µâ‚TÌ,ú¨G¡hûëo5¿½Þ۸Ƈë¯6Úð>,„£áá;Dø#ùVca«÷‡¼­ˆßÙbíÑDË»® ˆ¿î&Aç±0ýÄbƒJèŸPër.´–ƒVŽÂÖÁ±¿a.¿ƒºîÕ’Q³jw+{`5y>@µì\þ+hg¢o¨’}ª¯]˜Î¼J$‚ÔÍéüK¬Ñ¯¾ÿnµW):÷Cr1ð4H ‰,âÔtäÂEÁâ^è¬ï¡{÷JîF> GÉæNϼ‚çãÃ;fr?t%*„tÙ¡Â*\ Õœ’nú¨VÝ~|:ù;X} ¨ÂÖ¯_973û;3©Á!®ßîŸL½:“ü½QrôÏæ_$ì‚«f ýA¨{ñ˜æ¸îÚ!¹'r ¼/[a÷íÔ ¸*«Võ¸t³k¦ð2^Z“¤²ð6”ª¯â«¸rK´¥ê˜ÙÃ1 e³MP«HÍP¶ö")èä ñr¥ÊKà¢0>±Øßê2÷ø®ˆO8êÀ&. çŸh ÆÏ°EGÛ)ª=ÂÏD×@°«Ú[;ûw‘ºË¯7¦Þ –å¡Ù·R¯×§ã3ùF¥-S.›CM¾«à¤…(ˆqˆ7"ëBsÊÊd¢éòj,½ {{Ûb-W5Ø!q ¢Rçêðôï©*o+¢Â[=|æ"µ.Š|B¥ŽœÅÕð6>±Ø_¥’ò W¾ÉÕ‘t½Á°µ­'îP»WâH,§ ;n§¿·yµ7ýa_fæwñÉ'ÓèE縭փ1o™N¿Lr ¥]ë»yiçÃKWÈÀ æ5ƒÓ3jõîý³y^?B¸a"ó ‚›×ÎY¸z±f³÷Ñõöééç iv{dÿ./á'n’]Ä¢ÏÙuT;÷È1¦³ÿ+~ãöÐíä÷]â«f–ºJÅlUwÈy5%~›Ù…6ƒvr÷A¼Ó³¿‹ÿàãkç&RÏ'3/ÊëÚ2i¼{r™m{vyð¾6•,tUâá˜É<ï´ ;vyÖxkVy¸+mT¬õ®ÞꟜþ×î\A#¦’/%¹üQg6ûŠæènÝ%QF±ØßjãˆÀƒÄ'D‰©Yè.Û4ö!–¤‘U¸#šè!Ø1íäùsþL0Üü®ô=284Ií)¬û衉72oÉ\<$¥²ç7RÌi)4G®ãŽÛ…°ŽÿøZïDú%ؙ͛Ê>ÏàÆµN´–h 8±„™ÂcHTå°{7ï#í$ÁAuZ3Jdlb˜¯Üè†O`Œ«×x—¯·Ïæ_!åÁg]J FÙÃÕXHZÀ¨âM4’—o¶!qx 9®yb(¢ÇtÒ]¤*3§%©ËÑx8›ƒÙ Geé¿“ã Ï˜.¼Â÷íúµ^¢6ð ‰wÜ$f.çÍÓMRañ©€‰´;Gz’Iþް„«=·Ó¯Âxº@âÉ­{ÈIÁ?A¬´DÉìÍξúP ï÷Î$ñyÈxнÂ3frÅ.e.ûÔÅz>]´£t¬ÂøÄb«—ÍšÚ…<@|Be¢ÄÄ'‚`G¤?é¥7f,ÒvP)!ï¡­U°c7DgÆïI8> Î>Ô‹·¾--?ôÅn ZÍÚøÄbaï‹OKG¸u¹‹»»¤PYcç´k†¸åU÷ǯŸ¿äÎÔ²^wV“ŒgžbË% ±/Ý—BH¦ÆÕÓ)õÛÃ04àŸ¸zã<¥4×t×n‰SàêØƒ\±vÜb7u&ÄŸß­Y”Ør‰à¥À–k5 ²6h#ŽÛ`/­¸ ÊDõm°óÜ—ã`ÚÑ0òq·ÿއŠ’IÿÇÀ«}ªKØG5O‚ ì UºE^Šy† ó` ‰¶<\È€O äàý‰Âö­säPV“'r£>‘&‹•ØÄîtò¥|²‡ÊZÚpdW²ðÈŒ´Ø Wä™Ôïmùàzǵìo!ÌD[šIÿ.zŽ[7†Qx¯ªn Z%…ØÐõ[Ã3âÕpu>„ êÈÉh¹jõý,Ž+bFêˆë½–0“Èf•á¹:§2C溜0s>a]Æ'û[m|bÙx ø„Æ8ŠåkC±¶pT"ªˆŸŠžŽõWz›ÂÍ‹¿¡nš"óA‡»5äNôP,{%Q| /Vy[qÚâ{ ðkþ‡G±‹˜TªÝåFï)B!ꟀO$bï¿Y?Ke Â+›$²]¢ÎÂJ$p2r*6ZÿÉ.4¢‡Ò‘†YØ õ-â­fÏ;:®ö¶„[> Føë‡¦$Cäpšnd¨@8f^“*:§z½çz$ï®’Í;× 5@šŒ\8D)ωñÆ[’ïzxæ-jo–k1 Wcû®?!“´vžs'®tÞ~ÚibÌ¥N›3Z¸úÙ¾(¹ÅÎIÎ;̾új²3®õO¥_!ÁA"7úÉnâùd1l@mðQW:ûj*#«|T‡³“Ï£s¤ÎÄÕì‹UüõÚPjú\ œZ{f’/¡ä¹uEì7oÂ41õÑ™ÙßEqyƒõ}òûdœ¦³)Dp+ó|ÕzÑHºì Ž@\&“9˜šùõ5’y‘ɽн¤ö6.jLQ5KͶ´4ƒ¾ã ÄÅ:üôáB€Mg¶Á„àÕ—®vg²¿?;-¼äÒÇ=·s¯^O½D åòÕ¾É UA%*”L¾Ÿ¼605óhˆ²òJ{>ûÃäÌóhEoR?cö%ü"…Ü£;·z›Ö Eí˜H½ Q®ö¶›ÔPøÄ库ùaæá ’«I.{G,‹L¨‡ƒJeäÈ %wŽˆIõZ$$äš¿»üUãõÆ'ŒO” ŸhsiîöIìCªZuDODÇ;†b]UÞZé#zø6¡‹‡RwK#>鮹>…þ¯Íü³}$¹ÉûTCøD•×ÛJ}çÂk7.¼vk»÷µ5Þ¶š#ç¬E'?]¨®¬<oþÅlœÔ§.ÖSåúÉ5Â]ª]Éf­o,}ÒÏŸFãù‘ìsèú<2ñŸê’»¼§Ö{Ûà'Úg\[ŒëËÁŽP¬ùÜ0\þj.„_7 ‚M0‘î$’È:—áò@ó ל“¨¼S#" pµ$5ˆµp5š’’$yÇ€+úôË.¼šJ +ÉÈà­}¹SÕ…âu¸UØ·v·¤>JÅ…ï½ÆÝºrµs2ÿâ­ô RCâònYy“¦áŸC  µ2„fÖt £øĪiZé^ç6˜,Ôn|\´DI?"ÿ$½¤çJozæ÷0Û\ Eí˜,¼J¼Cé¯v©g¦UW0;o|Ô•LýŽ6/¥Ö~z¯ïÀ;²}çiå ¶Õk<̼,ßsHãD¢ ÍÊ—¯1oÃ3ÒÔÜ”„äîíÛ=ɺuWJ¢é”x8™-»=Xs>øðþóñíþ[ùïÕ>N¼c³¦™ Ëtc7uµobæ{ê9p8ãA9Îl¼þÜ;rOoîÎæ‘‰ºB=±]¼–Ü©âÐ*!-'Î]ñI’­ªA!Â6í°þ˶¼.»¾\ò`ñ‰˜¤Œºšè¡Î øõ1#½í¶¼õ’(+߯ƒØO&ñ@з³ÂÛ(oWzݧ†c'.Ç_›øé‘©‹M—V{µ•«ª«+…L=à ^½J¤ï|`S åÁ#o4‡f‡®Öz¿^Cº òJG;V“û†#zöÿë²Z~Jòê_O‘¡7‡¦Å ŸPé'JŽœOhÿñ¼xø±èus­­ö8w·©ÕX+å´åOÅ‘w¾ á"'‰‰°ÜçµFFØŸ…¤!hîGˆHÀBõ*±|Õ$VS=ÒfÉ+~-YͨüH™H)DQ×c 5C­)> hÄ‹ ”šD øøT†‘{"]@µ)¨«P;ÇØ4ù3¿‘‡v"¥%˜T˜Ðr×(Fj\ã Vù|x*¿U?EÝÎf3W)£©€ˆ !…ê!Üb]:“9‘„–ü*ŽV‹‹û–AwyLk¥,®]£*‚I.³üOׯ•káÈ\”¼"¼"’ââRº±kú†+§!¹® ˆ B-Òæä¨ðÅÿËTþ1õ‚Ô¦rÒŸ]]DZðT’Kó™¯oaþ‰å2~vÞEGàAâÂ!>QbF{á’ëíŽ$ú‡‡»ñ„ÛÆ ˆ·ÿÈÌèk®úõB¶…Ä;\oRtD6xߨðv ¨ðÛ£-7c×D¡‰«Aú(=n~ÿ­£…‹M™hËeñXxUüeW>ú>E¾iQ6~ìJµW+,ƒoc¬éãÑ–¼Pw†z*לë~#Ø|åBCÖ)68lMµËbÝ:Úr)vèv¤ñV¼‘J“?%¢ñ“›TŸÐ8;*Õ?È´ÁÑDVíÖQ_„èA¬·-îtYâK‰hmJoYîc6 ê¨x$™Å~?BC çëÖUûçoó«U-6%îzçÌ*9ÜòøÏÑ:ìœÉm‚Rò/“f.Tè I•œNâ/àÈSjKöH6ÅŸÈŸÄöC>ø«Ô¨ÖZÔû³i±ý<,œ.¦ùUš§ë÷µá¼Î_o “àL‚(e¡gߛ̰Ç¢SÓB.V¯ú‘þ:*B`ÿLNÀûR<Ÿ•a³‚çD >+„‰ã‹7E¥£{ÓÒ†Œ:%y:rú¹KÝqí`2)EÇásRo[Ýg³ ‰‘8|8Ü "ù¢.ØÁÝábE‰’“ØÄ—Ü—…üiÏt^’×BV…¨®G‘²Ì%ø„ аô“&«æŸ0ŸD9 ðñ ×hoÄgü1úˆžÅNü"Ñ4?rcùFã ™œ #Z.âîõ8'„Lh× ÞUÂÐcVŸM$š/E?>¡Yr¸Ôǰ5Þð ©uä–8D‘|«.M-’DÈYí=T'ªðú;bá£Æ&F›nmòþþ:o;5ùËHG(Úô¾4;­›bÿuÞÉ8ñ*ûÚ"±coStôHjôP†¾eoÕÍ^ä,ÔE'!*œºúâ®a‡hQl>!†êRYRè‚6”’Õ¶ÚH w̘ôP›ý¨f7×únÅ?¿ iPõå…[âòP'ÖŽ>aE T³¾¦‚IV‰†u?°.wU¤¤NcÀÄ¢£œ J¿¯ÀH”.ˆ€C¥W1ÿÙÂWØÏš.ì›ËÙwA€ £šÉ°Ø;¡Î›çÑ"ÏÐT MÝÄuÁnB_\ ×N½,êGI×®Ü>å’0"M¡ †VG½»´°7ÖWêná9˜sTHWtíéÅÇwg2øxPu x¤=Øv˜åÔSy¼58ŠyKQ œðõÜ|E|y7R2œá/B}-’…ëj“ævÜÛ¯Åö+i¨ ’Qæfåvp™»Ñ¸m:=Äcdþ‰E_Ûý€ÀÄ'D3!ÑO¨rBüúæPì‘…èѯ¥E9qxÅ"Ű—”OHU ­¨MªH­÷_¯÷¨(q á ï#ÉD !ñ,~Ueuõ*ʩӫªªèm½Løcô5 @ÔºÓûæjo3|Dê!Ií,v&C•ËZ% üh-½Ê‘Î h3UP™Ýâ}k·“²]«¼êá³£±–ëãG¤ç¸)M]TAS¯!Ë(hB,™&Ÿt8›kÈ>G/À~`ºPVS§í¼]DÜU_éE¢ »¶ÖÊ]•Û6'¦uò—Ïl" ¹G2ŠBÖ‰Z\þ°B[¯z^Þ•Û+jî«þ&òªªÏü¨ôª”]•=ÊQpLñŠŸò¢83*9ƒ´©”ãÈçÜôtÌÔK¶Š¼)ÿç 2J£TdžÃKqúG‰˜¡åÑ1ëk™t"Ý‘³hX®¦FJo©ë )ñZºqðçO.ÐNŽOÍ·šª ^ȇçP¨®ôPjàgÛˆ?­Zvc'=ƒŒœé‹àR/**«ªôR8¾;¡ª+Ø»†ÈŸ\±\Š™±Ê‰ôçbm¯Ttõôë×V{S³/+)Í„ô…§ºø±`~\ŠsÆâ~0„6†EAàâRj"JYÌ;ªn'(”ÙÆg¨;m¼ôú¡ÜøOR?mÈ»e~âo¸»¨ÇBüè1c¾uˆV ¹MÞ7UG)OÂ¾ÎØhë•×_£CØäVïï㥨”†I<äåy+ü@ž¿buÁñÆ_Ч4Ö4»F<õ)æ¤áž$‚ðÜŸ³kVᇈ7¿ƒï¢œÛ¼g«$ÂÂ3Ù95¾+íEê'Æ^»>zè(ÔÛ€4BBÉb±b·3íd¦¥Äçëk=ˆñi0!ž ŠëJWÄ.(>·z>ðx­÷óŽ5—[¶LÙšª«nØ9Ñø9Ûí†l“M»Ø¦šwó“_§wÎ6Ô&ëù”lS [SMÛfë7¥ê·¤wNÙ1Ó¼s¢iÛíæÍ“-[n5l™nÝq»yË­¦Í-[§·%6§·N7ohÚ2ÕºùVãÆÉÖ½·9rýúÙÆ³M;'OÓöÛ›'Žmæ |dºn ûË;M[n7nhf µÉ†-î8|²yë­†M“­Û&šÏ®Tó›uµ2ZvhÝÁŸÏLsí­#›f›ÇÜÑ hìœjÙ6Õ¸ ĸ(À™hÞ‹èU@Æ'Å’ÙAü€ÀÆ'¤þ„VÚv™½NžÉÏoÍXÓ¥·%¥ÃgÝmœüÄ–Ô?QŒ N¨ŸÜäý†ÔÇDº¯zÌXÓGduŽÊ\xmæ?6N6þ%„¬¶*XêúR®UÞæ±ÖËoÎ@ƒ`$ð YÂ3ÚBcMJ6©v,ûi}FjWšºøÚäÿ›PΡë㼿¿ÊÛHæf -;ú4;=œ½øZ–þg¸g^oJRÄóbÃ-.Ò¡e@]÷T©µ¥½Êì|Q‹ÏW/˜WìKýf Õï|«wéÔj±mº‰akÚ6ш Û5…™›·oªþÀ­ÆíšdŸ™¦íXÁ 1“·ë7¦Z…ILÖo™m+Å và'ûÌÔoeã…î° C;ydÍLó&9TóŽ›õ±¬7ë÷L5ïÃ~§š·NÚ4[·}¶q³ìY¿ Šp£qýÔÑm˜ÿ‰úÚ©Ö=7êk“Mû§ìâøÉ–íXâI¸EÝÆtóö™iÙv³é¡Û-…»4m—ñ+w¹Ñ´ñã¦5­›à¹úÝBŽlž9ºóFÃfþ$\áðÎTýÞ™†Mœz¶nG¦a·Œ¡aÃTlà ᘨßr­uõÖMB¤ê÷¸SÜ®ßÀŒ!Õ²{ªn÷ôá=ÉúéÆÚɆ‡¦[6Lð“CÕóñ·›vÞlÜ}«nÏtãÞÛ‡·$Ž|µiý­c›Ù&× µªÛºÕ\ ™¨Û1Ó¸ûvÝæ™–­-{tÛ쑳u[o5±Ã¶õëfZ6síÓ\òC3 ëÓGkçÍhÜ69;c“»ÉhwMÖÉíƒ<¬»Ý¿éy…ÙÿR½V®T‰KÿùTr‡ñ ?XAÃb!ðàð HÃp¼—MªZøÐªV>ÈŠ`a:~)^Ÿùá‘)ZQf{á|b®¨–ŸÂ'f2Tã9ÀZ‰û¸6ÖúQü'·~Úxëõúë‘#W#Çߣ‘©xqñ¼jþ±ŒPË»RGKª>LÿG~¾v›zšÄ)è¶Iü›! ø6zÛÇêߥ,¥2xß#ã” º*ô1ä™R=âð5é*"]ÑÓ\WôÈäX£4'‹™Øä=IÅ ¼Úê¾yü}ÒLæÊ„ß3FôÆ'Â'0B²âÇl×o»ÝòÐDóCx2uâÀZ_oÙ4ubëíCkÒMÛR»§va&Yp³ ¿}b7,û*€£;Å6`ηÜlÜr½uÛu8G‹ø°Ä6œ|jöØXKyØÆ­–-×n¾yjëÍ£[nb}[vb¶Y@C8pL7ošiÝx½aÍDóÆ[uMµÔ^mÙsµeÉ´ˆS‚;õýlݾÙÃû§^Û‘ªß=s¤q»©v¢e;Þ¬5•1pv6ØÌ챌»ÉŸZko·n8ºõzýìñ­ÆSÇvO´î¼^’! £M7îž©ÛçãÆ¡ S­[1ÿŒj²ê°fŽÖN6nžÑ¼eêØN>xSøëTóC˜üTóÆéú  ëºÑR{£aGºå‘™Ã» p#N[eú辉æÝ7ÆÏÑ6³?ŽØÞµº‡<Ρ٣û&!.Mû!C3Çwq x²i÷õuÛ4@¹dä8l¦ë6ñqN ¿a`Æ'Ë2ÙqV"Ÿàî «+"écS!…«gÕ9DyÃ'ãã-à¢n¢è1ïPy6+×¾®õ(/âÍÒ¿£«Ö(óHûEÒ4t‡t¼ñêjo‡Ä&*‰,˨ tŽŽ5¿;Þ„~‚.ñ©^ 9vy´‘Ƥ3ãM®÷6I𸒰ôæøñ_\h¼·€ÉZo›„†=âЛé:&qŠúì6ÑUÈÙ‰‘D;c‰ºŸ¿E†j}ŽŽ!ì¯!úг‰hË%| íb|bAþ 1´‰h|(Õðktµ‹›oµlžjÝÅZ/ÅÏ›žÞîQÌ{»ñëõÛnÔmHØ¥«yq?< câÉ-«¤€û»­Oó&Å‚bØ0Ø×·[žÙ^)Gx¿þ7ˆŒÀ°‚ØNÈÁº-ÏzÞ^É?&ÊUM°ëõß‚µ@fŽÑy¿õÛ»U­QÔmTxÃÇÿgÄ`&1äG×|SX«ª*«!É?o}F"#êÏ`$I jË–Ÿ5=ÅðÃ-Os½×ë¶Oß{kݸîZëúoxR}^õ ÕLüËÍ_M×­uh$[Å]q³iëß5?Íð(ÿ¢ñ™› µPäÉ7Z·\ǧrtëSž|cO0õNë³Øø-Û®5o¼}t·ÇMOmÞnyO|eG~ˆ#[¦=ôœω:€ëÝcßä*&›wL·ìáb%zR¿åm½Š«¼Ÿ5~ãFývø™`ˆk¤e{‚$#¤¶ W²‰ûÕò¢-`h|b%ZAób!ð ñ‰¶`â›VÝ.J(„OÄÏ ÇOFǺQ:bcM¿¸xèö›ùQ” ÚŒã.7Wè ©£kS.â©)y› ÿùÔRÅIfô È_å:ÑŸº@µÇ‹mc­RÆ*Ö0oN‡ëÒë½oH¨"¾c|¢À? ‡†XWÊŸÅz¹W¯õRÚ¥rÌUÑv~ì»wˆ\kkhËn|õ,mÙ&Öܬ[I¾Ôú›QLÝÏš¿3Ùº¶™õ1ÎŒÔ?-”*rD%*‹9úçWZ¿Ãì6ݸ;÷vó7ø8yïè7‰5 G€—dŽí~·ñ)Þ”8™Î¦J×bkuuÿ©?{ïè33õ›gš7ÀØGö¨¤†I-L9Ô»õß Î×y÷Ø3ü*3Ê©DÅ›VÉ:ö/9g‘Õ=ˆ­KÌö~ã7’uB2Øp|Ðü-l°H†9xUj!¥8×ÀÑû‹¦§=¹^·>Û¸ãjÓ³‡÷¿™iÚ“iÜ;óÚÎìá—Ž<#šŸJѯªXãô˜\Ià迺|웳ølŽlM6ìNÕí¯á9°…#ý&±ô᳇·eŽoÿEóWyŸªZÈWùú‰ŠS9øPËŸ¾ÛðL²y 'Ͷì‚]í¨”«x»ùëhJ ;D='½_ÿ584_oƒª/U3;püz§åÆ'Ë2ÙqV"Ÿ ´á<Ò¬s.wTäÁÑîÁpÇP´Z±¦Ÿã;4õzcæ.™ÄünÅUê¥LK¶IªäWì½v-êÉW­–¢Wù¼ÈÎk¼óñhý‡?­+±‰úަT¯Ò¾£òÐZ§‚Ì <Š5wcu媑Ž1x@Œn¥‡2ã‡S£Í³¤.–ˆòÀ_ŠhkêÀù³‘ØéËáC·Þl˜|“K;4»ÝûÆZU€VW­î¸jzïbã‚ã;æŸXŸØ&Ñ&üÿÛXµ«g ÅNœç8'¦[w¥¶GÍ0Û¥“_Ÿj\K{b°Kx»ñi,7,áýuäØŸþ¼å‰ÉV•I6£èÜë8¬ìõzêLëÖLóv‚#o·=,ÜóÇöÝ®ÛÊžp”ð‰?a!΢œØþ ðð©û‹–¯ÿ¢ñk»<ï@…÷nËs¸ú‘s¾wL˜ Ήw¿Ž¢—Æ·õDÁãñNó׉k\CÒº;ݼ ÝŸÝSéý¬õ“G‰zˆcúè¶·›žàŒü žAœ… È·ôŒC§þøïô*ˆL]*#qlà½Sß¾‰"¤yÃõ†uÄ5ÀÁy>Þkxzúˆ¨5¿®{ÿó_4?Bu$[ñRàÃàã‡ZŸ&ˆ3} È®› ;~Þò››©Ü†gåèSÉ“»®7lwþ’È™ÿç»GŸ»q„[CXdч$~¿é¹ºæ‡ðàìy¯ù98 ï¿Ûð4K¼ƒ»ȶþ%{ŸX‰VÐÆ¼X<8|B“;´˜ÛfmfâÄHâÔP¤s$Úzý<µ ¨E³.œ øÿÄ'XÜÃP9xIÊÚF0N¾![Š×$MÐ8”j.*¡yq’±Æ‡OÇâMH¬ä=2fÞzmú¿šúO‡²?}-}ñµXE ò¹¬6>;Ø´~˜hLÅO¼Õ¤ÙÇØßLQ="Þz`‡,]¡5ÔffÝ´yìØå ÔÖü› íUó˜ÅŸÁ1×zÛ«%Í®úüÉÈëoÿôµ¦ŸXJÿF‰ño!Bý®Yœ dˆúƒõ’•7 ß*‰üŸß¸Ý²cºu;6’?6OØÃÑ?ÿ é™LÓ.TÞá#øêYÓ'nÇ6óA­]-v”ÐÉí±—7ÑQnÅîbDNýÅßûõ[MkPl\nþή ÙóÖçÞoúöükYß7mBËfgS‡[ÿüòñg9>;œü·ï– ”jB|D,kó3*3u›¿«¶Y’7kV‰w¡éÛɆ]hKQ}¢ •£Uyƒ'ÿˆulzÓEÞšJÒðF`'ÿøçõO✠¯ò¦b\ãgõßJ}ôæáÍΟ>~ [ŠAýðÄ·9y¡’tÚ(lƒ7ŽýÑ;G¿‰qöø6<ÿÎçñÁ±gXXó*ð³£O# ½Ý´a’ôÆðá1Çÿ—[Ÿa r„ãÿòý–'Dîиó£“ÿˆ€¸Œl9Úž£gŽâDãr8¬H6"&u!Fwèä_ø€NV ¦Ày…Óý°+Àq~—'NáÖÿâØÓ“-ÈqE#Â… {€¾ÿ›Ÿ5| 2É·›ÅsÛo×=“9º¸RFuâd+¼Š1€ƒ`.zÏàÀ¸ŠóÇþüçGŸ›hÙ—:º 7ƒ»ö·ófã&'h#牶6´Êìü‹£ßB† Q€MÝ 3ãÍ¡£þnóÓÜ>ÂUWOü&ûã|D¼b|b?ê¢#ðñ ‰†K?0”˜ð‰pD6 ‘w†ÆºF"gƒ‘6õ^´³jÇ‘ 6ïZ<ázŠºM{oJ…ñRH'­™Ÿ¾ùÓº[ !©7̾uHúƒPé–@eëÄO&ުϼU—üéaúuQï!u¡þ&‰š£ÈBÌ^¬Ëü´©€˜c¬.?$Ê *C …hö&y­³Ròòð Vá˜Ç$þÁÄŒø'8ø‘ÜКC’J7v v1ÎxíØáëoÖÄz½–ß± ýi’/*1’ %á7@ýN6BÄ>ÈÆ|çØ“Q6,Eà NÀ[àläÐɉˆÁUMx§åi¢U¼ùAË×eÝŒÍ>,Éïû–;1—"qáâ]8ñ'ï4} ædÝŽ÷[¿3®Ÿ7|³¶R 9ÉŸ¤nÄQŽ;‰ðfèøŸ¢‹%f…7tâOÞÅ» åþ¶þÛkÄô;àÔ™¦É#ÛaŒÍÅ\XÙOQjB*FlÙ°î'Ö0pâ? 6Q‡ÓbÇß6?ÅvV{Wÿ”È!ÉÚhÚˆQ'Há"#—ŸÁ—C<E$. a H4$£u+qöd{¯õi28’-ÛnÙ„Œãƒ£¿é"G¿®™’.N¤HþÑ/š¿)é0u[.µ#ÁiˆôNƒlsêðvð„±ÁØùÝãO10’Hq 9b ‚äñWFvnÜö³º'vJ`xÕÓÆ'ÝDÙWŸN¸æ¢t*oW>!U(ðO †»x‹ô…£}}‘N¯j]ôèÛoÔÝY?ûW/ܵ¹—´øÂ'mœ&Sc/LâðMI)°ál¸xx‚,Ð7)UuÍÄ… Èûä©Jç-^pv^'`©Øk·7ˆX¡aµ̠‰9®Ž‹ i’>Èÿ=’¹POYÏ)ña!Xó%"`63° Ύ”ZUÔ >r±¶qíõ#W‰¿0ªñ†Y@r©°…ñ'ã âÔŸ  TÑ9!â>ÜEw©’wjÞÊ’×é°LìyóÈCÉ£d7lrv?ÿûÇž:R_ -pö’xÇÍú͈‘P ôľ:[þv‹ø'(ó@:Éí&ɪpZ‡›¿) « »Þi|Öñ‰›Ÿþ ¹˜‘ñ~óÓ¨`›Y©³š—óžü‹KGŸ‘àÕ?wìÿ3#Y·‹$Üü£ûö±ß .…¤Æ=Ôu@6álü/šP2n½Žà”ŒÖÆZ û÷·þKÔÈ¢&Ä{­_w¾øãj݈X/Âßvc{¿ñ7“u{¦~²1Û¼¢àü4ÃÇþÚt7›Ö½Ýò5çey¿å9x@¦agêU¿v½Ûô‡ó¦H…ªciäH®èÄ_¾ÛúMnçz¯I®BÆÐú4?HRÅíAÁ«÷~×½ Dê…4K~ÇdÓw/ú[þü–g”ìpw L¹‚,Ÿ u)x ø„¶ýD?1çHDߌv"=áø¹`¤eÃ@g8Ðü–›*–?ý›”¬l(Ää%ƒ£a’ºÐ pH•'WOs^Ÿ¸@ÇÆ¯&+þ< é1¦Ç\ Ÿ² R³u³[NüùÏž@NAN&I¼#1…Ö'nYŸl%ra~Ì'šÕ<þæ4Ŭ´F$Ì[¾¡‚Ž´òócÏ¢« ’Õ»ÇEÉÞ>ò5t {Tø‹€üL–Ýâ8º ÿ> bœ×)<ÂÇÿ –˜ôTr8¡2E›ÝôŒ»†$•Þiþš{ÿƒægñ¾¤x¿þ!´#N—>ýo\6,´Þnz–«`Ào}Ï„T–¤öeÓÖŸýÆ-2þ·ÇŸ’Ú””¨§œ—¨LT¿)8pi¸RÞiú’­U¢]€~¥ŽRñ‚2’7+5ºÅGòƦմ¨c¡Q„ü.®âfÃ@Šœæø·`?8T$A·~ó-ßtÌì£ÖgµÂØf*^s‹ÜB'ÿõ‡-_O6m¢nHB&DûÙlþ‰rhjµ†ö9¦ñ fÆ»Š[¬g(H‘«>´X]Écÿy¬î +{ñžUÄ<’¸¡©•T¬’"üÄm0® ߆‰Fe|bIù2‹Í‘L6î(fRœü·ïýÆlë–‡× zpÖîRów2-»I  ˜BÐägÇžBÁ€#áí£Å¬ ÖÐDLœ>cäø_ü¬å[ð 4 ÿ¹ù©uUÞ†j²0¾ÎÂ;-«ù£ß”¸À‘]pjja}‰PôŸæSßd âç?ö¯Hý ;º÷燿qá°—šðàZØ&>€æo7I^(bé/e³)…IèÑbÔf€\ ê=HÒì6–þ;5Îòþ¡¯å(àö¨ßC1‰ŸóÓ´>%U8)´Õ¼áƱM_•f¸Þà©ÿ×»G¿MJçÕÛÞ9þ›\,¼áíãߘ>¶«/å­šz§õ«›U#ùóÖïL5왩ۙªÛ™i”œ®bðÄ¿åŠ8Pü­zzvWy¿8òëPŸL#ÃØqêCeI©Ê+ýüä3r‰¹ˆ2QD¦pê~þ¢õ7Šú ô­µ¡‚gÕ¨15tôOÞiþ6Õ2( úvË“˜|¶_œ|B †nt–ûVÑU¿i~ ÍLónäÔ½F)‰å4ÿ«w›¾z»amúØ6œ¼#Ž–¯I P³qÛûÍÂ$¿^ŨšÖã qqŽ<ûg?oø*å8g›÷¾ÛRTZ|(¢W·Þ<¶sâøN¤*î*Þ;þ ¹$hc¥‚gë.ŽŸœþ‹¿;ñ$å¹®5®yïÄÓâ#1ýÄoM'Ä—\¦ñ À‰Œv¢mð }ÑÁFìc]Õúè‰wƒ?¹1Ú”|½9‹<óŸ$Q;Ò}TZWˆºBzv»R˜®ç‚òAJoþýŒÆ'––OܨH,YËɛИý‡­ßL³â¯ÛˆS·vü7)_M.ÍÙ†¸ÁÙÑw[žv\ôâ¢hck-‘ 9±ÿ…” Ä·Žl{¯EjFaß©ÿÖ|­¿m~'ÇíÚkí¸~¸û™ œþsTNý€vJê3Øìì¨V‡ü6>1äTÛl@Ûñ-öTßÀ37¨~l'9±Xz­9õg ž 9œý–SZ V¸EqqNÝŒpr7Á§#ÀTn¦¤÷~(ˆh8<¯÷Ø¿|ûø3\òÍÆ”ߨªU§Þ;&G€yhû´Dp8¬x>šÛ.šŠQ~ûÖÑÝàÀ΃­Œ‡(š â.ZÁ i#ÒZ+¥6oÂw[âtHUpÕPoƒ¢ãè08W1xüOávâeiÙøþñbmš¦Ç4›ú #ð€ñ‰Ï×O8]%2‡B§]à#é顆^´ý±æ÷)åjiKó:©-!ìAüò¦+Û°Ðâ’‹nÝK@ãKË'¤“'•¶ë·¾[/zIR0ÞnúªtU¯;VüOÜ h DŒÙ¸â⟠‘£_e¹/}Jö`ËF)`ûEë?  Y¶uO1†ræßü¬õÉÛ­ÒœÌy 'þâÝ–g?lù® ñ^´>Ãh›ùQã7ö«'€P •7o4lp•FNü¡Æ JEmºWDGªQµ’Ýúµ«o’åñn㻪Ŝ_:ú´°¢¦-0 +†OþéÏ›Ÿr)0èlÀiХ♠çªt,kØüNӃЪÈ5 P._cøèŸ\nzšú✠øbIâ ¢è|vÎÔí€dˆâU5¤ÊžF'‘k-Fa§þòÝ޹EŽÐƇNj >‚kÅ«V5ECú¤C8à͆õ\°„þkÎe|âA¶¦ví.Ÿø¤ä6A‰wà¢`‹Œö ‡ÛB±Øé5^u¨þ ¯¥içAŸ0Úti+i½ý.6Þ=&ú ÓcÎËG’[¼ßˆŒD¥\u¼]ü=R=LË’úkkG(“/dòRÇ*Ç«¥¬gµÀüÕQnFú€ðP²C]‘2iñB™ÔÕ•4°¯D™ˆ:R”‰õ›©YIh"6£KÊFŠ7é"µ´wâÀæ­ñhP«µºÙ8 ªããÿ’”i˜y\VÞZ©É­¥Öhù‚=þÏMߦò7"ÐwJ.«Öܪ‘zÓl•«©Ð@ü‚p‰kMB=L2i¢Î7ð³ÆoQPRúªK»ðZÊNðf±Bu§ç8ÔÞÖ¡¬ƒ'²‰x—0 õOŒ„;¡ÁD/e&'þv´å¶T8ú iÔœ–Jâùæ¢hš¾ƒ¶qRôR5A;¡o%^ ½‚Âò˜|8kt-…ì`" –ÝÕô sU6+*v’RÜÒE6¡ZÇÂÕñd êoë¾:«åª„OH ¡Ÿ÷“BÃf©fAl¢~3ñ®Åå[ºÂóŒáÃæo¡c`œ®J„„j]-Ï8ý„ú ¶HëöÆ­T°@V9]¿ÏÕÒàãü“˜ˆdŠÖJyMÉ.†ÔÀhþ¶Ó‘ЩK‹šK~‡xJ´º—ÓTVz«èc"gi¥˜¨>špÑŠ[q̸LT*yà¡‘ž®ÔÀÁή˜R‡Ã“ô³~å>[.”¿ýöàÆ'\;øY£ hÁ²FGÂÝÁHý>xp µF›ÞÿicêÂO&ÞtÙ¡u.À!ªL'Ì\hñ†¥0ð%>¦ñ‰…ñ WDÒ¶2FÀâ~³p6žR"ð€ñ‰…ÖáðiØ+¡áαіPb’î!u²µƒ¨ôéÀ‡ÔØV!Å\ÈCÆäëu·©.õÓײo½–¥ŠÔXÓ4•¬ðpH]©Ã7ÿ?<¥fåôJÞf¥Âæ‘Ù±º[cõ7(>vd:^7«Ÿ¹¶Áû¯.ŒŒÆƒ]Ô £êh`ôìpììçÿ(ålÿ¥s•6ÞQÆvÔ.Í!`|bY¿Ï {¾ÛPã_©„Bú¤¼Õh'NÍØ‰ŸQa‚:Ù”›o¸N{zHjuNÐÇK„™ê¥ªÛNNAå«hË¥ÕÞnº“ö­qŽbÝhx4×ú™Pî ÝÄåì.HcòÕº­®ôè‚RIQó`ш;î $úGb~“PŸ0É¢"`|bÑM”p!`|â‹oVûpäd(qv(zÅȉâ Iº`¼qȉ1]v(5­É•™Ò&£nR7‘%Òñ‹bؑ֫½ÁÐy$Ÿ#‘3¡ ]ÑîÐØÀ¥¾ãtÅâ Ý탉ÎÁD÷`¼w8ÞɦRÚF¢§b:ñã '> :ÅkIÿ}/ŒO,ª55/…ñ ÿ}ÉÍiQ:ŒO|‰Bµ=ÃÑžhü<ëïà™ØÅ¦o½–S‡„8'P$oÓGÔÕÞvïh®í3XÕˆ7_ZëmŽ…c¡Þh¨+與ûø£¶·öO_¹[8zF;¡t‡#´l퇄è»ÛƒñS#ÑôIáu8Þе OF]ï0ñD™#`|ÂøÄƒŒ€ñ‰/áÃÑ®@¼O3HÏDG;Wy•±¦Ÿ¿Õ€7Bä¸"„OÔ‹b®¶•è*ÄE1W{>A¼c•·1¢ñ #ÁÄ9~¢,ÜÛ~ÂWVèŒÐDílHû²"\åŠP³Q°¿Ëh­×£8-ºcg†âg#¯÷Fp]”Ž(ßÝ—ÚüæŸXTŒOÜÝÏoÏâ `|âKæÿPô,3)rŽu „O¯ª^>ùnÝ¥8„4Ô_k Gè4®^?TÐ:WÊ6¤Ï§t÷€^D[.W{›CÑa˜ÛÁh÷H¢/ï‘\’xG^±[ÂÙâr9#‰®‘DÏy1ñsÊÃz†"Ý¡Ñ~-dNþmw8ÞïRiü´ŸXTkjñã~úzûêYó@ ÆøÄ—ÍÿQZ…uÂíá˜úêÃ=D="Æš.iOQø„x)\}L-‘)òLMFNáZ&š?\í=‰ ŸhÅñÿŸ%L‹„¥‚rÅ•»i°³ØI¶`”t˜³laÊ‚Å:Bážá‘ŽX¼'ë…zÙŒO”¹·ßø„ñ ã2Æ'¾äîÇÚ ‘hW$*E)‘^ò0Ο‰'š.£ÇTyDúC¹7e%öQ[.Y”tÍøà×xˇ5Þö‘``(28?/«öXõ²"q4äR®èM4EýŠ9 ,šà{¢£ç¢Ä;NµAvê³ïÚ}ù'v§ ;Ò…Ùöæ uãÅîTaOª°{¢°më^o=™=’ôÈæ¡#i<ö¯LТ¢z‡+«*V‘¼µnw;ûƒ©ÂÞÙ‚Ô)aËvç ›uÛÉTaÚèÌ‘éžta÷¦^büOæ«Éªfû—¶Ú”¨‹õŠtL®ðþòô©ß g|ü9¶±‹òs|ü»cÙžÕMÿtÇëgÇÆ¼‡÷ž|=0§"eK*úìk|øØU,:Æ'¾$¿wʉá8±ÿ²F¡(4W{k"M'Y£G&.ÖÍÂ*´ ƒv0×ÚVw•âMÕOlF?#ÁÉQ,™¥%¨m[nî‹OìMØÄN¤ 3²=œ+ìgSð 1•ß>]Ø3]Ø7]88]8ÀÎÛÊÙÂ#éÂ|áá|aO¡°+_ØžÍ׿ ûóyæÆ£¹ÂÃ:O¦ ²éd0>aÏÁòAÀøÄ—è1‡‚±±VÕ¡±Nj[AÐTVyëCÇß‹ÕMA&.¼6s±!I¡ª7Rc‡¦ŒO,7?Xèó¾øÄN矘[zâ¥Ø¡kÍýùÂts²·PØ—•7Ň‘.ìÂu᣶•#ûSé]!» …ùÂÖL~ 3¡PxDY&ˆy6‰+b;î ã+푱ÐG̃µ¿ñ‰/ñODÆÚ‚ÇH^ H~G8Öá,®¨J>küàM¼õ·GÜŽ¿¥È9ñ„ù'VÎ#â¾ø„5 .äÁÆky3-4â4"+‹ÔdzÙGsY,¸»ÓòWÛÊõT=:YØ3[Ø5U¨)œ-<œ”_wª‹KÞ‘±Ý;ˆŽY¼cå<),ZpÏ÷ÅøÄ—C‰w#ÆDTÈ öŒ¶“9éªñÖµ~tá|búbã¬óU˜âžçá2}ð¾ø&'¶‹qWŸÄ¿]ÈKå°er¸+.›IîšãŽvØVVà|Êäw k”Ÿ¸¦¸Ýµ°L”4Âtsú È?™3ð ‹w˜.+ŒO|‰‚r–‘xg Ô72Ò7ì¥PY‘‰ÓçÇš‘×Zÿó…F-`uXZ™_a`­É&æAmqñ‡UKq`*» Ó¢KRü»²…ÝYùµ¨Ës!ÛÊ &á­Bn_!0—Ù—ÍíÍæv«Šbß±O}Ç9´L?±âž6à/DÀøÄ—è'PK„ãlg£ñ6Â"¨;3’81rÒ½k½ª‘cñDÃûo6fG’~£¾Pl7ª¹£s¤¦Çôó·ï¾ø> '¯sÁÑcºð‡†9Ä›ÊËFìƒEꜴw…meˆ÷wFô4»“…m)™È&~m&Kä둹y"ÞÇ!ts¿ŸðóÂÆ¶0ŒO|‰§]Ê4…;¡áj4Q×r(BÂTß0Å$‚Ï«v¾©OÊo7Ì&OX¼c™Â ›ów òþøÄœ‚GQ<‘õ¥0SÙZ(E–«°ŒÊ^k4ĶrEr€fB’}45to2¿CÃE*é"\*àå§Ë 2>qÏ_]û 0>ñeñŽÄ'À¤bE£CãíT{DHA‘iŠZÒÖ«Ê«;ö‹7ŽÜ¦íø…ú”ñ‰ŠOÌ/4‹…æÖö«!°¬þÄJ{jøÑûCã_t#HN´±i½&©ã¢í¶©ÈÔ>mŽvSêªÚ[9þN¼~êBý¬P «?±ÂŠjÜ—ÂøÄ¬¦‘­/BÀø„Ol¡ ãþ0>ñ%ú W NÛpk‘:Zhº*±>©E=EUiêàÅÛ/ÄëߣO˜ñ‰ûŸ¥=‚ñ‰¹*fï— ã¥ýΛwa 0>ñE“Ÿ}(pN &:½Ò4ÚŠô‡"T’¦»•AèèAÈj¯2Üü6. ã+íÉ`|ÂøÄr#`|b¥=5–Яt(ŒO|1Ÿ(z#(8A÷mÒ:‚ñSÚ®¢›ÂVtŒPäêÜH¨¯Æ{(|êƒXÃĘëßaù+&êa|b¹­éryüs^ã+ÝˆÚøç0>ñÅ“¡M8m;¢Ä;Ú‹}yˆ€ÄÚheN- @"Ѿp Š™Ãm±DóûÆ'VÔ—Ëø„ñ‰åFÀøÄŠzd˜sâË0>ñÅú‰ÞáØÀHt é #À¤×hâL0~FzzEº"‰¾àxû`ôx0r"j¯ªñ©¢Ùb|be}ÝŒO,·5õŸ`¹Fb|ÂøDÙ `|âËn¥ê1QN¸Mô˜Ñöp¤3;G3îÁ0å­úHú@HŠž_å­7>±Ò¾Æ'ŒO,7Æ'VÚSce­™J:Zã_¬ŸhÇN„b§GÛF%¿C”‘îh¸7éŒòkâìPüôÐxçðX÷PðäCÞªxëÛïXQ‡Ïò‰\¡« Û[¸± á.„3¨p+*¼›Wºf¦¾GídêM¶(…™·lICà~ ªÕ6ÚƒI‰îÂé¶©ÂÖ™Âî »¼Ä…?Òk›ÛD´é“9Éúf!Ò¤zòx×p¬ƒ9ìUxyúÔ¿3>þÛØEù9>þݱ‹lÏꦺãõ³ccÞÃ{O¾Œywj]c-h¶óƒƒ€ñ‰E»×Ñn¯Ú;ß6r¡ùƒŸN×ÑÚ#yñðÄxË{«½ÁÈÐP´w8.M@ÂÑ>)ݽ'ƒí¼4|šOô|" ÃÃĺÐârâP¸cÝZo6óâl~ÏŒt{ztbJQ¬o¸\~r;ï G`2G˯¤³ÒlºP;‘úÞ†j/18 #ý̽9ÑV»ÄY5Ôº ¯ñ‰Áe;ß?Æ'îÃù# …ήóÖ†Þ}ãHfôðÔźÔÅ#ùXÃåÕÞZªV G{šð3ë¡|ÅB‹8N;ÔŸáùB!_`%'d"24Beõ„¨f"Ñ®Uk½ë…çé@¡CFZ:QEûŽ^ ÷³NµÏ> Pu›.q)mCš+˜I½²fµE˜Ì:uNtJ¨•y(pæáw½1>aOº#`|b§E·*tì£ñÆÂØaš„¥FÏÄÂ'6³äŽœÃ?!|"Þˆ&’b”bÁ¿§C}Ö?1S($½JϺžæ’(ï¤c}(Ô[]áݺÚI½XÐÎÔiiHý€B»ðÅB€ÎaÒè\ú¿ì‡OT¯‘¹ÇcBkña•¯åÁ1÷æÝOtãw•í¹(ŸXÝw?oÛÖTxç†GöVãÄë-Ó¦·‰w„CCÄ8¤†7Ù§ð‰hjŒÅ:µç^ø Ÿ@>« ‡Ä?ÁÒ0Þ†Ÿ™‰õ{UÞÇW:&g¿Ÿ/좥S¦°g±ŒŠçD`7Ä4[¨M¶¥ågí–Þø[.M!h¿cmZPO5áæŸ¸k¯Ì½> Jª[,×AŸX¬;+|"Ö ÷i¿m¼q/ à^HóßâO󉬄;D ëºPòƒ…OˆŠ¢M¢YR׬³z7•ýž9'ŒNÝø'¦ ûPlÞåÅ.ü uñ¢‘vjçÁ'hä´ÀqG…PŠ…>ªŒO,1Ûÿ>0>qŸÞñq1:ñ³CÑ3d„R;|zt¼éýÑÆVyÛ‚¡H0|ŽÇŸ8ël“mËŠÀgõ˜(ÐOTJ¾¨È[¤9=ã ž‰Iö¿4–ôDçÑl^¹Ù9‘~1Y8*<œ.<œ*ìÈvMç¶"ÔO‰à̓øUj'š;RBîÏüØÇýŽª½ã³å ’¤ÛnºíNö¤ ;(a‚s‹93UØ9 ÏÄx0H¿ÁÈØà`¤Gãà=fTÞ×äŽâl¼û/Œñ‰»ÇÊö\ŒO, Œî CÂ'ÚÈÝ Ñ»³ÆÛkúh´åF|"†ºcñžþð©á±ÎÈhO l|bÙéÔÝñ‰Èh×ù²qDKAoY‚Uh3¯Ýl›MþVUfnG¾°7[ØCU¢¼P‡]üš/ìgèÀ!°1³…GS…GÓB)\ØV®Ì3žýÜt%”²¥ {òòb_*½8˜ÌïÒœŽ]…·r/­^åÇÂáèù‘Hû@ôd`ôôœO¢ècâiî¨ñ‰e^Ø~Æ'“ODÏG;T…âÔÖì©öj‚-ÿgèèÏ+¼Íh0’ˆ|`¬ó|äôHä œc¡úªEªJø2>áDpòý ÅÑcò³«˜™ÃEÑ‹¢ºšŒî‰Ü?Mþ‹tnW6³ ž0 á»g ;pZ°Í(µ³# ¥°­,à¦s£óâˆb#xsº°‰ò—¼Ne™óÙ½…üÁ|á×r…‡“…ÚÙÜ?Z¿ÆCŽ…¡Ût‚uÜÁ椗ª™À+†‚<#)лÐ/­ù'Š˜íŸŸ¸O?ù8kW _ÆÎ…ãçt){v,1°!EWˆ| Þǃ§ÄP¤3660 „î‚õU‹6T‹³¸;>19Ëã'O|yÐÇ»FÂÄ>‚‘ŽªõÞÕÜóS…iqNHçv¸Ò©Â®Ùö$%@N„BÝl¸»m+[²B¹õûˆ‚qëõî §ÌIé3ØÆ&ÃtaïDᇫVãᢠë9Z¡¥ŠŽÑ{°c(ÊÔÒiÆ 'Ü ºÍÅ;F)ŒOسğXDÀ˜â´G’Jç‡s}=•Õ^ 0?Gˆ”sa¥ÑSÔOáñêÓ¬sÌ(…kú4ü±`Va|ž°%FÀøÄb®ÝÚH%ÒA))…é>O‚(•š+½pd„bH!BQüågyt„ÖlqÉÁ=íîøS¡ù¢håHÝ‘`‰îË#rŠH{ !uOõ~ë&9~®-$U“u›w_;Ã`[™!àzy«*ª¨{Ç3aˆ€£¼ Ò~†h¨#nO„Û¨§+ºœPÚìpül0zý„¼#e'Úei"dB'^qò,lŠŸX¬‡»ç.0>q—@ýÊÝøú²píueiXÁï$Òx'®ñH¸-J$®¦'Úa-Ë%¤K¿Ãçõ+—úáa1 óEŽ‹ÂrfÏ–þþÙx¾ ã6KŒ€ñ‰n§óÆ',äV¾ŸðÓ³æà¾Æ'lÊ=ÀŸ(_kúOë¢é2>as ÄŸ(1àv:?!`|ÂøDù"`|ÂOÏóOüÁ_=ñã¿þÛþû'ÌÆ¯lÿî‰?àõøÚüÙ·ÿù¯:"Ö,½†¥k’h’æ:qßKŠ“MC „Ÿ(_kZÂiäSSa|Âæ@‰0ÿD‰·Óù ãÆ'Êã~zÖø”t..DÆ'O;ÚŠBÀøDùZÓ5—ÄØŸ°9PbŒO”p;Ÿ0>a|¢|0>á§gÍ’PF¿] ñ ¿ÝO 0>Q¾Ö´„Óȧ¦Âø„Í#`|¢Ä€Ûéü„€ñ ãå‹€ñ ?=k|J:"ã‹‹§mE!`|¢|­éŠšˆKblŒOØ(1Æ'J ¸ÎOŸ0>Q¾ŸðÓ³fI(£ß.Ðø„ß„Ÿ(_kZÂiäSSa|Âæ@‰0>QbÀít~BÀø„ñ‰òEÀø„Ÿž5>%‹ ‘ñ‰ÅÅÓŽ¶¢0>Q¾ÖtEMÄ%16Æ'l”ã%ÜNç'ŒOŸ(_ŒOøéY³$”Ñoh|ÂowÄÆSBŒO”¯5-á4ò©©0>as ÄŸ(1àv:?!`|ÂøDù"`|ÂOÏŸ’ÎÅ…ÈøÄââiG[QŸ(_kº¢&â’ã6JŒ€ñ‰n§óÆ'ŒO”/Æ'üô¬YÊè· 4>á·;bã)!Æ'Êך–pùÔTŸ°9PbŒO”p;Ÿ0>a|¢|0>á§gOIçâBd|bqñ´£­(ŒO”¯5]QqIŒñ ›%FÀøD‰·Óù ãÆ'Êã~zÖ, eôÛŸðÛ±ñ”ãåkMK8|j*ŒOØ(1Æ'J ¸ÎOŸ0>Q¾ŸðӳƧ¤sq!2>±¸xÚÑVÆ'Êך®¨‰¸$ÆÆø„Í#`|¢Ä€Ûéü„€ñ ãå‹€ñ ?=k–„2úíOøíŽØxJˆ€ñ‰òµ¦%œF>5Æ'l”ã%ÜNç'ŒOŸ(_ŒOøéYãSÒ¹¸ŸX\<íh+ ãåkMWÔD\cc|Âæ@‰0>QbÀít~BÀø„ñ‰òEÀø„Ÿž5KBývÆ'üvGl<%DÀøDùZÓN#Ÿš ã6JŒ€ñ‰n§óÆ'ŒO”/Æ'üô¬ñ)é\\ˆŒO,.žv´…€ñ‰òµ¦+j".‰±1>as ÄŸ(1àv:?!`|ÂøDù"`|ÂOÏš%¡Œ~»@ã~»#6ž"`|¢|­i §‘OM…ñ ›%FÀøD‰·Óù ãÆ'Êã~zÖø”t..DÆ'O;ÚŠBÀøDùZÓ5—ÄØŸ°9PbŒO”p;Ÿ0>a|¢|0>á§gÍ’PF¿] ñ ¿ÝO 0>Q¾Ö´„Óȧ¦Âø„Í#`|¢Ä€Ûéü„€ñ ãå‹€ñ ?=k|J:"ã‹‹§mE!`|¢|­éŠšˆKblŒOØ(1Æ'J ¸ÎOŸ0>Q¾ŸðÓ³fI(£ß.Ðø„ß„Ÿ(_kZÂiäSSa|Âæ@‰0>QbÀít~BÀø„ñ‰òEÀø„Ÿž5>%‹ ‘ñ‰ÅÅÓŽ¶¢0>Q¾ÖtEMÄ%16Æ'l”ã%ÜNç'ŒOŸ(_ŒOøéY³$”Ñoh|ÂowÄÆSBŒO”¯5-á4ò©©0>as ÄŸ(1àv:?!`|ÂøDù"`|ÂOÏŸ’ÎÅ…ÈøÄââiG[QŸ(_kº¢&â’ã6JŒ€ñ‰n§óÆ'ŒO”/Æ'üô¬YÊè· 4>á·;bã)!Æ'Êך–pùÔTŸ°9PbŒO”p;Ÿ0>a|¢|0>á§gOIçâBd|bqñ´£­(ŒO”¯5]QqIŒñ ›%FÀøD‰·Óù ãÆ'Êã~zÖ, eôÛŸðÛ±ñ”ãåkMK8|j*ŒOØ(1Æ'J ¸ÎOŸ0>Q¾ŸðӳƧ¤sq!2>±¸xÚÑVÆ'Êך®¨‰¸$ÆÆø„Í#`|¢Ä€Ûéü„€ñ ãå‹€ñ ?=k–„2úíOøíŽØxJˆ€ñ‰òµ¦%œF>5Æ'l”ã%ÜNç'ŒOŸ(_ŒOøéYãSÒ¹¸ŸX\<íh+ ãåkMWÔD\cc|Âæ@‰0>QbÀít~BÀø„ñ‰òEÀø„Ÿž5KBývÆ'üvGl<%DÀøDùZÓN#Ÿš ã6JŒ€ñ‰n§óÆ'ŒO”/Æ'üô¬ñ)é\\ˆŒO,.žv´…€ñ‰òµ¦+j".‰±1>as ÄŸ(1àv:?!`|ÂøDù"`|ÂOÏš%¡Œ~»@ã~»#6ž"`|¢|­i §‘OM…ñ ›%FÀøD‰·Óù ãÆ'Êã~zÖø”t..DÆ'O;ÚŠBÀøDùZÓ5—ÄØŸ°9PbŒO”p;Ÿ0>a|¢|0>á§gÍ’PF¿] ñ ¿ÝO 0>Q¾Ö´„Óȧ¦Âø„Í#`|¢Ä€Ûéü„€ñ ãå‹€ñ ?=k|J:"ã‹‹§mE!`|¢|­éŠšˆKblŒOØ(1Æ'J ¸ÎOŸ0>Q¾ŸðÓ³fI(£ß.Ðø„ß„Ÿ(_kZÂiäSSa|Âæ@‰0>QbÀít~BÀø„ñ‰òEÀø„Ÿž5>%‹ ‘ñ‰ÅÅÓŽ¶¢0>Q¾ÖtEMÄ%16Æ'l”ã%ÜNç'ŒOŸ(_ŒOøéY³$”Ñoh|ÂowÄÆSBŒO”¯5-á4ò©©0>as ÄŸ(1àv:?!`|ÂøDù"`|ÂOÏŸ’ÎÅ…ÈøÄââiG[QŸ(_kº¢&â’ã6JŒ€ñ‰n§óÆ'ŒO”/Æ'üô¬YÊè· 4>á·;bã)!Æ'Êך–pùÔTŸ°9PbŒO”p;Ÿ0>a|¢|0>á§gOIçâBd|bqñ´£­(ŒO”¯5]QqIŒñ ›%FÀøD‰·Óù ãÆ'Êã~zÖ, eôÛŸðÛ±ñ”ãåkMK8|j*†"¡XÏHäl ÒåUzvæô?D¾;vñ;¢Ï±wôõïŒ_|nì"/xÿ7Çß½0öÝÑÄ?»ðíñ ß¹øú³ccÞÁ½'ÞEÛú 'Ú‡ãÁhw(Òkw"е…¢ÁpÏ6ÏûógþÛ¿ùêþ‡ßøñ_íàÛ_íÇÿþ©.Û“?þ«'~ü¿ÿúû“'þÅO~ã_zêÿ'þ»?~ö¿ÛèyðàH´o$ÎÔm ÆÚGÛF;GbÝÁ¨Í7Ÿ>gì[0‡€ñ ãeŠ€>ÙÏFbèÙp¼·²Âû·ÇOÿ“áð?¼ðÆwGcß|71öÜèØ³ã‰gÇc¿9{n,öÇÇþÁè8oþƒñ×Ùž½ðݱQïá}'Þ@ ‚±ö¹­“ǽ<âË:»®{B®yf8ÑíÞàyÿúÛÿôožüñ_?õã÷Ä8öðWOü¡pˆ¯ÿÁ¿{êxÃøÉ×ÿoÿǯÿ3ÞÿwOü÷ÿûS?þÓïþáF¯: …ÃýÑp7J1gÖu†#l¼cÕð3Æ'Ì$”-íÁèÉàØ©±SCãø'þÍé3ÿd$øÝ±qxƒlcoüƒ±7pB|ç"®Ù¾yqì[o\p‹ïŒC5ž¹óÙ}âÞ4ÿx}¾wÚóýžì®Ÿˆ÷3¶ö¡è™ÐXçH¸s|â[¿2ñÕöžúïÿÝS?þ÷O:ÿÄÂøõµßøýúÿøW_ûþú‰ÿûø?üÉ“ÿã_?ùßÿÑ7ÿÙF¯fhd0`¾9>¡^Š¢WŒég€>FÀøDÙZÓþÑíÆ-1ê uC^Uå¿îèú½àÐw/$¾}!‚OÿÄoÅ.8/Å·ÇÙ.<{áâ?¼øÖ·ccÿðâ›Ð‹ç^}n,ìÜyìÈH´?é…C¨‹BžòÄ>ôõ³!0‡ÀH¢g8Úöoñ¼?~î¿ùßžúgÿþëÿâ?<ñ/þêÉ? Òñ7_#ö!þ qQ<‰¯BÜýÄüõWÿÅ¿ÿÚ?ÿߟùçÿÓsÿtƒWŒã}Ãñn «ÅÚ…UÈL—˜M6CÀߟ°§a¹"€ÄJí‹$ú"±sÕ•^•çUWUTxžÛðXÈÆ»ò+ÿ•ÿTz•5s{¸ý*=ý·‰rBÅòd'ü!{ÄEÄYé Ç„R0gªt¾Éô©¬¼cÂ1Éæ~c§ ¯²Z&Ÿ›~Õú3< ÷ºx‡x&p‰¡¥`&Gl¾Ùdó9Æ'Ì$”+Ñî@¤g$Ø v†ƒïEãÆs…f\bnÁÇ;ú°æ Þöó4'z‰ „£çc±ÁXø|,rÎE:0.ÆÁ&ú [/–ë̹×ë Å; fZûPèt`ôÜp¤76ÖvD¢=lP[æ^8ÖÁ64Ú54Ú@¼9ì Çû‡b=xŸÛsÎ!³ÔñWÈ„2 Ÿ›ÞŽ€ñ‰{}vØÚÔ÷´Æ:£g‰v¶ÁØ™‘Ñö@ìt0zv$îdn²9~€³Ò0ëbsDa!g¢‹ŒÓ@´£¨¾TŸÄ ‘\ß#ð€?ÝJzùB7ãíCÇâ£ÑÑÎÁH[ ÞÃüÁO [h–ЙPì î.fà`ðL0Ò‹÷D‘x‘.0ëœ'ìNÂJøÃ‘Z›r†€0>a|¢LP¢ÐC&º†£,ϱäñ-kĈ8$œgÂ}9Ç"8Ú=ÄGðŒH¬=i‹ÄÈ içQ>ïLðSöwGvQmÛ y ÁDïp¬MfQ¼g$Ö;H‚±,\§¨z•¸Žu…ݲO¬ƒOáÛpüãÎÙ…K,:ç3¨ #ði>‘ËåòùCþSk§ápÛH¤†€ï– NL©ôì­ªö …L¾Îå2^6›u|"žÛ%q_×jwð‰ù㚸½üf]‘!`†€!àø|>áŠÀŠ[WX”¢Ÿ„Ê*/“ÍåSPŠB!³(þCp=¯{ÏñóI˜sÛ0 CÀx°€à–p”"2Ú™ žBz m€F¸-N ŸÀEÁ¿ŠJʾžuÀDŠdä“ì8óL{5 CÀ0D>aê߉Žu;ñO ™pÿàŸø'ªª*"ñáôkêÓ&ò ŸzmŸ~çAÄÔߺ»#†€!`†Àâ# ¹÷‘öèX¯SQ ŸÀ]I8ÿ„üC5WB~Qn‘áW)ã x6\õž"¥.5ú«õ§Yü[e4Å0 CÀð-*À¤ÈÊY¸È0Ãân ô!“Ï„£Â'ødBÄ^(:8Ö„º;ù„Ëø7OŸ0 CÀ0Ê;U™Z³5Üí¡i3š B(ÖG6>eòç„Ä;\ØCYF*¥ÀEíû$ÒáüñSšDj|¢Œ']š!`†ÀŽÀg™D± æwЉ$PÈ„D:ª¼|!©™J œ~ÂýÇU¡pï㥄Ï#¤@›)•|âdšrPÜÂP4ýÔ6CÀ0 CÀ(#چçIðÔ²ZÇ’ð8„Lð&¥-bÏH¨¿ƒæt|öõ'ÒóÈdH!å_Ñf0òÿoïìv‚(\«Ñ÷#B"¨`i)¼“!Xã™™í¨7^ºùÈ„l i“ï¦'gþV’!ò7t_ qS¤Ž‘œá@€@)Ô ÝzõË„PGÔ`ÚôªÃL†‚*'\L˜l=ˆ³ª0•‘S nTø×÷Ñk3%)–J–H¡H˜HR\»øÝá?€ ü7–ë‘’°ITÝbÓέbÒ–,ÚXL9 ëF[i^b fL\}”ï°±VáL¤RŠô—“­I ÝÝ+*L@ø¶$€ ¢ÈÐÊ:™*•P§§Ñª½3M÷¼Û/o¬lâè²A­=qeYdIáuƒ%>ÚWíqîzö ¥O@€Š"`ë9l6„g=5´JI ÛˆÛ/6Û')‰ú®ú>S¨Ú7&ÅyžULÉ ½"ÃûJ‡º®dTt»w©Š¦µÜþ @åPÂ7tÌT9¡|GXIF(¼fâ”Gaš91õ'ÂÈÍQž™M‹øU+m »5aarÌr€ BÀ“Òëí¼Û¿©†Ro|E¨_šq˜–PT’áZØP+ ¡'’¤p ç¸i<€€ @ 4uuÿP‹¾üíV„GÎqh­è¸ 좿cZ¤É@€ ð?W´r$@ALIEND®B`‚axiom-1.2.8/src/site/resources/images/add.gif0000644000000000000000000000031711131637462017573 0ustar rootrootGIF89a³*|¢~’Η0XpNŸÐ>tA9CGÐÒÏúüúOs‚µÀµ+³˜½š„ºØ¬®¬ž¨!ù,|ÉI«½8klÌð_Ø×@4DJ,l’ —Ñ *»¼¤e¸|ïæƒq8HŒH EˆT8(`ª"†BÁ`€êAñ`…iM0·[—!ÀKǸ|N¨ianVXp\ ‚KXDNNRmKc“EXcJn#š›žŸŸ;axiom-1.2.8/src/site/resources/images/nw_min_036.gif0000644000000000000000000000005511131637462020721 0ustar rootrootGIF89a€3fÿÿÿ!ù,„Q;axiom-1.2.8/src/site/site.xml0000644000000000000000000000442311131637462014565 0ustar rootroot Apache Axiom http://ws.apache.org/images/project-logo.jpg http://ws.apache.org/ axiom-1.2.8/src/changes/0000755000000000000000000000000011131637462013540 5ustar rootrootaxiom-1.2.8/src/changes/changes.xml0000644000000000000000000000313111131637462015670 0ustar rootroot Changes in Apache Axiom The factory methods of StAXUtils didn't work with Java 6. The method StAXUtils.reset() wasn't synchronized and the factory pool had no upper limit. Added support for Maven 2 as the build system. axiom-1.2.8/src/main/0000755000000000000000000000000011131637460013052 5ustar rootrootaxiom-1.2.8/src/main/assembly/0000755000000000000000000000000011131637460014671 5ustar rootrootaxiom-1.2.8/src/main/assembly/jar.xml0000644000000000000000000000301311131637460016164 0ustar rootroot jar false jar org.apache.ws.commons.axiom:axiom-api org.apache.ws.commons.axiom:axiom-impl org.apache.ws.commons.axiom:axiom-dom org.apache.ws.commons.axiom:axiom-c14n false true axiom-1.2.8/src/main/assembly/filter.properties0000644000000000000000000000217011131637460020274 0ustar rootroot# # ~ Licensed to the Apache Software Foundation (ASF) under one # ~ or more contributor license agreements. See the NOTICE file # ~ distributed with this work for additional information # ~ regarding copyright ownership. The ASF licenses this file # ~ to you 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. # # This entry here is for the assembly plugin- For some reason # the assembly plugin cannot override the filter properties (as explained # in the docs) and also does not inherit the maven standard properties. This # is the one that points to a separate filter props file # version = 1.2.6axiom-1.2.8/src/main/assembly/bin.xml0000644000000000000000000001021111131637460016156 0ustar rootroot bin false axiom-${version} zip false LICENSE.txt NOTICE.txt target/site docs **/* legal lib **/* README.txt / true 0644 RELEASE-NOTE.txt / true 0644 ${project.build.directory}/axiom-${project.version}-jar.jar / axiom.jar org.apache.ws.commons.axiom:axiom-dom org.apache.ws.commons.axiom:axiom-api org.apache.ws.commons.axiom:axiom-c14n lib false false org.apache.ws.commons.axiom:axiom-impl lib false true lib org.codehaus.woodstox:wstx-asl commons-logging:commons-logging jaxen:jaxen org.apache.geronimo.specs:geronimo-activation_1.1_spec org.apache.geronimo.specs:geronimo-javamail_1.4_spec org.apache.geronimo.specs:geronimo-stax-api_1.0_spec axiom-1.2.8/src/main/assembly/src.xml0000644000000000000000000000346211131637460016207 0ustar rootroot src true axiom-${version} zip **/* *.ipr *.iws *.iml **/target **/target/** **/target/**/* README.txt / true RELEASE-NOTE.txt / true axiom-1.2.8/RELEASE-NOTE.txt0000777000000000000000000001151211131637500013725 0ustar rootroot =========================================== Apache AXIOM 1.2.8 Release Note =========================================== Apache AXIOM is a StAX-based, XML Infoset compliant object model which supports on-demand building of the object tree. It supports a novel "pull-through" model which allows one to turn off the tree building and directly access the underlying pull event stream. It also has built-in support for XML Optimized Packaging (XOP) and MTOM, the combination of which allows XML to carry binary data efficiently and in a transparent manner. The combination of these results in a easy to use API with a very high performant architecture! Initialy developed as part of Apache Axis2, Apache AXIOM (AXIs Object Model) is the core of Apache Axis2. However, it is a pure standalone XML Infoset model with novel features and can be used independently of Apache Axis2. Please visit: http://ws.apache.org/commons/axiom/ Key Features ============ * Full XML Infoset compliant XML object model * StAX based builders with on-demand building and pull-through * XOP/MTOM support offering direct binary support * Convenient SOAP Infoset API on top of AXIOM * Two implementations included: o Linked list based implementation o W3C DOM supporting implementation * Highly performant What's New in This Release ========================== This release contains fixes for following issues (see http://issues.apache.org/jira/browse/WSCOMMONS/component/12310703) WSCOMMONS-434 org.apache.axiom.om.impl.dom.NodeImpl#getTextContent() and org.apache.axiom.om.impl.dom.NodeImpl#setTextContent(String arg0) are not implemented WSCOMMONS-429 XOPAwareStAXOMBuilder / MTOMStAXSOAPModelBuilder should use UTF-8 to decode cid: URIs WSCOMMONS-427 StreamingOMSerializer#serializeXOPInclude doesn't decode cid: URLs WSCOMMONS-424 BufferUtils#doesDataHandlerExceedLimit needs review WSCOMMONS-423 DOOM doesn't correctly enforce hierarchy constraints on Document WSCOMMONS-420 Attempted validation of DomSource leads to "java.lang.UnsupportedOperationException: TODO" from "org.apache.axiom.om.impl.dom.DocumentImpl.getDoctype" WSCOMMONS-415 Provide implementations of javax.xml.transform.Source and javax.xml.transform.Result WSCOMMONS-413 Build failure with JDK 1.4.2 WSCOMMONS-412 Get rid of the setDOOMRequired hack WSCOMMONS-394 StAXUtils: Add Network Detached XMLStreamReader capability WSCOMMONS-393 Error using AxiomSoapMessageFactory with comments in request WSCOMMONS-386 Exception thrown is not descriptive, if content-type missing boundary parameter WSCOMMONS-381 StringIndexOutOfBoundsException in org.apache.axiom.attachments.impl.PartFactory.readHeader() WSCOMMONS-373 SAXOMBuilder needs to support default namespaces WSCOMMONS-372 Sometimes accessing an AXIOM tree while the underlying input stream is closed causes an OutOfMemoryError WSCOMMONS-357 NPE will result in Axiom code if MD5 algorithm is not in classpath WSCOMMONS-340 Error calling getTextCharacters() on a comment node WSCOMMONS-337 insertSiblingAfter() method doesn't set last child WSCOMMONS-336 Inconsistent specification for OMDataSource#serialize(OutputStream, OMOutputFormat) WSCOMMONS-335 Add a getOutputFormat method to MTOMXMLStreamWriter WSCOMMONS-334 OMSourcedElementImpl#serialize produces wrong result when element is expanded WSCOMMONS-333 Add an addNamespaces(OMElement) method to AXIOMXPath WSCOMMONS-329 org.apache.axiom.attachments.Attachments#getSOAPPartContentID() does not parse content ids correctly. WSCOMMONS-328 Failure in boundaryPosition condition for checking position validity WSCOMMONS-327 Namespace High verbosity combined with XMLBeans WSCOMMONS-323 XML Element lost when there is an OMException inside OMChildrenIterator.next() WSCOMMONS-317 Reverted code, need to review code WSCOMMONS-281 xmlns:xml declaration is unnecessary and fails in some parsers WSCOMMONS-255 AXIOM DOM based org.w3c.dom.Element.getElementsByTagName and getElementsByTagNameNS do not funcion according to spec WSCOMMONS-254 AXIOM DOM based implementation fails to parse documents that start with xml comment. WSCOMMONS-253 mvn: creating axiom.jar (bundle of axiom-api.jar, axiom-dom.jar and axiom-impl.jar) WSCOMMONS-239 org.apache.axiom.om.OMElement#getText() is not documented sufficiently WSCOMMONS-237 Can't retrieve children from OMDocument WSCOMMONS-233 SecurityException thrown in OMAbstractFactory when run from an applet (2) WSCOMMONS-207 Finding namespace based on prefix is broken WSCOMMONS-197 SOAP headers added using DOOM are lost during serialization WSCOMMONS-182 Infinite loop in OMElement possible WSCOMMONS-121 Handling of xml documents with two top level elements is errorneous WSCOMMONS-115 Problem in serialization when comments presents WSCOMMONS-101 axiom base64 encoding is incorrect - The Apache Axiom Team. axiom-1.2.8/modules/0000755000000000000000000000000011131637500013002 5ustar rootrootaxiom-1.2.8/modules/axiom-dom/0000755000000000000000000000000011131637716014705 5ustar rootrootaxiom-1.2.8/modules/axiom-dom/src/0000755000000000000000000000000011131637472015473 5ustar rootrootaxiom-1.2.8/modules/axiom-dom/src/main/0000755000000000000000000000000011131637472016417 5ustar rootrootaxiom-1.2.8/modules/axiom-dom/src/main/resources/0000755000000000000000000000000011131637472020431 5ustar rootrootaxiom-1.2.8/modules/axiom-dom/src/main/resources/META-INF/0000755000000000000000000000000011131637472021571 5ustar rootrootaxiom-1.2.8/modules/axiom-dom/src/main/resources/META-INF/MANIFEST.MF0000644000000000000000000000250311131637472023223 0ustar rootrootManifest-Version: 1.0 Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt Import-Package: javax.activation, javax.xml.namespace, javax.xml.parsers, javax.xml.stream, javax.xml.validation,org.apache.axiom.attachments.utils, org.apache.axiom.om, org.apache.axiom.om.impl, org.apache.axiom.om.impl.builder, org.apache.axiom.om.impl.dom, org.apache.axiom.om.impl.dom.factory, org.apache.axiom.om.impl.dom.jaxp, org.apache.axiom.om.impl.exception, org.apache.axiom.om.impl.serialize, org.apache.axiom.om.impl.traverse, org.apache.axiom.om.impl.util, org.apache.axiom.om.util, org.apache.axiom.soap, org.apache.axiom.soap.impl.builder, org.apache.axiom.soap.impl.dom, org.apache.axiom.soap.impl.dom.factory, org.apache.axiom.soap.impl.dom.soap11, org.apache.axiom.soap.impl.dom.soap12, org.w3c.dom, org.xml.sax Export-Package: org.apache.axiom.om.impl.dom.factory, org.apache.axiom.om.impl.dom.jaxp, org.apache.axiom.om.impl.dom, org.apache.axiom.soap.impl.dom.factory, org.apache.axiom.soap.impl.dom.soap11, org.apache.axiom.soap.impl.dom.soap12, org.apache.axiom.soap.impl.dom Bundle-Name: Axiom DOM Bundle-DocURL: http://www.apache.org/ Bundle-ManifestVersion: 2 Bundle-Vendor: Apache Software Foundation Bundle-SymbolicName: org.apache.ws.commons.axiom.axiom-dom axiom-1.2.8/modules/axiom-dom/src/main/resources/org/0000755000000000000000000000000011131637472021220 5ustar rootrootaxiom-1.2.8/modules/axiom-dom/src/main/resources/org/apache/0000755000000000000000000000000011131637472022441 5ustar rootrootaxiom-1.2.8/modules/axiom-dom/src/main/resources/org/apache/axiom/0000755000000000000000000000000011131637472023556 5ustar rootrootaxiom-1.2.8/modules/axiom-dom/src/main/resources/org/apache/axiom/om/0000755000000000000000000000000011131637472024171 5ustar rootrootaxiom-1.2.8/modules/axiom-dom/src/main/resources/org/apache/axiom/om/impl/0000755000000000000000000000000011131637472025132 5ustar rootrootaxiom-1.2.8/modules/axiom-dom/src/main/resources/org/apache/axiom/om/impl/dom/0000755000000000000000000000000011131637472025711 5ustar rootrootaxiom-1.2.8/modules/axiom-dom/src/main/resources/org/apache/axiom/om/impl/dom/msg/0000755000000000000000000000000011131637472026477 5ustar rootroot././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootaxiom-1.2.8/modules/axiom-dom/src/main/resources/org/apache/axiom/om/impl/dom/msg/XMLMessages.propertiesaxiom-1.2.8/modules/axiom-dom/src/main/resources/org/apache/axiom/om/impl/dom/msg/XMLMessages.proper0000644000000000000000000007263311131637472032073 0ustar rootroot# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you 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. # # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you 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. # # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you 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. # # This file contains error and warning messages related to XML # The messages are arranged in key and value tuples in a ListResourceBundle. # # @version BadMessageKey = The error message corresponding to the message key can not be found. FormatFailed = An internal error occurred while formatting the following message:\n # Document messages PrematureEOF=Premature end of file. # 2.1 Well-Formed XML Documents RootElementRequired = The root element is required in a well-formed document. # 2.2 Characters InvalidCharInCDSect = An invalid XML character (Unicode: 0x{0}) was found in the CDATA section. InvalidCharInContent = An invalid XML character (Unicode: 0x{0}) was found in the element content of the document. TwoColonsInQName = An invalid second ':' was found in the element type or attribute name. ColonNotLegalWithNS = A colon is not allowed in the name ''{0}'' when namespaces are enabled. InvalidCharInMisc = An invalid XML character (Unicode: 0x{0}) was found in markup after the end of the element content. InvalidCharInProlog = An invalid XML character (Unicode: 0x{0}) was found in the prolog of the document. InvalidCharInXMLDecl = An invalid XML character (Unicode: 0x{0}) was found in the XML declaration. # 2.4 Character Data and Markup CDEndInContent = The character sequence \"]]>\" must not appear in content unless used to mark the end of a CDATA section. # 2.7 CDATA Sections CDSectUnterminated = The CDATA section must end with \"]]>\". # 2.8 Prolog and Document Type Declaration XMLDeclMustBeFirst = The XML declaration may only appear at the very beginning of the document. EqRequiredInXMLDecl = The '' = '' character must follow \"{0}\" in the XML declaration. QuoteRequiredInXMLDecl = The value following \"{0}\" in the XML declaration must be a quoted string. XMLDeclUnterminated = The XML declaration must end with \"?>\". VersionInfoRequired = The version is required in the XML declaration. SpaceRequiredBeforeVersionInXMLDecl = White space is required before the version pseudo attribute in the XML declaration. SpaceRequiredBeforeEncodingInXMLDecl = White space is required before the encoding pseudo attribute in the XML declaration. SpaceRequiredBeforeStandalone = White space is required before the encoding pseudo attribute in the XML declaration. MarkupNotRecognizedInProlog = The markup in the document preceding the root element must be well-formed. MarkupNotRecognizedInMisc = The markup in the document following the root element must be well-formed. AlreadySeenDoctype = Already seen doctype. DoctypeNotAllowed = DOCTYPE is disallowed when the feature "http://apache.org/xml/features/disallow-doctype-decl" set to true. ContentIllegalInProlog = Content is not allowed in prolog. ReferenceIllegalInProlog = Reference is not allowed in prolog. # Trailing Misc ContentIllegalInTrailingMisc=Content is not allowed in trailing section. ReferenceIllegalInTrailingMisc=Reference is not allowed in trailing section. # 2.9 Standalone Document Declaration SDDeclInvalid = The standalone document declaration value must be \"yes\" or \"no\", not \"{0}\". # 2.12 Language Identification XMLLangInvalid = The xml:lang attribute value \"{0}\" is an invalid language identifier. # 3. Logical Structures ETagRequired = The element type \"{0}\" must be terminated by the matching end-tag \"\". # 3.1 Start-Tags, End-Tags, and Empty-Element Tags ElementUnterminated = Element type \"{0}\" must be followed by either attribute specifications, \">\" or \"/>\". EqRequiredInAttribute = Attribute name \"{1}\" associated with an element type \"{0}\" must be followed by the '' = '' character. OpenQuoteExpected = Open quote is expected for attribute \"{1}\" associated with an element type \"{0}\". CloseQuoteExpected = Close quote is expected for attribute \"{1}\" associated with an element type \"{0}\". AttributeNotUnique = Attribute \"{1}\" was already specified for element \"{0}\". AttributeNSNotUnique = Attribute \"{1}\" bound to namespace \"{2}\" was already specified for element \"{0}\". ETagUnterminated = The end-tag for element type \"{0}\" must end with a ''>'' delimiter. MarkupNotRecognizedInContent = The content of elements must consist of well-formed character data or markup. DoctypeIllegalInContent = A DOCTYPE is not allowed in content. # 4.1 Character and Entity References ReferenceUnterminated = The reference must be terminated by a ';' delimiter. # 4.3.2 Well-Formed Parsed Entities ReferenceNotInOneEntity = The reference must be entirely contained within the same parsed entity. ElementEntityMismatch = The element \"{0}\" must start and end within the same entity. MarkupEntityMismatch=XML document structures must start and end within the same entity. # Messages common to Document and DTD # 2.2 Characters InvalidCharInAttValue = An invalid XML character (Unicode: 0x{2}) was found in the value of attribute \"{1}\" and element is \"{0}\". InvalidCharInComment = An invalid XML character (Unicode: 0x{0}) was found in the comment. InvalidCharInPI = An invalid XML character (Unicode: 0x{0}) was found in the processing instruction. InvalidCharInInternalSubset = An invalid XML character (Unicode: 0x{0}) was found in the internal subset of the DTD. InvalidCharInTextDecl = An invalid XML character (Unicode: 0x{0}) was found in the text declaration. # 2.3 Common Syntactic Constructs QuoteRequiredInAttValue = The value of attribute \"{1}\" must begin with either a single or double quote character. LessthanInAttValue = The value of attribute \"{1}\" associated with an element type \"{0}\" must not contain the ''<'' character. AttributeValueUnterminated = The value for attribute \"{1}\" must end with the matching quote character. # 2.5 Comments InvalidCommentStart = Comment must start with \"\". COMMENT_NOT_IN_ONE_ENTITY = The comment is not enclosed xin the same entity. # 2.6 Processing Instructions PITargetRequired = The processing instruction must begin with the name of the target. SpaceRequiredInPI = White space is required between the processing instruction target and data. PIUnterminated = The processing instruction must end with \"?>\". ReservedPITarget = The processing instruction target matching \"[xX][mM][lL]\" is not allowed. PI_NOT_IN_ONE_ENTITY = The processing instruction is not enclosed in the same entity. # 2.8 Prolog and Document Type Declaration VersionInfoInvalid = Invalid version \"{0}\". VersionNotSupported = XML version \"{0}\" is not supported, only XML 1.0 is supported. VersionNotSupported11 = XML version \"{0}\" is not supported, only XML 1.0 and XML 1.1 are supported. # 4.1 Character and Entity References DigitRequiredInCharRef = A decimal representation must immediately follow the \"&#\" in a character reference. HexdigitRequiredInCharRef = A hexadecimal representation must immediately follow the \"&#x\" in a character reference. SemicolonRequiredInCharRef = The character reference must end with the ';' delimiter. InvalidCharRef = Character reference \"&#{0}\" is an invalid XML character. NameRequiredInReference = The entity name must immediately follow the '&' in the entity reference. SemicolonRequiredInReference = The reference to entity \"{0}\" must end with the '';'' delimiter. # 4.3.1 The Text Declaration TextDeclMustBeFirst = The text declaration may only appear at the very beginning of the external parsed entity. EqRequiredInTextDecl = The '' = '' character must follow \"{0}\" in the text declaration. QuoteRequiredInTextDecl = The value following \"{0}\" in the text declaration must be a quoted string. CloseQuoteMissingInTextDecl = closing quote in the value following \"{0}\" in the text declaration is missing. SpaceRequiredBeforeVersionInTextDecl = White space is required before the version pseudo attribute in the text declaration. SpaceRequiredBeforeEncodingInTextDecl = White space is required before the encoding pseudo attribute in the text declaration. TextDeclUnterminated = The text declaration must end with \"?>\". EncodingDeclRequired = The encoding declaration is required in the text declaration. NoMorePseudoAttributes = No more pseudo attributes are allowed. MorePseudoAttributes = More pseudo attributes are expected. PseudoAttrNameExpected = A pseudo attribute name is expected. # 4.3.2 Well-Formed Parsed Entities CommentNotInOneEntity = The comment must be entirely contained within the same parsed entity. PINotInOneEntity = The processing instruction must be entirely contained within the same parsed entity. # 4.3.3 Character Encoding in Entities EncodingDeclInvalid = Invalid encoding name \"{0}\". EncodingByteOrderUnsupported = Given byte order for encoding \"{0}\" is not supported. InvalidByte = Invalid byte {0} of {1}-byte UTF-8 sequence. ExpectedByte = Expected byte {0} of {1}-byte UTF-8 sequence. InvalidHighSurrogate = High surrogate bits in UTF-8 sequence must not exceed 0x10 but found 0x{0}. OperationNotSupported = Operation \"{0}\" not supported by {1} reader. InvalidASCII = Byte \"{0}\" is not a member of the (7-bit) ASCII character set. CharConversionFailure = An entity determined to be in a certain encoding must not contain sequences illegal in that encoding. # DTD Messages # 2.2 Characters InvalidCharInEntityValue = An invalid XML character (Unicode: 0x{0}) was found in the literal entity value. InvalidCharInExternalSubset = An invalid XML character (Unicode: 0x{0}) was found in the external subset of the DTD. InvalidCharInIgnoreSect = An invalid XML character (Unicode: 0x{0}) was found in the excluded conditional section. InvalidCharInPublicID = An invalid XML character (Unicode: 0x{0}) was found in the public identifier. InvalidCharInSystemID = An invalid XML character (Unicode: 0x{0}) was found in the system identifier. # 2.3 Common Syntactic Constructs SpaceRequiredAfterSYSTEM = White space is required after keyword SYSTEM in DOCTYPE decl. QuoteRequiredInSystemID = The system identifier must begin with either a single or double quote character. SystemIDUnterminated = The system identifier must end with the matching quote character. SpaceRequiredAfterPUBLIC = White spaces are required after keyword PUBLIC in DOCTYPE decl. QuoteRequiredInPublicID = The public identifier must begin with either a single or double quote character. PublicIDUnterminated = The public identifier must end with the matching quote character. PubidCharIllegal = The character (Unicode: 0x{0}) is not permitted in the public identifier. SpaceRequiredBetweenPublicAndSystem = White spaces are required between publicId and systemId. # 2.8 Prolog and Document Type Declaration MSG_SPACE_REQUIRED_BEFORE_ROOT_ELEMENT_TYPE_IN_DOCTYPEDECL = White space is required after \"''. PEReferenceWithinMarkup = The parameter entity reference \"%{0};\" cannot occur within markup in the internal subset of the DTD. MSG_MARKUP_NOT_RECOGNIZED_IN_DTD = The markup declarations contained or pointed to by the document type declaration must be well-formed. # 2.10 White Space Handling MSG_XML_SPACE_DECLARATION_ILLEGAL = The attribute declaration for \"xml:space\" must be given as an enumerated type whose only possible values are \"default\" and \"preserve\". # 3.2 Element Type Declarations MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ELEMENTDECL = White space is required after \"''. # 3.2.1 Element Content MSG_OPEN_PAREN_OR_ELEMENT_TYPE_REQUIRED_IN_CHILDREN = A ''('' character or an element type is required in the declaration of element type \"{0}\". MSG_CLOSE_PAREN_REQUIRED_IN_CHILDREN = A '')'' is required in the declaration of element type \"{0}\". # 3.2.2 Mixed Content MSG_ELEMENT_TYPE_REQUIRED_IN_MIXED_CONTENT = An element type is required in the declaration of element type \"{0}\". MSG_CLOSE_PAREN_REQUIRED_IN_MIXED = A '')'' is required in the declaration of element type \"{0}\". MixedContentUnterminated = The mixed content model \"{0}\" must end with \")*\" when the types of child elements are constrained. # 3.3 Attribute-List Declarations MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ATTLISTDECL = White space is required after \"\". IgnoreSectUnterminated = The excluded conditional section must end with \"]]>\". # 4.1 Character and Entity References NameRequiredInPEReference = The entity name must immediately follow the '%' in the parameter entity reference. SemicolonRequiredInPEReference = The parameter entity reference \"%{0};\" must end with the '';'' delimiter. # 4.2 Entity Declarations MSG_SPACE_REQUIRED_BEFORE_ENTITY_NAME_IN_ENTITYDECL = White space is required after \"''. MSG_DUPLICATE_ENTITY_DEFINITION = Entity \"{0}\" is declared more than once. # 4.2.2 External Entities ExternalIDRequired = The external entity declaration must begin with either \"SYSTEM\" or \"PUBLIC\". MSG_SPACE_REQUIRED_BEFORE_PUBIDLITERAL_IN_EXTERNALID = White space is required between \"PUBLIC\" and the public identifier. MSG_SPACE_REQUIRED_AFTER_PUBIDLITERAL_IN_EXTERNALID = White space is required between the public identifier and the system identifier. MSG_SPACE_REQUIRED_BEFORE_SYSTEMLITERAL_IN_EXTERNALID = White space is required between \"SYSTEM\" and the system identifier. MSG_URI_FRAGMENT_IN_SYSTEMID = The fragment identifier should not be specified as part of the system identifier \"{0}\". # 4.7 Notation Declarations MSG_SPACE_REQUIRED_BEFORE_NOTATION_NAME_IN_NOTATIONDECL = White space is required after \"''. # Validation messages DuplicateTypeInMixedContent = The element type \"{1}\" was already specified in the content model of the element decl \"{0}\". ENTITIESInvalid = Attribute value \"{1}\" of type ENTITIES must be the names of one or more unparsed entities. ENTITYInvalid = Attribute value \"{1}\" of type ENTITY must be the name of an unparsed entity. IDDefaultTypeInvalid = The ID attribute \"{0}\" must have a declared default of \"#IMPLIED\" or \"#REQUIRED\". IDInvalid = Attribute value \"{0}\" of type ID must be a name. IDInvalidWithNamespaces = Attribute value \"{0}\" of type ID must be an NCName when namespaces are enabled. IDNotUnique = Attribute value \"{0}\" of type ID must be unique within the document. IDREFInvalid = Attribute value \"{0}\" of type IDREF must be a name. IDREFInvalidWithNamespaces = Attribute value \"{0}\" of type IDREF must be an NCName when namespaces are enabled. IDREFSInvalid = Attribute value \"{0}\" of type IDREFS must be one or more names. ILL_FORMED_PARAMETER_ENTITY_WHEN_USED_IN_DECL = The replacement text of parameter entity \"{0}\" must include properly nested declarations when the entity reference is used as a complete declaration. ImproperDeclarationNesting = The replacement text of parameter entity \"{0}\" must include properly nested declarations. ImproperGroupNesting = The replacement text of parameter entity \"{0}\" must include properly nested pairs of parentheses. INVALID_PE_IN_CONDITIONAL = The replacement text of parameter entity \"{0}\" must include the entire conditional section or just INCLUDE or IGNORE. MSG_ATTRIBUTE_NOT_DECLARED = Attribute \"{1}\" must be declared for element type \"{0}\". MSG_ATTRIBUTE_VALUE_NOT_IN_LIST = Attribute \"{0}\" with value \"{1}\" must have a value from the list \"{2}\". MSG_ATTVALUE_CHANGED_DURING_NORMALIZATION_WHEN_STANDALONE = The value \"{1}\" of attribute \"{0}\" must not be changed by normalization (to \"{2}\") in a standalone document. MSG_CONTENT_INCOMPLETE = The content of element type \"{0}\" is incomplete, it must match \"{1}\". MSG_CONTENT_INVALID = The content of element type \"{0}\" must match \"{1}\". MSG_CONTENT_INVALID_SPECIFIED = The content of element type \"{0}\" must match \"{1}\". Children of type \"{2}\" are not allowed. MSG_DEFAULTED_ATTRIBUTE_NOT_SPECIFIED = Attribute \"{1}\" for element type \"{0}\" has a default value and must be specified in a standalone document. MSG_DUPLICATE_ATTDEF = Attribute \"{1}\" is already declared for element type \"{0}\". MSG_ELEMENT_ALREADY_DECLARED = Element type \"{0}\" must not be declared more than once. MSG_ELEMENT_NOT_DECLARED = Element type \"{0}\" must be declared. MSG_GRAMMAR_NOT_FOUND = Document is invalid: no grammar found. MSG_ELEMENT_WITH_ID_REQUIRED = An element with the identifier \"{0}\" must appear in the document. MSG_EXTERNAL_ENTITY_NOT_PERMITTED = The reference to external entity \"{0}\" is not permitted in a standalone document. MSG_FIXED_ATTVALUE_INVALID = Attribute \"{1}\" with value \"{2}\" must have a value of \"{3}\". MSG_MORE_THAN_ONE_ID_ATTRIBUTE = Element type \"{0}\" already has attribute \"{1}\" of type ID, a second attribute \"{2}\" of type ID is not permitted. MSG_MORE_THAN_ONE_NOTATION_ATTRIBUTE = Element type \"{0}\" already has attribute \"{1}\" of type NOTATION, a second attribute \"{2}\" of type NOTATION is not permitted. MSG_NOTATION_NOT_DECLARED_FOR_NOTATIONTYPE_ATTRIBUTE = The notation \"{1}\" must be declared when referenced in the notation type list for attribute \"{0}\". MSG_NOTATION_NOT_DECLARED_FOR_UNPARSED_ENTITYDECL = The notation \"{1}\" must be declared when referenced in the unparsed entity declaration for \"{0}\". MSG_REFERENCE_TO_EXTERNALLY_DECLARED_ENTITY_WHEN_STANDALONE = The reference to entity \"{0}\" declared in an external parsed entity is not permitted in a standalone document. MSG_REQUIRED_ATTRIBUTE_NOT_SPECIFIED = Attribute \"{1}\" is required and must be specified for element type \"{0}\". MSG_WHITE_SPACE_IN_ELEMENT_CONTENT_WHEN_STANDALONE = White space must not occur between elements declared in an external parsed entity with element content in a standalone document. NMTOKENInvalid = Attribute value \"{0}\" of type NMTOKEN must be a name token. NMTOKENSInvalid = Attribute value \"{0}\" of type NMTOKENS must be one or more name tokens. NoNotationOnEmptyElement = Element type \"{0}\" which was declared EMPTY cannot declare attribute \"{1}\" of type NOTATION. RootElementTypeMustMatchDoctypedecl = Document root element \"{1}\", must match DOCTYPE root \"{0}\". UndeclaredElementInContentSpec = The content model of element \"{0}\" refers to the undeclared element \"{1}\". UniqueNotationName = The declaration for the notation \"{0}\" is not unique. A given Name must not be declared in more than one notation declaration. ENTITYFailedInitializeGrammar = ENTITYDatatype Validator: Failed Need to call initialize method with a valid Grammar reference. ENTITYNotUnparsed = ENTITY \"{0}\" is not unparsed. ENTITYNotValid = ENTITY \"{0}\" is not valid. EmptyList = Value of type ENTITIES, IDREFS, and NMTOKENS cannot be empty list. # Entity related messages # 3.1 Start-Tags, End-Tags, and Empty-Element Tags ReferenceToExternalEntity = The external entity reference \"&{0};\" is not permitted in an attribute value. # 4.1 Character and Entity References EntityNotDeclared = The entity \"{0}\" was referenced, but not declared. ReferenceToUnparsedEntity = The unparsed entity reference \"&{0};\" is not permitted. RecursiveReference = Recursive entity reference \"{0}\". (Reference path: {1}), RecursiveGeneralReference = Recursive general entity reference \"&{0};\". (Reference path: {1}), RecursivePEReference = Recursive parameter entity reference \"%{0};\". (Reference path: {1}), # 4.3.3 Character Encoding in Entities EncodingNotSupported = The encoding \"{0}\" is not supported. EncodingRequired = A parsed entity not encoded in either UTF-8 or UTF-16 must contain an encoding declaration. # Namespaces support # 4. Using Qualified Names IllegalQName = Element or attribute do not match QName production: QName::=(NCName':')?NCName. ElementXMLNSPrefix = Element \"{0}\" cannot have \"xmlns\" as its prefix. ElementPrefixUnbound = The prefix \"{0}\" for element \"{1}\" is not bound. AttributePrefixUnbound = The prefix \"{2}\" for attribute \"{1}\" associated with an element type \"{0}\" is not bound. EmptyPrefixedAttName = The value of the attribute \"{0}\" is invalid. Prefixed namespace bindings may not be empty. PrefixDeclared = The namespace prefix \"{0}\" was not declared. CantBindXMLNS = The prefix "xmlns" cannot be bound to any namespace explicitly; neither can the namespace for "xmlns" be bound to any prefix explicitly. CantBindXML = The prefix "xml" cannot be bound to any namespace other than its usual namespace; neither can the namespace for "xml" be bound to any prefix other than "xml". MSG_ATT_DEFAULT_INVALID = The defaultValue \"{1}\" of attribute \"{0}\" is not legal as for the lexical constraints of this attribute type. # REVISIT: These need messages MSG_SPACE_REQUIRED_AFTER_SYSTEMLITERAL_IN_EXTERNALID=MSG_SPACE_REQUIRED_AFTER_SYSTEMLITERAL_IN_EXTERNALID OpenQuoteMissingInDecl=OpenQuoteMissingInDecl InvalidCharInLiteral=InvalidCharInLiteral #Application can set the limit of number of entities that should be expanded by the parser. EntityExpansionLimitExceeded=The parser has encountered more than \"{0}\" entity expansions in this document; this is the limit imposed by the application. ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootaxiom-1.2.8/modules/axiom-dom/src/main/resources/org/apache/axiom/om/impl/dom/msg/DOMMessages.propertiesaxiom-1.2.8/modules/axiom-dom/src/main/resources/org/apache/axiom/om/impl/dom/msg/DOMMessages.proper0000644000000000000000000001462011131637472032042 0ustar rootroot# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you 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. # # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you 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. # # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you 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. # # This file stores localized messages for the Xerces # DOM implementation. # # The messages are arranged in key and value tuples in a ListResourceBundle. # # @version $Id: DOMMessages.properties,v 1.10 2004/07/05 22:36:53 mrglavas Exp $ BadMessageKey = The error message corresponding to the message key can not be found. FormatFailed = An internal error occurred while formatting the following message:\n # DOM Core # exception codes DOMSTRING_SIZE_ERR = The specified range of text does not fit into a DOMString. HIERARCHY_REQUEST_ERR = An attempt was made to insert a node where it is not permitted. INDEX_SIZE_ERR = The index or size is negative, or greater than the allowed value. INUSE_ATTRIBUTE_ERR = An attempt is made to add an attribute that is already in use elsewhere. INVALID_ACCESS_ERR = A parameter or an operation is not supported by the underlying object. INVALID_CHARACTER_ERR = An invalid or illegal XML character is specified. INVALID_MODIFICATION_ERR = An attempt is made to modify the type of the underlying object. INVALID_STATE_ERR = An attempt is made to use an object that is not, or is no longer, usable. NAMESPACE_ERR = An attempt is made to create or change an object in a way which is incorrect with regard to namespaces. NOT_FOUND_ERR = An attempt is made to reference a node in a context where it does not exist. NOT_SUPPORTED_ERR = The implementation does not support the requested type of object or operation. NO_DATA_ALLOWED_ERR = Data is specified for a node which does not support data. NO_MODIFICATION_ALLOWED_ERR = An attempt is made to modify an object where modifications are not allowed. SYNTAX_ERR = An invalid or illegal string is specified. VALIDATION_ERR = A call to a method such as insertBefore or removeChild would make the Node invalid with respect to document grammar. WRONG_DOCUMENT_ERR = A node is used in a different document than the one that created it. TYPE_MISMATCH_ERR = The value type for this parameter name is incompatible with the expected value type. #error messages or exceptions FEATURE_NOT_SUPPORTED = The parameter {0} is recognized but the requested value cannot be set. FEATURE_NOT_FOUND = The parameter {0} is not recognized. STRING_TOO_LONG = The resulting string is too long to fit in a DOMString: ''{0}''. #DOM Level 3 DOMError codes wf-invalid-character = The text {0} of the {1} node contains invalid XML characters. wf-invalid-character-in-node-name = The {0} node named {1} contains invalid XML characters. cdata-sections-splitted = CDATA sections containing the CDATA section termination marker '']]>'' doctype-not-allowed = DOCTYPE declaration is not allowed. unsupported-encoding = The encoding {0} is not supported. #Error codes used in DOM Normalizer InvalidXMLCharInDOM = An invalid XML character (Unicode: 0x{0}) was found in the DOM during normalization. UndeclaredEntRefInAttrValue = The attribute \"{0}\" value \"{1}\" referenced an entity that was not declared. NullLocalElementName = A null local name was encountered during namespace normalization of element {0}. NullLocalAttrName = A null local name was encountered during namespace normalization of attribute {0}. #Error codes used in DOMParser InvalidDocumentClassName = The class name of the document factory \"{0}\" used to construct the DOM tree is not of type org.w3c.dom.Document. MissingDocumentClassName = The class name of the document factory \"{0}\" used to construct the DOM tree could not be found. CannotCreateDocumentClass = The class named \"{0}\" could not be constructed as a org.w3c.dom.Document. # Error codes used by JAXP DocumentBuilder jaxp-order-not-supported = Property ''{0}'' must be set before setting property ''{1}''. jaxp-null-input-source = The source specified cannot be null. #Ranges BAD_BOUNDARYPOINTS_ERR = The boundary-points of a Range do not meet specific requirements. INVALID_NODE_TYPE_ERR = The container of a boundary-point of a Range is being set to either a node of an invalid type or a node with an ancestor of an invalid type. #Events UNSPECIFIED_EVENT_TYPE_ERR = The Event's type was not specified by initializing the event before the method was called. ././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootaxiom-1.2.8/modules/axiom-dom/src/main/resources/org/apache/axiom/om/impl/dom/msg/XMLSerializerMessages.propertiesaxiom-1.2.8/modules/axiom-dom/src/main/resources/org/apache/axiom/om/impl/dom/msg/XMLSerializerMessa0000644000000000000000000001055611131637472032114 0ustar rootroot# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you 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. # # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you 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. # # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you 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. # # This file stores error messages for the Xerces XML # serializer. Many DOM Load/Save error messages also # live here, since the serializer largely implements that package. # # As usual with properties files, the messages are arranged in # key/value tuples. # # @version $Id: XMLSerializerMessages.properties,v 1.4 2005/06/18 03:36:55 mrglavas Exp $ BadMessageKey = The error message corresponding to the message key can not be found. FormatFailed = An internal error occurred while formatting the following message:\n ArgumentIsNull = Argument ''{0}'' is null. NoWriterSupplied = No writer supplied for serializer. MethodNotSupported = The method ''{0}'' is not supported by this factory. ResetInMiddle = The serializer may not be reset in the middle of serialization. Internal = Internal error: element state is zero. NoName = There is no rawName and localName is null. ElementQName = The element name ''{0}'' is not a QName. ElementPrefix = Element ''{0}'' does not belong to any namespace: prefix could be undeclared or bound to some namespace. AttributeQName = The attribute name ''{0}'' is not a QName. AttributePrefix = Attribute ''{0}'' does not belong to any namespace: prefix could be undeclared or bound to some namespace. InvalidNSDecl = Namespace declaration syntax is incorrect: {0}. EndingCDATA = The character sequence \"]]>\" must not appear in content unless used to mark the end of a CDATA section. SplittingCDATA = Splitting a CDATA section containing the CDATA section termination marker \"]]>\". ResourceNotFound = The resource ''{0}'' could not be found. ResourceNotLoaded = The resource ''{0}'' could not be loaded. {1} SerializationStopped = Serialization stopped at user request. # DOM Level 3 load and save messages no-output-specified = no-output-specified: The output destination for data to be written to was null. unsupported-encoding = unsupported-encoding: An unsupported encoding is encountered. unable-to-serialize-node = unable-to-serialize-node: The node could not be serialized. axiom-1.2.8/modules/axiom-dom/src/main/java/0000755000000000000000000000000011131637472017340 5ustar rootrootaxiom-1.2.8/modules/axiom-dom/src/main/java/org/0000755000000000000000000000000011131637472020127 5ustar rootrootaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/0000755000000000000000000000000011131637472021350 5ustar rootrootaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/0000755000000000000000000000000011131637472022465 5ustar rootrootaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/0000755000000000000000000000000011131637472023427 5ustar rootrootaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/0000755000000000000000000000000011131637472024370 5ustar rootrootaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/0000755000000000000000000000000011131637472025147 5ustar rootrootaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPFaultTextImpl.java0000644000000000000000000000552611131637472031247 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.dom; import org.apache.axiom.om.OMAttribute; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.om.impl.dom.AttrImpl; import org.apache.axiom.soap.SOAP12Constants; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPFaultReason; import org.apache.axiom.soap.SOAPFaultText; import org.apache.axiom.soap.SOAPProcessingException; import javax.xml.namespace.QName; public abstract class SOAPFaultTextImpl extends SOAPElement implements SOAPFaultText { protected OMAttribute langAttr; protected OMNamespace langNamespace = null; protected SOAPFaultTextImpl(SOAPFaultReason parent, SOAPFactory factory) throws SOAPProcessingException { super(parent, SOAP12Constants.SOAP_FAULT_TEXT_LOCAL_NAME, true, factory); this.langNamespace = factory.createOMNamespace( SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_NS_URI, SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_NS_PREFIX); } protected SOAPFaultTextImpl(SOAPFaultReason parent, OMXMLParserWrapper builder, SOAPFactory factory) { super(parent, SOAP12Constants.SOAP_FAULT_TEXT_LOCAL_NAME, builder, factory); } public void setLang(String lang) { langAttr = new AttrImpl(this.ownerNode, SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_LOCAL_NAME, langNamespace, lang, this.factory); this.addAttribute(langAttr); } public String getLang() { if (langAttr == null) { langAttr = this.getAttribute( new QName(langNamespace.getNamespaceURI(), SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_LOCAL_NAME, SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_NS_PREFIX)); } return langAttr == null ? null : langAttr.getAttributeValue(); } } axiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPFaultDetailImpl.java0000644000000000000000000000760411131637472031524 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.dom; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.om.impl.serialize.StreamWriterToContentHandlerConverter; import org.apache.axiom.om.impl.util.OMSerializerUtil; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPFault; import org.apache.axiom.soap.SOAPFaultDetail; import org.apache.axiom.soap.SOAPProcessingException; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamWriter; import java.util.Iterator; public abstract class SOAPFaultDetailImpl extends SOAPElement implements SOAPFaultDetail { protected SOAPFaultDetailImpl(SOAPFault parent, boolean extractNamespaceFromParent, SOAPFactory factory) throws SOAPProcessingException { super(parent, factory.getSOAPVersion().getFaultDetailQName().getLocalPart(), extractNamespaceFromParent, factory); } protected SOAPFaultDetailImpl(SOAPFactory factory) { super(factory); } protected SOAPFaultDetailImpl(SOAPFault parent, OMXMLParserWrapper builder, SOAPFactory factory) { super(parent, factory.getSOAPVersion().getFaultDetailQName().getLocalPart(), builder, factory); } public void addDetailEntry(OMElement detailElement) { this.addChild(detailElement); } public Iterator getAllDetailEntries() { return this.getChildren(); } protected void internalSerialize(XMLStreamWriter writer, boolean cache) throws XMLStreamException { // select the builder short builderType = PULL_TYPE_BUILDER; // default is pull type if (builder != null) { builderType = this.builder.getBuilderType(); } if ((builderType == PUSH_TYPE_BUILDER) && (builder.getRegisteredContentHandler() == null)) { builder.registerExternalContentHandler( new StreamWriterToContentHandlerConverter(writer)); } if (!cache) { //No caching if (this.firstChild != null) { OMSerializerUtil.serializeStartpart(this, writer); firstChild.internalSerializeAndConsume(writer); OMSerializerUtil.serializeEndpart(writer); } else if (!this.done) { if (builderType == PULL_TYPE_BUILDER) { OMSerializerUtil.serializeByPullStream(this, writer); } else { OMSerializerUtil.serializeStartpart(this, writer); builder.setCache(cache); builder.next(); OMSerializerUtil.serializeEndpart(writer); } } else { OMSerializerUtil.serializeNormal(this, writer, cache); } // do not serialise the siblings } else { //Cached OMSerializerUtil.serializeNormal(this, writer, cache); // do not serialise the siblings } } } axiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPFaultReasonImpl.java0000644000000000000000000000564611131637472031555 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.dom; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMNode; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.om.util.ElementHelper; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPFault; import org.apache.axiom.soap.SOAPFaultReason; import org.apache.axiom.soap.SOAPFaultText; import org.apache.axiom.soap.SOAPProcessingException; import java.util.ArrayList; import java.util.Iterator; import java.util.List; public abstract class SOAPFaultReasonImpl extends SOAPElement implements SOAPFaultReason { protected SOAPFaultText text; /** * Constructor OMElementImpl * * @param parent * @param builder */ public SOAPFaultReasonImpl(SOAPFault parent, OMXMLParserWrapper builder, SOAPFactory factory) { super(parent, factory.getSOAPVersion().getFaultReasonQName().getLocalPart(), builder, factory); } /** @param parent */ public SOAPFaultReasonImpl(OMElement parent, boolean extractNamespaceFromParent, SOAPFactory factory) throws SOAPProcessingException { super(parent, factory.getSOAPVersion().getFaultReasonQName().getLocalPart(), extractNamespaceFromParent, factory); } /** Eran Chinthaka (chinthaka@apache.org) */ public void addSOAPText(SOAPFaultText soapFaultText) throws SOAPProcessingException { ElementHelper.setNewElement(this, text, soapFaultText); } public List getAllSoapTexts() { //TODO Ruchith check List faultTexts = new ArrayList(); Iterator childrenIter = this.getChildren(); while (childrenIter.hasNext()) { OMNode node = (OMNode) childrenIter.next(); if (node.getType() == OMNode.ELEMENT_NODE && (node instanceof SOAPFaultTextImpl)) { faultTexts.add(((SOAPFaultTextImpl) node)); } } return faultTexts; } public SOAPFaultText getSOAPFaultText(String language) { //TODO Ruchith throw new UnsupportedOperationException(); } } axiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPFaultImpl.java0000644000000000000000000001551211131637472030376 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.dom; import org.apache.axiom.om.OMConstants; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMException; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.om.impl.dom.ElementImpl; import org.apache.axiom.om.impl.serialize.StreamWriterToContentHandlerConverter; import org.apache.axiom.om.impl.util.OMSerializerUtil; import org.apache.axiom.soap.SOAPBody; import org.apache.axiom.soap.SOAPConstants; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPFault; import org.apache.axiom.soap.SOAPFaultCode; import org.apache.axiom.soap.SOAPFaultDetail; import org.apache.axiom.soap.SOAPFaultNode; import org.apache.axiom.soap.SOAPFaultReason; import org.apache.axiom.soap.SOAPFaultRole; import org.apache.axiom.soap.SOAPProcessingException; import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamWriter; import java.io.PrintWriter; import java.io.StringWriter; public abstract class SOAPFaultImpl extends SOAPElement implements SOAPFault, OMConstants { protected Exception e; /** * Constructor SOAPFaultImpl * * @param parent * @param e */ public SOAPFaultImpl(SOAPBody parent, Exception e, SOAPFactory factory) throws SOAPProcessingException { super(parent, SOAPConstants.SOAPFAULT_LOCAL_NAME, true, factory); setException(e); } public void setException(Exception e) { this.e = e; putExceptionToSOAPFault(e); } public SOAPFaultImpl(SOAPBody parent, SOAPFactory factory) throws SOAPProcessingException { super(parent, SOAPConstants.SOAPFAULT_LOCAL_NAME, true, factory); } /** * Constructor SOAPFaultImpl * * @param parent * @param builder */ public SOAPFaultImpl(SOAPBody parent, OMXMLParserWrapper builder, SOAPFactory factory) { super(parent, SOAPConstants.SOAPFAULT_LOCAL_NAME, builder, factory); } protected abstract SOAPFaultDetail getNewSOAPFaultDetail(SOAPFault fault) throws SOAPProcessingException; // --------------- Getters and Settors --------------------------- // public void setCode(SOAPFaultCode soapFaultCode) throws SOAPProcessingException { setNewElement(getCode(), soapFaultCode); } public void setReason(SOAPFaultReason reason) throws SOAPProcessingException { setNewElement(getReason(), reason); } public void setNode(SOAPFaultNode node) throws SOAPProcessingException { setNewElement(getNode(), node); } public void setRole(SOAPFaultRole role) throws SOAPProcessingException { setNewElement(getRole(), role); } public void setDetail(SOAPFaultDetail detail) throws SOAPProcessingException { setNewElement(getDetail(), detail); } /** If exception detailElement is not there we will return null */ public Exception getException() throws OMException { SOAPFaultDetail detail = getDetail(); if (detail == null) { return null; } OMElement exceptionElement = getDetail().getFirstChildWithName( new QName(SOAPConstants.SOAP_FAULT_DETAIL_EXCEPTION_ENTRY)); if (exceptionElement != null && exceptionElement.getText() != null) { return new Exception(exceptionElement.getText()); } return null; } protected void putExceptionToSOAPFault(Exception e) throws SOAPProcessingException { StringWriter sw = new StringWriter(); e.printStackTrace(new PrintWriter(sw)); sw.flush(); getDetail(); if (getDetail() == null) { setDetail(getNewSOAPFaultDetail(this)); } OMElement faultDetailEnty = new ElementImpl(this, SOAPConstants.SOAP_FAULT_DETAIL_EXCEPTION_ENTRY, null, this.factory); faultDetailEnty.setText(sw.getBuffer().toString()); } protected void setNewElement(OMElement myElement, OMElement newElement) { if (myElement != null) { myElement.discard(); } if (newElement != null && newElement.getParent() != null) { newElement.discard(); } this.addChild(newElement); } protected void internalSerialize(XMLStreamWriter writer, boolean cache) throws XMLStreamException { // select the builder short builderType = PULL_TYPE_BUILDER; // default is pull type if (builder != null) { builderType = this.builder.getBuilderType(); } if ((builderType == PUSH_TYPE_BUILDER) && (builder.getRegisteredContentHandler() == null)) { builder .registerExternalContentHandler(new StreamWriterToContentHandlerConverter( writer)); } // this is a special case. This fault element may contain its children // in any order. But spec mandates a specific order // the overriding of the method will facilitate that. Not sure this is // the best method to do this :( build(); OMSerializerUtil.serializeStartpart(this, writer); SOAPFaultCode faultCode = getCode(); if (faultCode != null) { (faultCode).serialize(writer); } SOAPFaultReason faultReason = getReason(); if (faultReason != null) { (faultReason).serialize(writer); } serializeFaultNode(writer); SOAPFaultRole faultRole = getRole(); if (faultRole != null) { (faultRole).serialize(writer); } SOAPFaultDetail faultDetail = getDetail(); if (faultDetail != null) { (faultDetail).serialize(writer); } OMSerializerUtil.serializeEndpart(writer); } protected abstract void serializeFaultNode( XMLStreamWriter writer) throws XMLStreamException; } axiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/factory/0000755000000000000000000000000011131637472026616 5ustar rootroot././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/factory/DOMSOAPFactory.javaaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/factory/DOMSOAPFactory.ja0000644000000000000000000002563511131637472031577 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.dom.factory; import org.apache.axiom.om.OMDataSource; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.om.impl.dom.DocumentImpl; import org.apache.axiom.om.impl.dom.factory.OMDOMFactory; import org.apache.axiom.soap.SOAPBody; import org.apache.axiom.soap.SOAPEnvelope; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPFault; import org.apache.axiom.soap.SOAPFaultCode; import org.apache.axiom.soap.SOAPFaultDetail; import org.apache.axiom.soap.SOAPFaultNode; import org.apache.axiom.soap.SOAPFaultReason; import org.apache.axiom.soap.SOAPFaultRole; import org.apache.axiom.soap.SOAPFaultSubCode; import org.apache.axiom.soap.SOAPFaultText; import org.apache.axiom.soap.SOAPFaultValue; import org.apache.axiom.soap.SOAPHeader; import org.apache.axiom.soap.SOAPHeaderBlock; import org.apache.axiom.soap.SOAPMessage; import org.apache.axiom.soap.SOAPProcessingException; import org.apache.axiom.soap.SOAPVersion; import org.apache.axiom.soap.impl.dom.SOAPEnvelopeImpl; import org.apache.axiom.soap.impl.dom.SOAPMessageImpl; import org.apache.axiom.soap.impl.dom.soap11.SOAP11FaultDetailImpl; import org.apache.axiom.soap.impl.dom.soap12.SOAP12FaultImpl; public class DOMSOAPFactory extends OMDOMFactory implements SOAPFactory { public DOMSOAPFactory() { } public DOMSOAPFactory(DocumentImpl doc) { super(doc); } public String getSoapVersionURI() { throw new UnsupportedOperationException(); } public SOAPVersion getSOAPVersion() { throw new UnsupportedOperationException(); } public SOAPMessage createSOAPMessage(OMXMLParserWrapper builder) { SOAPMessageImpl messageImpl = new SOAPMessageImpl(builder, this); this.document = messageImpl; return messageImpl; } public SOAPMessage createSOAPMessage(SOAPEnvelope envelope, OMXMLParserWrapper parserWrapper) { SOAPMessageImpl messageImpl = new SOAPMessageImpl(envelope, parserWrapper, this); this.document = messageImpl; return messageImpl; } public SOAPEnvelope createSOAPEnvelope(OMXMLParserWrapper builder) { return new SOAPEnvelopeImpl((DocumentImpl) this.createOMDocument(), builder, this); } public SOAPEnvelope createSOAPEnvelope() throws SOAPProcessingException { throw new UnsupportedOperationException(); } public SOAPEnvelope createSOAPEnvelope(OMNamespace ns) { throw new UnsupportedOperationException(); } public SOAPHeader createSOAPHeader(SOAPEnvelope envelope) throws SOAPProcessingException { throw new UnsupportedOperationException(); } public SOAPHeader createSOAPHeader(SOAPEnvelope envelope, OMXMLParserWrapper builder) { throw new UnsupportedOperationException(); } public SOAPHeaderBlock createSOAPHeaderBlock(String localName, OMNamespace ns, SOAPHeader parent) throws SOAPProcessingException { throw new UnsupportedOperationException(); } public SOAPHeaderBlock createSOAPHeaderBlock(String localName, OMNamespace ns, SOAPHeader parent, OMXMLParserWrapper builder) throws SOAPProcessingException { throw new UnsupportedOperationException(); } public SOAPFault createSOAPFault(SOAPBody parent, Exception e) throws SOAPProcessingException { throw new UnsupportedOperationException(); } public SOAPFault createSOAPFault(SOAPBody parent) throws SOAPProcessingException { return new SOAP12FaultImpl(parent, this); } public SOAPFault createSOAPFault(SOAPBody parent, OMXMLParserWrapper builder) { throw new UnsupportedOperationException(); } public SOAPBody createSOAPBody(SOAPEnvelope envelope) throws SOAPProcessingException { throw new UnsupportedOperationException(); } public SOAPBody createSOAPBody(SOAPEnvelope envelope, OMXMLParserWrapper builder) { throw new UnsupportedOperationException(); } public SOAPFaultCode createSOAPFaultCode(SOAPFault parent) throws SOAPProcessingException { throw new UnsupportedOperationException(); } public SOAPFaultCode createSOAPFaultCode(SOAPFault parent, OMXMLParserWrapper builder) { throw new UnsupportedOperationException(); } public SOAPFaultValue createSOAPFaultValue(SOAPFaultCode parent) throws SOAPProcessingException { throw new UnsupportedOperationException(); } public SOAPFaultValue createSOAPFaultValue(SOAPFaultCode parent, OMXMLParserWrapper builder) { throw new UnsupportedOperationException(); } public SOAPFaultValue createSOAPFaultValue(SOAPFaultSubCode parent) throws SOAPProcessingException { throw new UnsupportedOperationException(); } public SOAPFaultValue createSOAPFaultValue(SOAPFaultSubCode parent, OMXMLParserWrapper builder) { throw new UnsupportedOperationException(); } public SOAPFaultSubCode createSOAPFaultSubCode(SOAPFaultCode parent) throws SOAPProcessingException { throw new UnsupportedOperationException(); } public SOAPFaultSubCode createSOAPFaultSubCode(SOAPFaultCode parent, OMXMLParserWrapper builder) { throw new UnsupportedOperationException(); } public SOAPFaultSubCode createSOAPFaultSubCode(SOAPFaultSubCode parent) throws SOAPProcessingException { throw new UnsupportedOperationException(); } public SOAPFaultSubCode createSOAPFaultSubCode(SOAPFaultSubCode parent, OMXMLParserWrapper builder) { throw new UnsupportedOperationException(); } public SOAPFaultReason createSOAPFaultReason(SOAPFault parent) throws SOAPProcessingException { throw new UnsupportedOperationException(); } public SOAPFaultReason createSOAPFaultReason(SOAPFault parent, OMXMLParserWrapper builder) { throw new UnsupportedOperationException(); } public SOAPFaultText createSOAPFaultText(SOAPFaultReason parent) throws SOAPProcessingException { throw new UnsupportedOperationException(); } public SOAPFaultText createSOAPFaultText(SOAPFaultReason parent, OMXMLParserWrapper builder) { throw new UnsupportedOperationException(); } public SOAPFaultNode createSOAPFaultNode(SOAPFault parent) throws SOAPProcessingException { throw new UnsupportedOperationException(); } public SOAPFaultNode createSOAPFaultNode(SOAPFault parent, OMXMLParserWrapper builder) { throw new UnsupportedOperationException(); } public SOAPFaultRole createSOAPFaultRole(SOAPFault parent) throws SOAPProcessingException { throw new UnsupportedOperationException(); } public SOAPFaultRole createSOAPFaultRole(SOAPFault parent, OMXMLParserWrapper builder) { throw new UnsupportedOperationException(); } public SOAPFaultDetail createSOAPFaultDetail(SOAPFault parent) throws SOAPProcessingException { throw new UnsupportedOperationException(); } public SOAPFaultDetail createSOAPFaultDetail(SOAPFault parent, OMXMLParserWrapper builder) { throw new UnsupportedOperationException(); } public SOAPEnvelope getDefaultEnvelope() throws SOAPProcessingException { throw new UnsupportedOperationException(); } public SOAPEnvelope getDefaultFaultEnvelope() throws SOAPProcessingException { SOAPEnvelope defaultEnvelope = getDefaultEnvelope(); SOAPFault fault = createSOAPFault(defaultEnvelope.getBody()); SOAPFaultCode faultCode = createSOAPFaultCode(fault); createSOAPFaultValue(faultCode); SOAPFaultReason reason = createSOAPFaultReason(fault); createSOAPFaultText(reason); createSOAPFaultNode(fault); createSOAPFaultRole(fault); createSOAPFaultDetail(fault); return defaultEnvelope; } public SOAPMessage createSOAPMessage() { return new SOAPMessageImpl(this); } public SOAPHeader createSOAPHeader() throws SOAPProcessingException { throw new UnsupportedOperationException("TODO"); } public SOAPHeaderBlock createSOAPHeaderBlock(String localName, OMNamespace ns) throws SOAPProcessingException { throw new UnsupportedOperationException("TODO"); } /** @see SOAP11Factory,SOAP12Factory */ public SOAPFault createSOAPFault() throws SOAPProcessingException { return null; } public SOAPBody createSOAPBody() throws SOAPProcessingException { throw new UnsupportedOperationException("TODO"); } public SOAPFaultCode createSOAPFaultCode() throws SOAPProcessingException { throw new UnsupportedOperationException("TODO"); } public SOAPFaultValue createSOAPFaultValue() throws SOAPProcessingException { throw new UnsupportedOperationException("TODO"); } public SOAPFaultSubCode createSOAPFaultSubCode() throws SOAPProcessingException { throw new UnsupportedOperationException("TODO"); } public SOAPFaultReason createSOAPFaultReason() throws SOAPProcessingException { throw new UnsupportedOperationException("TODO"); } public SOAPFaultText createSOAPFaultText() throws SOAPProcessingException { throw new UnsupportedOperationException("TODO"); } public SOAPFaultNode createSOAPFaultNode() throws SOAPProcessingException { throw new UnsupportedOperationException("TODO"); } public SOAPFaultRole createSOAPFaultRole() throws SOAPProcessingException { throw new UnsupportedOperationException("TODO"); } public SOAPFaultDetail createSOAPFaultDetail() throws SOAPProcessingException { return new SOAP11FaultDetailImpl(this); } public OMNamespace getNamespace() { throw new UnsupportedOperationException(); } public SOAPHeaderBlock createSOAPHeaderBlock(String localName, OMNamespace ns, OMDataSource ds) throws SOAPProcessingException { throw new UnsupportedOperationException("TODO"); } } axiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPFaultCodeImpl.java0000644000000000000000000000517511131637472031175 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.dom; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.om.util.ElementHelper; import org.apache.axiom.soap.SOAP12Constants; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPFault; import org.apache.axiom.soap.SOAPFaultCode; import org.apache.axiom.soap.SOAPFaultSubCode; import org.apache.axiom.soap.SOAPFaultValue; import org.apache.axiom.soap.SOAPProcessingException; public abstract class SOAPFaultCodeImpl extends SOAPElement implements SOAPFaultCode { /** * Constructor OMElementImpl * * @param parent * @param builder */ public SOAPFaultCodeImpl(SOAPFault parent, OMXMLParserWrapper builder, SOAPFactory factory) { super(parent, factory.getSOAPVersion().getFaultCodeQName().getLocalPart(), builder, factory); } /** @param parent */ public SOAPFaultCodeImpl(SOAPFault parent, boolean extractNamespaceFromParent, SOAPFactory factory) throws SOAPProcessingException { super(parent, factory.getSOAPVersion().getFaultCodeQName().getLocalPart(), extractNamespaceFromParent, factory); } /** Eran Chinthaka (chinthaka@apache.org) */ public void setValue(SOAPFaultValue value) throws SOAPProcessingException { ElementHelper.setNewElement(this, value, value); } public SOAPFaultValue getValue() { return (SOAPFaultValue)getFirstChildWithName(SOAP12Constants.QNAME_FAULT_VALUE); } public void setSubCode(SOAPFaultSubCode value) throws SOAPProcessingException { ElementHelper.setNewElement(this, getSubCode(), value); } public SOAPFaultSubCode getSubCode() { return (SOAPFaultSubCode)getFirstChildWithName(SOAP12Constants.QNAME_FAULT_SUBCODE); } } axiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPMessageImpl.java0000644000000000000000000000464711131637472030716 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.dom; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.om.impl.OMNodeEx; import org.apache.axiom.om.impl.dom.DocumentImpl; import org.apache.axiom.soap.SOAPEnvelope; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPMessage; import org.apache.axiom.soap.SOAPProcessingException; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamWriter; public class SOAPMessageImpl extends DocumentImpl implements SOAPMessage { public SOAPMessageImpl(SOAPFactory factory) { super(factory); } public SOAPMessageImpl(SOAPEnvelope envelope, OMXMLParserWrapper parserWrapper, SOAPFactory factory) { this(parserWrapper, factory); this.setSOAPEnvelope(envelope); } public SOAPMessageImpl(OMXMLParserWrapper parserWrapper, SOAPFactory factory) { super(factory); this.builder = parserWrapper; } public SOAPEnvelope getSOAPEnvelope() throws SOAPProcessingException { return (SOAPEnvelope) getOMDocumentElement(); } public void setSOAPEnvelope(SOAPEnvelope envelope) throws SOAPProcessingException { this.addChild(envelope); } protected void internalSerialize(XMLStreamWriter writer, boolean cache, boolean includeXMLDeclaration) throws XMLStreamException { if (cache) { ((OMNodeEx) this.ownerNode.getDocumentElement()).internalSerialize(writer); } else { ((OMNodeEx) this.ownerNode.getDocumentElement()).internalSerializeAndConsume(writer); } } } axiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPEnvelopeImpl.java0000644000000000000000000003112211131637472031073 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.dom; import org.apache.axiom.om.OMConstants; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMException; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMNode; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.om.impl.MTOMXMLStreamWriter; import org.apache.axiom.om.impl.dom.DocumentImpl; import org.apache.axiom.om.impl.dom.NodeImpl; import org.apache.axiom.om.impl.util.OMSerializerUtil; import org.apache.axiom.soap.SOAP11Constants; import org.apache.axiom.soap.SOAP11Version; import org.apache.axiom.soap.SOAP12Constants; import org.apache.axiom.soap.SOAPBody; import org.apache.axiom.soap.SOAPConstants; import org.apache.axiom.soap.SOAPEnvelope; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPHeader; import org.apache.axiom.soap.SOAPProcessingException; import org.apache.axiom.soap.SOAPVersion; import org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder; import org.apache.axiom.soap.impl.dom.factory.DOMSOAPFactory; import org.w3c.dom.DOMException; import org.w3c.dom.Node; import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamWriter; public class SOAPEnvelopeImpl extends SOAPElement implements SOAPEnvelope, OMConstants { private static final QName HEADER_QNAME = new QName(SOAPConstants.HEADER_LOCAL_NAME); /** @param builder */ public SOAPEnvelopeImpl(OMXMLParserWrapper builder, SOAPFactory factory) { super(null, SOAPConstants.SOAPENVELOPE_LOCAL_NAME, builder, factory); } public SOAPEnvelopeImpl(DocumentImpl doc, OMXMLParserWrapper builder, SOAPFactory factory) { super( doc, SOAPConstants.SOAPENVELOPE_LOCAL_NAME, null, builder, factory); } /** @param ns */ public SOAPEnvelopeImpl(OMNamespace ns, SOAPFactory factory) { super(((DOMSOAPFactory) factory).getDocument(), SOAPConstants.SOAPENVELOPE_LOCAL_NAME, ns, factory); this.getOwnerDocument().appendChild(this); } public SOAPVersion getVersion() { return ((SOAPFactory)factory).getSOAPVersion(); } /** * Returns the SOAPHeader object for this SOAPEnvelope object. *

* This SOAPHeader will just be a container for all the headers in the OMMessage *

* * @return the SOAPHeader object or null if there is none * @throws org.apache.axiom.om.OMException * if there is a problem obtaining the SOAPHeader object * @throws OMException */ public SOAPHeader getHeader() throws OMException { // Header must be the first child OMElement header = getFirstElement(); if (header == null || !(header instanceof SOAPHeader)) { return null; } return (SOAPHeader) header; } /** * Check that a node is allowed as a child of a SOAP envelope. * * @param child */ private void checkChild(OMNode child) { if ((child instanceof OMElement) && !(child instanceof SOAPHeader || child instanceof SOAPBody)) { throw new SOAPProcessingException( "SOAP Envelope can not have children other than SOAP Header and Body", SOAP12Constants.FAULT_CODE_SENDER); } } public void addChild(OMNode child) { if (this.done && (child instanceof SOAPHeader)) { SOAPBody body = getBody(); if (body != null) { body.insertSiblingBefore(child); return; } } super.addChild(child); } public Node insertBefore(Node newChild, Node refChild) throws DOMException { // Check that the child to be added is valid in the context of a SOAP envelope. // Note that this also covers the appendChild case, since that method // calls insertBefore with refChild == null. // SOAP 1.1 allows for arbitrary elements after SOAPBody so do NOT check for // allowed node types when appending to SOAP 1.1 envelope. if (!(getVersion() instanceof SOAP11Version && refChild == null)) { checkChild((OMNode)newChild); } return super.insertBefore(newChild, refChild); } /** * Returns the SOAPBody object associated with this SOAPEnvelope * object. *

* This SOAPBody will just be a container for all the BodyElements in the OMMessage *

* * @return the SOAPBody object for this SOAPEnvelope object or * null if there is none * @throws org.apache.axiom.om.OMException * if there is a problem obtaining the SOAPBody object * @throws OMException */ public SOAPBody getBody() throws OMException { // check for the first element OMElement element = getFirstElement(); if (element != null) { if (SOAPConstants.BODY_LOCAL_NAME.equals(element.getLocalName())) { return (SOAPBody) element; } else { // if not second element SHOULD be the body OMNode node = element.getNextOMSibling(); while (node != null && node.getType() != OMNode.ELEMENT_NODE) { node = node.getNextOMSibling(); } element = (OMElement) node; if (node != null && SOAPConstants.BODY_LOCAL_NAME.equals(element .getLocalName())) { return (SOAPBody) element; } /* else { throw new OMException( "SOAPEnvelope must contain a body element which is either first or second child element of the SOAPEnvelope."); }*/ } } return null; } /** * Method detach * * @throws OMException */ public OMNode detach() throws OMException { throw new OMException("Root Element can not be detached"); } protected void checkParent(OMElement parent) throws SOAPProcessingException { // here do nothing as SOAPEnvelope doesn't have a parent !!! } protected void internalSerialize(XMLStreamWriter writer2, boolean cache) throws XMLStreamException { MTOMXMLStreamWriter writer = (MTOMXMLStreamWriter) writer2; if (!writer.isIgnoreXMLDeclaration()) { String charSetEncoding = writer.getCharSetEncoding(); String xmlVersion = writer.getXmlVersion(); writer.getXmlStreamWriter().writeStartDocument( charSetEncoding == null ? OMConstants.DEFAULT_CHAR_SET_ENCODING : charSetEncoding, xmlVersion == null ? OMConstants.DEFAULT_XML_VERSION : xmlVersion); } if (cache) { //in this case we don't care whether the elements are built or not //we just call the serializeAndConsume methods OMSerializerUtil.serializeStartpart(this, writer); //serialize children SOAPHeader header = getHeader(); if ((header != null) && (header.getFirstOMChild() != null)) { ((SOAPHeaderImpl) header).internalSerialize(writer); } SOAPBody body = getBody(); //REVIEW: getBody has statements to return null..Can it be null in any case? if (body != null) { ((org.apache.axiom.soap.impl.dom.SOAPBodyImpl) body).internalSerialize(writer); } OMSerializerUtil.serializeEndpart(writer); } else { //Now the caching is supposed to be off. However caching been switched off //has nothing to do if the element is already built! if (this.done || (this.builder == null)) { OMSerializerUtil.serializeStartpart(this, writer); OMElement header = getHeader(); if ((header != null) && (header.getFirstOMChild() != null)) { serializeInternally((NodeImpl) header, writer); } SOAPBody body = getBody(); if (body != null) { serializeInternally((NodeImpl) body, writer); } OMSerializerUtil.serializeEndpart(writer); } else { OMSerializerUtil.serializeByPullStream(this, writer, cache); } } } private void serializeInternally(NodeImpl child, MTOMXMLStreamWriter writer) throws XMLStreamException { if ((!(child instanceof OMElement)) || child.isComplete() || child.builder == null) { child.internalSerializeAndConsume(writer); } else { OMElement element = (OMElement) child; element.getBuilder().setCache(false); OMSerializerUtil.serializeByPullStream(element, writer, false); } // child = (NodeImpl) child.getNextOMSibling(); } public OMNode getNextOMSibling() throws OMException { if (this.ownerNode != null && !this.ownerNode.isComplete()) { this.ownerNode.setComplete(true); } return null; } public boolean hasFault() { QName payloadQName = this.getPayloadQName_Optimized(); if (payloadQName != null) { if (SOAPConstants.SOAPFAULT_LOCAL_NAME.equals(payloadQName.getLocalPart())) { String ns = payloadQName.getNamespaceURI(); return (ns != null && (SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(ns) || SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(ns))); } } // Fallback: Get the body and get the fault information from the body SOAPBody body = this.getBody(); return (body == null) ? false : body.hasFault(); } public String getSOAPBodyFirstElementLocalName() { QName payloadQName = this.getPayloadQName_Optimized(); if (payloadQName != null) { return payloadQName.getLocalPart(); } SOAPBody body = this.getBody(); return (body == null) ? null : body.getFirstElementLocalName(); } public OMNamespace getSOAPBodyFirstElementNS() { QName payloadQName = this.getPayloadQName_Optimized(); if (payloadQName != null) { return this.factory.createOMNamespace(payloadQName.getNamespaceURI(), payloadQName.getPrefix()); } SOAPBody body = this.getBody(); return (body == null) ? null : body.getFirstElementNS(); } /** * Use a parser property to fetch the first element in the body. * Returns null if this optimized property is not set or not available. * @return The qname of the first element in the body or null */ private QName getPayloadQName_Optimized() { // The parser may expose a SOAPBODY_FIRST_CHILD_ELEMENT_QNAME property // Use that QName to determine if there is a fault OMXMLParserWrapper builder = this.getBuilder(); if (builder instanceof StAXSOAPModelBuilder) { try { QName payloadQName = (QName) ((StAXSOAPModelBuilder) builder). getReaderProperty(SOAPConstants.SOAPBODY_FIRST_CHILD_ELEMENT_QNAME); return payloadQName; } catch (Throwable e) { // The parser may not support this property. // In such cases, processing continues below in the fallback approach } } return null; } } axiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPFaultRoleImpl.java0000644000000000000000000000734511131637472031225 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.dom; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.om.impl.serialize.StreamWriterToContentHandlerConverter; import org.apache.axiom.om.impl.util.OMSerializerUtil; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPFault; import org.apache.axiom.soap.SOAPFaultRole; import org.apache.axiom.soap.SOAPProcessingException; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamWriter; public abstract class SOAPFaultRoleImpl extends SOAPElement implements SOAPFaultRole { public SOAPFaultRoleImpl(SOAPFault parent, String localName, boolean extractNamespaceFromParent, SOAPFactory factory) throws SOAPProcessingException { super(parent, localName, extractNamespaceFromParent, factory); } public SOAPFaultRoleImpl(SOAPFault parent, OMXMLParserWrapper builder, SOAPFactory factory) { super(parent, factory.getSOAPVersion().getFaultRoleQName().getLocalPart(), builder, factory); } public void setRoleValue(String uri) { if (firstChild != null) { firstChild.detach(); } this.setText(uri); } public String getRoleValue() { return this.getText(); } protected void internalSerialize(XMLStreamWriter writer, boolean cache) throws XMLStreamException { // select the builder short builderType = PULL_TYPE_BUILDER; // default is pull type if (builder != null) { builderType = this.builder.getBuilderType(); } if ((builderType == PUSH_TYPE_BUILDER) && (builder.getRegisteredContentHandler() == null)) { builder.registerExternalContentHandler( new StreamWriterToContentHandlerConverter(writer)); } if (!cache) { //No caching if (this.firstChild != null) { OMSerializerUtil.serializeStartpart(this, writer); firstChild.internalSerializeAndConsume(writer); OMSerializerUtil.serializeEndpart(writer); } else if (!this.done) { if (builderType == PULL_TYPE_BUILDER) { OMSerializerUtil.serializeByPullStream(this, writer); } else { OMSerializerUtil.serializeStartpart(this, writer); builder.setCache(cache); builder.next(); OMSerializerUtil.serializeEndpart(writer); } } else { OMSerializerUtil.serializeNormal(this, writer, cache); } // do not serialise the siblings } else { //Cached OMSerializerUtil.serializeNormal(this, writer, cache); // do not serialise the siblings } } } axiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/0000755000000000000000000000000011131637472026253 5ustar rootroot././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11Factory.javaaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11Factory.java0000644000000000000000000002302511131637472031354 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.dom.soap11; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.om.impl.dom.DocumentImpl; import org.apache.axiom.om.impl.dom.NamespaceImpl; import org.apache.axiom.soap.SOAP11Constants; import org.apache.axiom.soap.SOAPBody; import org.apache.axiom.soap.SOAPEnvelope; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPFault; import org.apache.axiom.soap.SOAPFaultCode; import org.apache.axiom.soap.SOAPFaultDetail; import org.apache.axiom.soap.SOAPFaultNode; import org.apache.axiom.soap.SOAPFaultReason; import org.apache.axiom.soap.SOAPFaultRole; import org.apache.axiom.soap.SOAPFaultSubCode; import org.apache.axiom.soap.SOAPFaultText; import org.apache.axiom.soap.SOAPFaultValue; import org.apache.axiom.soap.SOAPHeader; import org.apache.axiom.soap.SOAPHeaderBlock; import org.apache.axiom.soap.SOAPProcessingException; import org.apache.axiom.soap.SOAPVersion; import org.apache.axiom.soap.SOAP11Version; import org.apache.axiom.soap.impl.dom.SOAPEnvelopeImpl; import org.apache.axiom.soap.impl.dom.factory.DOMSOAPFactory; public class SOAP11Factory extends DOMSOAPFactory { public SOAP11Factory() { } public SOAP11Factory(DocumentImpl doc) { super(doc); } public String getSoapVersionURI() { return SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI; } public SOAPVersion getSOAPVersion() { return SOAP11Version.getSingleton(); } public SOAPEnvelope createSOAPEnvelope() { return new SOAPEnvelopeImpl( new NamespaceImpl( SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI, SOAP11Constants.SOAP_DEFAULT_NAMESPACE_PREFIX), this); } public SOAPEnvelope createSOAPEnvelope(OMNamespace ns) { return new SOAPEnvelopeImpl(ns, this); } public SOAPHeader createSOAPHeader(SOAPEnvelope envelope) throws SOAPProcessingException { return new SOAP11HeaderImpl(envelope, this); } public SOAPHeader createSOAPHeader(SOAPEnvelope envelope, OMXMLParserWrapper builder) { return new SOAP11HeaderImpl(envelope, builder, this); } public SOAPHeaderBlock createSOAPHeaderBlock(String localName, OMNamespace ns) throws SOAPProcessingException { return new SOAP11HeaderBlockImpl(localName, ns, this); } public SOAPHeaderBlock createSOAPHeaderBlock(String localName, OMNamespace ns, SOAPHeader parent) throws SOAPProcessingException { return new SOAP11HeaderBlockImpl(localName, ns, parent, this); } public SOAPHeaderBlock createSOAPHeaderBlock(String localName, OMNamespace ns, SOAPHeader parent, OMXMLParserWrapper builder) throws SOAPProcessingException { return new SOAP11HeaderBlockImpl(localName, ns, parent, builder, this); } public SOAPFault createSOAPFault(SOAPBody parent, Exception e) throws SOAPProcessingException { return new SOAP11FaultImpl(parent, e, this); } public SOAPFault createSOAPFault(SOAPBody parent) throws SOAPProcessingException { return new SOAP11FaultImpl(parent, this); } public SOAPFault createSOAPFault(SOAPBody parent, OMXMLParserWrapper builder) { return new SOAP11FaultImpl(parent, builder, this); } public SOAPBody createSOAPBody(SOAPEnvelope envelope) throws SOAPProcessingException { return new SOAP11BodyImpl(envelope, (SOAPFactory) envelope .getOMFactory()); } public SOAPBody createSOAPBody(SOAPEnvelope envelope, OMXMLParserWrapper builder) { return new SOAP11BodyImpl(envelope, builder, (SOAPFactory) envelope .getOMFactory()); } public SOAPFaultCode createSOAPFaultCode(SOAPFault parent) throws SOAPProcessingException { return new SOAP11FaultCodeImpl(parent, this); } public SOAPFaultCode createSOAPFaultCode(SOAPFault parent, OMXMLParserWrapper builder) { return new SOAP11FaultCodeImpl(parent, builder, this); } public SOAPFaultValue createSOAPFaultValue(SOAPFaultCode parent) throws SOAPProcessingException { return new SOAP11FaultValueImpl(parent, this); } public SOAPFaultValue createSOAPFaultValue(SOAPFaultCode parent, OMXMLParserWrapper builder) { return new SOAP11FaultValueImpl(parent, builder, this); } //added public SOAPFaultValue createSOAPFaultValue(SOAPFaultSubCode parent) throws SOAPProcessingException { return new SOAP11FaultValueImpl(parent, this); } //added public SOAPFaultValue createSOAPFaultValue(SOAPFaultSubCode parent, OMXMLParserWrapper builder) { return new SOAP11FaultValueImpl(parent, builder, this); } //changed public SOAPFaultSubCode createSOAPFaultSubCode(SOAPFaultCode parent) throws SOAPProcessingException { return new SOAP11FaultSubCodeImpl(parent, this); } //changed public SOAPFaultSubCode createSOAPFaultSubCode(SOAPFaultCode parent, OMXMLParserWrapper builder) { return new SOAP11FaultSubCodeImpl(parent, builder, this); } public SOAPFaultSubCode createSOAPFaultSubCode(SOAPFaultSubCode parent) throws SOAPProcessingException { return new SOAP11FaultSubCodeImpl(parent, this); } public SOAPFaultSubCode createSOAPFaultSubCode(SOAPFaultSubCode parent, OMXMLParserWrapper builder) { return new SOAP11FaultSubCodeImpl(parent, builder, this); } public SOAPFaultReason createSOAPFaultReason(SOAPFault parent) throws SOAPProcessingException { return new SOAP11FaultReasonImpl(parent, this); } public SOAPFaultReason createSOAPFaultReason(SOAPFault parent, OMXMLParserWrapper builder) { return new SOAP11FaultReasonImpl(parent, builder, this); } public SOAPFaultText createSOAPFaultText(SOAPFaultReason parent) throws SOAPProcessingException { return new SOAP11FaultTextImpl(parent, this); } public SOAPFaultText createSOAPFaultText(SOAPFaultReason parent, OMXMLParserWrapper builder) { return new SOAP11FaultTextImpl(parent, builder, this); } public SOAPFaultNode createSOAPFaultNode(SOAPFault parent) throws SOAPProcessingException { throw new UnsupportedOperationException("SOAP 1.1 has no SOAP Fault Node"); } public SOAPFaultNode createSOAPFaultNode(SOAPFault parent, OMXMLParserWrapper builder) { throw new UnsupportedOperationException("SOAP 1.1 has no SOAP Fault Node"); } public SOAPFaultRole createSOAPFaultRole(SOAPFault parent) throws SOAPProcessingException { return new SOAP11FaultRoleImpl(parent, this); } public SOAPFaultRole createSOAPFaultRole(SOAPFault parent, OMXMLParserWrapper builder) { return new SOAP11FaultRoleImpl(parent, builder, this); } public SOAPFaultDetail createSOAPFaultDetail(SOAPFault parent) throws SOAPProcessingException { return new SOAP11FaultDetailImpl(parent, this); } public SOAPFaultDetail createSOAPFaultDetail(SOAPFault parent, OMXMLParserWrapper builder) { return new SOAP11FaultDetailImpl(parent, builder, this); } public SOAPEnvelope getDefaultEnvelope() throws SOAPProcessingException { OMNamespace ns = new NamespaceImpl( SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI, SOAP11Constants.SOAP_DEFAULT_NAMESPACE_PREFIX); SOAPEnvelopeImpl env = new SOAPEnvelopeImpl(ns, this); createSOAPHeader(env); createSOAPBody(env); return env; } public OMNamespace getNamespace() { return new NamespaceImpl(SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI, SOAP11Constants.SOAP_DEFAULT_NAMESPACE_PREFIX); } public SOAPFault createSOAPFault() throws SOAPProcessingException { return new SOAP11FaultImpl(this.getDefaultEnvelope().getBody(), this); } } ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11FaultReasonImpl.javaaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11FaultReasonI0000644000000000000000000000673611131637472031373 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.dom.soap11; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.om.impl.serialize.StreamWriterToContentHandlerConverter; import org.apache.axiom.om.impl.util.OMSerializerUtil; import org.apache.axiom.soap.SOAP11Constants; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPFault; import org.apache.axiom.soap.SOAPFaultText; import org.apache.axiom.soap.SOAPProcessingException; import org.apache.axiom.soap.impl.dom.SOAPFaultReasonImpl; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamWriter; public class SOAP11FaultReasonImpl extends SOAPFaultReasonImpl { public SOAP11FaultReasonImpl(SOAPFault parent, OMXMLParserWrapper builder, SOAPFactory factory) { super(parent, builder, factory); } /** @param parent */ public SOAP11FaultReasonImpl(SOAPFault parent, SOAPFactory factory) throws SOAPProcessingException { super(parent, false, factory); } public void addSOAPText(SOAPFaultText soapFaultText) throws SOAPProcessingException { throw new UnsupportedOperationException("addSOAPText() not allowed for SOAP 1.1!"); } protected void checkParent(OMElement parent) throws SOAPProcessingException { if (!(parent instanceof SOAP11FaultImpl)) { throw new SOAPProcessingException( "Expecting SOAP 1.1 implementation of SOAP Fault as the " + "parent. But received some other implementation"); } } protected void internalSerialize(XMLStreamWriter writer, boolean cache) throws XMLStreamException { // select the builder short builderType = PULL_TYPE_BUILDER; // default is pull type if (builder != null) { builderType = this.builder.getBuilderType(); } if ((builderType == PUSH_TYPE_BUILDER) && (builder.getRegisteredContentHandler() == null)) { builder.registerExternalContentHandler( new StreamWriterToContentHandlerConverter(writer)); } OMSerializerUtil.serializeStartpart(this, SOAP11Constants.SOAP_FAULT_STRING_LOCAL_NAME, writer); writer.writeCharacters(this.getText()); writer.writeEndElement(); } public String getLocalName() { return SOAP11Constants.SOAP_FAULT_STRING_LOCAL_NAME; } public SOAPFaultText getFirstSOAPText() { throw new UnsupportedOperationException("getFirstSOAPText() not supported for SOAP 1.1!"); } } ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11FaultRoleImpl.javaaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11FaultRoleImp0000644000000000000000000000577711131637472031406 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.dom.soap11; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.om.impl.serialize.StreamWriterToContentHandlerConverter; import org.apache.axiom.om.impl.util.OMSerializerUtil; import org.apache.axiom.soap.SOAP11Constants; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPFault; import org.apache.axiom.soap.SOAPProcessingException; import org.apache.axiom.soap.impl.dom.SOAPFaultRoleImpl; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamWriter; public class SOAP11FaultRoleImpl extends SOAPFaultRoleImpl { public SOAP11FaultRoleImpl(SOAPFault parent, SOAPFactory factory) throws SOAPProcessingException { super(parent, SOAP11Constants.SOAP_FAULT_ACTOR_LOCAL_NAME, false, factory); } public SOAP11FaultRoleImpl(SOAPFault parent, OMXMLParserWrapper builder, SOAPFactory factory) { super(parent, builder, factory); } protected void checkParent(OMElement parent) throws SOAPProcessingException { if (!(parent instanceof SOAP11FaultImpl)) { throw new SOAPProcessingException( "Expecting SOAP 1.1 implementation of SOAP Fault as the " + "parent. But received some other implementation"); } } protected void internalSerialize(XMLStreamWriter writer, boolean cache) throws XMLStreamException { // select the builder short builderType = PULL_TYPE_BUILDER; // default is pull type if (builder != null) { builderType = this.builder.getBuilderType(); } if ((builderType == PUSH_TYPE_BUILDER) && (builder.getRegisteredContentHandler() == null)) { builder.registerExternalContentHandler( new StreamWriterToContentHandlerConverter(writer)); } OMSerializerUtil.serializeStartpart(this, SOAP11Constants.SOAP_FAULT_ACTOR_LOCAL_NAME, writer); writer.writeCharacters(this.getText()); writer.writeEndElement(); } } ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11FaultValueImpl.javaaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11FaultValueIm0000644000000000000000000000375111131637472031367 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.dom.soap11; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPProcessingException; import org.apache.axiom.soap.impl.dom.SOAPFaultValueImpl; public class SOAP11FaultValueImpl extends SOAPFaultValueImpl { public SOAP11FaultValueImpl(OMElement parent, SOAPFactory factory) throws SOAPProcessingException { super(parent, factory); } public SOAP11FaultValueImpl(OMElement parent, OMXMLParserWrapper builder, SOAPFactory factory) { super(parent, builder, factory); } protected void checkParent(OMElement parent) throws SOAPProcessingException { if (!((parent instanceof SOAP11FaultSubCodeImpl) || (parent instanceof SOAP11FaultCodeImpl))) { throw new SOAPProcessingException( "Expecting SOAP 1.1 implementation of SOAP FaultSubCode " + "or SOAP FaultCode as the parent. But received some other" + " implementation." + parent.getClass()); } } } ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11FaultDetailImpl.javaaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11FaultDetailI0000644000000000000000000000622011131637472031332 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.dom.soap11; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.om.impl.serialize.StreamWriterToContentHandlerConverter; import org.apache.axiom.om.impl.util.OMSerializerUtil; import org.apache.axiom.soap.SOAP11Constants; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPFault; import org.apache.axiom.soap.SOAPProcessingException; import org.apache.axiom.soap.impl.dom.SOAPFaultDetailImpl; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamWriter; public class SOAP11FaultDetailImpl extends SOAPFaultDetailImpl { public SOAP11FaultDetailImpl(SOAPFault parent, SOAPFactory factory) throws SOAPProcessingException { super(parent, false, factory); } public SOAP11FaultDetailImpl(SOAPFault parent, OMXMLParserWrapper builder, SOAPFactory factory) { super(parent, builder, factory); } public SOAP11FaultDetailImpl(SOAPFactory factory) { super(factory); } protected void checkParent(OMElement parent) throws SOAPProcessingException { if (!(parent instanceof SOAP11FaultImpl)) { throw new SOAPProcessingException( "Expecting SOAP 1.1 implementation of SOAP Fault as " + "the parent. But received some other implementation"); } } public void internalSerialize(XMLStreamWriter writer, boolean cache) throws XMLStreamException { // select the builder short builderType = PULL_TYPE_BUILDER; // default is pull type if (builder != null) { builderType = this.builder.getBuilderType(); } if ((builderType == PUSH_TYPE_BUILDER) && (builder.getRegisteredContentHandler() == null)) { builder.registerExternalContentHandler( new StreamWriterToContentHandlerConverter(writer)); } OMSerializerUtil.serializeStartpart(this, SOAP11Constants.SOAP_FAULT_DETAIL_LOCAL_NAME, writer); writer.writeCharacters(this.getText()); if (firstChild != null) { firstChild.internalSerializeAndConsume(writer); } writer.writeEndElement(); } } ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11FaultCodeImpl.javaaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11FaultCodeImp0000644000000000000000000001003211131637472031333 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.dom.soap11; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.om.impl.serialize.StreamWriterToContentHandlerConverter; import org.apache.axiom.om.impl.util.OMSerializerUtil; import org.apache.axiom.soap.SOAP11Constants; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPFault; import org.apache.axiom.soap.SOAPFaultSubCode; import org.apache.axiom.soap.SOAPFaultValue; import org.apache.axiom.soap.SOAPProcessingException; import org.apache.axiom.soap.impl.dom.SOAPFaultCodeImpl; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamWriter; public class SOAP11FaultCodeImpl extends SOAPFaultCodeImpl { /** * Constructor OMElementImpl * * @param parent * @param builder */ public SOAP11FaultCodeImpl(SOAPFault parent, OMXMLParserWrapper builder, SOAPFactory factory) { super(parent, builder, factory); } /** @param parent */ public SOAP11FaultCodeImpl(SOAPFault parent, SOAPFactory factory) throws SOAPProcessingException { super(parent, false, factory); } public void setSubCode(SOAPFaultSubCode subCode) throws SOAPProcessingException { if (!(subCode instanceof SOAP11FaultSubCodeImpl)) { throw new SOAPProcessingException( "Expecting SOAP 1.1 implementation of SOAP Fault Sub " + "Code. But received some other implementation"); } super.setSubCode(subCode); } public void setValue(SOAPFaultValue value) throws SOAPProcessingException { if (!(value instanceof SOAP11FaultValueImpl)) { throw new SOAPProcessingException( "Expecting SOAP 1.1 implementation of SOAP Fault Value. " + "But received some other implementation"); } super.setValue(value); } protected void checkParent(OMElement parent) throws SOAPProcessingException { if (!(parent instanceof SOAP11FaultImpl)) { throw new SOAPProcessingException( "Expecting SOAP 1.1 implementation of SOAP Fault as the " + "parent. But received some other implementation"); } } protected void internalSerialize( XMLStreamWriter writer, boolean cache) throws XMLStreamException { // select the builder short builderType = PULL_TYPE_BUILDER; // default is pull type if (builder != null) { builderType = this.builder.getBuilderType(); } if ((builderType == PUSH_TYPE_BUILDER) && (builder.getRegisteredContentHandler() == null)) { builder.registerExternalContentHandler( new StreamWriterToContentHandlerConverter(writer)); } OMSerializerUtil.serializeStartpart(this, SOAP11Constants.SOAP_FAULT_CODE_LOCAL_NAME, writer); writer.writeCharacters(this.getText()); writer.writeEndElement(); } public String getLocalName() { return SOAP11Constants.SOAP_FAULT_CODE_LOCAL_NAME; } } ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11FaultTextImpl.javaaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11FaultTextImp0000644000000000000000000000357011131637472031416 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.dom.soap11; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPFaultReason; import org.apache.axiom.soap.SOAPProcessingException; import org.apache.axiom.soap.impl.dom.SOAPFaultTextImpl; public class SOAP11FaultTextImpl extends SOAPFaultTextImpl { public SOAP11FaultTextImpl(SOAPFaultReason parent, SOAPFactory factory) throws SOAPProcessingException { super(parent, factory); } public SOAP11FaultTextImpl(SOAPFaultReason parent, OMXMLParserWrapper builder, SOAPFactory factory) { super(parent, builder, factory); } protected void checkParent(OMElement parent) throws SOAPProcessingException { if (!(parent instanceof SOAP11FaultReasonImpl)) { throw new SOAPProcessingException( "Expecting SOAP 1.1 implementation of SOAP FaultReason " + "as the parent. But received some other implementation"); } } } ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11FaultSubCodeImpl.javaaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11FaultSubCode0000644000000000000000000000722511131637472031351 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.dom.soap11; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.soap.SOAP12Constants; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPFaultCode; import org.apache.axiom.soap.SOAPFaultSubCode; import org.apache.axiom.soap.SOAPFaultValue; import org.apache.axiom.soap.SOAPProcessingException; import org.apache.axiom.soap.impl.dom.SOAPFaultSubCodeImpl; public class SOAP11FaultSubCodeImpl extends SOAPFaultSubCodeImpl { //changed public SOAP11FaultSubCodeImpl(SOAPFaultCode parent, SOAPFactory factory) throws SOAPProcessingException { super(parent, SOAP12Constants.SOAP_FAULT_SUB_CODE_LOCAL_NAME, factory); } //changed public SOAP11FaultSubCodeImpl(SOAPFaultCode parent, OMXMLParserWrapper builder, SOAPFactory factory) { super(parent, SOAP12Constants.SOAP_FAULT_SUB_CODE_LOCAL_NAME, builder, factory); } public SOAP11FaultSubCodeImpl(SOAPFaultSubCode parent, SOAPFactory factory) throws SOAPProcessingException { super(parent, SOAP12Constants.SOAP_FAULT_SUB_CODE_LOCAL_NAME, factory); } public SOAP11FaultSubCodeImpl(SOAPFaultSubCode parent, OMXMLParserWrapper builder, SOAPFactory factory) { super(parent, SOAP12Constants.SOAP_FAULT_SUB_CODE_LOCAL_NAME, builder, factory); } protected void checkParent(OMElement parent) throws SOAPProcessingException { if (!(parent instanceof SOAP11FaultSubCodeImpl) || (parent instanceof SOAP11FaultCodeImpl)) { throw new SOAPProcessingException("Expecting SOAP 1.1 " + "implementation of SOAP FaultSubCode or SOAP FaultCode as" + " the parent. But received some other implementation"); } } public void setSubCode(SOAPFaultSubCode subCode) throws SOAPProcessingException { if (!((parentNode instanceof SOAP11FaultSubCodeImpl) || (parentNode instanceof SOAP11FaultCodeImpl))) { throw new SOAPProcessingException( "Expecting SOAP 1.1 implementation of SOAP Fault Sub " + "Code. But received some other implementation"); } super.setSubCode(subCode); } public void setValue(SOAPFaultValue soapFaultSubCodeValue) throws SOAPProcessingException { if (!(soapFaultSubCodeValue instanceof SOAP11FaultValueImpl)) { throw new SOAPProcessingException( "Expecting SOAP 1.1 implementation of SOAP Fault Value. " + "But received some other implementation"); } super.setValue(soapFaultSubCodeValue); } } ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11HeaderImpl.javaaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11HeaderImpl.j0000644000000000000000000000654311131637472031275 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.dom.soap11; import org.apache.axiom.om.OMException; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.om.impl.OMNodeEx; import org.apache.axiom.om.impl.traverse.OMChildrenWithSpecificAttributeIterator; import org.apache.axiom.soap.SOAP11Constants; import org.apache.axiom.soap.SOAPEnvelope; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPHeaderBlock; import org.apache.axiom.soap.SOAPProcessingException; import org.apache.axiom.soap.impl.dom.SOAPHeaderImpl; import javax.xml.namespace.QName; import java.util.Iterator; public class SOAP11HeaderImpl extends SOAPHeaderImpl { /** @param envelope */ public SOAP11HeaderImpl(SOAPEnvelope envelope, SOAPFactory factory) throws SOAPProcessingException { super(envelope, factory); } /** * Constructor SOAPHeaderImpl * * @param envelope * @param builder */ public SOAP11HeaderImpl(SOAPEnvelope envelope, OMXMLParserWrapper builder, SOAPFactory factory) { super(envelope, builder, factory); } public SOAPHeaderBlock addHeaderBlock(String localName, OMNamespace ns) throws OMException { if (ns == null || ns.getNamespaceURI() == null || "".equals(ns.getNamespaceURI())) { throw new OMException( "All the SOAP Header blocks should be namespace qualified"); } OMNamespace namespace = findNamespace(ns.getNamespaceURI(), ns.getPrefix()); if (namespace != null) { ns = namespace; } SOAPHeaderBlock soapHeaderBlock = null; try { soapHeaderBlock = new SOAP11HeaderBlockImpl(localName, ns, this, (SOAPFactory) this.factory); } catch (SOAPProcessingException e) { throw new OMException(e); } ((OMNodeEx) soapHeaderBlock).setComplete(true); return soapHeaderBlock; } public Iterator extractHeaderBlocks(String role) { return new OMChildrenWithSpecificAttributeIterator(getFirstOMChild(), new QName( SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI, SOAP11Constants.ATTR_ACTOR), role, true); } } ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11BodyImpl.javaaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11BodyImpl.jav0000644000000000000000000000355511131637472031331 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.dom.soap11; import org.apache.axiom.om.OMException; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.soap.SOAPEnvelope; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPFault; import org.apache.axiom.soap.SOAPProcessingException; import org.apache.axiom.soap.impl.dom.SOAPBodyImpl; public class SOAP11BodyImpl extends SOAPBodyImpl { /** @param envelope */ public SOAP11BodyImpl(SOAPEnvelope envelope, SOAPFactory factory) throws SOAPProcessingException { super(envelope, factory); } /** * Constructor SOAPBodyImpl * * @param envelope * @param builder */ public SOAP11BodyImpl(SOAPEnvelope envelope, OMXMLParserWrapper builder, SOAPFactory factory) { super(envelope, builder, factory); } public SOAPFault addFault(Exception e) throws OMException { SOAPFault soapFault = new SOAP11FaultImpl(this, e, (SOAPFactory) this.factory); this.hasSOAPFault = true; return soapFault; } } ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11HeaderBlockImpl.javaaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11HeaderBlockI0000644000000000000000000001341411131637472031302 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.dom.soap11; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.soap.SOAP11Constants; import org.apache.axiom.soap.SOAPConstants; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPHeader; import org.apache.axiom.soap.SOAPProcessingException; import org.apache.axiom.soap.SOAPVersion; import org.apache.axiom.soap.SOAP11Version; import org.apache.axiom.soap.impl.dom.SOAPHeaderBlockImpl; public class SOAP11HeaderBlockImpl extends SOAPHeaderBlockImpl { /** * @param localName * @param ns */ public SOAP11HeaderBlockImpl(String localName, OMNamespace ns, SOAPHeader parent, SOAPFactory factory) throws SOAPProcessingException { super(localName, ns, parent, factory); checkParent(parent); } public SOAP11HeaderBlockImpl(String localName, OMNamespace ns, SOAPFactory factory) { super(localName, ns, factory); } /** * Constructor SOAPHeaderBlockImpl * * @param localName * @param ns * @param parent * @param builder */ public SOAP11HeaderBlockImpl(String localName, OMNamespace ns, OMElement parent, OMXMLParserWrapper builder, SOAPFactory factory) { super(localName, ns, parent, builder, factory); } protected void checkParent(OMElement parent) throws SOAPProcessingException { if (!(parent instanceof SOAP11HeaderImpl)) { throw new SOAPProcessingException( "Expecting SOAP 1.1 implementation of SOAP Body as the parent. But received some other implementation"); } } public void setRole(String roleURI) { setAttribute(SOAP11Constants.ATTR_ACTOR, roleURI, SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI); } public String getRole() { return getAttribute(SOAP11Constants.ATTR_ACTOR, SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI); } //TODO : implement public void setRelay(boolean relay) { throw new UnsupportedOperationException("Not supported for SOAP 1.1"); } //TODO : implement public boolean getRelay() { throw new UnsupportedOperationException("Not supported for SOAP 1.1"); } public void setMustUnderstand(boolean mustUnderstand) { setAttribute(SOAPConstants.ATTR_MUSTUNDERSTAND, mustUnderstand ? "1" : "0", SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI); } public void setMustUnderstand(String mustUnderstand) throws SOAPProcessingException { if (SOAPConstants.ATTR_MUSTUNDERSTAND_TRUE.equals(mustUnderstand) || SOAPConstants.ATTR_MUSTUNDERSTAND_FALSE.equals(mustUnderstand) || SOAPConstants.ATTR_MUSTUNDERSTAND_0.equals(mustUnderstand) || SOAPConstants.ATTR_MUSTUNDERSTAND_1.equals(mustUnderstand)) { setAttribute(SOAPConstants.ATTR_MUSTUNDERSTAND, mustUnderstand, SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI); } else { throw new SOAPProcessingException( "mustUndertand should be one of \"true\", \"false\", \"0\" or \"1\" "); } } /** * Returns whether the mustUnderstand attribute for this SOAPHeaderBlock object is * turned on. * * @return true if the mustUnderstand attribute of this * SOAPHeaderBlock object is turned on; false otherwise */ public boolean getMustUnderstand() throws SOAPProcessingException { String mustUnderstand; if ((mustUnderstand = getAttribute(SOAPConstants.ATTR_MUSTUNDERSTAND, SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI)) != null) { if (SOAPConstants.ATTR_MUSTUNDERSTAND_TRUE.equals(mustUnderstand) || SOAPConstants.ATTR_MUSTUNDERSTAND_1.equals(mustUnderstand)) { return true; } else if (SOAPConstants.ATTR_MUSTUNDERSTAND_FALSE.equals(mustUnderstand) || SOAPConstants.ATTR_MUSTUNDERSTAND_0.equals(mustUnderstand)) { return false; } else { throw new SOAPProcessingException( "Invalid value found in mustUnderstand value of " + this.getLocalName() + " header block"); } } return false; } /** * What SOAP version is this HeaderBlock? * * @return a SOAPVersion, one of the two singletons. */ public SOAPVersion getVersion() { return SOAP11Version.getSingleton(); } } ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11FaultImpl.javaaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11FaultImpl.ja0000644000000000000000000001217511131637472031317 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.dom.soap11; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.soap.SOAP11Constants; import org.apache.axiom.soap.SOAPBody; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPFault; import org.apache.axiom.soap.SOAPFaultCode; import org.apache.axiom.soap.SOAPFaultDetail; import org.apache.axiom.soap.SOAPFaultNode; import org.apache.axiom.soap.SOAPFaultReason; import org.apache.axiom.soap.SOAPFaultRole; import org.apache.axiom.soap.SOAPProcessingException; import org.apache.axiom.soap.impl.dom.SOAPFaultImpl; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamWriter; public class SOAP11FaultImpl extends SOAPFaultImpl { public SOAP11FaultImpl(SOAPBody parent, Exception e, SOAPFactory factory) throws SOAPProcessingException { super(parent, e, factory); } public SOAP11FaultImpl(SOAPBody parent, OMXMLParserWrapper builder, SOAPFactory factory) { super(parent, builder, factory); } /** * This is a convenience method for the SOAP Fault Impl. * * @param parent */ public SOAP11FaultImpl(SOAPBody parent, SOAPFactory factory) throws SOAPProcessingException { super(parent, factory); } protected SOAPFaultDetail getNewSOAPFaultDetail(SOAPFault fault) throws SOAPProcessingException { return new SOAP11FaultDetailImpl(fault, (SOAPFactory) this.factory); } public void setCode(SOAPFaultCode soapFaultCode) throws SOAPProcessingException { if (!(soapFaultCode instanceof SOAP11FaultCodeImpl)) { throw new SOAPProcessingException( "Expecting SOAP 1.1 implementation of SOAP Fault Code. " + "But received some other implementation"); } super.setCode(soapFaultCode); } public void setReason(SOAPFaultReason reason) throws SOAPProcessingException { if (!(reason instanceof SOAP11FaultReasonImpl)) { throw new SOAPProcessingException( "Expecting SOAP 1.1 implementation of SOAP Fault Reason. " + "But received some other implementation"); } super.setReason(reason); } public void setNode(SOAPFaultNode node) throws SOAPProcessingException { throw new UnsupportedOperationException("SOAP 1.1 has no SOAP Fault Node"); } public void setRole(SOAPFaultRole role) throws SOAPProcessingException { if (!(role instanceof SOAP11FaultRoleImpl)) { throw new SOAPProcessingException( "Expecting SOAP 1.1 implementation of SOAP Fault Role. " + "But received some other implementation"); } super.setRole(role); } protected void checkParent(OMElement parent) throws SOAPProcessingException { if (!(parent instanceof SOAP11BodyImpl)) { throw new SOAPProcessingException( "Expecting SOAP 1.1 implementation of SOAP Body as the " + "parent. But received some other implementation"); } } public void setDetail(SOAPFaultDetail detail) throws SOAPProcessingException { if (!(detail instanceof SOAP11FaultDetailImpl)) { throw new SOAPProcessingException( "Expecting SOAP 1.1 implementation of SOAP Fault Detail. " + "But received some other implementation"); } super.setDetail(detail); } protected void serializeFaultNode( XMLStreamWriter writer) throws XMLStreamException { } public SOAPFaultRole getRole() { return (SOAP11FaultRoleImpl)getFirstChildWithName(SOAP11Constants.QNAME_FAULT_ROLE); } public SOAPFaultCode getCode() { return (SOAPFaultCode)getFirstChildWithName(SOAP11Constants.QNAME_FAULT_CODE); } public SOAPFaultReason getReason() { return (SOAPFaultReason)getFirstChildWithName(SOAP11Constants.QNAME_FAULT_REASON); } public SOAPFaultDetail getDetail() { return (SOAPFaultDetail)getFirstChildWithName(SOAP11Constants.QNAME_FAULT_DETAIL); } public SOAPFaultNode getNode() { throw new UnsupportedOperationException("SOAP 1.1 has no Fault Node"); } } axiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPFaultNodeImpl.java0000644000000000000000000000705211131637472031204 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.dom; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.om.impl.serialize.StreamWriterToContentHandlerConverter; import org.apache.axiom.om.impl.util.OMSerializerUtil; import org.apache.axiom.soap.SOAP12Constants; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPFault; import org.apache.axiom.soap.SOAPFaultNode; import org.apache.axiom.soap.SOAPProcessingException; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamWriter; public abstract class SOAPFaultNodeImpl extends SOAPElement implements SOAPFaultNode { public SOAPFaultNodeImpl(SOAPFault parent, SOAPFactory factory) throws SOAPProcessingException { super(parent, SOAP12Constants.SOAP_FAULT_NODE_LOCAL_NAME, true, factory); } public SOAPFaultNodeImpl(SOAPFault parent, OMXMLParserWrapper builder, SOAPFactory factory) { super(parent, SOAP12Constants.SOAP_FAULT_NODE_LOCAL_NAME, builder, factory); } public void setNodeValue(String uri) { this.setText(uri); } public String getNodeValue() { return this.getText(); } protected void internalSerialize( XMLStreamWriter writer, boolean cache) throws XMLStreamException { // select the builder short builderType = PULL_TYPE_BUILDER; // default is pull type if (builder != null) { builderType = this.builder.getBuilderType(); } if ((builderType == PUSH_TYPE_BUILDER) && (builder.getRegisteredContentHandler() == null)) { builder.registerExternalContentHandler(new StreamWriterToContentHandlerConverter( writer)); } if (!cache) { //No caching if (this.firstChild != null) { OMSerializerUtil.serializeStartpart(this, writer); firstChild.internalSerializeAndConsume(writer); OMSerializerUtil.serializeEndpart(writer); } else if (!this.done) { if (builderType == PULL_TYPE_BUILDER) { OMSerializerUtil.serializeByPullStream(this, writer); } else { OMSerializerUtil.serializeStartpart(this, writer); builder.setCache(cache); builder.next(); OMSerializerUtil.serializeEndpart(writer); } } else { OMSerializerUtil.serializeNormal(this, writer, cache); } // do not serialise the siblings } else { //Cached OMSerializerUtil.serializeNormal(this, writer, cache); // do not serialise the siblings } } } axiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPFaultValueImpl.java0000644000000000000000000000320711131637472031371 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.dom; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.soap.SOAP12Constants; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPFaultValue; import org.apache.axiom.soap.SOAPProcessingException; public abstract class SOAPFaultValueImpl extends SOAPElement implements SOAPFaultValue { protected SOAPFaultValueImpl(OMElement parent, SOAPFactory factory) throws SOAPProcessingException { super(parent, SOAP12Constants.SOAP_FAULT_VALUE_LOCAL_NAME, true, factory); } protected SOAPFaultValueImpl(OMElement parent, OMXMLParserWrapper builder, SOAPFactory factory) { super(parent, SOAP12Constants.SOAP_FAULT_VALUE_LOCAL_NAME, builder, factory); } } ././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPFaultSubCodeImpl.javaaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPFaultSubCodeImpl.java0000644000000000000000000000506711131637472031647 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.dom; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.om.util.ElementHelper; import org.apache.axiom.soap.SOAP12Constants; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPFaultSubCode; import org.apache.axiom.soap.SOAPFaultValue; import org.apache.axiom.soap.SOAPProcessingException; public abstract class SOAPFaultSubCodeImpl extends SOAPElement implements SOAPFaultSubCode { protected SOAPFaultValue value; protected SOAPFaultSubCode subCode; protected SOAPFaultSubCodeImpl(OMElement parent, String localName, SOAPFactory factory) throws SOAPProcessingException { super(parent, localName, true, factory); } protected SOAPFaultSubCodeImpl(OMElement parent, String localName, OMXMLParserWrapper builder, SOAPFactory factory) { super(parent, localName, builder, factory); } public void setValue(SOAPFaultValue soapFaultSubCodeValue) throws SOAPProcessingException { ElementHelper.setNewElement(this, value, soapFaultSubCodeValue); } public SOAPFaultValue getValue() { if (value == null) { value = (SOAPFaultValue)getFirstChildWithName(SOAP12Constants.QNAME_FAULT_VALUE); } return value; } public void setSubCode(SOAPFaultSubCode subCode) throws SOAPProcessingException { ElementHelper.setNewElement(this, this.subCode, subCode); } public SOAPFaultSubCode getSubCode() { if (subCode == null) { subCode = (SOAPFaultSubCode)getFirstChildWithName(SOAP12Constants.QNAME_FAULT_SUBCODE); } return subCode; } } axiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPTextImpl.java0000644000000000000000000000343411131637472030247 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.dom; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.soap.SOAP12Constants; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPProcessingException; public class SOAPTextImpl extends SOAPElement { protected SOAPTextImpl(OMElement parent, SOAPFactory factory) throws SOAPProcessingException { super(parent, SOAP12Constants.SOAP_FAULT_TEXT_LOCAL_NAME, true, factory); } protected SOAPTextImpl(OMElement parent, OMXMLParserWrapper builder, SOAPFactory factory) { super(parent, SOAP12Constants.SOAP_FAULT_TEXT_LOCAL_NAME, builder, factory); } public void setLang(String lang) { // TODO : Chinthaka fix me } public String getLang() { // TODO Chinthaka fix me return null; } protected void checkParent(OMElement parent) throws SOAPProcessingException { // do nothing } } axiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPHeaderImpl.java0000644000000000000000000002553511131637472030521 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.dom; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMException; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMNode; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.om.impl.dom.ElementImpl; import org.apache.axiom.soap.SOAPConstants; import org.apache.axiom.soap.SOAPEnvelope; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPHeader; import org.apache.axiom.soap.SOAPHeaderBlock; import org.apache.axiom.soap.SOAPProcessingException; import org.apache.axiom.soap.RolePlayer; import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; public abstract class SOAPHeaderImpl extends SOAPElement implements SOAPHeader { /** @param envelope */ public SOAPHeaderImpl(SOAPEnvelope envelope, SOAPFactory factory) throws SOAPProcessingException { super(envelope, SOAPConstants.HEADER_LOCAL_NAME, true, factory); } /** * Constructor SOAPHeaderImpl * * @param envelope * @param builder */ public SOAPHeaderImpl(SOAPEnvelope envelope, OMXMLParserWrapper builder, SOAPFactory factory) { super(envelope, SOAPConstants.HEADER_LOCAL_NAME, builder, factory); } /** * Creates a new SOAPHeaderBlock object initialized with the specified name and * adds it to this SOAPHeader object. * * @param localName * @param ns * @return the new SOAPHeaderBlock object that was inserted into this * SOAPHeader object * @throws org.apache.axiom.om.OMException * if a SOAP error occurs */ public abstract SOAPHeaderBlock addHeaderBlock(String localName, OMNamespace ns) throws OMException; /** * Get the appropriate set of headers for a RolePlayer. *

* The RolePlayer indicates whether it is the ultimate destination (in which case headers with * no role or the explicit UltimateDestination role will be included), and any non-standard * roles it supports. Headers targeted to "next" will always be included, and those targeted to * "none" (for SOAP 1.2) will never be included. * * @return an Iterator over all the HeaderBlocks this RolePlayer should process. */ public Iterator getHeadersToProcess(RolePlayer rolePlayer) { return null; // TODO: Implement this! } public Iterator getHeadersToProcess(RolePlayer rolePlayer, String namespace) { return null; // TODO: Implement this! } /** * Returns a list of all the SOAPHeaderBlock objects in this * SOAPHeader object that have the the specified actor. An actor is a global * attribute that indicates the intermediate parties to whom the message should be sent. An * actor receives the message and then sends it to the next actor. The default actor is the * ultimate intended recipient for the message, so if no actor attribute is included in a * SOAPHeader object, the message is sent to its ultimate destination. * * @param paramRole a String giving the URI of the actor for which to search * @return an Iterator object over all the SOAPHeaderBlock objects * that contain the specified actor * @see #extractHeaderBlocks(String) extractHeaderBlocks(java.lang.String) */ public Iterator examineHeaderBlocks(String paramRole) { /* Iterator headerBlocksIter = this.getChildren(); ArrayList headersWithGivenActor = new ArrayList(); if (paramRole == null || "".equals(paramRole)) { return returnAllSOAPHeaders(this.getChildren()); } while (headerBlocksIter.hasNext()) { Object o = headerBlocksIter.next(); if (o instanceof SOAPHeaderBlock) { SOAPHeaderBlock soapHeaderBlock = (SOAPHeaderBlock) o; String role = soapHeaderBlock.getRole(); if ((role != null) && role.equalsIgnoreCase(paramRole)) { headersWithGivenActor.add(soapHeaderBlock); } } } return headersWithGivenActor.iterator();*/ if (paramRole == null || paramRole.trim().length() == 0) { return examineAllHeaderBlocks(); } Collection elements = new ArrayList(); for (Iterator iter = examineAllHeaderBlocks(); iter.hasNext();) { SOAPHeaderBlock headerBlock = (SOAPHeaderBlock) iter.next(); /* if (headerBlock.getRole() == null || headerBlock.getRole().trim().length() == 0 || headerBlock.getRole().equals(paramRole)) { elements.add(headerBlock); } */ if (headerBlock.getRole() != null && headerBlock.getRole().trim().length() > 0 && headerBlock.getRole().equals(paramRole)) { elements.add(headerBlock); } } return elements.iterator(); } // private Iterator returnAllSOAPHeaders(Iterator children) { // ArrayList headers = new ArrayList(); // while (children.hasNext()) { // Object o = children.next(); // if (o instanceof SOAPHeaderBlock) { // headers.add(o); // } // } // // return headers.iterator(); // // } /** * Returns a list of all the SOAPHeaderBlock objects in this * SOAPHeader object that have the the specified role and detaches them from this * SOAPHeader object.

This method allows an role to process only the parts of * the SOAPHeader object that apply to it and to remove them before passing the * message on to the next role. * * @param role a String giving the URI of the role for which to search * @return an Iterator object over all the SOAPHeaderBlock objects * that contain the specified role * @see #examineHeaderBlocks(String) examineHeaderBlocks(java.lang.String) */ public abstract Iterator extractHeaderBlocks(String role); /** * Returns an Iterator over all the SOAPHeaderBlock objects in this * SOAPHeader object that have the specified actor and that have a MustUnderstand * attribute whose value is equivalent to true. * * @param actor a String giving the URI of the actor for which to search * @return an Iterator object over all the SOAPHeaderBlock objects * that contain the specified actor and are marked as MustUnderstand */ public Iterator examineMustUnderstandHeaderBlocks(String actor) { Iterator headerBlocksIter = this.getChildren(); ArrayList mustUnderstandHeadersWithGivenActor = new ArrayList(); while (headerBlocksIter.hasNext()) { Object o = headerBlocksIter.next(); if (o instanceof SOAPHeaderBlock) { SOAPHeaderBlock soapHeaderBlock = (SOAPHeaderBlock) o; String role = soapHeaderBlock.getRole(); boolean mustUnderstand = soapHeaderBlock.getMustUnderstand(); if ((role != null) && role.equals(actor) && mustUnderstand) { mustUnderstandHeadersWithGivenActor.add(soapHeaderBlock); } } } return mustUnderstandHeadersWithGivenActor.iterator(); } /** * Returns an Iterator over all the SOAPHeaderBlock objects in this * SOAPHeader object. Not that this will return elements containing the QName * (http://schemas.xmlsoap.org/soap/envelope/, Header) * * @return an Iterator object over all the SOAPHeaderBlock objects * contained by this SOAPHeader */ public Iterator examineAllHeaderBlocks() { return this.getChildrenWithName(null); } /** * Returns an Iterator over all the SOAPHeaderBlock objects in this * SOAPHeader object and detaches them from this SOAPHeader object. * * @return an Iterator object over all the SOAPHeaderBlock objects * contained by this SOAPHeader */ public Iterator extractAllHeaderBlocks() { Collection result = new ArrayList(); for (Iterator iter = getChildrenWithName(null); iter.hasNext();) { result.add(((ElementImpl) iter.next()).detach()); } return result.iterator(); } public ArrayList getHeaderBlocksWithNSURI(String nsURI) { ArrayList headers = null; OMNode node; OMElement header = this.getFirstElement(); if (header != null) { headers = new ArrayList(); } node = header; while (node != null) { if (node.getType() == OMNode.ELEMENT_NODE) { header = (OMElement) node; OMNamespace namespace = header.getNamespace(); if (nsURI == null) { if (namespace == null) { headers.add(header); } } else { if (namespace != null) { if (nsURI.equals(namespace.getNamespaceURI())) { headers.add(header); } } } } node = node.getNextOMSibling(); } return headers; } protected void checkParent(OMElement parent) throws SOAPProcessingException { if (!(parent instanceof SOAPEnvelopeImpl)) { throw new SOAPProcessingException( "Expecting an implementation of SOAP Envelope as the " + "parent. But received some other implementation"); } } } axiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPBodyImpl.java0000644000000000000000000001336611131637472030225 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.dom; import org.apache.axiom.om.OMConstants; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMException; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.soap.SOAP11Constants; import org.apache.axiom.soap.SOAP12Constants; import org.apache.axiom.soap.SOAPBody; import org.apache.axiom.soap.SOAPConstants; import org.apache.axiom.soap.SOAPEnvelope; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPFault; import org.apache.axiom.soap.SOAPProcessingException; public abstract class SOAPBodyImpl extends SOAPElement implements SOAPBody, OMConstants { /** Field hasSOAPFault */ protected boolean hasSOAPFault = false; /** @param envelope */ public SOAPBodyImpl(SOAPEnvelope envelope, SOAPFactory factory) throws SOAPProcessingException { super(envelope, SOAPConstants.BODY_LOCAL_NAME, true, factory); } /** * Constructor SOAPBodyImpl * * @param envelope * @param builder */ public SOAPBodyImpl(SOAPEnvelope envelope, OMXMLParserWrapper builder, SOAPFactory factory) { super(envelope, SOAPConstants.BODY_LOCAL_NAME, builder, factory); } /** * Creates a new SOAPFault object and adds it to this SOAPBody object. * * @param e * @return the new SOAPFault object * @throws org.apache.axiom.om.OMException * if there is a SOAP error * @throws OMException */ public abstract SOAPFault addFault(Exception e) throws OMException; /** * Indicates whether a SOAPFault object exists in this SOAPBody object. * * @return true if a SOAPFault object exists in this * SOAPBody object; false otherwise */ public boolean hasFault() { if (hasSOAPFault) { return true; } else { OMElement element = getFirstElement(); if (element != null && SOAPConstants.SOAPFAULT_LOCAL_NAME.equals(element .getLocalName()) && (SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI .equals(element.getNamespace().getNamespaceURI()) || SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI .equals(element.getNamespace().getNamespaceURI()))) { //added this line hasSOAPFault = true; return true; } else { return false; } } } /** * Returns the SOAPFault object in this SOAPBody object. * * @return the SOAPFault object in this SOAPBody object */ public SOAPFault getFault() { OMElement element = getFirstElement(); if (hasSOAPFault) { return (SOAPFault) element; } else if (element != null && SOAPConstants.SOAPFAULT_LOCAL_NAME.equals(element .getLocalName()) && (SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(element .getNamespace().getNamespaceURI()) || SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI .equals(element.getNamespace().getNamespaceURI()))) { //added this line hasSOAPFault = true; return (SOAPFault) element; } else { return null; } } /** * @param soapFault * @throws org.apache.axiom.om.OMException * * @throws OMException */ public void addFault(SOAPFault soapFault) throws OMException { if (hasSOAPFault) { throw new OMException( "SOAP Body already has a SOAP Fault and there can not be " + "more than one SOAP fault"); } addChild(soapFault); hasSOAPFault = true; } protected void checkParent(OMElement parent) throws SOAPProcessingException { if (!(parent instanceof SOAPEnvelopeImpl)) { throw new SOAPProcessingException( "Expecting an implementation of SOAP Envelope as the " + "parent. But received some other implementation"); } } /*public OMNode detach() throws OMException { throw new SOAPProcessingException( "Can not detach SOAP Body, SOAP Envelope must have a Body !!"); }*/ public OMNamespace getFirstElementNS() { OMElement element = this.getFirstElement(); if (element == null) { return null; } else { return element.getNamespace(); } } public String getFirstElementLocalName() { OMElement element = this.getFirstElement(); if (element == null) { return null; } else { return element.getLocalName(); } } } axiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/0000755000000000000000000000000011131637472026254 5ustar rootroot././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12FaultTextImpl.javaaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12FaultTextImp0000644000000000000000000000362711131637472031423 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.dom.soap12; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPFaultReason; import org.apache.axiom.soap.SOAPProcessingException; import org.apache.axiom.soap.impl.dom.SOAPFaultTextImpl; public class SOAP12FaultTextImpl extends SOAPFaultTextImpl { public SOAP12FaultTextImpl(SOAPFaultReason parent, SOAPFactory factory) throws SOAPProcessingException { super(parent, factory); } public SOAP12FaultTextImpl(SOAPFaultReason parent, OMXMLParserWrapper builder, SOAPFactory factory) { super(parent, builder, factory); } protected void checkParent(OMElement parent) throws SOAPProcessingException { if (!(parent instanceof SOAP12FaultReasonImpl)) { throw new SOAPProcessingException( "Expecting SOAP 1.2 implementation of SOAP FaultReason " + "as the parent. But received some other implementation"); } } }././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12FaultRoleImpl.javaaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12FaultRoleImp0000644000000000000000000000367311131637472031401 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.dom.soap12; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.soap.SOAP12Constants; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPFault; import org.apache.axiom.soap.SOAPProcessingException; import org.apache.axiom.soap.impl.dom.SOAPFaultRoleImpl; public class SOAP12FaultRoleImpl extends SOAPFaultRoleImpl { public SOAP12FaultRoleImpl(SOAPFault parent, SOAPFactory factory) throws SOAPProcessingException { super(parent, SOAP12Constants.SOAP_FAULT_ROLE_LOCAL_NAME, true, factory); } public SOAP12FaultRoleImpl(SOAPFault parent, OMXMLParserWrapper builder, SOAPFactory factory) { super(parent, builder, factory); } protected void checkParent(OMElement parent) throws SOAPProcessingException { if (!(parent instanceof SOAP12FaultImpl)) { throw new SOAPProcessingException( "Expecting SOAP 1.2 implementation of SOAP Fault as the " + "parent. But received some other implementation"); } } } ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12FaultImpl.javaaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12FaultImpl.ja0000644000000000000000000001243011131637472031313 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.dom.soap12; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.soap.SOAPBody; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPFault; import org.apache.axiom.soap.SOAPFaultCode; import org.apache.axiom.soap.SOAPFaultDetail; import org.apache.axiom.soap.SOAPFaultNode; import org.apache.axiom.soap.SOAPFaultReason; import org.apache.axiom.soap.SOAPFaultRole; import org.apache.axiom.soap.SOAPProcessingException; import org.apache.axiom.soap.SOAP12Constants; import org.apache.axiom.soap.impl.dom.SOAPFaultImpl; import org.apache.axiom.soap.impl.dom.SOAPFaultRoleImpl; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamWriter; public class SOAP12FaultImpl extends SOAPFaultImpl { public SOAP12FaultImpl(SOAPBody parent, Exception e, SOAPFactory factory) throws SOAPProcessingException { super(parent, e, factory); } public SOAP12FaultImpl(SOAPBody parent, OMXMLParserWrapper builder, SOAPFactory factory) { super(parent, builder, factory); } /** * This is a convenience method for the SOAP Fault Impl. * * @param parent */ public SOAP12FaultImpl(SOAPBody parent, SOAPFactory factory) throws SOAPProcessingException { super(parent, factory); } protected SOAPFaultDetail getNewSOAPFaultDetail(SOAPFault fault) { return new SOAP12FaultDetailImpl(fault, (SOAPFactory) this.factory); } public void setCode(SOAPFaultCode soapFaultCode) throws SOAPProcessingException { if (!(soapFaultCode instanceof SOAP12FaultCodeImpl)) { throw new SOAPProcessingException( "Expecting SOAP 1.2 implementation of SOAP Fault Code. " + "But received some other implementation"); } super.setCode(soapFaultCode); } public void setReason(SOAPFaultReason reason) throws SOAPProcessingException { if (!(reason instanceof SOAP12FaultReasonImpl)) { throw new SOAPProcessingException( "Expecting SOAP 1.2 implementation of SOAP Fault Reason. But received some other implementation"); } super.setReason(reason); } public void setNode(SOAPFaultNode node) throws SOAPProcessingException { if (!(node instanceof SOAP12FaultNodeImpl)) { throw new SOAPProcessingException( "Expecting SOAP 1.2 implementation of SOAP Fault Node. But received some other implementation"); } super.setNode(node); } public void setRole(SOAPFaultRole role) throws SOAPProcessingException { if (!(role instanceof SOAP12FaultRoleImpl)) { throw new SOAPProcessingException( "Expecting SOAP 1.2 implementation of SOAP Fault Role. But received some other implementation"); } super.setRole(role); } public void setDetail(SOAPFaultDetail detail) throws SOAPProcessingException { if (!(detail instanceof SOAP12FaultDetailImpl)) { throw new SOAPProcessingException( "Expecting SOAP 1.2 implementation of SOAP Fault Detail. But received some other implementation"); } super.setDetail(detail); } protected void checkParent(OMElement parent) throws SOAPProcessingException { if (!(parent instanceof SOAP12BodyImpl)) { throw new SOAPProcessingException( "Expecting SOAP 1.2 implementation of SOAP Body as the parent. But received some other implementation"); } } protected void serializeFaultNode(XMLStreamWriter writer) throws XMLStreamException { SOAPFaultNode faultNode = getNode(); if (faultNode != null) { (faultNode).serialize(writer); } } public SOAPFaultReason getReason() { return (SOAPFaultReason)getFirstChildWithName(SOAP12Constants.QNAME_FAULT_REASON); } public SOAPFaultDetail getDetail() { return (SOAPFaultDetail)getFirstChildWithName(SOAP12Constants.QNAME_FAULT_DETAIL); } public SOAPFaultCode getCode() { return (SOAPFaultCode)getFirstChildWithName(SOAP12Constants.QNAME_FAULT_CODE); } public SOAPFaultNode getNode() { return (SOAPFaultNode)getFirstChildWithName(SOAP12Constants.QNAME_FAULT_NODE); } public SOAPFaultRole getRole() { return (SOAPFaultRoleImpl)getFirstChildWithName(SOAP12Constants.QNAME_FAULT_ROLE); } } ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12FaultDetailImpl.javaaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12FaultDetailI0000644000000000000000000000355511131637472031344 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.dom.soap12; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPFault; import org.apache.axiom.soap.SOAPProcessingException; import org.apache.axiom.soap.impl.dom.SOAPFaultDetailImpl; public class SOAP12FaultDetailImpl extends SOAPFaultDetailImpl { public SOAP12FaultDetailImpl(SOAPFault parent, SOAPFactory factory) throws SOAPProcessingException { super(parent, true, factory); } public SOAP12FaultDetailImpl(SOAPFault parent, OMXMLParserWrapper builder, SOAPFactory factory) { super(parent, builder, factory); } protected void checkParent(OMElement parent) throws SOAPProcessingException { if (!(parent instanceof SOAP12FaultImpl)) { throw new SOAPProcessingException( "Expecting SOAP 1.2 implementation of SOAP Fault as the " + "parent. But received some other implementation"); } } } ././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12Factory.javaaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12Factory.java0000644000000000000000000002216011131637472031355 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.dom.soap12; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.om.impl.dom.DocumentImpl; import org.apache.axiom.om.impl.dom.NamespaceImpl; import org.apache.axiom.soap.SOAP12Constants; import org.apache.axiom.soap.SOAPBody; import org.apache.axiom.soap.SOAPEnvelope; import org.apache.axiom.soap.SOAPFault; import org.apache.axiom.soap.SOAPFaultCode; import org.apache.axiom.soap.SOAPFaultDetail; import org.apache.axiom.soap.SOAPFaultNode; import org.apache.axiom.soap.SOAPFaultReason; import org.apache.axiom.soap.SOAPFaultRole; import org.apache.axiom.soap.SOAPFaultSubCode; import org.apache.axiom.soap.SOAPFaultText; import org.apache.axiom.soap.SOAPFaultValue; import org.apache.axiom.soap.SOAPHeader; import org.apache.axiom.soap.SOAPHeaderBlock; import org.apache.axiom.soap.SOAPProcessingException; import org.apache.axiom.soap.SOAPVersion; import org.apache.axiom.soap.SOAP12Version; import org.apache.axiom.soap.impl.dom.SOAPEnvelopeImpl; import org.apache.axiom.soap.impl.dom.factory.DOMSOAPFactory; public class SOAP12Factory extends DOMSOAPFactory { public SOAP12Factory() { } public SOAP12Factory(DocumentImpl doc) { super(doc); } public String getSoapVersionURI() { return SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI; } public SOAPVersion getSOAPVersion() { return SOAP12Version.getSingleton(); } public SOAPEnvelope createSOAPEnvelope() { return new SOAPEnvelopeImpl( new NamespaceImpl( SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI, SOAP12Constants.SOAP_DEFAULT_NAMESPACE_PREFIX), this); } public SOAPEnvelope createSOAPEnvelope(OMNamespace ns) { return new SOAPEnvelopeImpl(ns, this); } public SOAPHeader createSOAPHeader(SOAPEnvelope envelope) throws SOAPProcessingException { return new SOAP12HeaderImpl(envelope, this); } public SOAPHeader createSOAPHeader(SOAPEnvelope envelope, OMXMLParserWrapper builder) { return new SOAP12HeaderImpl(envelope, builder, this); } public SOAPHeaderBlock createSOAPHeaderBlock(String localName, OMNamespace ns) throws SOAPProcessingException { return new SOAP12HeaderBlockImpl(localName, ns, this); } public SOAPHeaderBlock createSOAPHeaderBlock(String localName, OMNamespace ns, SOAPHeader parent) throws SOAPProcessingException { return new SOAP12HeaderBlockImpl(localName, ns, parent, this); } public SOAPHeaderBlock createSOAPHeaderBlock(String localName, OMNamespace ns, SOAPHeader parent, OMXMLParserWrapper builder) throws SOAPProcessingException { return new SOAP12HeaderBlockImpl(localName, ns, parent, builder, this); } public SOAPFault createSOAPFault(SOAPBody parent, Exception e) throws SOAPProcessingException { return new SOAP12FaultImpl(parent, e, this); } public SOAPFault createSOAPFault(SOAPBody parent) throws SOAPProcessingException { return new SOAP12FaultImpl(parent, this); } public SOAPFault createSOAPFault(SOAPBody parent, OMXMLParserWrapper builder) { return new SOAP12FaultImpl(parent, builder, this); } public SOAPBody createSOAPBody(SOAPEnvelope envelope) throws SOAPProcessingException { return new SOAP12BodyImpl(envelope, this); } public SOAPBody createSOAPBody(SOAPEnvelope envelope, OMXMLParserWrapper builder) { return new SOAP12BodyImpl(envelope, builder, this); } public SOAPFaultCode createSOAPFaultCode(SOAPFault parent) throws SOAPProcessingException { return new SOAP12FaultCodeImpl(parent, this); } public SOAPFaultCode createSOAPFaultCode(SOAPFault parent, OMXMLParserWrapper builder) { return new SOAP12FaultCodeImpl(parent, builder, this); } public SOAPFaultValue createSOAPFaultValue(SOAPFaultCode parent) throws SOAPProcessingException { return new SOAP12FaultValueImpl(parent, this); } public SOAPFaultValue createSOAPFaultValue(SOAPFaultCode parent, OMXMLParserWrapper builder) { return new SOAP12FaultValueImpl(parent, builder, this); } //added public SOAPFaultValue createSOAPFaultValue(SOAPFaultSubCode parent) throws SOAPProcessingException { return new SOAP12FaultValueImpl(parent, this); } //added public SOAPFaultValue createSOAPFaultValue(SOAPFaultSubCode parent, OMXMLParserWrapper builder) { return new SOAP12FaultValueImpl(parent, builder, this); } //changed public SOAPFaultSubCode createSOAPFaultSubCode(SOAPFaultCode parent) throws SOAPProcessingException { return new SOAP12FaultSubCodeImpl(parent, this); } //changed public SOAPFaultSubCode createSOAPFaultSubCode(SOAPFaultCode parent, OMXMLParserWrapper builder) { return new SOAP12FaultSubCodeImpl(parent, builder, this); } public SOAPFaultSubCode createSOAPFaultSubCode(SOAPFaultSubCode parent) throws SOAPProcessingException { return new SOAP12FaultSubCodeImpl(parent, this); } public SOAPFaultSubCode createSOAPFaultSubCode(SOAPFaultSubCode parent, OMXMLParserWrapper builder) { return new SOAP12FaultSubCodeImpl(parent, builder, this); } public SOAPFaultReason createSOAPFaultReason(SOAPFault parent) throws SOAPProcessingException { return new SOAP12FaultReasonImpl(parent, this); } public SOAPFaultReason createSOAPFaultReason(SOAPFault parent, OMXMLParserWrapper builder) { return new SOAP12FaultReasonImpl(parent, builder, this); } public SOAPFaultText createSOAPFaultText(SOAPFaultReason parent) throws SOAPProcessingException { return new SOAP12FaultTextImpl(parent, this); } public SOAPFaultText createSOAPFaultText(SOAPFaultReason parent, OMXMLParserWrapper builder) { return new SOAP12FaultTextImpl(parent, builder, this); } public SOAPFaultNode createSOAPFaultNode(SOAPFault parent) throws SOAPProcessingException { return new SOAP12FaultNodeImpl(parent, this); } public SOAPFaultNode createSOAPFaultNode(SOAPFault parent, OMXMLParserWrapper builder) { return new SOAP12FaultNodeImpl(parent, builder, this); } public SOAPFaultRole createSOAPFaultRole(SOAPFault parent) throws SOAPProcessingException { return new SOAP12FaultRoleImpl(parent, this); } public SOAPFaultRole createSOAPFaultRole(SOAPFault parent, OMXMLParserWrapper builder) { return new SOAP12FaultRoleImpl(parent, builder, this); } public SOAPFaultDetail createSOAPFaultDetail(SOAPFault parent) throws SOAPProcessingException { return new SOAP12FaultDetailImpl(parent, this); } public SOAPFaultDetail createSOAPFaultDetail(SOAPFault parent, OMXMLParserWrapper builder) { return new SOAP12FaultDetailImpl(parent, builder, this); } public SOAPEnvelope getDefaultEnvelope() throws SOAPProcessingException { OMNamespace ns = new NamespaceImpl( SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI, SOAP12Constants.SOAP_DEFAULT_NAMESPACE_PREFIX); SOAPEnvelopeImpl env = new SOAPEnvelopeImpl(ns, this); createSOAPHeader(env); createSOAPBody(env); return env; } public SOAPFault createSOAPFault() throws SOAPProcessingException { return new SOAP12FaultImpl(this.getDefaultEnvelope().getBody(), this); } } ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12FaultValueImpl.javaaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12FaultValueIm0000644000000000000000000000352511131637472031370 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.dom.soap12; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPProcessingException; import org.apache.axiom.soap.impl.dom.SOAPFaultValueImpl; public class SOAP12FaultValueImpl extends SOAPFaultValueImpl { public SOAP12FaultValueImpl(OMElement parent, SOAPFactory factory) throws SOAPProcessingException { super(parent, factory); } public SOAP12FaultValueImpl(OMElement parent, OMXMLParserWrapper builder, SOAPFactory factory) { super(parent, builder, factory); } protected void checkParent(OMElement parent) throws SOAPProcessingException { if (!((parent instanceof SOAP12FaultSubCodeImpl) || (parent instanceof SOAP12FaultCodeImpl))) { throw new SOAPProcessingException( "Expecting SOAP 1.2 implementation of SOAP FaultSubCode or SOAP FaultCode as the parent. But received some other implementation"); } } } ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12BodyImpl.javaaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12BodyImpl.jav0000644000000000000000000000363711131637472031334 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.dom.soap12; import org.apache.axiom.om.OMException; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.soap.SOAPEnvelope; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPFault; import org.apache.axiom.soap.SOAPProcessingException; import org.apache.axiom.soap.impl.dom.SOAPBodyImpl; public class SOAP12BodyImpl extends SOAPBodyImpl { /** @param envelope */ public SOAP12BodyImpl(SOAPEnvelope envelope, SOAPFactory factory) throws SOAPProcessingException { super(envelope, factory); } /** * Constructor SOAPBodyImpl * * @param envelope * @param builder */ public SOAP12BodyImpl(SOAPEnvelope envelope, OMXMLParserWrapper builder, SOAPFactory factory) { super(envelope, builder, factory); } public SOAPFault addFault(Exception e) throws OMException { SOAPFault soapFault = new SOAP12FaultImpl(this, e, (SOAPFactory) this.factory); this.hasSOAPFault = true; return soapFault; } } ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12FaultCodeImpl.javaaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12FaultCodeImp0000644000000000000000000000601311131637472031341 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.dom.soap12; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPFault; import org.apache.axiom.soap.SOAPFaultSubCode; import org.apache.axiom.soap.SOAPFaultValue; import org.apache.axiom.soap.SOAPProcessingException; import org.apache.axiom.soap.impl.dom.SOAPFaultCodeImpl; import javax.xml.namespace.QName; public class SOAP12FaultCodeImpl extends SOAPFaultCodeImpl { /** * Constructor OMElementImpl * * @param parent * @param builder */ public SOAP12FaultCodeImpl(SOAPFault parent, OMXMLParserWrapper builder, SOAPFactory factory) { super(parent, builder, factory); } /** @param parent */ public SOAP12FaultCodeImpl(SOAPFault parent, SOAPFactory factory) throws SOAPProcessingException { super(parent, true, factory); } public void setSubCode(SOAPFaultSubCode subCode) throws SOAPProcessingException { if (!(subCode instanceof SOAP12FaultSubCodeImpl)) { throw new SOAPProcessingException( "Expecting SOAP 1.2 implementation of SOAP Fault " + "Sub Code. But received some other implementation"); } super.setSubCode(subCode); } public void setValue(SOAPFaultValue value) throws SOAPProcessingException { if (!(value instanceof SOAP12FaultValueImpl)) { throw new SOAPProcessingException( "Expecting SOAP 1.2 implementation of SOAP Fault Value. " + "But received some other implementation"); } super.setValue(value); } public QName getTextAsQName() { SOAPFaultValue value = getValue(); return value == null ? null : value.getTextAsQName(); } protected void checkParent(OMElement parent) throws SOAPProcessingException { if (!(parent instanceof SOAP12FaultImpl)) { throw new SOAPProcessingException( "Expecting SOAP 1.2 implementation of SOAP Fault as " + "the parent. But received some other implementation"); } } } ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12FaultReasonImpl.javaaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12FaultReasonI0000644000000000000000000000502211131637472031360 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.dom.soap12; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPFault; import org.apache.axiom.soap.SOAPFaultText; import org.apache.axiom.soap.SOAPProcessingException; import org.apache.axiom.soap.SOAP12Constants; import org.apache.axiom.soap.impl.dom.SOAPFaultReasonImpl; public class SOAP12FaultReasonImpl extends SOAPFaultReasonImpl { public SOAP12FaultReasonImpl(SOAPFault parent, OMXMLParserWrapper builder, SOAPFactory factory) { super(parent, builder, factory); } /** @param parent */ public SOAP12FaultReasonImpl(SOAPFault parent, SOAPFactory factory) throws SOAPProcessingException { super(parent, true, factory); } public void addSOAPText(SOAPFaultText soapFaultText) throws SOAPProcessingException { if (!(soapFaultText instanceof SOAP12FaultTextImpl)) { throw new SOAPProcessingException( "Expecting SOAP 1.2 implementation of SOAP Fault Text. " + "But received some other implementation"); } super.addSOAPText(soapFaultText); } protected void checkParent(OMElement parent) throws SOAPProcessingException { if (!(parent instanceof SOAP12FaultImpl)) { throw new SOAPProcessingException( "Expecting SOAP 1.2 implementation of SOAP Fault as the " + "parent. But received some other implementation"); } } public SOAPFaultText getFirstSOAPText() { return (SOAPFaultText)getFirstChildWithName(SOAP12Constants.QNAME_FAULT_TEXT); } } ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12FaultSubCodeImpl.javaaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12FaultSubCode0000644000000000000000000000715611131637472031356 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.dom.soap12; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.soap.SOAP12Constants; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPFaultCode; import org.apache.axiom.soap.SOAPFaultSubCode; import org.apache.axiom.soap.SOAPFaultValue; import org.apache.axiom.soap.SOAPProcessingException; import org.apache.axiom.soap.impl.dom.SOAPFaultSubCodeImpl; public class SOAP12FaultSubCodeImpl extends SOAPFaultSubCodeImpl { //changed public SOAP12FaultSubCodeImpl(SOAPFaultCode parent, SOAPFactory factory) throws SOAPProcessingException { super(parent, SOAP12Constants.SOAP_FAULT_SUB_CODE_LOCAL_NAME, factory); } //changed public SOAP12FaultSubCodeImpl(SOAPFaultCode parent, OMXMLParserWrapper builder, SOAPFactory factory) { super(parent, SOAP12Constants.SOAP_FAULT_SUB_CODE_LOCAL_NAME, builder, factory); } public SOAP12FaultSubCodeImpl(SOAPFaultSubCode parent, SOAPFactory factory) throws SOAPProcessingException { super(parent, SOAP12Constants.SOAP_FAULT_SUB_CODE_LOCAL_NAME, factory); } public SOAP12FaultSubCodeImpl(SOAPFaultSubCode parent, OMXMLParserWrapper builder, SOAPFactory factory) { super(parent, SOAP12Constants.SOAP_FAULT_SUB_CODE_LOCAL_NAME, builder, factory); } protected void checkParent(OMElement parent) throws SOAPProcessingException { if (!((parent instanceof SOAP12FaultSubCodeImpl) || (parent instanceof SOAP12FaultCodeImpl))) { throw new SOAPProcessingException( "Expecting SOAP 1.2 implementation of SOAP FaultSubCode " + "or SOAP FaultCodeValue as the parent. But received some " + "other implementation"); } } public void setSubCode(SOAPFaultSubCode subCode) throws SOAPProcessingException { if (!(subCode instanceof SOAP12FaultSubCodeImpl)) { throw new SOAPProcessingException( "Expecting SOAP 1.2 implementation of SOAP Fault " + "Sub Code. But received some other implementation"); } super.setSubCode(subCode); } public void setValue(SOAPFaultValue soapFaultSubCodeValue) throws SOAPProcessingException { if (!(soapFaultSubCodeValue instanceof SOAP12FaultValueImpl)) { throw new SOAPProcessingException( "Expecting SOAP 1.2 implementation of SOAP Fault Value. " + "But received some other implementation"); } super.setValue(soapFaultSubCodeValue); } } ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12HeaderImpl.javaaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12HeaderImpl.j0000644000000000000000000000652211131637472031274 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.dom.soap12; import org.apache.axiom.om.OMException; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.om.impl.OMNodeEx; import org.apache.axiom.om.impl.traverse.OMChildrenWithSpecificAttributeIterator; import org.apache.axiom.soap.SOAP12Constants; import org.apache.axiom.soap.SOAPEnvelope; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPHeaderBlock; import org.apache.axiom.soap.SOAPProcessingException; import org.apache.axiom.soap.impl.dom.SOAPHeaderImpl; import javax.xml.namespace.QName; import java.util.Iterator; public class SOAP12HeaderImpl extends SOAPHeaderImpl { /** @param envelope */ public SOAP12HeaderImpl(SOAPEnvelope envelope, SOAPFactory factory) throws SOAPProcessingException { super(envelope, factory); } /** * Constructor SOAPHeaderImpl * * @param envelope * @param builder */ public SOAP12HeaderImpl(SOAPEnvelope envelope, OMXMLParserWrapper builder, SOAPFactory factory) { super(envelope, builder, factory); } public SOAPHeaderBlock addHeaderBlock(String localName, OMNamespace ns) throws OMException { if (ns == null || ns.getNamespaceURI() == null || "".equals(ns.getNamespaceURI())) { throw new OMException( "All the SOAP Header blocks should be namespace qualified"); } OMNamespace namespace = findNamespace(ns.getNamespaceURI(), ns.getPrefix()); if (namespace != null) { ns = namespace; } SOAPHeaderBlock soapHeaderBlock = null; try { soapHeaderBlock = new SOAP12HeaderBlockImpl(localName, ns, this, (SOAPFactory) this.factory); } catch (SOAPProcessingException e) { throw new OMException(e); } ((OMNodeEx) soapHeaderBlock).setComplete(true); return soapHeaderBlock; } public Iterator extractHeaderBlocks(String role) { return new OMChildrenWithSpecificAttributeIterator(getFirstOMChild(), new QName( SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI, SOAP12Constants.SOAP_ROLE), role, true); } } ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12FaultNodeImpl.javaaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12FaultNodeImp0000644000000000000000000000353211131637472031357 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.dom.soap12; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPFault; import org.apache.axiom.soap.SOAPProcessingException; import org.apache.axiom.soap.impl.dom.SOAPFaultNodeImpl; public class SOAP12FaultNodeImpl extends SOAPFaultNodeImpl { public SOAP12FaultNodeImpl(SOAPFault parent, SOAPFactory factory) throws SOAPProcessingException { super(parent, factory); } public SOAP12FaultNodeImpl(SOAPFault parent, OMXMLParserWrapper builder, SOAPFactory factory) { super(parent, builder, factory); } protected void checkParent(OMElement parent) throws SOAPProcessingException { if (!(parent instanceof SOAP12FaultImpl)) { throw new SOAPProcessingException( "Expecting SOAP 1.2 implementation of SOAP Fault as the " + "parent. But received some other implementation"); } } } ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12HeaderBlockImpl.javaaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12HeaderBlockI0000644000000000000000000001332211131637472031302 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.dom.soap12; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.soap.SOAP12Constants; import org.apache.axiom.soap.SOAPConstants; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPHeader; import org.apache.axiom.soap.SOAPProcessingException; import org.apache.axiom.soap.SOAPVersion; import org.apache.axiom.soap.SOAP12Version; import org.apache.axiom.soap.impl.dom.SOAPHeaderBlockImpl; public class SOAP12HeaderBlockImpl extends SOAPHeaderBlockImpl { /** * @param localName * @param ns */ public SOAP12HeaderBlockImpl(String localName, OMNamespace ns, SOAPHeader parent, SOAPFactory factory) throws SOAPProcessingException { super(localName, ns, parent, factory); checkParent(parent); } public SOAP12HeaderBlockImpl(String localName, OMNamespace ns, SOAPFactory factory) { super(localName, ns, factory); } /** * Constructor SOAPHeaderBlockImpl * * @param localName * @param ns * @param parent * @param builder */ public SOAP12HeaderBlockImpl(String localName, OMNamespace ns, SOAPHeader parent, OMXMLParserWrapper builder, SOAPFactory factory) { super(localName, ns, parent, builder, factory); } protected void checkParent(OMElement parent) throws SOAPProcessingException { if (!(parent instanceof SOAP12HeaderImpl)) { throw new SOAPProcessingException( "Expecting SOAP 1.2 implementation of SOAP Body as the parent. But received some other implementation"); } } public void setRole(String roleURI) { setAttribute(SOAP12Constants.SOAP_ROLE, roleURI, SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI); } public String getRole() { return getAttribute(SOAP12Constants.SOAP_ROLE, SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI); } public void setMustUnderstand(boolean mustUnderstand) { setAttribute(SOAPConstants.ATTR_MUSTUNDERSTAND, mustUnderstand ? SOAPConstants.ATTR_MUSTUNDERSTAND_TRUE : SOAPConstants.ATTR_MUSTUNDERSTAND_FALSE, SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI); } public void setMustUnderstand(String mustUnderstand) throws SOAPProcessingException { if (SOAPConstants.ATTR_MUSTUNDERSTAND_TRUE.equals(mustUnderstand) || SOAPConstants.ATTR_MUSTUNDERSTAND_FALSE.equals(mustUnderstand) || SOAPConstants.ATTR_MUSTUNDERSTAND_0.equals(mustUnderstand) || SOAPConstants.ATTR_MUSTUNDERSTAND_1.equals(mustUnderstand)) { setAttribute(SOAPConstants.ATTR_MUSTUNDERSTAND, mustUnderstand, SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI); } else { throw new SOAPProcessingException( "mustUndertand should be one of \"true\", \"false\", \"0\" or \"1\" "); } } public boolean getMustUnderstand() throws SOAPProcessingException { String mustUnderstand; if ((mustUnderstand = getAttribute(SOAPConstants.ATTR_MUSTUNDERSTAND, SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI)) != null) { if (SOAPConstants.ATTR_MUSTUNDERSTAND_TRUE.equals(mustUnderstand) || SOAPConstants.ATTR_MUSTUNDERSTAND_1.equals(mustUnderstand)) { return true; } else if (SOAPConstants.ATTR_MUSTUNDERSTAND_FALSE.equals(mustUnderstand) || SOAPConstants.ATTR_MUSTUNDERSTAND_0.equals(mustUnderstand)) { return false; } else { throw new SOAPProcessingException( "Invalid value found in mustUnderstand value of " + this.getLocalName() + " header block"); } } return false; } public void setRelay(boolean relay) { setAttribute(SOAP12Constants.SOAP_RELAY, String.valueOf(relay), SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI); } public boolean getRelay() { return Boolean.valueOf(getAttribute(SOAP12Constants.SOAP_RELAY, SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI)) .booleanValue(); } /** * What SOAP version is this HeaderBlock? * * @return a SOAPVersion, one of the two singletons. */ public SOAPVersion getVersion() { return SOAP12Version.getSingleton(); } } axiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPElement.java0000644000000000000000000000566211131637472030077 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.dom; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.om.impl.dom.DocumentImpl; import org.apache.axiom.om.impl.dom.ElementImpl; import org.apache.axiom.om.impl.dom.NamespaceImpl; import org.apache.axiom.om.impl.dom.ParentNode; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPProcessingException; public abstract class SOAPElement extends ElementImpl { public SOAPElement(SOAPFactory factory) { super(factory); } /** @param parent */ protected SOAPElement(OMElement parent, String localName, boolean extractNamespaceFromParent, SOAPFactory factory) throws SOAPProcessingException { super((ParentNode) parent, localName, null, factory); if (parent == null) { throw new SOAPProcessingException( " Can not create " + localName + " element without a parent !!"); } checkParent(parent); if (extractNamespaceFromParent) { this.namespace = parent.getNamespace(); } this.localName = localName; } protected SOAPElement(OMElement parent, String localName, OMXMLParserWrapper builder, SOAPFactory factory) { super((ParentNode) parent, localName, null, builder, factory); } protected SOAPElement(DocumentImpl doc, String localName, OMNamespace ns, SOAPFactory factory) { super(doc, localName, (NamespaceImpl) ns, factory); } protected SOAPElement(DocumentImpl ownerDocument, String tagName, NamespaceImpl ns, OMXMLParserWrapper builder, SOAPFactory factory) { super(ownerDocument, tagName, ns, builder, factory); } /** This has to be implemented by all the derived classes to check for the correct parent. */ protected abstract void checkParent(OMElement parent) throws SOAPProcessingException; } axiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPHeaderBlockImpl.java0000644000000000000000000001102011131637472031454 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.dom; import org.apache.axiom.om.OMAttribute; import org.apache.axiom.om.OMDataSource; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.om.impl.dom.AttrImpl; import org.apache.axiom.om.impl.dom.ElementImpl; import org.apache.axiom.om.impl.dom.NamespaceImpl; import org.apache.axiom.om.impl.dom.ParentNode; import org.apache.axiom.om.impl.dom.factory.OMDOMFactory; import org.apache.axiom.soap.SOAPConstants; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPHeader; import org.apache.axiom.soap.SOAPHeaderBlock; import org.apache.axiom.soap.SOAPProcessingException; import javax.xml.namespace.QName; public abstract class SOAPHeaderBlockImpl extends ElementImpl implements SOAPHeaderBlock { private boolean processed = false; /** * @param localName * @param ns * @param parent */ public SOAPHeaderBlockImpl(String localName, OMNamespace ns, SOAPHeader parent, SOAPFactory factory) throws SOAPProcessingException { super((ParentNode) parent, localName, (NamespaceImpl) ns, factory); this.setNamespace(ns); } public SOAPHeaderBlockImpl(String localName, OMNamespace ns, SOAPFactory factory) throws SOAPProcessingException { super(((OMDOMFactory) factory).getDocument(), localName, (NamespaceImpl) ns, factory); this.setNamespace(ns); } /** * Constructor SOAPHeaderBlockImpl. * * @param localName * @param ns * @param parent * @param builder */ public SOAPHeaderBlockImpl(String localName, OMNamespace ns, OMElement parent, OMXMLParserWrapper builder, SOAPFactory factory) { super((ParentNode) parent, localName, (NamespaceImpl) ns, builder, factory); this.setNamespace(ns); } /** * @param attributeName * @param attrValue * @param soapEnvelopeNamespaceURI */ protected void setAttribute(String attributeName, String attrValue, String soapEnvelopeNamespaceURI) { OMAttribute omAttribute = this.getAttribute( new QName(soapEnvelopeNamespaceURI, attributeName)); if (omAttribute != null) { omAttribute.setAttributeValue(attrValue); } else { OMAttribute attribute = new AttrImpl(this.ownerNode, attributeName, new NamespaceImpl(soapEnvelopeNamespaceURI, SOAPConstants.SOAP_DEFAULT_NAMESPACE_PREFIX), attrValue, this.factory); this.addAttribute(attribute); } } /** * Method getAttribute. * * @param attrName * @return Returns String. */ protected String getAttribute(String attrName, String soapEnvelopeNamespaceURI) { OMAttribute omAttribute = this.getAttribute( new QName(soapEnvelopeNamespaceURI, attrName)); return (omAttribute != null) ? omAttribute.getAttributeValue() : null; } public boolean isProcessed() { return processed; } public void setProcessed() { processed = true; } public OMDataSource getDataSource() { throw new UnsupportedOperationException(); } public boolean isExpanded() { throw new UnsupportedOperationException(); } public OMDataSource setDataSource(OMDataSource dataSource) { throw new UnsupportedOperationException(); } } axiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/om/0000755000000000000000000000000011131637472023100 5ustar rootrootaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/0000755000000000000000000000000011131637472024041 5ustar rootrootaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/0000755000000000000000000000000011131637472024620 5ustar rootrootaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/NodeListImpl.java0000644000000000000000000000354711131637472030037 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.dom; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import java.util.Iterator; /** Implementation of org.w3c.dom.NodeList */ public abstract class NodeListImpl implements NodeList { protected abstract Iterator getIterator(); /** * Returns the number of nodes. * * @see org.w3c.dom.NodeList#getLength() */ public int getLength() { Iterator children = getIterator(); int count = 0; while (children.hasNext()) { count++; children.next(); } return count; } /** * Returns the node at the given index. Returns null if the index is invalid. * * @see org.w3c.dom.NodeList#item(int) */ public Node item(int index) { Iterator children = getIterator(); int count = 0; while (children.hasNext()) { if (count == index) { return (Node) children.next(); } else { children.next(); } count++; } return null; } } axiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/DocumentImpl.java0000644000000000000000000004473311131637472030076 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.dom; import org.apache.axiom.om.OMConstants; import org.apache.axiom.om.OMContainer; import org.apache.axiom.om.OMDocument; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMException; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMNode; import org.apache.axiom.om.OMOutputFormat; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.om.impl.MTOMXMLStreamWriter; import org.apache.axiom.om.impl.OMDocumentImplUtil; import org.apache.axiom.om.impl.dom.factory.OMDOMFactory; import org.w3c.dom.Attr; import org.w3c.dom.CDATASection; import org.w3c.dom.Comment; import org.w3c.dom.DOMConfiguration; import org.w3c.dom.DOMException; import org.w3c.dom.DOMImplementation; import org.w3c.dom.Document; import org.w3c.dom.DocumentFragment; import org.w3c.dom.DocumentType; import org.w3c.dom.Element; import org.w3c.dom.EntityReference; import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import org.w3c.dom.ProcessingInstruction; import org.w3c.dom.Text; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamWriter; import java.io.OutputStream; import java.util.Enumeration; import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; public class DocumentImpl extends ParentNode implements Document, OMDocument { private String xmlVersion; private boolean xmlStandalone = false; private String charEncoding; private Vector idAttrs; protected ElementImpl documentElement; protected Hashtable identifiers; /** @param ownerDocument */ public DocumentImpl(DocumentImpl ownerDocument, OMFactory factory) { super(ownerDocument, factory); ((OMDOMFactory) factory).setDocument(this); this.done = true; } public DocumentImpl(OMXMLParserWrapper parserWrapper, OMFactory factory) { super(factory); this.builder = parserWrapper; ((OMDOMFactory) factory).setDocument(this); } public DocumentImpl(OMFactory factory) { super(factory); ((OMDOMFactory) factory).setDocument(this); this.done = true; } // / // /OMNode methods // // public void setType(int nodeType) throws OMException { throw new UnsupportedOperationException( "In OM Document object doesn't have a type"); } public int getType() throws OMException { throw new UnsupportedOperationException( "In OM Document object doesn't have a type"); } public void internalSerialize(XMLStreamWriter writer) throws XMLStreamException { internalSerialize(writer, true, !((MTOMXMLStreamWriter) writer).isIgnoreXMLDeclaration()); } // / // /Overrides ChildNode specific methods. // / public OMNode getNextOMSibling() throws OMException { return null; } public Node getNextSibling() { return null; } public OMContainer getParent() throws OMException { throw new UnsupportedOperationException("This is the document node"); } public OMNode getPreviousOMSibling() { throw new UnsupportedOperationException("This is the document node"); } public Node getPreviousSibling() { return null; } public void setNextOMSibling(OMNode node) { throw new UnsupportedOperationException("This is the document node"); } public void setParent(OMContainer element) { throw new UnsupportedOperationException("This is the document node"); } public void setPreviousOMSibling(OMNode node) { throw new UnsupportedOperationException("This is the document node"); } // / // /org.w3c.dom.Node methods // / public String getNodeName() { return "#document"; } public short getNodeType() { return Node.DOCUMENT_NODE; } // /org.w3c.dom.Document methods // / public Attr createAttribute(String name) throws DOMException { if (!DOMUtil.isQualifiedName(name)) { String msg = DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "INVALID_CHARACTER_ERR", null); throw new DOMException(DOMException.INVALID_CHARACTER_ERR, msg); } return new AttrImpl(this, name, this.factory); } public Attr createAttributeNS(String namespaceURI, String qualifiedName) throws DOMException { String localName = DOMUtil.getLocalName(qualifiedName); String prefix = DOMUtil.getPrefix(qualifiedName); if (!OMConstants.XMLNS_NS_PREFIX.equals(localName)) { this.checkQName(prefix, localName); } else { return this.createAttribute(localName); } return new AttrImpl(this, localName, new NamespaceImpl( namespaceURI, prefix), this.factory); } public CDATASection createCDATASection(String arg0) throws DOMException { // TODO throw new UnsupportedOperationException("TODO"); } public Comment createComment(String data) { return new CommentImpl(this, data, this.factory); } public DocumentFragment createDocumentFragment() { return new DocumentFragmentImpl(this, this.factory); } public Element createElement(String tagName) throws DOMException { return new ElementImpl(this, tagName, this.factory); } public Element createElementNS(String ns, String qualifiedName) throws DOMException { if (ns == null) ns = ""; String localName = DOMUtil.getLocalName(qualifiedName); String prefix = DOMUtil.getPrefix(qualifiedName); if(prefix == null) { prefix = ""; } //When the namespace is a default namespace if (prefix != null && !"".equals(prefix)) { this.checkQName(prefix, localName); } NamespaceImpl namespace = new NamespaceImpl(ns, prefix); return new ElementImpl(this, localName, namespace, this.factory); } public EntityReference createEntityReference(String arg0) throws DOMException { // TODO throw new UnsupportedOperationException("TODO"); } public ProcessingInstruction createProcessingInstruction(String target, String data) throws DOMException { return new ProcessingInstructionImpl(this, target, data, factory); } public Text createTextNode(String value) { return new TextImpl(this, value, this.factory); } public DocumentType getDoctype() { Iterator it = getChildren(); while (it.hasNext()) { Object child = it.next(); if (child instanceof DocumentType) { return (DocumentType)child; } else if (child instanceof Element) { // A doctype declaration can only appear before the root element. Stop here. return null; } } return null; } public Element getElementById(String elementId) { //If there are no id attrs if (this.idAttrs == null) { return null; } Enumeration attrEnum = this.idAttrs.elements(); while (attrEnum.hasMoreElements()) { Attr tempAttr = (Attr) attrEnum.nextElement(); if (tempAttr.getValue().equals(elementId)) { return tempAttr.getOwnerElement(); } } //If we reach this point then, there's no such attr return null; } public NodeList getElementsByTagName(String arg0) { // TODO throw new UnsupportedOperationException("TODO"); } public NodeList getElementsByTagNameNS(String arg0, String arg1) { // TODO throw new UnsupportedOperationException("TODO"); } public DOMImplementation getImplementation() { return new DOMImplementationImpl(); } public Node importNode(Node importedNode, boolean deep) throws DOMException { short type = importedNode.getNodeType(); Node newNode = null; switch (type) { case Node.ELEMENT_NODE: { Element newElement; if (importedNode.getLocalName() == null) { newElement = this.createElement(importedNode.getNodeName()); } else { String ns = importedNode.getNamespaceURI(); ns = (ns != null) ? ns.intern() : null; newElement = createElementNS(ns, importedNode.getNodeName()); } // Copy element's attributes, if any. NamedNodeMap sourceAttrs = importedNode.getAttributes(); if (sourceAttrs != null) { int length = sourceAttrs.getLength(); for (int index = 0; index < length; index++) { Attr attr = (Attr) sourceAttrs.item(index); if (attr.getNamespaceURI() != null && !attr.getNamespaceURI().equals( OMConstants.XMLNS_NS_URI)) { Attr newAttr = (Attr) importNode(attr, true); newElement.setAttributeNodeNS(newAttr); } else { // if (attr.getLocalName() == null) { Attr newAttr = (Attr) importNode(attr, true); newElement.setAttributeNode(newAttr); } } } newNode = newElement; break; } case Node.ATTRIBUTE_NODE: { if ("".equals(importedNode.getNamespaceURI()) || importedNode.getNamespaceURI() == null) { newNode = createAttribute(importedNode.getNodeName()); } else { //Check whether it is a default ns decl if (OMConstants.XMLNS_NS_PREFIX.equals(importedNode.getNodeName())) { newNode = createAttribute(importedNode.getNodeName()); } else { String ns = importedNode.getNamespaceURI(); ns = (ns != null) ? ns.intern() : null; newNode = createAttributeNS(ns , importedNode.getNodeName()); } } ((Attr) newNode).setValue(importedNode.getNodeValue()); break; } case Node.TEXT_NODE: { newNode = createTextNode(importedNode.getNodeValue()); break; } case Node.COMMENT_NODE: { newNode = createComment(importedNode.getNodeValue()); break; } case Node.DOCUMENT_FRAGMENT_NODE: { newNode = createDocumentFragment(); // No name, kids carry value break; } case Node.CDATA_SECTION_NODE: case Node.ENTITY_REFERENCE_NODE: case Node.ENTITY_NODE: case Node.PROCESSING_INSTRUCTION_NODE: case Node.DOCUMENT_TYPE_NODE: case Node.NOTATION_NODE: throw new UnsupportedOperationException("TODO : Implement handling of org.w3c.dom.Node type == " + type ); case Node.DOCUMENT_NODE: // Can't import document nodes default: { // Unknown node type String msg = DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null); throw new DOMException(DOMException.NOT_SUPPORTED_ERR, msg); } } // If deep, replicate and attach the kids. if (deep && !(importedNode instanceof Attr)) { for (Node srckid = importedNode.getFirstChild(); srckid != null; srckid = srckid.getNextSibling()) { newNode.appendChild(importNode(srckid, true)); } } return newNode; } public void internalSerializeAndConsume(XMLStreamWriter writer) throws XMLStreamException { internalSerialize(writer, false, !((MTOMXMLStreamWriter) writer).isIgnoreXMLDeclaration()); } // / // /OMDocument Methods // / public String getCharsetEncoding() { return this.charEncoding; } public String getXMLVersion() { return this.xmlVersion; } public String isStandalone() { return (this.xmlStandalone) ? "yes" : "no"; } public void setCharsetEncoding(String charsetEncoding) { this.charEncoding = charsetEncoding; } public void setOMDocumentElement(OMElement rootElement) { this.firstChild = (ElementImpl) rootElement; } public void setStandalone(String isStandalone) { this.xmlStandalone = "yes".equalsIgnoreCase(isStandalone); } public void serializeAndConsume(OutputStream output, OMOutputFormat format) throws XMLStreamException { MTOMXMLStreamWriter writer = new MTOMXMLStreamWriter(output, format); internalSerializeAndConsume(writer); writer.flush(); } public void serialize(OutputStream output, OMOutputFormat format) throws XMLStreamException { MTOMXMLStreamWriter writer = new MTOMXMLStreamWriter(output, format); internalSerialize(writer); writer.flush(); } public void setXMLVersion(String version) { this.xmlVersion = version; } /** * Returns the document element. * * @see org.apache.axiom.om.OMDocument#getOMDocumentElement() */ public OMElement getOMDocumentElement() { while (this.documentElement == null && !this.done) { this.builder.next(); } return this.documentElement; } /** * Returns the document element. * * @see org.w3c.dom.Document#getDocumentElement() */ public Element getDocumentElement() { return (Element) this.getOMDocumentElement(); } /** * Borrowed from the Xerces impl. Checks if the given qualified name is legal with respect to * the version of XML to which this document must conform. * * @param prefix prefix of qualified name * @param local local part of qualified name */ protected final void checkQName(String prefix, String local) { // check that both prefix and local part match NCName boolean validNCName = (prefix == null || XMLChar.isValidNCName(prefix)) && XMLChar.isValidNCName(local); if (!validNCName) { // REVISIT: add qname parameter to the message String msg = DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "INVALID_CHARACTER_ERR", null); throw new DOMException(DOMException.INVALID_CHARACTER_ERR, msg); } if (prefix == null || prefix.equals("")) { String msg = DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "NAMESPACE_ERR", null); throw new DOMException(DOMException.NAMESPACE_ERR, msg); } } public void build() { if (this.firstChild != null && !this.firstChild.done) { this.firstChild.build(); } this.done = true; } protected void addIdAttr(Attr attr) { if (this.idAttrs == null) { this.idAttrs = new Vector(); } this.idAttrs.add(attr); } protected void removeIdAttr(Attr attr) { if (this.idAttrs != null) { this.idAttrs.remove(attr); } } /* * DOM-Level 3 methods */ public String getTextContent() throws DOMException { return null; } public void setTextContent(String textContent) throws DOMException { // no-op } public Node adoptNode(Node node) throws DOMException { //OK... I'm cheating here, a BIG TODO return this.importNode(node, true); } public String getDocumentURI() { // TODO TODO throw new UnsupportedOperationException("TODO"); } public DOMConfiguration getDomConfig() { // TODO TODO throw new UnsupportedOperationException("TODO"); } public String getInputEncoding() { // TODO TODO throw new UnsupportedOperationException("TODO"); } public boolean getStrictErrorChecking() { // TODO TODO throw new UnsupportedOperationException("TODO"); } public String getXmlEncoding() { return this.charEncoding; } public boolean getXmlStandalone() { return this.xmlStandalone; } public String getXmlVersion() { return getXMLVersion(); } public void normalizeDocument() { // TODO TODO throw new UnsupportedOperationException("TODO"); } public Node renameNode(Node arg0, String arg1, String arg2) throws DOMException { // TODO TODO throw new UnsupportedOperationException("TODO"); } public void setDocumentURI(String arg0) { // TODO TODO throw new UnsupportedOperationException("TODO"); } public void setStrictErrorChecking(boolean arg0) { // TODO TODO throw new UnsupportedOperationException("TODO"); } public void setXmlStandalone(boolean standalone) throws DOMException { this.xmlStandalone = standalone; } public void setXmlVersion(String version) throws DOMException { setXMLVersion(version); } protected void internalSerialize(XMLStreamWriter writer, boolean cache, boolean includeXMLDeclaration) throws XMLStreamException { OMDocumentImplUtil.internalSerialize(this, writer, cache, includeXMLDeclaration); } } axiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/CharacterImpl.java0000644000000000000000000001366211131637472030211 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.dom; import org.apache.axiom.om.OMFactory; import org.w3c.dom.CharacterData; import org.w3c.dom.DOMException; /** * This implements the OMText operations which are to be inherited by TextImpl, CommentImpl, * CDATASectionImpl. */ public abstract class CharacterImpl extends ChildNode implements CharacterData { protected StringBuffer textValue; protected CharacterImpl(OMFactory factory) { super(factory); } /** @param ownerNode */ public CharacterImpl(DocumentImpl ownerNode, OMFactory factory) { super(ownerNode, factory); } public CharacterImpl(DocumentImpl ownerNode, String value, OMFactory factory) { super(ownerNode, factory); this.textValue = (value != null) ? new StringBuffer(value) : new StringBuffer(""); } /// ///org.w3c.dom.CharacterData mrthods /// public void appendData(String value) throws DOMException { if (this.isReadonly()) { throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "NO_MODIFICATION_ALLOWED_ERR", null)); } this.textValue.append(value); } /** * */ public void deleteData(int offset, int count) throws DOMException { this.replaceData(offset, count, null); } /** If the given data is null the content will be deleted. */ public void replaceData(int offset, int count, String data) throws DOMException { if (this.isReadonly()) { throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "NO_MODIFICATION_ALLOWED_ERR", null)); } int length = this.textValue.length(); if (offset < 0 || offset > length - 1 || count < 0) { throw new DOMException(DOMException.INDEX_SIZE_ERR, DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "INDEX_SIZE_ERR", null)); } else { int end = Math.min(count + offset, length); if (data == null) { this.textValue.delete(offset, end); } else { this.textValue.replace(offset, end, data); } } } /** Returns the value of the data. */ public String getData() throws DOMException { return (this.textValue != null) ? this.textValue.toString() : ""; } /** Inserts a string at the specified offset. */ public void insertData(int offset, String data) throws DOMException { int length = this.getLength(); if (this.isReadonly()) { throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "NO_MODIFICATION_ALLOWED_ERR", null)); } if (offset < 0 || offset > length - 1) { throw new DOMException(DOMException.INDEX_SIZE_ERR, DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "INDEX_SIZE_ERR", null)); } this.textValue.insert(offset, data); } /** Sets the text value of data. */ public void setData(String data) throws DOMException { if (!this.isReadonly()) { this.textValue.replace(0, this.getLength(), data); } else { throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "NO_MODIFICATION_ALLOWED_ERR", null)); } } /** * Extracts a range of data from the node. * * @return Returns the specified substring. If the sum of offset and count exceeds the length, then * all 16-bit units to the end of the data are returned. */ public String substringData(int offset, int count) throws DOMException { if (offset < 0 || offset > this.getLength() || count < 0) { throw new DOMException(DOMException.INDEX_SIZE_ERR, DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "INDEX_SIZE_ERR", null)); } int end = Math.min(count + offset, textValue.length()); return this.textValue.substring(offset, end); } /** * Returns the length of the string value. */ public int getLength() { return (this.textValue != null) ? this.textValue.length() : 0; } } axiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/DOMUtil.java0000644000000000000000000000527711131637472026753 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.dom; /** Utility class for the OM-DOM implementation */ class DOMUtil { public static boolean isQualifiedName(String value) { // TODO check for valid characters // throw new UnsupportedOperationException("TODO"); return true; } /** * @deprecated please use isQualifiedName * @param value * @return */ public static boolean isValidChras(String value) { // TODO check for valid characters // throw new UnsupportedOperationException("TODO"); return true; } public static boolean isValidNamespace(String namespaceURI, String qualifiedname) { // TODO check for valid namespace /** * if the qualifiedName has a prefix and the namespaceURI is null, if * the qualifiedName has a prefix that is "xml" and the namespaceURI is * different from " http://www.w3.org/XML/1998/namespace", or if the * qualifiedName, or its prefix, is "xmlns" and the namespaceURI is * different from " http://www.w3.org/2000/xmlns/". */ // throw new UnsupportedOperationException("TODO"); // temporary fix return true; } /** * Get the local name from a qualified name * * @param qualifiedName */ public static String getLocalName(String qualifiedName) { if (qualifiedName.indexOf(":") > -1 && !qualifiedName.trim().endsWith(":")) { return qualifiedName.split(":")[1]; } else { return qualifiedName; } } /** * Get the prefix from a qualified name * * @param qualifiedName */ public static String getPrefix(String qualifiedName) { if (qualifiedName.indexOf(":") > -1) { return qualifiedName.split(":")[0]; } else { return null; } } } axiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/jaxp/0000755000000000000000000000000011131637472025562 5ustar rootroot././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/jaxp/DOOMDocumentBuilderFactory.javaaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/jaxp/DOOMDocumentBuilderFac0000644000000000000000000000360111131637472031663 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.dom.jaxp; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; /** * Document builder factory that conforms to JAXP. */ public class DOOMDocumentBuilderFactory extends DocumentBuilderFactory { public DocumentBuilder newDocumentBuilder() throws ParserConfigurationException { return new DOOMDocumentBuilder(); } public Object getAttribute(String arg0) throws IllegalArgumentException { // TODO throw new UnsupportedOperationException("TODO"); } public void setAttribute(String arg0, Object arg1) throws IllegalArgumentException { // // TODO // throw new UnsupportedOperationException("TODO"); } public void setFeature(String name, boolean value) throws ParserConfigurationException { // TODO TODO OS } public boolean getFeature(String arg0) throws ParserConfigurationException { // TODO TODO throw new UnsupportedOperationException("TODO"); } } ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/jaxp/DOOMDocumentBuilder.javaaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/jaxp/DOOMDocumentBuilder.ja0000644000000000000000000001212611131637472031644 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.dom.jaxp; import org.apache.axiom.om.impl.builder.StAXOMBuilder; import org.apache.axiom.om.impl.dom.DOMImplementationImpl; import org.apache.axiom.om.impl.dom.DocumentImpl; import org.apache.axiom.om.impl.dom.ElementImpl; import org.apache.axiom.om.impl.dom.factory.OMDOMFactory; import org.apache.axiom.om.util.StAXUtils; import org.w3c.dom.DOMImplementation; import org.w3c.dom.Document; import org.xml.sax.EntityResolver; import org.xml.sax.ErrorHandler; import org.xml.sax.InputSource; import org.xml.sax.SAXException; import javax.xml.parsers.DocumentBuilder; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; public class DOOMDocumentBuilder extends DocumentBuilder { protected DOOMDocumentBuilder() { } /** * Returns whether the parser is configured to understand namespaces or not. The StAX parser * used by this DOM impl is namespace aware therefore this will always return true. * * @see javax.xml.parsers.DocumentBuilder#isNamespaceAware() */ public boolean isNamespaceAware() { return true; } /** * The StAX builder used is the org.apache.axiom.om.impl.llom.StAXOMBuilder is a validating * builder. * * @see javax.xml.parsers.DocumentBuilder#isValidating() */ public boolean isValidating() { return true; } public DOMImplementation getDOMImplementation() { return new DOMImplementationImpl(); } /** * Returns a new document impl. * * @see javax.xml.parsers.DocumentBuilder#newDocument() */ public Document newDocument() { OMDOMFactory factory = new OMDOMFactory(); DocumentImpl documentImpl = new DocumentImpl(factory); documentImpl.setComplete(true); return documentImpl; } public void setEntityResolver(EntityResolver arg0) { // TODO } public void setErrorHandler(ErrorHandler arg0) { // TODO } public Document parse(InputSource inputSource) throws SAXException, IOException { try { OMDOMFactory factory = new OMDOMFactory(); // Not really sure whether this will work :-? XMLStreamReader reader = StAXUtils .createXMLStreamReader(inputSource.getCharacterStream()); StAXOMBuilder builder = new StAXOMBuilder(factory, reader); DocumentImpl doc = (DocumentImpl) builder.getDocument(); ((ElementImpl) doc.getDocumentElement()).build(); return (DocumentImpl) builder.getDocument(); } catch (XMLStreamException e) { throw new SAXException(e); } } /** @see javax.xml.parsers.DocumentBuilder#parse(java.io.InputStream) */ public Document parse(InputStream is) throws SAXException, IOException { try { OMDOMFactory factory = new OMDOMFactory(); XMLStreamReader reader = StAXUtils .createXMLStreamReader(is); StAXOMBuilder builder = new StAXOMBuilder(factory, reader); return (DocumentImpl) builder.getDocument(); } catch (XMLStreamException e) { throw new SAXException(e); } } /** @see javax.xml.parsers.DocumentBuilder#parse(java.io.File) */ public Document parse(File file) throws SAXException, IOException { try { OMDOMFactory factory = new OMDOMFactory(); XMLStreamReader reader = StAXUtils .createXMLStreamReader(new FileInputStream(file)); StAXOMBuilder builder = new StAXOMBuilder(factory, reader); return (DocumentImpl) builder.getDocument(); } catch (XMLStreamException e) { throw new SAXException(e); } } /** @see javax.xml.parsers.DocumentBuilder#parse(java.io.InputStream, String) */ public Document parse(InputStream is, String systemId) throws SAXException, IOException { // TODO throw new UnsupportedOperationException("TODO"); } /** @see javax.xml.parsers.DocumentBuilder#parse(String) */ public Document parse(String uri) throws SAXException, IOException { // TODO throw new UnsupportedOperationException("TODO"); } } ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/jaxp/DocumentBuilderFactoryImpl.javaaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/jaxp/DocumentBuilderFactory0000644000000000000000000001261511131637472032127 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.dom.jaxp; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import javax.xml.validation.Schema; /** * @deprecated * This class has static methods that allow to switch between DOOM and the default * DOM implementation as returned by JAXP. This was a hack introduced for Rampart. * Recent versions of Rampart no longer rely on this hack. On the other hand * usage of {@link #setDOOMRequired(boolean)} in a concurrent environment can * lead to unexpected behavior and severe bugs, as shown in WSCOMMONS-210 and AXIS2-1570. * Due to the way {@link #newDocumentBuilder()} is implemented, it is not possible * to get rid of the setDOOMRequired hack without the risk of breaking existing code. * Therefore this class has been deprecated in favor of {@link DOOMDocumentBuilderFactory}. */ public class DocumentBuilderFactoryImpl extends DocumentBuilderFactory { /** * Temporary solution until DOOM's DocumentBuilder module is done. Use ThreadLocal to determine * whether or not DOOM implementation is required. By default (isDOOMRequired() == false), we * will use the one from JDK (Crimson) */ private static DocumentBuilderFactory originalDocumentBuilderFactory = DocumentBuilderFactory.newInstance(); private static String originalDocumentBuilderFactoryClassName = null; private static ThreadLocal documentBuilderFactoryTracker = new ThreadLocal(); protected Schema schema; public static boolean isDOOMRequired() { Object value = documentBuilderFactoryTracker.get(); return (value != null); } public static void setDOOMRequired(boolean isDOOMRequired) { String systemKey = DocumentBuilderFactory.class.getName(); if (isDOOMRequired) { if (!isDOOMRequired()) { originalDocumentBuilderFactory = DocumentBuilderFactory.newInstance(); originalDocumentBuilderFactoryClassName = originalDocumentBuilderFactory.getClass().getName(); documentBuilderFactoryTracker.set(Boolean.TRUE); System.setProperty(systemKey, DocumentBuilderFactoryImpl.class.getName()); } } else { String currentFactoryClassName = DocumentBuilderFactory.newInstance().getClass().getName(); if (currentFactoryClassName != null && currentFactoryClassName.equals(DocumentBuilderFactoryImpl.class.getName())) { System.getProperties().remove(systemKey); if (originalDocumentBuilderFactoryClassName != null) { System.setProperty(DocumentBuilderFactory.class.getName(), originalDocumentBuilderFactoryClassName); } } documentBuilderFactoryTracker.set(null); originalDocumentBuilderFactory = null; } } public DocumentBuilderFactoryImpl() { super(); } public DocumentBuilder newDocumentBuilder() throws ParserConfigurationException { /** * Determine which DocumentBuilder implementation should be returned */ return isDOOMRequired() ? new DocumentBuilderImpl(this) : originalDocumentBuilderFactory.newDocumentBuilder(); } public Object getAttribute(String arg0) throws IllegalArgumentException { // TODO throw new UnsupportedOperationException("TODO"); } public void setAttribute(String arg0, Object arg1) throws IllegalArgumentException { // // TODO // throw new UnsupportedOperationException("TODO"); } public static DocumentBuilderFactory newInstance() { return new DocumentBuilderFactoryImpl(); } public void setFeature(String name, boolean value) throws ParserConfigurationException { // TODO TODO OS } public boolean getFeature(String arg0) throws ParserConfigurationException { // TODO TODO throw new UnsupportedOperationException("TODO"); } /* (non-Javadoc) * @see javax.xml.parsers.DocumentBuilderFactory#setSchema(javax.xml.validation.Schema) */ public void setSchema(Schema schema) { //HACK: Overriding to get opensaml working !! this.schema = schema; } /* (non-Javadoc) * @see javax.xml.parsers.DocumentBuilderFactory#getSchema() */ public Schema getSchema() { //HACK: Overriding to get opensaml working !! return this.schema; } } ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/jaxp/DocumentBuilderImpl.javaaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/jaxp/DocumentBuilderImpl.ja0000644000000000000000000001311611131637472032007 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.dom.jaxp; import org.apache.axiom.om.impl.builder.StAXOMBuilder; import org.apache.axiom.om.impl.dom.DOMImplementationImpl; import org.apache.axiom.om.impl.dom.DocumentImpl; import org.apache.axiom.om.impl.dom.ElementImpl; import org.apache.axiom.om.impl.dom.factory.OMDOMFactory; import org.apache.axiom.om.util.StAXUtils; import org.w3c.dom.DOMImplementation; import org.w3c.dom.Document; import org.xml.sax.EntityResolver; import org.xml.sax.ErrorHandler; import org.xml.sax.InputSource; import org.xml.sax.SAXException; import javax.xml.parsers.DocumentBuilder; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import javax.xml.validation.Schema; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; /** * @deprecated see {@link DocumentBuilderFactoryImpl} */ public class DocumentBuilderImpl extends DocumentBuilder { /** The DocumentBuilderFactory used to create this document builder */ private DocumentBuilderFactoryImpl factory; protected DocumentBuilderImpl(DocumentBuilderFactoryImpl fac) { super(); this.factory = fac; } /** * Returns whether the parser is configured to understand namespaces or not. The StAX parser * used by this DOM impl is namespace aware therefore this will always return true. * * @see javax.xml.parsers.DocumentBuilder#isNamespaceAware() */ public boolean isNamespaceAware() { return true; } /** * The StAX builder used is the org.apache.axiom.om.impl.llom.StAXOMBuilder is a validating * builder. * * @see javax.xml.parsers.DocumentBuilder#isValidating() */ public boolean isValidating() { return true; } public DOMImplementation getDOMImplementation() { return new DOMImplementationImpl(); } /** * Returns a new document impl. * * @see javax.xml.parsers.DocumentBuilder#newDocument() */ public Document newDocument() { OMDOMFactory factory = new OMDOMFactory(); DocumentImpl documentImpl = new DocumentImpl(factory); documentImpl.setComplete(true); return documentImpl; } public void setEntityResolver(EntityResolver arg0) { // TODO } public void setErrorHandler(ErrorHandler arg0) { // TODO } public Document parse(InputSource inputSource) throws SAXException, IOException { try { OMDOMFactory factory = new OMDOMFactory(); // Not really sure whether this will work :-? XMLStreamReader reader = StAXUtils .createXMLStreamReader(inputSource.getCharacterStream()); StAXOMBuilder builder = new StAXOMBuilder(factory, reader); DocumentImpl doc = (DocumentImpl) builder.getDocument(); ((ElementImpl) doc.getDocumentElement()).build(); return (DocumentImpl) builder.getDocument(); } catch (XMLStreamException e) { throw new SAXException(e); } } /** @see javax.xml.parsers.DocumentBuilder#parse(java.io.InputStream) */ public Document parse(InputStream is) throws SAXException, IOException { try { OMDOMFactory factory = new OMDOMFactory(); XMLStreamReader reader = StAXUtils .createXMLStreamReader(is); StAXOMBuilder builder = new StAXOMBuilder(factory, reader); return (DocumentImpl) builder.getDocument(); } catch (XMLStreamException e) { throw new SAXException(e); } } /** @see javax.xml.parsers.DocumentBuilder#parse(java.io.File) */ public Document parse(File file) throws SAXException, IOException { try { OMDOMFactory factory = new OMDOMFactory(); XMLStreamReader reader = StAXUtils .createXMLStreamReader(new FileInputStream(file)); StAXOMBuilder builder = new StAXOMBuilder(factory, reader); return (DocumentImpl) builder.getDocument(); } catch (XMLStreamException e) { throw new SAXException(e); } } /** @see javax.xml.parsers.DocumentBuilder#parse(java.io.InputStream, String) */ public Document parse(InputStream is, String systemId) throws SAXException, IOException { // TODO throw new UnsupportedOperationException("TODO"); } /** @see javax.xml.parsers.DocumentBuilder#parse(String) */ public Document parse(String uri) throws SAXException, IOException { // TODO throw new UnsupportedOperationException("TODO"); } /* (non-Javadoc) * @see javax.xml.parsers.DocumentBuilder#getSchema() */ public Schema getSchema() { //HACK : To get opensaml working return this.factory.schema; } } axiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/NamedNodeMapImpl.java0000644000000000000000000003575711131637472030616 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.dom; import org.w3c.dom.DOMException; import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; import java.util.Vector; /** Most of the implementation is taken from org.apache.xerces.dom.NamedNodeMapImpl */ public class NamedNodeMapImpl implements NamedNodeMap { Vector nodes; ParentNode ownerNode; // // Data // protected short flags; protected final static short READONLY = 0x1 << 0; protected final static short CHANGED = 0x1 << 1; protected final static short HASDEFAULTS = 0x1 << 2; protected NamedNodeMapImpl(ParentNode ownerNode) { this.ownerNode = ownerNode; } /** * */ public Node getNamedItem(String name) { int i = findNamePoint(name, 0); return (i < 0) ? null : (Node) (nodes.elementAt(i)); } /** From org.apache.xerces.dom.NamedNodeMapImpl */ public Node item(int index) { return (nodes != null && index < nodes.size()) ? (Node) (nodes .elementAt(index)) : null; } /** From org.apache.xerces.dom.NamedNodeMapImpl */ public int getLength() { return (nodes != null) ? nodes.size() : 0; } /** * Removes a node specified by name. * * @param name * The name of a node to remove. * @return Returns the node removed from the map if a node with such a name * exists. */ /***/ public Node removeNamedItem(String name) throws DOMException { if (isReadOnly()) { String msg = DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "NO_MODIFICATION_ALLOWED_ERR", null); throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, msg); } int i = findNamePoint(name, 0); if (i < 0) { String msg = DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "NOT_FOUND_ERR", null); throw new DOMException(DOMException.NOT_FOUND_ERR, msg); } NodeImpl n = (NodeImpl) nodes.elementAt(i); nodes.removeElementAt(i); return n; } // removeNamedItem(String):Node /** * Introduced in DOM Level 2. Retrieves a node specified by local name and namespace URI. * * @param namespaceURI The namespace URI of the node to retrieve. When it is null or an empty * string, this method behaves like getNamedItem. * @param localName The local name of the node to retrieve. * @return Returns s Node (of any type) with the specified name, or null if the specified name * did not identify any node in the map. */ public Node getNamedItemNS(String namespaceURI, String localName) { int i = findNamePoint(namespaceURI, localName); return (i < 0) ? null : (Node) (nodes.elementAt(i)); } // getNamedItemNS(String,String):Node /** * Adds a node using its namespaceURI and localName. * * @param arg A node to store in a named node map. The node will later be accessible using the * value of the namespaceURI and localName attribute of the node. If a node with * those namespace URI and local name is already present in the map, it is replaced * by the new one. * @return Returns the replaced Node if the new Node replaces an existing node else returns * null. * @see org.w3c.dom.NamedNodeMap#setNamedItem */ public Node setNamedItemNS(Node arg) throws DOMException { DocumentImpl ownerDocument = (DocumentImpl) ownerNode .getOwnerDocument(); if (isReadOnly()) { String msg = DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "NO_MODIFICATION_ALLOWED_ERR", null); throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, msg); } if (arg.getOwnerDocument() != ownerDocument) { String msg = DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "WRONG_DOCUMENT_ERR", null); throw new DOMException(DOMException.WRONG_DOCUMENT_ERR, msg); } int i = findNamePoint(arg.getNamespaceURI(), arg.getLocalName()); NodeImpl previous = null; if (i >= 0) { previous = (NodeImpl) nodes.elementAt(i); nodes.setElementAt(arg, i); } else { // If we can't find by namespaceURI, localName, then we find by // nodeName so we know where to insert. i = findNamePoint(arg.getNodeName(), 0); if (i >= 0) { previous = (NodeImpl) nodes.elementAt(i); nodes.insertElementAt(arg, i); } else { i = -1 - i; // Insert point (may be end of list) if (null == nodes) { nodes = new Vector(5, 10); } nodes.insertElementAt(arg, i); } } return previous; } // setNamedItemNS(Node):Node /** * Introduced in DOM Level 2. Removes a node specified by local name and namespace URI. * * @param namespaceURI The namespace URI of the node to remove. When it is null or an empty * string, this method behaves like removeNamedItem. * @param name The local name of the node to remove. * @return Returns the node removed from the map if a node with such a local name and namespace * URI exists. * @throws NOT_FOUND_ERR: Raised if there is no node named name in the map. */ public Node removeNamedItemNS(String namespaceURI, String name) throws DOMException { if (isReadOnly()) { String msg = DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "NO_MODIFICATION_ALLOWED_ERR", null); throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, msg); } int i = findNamePoint(namespaceURI, name); if (i < 0) { String msg = DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "NOT_FOUND_ERR", null); throw new DOMException(DOMException.NOT_FOUND_ERR, msg); } NodeImpl n = (NodeImpl) nodes.elementAt(i); nodes.removeElementAt(i); return n; } // removeNamedItem(String):Node /** * Adds a node using its nodeName attribute. As the nodeName attribute is used to derive the * name which the node must be stored under, multiple nodes of certain types (those that have a * "special" string value) cannot be stored as the names would clash. This is seen as preferable * to allowing nodes to be aliased. * * @param arg A node to store in a named node map. The node will later be accessible using the * value of the namespaceURI and localName attribute of the node. If a node with * those namespace URI and local name is already present in the map, it is replaced * by the new one. * @return Returns the replaced Node if the new Node replaces an existing node, otherwise * returns null. * @throws org.w3c.dom.DOMException The exception description. * @see org.w3c.dom.NamedNodeMap#setNamedItem */ public Node setNamedItem(Node arg) throws DOMException { DocumentImpl ownerDocument = (DocumentImpl) ownerNode .getOwnerDocument(); if (isReadOnly()) { String msg = DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "NO_MODIFICATION_ALLOWED_ERR", null); throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, msg); } if (arg.getOwnerDocument() != ownerDocument) { String msg = DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "WRONG_DOCUMENT_ERR", null); throw new DOMException(DOMException.WRONG_DOCUMENT_ERR, msg); } int i = findNamePoint(arg.getNodeName(), 0); NodeImpl previous = null; if (i >= 0) { previous = (NodeImpl) nodes.elementAt(i); nodes.setElementAt(arg, i); } else { i = -1 - i; // Insert point (may be end of list) if (null == nodes) { nodes = new Vector(5, 10); } nodes.insertElementAt(arg, i); } return previous; } // setNamedItem(Node):Node final boolean isReadOnly() { return (flags & READONLY) != 0; } final void isReadOnly(boolean value) { flags = (short) (value ? flags | READONLY : flags & ~READONLY); } final boolean changed() { return (flags & CHANGED) != 0; } final void changed(boolean value) { flags = (short) (value ? flags | CHANGED : flags & ~CHANGED); } final boolean hasDefaults() { return (flags & HASDEFAULTS) != 0; } final void hasDefaults(boolean value) { flags = (short) (value ? flags | HASDEFAULTS : flags & ~HASDEFAULTS); } /** * From org.apache.xerces.dom.NamedNodeMapImpl *

* Subroutine: Locates the named item, or the point at which said item should be added. * * @param name Name of a node to look up. * @return If positive or zero, the index of the found item. If negative, index of the * appropriate point at which to insert the item, encoded as -1-index and hence * reconvertable by subtracting it from -1. (Encoding because I don't want to recompare * the strings but don't want to burn bytes on a datatype to hold a flagged value.) */ protected int findNamePoint(String name, int start) { // Binary search int i = 0; if (nodes != null) { int first = start; int last = nodes.size() - 1; while (first <= last) { i = (first + last) / 2; int test = name.compareTo(((Node) (nodes.elementAt(i))) .getNodeName()); if (test == 0) { return i; // Name found } else if (test < 0) { last = i - 1; } else { first = i + 1; } } if (first > i) { i = first; } } return -1 - i; // not-found has to be encoded. } // findNamePoint(String):int /** This findNamePoint is for DOM Level 2 Namespaces. */ protected int findNamePoint(String namespaceURI, String name) { if (nodes == null) return -1; if (name == null) return -1; // This is a linear search through the same nodes Vector. // The Vector is sorted on the DOM Level 1 nodename. // The DOM Level 2 NS keys are namespaceURI and Localname, // so we must linear search thru it. // In addition, to get this to work with nodes without any namespace // (namespaceURI and localNames are both null) we then use the nodeName // as a seconday key. for (int i = 0; i < nodes.size(); i++) { NodeImpl a = (NodeImpl) nodes.elementAt(i); String aNamespaceURI = a.getNamespaceURI(); String aLocalName = a.getLocalName(); if (namespaceURI == null) { if (aNamespaceURI == null && (name.equals(aLocalName) || (aLocalName == null && name.equals(a.getNodeName())))) return i; } else { if (namespaceURI.equals(aNamespaceURI) && name.equals(aLocalName)) return i; } } return -1; } // Compare 2 nodes in the map. If a precedes b, return true, otherwise // return false protected boolean precedes(Node a, Node b) { if (nodes != null) { for (int i = 0; i < nodes.size(); i++) { Node n = (Node) nodes.elementAt(i); if (n == a) return true; if (n == b) return false; } } return false; } /** NON-DOM: Remove attribute at specified index. */ protected void removeItem(int index) { if (nodes != null && index < nodes.size()) { nodes.removeElementAt(index); } } protected Object getItem(int index) { if (nodes != null) { return nodes.elementAt(index); } return null; } protected int addItem(Node arg) { int i = findNamePoint(arg.getNamespaceURI(), arg.getLocalName()); if (i >= 0) { nodes.setElementAt(arg, i); } else { // If we can't find by namespaceURI, localName, then we find by // nodeName so we know where to insert. i = findNamePoint(arg.getNodeName(), 0); if (i >= 0) { nodes.insertElementAt(arg, i); } else { i = -1 - i; // Insert point (may be end of list) if (null == nodes) { nodes = new Vector(5, 10); } nodes.insertElementAt(arg, i); } } return i; } /** * NON-DOM: copy content of this map into the specified vector * * @param list Vector to copy information into. * @return Returns a copy of this node named map. */ protected Vector cloneMap(Vector list) { if (list == null) { list = new Vector(5, 10); } list.setSize(0); if (nodes != null) { for (int i = 0; i < nodes.size(); i++) { list.insertElementAt(nodes.elementAt(i), i); } } return list; } protected int getNamedItemIndex(String namespaceURI, String localName) { return findNamePoint(namespaceURI, localName); } /** NON-DOM remove all elements from this map. */ public void removeAll() { if (nodes != null) { nodes.removeAllElements(); } } } axiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/0000755000000000000000000000000011131637472026267 5ustar rootrootaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/OMDOMFactory.java0000644000000000000000000003623211131637472031343 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.dom.factory; import org.apache.axiom.om.OMAbstractFactory; import org.apache.axiom.om.OMAttribute; import org.apache.axiom.om.OMComment; import org.apache.axiom.om.OMContainer; import org.apache.axiom.om.OMDataSource; import org.apache.axiom.om.OMDocType; import org.apache.axiom.om.OMDocument; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMException; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMHierarchyException; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMNode; import org.apache.axiom.om.OMProcessingInstruction; import org.apache.axiom.om.OMSourcedElement; import org.apache.axiom.om.OMText; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.om.impl.OMNodeEx; import org.apache.axiom.om.impl.dom.AttrImpl; import org.apache.axiom.om.impl.dom.CommentImpl; import org.apache.axiom.om.impl.dom.DocumentFragmentImpl; import org.apache.axiom.om.impl.dom.DocumentImpl; import org.apache.axiom.om.impl.dom.ElementImpl; import org.apache.axiom.om.impl.dom.NamespaceImpl; import org.apache.axiom.om.impl.dom.OMDOMException; import org.apache.axiom.om.impl.dom.ParentNode; import org.apache.axiom.om.impl.dom.ProcessingInstructionImpl; import org.apache.axiom.om.impl.dom.TextImpl; import org.w3c.dom.Node; import javax.xml.namespace.QName; /** * OM factory implementation for DOOM. It creates nodes that implement * DOM as defined by the interfaces in {@link org.w3c.dom}. *

* Since DOM requires every node to have an owner document even if it has not yet * been added to a tree, this factory internally maintains a reference to a * {@link DocumentImpl} instance. The document can be set explicitly using the * {@link #OMDOMFactory(DocumentImpl)} constructor or the {@link #setDocument(DocumentImpl)} * method. If none is set, it will be implicitly created when the first node is created. * All nodes created by this factory will have this {@link DocumentImpl} instance as owner * document. *

* This has several important consequences: *

    *
  • The same instance of this class should not be used to parse or construct * multiple documents unless {@link #setDocument(DocumentImpl)} is used * to reset the {@link DocumentImpl} instance before processing the next document.
  • *
  • Instances of this class are not thread safe and using a single instance concurrently * will lead to undefined results.
  • *
  • Since instances are not stateless, this class (as well as its subclasses) must * not be used in conjunction with {@link OMAbstractFactory}. In particular, * the om.factory system property must not be set to this class.
  • *
*/ public class OMDOMFactory implements OMFactory { protected DocumentImpl document; public OMDOMFactory() { } public OMDOMFactory(DocumentImpl doc) { this.document = doc; } public OMDocument createOMDocument() { if (this.document == null) this.document = new DocumentImpl(this); return this.document; } /** * Configure this factory to use the given document. Use with care. * * @param document */ public void setDocument(DocumentImpl document) { this.document = document; } public OMElement createOMElement(String localName, OMNamespace ns) { return new ElementImpl((DocumentImpl) this.createOMDocument(), localName, (NamespaceImpl) ns, this); } public OMElement createOMElement(String localName, OMNamespace ns, OMContainer parent) throws OMDOMException { if (parent == null) { return new ElementImpl((DocumentImpl) this.createOMDocument(), localName, (NamespaceImpl) ns, this); } switch (((ParentNode) parent).getNodeType()) { case Node.ELEMENT_NODE: // We are adding a new child to an elem ElementImpl parentElem = (ElementImpl) parent; ElementImpl elem = new ElementImpl((DocumentImpl) parentElem .getOwnerDocument(), localName, (NamespaceImpl) ns, this); parentElem.appendChild(elem); return elem; case Node.DOCUMENT_NODE: DocumentImpl docImpl = (DocumentImpl) parent; return new ElementImpl(docImpl, localName, (NamespaceImpl) ns, this); case Node.DOCUMENT_FRAGMENT_NODE: DocumentFragmentImpl docFragImpl = (DocumentFragmentImpl) parent; return new ElementImpl((DocumentImpl) docFragImpl .getOwnerDocument(), localName, (NamespaceImpl) ns, this); default: throw new OMDOMException( "The parent container can only be an ELEMENT, DOCUMENT " + "or a DOCUMENT FRAGMENT"); } } /** Creates an OMElement with the builder. */ public OMElement createOMElement(String localName, OMNamespace ns, OMContainer parent, OMXMLParserWrapper builder) { switch (((ParentNode) parent).getNodeType()) { case Node.ELEMENT_NODE: // We are adding a new child to an elem ElementImpl parentElem = (ElementImpl) parent; ElementImpl elem = new ElementImpl((DocumentImpl) parentElem .getOwnerDocument(), localName, (NamespaceImpl) ns, builder, this); parentElem.appendChild(elem); return elem; case Node.DOCUMENT_NODE: DocumentImpl docImpl = (DocumentImpl) parent; ElementImpl elem2 = new ElementImpl(docImpl, localName, (NamespaceImpl) ns, builder, this); docImpl.appendChild(elem2); return elem2; case Node.DOCUMENT_FRAGMENT_NODE: DocumentFragmentImpl docFragImpl = (DocumentFragmentImpl) parent; return new ElementImpl((DocumentImpl) docFragImpl .getOwnerDocument(), localName, (NamespaceImpl) ns, builder, this); default: throw new OMDOMException( "The parent container can only be an ELEMENT, DOCUMENT " + "or a DOCUMENT FRAGMENT"); } } /* (non-Javadoc) * @see org.apache.axiom.om.OMFactory#createOMElement(org.apache.axiom.om.OMDataSource, java.lang.String, org.apache.axiom.om.OMNamespace, org.apache.axiom.om.OMContainer) */ public OMElement createOMElement(OMDataSource source, String localName, OMNamespace ns, OMContainer parent) { throw new UnsupportedOperationException("Not supported for DOM"); } /* (non-Javadoc) * @see org.apache.axiom.om.OMFactory#createOMElement(org.apache.axiom.om.OMDataSource, java.lang.String, org.apache.axiom.om.OMNamespace) */ public OMSourcedElement createOMElement(OMDataSource source, String localName, OMNamespace ns) { throw new UnsupportedOperationException("Not supported for DOM"); } /** * Creates an OMElement. * * @see org.apache.axiom.om.OMFactory#createOMElement(String, String, * String) */ public OMElement createOMElement(String localName, String namespaceURI, String namespacePrefix) { NamespaceImpl ns = new NamespaceImpl(namespaceURI, namespacePrefix); return this.createOMElement(localName, ns); } /** * Creates a new OMDOM Element node and adds it to the given parent. * * @see #createOMElement(String, OMNamespace, OMContainer) * @see org.apache.axiom.om.OMFactory#createOMElement( javax.xml.namespace.QName, * org.apache.axiom.om.OMContainer) */ public OMElement createOMElement(QName qname, OMContainer parent) throws OMException { NamespaceImpl ns; if (qname.getPrefix() != null) { ns = new NamespaceImpl(qname.getNamespaceURI(), qname.getPrefix()); } else { ns = new NamespaceImpl(qname.getNamespaceURI()); } return createOMElement(qname.getLocalPart(), ns, parent); } /** * Create an OMElement with the given QName *

* If the QName contains a prefix, we will ensure that an OMNamespace is created mapping the * given namespace to the given prefix. If no prefix is passed, we'll create a generated one. * * @param qname * @return the new OMElement. */ public OMElement createOMElement(QName qname) throws OMException { return createOMElement(qname, null); } /** * Creates a new OMNamespace. * * @see org.apache.axiom.om.OMFactory#createOMNamespace(String, String) */ public OMNamespace createOMNamespace(String uri, String prefix) { return new NamespaceImpl(uri, prefix); } /** * Creates a new OMDOM Text node with the given value and appends it to the given parent * element. * * @see org.apache.axiom.om.OMFactory#createOMText( org.apache.axiom.om.OMElement,String) */ public OMText createOMText(OMContainer parent, String text) { if (parent instanceof DocumentImpl) { throw new OMHierarchyException( "DOM doesn't support text nodes as children of a document"); } TextImpl txt = new TextImpl((DocumentImpl)((ElementImpl)parent).getOwnerDocument(), text, this); parent.addChild(txt); return txt; } public OMText createOMText(OMContainer parent, QName text) { return new TextImpl(parent, text, this); } public OMText createOMText(OMContainer parent, QName text, int type) { return new TextImpl(parent, text, type, this); } public OMText createOMText(OMContainer parent, String text, int type) { OMText textNode = createOMText(parent, text); ((OMNodeEx) textNode).setType(type); return textNode; } /** * Create OMText node that is a copy of the source text node * @param parent * @param source * @return */ public OMText createOMText(OMContainer parent, OMText source) { return new TextImpl(parent, (TextImpl) source, this); } public OMText createOMText(OMContainer parent, char[] charArary, int type) { ElementImpl parentElem = (ElementImpl) parent; TextImpl txt = new TextImpl((DocumentImpl) parentElem .getOwnerDocument(), charArary, this); parentElem.addChild(txt); return txt; } /** * Creates a OMDOM Text node carrying the given value. * * @see org.apache.axiom.om.OMFactory#createOMText(String) */ public OMText createOMText(String s) { return new TextImpl(this.document, s, this); } /** * Creates a Character node of the given type. * * @see org.apache.axiom.om.OMFactory#createOMText(String, int) */ public OMText createOMText(String text, int type) { switch (type) { case OMNode.TEXT_NODE: return new TextImpl(this.document, text, this); default: throw new OMDOMException("Only Text nodes are supported right now"); } } /** * Creates a new OMDOM Text node with the value of the given text value along with the MTOM * optimization parameters and returns it. * * @see org.apache.axiom.om.OMFactory#createOMText(String, String, boolean) */ public OMText createOMText(String text, String mimeType, boolean optimize) { return new TextImpl(this.document, text, mimeType, optimize, this); } /** * Creates a new OMDOM Text node with the given datahandler and the given MTOM optimization * configuration and returns it. * * @see org.apache.axiom.om.OMFactory#createOMText(Object, boolean) */ public OMText createOMText(Object dataHandler, boolean optimize) { return new TextImpl(this.document, dataHandler, optimize, this); } /** * Creates an OMDOM Text node, adds it to the give parent element and returns it. * * @see org.apache.axiom.om.OMFactory#createOMText(OMContainer, String, * String, boolean) */ public OMText createOMText(OMContainer parent, String s, String mimeType, boolean optimize) { TextImpl text = new TextImpl((DocumentImpl) ((ElementImpl) parent) .getOwnerDocument(), s, mimeType, optimize, this); parent.addChild(text); return text; } public OMText createOMText(String contentID, OMContainer parent, OMXMLParserWrapper builder) { TextImpl text = new TextImpl(contentID, parent, builder, this); parent.addChild(text); return text; } public OMAttribute createOMAttribute(String localName, OMNamespace ns, String value) { return new AttrImpl(this.getDocument(), localName, ns, value, this); } public OMDocType createOMDocType(OMContainer parent, String content) { // TODO throw new UnsupportedOperationException("TODO"); } public OMProcessingInstruction createOMProcessingInstruction( OMContainer parent, String piTarget, String piData) { ProcessingInstructionImpl pi = new ProcessingInstructionImpl(getDocumentFromParent(parent), piTarget, piData, this); parent.addChild(pi); return pi; } public OMComment createOMComment(OMContainer parent, String content) { CommentImpl comment = new CommentImpl(getDocumentFromParent(parent), content, this); parent.addChild(comment); return comment; } public DocumentImpl getDocument() { return (DocumentImpl) this.createOMDocument(); } public OMDocument createOMDocument(OMXMLParserWrapper builder) { this.document = new DocumentImpl(builder, this); return this.document; } private DocumentImpl getDocumentFromParent(OMContainer parent) { if (parent instanceof DocumentImpl) { return (DocumentImpl) parent; } else { return (DocumentImpl) ((ParentNode) parent).getOwnerDocument(); } } } ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/OMDOMImplementation.javaaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/OMDOMImplementation0000644000000000000000000000325111131637472031774 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.dom.factory; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMImplementation; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.impl.dom.soap11.SOAP11Factory; import org.apache.axiom.soap.impl.dom.soap12.SOAP12Factory; /** * Class encapsulating the DOOM implementation. *

* As explained in {@link OMDOMFactory}, OM factories for DOOM are not stateless. * Therefore {@link #getOMFactory()}, {@link #getSOAP11Factory()} and * {@link #getSOAP12Factory()} will return a new instance on every invocation. */ public class OMDOMImplementation extends OMImplementation { public OMFactory getOMFactory() { return new OMDOMFactory(); } public SOAPFactory getSOAP11Factory() { return new SOAP11Factory(); } public SOAPFactory getSOAP12Factory() { return new SOAP12Factory(); } } ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ProcessingInstructionImpl.javaaxiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ProcessingInstructionImpl.j0000644000000000000000000000625111131637472032177 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.dom; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamWriter; import org.apache.axiom.om.OMException; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMNode; import org.apache.axiom.om.OMProcessingInstruction; import org.w3c.dom.DOMException; import org.w3c.dom.Node; import org.w3c.dom.ProcessingInstruction; public class ProcessingInstructionImpl extends ChildNode implements ProcessingInstruction, OMProcessingInstruction { private String target; private String value; public ProcessingInstructionImpl(DocumentImpl ownerDocument, String target, String value, OMFactory factory) { super(ownerDocument, factory); this.target = target; this.value = value; done = true; } public int getType() { return OMNode.PI_NODE; } public void setType(int nodeType) throws OMException { if (nodeType != OMNode.PI_NODE) { throw new OMException("Can't change the type of a ProcessingInstruction node"); } } public short getNodeType() { return Node.PROCESSING_INSTRUCTION_NODE; } public String getTarget() { return target; } public void setTarget(String target) { this.target = target; } public String getValue() { return value; } public void setValue(String text) { this.value = text; } public String getData() { return value; } public void setData(String data) throws DOMException { if (!isReadonly()) { value = data; } else { throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "NO_MODIFICATION_ALLOWED_ERR", null)); } } public String getNodeName() { return target; } public String getNodeValue() throws DOMException { return value; } public void internalSerialize(XMLStreamWriter writer) throws XMLStreamException { writer.writeProcessingInstruction(target + " ", value); } public void internalSerializeAndConsume(XMLStreamWriter writer) throws XMLStreamException { internalSerialize(writer); } } axiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/NodeImpl.java0000644000000000000000000006671711131637472027213 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.dom; import org.apache.axiom.om.OMContainer; import org.apache.axiom.om.OMException; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMNode; import org.apache.axiom.om.OMOutputFormat; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.om.impl.MTOMXMLStreamWriter; import org.apache.axiom.om.impl.OMNodeEx; import org.apache.axiom.om.impl.builder.StAXBuilder; import org.apache.axiom.om.util.StAXUtils; import org.w3c.dom.DOMException; import org.w3c.dom.Document; import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import org.w3c.dom.UserDataHandler; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamWriter; import java.io.OutputStream; import java.io.Writer; import java.util.Hashtable; import java.util.Map; public abstract class NodeImpl implements Node, NodeList, OMNodeEx, Cloneable { /** Holds the user data objects */ private Map userData = new Hashtable(); /** Field builder */ public OMXMLParserWrapper builder; /** Field done */ protected boolean done = false; protected DocumentImpl ownerNode; /** Factory that created this node */ protected OMFactory factory; // data protected short flags; protected final static short OWNED = 0x1 << 1; protected final static short FIRSTCHILD = 0x1 << 2; protected final static short READONLY = 0x1 << 3; protected final static short SPECIFIED = 0x1 << 4; protected final static short NORMALIZED = 0x1 << 5; // // Constructors // protected NodeImpl(DocumentImpl ownerDocument, OMFactory factory) { this(factory); this.ownerNode = ownerDocument; // this.isOwned(true); } protected NodeImpl(OMFactory factory) { this.factory = factory; } public void normalize() { //Parent node should override this } public boolean hasAttributes() { return false; // overridden in ElementImpl } public boolean hasChildNodes() { return false; // Override in ParentNode } public String getLocalName() { return null; // Override in AttrImpl and ElementImpl } public String getNamespaceURI() { return null; // Override in AttrImpl and ElementImpl } public String getNodeValue() throws DOMException { return null; } /* * Overidden in ElementImpl and AttrImpl. */ public String getPrefix() { return null; } public void setNodeValue(String arg0) throws DOMException { // Don't do anything, to be overridden in SOME Child classes } public void setPrefix(String prefix) throws DOMException { throw new DOMException(DOMException.NAMESPACE_ERR, DOMMessageFormatter .formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NAMESPACE_ERR", null)); } /** * Finds the document that this Node belongs to (the document in whose context the Node was * created). The Node may or may not */ public Document getOwnerDocument() { return this.ownerNode; } /** * Returns the collection of attributes associated with this node, or null if none. At this * writing, Element is the only type of node which will ever have attributes. * * @see ElementImpl */ public NamedNodeMap getAttributes() { return null; // overridden in ElementImpl } /** * Gets the first child of this Node, or null if none. *

* By default we do not have any children, ParentNode overrides this. * * @see ParentNode */ public Node getFirstChild() { return null; } /** * Gets the last child of this Node, or null if none. *

* By default we do not have any children, ParentNode overrides this. * * @see ParentNode */ public Node getLastChild() { return null; } /** Returns the next child of this node's parent, or null if none. */ public Node getNextSibling() { return null; // default behavior, overriden in ChildNode } public Node getParentNode() { return null; // overriden by ChildNode // Document, DocumentFragment, and Attribute will never have parents. } /* * Same as getParentNode but returns internal type NodeImpl. */ NodeImpl parentNode() { return null; } /** Returns the previous child of this node's parent, or null if none. */ public Node getPreviousSibling() { return null; // default behavior, overriden in ChildNode } // public Node cloneNode(boolean deep) { // if(this instanceof OMElement) { // return (Node)((OMElement)this).cloneOMElement(); // } else if(this instanceof OMText ){ // return ((TextImpl)this).cloneText(); // } else { // throw new UnsupportedOperationException("Only elements can be cloned // right now"); // } // } // public Node cloneNode(boolean deep) { NodeImpl newnode; try { newnode = (NodeImpl) clone(); } catch (CloneNotSupportedException e) { throw new RuntimeException("**Internal Error**" + e); } newnode.ownerNode = this.ownerNode; newnode.isOwned(false); newnode.isReadonly(false); return newnode; } /* * (non-Javadoc) * * @see org.w3c.dom.Node#getChildNodes() */ public NodeList getChildNodes() { return this; } public boolean isSupported(String feature, String version) { throw new UnsupportedOperationException(); // TODO } /* * (non-Javadoc) * * @see org.w3c.dom.Node#appendChild(org.w3c.dom.Node) */ public Node appendChild(Node newChild) throws DOMException { return insertBefore(newChild, null); } /* * (non-Javadoc) * * @see org.w3c.dom.Node#removeChild(org.w3c.dom.Node) */ public Node removeChild(Node oldChild) throws DOMException { throw new DOMException(DOMException.NOT_FOUND_ERR, DOMMessageFormatter .formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_FOUND_ERR", null)); } /* * (non-Javadoc) * * @see org.w3c.dom.Node#insertBefore(org.w3c.dom.Node, org.w3c.dom.Node) */ public Node insertBefore(Node newChild, Node refChild) throws DOMException { // Overridden in ParentNode throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "HIERARCHY_REQUEST_ERR", null)); } /* * (non-Javadoc) * * @see org.w3c.dom.Node#replaceChild(org.w3c.dom.Node, org.w3c.dom.Node) */ public Node replaceChild(Node newChild, Node oldChild) throws DOMException { throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "HIERARCHY_REQUEST_ERR", null)); } // // NodeList methods // /** * NodeList method: Returns the number of immediate children of this node. *

* By default we do not have any children, ParentNode overrides this. * * @return Returns int. * @see ParentNode */ public int getLength() { return 0; } /** * NodeList method: Returns the Nth immediate child of this node, or null if the index is out of * bounds. *

* By default we do not have any children, ParentNode overrides this. * * @param index * @return Returns org.w3c.dom.Node * @see ParentNode */ public Node item(int index) { return null; } /* * Flags setters and getters */ final boolean isOwned() { return (flags & OWNED) != 0; } final void isOwned(boolean value) { flags = (short) (value ? flags | OWNED : flags & ~OWNED); } final boolean isFirstChild() { return (flags & FIRSTCHILD) != 0; } final void isFirstChild(boolean value) { flags = (short) (value ? flags | FIRSTCHILD : flags & ~FIRSTCHILD); } final boolean isReadonly() { return (flags & READONLY) != 0; } final void isReadonly(boolean value) { flags = (short) (value ? flags | READONLY : flags & ~READONLY); } final boolean isSpecified() { return (flags & SPECIFIED) != 0; } final void isSpecified(boolean value) { flags = (short) (value ? flags | SPECIFIED : flags & ~SPECIFIED); } final boolean isNormalized() { return (flags & NORMALIZED) != 0; } final void isNormalized(boolean value) { // See if flag should propagate to parent. if (!value && isNormalized() && ownerNode != null) { ownerNode.isNormalized(false); } flags = (short) (value ? flags | NORMALIZED : flags & ~NORMALIZED); } // / // /OM Methods // / /* * (non-Javadoc) * * @see org.apache.axis2.om.OMNode#getParent() */ public OMContainer getParent() throws OMException { return null; // overriden by ChildNode // Document, DocumentFragment, and Attribute will never have parents. } /* * (non-Javadoc) * * @see org.apache.axis2.om.OMNode#isComplete() */ public boolean isComplete() { return this.done; } public void setComplete(boolean state) { this.done = state; } /** There no concept of caching in this OM-DOM implementation. */ public void internalSerializeWithCache(XMLStreamWriter writer) throws XMLStreamException { this.internalSerialize(writer); } /* * (non-Javadoc) * * @see org.apache.axis2.om.OMNode#insertSiblingAfter * (org.apache.axis2.om.OMNode) */ public void insertSiblingAfter(OMNode sibling) throws OMException { // Overridden in ChildNode throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "HIERARCHY_REQUEST_ERR", null)); } /* * (non-Javadoc) * * @see org.apache.axis2.om.OMNode#insertSiblingBefore * (org.apache.axis2.om.OMNode) */ public void insertSiblingBefore(OMNode sibling) throws OMException { // Overridden in ChildNode throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "HIERARCHY_REQUEST_ERR", null)); } /** Default behavior returns null, overriden in ChildNode. */ public OMNode getPreviousOMSibling() { return null; } /** Default behavior returns null, overriden in ChildNode. */ public OMNode getNextOMSibling() { return null; } public void setPreviousOMSibling(OMNode previousSibling) { throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "HIERARCHY_REQUEST_ERR", null)); } public void setNextOMSibling(OMNode previousSibling) { throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "HIERARCHY_REQUEST_ERR", null)); } /** Builds next element. */ public void build() { while (!done) this.builder.next(); } /** * Parses this node and builds the object structure in memory. AXIOM supports two levels of * deffered building. First is deffered building of AXIOM using StAX. Second level is the deffered * building of attachments. AXIOM reads in the attachements from the stream only when user asks by * calling getDataHandler(). build() method builds the OM without the attachments. buildAll() * builds the OM together with attachement data. This becomes handy when user wants to free the * input stream. */ public void buildWithAttachments() { if (!this.done) { this.build(); } } public void close(boolean build) { if (build) { this.build(); } this.done = true; // If this is a StAXBuilder, close it. if (builder instanceof StAXBuilder && !((StAXBuilder) builder).isClosed()) { ((StAXBuilder) builder).releaseParserOnClose(true); ((StAXBuilder) builder).close(); } } /** * Sets the owner document. * * @param document */ protected void setOwnerDocument(DocumentImpl document) { this.ownerNode = document; this.isOwned(true); } public void serialize(XMLStreamWriter xmlWriter) throws XMLStreamException { MTOMXMLStreamWriter writer = xmlWriter instanceof MTOMXMLStreamWriter ? (MTOMXMLStreamWriter) xmlWriter : new MTOMXMLStreamWriter(xmlWriter); internalSerialize(writer); writer.flush(); } public void serializeAndConsume(XMLStreamWriter xmlWriter) throws XMLStreamException { MTOMXMLStreamWriter writer = xmlWriter instanceof MTOMXMLStreamWriter ? (MTOMXMLStreamWriter) xmlWriter : new MTOMXMLStreamWriter(xmlWriter); internalSerializeAndConsume(writer); writer.flush(); } public OMNode detach() { throw new OMException( "Elements that doesn't have a parent can not be detached"); } /* * DOM-Level 3 methods */ public String getBaseURI() { // TODO TODO throw new UnsupportedOperationException("TODO"); } public short compareDocumentPosition(Node other) throws DOMException { // This is not yet implemented. In the meantime, we throw a DOMException // and not an UnsupportedOperationException, since this works better with // some other libraries (such as Saxon 8.9). throw new DOMException(DOMException.NOT_SUPPORTED_ERR, DOMMessageFormatter .formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null)); } public String getTextContent() throws DOMException { return getNodeValue(); // overriden in some subclasses } // internal method taking a StringBuffer in parameter void getTextContent(StringBuffer buf) throws DOMException { String content = getNodeValue(); if (content != null) { buf.append(content); } } public void setTextContent(String textContent) throws DOMException { setNodeValue(textContent); // overriden in some subclasses } public boolean isSameNode(Node node) { // TODO : check if (this == node) { return true; } else { return false; } } public String lookupPrefix(String arg0) { // TODO TODO throw new UnsupportedOperationException("TODO"); } public boolean isDefaultNamespace(String arg0) { // TODO TODO throw new UnsupportedOperationException("TODO"); } public String lookupNamespaceURI(String arg0) { // TODO TODO throw new UnsupportedOperationException("TODO"); } /** * Tests whether two nodes are equal.
This method tests for equality of nodes, not sameness * (i.e., whether the two nodes are references to the same object) which can be tested with * Node.isSameNode(). All nodes that are the same will also be equal, though the * reverse may not be true.
Two nodes are equal if and only if the following conditions are * satisfied:

  • The two nodes are of the same type.
  • The following string * attributes are equal: nodeName, localName, * namespaceURI, prefix, nodeValue . This is: they are * both null, or they have the same length and are character for character * identical.
  • The attributes NamedNodeMaps are equal. This * is: they are both null, or they have the same length and for each node that * exists in one map there is a node that exists in the other map and is equal, although not * necessarily at the same index.
  • The childNodes NodeLists * are equal. This is: they are both null, or they have the same length and contain * equal nodes at the same index. Note that normalization can affect equality; to avoid this, * nodes should be normalized before being compared.

For two * DocumentType nodes to be equal, the following conditions must also be satisfied: *
  • The following string attributes are equal: publicId, * systemId, internalSubset.
  • The entities * NamedNodeMaps are equal.
  • The notations * NamedNodeMaps are equal.

On the other hand, the following do not * affect equality: the ownerDocument, baseURI, and * parentNode attributes, the specified attribute for * Attr nodes, the schemaTypeInfo attribute for Attr and * Element nodes, the Text.isElementContentWhitespace attribute for * Text nodes, as well as any user data or event listeners registered on the nodes. *

Note: As a general rule, anything not mentioned in the description above is not * significant in consideration of equality checking. Note that future versions of this * specification may take into account more attributes and implementations conform to this * specification are expected to be updated accordingly. * * @param arg The node to compare equality with. * @return Returns true if the nodes are equal, false otherwise. * @since DOM Level 3 */ //TODO : sumedha, complete public boolean isEqualNode(Node node) { final boolean equal = true; final boolean notEqual = false; if (this.getNodeType() != node.getNodeType()) { return notEqual; } if (checkStringAttributeEquality(node)) { if (checkNamedNodeMapEquality(node)) { } else { return notEqual; } } else { return notEqual; } return equal; } private boolean checkStringAttributeEquality(Node node) { final boolean equal = true; final boolean notEqual = false; // null not-null -> true // not-null null -> true // null null -> false // not-null not-null -> false //NodeName if (node.getNodeName() == null ^ this.getNodeName() == null) { return notEqual; } else { if (node.getNodeName() == null) { //This means both are null.do nothing } else { if (!(node.getNodeName().equals(this.getNodeName()))) { return notEqual; } } } //localName if (node.getLocalName() == null ^ this.getLocalName() == null) { return notEqual; } else { if (node.getLocalName() == null) { //This means both are null.do nothing } else { if (!(node.getLocalName().equals(this.getLocalName()))) { return notEqual; } } } //namespaceURI if (node.getNamespaceURI() == null ^ this.getNamespaceURI() == null) { return notEqual; } else { if (node.getNamespaceURI() == null) { //This means both are null.do nothing } else { if (!(node.getNamespaceURI().equals(this.getNamespaceURI()))) { return notEqual; } } } //prefix if (node.getPrefix() == null ^ this.getPrefix() == null) { return notEqual; } else { if (node.getPrefix() == null) { //This means both are null.do nothing } else { if (!(node.getPrefix().equals(this.getPrefix()))) { return notEqual; } } } //nodeValue if (node.getNodeValue() == null ^ this.getNodeValue() == null) { return notEqual; } else { if (node.getNodeValue() == null) { //This means both are null.do nothing } else { if (!(node.getNodeValue().equals(this.getNodeValue()))) { return notEqual; } } } return equal; } private boolean checkNamedNodeMapEquality(Node node) { final boolean equal = true; final boolean notEqual = false; if (node.getAttributes() == null ^ this.getAttributes() == null) { return notEqual; } NamedNodeMap thisNamedNodeMap = this.getAttributes(); NamedNodeMap nodeNamedNodeMap = node.getAttributes(); // null not-null -> true // not-null null -> true // null null -> false // not-null not-null -> false if (thisNamedNodeMap == null ^ nodeNamedNodeMap == null) { return notEqual; } else { if (thisNamedNodeMap == null) { //This means both are null.do nothing } else { if (thisNamedNodeMap.getLength() != nodeNamedNodeMap.getLength()) { return notEqual; } else { //they have the same length and for each node that exists in one map //there is a node that exists in the other map and is equal, although //not necessarily at the same index. int itemCount = thisNamedNodeMap.getLength(); for (int a = 0; a < itemCount; a++) { NodeImpl thisNode = (NodeImpl) thisNamedNodeMap.item(a); NodeImpl tmpNode = (NodeImpl) nodeNamedNodeMap.getNamedItem(thisNode.getNodeName()); if (tmpNode == null) { //i.e. no corresponding node return notEqual; } else { NodeImpl node1 = thisNode; if (!(node1.isEqualNode(tmpNode))) { return notEqual; } } } } } } return equal; } public Object getFeature(String arg0, String arg1) { // TODO TODO throw new UnsupportedOperationException("TODO"); } public Object setUserData(String key, Object value, UserDataHandler userDataHandler) { return userData.put(key, value); } public Object getUserData(String key) { return userData.get(key); } public void serialize(OutputStream output) throws XMLStreamException { XMLStreamWriter xmlStreamWriter = StAXUtils.createXMLStreamWriter(output); try { serialize(xmlStreamWriter); } finally { xmlStreamWriter.close(); } } public void serialize(Writer writer) throws XMLStreamException { XMLStreamWriter xmlStreamWriter = StAXUtils.createXMLStreamWriter(writer); try { serialize(xmlStreamWriter); } finally { xmlStreamWriter.close(); } } public void serializeAndConsume(OutputStream output) throws XMLStreamException { XMLStreamWriter xmlStreamWriter = StAXUtils.createXMLStreamWriter(output); try { serializeAndConsume(xmlStreamWriter); } finally { xmlStreamWriter.close(); } } public void serializeAndConsume(Writer writer) throws XMLStreamException { XMLStreamWriter xmlStreamWriter = StAXUtils.createXMLStreamWriter(writer); try { serializeAndConsume(xmlStreamWriter); } finally { xmlStreamWriter.close(); } } public void serialize(OutputStream output, OMOutputFormat format) throws XMLStreamException { MTOMXMLStreamWriter writer = new MTOMXMLStreamWriter(output, format); try { internalSerialize(writer); writer.flush(); } finally { if (format.isAutoCloseWriter()) { writer.close(); } } } public void serialize(Writer writer2, OMOutputFormat format) throws XMLStreamException { MTOMXMLStreamWriter writer = new MTOMXMLStreamWriter(StAXUtils .createXMLStreamWriter(writer2)); writer.setOutputFormat(format); try { internalSerialize(writer); writer.flush(); } finally { if (format.isAutoCloseWriter()) { writer.close(); } } } public void serializeAndConsume(OutputStream output, OMOutputFormat format) throws XMLStreamException { MTOMXMLStreamWriter writer = new MTOMXMLStreamWriter(output, format); try { internalSerializeAndConsume(writer); writer.flush(); } finally { if (format.isAutoCloseWriter()) { writer.close(); } } } public void serializeAndConsume(Writer writer2, OMOutputFormat format) throws XMLStreamException { MTOMXMLStreamWriter writer = new MTOMXMLStreamWriter(StAXUtils .createXMLStreamWriter(writer2)); try { writer.setOutputFormat(format); internalSerializeAndConsume(writer); writer.flush(); } finally { if (format.isAutoCloseWriter()) { writer.close(); } } } /** Returns the OMFactory that created this node */ public OMFactory getOMFactory() { return this.factory; } } axiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/XMLChar.java0000644000000000000000000005472611131637472026737 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.dom; /** * This class defines the basic XML character properties. The data in this class can be used to * verify that a character is a valid XML character or if the character is a space, name start, or * name character. *

* A series of convenience methods are supplied to ease the burden of the developer. Because * inlining the checks can improve per character performance, the tables of character properties are * public. Using the character as an index into the CHARS array and applying the * appropriate mask flag (e.g. MASK_VALID), yields the same results as calling the * convenience methods. There is one exception: check the comments for the isValid * method for details. */ public class XMLChar { // // Constants // /** Character flags. */ private static final byte[] CHARS = new byte[1 << 16]; /** Valid character mask. */ public static final int MASK_VALID = 0x01; /** Space character mask. */ public static final int MASK_SPACE = 0x02; /** Name start character mask. */ public static final int MASK_NAME_START = 0x04; /** Name character mask. */ public static final int MASK_NAME = 0x08; /** Pubid character mask. */ public static final int MASK_PUBID = 0x10; /** * Content character mask. Special characters are those that can be considered the start of * markup, such as '<' and '&'. The various newline characters are considered special as * well. All other valid XML characters can be considered content. *

* This is an optimization for the inner loop of character scanning. */ public static final int MASK_CONTENT = 0x20; /** NCName start character mask. */ public static final int MASK_NCNAME_START = 0x40; /** NCName character mask. */ public static final int MASK_NCNAME = 0x80; // // Static initialization // static { // // [2] Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | // [#xE000-#xFFFD] | [#x10000-#x10FFFF] // int charRange[] = { 0x0009, 0x000A, 0x000D, 0x000D, 0x0020, 0xD7FF, 0xE000, 0xFFFD, }; // // [3] S ::= (#x20 | #x9 | #xD | #xA)+ // int spaceChar[] = { 0x0020, 0x0009, 0x000D, 0x000A, }; // // [4] NameChar ::= Letter | Digit | '.' | '-' | '_' | ':' | // CombiningChar | Extender // int nameChar[] = { 0x002D, 0x002E, // '-' and '.' }; // // [5] Name ::= (Letter | '_' | ':') (NameChar)* // int nameStartChar[] = { 0x003A, 0x005F, // ':' and '_' }; // // [13] PubidChar ::= #x20 | 0xD | 0xA | [a-zA-Z0-9] | [-'()+,./:=?;!*#@$_%] // int pubidChar[] = { 0x000A, 0x000D, 0x0020, 0x0021, 0x0023, 0x0024, 0x0025, 0x003D, 0x005F }; int pubidRange[] = { 0x0027, 0x003B, 0x003F, 0x005A, 0x0061, 0x007A }; // // [84] Letter ::= BaseChar | Ideographic // int letterRange[] = { // BaseChar 0x0041, 0x005A, 0x0061, 0x007A, 0x00C0, 0x00D6, 0x00D8, 0x00F6, 0x00F8, 0x0131, 0x0134, 0x013E, 0x0141, 0x0148, 0x014A, 0x017E, 0x0180, 0x01C3, 0x01CD, 0x01F0, 0x01F4, 0x01F5, 0x01FA, 0x0217, 0x0250, 0x02A8, 0x02BB, 0x02C1, 0x0388, 0x038A, 0x038E, 0x03A1, 0x03A3, 0x03CE, 0x03D0, 0x03D6, 0x03E2, 0x03F3, 0x0401, 0x040C, 0x040E, 0x044F, 0x0451, 0x045C, 0x045E, 0x0481, 0x0490, 0x04C4, 0x04C7, 0x04C8, 0x04CB, 0x04CC, 0x04D0, 0x04EB, 0x04EE, 0x04F5, 0x04F8, 0x04F9, 0x0531, 0x0556, 0x0561, 0x0586, 0x05D0, 0x05EA, 0x05F0, 0x05F2, 0x0621, 0x063A, 0x0641, 0x064A, 0x0671, 0x06B7, 0x06BA, 0x06BE, 0x06C0, 0x06CE, 0x06D0, 0x06D3, 0x06E5, 0x06E6, 0x0905, 0x0939, 0x0958, 0x0961, 0x0985, 0x098C, 0x098F, 0x0990, 0x0993, 0x09A8, 0x09AA, 0x09B0, 0x09B6, 0x09B9, 0x09DC, 0x09DD, 0x09DF, 0x09E1, 0x09F0, 0x09F1, 0x0A05, 0x0A0A, 0x0A0F, 0x0A10, 0x0A13, 0x0A28, 0x0A2A, 0x0A30, 0x0A32, 0x0A33, 0x0A35, 0x0A36, 0x0A38, 0x0A39, 0x0A59, 0x0A5C, 0x0A72, 0x0A74, 0x0A85, 0x0A8B, 0x0A8F, 0x0A91, 0x0A93, 0x0AA8, 0x0AAA, 0x0AB0, 0x0AB2, 0x0AB3, 0x0AB5, 0x0AB9, 0x0B05, 0x0B0C, 0x0B0F, 0x0B10, 0x0B13, 0x0B28, 0x0B2A, 0x0B30, 0x0B32, 0x0B33, 0x0B36, 0x0B39, 0x0B5C, 0x0B5D, 0x0B5F, 0x0B61, 0x0B85, 0x0B8A, 0x0B8E, 0x0B90, 0x0B92, 0x0B95, 0x0B99, 0x0B9A, 0x0B9E, 0x0B9F, 0x0BA3, 0x0BA4, 0x0BA8, 0x0BAA, 0x0BAE, 0x0BB5, 0x0BB7, 0x0BB9, 0x0C05, 0x0C0C, 0x0C0E, 0x0C10, 0x0C12, 0x0C28, 0x0C2A, 0x0C33, 0x0C35, 0x0C39, 0x0C60, 0x0C61, 0x0C85, 0x0C8C, 0x0C8E, 0x0C90, 0x0C92, 0x0CA8, 0x0CAA, 0x0CB3, 0x0CB5, 0x0CB9, 0x0CE0, 0x0CE1, 0x0D05, 0x0D0C, 0x0D0E, 0x0D10, 0x0D12, 0x0D28, 0x0D2A, 0x0D39, 0x0D60, 0x0D61, 0x0E01, 0x0E2E, 0x0E32, 0x0E33, 0x0E40, 0x0E45, 0x0E81, 0x0E82, 0x0E87, 0x0E88, 0x0E94, 0x0E97, 0x0E99, 0x0E9F, 0x0EA1, 0x0EA3, 0x0EAA, 0x0EAB, 0x0EAD, 0x0EAE, 0x0EB2, 0x0EB3, 0x0EC0, 0x0EC4, 0x0F40, 0x0F47, 0x0F49, 0x0F69, 0x10A0, 0x10C5, 0x10D0, 0x10F6, 0x1102, 0x1103, 0x1105, 0x1107, 0x110B, 0x110C, 0x110E, 0x1112, 0x1154, 0x1155, 0x115F, 0x1161, 0x116D, 0x116E, 0x1172, 0x1173, 0x11AE, 0x11AF, 0x11B7, 0x11B8, 0x11BC, 0x11C2, 0x1E00, 0x1E9B, 0x1EA0, 0x1EF9, 0x1F00, 0x1F15, 0x1F18, 0x1F1D, 0x1F20, 0x1F45, 0x1F48, 0x1F4D, 0x1F50, 0x1F57, 0x1F5F, 0x1F7D, 0x1F80, 0x1FB4, 0x1FB6, 0x1FBC, 0x1FC2, 0x1FC4, 0x1FC6, 0x1FCC, 0x1FD0, 0x1FD3, 0x1FD6, 0x1FDB, 0x1FE0, 0x1FEC, 0x1FF2, 0x1FF4, 0x1FF6, 0x1FFC, 0x212A, 0x212B, 0x2180, 0x2182, 0x3041, 0x3094, 0x30A1, 0x30FA, 0x3105, 0x312C, 0xAC00, 0xD7A3, // Ideographic 0x3021, 0x3029, 0x4E00, 0x9FA5, }; int letterChar[] = { // BaseChar 0x0386, 0x038C, 0x03DA, 0x03DC, 0x03DE, 0x03E0, 0x0559, 0x06D5, 0x093D, 0x09B2, 0x0A5E, 0x0A8D, 0x0ABD, 0x0AE0, 0x0B3D, 0x0B9C, 0x0CDE, 0x0E30, 0x0E84, 0x0E8A, 0x0E8D, 0x0EA5, 0x0EA7, 0x0EB0, 0x0EBD, 0x1100, 0x1109, 0x113C, 0x113E, 0x1140, 0x114C, 0x114E, 0x1150, 0x1159, 0x1163, 0x1165, 0x1167, 0x1169, 0x1175, 0x119E, 0x11A8, 0x11AB, 0x11BA, 0x11EB, 0x11F0, 0x11F9, 0x1F59, 0x1F5B, 0x1F5D, 0x1FBE, 0x2126, 0x212E, // Ideographic 0x3007, }; // // [87] CombiningChar ::= ... // int combiningCharRange[] = { 0x0300, 0x0345, 0x0360, 0x0361, 0x0483, 0x0486, 0x0591, 0x05A1, 0x05A3, 0x05B9, 0x05BB, 0x05BD, 0x05C1, 0x05C2, 0x064B, 0x0652, 0x06D6, 0x06DC, 0x06DD, 0x06DF, 0x06E0, 0x06E4, 0x06E7, 0x06E8, 0x06EA, 0x06ED, 0x0901, 0x0903, 0x093E, 0x094C, 0x0951, 0x0954, 0x0962, 0x0963, 0x0981, 0x0983, 0x09C0, 0x09C4, 0x09C7, 0x09C8, 0x09CB, 0x09CD, 0x09E2, 0x09E3, 0x0A40, 0x0A42, 0x0A47, 0x0A48, 0x0A4B, 0x0A4D, 0x0A70, 0x0A71, 0x0A81, 0x0A83, 0x0ABE, 0x0AC5, 0x0AC7, 0x0AC9, 0x0ACB, 0x0ACD, 0x0B01, 0x0B03, 0x0B3E, 0x0B43, 0x0B47, 0x0B48, 0x0B4B, 0x0B4D, 0x0B56, 0x0B57, 0x0B82, 0x0B83, 0x0BBE, 0x0BC2, 0x0BC6, 0x0BC8, 0x0BCA, 0x0BCD, 0x0C01, 0x0C03, 0x0C3E, 0x0C44, 0x0C46, 0x0C48, 0x0C4A, 0x0C4D, 0x0C55, 0x0C56, 0x0C82, 0x0C83, 0x0CBE, 0x0CC4, 0x0CC6, 0x0CC8, 0x0CCA, 0x0CCD, 0x0CD5, 0x0CD6, 0x0D02, 0x0D03, 0x0D3E, 0x0D43, 0x0D46, 0x0D48, 0x0D4A, 0x0D4D, 0x0E34, 0x0E3A, 0x0E47, 0x0E4E, 0x0EB4, 0x0EB9, 0x0EBB, 0x0EBC, 0x0EC8, 0x0ECD, 0x0F18, 0x0F19, 0x0F71, 0x0F84, 0x0F86, 0x0F8B, 0x0F90, 0x0F95, 0x0F99, 0x0FAD, 0x0FB1, 0x0FB7, 0x20D0, 0x20DC, 0x302A, 0x302F, }; int combiningCharChar[] = { 0x05BF, 0x05C4, 0x0670, 0x093C, 0x094D, 0x09BC, 0x09BE, 0x09BF, 0x09D7, 0x0A02, 0x0A3C, 0x0A3E, 0x0A3F, 0x0ABC, 0x0B3C, 0x0BD7, 0x0D57, 0x0E31, 0x0EB1, 0x0F35, 0x0F37, 0x0F39, 0x0F3E, 0x0F3F, 0x0F97, 0x0FB9, 0x20E1, 0x3099, 0x309A, }; // // [88] Digit ::= ... // int digitRange[] = { 0x0030, 0x0039, 0x0660, 0x0669, 0x06F0, 0x06F9, 0x0966, 0x096F, 0x09E6, 0x09EF, 0x0A66, 0x0A6F, 0x0AE6, 0x0AEF, 0x0B66, 0x0B6F, 0x0BE7, 0x0BEF, 0x0C66, 0x0C6F, 0x0CE6, 0x0CEF, 0x0D66, 0x0D6F, 0x0E50, 0x0E59, 0x0ED0, 0x0ED9, 0x0F20, 0x0F29, }; // // [89] Extender ::= ... // int extenderRange[] = { 0x3031, 0x3035, 0x309D, 0x309E, 0x30FC, 0x30FE, }; int extenderChar[] = { 0x00B7, 0x02D0, 0x02D1, 0x0387, 0x0640, 0x0E46, 0x0EC6, 0x3005, }; // // SpecialChar ::= '<', '&', '\n', '\r', ']' // int specialChar[] = { '<', '&', '\n', '\r', ']', }; // // Initialize // // set valid characters for (int i = 0; i < charRange.length; i += 2) { for (int j = charRange[i]; j <= charRange[i + 1]; j++) { CHARS[j] |= MASK_VALID | MASK_CONTENT; } } // remove special characters for (int i = 0; i < specialChar.length; i++) { CHARS[specialChar[i]] = (byte) (CHARS[specialChar[i]] & ~MASK_CONTENT); } // set space characters for (int i = 0; i < spaceChar.length; i++) { CHARS[spaceChar[i]] |= MASK_SPACE; } // set name start characters for (int i = 0; i < nameStartChar.length; i++) { CHARS[nameStartChar[i]] |= MASK_NAME_START | MASK_NAME | MASK_NCNAME_START | MASK_NCNAME; } for (int i = 0; i < letterRange.length; i += 2) { for (int j = letterRange[i]; j <= letterRange[i + 1]; j++) { CHARS[j] |= MASK_NAME_START | MASK_NAME | MASK_NCNAME_START | MASK_NCNAME; } } for (int i = 0; i < letterChar.length; i++) { CHARS[letterChar[i]] |= MASK_NAME_START | MASK_NAME | MASK_NCNAME_START | MASK_NCNAME; } // set name characters for (int i = 0; i < nameChar.length; i++) { CHARS[nameChar[i]] |= MASK_NAME | MASK_NCNAME; } for (int i = 0; i < digitRange.length; i += 2) { for (int j = digitRange[i]; j <= digitRange[i + 1]; j++) { CHARS[j] |= MASK_NAME | MASK_NCNAME; } } for (int i = 0; i < combiningCharRange.length; i += 2) { for (int j = combiningCharRange[i]; j <= combiningCharRange[i + 1]; j++) { CHARS[j] |= MASK_NAME | MASK_NCNAME; } } for (int i = 0; i < combiningCharChar.length; i++) { CHARS[combiningCharChar[i]] |= MASK_NAME | MASK_NCNAME; } for (int i = 0; i < extenderRange.length; i += 2) { for (int j = extenderRange[i]; j <= extenderRange[i + 1]; j++) { CHARS[j] |= MASK_NAME | MASK_NCNAME; } } for (int i = 0; i < extenderChar.length; i++) { CHARS[extenderChar[i]] |= MASK_NAME | MASK_NCNAME; } // remove ':' from allowable MASK_NCNAME_START and MASK_NCNAME chars CHARS[':'] &= ~(MASK_NCNAME_START | MASK_NCNAME); // set Pubid characters for (int i = 0; i < pubidChar.length; i++) { CHARS[pubidChar[i]] |= MASK_PUBID; } for (int i = 0; i < pubidRange.length; i += 2) { for (int j = pubidRange[i]; j <= pubidRange[i + 1]; j++) { CHARS[j] |= MASK_PUBID; } } } // () // // Public static methods // /** * Returns true if the specified character is a supplemental character. * * @param c The character to check. */ public static boolean isSupplemental(int c) { return (c >= 0x10000 && c <= 0x10FFFF); } /** * Returns true the supplemental character corresponding to the given surrogates. * * @param h The high surrogate. * @param l The low surrogate. */ public static int supplemental(char h, char l) { return (h - 0xD800) * 0x400 + (l - 0xDC00) + 0x10000; } /** * Returns the high surrogate of a supplemental character * * @param c The supplemental character to "split". */ public static char highSurrogate(int c) { return (char) (((c - 0x00010000) >> 10) + 0xD800); } /** * Returns the low surrogate of a supplemental character * * @param c The supplemental character to "split". */ public static char lowSurrogate(int c) { return (char) (((c - 0x00010000) & 0x3FF) + 0xDC00); } /** * Returns whether the given character is a high surrogate * * @param c The character to check. */ public static boolean isHighSurrogate(int c) { return (0xD800 <= c && c <= 0xDBFF); } /** * Returns whether the given character is a low surrogate * * @param c The character to check. */ public static boolean isLowSurrogate(int c) { return (0xDC00 <= c && c <= 0xDFFF); } /** * Returns true if the specified character is valid. This method also checks the surrogate * character range from 0x10000 to 0x10FFFF. *

* If the program chooses to apply the mask directly to the CHARS array, then they * are responsible for checking the surrogate character range. * * @param c The character to check. */ public static boolean isValid(int c) { return (c < 0x10000 && (CHARS[c] & MASK_VALID) != 0) || (0x10000 <= c && c <= 0x10FFFF); } // isValid(int):boolean /** * Returns true if the specified character is invalid. * * @param c The character to check. */ public static boolean isInvalid(int c) { return !isValid(c); } // isInvalid(int):boolean /** * Returns true if the specified character can be considered content. * * @param c The character to check. */ public static boolean isContent(int c) { return (c < 0x10000 && (CHARS[c] & MASK_CONTENT) != 0) || (0x10000 <= c && c <= 0x10FFFF); } // isContent(int):boolean /** * Returns true if the specified character can be considered markup. Markup characters include * '<', '&', and '%'. * * @param c The character to check. */ public static boolean isMarkup(int c) { return c == '<' || c == '&' || c == '%'; } // isMarkup(int):boolean /** * Returns true if the specified character is a space character as defined by production [3] in * the XML 1.0 specification. * * @param c The character to check. */ public static boolean isSpace(int c) { return c < 0x10000 && (CHARS[c] & MASK_SPACE) != 0; } // isSpace(int):boolean /** * Returns true if the specified character is a space character as amdended in the XML 1.1 * specification. * * @param c The character to check. */ public static boolean isXML11Space(int c) { return (c < 0x10000 && (CHARS[c] & MASK_SPACE) != 0) || c == 0x85 || c == 0x2028; } // isXML11Space(int):boolean /** * Returns true if the specified character is a valid name start character as defined by * production [5] in the XML 1.0 specification. * * @param c The character to check. */ public static boolean isNameStart(int c) { return c < 0x10000 && (CHARS[c] & MASK_NAME_START) != 0; } // isNameStart(int):boolean /** * Returns true if the specified character is a valid name character as defined by production * [4] in the XML 1.0 specification. * * @param c The character to check. */ public static boolean isName(int c) { return c < 0x10000 && (CHARS[c] & MASK_NAME) != 0; } // isName(int):boolean /** * Returns true if the specified character is a valid NCName start character as defined by * production [4] in Namespaces in XML recommendation. * * @param c The character to check. */ public static boolean isNCNameStart(int c) { return c < 0x10000 && (CHARS[c] & MASK_NCNAME_START) != 0; } // isNCNameStart(int):boolean /** * Returns true if the specified character is a valid NCName character as defined by production * [5] in Namespaces in XML recommendation. * * @param c The character to check. */ public static boolean isNCName(int c) { return c < 0x10000 && (CHARS[c] & MASK_NCNAME) != 0; } // isNCName(int):boolean /** * Returns true if the specified character is a valid Pubid character as defined by production * [13] in the XML 1.0 specification. * * @param c The character to check. */ public static boolean isPubid(int c) { return c < 0x10000 && (CHARS[c] & MASK_PUBID) != 0; } // isPubid(int):boolean /* * [5] Name ::= (Letter | '_' | ':') (NameChar)* */ /** * Check to see if a string is a valid Name according to [5] * in the XML 1.0 Recommendation * * @param name string to check * @return true if name is a valid Name */ public static boolean isValidName(String name) { if (name.length() == 0) return false; char ch = name.charAt(0); if (!isNameStart(ch)) return false; for (int i = 1; i < name.length(); i++) { ch = name.charAt(i); if (!isName(ch)) { return false; } } return true; } // isValidName(String):boolean /* * from the namespace rec * [4] NCName ::= (Letter | '_') (NCNameChar)* */ /** * Check to see if a string is a valid NCName according to [4] * from the XML Namespaces 1.0 Recommendation * * @param ncName string to check * @return true if name is a valid NCName */ public static boolean isValidNCName(String ncName) { if (ncName.length() == 0) return false; char ch = ncName.charAt(0); if (!isNCNameStart(ch)) return false; for (int i = 1; i < ncName.length(); i++) { ch = ncName.charAt(i); if (!isNCName(ch)) { return false; } } return true; } // isValidNCName(String):boolean /* * [7] Nmtoken ::= (NameChar)+ */ /** * Check to see if a string is a valid Nmtoken according to [7] * in the XML 1.0 Recommendation * * @param nmtoken string to check * @return true if nmtoken is a valid Nmtoken */ public static boolean isValidNmtoken(String nmtoken) { if (nmtoken.length() == 0) return false; for (int i = 0; i < nmtoken.length(); i++) { char ch = nmtoken.charAt(i); if (! isName(ch)) { return false; } } return true; } // isValidName(String):boolean // encodings /** * Returns true if the encoding name is a valid IANA encoding. This method does not verify that * there is a decoder available for this encoding, only that the characters are valid for an * IANA encoding name. * * @param ianaEncoding The IANA encoding name. */ public static boolean isValidIANAEncoding(String ianaEncoding) { if (ianaEncoding != null) { int length = ianaEncoding.length(); if (length > 0) { char c = ianaEncoding.charAt(0); if ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z')) { for (int i = 1; i < length; i++) { c = ianaEncoding.charAt(i); if ((c < 'A' || c > 'Z') && (c < 'a' || c > 'z') && (c < '0' || c > '9') && c != '.' && c != '_' && c != '-') { return false; } } return true; } } } return false; } // isValidIANAEncoding(String):boolean /** * Returns true if the encoding name is a valid Java encoding. This method does not verify that * there is a decoder available for this encoding, only that the characters are valid for an * Java encoding name. * * @param javaEncoding The Java encoding name. */ public static boolean isValidJavaEncoding(String javaEncoding) { if (javaEncoding != null) { int length = javaEncoding.length(); if (length > 0) { for (int i = 1; i < length; i++) { char c = javaEncoding.charAt(i); if ((c < 'A' || c > 'Z') && (c < 'a' || c > 'z') && (c < '0' || c > '9') && c != '.' && c != '_' && c != '-') { return false; } } return true; } } return false; } // isValidIANAEncoding(String):boolean } // class XMLChar axiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/AttrImpl.java0000644000000000000000000004115511131637472027225 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.dom; import org.apache.axiom.om.*; import org.apache.axiom.om.xpath.DocumentNavigator; import org.w3c.dom.Attr; import org.w3c.dom.DOMException; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.TypeInfo; import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamWriter; /** Implementation of org.w3c.dom.Attr and org.apache.axiom.om.OMAttribute */ public class AttrImpl extends NodeImpl implements OMAttribute, Attr { /** Name of the attribute */ private String attrName; /** Attribute value */ private TextImpl attrValue; /** Attribute type */ private String attrType; /** Attribute namespace */ private NamespaceImpl namespace; /** Flag to indicate whether this attr is used or not */ private boolean used; /** Owner of this attribute */ protected ParentNode parent; /** Flag used to mark an attribute as per the DOM Level 3 specification */ protected boolean isId; protected AttrImpl(DocumentImpl ownerDocument, OMFactory factory) { super(ownerDocument, factory); } public AttrImpl(DocumentImpl ownerDocument, String localName, OMNamespace ns, String value, OMFactory factory) { super(ownerDocument, factory); this.attrName = localName; this.attrValue = new TextImpl(ownerDocument, value, factory); this.attrType = OMConstants.XMLATTRTYPE_CDATA; this.namespace = (NamespaceImpl) ns; } public AttrImpl(DocumentImpl ownerDocument, String name, String value, OMFactory factory) { super(ownerDocument, factory); this.attrName = name; this.attrValue = new TextImpl(ownerDocument, value, factory); this.attrType = OMConstants.XMLATTRTYPE_CDATA; } public AttrImpl(DocumentImpl ownerDocument, String name, OMFactory factory) { super(ownerDocument, factory); this.attrName = name; //If this is a default namespace attr if (OMConstants.XMLNS_NS_PREFIX.equals(name)) { this.namespace = new NamespaceImpl( OMConstants.XMLNS_NS_URI, OMConstants.XMLNS_NS_PREFIX); } this.attrType = OMConstants.XMLATTRTYPE_CDATA; } public AttrImpl(DocumentImpl ownerDocument, String localName, OMNamespace namespace, OMFactory factory) { super(ownerDocument, factory); this.attrName = localName; this.namespace = (NamespaceImpl) namespace; this.attrType = OMConstants.XMLATTRTYPE_CDATA; } // / // /org.w3c.dom.Node methods // / /** Returns the name of this attribute. */ public String getNodeName() { return (this.namespace != null && !"".equals(this.namespace.getPrefix()) && !(OMConstants.XMLNS_NS_PREFIX.equals(this.attrName))) ? this.namespace.getPrefix() + ":" + this.attrName : this.attrName; } /** * Returns the node type. * * @see org.w3c.dom.Node#getNodeType() */ public short getNodeType() { return Node.ATTRIBUTE_NODE; } /** * Returns the value of this attribute. * * @see org.w3c.dom.Node#getNodeValue() */ public String getNodeValue() throws DOMException { return (this.attrValue == null) ? "" : this.attrValue.getData(); } /** * Returns the value of this attribute. * * @see org.w3c.dom.Attr#getValue() */ public String getValue() { return (this.attrValue == null) ? null : this.attrValue.getText(); } // / // /org.w3c.dom.Attr methods // / public String getName() { if (this.namespace != null) { if ((OMConstants.XMLNS_NS_PREFIX.equals(this.attrName))) { return this.attrName; } else if (OMConstants.XMLNS_NS_URI.equals(this.namespace.getNamespaceURI())) { return OMConstants.XMLNS_NS_PREFIX + ":" + this.attrName; } else if (this.namespace.getPrefix().equals("")) { return this.attrName; } else { return this.namespace.getPrefix() + ":" + this.attrName; } } else { return this.attrName; } } /** * Returns the owner element. * * @see org.w3c.dom.Attr#getOwnerElement() */ public Element getOwnerElement() { // Owned is set to an element instance when the attribute is added to an // element return (Element) (isOwned() ? parent : null); } public boolean getSpecified() { // Since we don't support DTD or schema, we always return true return true; } /** * Not supported: Cannot detach attributes. Use the operations available in the owner node. * * @see org.apache.axiom.om.OMNode#detach() */ public OMNode detach() throws OMException { throw new UnsupportedOperationException("Not supported"); } /** * Not supported: Cannot discard attributes. Use the operations available in the owner node. * * @see org.apache.axiom.om.OMNode#discard() */ public void discard() throws OMException { throw new UnsupportedOperationException("Not supported"); } /** * Returns the type of this attribute node. * * @see org.apache.axiom.om.OMNode#getType() */ public int getType() { return -1; } /** * This is not supported since attributes serialization is handled by the serialization of the * owner nodes. */ public void internalSerialize(XMLStreamWriter writer) throws XMLStreamException { throw new UnsupportedOperationException("Not supported"); } /** * This is not supported since attributes serialization is handled by the serialization of the * owner nodes. * * @see org.apache.axiom.om.impl.OMNodeEx#internalSerializeAndConsume * (org.apache.axiom.om.impl.MTOMXMLStreamWriter) */ public void internalSerializeAndConsume(XMLStreamWriter writer) throws XMLStreamException { throw new UnsupportedOperationException("Not supported"); } /** * Returns the namespace of the attribute as an OMNamespace. * * @see org.apache.axiom.om.OMAttribute#getNamespace() */ public OMNamespace getNamespace() { return this.namespace; } /** * Returns a qname representing the attribute. * * @see org.apache.axiom.om.OMAttribute#getQName() */ public QName getQName() { return (namespace == null) ? new QName(this.attrName) : // This next bit is because QName is kind of stupid, and throws an // IllegalArgumentException on null prefix instead of treating it exactly // as if no prefix had been passed. Grr. (namespace.getPrefix() == null ? new QName(namespace.getNamespaceURI(), attrName) : new QName(namespace.getNamespaceURI(), attrName, namespace.getPrefix())); } /** * Returns the attribute value. * * @see org.apache.axiom.om.OMAttribute#getAttributeValue() */ public String getAttributeValue() { return this.attrValue.getText(); } /** * Returns the attribute value. * * @see org.apache.axiom.om.OMAttribute#getAttributeType() */ public String getAttributeType() { return this.attrType; } /** * Sets the name of attribute. * * @see org.apache.axiom.om.OMAttribute#setLocalName(String) */ public void setLocalName(String localName) { this.attrName = localName; } /** * Sets the namespace of this attribute node. * * @see org.apache.axiom.om.OMAttribute#setOMNamespace (org.apache.axiom.om.OMNamespace) */ public void setOMNamespace(OMNamespace omNamespace) { this.namespace = (NamespaceImpl) omNamespace; } /** * Sets the attribute value. * * @see org.apache.axiom.om.OMAttribute#setAttributeValue(String) */ public void setAttributeValue(String value) { if (isReadonly()) { String msg = DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "NO_MODIFICATION_ALLOWED_ERR", null); throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, msg); } this.attrValue = (TextImpl) this.getOwnerDocument().createTextNode( value); } /** * Sets the attribute value. * * @see org.apache.axiom.om.OMAttribute#setAttributeType(String) */ public void setAttributeType(String attrType) { this.attrType = attrType; } /** * Sets the parent element to the given OMContainer. * * @see org.apache.axiom.om.impl.OMNodeEx#setParent (org.apache.axiom.om.OMContainer) */ public void setParent(OMContainer element) { this.parent = (ParentNode) element; } /** * Sets the type. NOT IMPLEMENTED: Unnecessary. * * @see org.apache.axiom.om.impl.OMNodeEx#setType(int) */ public void setType(int nodeType) throws OMException { // not necessary ??? } /** @return Returns boolean. */ protected boolean isUsed() { return used; } /** @param used The used to set. */ protected void setUsed(boolean used) { this.used = used; } /** * Sets the value of the attribute. * * @see org.w3c.dom.Attr#setValue(String) */ public void setValue(String value) throws DOMException { this.attrValue = (TextImpl) this.getOwnerDocument().createTextNode( value); } /** * Returns the parent node of this attribute. * * @see org.apache.axiom.om.OMNode#getParent() */ public OMContainer getParent() { return this.parent; } /** * Returns the attribute name. * * @see org.w3c.dom.Node#getLocalName() */ public String getLocalName() { return (this.namespace == null) ? this.attrName : DOMUtil .getLocalName(this.attrName); } /** * Returns the namespace URI of this attr node. * * @see org.w3c.dom.Node#getNamespaceURI() */ public String getNamespaceURI() { if (this.namespace != null) { return namespace.getNamespaceURI(); } return null; } /** * Returns the namespace prefix of this attr node. * * @see org.w3c.dom.Node#getPrefix() */ public String getPrefix() { // TODO Error checking return (this.namespace == null) ? null : this.namespace.getPrefix(); } public Node cloneNode(boolean deep) { AttrImpl clone = (AttrImpl) super.cloneNode(deep); if (clone.attrValue == null) { // Need to break the association w/ original kids clone.attrValue = new TextImpl(this.attrValue.toString(), factory); if (this.attrValue.nextSibling != null) { throw new UnsupportedOperationException( "Attribute value can contain only a text " + "node with out any siblings"); } } clone.isSpecified(true); return clone; } /* * DOM-Level 3 methods */ public TypeInfo getSchemaTypeInfo() { // TODO TODO throw new UnsupportedOperationException("TODO"); } public boolean isId() { return isId; } public String toString() { return (this.namespace == null) ? this.attrName : this.namespace .getPrefix() + ":" + this.attrName; } /** * Returns the owner element of this attribute * @return OMElement - if the parent OMContainer is an instanceof OMElement * we return that OMElement else return null. To get the OMContainer itself use * getParent() method. */ public OMElement getOwner() { return (parent instanceof OMElement) ? (OMElement)parent : null; } /** * An instance of AttrImpl can act as an OMAttribute and as well as an * org.w3c.dom.Attr. So we first check if the object to compare with (obj) * is of type OMAttribute (this includes instances of OMAttributeImpl or * AttrImpl (instances of this class)). If so we check for the equality * of namespaces first (note that if the namespace of this instance is null then for the obj * to be equal its namespace must also be null). This condition solely doesn't determine the equality. * So we check for the equality of names and values (note that the value can also be null in which case * the same argument holds as that for the namespace) of the two instances. If all three conditions are * met then we say the two instances are equal. * *

If obj is of type org.w3c.dom.Attr then we perform the same equality check * as before. Note that, however, the implementation of the test for equality in this case is little different * than before. * *

If obj is neither of type OMAttribute nor of type org.w3c.dom.Attr * then we return false. * * @param obj The object to compare with this instance * @return True if the two objects are equal or else false. The equality is checked as explained above. */ public boolean equals(Object obj) { if (obj instanceof OMAttribute) { // Checks equality of an OMAttributeImpl or an AttrImpl with this instance OMAttribute other = (OMAttribute) obj; return (namespace == null ? other.getNamespace() == null : namespace.equals(other.getNamespace()) && attrName.equals(other.getLocalName()) && (attrValue == null ? other.getAttributeValue() == null : attrValue.toString().equals(other.getAttributeValue()))); } else if (obj instanceof Attr) {// Checks equality of an org.w3c.dom.Attr with this instance Attr other = (Attr)obj; String otherNs = other.getNamespaceURI(); if (namespace == null) { // I don't have a namespace if (otherNs != null) { return false; // I don't have a namespace and the other has. So return false } else { // Both of us don't have namespaces. So check for name and value equality only return (attrName.equals(other.getLocalName()) && (attrValue == null ? other.getValue() == null : attrValue.toString().equals(other.getValue()))); } } else { // Ok, now I've a namespace String ns = namespace.getNamespaceURI(); String prefix = namespace.getPrefix(); String otherPrefix = other.getPrefix(); // First check for namespaceURI equality. Then check for prefix equality. // Then check for name and value equality return (ns.equals(otherNs) && (prefix == null ? otherPrefix == null : prefix.equals(otherPrefix)) && (attrName.equals(other.getLocalName())) && (attrValue == null ? other.getValue() == null : attrValue.toString().equals(other.getValue()))); } } return false; } public int hashCode() { return attrName.hashCode() ^ (attrValue != null ? attrValue.toString().hashCode() : 0) ^ (namespace != null ? namespace.hashCode() : 0); } } axiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/DOMMessageFormatter.java0000644000000000000000000001326011131637472031275 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.dom; import java.util.Locale; import java.util.MissingResourceException; import java.util.PropertyResourceBundle; import java.util.ResourceBundle; /** Used to format DOM error messages, using the system locale. */ public class DOMMessageFormatter { public static final String DOM_DOMAIN = "http://www.w3.org/dom/DOMTR"; public static final String XML_DOMAIN = "http://www.w3.org/TR/1998/REC-xml-19980210"; public static final String SERIALIZER_DOMAIN = "http://apache.org/xml/serializer"; private static ResourceBundle domResourceBundle = null; private static ResourceBundle xmlResourceBundle = null; private static ResourceBundle serResourceBundle = null; private static Locale locale = null; public static final String LEVEL3_NOT_SUPPORTED = "DOM Level 3 operations are not supported"; public static final String NOT_REQUIRED_FOR_XMLSEC_OR_WSS4J = "This method is not required by Apache XML-Security Impl or WSS4J"; DOMMessageFormatter() { locale = Locale.getDefault(); } /** * Formats a message with the specified arguments using the given locale information. * * @param domain domain from which error string is to come. * @param key The message key. * @param arguments The message replacement text arguments. The order of the arguments must * match that of the placeholders in the actual message. * @return Returns the formatted message. * @throws MissingResourceException Thrown if the message with the specified key cannot be * found. */ public static String formatMessage(String domain, String key, Object[] arguments) throws MissingResourceException { ResourceBundle resourceBundle = getResourceBundle(domain); if (resourceBundle == null) { init(); resourceBundle = getResourceBundle(domain); if (resourceBundle == null) throw new MissingResourceException("Unknown domain" + domain, null, key); } // format message String msg; try { msg = key + ": " + resourceBundle.getString(key); if (arguments != null) { try { msg = java.text.MessageFormat.format(msg, arguments); } catch (Exception e) { msg = resourceBundle.getString("FormatFailed"); msg += " " + resourceBundle.getString(key); } } } // error catch (MissingResourceException e) { msg = resourceBundle.getString("BadMessageKey"); throw new MissingResourceException(key, msg, key); } // no message if (msg == null) { msg = key; if (arguments.length > 0) { StringBuffer str = new StringBuffer(msg); str.append('?'); for (int i = 0; i < arguments.length; i++) { if (i > 0) { str.append('&'); } str.append(String.valueOf(arguments[i])); } } } return msg; } static ResourceBundle getResourceBundle(String domain) { if (domain == DOM_DOMAIN || domain.equals(DOM_DOMAIN)) return domResourceBundle; else if (domain == XML_DOMAIN || domain.equals(XML_DOMAIN)) return xmlResourceBundle; else if (domain == SERIALIZER_DOMAIN || domain.equals(SERIALIZER_DOMAIN)) return serResourceBundle; return null; } /** Initializes Message Formatter. */ public static void init() { if (locale != null) { domResourceBundle = PropertyResourceBundle.getBundle( "org.apache.axiom.om.impl.dom.msg.DOMMessages", locale); serResourceBundle = PropertyResourceBundle.getBundle( "org.apache.axiom.om.impl.dom.msg.XMLSerializerMessages", locale); xmlResourceBundle = PropertyResourceBundle.getBundle( "org.apache.axiom.om.impl.dom.msg.XMLMessages", locale); } else { domResourceBundle = PropertyResourceBundle .getBundle("org.apache.axiom.om.impl.dom.msg.DOMMessages"); serResourceBundle = PropertyResourceBundle .getBundle("org.apache.axiom.om.impl.dom.msg.XMLSerializerMessages"); xmlResourceBundle = PropertyResourceBundle .getBundle("org.apache.axiom.om.impl.dom.msg.XMLMessages"); } } /** * Sets Locale to be used by the formatter. * * @param dlocale */ public static void setLocale(Locale dlocale) { locale = dlocale; } } axiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/CommentImpl.java0000644000000000000000000000455411131637472027717 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.dom; import org.apache.axiom.om.OMComment; import org.apache.axiom.om.OMException; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMNode; import org.w3c.dom.Comment; import org.w3c.dom.Node; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamWriter; public class CommentImpl extends CharacterImpl implements Comment, OMComment { public CommentImpl(DocumentImpl ownerNode, OMFactory factory) { super(ownerNode, factory); this.done = true; } public CommentImpl(DocumentImpl ownerNode, String value, OMFactory factory) { super(ownerNode, value, factory); this.done = true; } public String getNodeName() { return "#comment"; } public short getNodeType() { return Node.COMMENT_NODE; } public String getValue() { return this.getData(); } public void setValue(String text) { this.textValue.delete(0, this.textValue.length()); this.textValue.append(text); } public int getType() { return OMNode.COMMENT_NODE; } public void setType(int nodeType) throws OMException { throw new UnsupportedOperationException( "You should not set the node type of a comment"); } public void internalSerialize(XMLStreamWriter writer) throws XMLStreamException { writer.writeComment(this.textValue.toString()); } public void internalSerializeAndConsume(XMLStreamWriter writer) throws XMLStreamException { internalSerialize(writer); } } axiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/DOMNavigator.java0000644000000000000000000001116511131637472027761 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.dom; import org.apache.axiom.om.OMContainer; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMNode; /** * This is exactly the same as org.apache.axiom.om.impl.om.OMNavigator, only the llom specifics are * changed to dom. Refer to the testClass to find out how to use features like isNavigable, * isComplete and step. */ public class DOMNavigator { /** Field node */ protected OMNode node; /** Field visited */ private boolean visited; /** Field next */ private OMNode next; // root is the starting element. Once the navigator comes back to the // root, the traversal is terminated /** Field root */ private OMNode root; /** Field backtracked */ private boolean backtracked; // flags that tell the status of the navigator /** Field end */ private boolean end = false; /** Field start */ private boolean start = true; /** Constructor OMNavigator. */ public DOMNavigator() { } /** * Constructor OMNavigator. * * @param node */ public DOMNavigator(OMNode node) { init(node); } /** * Method init. * * @param node */ public void init(OMNode node) { next = node; root = node; backtracked = false; } /** * Gets the next node. * * @return Returns OMNode in the sequence of preorder traversal. Note however that an element * node is treated slightly differently. Once the element is passed it returns the same * element in the next encounter as well. */ public OMNode next() { if (next == null) { return null; } node = next; visited = backtracked; backtracked = false; updateNextNode(); // set the starting and ending flags if (root.equals(node)) { if (!start) { end = true; } else { start = false; } } return node; } /** Private method to encapsulate the searching logic */ private void updateNextNode() { if ((next instanceof OMElement) && !visited) { ElementImpl e = (ElementImpl) next; if (e.firstChild != null) { next = e.firstChild; } else if (e.isComplete()) { backtracked = true; } else { next = null; } } else { OMNode nextSibling = ((ChildNode) next).nextSibling; OMContainer parent = next.getParent(); if (nextSibling != null) { next = nextSibling; } else if ((parent != null) && parent.isComplete()) { next = (NodeImpl) parent; backtracked = true; } else { next = null; } } } /** * Method visited. * * @return Returns boolean. */ public boolean visited() { return visited; } /** * This is a very special method. This allows the navigator to step once it has reached the * existing OM. At this point the isNavigable method will return false but the isComplete method * may return false which means that the navigating the given element is not complete but the * navigator cannot proceed. */ public void step() { if (!end) { next = node; updateNextNode(); } } /** * Returns the navigable status. * * @return Returns boolean. */ public boolean isNavigable() { if (end) { return false; } else { return !(next == null); } } /** * Returns the completed status. * * @return Returns boolean. */ public boolean isCompleted() { return end; } } axiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/NamespaceImpl.java0000644000000000000000000000473411131637472030211 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.dom; import org.apache.axiom.om.OMNamespace; public class NamespaceImpl implements OMNamespace { private String nsUri; private String nsPrefix; public NamespaceImpl(String uri) { if (uri == null) { throw new IllegalArgumentException("Namespace URI may not be null"); } this.nsUri = uri; } public NamespaceImpl(String uri, String prefix) { this(uri); this.nsPrefix = prefix; } /* * (non-Javadoc) * * @see org.apache.axiom.om.OMNamespace#equals(java.lang.String, * java.lang.String) */ public boolean equals(String uri, String prefix) { return (nsUri.equals(uri) && (nsPrefix == null ? prefix == null : nsPrefix.equals(prefix))); } public boolean equals(Object obj) { if (!(obj instanceof OMNamespace)) return false; OMNamespace other = (OMNamespace)obj; String otherPrefix = other.getPrefix(); return (nsUri.equals(other.getNamespaceURI()) && (nsPrefix == null ? otherPrefix == null : nsPrefix.equals(otherPrefix))); } /* * (non-Javadoc) * * @see org.apache.axiom.om.OMNamespace#getPrefix() */ public String getPrefix() { return this.nsPrefix; } /* * (non-Javadoc) * * @see org.apache.axiom.om.OMNamespace#getName() */ public String getName() { return this.nsUri; } public String getNamespaceURI() { return this.nsUri; } public int hashCode() { return nsUri.hashCode() ^ (nsPrefix != null ? nsPrefix.hashCode() : 0); } } axiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/DocumentFragmentImpl.java0000644000000000000000000000526011131637472031552 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.dom; import org.apache.axiom.om.OMException; import org.apache.axiom.om.OMFactory; import org.w3c.dom.DocumentFragment; import org.w3c.dom.Node; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamWriter; public class DocumentFragmentImpl extends ParentNode implements DocumentFragment { /** @param ownerDocument */ public DocumentFragmentImpl(DocumentImpl ownerDocument, OMFactory factory) { super(ownerDocument, factory); this.done = true; } /* * (non-Javadoc) * * @see org.w3c.dom.Node#getNodeType() */ public short getNodeType() { return Node.DOCUMENT_FRAGMENT_NODE; } /* * (non-Javadoc) * * @see org.w3c.dom.Node#getNodeName() */ public String getNodeName() { return "#document-fragment"; } /* * (non-Javadoc) * * @see org.apache.axiom.om.OMNode#getType() */ public int getType() throws OMException { return -1; } /* * (non-Javadoc) * * @see org.apache.axiom.om.OMNode#setType(int) */ public void setType(int nodeType) throws OMException { // DO Nothing :-? } public void internalSerialize(XMLStreamWriter writer) throws XMLStreamException { // TODO throw new UnsupportedOperationException("TODO"); } public void serialize(XMLStreamWriter xmlWriter) throws XMLStreamException { // TODO throw new UnsupportedOperationException("TODO"); } public void internalSerializeAndConsume(XMLStreamWriter writer) throws XMLStreamException { // TODO throw new UnsupportedOperationException("TODO"); } public void serializeAndConsume(XMLStreamWriter xmlWriter) throws XMLStreamException { // TODO throw new UnsupportedOperationException("TODO"); } } axiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/TextImpl.java0000644000000000000000000005041511131637472027236 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.dom; import org.apache.axiom.attachments.utils.DataHandlerUtils; import org.apache.axiom.om.OMAttribute; import org.apache.axiom.om.OMContainer; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMException; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMNode; import org.apache.axiom.om.OMText; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.om.impl.MTOMXMLStreamWriter; import org.apache.axiom.om.impl.OMNamespaceImpl; import org.apache.axiom.om.impl.builder.XOPBuilder; import org.apache.axiom.om.util.TextHelper; import org.apache.axiom.om.util.UUIDGenerator; import org.w3c.dom.DOMException; import org.w3c.dom.Node; import org.w3c.dom.Text; import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamWriter; import java.io.IOException; import java.io.InputStream; public class TextImpl extends CharacterImpl implements Text, OMText { private String mimeType; private boolean optimize; private boolean isBinary; private String contentID = null; protected OMNamespace textNS = null; protected char[] charArray; /** * Field dataHandler contains the DataHandler. Declaring as Object to remove the dependency on * Javax.activation.DataHandler */ private Object dataHandlerObject = null; /** Field nameSpace is used when serializing Binary stuff as MTOM optimized. */ protected OMNamespace ns = null; /** Field localName is used when serializing Binary stuff as MTOM optimized. */ protected String localName = "Include"; /** Field attribute is used when serializing Binary stuff as MTOM optimized. */ protected OMAttribute attribute; /** Field nameSpace used when serializing Binary stuff as MTOM optimized. */ public static final OMNamespace XOP_NS = new OMNamespaceImpl( "http://www.w3.org/2004/08/xop/include", "xop"); /** * Creates a text node with the given text required by the OMDOMFactory. The owner document * should be set properly when appending this to a DOM tree. * * @param text */ public TextImpl(String text, OMFactory factory) { super(factory); this.textValue = (text != null) ? new StringBuffer(text) : new StringBuffer(""); this.done = true; this.ns = XOP_NS; } /** * @param contentID * @param parent * @param builder Used when the builder is encountered with a XOP:Include tag Stores a * reference to the builder and the content-id. Supports deffered parsing of * MIME messages */ public TextImpl(String contentID, OMContainer parent, OMXMLParserWrapper builder, OMFactory factory) { super((DocumentImpl) ((ParentNode) parent).getOwnerDocument(), factory); this.contentID = contentID; this.optimize = true; this.isBinary = true; this.done = true; this.builder = builder; this.ns = XOP_NS; } /** * Construct TextImpl that is a copy of the source OMTextImpl * @param parent * @param source TextImpl * @param factory */ public TextImpl(OMContainer parent, TextImpl source, OMFactory factory) { super((DocumentImpl) ((ParentNode) parent).getOwnerDocument(), factory); this.done = true; // Copy the value of the text if (source.textValue != null) { this.textValue = new StringBuffer(); this.textValue.append(source.textValue.toString()); } // Clone the charArray (if it exists) if (source.charArray != null) { this.charArray = new char[source.charArray.length]; for (int i=0; i this.textValue.length()) { throw new DOMException(DOMException.INDEX_SIZE_ERR, DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "INDEX_SIZE_ERR", null)); } String newValue = this.textValue.substring(offset); this.deleteData(offset, this.textValue.length()); TextImpl newText = (TextImpl) this.getOwnerDocument().createTextNode( newValue); if (this.parentNode != null) { newText.setParent(this.parentNode); } this.insertSiblingAfter(newText); return newText; } // / // /org.w3c.dom.Node methods // / public String getNodeName() { return "#text"; } public short getNodeType() { return Node.TEXT_NODE; } // / // /OMNode methods // / /* * (non-Javadoc) * * @see org.apache.axiom.om.OMNode#getType() */ public int getType() throws OMException { return OMNode.TEXT_NODE; } /* * (non-Javadoc) * * @see org.apache.axiom.om.OMNode#setType(int) */ public void setType(int nodeType) throws OMException { // do not do anything here // Its not clear why we should let someone change the type of a node } public void internalSerialize(XMLStreamWriter writer) throws XMLStreamException { internalSerializeLocal(writer); } public void internalSerializeAndConsume(XMLStreamWriter writer) throws XMLStreamException { internalSerializeLocal(writer); } public boolean isOptimized() { return this.optimize; } public void setOptimize(boolean value) { this.optimize = value; if (value) { isBinary = true; } } public void discard() throws OMException { if (done) { this.detach(); } } /** * Writes the relevant output. * * @param writer * @throws XMLStreamException */ private void writeOutput(XMLStreamWriter writer) throws XMLStreamException { int type = getType(); if (type == OMNode.TEXT_NODE || type == SPACE_NODE) { writer.writeCharacters(this.getText()); } else if (type == OMNode.CDATA_SECTION_NODE) { writer.writeCData(this.getText()); } else if (type == OMNode.ENTITY_REFERENCE_NODE) { writer.writeEntityRef(this.getText()); } } public String getText() { if (this.textNS != null) { return getTextString(); } else if (this.charArray != null || this.textValue != null) { return getTextFromProperPlace(); } else { try { return TextHelper.toString(getInputStream()); } catch (Exception e) { throw new OMException(e); } } } public String getData() throws DOMException { return this.getText(); } public char[] getTextCharacters() { return charArray != null ? charArray : this.textValue.toString() .toCharArray(); } public boolean isCharacters() { return charArray != null; } private String getTextFromProperPlace() { return charArray != null ? new String(charArray) : textValue.toString(); } private String getTextString() { if (textNS != null) { String prefix = textNS.getPrefix(); if (prefix == null || "".equals(prefix)) { return getTextFromProperPlace(); } else { return prefix + ":" + getTextFromProperPlace(); } } return null; } public QName getTextAsQName() { if (textNS != null) { String prefix = textNS.getPrefix(); String name = textNS.getNamespaceURI(); if (prefix == null || "".equals(prefix)) { return new QName(name, getTextFromProperPlace()); } else { return new QName(textNS.getNamespaceURI(), getTextFromProperPlace(), prefix); } } else if (this.textValue != null || charArray != null) { return new QName(getTextFromProperPlace()); } else { try { return new QName(TextHelper.toString(getInputStream())); } catch (Exception e) { throw new OMException(e); } } } public String getNodeValue() throws DOMException { return this.getText(); } public String getContentID() { if (contentID == null) { contentID = UUIDGenerator.getUUID() + "@apache.org"; } return this.contentID; } public Object getDataHandler() { /* * this should return a DataHandler containing the binary data * reperesented by the Base64 strings stored in OMText */ if ((textValue != null || charArray != null || textNS != null) & isBinary) { String text = textNS == null ? getTextFromProperPlace() : getTextString(); return DataHandlerUtils .getDataHandlerFromText(text, mimeType); } else { if (dataHandlerObject == null) { if (contentID == null) { throw new RuntimeException("ContentID is null"); } dataHandlerObject = ((XOPBuilder) builder) .getDataHandler(contentID); } return dataHandlerObject; } } public java.io.InputStream getInputStream() throws OMException { if (isBinary) { if (dataHandlerObject == null) { getDataHandler(); } InputStream inStream; javax.activation.DataHandler dataHandler = (javax.activation.DataHandler) dataHandlerObject; try { inStream = dataHandler.getDataSource().getInputStream(); } catch (IOException e) { throw new OMException( "Cannot get InputStream from DataHandler." + e); } return inStream; } else { throw new OMException("Unsupported Operation"); } } private void internalSerializeLocal(XMLStreamWriter writer2) throws XMLStreamException { MTOMXMLStreamWriter writer = (MTOMXMLStreamWriter) writer2; if (!this.isBinary) { writeOutput(writer); } else { if (writer.isOptimized()) { if (contentID == null) { contentID = writer.getNextContentId(); } // send binary as MTOM optimised this.attribute = new AttrImpl(this.ownerNode, "href", new NamespaceImpl("", ""), "cid:" + getContentID(), this.factory); this.serializeStartpart(writer); writer.writeOptimized(this); writer.writeEndElement(); } else { writer.writeCharacters(this.getText()); } } } /* * Methods to copy from OMSerialize utils. */ private void serializeStartpart(XMLStreamWriter writer) throws XMLStreamException { String nameSpaceName = XOP_NS.getNamespaceURI(); String writer_prefix = writer.getPrefix(nameSpaceName); String prefix = XOP_NS.getPrefix(); if (writer_prefix != null) { writer.writeStartElement(nameSpaceName, this .getLocalName()); } else { writer.writeStartElement(prefix, this.getLocalName(), nameSpaceName); writer.setPrefix(prefix, nameSpaceName); } // add the elements attribute "href" serializeAttribute(this.attribute, writer); // add the namespace serializeNamespace(XOP_NS, writer); } /** * Method serializeAttribute. * * @param attr * @param writer * @throws XMLStreamException */ static void serializeAttribute(OMAttribute attr, XMLStreamWriter writer) throws XMLStreamException { // first check whether the attribute is associated with a namespace OMNamespace ns = attr.getNamespace(); String prefix; String namespaceName; if (ns != null) { // add the prefix if it's availble prefix = ns.getPrefix(); namespaceName = ns.getNamespaceURI(); if (prefix != null) { writer.writeAttribute(prefix, namespaceName, attr .getLocalName(), attr.getAttributeValue()); } else { writer.writeAttribute(namespaceName, attr.getLocalName(), attr .getAttributeValue()); } } else { writer .writeAttribute(attr.getLocalName(), attr .getAttributeValue()); } } /** * Method serializeNamespace. * * @param namespace * @param writer * @throws XMLStreamException */ static void serializeNamespace(OMNamespace namespace, XMLStreamWriter writer) throws XMLStreamException { if (namespace != null) { String uri = namespace.getNamespaceURI(); String ns_prefix = namespace.getPrefix(); writer.writeNamespace(ns_prefix, namespace.getNamespaceURI()); writer.setPrefix(ns_prefix, uri); } } public Node cloneNode(boolean deep) { TextImpl textImpl = new TextImpl(this.textValue.toString(), this.factory); textImpl.setOwnerDocument(this.ownerNode); return textImpl; } public String getLocalName() { return this.localName; } /* * DOM-Level 3 methods */ public String getWholeText() { // TODO TODO throw new UnsupportedOperationException("TODO"); } public boolean isElementContentWhitespace() { // TODO TODO throw new UnsupportedOperationException("TODO"); } public Text replaceWholeText(String arg0) throws DOMException { // TODO TODO throw new UnsupportedOperationException("TODO"); } public String toString() { return (this.textValue != null) ? textValue.toString() : ""; } /* (non-Javadoc) * @see org.apache.axiom.om.OMNode#buildAll() */ public void buildWithAttachments() { this.build(); if (isOptimized()) { this.getDataHandler(); } } public boolean isBinary() { return isBinary; } /** * Receiving binary can happen as either MTOM attachments or as Base64 Text In the case of Base64 * user has to explicitly specify that the content is binary, before calling getDataHandler(), * getInputStream().... */ public void setBinary(boolean value) { this.isBinary = value; } public OMNamespace getNamespace() { return textNS; } public void setContentID(String cid) { this.contentID = cid; } } axiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/DOMStAXWrapper.java0000644000000000000000000010710311131637472030205 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.dom; import org.apache.axiom.om.OMAttachmentAccessor; import org.apache.axiom.om.OMAttribute; import org.apache.axiom.om.OMComment; import org.apache.axiom.om.OMConstants; import org.apache.axiom.om.OMDocument; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMException; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMNode; import org.apache.axiom.om.OMText; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.om.OMXMLStreamReader; import org.apache.axiom.om.impl.EmptyOMLocation; import org.apache.axiom.om.impl.builder.StAXBuilder; import org.apache.axiom.om.impl.exception.OMStreamingException; import org.w3c.dom.Attr; import javax.activation.DataHandler; import javax.xml.namespace.NamespaceContext; import javax.xml.namespace.QName; import javax.xml.stream.Location; import javax.xml.stream.XMLStreamConstants; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import java.util.Iterator; import java.util.Stack; /** * This is exactly the same as org.apache.axiom.om.impl.llom.OMStAXWrapper. BUT this uses the * org.apache.axis2.om.impl.dom.DOMNavigator. *

* Note - This class also implements the streaming constants interface to get access to the StAX * constants. */ public class DOMStAXWrapper implements OMXMLStreamReader, XMLStreamConstants { /** Field navigator */ private DOMNavigator navigator; /** Field builder */ private OMXMLParserWrapper builder; /** Field parser */ private XMLStreamReader parser; /** Field rootNode */ private OMNode rootNode; /** Field isFirst */ private boolean isFirst = true; // Navigable means the output should be taken from the navigator // as soon as the navigator returns a null navigable will be reset // to false and the subsequent events will be taken from the builder // or the parser directly. /** Field NAVIGABLE */ private static final short NAVIGABLE = 0; private static final short SWITCH_AT_NEXT = 1; private static final short COMPLETED = 2; private static final short SWITCHED = 3; private static final short DOCUMENT_COMPLETE = 4; /** Field state */ private short state; /** Field currentEvent Default set to START_DOCUMENT */ private int currentEvent = START_DOCUMENT; // SwitchingAllowed is set to false by default // this means that unless the user explicitly states // that he wants things not to be cached, everything will // be cached /** Field switchingAllowed */ boolean switchingAllowed = false; /** Field elementStack */ private Stack elementStack = new Stack(); // keeps the next event. The parser actually keeps one step ahead to // detect the end of navigation. (at the end of the stream the navigator // returns a null /** Field nextNode */ private OMNode nextNode = null; // holder for the current node. Needs this to generate events from the // current node /** Field currentNode */ private OMNode currentNode = null; // needs this to refer to the last known node /** Field lastNode */ private OMNode lastNode = null; private boolean needToThrowEndDocument = false; /** * If true then TEXT events are constructed for the MTOM attachment * If false, an event is constructed and * the consumer must call getDataHandler(cid) to access the datahandler. */ private boolean inlineMTOM = true; /** * Method setAllowSwitching. * * @param b */ public void setAllowSwitching(boolean b) { this.switchingAllowed = b; } /** * Method isAllowSwitching. * * @return Returns boolean. */ public boolean isAllowSwitching() { return switchingAllowed; } /** * When constructing the OMStaxWrapper, the creator must produce the builder (an instance of the * OMXMLparserWrapper of the input) and the Element Node to start parsing. The wrapper * parses(proceed) until the end of the given element. Hence care must be taken to pass the root * element if the entire document is needed. * * @param builder * @param startNode */ public DOMStAXWrapper(OMXMLParserWrapper builder, OMElement startNode) { this(builder, startNode, false); } /** * Constructor OMStAXWrapper * * @param builder * @param startNode * @param cache */ public DOMStAXWrapper(OMXMLParserWrapper builder, OMElement startNode, boolean cache) { // create a navigator this.navigator = new DOMNavigator(startNode); this.builder = builder; this.rootNode = startNode; if (rootNode != null && rootNode.getParent() != null && rootNode.getParent() instanceof OMDocument) { needToThrowEndDocument = true; } // initaite the next and current nodes // Note - navigator is written in such a way that it first // returns the starting node at the first call to it currentNode = navigator.next(); updateNextNode(); switchingAllowed = !cache; } /** * @return Returns String. * @see javax.xml.stream.XMLStreamReader#getPrefix() */ public String getPrefix() { String returnStr = null; if (parser != null) { returnStr = parser.getPrefix(); } else { if ((currentEvent == START_ELEMENT) || (currentEvent == END_ELEMENT)) { OMNamespace ns = ((OMElement) lastNode).getNamespace(); returnStr = (ns == null) ? null : ns.getPrefix(); } } return returnStr; } /** * @return Returns String. * @see javax.xml.stream.XMLStreamReader#getNamespaceURI() */ public String getNamespaceURI() { String returnStr = null; if (parser != null) { returnStr = parser.getNamespaceURI(); } else { if ((currentEvent == START_ELEMENT) || (currentEvent == END_ELEMENT) || (currentEvent == NAMESPACE)) { OMNamespace ns = ((OMElement) lastNode).getNamespace(); returnStr = (ns == null) ? null : ns.getNamespaceURI(); } } return (returnStr != null) ? returnStr.intern() : null; } /** * @return Returns String. * @see javax.xml.stream.XMLStreamReader#hasName() */ public boolean hasName() { if (parser != null) { return parser.hasName(); } else { return ((currentEvent == START_ELEMENT) || (currentEvent == END_ELEMENT)); } } /** * @return Returns String. * @see javax.xml.stream.XMLStreamReader#getLocalName() */ public String getLocalName() { String returnStr = null; if (parser != null) { returnStr = parser.getLocalName(); } else { if ((currentEvent == START_ELEMENT) || (currentEvent == END_ELEMENT) || (currentEvent == ENTITY_REFERENCE)) { returnStr = ((OMElement) lastNode).getLocalName(); } } return returnStr; } /** * @return Returns QName. * @see javax.xml.stream.XMLStreamReader#getName() */ public QName getName() { QName returnName = null; if (parser != null) { returnName = parser.getName(); } else { if ((currentEvent == START_ELEMENT) || (currentEvent == END_ELEMENT)) { returnName = getQName((OMElement) lastNode); } } return returnName; } /** * @return Returns boolean. * @see javax.xml.stream.XMLStreamReader#hasText() */ public boolean hasText() { return ((currentEvent == CHARACTERS) || (currentEvent == DTD) || (currentEvent == CDATA) || (currentEvent == ENTITY_REFERENCE) || (currentEvent == COMMENT) || (currentEvent == SPACE)); } /** * @return Returns int. * @see javax.xml.stream.XMLStreamReader#getTextLength() */ public int getTextLength() { int returnLength = 0; if (parser != null) { returnLength = parser.getTextLength(); } else { OMText textNode = (OMText) lastNode; returnLength = textNode.getText().length(); } return returnLength; } /** * @return Returns int. * @see javax.xml.stream.XMLStreamReader#getTextStart() */ public int getTextStart() { int returnLength = 0; if (parser != null) { returnLength = parser.getTextStart(); } // Note - this has no relevant method in the OM return returnLength; } /** * @param i * @param chars * @param i1 * @param i2 * @return Returns int. * @throws XMLStreamException * @see javax.xml.stream.XMLStreamReader#getTextCharacters(int, char[], int, int) */ public int getTextCharacters(int i, char[] chars, int i1, int i2) throws XMLStreamException { int returnLength = 0; if (hasText()) { if (parser != null) { try { returnLength = parser.getTextCharacters(i, chars, i1, i2); } catch (XMLStreamException e) { throw new OMStreamingException(e); } } // Note - this has no relevant method in the OM } return returnLength; } /** * @return Returns char[]. * @see javax.xml.stream.XMLStreamReader#getTextCharacters() */ public char[] getTextCharacters() { char[] returnArray = null; if (parser != null) { returnArray = parser.getTextCharacters(); } else { if (hasText()) { OMText textNode = (OMText) lastNode; String str = textNode.getText(); returnArray = str.toCharArray(); } } return returnArray; } /** * @return Returns String. * @see javax.xml.stream.XMLStreamReader#getText() */ public String getText() { String returnString = null; if (parser != null) { returnString = parser.getText(); } else { if (hasText()) { if (lastNode instanceof OMText) { returnString = ((OMText) lastNode).getText(); } else if (lastNode instanceof OMComment) { returnString = ((OMComment) lastNode).getValue(); } } } return returnString; } /** * @return Returns int. * @see javax.xml.stream.XMLStreamReader#getEventType() */ // todo this should be improved public int getEventType() { return currentEvent; } /** * @param i * @return Returns String. * @see javax.xml.stream.XMLStreamReader#getNamespaceURI */ public String getNamespaceURI(int i) { String returnString = null; if (parser != null) { returnString = parser.getNamespaceURI(i); } else { if (isStartElement() || isEndElement() || (currentEvent == NAMESPACE)) { OMNamespace ns = (OMNamespace) getItemFromIterator( ((OMElement) lastNode).getAllDeclaredNamespaces(), i); returnString = (ns == null) ? null : ns.getNamespaceURI(); } } return returnString; } /** * @param i * @return Returns String. * @see javax.xml.stream.XMLStreamReader#getNamespacePrefix */ public String getNamespacePrefix(int i) { String returnString = null; if (parser != null) { returnString = parser.getNamespacePrefix(i); } else { if (isStartElement() || isEndElement() || (currentEvent == NAMESPACE)) { OMNamespace ns = (OMNamespace) getItemFromIterator( ((OMElement) lastNode).getAllDeclaredNamespaces(), i); returnString = (ns == null) ? null : ns.getPrefix(); } } return returnString; } /** * @return Returns int. * @see javax.xml.stream.XMLStreamReader#getNamespaceCount() */ public int getNamespaceCount() { int returnCount = 0; if (parser != null) { returnCount = parser.getNamespaceCount(); } else { if (isStartElement() || isEndElement() || (currentEvent == NAMESPACE)) { returnCount = getCount(((OMElement) lastNode) .getAllDeclaredNamespaces()); } } return returnCount; } /** * @param i * @return Returns boolean. * @see javax.xml.stream.XMLStreamReader#isAttributeSpecified */ public boolean isAttributeSpecified(int i) { boolean returnValue = false; if (parser != null) { returnValue = parser.isAttributeSpecified(i); } else { if (isStartElement() || (currentEvent == ATTRIBUTE)) { // theres nothing to be returned here } else { throw new IllegalStateException( "attribute type accessed in illegal event!"); } } return returnValue; } /** * @param i * @return Returns String. * @see javax.xml.stream.XMLStreamReader#getAttributeValue */ public String getAttributeValue(int i) { String returnString = null; if (parser != null) { returnString = parser.getAttributeValue(i); } else { if (isStartElement() || (currentEvent == ATTRIBUTE)) { OMAttribute attrib = getAttribute((OMElement) lastNode, i); if (attrib != null) { returnString = attrib.getAttributeValue(); } } else { throw new IllegalStateException( "attribute type accessed in illegal event!"); } } return returnString; } /** * @param i * @return Returns String. * @see javax.xml.stream.XMLStreamReader#getAttributeType */ public String getAttributeType(int i) { String returnString = null; if (parser != null) { returnString = parser.getAttributeType(i); } else { if (isStartElement() || (currentEvent == ATTRIBUTE)) { OMAttribute attrib = getAttribute((OMElement) lastNode, i); if (attrib != null) { returnString = attrib.getAttributeType(); } } else { throw new IllegalStateException( "attribute type accessed in illegal event!"); } } return returnString; } /** * @param i * @return Returns String. * @see javax.xml.stream.XMLStreamReader#getAttributePrefix */ public String getAttributePrefix(int i) { String returnString = null; if (parser != null) { returnString = parser.getAttributePrefix(i); } else { if (isStartElement() || (currentEvent == ATTRIBUTE)) { OMAttribute attrib = getAttribute((OMElement) lastNode, i); if (attrib != null) { OMNamespace nameSpace = attrib.getNamespace(); if (nameSpace != null) { returnString = nameSpace.getPrefix(); } } } else { throw new IllegalStateException( "attribute prefix accessed in illegal event!"); } } return returnString; } /** * @param i * @return Returns String. * @see javax.xml.stream.XMLStreamReader#getAttributeLocalName */ public String getAttributeLocalName(int i) { String returnString = null; if (parser != null) { returnString = parser.getAttributeLocalName(i); } else { if (isStartElement() || (currentEvent == ATTRIBUTE)) { OMAttribute attrib = getAttribute((OMElement) lastNode, i); if (attrib != null) { if (attrib.getNamespace() != null) { returnString = attrib.getLocalName(); } else { returnString = ((Attr) attrib).getNodeName(); } } } else { throw new IllegalStateException( "attribute localName accessed in illegal event!"); } } return returnString; } /** * @param i * @return Returns String. * @see javax.xml.stream.XMLStreamReader#getAttributeNamespace */ public String getAttributeNamespace(int i) { String returnString = null; if (parser != null) { returnString = parser.getAttributeNamespace(i); } else { if (isStartElement() || (currentEvent == ATTRIBUTE)) { OMAttribute attrib = getAttribute((OMElement) lastNode, i); if (attrib != null) { OMNamespace nameSpace = attrib.getNamespace(); if (nameSpace != null) { returnString = nameSpace.getNamespaceURI(); } } } else { throw new IllegalStateException( "attribute nameSpace accessed in illegal event!"); } } return returnString; } /** * @param i * @return Returns QName. * @see javax.xml.stream.XMLStreamReader#getAttributeName */ public QName getAttributeName(int i) { QName returnQName = null; if (parser != null) { returnQName = parser.getAttributeName(i); } else { if (isStartElement() || (currentEvent == ATTRIBUTE)) { returnQName = getAttribute((OMElement) lastNode, i).getQName(); } else { throw new IllegalStateException( "attribute count accessed in illegal event!"); } } return returnQName; } /** * @return Returns int. * @see javax.xml.stream.XMLStreamReader#getAttributeCount */ public int getAttributeCount() { int returnCount = 0; if (parser != null) { returnCount = parser.getAttributeCount(); } else { if (isStartElement() || (currentEvent == ATTRIBUTE)) { OMElement elt = (OMElement) lastNode; returnCount = getCount(elt.getAllAttributes()); } else { throw new IllegalStateException( "attribute count accessed in illegal event (" + currentEvent + ")!"); } } return returnCount; } // todo /** * Method getAttributeValue. * * @param s * @param s1 * @return Returns String. */ public String getAttributeValue(String s, String s1) { String returnString = null; if (parser != null) { returnString = parser.getAttributeValue(s, s1); } else { if (isStartElement() || (currentEvent == ATTRIBUTE)) { QName qname = new QName(s, s1); OMAttribute attrib = ((OMElement) lastNode).getAttribute(qname); if (attrib != null) { returnString = attrib.getAttributeValue(); } } else { throw new IllegalStateException( "attribute type accessed in illegal event!"); } } return returnString; } /** * Method isWhiteSpace. * * @return Returns boolean. */ public boolean isWhiteSpace() { boolean b; if (parser != null) { b = parser.isWhiteSpace(); } else { b = (currentEvent == SPACE); } return b; } /** * Method isCharacters. * * @return Returns boolean. */ public boolean isCharacters() { boolean b; if (parser != null) { b = parser.isCharacters(); } else { b = (currentEvent == CHARACTERS); } return b; } /** * Method isEndElement. * * @return Returns boolean. */ public boolean isEndElement() { boolean b; if (parser != null) { b = parser.isEndElement(); } else { b = (currentEvent == END_ELEMENT); } return b; } /** * @param i * @param s * @param s1 * @throws XMLStreamException * @see javax.xml.stream.XMLStreamReader#require(int, String, String) */ public void require(int i, String s, String s1) throws XMLStreamException { throw new XMLStreamException(); } /** * Method isStartElement. * * @return Returns boolean. */ public boolean isStartElement() { boolean b; if (parser != null) { b = parser.isStartElement(); } else { b = (currentEvent == START_ELEMENT); } return b; } /** * Method getNamespaceURI. * * @param s * @return Returns String. */ public String getNamespaceURI(String s) { String returnString = null; if (parser != null) { returnString = parser.getNamespaceURI(s); } else { if (isStartElement() || isEndElement() || (currentEvent == NAMESPACE)) { // Nothing to do here! How to get the namespacace references } } return returnString; } /** * Method close. * * @throws XMLStreamException */ public void close() throws XMLStreamException { // this doesnot mean anything with respect to the OM if (parser != null) { parser.close(); } } /** * Method hasNext. * * @return Returns boolean. * @throws XMLStreamException */ public boolean hasNext() throws XMLStreamException { if (needToThrowEndDocument) { return !(state == DOCUMENT_COMPLETE); } else { return (state != COMPLETED && currentEvent != END_DOCUMENT); } } /** * Not implemented yet * * @return Returns int. * @throws org.apache.axiom.om.impl.exception.OMStreamingException * * @throws XMLStreamException */ public int nextTag() throws XMLStreamException { throw new UnsupportedOperationException(); } /** * @return Returns String. * @throws XMLStreamException * @see javax.xml.stream.XMLStreamReader#getElementText() */ public String getElementText() throws XMLStreamException { String returnText = ""; if (parser != null) { try { returnText = parser.getElementText(); } catch (XMLStreamException e) { throw new OMStreamingException(e); } } else { if (currentNode.getType() == OMNode.ELEMENT_NODE) { returnText = ((OMElement) currentNode).getText(); } else if (currentNode.getType() == OMNode.TEXT_NODE) { returnText = ((OMText) currentNode).getText(); } } return returnText; } /** * Method next. * * @return Returns int. * @throws XMLStreamException */ public int next() throws XMLStreamException { switch (state) { case DOCUMENT_COMPLETE: throw new XMLStreamException("End of the document reached"); case COMPLETED: state = DOCUMENT_COMPLETE; currentEvent = END_DOCUMENT; break; case SWITCH_AT_NEXT: state = SWITCHED; // load the parser try { parser = (XMLStreamReader) builder.getParser(); } catch (Exception e) { throw new XMLStreamException("problem accessing the parser", e); } if ((currentEvent == START_DOCUMENT) && (currentEvent == parser.getEventType())) { currentEvent = parser.next(); } else { currentEvent = parser.getEventType(); } updateCompleteStatus(); break; case NAVIGABLE: currentEvent = generateEvents(currentNode); updateCompleteStatus(); updateLastNode(); break; case SWITCHED: currentEvent = parser.next(); updateCompleteStatus(); break; default: throw new OMStreamingException("unsuppported state!"); } return currentEvent; } /** * Method getProperty. * * @param s * @return Returns Object. * @throws IllegalArgumentException */ public Object getProperty(String s) throws IllegalArgumentException { if (OMConstants.IS_DATA_HANDLERS_AWARE.equals(s)) { return Boolean.TRUE; } if (OMConstants.IS_BINARY.equals(s)) { if (lastNode instanceof OMText) { OMText text = (OMText) lastNode; return new Boolean(text.isBinary()); } return Boolean.FALSE; } else if (OMConstants.DATA_HANDLER.equals(s)) { if (lastNode instanceof OMText) { OMText text = (OMText) lastNode; if (text.isBinary()) return text.getDataHandler(); } } // Per spec, throw IllegalArgumentException if (s == null) { throw new IllegalArgumentException(); } if (parser != null) { return parser.getProperty(s); } // Delegate to the builder's parser. if (builder != null && builder instanceof StAXBuilder) { StAXBuilder staxBuilder = (StAXBuilder) builder; if (!staxBuilder.isClosed()) { // If the parser was closed by something other // than the builder, an IllegalStateException is // thrown. For now, return null as this is unexpected // by the caller. try { return ((StAXBuilder) builder).getReaderProperty(s); } catch (IllegalStateException ise) { return null; } } } return null; } /** * This is a very important method. This keeps the navigator one step ahead and pushes the * navigator one event ahead. If the nextNode is null then navigable is set to false; At the * same time the parser and builder are set up for the upcoming event generation * * @throws XMLStreamException */ private void updateLastNode() throws XMLStreamException { lastNode = currentNode; currentNode = nextNode; try { updateNextNode(); } catch (Exception e) { throw new XMLStreamException(e); } } /** Method updateNextNode. */ private void updateNextNode() { if (navigator.isNavigable()) { nextNode = navigator.next(); } else { if (!switchingAllowed) { if (navigator.isCompleted()) { nextNode = null; } else { builder.next(); navigator.step(); nextNode = navigator.next(); } } else { // reset caching (the default is ON so it was not needed in the // earlier case! builder.setCache(false); state = SWITCH_AT_NEXT; } } } /** Method updateCompleteStatus. */ private void updateCompleteStatus() { if (state == NAVIGABLE) { if (rootNode == currentNode) { if (isFirst) { isFirst = false; } else { state = COMPLETED; } } } else { state = (currentEvent == END_DOCUMENT) ? DOCUMENT_COMPLETE : state; } } /** * Method getNamespaceContext. * * @return Returns NamespaceContext. */ public NamespaceContext getNamespaceContext() { throw new UnsupportedOperationException(); } /** * Method getEncoding. * * @return Returns String. */ public String getEncoding() { return null; } /** * Method getLocation. * * @return Returns Location. */ public Location getLocation() { return new EmptyOMLocation(); } /** * Method getVersion. * * @return Returns String. */ public String getVersion() { return "1.0"; // todo put the constant } /** * Method isStandalone. * * @return Returns boolean. */ public boolean isStandalone() { return true; } /** * Method standaloneSet. * * @return Returns boolean. */ public boolean standaloneSet() { return false; } /** * Method getCharacterEncodingScheme. * * @return Returns String. */ public String getCharacterEncodingScheme() { return "utf-8"; } /** * Method getPITarget. * * @return Returns String. */ public String getPITarget() { throw new UnsupportedOperationException(); } /** * Method getPIData. * * @return Returns String. */ public String getPIData() { throw new UnsupportedOperationException(); } /* * * ################################################################ * Generator methods for the OMNodes returned by the navigator * ################################################################ * */ /** * Method generateEvents * * @param node * @return Returns int. */ private int generateEvents(OMNode node) { int returnEvent = 0; int nodeType = node.getType(); switch (nodeType) { case OMNode.ELEMENT_NODE: OMElement element = (OMElement) node; returnEvent = generateElementEvents(element); break; case OMNode.TEXT_NODE: returnEvent = generateTextEvents(); break; case OMNode.COMMENT_NODE: returnEvent = generateCommentEvents(); break; case OMNode.CDATA_SECTION_NODE: returnEvent = generateCdataEvents(); break; default: break; // just ignore any other nodes } return returnEvent; } /** * Method generateElementEvents. * * @param elt * @return Returns int. */ private int generateElementEvents(OMElement elt) { int returnValue = START_ELEMENT; if (!elementStack.isEmpty() && elementStack.peek().equals(elt)) { returnValue = END_ELEMENT; elementStack.pop(); } else { elementStack.push(elt); } return returnValue; } /** * Method generateTextEvents. * * @return Returns int. * @noinspection SameReturnValue */ private int generateTextEvents() { return CHARACTERS; } /** * Method generateCommentEvents. * * @return Returns int. * @noinspection SameReturnValue */ private int generateCommentEvents() { return COMMENT; } /** * Method generateCdataEvents. * * @return Returns int. */ private int generateCdataEvents() { return CDATA; } /* * #################################################################### * Other helper methods * #################################################################### */ /** * helper method. * * @param it * @return Returns int. */ private int getCount(Iterator it) { int count = 0; if (it != null) { while (it.hasNext()) { it.next(); count++; } } return count; } /** * Helper method. * * @param it * @param index * @return Returns Object. */ private Object getItemFromIterator(Iterator it, int index) { int count = 0; Object returnObject = null; boolean found = false; if (it != null) { while (it.hasNext()) { returnObject = it.next(); if (index == count++) { found = true; break; } } } if (found) { return returnObject; } else { return null; } } /** * Helper method. * * @param element * @return Returns QName. */ private QName getQName(OMElement element) { QName returnName; OMNamespace ns = element.getNamespace(); String localPart = element.getLocalName(); if (ns != null) { String prefix = ns.getPrefix(); String uri = ns.getNamespaceURI(); if ((prefix == null) || prefix.equals("")) { returnName = new QName(uri, localPart); } else { returnName = new QName(uri, localPart, prefix); } } else { returnName = new QName(localPart); } return returnName; } /** * @param elt * @param index * @return Returns OMAttribute. */ private OMAttribute getAttribute(OMElement elt, int index) { OMAttribute returnAttrib = null; if (elt != null) { returnAttrib = (OMAttribute) getItemFromIterator(elt .getAllAttributes(), index); } return returnAttrib; } public void setParser(XMLStreamReader parser) { this.parser = parser; } public DataHandler getDataHandler(String blobcid) { DataHandler dh = null; if (builder != null && builder instanceof OMAttachmentAccessor) { dh = ((OMAttachmentAccessor) builder).getDataHandler(blobcid); } return dh; } public boolean isInlineMTOM() { return inlineMTOM; } public void setInlineMTOM(boolean value) { if (value == true) { throw new OMException("setInlineMTOM(true) is not supported"); } } } axiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ElementImpl.java0000644000000000000000000014420211131637472027701 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.dom; import org.apache.axiom.om.OMAttribute; import org.apache.axiom.om.OMConstants; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMException; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMNode; import org.apache.axiom.om.OMText; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.om.impl.OMNodeEx; import org.apache.axiom.om.impl.dom.factory.OMDOMFactory; import org.apache.axiom.om.impl.traverse.OMChildElementIterator; import org.apache.axiom.om.impl.traverse.OMDescendantsIterator; import org.apache.axiom.om.impl.traverse.OMQNameFilterIterator; import org.apache.axiom.om.impl.traverse.OMQualifiedNameFilterIterator; import org.apache.axiom.om.impl.util.EmptyIterator; import org.apache.axiom.om.impl.util.OMSerializerUtil; import org.apache.axiom.om.util.ElementHelper; import org.w3c.dom.Attr; import org.w3c.dom.DOMException; import org.w3c.dom.Element; import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import org.w3c.dom.TypeInfo; import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamConstants; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import javax.xml.stream.XMLStreamWriter; import java.io.ByteArrayOutputStream; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; /** Implementation of the org.w3c.dom.Element and org.apache.axiom.om.Element interfaces. */ public class ElementImpl extends ParentNode implements Element, OMElement, OMConstants { private int lineNumber; protected OMNamespace namespace; protected String localName; private AttributeMap attributes; private HashMap namespaces; private static final EmptyIterator EMPTY_ITERATOR = new EmptyIterator(); /** @param ownerDocument */ public ElementImpl(DocumentImpl ownerDocument, String tagName, OMFactory factory) { super(ownerDocument, factory); this.localName = tagName; this.attributes = new AttributeMap(this); this.done = true; } /** * Creates a new element with the namespace. * * @param ownerDocument * @param tagName * @param ns */ public ElementImpl(DocumentImpl ownerDocument, String tagName, NamespaceImpl ns, OMFactory factory) { super(ownerDocument, factory); this.localName = tagName; this.namespace = ns; this.declareNamespace(ns); this.attributes = new AttributeMap(this); this.done = true; } public ElementImpl(DocumentImpl ownerDocument, String tagName, NamespaceImpl ns, OMXMLParserWrapper builder, OMFactory factory) { super(ownerDocument, factory); this.localName = tagName; this.namespace = ns; this.builder = builder; this.declareNamespace(ns); this.attributes = new AttributeMap(this); } public ElementImpl(ParentNode parentNode, String tagName, NamespaceImpl ns, OMFactory factory) { this((DocumentImpl) parentNode.getOwnerDocument(), tagName, ns, factory); parentNode.addChild(this); this.done = true; } public ElementImpl(ParentNode parentNode, String tagName, NamespaceImpl ns, OMXMLParserWrapper builder, OMFactory factory) { this(tagName, ns, builder, factory); if (parentNode != null) { this.ownerNode = (DocumentImpl) parentNode.getOwnerDocument(); this.isOwned(true); parentNode.addChild(this); } } public ElementImpl(String tagName, NamespaceImpl ns, OMXMLParserWrapper builder, OMFactory factory) { this(factory); this.localName = tagName; this.namespace = ns; this.builder = builder; if (ns != null) { this.declareNamespace(ns); } this.attributes = new AttributeMap(this); } public ElementImpl(OMFactory factory) { super(factory); this.ownerNode = ((OMDOMFactory) factory).getDocument(); } // / // /org.w3c.dom.Node methods // / /* * (non-Javadoc) * * @see org.w3c.dom.Node#getNodeType() */ public short getNodeType() { return Node.ELEMENT_NODE; } /* * (non-Javadoc) * * @see org.w3c.dom.Node#getNodeName() */ public String getNodeName() { if (this.namespace != null) { if (this.namespace.getPrefix() == null || "".equals(this.namespace.getPrefix())) { return this.localName; } else { return this.namespace.getPrefix() + ":" + this.localName; } } else { return this.localName; } } /** Returns the value of the namespace URI. */ public String getNamespaceURI() { if (this.namespace == null) { return null; } else { // If the element has no namespace, the result should be null, not // an empty string. String uri = this.namespace.getNamespaceURI(); return uri.length() == 0 ? null : uri.intern(); } } // / // /org.apache.axiom.om.OMNode methods // / /* * (non-Javadoc) * * @see org.apache.axiom.om.OMNode#getType() */ public int getType() throws OMException { return OMNode.ELEMENT_NODE; } /* * (non-Javadoc) * * @see org.apache.axiom.om.OMNode#setType(int) */ public void setType(int nodeType) throws OMException { // Do nothing ... // This is an Eement Node... } // / // / org.w3c.dom.Element methods // / /* * (non-Javadoc) * * @see org.w3c.dom.Element#getTagName() */ public String getTagName() { return this.getNodeName(); } /** * Removes an attribute by name. * * @param name The name of the attribute to remove * @see org.w3c.dom.Element#removeAttribute(String) */ public void removeAttribute(String name) throws DOMException { if (this.isReadonly()) { String msg = DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "NO_MODIFICATION_ALLOWED_ERR", null); throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, msg); } if (name.startsWith(OMConstants.XMLNS_NS_PREFIX)) { String namespacePrefix = DOMUtil.getLocalName(name); if (this.findNamespaceURI(namespacePrefix) != null) { this.removeNamespace(namespacePrefix); } } if (this.attributes != null) { this.attributes.removeNamedItem(name); } } /* * (non-Javadoc) * * @see org.w3c.dom.Element#removeAttributeNS(java.lang.String, * java.lang.String) */ public void removeAttributeNS(String namespaceURI, String localName) throws DOMException { if (this.isReadonly()) { String msg = DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "NO_MODIFICATION_ALLOWED_ERR", null); throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, msg); } if (OMConstants.XMLNS_NS_URI.equals(namespaceURI)) { //look in the ns list if (this.namespaces != null) { this.namespaces.remove(DOMUtil.getLocalName(localName)); } } else if (this.attributes != null) { this.attributes.removeNamedItemNS(namespaceURI, localName); } } /** * Removes the specified attribute node. * * @see org.w3c.dom.Element#removeAttributeNode(org.w3c.dom.Attr) */ public Attr removeAttributeNode(Attr oldAttr) throws DOMException { if (isReadonly()) { String msg = DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "NO_MODIFICATION_ALLOWED_ERR", null); throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, msg); } if (this.attributes == null || this.attributes.getNamedItem(oldAttr.getName()) == null) { String msg = DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "NOT_FOUND_ERR", null); throw new DOMException(DOMException.NOT_FOUND_ERR, msg); } return (AttrImpl) this.attributes.removeNamedItem(oldAttr .getName()); } /* * (non-Javadoc) * * @see org.w3c.dom.Element#hasAttribute(java.lang.String) */ public boolean hasAttribute(String name) { return this.getAttributeNode(name) != null; } /** * Returns whether the given attribute is available or not. * * @see org.w3c.dom.Element#hasAttributeNS(String, String) */ public boolean hasAttributeNS(String namespaceURI, String localName) { return this.getAttributeNodeNS(namespaceURI, localName) != null; } /** * Looks in the local list of attributes and returns if found. If the local list is null, * returns "". * * @see org.w3c.dom.Element#getAttribute(String) */ public String getAttribute(String name) { if (attributes == null) { return ""; } else { Attr attr = ((Attr) attributes.getNamedItem(name)); return (attr != null) ? attr.getValue() : ""; } } /** * Retrieves an attribute node by name. * * @see org.w3c.dom.Element#getAttributeNode(String) */ public Attr getAttributeNode(String name) { return (this.attributes == null) ? null : (AttrImpl) this.attributes .getNamedItem(name); } /** * Retrieves an attribute value by local name and namespace URI. * * @see org.w3c.dom.Element#getAttributeNS(String, String) */ public String getAttributeNS(String namespaceURI, String localName) { if (this.attributes == null) { return ""; } Attr attributeNodeNS = this.getAttributeNodeNS(namespaceURI, localName); return attributeNodeNS == null ? "" : attributeNodeNS.getValue(); } /** * Retrieves an attribute node by local name and namespace URI. * * @see org.w3c.dom.Element#getAttributeNodeNS(String, String) */ public Attr getAttributeNodeNS(String namespaceURI, String localName) { if (OMConstants.XMLNS_NS_URI.equals(namespaceURI)) { OMNamespace ns = this.findNamespaceURI(localName); String nsuri = ns != null ? ns.getNamespaceURI() : ""; AttrImpl namespaceAttr = new AttrImpl(this.ownerNode, localName, nsuri, this.factory); NamespaceImpl xmlNs = new NamespaceImpl(OMConstants.XMLNS_NS_URI); namespaceAttr.setOMNamespace(xmlNs); return namespaceAttr; } return (this.attributes == null) ? null : (Attr) this.attributes .getNamedItemNS(namespaceURI, localName); } /** * Adds a new attribute node. * * @see org.w3c.dom.Element#setAttributeNode(org.w3c.dom.Attr) */ public Attr setAttributeNode(Attr attr) throws DOMException { AttrImpl attrImpl = (AttrImpl) attr; if (attrImpl.isOwned()) {// check for ownership if (!this.getOwnerDocument().equals(attr.getOwnerDocument())) { String msg = DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "WRONG_DOCUMENT_ERR", null); throw new DOMException(DOMException.WRONG_DOCUMENT_ERR, msg); } } if (this.isReadonly()) { String msg = DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "NO_MODIFICATION_ALLOWED_ERR", null); throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, msg); } // check whether the attr is in use if (attrImpl.isUsed()) { String msg = DOMMessageFormatter .formatMessage(DOMMessageFormatter.DOM_DOMAIN, "INUSE_ATTRIBUTE_ERR", null); throw new DOMException(DOMException.INUSE_ATTRIBUTE_ERR, msg); } if (attr.getNodeName().startsWith(OMConstants.XMLNS_NS_PREFIX + ":")) { // This is a ns declaration this.declareNamespace(attr.getNodeValue(), DOMUtil .getLocalName(attr.getName())); //Don't add this to attr list, since its a namespace return attr; } else if (attr.getNodeName().equals(OMConstants.XMLNS_NS_PREFIX)) { this.declareDefaultNamespace(attr.getValue()); //Don't add this to attr list, since its a namespace return attr; } if (this.attributes == null) { this.attributes = new AttributeMap(this); } return (Attr) this.attributes.setNamedItem(attr); } /* * (non-Javadoc) * * @see org.w3c.dom.Element#setAttribute(java.lang.String, java.lang.String) */ public void setAttribute(String name, String value) throws DOMException { // Check for invalid charaters if (!DOMUtil.isQualifiedName(name)) { String msg = DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "INVALID_CHARACTER_ERR", null); throw new DOMException(DOMException.INVALID_CHARACTER_ERR, msg); } if (name.startsWith(OMConstants.XMLNS_NS_PREFIX + ":")) { // This is a ns declaration this.declareNamespace(value, DOMUtil.getLocalName(name)); } else if (name.equals(OMConstants.XMLNS_NS_PREFIX)) { this.declareDefaultNamespace(value); } else { this.setAttributeNode(new AttrImpl(this.ownerNode, name, value, this.factory)); } } /* * (non-Javadoc) * * @see org.w3c.dom.Element#setAttributeNodeNS(org.w3c.dom.Attr) */ public Attr setAttributeNodeNS(Attr attr) throws DOMException { // Check whether the attr is a namespace declaration // if so add a namespace NOT an attribute if (attr.getNamespaceURI() != null && attr.getNamespaceURI().equals(OMConstants.XMLNS_NS_URI)) { this.declareNamespace(attr.getName(), attr.getValue()); return attr; } else { AttrImpl attrImpl = (AttrImpl) attr; if (attrImpl.isOwned()) {// check for ownership if (!this.getOwnerDocument().equals(attr.getOwnerDocument())) { String msg = DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "WRONG_DOCUMENT_ERR", null); throw new DOMException(DOMException.WRONG_DOCUMENT_ERR, msg); } } if (this.isReadonly()) { String msg = DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "NO_MODIFICATION_ALLOWED_ERR", null); throw new DOMException( DOMException.NO_MODIFICATION_ALLOWED_ERR, msg); } // check whether the attr is in use if (attrImpl.isUsed()) { String msg = DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "INUSE_ATTRIBUTE_ERR", null); throw new DOMException(DOMException.INUSE_ATTRIBUTE_ERR, msg); } if (this.attributes == null) { this.attributes = new AttributeMap(this); } // handle the namespaces if (attr.getNamespaceURI() != null && findNamespace(attr.getNamespaceURI(), attr.getPrefix()) == null) { // TODO checkwhether the same ns is declared with a different // prefix and remove it this.declareNamespace(new NamespaceImpl(attr.getNamespaceURI(), attr.getPrefix())); } return (Attr) this.attributes.setNamedItemNS(attr); } } /** * Adds a new attribute. * * @see org.w3c.dom.Element#setAttributeNS(String, String, String) */ public void setAttributeNS(String namespaceURI, String qualifiedName, String value) throws DOMException { if (namespaceURI != null && !"".equals(namespaceURI)) { if (namespaceURI.equals(OMConstants.XMLNS_NS_URI)) { this.declareNamespace(value, DOMUtil .getLocalName(qualifiedName)); } else { AttrImpl attr = new AttrImpl(this.ownerNode, DOMUtil .getLocalName(qualifiedName), value, this.factory); attr.setOMNamespace(new NamespaceImpl(namespaceURI, DOMUtil .getPrefix(qualifiedName))); this.setAttributeNodeNS(attr); } } else { // When the namespace is null, the attr name given better not be // a qualified name // But anyway check and set it this.setAttribute(DOMUtil.getLocalName(qualifiedName), value); } } private OMAttribute addAttribute(String namespaceURI, String qualifiedName, String value) throws DOMException { if (!DOMUtil.isQualifiedName(qualifiedName)) { String msg = DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "INVALID_CHARACTER_ERR", null); throw new DOMException(DOMException.INVALID_CHARACTER_ERR, msg); } if (this.isReadonly()) { String msg = DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "NO_MODIFICATION_ALLOWED_ERR", null); throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, msg); } if (this.attributes == null) { this.attributes = new AttributeMap(this); } if (namespaceURI != null) { if (!DOMUtil.isValidNamespace(namespaceURI, qualifiedName)) { String msg = DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "NAMESPACE_ERR", null); throw new DOMException(DOMException.NAMESPACE_ERR, msg); } // Check whether there's an existing Attr with same local name and // namespace URI Attr attributeNode = this.getAttributeNodeNS(namespaceURI, DOMUtil .getLocalName(qualifiedName)); if (attributeNode != null) { AttrImpl tempAttr = ((AttrImpl) attributeNode); tempAttr.setOMNamespace(new NamespaceImpl(namespaceURI, DOMUtil .getPrefix(qualifiedName))); tempAttr.setAttributeValue(value); this.attributes.setNamedItem(tempAttr); return tempAttr; } else { NamespaceImpl ns = new NamespaceImpl(namespaceURI, DOMUtil .getPrefix(qualifiedName)); AttrImpl attr = new AttrImpl((DocumentImpl) this .getOwnerDocument(), DOMUtil .getLocalName(qualifiedName), ns, value, this.factory); this.attributes.setNamedItem(attr); return attr; } } else { Attr attributeNode = this.getAttributeNode(qualifiedName); if (attributeNode != null) { AttrImpl tempAttr = ((AttrImpl) attributeNode); tempAttr.setAttributeValue(value); this.attributes.setNamedItem(tempAttr); return tempAttr; } else { AttrImpl attr = new AttrImpl((DocumentImpl) this .getOwnerDocument(), qualifiedName, value, this.factory); this.attributes.setNamedItem(attr); return attr; } } } /** Returns whether this element contains any attribute or not. */ public boolean hasAttributes() { boolean flag; // TODO : Review. This code doesn't make any sense since it always gets overwritten. WTF? // if (this.attributes != null) { // flag = (this.attributes.getLength() > 0); // } //The namespaces flag = this.namespace != null; if (!flag) { if (this.namespaces != null) { flag = !this.namespaces.isEmpty(); } } return flag; } /* * (non-Javadoc) * * @see org.w3c.dom.Element#getElementsByTagNameNS(java.lang.String, * java.lang.String) */ public NodeList getElementsByTagNameNS(String namespaceURI, String localName) { final QName qname = new QName(namespaceURI, localName); return new NodeListImpl() { protected Iterator getIterator() { return new OMQNameFilterIterator( new OMDescendantsIterator(getFirstOMChild()), qname); } }; } /* * (non-Javadoc) * * @see org.w3c.dom.Element#getElementsByTagName(java.lang.String) */ public NodeList getElementsByTagName(final String name) { if (name.equals("*")) { return new NodeListImpl() { protected Iterator getIterator() { return new OMDescendantsIterator(getFirstOMChild()); } }; } else { return new NodeListImpl() { protected Iterator getIterator() { return new OMQualifiedNameFilterIterator( new OMDescendantsIterator(getFirstOMChild()), name); } }; } } // / // /OmElement methods // / /** @see org.apache.axiom.om.OMElement#addAttribute (org.apache.axiom.om.OMAttribute) */ public OMAttribute addAttribute(OMAttribute attr) { OMNamespace namespace = attr.getNamespace(); if (namespace != null && namespace.getNamespaceURI() != null && !"".equals(namespace.getNamespaceURI()) && this.findNamespace(namespace.getNamespaceURI(), namespace .getPrefix()) == null) { this.declareNamespace(namespace.getNamespaceURI(), namespace.getPrefix()); } if (attr.getNamespace() != null) { // If the attr has a namespace return (AttrImpl) this.setAttributeNode((Attr) attr); } else { return (AttrImpl) this.setAttributeNodeNS((Attr) attr); } } /** * The behaviour of this is the same as org.w3c.dom.Element#setAttributeNS * * @see org.apache.axiom.om.OMElement#addAttribute(String, String, org.apache.axiom.om.OMNamespace) */ public OMAttribute addAttribute(String attributeName, String value, OMNamespace ns) { if (ns != null && findNamespace(ns.getNamespaceURI(), ns.getPrefix()) != null) { declareNamespace(ns); } if (ns != null) { return this.addAttribute(ns.getNamespaceURI(), ns.getPrefix() + ":" + attributeName, value); } else { return this.addAttribute(null, attributeName, value); } } /** * Allows overriding an existing declaration if the same prefix was used. * * @see org.apache.axiom.om.OMElement#declareNamespace (org.apache.axiom.om.OMNamespace) */ public OMNamespace declareNamespace(OMNamespace namespace) { if (namespaces == null) { this.namespaces = new HashMap(5); } if (namespace != null) { String prefix = namespace.getPrefix(); if ("".equals(prefix)) { namespace = declareDefaultNamespace(namespace.getNamespaceURI()); } else if (prefix == null) { prefix = OMSerializerUtil.getNextNSPrefix(); namespace = new NamespaceImpl(namespace.getNamespaceURI(), prefix); } if (!namespace.getPrefix().startsWith(OMConstants.XMLNS_NS_PREFIX)) { namespaces.put(namespace.getPrefix(), namespace); } } return namespace; } /** * Allows overriding an existing declaration if the same prefix was used. * * @see org.apache.axiom.om.OMElement#declareNamespace(String, String) */ public OMNamespace declareNamespace(String uri, String prefix) { if (prefix == null) { prefix = OMSerializerUtil.getNextNSPrefix(); } NamespaceImpl ns = new NamespaceImpl(uri, prefix); return declareNamespace(ns); } /** * We use "" to store the default namespace of this element. As one can see user can not give "" * as the prefix, when he declare a usual namespace. * * @param uri */ public OMNamespace declareDefaultNamespace(String uri) { NamespaceImpl ns = new NamespaceImpl(uri, ""); if (namespaces == null) { this.namespaces = new HashMap(5); } namespaces.put("", ns); return ns; } public OMNamespace getDefaultNamespace() { if (namespaces != null) { NamespaceImpl defaultNS = (NamespaceImpl) namespaces.get(""); if (defaultNS != null) { return defaultNS; } } if (parentNode instanceof ElementImpl) { ElementImpl element = (ElementImpl) parentNode; element.getDefaultNamespace(); } return null; } /** @see org.apache.axiom.om.OMElement#findNamespace(String, String) */ public OMNamespace findNamespace(String uri, String prefix) { // check in the current element OMNamespace namespace = findDeclaredNamespace(uri, prefix); if (namespace != null) { return namespace; } // go up to check with ancestors if (this.parentNode != null) { // For the OMDocumentImpl there won't be any explicit namespace // declarations, so going up the parent chain till the document // element should be enough. if (parentNode instanceof OMElement) { namespace = ((ElementImpl) parentNode).findNamespace(uri, prefix); } } if (namespace == null && uri != null && prefix != null && prefix.equals(OMConstants.XMLNS_PREFIX) && uri.equals(OMConstants.XMLNS_URI)) { declareNamespace(OMConstants.XMLNS_URI, OMConstants.XMLNS_PREFIX); namespace = findNamespace(uri, prefix); } return namespace; } public OMNamespace findNamespaceURI(String prefix) { OMNamespace ns = this.namespaces == null ? null : (OMNamespace) this.namespaces.get(prefix); if (ns == null && this.parentNode instanceof OMElement) { // try with the parent ns = ((OMElement) this.parentNode).findNamespaceURI(prefix); } return ns; } /** * Checks for the namespace only in the current Element. This can also be used to * retrieve the prefix of a known namespace URI. */ private OMNamespace findDeclaredNamespace(String uri, String prefix) { if (uri == null) { return namespaces == null ? null : (OMNamespace)namespaces.get(prefix); } // If the prefix is available and uri is available and its the xml // namespace if (prefix != null && prefix.equals(OMConstants.XMLNS_PREFIX) && uri.equals(OMConstants.XMLNS_URI)) { return new NamespaceImpl(uri, prefix); } if (namespaces == null) { return null; } if (prefix == null || "".equals(prefix)) { Iterator namespaceListIterator = namespaces.values().iterator(); while (namespaceListIterator.hasNext()) { OMNamespace omNamespace = (OMNamespace) namespaceListIterator.next(); String nsURI = omNamespace.getNamespaceURI(); if (nsURI != null && nsURI.equals(uri)) { return omNamespace; } } } else { OMNamespace namespace = (OMNamespace) namespaces.get(prefix); if (namespace != null && uri.equals(namespace.getNamespaceURI())) { return namespace; } } return null; } /** * Returns a named attribute if present. * * @see org.apache.axiom.om.OMElement#getAttribute (javax.xml.namespace.QName) */ public OMAttribute getAttribute(QName qname) { if (this.attributes == null) { return null; } if (qname.getNamespaceURI() == null || qname.getNamespaceURI().equals("")) { return (AttrImpl) this.getAttributeNode(qname.getLocalPart()); } else { return (AttrImpl) this.getAttributeNodeNS(qname.getNamespaceURI(), qname.getLocalPart()); } } /** * Returns a named attribute's value, if present. * * @param qname the qualified name to search for * @return Returns a String containing the attribute value, or null. */ public String getAttributeValue(QName qname) { OMAttribute attr = getAttribute(qname); return (attr == null) ? null : attr.getAttributeValue(); } /* * (non-Javadoc) * * @see org.apache.axiom.om.OMElement#getBuilder() */ public OMXMLParserWrapper getBuilder() { return this.builder; } /** * Returns the first Element node. * * @see org.apache.axiom.om.OMElement#getFirstElement() */ public OMElement getFirstElement() { OMNode node = getFirstOMChild(); while (node != null) { if (node.getType() == Node.ELEMENT_NODE) { return (OMElement) node; } else { node = node.getNextOMSibling(); } } return null; } /** * Returns the namespace of this element. * * @see org.apache.axiom.om.OMElement#getNamespace() */ public OMNamespace getNamespace() throws OMException { return namespace != null ? namespace : getDefaultNamespace(); } /** * Returns the QName of this element. * * @see org.apache.axiom.om.OMElement#getQName() */ public QName getQName() { QName qName; if (namespace != null) { if (namespace.getPrefix() != null) { qName = new QName(namespace.getNamespaceURI(), this.localName, namespace.getPrefix()); } else { qName = new QName(namespace.getNamespaceURI(), this.localName); } } else { qName = new QName(this.localName); } return qName; } /** * Gets all the text children and concatinates them to a single string. * * @see org.apache.axiom.om.OMElement#getText() */ public String getText() { String childText = ""; OMNode child = this.getFirstOMChild(); OMText textNode; while (child != null) { final int type = child.getType(); if (type == OMNode.TEXT_NODE || type == OMNode.CDATA_SECTION_NODE) { textNode = (OMText) child; if (textNode.getText() != null && !"".equals(textNode.getText())) { childText += textNode.getText(); } } child = child.getNextOMSibling(); } return childText; } public QName getTextAsQName() { String childText = getTrimmedText(); if (childText != null) { return resolveQName(childText); } return null; } public String getTrimmedText() { String childText = null; OMNode child = this.getFirstOMChild(); OMText textNode; while (child != null) { if (child.getType() == OMNode.TEXT_NODE) { textNode = (OMText) child; String textValue = textNode.getText(); if (textValue != null && !"".equals(textValue.trim())) { if (childText == null) childText = ""; childText += textValue.trim(); } } child = child.getNextOMSibling(); } return childText; } /** * Removes an attribute from the element. * * @see org.apache.axiom.om.OMElement#removeAttribute (org.apache.axiom.om.OMAttribute) */ public void removeAttribute(OMAttribute attr) { this.removeAttributeNode((AttrImpl) attr); } /** * Sets the OM builder. * * @see org.apache.axiom.om.OMElement#setBuilder (org.apache.axiom.om.OMXMLParserWrapper) */ public void setBuilder(OMXMLParserWrapper wrapper) { this.builder = wrapper; } /** * Sets the local name. * * @see org.apache.axiom.om.OMElement#setLocalName(String) */ public void setLocalName(String localName) { this.localName = localName; } /** * Sets the namespace. * * @see org.apache.axiom.om.OMElement#setNamespace (org.apache.axiom.om.OMNamespace) */ public void setNamespace(OMNamespace namespace) { this.namespace = namespace; } public void setNamespaceWithNoFindInCurrentScope(OMNamespace namespace) { this.namespace = namespace; } /** * Creates a text node with the given value and adds it to the element. * * @see org.apache.axiom.om.OMElement#setText(String) */ public void setText(String text) { if (this.isReadonly()) { String msg = DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "NO_MODIFICATION_ALLOWED_ERR", null); throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, msg); } // if we already have other text nodes remove them OMNode child = this.getFirstOMChild(); while (child != null) { if (child.getType() == OMNode.TEXT_NODE) { child.detach(); } child = child.getNextOMSibling(); } TextImpl textNode = (TextImpl) (this.ownerNode) .createTextNode(text); this.addChild(textNode); } public void setText(QName text) { throw new UnsupportedOperationException(); } public void internalSerialize(XMLStreamWriter writer) throws XMLStreamException { internalSerialize(writer, true); } public void internalSerializeAndConsume(XMLStreamWriter writer) throws XMLStreamException { this.internalSerialize(writer, false); } protected void internalSerialize(XMLStreamWriter writer, boolean cache) throws XMLStreamException { if (!cache) { // in this case we don't care whether the elements are built or not // we just call the serializeAndConsume methods OMSerializerUtil.serializeStartpart(this, writer); // serilize children Iterator children = this.getChildren(); while (children.hasNext()) { ((OMNodeEx) children.next()).internalSerialize(writer); } OMSerializerUtil.serializeEndpart(writer); } else { // Now the caching is supposed to be off. However caching been // switched off // has nothing to do if the element is already built! if (this.done) { OMSerializerUtil.serializeStartpart(this, writer); ChildNode child = this.firstChild; while (child != null && ((!(child instanceof OMElement)) || child .isComplete())) { child.internalSerializeAndConsume(writer); child = child.nextSibling; } if (child != null) { OMElement element = (OMElement) child; element.getBuilder().setCache(false); OMSerializerUtil.serializeByPullStream(element, writer, cache); } OMSerializerUtil.serializeEndpart(writer); } else { // take the XMLStream reader and feed it to the stream // serilizer. // todo is this right ????? OMSerializerUtil.serializeByPullStream(this, writer, cache); } } } /* * (non-Javadoc) * * @see org.apache.axiom.om.OMElement#getXMLStreamReaderWithoutCaching() */ public XMLStreamReader getXMLStreamReaderWithoutCaching() { return getXMLStreamReader(false); } /* * (non-Javadoc) * * @see org.apache.axiom.om.OMElement#getXMLStreamReader() */ public XMLStreamReader getXMLStreamReader() { return getXMLStreamReader(true); } /** * getXMLStreamReader * * @return Returns reader. */ private XMLStreamReader getXMLStreamReader(boolean cache) { if ((builder == null) && !cache) { throw new UnsupportedOperationException( "This element was not created in a manner to be switched"); } if (builder != null && builder.isCompleted() && !cache) { throw new UnsupportedOperationException( "The parser is already consumed!"); } return new DOMStAXWrapper(builder, this, cache); } public String toStringWithConsume() throws XMLStreamException { ByteArrayOutputStream baos = new ByteArrayOutputStream(); this.serializeAndConsume(baos); return new String(baos.toByteArray()); } /** * Overridden toString() for ease of debugging. * * @see Object#toString() */ public String toString() { ByteArrayOutputStream baos = new ByteArrayOutputStream(); try { // this.build(); this.serialize(baos); } catch (XMLStreamException e) { throw new RuntimeException("Can not serialize OM Element " + this.getLocalName(), e); } return new String(baos.toByteArray()); } /* * (non-Javadoc) * * @see org.apache.axiom.om.OMElement#getChildElements() */ public Iterator getChildElements() { return new OMChildElementIterator(getFirstElement()); } /** @see org.apache.axiom.om.OMElement#getAllDeclaredNamespaces() */ public Iterator getAllDeclaredNamespaces() throws OMException { if (namespaces == null) { return EMPTY_ITERATOR; } return namespaces.values().iterator(); } /** @see org.apache.axiom.om.OMElement#getAllAttributes() */ public Iterator getAllAttributes() { if (attributes == null) { return EMPTY_ITERATOR; } ArrayList list = new ArrayList(); for (int i = 0; i < attributes.getLength(); i++) { OMAttribute item = (OMAttribute) attributes.getItem(i); if (item.getNamespace() == null || !(item.getNamespace() != null && OMConstants.XMLNS_NS_URI .equals(item.getNamespace().getNamespaceURI()))) { list.add(item); } } return list.iterator(); } /** * Returns the local name of this element node * * @see org.w3c.dom.Node#getLocalName() */ public String getLocalName() { return this.localName; } /** * Returns the namespace prefix of this element node * * @see org.w3c.dom.Node#getPrefix() */ public String getPrefix() { return (this.namespace == null) ? null : this.namespace.getPrefix(); } /** @see NodeImpl#setOwnerDocument (org.apache.axiom.om.impl.dom.DocumentImpl) */ protected void setOwnerDocument(DocumentImpl document) { this.ownerNode = document; this.isOwned(true); if (document.firstChild == null) { document.firstChild = this; } } /** * Turn a prefix:local qname string into a proper QName, evaluating it in the OMElement context * unprefixed qnames resolve to the local namespace * * @param qname prefixed qname string to resolve * @return Returns null for any failure to extract a qname. */ public QName resolveQName(String qname) { ElementHelper helper = new ElementHelper(this); return helper.resolveQName(qname); } /** * Creates a clone which belongs to a new document. * * @see org.apache.axiom.om.OMElement#cloneOMElement() */ public OMElement cloneOMElement() { return (ElementImpl) this.cloneNode(true); } public void setLineNumber(int lineNumber) { this.lineNumber = lineNumber; } public int getLineNumber() { return lineNumber; } public Node cloneNode(boolean deep) { ElementImpl newnode = (ElementImpl) super.cloneNode(deep); // Replicate NamedNodeMap rather than sharing it. if (attributes != null) { newnode.attributes = (AttributeMap) attributes.cloneMap(newnode); } return newnode; } /** Returns the set of attributes of this node and the namespace declarations available. */ public NamedNodeMap getAttributes() { AttributeMap attributeMap = new AttributeMap(this); // Add the set of existing attrs for (int i = 0; i < this.attributes.getLength(); i++) { attributeMap.addItem((Attr) this.attributes.getItem(i)); } // Add the NS declarations if (this.namespaces != null) { Iterator nsDecls = this.namespaces.keySet().iterator(); while (nsDecls.hasNext()) { String prefix = (String) nsDecls.next(); if (prefix != null && !"".equals(prefix) && !prefix.equals(OMConstants.XMLNS_NS_PREFIX)) { OMNamespace ns = (OMNamespace) this.namespaces.get(prefix); AttrImpl attr = new AttrImpl(this.ownerNode, prefix, ns .getNamespaceURI(), this.factory); attr.setOMNamespace(new NamespaceImpl( OMConstants.XMLNS_NS_URI, OMConstants.XMLNS_NS_PREFIX)); attributeMap.addItem(attr); } } // Set the default NS attr if any if (this.namespace != null && (this.namespace.getPrefix() == null || "" .equals(this.namespace.getPrefix())) && this.namespace.getNamespaceURI() != null) { // check if the parent of this element has the same namespace // as the default and if NOT add the attr boolean parentHasSameDefaultNS = this.parentNode != null && this.parentNode.getNamespaceURI() != null && this.parentNode.getNamespaceURI().equals(this.getNamespaceURI()) && (this.parentNode.getPrefix() == null || this.parentNode.getPrefix().equals("")); if (!parentHasSameDefaultNS) { AttrImpl attr = new AttrImpl(this.ownerNode, "xmlns", this.namespace.getNamespaceURI(), this.factory); attr.setOMNamespace(new NamespaceImpl( OMConstants.XMLNS_NS_URI, OMConstants.XMLNS_NS_PREFIX)); attributeMap.addItem(attr); } } } return attributeMap; } /** * Returns the namespace uri, given the prefix. If it is not found at this element, searches the * parent. * * @param prefix * @return Returns namespace. */ public String getNamespaceURI(String prefix) { OMNamespace ns = this.findNamespaceURI(prefix); return (ns != null) ? ns.getNamespaceURI() : null; } /** * Removes a declared namespace given its prefix. * * @param prefix * @return Returns whether the namespace relevant to the given prefix was removed or not */ public boolean removeNamespace(String prefix) { Object ns = this.namespaces.get(prefix); if (ns != null) { this.namespaces.remove(prefix); return true; } else { return false; } } public OMNode getNextOMSibling() throws OMException { while (!done) { int token = builder.next(); if (token == XMLStreamConstants.END_DOCUMENT) { throw new OMException(); } } return super.getNextOMSibling(); } public void discard() throws OMException { if (done) { this.detach(); } else { builder.discard(this); } } /* * DOM-Level 3 methods */ public void setIdAttribute(String name, boolean isId) throws DOMException { if (this.isReadonly()) { String msg = DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "NO_MODIFICATION_ALLOWED_ERR", null); throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, msg); } //find the attr AttrImpl tempAttr = (AttrImpl) this.getAttributeNode(name); if (tempAttr == null) { String msg = DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "NOT_FOUND_ERR", null); throw new DOMException(DOMException.NOT_FOUND_ERR, msg); } this.updateIsId(isId, tempAttr); } public void setIdAttributeNS(String namespaceURI, String localName, boolean isId) throws DOMException { if (this.isReadonly()) { String msg = DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "NO_MODIFICATION_ALLOWED_ERR", null); throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, msg); } //find the attr AttrImpl tempAttr = (AttrImpl) this.getAttributeNodeNS(namespaceURI, localName); if (tempAttr == null) { String msg = DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "NOT_FOUND_ERR", null); throw new DOMException(DOMException.NOT_FOUND_ERR, msg); } this.updateIsId(isId, tempAttr); } public void setIdAttributeNode(Attr idAttr, boolean isId) throws DOMException { if (this.isReadonly()) { String msg = DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "NO_MODIFICATION_ALLOWED_ERR", null); throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, msg); } //find the attr Iterator attrIter = this.getAllAttributes(); AttrImpl tempAttr = null; while (attrIter.hasNext()) { AttrImpl attr = (AttrImpl) attrIter.next(); if (attr.equals(idAttr)) { tempAttr = attr; break; } } if (tempAttr == null) { String msg = DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "NOT_FOUND_ERR", null); throw new DOMException(DOMException.NOT_FOUND_ERR, msg); } this.updateIsId(isId, tempAttr); } /** * Updates the id state of the attr and notifies the document * * @param isId * @param tempAttr */ private void updateIsId(boolean isId, AttrImpl tempAttr) { tempAttr.isId = isId; if (isId) { this.ownerNode.addIdAttr(tempAttr); } else { this.ownerNode.removeIdAttr(tempAttr); } } public TypeInfo getSchemaTypeInfo() { // TODO TODO throw new UnsupportedOperationException("TODO"); } /* (non-Javadoc) * @see org.apache.axiom.om.OMNode#buildAll() */ public void buildWithAttachments() { if (!done) { this.build(); } Iterator iterator = getChildren(); while (iterator.hasNext()) { OMNode node = (OMNode) iterator.next(); node.buildWithAttachments(); } } } axiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ChildNode.java0000644000000000000000000001603211131637472027316 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.dom; import org.apache.axiom.om.OMContainer; import org.apache.axiom.om.OMException; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMNode; import org.apache.axiom.om.impl.OMNodeEx; import org.w3c.dom.Node; public abstract class ChildNode extends NodeImpl { protected ChildNode previousSibling; protected ChildNode nextSibling; protected ParentNode parentNode; /** @param ownerDocument */ protected ChildNode(DocumentImpl ownerDocument, OMFactory factory) { super(ownerDocument, factory); } protected ChildNode(OMFactory factory) { super(factory); } public OMNode getNextOMSibling() throws OMException { while (nextSibling == null && this.parentNode != null && !this.parentNode.done) { this.parentNode.buildNext(); } return nextSibling; } public Node getNextSibling() { return (Node) this.getNextOMSibling(); } public OMNode getPreviousOMSibling() { return this.previousSibling; } public Node getPreviousSibling() { return this.previousSibling; } // / // /OMNode methods // / public void setNextOMSibling(OMNode node) { if (node == null) { this.nextSibling = null; return; } if (node instanceof ChildNode) { this.nextSibling = (ChildNode) node; } else { throw new OMException("The node is not a " + ChildNode.class); } } public void setPreviousOMSibling(OMNode node) { if (node == null) { this.previousSibling = null; return; } if (node instanceof ChildNode) { this.previousSibling = (ChildNode) node; } else { throw new OMException("The node is not a " + ChildNode.class); } } public OMContainer getParent() throws OMException { return this.parentNode; } public Node getParentNode() { return this.parentNode; } public void setParent(OMContainer element) { if (element instanceof ParentNode) { this.parentNode = (ParentNode) element; } else { throw new OMException("The given parent is not of the type " + ParentNode.class); } } public OMNode detach() throws OMException { if (this.parentNode == null) { throw new OMException("Parent level elements cannot be detached"); } else { if (!done) { build(); } getNextOMSibling(); // Make sure that nextSibling is set correctly if (previousSibling == null) { // This is the first child if (nextSibling != null) { this.parentNode.setFirstChild(nextSibling); } else { this.parentNode.firstChild = null; this.parentNode.lastChild = null; } } else { this.previousSibling.setNextOMSibling(nextSibling); if (nextSibling == null) { this.previousSibling.parentNode.done = true; } } if (this.nextSibling != null) { this.nextSibling.setPreviousOMSibling(this.previousSibling); } if (this.parentNode != null && this.parentNode.lastChild == this) { this.parentNode.lastChild = previousSibling; } this.parentNode = null; } return this; } public void discard() throws OMException { throw new UnsupportedOperationException("Cannot discard this node"); } /** Inserts the given sibling next to this item. */ public void insertSiblingAfter(OMNode sibling) throws OMException { if (this.parentNode != null) { ((OMNodeEx) sibling).setParent(this.parentNode); } else if (this == sibling) { throw new OMException("Inserting self as the sibling is not allowed"); } if (sibling instanceof ChildNode) { ChildNode domSibling = (ChildNode) sibling; domSibling.previousSibling = this; if (this.nextSibling == null) { this.parentNode.setLastChild(sibling); } else { this.nextSibling.previousSibling = domSibling; } domSibling.nextSibling = this.nextSibling; this.nextSibling = domSibling; } else { throw new OMException("The given child is not of type " + ChildNode.class); } } /** Inserts the given sibling before this item. */ public void insertSiblingBefore(OMNode sibling) throws OMException { // ((OMNodeEx)sibling).setParent(this.parentNode); if (this == sibling) { throw new OMException("Inserting self as the sibling is not allowed"); } if (sibling instanceof ChildNode) { // ChildNode domSibling = (ChildNode)sibling; // domSibling.nextSibling = this; // if(this.previousSibling != null) { // this.previousSibling.nextSibling = domSibling; // } // domSibling.previousSibling = this.previousSibling; // this.previousSibling = domSibling; ChildNode siblingImpl = (ChildNode) sibling; siblingImpl.nextSibling = this; if (previousSibling == null) { this.parentNode.setFirstChild(siblingImpl); siblingImpl.previousSibling = null; } else { siblingImpl.setParent(this.parentNode); previousSibling.setNextOMSibling(siblingImpl); siblingImpl.setPreviousOMSibling(previousSibling); } previousSibling = siblingImpl; } else { throw new OMException("The given child is not of type " + ChildNode.class); } } public Node cloneNode(boolean deep) { ChildNode newnode = (ChildNode) super.cloneNode(deep); // Need to break the association w/ original kids newnode.previousSibling = null; newnode.nextSibling = null; newnode.isFirstChild(false); newnode.parentNode = null; return newnode; } } axiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/DOMImplementationImpl.java0000644000000000000000000000452511131637472031640 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.dom; import org.apache.axiom.om.impl.dom.factory.OMDOMFactory; import org.w3c.dom.DOMException; import org.w3c.dom.DOMImplementation; import org.w3c.dom.Document; import org.w3c.dom.DocumentType; public class DOMImplementationImpl implements DOMImplementation { public boolean hasFeature(String feature, String version) { boolean anyVersion = version == null || version.length() == 0; return (feature.equalsIgnoreCase("Core") || feature.equalsIgnoreCase("XML")) && (anyVersion || version.equals("1.0") || version.equals("2.0")); } public Document createDocument(String namespaceURI, String qualifiedName, DocumentType doctype) throws DOMException { // TODO Handle docType stuff OMDOMFactory fac = new OMDOMFactory(); DocumentImpl doc = new DocumentImpl(fac); fac.setDocument(doc); new ElementImpl(doc, DOMUtil.getLocalName(qualifiedName), new NamespaceImpl(namespaceURI, DOMUtil .getPrefix(qualifiedName)), fac); return doc; } public DocumentType createDocumentType(String qualifiedName, String publicId, String systemId) throws DOMException { // TODO throw new UnsupportedOperationException("TODO"); } /* * DOM-Level 3 methods */ public Object getFeature(String arg0, String arg1) { // TODO TODO throw new UnsupportedOperationException("TODO"); } } axiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/OMDOMException.java0000644000000000000000000000245611131637472030224 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.dom; import org.apache.axiom.om.OMException; /** OMDOM specific exception */ public class OMDOMException extends OMException { private static final long serialVersionUID = 8763119035210190906L; public OMDOMException() { super(); } public OMDOMException(String arg0) { super(arg0); } public OMDOMException(Throwable arg0) { super(arg0); } public OMDOMException(String arg0, Throwable arg1) { super(arg0, arg1); } } axiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/DOOMAbstractFactory.java0000644000000000000000000000260511131637472031240 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.dom; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.impl.dom.factory.OMDOMFactory; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.impl.dom.soap11.SOAP11Factory; import org.apache.axiom.soap.impl.dom.soap12.SOAP12Factory; public class DOOMAbstractFactory { public static OMFactory getOMFactory() { return new OMDOMFactory(); } public static SOAPFactory getSOAP11Factory() { return new SOAP11Factory(); } public static SOAPFactory getSOAP12Factory() { return new SOAP12Factory(); } } axiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ParentNode.java0000644000000000000000000006254611131637472027537 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.dom; import org.apache.axiom.om.OMComment; import org.apache.axiom.om.OMDocType; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMException; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMNode; import org.apache.axiom.om.OMProcessingInstruction; import org.apache.axiom.om.OMText; import org.apache.axiom.om.impl.OMContainerEx; import org.apache.axiom.om.impl.OMNodeEx; import org.apache.axiom.om.impl.builder.StAXOMBuilder; import org.apache.axiom.om.impl.dom.factory.OMDOMFactory; import org.apache.axiom.om.impl.traverse.OMChildrenIterator; import org.apache.axiom.om.impl.traverse.OMChildrenLocalNameIterator; import org.apache.axiom.om.impl.traverse.OMChildrenNamespaceIterator; import org.apache.axiom.om.impl.traverse.OMChildrenQNameIterator; import org.w3c.dom.DOMException; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import javax.xml.namespace.QName; import java.util.Iterator; public abstract class ParentNode extends ChildNode implements OMContainerEx { protected ChildNode firstChild; protected ChildNode lastChild; /** @param ownerDocument */ protected ParentNode(DocumentImpl ownerDocument, OMFactory factory) { super(ownerDocument, factory); } protected ParentNode(OMFactory factory) { super(factory); } // / // /OMContainer methods // / public void addChild(OMNode omNode) { if (omNode.getOMFactory() instanceof OMDOMFactory) { Node domNode = (Node) omNode; if (this.ownerNode != null && !domNode.getOwnerDocument().equals(this.ownerNode)) { this.appendChild(this.ownerNode.importNode(domNode, true)); } else { this.appendChild(domNode); } } else { addChild(importNode(omNode)); } } public void buildNext() { if (!this.done) builder.next(); } public Iterator getChildren() { return new OMChildrenIterator(getFirstOMChild()); } /** * Returns an iterator of child nodes having a given qname. * * @see org.apache.axiom.om.OMContainer#getChildrenWithName (javax.xml.namespace.QName) */ public Iterator getChildrenWithName(QName elementQName) throws OMException { return new OMChildrenQNameIterator(getFirstOMChild(), elementQName); } public Iterator getChildrenWithLocalName(String localName) { return new OMChildrenLocalNameIterator(getFirstOMChild(), localName); } public Iterator getChildrenWithNamespaceURI(String uri) { return new OMChildrenNamespaceIterator(getFirstOMChild(), uri); } /** * Returns the first OMElement child node. * * @see org.apache.axiom.om.OMContainer#getFirstChildWithName (javax.xml.namespace.QName) */ public OMElement getFirstChildWithName(QName elementQName) throws OMException { Iterator children = new OMChildrenQNameIterator(getFirstOMChild(), elementQName); while (children.hasNext()) { OMNode node = (OMNode) children.next(); // Return the first OMElement node that is found if (node instanceof OMElement) { return (OMElement) node; } } return null; } public OMNode getFirstOMChild() { while ((firstChild == null) && !done) { buildNext(); } return firstChild; } public void setFirstChild(OMNode omNode) { if (firstChild != null) { ((OMNodeEx) omNode).setParent(this); } this.firstChild = (ChildNode) omNode; } /** * Forcefully set the last child * @param omNode */ public void setLastChild(OMNode omNode) { this.lastChild = (ChildNode) omNode; } // / // /DOM Node methods // / public NodeList getChildNodes() { if (!this.done) { this.build(); } return new NodeListImpl() { protected Iterator getIterator() { return getChildren(); } }; } public Node getFirstChild() { return (Node) this.getFirstOMChild(); } public Node getLastChild() { if (!this.done) { this.build(); } return this.lastChild; } public boolean hasChildNodes() { while ((firstChild == null) && !done) { buildNext(); } return this.firstChild != null; } /** * Inserts newChild before the refChild. If the refChild is null then the newChild is made the * last child. */ public Node insertBefore(Node newChild, Node refChild) throws DOMException { ChildNode newDomChild = (ChildNode) newChild; ChildNode refDomChild = (ChildNode) refChild; if (this == newChild || !isAncestor(newChild)) { throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "HIERARCHY_REQUEST_ERR", null)); } if (newDomChild.parentNode != null && newDomChild.ownerNode == this.ownerNode) { //If the newChild is already in the tree remove it newDomChild.parentNode.removeChild(newDomChild); } if (!(this instanceof Document) && !(this.ownerNode == newDomChild.getOwnerDocument())) { throw new DOMException(DOMException.WRONG_DOCUMENT_ERR, DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "WRONG_DOCUMENT_ERR", null)); } if (this.isReadonly()) { throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "NO_MODIFICATION_ALLOWED_ERR", null)); } if (this instanceof Document) { if (newDomChild instanceof ElementImpl) { if (((DocumentImpl) this).documentElement != null) { // Throw exception since there cannot be two document elements throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "HIERARCHY_REQUEST_ERR", null)); } if (newDomChild.parentNode == null) { newDomChild.parentNode = this; } // set the document element ((DocumentImpl) this).documentElement = (ElementImpl) newDomChild; } else if (!(newDomChild instanceof CommentImpl || newDomChild instanceof ProcessingInstructionImpl || newDomChild instanceof DocumentFragmentImpl)) { // TODO: we should also check for DocumentType, // but since we don't have an implementation yet, we can leave it // like this for now throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "HIERARCHY_REQUEST_ERR", null)); } } boolean compositeChild = newDomChild.nextSibling != null; ChildNode endChild = null; if(compositeChild) { ChildNode tempNextChild = newDomChild.nextSibling; while(tempNextChild != null) { tempNextChild.parentNode = this; endChild = tempNextChild; tempNextChild = tempNextChild.nextSibling; } } if (refChild == null) { // Append the child to the end of the list // if there are no children if (this.lastChild == null && firstChild == null) { if(compositeChild) { this.lastChild = endChild; } else { this.lastChild = newDomChild; } this.firstChild = newDomChild; this.firstChild.isFirstChild(true); newDomChild.setParent(this); } else { this.lastChild.nextSibling = newDomChild; newDomChild.previousSibling = this.lastChild; if(compositeChild) { this.lastChild = endChild; } else { this.lastChild = newDomChild; } this.lastChild.nextSibling = null; } if (newDomChild.parentNode == null) { newDomChild.parentNode = this; } return newChild; } else { Iterator children = this.getChildren(); boolean found = false; while (children.hasNext()) { ChildNode tempNode = (ChildNode) children.next(); if (tempNode.equals(refChild)) { // RefChild found if (this.firstChild == tempNode) { // If the refChild is the // first child if (newChild instanceof DocumentFragmentImpl) { // The new child is a DocumentFragment DocumentFragmentImpl docFrag = (DocumentFragmentImpl) newChild; this.firstChild = docFrag.firstChild; docFrag.lastChild.nextSibling = refDomChild; refDomChild.previousSibling = docFrag.lastChild.nextSibling; } else { // Make the newNode the first Child this.firstChild = newDomChild; newDomChild.nextSibling = refDomChild; refDomChild.previousSibling = newDomChild; this.firstChild.isFirstChild(true); refDomChild.isFirstChild(false); newDomChild.previousSibling = null; // Just to be // sure :-) } } else { // If the refChild is not the fist child ChildNode previousNode = refDomChild.previousSibling; if (newChild instanceof DocumentFragmentImpl) { // the newChild is a document fragment DocumentFragmentImpl docFrag = (DocumentFragmentImpl) newChild; previousNode.nextSibling = docFrag.firstChild; docFrag.firstChild.previousSibling = previousNode; docFrag.lastChild.nextSibling = refDomChild; refDomChild.previousSibling = docFrag.lastChild; } else { previousNode.nextSibling = newDomChild; newDomChild.previousSibling = previousNode; newDomChild.nextSibling = refDomChild; refDomChild.previousSibling = newDomChild; } } found = true; break; } } if (!found) { throw new DOMException(DOMException.NOT_FOUND_ERR, DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "NOT_FOUND_ERR", null)); } if (newDomChild.parentNode == null) { newDomChild.parentNode = this; } return newChild; } } /** Replaces the oldChild with the newChild. */ public Node replaceChild(Node newChild, Node oldChild) throws DOMException { ChildNode newDomChild = (ChildNode) newChild; ChildNode oldDomChild = (ChildNode) oldChild; if (newChild == null) { return this.removeChild(oldChild); } if (this == newChild || !isAncestor(newChild)) { throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "HIERARCHY_REQUEST_ERR", null)); } if (newDomChild != null && //This is the case where this is an Element in the document (this.ownerNode != null && !this.ownerNode.equals(newDomChild.ownerNode)) || //This is the case where this is the Document itself (this.ownerNode == null && !this.equals(newDomChild.ownerNode))) { throw new DOMException(DOMException.WRONG_DOCUMENT_ERR, DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "WRONG_DOCUMENT_ERR", null)); } if (this.isReadonly()) { throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "NO_MODIFICATION_ALLOWED_ERR", null)); } Iterator children = this.getChildren(); boolean found = false; while (children.hasNext()) { ChildNode tempNode = (ChildNode) children.next(); if (tempNode.equals(oldChild)) { if (newChild instanceof DocumentFragmentImpl) { DocumentFragmentImpl docFrag = (DocumentFragmentImpl) newDomChild; ChildNode child = (ChildNode) docFrag.getFirstChild(); this.replaceChild(child, oldChild); //set the parent of all kids to me while(child != null) { child.parentNode = this; child = child.nextSibling; } this.lastChild = (ChildNode)docFrag.getLastChild(); } else { if (this.firstChild == oldDomChild) { if (this.firstChild.nextSibling != null) { this.firstChild.nextSibling.previousSibling = newDomChild; newDomChild.nextSibling = this.firstChild.nextSibling; } //Cleanup the current first child this.firstChild.parentNode = null; this.firstChild.nextSibling = null; //Set the new first child this.firstChild = newDomChild; } else { newDomChild.nextSibling = oldDomChild.nextSibling; newDomChild.previousSibling = oldDomChild.previousSibling; oldDomChild.previousSibling.nextSibling = newDomChild; // If the old child is not the last if (oldDomChild.nextSibling != null) { oldDomChild.nextSibling.previousSibling = newDomChild; } else { this.lastChild = newDomChild; } } newDomChild.parentNode = this; } found = true; // remove the old child's references to this tree oldDomChild.nextSibling = null; oldDomChild.previousSibling = null; oldDomChild.parentNode = null; } } if (!found) throw new DOMException(DOMException.NOT_FOUND_ERR, DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "NOT_FOUND_ERR", null)); return oldChild; } /** Removes the given child from the DOM Tree. */ public Node removeChild(Node oldChild) throws DOMException { // Check if this node is readonly if (this.isReadonly()) { throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "NO_MODIFICATION_ALLOWED_ERR", null)); } // Check if the Child is there Iterator children = this.getChildren(); boolean childFound = false; while (children.hasNext()) { ChildNode tempNode = (ChildNode) children.next(); if (tempNode.equals(oldChild)) { if (this.firstChild == tempNode) { // If this is the first child this.firstChild = null; this.lastChild = null; tempNode.parentNode = null; } else if (this.lastChild == tempNode) { // not the first child, but the last child ChildNode prevSib = tempNode.previousSibling; this.lastChild = prevSib; prevSib.nextSibling = null; tempNode.parentNode = null; tempNode.previousSibling = null; } else { ChildNode oldDomChild = (ChildNode) oldChild; ChildNode privChild = oldDomChild.previousSibling; privChild.nextSibling = oldDomChild.nextSibling; oldDomChild.nextSibling.previousSibling = privChild; // Remove old child's references to this tree oldDomChild.nextSibling = null; oldDomChild.previousSibling = null; } // Child found childFound = true; } } if (!childFound) throw new DOMException(DOMException.NOT_FOUND_ERR, DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "NOT_FOUND_ERR", null)); return oldChild; } private boolean isAncestor(Node newNode) { // TODO isAncestor return true; } public Node cloneNode(boolean deep) { ParentNode newnode = (ParentNode) super.cloneNode(deep); // set owner document newnode.ownerNode = ownerNode; // Need to break the association w/ original kids newnode.firstChild = null; newnode.lastChild = null; // Then, if deep, clone the kids too. if (deep) { for (ChildNode child = firstChild; child != null; child = child.nextSibling) { newnode.appendChild(child.cloneNode(true)); } } return newnode; } /** * This method is intended only to be used by Axiom intenals when merging Objects from different * Axiom implementations to the DOOM implementation. * * @param child */ protected OMNode importNode(OMNode child) { int type = child.getType(); switch (type) { case (OMNode.ELEMENT_NODE): { OMElement childElement = (OMElement) child; OMElement newElement = (new StAXOMBuilder(this.factory, childElement.getXMLStreamReader())) .getDocumentElement(); newElement.build(); return (OMNode) this.ownerNode.importNode((Element) newElement, true); } case (OMNode.TEXT_NODE): { OMText importedText = (OMText) child; OMText newText; if (importedText.isBinary()) { boolean isOptimize = importedText.isOptimized(); newText = this.factory.createOMText(importedText .getDataHandler(), isOptimize); } else if (importedText.isCharacters()) { newText = new TextImpl((DocumentImpl) this.getOwnerDocument(), importedText.getTextCharacters(), this.factory); } else { newText = new TextImpl((DocumentImpl) this.getOwnerDocument(), importedText.getText(), this.factory); } return newText; } case (OMNode.PI_NODE): { OMProcessingInstruction importedPI = (OMProcessingInstruction) child; OMProcessingInstruction newPI = this.factory .createOMProcessingInstruction(this, importedPI.getTarget(), importedPI.getValue()); return newPI; } case (OMNode.COMMENT_NODE): { OMComment importedComment = (OMComment) child; OMComment newComment = this.factory.createOMComment(this, importedComment.getValue()); DocumentImpl doc; if (this instanceof DocumentImpl) { doc = (DocumentImpl) this; } else { doc = (DocumentImpl) ((ParentNode) this).getOwnerDocument(); } newComment = new CommentImpl(doc, importedComment.getValue(), this.factory); return newComment; } case (OMNode.DTD_NODE): { OMDocType importedDocType = (OMDocType) child; OMDocType newDocType = this.factory.createOMDocType(this, importedDocType.getValue()); return newDocType; } default: { throw new UnsupportedOperationException( "Not Implemented Yet for the given node type"); } } } public String getTextContent() throws DOMException { Node child = getFirstChild(); if (child != null) { Node next = child.getNextSibling(); if (next == null) { return hasTextContent(child) ? ((NodeImpl)child).getTextContent() : ""; } StringBuffer buf = new StringBuffer(); getTextContent(buf); return buf.toString(); } else { return ""; } } void getTextContent(StringBuffer buf) throws DOMException { Node child = getFirstChild(); while (child != null) { if (hasTextContent(child)) { ((NodeImpl)child).getTextContent(buf); } child = child.getNextSibling(); } } // internal method returning whether to take the given node's text content private static boolean hasTextContent(Node child) { return child.getNodeType() != Node.COMMENT_NODE && child.getNodeType() != Node.PROCESSING_INSTRUCTION_NODE /* && (child.getNodeType() != Node.TEXT_NODE || ((TextImpl) child).isIgnorableWhitespace() == false)*/; } public void setTextContent(String textContent) throws DOMException { // get rid of any existing children // TODO: there is probably a better way to remove all children Node child; while ((child = getFirstChild()) != null) { removeChild(child); } // create a Text node to hold the given content if (textContent != null && textContent.length() != 0) { addChild(factory.createOMText(textContent)); } } } axiom-1.2.8/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/AttributeMap.java0000644000000000000000000002133011131637472030063 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.dom; import org.w3c.dom.DOMException; import org.w3c.dom.Node; import java.util.Vector; public class AttributeMap extends NamedNodeMapImpl { /** @param ownerNode */ protected AttributeMap(ParentNode ownerNode) { super(ownerNode); } public Node removeNamedItem(String name) throws DOMException { // TODO Set used to false return super.removeNamedItem(name); } public Node removeNamedItemNS(String namespaceURI, String name) throws DOMException { // TODO return super.removeNamedItemNS(namespaceURI, name); } /** Almost a copy of the Xerces impl. */ public Node setNamedItem(Node attribute) throws DOMException { if (isReadOnly()) { String msg = DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "NO_MODIFICATION_ALLOWED_ERR", null); throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, msg); } if (attribute.getOwnerDocument() != ownerNode.getOwnerDocument()) { String msg = DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "WRONG_DOCUMENT_ERR", null); throw new DOMException(DOMException.WRONG_DOCUMENT_ERR, msg); } if (attribute.getNodeType() != Node.ATTRIBUTE_NODE) { String msg = DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "HIERARCHY_REQUEST_ERR", null); throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, msg); } AttrImpl attr = (AttrImpl) attribute; if (attr.isOwned()) { // If the attribute is owned then: if (attr.getOwnerElement() != this.ownerNode) // the owner must be // the owner of this // list throw new DOMException(DOMException.INUSE_ATTRIBUTE_ERR, DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "INUSE_ATTRIBUTE_ERR", null)); else return attr; // No point adding the 'same' attr again to the // same element } attr.parent = this.ownerNode; // Set the owner node attr.isOwned(true); // To indicate that this attr belong to an element attr.setUsed(true); // Setting used to true int i = findNamePoint(attr.getNodeName(), 0); AttrImpl previous = null; if (i >= 0) { // There's an attribute already with this attr's name previous = (AttrImpl) nodes.elementAt(i); nodes.setElementAt(attr, i); previous.parent = this.ownerNode; previous.isOwned(false); // make sure it won't be mistaken with defaults in case it's reused previous.isSpecified(true); } else { i = -1 - i; // Insert point (may be end of list) if (null == nodes) { nodes = new Vector(5, 10); } nodes.insertElementAt(attr, i); } // - Not sure whether we really need this // // notify document // ownerNode.getOwnerDocument().setAttrNode(attr, previous); // If the new attribute is not normalized, // the owning element is inherently not normalized. if (!attr.isNormalized()) { ownerNode.isNormalized(false); } return previous; } /** Almost a copy of the Xerces impl. */ public Node setNamedItemNS(Node attribute) throws DOMException { if (isReadOnly()) { String msg = DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "NO_MODIFICATION_ALLOWED_ERR", null); throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, msg); } if (attribute.getOwnerDocument() != ownerNode.getOwnerDocument()) { String msg = DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "WRONG_DOCUMENT_ERR", null); throw new DOMException(DOMException.WRONG_DOCUMENT_ERR, msg); } if (attribute.getNodeType() != Node.ATTRIBUTE_NODE) { String msg = DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "HIERARCHY_REQUEST_ERR", null); throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, msg); } AttrImpl attr = (AttrImpl) attribute; if (attr.isOwned()) { // If the attribute is owned then: //the owner must be the owner of this list if (attr.getOwnerElement() != this.ownerNode) throw new DOMException(DOMException.INUSE_ATTRIBUTE_ERR, DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, "INUSE_ATTRIBUTE_ERR", null)); else return attr; // No point adding the 'same' attr again to the // same element } //Set the owner node attr.ownerNode = (DocumentImpl) this.ownerNode.getOwnerDocument(); attr.isOwned(true); // To indicate that this attr belong to an element int i = findNamePoint(attr.getNamespaceURI(), attr.getLocalName()); AttrImpl previous = null; if (i >= 0) { previous = (AttrImpl) nodes.elementAt(i); nodes.setElementAt(attr, i); previous.ownerNode = (DocumentImpl) this.ownerNode .getOwnerDocument(); previous.isOwned(false); // make sure it won't be mistaken with defaults in case it's reused previous.isSpecified(true); } else { // If we can't find by namespaceURI, localName, then we find by // nodeName so we know where to insert. i = findNamePoint(attr.getNodeName(), 0); if (i >= 0) { previous = (AttrImpl) nodes.elementAt(i); nodes.insertElementAt(attr, i); } else { i = -1 - i; // Insert point (may be end of list) if (null == nodes) { nodes = new Vector(5, 10); } nodes.insertElementAt(attr, i); } } // If the new attribute is not normalized, // the owning element is inherently not normalized. if (!attr.isNormalized()) { ownerNode.isNormalized(false); } return previous; } /** * BORROWED from Xerces impl. Cloning a NamedNodeMap is a DEEP OPERATION; it always clones all * the nodes contained in the map. */ public NamedNodeMapImpl cloneMap(NodeImpl ownerNode) { AttributeMap newmap = new AttributeMap((ParentNode) ownerNode); newmap.hasDefaults(hasDefaults()); newmap.cloneContent(this); return newmap; } // cloneMap():AttributeMap /** BORROWED from Xerces impl. */ protected void cloneContent(NamedNodeMapImpl srcmap) { Vector srcnodes = srcmap.nodes; if (srcnodes != null) { int size = srcnodes.size(); if (size != 0) { if (nodes == null) { nodes = new Vector(size); } nodes.setSize(size); for (int i = 0; i < size; ++i) { NodeImpl n = (NodeImpl) srcnodes.elementAt(i); NodeImpl clone = (NodeImpl) n.cloneNode(true); clone.isSpecified(n.isSpecified()); nodes.setElementAt(clone, i); clone.ownerNode = this.ownerNode.ownerNode; clone.isOwned(true); } } } } // cloneContent():AttributeMap } axiom-1.2.8/modules/axiom-dom/src/test/0000755000000000000000000000000011131637470016450 5ustar rootrootaxiom-1.2.8/modules/axiom-dom/src/test/java/0000755000000000000000000000000011131637470017371 5ustar rootrootaxiom-1.2.8/modules/axiom-dom/src/test/java/org/0000755000000000000000000000000011131637470020160 5ustar rootrootaxiom-1.2.8/modules/axiom-dom/src/test/java/org/apache/0000755000000000000000000000000011131637470021401 5ustar rootrootaxiom-1.2.8/modules/axiom-dom/src/test/java/org/apache/axiom/0000755000000000000000000000000011131637470022516 5ustar rootrootaxiom-1.2.8/modules/axiom-dom/src/test/java/org/apache/axiom/om/0000755000000000000000000000000011131637470023131 5ustar rootrootaxiom-1.2.8/modules/axiom-dom/src/test/java/org/apache/axiom/om/impl/0000755000000000000000000000000011131637470024072 5ustar rootrootaxiom-1.2.8/modules/axiom-dom/src/test/java/org/apache/axiom/om/impl/dom/0000755000000000000000000000000011131637470024651 5ustar rootrootaxiom-1.2.8/modules/axiom-dom/src/test/java/org/apache/axiom/om/impl/dom/jaxp/0000755000000000000000000000000011131637470025613 5ustar rootroot././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootaxiom-1.2.8/modules/axiom-dom/src/test/java/org/apache/axiom/om/impl/dom/jaxp/DocumentBuilderTest.javaaxiom-1.2.8/modules/axiom-dom/src/test/java/org/apache/axiom/om/impl/dom/jaxp/DocumentBuilderTest.ja0000644000000000000000000000401611131637470032055 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.dom.jaxp; import java.io.StringReader; import javax.xml.parsers.DocumentBuilderFactory; import junit.framework.TestCase; import org.apache.axiom.om.impl.dom.DOMTestUtil; import org.w3c.dom.Document; import org.w3c.dom.Node; import org.w3c.dom.Text; import org.xml.sax.InputSource; public class DocumentBuilderTest extends TestCase { /** * Test that whitespace around the document element is discarded. * Indeed, DOM doesn't allow text nodes as children of a document and we * need to check that the builder silently discards the corresponding * events received from the parser. * * @throws Exception */ public void testWhitespaceAroundDocumentElement() throws Exception { DOMTestUtil.execute(new DOMTestUtil.Test() { public void execute(DocumentBuilderFactory dbf) throws Exception { Document doc = dbf.newDocumentBuilder().parse(new InputSource(new StringReader(" "))); Node child = doc.getFirstChild(); do { assertFalse(child instanceof Text); child = child.getNextSibling(); } while (child != null); } }); } } axiom-1.2.8/modules/axiom-dom/src/test/java/org/apache/axiom/om/impl/dom/SOAPEnvelopeTest.java0000644000000000000000000000710411131637470030616 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.dom; import javax.xml.namespace.QName; import junit.framework.TestCase; import org.apache.axiom.om.OMElement; import org.apache.axiom.soap.SOAPEnvelope; import org.apache.axiom.soap.SOAPProcessingException; import org.apache.axiom.soap.impl.dom.soap11.SOAP11Factory; import org.apache.axiom.soap.impl.dom.soap12.SOAP12Factory; public class SOAPEnvelopeTest extends TestCase { public void testAppendSOAP11() throws Exception { SOAP11Factory factory; SOAPEnvelope env; // SOAP 1.1 allows for arbitrary elements after SOAPBody element // these addChild() should fail since appending before SOAPBody // but they do not at this point (need a better check). factory = new SOAP11Factory(); env = factory.createSOAPEnvelope(); checkAddChild(env, false); factory = new SOAP11Factory(); env = factory.createSOAPEnvelope(); factory.createSOAPHeader(env); checkAddChild(env, false); // these addChild() should work since appending after SOAPBody factory = new SOAP11Factory(); env = factory.createSOAPEnvelope(); factory.createSOAPBody(env); checkAddChild(env, false); factory = new SOAP11Factory(); env = factory.createSOAPEnvelope(); factory.createSOAPHeader(env); factory.createSOAPBody(env); checkAddChild(env, false); } public void testAppendSOAP12() throws Exception { SOAP12Factory factory; SOAPEnvelope env; // SOAP 1.2 only allows SOAPHeader and SOAPBody elements // All these addChild() should fail factory = new SOAP12Factory(); env = factory.createSOAPEnvelope(); checkAddChild(env, true); factory = new SOAP12Factory(); env = factory.createSOAPEnvelope(); factory.createSOAPHeader(env); checkAddChild(env, true); factory = new SOAP12Factory(); env = factory.createSOAPEnvelope(); factory.createSOAPBody(env); checkAddChild(env, true); factory = new SOAP12Factory(); env = factory.createSOAPEnvelope(); factory.createSOAPHeader(env); factory.createSOAPBody(env); checkAddChild(env, true); } private void checkAddChild(SOAPEnvelope env, boolean fail) { OMElement elem = env.getOMFactory().createOMElement(new QName("foo")); if (fail) { try { env.addChild(elem); fail("did not throw exception"); } catch (SOAPProcessingException e) { // expected } } else { env.addChild(elem); } } } axiom-1.2.8/modules/axiom-dom/src/test/java/org/apache/axiom/om/impl/dom/TransformTest.java0000644000000000000000000000570011131637470030331 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.dom; import java.io.ByteArrayOutputStream; import java.io.StringReader; import javax.xml.namespace.QName; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.transform.Result; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerFactory; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; import junit.framework.TestCase; import org.apache.axiom.om.OMDocument; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMText; import org.apache.axiom.om.impl.dom.factory.OMDOMFactory; import org.w3c.dom.Document; import org.xml.sax.InputSource; public class TransformTest extends TestCase { public void testTransform() throws Exception { OMFactory fac = new OMDOMFactory(); OMDocument doc = fac.createOMDocument(); OMElement element = fac.createOMElement(new QName("http://foo", "bar")); OMText text = fac.createOMText("test"); element.addChild(text); doc.addChild(element); Document domDoc1 = ((ElementImpl)element).getOwnerDocument(); assertNotNull(domDoc1); ByteArrayOutputStream baos = new ByteArrayOutputStream(); DOMSource source = new DOMSource(domDoc1); Result result = new StreamResult(baos); Transformer xformer = TransformerFactory.newInstance().newTransformer(); xformer.transform(source, result); byte [] data = baos.toByteArray(); String xml = new String(data, 0, data.length); System.out.println(xml); DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); dbf.setNamespaceAware(true); DocumentBuilder db = dbf.newDocumentBuilder(); Document domDoc2 = db.parse(new InputSource(new StringReader(xml))); assertEquals("http://foo", domDoc2.getDocumentElement().getNamespaceURI()); assertEquals("bar", domDoc2.getDocumentElement().getLocalName()); assertEquals("test", domDoc2.getDocumentElement().getFirstChild().getNodeValue()); } } axiom-1.2.8/modules/axiom-dom/src/test/java/org/apache/axiom/om/impl/dom/NamespaceTest.java0000644000000000000000000000424711131637470030257 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.dom; import junit.framework.TestCase; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.impl.dom.factory.OMDOMFactory; public class NamespaceTest extends TestCase { public void testEquals() throws Exception { boolean goodResult = false; NamespaceImpl ns1; NamespaceImpl ns2; try { new NamespaceImpl(null); } catch (IllegalArgumentException e) { // Caught null, good. goodResult = true; } if (!goodResult) fail("Null namespace allowed!"); String URI1 = "http://testuri1"; String URI2 = "http://"; ns1 = new NamespaceImpl(URI1); ns2 = new NamespaceImpl("http://testuri1"); URI2 = URI2 + "testuri1"; // Make sure the strings don't intern to the same place assertTrue(ns1.equals(URI2, null)); assertTrue(ns1.equals(ns2)); } public void testSearch() throws Exception { String NSURI = "http://testns"; String NSURI_UPPER = "HTTP://TESTNS"; OMFactory fac = new OMDOMFactory(); OMNamespace ns = new NamespaceImpl(NSURI); OMElement el = fac.createOMElement("foo", null); el.declareNamespace(NSURI, "p"); assertNull(el.findNamespace(NSURI_UPPER, "p")); } } axiom-1.2.8/modules/axiom-dom/src/test/java/org/apache/axiom/om/impl/dom/AttributeTest.java0000644000000000000000000000210411131637470030314 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.dom; import org.apache.axiom.om.OMAttributeTestBase; import org.apache.axiom.om.impl.dom.factory.OMDOMImplementation; public class AttributeTest extends OMAttributeTestBase { public AttributeTest() { super(new OMDOMImplementation()); } } axiom-1.2.8/modules/axiom-dom/src/test/java/org/apache/axiom/om/impl/dom/DOMTestUtil.java0000644000000000000000000000351211131637470027632 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.dom; import javax.xml.parsers.DocumentBuilderFactory; import junit.framework.Assert; import org.apache.axiom.om.impl.dom.jaxp.DOOMDocumentBuilderFactory; import org.apache.xerces.jaxp.DocumentBuilderFactoryImpl; /** * Utility to execute DOM tests. * It executes test cases twice: once against a standard DOM implementation * (Xerces) and once against DOOM. This allows us to cross-check the validity * of these tests, i.e. to check whether we are testing the right thing. */ public class DOMTestUtil { public interface Test { void execute(DocumentBuilderFactory dbf) throws Exception; } private DOMTestUtil() {} public static void execute(Test test) throws Exception { try { test.execute(new DocumentBuilderFactoryImpl()); } catch (Throwable ex) { Assert.fail("Invalid test case; execution failed with standard DOM implementation: " + ex.getMessage()); } test.execute(new DOOMDocumentBuilderFactory()); } } axiom-1.2.8/modules/axiom-dom/src/test/java/org/apache/axiom/om/impl/dom/NamespaceImplTestCase.java0000644000000000000000000000412111131637470031664 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.dom; public final class NamespaceImplTestCase extends junit.framework.TestCase { public void testEqualsHashCodeContract() { assertEquals( new org.apache.axiom.om.impl.dom.NamespaceImpl("anyURI"), new org.apache.axiom.om.impl.dom.NamespaceImpl("anyURI")); assertEquals( new org.apache.axiom.om.impl.dom.NamespaceImpl("anyURI", "prefix"), new org.apache.axiom.om.impl.dom.NamespaceImpl("anyURI", "prefix")); assertEquals( new org.apache.axiom.om.impl.dom.NamespaceImpl("anyURI", "prefix"), new org.apache.axiom.om.impl.OMNamespaceImpl("anyURI", "prefix")); assertEquals( new org.apache.axiom.om.impl.OMNamespaceImpl("anyURI", "prefix"), new org.apache.axiom.om.impl.dom.NamespaceImpl("anyURI", "prefix")); assertEquals( new org.apache.axiom.om.impl.dom.NamespaceImpl("anyURI").hashCode(), new org.apache.axiom.om.impl.dom.NamespaceImpl("anyURI").hashCode()); assertEquals( new org.apache.axiom.om.impl.dom.NamespaceImpl("anyURI", "prefix").hashCode(), new org.apache.axiom.om.impl.dom.NamespaceImpl("anyURI", "prefix").hashCode()); } } axiom-1.2.8/modules/axiom-dom/src/test/java/org/apache/axiom/om/impl/dom/DocumentImplTest.java0000644000000000000000000001475111131637470030764 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.dom; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.stream.XMLStreamException; import org.apache.axiom.om.OMDocumentTestBase; import org.apache.axiom.om.impl.dom.factory.OMDOMImplementation; import org.w3c.dom.Attr; import org.w3c.dom.DOMException; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.Text; public class DocumentImplTest extends OMDocumentTestBase { public DocumentImplTest() { super(new OMDOMImplementation()); } public void testCreateElement() throws Exception { DOMTestUtil.execute(new DOMTestUtil.Test() { public void execute(DocumentBuilderFactory dbf) throws Exception { String tagName = "LocalName"; String namespace = "http://ws.apache.org/axis2/ns"; Document doc = dbf.newDocumentBuilder().newDocument(); Element elem = doc.createElement(tagName); assertEquals("Local name misnatch", tagName, elem.getNodeName()); elem = doc.createElementNS(namespace, "axis2:" + tagName); assertEquals("Local name misnatch", tagName, elem.getLocalName()); assertEquals("Namespace misnatch", namespace, elem.getNamespaceURI()); } }); } public void testCreateAttribute() throws Exception { DOMTestUtil.execute(new DOMTestUtil.Test() { public void execute(DocumentBuilderFactory dbf) throws Exception { String attrName = "attrIdentifier"; String attrValue = "attrValue"; String attrNs = "http://ws.apache.org/axis2/ns"; String attrNsPrefix = "axis2"; Document doc = dbf.newDocumentBuilder().newDocument(); Attr attr = doc.createAttribute(attrName); assertEquals("Attr name mismatch", attrName, attr.getName()); assertNull("Namespace value should be null", attr.getNamespaceURI()); attr = doc.createAttributeNS(attrNs, attrNsPrefix + ":" + attrName); assertEquals("Attr name mismatch", attrName, attr.getLocalName()); assertNotNull("Namespace value should not be null", attr.getNamespaceURI()); assertEquals("NamsspaceURI mismatch", attrNs, attr.getNamespaceURI()); assertEquals("namespace prefix mismatch", attrNsPrefix, attr.getPrefix()); attr.setValue(attrValue); } }); } public void testCreateText() throws Exception { DOMTestUtil.execute(new DOMTestUtil.Test() { public void execute(DocumentBuilderFactory dbf) throws Exception { String textValue = "temp text value"; Document doc = dbf.newDocumentBuilder().newDocument(); Text txt = doc.createTextNode(textValue); assertEquals("Text value mismatch", textValue, txt.getData()); } }); } public void testDocumentSiblings() throws Exception { DOMTestUtil.execute(new DOMTestUtil.Test() { public void execute(DocumentBuilderFactory dbf) throws Exception { Document doc = dbf.newDocumentBuilder().newDocument(); Element elem = doc.createElement("test"); doc.appendChild(elem); Node node = doc.getNextSibling(); assertNull("Document's next sibling has to be null", node); Node node2 = doc.getPreviousSibling(); assertNull("Document's previous sibling has to be null", node2); Node node3 = doc.getParentNode(); assertNull("Document's parent has to be null", node3); } }); } public void testAllowedChildren() throws Exception { DOMTestUtil.execute(new DOMTestUtil.Test() { public void execute(DocumentBuilderFactory dbf) throws Exception { Document doc = dbf.newDocumentBuilder().newDocument(); doc.appendChild(doc.createComment("some comment")); doc.appendChild(doc.createProcessingInstruction("pi", "data")); // Document Object Model (DOM) Level 3 Core Specification, section 1.1.1 // says that text nodes are not allowed as children of a document. try { doc.appendChild(doc.createTextNode(" ")); fail("Expected DOMException"); } catch (DOMException ex) { assertEquals(DOMException.HIERARCHY_REQUEST_ERR, ex.code); } doc.appendChild(doc.createElement("root1")); // Multiple document elements are not allowed try { doc.appendChild(doc.createElement("root2")); fail("Expected DOMException"); } catch (DOMException ex) { assertEquals(DOMException.HIERARCHY_REQUEST_ERR, ex.code); } // PIs and comments after the document element are allowed doc.appendChild(doc.createProcessingInstruction("pi", "data")); doc.appendChild(doc.createComment("some comment")); // Again, text nodes are not allowed try { doc.appendChild(doc.createTextNode(" ")); fail("Expected DOMException"); } catch (DOMException ex) { assertEquals(DOMException.HIERARCHY_REQUEST_ERR, ex.code); } } }); } } axiom-1.2.8/modules/axiom-dom/pom.xml0000644000000000000000000001270711131637472016230 0ustar rootroot 4.0.0 org.apache.ws.commons.axiom axiom 1.2.8 axiom-dom Axiom DOM 1.2.8 The Axiom DOM implementation. org.apache.ws.commons.axiom axiom-api ${version} org.apache.geronimo.specs geronimo-activation_1.1_spec org.apache.geronimo.specs geronimo-javamail_1.4_spec ${stax.impl.groupid} ${stax.impl.artifact} junit junit commons-logging commons-logging org.apache.geronimo.specs geronimo-stax-api_1.0_spec org.apache.ws.commons.axiom axiom-api tests ${version} test src/main/resources ${project.build.directory}/legal-files maven-antrun-plugin copy-legal-files generate-resources run maven-jar-plugin src/main/resources/META-INF/MANIFEST.MF ${version} maven-jar-plugin test-jar maven-surefire-plugin **/*Test.java **/*TestCase.java axiom-1.2.8/modules/axiom-integration/0000755000000000000000000000000011131640136016437 5ustar rootrootaxiom-1.2.8/modules/axiom-integration/src/0000755000000000000000000000000011131637500017227 5ustar rootrootaxiom-1.2.8/modules/axiom-integration/src/test/0000755000000000000000000000000011131637500020206 5ustar rootrootaxiom-1.2.8/modules/axiom-integration/src/test/resources/0000755000000000000000000000000011131637500022220 5ustar rootrootaxiom-1.2.8/modules/axiom-integration/src/test/resources/org/0000755000000000000000000000000011131637500023007 5ustar rootrootaxiom-1.2.8/modules/axiom-integration/src/test/resources/org/apache/0000755000000000000000000000000011131637500024230 5ustar rootrootaxiom-1.2.8/modules/axiom-integration/src/test/resources/org/apache/axiom/0000755000000000000000000000000011131637500025345 5ustar rootrootaxiom-1.2.8/modules/axiom-integration/src/test/resources/org/apache/axiom/om/0000755000000000000000000000000011131637500025760 5ustar rootrootaxiom-1.2.8/modules/axiom-integration/src/test/resources/org/apache/axiom/om/impl/0000755000000000000000000000000011131637500026721 5ustar rootrootaxiom-1.2.8/modules/axiom-integration/src/test/resources/org/apache/axiom/om/impl/jaxp/0000755000000000000000000000000011131637500027663 5ustar rootrootaxiom-1.2.8/modules/axiom-integration/src/test/resources/org/apache/axiom/om/impl/jaxp/test.xml0000644000000000000000000000045511131637500031370 0ustar rootroot Some text more text axiom-1.2.8/modules/axiom-integration/src/test/resources/org/apache/axiom/om/impl/dom/0000755000000000000000000000000011131637500027500 5ustar rootrootaxiom-1.2.8/modules/axiom-integration/src/test/resources/org/apache/axiom/om/impl/dom/jaxp/0000755000000000000000000000000011131637500030442 5ustar rootroot././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootaxiom-1.2.8/modules/axiom-integration/src/test/resources/org/apache/axiom/om/impl/dom/jaxp/output.xmlaxiom-1.2.8/modules/axiom-integration/src/test/resources/org/apache/axiom/om/impl/dom/jaxp/output.xm0000644000000000000000000000134511131637500032353 0ustar rootroot Revenue Division North 10 South 4 West 6 ././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootaxiom-1.2.8/modules/axiom-integration/src/test/resources/org/apache/axiom/om/impl/dom/jaxp/ipo_1.xmlaxiom-1.2.8/modules/axiom-integration/src/test/resources/org/apache/axiom/om/impl/dom/jaxp/ipo_1.xml0000644000000000000000000000233111131637500032172 0ustar rootroot Alice Smith 123 Maple Street Mill Valley AL 90952 Robert Smith 8 Oak Avenue Old Town AK 95800 Hurry, my sister loves Boeing! 777 Model 1 99.95 Use gold wrap if possible Want this for the holidays! 1999-12-05 833 Model 2 199.95 2000-02-28 axiom-1.2.8/modules/axiom-integration/src/test/resources/org/apache/axiom/om/impl/dom/jaxp/ipo.xsd0000644000000000000000000000764211131637500031762 0ustar rootroot ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootaxiom-1.2.8/modules/axiom-integration/src/test/resources/org/apache/axiom/om/impl/dom/jaxp/identity.xsltaxiom-1.2.8/modules/axiom-integration/src/test/resources/org/apache/axiom/om/impl/dom/jaxp/identity.0000644000000000000000000000050611131637500032275 0ustar rootroot ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootaxiom-1.2.8/modules/axiom-integration/src/test/resources/org/apache/axiom/om/impl/dom/jaxp/stylesheet.xsltaxiom-1.2.8/modules/axiom-integration/src/test/resources/org/apache/axiom/om/impl/dom/jaxp/styleshee0000644000000000000000000000325411131637500032376 0ustar rootroot Revenue Division ././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootaxiom-1.2.8/modules/axiom-integration/src/test/resources/org/apache/axiom/om/impl/dom/jaxp/input.xmlaxiom-1.2.8/modules/axiom-integration/src/test/resources/org/apache/axiom/om/impl/dom/jaxp/input.xml0000644000000000000000000000065411131637500032330 0ustar rootroot 10 9 7 4 3 4 6 -1.5 2 axiom-1.2.8/modules/axiom-integration/src/test/resources/org/apache/axiom/om/impl/builder/0000755000000000000000000000000011131637500030347 5ustar rootrootaxiom-1.2.8/modules/axiom-integration/src/test/resources/org/apache/axiom/om/impl/builder/test.xml0000644000000000000000000000047211131637500032053 0ustar rootroot Some text axiom-1.2.8/modules/axiom-integration/src/test/java/0000755000000000000000000000000011131637500021127 5ustar rootrootaxiom-1.2.8/modules/axiom-integration/src/test/java/org/0000755000000000000000000000000011131637500021716 5ustar rootrootaxiom-1.2.8/modules/axiom-integration/src/test/java/org/apache/0000755000000000000000000000000011131637500023137 5ustar rootrootaxiom-1.2.8/modules/axiom-integration/src/test/java/org/apache/axiom/0000755000000000000000000000000011131637500024254 5ustar rootrootaxiom-1.2.8/modules/axiom-integration/src/test/java/org/apache/axiom/om/0000755000000000000000000000000011131637500024667 5ustar rootrootaxiom-1.2.8/modules/axiom-integration/src/test/java/org/apache/axiom/om/impl/0000755000000000000000000000000011131637500025630 5ustar rootrootaxiom-1.2.8/modules/axiom-integration/src/test/java/org/apache/axiom/om/impl/jaxp/0000755000000000000000000000000011131637500026572 5ustar rootroot././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootaxiom-1.2.8/modules/axiom-integration/src/test/java/org/apache/axiom/om/impl/jaxp/TransformerTest.javaaxiom-1.2.8/modules/axiom-integration/src/test/java/org/apache/axiom/om/impl/jaxp/TransformerTest.ja0000644000000000000000000000434711131637500032260 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.jaxp; import java.io.InputStream; import java.io.StringWriter; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerFactory; import javax.xml.transform.stream.StreamResult; import javax.xml.transform.stream.StreamSource; import org.apache.axiom.om.impl.builder.StAXOMBuilder; import org.custommonkey.xmlunit.XMLTestCase; public class TransformerTest extends XMLTestCase { private InputStream getInput() { return TransformerTest.class.getResourceAsStream("test.xml"); } private void test(TransformerFactory factory) throws Exception { Transformer transformer = factory.newTransformer(); OMSource omSource = new OMSource(new StAXOMBuilder(getInput()).getDocumentElement()); OMResult omResult = new OMResult(); transformer.transform(omSource, omResult); StreamSource streamSource = new StreamSource(getInput()); StringWriter out = new StringWriter(); StreamResult streamResult = new StreamResult(out); transformer.transform(streamSource, streamResult); assertXMLIdentical(compareXML(out.toString(), omResult.getRootElement().toString()), true); } public void testXalan() throws Exception { test(new org.apache.xalan.processor.TransformerFactoryImpl()); } public void testSaxon() throws Exception { test(new net.sf.saxon.TransformerFactoryImpl()); } } axiom-1.2.8/modules/axiom-integration/src/test/java/org/apache/axiom/om/impl/dom/0000755000000000000000000000000011131637500026407 5ustar rootrootaxiom-1.2.8/modules/axiom-integration/src/test/java/org/apache/axiom/om/impl/dom/jaxp/0000755000000000000000000000000011131637500027351 5ustar rootroot././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootaxiom-1.2.8/modules/axiom-integration/src/test/java/org/apache/axiom/om/impl/dom/jaxp/ValidatorTest.javaaxiom-1.2.8/modules/axiom-integration/src/test/java/org/apache/axiom/om/impl/dom/jaxp/ValidatorTest.0000644000000000000000000000341011131637500032135 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.dom.jaxp; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.transform.dom.DOMSource; import javax.xml.validation.Schema; import javax.xml.validation.SchemaFactory; import javax.xml.validation.Validator; import org.apache.xerces.jaxp.validation.XMLSchemaFactory; import junit.framework.TestCase; public class ValidatorTest extends TestCase { public void test() throws Exception { SchemaFactory factory = new XMLSchemaFactory(); DocumentBuilderFactory dbf = new DOOMDocumentBuilderFactory(); DocumentBuilder builder = dbf.newDocumentBuilder(); Schema schema = factory.newSchema(new DOMSource( builder.parse(ValidatorTest.class.getResourceAsStream("ipo.xsd")))); Validator validator = schema.newValidator(); validator.validate(new DOMSource( builder.parse(ValidatorTest.class.getResourceAsStream("ipo_1.xml")))); } } ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootaxiom-1.2.8/modules/axiom-integration/src/test/java/org/apache/axiom/om/impl/dom/jaxp/TransformerTest.javaaxiom-1.2.8/modules/axiom-integration/src/test/java/org/apache/axiom/om/impl/dom/jaxp/TransformerTes0000644000000000000000000000743311131637500032261 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.dom.jaxp; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerFactory; import javax.xml.transform.dom.DOMResult; import javax.xml.transform.dom.DOMSource; import org.custommonkey.xmlunit.XMLTestCase; import org.custommonkey.xmlunit.XMLUnit; import org.w3c.dom.Document; import org.w3c.dom.Element; public class TransformerTest extends XMLTestCase { private void testStylesheet(TransformerFactory tf) throws Exception { DocumentBuilderFactory dbf = new DOOMDocumentBuilderFactory(); DocumentBuilder builder = dbf.newDocumentBuilder(); Document input = builder.parse(TransformerTest.class.getResourceAsStream("input.xml")); Document stylesheet = builder.parse(TransformerTest.class.getResourceAsStream("stylesheet.xslt")); Document expected = builder.parse(TransformerTest.class.getResourceAsStream("output.xml")); Document actual = builder.newDocument(); Transformer transformer = tf.newTransformer(new DOMSource(stylesheet)); transformer.transform(new DOMSource(input), new DOMResult(actual)); XMLUnit.setIgnoreWhitespace(true); assertXMLEqual(expected, actual); } public void testStylesheetWithXalan() throws Exception { testStylesheet(new org.apache.xalan.processor.TransformerFactoryImpl()); } public void testStyleSheetWithSaxon() throws Exception { testStylesheet(new net.sf.saxon.TransformerFactoryImpl()); } // This test failed with Saxon 8.9 because NodeImpl#compareDocumentPosition // threw an UnsupportedOperationException instead of a DOMException. private void testIdentity(TransformerFactory tf) throws Exception { DocumentBuilderFactory dbf = new DOOMDocumentBuilderFactory(); DocumentBuilder builder = dbf.newDocumentBuilder(); Document document = builder.newDocument(); Element root = document.createElement("root"); Element element = document.createElementNS("urn:mynamespace", "element1"); element.setAttribute("att", "testValue"); element.appendChild(document.createTextNode("test")); root.appendChild(element); document.appendChild(root); Document stylesheet = builder.parse(TransformerTest.class.getResourceAsStream("identity.xslt")); Document output = builder.newDocument(); Transformer transformer = tf.newTransformer(new DOMSource(stylesheet)); transformer.transform(new DOMSource(document), new DOMResult(output)); XMLUnit.setIgnoreWhitespace(false); assertXMLEqual(document, output); } public void testIdentityWithXalan() throws Exception { testIdentity(new org.apache.xalan.processor.TransformerFactoryImpl()); } public void testIdentityWithSaxon() throws Exception { testIdentity(new net.sf.saxon.TransformerFactoryImpl()); } } axiom-1.2.8/modules/axiom-integration/src/test/java/org/apache/axiom/om/impl/builder/0000755000000000000000000000000011131637500027256 5ustar rootroot././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootaxiom-1.2.8/modules/axiom-integration/src/test/java/org/apache/axiom/om/impl/builder/SAXOMBuilderXMLBeansTest.javaaxiom-1.2.8/modules/axiom-integration/src/test/java/org/apache/axiom/om/impl/builder/SAXOMBuilderXML0000644000000000000000000000356211131637500031766 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.builder; import java.io.StringWriter; import org.apache.axiom.om.impl.builder.test.xmlbeans.OrderDocument; import org.apache.axiom.om.impl.builder.test.xmlbeans.OrderDocument.Order; import org.apache.axiom.om.impl.builder.test.xmlbeans.OrderDocument.Order.Item; import org.custommonkey.xmlunit.XMLTestCase; public class SAXOMBuilderXMLBeansTest extends XMLTestCase { public void test() throws Exception { OrderDocument document = OrderDocument.Factory.newInstance(); Order order = document.addNewOrder(); order.setCustomerId("73107481"); Item item = order.addNewItem(); item.setPartId("P85-137-19"); item.setQuantity(2); item = order.addNewItem(); item.setPartId("O85-554-66"); item.setQuantity(1); StringWriter out = new StringWriter(); document.save(out); SAXOMBuilder builder = new SAXOMBuilder(); document.save(builder, builder); assertXMLIdentical(compareXML(out.toString(), builder.getRootElement().toString()), true); } } ././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootaxiom-1.2.8/modules/axiom-integration/src/test/java/org/apache/axiom/om/impl/builder/SAXOMBuilderSAXParserTest.javaaxiom-1.2.8/modules/axiom-integration/src/test/java/org/apache/axiom/om/impl/builder/SAXOMBuilderSAX0000644000000000000000000000475411131637500031765 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.builder; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.InputStream; import javax.xml.parsers.SAXParserFactory; import org.apache.axiom.om.OMElement; import org.custommonkey.xmlunit.XMLTestCase; import org.xml.sax.InputSource; import org.xml.sax.XMLReader; public class SAXOMBuilderSAXParserTest extends XMLTestCase { private InputSource toInputSource(OMElement element) throws Exception { ByteArrayOutputStream baos = new ByteArrayOutputStream(); element.serialize(baos); return new InputSource(new ByteArrayInputStream(baos.toByteArray())); } private void test(SAXParserFactory factory) throws Exception { factory.setNamespaceAware(true); XMLReader reader = factory.newSAXParser().getXMLReader(); SAXOMBuilder builder = new SAXOMBuilder(); reader.setContentHandler(builder); reader.setProperty("http://xml.org/sax/properties/lexical-handler", builder); InputStream in = SAXOMBuilderSAXParserTest.class.getResourceAsStream("test.xml"); try { reader.parse(new InputSource(in)); } finally { in.close(); } in = SAXOMBuilderSAXParserTest.class.getResourceAsStream("test.xml"); try { assertXMLIdentical(compareXML(new InputSource(in), toInputSource(builder.getRootElement())), true); } finally { in.close(); } } public void testCrimson() throws Exception { test(new org.apache.crimson.jaxp.SAXParserFactoryImpl()); } public void testXerces() throws Exception { test(new org.apache.xerces.jaxp.SAXParserFactoryImpl()); } } ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootaxiom-1.2.8/modules/axiom-integration/src/test/java/org/apache/axiom/om/impl/builder/SAXOMBuilderJAXBTest.javaaxiom-1.2.8/modules/axiom-integration/src/test/java/org/apache/axiom/om/impl/builder/SAXOMBuilderJAX0000644000000000000000000000405211131637500031743 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.builder; import java.io.StringWriter; import java.util.ArrayList; import java.util.List; import javax.xml.bind.JAXBContext; import javax.xml.bind.Marshaller; import org.apache.axiom.om.impl.builder.test.jaxb.Order; import org.apache.axiom.om.impl.builder.test.jaxb.OrderItem; import org.custommonkey.xmlunit.XMLTestCase; public class SAXOMBuilderJAXBTest extends XMLTestCase { public void test() throws Exception { List items = new ArrayList(2); OrderItem item = new OrderItem(); item.setPartId("P85-137-19"); item.setQuantity(2); items.add(item); item = new OrderItem(); item.setPartId("O85-554-66"); item.setQuantity(1); items.add(item); Order order = new Order(); order.setCustomerId("73107481"); order.setItems(items); Marshaller marshaller = JAXBContext.newInstance(Order.class).createMarshaller(); StringWriter out = new StringWriter(); marshaller.marshal(order, out); SAXOMBuilder builder = new SAXOMBuilder(); marshaller.marshal(order, builder); assertXMLIdentical(compareXML(out.toString(), builder.getRootElement().toString()), true); } } axiom-1.2.8/modules/axiom-integration/src/test/java/org/apache/axiom/om/impl/builder/test/0000755000000000000000000000000011131637500030235 5ustar rootrootaxiom-1.2.8/modules/axiom-integration/src/test/java/org/apache/axiom/om/impl/builder/test/jaxb/0000755000000000000000000000000011131637500031161 5ustar rootroot././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootaxiom-1.2.8/modules/axiom-integration/src/test/java/org/apache/axiom/om/impl/builder/test/jaxb/OrderItem.javaaxiom-1.2.8/modules/axiom-integration/src/test/java/org/apache/axiom/om/impl/builder/test/jaxb/Order0000644000000000000000000000233211131637500032157 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.builder.test.jaxb; public class OrderItem { private String partId; private int quantity; public String getPartId() { return partId; } public void setPartId(String partId) { this.partId = partId; } public int getQuantity() { return quantity; } public void setQuantity(int quantity) { this.quantity = quantity; } } ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootaxiom-1.2.8/modules/axiom-integration/src/test/java/org/apache/axiom/om/impl/builder/test/jaxb/Order.javaaxiom-1.2.8/modules/axiom-integration/src/test/java/org/apache/axiom/om/impl/builder/test/jaxb/Order0000644000000000000000000000251311131637500032160 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.builder.test.jaxb; import java.util.List; import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement public class Order { private String customerId; private List items; public String getCustomerId() { return customerId; } public void setCustomerId(String customerId) { this.customerId = customerId; } public List getItems() { return items; } public void setItems(List items) { this.items = items; } } ././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootaxiom-1.2.8/modules/axiom-integration/src/test/java/org/apache/axiom/om/impl/builder/test/jaxb/package-info.javaaxiom-1.2.8/modules/axiom-integration/src/test/java/org/apache/axiom/om/impl/builder/test/jaxb/packa0000644000000000000000000000200411131637500032157 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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. */ @javax.xml.bind.annotation.XmlSchema( namespace = "http://ws.apache.org/axiom/test/jaxb", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) package org.apache.axiom.om.impl.builder.test.jaxb;axiom-1.2.8/modules/axiom-integration/src/test/xsd/0000755000000000000000000000000011131637500021004 5ustar rootrootaxiom-1.2.8/modules/axiom-integration/src/test/xsd/order.xsd0000644000000000000000000000307011131637500022637 0ustar rootroot axiom-1.2.8/modules/axiom-integration/pom.xml0000644000000000000000000001106611131637500017761 0ustar rootroot 4.0.0 org.apache.ws.commons.axiom axiom 1.2.8 axiom-integration Axiom Integration Test Suite 1.2.8 This module contains tests that validate the interoperability of Axiom with other libraries. org.apache.ws.commons.axiom axiom-impl ${version} org.apache.ws.commons.axiom axiom-dom ${version} junit junit xmlunit xmlunit 1.2 crimson crimson 1.1.3 org.apache.xmlbeans xmlbeans 2.3.0 com.sun.xml.bind jaxb-impl 2.1.9 xerces xercesImpl 2.9.1 xalan xalan 2.7.1 net.sf.saxon saxon 8.9 net.sf.saxon saxon-dom 8.9 maven-compiler-plugin 2.0.2 1.5 1.5 org.codehaus.mojo xmlbeans-maven-plugin 2.3.1 xmlbeans-test wso2-m2 WSO2 Maven 2 Repository http://dist.wso2.org/maven2/ never false axiom-1.2.8/modules/axiom-impl/0000755000000000000000000000000011131637624015065 5ustar rootrootaxiom-1.2.8/modules/axiom-impl/src/0000755000000000000000000000000011131637472015655 5ustar rootrootaxiom-1.2.8/modules/axiom-impl/src/main/0000755000000000000000000000000011131637474016603 5ustar rootrootaxiom-1.2.8/modules/axiom-impl/src/main/resources/0000755000000000000000000000000011131637474020615 5ustar rootrootaxiom-1.2.8/modules/axiom-impl/src/main/resources/META-INF/0000755000000000000000000000000011131637474021755 5ustar rootrootaxiom-1.2.8/modules/axiom-impl/src/main/resources/META-INF/MANIFEST.MF0000644000000000000000000000174711131637474023420 0ustar rootrootManifest-Version: 1.0 Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt Import-Package: javax.activation, javax.xml.namespace, javax.xml.stream, org.apache.axiom.attachments.utils, org.apache.axiom.om, org.apache.axiom.om.impl, org.apache.axiom.om.impl.builder, org.apache.axiom.om.impl.exception, org.apache.axiom.om.impl.serialize, org.apache.axiom.om.impl.traverse, org.apache.axiom.om.impl.util, org.apache.axiom.om.util, org.apache.axiom.soap, org.apache.axiom.soap.impl.builder, org.apache.commons.logging Export-Package: org.apache.axiom.om.impl.llom.factory, org.apache.axiom.om.impl.llom.util, org.apache.axiom.om.impl.llom, org.apache.axiom.soap.impl.llom.soap11, org.apache.axiom.soap.impl.llom.soap12, org.apache.axiom.soap.impl.llom Bundle-Name: Axiom API Bundle-DocURL: http://www.apache.org/ Bundle-ManifestVersion: 2 Bundle-Vendor: Apache Software Foundation Bundle-SymbolicName: org.apache.ws.commons.axiom.axiom-implaxiom-1.2.8/modules/axiom-impl/src/main/java/0000755000000000000000000000000011131637472017522 5ustar rootrootaxiom-1.2.8/modules/axiom-impl/src/main/java/org/0000755000000000000000000000000011131637472020311 5ustar rootrootaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/0000755000000000000000000000000011131637472021532 5ustar rootrootaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/0000755000000000000000000000000011131637472022647 5ustar rootrootaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/0000755000000000000000000000000011131637472023611 5ustar rootrootaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/0000755000000000000000000000000011131637472024552 5ustar rootrootaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/0000755000000000000000000000000011131637472025515 5ustar rootrootaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPFaultTextImpl.java0000644000000000000000000000724511131637472031615 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.llom; import org.apache.axiom.om.OMAttribute; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.om.impl.llom.OMAttributeImpl; import org.apache.axiom.soap.SOAP12Constants; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPFaultReason; import org.apache.axiom.soap.SOAPFaultText; import org.apache.axiom.soap.SOAPProcessingException; import javax.xml.namespace.QName; public abstract class SOAPFaultTextImpl extends SOAPElement implements SOAPFaultText { protected OMAttribute langAttr; protected OMNamespace langNamespace = null; protected SOAPFaultTextImpl(OMNamespace ns, SOAPFactory factory) { super(SOAP12Constants.SOAP_FAULT_TEXT_LOCAL_NAME, ns, factory); this.langNamespace = factory.createOMNamespace( SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_NS_URI, SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_NS_PREFIX); } protected SOAPFaultTextImpl(SOAPFaultReason parent, SOAPFactory factory) throws SOAPProcessingException { super(parent, SOAP12Constants.SOAP_FAULT_TEXT_LOCAL_NAME, true, factory); this.langNamespace = factory.createOMNamespace( SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_NS_URI, SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_NS_PREFIX); } protected SOAPFaultTextImpl(SOAPFaultReason parent, OMXMLParserWrapper builder, SOAPFactory factory) { super(parent, SOAP12Constants.SOAP_FAULT_TEXT_LOCAL_NAME, builder, factory); this.langNamespace = factory.createOMNamespace( SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_NS_URI, SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_NS_PREFIX); } public void setLang(String lang) { //langAttr = new OMAttributeImpl(SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_LOCAL_NAME, parent.getNamespace(), lang); langAttr = new OMAttributeImpl( SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_LOCAL_NAME, langNamespace, lang, this.factory); this.addAttribute(langAttr); } public String getLang() { if (langAttr == null) { //langAttr = this.getFirstAttribute(new QName(SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_LOCAL_NAME, parent.getNamespace().getName())); langAttr = this.getAttribute( new QName(langNamespace.getNamespaceURI(), SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_LOCAL_NAME, SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_NS_PREFIX)); } return langAttr == null ? null : langAttr.getAttributeValue(); } } ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPFaultDetailImpl.javaaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPFaultDetailImpl.jav0000644000000000000000000000541311131637472031725 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.llom; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMNode; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.om.impl.llom.OMNodeImpl; import org.apache.axiom.om.impl.serialize.StreamWriterToContentHandlerConverter; import org.apache.axiom.om.impl.util.OMSerializerUtil; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPFault; import org.apache.axiom.soap.SOAPFaultDetail; import org.apache.axiom.soap.SOAPProcessingException; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamWriter; import java.util.Iterator; public abstract class SOAPFaultDetailImpl extends SOAPElement implements SOAPFaultDetail { protected SOAPFaultDetailImpl(OMNamespace ns, SOAPFactory factory) { super(factory.getSOAPVersion().getFaultDetailQName().getLocalPart(), ns, factory); } protected SOAPFaultDetailImpl(SOAPFault parent, boolean extractNamespaceFromParent, SOAPFactory factory) throws SOAPProcessingException { super(parent, factory.getSOAPVersion().getFaultDetailQName().getLocalPart(), extractNamespaceFromParent, factory); } protected SOAPFaultDetailImpl(SOAPFault parent, OMXMLParserWrapper builder, SOAPFactory factory) { super(parent, factory.getSOAPVersion().getFaultDetailQName().getLocalPart(), builder, factory); } public void addDetailEntry(OMElement detailElement) { this.addChild(detailElement); } public Iterator getAllDetailEntries() { return this.getChildren(); } protected void internalSerialize(XMLStreamWriter writer, boolean cache) throws XMLStreamException { this.registerContentHandler(writer); super.internalSerialize(writer, cache); } } ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPFaultReasonImpl.javaaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPFaultReasonImpl.jav0000644000000000000000000000627111131637472031755 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.llom; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMNode; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPFault; import org.apache.axiom.soap.SOAPFaultReason; import org.apache.axiom.soap.SOAPFaultText; import org.apache.axiom.soap.SOAPProcessingException; import java.util.ArrayList; import java.util.Iterator; import java.util.List; public abstract class SOAPFaultReasonImpl extends SOAPElement implements SOAPFaultReason { protected SOAPFaultReasonImpl(OMNamespace ns, SOAPFactory factory) { super(factory.getSOAPVersion().getFaultReasonQName().getLocalPart(), ns, factory); } /** * Constructor OMElementImpl * * @param parent * @param builder */ public SOAPFaultReasonImpl(SOAPFault parent, OMXMLParserWrapper builder, SOAPFactory factory) { super(parent, factory.getSOAPVersion().getFaultReasonQName().getLocalPart(), builder, factory); } /** @param parent */ public SOAPFaultReasonImpl(OMElement parent, boolean extractNamespaceFromParent, SOAPFactory factory) throws SOAPProcessingException { super(parent, factory.getSOAPVersion().getFaultReasonQName().getLocalPart(), extractNamespaceFromParent, factory); } public List getAllSoapTexts() { List faultTexts = new ArrayList(1); Iterator childrenIter = this.getChildren(); while (childrenIter.hasNext()) { OMNode node = (OMNode) childrenIter.next(); if (node.getType() == OMNode.ELEMENT_NODE && (node instanceof SOAPFaultTextImpl)) { faultTexts.add(((SOAPFaultTextImpl) node)); } } return faultTexts; } public SOAPFaultText getSOAPFaultText(String language) { Iterator childrenIter = this.getChildren(); while (childrenIter.hasNext()) { OMNode node = (OMNode) childrenIter.next(); if (node.getType() == OMNode.ELEMENT_NODE && (node instanceof SOAPFaultTextImpl) && (language == null || language.equals(((SOAPFaultTextImpl) node).getLang()))) { return (SOAPFaultText) node; } } return null; } } axiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPFaultImpl.java0000644000000000000000000001522411131637472030744 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.llom; import org.apache.axiom.om.OMConstants; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMException; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.om.impl.OMNodeEx; import org.apache.axiom.om.impl.llom.OMElementImpl; import org.apache.axiom.om.impl.serialize.StreamWriterToContentHandlerConverter; import org.apache.axiom.om.impl.util.OMSerializerUtil; import org.apache.axiom.soap.SOAPBody; import org.apache.axiom.soap.SOAPConstants; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPFault; import org.apache.axiom.soap.SOAPFaultCode; import org.apache.axiom.soap.SOAPFaultDetail; import org.apache.axiom.soap.SOAPFaultNode; import org.apache.axiom.soap.SOAPFaultReason; import org.apache.axiom.soap.SOAPFaultRole; import org.apache.axiom.soap.SOAPProcessingException; import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamWriter; import java.io.PrintWriter; import java.io.StringWriter; /** Class SOAPFaultImpl */ public abstract class SOAPFaultImpl extends SOAPElement implements SOAPFault, OMConstants { protected Exception e; protected SOAPFaultImpl(OMNamespace ns, SOAPFactory factory) { super(SOAPConstants.SOAPFAULT_LOCAL_NAME, ns, factory); } /** * Constructor SOAPFaultImpl * * @param parent * @param e */ public SOAPFaultImpl(SOAPBody parent, Exception e, SOAPFactory factory) throws SOAPProcessingException { super(parent, SOAPConstants.SOAPFAULT_LOCAL_NAME, true, factory); setException(e); } public void setException(Exception e) { this.e = e; putExceptionToSOAPFault(e); } public SOAPFaultImpl(SOAPBody parent, SOAPFactory factory) throws SOAPProcessingException { super(parent, SOAPConstants.SOAPFAULT_LOCAL_NAME, true, factory); } /** * Constructor SOAPFaultImpl * * @param parent * @param builder */ public SOAPFaultImpl(SOAPBody parent, OMXMLParserWrapper builder, SOAPFactory factory) { super(parent, SOAPConstants.SOAPFAULT_LOCAL_NAME, builder, factory); } protected abstract SOAPFaultDetail getNewSOAPFaultDetail(SOAPFault fault) throws SOAPProcessingException; // --------------- Getters and Settors --------------------------- // public void setCode(SOAPFaultCode soapFaultCode) throws SOAPProcessingException { setNewElement(getCode(), soapFaultCode); } public void setReason(SOAPFaultReason reason) throws SOAPProcessingException { setNewElement(getReason(), reason); } public void setNode(SOAPFaultNode node) throws SOAPProcessingException { setNewElement(getNode(), node); } public void setRole(SOAPFaultRole role) throws SOAPProcessingException { setNewElement(getRole(), role); } public void setDetail(SOAPFaultDetail detail) throws SOAPProcessingException { setNewElement(getDetail(), detail); } /** If exception detailElement is not there we will return null */ public Exception getException() throws OMException { SOAPFaultDetail detail = getDetail(); if (detail == null) { return null; } OMElement exceptionElement = getDetail().getFirstChildWithName( new QName(SOAPConstants.SOAP_FAULT_DETAIL_EXCEPTION_ENTRY)); if (exceptionElement != null && exceptionElement.getText() != null) { return new Exception(exceptionElement.getText()); } return null; } protected void putExceptionToSOAPFault(Exception e) throws SOAPProcessingException { StringWriter sw = new StringWriter(); e.printStackTrace(new PrintWriter(sw)); sw.flush(); SOAPFaultDetail detail = getDetail(); if (getDetail() == null) { detail = getNewSOAPFaultDetail(this); setDetail(detail); } OMElement faultDetailEnty = new OMElementImpl( SOAPConstants.SOAP_FAULT_DETAIL_EXCEPTION_ENTRY, null, detail, factory); faultDetailEnty.setText(sw.getBuffer().toString()); } protected void setNewElement(OMElement myElement, OMElement newElement) { if (myElement != null) { myElement.discard(); } if (newElement != null && newElement.getParent() != null) { newElement.discard(); } this.addChild(newElement); } protected void internalSerialize(XMLStreamWriter writer, boolean cache) throws XMLStreamException { this.registerContentHandler(writer); // this is a special case. This fault element may contain its children in any order. But spec mandates a specific order // the overriding of the method will facilitate that. Not sure this is the best method to do this :( build(); OMSerializerUtil.serializeStartpart(this, writer); SOAPFaultCode faultCode = getCode(); if (faultCode != null) { ((OMNodeEx) faultCode).internalSerialize(writer); } SOAPFaultReason faultReason = getReason(); if (faultReason != null) { ((OMNodeEx) faultReason).internalSerialize(writer); } serializeFaultNode(writer); SOAPFaultRole faultRole = getRole(); if (faultRole != null && faultRole.getText() != null && !"".equals(faultRole.getText())) { ((OMNodeEx) faultRole).internalSerialize(writer); } SOAPFaultDetail faultDetail = getDetail(); if (faultDetail != null) { ((OMNodeEx) faultDetail).internalSerialize(writer); } OMSerializerUtil.serializeEndpart(writer); } protected abstract void serializeFaultNode(XMLStreamWriter writer) throws XMLStreamException; } axiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPFaultCodeImpl.java0000644000000000000000000000602111131637472031532 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.llom; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.om.util.ElementHelper; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPFault; import org.apache.axiom.soap.SOAPFaultCode; import org.apache.axiom.soap.SOAPFaultSubCode; import org.apache.axiom.soap.SOAPFaultValue; import org.apache.axiom.soap.SOAPProcessingException; public abstract class SOAPFaultCodeImpl extends SOAPElement implements SOAPFaultCode { protected SOAPFaultCodeImpl(String localName, OMNamespace ns, SOAPFactory factory) { super(localName, ns, factory); } protected SOAPFaultCodeImpl(OMNamespace ns, SOAPFactory factory) { this(factory.getSOAPVersion().getFaultCodeQName().getLocalPart(), ns, factory); } public SOAPFaultCodeImpl(SOAPFault parent, String localName, OMXMLParserWrapper builder, SOAPFactory factory) { super(parent, localName, builder, factory); } public SOAPFaultCodeImpl(SOAPFault parent, OMXMLParserWrapper builder, SOAPFactory factory) { this(parent, factory.getSOAPVersion().getFaultCodeQName().getLocalPart(), builder, factory); } public SOAPFaultCodeImpl(SOAPFault parent, String localName, boolean extractNamespaceFromParent, SOAPFactory factory) throws SOAPProcessingException { super(parent, localName, extractNamespaceFromParent, factory); } public SOAPFaultCodeImpl(SOAPFault parent, boolean extractNamespaceFromParent, SOAPFactory factory) throws SOAPProcessingException { this(parent, factory.getSOAPVersion().getFaultCodeQName().getLocalPart(), extractNamespaceFromParent, factory); } public void setValue(SOAPFaultValue value) throws SOAPProcessingException { ElementHelper.setNewElement(this, value, value); } public void setSubCode(SOAPFaultSubCode value) throws SOAPProcessingException { ElementHelper.setNewElement(this, getSubCode(), value); } } axiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPMessageImpl.java0000644000000000000000000000520411131637472031252 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.llom; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMNode; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.om.impl.OMNodeEx; import org.apache.axiom.om.impl.llom.OMDocumentImpl; import org.apache.axiom.soap.SOAPEnvelope; import org.apache.axiom.soap.SOAPMessage; import org.apache.axiom.soap.SOAPProcessingException; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamWriter; public class SOAPMessageImpl extends OMDocumentImpl implements SOAPMessage { public SOAPMessageImpl() { } public SOAPMessageImpl(SOAPEnvelope envelope, OMXMLParserWrapper parserWrapper) { super(envelope, parserWrapper); } public SOAPMessageImpl(OMXMLParserWrapper parserWrapper) { super(parserWrapper); } public SOAPEnvelope getSOAPEnvelope() throws SOAPProcessingException { return (SOAPEnvelope) getOMDocumentElement(); } public void setSOAPEnvelope(SOAPEnvelope envelope) throws SOAPProcessingException { super.addChild(envelope); this.documentElement = envelope; } public void setOMDocumentElement(OMElement rootElement) { throw new UnsupportedOperationException( "This is not allowed. Use set SOAPEnvelope instead"); } public void setFirstChild(OMNode firstChild) { throw new UnsupportedOperationException( "This is not allowed. Use set SOAPEnvelope instead"); } protected void internalSerialize(XMLStreamWriter writer, boolean cache, boolean includeXMLDeclaration) throws XMLStreamException { if (cache) { ((OMNodeEx) this.documentElement).internalSerialize(writer); } else { ((OMNodeEx) this.documentElement).internalSerializeAndConsume(writer); } } } axiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPEnvelopeImpl.java0000644000000000000000000003213511131637472031446 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.llom; import org.apache.axiom.om.OMConstants; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMException; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMNode; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.om.impl.MTOMXMLStreamWriter; import org.apache.axiom.om.impl.llom.OMNodeImpl; import org.apache.axiom.om.impl.util.OMSerializerUtil; import org.apache.axiom.soap.SOAP11Constants; import org.apache.axiom.soap.SOAP12Constants; import org.apache.axiom.soap.SOAP12Version; import org.apache.axiom.soap.SOAPBody; import org.apache.axiom.soap.SOAPConstants; import org.apache.axiom.soap.SOAPEnvelope; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPHeader; import org.apache.axiom.soap.SOAPProcessingException; import org.apache.axiom.soap.SOAPVersion; import org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder; import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamWriter; /** Class SOAPEnvelopeImpl */ public class SOAPEnvelopeImpl extends SOAPElement implements SOAPEnvelope, OMConstants { /** * Constructor * @param builder the OMXMLParserWrapper building this envelope * @param factory the SOAPFactory building this envelope */ public SOAPEnvelopeImpl(OMXMLParserWrapper builder, SOAPFactory factory) { super(null, SOAPConstants.SOAPENVELOPE_LOCAL_NAME, builder, factory); this.factory = factory; } /** * Constructor * @param ns OMNamespace for this envelope * @param factory SOAPFactory associated with this envelope */ public SOAPEnvelopeImpl(OMNamespace ns, SOAPFactory factory) { super(SOAPConstants.SOAPENVELOPE_LOCAL_NAME, ns, factory); this.factory = factory; } public SOAPVersion getVersion() { return ((SOAPFactory)factory).getSOAPVersion(); } /** * Returns the SOAPHeader object for this SOAPEnvelope object.

* This SOAPHeader will just be a container for all the headers in the OMMessage *

* * @return the SOAPHeader object or null if there is none * @throws OMException if there is a problem obtaining the SOAPHeader object */ public SOAPHeader getHeader() throws OMException { // The soap header is the first element in the envelope. OMElement e = getFirstElement(); if (e instanceof SOAPHeader) { return (SOAPHeader)e; } return null; } /** * Check that a node is allowed as a child of a SOAP envelope. * * @param child */ private void checkChild(OMNode child) { if ((child instanceof OMElement) && !(child instanceof SOAPHeader || child instanceof SOAPBody)) { throw new SOAPProcessingException( "SOAP Envelope can not have children other than SOAP Header and Body", SOAP12Constants.FAULT_CODE_SENDER); } } /** * Add a SOAPHeader or SOAPBody object * @param child an OMNode to add - must be either a SOAPHeader or a SOAPBody */ public void addChild(OMNode child) { // SOAP 1.1 allows for arbitrary elements after SOAPBody so do NOT check for // node types when appending to SOAP 1.1 envelope. if (getVersion() instanceof SOAP12Version) { checkChild((OMNode)child); } if (child instanceof SOAPHeader) { // The SOAPHeader is added before the SOAPBody // We must be sensitive to the state of the parser. It is possible that the // has not been processed yet. if (this.done) { // Parsing is complete, therefore it is safe to // call getBody. SOAPBody body = getBody(); if (body != null) { body.insertSiblingBefore(child); return; } } else { // Flow to here indicates that we are still expanding the // envelope. The body or body contents may not be // parsed yet. We can't use getBody() yet...it will // cause a failure. So instead, carefully find the // body and insert the header. If the body is not found, // this indicates that it has not been parsed yet...and // the code will fall through to the super.addChild. OMNode node = this.lastChild; while (node != null) { if (node instanceof SOAPBody) { node.insertSiblingBefore(child); return; } node = node.getPreviousOMSibling(); } } } super.addChild(child); } /** * Returns the SOAPBody object associated with this SOAPEnvelope * object.

This SOAPBody will just be a container for all the BodyElements in the * OMMessage

* * @return the SOAPBody object for this SOAPEnvelope object or * null if there is none * @throws OMException if there is a problem obtaining the SOAPBody object */ public SOAPBody getBody() throws OMException { //check for the first element OMElement element = getFirstElement(); if (element != null) { if (SOAPConstants.BODY_LOCAL_NAME.equals(element.getLocalName())) { return (SOAPBody) element; } else { // if not second element SHOULD be the body OMNode node = element.getNextOMSibling(); while (node != null && node.getType() != OMNode.ELEMENT_NODE) { node = node.getNextOMSibling(); } element = (OMElement) node; if (node != null && SOAPConstants.BODY_LOCAL_NAME.equals(element.getLocalName())) { return (SOAPBody) element; } else { throw new OMException("SOAPEnvelope must contain a body element " + "which is either first or second child element of the SOAPEnvelope."); } } } return null; } /** * Method detach * * @throws OMException */ public OMNode detach() throws OMException { // throw new OMException("Root Element can not be detached"); // I'm confused why this threw an exception as above. One should be able to create // a SOAP envelope and be able to detach from the its parent document. // The example is if I want to send a SOAPEnvelope inside another SOAP message, then this will // not allow to do that. // Must be an idea of a DOM guy ;) return this; } protected void checkParent(OMElement parent) throws SOAPProcessingException { // here do nothing as SOAPEnvelope doesn't have a parent !!! } protected void internalSerialize(XMLStreamWriter writer2, boolean cache) throws XMLStreamException { MTOMXMLStreamWriter writer = (MTOMXMLStreamWriter) writer2; if (!writer.isIgnoreXMLDeclaration()) { String charSetEncoding = writer.getCharSetEncoding(); String xmlVersion = writer.getXmlVersion(); writer.getXmlStreamWriter().writeStartDocument( charSetEncoding == null ? OMConstants.DEFAULT_CHAR_SET_ENCODING : charSetEncoding, xmlVersion == null ? OMConstants.DEFAULT_XML_VERSION : xmlVersion); } if (cache) { //in this case we don't care whether the elements are built or not //we just call the serializeAndConsume methods OMSerializerUtil.serializeStartpart(this, writer); //serialize children OMElement header = getHeader(); if ((header != null) && (header.getFirstOMChild() != null)) { ((SOAPHeaderImpl) header).internalSerialize(writer); } SOAPBody body = getBody(); //REVIEW: getBody has statements to return null..Can it be null in any case? if (body != null) { ((SOAPBodyImpl) body).internalSerialize(writer); } OMSerializerUtil.serializeEndpart(writer); } else { //Now the caching is supposed to be off. However caching been switched off //has nothing to do if the element is already built! if (this.done || (this.builder == null)) { OMSerializerUtil.serializeStartpart(this, writer); OMElement header = getHeader(); if ((header != null) && (header.getFirstOMChild() != null)) { serializeInternally((OMNodeImpl) header, writer); } SOAPBody body = getBody(); if (body != null) { serializeInternally((OMNodeImpl) body, writer); } OMSerializerUtil.serializeEndpart(writer); } else { OMSerializerUtil.serializeByPullStream(this, writer, cache); } } } private void serializeInternally(OMNodeImpl child, MTOMXMLStreamWriter writer) throws XMLStreamException { if ((!(child instanceof OMElement)) || child.isComplete() || child.builder == null) { child.internalSerializeAndConsume(writer); } else { OMElement element = (OMElement) child; element.getBuilder().setCache(false); OMSerializerUtil.serializeByPullStream(element, writer, false); } child.getNextOMSibling(); } public boolean hasFault() { QName payloadQName = this.getPayloadQName_Optimized(); if (payloadQName != null) { if (SOAPConstants.SOAPFAULT_LOCAL_NAME.equals(payloadQName.getLocalPart())) { String ns = payloadQName.getNamespaceURI(); return (ns != null && (SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(ns) || SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(ns))); } } // Fallback: Get the body and get the fault information from the body SOAPBody body = this.getBody(); return (body == null) ? false : body.hasFault(); } public String getSOAPBodyFirstElementLocalName() { QName payloadQName = this.getPayloadQName_Optimized(); if (payloadQName != null) { return payloadQName.getLocalPart(); } SOAPBody body = this.getBody(); return (body == null) ? null : body.getFirstElementLocalName(); } public OMNamespace getSOAPBodyFirstElementNS() { QName payloadQName = this.getPayloadQName_Optimized(); if (payloadQName != null) { return this.factory.createOMNamespace(payloadQName.getNamespaceURI(), payloadQName.getPrefix()); } SOAPBody body = this.getBody(); return (body == null) ? null : body.getFirstElementNS(); } /** * Use a parser property to fetch the first element in the body. * Returns null if this optimized property is not set or not available. * @return The qname of the first element in the body or null */ private QName getPayloadQName_Optimized() { // The parser may expose a SOAPBODY_FIRST_CHILD_ELEMENT_QNAME property // Use that QName to determine if there is a fault OMXMLParserWrapper builder = this.getBuilder(); if (builder instanceof StAXSOAPModelBuilder) { try { QName payloadQName = (QName) ((StAXSOAPModelBuilder) builder). getReaderProperty(SOAPConstants.SOAPBODY_FIRST_CHILD_ELEMENT_QNAME); return payloadQName; } catch (Throwable e) { // The parser may not support this property. // In such cases, processing continues below in the fallback approach } } return null; } } axiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPFaultRoleImpl.java0000644000000000000000000000455411131637472031572 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.llom; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.om.impl.OMNodeEx; import org.apache.axiom.om.impl.serialize.StreamWriterToContentHandlerConverter; import org.apache.axiom.om.impl.util.OMSerializerUtil; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPFault; import org.apache.axiom.soap.SOAPProcessingException; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamWriter; public abstract class SOAPFaultRoleImpl extends SOAPElement implements org.apache.axiom.soap.SOAPFaultRole { protected SOAPFaultRoleImpl(OMNamespace ns, SOAPFactory factory) { super(factory.getSOAPVersion().getFaultRoleQName().getLocalPart(), ns, factory); } public SOAPFaultRoleImpl(SOAPFault parent, boolean extractNamespaceFromParent, SOAPFactory factory) throws SOAPProcessingException { super(parent, factory.getSOAPVersion().getFaultRoleQName().getLocalPart(), extractNamespaceFromParent, factory); } public SOAPFaultRoleImpl(SOAPFault parent, OMXMLParserWrapper builder, SOAPFactory factory) { super(parent, factory.getSOAPVersion().getFaultRoleQName().getLocalPart(), builder, factory); } public void setRoleValue(String uri) { this.setText(uri); } public String getRoleValue() { return this.getText(); } } axiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/0000755000000000000000000000000011131637472026621 5ustar rootroot././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11Factory.javaaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11Factory.ja0000644000000000000000000003021711131637472031374 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.llom.soap11; import org.apache.axiom.om.OMDataSource; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.om.impl.OMNamespaceImpl; import org.apache.axiom.om.impl.llom.factory.OMLinkedListImplFactory; import org.apache.axiom.soap.SOAP11Constants; import org.apache.axiom.soap.SOAPBody; import org.apache.axiom.soap.SOAPEnvelope; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPFault; import org.apache.axiom.soap.SOAPFaultCode; import org.apache.axiom.soap.SOAPFaultDetail; import org.apache.axiom.soap.SOAPFaultNode; import org.apache.axiom.soap.SOAPFaultReason; import org.apache.axiom.soap.SOAPFaultRole; import org.apache.axiom.soap.SOAPFaultSubCode; import org.apache.axiom.soap.SOAPFaultText; import org.apache.axiom.soap.SOAPFaultValue; import org.apache.axiom.soap.SOAPHeader; import org.apache.axiom.soap.SOAPHeaderBlock; import org.apache.axiom.soap.SOAPMessage; import org.apache.axiom.soap.SOAPProcessingException; import org.apache.axiom.soap.SOAPVersion; import org.apache.axiom.soap.SOAP11Version; import org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl; import org.apache.axiom.soap.impl.llom.SOAPMessageImpl; public class SOAP11Factory extends OMLinkedListImplFactory implements SOAPFactory { /** Eran Chinthaka (chinthaka@apache.org) */ public OMNamespace getNamespace() { return new OMNamespaceImpl(SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI, SOAP11Constants.SOAP_DEFAULT_NAMESPACE_PREFIX); } public String getSoapVersionURI() { return SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI; } public SOAPVersion getSOAPVersion() { return SOAP11Version.getSingleton(); } public SOAPEnvelope createSOAPEnvelope() { return new SOAPEnvelopeImpl( new OMNamespaceImpl( SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI, SOAP11Constants.SOAP_DEFAULT_NAMESPACE_PREFIX), this); } public SOAPEnvelope createSOAPEnvelope(OMNamespace ns) { return new SOAPEnvelopeImpl(ns, this); } public SOAPHeader createSOAPHeader(SOAPEnvelope envelope) throws SOAPProcessingException { return new SOAP11HeaderImpl(envelope, this); } public SOAPHeader createSOAPHeader() throws SOAPProcessingException { return new SOAP11HeaderImpl(this); } public SOAPHeader createSOAPHeader(SOAPEnvelope envelope, OMXMLParserWrapper builder) { return new SOAP11HeaderImpl(envelope, builder, this); } public SOAPHeaderBlock createSOAPHeaderBlock(String localName, OMNamespace ns, SOAPHeader parent) throws SOAPProcessingException { return new SOAP11HeaderBlockImpl(localName, ns, parent, this); } public SOAPHeaderBlock createSOAPHeaderBlock(String localName, OMNamespace ns) throws SOAPProcessingException { return new SOAP11HeaderBlockImpl(localName, ns, this); } public SOAPHeaderBlock createSOAPHeaderBlock(String localName, OMNamespace ns, OMDataSource ds) throws SOAPProcessingException { return new SOAP11HeaderBlockImpl(localName, ns, this, ds); } public SOAPHeaderBlock createSOAPHeaderBlock(String localName, OMNamespace ns, SOAPHeader parent, OMXMLParserWrapper builder) throws SOAPProcessingException { return new SOAP11HeaderBlockImpl(localName, ns, parent, builder, this); } public SOAPFault createSOAPFault(SOAPBody parent, Exception e) throws SOAPProcessingException { return new SOAP11FaultImpl(parent, e, this); } public SOAPFault createSOAPFault() throws SOAPProcessingException { return new SOAP11FaultImpl(this); } public SOAPFault createSOAPFault(SOAPBody parent) throws SOAPProcessingException { return new SOAP11FaultImpl(parent, this); } public SOAPFault createSOAPFault(SOAPBody parent, OMXMLParserWrapper builder) { return new SOAP11FaultImpl(parent, builder, this); } public SOAPBody createSOAPBody(SOAPEnvelope envelope) throws SOAPProcessingException { return new SOAP11BodyImpl(envelope, this); } public SOAPBody createSOAPBody(SOAPEnvelope envelope, OMXMLParserWrapper builder) { return new SOAP11BodyImpl(envelope, builder, this); } public SOAPBody createSOAPBody() throws SOAPProcessingException { return new SOAP11BodyImpl(this); } public SOAPFaultCode createSOAPFaultCode(SOAPFault parent) throws SOAPProcessingException { return new SOAP11FaultCodeImpl(parent, this); } public SOAPFaultCode createSOAPFaultCode() throws SOAPProcessingException { return new SOAP11FaultCodeImpl(this); } public SOAPFaultCode createSOAPFaultCode(SOAPFault parent, OMXMLParserWrapper builder) { return new SOAP11FaultCodeImpl(parent, builder, this); } public SOAPFaultValue createSOAPFaultValue(SOAPFaultCode parent) throws SOAPProcessingException { return new SOAP11FaultValueImpl(parent, this); } public SOAPFaultValue createSOAPFaultValue() throws SOAPProcessingException { return new SOAP11FaultValueImpl(this); } public SOAPFaultValue createSOAPFaultValue(SOAPFaultCode parent, OMXMLParserWrapper builder) { return new SOAP11FaultValueImpl(parent, builder, this); } //added public SOAPFaultValue createSOAPFaultValue(SOAPFaultSubCode parent) throws SOAPProcessingException { return new SOAP11FaultValueImpl(parent, this); } //added public SOAPFaultValue createSOAPFaultValue(SOAPFaultSubCode parent, OMXMLParserWrapper builder) { return new SOAP11FaultValueImpl(parent, builder, this); } //changed public SOAPFaultSubCode createSOAPFaultSubCode(SOAPFaultCode parent) throws SOAPProcessingException { return new SOAP11FaultSubCodeImpl(parent, this); } public SOAPFaultSubCode createSOAPFaultSubCode() throws SOAPProcessingException { return new SOAP11FaultSubCodeImpl(this); } //changed public SOAPFaultSubCode createSOAPFaultSubCode(SOAPFaultCode parent, OMXMLParserWrapper builder) { return new SOAP11FaultSubCodeImpl(parent, builder, this); } public SOAPFaultSubCode createSOAPFaultSubCode(SOAPFaultSubCode parent) throws SOAPProcessingException { return new SOAP11FaultSubCodeImpl(parent, this); } public SOAPFaultSubCode createSOAPFaultSubCode(SOAPFaultSubCode parent, OMXMLParserWrapper builder) { return new SOAP11FaultSubCodeImpl(parent, builder, this); } public SOAPFaultReason createSOAPFaultReason(SOAPFault parent) throws SOAPProcessingException { return new SOAP11FaultReasonImpl(parent, this); } public SOAPFaultReason createSOAPFaultReason() throws SOAPProcessingException { return new SOAP11FaultReasonImpl(this); } public SOAPFaultReason createSOAPFaultReason(SOAPFault parent, OMXMLParserWrapper builder) { return new SOAP11FaultReasonImpl(parent, builder, this); } public SOAPFaultText createSOAPFaultText(SOAPFaultReason parent) throws SOAPProcessingException { return new SOAP11FaultTextImpl(parent, this); } public SOAPFaultText createSOAPFaultText() throws SOAPProcessingException { return new SOAP11FaultTextImpl(this); } public SOAPFaultText createSOAPFaultText(SOAPFaultReason parent, OMXMLParserWrapper builder) { return new SOAP11FaultTextImpl(parent, builder, this); } public SOAPFaultNode createSOAPFaultNode(SOAPFault parent) throws SOAPProcessingException { throw new UnsupportedOperationException("SOAP 1.1 has no SOAP Fault Node"); } public SOAPFaultNode createSOAPFaultNode() throws SOAPProcessingException { throw new UnsupportedOperationException("SOAP 1.1 has no SOAP Fault Node"); } public SOAPFaultNode createSOAPFaultNode(SOAPFault parent, OMXMLParserWrapper builder) { throw new UnsupportedOperationException("SOAP 1.1 has no SOAP Fault Node"); } public SOAPFaultRole createSOAPFaultRole(SOAPFault parent) throws SOAPProcessingException { return new SOAP11FaultRoleImpl(parent, this); } public SOAPFaultRole createSOAPFaultRole() throws SOAPProcessingException { return new SOAP11FaultRoleImpl(this); } public SOAPFaultRole createSOAPFaultRole(SOAPFault parent, OMXMLParserWrapper builder) { return new SOAP11FaultRoleImpl(parent, builder, this); } public SOAPFaultDetail createSOAPFaultDetail(SOAPFault parent) throws SOAPProcessingException { return new SOAP11FaultDetailImpl(parent, this); } public SOAPFaultDetail createSOAPFaultDetail() throws SOAPProcessingException { return new SOAP11FaultDetailImpl(this); } public SOAPFaultDetail createSOAPFaultDetail(SOAPFault parent, OMXMLParserWrapper builder) { return new SOAP11FaultDetailImpl(parent, builder, this); } public SOAPEnvelope getDefaultEnvelope() throws SOAPProcessingException { OMNamespace ns = new OMNamespaceImpl( SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI, SOAP11Constants.SOAP_DEFAULT_NAMESPACE_PREFIX); SOAPEnvelopeImpl env = new SOAPEnvelopeImpl(ns, this); createSOAPHeader(env); createSOAPBody(env); return env; } public SOAPEnvelope getDefaultFaultEnvelope() throws SOAPProcessingException { SOAPEnvelope defaultEnvelope = getDefaultEnvelope(); SOAPFault fault = createSOAPFault(defaultEnvelope.getBody()); SOAPFaultCode faultCode = createSOAPFaultCode(fault); SOAPFaultReason reason = createSOAPFaultReason(fault); //createSOAPFaultText(reason); createSOAPFaultDetail(fault); return defaultEnvelope; } public SOAPMessage createSOAPMessage() { return new SOAPMessageImpl(); } public SOAPMessage createSOAPMessage(OMXMLParserWrapper builder) { return new SOAPMessageImpl(builder); } public SOAPMessage createSOAPMessage(SOAPEnvelope envelope, OMXMLParserWrapper parserWrapper) { return new SOAPMessageImpl(envelope, parserWrapper); } public SOAPEnvelope createSOAPEnvelope(OMXMLParserWrapper builder) { return new SOAPEnvelopeImpl(builder, this); } } ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11FaultReasonImpl.javaaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11FaultReaso0000644000000000000000000000623411131637472031443 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.llom.soap11; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.om.impl.serialize.StreamWriterToContentHandlerConverter; import org.apache.axiom.om.impl.util.OMSerializerUtil; import org.apache.axiom.soap.SOAP11Constants; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPFault; import org.apache.axiom.soap.SOAPFaultText; import org.apache.axiom.soap.SOAPProcessingException; import org.apache.axiom.soap.impl.llom.SOAPFaultReasonImpl; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamWriter; public class SOAP11FaultReasonImpl extends SOAPFaultReasonImpl { /** Eran Chinthaka (chinthaka@apache.org) */ public SOAP11FaultReasonImpl(SOAPFactory factory) { super(null, factory); } public SOAP11FaultReasonImpl(SOAPFault parent, OMXMLParserWrapper builder, SOAPFactory factory) { super(parent, builder, factory); } /** @param parent */ public SOAP11FaultReasonImpl(SOAPFault parent, SOAPFactory factory) throws SOAPProcessingException { super(parent, false, factory); } public void addSOAPText(SOAPFaultText soapFaultText) throws SOAPProcessingException { throw new UnsupportedOperationException("addSOAPText() not allowed for SOAP 1.1!"); } public SOAPFaultText getFirstSOAPText() { throw new UnsupportedOperationException("getFirstSOAPText() not allowed for SOAP 1.1!"); } protected void checkParent(OMElement parent) throws SOAPProcessingException { if (!(parent instanceof SOAP11FaultImpl)) { throw new SOAPProcessingException( "Expecting SOAP11FaultImpl, got " + parent.getClass()); } } protected void internalSerialize(XMLStreamWriter writer, boolean cache) throws XMLStreamException { this.registerContentHandler(writer); // Special syntax OMSerializerUtil.serializeStartpart(this, SOAP11Constants.SOAP_FAULT_STRING_LOCAL_NAME, writer); writer.writeCharacters(this.getText()); writer.writeEndElement(); } public String getLocalName() { return SOAP11Constants.SOAP_FAULT_STRING_LOCAL_NAME; } } ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11FaultRoleImpl.javaaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11FaultRoleI0000644000000000000000000000506711131637472031407 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.llom.soap11; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.om.impl.serialize.StreamWriterToContentHandlerConverter; import org.apache.axiom.om.impl.util.OMSerializerUtil; import org.apache.axiom.soap.SOAP11Constants; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPFault; import org.apache.axiom.soap.SOAPProcessingException; import org.apache.axiom.soap.impl.llom.SOAPFaultRoleImpl; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamWriter; public class SOAP11FaultRoleImpl extends SOAPFaultRoleImpl { public SOAP11FaultRoleImpl(SOAPFault parent, SOAPFactory factory) throws SOAPProcessingException { super(parent, false, factory); } public SOAP11FaultRoleImpl(SOAPFactory factory) { super(null, factory); } public SOAP11FaultRoleImpl(SOAPFault parent, OMXMLParserWrapper builder, SOAPFactory factory) { super(parent, builder, factory); } protected void checkParent(OMElement parent) throws SOAPProcessingException { if (!(parent instanceof SOAP11FaultImpl)) { throw new SOAPProcessingException( "Expecting SOAP11FaultImpl, got " + parent.getClass()); } } protected void internalSerialize(XMLStreamWriter writer, boolean cache) throws XMLStreamException { this.registerContentHandler(writer); OMSerializerUtil.serializeStartpart(this, SOAP11Constants.SOAP_FAULT_ACTOR_LOCAL_NAME, writer); writer.writeCharacters(this.getText()); writer.writeEndElement(); } } ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11FaultValueImpl.javaaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11FaultValue0000644000000000000000000000425211131637472031444 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.llom.soap11; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.soap.SOAP11Constants; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPProcessingException; import org.apache.axiom.soap.impl.llom.SOAPFaultValueImpl; public class SOAP11FaultValueImpl extends SOAPFaultValueImpl { public SOAP11FaultValueImpl(OMElement parent, SOAPFactory factory) throws SOAPProcessingException { super(SOAP11Constants.SOAP_FAULT_CODE_LOCAL_NAME, parent, factory); } public SOAP11FaultValueImpl(SOAPFactory factory) throws SOAPProcessingException { super((OMNamespace) null, SOAP11Constants.SOAP_FAULT_CODE_LOCAL_NAME, factory); } public SOAP11FaultValueImpl(OMElement parent, OMXMLParserWrapper builder, SOAPFactory factory) { super(parent, SOAP11Constants.SOAP_FAULT_CODE_LOCAL_NAME, builder, factory); } protected void checkParent(OMElement parent) throws SOAPProcessingException { if (!((parent instanceof SOAP11FaultSubCodeImpl) || (parent instanceof SOAP11FaultCodeImpl))) { throw new SOAPProcessingException( "Expecting SOAP11FaultSubCodeImpl or SOAP11FaultCodeImpl, got " + parent.getClass()); } } } ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11FaultDetailImpl.javaaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11FaultDetai0000644000000000000000000000466011131637472031421 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.llom.soap11; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMNode; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.om.impl.llom.OMNodeImpl; import org.apache.axiom.om.impl.serialize.StreamWriterToContentHandlerConverter; import org.apache.axiom.om.impl.util.OMSerializerUtil; import org.apache.axiom.soap.SOAP11Constants; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPFault; import org.apache.axiom.soap.SOAPProcessingException; import org.apache.axiom.soap.impl.llom.SOAPFaultDetailImpl; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamWriter; public class SOAP11FaultDetailImpl extends SOAPFaultDetailImpl { public SOAP11FaultDetailImpl(SOAPFactory factory) { super(null, factory); this.localName = SOAP11Constants.SOAP_FAULT_DETAIL_LOCAL_NAME; } public SOAP11FaultDetailImpl(SOAPFault parent, SOAPFactory factory) throws SOAPProcessingException { super(parent, false, factory); this.localName = SOAP11Constants.SOAP_FAULT_DETAIL_LOCAL_NAME; } public SOAP11FaultDetailImpl(SOAPFault parent, OMXMLParserWrapper builder, SOAPFactory factory) { super(parent, builder, factory); this.localName = SOAP11Constants.SOAP_FAULT_DETAIL_LOCAL_NAME; } protected void checkParent(OMElement parent) throws SOAPProcessingException { if (!(parent instanceof SOAP11FaultImpl)) { throw new SOAPProcessingException("Expecting SOAP11FaultImpl, got " + parent.getClass()); } } } ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11FaultCodeImpl.javaaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11FaultCodeI0000644000000000000000000000761111131637472031355 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.llom.soap11; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.om.util.ElementHelper; import org.apache.axiom.om.impl.serialize.StreamWriterToContentHandlerConverter; import org.apache.axiom.om.impl.util.OMSerializerUtil; import org.apache.axiom.soap.SOAP11Constants; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPFault; import org.apache.axiom.soap.SOAPFaultSubCode; import org.apache.axiom.soap.SOAPFaultValue; import org.apache.axiom.soap.SOAPProcessingException; import org.apache.axiom.soap.SOAP12Constants; import org.apache.axiom.soap.impl.llom.SOAPFaultCodeImpl; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamWriter; public class SOAP11FaultCodeImpl extends SOAPFaultCodeImpl { public SOAP11FaultCodeImpl(SOAPFactory factory) { super(SOAP11Constants.SOAP_FAULT_CODE_LOCAL_NAME, null, factory); } public SOAP11FaultCodeImpl(SOAPFault parent, OMXMLParserWrapper builder, SOAPFactory factory) { super(parent, SOAP11Constants.SOAP_FAULT_CODE_LOCAL_NAME, builder, factory); } public SOAP11FaultCodeImpl(SOAPFault parent, SOAPFactory factory) throws SOAPProcessingException { super(parent, SOAP11Constants.SOAP_FAULT_CODE_LOCAL_NAME, false, factory); } public void setSubCode(SOAPFaultSubCode subCode) throws SOAPProcessingException { if (!(subCode instanceof SOAP11FaultSubCodeImpl)) { throw new SOAPProcessingException( "Expecting SOAP11FaultSubCodeImpl, got " + subCode.getClass()); } super.setSubCode(subCode); } public void setValue(SOAPFaultValue value) throws SOAPProcessingException { if (!(value instanceof SOAP11FaultValueImpl)) { throw new SOAPProcessingException( "Expecting SOAP11FaultValueImpl, got " + value.getClass()); } super.setValue(value); } protected void checkParent(OMElement parent) throws SOAPProcessingException { if (!(parent instanceof SOAP11FaultImpl)) { throw new SOAPProcessingException( "Expecting SOAP11FaultImpl, got " + parent.getClass()); } } protected void internalSerialize(XMLStreamWriter writer, boolean cache) throws XMLStreamException { this.registerContentHandler(writer); OMSerializerUtil.serializeStartpart(this, SOAP11Constants.SOAP_FAULT_CODE_LOCAL_NAME, writer); writer.writeCharacters(this.getText()); writer.writeEndElement(); } public String getLocalName() { return SOAP11Constants.SOAP_FAULT_CODE_LOCAL_NAME; } public SOAPFaultValue getValue() { return null; // throw new UnsupportedOperationException("getValue() not supported for SOAP 1.1 faults"); } public SOAPFaultSubCode getSubCode() { return null; // throw new UnsupportedOperationException("getSubCode() not supported for SOAP 1.1 faults"); } } ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11FaultTextImpl.javaaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11FaultTextI0000644000000000000000000000400311131637472031417 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.llom.soap11; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPFaultReason; import org.apache.axiom.soap.SOAPProcessingException; import org.apache.axiom.soap.impl.llom.SOAPFaultTextImpl; public class SOAP11FaultTextImpl extends SOAPFaultTextImpl { public SOAP11FaultTextImpl(SOAPFaultReason parent, SOAPFactory factory) throws SOAPProcessingException { super(parent, factory); } public SOAP11FaultTextImpl(SOAPFactory factory) throws SOAPProcessingException { super((OMNamespace) null, factory); } public SOAP11FaultTextImpl(SOAPFaultReason parent, OMXMLParserWrapper builder, SOAPFactory factory) { super(parent, builder, factory); } protected void checkParent(OMElement parent) throws SOAPProcessingException { if (!(parent instanceof SOAP11FaultReasonImpl)) { throw new SOAPProcessingException( "Expecting SOAP11FaultReasonImpl, got " + parent.getClass()); } } } ././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11FaultSubCodeImpl.javaaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11FaultSubCo0000644000000000000000000000713611131637472031407 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.llom.soap11; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.soap.SOAP12Constants; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPFaultCode; import org.apache.axiom.soap.SOAPFaultSubCode; import org.apache.axiom.soap.SOAPFaultValue; import org.apache.axiom.soap.SOAPProcessingException; import org.apache.axiom.soap.impl.llom.SOAPFaultSubCodeImpl; public class SOAP11FaultSubCodeImpl extends SOAPFaultSubCodeImpl { public SOAP11FaultSubCodeImpl(SOAPFactory factory) { super(null, factory); } //changed public SOAP11FaultSubCodeImpl(SOAPFaultCode parent, SOAPFactory factory) throws SOAPProcessingException { super(parent, SOAP12Constants.SOAP_FAULT_SUB_CODE_LOCAL_NAME, factory); } //changed public SOAP11FaultSubCodeImpl(SOAPFaultCode parent, OMXMLParserWrapper builder, SOAPFactory factory) { super(parent, SOAP12Constants.SOAP_FAULT_SUB_CODE_LOCAL_NAME, builder, factory); } public SOAP11FaultSubCodeImpl(SOAPFaultSubCode parent, SOAPFactory factory) throws SOAPProcessingException { super(parent, SOAP12Constants.SOAP_FAULT_SUB_CODE_LOCAL_NAME, factory); } public SOAP11FaultSubCodeImpl(SOAPFaultSubCode parent, OMXMLParserWrapper builder, SOAPFactory factory) { super(parent, SOAP12Constants.SOAP_FAULT_SUB_CODE_LOCAL_NAME, builder, factory); } protected void checkParent(OMElement parent) throws SOAPProcessingException { if (!((parent instanceof SOAP11FaultSubCodeImpl) || (parent instanceof SOAP11FaultCodeImpl))) { throw new SOAPProcessingException( "Expecting SOAP11FaultSubCodeImpl or SOAP11FaultCodeImpl, got " + parent.getClass()); } } public void setSubCode(SOAPFaultSubCode subCode) throws SOAPProcessingException { if (!((parent instanceof SOAP11FaultSubCodeImpl) || (parent instanceof SOAP11FaultCodeImpl))) { throw new SOAPProcessingException( "Expecting SOAP11FaultSubCodeImpl or SOAP11FaultCodeImpl, got " + subCode.getClass()); } super.setSubCode(subCode); } public void setValue(SOAPFaultValue soapFaultSubCodeValue) throws SOAPProcessingException { if (!(soapFaultSubCodeValue instanceof SOAP11FaultValueImpl)) { throw new SOAPProcessingException( "Expecting SOAP11FaultValueImpl, got " + soapFaultSubCodeValue.getClass()); } super.setValue(soapFaultSubCodeValue); } } ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11HeaderImpl.javaaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11HeaderImpl0000644000000000000000000000677111131637472031416 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.llom.soap11; import org.apache.axiom.om.OMException; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.om.impl.OMNodeEx; import org.apache.axiom.om.impl.traverse.OMChildrenWithSpecificAttributeIterator; import org.apache.axiom.soap.SOAP11Constants; import org.apache.axiom.soap.SOAPEnvelope; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPHeaderBlock; import org.apache.axiom.soap.SOAPProcessingException; import org.apache.axiom.soap.impl.llom.SOAPHeaderImpl; import javax.xml.namespace.QName; import java.util.Iterator; public class SOAP11HeaderImpl extends SOAPHeaderImpl { public SOAP11HeaderImpl(SOAPFactory factory) throws SOAPProcessingException { super(factory.getNamespace(), factory); } /** @param envelope */ public SOAP11HeaderImpl(SOAPEnvelope envelope, SOAPFactory factory) throws SOAPProcessingException { super(envelope, factory); } /** * Constructor SOAPHeaderImpl * * @param envelope * @param builder */ public SOAP11HeaderImpl(SOAPEnvelope envelope, OMXMLParserWrapper builder, SOAPFactory factory) { super(envelope, builder, factory); } public SOAPHeaderBlock addHeaderBlock(String localName, OMNamespace ns) throws OMException { if (ns == null || ns.getNamespaceURI() == null || "".equals(ns.getNamespaceURI())) { throw new OMException( "All the SOAP Header blocks should be namespace qualified"); } OMNamespace namespace = findNamespace(ns.getNamespaceURI(), ns.getPrefix()); if (namespace != null) { ns = namespace; } SOAPHeaderBlock soapHeaderBlock = null; try { soapHeaderBlock = new SOAP11HeaderBlockImpl(localName, ns, this, (SOAPFactory) this.factory); } catch (SOAPProcessingException e) { throw new OMException(e); } ((OMNodeEx) soapHeaderBlock).setComplete(true); return soapHeaderBlock; } public Iterator extractHeaderBlocks(String role) { return new OMChildrenWithSpecificAttributeIterator(getFirstOMChild(), new QName( SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI, SOAP11Constants.ATTR_ACTOR), role, true); } } ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11BodyImpl.javaaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11BodyImpl.j0000644000000000000000000000400311131637472031335 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.llom.soap11; import org.apache.axiom.om.OMException; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.soap.SOAPConstants; import org.apache.axiom.soap.SOAPEnvelope; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPFault; import org.apache.axiom.soap.SOAPProcessingException; import org.apache.axiom.soap.impl.llom.SOAPBodyImpl; public class SOAP11BodyImpl extends SOAPBodyImpl { /** @param envelope */ public SOAP11BodyImpl(SOAPEnvelope envelope, SOAPFactory factory) throws SOAPProcessingException { super(envelope, factory); } public SOAP11BodyImpl(SOAPFactory factory) throws SOAPProcessingException { super(SOAPConstants.BODY_LOCAL_NAME, factory.getNamespace(), factory); } /** * Constructor SOAPBodyImpl * * @param envelope * @param builder */ public SOAP11BodyImpl(SOAPEnvelope envelope, OMXMLParserWrapper builder, SOAPFactory factory) { super(envelope, builder, factory); } public SOAPFault addFault(Exception e) throws OMException { return ((SOAP11Factory) this.factory).createSOAPFault(this, e); } } ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11HeaderBlockImpl.javaaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11HeaderBloc0000644000000000000000000001467711131637472031400 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.llom.soap11; import org.apache.axiom.om.OMDataSource; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.soap.SOAP11Constants; import org.apache.axiom.soap.SOAPConstants; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPHeader; import org.apache.axiom.soap.SOAPProcessingException; import org.apache.axiom.soap.SOAPVersion; import org.apache.axiom.soap.SOAP11Version; import org.apache.axiom.soap.impl.llom.SOAPHeaderBlockImpl; public class SOAP11HeaderBlockImpl extends SOAPHeaderBlockImpl { public SOAP11HeaderBlockImpl(String localName, OMNamespace ns, SOAPFactory factory) { super(localName, ns, factory); } public SOAP11HeaderBlockImpl(String localName, OMNamespace ns, SOAPFactory factory, OMDataSource ds) { super(localName, ns, factory, ds); } /** * @param localName * @param ns */ public SOAP11HeaderBlockImpl(String localName, OMNamespace ns, SOAPHeader parent, SOAPFactory factory) throws SOAPProcessingException { super(localName, ns, parent, factory); checkParent(parent); } /** * Constructor SOAPHeaderBlockImpl * * @param localName * @param ns * @param parent * @param builder */ public SOAP11HeaderBlockImpl(String localName, OMNamespace ns, OMElement parent, OMXMLParserWrapper builder, SOAPFactory factory) { super(localName, ns, parent, builder, factory); } protected void checkParent(OMElement parent) throws SOAPProcessingException { if (!(parent instanceof SOAP11HeaderImpl)) { throw new SOAPProcessingException( "Expecting SOAP11HeaderImpl, got " + parent.getClass()); } } public void setRole(String roleURI) { setAttribute(SOAP11Constants.ATTR_ACTOR, roleURI, SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI); } public String getRole() { // Get the property or attribute String val; if (this.hasOMDataSourceProperty(ROLE_PROPERTY)) { val = this.getOMDataSourceProperty(ROLE_PROPERTY); } else { val = getAttribute(SOAP11Constants.ATTR_ACTOR, SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI); } return val; } public void setMustUnderstand(boolean mustUnderstand) { setAttribute(SOAPConstants.ATTR_MUSTUNDERSTAND, mustUnderstand ? "1" : "0", SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI); } public void setMustUnderstand(String mustUnderstand) throws SOAPProcessingException { if (SOAPConstants.ATTR_MUSTUNDERSTAND_TRUE.equals(mustUnderstand) || SOAPConstants.ATTR_MUSTUNDERSTAND_FALSE.equals(mustUnderstand) || SOAPConstants.ATTR_MUSTUNDERSTAND_0.equals(mustUnderstand) || SOAPConstants.ATTR_MUSTUNDERSTAND_1.equals(mustUnderstand)) { setAttribute(SOAPConstants.ATTR_MUSTUNDERSTAND, mustUnderstand, SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI); } else { throw new SOAPProcessingException( "mustUndertand should be one of \"true\", \"false\", \"0\" or \"1\" "); } } /** * Returns whether the mustUnderstand attribute for this SOAPHeaderBlock object is * turned on. * * @return true if the mustUnderstand attribute of this * SOAPHeaderBlock object is turned on; false otherwise */ public boolean getMustUnderstand() throws SOAPProcessingException { // First, try getting the information from the property // Fallback to getting the information from the attribute String mustUnderstand; if (this.hasOMDataSourceProperty(MUST_UNDERSTAND_PROPERTY)) { mustUnderstand = this.getOMDataSourceProperty(this.MUST_UNDERSTAND_PROPERTY); } else { mustUnderstand = getAttribute(SOAPConstants.ATTR_MUSTUNDERSTAND, SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI); } // Parse the value if (mustUnderstand != null) { if (SOAPConstants.ATTR_MUSTUNDERSTAND_TRUE.equals(mustUnderstand) || SOAPConstants.ATTR_MUSTUNDERSTAND_1.equals(mustUnderstand)) { return true; } else if (SOAPConstants.ATTR_MUSTUNDERSTAND_FALSE.equals(mustUnderstand) || SOAPConstants.ATTR_MUSTUNDERSTAND_0.equals(mustUnderstand)) { return false; } else { throw new SOAPProcessingException( "Invalid value found in mustUnderstand value of " + this.getLocalName() + " header block"); } } return false; } public void setRelay(boolean relay) { throw new UnsupportedOperationException("Not supported for SOAP 1.1"); } public boolean getRelay() { throw new UnsupportedOperationException("Not supported for SOAP 1.1"); } public SOAPVersion getVersion() { return SOAP11Version.getSingleton(); } } ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11FaultImpl.javaaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11FaultImpl.0000644000000000000000000001155511131637472031353 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.llom.soap11; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.soap.SOAP11Constants; import org.apache.axiom.soap.SOAPBody; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPFault; import org.apache.axiom.soap.SOAPFaultCode; import org.apache.axiom.soap.SOAPFaultDetail; import org.apache.axiom.soap.SOAPFaultNode; import org.apache.axiom.soap.SOAPFaultReason; import org.apache.axiom.soap.SOAPFaultRole; import org.apache.axiom.soap.SOAPProcessingException; import org.apache.axiom.soap.impl.llom.SOAPFaultImpl; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamWriter; public class SOAP11FaultImpl extends SOAPFaultImpl { /** Eran Chinthaka (chinthaka@apache.org) */ public SOAP11FaultImpl(SOAPFactory factory) { super(factory.getNamespace(), factory); } public SOAP11FaultImpl(SOAPBody parent, Exception e, SOAPFactory factory) throws SOAPProcessingException { super(parent, e, factory); } public SOAP11FaultImpl(SOAPBody parent, OMXMLParserWrapper builder, SOAPFactory factory) { super(parent, builder, factory); } /** * This is a convenience method for the SOAP Fault Impl. * * @param parent */ public SOAP11FaultImpl(SOAPBody parent, SOAPFactory factory) throws SOAPProcessingException { super(parent, factory); } protected SOAPFaultDetail getNewSOAPFaultDetail(SOAPFault fault) throws SOAPProcessingException { return new SOAP11FaultDetailImpl(fault, (SOAPFactory) this.factory); } public void setCode(SOAPFaultCode soapFaultCode) throws SOAPProcessingException { if (!(soapFaultCode instanceof SOAP11FaultCodeImpl)) { throw new SOAPProcessingException( "Expecting SOAP11FaultCodeImpl, got " + soapFaultCode.getClass()); } super.setCode(soapFaultCode); } public void setReason(SOAPFaultReason reason) throws SOAPProcessingException { if (!(reason instanceof SOAP11FaultReasonImpl)) { throw new SOAPProcessingException( "Expecting SOAP11FaultReasonImpl, got " + reason.getClass()); } super.setReason(reason); } public void setNode(SOAPFaultNode node) throws SOAPProcessingException { throw new UnsupportedOperationException("SOAP 1.1 has no SOAP Fault Node"); } public void setRole(SOAPFaultRole role) throws SOAPProcessingException { if (!(role instanceof SOAP11FaultRoleImpl)) { throw new SOAPProcessingException( "Expecting SOAP11FaultRoleImpl, got " + role.getClass()); } super.setRole(role); } protected void checkParent(OMElement parent) throws SOAPProcessingException { if (!(parent instanceof SOAP11BodyImpl)) { throw new SOAPProcessingException( "Expecting SOAP11BodyImpl, got " + parent.getClass()); } } public void setDetail(SOAPFaultDetail detail) throws SOAPProcessingException { if (!(detail instanceof SOAP11FaultDetailImpl)) { throw new SOAPProcessingException( "Expecting SOAP11FaultDetailImpl, got " + detail.getClass()); } super.setDetail(detail); } protected void serializeFaultNode(XMLStreamWriter writer) throws XMLStreamException { } public SOAPFaultCode getCode() { return (SOAPFaultCode) getFirstChildWithName(SOAP11Constants.QNAME_FAULT_CODE); } public SOAPFaultReason getReason() { return (SOAPFaultReason) getFirstChildWithName(SOAP11Constants.QNAME_FAULT_REASON); } public SOAPFaultNode getNode() { return null; } public SOAPFaultRole getRole() { return (SOAPFaultRole) getFirstChildWithName(SOAP11Constants.QNAME_FAULT_ROLE); } public SOAPFaultDetail getDetail() { return (SOAPFaultDetail) getFirstChildWithName(SOAP11Constants.QNAME_FAULT_DETAIL); } } axiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPFaultNodeImpl.java0000644000000000000000000000425511131637472031554 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.llom; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.om.impl.OMNodeEx; import org.apache.axiom.om.impl.serialize.StreamWriterToContentHandlerConverter; import org.apache.axiom.om.impl.util.OMSerializerUtil; import org.apache.axiom.soap.SOAP12Constants; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPFault; import org.apache.axiom.soap.SOAPFaultNode; import org.apache.axiom.soap.SOAPProcessingException; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamWriter; public abstract class SOAPFaultNodeImpl extends SOAPElement implements SOAPFaultNode { protected SOAPFaultNodeImpl(OMNamespace ns, SOAPFactory factory) { super(SOAP12Constants.SOAP_FAULT_NODE_LOCAL_NAME, ns, factory); } public SOAPFaultNodeImpl(SOAPFault parent, SOAPFactory factory) throws SOAPProcessingException { super(parent, SOAP12Constants.SOAP_FAULT_NODE_LOCAL_NAME, true, factory); } public SOAPFaultNodeImpl(SOAPFault parent, OMXMLParserWrapper builder, SOAPFactory factory) { super(parent, SOAP12Constants.SOAP_FAULT_NODE_LOCAL_NAME, builder, factory); } public void setNodeValue(String uri) { this.setText(uri); } public String getNodeValue() { return this.getText(); } } ././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPFaultValueImpl.javaaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPFaultValueImpl.java0000644000000000000000000000457711131637472031752 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.llom; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.soap.SOAP12Constants; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPFaultValue; import org.apache.axiom.soap.SOAPProcessingException; public abstract class SOAPFaultValueImpl extends SOAPElement implements SOAPFaultValue { protected SOAPFaultValueImpl(OMElement parent, SOAPFactory factory) throws SOAPProcessingException { super(parent, SOAP12Constants.SOAP_FAULT_VALUE_LOCAL_NAME, true, factory); } protected SOAPFaultValueImpl(OMNamespace ns, SOAPFactory factory) { super(SOAP12Constants.SOAP_FAULT_VALUE_LOCAL_NAME, ns, factory); } protected SOAPFaultValueImpl(OMElement parent, OMXMLParserWrapper builder, SOAPFactory factory) { super(parent, SOAP12Constants.SOAP_FAULT_VALUE_LOCAL_NAME, builder, factory); } protected SOAPFaultValueImpl(String localName, OMElement parent, SOAPFactory factory) throws SOAPProcessingException { super(parent, localName, true, factory); } protected SOAPFaultValueImpl(OMNamespace ns, String localName, SOAPFactory factory) { super(localName, ns, factory); } protected SOAPFaultValueImpl(OMElement parent, String localName, OMXMLParserWrapper builder, SOAPFactory factory) { super(parent, localName, builder, factory); } } ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPFaultSubCodeImpl.javaaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPFaultSubCodeImpl.ja0000644000000000000000000000542411131637472031663 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.llom; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.om.util.ElementHelper; import org.apache.axiom.soap.SOAP12Constants; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPFaultSubCode; import org.apache.axiom.soap.SOAPFaultValue; import org.apache.axiom.soap.SOAPProcessingException; public abstract class SOAPFaultSubCodeImpl extends SOAPElement implements SOAPFaultSubCode { protected SOAPFaultValue value; protected SOAPFaultSubCode subCode; protected SOAPFaultSubCodeImpl(OMNamespace ns, SOAPFactory factory) { super(SOAP12Constants.SOAP_FAULT_SUB_CODE_LOCAL_NAME, ns, factory); } protected SOAPFaultSubCodeImpl(OMElement parent, String localName, SOAPFactory factory) throws SOAPProcessingException { super(parent, localName, true, factory); } protected SOAPFaultSubCodeImpl(OMElement parent, String localName, OMXMLParserWrapper builder, SOAPFactory factory) { super(parent, localName, builder, factory); } public void setValue(SOAPFaultValue soapFaultSubCodeValue) throws SOAPProcessingException { ElementHelper.setNewElement(this, value, soapFaultSubCodeValue); } public SOAPFaultValue getValue() { if (value == null) { value = (SOAPFaultValue)getFirstChildWithName(SOAP12Constants.QNAME_FAULT_VALUE); } return value; } public void setSubCode(SOAPFaultSubCode subCode) throws SOAPProcessingException { ElementHelper.setNewElement(this, this.subCode, subCode); } public SOAPFaultSubCode getSubCode() { if (subCode == null) { subCode = (SOAPFaultSubCode)getFirstChildWithName(SOAP12Constants.QNAME_FAULT_SUBCODE); } return subCode; } } axiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPTextImpl.java0000644000000000000000000000345311131637472030616 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.llom; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.soap.SOAP12Constants; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPProcessingException; public class SOAPTextImpl extends SOAPElement { protected SOAPTextImpl(OMElement parent, SOAPFactory factory) throws SOAPProcessingException { super(parent, SOAP12Constants.SOAP_FAULT_TEXT_LOCAL_NAME, true, factory); } protected SOAPTextImpl(OMElement parent, OMXMLParserWrapper builder, SOAPFactory factory) { super(parent, SOAP12Constants.SOAP_FAULT_TEXT_LOCAL_NAME, builder, factory); } public void setLang(String lang) { // TODO : Chinthaka fix me } public String getLang() { // TODO Chinthaka fix me return null; } protected void checkParent(OMElement parent) throws SOAPProcessingException { // do nothing } } axiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPHeaderImpl.java0000644000000000000000000004035511131637472031064 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.llom; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMException; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMNode; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.soap.RolePlayer; import org.apache.axiom.soap.SOAP12Constants; import org.apache.axiom.soap.SOAP12Version; import org.apache.axiom.soap.SOAPConstants; import org.apache.axiom.soap.SOAPEnvelope; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPHeader; import org.apache.axiom.soap.SOAPHeaderBlock; import org.apache.axiom.soap.SOAPProcessingException; import org.apache.axiom.soap.SOAPVersion; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import java.util.ArrayList; import java.util.Iterator; import java.util.List; /** * A local interface we can use to make "header checker" objects which can be used by * HeaderIterators to filter results. This really SHOULD be done with anonymous classes: *

* public void getHeadersByRole(final String role) { * return new HeaderIterator() { * public boolean checkHeader(SOAPHeaderBlock header) { * ... * if (role.equals(headerRole)) return true; * return false; * } * } * } *

* ...but there appears to be some kind of weird problem with the JVM not correctly scoping the * passed "role" value in a situation like the above. As such, we have to make Checker objects * instead (sigh). */ interface Checker { boolean checkHeader(SOAPHeaderBlock header); } /** * A Checker to make sure headers match a given role. If the role we're looking for is null, then * everything matches. */ class RoleChecker implements Checker { String role; public RoleChecker(String role) { this.role = role; } public boolean checkHeader(SOAPHeaderBlock header) { if (role == null) { return true; } String thisRole = header.getRole(); return (role.equals(thisRole)); } } /** * This Checker uses a RolePlayer to return the appropriate headers for that RolePlayer to process. * Ignore "none", always "next", etc. */ class RolePlayerChecker implements Checker { RolePlayer rolePlayer; /** Optional namespace - if non-null we'll only return headers that match */ String namespace; /** * Constructor. * * @param rolePlayer the RolePlayer to check against. This can be null, in which * case we assume we're the ultimate destination. */ public RolePlayerChecker(RolePlayer rolePlayer) { this.rolePlayer = rolePlayer; } public RolePlayerChecker(RolePlayer rolePlayer, String namespace) { this.rolePlayer = rolePlayer; this.namespace = namespace; } public boolean checkHeader(SOAPHeaderBlock header) { // If we're filtering on namespace, check that first since the compare is simpler. if (namespace != null) { OMNamespace headerNamespace = header.getNamespace(); if (headerNamespace == null || !namespace.equals(headerNamespace.getNamespaceURI())) { return false; } } String role = header.getRole(); SOAPVersion version = header.getVersion(); // 1. If role is ultimatedest, go by what the rolePlayer says if (role == null || role.equals("") || (version instanceof SOAP12Version && role.equals(SOAP12Constants.SOAP_ROLE_ULTIMATE_RECEIVER))) { return (rolePlayer == null || rolePlayer.isUltimateDestination()); } // 2. If role is next, always return true if (role.equals(version.getNextRoleURI())) return true; // 3. If role is none, always return false if (version instanceof SOAP12Version && role.equals(SOAP12Constants.SOAP_ROLE_NONE)) { return false; } // 4. Return t/f depending on match List roles = (rolePlayer == null) ? null : rolePlayer.getRoles(); if (roles != null) { for (Iterator i = roles.iterator(); i.hasNext();) { String thisRole = (String) i.next(); if (thisRole.equals(role)) return true; } } return false; } } /** A Checker to see that we both match a given role AND are mustUnderstand=true */ class MURoleChecker extends RoleChecker { public MURoleChecker(String role) { super(role); } public boolean checkHeader(SOAPHeaderBlock header) { if (header.getMustUnderstand()) return super.checkHeader(header); return false; } } /** A class representing the SOAP Header, primarily allowing access to the contained HeaderBlocks. */ public abstract class SOAPHeaderImpl extends SOAPElement implements SOAPHeader { static Log log = LogFactory.getLog(SOAPHeaderImpl.class); /** An Iterator which walks the header list as needed, potentially filtering as we traverse. */ class HeaderIterator implements Iterator { SOAPHeaderBlock current; boolean advance = false; Checker checker; public HeaderIterator() { this(null); } public HeaderIterator(Checker checker) { this.checker = checker; current = (SOAPHeaderBlock) getFirstElement(); if (current != null) { if (!checkHeader(current)) { advance = true; hasNext(); } } } public void remove() { } public boolean checkHeader(SOAPHeaderBlock header) { if (checker == null) return true; return checker.checkHeader(header); } public boolean hasNext() { if (!advance) { return current != null; } advance = false; OMNode sibling = current.getNextOMSibling(); while (sibling != null) { if (sibling instanceof SOAPHeaderBlock) { SOAPHeaderBlock possible = (SOAPHeaderBlock) sibling; if (checkHeader(possible)) { current = (SOAPHeaderBlock) sibling; return true; } } sibling = sibling.getNextOMSibling(); } current = null; return false; } public Object next() { SOAPHeaderBlock ret = current; if (ret != null) { advance = true; hasNext(); } return ret; } } protected SOAPHeaderImpl(OMNamespace ns, SOAPFactory factory) { super(SOAPConstants.HEADER_LOCAL_NAME, ns, factory); } public SOAPHeaderImpl(SOAPEnvelope envelope, SOAPFactory factory) throws SOAPProcessingException { super(envelope, SOAPConstants.HEADER_LOCAL_NAME, true, factory); } /** * Constructor SOAPHeaderImpl * * @param envelope * @param builder */ public SOAPHeaderImpl(SOAPEnvelope envelope, OMXMLParserWrapper builder, SOAPFactory factory) { super(envelope, SOAPConstants.HEADER_LOCAL_NAME, builder, factory); } /** * Creates a new SOAPHeaderBlock object initialized with the specified name and * adds it to this SOAPHeader object. * * @param localName * @param ns * @return the new SOAPHeaderBlock object that was inserted into this * SOAPHeader object * @throws org.apache.axiom.om.OMException * if a SOAP error occurs * @throws OMException */ public abstract SOAPHeaderBlock addHeaderBlock(String localName, OMNamespace ns) throws OMException; /** * Get the appropriate set of headers for a RolePlayer. *

* The RolePlayer indicates whether it is the ultimate destination (in which case headers with * no role or the explicit UltimateDestination role will be included), and any non-standard * roles it supports. Headers targeted to "next" will always be included, and those targeted to * "none" (for SOAP 1.2) will never be included. * * @return an Iterator over all the HeaderBlocks this RolePlayer should process. */ public Iterator getHeadersToProcess(RolePlayer rolePlayer) { return new HeaderIterator(new RolePlayerChecker(rolePlayer)); } /** * Get the appropriate set of headers for a RolePlayer. *

* The RolePlayer indicates whether it is the ultimate destination (in which case headers with * no role or the explicit UltimateDestination role will be included), and any non-standard * roles it supports. Headers targeted to "next" will always be included, and those targeted to * "none" (for SOAP 1.2) will never be included. * * @param rolePlayer a RolePlayer containing our role configuration * @param namespace if specified, we'll only return headers from this namespace * @return an Iterator over all the HeaderBlocks this RolePlayer should process. */ public Iterator getHeadersToProcess(RolePlayer rolePlayer, String namespace) { return new HeaderIterator(new RolePlayerChecker(rolePlayer, namespace)); } /** * Returns a list of all the SOAPHeaderBlock objects in this * SOAPHeader object that have the the specified actor. An actor is a global * attribute that indicates the intermediate parties to whom the message should be sent. An * actor receives the message and then sends it to the next actor. The default actor is the * ultimate intended recipient for the message, so if no actor attribute is included in a * SOAPHeader object, the message is sent to its ultimate destination. * * @param role a String giving the URI of the actor for which to search * @return an Iterator object over all the SOAPHeaderBlock objects * that contain the specified actor * @see #extractHeaderBlocks(String) extractHeaderBlocks(java.lang.String) */ public Iterator examineHeaderBlocks(final String role) { return new HeaderIterator(new RoleChecker(role)); } /** * Returns a list of all the SOAPHeaderBlock objects in this * SOAPHeader object that have the the specified role and detaches them from this * SOAPHeader object.

This method allows an role to process only the parts of * the SOAPHeader object that apply to it and to remove them before passing the * message on to the next role. * * @param role a String giving the URI of the role for which to search * @return an Iterator object over all the SOAPHeaderBlock objects * that contain the specified role * @see #examineHeaderBlocks(String) examineHeaderBlocks(java.lang.String) */ public abstract Iterator extractHeaderBlocks(String role); /** * Returns an Iterator over all the SOAPHeaderBlock objects in this * SOAPHeader object that have the specified actor and that have a MustUnderstand * attribute whose value is equivalent to true. * * @param actor a String giving the URI of the actor for which to search * @return an Iterator object over all the SOAPHeaderBlock objects * that contain the specified actor and are marked as MustUnderstand */ public Iterator examineMustUnderstandHeaderBlocks(final String actor) { return new HeaderIterator(new MURoleChecker(actor)); } /** * Returns an Iterator over all the SOAPHeaderBlock objects in this * SOAPHeader object. Not that this will return elements containing the QName * (http://schemas.xmlsoap.org/soap/envelope/, Header) * * @return an Iterator object over all the SOAPHeaderBlock objects * contained by this SOAPHeader */ public Iterator examineAllHeaderBlocks() { class DefaultChecker implements Checker { public boolean checkHeader(SOAPHeaderBlock header) { return true; } } return new HeaderIterator(new DefaultChecker()); } /** * Returns an Iterator over all the SOAPHeaderBlock objects in this * SOAPHeader object and detaches them from this SOAPHeader object. * * @return an Iterator object over all the SOAPHeaderBlock objects * contained by this SOAPHeader */ public Iterator extractAllHeaderBlocks() { throw new UnsupportedOperationException(); // TODO implement this } public ArrayList getHeaderBlocksWithNSURI(String nsURI) { ArrayList headers = null; OMNode node; OMElement header = this.getFirstElement(); if (header != null) { headers = new ArrayList(); } node = header; while (node != null) { if (node.getType() == OMNode.ELEMENT_NODE) { header = (OMElement) node; OMNamespace namespace = header.getNamespace(); if (nsURI == null) { if (namespace == null) { headers.add(header); } } else { if (namespace != null) { if (nsURI.equals(namespace.getNamespaceURI())) { headers.add(header); } } } } node = node.getNextOMSibling(); } return headers; } protected void checkParent(OMElement parent) throws SOAPProcessingException { if (!(parent instanceof SOAPEnvelopeImpl)) { throw new SOAPProcessingException( "Expecting an implementation of SOAP Envelope as the parent. But received some other implementation"); } } public void addChild(OMNode child) { // Make sure a proper element is added. The children of a SOAPHeader should be // SOAPHeaderBlock objects. // Due to legacy usages (AXIS2 has a lot of tests that violate this constraint) // I am only going to log an exception when debug is enabled. if (log.isDebugEnabled()) { if (child instanceof OMElement && !(child instanceof SOAPHeaderBlock)) { Exception e = new SOAPProcessingException( "An attempt was made to add a normal OMElement as a child of a SOAPHeader." + " This is not supported. The child should be a SOAPHeaderBlock."); log.debug(exceptionToString(e)); } } super.addChild(child); } public static String exceptionToString(Throwable e) { java.io.StringWriter sw = new java.io.StringWriter(); java.io.BufferedWriter bw = new java.io.BufferedWriter(sw); java.io.PrintWriter pw = new java.io.PrintWriter(bw); e.printStackTrace(pw); pw.close(); String text = sw.getBuffer().toString(); return text; } } axiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPBodyImpl.java0000644000000000000000000001774211131637472030575 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.llom; import org.apache.axiom.om.OMConstants; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMException; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMNode; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.soap.SOAP11Constants; import org.apache.axiom.soap.SOAP12Constants; import org.apache.axiom.soap.SOAPBody; import org.apache.axiom.soap.SOAPConstants; import org.apache.axiom.soap.SOAPEnvelope; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPFault; import org.apache.axiom.soap.SOAPProcessingException; import org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder; import javax.xml.stream.XMLStreamConstants; /** Class SOAPBodyImpl */ public abstract class SOAPBodyImpl extends SOAPElement implements SOAPBody, OMConstants { /** Field hasSOAPFault */ private boolean hasSOAPFault = false; private boolean enableLookAhead = true; private boolean lookAheadAttempted = false; private boolean lookAheadSuccessful = false; private String lookAheadLocalName = null; private OMNamespace lookAheadNS = null; protected SOAPBodyImpl(String localName, OMNamespace ns, SOAPFactory factory) { super(localName, ns, factory); } /** @param envelope */ public SOAPBodyImpl(SOAPEnvelope envelope, SOAPFactory factory) throws SOAPProcessingException { super(envelope, SOAPConstants.BODY_LOCAL_NAME, true, factory); } /** * Constructor SOAPBodyImpl * * @param envelope * @param builder */ public SOAPBodyImpl(SOAPEnvelope envelope, OMXMLParserWrapper builder, SOAPFactory factory) { super(envelope, SOAPConstants.BODY_LOCAL_NAME, builder, factory); } /** * Creates a new SOAPFault object and adds it to this SOAPBody * object. * * @param e * @return the new SOAPFault object * @throws org.apache.axiom.om.OMException * if there is a SOAP error * @throws OMException */ public abstract SOAPFault addFault(Exception e) throws OMException; /** * Indicates whether a SOAPFault object exists in this SOAPBody * object. * * @return true if a SOAPFault object exists in this * SOAPBody object; false otherwise */ public boolean hasFault() { if (hasSOAPFault) { return true; } else { // Set hasSOAPFault if it matches the name matches a SOAP Fault String name = this.getFirstElementLocalName(); if (SOAPConstants.SOAPFAULT_LOCAL_NAME.equals(name)) { OMNamespace ns = this.getFirstElementNS(); if (ns != null && (SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(ns.getNamespaceURI()) || SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(ns.getNamespaceURI()))) { hasSOAPFault = true; } } return hasSOAPFault; } } /** * Returns the SOAPFault object in this SOAPBody object. * * @return the SOAPFault object in this SOAPBody object */ public SOAPFault getFault() { OMElement element = getFirstElement(); if (hasSOAPFault) { return (SOAPFault) element; } else if (element != null && SOAPConstants.SOAPFAULT_LOCAL_NAME.equals( element.getLocalName()) && (SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals( element.getNamespace().getNamespaceURI()) || SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals( element.getNamespace().getNamespaceURI()))) { //added this line hasSOAPFault = true; return (SOAPFault) element; } else { return null; } } /** * @param soapFault * @throws org.apache.axiom.om.OMException * * @throws OMException */ public void addFault(SOAPFault soapFault) throws OMException { if (hasSOAPFault) { throw new OMException( "SOAP Body already has a SOAP Fault and there can not be more than one SOAP fault"); } addChild(soapFault); hasSOAPFault = true; } protected void checkParent(OMElement parent) throws SOAPProcessingException { if (!(parent instanceof SOAPEnvelopeImpl)) { throw new SOAPProcessingException( "Expecting an implementation of SOAP Envelope as the parent. But received some other implementation"); } } public OMNode detach() throws OMException { throw new SOAPProcessingException( "Can not detach SOAP Body, SOAP Envelope must have a Body !!"); } /* * Overridden so that we can detect when a child element is built */ public void buildNext() { if (builder != null) { int token = builder.next(); if (token == XMLStreamConstants.START_ELEMENT) { enableLookAhead = false; } } } private boolean hasLookahead() { if (!enableLookAhead) { return false; } if (lookAheadAttempted) { return lookAheadSuccessful; } lookAheadAttempted = true; StAXSOAPModelBuilder soapBuilder = (StAXSOAPModelBuilder) this.builder; if (soapBuilder != null && soapBuilder.isCache() && !soapBuilder.isCompleted() && !soapBuilder.isClosed()) { lookAheadSuccessful = soapBuilder.lookahead(); if (lookAheadSuccessful) { this.lookAheadLocalName = soapBuilder.getName(); String ns = soapBuilder.getNamespace(); ns = (ns == null) ? "" : ns; this.lookAheadNS = factory.createOMNamespace(ns, soapBuilder.getPrefix()); } } return lookAheadSuccessful; } public OMNamespace getFirstElementNS() { if (hasLookahead()) { return this.lookAheadNS; } else { OMElement element = this.getFirstElement(); if (element == null) { return null; } else { return element.getNamespace(); } } } public String getFirstElementLocalName() { if (hasLookahead()) { return this.lookAheadLocalName; } else { OMElement element = this.getFirstElement(); if (element == null) { return null; } else { return element.getLocalName(); } } } public void addChild(OMNode child) { this.enableLookAhead = false; super.addChild(child); } } axiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/0000755000000000000000000000000011131637472026622 5ustar rootroot././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12FaultTextImpl.javaaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12FaultTextI0000644000000000000000000000373511131637472031434 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.llom.soap12; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPFaultReason; import org.apache.axiom.soap.SOAPProcessingException; import org.apache.axiom.soap.impl.llom.SOAPFaultTextImpl; public class SOAP12FaultTextImpl extends SOAPFaultTextImpl { public SOAP12FaultTextImpl(SOAPFaultReason parent, SOAPFactory factory) throws SOAPProcessingException { super(parent, factory); } public SOAP12FaultTextImpl(SOAPFactory factory) throws SOAPProcessingException { super(factory.getNamespace(), factory); } public SOAP12FaultTextImpl(SOAPFaultReason parent, OMXMLParserWrapper builder, SOAPFactory factory) { super(parent, builder, factory); } protected void checkParent(OMElement parent) throws SOAPProcessingException { if (!(parent instanceof SOAP12FaultReasonImpl)) { throw new SOAPProcessingException( "Expecting SOAP12FaultReasonImpl as parent, got " + parent.getClass()); } } } ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12FaultRoleImpl.javaaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12FaultRoleI0000644000000000000000000000441511131637472031405 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.llom.soap12; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.om.impl.util.OMSerializerUtil; import org.apache.axiom.soap.SOAP11Constants; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPFault; import org.apache.axiom.soap.SOAPProcessingException; import org.apache.axiom.soap.impl.llom.SOAPFaultRoleImpl; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamWriter; public class SOAP12FaultRoleImpl extends SOAPFaultRoleImpl { public SOAP12FaultRoleImpl(SOAPFault parent, SOAPFactory factory) throws SOAPProcessingException { super(parent, true, factory); } public SOAP12FaultRoleImpl(SOAPFactory factory) { super(factory.getNamespace(), factory); } public SOAP12FaultRoleImpl(SOAPFault parent, OMXMLParserWrapper builder, SOAPFactory factory) { super(parent, builder, factory); } protected void checkParent(OMElement parent) throws SOAPProcessingException { if (!(parent instanceof SOAP12FaultImpl)) { throw new SOAPProcessingException( "Expecting SOAP12FaultImpl, got " + parent.getClass()); } } protected void internalSerialize(XMLStreamWriter writer, boolean cache) throws XMLStreamException { this.registerContentHandler(writer); super.internalSerialize(writer, cache); } } ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12FaultImpl.javaaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12FaultImpl.0000644000000000000000000001241411131637472031350 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.llom.soap12; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.soap.SOAPBody; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPFault; import org.apache.axiom.soap.SOAPFaultCode; import org.apache.axiom.soap.SOAPFaultDetail; import org.apache.axiom.soap.SOAPFaultNode; import org.apache.axiom.soap.SOAPFaultReason; import org.apache.axiom.soap.SOAPFaultRole; import org.apache.axiom.soap.SOAPProcessingException; import org.apache.axiom.soap.SOAP12Constants; import org.apache.axiom.soap.impl.llom.SOAPFaultImpl; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamWriter; public class SOAP12FaultImpl extends SOAPFaultImpl { /** Eran Chinthaka (chinthaka@apache.org) */ public SOAP12FaultImpl(SOAPFactory factory) { super(factory.getNamespace(), factory); } public SOAP12FaultImpl(SOAPBody parent, Exception e, SOAPFactory factory) throws SOAPProcessingException { super(parent, e, factory); } public SOAP12FaultImpl(SOAPBody parent, OMXMLParserWrapper builder, SOAPFactory factory) { super(parent, builder, factory); } /** * This is a convenience method for the SOAP Fault Impl. * * @param parent */ public SOAP12FaultImpl(SOAPBody parent, SOAPFactory factory) throws SOAPProcessingException { super(parent, factory); } protected SOAPFaultDetail getNewSOAPFaultDetail(SOAPFault fault) { return new SOAP12FaultDetailImpl(fault, (SOAPFactory) this.factory); } public void setCode(SOAPFaultCode soapFaultCode) throws SOAPProcessingException { if (!(soapFaultCode instanceof SOAP12FaultCodeImpl)) { throw new SOAPProcessingException( "Expecting SOAP12FaultCodeImpl, got " + soapFaultCode.getClass()); } super.setCode(soapFaultCode); } public void setReason(SOAPFaultReason reason) throws SOAPProcessingException { if (!(reason instanceof SOAP12FaultReasonImpl)) { throw new SOAPProcessingException( "Expecting SOAP12FaultReasonImpl, got " + reason.getClass()); } super.setReason(reason); } public void setNode(SOAPFaultNode node) throws SOAPProcessingException { if (!(node instanceof SOAP12FaultNodeImpl)) { throw new SOAPProcessingException( "Expecting SOAP12FaultNodeImpl, got " + node.getClass()); } super.setNode(node); } public void setRole(SOAPFaultRole role) throws SOAPProcessingException { if (!(role instanceof SOAP12FaultRoleImpl)) { throw new SOAPProcessingException( "Expecting SOAP12FaultRoleImpl, got " + role.getClass()); } super.setRole(role); } public void setDetail(SOAPFaultDetail detail) throws SOAPProcessingException { if (!(detail instanceof SOAP12FaultDetailImpl)) { throw new SOAPProcessingException( "Expecting SOAP12FaultDetailImpl, got " + detail.getClass()); } super.setDetail(detail); } protected void checkParent(OMElement parent) throws SOAPProcessingException { if (!(parent instanceof SOAP12BodyImpl)) { throw new SOAPProcessingException( "Expecting SOAP12BodyImpl, got " + parent.getClass()); } } protected void serializeFaultNode( XMLStreamWriter writer) throws XMLStreamException { SOAPFaultNode faultNode = getNode(); if (faultNode != null && faultNode.getText() != null && !"".equals(faultNode.getText())) { ((SOAP12FaultNodeImpl) faultNode).internalSerialize(writer); } } public SOAPFaultNode getNode() { return (SOAPFaultNode) getFirstChildWithName(SOAP12Constants.QNAME_FAULT_NODE); } public SOAPFaultCode getCode() { return (SOAPFaultCode) getFirstChildWithName(SOAP12Constants.QNAME_FAULT_CODE); } public SOAPFaultReason getReason() { return (SOAPFaultReason) getFirstChildWithName(SOAP12Constants.QNAME_FAULT_REASON); } public SOAPFaultRole getRole() { return (SOAPFaultRole) getFirstChildWithName(SOAP12Constants.QNAME_FAULT_ROLE); } public SOAPFaultDetail getDetail() { return (SOAPFaultDetail)getFirstChildWithName(SOAP12Constants.QNAME_FAULT_DETAIL); } } ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12FaultDetailImpl.javaaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12FaultDetai0000644000000000000000000000423211131637472031416 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.llom.soap12; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPFault; import org.apache.axiom.soap.SOAPProcessingException; import org.apache.axiom.soap.SOAP12Constants; import org.apache.axiom.soap.impl.llom.SOAPFaultDetailImpl; public class SOAP12FaultDetailImpl extends SOAPFaultDetailImpl { public SOAP12FaultDetailImpl(SOAPFactory factory) { super(factory.getNamespace(), factory); this.localName = SOAP12Constants.SOAP_FAULT_DETAIL_LOCAL_NAME; } public SOAP12FaultDetailImpl(SOAPFault parent, SOAPFactory factory) throws SOAPProcessingException { super(parent, true, factory); this.localName = SOAP12Constants.SOAP_FAULT_DETAIL_LOCAL_NAME; } public SOAP12FaultDetailImpl(SOAPFault parent, OMXMLParserWrapper builder, SOAPFactory factory) { super(parent, builder, factory); this.localName = SOAP12Constants.SOAP_FAULT_DETAIL_LOCAL_NAME; } protected void checkParent(OMElement parent) throws SOAPProcessingException { if (!(parent instanceof SOAP12FaultImpl)) { throw new SOAPProcessingException( "Expecting SOAP12FaultImpl as parent, got " + parent.getClass()); } } } ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12Factory.javaaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12Factory.ja0000644000000000000000000003010111131637472031366 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.llom.soap12; import org.apache.axiom.om.OMDataSource; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.om.impl.OMNamespaceImpl; import org.apache.axiom.om.impl.llom.factory.OMLinkedListImplFactory; import org.apache.axiom.soap.SOAP12Constants; import org.apache.axiom.soap.SOAPBody; import org.apache.axiom.soap.SOAPEnvelope; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPFault; import org.apache.axiom.soap.SOAPFaultCode; import org.apache.axiom.soap.SOAPFaultDetail; import org.apache.axiom.soap.SOAPFaultNode; import org.apache.axiom.soap.SOAPFaultReason; import org.apache.axiom.soap.SOAPFaultRole; import org.apache.axiom.soap.SOAPFaultSubCode; import org.apache.axiom.soap.SOAPFaultText; import org.apache.axiom.soap.SOAPFaultValue; import org.apache.axiom.soap.SOAPHeader; import org.apache.axiom.soap.SOAPHeaderBlock; import org.apache.axiom.soap.SOAPMessage; import org.apache.axiom.soap.SOAPProcessingException; import org.apache.axiom.soap.SOAPVersion; import org.apache.axiom.soap.SOAP12Version; import org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl; import org.apache.axiom.soap.impl.llom.SOAPMessageImpl; public class SOAP12Factory extends OMLinkedListImplFactory implements SOAPFactory { /** Eran Chinthaka (chinthaka@apache.org) */ public String getSoapVersionURI() { return SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI; } public SOAPVersion getSOAPVersion() { return SOAP12Version.getSingleton(); } public OMNamespace getNamespace() { return new OMNamespaceImpl(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI, SOAP12Constants.SOAP_DEFAULT_NAMESPACE_PREFIX); } public SOAPEnvelope createSOAPEnvelope() { return new SOAPEnvelopeImpl( new OMNamespaceImpl( SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI, SOAP12Constants.SOAP_DEFAULT_NAMESPACE_PREFIX), this); } public SOAPEnvelope createSOAPEnvelope(OMNamespace ns) { return new SOAPEnvelopeImpl(ns, this); } public SOAPHeader createSOAPHeader(SOAPEnvelope envelope) throws SOAPProcessingException { return new SOAP12HeaderImpl(envelope, this); } public SOAPHeader createSOAPHeader() throws SOAPProcessingException { return new SOAP12HeaderImpl(this); } public SOAPHeader createSOAPHeader(SOAPEnvelope envelope, OMXMLParserWrapper builder) { return new SOAP12HeaderImpl(envelope, builder, this); } public SOAPHeaderBlock createSOAPHeaderBlock(String localName, OMNamespace ns, SOAPHeader parent) throws SOAPProcessingException { return new SOAP12HeaderBlockImpl(localName, ns, parent, this); } public SOAPHeaderBlock createSOAPHeaderBlock(String localName, OMNamespace ns, SOAPHeader parent, OMXMLParserWrapper builder) throws SOAPProcessingException { return new SOAP12HeaderBlockImpl(localName, ns, parent, builder, this); } public SOAPFault createSOAPFault(SOAPBody parent, Exception e) throws SOAPProcessingException { return new SOAP12FaultImpl(parent, e, this); } public SOAPFault createSOAPFault(SOAPBody parent) throws SOAPProcessingException { return new SOAP12FaultImpl(parent, this); } public SOAPFault createSOAPFault() throws SOAPProcessingException { return new SOAP12FaultImpl(this); } public SOAPFault createSOAPFault(SOAPBody parent, OMXMLParserWrapper builder) { return new SOAP12FaultImpl(parent, builder, this); } public SOAPBody createSOAPBody(SOAPEnvelope envelope) throws SOAPProcessingException { return new SOAP12BodyImpl(envelope, this); } public SOAPBody createSOAPBody() throws SOAPProcessingException { return new SOAP12BodyImpl(this); } public SOAPBody createSOAPBody(SOAPEnvelope envelope, OMXMLParserWrapper builder) { return new SOAP12BodyImpl(envelope, builder, this); } public SOAPFaultCode createSOAPFaultCode(SOAPFault parent) throws SOAPProcessingException { return new SOAP12FaultCodeImpl(parent, this); } public SOAPFaultCode createSOAPFaultCode() throws SOAPProcessingException { return new SOAP12FaultCodeImpl(this); } public SOAPFaultCode createSOAPFaultCode(SOAPFault parent, OMXMLParserWrapper builder) { return new SOAP12FaultCodeImpl(parent, builder, this); } public SOAPFaultValue createSOAPFaultValue(SOAPFaultCode parent) throws SOAPProcessingException { return new SOAP12FaultValueImpl(parent, this); } public SOAPFaultValue createSOAPFaultValue() throws SOAPProcessingException { return new SOAP12FaultValueImpl(this); } public SOAPFaultValue createSOAPFaultValue(SOAPFaultCode parent, OMXMLParserWrapper builder) { return new SOAP12FaultValueImpl(parent, builder, this); } public SOAPHeaderBlock createSOAPHeaderBlock(String localName, OMNamespace ns) throws SOAPProcessingException { return new SOAP12HeaderBlockImpl(localName, ns, this); } public SOAPHeaderBlock createSOAPHeaderBlock(String localName, OMNamespace ns, OMDataSource ds) throws SOAPProcessingException { return new SOAP12HeaderBlockImpl(localName, ns, this, ds); } //added public SOAPFaultValue createSOAPFaultValue(SOAPFaultSubCode parent) throws SOAPProcessingException { return new SOAP12FaultValueImpl(parent, this); } //added public SOAPFaultValue createSOAPFaultValue(SOAPFaultSubCode parent, OMXMLParserWrapper builder) { return new SOAP12FaultValueImpl(parent, builder, this); } //changed public SOAPFaultSubCode createSOAPFaultSubCode(SOAPFaultCode parent) throws SOAPProcessingException { return new SOAP12FaultSubCodeImpl(parent, this); } public SOAPFaultSubCode createSOAPFaultSubCode() throws SOAPProcessingException { return new SOAP12FaultSubCodeImpl(this); } //changed public SOAPFaultSubCode createSOAPFaultSubCode(SOAPFaultCode parent, OMXMLParserWrapper builder) { return new SOAP12FaultSubCodeImpl(parent, builder, this); } public SOAPFaultSubCode createSOAPFaultSubCode(SOAPFaultSubCode parent) throws SOAPProcessingException { return new SOAP12FaultSubCodeImpl(parent, this); } public SOAPFaultSubCode createSOAPFaultSubCode(SOAPFaultSubCode parent, OMXMLParserWrapper builder) { return new SOAP12FaultSubCodeImpl(parent, builder, this); } public SOAPFaultReason createSOAPFaultReason(SOAPFault parent) throws SOAPProcessingException { return new SOAP12FaultReasonImpl(parent, this); } public SOAPFaultReason createSOAPFaultReason() throws SOAPProcessingException { return new SOAP12FaultReasonImpl(this); } public SOAPFaultReason createSOAPFaultReason(SOAPFault parent, OMXMLParserWrapper builder) { return new SOAP12FaultReasonImpl(parent, builder, this); } public SOAPFaultText createSOAPFaultText(SOAPFaultReason parent) throws SOAPProcessingException { return new SOAP12FaultTextImpl(parent, this); } public SOAPFaultText createSOAPFaultText() throws SOAPProcessingException { return new SOAP12FaultTextImpl(this); } public SOAPFaultText createSOAPFaultText(SOAPFaultReason parent, OMXMLParserWrapper builder) { return new SOAP12FaultTextImpl(parent, builder, this); } public SOAPFaultNode createSOAPFaultNode(SOAPFault parent) throws SOAPProcessingException { return new SOAP12FaultNodeImpl(parent, this); } public SOAPFaultNode createSOAPFaultNode() throws SOAPProcessingException { return new SOAP12FaultNodeImpl(this); } public SOAPFaultNode createSOAPFaultNode(SOAPFault parent, OMXMLParserWrapper builder) { return new SOAP12FaultNodeImpl(parent, builder, this); } public SOAPFaultRole createSOAPFaultRole(SOAPFault parent) throws SOAPProcessingException { return new SOAP12FaultRoleImpl(parent, this); } public SOAPFaultRole createSOAPFaultRole() throws SOAPProcessingException { return new SOAP12FaultRoleImpl(this); } public SOAPFaultRole createSOAPFaultRole(SOAPFault parent, OMXMLParserWrapper builder) { return new SOAP12FaultRoleImpl(parent, builder, this); } public SOAPFaultDetail createSOAPFaultDetail(SOAPFault parent) throws SOAPProcessingException { return new SOAP12FaultDetailImpl(parent, this); } public SOAPFaultDetail createSOAPFaultDetail() throws SOAPProcessingException { return new SOAP12FaultDetailImpl(this); } public SOAPFaultDetail createSOAPFaultDetail(SOAPFault parent, OMXMLParserWrapper builder) { return new SOAP12FaultDetailImpl(parent, builder, this); } public SOAPEnvelope getDefaultEnvelope() throws SOAPProcessingException { OMNamespace ns = new OMNamespaceImpl( SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI, SOAP12Constants.SOAP_DEFAULT_NAMESPACE_PREFIX); SOAPEnvelopeImpl env = new SOAPEnvelopeImpl(ns, this); createSOAPHeader(env); createSOAPBody(env); return env; } public SOAPEnvelope getDefaultFaultEnvelope() throws SOAPProcessingException { SOAPEnvelope defaultEnvelope = getDefaultEnvelope(); SOAPFault fault = createSOAPFault(defaultEnvelope.getBody()); SOAPFaultCode faultCode = createSOAPFaultCode(fault); createSOAPFaultValue(faultCode); SOAPFaultReason reason = createSOAPFaultReason(fault); createSOAPFaultText(reason); createSOAPFaultDetail(fault); return defaultEnvelope; } public SOAPMessage createSOAPMessage() { return new SOAPMessageImpl(); } public SOAPMessage createSOAPMessage(OMXMLParserWrapper builder) { return new SOAPMessageImpl(builder); } public SOAPMessage createSOAPMessage(SOAPEnvelope envelope, OMXMLParserWrapper parserWrapper) { return new SOAPMessageImpl(envelope, parserWrapper); } public SOAPEnvelope createSOAPEnvelope(OMXMLParserWrapper builder) { return new SOAPEnvelopeImpl(builder, this); } } ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12FaultValueImpl.javaaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12FaultValue0000644000000000000000000000401211131637472031440 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.llom.soap12; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPProcessingException; import org.apache.axiom.soap.impl.llom.SOAPFaultValueImpl; public class SOAP12FaultValueImpl extends SOAPFaultValueImpl { public SOAP12FaultValueImpl(OMElement parent, SOAPFactory factory) throws SOAPProcessingException { super(parent, factory); } public SOAP12FaultValueImpl(SOAPFactory factory) throws SOAPProcessingException { super(factory.getNamespace(), factory); } public SOAP12FaultValueImpl(OMElement parent, OMXMLParserWrapper builder, SOAPFactory factory) { super(parent, builder, factory); } protected void checkParent(OMElement parent) throws SOAPProcessingException { if (!((parent instanceof SOAP12FaultSubCodeImpl) || (parent instanceof SOAP12FaultCodeImpl))) { throw new SOAPProcessingException( "Expecting SOAP12FaultSubCodeImpl or SOAP12FaultCodeImpl as parent, got " + parent.getClass()); } } } ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12BodyImpl.javaaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12BodyImpl.j0000644000000000000000000000401111131637472031336 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.llom.soap12; import org.apache.axiom.om.OMException; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.soap.SOAPConstants; import org.apache.axiom.soap.SOAPEnvelope; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPFault; import org.apache.axiom.soap.SOAPProcessingException; import org.apache.axiom.soap.impl.llom.SOAPBodyImpl; public class SOAP12BodyImpl extends SOAPBodyImpl { public SOAP12BodyImpl(SOAPFactory factory) { super(SOAPConstants.BODY_LOCAL_NAME, factory.getNamespace(), factory); } /** @param envelope */ public SOAP12BodyImpl(SOAPEnvelope envelope, SOAPFactory factory) throws SOAPProcessingException { super(envelope, factory); } /** * Constructor SOAPBodyImpl * * @param envelope * @param builder */ public SOAP12BodyImpl(SOAPEnvelope envelope, OMXMLParserWrapper builder, SOAPFactory factory) { super(envelope, builder, factory); } public SOAPFault addFault(Exception e) throws OMException { return new SOAP12FaultImpl(this, e, (SOAPFactory) this.factory); } } ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12FaultCodeImpl.javaaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12FaultCodeI0000644000000000000000000000642011131637472031354 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.llom.soap12; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPFault; import org.apache.axiom.soap.SOAPFaultSubCode; import org.apache.axiom.soap.SOAPFaultValue; import org.apache.axiom.soap.SOAPProcessingException; import org.apache.axiom.soap.SOAP12Constants; import org.apache.axiom.soap.impl.llom.SOAPFaultCodeImpl; import javax.xml.namespace.QName; public class SOAP12FaultCodeImpl extends SOAPFaultCodeImpl { /** Eran Chinthaka (chinthaka@apache.org) */ public SOAP12FaultCodeImpl(SOAPFactory factory) { super(factory.getNamespace(), factory); } /** * Constructor OMElementImpl * * @param parent * @param builder */ public SOAP12FaultCodeImpl(SOAPFault parent, OMXMLParserWrapper builder, SOAPFactory factory) { super(parent, builder, factory); } /** @param parent */ public SOAP12FaultCodeImpl(SOAPFault parent, SOAPFactory factory) throws SOAPProcessingException { super(parent, true, factory); } public void setSubCode(SOAPFaultSubCode subCode) throws SOAPProcessingException { if (!(subCode instanceof SOAP12FaultSubCodeImpl)) { throw new SOAPProcessingException( "Expecting SOAP12FaultSubCodeImpl, got " + subCode.getClass()); } super.setSubCode(subCode); } public void setValue(SOAPFaultValue value) throws SOAPProcessingException { if (!(value instanceof SOAP12FaultValueImpl)) { throw new SOAPProcessingException( "Expecting SOAP12FaultValueImpl, got " + value.getClass()); } super.setValue(value); } protected void checkParent(OMElement parent) throws SOAPProcessingException { if (!(parent instanceof SOAP12FaultImpl)) { throw new SOAPProcessingException( "Expecting SOAP12FaultImpl as parent, got " + parent.getClass()); } } // Overridden so that we can have a single interface to reliably get the faultcode's value public QName getTextAsQName() { return getValue().getTextAsQName(); } public SOAPFaultValue getValue() { return (SOAPFaultValue)getFirstChildWithName(SOAP12Constants.QNAME_FAULT_VALUE); } public SOAPFaultSubCode getSubCode() { return (SOAPFaultSubCode)getFirstChildWithName(SOAP12Constants.QNAME_FAULT_SUBCODE); } } ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12FaultReasonImpl.javaaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12FaultReaso0000644000000000000000000000552011131637472031442 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.llom.soap12; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPFault; import org.apache.axiom.soap.SOAPFaultText; import org.apache.axiom.soap.SOAPProcessingException; import org.apache.axiom.soap.SOAP12Constants; import org.apache.axiom.soap.impl.llom.SOAPFaultReasonImpl; public class SOAP12FaultReasonImpl extends SOAPFaultReasonImpl { public SOAP12FaultReasonImpl(SOAPFault parent, OMXMLParserWrapper builder, SOAPFactory factory) { super(parent, builder, factory); } public SOAP12FaultReasonImpl(SOAPFactory factory) { super(factory.getNamespace(), factory); } public SOAP12FaultReasonImpl(SOAPFault parent, SOAPFactory factory) throws SOAPProcessingException { super(parent, true, factory); } public void addSOAPText(SOAPFaultText soapFaultText) throws SOAPProcessingException { if (!(soapFaultText instanceof SOAP12FaultTextImpl)) { throw new SOAPProcessingException( "Expecting SOAP12FaultTextImpl, got " + soapFaultText.getClass()); } addChild(soapFaultText); } public SOAPFaultText getFirstSOAPText() { return (SOAPFaultText)getFirstChildWithName(SOAP12Constants.QNAME_FAULT_TEXT); } /** * getText() is overridden here in order to provide a uniform way for SOAP 1.1 * and SOAP 1.2 to get the "default" reason string. * * @return the default (local language, or first) reason string */ public String getText() { // TODO: Make this look for the correct lang for our locale first return getFirstSOAPText().getText(); } protected void checkParent(OMElement parent) throws SOAPProcessingException { if (!(parent instanceof SOAP12FaultImpl)) { throw new SOAPProcessingException( "Expecting SOAP12FaultImpl, got " + parent.getClass()); } } } ././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12FaultSubCodeImpl.javaaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12FaultSubCo0000644000000000000000000000711511131637472031406 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.llom.soap12; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.soap.SOAP12Constants; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPFaultCode; import org.apache.axiom.soap.SOAPFaultSubCode; import org.apache.axiom.soap.SOAPFaultValue; import org.apache.axiom.soap.SOAPProcessingException; import org.apache.axiom.soap.impl.llom.SOAPFaultSubCodeImpl; public class SOAP12FaultSubCodeImpl extends SOAPFaultSubCodeImpl { //changed public SOAP12FaultSubCodeImpl(SOAPFaultCode parent, SOAPFactory factory) throws SOAPProcessingException { super(parent, SOAP12Constants.SOAP_FAULT_SUB_CODE_LOCAL_NAME, factory); } public SOAP12FaultSubCodeImpl(SOAPFactory factory) { super(factory.getNamespace(), factory); } //changed public SOAP12FaultSubCodeImpl(SOAPFaultCode parent, OMXMLParserWrapper builder, SOAPFactory factory) { super(parent, SOAP12Constants.SOAP_FAULT_SUB_CODE_LOCAL_NAME, builder, factory); } public SOAP12FaultSubCodeImpl(SOAPFaultSubCode parent, SOAPFactory factory) throws SOAPProcessingException { super(parent, SOAP12Constants.SOAP_FAULT_SUB_CODE_LOCAL_NAME, factory); } public SOAP12FaultSubCodeImpl(SOAPFaultSubCode parent, OMXMLParserWrapper builder, SOAPFactory factory) { super(parent, SOAP12Constants.SOAP_FAULT_SUB_CODE_LOCAL_NAME, builder, factory); } protected void checkParent(OMElement parent) throws SOAPProcessingException { if (!((parent instanceof SOAP12FaultSubCodeImpl) || (parent instanceof SOAP12FaultCodeImpl))) { throw new SOAPProcessingException( "Expecting SOAP 1.2 implementation of SOAP FaultSubCode " + "or SOAP FaultCodeValue as the parent. But received some " + "other implementation"); } } public void setSubCode(SOAPFaultSubCode subCode) throws SOAPProcessingException { if (!(subCode instanceof SOAP12FaultSubCodeImpl)) { throw new SOAPProcessingException( "Expecting SOAP12FaultSubCodeImpl, got " + subCode.getClass()); } super.setSubCode(subCode); } public void setValue(SOAPFaultValue soapFaultSubCodeValue) throws SOAPProcessingException { if (!(soapFaultSubCodeValue instanceof SOAP12FaultValueImpl)) { throw new SOAPProcessingException( "Expecting SOAP12FaultValueImpl, got " + soapFaultSubCodeValue.getClass()); } super.setValue(soapFaultSubCodeValue); } } ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12HeaderImpl.javaaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12HeaderImpl0000644000000000000000000000676111131637472031417 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.llom.soap12; import org.apache.axiom.om.OMException; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.om.impl.OMNodeEx; import org.apache.axiom.om.impl.traverse.OMChildrenWithSpecificAttributeIterator; import org.apache.axiom.soap.SOAP12Constants; import org.apache.axiom.soap.SOAPEnvelope; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPHeaderBlock; import org.apache.axiom.soap.SOAPProcessingException; import org.apache.axiom.soap.impl.llom.SOAPHeaderImpl; import javax.xml.namespace.QName; import java.util.Iterator; public class SOAP12HeaderImpl extends SOAPHeaderImpl { /** Eran Chinthaka (chinthaka@apache.org) */ public SOAP12HeaderImpl(SOAPFactory factory) { super(factory.getNamespace(), factory); } /** @param envelope */ public SOAP12HeaderImpl(SOAPEnvelope envelope, SOAPFactory factory) throws SOAPProcessingException { super(envelope, factory); } /** * Constructor SOAPHeaderImpl * * @param envelope * @param builder */ public SOAP12HeaderImpl(SOAPEnvelope envelope, OMXMLParserWrapper builder, SOAPFactory factory) { super(envelope, builder, factory); } public SOAPHeaderBlock addHeaderBlock(String localName, OMNamespace ns) throws OMException { if (ns == null || ns.getNamespaceURI() == null || "".equals(ns.getNamespaceURI())) { throw new OMException( "All the SOAP Header blocks should be namespace qualified"); } OMNamespace namespace = findNamespace(ns.getNamespaceURI(), ns.getPrefix()); if (namespace != null) { ns = namespace; } SOAPHeaderBlock soapHeaderBlock = null; try { soapHeaderBlock = new SOAP12HeaderBlockImpl(localName, ns, this, (SOAPFactory) this.factory); } catch (SOAPProcessingException e) { throw new OMException(e); } ((OMNodeEx) soapHeaderBlock).setComplete(true); return soapHeaderBlock; } public Iterator extractHeaderBlocks(String role) { return new OMChildrenWithSpecificAttributeIterator(getFirstOMChild(), new QName( SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI, SOAP12Constants.SOAP_ROLE), role, true); } } ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12FaultNodeImpl.javaaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12FaultNodeI0000644000000000000000000000420311131637472031364 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.llom.soap12; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPFault; import org.apache.axiom.soap.SOAPProcessingException; import org.apache.axiom.soap.impl.llom.SOAPFaultNodeImpl; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamWriter; public class SOAP12FaultNodeImpl extends SOAPFaultNodeImpl { public SOAP12FaultNodeImpl(SOAPFactory factory) { super(factory.getNamespace(), factory); } public SOAP12FaultNodeImpl(SOAPFault parent, SOAPFactory factory) throws SOAPProcessingException { super(parent, factory); } public SOAP12FaultNodeImpl(SOAPFault parent, OMXMLParserWrapper builder, SOAPFactory factory) { super(parent, builder, factory); } protected void checkParent(OMElement parent) throws SOAPProcessingException { if (!(parent instanceof SOAP12FaultImpl)) { throw new SOAPProcessingException( "Expecting SOAP12FaultImpl, got " + parent.getClass()); } } protected void internalSerialize(XMLStreamWriter writer, boolean cache) throws XMLStreamException { this.registerContentHandler(writer); super.internalSerialize(writer, cache); } } ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12HeaderBlockImpl.javaaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12HeaderBloc0000644000000000000000000001513611131637472031371 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.llom.soap12; import org.apache.axiom.om.OMDataSource; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.soap.SOAP11Constants; import org.apache.axiom.soap.SOAPConstants; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPHeader; import org.apache.axiom.soap.SOAPProcessingException; import org.apache.axiom.soap.SOAPVersion; import org.apache.axiom.soap.SOAP12Version; import org.apache.axiom.soap.SOAP12Constants; import org.apache.axiom.soap.impl.llom.SOAPHeaderBlockImpl; public class SOAP12HeaderBlockImpl extends SOAPHeaderBlockImpl implements SOAP12Constants { public SOAP12HeaderBlockImpl(String localName, OMNamespace ns, SOAPFactory factory) { super(localName, ns, factory); } public SOAP12HeaderBlockImpl(String localName, OMNamespace ns, SOAPFactory factory, OMDataSource ds) { super(localName, ns, factory, ds); } /** * Eran Chinthaka (chinthaka@apache.org) */ /** * @param localName * @param ns */ public SOAP12HeaderBlockImpl(String localName, OMNamespace ns, SOAPHeader parent, SOAPFactory factory) throws SOAPProcessingException { super(localName, ns, parent, factory); checkParent(parent); } /** * Constructor SOAPHeaderBlockImpl * * @param localName * @param ns * @param parent * @param builder */ public SOAP12HeaderBlockImpl(String localName, OMNamespace ns, SOAPHeader parent, OMXMLParserWrapper builder, SOAPFactory factory) { super(localName, ns, parent, builder, factory); } protected void checkParent(OMElement parent) throws SOAPProcessingException { if (!(parent instanceof SOAP12HeaderImpl)) { throw new SOAPProcessingException( "Expecting SOAP12HeaderImpl as parent, got " + parent.getClass()); } } public void setRole(String roleURI) { setAttribute(SOAP_ROLE, roleURI, SOAP_ENVELOPE_NAMESPACE_URI); } public String getRole() { // Get the property or attribute String val; if (this.hasOMDataSourceProperty(ROLE_PROPERTY)) { val = this.getOMDataSourceProperty(ROLE_PROPERTY); } else { val = getAttributeValue(QNAME_ROLE); } return val; } public void setMustUnderstand(boolean mustUnderstand) { setAttribute(SOAPConstants.ATTR_MUSTUNDERSTAND, mustUnderstand ? SOAPConstants.ATTR_MUSTUNDERSTAND_TRUE : SOAPConstants.ATTR_MUSTUNDERSTAND_FALSE, SOAP_ENVELOPE_NAMESPACE_URI); } public void setMustUnderstand(String mustUnderstand) throws SOAPProcessingException { if (SOAPConstants.ATTR_MUSTUNDERSTAND_TRUE.equals(mustUnderstand) || SOAPConstants.ATTR_MUSTUNDERSTAND_FALSE.equals(mustUnderstand) || SOAPConstants.ATTR_MUSTUNDERSTAND_0.equals(mustUnderstand) || SOAPConstants.ATTR_MUSTUNDERSTAND_1.equals(mustUnderstand)) { setAttribute(SOAPConstants.ATTR_MUSTUNDERSTAND, mustUnderstand, SOAP_ENVELOPE_NAMESPACE_URI); } else { throw new SOAPProcessingException( "mustUndertand should be one of \"true\", " + "\"false\", \"0\" or \"1\" "); } } public boolean getMustUnderstand() throws SOAPProcessingException { // First, try getting the information from the property // Fallback to getting the information from the attribute String mustUnderstand; if (this.hasOMDataSourceProperty(MUST_UNDERSTAND_PROPERTY)) { mustUnderstand = this.getOMDataSourceProperty(this.MUST_UNDERSTAND_PROPERTY); } else { mustUnderstand = getAttribute(ATTR_MUSTUNDERSTAND, SOAP_ENVELOPE_NAMESPACE_URI); } // Now parse the value if (mustUnderstand != null) { if (SOAPConstants.ATTR_MUSTUNDERSTAND_TRUE.equals(mustUnderstand) || SOAPConstants.ATTR_MUSTUNDERSTAND_1.equals(mustUnderstand)) { return true; } else if (SOAPConstants.ATTR_MUSTUNDERSTAND_FALSE.equals(mustUnderstand) || SOAPConstants.ATTR_MUSTUNDERSTAND_0.equals(mustUnderstand)) { return false; } else { throw new SOAPProcessingException( "Invalid value found in mustUnderstand value of " + this.getLocalName() + " header block"); } } return false; } public void setRelay(boolean relay) { setAttribute(SOAP_RELAY, relay ? "true" : "false", SOAP_ENVELOPE_NAMESPACE_URI); } public boolean getRelay() { boolean ret = false; // Get the property or attribute String val; if (this.hasOMDataSourceProperty(RELAY_PROPERTY)) { val = this.getOMDataSourceProperty(RELAY_PROPERTY); } else { val = getAttributeValue(QNAME_RELAY); } if (val != null) { ret = "true".equalsIgnoreCase(val); } return ret; } /** * What SOAP version is this HeaderBlock? * * @return a SOAPVersion, one of the two singletons. */ public SOAPVersion getVersion() { return SOAP12Version.getSingleton(); } } axiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPElement.java0000644000000000000000000000707111131637472030441 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.llom; import org.apache.axiom.om.OMContainer; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.om.impl.llom.OMElementImpl; import org.apache.axiom.om.impl.serialize.StreamWriterToContentHandlerConverter; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPProcessingException; import javax.xml.stream.XMLStreamWriter; public abstract class SOAPElement extends OMElementImpl { /** * @param parent * @param localName * @param extractNamespaceFromParent */ protected SOAPElement(OMElement parent, String localName, boolean extractNamespaceFromParent, SOAPFactory factory) throws SOAPProcessingException { super(localName, null, parent, factory); if (parent == null) { throw new SOAPProcessingException( " Can not create " + localName + " element without a parent !!"); } checkParent(parent); if (extractNamespaceFromParent) { this.ns = parent.getNamespace(); } } protected SOAPElement(OMElement parent, String localName, OMXMLParserWrapper builder, SOAPFactory factory) { super(localName, null, parent, builder, factory); } /** * @param localName * @param ns */ protected SOAPElement(String localName, OMNamespace ns, SOAPFactory factory) { super(localName, ns, factory); } /** This has to be implemented by all the derived classes to check for the correct parent. */ protected abstract void checkParent(OMElement parent) throws SOAPProcessingException; public void setParent(OMContainer element) { super.setParent(element); if (element instanceof OMElement) { checkParent((OMElement) element); } } /** * Utility method to register a content handler for * push type builders. * @param writer * @return PULL_TYPE_BUILDER or PUSH_TYPE_BUILDER */ protected short registerContentHandler(XMLStreamWriter writer) { // select the builder short builderType = PULL_TYPE_BUILDER; // default is pull type if (builder != null) { builderType = this.builder.getBuilderType(); } if ((builderType == PUSH_TYPE_BUILDER) && (builder.getRegisteredContentHandler() == null)) { builder.registerExternalContentHandler( new StreamWriterToContentHandlerConverter(writer)); } return builderType; } } ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPHeaderBlockImpl.javaaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPHeaderBlockImpl.jav0000644000000000000000000001222711131637472031673 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.llom; import org.apache.axiom.om.OMAttribute; import org.apache.axiom.om.OMDataSource; import org.apache.axiom.om.OMDataSourceExt; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.om.impl.OMNamespaceImpl; import org.apache.axiom.om.impl.llom.OMAttributeImpl; import org.apache.axiom.om.impl.llom.OMElementImpl; import org.apache.axiom.om.impl.llom.OMSourcedElementImpl; import org.apache.axiom.soap.SOAPConstants; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPHeader; import org.apache.axiom.soap.SOAPHeaderBlock; import org.apache.axiom.soap.SOAPProcessingException; import javax.xml.namespace.QName; /** Class SOAPHeaderBlockImpl */ public abstract class SOAPHeaderBlockImpl extends OMSourcedElementImpl implements SOAPHeaderBlock { private boolean processed = false; public SOAPHeaderBlockImpl(String localName, OMNamespace ns, SOAPFactory factory) { super(localName, ns, factory); } public SOAPHeaderBlockImpl(String localName, OMNamespace ns, SOAPFactory factory, OMDataSource ds) { super(localName, ns, factory, ds); } /** * @param localName * @param ns * @param parent */ public SOAPHeaderBlockImpl(String localName, OMNamespace ns, SOAPHeader parent, SOAPFactory factory) throws SOAPProcessingException { super(localName, ns, parent, factory); this.setNamespace(ns); } /** * Constructor SOAPHeaderBlockImpl. * * @param localName * @param ns * @param parent * @param builder */ public SOAPHeaderBlockImpl(String localName, OMNamespace ns, OMElement parent, OMXMLParserWrapper builder, SOAPFactory factory) { super(localName, ns, parent, builder, factory); this.setNamespace(ns); } /** * @param attributeName * @param attrValue * @param soapEnvelopeNamespaceURI */ protected void setAttribute(String attributeName, String attrValue, String soapEnvelopeNamespaceURI) { OMAttribute omAttribute = this.getAttribute( new QName(soapEnvelopeNamespaceURI, attributeName)); if (omAttribute != null) { omAttribute.setAttributeValue(attrValue); } else { OMAttribute attribute = new OMAttributeImpl(attributeName, new OMNamespaceImpl( soapEnvelopeNamespaceURI, SOAPConstants.SOAP_DEFAULT_NAMESPACE_PREFIX), attrValue, this.factory); this.addAttribute(attribute); } } /** * Method getAttribute. * * @param attrName * @param soapEnvelopeNamespaceURI * @return Returns String. */ protected String getAttribute(String attrName, String soapEnvelopeNamespaceURI) { OMAttribute omAttribute = this.getAttribute( new QName(soapEnvelopeNamespaceURI, attrName)); return (omAttribute != null) ? omAttribute.getAttributeValue() : null; } public boolean isProcessed() { return processed; } public void setProcessed() { processed = true; } /** * @param key * @return requested OMDataSourceExt property or null */ protected String getOMDataSourceProperty(String key) { if (this.hasOMDataSourceProperty(key)) { return (String) ((OMDataSourceExt) getDataSource()).getProperty(key); } return null; } /** * @param key * @return requested OMDataSourceExt property or null */ protected boolean hasOMDataSourceProperty(String key) { if (!this.isExpanded()) { OMDataSource ds = this.getDataSource(); if (ds instanceof OMDataSourceExt) { return ((OMDataSourceExt)ds).hasProperty(key); } } return false; } } axiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/om/0000755000000000000000000000000011131637472023262 5ustar rootrootaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/0000755000000000000000000000000011131637472024223 5ustar rootrootaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/0000755000000000000000000000000011131637474025170 5ustar rootrootaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMNodeImpl.java0000644000000000000000000004412311131637474030002 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.llom; import org.apache.axiom.om.OMComment; import org.apache.axiom.om.OMContainer; import org.apache.axiom.om.OMDocType; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMException; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMNode; import org.apache.axiom.om.OMOutputFormat; import org.apache.axiom.om.OMProcessingInstruction; import org.apache.axiom.om.OMText; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.om.impl.MTOMXMLStreamWriter; import org.apache.axiom.om.impl.OMContainerEx; import org.apache.axiom.om.impl.OMNodeEx; import org.apache.axiom.om.impl.builder.StAXBuilder; import org.apache.axiom.om.impl.builder.StAXOMBuilder; import org.apache.axiom.om.impl.llom.factory.OMLinkedListImplFactory; import org.apache.axiom.om.util.StAXUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamWriter; import java.io.OutputStream; import java.io.Writer; /** Class OMNodeImpl */ public abstract class OMNodeImpl implements OMNode, OMNodeEx { private static final Log log = LogFactory.getLog(OMNodeImpl.class); private static boolean DEBUG_ENABLED = log.isDebugEnabled(); /** Field parent */ protected OMContainerEx parent; /** Field nextSibling */ protected OMNodeImpl nextSibling; /** Field previousSibling */ protected OMNodeImpl previousSibling; /** Field builder */ public OMXMLParserWrapper builder; /** Field done */ protected boolean done = false; /** Field nodeType */ protected int nodeType; protected OMFactory factory; /** * Constructor OMNodeImpl * * @param factory The OMFactory that created this */ public OMNodeImpl(OMFactory factory) { this.factory = factory; } /** * For a node to exist there must be a parent. * * @param parent Parent OMContainer of this node * @param factory The OMFactory that created this */ public OMNodeImpl(OMContainer parent, OMFactory factory, boolean done) { this.done = done; this.factory = factory; if ((parent != null)) { this.parent = (OMContainerEx) parent; parent.addChild(this); } } /** * Returns the immediate parent of the node. Parent is always an Element. * * @return Returns OMContainer. * @throws OMException */ public OMContainer getParent() { return parent; } /** * Method setParent. * * @param element */ public void setParent(OMContainer element) { if ((this.parent) == element) { return; } //If we are asked to assign a new parent in place //of an existing one. We should detach this node //from the previous parent. if (element != null) { if (this.parent != null) { this.detach(); } this.parent = (OMContainerEx) element; } else { this.parent = null; } } /** * Returns the next sibling. This can be an OMAttribute or OMText or OMElement for others. * * @return Returns OMNode. * @throws org.apache.axiom.om.OMException * */ public OMNode getNextOMSibling() throws OMException { if ((nextSibling == null) && (parent != null) && !parent.isComplete()) { parent.buildNext(); } return nextSibling; } /** * Method setNextOMSibling. * * @param node */ public void setNextOMSibling(OMNode node) { if (node == null || node.getOMFactory() instanceof OMLinkedListImplFactory) { this.nextSibling = (OMNodeImpl) node; } else { this.nextSibling = (OMNodeImpl) importNode(node); } this.nextSibling = (OMNodeImpl) node; } /** * Indicates whether parser has parsed this information item completely or not. If some * information is not available in the item, one has to check this attribute to make sure that, * this item has been parsed completely or not. * * @return Returns boolean. */ public boolean isComplete() { return done; } /** * Method setComplete. * * @param state */ public void setComplete(boolean state) { this.done = state; if (parent != null) { if (!done) { parent.setComplete(false); } else if (parent instanceof OMElementImpl) { ((OMElementImpl) parent).notifyChildComplete(); } } } /** * Removes this information item and its children, from the model completely. * * @throws OMException */ public OMNode detach() throws OMException { if (parent == null) { throw new OMException( "Elements that doesn't have a parent can not be detached"); } OMNodeImpl nextSibling = (OMNodeImpl) getNextOMSibling(); if (previousSibling == null) { parent.setFirstChild(nextSibling); } else { ((OMNodeEx) getPreviousOMSibling()).setNextOMSibling(nextSibling); } if (nextSibling != null) { nextSibling.setPreviousOMSibling(getPreviousOMSibling()); } if ((parent instanceof OMElementImpl) && ((OMElementImpl) parent).lastChild == this) { ((OMElementImpl) parent).lastChild = getPreviousOMSibling(); } this.previousSibling = null; this.nextSibling = null; this.parent = null; return this; } /** * Inserts a sibling just after the current information item. * * @param sibling * @throws OMException */ public void insertSiblingAfter(OMNode sibling) throws OMException { if (parent == null) { throw new OMException("Parent can not be null"); } else if (this == sibling) { throw new OMException("Inserting self as the sibling is not allowed"); } ((OMNodeEx) sibling).setParent(parent); if (sibling instanceof OMNodeImpl) { OMNodeImpl siblingImpl = (OMNodeImpl) sibling; if (nextSibling == null) { getNextOMSibling(); } siblingImpl.setPreviousOMSibling(this); if (nextSibling == null) { parent.setLastChild(sibling); } else { nextSibling.setPreviousOMSibling(sibling); } ((OMNodeEx) sibling).setNextOMSibling(nextSibling); nextSibling = siblingImpl; } } /** * Inserts a sibling just before the current information item. * * @param sibling * @throws OMException */ public void insertSiblingBefore(OMNode sibling) throws OMException { if (parent == null) { throw new OMException("Parent can not be null"); } else if (this == sibling) { throw new OMException("Inserting self as the sibling is not allowed"); } if (sibling instanceof OMNodeImpl) { OMNodeImpl siblingImpl = (OMNodeImpl) sibling; if (previousSibling == null) { parent.setFirstChild(siblingImpl); siblingImpl.nextSibling = this; siblingImpl.previousSibling = null; } else { siblingImpl.setParent(parent); siblingImpl.nextSibling = this; previousSibling.setNextOMSibling(siblingImpl); siblingImpl.setPreviousOMSibling(previousSibling); } previousSibling = siblingImpl; } } /** * Gets the type of node, as this is the super class of all the nodes. * * @return Returns the type of node as indicated by {@link #setType} * @see #setType */ public int getType() { return nodeType; } /** * Method setType. * * @param nodeType * @throws OMException */ public void setType(int nodeType) throws OMException { this.nodeType = nodeType; } /** * Gets the previous sibling. * * @return boolean */ public OMNode getPreviousOMSibling() { return previousSibling; } /** * Method setPreviousOMSibling. * * @param previousSibling */ public void setPreviousOMSibling(OMNode previousSibling) { if (previousSibling == null || previousSibling.getOMFactory() instanceof OMLinkedListImplFactory) { this.previousSibling = (OMNodeImpl) previousSibling; } else { this.previousSibling = (OMNodeImpl) importNode(previousSibling); } } /** * Parses this node and builds the object structure in memory. However a node, created * programmatically, will have done set to true by default and this will cause populateyourself * not to work properly! * * @throws OMException */ public void build() throws OMException { if (builder != null && builder.isCompleted()) { if (DEBUG_ENABLED) { log.debug("Builder is already complete."); } } while (!done) { builder.next(); if (builder.isCompleted() && !done) { if (DEBUG_ENABLED) { log.debug("Builder is complete. Setting OMNode to complete."); } setComplete(true); } } } /** * Parses this node and builds the object structure in memory. AXIOM supports two levels of * deffered building. First is deffered building of AXIOM using StAX. Second level is the * deffered building of attachments. AXIOM reads in the attachements from the stream only when * user asks by calling getDataHandler(). build() method builds the OM without the attachments. * buildAll() builds the OM together with attachement data. This becomes handy when user wants * to free the input stream. */ public void buildWithAttachments() { if (!this.done) { this.build(); } } public void close(boolean build) { if (build) { this.build(); } this.done = true; // If this is a StAXBuilder, close it. if (builder instanceof StAXBuilder && !((StAXBuilder) builder).isClosed()) { ((StAXBuilder) builder).releaseParserOnClose(true); ((StAXBuilder) builder).close(); } } /** * Serializes the node with caching. * * @param xmlWriter * @throws javax.xml.stream.XMLStreamException * */ public void serialize(XMLStreamWriter xmlWriter) throws XMLStreamException { // If the input xmlWriter is not an MTOMXMLStreamWriter, then wrapper it MTOMXMLStreamWriter writer = xmlWriter instanceof MTOMXMLStreamWriter ? (MTOMXMLStreamWriter) xmlWriter : new MTOMXMLStreamWriter(xmlWriter); internalSerialize(writer); writer.flush(); } /** * Serializes the node without caching. * * @param xmlWriter * @throws javax.xml.stream.XMLStreamException * */ public void serializeAndConsume(XMLStreamWriter xmlWriter) throws XMLStreamException { // If the input xmlWriter is not an MTOMXMLStreamWriter, then wrapper it MTOMXMLStreamWriter writer = xmlWriter instanceof MTOMXMLStreamWriter ? (MTOMXMLStreamWriter) xmlWriter : new MTOMXMLStreamWriter(xmlWriter); internalSerializeAndConsume(writer); writer.flush(); } /** * Serializes the node with caching. * * @param writer * @throws XMLStreamException */ public void internalSerialize(XMLStreamWriter writer) throws XMLStreamException { throw new RuntimeException("Not implemented yet!"); } /** * Serializes the node without caching. * * @param writer * @throws XMLStreamException */ public void internalSerializeAndConsume(XMLStreamWriter writer) throws XMLStreamException { throw new RuntimeException("Not implemented yet!"); } public void serialize(OutputStream output) throws XMLStreamException { XMLStreamWriter xmlStreamWriter = StAXUtils.createXMLStreamWriter(output); try { serialize(xmlStreamWriter); } finally { xmlStreamWriter.close(); } } public void serialize(Writer writer) throws XMLStreamException { XMLStreamWriter xmlStreamWriter = StAXUtils.createXMLStreamWriter(writer); try { serialize(xmlStreamWriter); } finally { xmlStreamWriter.close(); } } public void serializeAndConsume(OutputStream output) throws XMLStreamException { XMLStreamWriter xmlStreamWriter = StAXUtils.createXMLStreamWriter(output); try { serializeAndConsume(xmlStreamWriter); } finally { xmlStreamWriter.close(); } } public void serializeAndConsume(Writer writer) throws XMLStreamException { XMLStreamWriter xmlStreamWriter = StAXUtils.createXMLStreamWriter(writer); try { serializeAndConsume(xmlStreamWriter); } finally { xmlStreamWriter.close(); } } public void serialize(OutputStream output, OMOutputFormat format) throws XMLStreamException { MTOMXMLStreamWriter writer = new MTOMXMLStreamWriter(output, format); internalSerialize(writer); writer.flush(); if (format.isAutoCloseWriter()) { writer.close(); } } public void serialize(Writer writer2, OMOutputFormat format) throws XMLStreamException { MTOMXMLStreamWriter writer = new MTOMXMLStreamWriter(StAXUtils.createXMLStreamWriter(writer2)); writer.setOutputFormat(format); internalSerialize(writer); writer.flush(); if (format.isAutoCloseWriter()) { writer.close(); } } public void serializeAndConsume(OutputStream output, OMOutputFormat format) throws XMLStreamException { MTOMXMLStreamWriter writer = new MTOMXMLStreamWriter(output, format); internalSerializeAndConsume(writer); writer.flush(); if (format.isAutoCloseWriter()) { writer.close(); } } public void serializeAndConsume(Writer writer2, OMOutputFormat format) throws XMLStreamException { MTOMXMLStreamWriter writer = new MTOMXMLStreamWriter(StAXUtils.createXMLStreamWriter(writer2)); writer.setOutputFormat(format); internalSerializeAndConsume(writer); writer.flush(); if (format.isAutoCloseWriter()) { writer.close(); } } public OMFactory getOMFactory() { return this.factory; } /** * This method is intended only to be used by Axiom intenals when merging Objects from different * Axiom implementations to the LLOM implementation. * * @param child */ protected OMNode importNode(OMNode child) { int type = child.getType(); switch (type) { case (OMNode.ELEMENT_NODE): { OMElement childElement = (OMElement) child; OMElement newElement = (new StAXOMBuilder(this.factory, childElement .getXMLStreamReader())).getDocumentElement(); newElement.buildWithAttachments(); return newElement; } case (OMNode.TEXT_NODE): { OMText importedText = (OMText) child; OMText newText; if (importedText.isBinary()) { boolean isOptimize = importedText.isOptimized(); newText = this.factory.createOMText(importedText .getDataHandler(), isOptimize); } else if (importedText.isCharacters()) { newText = this.factory.createOMText(null, importedText .getTextCharacters(), importedText.getType()); } else { newText = this.factory.createOMText(null, importedText .getText()/*, importedText.getOMNodeType()*/); } return newText; } case (OMNode.PI_NODE): { OMProcessingInstruction importedPI = (OMProcessingInstruction) child; return factory.createOMProcessingInstruction(null, importedPI.getTarget(), importedPI.getValue()); } case (OMNode.COMMENT_NODE): { OMComment importedComment = (OMComment) child; return factory.createOMComment(null, importedComment.getValue()); } case (OMNode.DTD_NODE) : { OMDocType importedDocType = (OMDocType) child; return factory.createOMDocType(null, importedDocType.getValue()); } default: { throw new UnsupportedOperationException( "Not Implemented Yet for the given node type"); } } } } axiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMTextImpl.java0000644000000000000000000004361111131637474030042 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.llom; import org.apache.axiom.om.OMAttribute; import org.apache.axiom.om.OMConstants; import org.apache.axiom.om.OMContainer; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMException; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMText; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.om.impl.MTOMXMLStreamWriter; import org.apache.axiom.om.impl.OMNamespaceImpl; import org.apache.axiom.om.impl.builder.XOPBuilder; import org.apache.axiom.om.impl.util.OMSerializerUtil; import org.apache.axiom.om.util.TextHelper; import org.apache.axiom.om.util.UUIDGenerator; import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamWriter; import java.io.IOException; import java.io.InputStream; public class OMTextImpl extends OMNodeImpl implements OMText, OMConstants { /** Field nameSpace used when serializing Binary stuff as MTOM optimized. */ public static final OMNamespace XOP_NS = new OMNamespaceImpl( "http://www.w3.org/2004/08/xop/include", "xop"); protected String value = null; protected char[] charArray; private boolean calcNS; // Set to true after textNS is calculated protected OMNamespace textNS; protected String mimeType; protected boolean optimize = false; protected boolean isBinary = false; /** Field contentID for the mime part used when serializing Binary stuff as MTOM optimized. */ private String contentID = null; /** * Field dataHandler contains the DataHandler Declaring as Object to remove the dependency on * Javax.activation.DataHandler */ private Object dataHandlerObject = null; /** Field localName used when serializing Binary stuff as MTOM optimized. */ protected String localName = "Include"; /** Field attributes used when serializing Binary stuff as MTOM optimized. */ protected OMAttribute attribute; private static final String EMTPY_STRING = ""; /** * Constructor OMTextImpl. * * @param s */ public OMTextImpl(String s, OMFactory factory) { this(s, TEXT_NODE, factory); } /** * @param s * @param nodeType - OMText can handle CHARACTERS, SPACES, CDATA and ENTITY REFERENCES. * Constants for this can be found in OMNode. */ public OMTextImpl(String s, int nodeType, OMFactory factory) { this(null, s, nodeType, factory); } /** * Constructor OMTextImpl. * * @param parent * @param text */ public OMTextImpl(OMContainer parent, String text, OMFactory factory) { this(parent, text, TEXT_NODE, factory); } /** * Construct OMTextImpl that is a copy of the source OMTextImpl * @param parent * @param source OMTextImpl * @param factory */ public OMTextImpl(OMContainer parent, OMTextImpl source, OMFactory factory) { super(parent, factory, true); // Copy the value of the text this.value = source.value; this.nodeType = source.nodeType; // Clone the charArray (if it exists) if (source.charArray != null) { this.charArray = new char[source.charArray.length]; System.arraycopy(source.charArray, 0, this.charArray, 0, source.charArray.length); } // Turn off calcNS...the namespace will need to be recalculated // in the new tree's context. this.calcNS = false; this.textNS = null; // Copy the optimized related settings. this.optimize = source.optimize; this.mimeType = source.mimeType; this.isBinary = source.isBinary; // TODO // Do we need a deep copy of the data-handler this.contentID = source.contentID; this.dataHandlerObject = source.dataHandlerObject; this.localName = source.localName; if (source.attribute != null) { this.attribute = factory.createOMAttribute(source.attribute.getLocalName(), source.attribute.getNamespace(), source.attribute.getAttributeValue()); } } public OMTextImpl(OMContainer parent, String text, int nodeType, OMFactory factory) { super(parent, factory, true); this.value = text == null ? EMTPY_STRING : text; this.nodeType = nodeType; } public OMTextImpl(OMContainer parent, char[] charArray, int nodeType, OMFactory factory) { super(parent, factory, true); this.charArray = charArray; this.nodeType = nodeType; } public OMTextImpl(OMContainer parent, QName text, OMFactory factory) { this(parent, text, TEXT_NODE, factory); } public OMTextImpl(OMContainer parent, QName text, int nodeType, OMFactory factory) { super(parent, factory, true); if (text == null) throw new IllegalArgumentException("QName text arg cannot be null!"); this.calcNS = true; this.textNS = ((OMElementImpl) parent).handleNamespace(text.getNamespaceURI(), text.getPrefix()); this.value = textNS.getPrefix() + ":" + text.getLocalPart(); this.nodeType = nodeType; } /** * @param s - base64 encoded String representation of Binary * @param mimeType of the Binary */ public OMTextImpl(String s, String mimeType, boolean optimize, OMFactory factory) { this(null, s, mimeType, optimize, factory); } /** * @param parent * @param s - base64 encoded String representation of Binary * @param mimeType of the Binary */ public OMTextImpl(OMContainer parent, String s, String mimeType, boolean optimize, OMFactory factory) { this(parent, s, factory); this.mimeType = mimeType; this.optimize = optimize; this.isBinary = true; done = true; this.nodeType = TEXT_NODE; } /** @param dataHandler To send binary optimised content Created programatically. */ public OMTextImpl(Object dataHandler, OMFactory factory) { this(dataHandler, true, factory); } /** * @param dataHandler * @param optimize To send binary content. Created progrmatically. */ public OMTextImpl(Object dataHandler, boolean optimize, OMFactory factory) { super(factory); this.dataHandlerObject = dataHandler; this.isBinary = true; this.optimize = optimize; done = true; this.nodeType = TEXT_NODE; } /** * @param contentID * @param parent * @param builder Used when the builder is encountered with a XOP:Include tag Stores a * reference to the builder and the content-id. Supports deferred parsing of * MIME messages. */ public OMTextImpl(String contentID, OMContainer parent, OMXMLParserWrapper builder, OMFactory factory) { super(parent, factory, false); this.contentID = contentID; this.optimize = true; this.isBinary = true; this.builder = builder; this.nodeType = TEXT_NODE; } /** * @param writer * @throws XMLStreamException */ public void internalSerialize(XMLStreamWriter writer) throws XMLStreamException { internalSerializeLocal(writer); } /** * Writes the relevant output. * * @param writer * @throws XMLStreamException */ private void writeOutput(XMLStreamWriter writer) throws XMLStreamException { int type = getType(); if (type == TEXT_NODE || type == SPACE_NODE) { writer.writeCharacters(this.getText()); } else if (type == CDATA_SECTION_NODE) { writer.writeCData(this.getText()); } else if (type == ENTITY_REFERENCE_NODE) { writer.writeEntityRef(this.getText()); } } /** Returns the value. */ public String getText() throws OMException { if (charArray != null || this.value != null) { return getTextFromProperPlace(); } else { try { return TextHelper.toString(getInputStream()); } catch (Exception e) { throw new OMException(e); } } } public char[] getTextCharacters() { return charArray != null ? charArray : value.toCharArray(); } public boolean isCharacters() { return charArray != null; } /** * This OMText contains two data source:value and charArray. This method will return text from * correct place. */ private String getTextFromProperPlace() { return charArray != null ? new String(charArray) : value; } /** Returns the value. */ public QName getTextAsQName() throws OMException { return ((OMElement)parent).resolveQName(getTextFromProperPlace()); } /* (non-Javadoc) * @see org.apache.axiom.om.OMText#getNamespace() */ public OMNamespace getNamespace() { // If the namespace has already been determined, return it // Otherwise calculate the namespace if the text contains a colon and is not detached. if (calcNS) { return textNS; } else { calcNS = true; if (getParent() != null) { String text = getTextFromProperPlace(); if (text != null) { int colon = text.indexOf(':'); if (colon > 0) { textNS = ((OMElementImpl) getParent()). findNamespaceURI(text.substring(0, colon)); if (textNS != null) { charArray = null; value = text.substring(colon + 1); } } } } } return textNS; } public boolean isOptimized() { return optimize; } public void setOptimize(boolean value) { this.optimize = value; if (value) { isBinary = true; } } /** * Receiving binary can happen as either MTOM attachments or as Base64 Text In the case of * Base64 user has to explicitly specify that the content is binary, before calling * getDataHandler(), getInputStream().... */ public void setBinary(boolean value) { isBinary = value; } public boolean isBinary() { return isBinary; } /** * Gets the datahandler. * * @return Returns javax.activation.DataHandler */ public Object getDataHandler() { if ((value != null || charArray != null) && isBinary) { String text = getTextFromProperPlace(); return org.apache.axiom.attachments.utils.DataHandlerUtils .getDataHandlerFromText(text, mimeType); } else { if (dataHandlerObject == null) { if (contentID == null) { throw new RuntimeException("ContentID is null"); } dataHandlerObject = ((XOPBuilder) builder) .getDataHandler(contentID); } return dataHandlerObject; } } public String getLocalName() { return localName; } public java.io.InputStream getInputStream() throws OMException { if (isBinary) { if (dataHandlerObject == null) { getDataHandler(); } InputStream inStream; javax.activation.DataHandler dataHandler = (javax.activation.DataHandler) dataHandlerObject; try { inStream = dataHandler.getDataSource().getInputStream(); } catch (IOException e) { throw new OMException( "Cannot get InputStream from DataHandler." + e); } return inStream; } else { throw new OMException("Unsupported Operation"); } } public String getContentID() { if (contentID == null) { contentID = UUIDGenerator.getUUID() + "@apache.org"; } return this.contentID; } public void internalSerializeAndConsume(XMLStreamWriter writer) throws XMLStreamException { internalSerializeLocal(writer); } private void internalSerializeLocal(XMLStreamWriter writer2) throws XMLStreamException { if ((!this.isBinary) || (!this.isOptimized())) { writeOutput(writer2); } else { //check whether we have a MTOMXMLStreamWriter. if so //we can optimize the writing! if (writer2 instanceof MTOMXMLStreamWriter) { MTOMXMLStreamWriter writer = (MTOMXMLStreamWriter) writer2; if (writer.isOptimized() && writer.isOptimizedThreshold(this)) { if (contentID == null) { contentID = writer.getNextContentId(); } // send binary as MTOM optimised this.attribute = new OMAttributeImpl("href", new OMNamespaceImpl("", ""), "cid:" + getContentID(), this.factory); this.serializeStartpart(writer); writer.writeOptimized(this); writer.writeEndElement(); } else { //do normal base64 writeOutput(writer); } } else { //we do not have a optimized writer. Just do the normal //base64 writing writeOutput(writer2); } } } /* * Methods to copy from OMSerialize utils */ private void serializeStartpart(XMLStreamWriter writer) throws XMLStreamException { String nameSpaceName = XOP_NS.getNamespaceURI(); String writer_prefix = writer.getPrefix(nameSpaceName); String prefix = XOP_NS.getPrefix(); if (writer_prefix != null) { writer.writeStartElement(nameSpaceName, this .getLocalName()); } else { // According to StAX, setPrefix must occur before // writeStartElement if (OMSerializerUtil.isSetPrefixBeforeStartElement(writer)) { writer.setPrefix(prefix, nameSpaceName); writer.writeStartElement(prefix, this.getLocalName(), nameSpaceName); } else { writer.writeStartElement(prefix, this.getLocalName(), nameSpaceName); writer.setPrefix(prefix, nameSpaceName); } } // add the elements attribute "href" serializeAttribute(this.attribute, writer); // add the namespace serializeNamespace(XOP_NS, writer); } /** * Method serializeAttribute. * * @param attr * @throws XMLStreamException */ static void serializeAttribute(OMAttribute attr, XMLStreamWriter writer) throws XMLStreamException { // first check whether the attribute is associated with a namespace OMNamespace ns = attr.getNamespace(); String prefix; String namespaceName; if (ns != null) { // add the prefix if it's availble prefix = ns.getPrefix(); namespaceName = ns.getNamespaceURI(); if (prefix != null) { writer.writeAttribute(prefix, namespaceName, attr .getLocalName(), attr.getAttributeValue()); } else { writer.writeAttribute(namespaceName, attr.getLocalName(), attr .getAttributeValue()); } } else { writer.writeAttribute(attr.getLocalName(), attr.getAttributeValue()); } } /** * Method serializeNamespace. * * @param namespace * @param writer * @throws XMLStreamException */ static void serializeNamespace(OMNamespace namespace, XMLStreamWriter writer) throws XMLStreamException { if (namespace != null) { String uri = namespace.getNamespaceURI(); String ns_prefix = namespace.getPrefix(); writer.writeNamespace(ns_prefix, namespace.getNamespaceURI()); writer.setPrefix(ns_prefix, uri); } } /** * A slightly different implementation of the discard method. * * @throws OMException */ public void discard() throws OMException { if (done) { this.detach(); } } /* (non-Javadoc) * @see org.apache.axiom.om.OMNode#buildAll() */ public void buildWithAttachments() { if (!this.done) { this.build(); } if (isOptimized()) { this.getDataHandler(); } } public void setContentID(String cid) { this.contentID = cid; } } axiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/factory/0000755000000000000000000000000011131637474026637 5ustar rootroot././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/factory/OMXMLBuilderFactory.javaaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/factory/OMXMLBuilderFacto0000644000000000000000000000431011131637474031740 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.llom.factory; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.impl.builder.StAXOMBuilder; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder; import javax.xml.stream.XMLStreamReader; /** Class OMXMLBuilderFactory */ public class OMXMLBuilderFactory { /** Field PARSER_XPP */ public static final String PARSER_XPP = "XPP"; /** Field PARSER_STAX */ public static final String PARSER_STAX = "StAX"; /** Field MODEL_SOAP_SPECIFIC */ public static final String MODEL_SOAP_SPECIFIC = "SOAP_SPECIFIC"; /** Field MODEL_OM */ public static final String MODEL_OM = "OM_ONLY"; /** * Method createStAXSOAPModelBuilder. * * @param soapFactory * @param parser * @return Returns StAXSOAPModelBuilder. */ public static StAXSOAPModelBuilder createStAXSOAPModelBuilder( SOAPFactory soapFactory, XMLStreamReader parser) { return new StAXSOAPModelBuilder(parser, soapFactory, null); } /** * Method createStAXOMBuilder. * * @param ombuilderFactory * @param parser * @return Returns StAXOMBuilder. */ public static StAXOMBuilder createStAXOMBuilder(OMFactory ombuilderFactory, XMLStreamReader parser) { return new StAXOMBuilder(ombuilderFactory, parser); } } ././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/factory/OMLinkedListImplementation.javaaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/factory/OMLinkedListImple0000644000000000000000000000353311131637474032053 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.llom.factory; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMImplementation; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.impl.llom.soap11.SOAP11Factory; import org.apache.axiom.soap.impl.llom.soap12.SOAP12Factory; /** * Class encapsulating the linked list OM implementation. *

* Since all OM factories for LLOM are stateless, {@link #getOMFactory()}, * {@link #getSOAP11Factory()} and {@link #getSOAP12Factory()} will return the * same instance on every invocation. */ public class OMLinkedListImplementation extends OMImplementation { private final OMFactory omFactory = new OMLinkedListImplFactory(); private final SOAPFactory soap11Factory = new SOAP11Factory(); private final SOAPFactory soap12Factory = new SOAP12Factory(); public OMFactory getOMFactory() { return omFactory; } public SOAPFactory getSOAP11Factory() { return soap11Factory; } public SOAPFactory getSOAP12Factory() { return soap12Factory; } } ././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/factory/OMLinkedListImplFactory.javaaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/factory/OMLinkedListImplF0000644000000000000000000002564211131637474032021 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.llom.factory; import org.apache.axiom.om.OMAttribute; import org.apache.axiom.om.OMComment; import org.apache.axiom.om.OMContainer; import org.apache.axiom.om.OMDataSource; import org.apache.axiom.om.OMDocType; import org.apache.axiom.om.OMDocument; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMException; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMProcessingInstruction; import org.apache.axiom.om.OMSourcedElement; import org.apache.axiom.om.OMText; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.om.impl.OMNamespaceImpl; import org.apache.axiom.om.impl.llom.OMAttributeImpl; import org.apache.axiom.om.impl.llom.OMCommentImpl; import org.apache.axiom.om.impl.llom.OMDocTypeImpl; import org.apache.axiom.om.impl.llom.OMDocumentImpl; import org.apache.axiom.om.impl.llom.OMElementImpl; import org.apache.axiom.om.impl.llom.OMProcessingInstructionImpl; import org.apache.axiom.om.impl.llom.OMSourcedElementImpl; import org.apache.axiom.om.impl.llom.OMTextImpl; import javax.xml.namespace.QName; import java.util.Hashtable; import java.util.Map; /** Class OMLinkedListImplFactory */ public class OMLinkedListImplFactory implements OMFactory { private static final String uriAndPrefixSeparator = ";"; // Pooling of OMNamespace objects is disabled. See the comment in OMNamespace. private static boolean POOL_OMNAMESPACES = false; /** * This is a map of namespaces with the namespace URI as the key and Namespace object itself as * the value. * OMFactories are shared across threads. The Hashtable is necessary to prevent concurrent modification exceptions. */ protected Map namespaceTable = new Hashtable(5); /** * Method createOMElement. * * @param localName * @param ns * @return Returns OMElement. */ public OMElement createOMElement(String localName, OMNamespace ns) { return new OMElementImpl(localName, ns, this); } public OMElement createOMElement(String localName, OMNamespace ns, OMContainer parent) { return new OMElementImpl(localName, ns, parent, this); } /** * Method createOMElement. * * @param localName * @param ns * @param parent * @param builder * @return Returns OMElement. */ public OMElement createOMElement(String localName, OMNamespace ns, OMContainer parent, OMXMLParserWrapper builder) { return new OMElementImpl(localName, ns, parent, builder, this); } /** * Method createOMElement. * * @param localName * @param namespaceURI * @param namespacePrefix * @return Returns OMElement. */ public OMElement createOMElement(String localName, String namespaceURI, String namespacePrefix) { return this.createOMElement(localName, this.createOMNamespace(namespaceURI, namespacePrefix)); } /** * Create an OMElement with the given QName under the given parent. * * If the QName contains a prefix, we will ensure that an OMNamespace is created * mapping the given namespace to the given prefix. If no prefix is passed, we'll * use whatever's already mapped in the parent, or create a generated one. * * @param qname the QName of the element to create * @param parent the OMContainer in which to place the new element * @return Returns the new OMElement * @throws OMException if there's a namespace mapping problem */ public OMElement createOMElement(QName qname, OMContainer parent) throws OMException { return new OMElementImpl(qname, parent, this); } /** * Create an OMElement with the given QName *

* If the QName contains a prefix, we will ensure that an OMNamespace is created mapping the * given namespace to the given prefix. If no prefix is passed, we'll use whatever's already * mapped in the parent, or create a generated one. * * @param qname * @return the new OMElement. */ public OMElement createOMElement(QName qname) throws OMException { return new OMElementImpl(qname, null, this); } /** * Construct element with arbitrary data source. * * @param source * @param localName * @param ns */ public OMSourcedElement createOMElement(OMDataSource source, String localName, OMNamespace ns) { return new OMSourcedElementImpl(localName, ns, this, source); } /** * Method createOMNamespace. * * @param uri * @param prefix * @return Returns OMNamespace. */ public OMNamespace createOMNamespace(String uri, String prefix) { // An OMNamespaceImpl consists of only two String objects; // The overhead to create "yet another" key string and pool these // small objects is unnecessary. In addition, // the objects are never freed from the pool, which means that the // the table will grow very large over time. For this reason, the // pooling of OMNamespaces is disabbled. if (POOL_OMNAMESPACES) { String key = uri; if (prefix != null && prefix.length() > 0) { key = key + uriAndPrefixSeparator + prefix; } OMNamespace existingNamespaceObject = (OMNamespace) namespaceTable.get(key); if (existingNamespaceObject == null) { existingNamespaceObject = new OMNamespaceImpl(uri, prefix); namespaceTable.put(key, existingNamespaceObject); } return existingNamespaceObject; } else { return new OMNamespaceImpl(uri, prefix); } } /** * Method createOMText. * * @param parent * @param text * @return Returns OMText. */ public OMText createOMText(OMContainer parent, String text) { return new OMTextImpl(parent, text, this); } public OMText createOMText(OMContainer parent, QName text) { return new OMTextImpl(parent, text, this); } public OMText createOMText(OMContainer parent, String text, int type) { return new OMTextImpl(parent, text, type, this); } public OMText createOMText(OMContainer parent, char[] charArary, int type) { return new OMTextImpl(parent, charArary, type, this); } public OMText createOMText(OMContainer parent, QName text, int type) { return new OMTextImpl(parent, text, type, this); } /** * Method createOMText. * * @param s * @return Returns OMText. */ public OMText createOMText(String s) { return new OMTextImpl(s, this); } public OMText createOMText(String s, int type) { return new OMTextImpl(s, type, this); } /** * Creates text. * * @param s * @param mimeType * @param optimize * @return Returns OMText. */ public OMText createOMText(String s, String mimeType, boolean optimize) { return new OMTextImpl(s, mimeType, optimize, this); } /** * Creates text. * * @param dataHandler * @param optimize * @return Returns OMText. */ public OMText createOMText(Object dataHandler, boolean optimize) { return new OMTextImpl(dataHandler, optimize, this); } public OMText createOMText(String contentID, OMContainer parent, OMXMLParserWrapper builder) { return new OMTextImpl(contentID, parent, builder, this); } /** * Create OMText node that is a copy of the source text node * @param parent * @param source * @return */ public OMText createOMText(OMContainer parent, OMText source) { return new OMTextImpl(parent, (OMTextImpl) source, this); } /** * Creates text. * * @param parent * @param s * @param mimeType * @param optimize * @return Returns OMText. */ public OMText createOMText(OMContainer parent, String s, String mimeType, boolean optimize) { return new OMTextImpl(parent, s, mimeType, optimize, this); } /** * Creates attribute. * * @param localName * @param ns * @param value * @return Returns OMAttribute. */ public OMAttribute createOMAttribute(String localName, OMNamespace ns, String value) { return new OMAttributeImpl(localName, ns, value, this); } /** * Creates DocType/DTD. * * @param parent * @param content * @return Returns doctype. */ public OMDocType createOMDocType(OMContainer parent, String content) { return new OMDocTypeImpl(parent, content, this); } /** * Creates a PI. * * @param parent * @param piTarget * @param piData * @return Returns OMProcessingInstruction. */ public OMProcessingInstruction createOMProcessingInstruction(OMContainer parent, String piTarget, String piData) { return new OMProcessingInstructionImpl(parent, piTarget, piData, this); } /** * Creates a comment. * * @param parent * @param content * @return Returns OMComment. */ public OMComment createOMComment(OMContainer parent, String content) { return new OMCommentImpl(parent, content, this); } /* (non-Javadoc) * @see org.apache.axiom.om.OMFactory#createOMDocument() */ public OMDocument createOMDocument() { return new OMDocumentImpl(); } /* (non-Javadoc) * @see org.apache.axiom.om.OMFactory#createOMDocument(org.apache.axiom.om.OMXMLParserWrapper) */ public OMDocument createOMDocument(OMXMLParserWrapper builder) { return new OMDocumentImpl(builder); } } axiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/util/0000755000000000000000000000000011131637474026145 5ustar rootrootaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/util/AXIOMUtil.java0000644000000000000000000000435111131637474030526 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.llom.util; import org.apache.axiom.om.OMAbstractFactory; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.impl.builder.StAXOMBuilder; import org.apache.axiom.om.util.StAXUtils; import javax.xml.stream.XMLStreamException; import java.io.StringReader; public class AXIOMUtil { /** * Create an OMElement from an XML fragment given as a string. * * @param xmlFragment the well-formed XML fragment * @return The OMElement created out of the string XML fragment. * @throws XMLStreamException */ public static OMElement stringToOM(String xmlFragment) throws XMLStreamException { return stringToOM(OMAbstractFactory.getOMFactory(), xmlFragment); } /** * Create an OMElement from an XML fragment given as a string. * * @param omFactory the factory used to build the object model * @param xmlFragment the well-formed XML fragment * @return The OMElement created out of the string XML fragment. * @throws XMLStreamException */ public static OMElement stringToOM(OMFactory omFactory, String xmlFragment) throws XMLStreamException { if (xmlFragment != null) { return new StAXOMBuilder(omFactory, StAXUtils.createXMLStreamReader(new StringReader(xmlFragment))) .getDocumentElement(); } return null; } } axiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/util/XMLComparator.java0000644000000000000000000002055011131637474031502 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.llom.util; import org.apache.axiom.om.OMAttribute; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMNode; import org.apache.axiom.om.impl.exception.XMLComparisonException; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import java.util.Iterator; import java.util.Vector; /** @deprecated This class is outdated. Please use XmlUnit to compate two xml files. */ public class XMLComparator { /** Eran Chinthaka (chinthaka@apache.org) */ private static Log log = LogFactory.getLog(XMLComparator.class); private Vector ignorableNamespaceList = new Vector(); public void addIgnorableNamespace(String nsURI) { ignorableNamespaceList.add(nsURI); } public void clearIgnorableNamespaces() { ignorableNamespaceList.clear(); } public boolean compare(OMElement elementOne, OMElement elementTwo) throws XMLComparisonException { //ignore if the elements belong to any of the ignorable namespaces list if (isIgnorable(elementOne) || isIgnorable(elementTwo)) { return true; } if (elementOne == null && elementTwo == null) { log.info("Both Elements are null."); return true; } if (elementOne == null && elementTwo != null) { throw new XMLComparisonException( "Element One is null and Element Two is not null"); } if (elementOne != null && elementTwo == null) { throw new XMLComparisonException( "Element Two is null and Element One is not null"); } log.info( "Now Checking " + elementOne.getLocalName() + " and " + elementTwo.getLocalName() + "============================="); log.info("Comparing Element Names ......."); compare("Elements names are not equal. ", elementOne.getLocalName(), elementTwo.getLocalName()); log.info("Comparing Namespaces ........."); compare("Element namespaces are not equal", elementOne.getNamespace(), elementTwo.getNamespace()); log.info("Comparing attributes ....."); compareAllAttributes(elementOne, elementTwo); log.info("Comparing texts ....."); /* * Trimming the value of the XMLElement is not correct * since this compare method cannot be used to compare * element contents with trailing and leading whitespaces * BUT for the practicalltiy of tests and to get the current * tests working we have to trim() the contents */ compare("Elements texts are not equal ", elementOne.getText().trim(), elementTwo.getText().trim()); log.info("Comparing Children ......"); compareAllChildren(elementOne, elementTwo); return true; } private void compareAllAttributes(OMElement elementOne, OMElement elementTwo) throws XMLComparisonException { compareAttibutes(elementOne, elementTwo); compareAttibutes(elementTwo, elementOne); } private void compareAllChildren(OMElement elementOne, OMElement elementTwo) throws XMLComparisonException { compareChildren(elementOne, elementTwo); compareChildren(elementTwo, elementOne); } private boolean isIgnorable(OMElement elt) { if (elt != null) { OMNamespace namespace = elt.getNamespace(); if (namespace != null) { return ignorableNamespaceList.contains(namespace.getNamespaceURI()); } else { return false; } } else { return false; } } private void compareChildren(OMElement elementOne, OMElement elementTwo) throws XMLComparisonException { //ignore if the elements belong to any of the ignorable namespaces list if (isIgnorable(elementOne) || isIgnorable(elementTwo)) { return; } Iterator elementOneChildren = elementOne.getChildren(); while (elementOneChildren.hasNext()) { OMNode omNode = (OMNode) elementOneChildren.next(); if (omNode instanceof OMElement) { OMElement elementOneChild = (OMElement) omNode; OMElement elementTwoChild = null; //Do the comparison only if the element is not ignorable if (!isIgnorable(elementOneChild)) { elementTwoChild = elementTwo.getFirstChildWithName( elementOneChild.getQName()); //Do the comparison only if the element is not ignorable if (!isIgnorable(elementTwoChild)) { if (elementTwoChild == null) { throw new XMLComparisonException( " There is no " + elementOneChild.getLocalName() + " element under " + elementTwo.getLocalName()); } } } compare(elementOneChild, elementTwoChild); } } } private void compareAttibutes(OMElement elementOne, OMElement elementTwo) throws XMLComparisonException { int elementOneAtribCount = 0; int elementTwoAtribCount = 0; Iterator attributes = elementOne.getAllAttributes(); while (attributes.hasNext()) { OMAttribute omAttribute = (OMAttribute) attributes.next(); OMAttribute attr = elementTwo.getAttribute( omAttribute.getQName()); if (attr == null) { throw new XMLComparisonException( "Attributes are not the same in two elements. Attribute " + omAttribute.getLocalName() + " != "); } elementOneAtribCount++; } Iterator elementTwoIter = elementTwo.getAllAttributes(); while (elementTwoIter.hasNext()) { elementTwoIter.next(); elementTwoAtribCount++; } if (elementOneAtribCount != elementTwoAtribCount) { throw new XMLComparisonException( "Attributes are not the same in two elements."); } } private void compare(String failureNotice, String one, String two) throws XMLComparisonException { if (!one.equals(two)) { throw new XMLComparisonException( failureNotice + one + " != " + two); } } private void compare(String failureNotice, OMNamespace one, OMNamespace two) throws XMLComparisonException { if (one == null && two == null) { return; } else if (one != null && two == null) { throw new XMLComparisonException( "First Namespace is NOT null. But the second is null"); } else if (one == null && two != null) { throw new XMLComparisonException( "First Namespace is null. But the second is NOT null"); } if (!one.getNamespaceURI().equals(two.getNamespaceURI())) { throw new XMLComparisonException( failureNotice + one + " != " + two); } // Do we need to compare prefixes as well } } ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/util/NamespaceContextImpl.javaaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/util/NamespaceContextImpl0000644000000000000000000001013511131637474032153 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.llom.util; import javax.xml.XMLConstants; import javax.xml.namespace.NamespaceContext; import java.util.Collections; import java.util.HashSet; import java.util.Iterator; import java.util.Map; import java.util.Set; public class NamespaceContextImpl implements NamespaceContext { protected Map namespaces; public NamespaceContextImpl(Map map) { namespaces = map; } /** * Get the URI given a prefix * * @param prefix * @return uri string */ public String getNamespaceURI(String prefix) { if (prefix == null) { throw new IllegalArgumentException("null prefix argument is invalid"); } else if (prefix.equals(XMLConstants.XML_NS_PREFIX)) { return XMLConstants.XML_NS_URI; } else if (prefix.equals(XMLConstants.XMLNS_ATTRIBUTE)) { return XMLConstants.XMLNS_ATTRIBUTE_NS_URI; } else if (namespaces.containsKey(prefix)) { return (String) namespaces.get(prefix); } return null; } /** * Get the prefix for a uri * * @param nsURI * @return prefix string */ public String getPrefix(String nsURI) { if (nsURI == null) { throw new IllegalArgumentException("invalid null nsURI"); } else if (nsURI.length() == 0) { throw new IllegalArgumentException("invalid empty nsURI"); } else if (nsURI.equals(XMLConstants.XML_NS_URI)) { return XMLConstants.XML_NS_PREFIX; } else if (nsURI.equals(XMLConstants.XMLNS_ATTRIBUTE_NS_URI)) { return XMLConstants.XMLNS_ATTRIBUTE; } Iterator iter = namespaces.entrySet().iterator(); while (iter.hasNext()) { Map.Entry entry = (Map.Entry) iter.next(); String uri = (String) entry.getValue(); if (uri.equals(nsURI)) { return (String) entry.getKey(); } } if (nsURI.length() == 0) { return ""; } return null; } /** * Get list of prefixes * * @param nsURI * @return iterator (of strings) */ public Iterator getPrefixes(String nsURI) { if (nsURI == null) { throw new IllegalArgumentException("invalid null nsURI"); } else if (nsURI.equals(XMLConstants.XML_NS_URI)) { return Collections.singleton(XMLConstants.XML_NS_PREFIX).iterator(); } else if (nsURI.equals(XMLConstants.XMLNS_ATTRIBUTE_NS_URI)) { return Collections.singleton(XMLConstants.XMLNS_ATTRIBUTE) .iterator(); } Set prefixes = null; Iterator iter = namespaces.entrySet().iterator(); while (iter.hasNext()) { Map.Entry entry = (Map.Entry) iter.next(); String uri = (String) entry.getValue(); if (uri.equals(nsURI)) { if (prefixes == null) { prefixes = new HashSet(); } prefixes.add(entry.getKey()); } } if (prefixes != null) { return Collections.unmodifiableSet(prefixes).iterator(); } else if (nsURI.length() == 0) { return Collections.singleton("").iterator(); } else { return Collections.EMPTY_LIST.iterator(); } } }axiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMNamespaceImpl.java0000644000000000000000000000205011131637474031002 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.llom; /** @deprecated Use {@link OMNamespaceImpl} */ public class OMNamespaceImpl extends org.apache.axiom.om.impl.OMNamespaceImpl { public OMNamespaceImpl(String pUri, String prefix) { super(pUri, prefix); } } axiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMDocTypeImpl.java0000644000000000000000000000536611131637474030472 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.llom; import org.apache.axiom.om.OMContainer; import org.apache.axiom.om.OMDocType; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMException; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMNode; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamWriter; public class OMDocTypeImpl extends OMNodeImpl implements OMDocType { protected String value; /** * Constructor OMDocTypeImpl. * * @param parentNode * @param contentText */ public OMDocTypeImpl(OMContainer parentNode, String contentText, OMFactory factory) { super(parentNode, factory, true); this.value = contentText; nodeType = OMNode.DTD_NODE; } /** * Constructor OMDocTypeImpl. * * @param parentNode */ public OMDocTypeImpl(OMContainer parentNode, OMFactory factory) { this(parentNode, null, factory); } /** * Serializes the node with caching. * * @param writer * @throws XMLStreamException */ public void internalSerialize(XMLStreamWriter writer) throws XMLStreamException { writer.writeDTD(this.value); } /** * Serializes the node without caching. * * @param writer * @throws XMLStreamException */ public void internalSerializeAndConsume(XMLStreamWriter writer) throws XMLStreamException { internalSerialize(writer); } /** * Gets the value of this DocType. * * @return Returns String. */ public String getValue() { return value; } /** * Sets the value of this DocType. * * @param text */ public void setValue(String text) { this.value = text; } /** * Discards this node. * * @throws OMException */ public void discard() throws OMException { if (done) { this.detach(); } } } axiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMCommentImpl.java0000644000000000000000000000537611131637474030526 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.llom; import org.apache.axiom.om.OMComment; import org.apache.axiom.om.OMContainer; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMException; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMNode; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamWriter; public class OMCommentImpl extends OMNodeImpl implements OMComment { protected String value; /** * Constructor OMCommentImpl. * * @param parentNode * @param contentText */ public OMCommentImpl(OMContainer parentNode, String contentText, OMFactory factory) { super(parentNode, factory, true); this.value = contentText; nodeType = OMNode.COMMENT_NODE; } /** * Constructor OMCommentImpl. * * @param parentNode */ public OMCommentImpl(OMContainer parentNode, OMFactory factory) { this(parentNode, null, factory); } /** * Serializes the node with caching. * * @param writer * @throws XMLStreamException */ public void internalSerialize(XMLStreamWriter writer) throws XMLStreamException { writer.writeComment(this.value); } /** * Serializes the node without caching. * * @param writer * @throws XMLStreamException */ public void internalSerializeAndConsume(XMLStreamWriter writer) throws XMLStreamException { internalSerialize(writer); } /** * Gets the value of this comment. * * @return Returns String. */ public String getValue() { return value; } /** * Sets the value of this comment. * * @param text */ public void setValue(String text) { this.value = text; } /** * Discards this node. * * @throws OMException */ public void discard() throws OMException { if (done) { this.detach(); } } } axiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMStAXWrapper.java0000644000000000000000000014103211131637474030450 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.llom; import java.util.HashMap; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.Map; import java.util.Stack; import javax.activation.DataHandler; import javax.xml.namespace.NamespaceContext; import javax.xml.namespace.QName; import javax.xml.stream.Location; import javax.xml.stream.XMLStreamConstants; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import org.apache.axiom.om.OMAttachmentAccessor; import org.apache.axiom.om.OMAttribute; import org.apache.axiom.om.OMComment; import org.apache.axiom.om.OMConstants; import org.apache.axiom.om.OMContainer; import org.apache.axiom.om.OMDocument; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMNode; import org.apache.axiom.om.OMSourcedElement; import org.apache.axiom.om.OMText; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.om.OMXMLStreamReader; import org.apache.axiom.om.impl.EmptyOMLocation; import org.apache.axiom.om.impl.builder.StAXBuilder; import org.apache.axiom.om.impl.exception.OMStreamingException; import org.apache.axiom.om.impl.llom.util.NamespaceContextImpl; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; /** * Note - This class also implements the streaming constants interface to get access to the StAX * constants */ public class OMStAXWrapper implements OMXMLStreamReader, XMLStreamConstants { private static final Log log = LogFactory.getLog(OMStAXWrapper.class); private static boolean DEBUG_ENABLED = log.isDebugEnabled(); /** Field navigator */ private OMNavigator navigator; /** Field builder */ private OMXMLParserWrapper builder; /** Field parser */ private XMLStreamReader parser; private boolean _isClosed = false; // Indicate if parser is closed private boolean _releaseParserOnClose = false; // Defaults to legacy behavior, which is keep the reference /** Field rootNode */ private OMNode rootNode; /** Field isFirst */ private boolean isFirst = true; // Navigable means the output should be taken from the navigator. // As soon as the navigator returns a null navigable will be reset // to false and the subsequent events will be taken from the builder // or the parser directly. /** Field NAVIGABLE */ private static final short NAVIGABLE = 0; private static final short SWITCH_AT_NEXT = 1; private static final short COMPLETED = 2; private static final short SWITCHED = 3; private static final short DOCUMENT_COMPLETE = 4; // Variables used to build an xop:include representation private final static QName XOP_INCLUDE = new QName("http://www.w3.org/2004/08/xop/include", "Include", "xop"); private OMElement xopInclude = null; private OMText xopIncludeText = null; private boolean xopIncludeStart = false; /** Field state */ private short state; /** Field currentEvent Default set to START_DOCUMENT */ private int currentEvent = START_DOCUMENT; // SwitchingAllowed is set to false by default. // This means that unless the user explicitly states // that he wants things not to be cached, everything will // be cached. /** Field switchingAllowed */ boolean switchingAllowed = false; // namespaceURI interning // default is false because most XMLStreamReader implementations don't do interning // due to performance impacts boolean namespaceURIInterning = false; /** Field elementStack */ private Stack nodeStack = null; // keeps the next event. The parser actually keeps one step ahead to // detect the end of navigation. (at the end of the stream the navigator // returns a null /** Field nextNode */ private OMNode nextNode = null; // holder for the current node. Needs this to generate events from the current node /** Field currentNode */ private OMNode currentNode = null; // needs this to refer to the last known node /** Field lastNode */ private OMNode lastNode = null; /** Track depth to ensure we stop generating events when we are done with the root node. */ int depth = 0; private boolean needToThrowEndDocument = false; /** * If true then TEXT events are constructed for the MTOM attachment * If false, an event is constructed and * the consumer must call getDataHandler(cid) to access the datahandler. */ private boolean inlineMTOM = true; /** * Method setAllowSwitching. * * @param b */ public void setAllowSwitching(boolean b) { this.switchingAllowed = b; } /** * Method isAllowSwitching. * * @return Returns boolean. */ public boolean isAllowSwitching() { return switchingAllowed; } /** * Set namespace uri interning * @param b */ public void setNamespaceURIInterning(boolean b) { this.namespaceURIInterning = b; } /** * @return if namespace uri interning */ public boolean isNamespaceURIInterning() { return this.namespaceURIInterning; } /** * When constructing the OMStaxWrapper, the creator must produce the builder (an instance of the * OMXMLparserWrapper of the input) and the Element Node to start parsing. The wrapper will * parse(proceed) until the end of the given element. Hence care should be taken to pass the * root element if the entire document is needed. * * @param builder * @param startNode */ public OMStAXWrapper(OMXMLParserWrapper builder, OMElement startNode) { this(builder, startNode, false); } /** * Constructor OMStAXWrapper. * * @param builder * @param startNode * @param cache */ public OMStAXWrapper(OMXMLParserWrapper builder, OMElement startNode, boolean cache) { // create a navigator this.navigator = new OMNavigator(startNode); this.builder = builder; this.rootNode = startNode; if (rootNode != null && rootNode.getParent() != null && rootNode.getParent() instanceof OMDocument) { needToThrowEndDocument = true; } // initiate the next and current nodes // Note - navigator is written in such a way that it first // returns the starting node at the first call to it // Note - for OMSourcedElements, temporarily set caching // to get the initial navigator nodes boolean resetCache = false; try { if (startNode instanceof OMSourcedElement && !cache && builder != null) { if (!builder.isCache()) { resetCache = true; } builder.setCache(true); // bootstrap the navigator } } catch(Throwable t) {} currentNode = navigator.next(); updateNextNode(); if (resetCache) { builder.setCache(cache); } switchingAllowed = !cache; } /** * @return Returns String. * @see javax.xml.stream.XMLStreamReader#getPrefix() */ public String getPrefix() { String returnStr = null; if (parser != null) { returnStr = parser.getPrefix(); } else { if ((currentEvent == START_ELEMENT) || (currentEvent == END_ELEMENT)) { OMNamespace ns = ((OMElement) getNode()).getNamespace(); returnStr = (ns == null) ? null : ns.getPrefix(); } } return returnStr; } /** * @return Returns String. * @see javax.xml.stream.XMLStreamReader#getNamespaceURI() */ public String getNamespaceURI() { String returnStr = null; if (parser != null) { returnStr = parser.getNamespaceURI(); } else { if ((currentEvent == START_ELEMENT) || (currentEvent == END_ELEMENT) || (currentEvent == NAMESPACE)) { OMNamespace ns = ((OMElement) getNode()).getNamespace(); returnStr = (ns == null) ? null : ns.getNamespaceURI(); } } // By default most parsers don't intern the namespace. // Unfortunately the property to detect interning on the delegate parsers is hard to detect. // Woodstox has a proprietary property on the XMLInputFactory. // IBM has a proprietary property on the XMLStreamReader. // For now only force the interning if requested. if (this.isNamespaceURIInterning()) { returnStr = (returnStr != null) ? returnStr.intern() : null; } return returnStr; } /** * @return Returns boolean. * @see javax.xml.stream.XMLStreamReader#hasName() */ public boolean hasName() { if (parser != null) { return parser.hasName(); } else { return ((currentEvent == START_ELEMENT) || (currentEvent == END_ELEMENT)); } } /** * @return Returns String. * @see javax.xml.stream.XMLStreamReader#getLocalName() */ public String getLocalName() { String returnStr = null; if (parser != null) { returnStr = parser.getLocalName(); } else { if ((currentEvent == START_ELEMENT) || (currentEvent == END_ELEMENT) || (currentEvent == ENTITY_REFERENCE)) { returnStr = ((OMElement) getNode()).getLocalName(); } } return returnStr; } /** * @return Returns QName. * @see javax.xml.stream.XMLStreamReader#getName() */ public QName getName() { QName returnName = null; if (parser != null) { returnName = parser.getName(); } else { if ((currentEvent == START_ELEMENT) || (currentEvent == END_ELEMENT)) { returnName = getQName((OMElement) getNode()); } } return returnName; } /** * @return Returns boolean. * @see javax.xml.stream.XMLStreamReader#hasText() */ public boolean hasText() { return ((currentEvent == CHARACTERS) || (currentEvent == DTD) || (currentEvent == CDATA) || (currentEvent == ENTITY_REFERENCE) || (currentEvent == COMMENT) || (currentEvent == SPACE)); } /** * @return Returns int. * @see javax.xml.stream.XMLStreamReader#getTextLength() */ public int getTextLength() { if (parser != null) { return parser.getTextLength(); } else { String text = getTextFromNode(); return text == null ? 0 : text.length(); } } /** * @return Returns int. * @see javax.xml.stream.XMLStreamReader#getTextStart() */ public int getTextStart() { if (parser != null) { return parser.getTextStart(); } else { // getTextCharacters always returns a new char array and the start // index is therefore always 0 return 0; } } /** * @param sourceStart * @param target * @param targetStart * @param length * @return Returns int. * @throws XMLStreamException * @see javax.xml.stream.XMLStreamReader#getTextCharacters(int, char[], int, int) */ public int getTextCharacters(int sourceStart, char[] target, int targetStart, int length) throws XMLStreamException { if (parser != null) { try { return parser.getTextCharacters(sourceStart, target, targetStart, length); } catch (XMLStreamException e) { throw new OMStreamingException(e); } } else { String text = getTextFromNode(); if (text != null) { int copied = Math.min(length, text.length()-sourceStart); text.getChars(sourceStart, sourceStart + copied, target, targetStart); return copied; } else { return 0; } } } /** * @return Returns char[]. * @see javax.xml.stream.XMLStreamReader#getTextCharacters() */ public char[] getTextCharacters() { if (parser != null) { return parser.getTextCharacters(); } else { String text = getTextFromNode(); return text == null ? null : text.toCharArray(); } } /** * @return Returns String. * @see javax.xml.stream.XMLStreamReader#getText() */ public String getText() { if (parser != null) { return parser.getText(); } else { return getTextFromNode(); } } private String getTextFromNode() { if (hasText()) { OMNode node = getNode(); if (node instanceof OMText) { return ((OMText)node).getText(); } else if (node instanceof OMComment) { return ((OMComment)node).getValue(); } } return null; } /** * @return Returns int. * @see javax.xml.stream.XMLStreamReader#getEventType() */ // todo this should be improved public int getEventType() { return currentEvent; } /** * @param i * @return Returns String. * @see javax.xml.stream.XMLStreamReader#getNamespaceURI */ public String getNamespaceURI(int i) { String returnString = null; if (parser != null) { returnString = parser.getNamespaceURI(i); } else { if (isStartElement() || isEndElement() || (currentEvent == NAMESPACE)) { OMNamespace ns = (OMNamespace) getItemFromIterator( ((OMElement) getNode()).getAllDeclaredNamespaces(), i); returnString = (ns == null) ? null : ns.getNamespaceURI(); } } /* The following line is necessary to overcome an issue where the empty namespace URI returning null rather than the empty string. Our resolution is to return "" if the return is actually null Note that this is not the case for getNamespaceURI(prefix) method where the contract clearly specifies that the return may be null */ if (returnString == null) returnString = ""; return returnString; } /** * @param i * @return Returns String. * @see javax.xml.stream.XMLStreamReader#getNamespacePrefix */ public String getNamespacePrefix(int i) { String returnString = null; if (parser != null) { returnString = parser.getNamespacePrefix(i); } else { if (isStartElement() || isEndElement() || (currentEvent == NAMESPACE)) { OMNamespace ns = (OMNamespace) getItemFromIterator( ((OMElement) getNode()).getAllDeclaredNamespaces(), i); returnString = (ns == null) ? null : ns.getPrefix(); } } return returnString; } /** * @return Returns int. * @see javax.xml.stream.XMLStreamReader#getNamespaceCount() */ public int getNamespaceCount() { int returnCount = 0; if (parser != null) { returnCount = parser.getNamespaceCount(); } else { if (isStartElement() || isEndElement() || (currentEvent == NAMESPACE)) { returnCount = getCount( ((OMElement) getNode()).getAllDeclaredNamespaces()); } } return returnCount; } /** * @param i * @return Returns boolean. * @see javax.xml.stream.XMLStreamReader#isAttributeSpecified */ public boolean isAttributeSpecified(int i) { boolean returnValue = false; if (parser != null) { returnValue = parser.isAttributeSpecified(i); } else { if (isStartElement() || (currentEvent == ATTRIBUTE)) { // theres nothing to be returned here } else { throw new IllegalStateException( "attribute type accessed in illegal event!"); } } return returnValue; } /** * @param i * @return Returns String. * @see javax.xml.stream.XMLStreamReader#getAttributeValue */ public String getAttributeValue(int i) { String returnString = null; if (parser != null) { returnString = parser.getAttributeValue(i); } else { if (isStartElement() || (currentEvent == ATTRIBUTE)) { OMAttribute attrib = getAttribute((OMElement) getNode(), i); if (attrib != null) { returnString = attrib.getAttributeValue(); } } else { throw new IllegalStateException( "attribute type accessed in illegal event!"); } } return returnString; } /** * @param i * @return Returns String. * @see javax.xml.stream.XMLStreamReader#getAttributeType */ public String getAttributeType(int i) { String returnString = null; if (parser != null) { returnString = parser.getAttributeType(i); } else { if (isStartElement() || (currentEvent == ATTRIBUTE)) { OMAttribute attrib = getAttribute((OMElement) getNode(), i); if (attrib != null) { returnString = attrib.getAttributeType(); } } else { throw new IllegalStateException( "attribute type accessed in illegal event!"); } } return returnString; } /** * @param i * @return Returns String. * @see javax.xml.stream.XMLStreamReader#getAttributePrefix */ public String getAttributePrefix(int i) { String returnString = null; if (parser != null) { returnString = parser.getAttributePrefix(i); } else { if (isStartElement() || (currentEvent == ATTRIBUTE)) { OMAttribute attrib = getAttribute((OMElement) getNode(), i); if (attrib != null) { OMNamespace nameSpace = attrib.getNamespace(); if (nameSpace != null) { returnString = nameSpace.getPrefix(); } } } else { throw new IllegalStateException( "attribute prefix accessed in illegal event!"); } } return returnString; } /** * @param i * @return Returns String. * @see javax.xml.stream.XMLStreamReader#getAttributeLocalName */ public String getAttributeLocalName(int i) { String returnString = null; if (parser != null) { returnString = parser.getAttributeLocalName(i); } else { if (isStartElement() || (currentEvent == ATTRIBUTE)) { OMAttribute attrib = getAttribute((OMElement) getNode(), i); if (attrib != null) { returnString = attrib.getLocalName(); } } else { throw new IllegalStateException( "attribute localName accessed in illegal event!"); } } return returnString; } /** * @param i * @return Returns String. * @see javax.xml.stream.XMLStreamReader#getAttributeNamespace */ public String getAttributeNamespace(int i) { String returnString = null; if (parser != null) { returnString = parser.getAttributeNamespace(i); } else { if (isStartElement() || (currentEvent == ATTRIBUTE)) { OMAttribute attrib = getAttribute((OMElement) getNode(), i); if (attrib != null) { OMNamespace nameSpace = attrib.getNamespace(); if (nameSpace != null) { returnString = nameSpace.getNamespaceURI(); } } } else { throw new IllegalStateException( "attribute nameSpace accessed in illegal event!"); } } return returnString; } /** * @param i * @return Returns QName. * @see javax.xml.stream.XMLStreamReader#getAttributeName */ public QName getAttributeName(int i) { QName returnQName = null; if (parser != null) { returnQName = parser.getAttributeName(i); } else { if (isStartElement() || (currentEvent == ATTRIBUTE)) { returnQName = getAttribute((OMElement) getNode(), i).getQName(); } else { throw new IllegalStateException( "attribute count accessed in illegal event!"); } } return returnQName; } /** * @return Returns int. * @see javax.xml.stream.XMLStreamReader#getAttributeCount */ public int getAttributeCount() { int returnCount = 0; if (parser != null) { returnCount = parser.getAttributeCount(); } else { if (isStartElement() || (currentEvent == ATTRIBUTE)) { OMElement elt = (OMElement) getNode(); returnCount = getCount(elt.getAllAttributes()); } else { throw new IllegalStateException( "attribute count accessed in illegal event (" + currentEvent + ")!"); } } return returnCount; } // todo /** * Method getAttributeValue. * * @param s * @param s1 * @return Returns String. */ public String getAttributeValue(String s, String s1) { String returnString = null; if (parser != null) { returnString = parser.getAttributeValue(s, s1); } else { if (isStartElement() || (currentEvent == ATTRIBUTE)) { QName qname = new QName(s, s1); OMAttribute attrib = ((OMElement) getNode()).getAttribute(qname); if (attrib != null) { returnString = attrib.getAttributeValue(); } } else { throw new IllegalStateException( "attribute type accessed in illegal event!"); } } return returnString; } /** * Method isWhiteSpace. * * @return Returns boolean. */ public boolean isWhiteSpace() { boolean b; if (parser != null) { b = parser.isWhiteSpace(); } else { b = (currentEvent == SPACE); } return b; } /** * Method isCharacters. * * @return Returns boolean. */ public boolean isCharacters() { boolean b; if (parser != null) { b = parser.isCharacters(); } else { b = (currentEvent == CHARACTERS); } return b; } /** * Method isEndElement. * * @return Returns boolean. */ public boolean isEndElement() { boolean b; if (parser != null) { b = parser.isEndElement(); } else { b = (currentEvent == END_ELEMENT); } return b; } /** * @param i * @param s * @param s1 * @throws XMLStreamException * @see javax.xml.stream.XMLStreamReader#require(int, String, String) */ public void require(int i, String s, String s1) throws XMLStreamException { throw new XMLStreamException(); } /** * Method isStartElement. * * @return Returns boolean. */ public boolean isStartElement() { boolean b; if (parser != null) { b = parser.isStartElement(); } else { b = (currentEvent == START_ELEMENT); } return b; } /** * Method getNamespaceURI. * * @param prefix * @return Returns String. */ public String getNamespaceURI(String prefix) { String returnString = null; if (parser != null) { returnString = parser.getNamespaceURI(prefix); } else { if (isStartElement() || isEndElement() || (currentEvent == NAMESPACE)) { if (rootNode instanceof OMElement) { OMNamespace namespaceURI = ((OMElement) rootNode).findNamespaceURI(prefix); return namespaceURI != null ? namespaceURI.getNamespaceURI() : null; } } } return returnString; } /** * Method close. * * @throws XMLStreamException */ public void close() throws XMLStreamException { // If there is a builder, it controls its parser if (builder != null && builder instanceof StAXBuilder) { StAXBuilder staxBuilder = (StAXBuilder) builder; staxBuilder.close(); parser = null; } else { if (parser != null) { try { if (!isClosed()) { parser.close(); } } finally { _isClosed = true; // Release the parser so that it can be GC'd or reused. if (_releaseParserOnClose) { parser = null; } } } } } /** * Method hasNext. * * @return Returns boolean. * @throws XMLStreamException */ public boolean hasNext() throws XMLStreamException { if (needToThrowEndDocument) { return !(state == DOCUMENT_COMPLETE); } else { return (state != COMPLETED && currentEvent != END_DOCUMENT); } } /** * Returns the next tag. * * @return Returns int. * @throws org.apache.axiom.om.impl.exception.OMStreamingException * * @throws XMLStreamException */ public int nextTag() throws XMLStreamException { int eventType = next(); while ((eventType == XMLStreamConstants.CHARACTERS && isWhiteSpace()) // skip whitespace || (eventType == XMLStreamConstants.CDATA && isWhiteSpace()) // skip whitespace || eventType == XMLStreamConstants.SPACE || eventType == XMLStreamConstants.PROCESSING_INSTRUCTION || eventType == XMLStreamConstants.COMMENT) { eventType = next(); } if (eventType != XMLStreamConstants.START_ELEMENT && eventType != XMLStreamConstants.END_ELEMENT) { throw new XMLStreamException("expected start or end tag", getLocation()); } return eventType; } /** * @return Returns String. * @throws XMLStreamException * @see javax.xml.stream.XMLStreamReader#getElementText() */ public String getElementText() throws XMLStreamException { if (parser != null) { try { return parser.getElementText(); } catch (XMLStreamException e) { throw new OMStreamingException(e); } } else { /////////////////////////////////////////////////////// //// Code block directly from the API documentation /// if (getEventType() != XMLStreamConstants.START_ELEMENT) { throw new XMLStreamException( "parser must be on START_ELEMENT to read next text", getLocation()); } int eventType = next(); StringBuffer content = new StringBuffer(); while (eventType != XMLStreamConstants.END_ELEMENT) { if (eventType == XMLStreamConstants.CHARACTERS || eventType == XMLStreamConstants.CDATA || eventType == XMLStreamConstants.SPACE || eventType == XMLStreamConstants.ENTITY_REFERENCE) { content.append(getText()); } else if (eventType == XMLStreamConstants.PROCESSING_INSTRUCTION || eventType == XMLStreamConstants.COMMENT) { // skipping } else if (eventType == XMLStreamConstants.END_DOCUMENT) { throw new XMLStreamException( "unexpected end of document when reading element text content"); } else if (eventType == XMLStreamConstants.START_ELEMENT) { throw new XMLStreamException( "element text content may not contain START_ELEMENT"); } else { throw new XMLStreamException( "Unexpected event type " + eventType, getLocation()); } eventType = next(); } return content.toString(); /////////////////////////////////////////////////////////////// } } /** * Method next. * * @return Returns int. * @throws XMLStreamException */ public int next() throws XMLStreamException { switch (state) { case DOCUMENT_COMPLETE: throw new XMLStreamException("End of the document reached"); case COMPLETED: state = DOCUMENT_COMPLETE; currentEvent = END_DOCUMENT; break; case SWITCH_AT_NEXT: state = SWITCHED; // load the parser try { parser = (XMLStreamReader) builder.getParser(); } catch (Exception e) { throw new XMLStreamException("problem accessing the parser. " + e.getMessage(), e); } // We should throw an END_DOCUMENT if ((currentEvent == START_DOCUMENT) && (currentEvent == parser.getEventType())) { currentEvent = parser.next(); } else { currentEvent = parser.getEventType(); } updateCompleteStatus(); break; case NAVIGABLE: currentEvent = generateEvents(currentNode); updateCompleteStatus(); updateLastNode(); break; case SWITCHED: if (parser.hasNext()) { currentEvent = parser.next(); } updateCompleteStatus(); break; default : throw new OMStreamingException("unsuppported state!"); } return currentEvent; } /** * Method getProperty. * * @param s * @return Returns Object. * @throws IllegalArgumentException */ public Object getProperty(String s) throws IllegalArgumentException { if (OMConstants.IS_DATA_HANDLERS_AWARE.equals(s)) { return Boolean.TRUE; } if (OMConstants.IS_BINARY.equals(s)) { if (getNode() instanceof OMText) { OMText text = (OMText) getNode(); return new Boolean(text.isBinary()); } return Boolean.FALSE; } else if (OMConstants.DATA_HANDLER.equals(s)) { if (getNode() instanceof OMText) { OMText text = (OMText) getNode(); if (text.isBinary()) return text.getDataHandler(); } } // Per spec, throw IllegalArgumentException if (s == null) { throw new IllegalArgumentException(); } if (parser != null) { return parser.getProperty(s); } // Delegate to the builder's parser. if (builder != null && builder instanceof StAXBuilder) { StAXBuilder staxBuilder = (StAXBuilder) builder; if (!staxBuilder.isClosed()) { // If the parser was closed by something other // than the builder, an IllegalStateException is // thrown. For now, return null as this is unexpected // by the caller. try { return ((StAXBuilder) builder).getReaderProperty(s); } catch (IllegalStateException ise) { return null; } } } return null; } /** * This is a very important method. It keeps the navigator one step ahead and pushes it one * event ahead. If the nextNode is null then navigable is set to false. At the same time the * parser and builder are set up for the upcoming event generation. * * @throws XMLStreamException */ private void updateLastNode() throws XMLStreamException { // Detect XOP:Include element and don't advance if processing // the end tag. if (xopInclude != null && xopIncludeText == currentNode && xopIncludeStart) { lastNode = xopIncludeText; return; } lastNode = currentNode; currentNode = nextNode; try { updateNextNode(); } catch (Exception e) { throw new XMLStreamException(e); } } /** Method updateNextNode. */ private void updateNextNode() { if (navigator.isNavigable()) { nextNode = navigator.next(); } else { if (!switchingAllowed) { if (navigator.isCompleted() || builder == null || builder.isCompleted()) { nextNode = null; if (DEBUG_ENABLED) { if (builder == null || builder.isCompleted()) { log.debug("Builder is complete. Next node is set to null."); } } } else { builder.next(); navigator.step(); nextNode = navigator.next(); } } else { //at this point check whether the navigator is done //if the navigator is done then we are fine and can directly // jump to the complete state ? if (navigator.isCompleted()) { nextNode = null; } else { // reset caching (the default is ON so it was not needed in the // earlier case! if (builder != null) { builder.setCache(false); } state = SWITCH_AT_NEXT; } } } } /** Method updateCompleteStatus. */ private void updateCompleteStatus() { if (state == NAVIGABLE) { if (rootNode == currentNode) { if (isFirst) { isFirst = false; } else { state = COMPLETED; } } } else { if (state == SWITCHED) { //this is a potential place for bugs //we have to test if the root node of this parser //has the same name for this test if (currentEvent == START_ELEMENT && (parser.getLocalName().equals(((OMElement)rootNode).getLocalName()))) { ++depth; } else if (currentEvent == END_ELEMENT && (parser.getLocalName().equals(((OMElement)rootNode).getLocalName())) ) { --depth; if (depth < 0) { state = COMPLETED; } } } state = (currentEvent == END_DOCUMENT) ? DOCUMENT_COMPLETE : state; } } /** * Method getNamespaceContext. * * @return Returns NamespaceContext. */ public NamespaceContext getNamespaceContext() { if (state==SWITCHED){ return parser.getNamespaceContext(); } Map m = getAllNamespaces(getNode()); if (getNode() != lastNode) { // Handle situation involving substituted node. m.putAll(getAllNamespaces(lastNode)); } return new NamespaceContextImpl(m); } /** * Method getEncoding. * * @return Returns String. */ public String getEncoding() { return null; } /** * Method getLocation. * * @return Returns Location. */ public Location getLocation() { return new EmptyOMLocation(); } /** * Method getVersion. * * @return Returns String. */ public String getVersion() { return "1.0"; //todo put the constant } /** * Method isStandalone. * * @return Returns boolean. */ public boolean isStandalone() { return true; } /** * Method standaloneSet. * * @return Returns boolean. */ public boolean standaloneSet() { return false; } /** * Method getCharacterEncodingScheme. * * @return Returns String. */ public String getCharacterEncodingScheme() { if(builder != null) { return builder.getCharacterEncoding(); } return "utf-8"; } /** * Method getPITarget. * * @return Returns String. */ public String getPITarget() { throw new UnsupportedOperationException(); } /** * Method getPIData. * * @return Returns String. */ public String getPIData() { throw new UnsupportedOperationException(); } /* * * ################################################################ * Generator methods for the OMNodes returned by the navigator * ################################################################ * */ /** * Method generateEvents. * * @param node * @return Returns int. */ private int generateEvents(OMNode node) { int returnEvent = 0; if (node == null) { if (log.isDebugEnabled()) { log.debug("Node is null...returning END_DOCUMENT"); } returnEvent = END_DOCUMENT; return returnEvent; } int nodeType = node.getType(); switch (nodeType) { case OMNode.ELEMENT_NODE: OMElement element = (OMElement) node; returnEvent = generateElementEvents(element); break; case OMNode.TEXT_NODE: returnEvent = generateTextEvents(node); break; case OMNode.COMMENT_NODE: returnEvent = generateCommentEvents(); break; case OMNode.CDATA_SECTION_NODE: returnEvent = generateCdataEvents(); break; default : break; // just ignore any other nodes } return returnEvent; } /** * Method generateElementEvents. * * @param elt * @return Returns int. */ private int generateElementEvents(OMElement elt) { if (nodeStack == null) { nodeStack = new Stack(); } int returnValue = START_ELEMENT; if (!nodeStack.isEmpty() && nodeStack.peek().equals(elt)) { returnValue = END_ELEMENT; nodeStack.pop(); } else { nodeStack.push(elt); } return returnValue; } /** * Method generateTextEvents. * * @return Returns int. */ private int generateTextEvents(OMNode node) { if (!isInlineMTOM()) { // If this is an optimized MTOM text node // then simulate an XOP_INCLUDE element. if (node instanceof OMText) { OMText text = (OMText) node; if (text.isOptimized()) { if (nodeStack == null) { nodeStack = new Stack(); } if (!nodeStack.isEmpty() && nodeStack.peek().equals(text)) { // Process the end tag of the XOP:Include nodeStack.pop(); xopIncludeStart = false; return END_ELEMENT; } else { // Create an XOPInclude element to represent this node xopIncludeText = text; xopInclude = node.getOMFactory().createOMElement(XOP_INCLUDE); String cid = text.getContentID(); xopInclude.addAttribute("href", "cid:" + cid, null); xopIncludeStart = true; nodeStack.push(text); return START_ELEMENT; } } } } return CHARACTERS; } /** * @return the node to use for the current event */ private OMNode getNode() { // This method returns the node used to construct // the current event (lastNode). // In some cases a new node is substitued (i.e. an XOPInclude element) if (lastNode == xopIncludeText) { return xopInclude; } return lastNode; } /** * Method generateCommentEvents * * @return Returns int. */ private int generateCommentEvents() { return COMMENT; } /** * Method generateCdataEvents * * @return Returns int. */ private int generateCdataEvents() { return CDATA; } /* * #################################################################### * Other helper methods * #################################################################### */ /** * helper method getCount. * * @param it * @return Returns int. */ private int getCount(Iterator it) { int count = 0; if (it != null) { while (it.hasNext()) { it.next(); count++; } } return count; } /** * Helper method getItemFromIterator. * * @param it * @param index * @return Returns Object. */ private Object getItemFromIterator(Iterator it, int index) { int count = 0; Object returnObject = null; boolean found = false; if (it != null) { while (it.hasNext()) { returnObject = it.next(); if (index == count++) { found = true; break; } } } if (found) { return returnObject; } else { return null; } } /** * Helper method getQName. * * @param element * @return Returns QName. */ private QName getQName(OMElement element) { QName returnName; OMNamespace ns = element.getNamespace(); String localPart = element.getLocalName(); if (ns != null) { String prefix = ns.getPrefix(); String uri = ns.getNamespaceURI(); if ((prefix == null) || prefix.equals("")) { returnName = new QName(uri, localPart); } else { returnName = new QName(uri, localPart, prefix); } } else { returnName = new QName(localPart); } return returnName; } /** * @param elt * @param index * @return Returns OMAttribute. */ private OMAttribute getAttribute(OMElement elt, int index) { OMAttribute returnAttrib = null; if (elt != null) { returnAttrib = (OMAttribute) getItemFromIterator(elt.getAllAttributes(), index); } return returnAttrib; } public void setParser(XMLStreamReader parser) { this.parser = parser; } private Map getAllNamespaces(OMNode contextNode) { if (!(contextNode instanceof OMContainer && contextNode instanceof OMElement)) { return new HashMap(); } Map nsMap = new LinkedHashMap(); for (OMContainer context = (OMContainer) contextNode; context != null && !(context instanceof OMDocument); context = ((OMElement) context).getParent()) { OMElement element = (OMElement) context; Iterator i = element.getAllDeclaredNamespaces(); while (i != null && i.hasNext()) { addNamespaceToMap((OMNamespace) i.next(), nsMap); } if (element.getNamespace() != null) { addNamespaceToMap(element.getNamespace(), nsMap); } for (Iterator iter = element.getAllAttributes(); iter != null && iter.hasNext();) { OMAttribute attr = (OMAttribute) iter.next(); if (attr.getNamespace() != null) { addNamespaceToMap(attr.getNamespace(), nsMap); } } } return nsMap; } private void addNamespaceToMap(OMNamespace ns, Map map) { if (map.get(ns.getPrefix()) == null) { map.put(ns.getPrefix(), ns.getNamespaceURI()); } } public OMXMLParserWrapper getBuilder() { return builder; } /** * @return if parser is closed */ public boolean isClosed() { // If there is a builder, the builder owns the parser // and knows the isClosed status if (builder != null && builder instanceof StAXBuilder) { return ((StAXBuilder) builder).isClosed(); } else { return _isClosed; } } /** * Indicate if the parser resource should be release when closed. * @param value boolean */ public void releaseParserOnClose(boolean value) { // if there is a StAXBuilder, it owns the parser // and controls the releaseOnClose status if (builder != null && builder instanceof StAXBuilder) { ((StAXBuilder) builder).releaseParserOnClose(value); if (isClosed() && value) { parser = null; } return; } else { // Release parser if already closed if (isClosed() && value) { parser = null; } _releaseParserOnClose = value; } } public DataHandler getDataHandler(String blobcid) { DataHandler dh = null; // The datahandler may be part of the attachments map of the builder if (builder != null && builder instanceof OMAttachmentAccessor) { dh = ((OMAttachmentAccessor) builder).getDataHandler(blobcid); } // Or the datahandler might be part of the current optimized text node if (dh == null && lastNode != null && lastNode instanceof OMText) { OMText text = (OMText) lastNode; if (text.isOptimized() && blobcid.equals("cid:" + text.getContentID())) { dh = (DataHandler) text.getDataHandler(); } } return dh; } public boolean isInlineMTOM() { return inlineMTOM; } public void setInlineMTOM(boolean value) { inlineMTOM = value; } } ././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMSourcedElementImpl.javaaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMSourcedElementImpl.java0000644000000000000000000011417711131637474032042 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.llom; import org.apache.axiom.om.OMAttribute; import org.apache.axiom.om.OMContainer; import org.apache.axiom.om.OMDataSource; import org.apache.axiom.om.OMDataSourceExt; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMException; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMNode; import org.apache.axiom.om.OMOutputFormat; import org.apache.axiom.om.OMSourcedElement; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.om.impl.MTOMXMLStreamWriter; import org.apache.axiom.om.impl.OMNamespaceImpl; import org.apache.axiom.om.impl.builder.StAXOMBuilder; import org.apache.axiom.om.util.StAXUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamConstants; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import javax.xml.stream.XMLStreamWriter; import java.io.IOException; import java.io.OutputStream; import java.io.StringWriter; import java.io.Writer; import java.util.Iterator; /** *

Element backed by an arbitrary data source. When necessary, this element will be expanded by * creating a parser from the data source.

*

*

Whenever methods are added to the base {@link OMElementImpl} * class the corresponding methods must be added to this class (there's a unit test to verify that * this has been done, just to make sure nothing gets accidentally broken). If the method only * requires the element name and/or namespace information, the base class method can be called * directly. Otherwise, the element must be expanded into a full OM tree (by calling the {@link * #forceExpand()} method) before the base class method is called. This will typically involve a * heavy overhead penalty, so should be avoided if possible.

*/ public class OMSourcedElementImpl extends OMElementImpl implements OMSourcedElement { /** Data source for element data. */ private OMDataSource dataSource; /** Namespace for element, needed in order to bypass base class handling. */ private OMNamespace definedNamespace = null; /** Flag for parser provided to base element class. */ private boolean isExpanded = false; private static Log log = LogFactory.getLog(OMSourcedElementImpl.class); private static final boolean isDebugEnabled = log.isDebugEnabled(); private static Log forceExpandLog = LogFactory.getLog(OMSourcedElementImpl.class.toString()+".forceExpand"); private XMLStreamReader readerFromDS = null; // Reader from DataSource /** * Constructor. * * @param localName * @param ns * @param factory * @param source */ public OMSourcedElementImpl(String localName, OMNamespace ns, OMFactory factory, OMDataSource source) { super(localName, null, factory); dataSource = source; isExpanded = (dataSource == null); if (!isExpanded) { if (!isLossyPrefix(dataSource)) { // Believe the prefix and create a normal OMNamespace definedNamespace = ns; } else { // Create a deferred namespace that forces an expand to get the prefix definedNamespace = new DeferredNamespace(ns.getNamespaceURI()); } } else { definedNamespace = ns; } } /** * Constructor that takes a QName instead of the local name and the namespace seperately * * @param qName * @param factory * @param source */ public OMSourcedElementImpl(QName qName, OMFactory factory, OMDataSource source) { //create a namespace super(qName.getLocalPart(), null, factory); dataSource = source; isExpanded = (dataSource == null); if (!isExpanded) { if (!isLossyPrefix(dataSource)) { // Believe the prefix and create a normal OMNamespace definedNamespace = new OMNamespaceImpl(qName.getNamespaceURI(), qName.getPrefix()); } else { // Create a deferred namespace that forces an expand to get the prefix definedNamespace = new DeferredNamespace(qName.getNamespaceURI()); } } else { definedNamespace = new OMNamespaceImpl(qName.getNamespaceURI(), qName.getPrefix()); } } public OMSourcedElementImpl(String localName, OMNamespace ns, OMContainer parent, OMFactory factory) { super(localName, null, parent, factory); dataSource = null; definedNamespace = ns; isExpanded = true; if (ns != null) { this.setNamespace(ns); } } public OMSourcedElementImpl(String localName, OMNamespace ns, OMContainer parent, OMXMLParserWrapper builder, OMFactory factory) { super(localName, null, parent, builder, factory); dataSource = null; definedNamespace = ns; isExpanded = true; if (ns != null) { this.setNamespace(ns); } } public OMSourcedElementImpl(String localName, OMNamespace ns, OMFactory factory) { super(localName, null, factory); dataSource = null; definedNamespace = ns; isExpanded = true; if (ns != null) { this.setNamespace(ns); } } /** * The namespace uri is immutable, but the OMDataSource may change * the value of the prefix. This method queries the OMDataSource to * see if the prefix is known. * @param source * @return true or false */ private boolean isLossyPrefix(OMDataSource source) { Object lossyPrefix = null; if (source instanceof OMDataSourceExt) { lossyPrefix = ((OMDataSourceExt) source).getProperty(OMDataSourceExt.LOSSY_PREFIX); } return lossyPrefix == Boolean.TRUE; } private void setDeferredNamespace(OMDataSource source, String uri, String prefix) { Object lossyPrefix = null; if (source instanceof OMDataSourceExt) { lossyPrefix = ((OMDataSourceExt) source).getProperty(OMDataSourceExt.LOSSY_PREFIX); } if (lossyPrefix != Boolean.TRUE) { // Believe the prefix and create a normal OMNamespace definedNamespace = new OMNamespaceImpl(uri, prefix); } else { // Create a deferred namespace that forces an expand to get the prefix definedNamespace = new DeferredNamespace(uri); } } /** * Generate element name for output. * * @return name */ private String getPrintableName() { String uri = null; if (getNamespace() != null) { uri = getNamespace().getNamespaceURI(); } if (uri == null || uri.length() == 0) { return getLocalName(); } else { return "{" + uri + '}' + getLocalName(); } } /** * Get parser from data source. Note that getDataReader may consume the underlying data source. * * @return parser */ private XMLStreamReader getDirectReader() { try { // If expansion has occurred, then the reader from the datasource is consumed or stale. // In such cases use the stream reader from the OMElementImpl if (isExpanded()) { return super.getXMLStreamReader(); } else { return dataSource.getReader(); } } catch (XMLStreamException e) { log.error("Could not get parser from data source for element " + getPrintableName(), e); throw new RuntimeException("Error obtaining parser from data source:" + e.getMessage()); } } /** * Set parser for OM, if not previously set. Since the builder is what actually constructs the * tree on demand, this first creates a builder */ private void forceExpand() { if (!isExpanded) { if (isDebugEnabled) { log.debug("forceExpand: expanding element " + getPrintableName()); if(forceExpandLog.isDebugEnabled()){ // When using an OMSourcedElement, it can be particularly difficult to // determine why an expand occurs... a stack trace should help debugging this Exception e = new Exception("Debug Stack Trace"); forceExpandLog.debug("forceExpand stack", e); } } // Get the XMLStreamReader readerFromDS = getDirectReader(); // Advance past the START_DOCUMENT to the start tag. // Remember the character encoding. String characterEncoding = readerFromDS.getCharacterEncodingScheme(); if (characterEncoding != null) { characterEncoding = readerFromDS.getEncoding(); } try { if (readerFromDS.getEventType() != XMLStreamConstants.START_ELEMENT) { while (readerFromDS.next() != XMLStreamConstants.START_ELEMENT) ; } } catch (XMLStreamException e) { log.error("forceExpand: error parsing data soruce document for element " + getLocalName(), e); throw new RuntimeException("Error parsing data source document:" + e.getMessage()); } // Make sure element local name and namespace matches what was expected if (!readerFromDS.getLocalName().equals(getLocalName())) { log.error("forceExpand: expected element name " + getLocalName() + ", found " + readerFromDS.getLocalName()); throw new RuntimeException("Element name from data source is " + readerFromDS.getLocalName() + ", not the expected " + getLocalName()); } String readerURI = readerFromDS.getNamespaceURI(); readerURI = (readerURI == null) ? "" : readerURI; String uri = (getNamespace() == null) ? "" : ((getNamespace().getNamespaceURI() == null) ? "" : getNamespace().getNamespaceURI()); if (!readerURI.equals(uri)) { log.error("forceExpand: expected element namespace " + getLocalName() + ", found " + uri); throw new RuntimeException("Element namespace from data source is " + readerURI + ", not the expected " + uri); } // Get the current prefix and the reader's prefix String readerPrefix = readerFromDS.getPrefix(); readerPrefix = (readerPrefix == null) ? "" : readerPrefix; String prefix = null; OMNamespace ns = getNamespace(); if (ns == null || ns instanceof DeferredNamespace) { // prefix is not available until after expansion } else { prefix = ns.getPrefix(); } // Set the builder for this element isExpanded = true; super.setBuilder(new StAXOMBuilder(getOMFactory(), readerFromDS, this, characterEncoding)); setComplete(false); // Update the prefix if necessary. This must be done after // isParserSet to avoid a recursive call if (!readerPrefix.equals(prefix) || getNamespace() == null || ns instanceof DeferredNamespace) { if (log.isDebugEnabled()) { log.debug( "forceExpand: changing prefix from " + prefix + " to " + readerPrefix); } setNamespace(new OMNamespaceImpl(readerURI, readerPrefix)); } } } /** * Check if element has been expanded into tree. * * @return true if expanded, false if not */ public boolean isExpanded() { return isExpanded; } /* (non-Javadoc) * @see org.apache.axiom.om.OMElement#getChildElements() */ public Iterator getChildElements() { forceExpand(); return super.getChildElements(); } /* (non-Javadoc) * @see org.apache.axiom.om.OMElement#declareNamespace(java.lang.String, java.lang.String) */ public OMNamespace declareNamespace(String uri, String prefix) { forceExpand(); return super.declareNamespace(uri, prefix); } /* (non-Javadoc) * @see org.apache.axiom.om.OMElement#declareDefaultNamespace(java.lang.String) */ public OMNamespace declareDefaultNamespace(String uri) { forceExpand(); return super.declareDefaultNamespace(uri); } /* (non-Javadoc) * @see org.apache.axiom.om.OMElement#getDefaultNamespace() */ public OMNamespace getDefaultNamespace() { forceExpand(); return super.getDefaultNamespace(); } /* (non-Javadoc) * @see org.apache.axiom.om.OMElement#declareNamespace(org.apache.axiom.om.OMNamespace) */ public OMNamespace declareNamespace(OMNamespace namespace) { forceExpand(); return super.declareNamespace(namespace); } /* (non-Javadoc) * @see org.apache.axiom.om.OMElement#findNamespace(java.lang.String, java.lang.String) */ public OMNamespace findNamespace(String uri, String prefix) { forceExpand(); return super.findNamespace(uri, prefix); } /* (non-Javadoc) * @see org.apache.axiom.om.OMElement#findNamespaceURI(java.lang.String) */ public OMNamespace findNamespaceURI(String prefix) { forceExpand(); return super.findNamespaceURI(prefix); } /* (non-Javadoc) * @see org.apache.axiom.om.OMElement#getAllDeclaredNamespaces() */ public Iterator getAllDeclaredNamespaces() throws OMException { forceExpand(); return super.getAllDeclaredNamespaces(); } /* (non-Javadoc) * @see org.apache.axiom.om.OMElement#getAllAttributes() */ public Iterator getAllAttributes() { forceExpand(); return super.getAllAttributes(); } /* (non-Javadoc) * @see org.apache.axiom.om.OMElement#getAttribute(javax.xml.namespace.QName) */ public OMAttribute getAttribute(QName qname) { forceExpand(); return super.getAttribute(qname); } /* (non-Javadoc) * @see org.apache.axiom.om.OMElement#getAttributeValue(javax.xml.namespace.QName) */ public String getAttributeValue(QName qname) { forceExpand(); return super.getAttributeValue(qname); } /* (non-Javadoc) * @see org.apache.axiom.om.OMElement#addAttribute(org.apache.axiom.om.OMAttribute) */ public OMAttribute addAttribute(OMAttribute attr) { forceExpand(); return super.addAttribute(attr); } /* (non-Javadoc) * @see org.apache.axiom.om.OMElement#addAttribute(java.lang.String, * java.lang.String, org.apache.axiom.om.OMNamespace) */ public OMAttribute addAttribute(String attributeName, String value, OMNamespace namespace) { forceExpand(); return super.addAttribute(attributeName, value, namespace); } /* (non-Javadoc) * @see org.apache.axiom.om.OMElement#removeAttribute(org.apache.axiom.om.OMAttribute) */ public void removeAttribute(OMAttribute attr) { forceExpand(); super.removeAttribute(attr); } /* (non-Javadoc) * @see org.apache.axiom.om.OMElement#setBuilder(org.apache.axiom.om.OMXMLParserWrapper) */ public void setBuilder(OMXMLParserWrapper wrapper) { throw new UnsupportedOperationException( "Builder cannot be set for element backed by data source"); } /* (non-Javadoc) * @see org.apache.axiom.om.OMElement#getBuilder() */ public OMXMLParserWrapper getBuilder() { forceExpand(); return super.getBuilder(); } /* (non-Javadoc) * @see org.apache.axiom.om.OMElement#setFirstChild(org.apache.axiom.om.OMNode) */ public void setFirstChild(OMNode node) { forceExpand(); super.setFirstChild(node); } public void setLastChild(OMNode omNode) { forceExpand(); super.setLastChild(omNode); } /* (non-Javadoc) * @see org.apache.axiom.om.OMElement#getFirstElement() */ public OMElement getFirstElement() { forceExpand(); return super.getFirstElement(); } /* (non-Javadoc) * @see org.apache.axiom.om.OMElement#getXMLStreamReader() */ public XMLStreamReader getXMLStreamReader() { if (isDebugEnabled) { log.debug("getting XMLStreamReader for " + getPrintableName()); } if (isExpanded) { return super.getXMLStreamReader(); } else { if (isDestructiveRead()) { forceExpand(); return super.getXMLStreamReader(); } return getDirectReader(); } } /* (non-Javadoc) * @see org.apache.axiom.om.OMElement#getXMLStreamReaderWithoutCaching() */ public XMLStreamReader getXMLStreamReaderWithoutCaching() { if (isDebugEnabled) { log.debug("getting XMLStreamReader without caching for " + getPrintableName()); } if (isExpanded) { XMLStreamReader reader = super.getXMLStreamReaderWithoutCaching(); return reader; } else { return getDirectReader(); } } /* (non-Javadoc) * @see org.apache.axiom.om.OMElement#setText(java.lang.String) */ public void setText(String text) { forceExpand(); super.setText(text); } /* (non-Javadoc) * @see org.apache.axiom.om.OMElement#setText(javax.xml.namespace.QName) */ public void setText(QName text) { forceExpand(); super.setText(text); } /* (non-Javadoc) * @see org.apache.axiom.om.OMElement#getText() */ public String getText() { forceExpand(); return super.getText(); } /* (non-Javadoc) * @see org.apache.axiom.om.OMElement#getTextAsQName() */ public QName getTextAsQName() { forceExpand(); return super.getTextAsQName(); } /* (non-Javadoc) * @see org.apache.axiom.om.OMElement#getLocalName() */ public String getLocalName() { // no need to set the parser, just call base method directly return super.getLocalName(); } /* (non-Javadoc) * @see org.apache.axiom.om.OMElement#setLocalName(java.lang.String) */ public void setLocalName(String localName) { // no need to expand the tree, just call base method directly super.setLocalName(localName); } /* (non-Javadoc) * @see org.apache.axiom.om.OMElement#getNamespace() */ public OMNamespace getNamespace() throws OMException { if (isExpanded()) { return super.getNamespace(); } return definedNamespace; } /* (non-Javadoc) * @see org.apache.axiom.om.OMElement#setNamespace(org.apache.axiom.om.OMNamespace) */ public void setNamespace(OMNamespace namespace) { forceExpand(); super.setNamespace(namespace); } /* (non-Javadoc) * @see org.apache.axiom.om.OMElement# * setNamespaceWithNoFindInCurrentScope(org.apache.axiom.om.OMNamespace) */ public void setNamespaceWithNoFindInCurrentScope(OMNamespace namespace) { forceExpand(); super.setNamespaceWithNoFindInCurrentScope(namespace); } /* (non-Javadoc) * @see org.apache.axiom.om.OMElement#getQName() */ public QName getQName() { if (isExpanded()) { return super.getQName(); } else if (getNamespace() != null) { // always ignore prefix on name from sourced element return new QName(getNamespace().getNamespaceURI(), getLocalName()); } else { return new QName(getLocalName()); } } /* (non-Javadoc) * @see org.apache.axiom.om.OMElement#toStringWithConsume() */ public String toStringWithConsume() throws XMLStreamException { if (isExpanded()) { return super.toStringWithConsume(); } else { StringWriter writer = new StringWriter(); XMLStreamWriter writer2 = StAXUtils.createXMLStreamWriter(writer); dataSource.serialize(writer2); // dataSource.serialize consumes the data writer2.flush(); return writer.toString(); } } private boolean isDestructiveWrite() { if (dataSource instanceof OMDataSourceExt) { return ((OMDataSourceExt) dataSource).isDestructiveWrite(); } else { return true; } } private boolean isDestructiveRead() { if (dataSource instanceof OMDataSourceExt) { return ((OMDataSourceExt) dataSource).isDestructiveRead(); } else { return false; } } /* (non-Javadoc) * @see org.apache.axiom.om.OMElement#resolveQName(java.lang.String) */ public QName resolveQName(String qname) { forceExpand(); return super.resolveQName(qname); } /* (non-Javadoc) * @see org.apache.axiom.om.OMElement#cloneOMElement() */ public OMElement cloneOMElement() { forceExpand(); return super.cloneOMElement(); } /* (non-Javadoc) * @see org.apache.axiom.om.OMElement#setLineNumber(int) */ public void setLineNumber(int lineNumber) { // no need to expand the tree, just call base method directly super.setLineNumber(lineNumber); } /* (non-Javadoc) * @see org.apache.axiom.om.OMElement#getLineNumber() */ public int getLineNumber() { // no need to expand the tree, just call base method directly return super.getLineNumber(); } /* (non-Javadoc) * @see org.apache.axiom.om.OMNode#discard() */ public void discard() throws OMException { // discard without expanding the tree setComplete(true); super.detach(); } /* (non-Javadoc) * @see org.apache.axiom.om.OMNode#getType() */ public int getType() { // no need to expand the tree, just call base method directly return super.getType(); } /* (non-Javadoc) * @see org.apache.axiom.om.OMNode#internalSerialize(javax.xml.stream.XMLStreamWriter) */ public void internalSerialize(javax.xml.stream.XMLStreamWriter writer) throws XMLStreamException { // The contract of internalSerialize is to "cache" the om if (isExpanded()) { super.internalSerialize(writer); } else { if (isDestructiveWrite()) { forceExpand(); super.internalSerialize(writer); } else { dataSource.serialize(writer); } } } /* (non-Javadoc) * @see org.apache.axiom.om.impl.llom.OMElementImpl# * internalSerialize(javax.xml.stream.XMLStreamWriter, boolean) */ protected void internalSerialize(XMLStreamWriter writer, boolean cache) throws XMLStreamException { if (isExpanded()) { super.internalSerialize(writer, cache); } else if (cache) { if (isDestructiveWrite()) { forceExpand(); super.internalSerialize(writer, true); } else { dataSource.serialize(writer); } } else { internalSerializeAndConsume(writer); } } /* (non-Javadoc) * @see org.apache.axiom.om.OMNode#internalSerializeAndConsume(javax.xml.stream.XMLStreamWriter) */ public void internalSerializeAndConsume(XMLStreamWriter writer) throws XMLStreamException { if (isDebugEnabled) { log.debug("serialize " + getPrintableName() + " to XMLStreamWriter"); } if (isExpanded()) { super.internalSerializeAndConsume(writer); } else { dataSource.serialize(writer); } } /* (non-Javadoc) * @see org.apache.axiom.om.OMNode#serialize(javax.xml.stream.XMLStreamWriter) */ public void serialize(XMLStreamWriter xmlWriter) throws XMLStreamException { // The contract is to serialize with caching internalSerialize(xmlWriter); } /* (non-Javadoc) * @see org.apache.axiom.om.OMNode#serialize(java.io.OutputStream) */ public void serialize(OutputStream output) throws XMLStreamException { OMOutputFormat format = new OMOutputFormat(); serialize(output, format); } /* (non-Javadoc) * @see org.apache.axiom.om.OMNode#serialize(java.io.Writer) */ public void serialize(Writer writer) throws XMLStreamException { OMOutputFormat format = new OMOutputFormat(); serialize(writer, format); } /* (non-Javadoc) * @see org.apache.axiom.om.OMNode# * serialize(java.io.OutputStream, org.apache.axiom.om.OMOutputFormat) */ public void serialize(OutputStream output, OMOutputFormat format) throws XMLStreamException { if (isExpanded) { super.serialize(output, format); } else if (isDestructiveWrite()) { forceExpand(); super.serialize(output, format); } else { dataSource.serialize(output, format); } } /* (non-Javadoc) * @see org.apache.axiom.om.OMNode# * serialize(java.io.Writer, org.apache.axiom.om.OMOutputFormat) */ public void serialize(Writer writer, OMOutputFormat format) throws XMLStreamException { if (isExpanded) { super.serialize(writer, format); } else if (isDestructiveWrite()) { forceExpand(); super.serialize(writer, format); } else { dataSource.serialize(writer, format); } } /* (non-Javadoc) * @see org.apache.axiom.om.OMNode#serializeAndConsume(javax.xml.stream.XMLStreamWriter) */ public void serializeAndConsume(javax.xml.stream.XMLStreamWriter xmlWriter) throws XMLStreamException { internalSerializeAndConsume(xmlWriter); } /* (non-Javadoc) * @see org.apache.axiom.om.OMNode#serializeAndConsume(java.io.OutputStream) */ public void serializeAndConsume(OutputStream output) throws XMLStreamException { if (isDebugEnabled) { log.debug("serialize " + getPrintableName() + " to output stream"); } OMOutputFormat format = new OMOutputFormat(); format.setAutoCloseWriter(true); if (isExpanded()) { super.serializeAndConsume(output, format); } else { dataSource.serialize(output, format); } } /* (non-Javadoc) * @see org.apache.axiom.om.OMNode#serializeAndConsume(java.io.Writer) */ public void serializeAndConsume(Writer writer) throws XMLStreamException { if (isDebugEnabled) { log.debug("serialize " + getPrintableName() + " to writer"); } if (isExpanded()) { super.serializeAndConsume(writer); } else { OMOutputFormat format = new OMOutputFormat(); format.setAutoCloseWriter(true); dataSource.serialize(writer, format); } } /* (non-Javadoc) * @see org.apache.axiom.om.OMNode# * serializeAndConsume(java.io.OutputStream, org.apache.axiom.om.OMOutputFormat) */ public void serializeAndConsume(OutputStream output, OMOutputFormat format) throws XMLStreamException { if (isDebugEnabled) { log.debug("serialize formatted " + getPrintableName() + " to output stream"); } if (isExpanded()) { super.serializeAndConsume(output, format); } else { dataSource.serialize(output, format); } } /* (non-Javadoc) * @see org.apache.axiom.om.OMNode# * serializeAndConsume(java.io.Writer, org.apache.axiom.om.OMOutputFormat) */ public void serializeAndConsume(Writer writer, OMOutputFormat format) throws XMLStreamException { if (isDebugEnabled) { log.debug("serialize formatted " + getPrintableName() + " to writer"); } if (isExpanded()) { super.serializeAndConsume(writer, format); } else { dataSource.serialize(writer, format); } } /* (non-Javadoc) * @see org.apache.axiom.om.OMContainer#addChild(org.apache.axiom.om.OMNode) */ public void addChild(OMNode omNode) { forceExpand(); super.addChild(omNode); } /* (non-Javadoc) * @see org.apache.axiom.om.OMContainer#getChildrenWithName(javax.xml.namespace.QName) */ public Iterator getChildrenWithName(QName elementQName) { forceExpand(); return super.getChildrenWithName(elementQName); } public Iterator getChildrenWithLocalName(String localName) { forceExpand(); return super.getChildrenWithLocalName(localName); } public Iterator getChildrenWithNamespaceURI(String uri) { forceExpand(); return super.getChildrenWithNamespaceURI(uri); } /* (non-Javadoc) * @see org.apache.axiom.om.OMContainer#getFirstChildWithName(javax.xml.namespace.QName) */ public OMElement getFirstChildWithName(QName elementQName) throws OMException { forceExpand(); return super.getFirstChildWithName(elementQName); } /* (non-Javadoc) * @see org.apache.axiom.om.OMContainer#getChildren() */ public Iterator getChildren() { forceExpand(); return super.getChildren(); } /* (non-Javadoc) * @see org.apache.axiom.om.OMContainer#getFirstOMChild() */ public OMNode getFirstOMChild() { forceExpand(); return super.getFirstOMChild(); } /* (non-Javadoc) * @see org.apache.axiom.om.OMContainer#buildNext() */ public void buildNext() { forceExpand(); super.buildNext(); } /* (non-Javadoc) * @see org.apache.axiom.om.impl.llom.OMElementImpl#detach() */ public OMNode detach() throws OMException { // detach without expanding the tree boolean complete = isComplete(); setComplete(true); OMNode result = super.detach(); setComplete(complete); return result; } /* (non-Javadoc) * @see org.apache.axiom.om.impl.llom.OMElementImpl#getNextOMSibling() */ public OMNode getNextOMSibling() throws OMException { // no need to expand the tree, just call base method directly return super.getNextOMSibling(); } /* (non-Javadoc) * @see org.apache.axiom.om.impl.llom.OMElementImpl#getTrimmedText() */ public String getTrimmedText() { forceExpand(); return super.getTrimmedText(); } /* (non-Javadoc) * @see org.apache.axiom.om.impl.llom.OMElementImpl#handleNamespace(javax.xml.namespace.QName) */ OMNamespace handleNamespace(QName qname) { forceExpand(); return super.handleNamespace(qname); } /* (non-Javadoc) * @see org.apache.axiom.om.impl.llom.OMElementImpl#isComplete() */ public boolean isComplete() { if (isExpanded) { return super.isComplete(); } else { return true; } } /* (non-Javadoc) * @see org.apache.axiom.om.impl.llom.OMElementImpl#toString() */ public String toString() { if (isExpanded) { return super.toString(); } else if (isDestructiveWrite()) { forceExpand(); return super.toString(); } else { try { StringWriter writer = new StringWriter(); OMOutputFormat format = new OMOutputFormat(); dataSource.serialize(writer, format); String text = writer.toString(); writer.close(); return text; } catch (XMLStreamException e) { throw new RuntimeException("Cannot serialize OM Element " + this.getLocalName(), e); } catch (IOException e) { throw new RuntimeException("Cannot serialize OM Element " + this.getLocalName(), e); } } } /* (non-Javadoc) * @see org.apache.axiom.om.OMNode#buildAll() */ public void buildWithAttachments() { // If not done, force the parser to build the elements if (!done) { this.build(); } // If the OMSourcedElement is in in expanded form, then // walk the descendents to make sure they are built. // If the OMSourcedElement is backed by a OMDataSource, // we don't want to walk the children (because this will result // in an unnecessary translation from OMDataSource to a full OM tree). if (isExpanded()) { Iterator iterator = getChildren(); while (iterator.hasNext()) { OMNode node = (OMNode) iterator.next(); node.buildWithAttachments(); } } } public void build() throws OMException { super.build(); } protected void notifyChildComplete() { super.notifyChildComplete(); } OMNamespace handleNamespace(String namespaceURI, String prefix) { return super.handleNamespace(namespaceURI, prefix); } /** * Provide access to the data source encapsulated in OMSourcedElement. * This is usesful when we want to access the raw data in the data source. * * @return the internal datasource */ public OMDataSource getDataSource() { return dataSource; } /** * setOMDataSource */ public OMDataSource setDataSource(OMDataSource dataSource) { if (!isExpanded()) { OMDataSource oldDS = this.dataSource; this.dataSource = dataSource; return oldDS; // Caller is responsible for closing the data source } else { // TODO // Remove the entire subtree and replace with // new datasource. There maybe a more performant way to do this. OMDataSource oldDS = this.dataSource; Iterator it = getChildren(); while(it.hasNext()) { OMNode node = (OMNode) it.next(); node.detach(); } this.dataSource = dataSource; setComplete(false); isExpanded = false; super.setBuilder(null); if (isLossyPrefix(dataSource)) { // Create a deferred namespace that forces an expand to get the prefix definedNamespace = new DeferredNamespace(definedNamespace.getNamespaceURI()); } return oldDS; } } /** * setComplete override The OMSourcedElement has its own isolated builder/reader during the * expansion process. Thus calls to setCompete should stop here and not propogate up to the * parent (which may have a different builder or no builder). */ public void setComplete(boolean value) { done = value; if (done == true) { if (readerFromDS != null) { try { readerFromDS.close(); } catch (XMLStreamException e) { } readerFromDS = null; } if (dataSource != null) { if (dataSource instanceof OMDataSourceExt) { ((OMDataSourceExt)dataSource).close(); } dataSource = null; } } if (done == true && readerFromDS != null) { try { readerFromDS.close(); } catch (XMLStreamException e) { } readerFromDS = null; } } class DeferredNamespace implements OMNamespace { String uri; DeferredNamespace(String ns) { this.uri = ns; } public boolean equals(String uri, String prefix) { String thisPrefix = getPrefix(); return (this.uri.equals(uri) && (thisPrefix == null ? prefix == null : thisPrefix.equals(prefix))); } public String getName() { return uri; } public String getNamespaceURI() { return uri; } public String getPrefix() { if (!isExpanded()) { forceExpand(); } return getNamespace().getPrefix(); } public int hashCode() { String thisPrefix = getPrefix(); return uri.hashCode() ^ (thisPrefix != null ? thisPrefix.hashCode() : 0); } public boolean equals(Object obj) { if (!(obj instanceof OMNamespace)) { return false; } OMNamespace other = (OMNamespace)obj; String otherPrefix = other.getPrefix(); String thisPrefix = getPrefix(); return (uri.equals(other.getNamespaceURI()) && (thisPrefix == null ? otherPrefix == null : thisPrefix.equals(otherPrefix))); } } } axiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMDocumentImpl.java0000644000000000000000000003034011131637474030667 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.llom; import org.apache.axiom.om.OMDocument; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMException; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMNode; import org.apache.axiom.om.OMOutputFormat; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.om.impl.MTOMXMLStreamWriter; import org.apache.axiom.om.impl.OMContainerEx; import org.apache.axiom.om.impl.OMDocumentImplUtil; import org.apache.axiom.om.impl.OMNodeEx; import org.apache.axiom.om.impl.traverse.OMChildrenIterator; import org.apache.axiom.om.impl.traverse.OMChildrenLocalNameIterator; import org.apache.axiom.om.impl.traverse.OMChildrenNamespaceIterator; import org.apache.axiom.om.impl.traverse.OMChildrenQNameIterator; import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamWriter; import java.io.OutputStream; import java.util.Iterator; /** Class OMDocumentImpl */ public class OMDocumentImpl implements OMDocument, OMContainerEx { /** Field documentElement */ protected OMElement documentElement; /** Field firstChild */ protected OMNode firstChild; /** Field lastChild */ protected OMNode lastChild; /** Field done */ protected boolean done = false; /** Field parserWrapper */ protected OMXMLParserWrapper parserWrapper; /** Field charSetEncoding Default : UTF-8 */ protected String charSetEncoding = "UTF-8"; /** Field xmlVersion */ protected String xmlVersion = "1.0"; protected String isStandalone; protected OMFactory factory; /** Default constructor */ public OMDocumentImpl() { this.done = true; } /** * @param documentElement * @param parserWrapper */ public OMDocumentImpl(OMElement documentElement, OMXMLParserWrapper parserWrapper) { this.documentElement = documentElement; this.parserWrapper = parserWrapper; } /** @param parserWrapper */ public OMDocumentImpl(OMXMLParserWrapper parserWrapper) { this.parserWrapper = parserWrapper; } /** * Create a OMDocument given the OMFactory * * @param factory The OMFactory that created this instace */ public OMDocumentImpl(OMFactory factory) { this(); this.factory = factory; } /** * Create the OMDocument with the factory * * @param parserWrapper * @param factory */ public OMDocumentImpl(OMXMLParserWrapper parserWrapper, OMFactory factory) { this(parserWrapper); this.factory = factory; } /** * Create the OMDoucment with the factory and set the given OMElement * as the document element * * @param documentElement * @param parserWrapper * @param factory */ public OMDocumentImpl(OMElement documentElement, OMXMLParserWrapper parserWrapper, OMFactory factory) { this(documentElement, parserWrapper); this.factory = factory; } /** * Method getDocumentElement. * * @return Returns OMElement. */ public OMElement getOMDocumentElement() { while (documentElement == null && parserWrapper != null) { parserWrapper.next(); } return documentElement; } /** * Method setDocumentElement. * * @param documentElement */ public void setOMDocumentElement(OMElement documentElement) { this.documentElement = documentElement; } /** * Indicates whether parser has parsed this information item completely or not. If some * information is not available in the item, one has to check this attribute to make sure that, * this item has been parsed completely or not. * * @return Returns boolean. */ public boolean isComplete() { return done; } /** * Method setComplete. * * @param state */ public void setComplete(boolean state) { this.done = state; } /** Forces the parser to proceed, if parser has not yet finished with the XML input. */ public void buildNext() { if (parserWrapper != null && !parserWrapper.isCompleted()) { parserWrapper.next(); } } /** * Adds child to the element. One can decide whether to append the child or to add to the front * of the children list. * * @param child */ public void addChild(OMNode child) { if (child instanceof OMElement) { if (this.documentElement == null) { addChild((OMNodeImpl) child); this.documentElement = (OMElement) child; } else { throw new OMException("Document element already exists"); } } else { addChild((OMNodeImpl) child); } } /** * Method addChild. * * @param child */ private void addChild(OMNodeImpl child) { if (firstChild == null) { firstChild = child; child.setPreviousOMSibling(null); } else { child.setPreviousOMSibling(lastChild); ((OMNodeEx) lastChild).setNextOMSibling(child); } child.setNextOMSibling(null); child.setParent(this); lastChild = child; } /** * Returns a collection of this element. Children can be of types OMElement, OMText. * * @return Returns iterator. */ public Iterator getChildren() { return new OMChildrenIterator(getFirstOMChild()); } /** * Searches for children with a given QName and returns an iterator to traverse through the * OMNodes. The QName can contain any combination of prefix, localname and URI. * * @param elementQName * @return Returns Iterator. * @throws org.apache.axiom.om.OMException * */ public Iterator getChildrenWithName(QName elementQName) { return new OMChildrenQNameIterator(getFirstOMChild(), elementQName); } public Iterator getChildrenWithLocalName(String localName) { return new OMChildrenLocalNameIterator(getFirstOMChild(), localName); } public Iterator getChildrenWithNamespaceURI(String uri) { return new OMChildrenNamespaceIterator(getFirstOMChild(), uri); } /** * Method getFirstOMChild. * * @return Returns first om child. */ public OMNode getFirstOMChild() { while ((firstChild == null) && !done) { buildNext(); } return firstChild; } /** * Method getFirstChildWithName. * * @param elementQName * @return Returns OMElement. * @throws OMException */ public OMElement getFirstChildWithName(QName elementQName) throws OMException { OMChildrenQNameIterator omChildrenQNameIterator = new OMChildrenQNameIterator(getFirstOMChild(), elementQName); OMNode omNode = null; if (omChildrenQNameIterator.hasNext()) { omNode = (OMNode) omChildrenQNameIterator.next(); } return ((omNode != null) && (OMNode.ELEMENT_NODE == omNode.getType())) ? (OMElement) omNode : null; } /** * Method setFirstChild. * * @param firstChild */ public void setFirstChild(OMNode firstChild) { this.firstChild = firstChild; } /** * Forcefully set the last child * @param omNode */ public void setLastChild(OMNode omNode) { this.lastChild = omNode; } /** * Returns the character set encoding scheme to be used. * * @return Returns charset. */ public String getCharsetEncoding() { return charSetEncoding; } /** * Sets the character set encoding scheme. * * @param charEncoding */ public void setCharsetEncoding(String charEncoding) { this.charSetEncoding = charEncoding; } public String isStandalone() { return isStandalone; } public void setStandalone(String isStandalone) { this.isStandalone = isStandalone; } public String getXMLVersion() { return xmlVersion; } public void setXMLVersion(String xmlVersion) { this.xmlVersion = xmlVersion; } /** Serialize the docuement with/without the XML declaration */ public void internalSerializeAndConsume(XMLStreamWriter writer, boolean includeXMLDeclaration) throws XMLStreamException { internalSerialize(writer, false, includeXMLDeclaration); } /** Serializes the document with the XML declaration. */ public void internalSerializeAndConsume(XMLStreamWriter writer) throws XMLStreamException { internalSerialize(writer, false, !((MTOMXMLStreamWriter) writer).isIgnoreXMLDeclaration()); } /** Serializes the document with cache. */ public void internalSerialize(XMLStreamWriter writer) throws XMLStreamException { internalSerialize(writer, true, !((MTOMXMLStreamWriter) writer).isIgnoreXMLDeclaration()); } /** * Serializes the document directly to the output stream with caching disabled. * * @param output * @throws XMLStreamException */ public void serializeAndConsume(OutputStream output) throws XMLStreamException { MTOMXMLStreamWriter writer = new MTOMXMLStreamWriter(output, new OMOutputFormat()); internalSerializeAndConsume(writer); writer.flush(); } /** * Serializes the document directly to the output stream with caching enabled. * * @param output * @throws XMLStreamException */ public void serialize(OutputStream output) throws XMLStreamException { MTOMXMLStreamWriter writer = new MTOMXMLStreamWriter(output, new OMOutputFormat()); internalSerialize(writer); writer.flush(); } /** * Serializes the document directly to the output stream with caching disabled. * * @param output * @param format * @throws XMLStreamException */ public void serializeAndConsume(OutputStream output, OMOutputFormat format) throws XMLStreamException { MTOMXMLStreamWriter writer = new MTOMXMLStreamWriter(output, format); internalSerializeAndConsume(writer); writer.flush(); } /** * Serializes the document directly to the output stream with caching enabled. * * @param output * @param format * @throws XMLStreamException */ public void serialize(OutputStream output, OMOutputFormat format) throws XMLStreamException { MTOMXMLStreamWriter writer = new MTOMXMLStreamWriter(output, format); internalSerialize(writer); writer.flush(); } /** Serializes the document with cache. */ public void internalSerialize(XMLStreamWriter writer, boolean includeXMLDeclaration) throws XMLStreamException { internalSerialize(writer, true, includeXMLDeclaration); } protected void internalSerialize(XMLStreamWriter writer, boolean cache, boolean includeXMLDeclaration) throws XMLStreamException { OMDocumentImplUtil.internalSerialize(this, writer, cache, includeXMLDeclaration); } public OMFactory getOMFactory() { return this.getOMDocumentElement().getOMFactory(); } } axiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMAttributeImpl.java0000644000000000000000000001450611131637474031062 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.llom; import org.apache.axiom.om.OMAttribute; import org.apache.axiom.om.OMConstants; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMElement; import javax.xml.namespace.QName; /** Class OMAttributeImpl */ public class OMAttributeImpl implements OMAttribute { /** Field localName */ private String localName; /** Field value */ private String value; /** Field type */ private String type; /** Field namespace */ private OMNamespace namespace; private QName qName; /** OMFactory that created this OMAttribute */ private OMFactory factory; // Keep track of the owner of the attribute protected OMElement owner; /** * Constructor OMAttributeImpl. * * @param localName * @param ns * @param value */ public OMAttributeImpl(String localName, OMNamespace ns, String value, OMFactory factory) { if (localName == null || localName.trim().length() == 0) throw new IllegalArgumentException("Local name may not be null or empty"); this.localName = localName; this.value = value; this.namespace = ns; this.type = OMConstants.XMLATTRTYPE_CDATA; this.factory = factory; } /** @return Returns QName. */ public QName getQName() { if (qName != null) { return qName; } if (namespace != null) { // Guard against QName implementation sillyness. if (namespace.getPrefix() == null) { this.qName = new QName(namespace.getNamespaceURI(), localName); } else { this.qName = new QName(namespace.getNamespaceURI(), localName, namespace.getPrefix()); } } else { this.qName = new QName(localName); } return this.qName; } // -------- Getters and Setters /** * Method getLocalName. * * @return Returns local name. */ public String getLocalName() { return localName; } /** * Method setLocalName. * * @param localName */ public void setLocalName(String localName) { if (localName == null || localName.trim().length() == 0) throw new IllegalArgumentException("Local name may not be null or empty"); this.localName = localName; this.qName = null; } /** * Method getAttributeValue. * * @return Returns value. */ public String getAttributeValue() { return value; } /** * Method setAttributeValue. * * @param value */ public void setAttributeValue(String value) { this.value = value; } /** * Method getAttributeType. * * @return Returns type. */ public String getAttributeType() { return type; } /** * Method setAttributeType. * * @param type */ public void setAttributeType(String type) { this.type = type; } /** * Method setOMNamespace. * * @param omNamespace */ public void setOMNamespace(OMNamespace omNamespace) { this.namespace = omNamespace; this.qName = null; } /** * Method getNamespace. * * @return Returns namespace. */ public OMNamespace getNamespace() { return namespace; } public OMFactory getOMFactory() { return this.factory; } /** * Returns the owner element of this attribute * @return OMElement - the owner element */ public OMElement getOwner() { return owner; } /** * Checks for the equality of two OMAttribute instances. Thus the object to compare * this with may be an instance of OMAttributeImpl (an instance of this class) or * an instance of AttrImpl. The method returns false for any object of type other * than OMAttribute. * *

We check for the equality of namespaces first (note that if the namespace of this instance is null * then for the obj to be equal its namespace must also be null). This condition solely * doesn't determine the equality. So we check for the equality of names and values (note that the value * can also be null in which case the same argument holds as that for the namespace) of the two instances. * If all three conditions are met then we say the two instances are equal. * * Note: We ignore the owner when checking for the equality. This is simply because the owner is * introduced just to keep things simple for the programmer and not as part of an attribute itself. * * @param obj The object to compare with this instance. * @return True if obj is equal to this or else false. */ public boolean equals(Object obj) { if (! (obj instanceof OMAttribute)) return false; OMAttribute other = (OMAttribute)obj; //first check namespace then localName then value to improve performance return (namespace == null ? other.getNamespace() == null : namespace.equals(other.getNamespace()) && localName.equals(other.getLocalName()) && (value == null ? other.getAttributeValue() == null : value.equals(other.getAttributeValue()))); } public int hashCode() { return localName.hashCode() ^ (value != null ? value.hashCode() : 0) ^ (namespace != null ? namespace.hashCode() : 0); } } axiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMElementImpl.java0000644000000000000000000012215211131637474030505 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.llom; import org.apache.axiom.attachments.Attachments; import org.apache.axiom.om.OMAbstractFactory; import org.apache.axiom.om.OMAttribute; import org.apache.axiom.om.OMConstants; import org.apache.axiom.om.OMContainer; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMException; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMNode; import org.apache.axiom.om.OMSourcedElement; import org.apache.axiom.om.OMText; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.om.OMXMLStreamReader; import org.apache.axiom.om.impl.OMContainerEx; import org.apache.axiom.om.impl.OMNamespaceImpl; import org.apache.axiom.om.impl.OMNodeEx; import org.apache.axiom.om.impl.builder.StAXOMBuilder; import org.apache.axiom.om.impl.builder.XOPAwareStAXOMBuilder; import org.apache.axiom.om.impl.builder.XOPBuilder; import org.apache.axiom.om.impl.llom.factory.OMLinkedListImplFactory; import org.apache.axiom.om.impl.traverse.OMChildElementIterator; import org.apache.axiom.om.impl.traverse.OMChildrenIterator; import org.apache.axiom.om.impl.traverse.OMChildrenLegacyQNameIterator; import org.apache.axiom.om.impl.traverse.OMChildrenLocalNameIterator; import org.apache.axiom.om.impl.traverse.OMChildrenNamespaceIterator; import org.apache.axiom.om.impl.traverse.OMChildrenQNameIterator; import org.apache.axiom.om.impl.util.EmptyIterator; import org.apache.axiom.om.impl.util.OMSerializerUtil; import org.apache.axiom.om.util.ElementHelper; import org.apache.axiom.om.util.OMXMLStreamReaderValidator; import org.apache.axiom.om.util.StAXUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamConstants; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import javax.xml.stream.XMLStreamWriter; import java.io.StringWriter; import java.util.HashMap; import java.util.Iterator; import java.util.LinkedHashMap; /** Class OMElementImpl */ public class OMElementImpl extends OMNodeImpl implements OMElement, OMConstants, OMContainerEx { private static final Log log = LogFactory.getLog(OMElementImpl.class); private static boolean DEBUG_ENABLED = log.isDebugEnabled(); public static final OMNamespace DEFAULT_DEFAULT_NS_OBJECT = new OMNamespaceImpl("", ""); /** Field ns */ protected OMNamespace ns; /** Field localName */ protected String localName; protected QName qName; /** Field firstChild */ protected OMNode firstChild; /** Field namespaces */ protected HashMap namespaces = null; /** Field attributes */ protected HashMap attributes = null; /** Field noPrefixNamespaceCounter */ protected int noPrefixNamespaceCounter = 0; protected OMNode lastChild; private int lineNumber; private static final EmptyIterator EMPTY_ITERATOR = new EmptyIterator(); /** * Constructor OMElementImpl. A null namespace indicates that the default namespace in scope is * used */ public OMElementImpl(String localName, OMNamespace ns, OMContainer parent, OMXMLParserWrapper builder, OMFactory factory) { super(parent, factory, false); this.localName = localName; if (ns != null) { setNamespace(ns); } this.builder = builder; firstChild = null; } /** Constructor OMElementImpl. */ public OMElementImpl(String localName, OMNamespace ns, OMFactory factory) { this(localName, ns, null, factory); } /** * This is the basic constructor for OMElement. All the other constructors depends on this. * * @param localName - this MUST always be not null * @param ns - can be null * @param parent - this should be an OMContainer * @param factory - factory that created this OMElement *

* A null namespace indicates that the default namespace in scope is used */ public OMElementImpl(String localName, OMNamespace ns, OMContainer parent, OMFactory factory) { super(parent, factory, true); if (localName == null || localName.trim().length() == 0) { throw new OMException("localname can not be null or empty"); } this.localName = localName; if (ns != null) { setNamespace(ns); } } /** * It is assumed that the QName passed contains, at least, the localName for this element. * * @param qname - this should be valid qname according to javax.xml.namespace.QName * @throws OMException */ public OMElementImpl(QName qname, OMContainer parent, OMFactory factory) throws OMException { this(qname.getLocalPart(), null, parent, factory); this.ns = handleNamespace(qname); } /** Method handleNamespace. */ OMNamespace handleNamespace(QName qname) { OMNamespace ns = null; // first try to find a namespace from the scope String namespaceURI = qname.getNamespaceURI(); if (namespaceURI != null && namespaceURI.length() > 0) { String prefix = qname.getPrefix(); ns = findNamespace(qname.getNamespaceURI(), prefix); /** * What is left now is * 1. nsURI = null & parent != null, but ns = null * 2. nsURI != null, (parent doesn't have an ns with given URI), but ns = null */ if (ns == null) { if ("".equals(prefix)) { prefix = OMSerializerUtil.getNextNSPrefix(); } ns = declareNamespace(namespaceURI, prefix); } if (ns != null) { this.ns = ns; } } return ns; } /** * Method handleNamespace. * * @return Returns namespace. */ private OMNamespace handleNamespace(OMNamespace ns) { OMNamespace namespace = findNamespace(ns.getNamespaceURI(), ns.getPrefix()); if (namespace == null) { namespace = declareNamespace(ns); } return namespace; } OMNamespace handleNamespace(String namespaceURI, String prefix) { OMNamespace namespace = findNamespace(namespaceURI, prefix); if (namespace == null) { namespace = declareNamespace(namespaceURI, prefix); } return namespace; } /** * Adds child to the element. One can decide whether to append the child or to add to the front * of the children list. */ public void addChild(OMNode child) { if (child.getOMFactory() instanceof OMLinkedListImplFactory) { addChild((OMNodeImpl) child); } else { addChild(importNode(child)); } } /** * Searches for children with a given QName and returns an iterator to traverse through the * OMNodes. This QName can contain any combination of prefix, localname and URI. * * @throws OMException */ public Iterator getChildrenWithName(QName elementQName) { OMNode firstChild = getFirstOMChild(); Iterator it = new OMChildrenQNameIterator(firstChild, elementQName); // The getChidrenWithName method used to tolerate an empty namespace // and interpret that as getting any element that matched the local // name. There are custmers of axiom that have hard-coded dependencies // on this semantic. // The following code falls back to this legacy behavior only if // (a) elementQName has no namespace, (b) the new iterator finds no elements // and (c) there are children. if (elementQName.getNamespaceURI().length() == 0 && firstChild != null && !it.hasNext()) { if (log.isTraceEnabled()) { log.trace("There are no child elements that match the unqualifed name: " + elementQName); log.trace("Now looking for child elements that have the same local name."); } it = new OMChildrenLegacyQNameIterator(getFirstOMChild(), elementQName); } return it; } public Iterator getChildrenWithLocalName(String localName) { return new OMChildrenLocalNameIterator(getFirstOMChild(), localName); } public Iterator getChildrenWithNamespaceURI(String uri) { return new OMChildrenNamespaceIterator(getFirstOMChild(), uri); } /** * Method getFirstChildWithName. * * @throws OMException */ public OMElement getFirstChildWithName(QName elementQName) throws OMException { OMChildrenQNameIterator omChildrenQNameIterator = new OMChildrenQNameIterator(getFirstOMChild(), elementQName); OMNode omNode = null; if (omChildrenQNameIterator.hasNext()) { omNode = (OMNode) omChildrenQNameIterator.next(); } return ((omNode != null) && (OMNode.ELEMENT_NODE == omNode.getType())) ? (OMElement) omNode : null; } /** Method addChild. */ private void addChild(OMNodeImpl child) { if (child.parent == this && child == lastChild) { // The child is already the last node. // We don't need to detach and re-add it. } else { // Normal Case // The order of these statements is VERY important // Since setting the parent has a detach method inside // it strips down all the rerefences to siblings. // setting the siblings should take place AFTER setting the parent child.setParent(this); if (firstChild == null) { firstChild = child; child.previousSibling = null; } else { child.previousSibling = (OMNodeImpl) lastChild; ((OMNodeImpl) lastChild).nextSibling = child; } child.nextSibling = null; lastChild = child; } // For a normal OMNode, the incomplete status is // propogated up the tree. // However, a OMSourcedElement is self-contained // (it has an independent parser source). // So only propogate the incomplete setting if this // is a normal OMNode if (!child.isComplete() && !(child instanceof OMSourcedElement)) { this.setComplete(false); } } /** * Gets the next sibling. This can be an OMAttribute or OMText or OMELement for others. * * @throws OMException */ public OMNode getNextOMSibling() throws OMException { while (!done && builder != null ) { if (builder.isCompleted()) { if (DEBUG_ENABLED) { log.debug("Builder is complete. Setting OMElement to complete."); } setComplete(true); } else { int token = builder.next(); if (token == XMLStreamConstants.END_DOCUMENT) { throw new OMException( "Parser has already reached end of the document. No siblings found"); } } } return super.getNextOMSibling(); } /** * Returns a collection of this element. Children can be of types OMElement, OMText. * * @return Returns children. */ public Iterator getChildren() { return new OMChildrenIterator(getFirstOMChild()); } /** * Returns a filtered list of children - just the elements. * * @return Returns an iterator of the child elements. */ public Iterator getChildElements() { return new OMChildElementIterator(getFirstElement()); } /** * Creates a namespace in the current element scope. * * @return Returns namespace. */ public OMNamespace declareNamespace(String uri, String prefix) { if ("".equals(prefix)) prefix = OMSerializerUtil.getNextNSPrefix(); OMNamespaceImpl ns = new OMNamespaceImpl(uri, prefix); return declareNamespace(ns); } /** * We use "" to store the default namespace of this element. As one can see user can not give "" * as the prefix, when he declare a usual namespace. * * @param uri */ public OMNamespace declareDefaultNamespace(String uri) { OMNamespaceImpl namespace = new OMNamespaceImpl(uri == null ? "" : uri, ""); if (namespaces == null) { this.namespaces = new HashMap(5); } namespaces.put("", namespace); if (ns == null || "".equals(ns.getPrefix())) { ns = namespace; this.qName = null; } return namespace; } public OMNamespace getDefaultNamespace() { OMNamespace defaultNS; if (namespaces != null && (defaultNS = (OMNamespace) namespaces.get("")) != null) { return defaultNS; } if (parent instanceof OMElementImpl) { return ((OMElementImpl) parent).getDefaultNamespace(); } return null; } /** @return Returns namespace. */ public OMNamespace declareNamespace(OMNamespace namespace) { if (namespaces == null) { this.namespaces = new HashMap(5); } String prefix = namespace.getPrefix(); if (prefix == null) { prefix = OMSerializerUtil.getNextNSPrefix(); namespace = new OMNamespaceImpl(namespace.getNamespaceURI(), prefix); } namespaces.put(prefix, namespace); return namespace; } /** * Finds a namespace with the given uri and prefix, in the scope of the document. Starts to find * from the current element and goes up in the hiararchy until one is found. If none is found, * returns null. */ public OMNamespace findNamespace(String uri, String prefix) { // check in the current element OMNamespace namespace = findDeclaredNamespace(uri, prefix); if (namespace != null) { return namespace; } // go up to check with ancestors if (parent != null) { //For the OMDocumentImpl there won't be any explicit namespace //declarations, so going up the parent chain till the document //element should be enough. if (parent instanceof OMElement) { namespace = ((OMElementImpl) parent).findNamespace(uri, prefix); } } return namespace; } public OMNamespace findNamespaceURI(String prefix) { OMNamespace ns = this.namespaces == null ? null : (OMNamespace) this.namespaces.get(prefix); if (ns == null && this.parent instanceof OMElement) { // try with the parent ns = ((OMElement) this.parent).findNamespaceURI(prefix); } return ns; } // Constant static final OMNamespaceImpl xmlns = new OMNamespaceImpl(OMConstants.XMLNS_URI, OMConstants.XMLNS_PREFIX); /** * Checks for the namespace only in the current Element. This is also used to retrieve * the prefix of a known namespace URI. */ private OMNamespace findDeclaredNamespace(String uri, String prefix) { if (uri == null) { return namespaces == null ? null : (OMNamespace)namespaces.get(prefix); } //If the prefix is available and uri is available and its the xml namespace if (prefix != null && prefix.equals(OMConstants.XMLNS_PREFIX) && uri.equals(OMConstants.XMLNS_URI)) { return xmlns; } if (namespaces == null) { return null; } if (prefix == null || "".equals(prefix)) { OMNamespace defaultNamespace = this.getDefaultNamespace(); if (defaultNamespace != null && uri.equals(defaultNamespace.getNamespaceURI())) { return defaultNamespace; } Iterator namespaceListIterator = namespaces.values().iterator(); String nsUri; while (namespaceListIterator.hasNext()) { OMNamespace omNamespace = (OMNamespace) namespaceListIterator.next(); nsUri = omNamespace.getNamespaceURI(); if (nsUri != null && nsUri.equals(uri)) { return omNamespace; } } } else { OMNamespace namespace = (OMNamespace) namespaces.get(prefix); if (namespace != null && uri.equals(namespace.getNamespaceURI())) { return namespace; } } return null; } /** * Method getAllDeclaredNamespaces. * * @return Returns Iterator. */ public Iterator getAllDeclaredNamespaces() { if (namespaces == null) { return EMPTY_ITERATOR; } return namespaces.values().iterator(); } /** * Returns a List of OMAttributes. * * @return Returns iterator. */ public Iterator getAllAttributes() { if (attributes == null) { return EMPTY_ITERATOR; } return attributes.values().iterator(); } /** * Returns a named attribute if present. * * @param qname the qualified name to search for * @return Returns an OMAttribute with the given name if found, or null */ public OMAttribute getAttribute(QName qname) { return attributes == null ? null : (OMAttribute) attributes.get(qname); } /** * Returns a named attribute's value, if present. * * @param qname the qualified name to search for * @return Returns a String containing the attribute value, or null. */ public String getAttributeValue(QName qname) { OMAttribute attr = getAttribute(qname); return (attr == null) ? null : attr.getAttributeValue(); } /** * Inserts an attribute to this element. Implementor can decide as to insert this in the front * or at the end of set of attributes. * *

The owner of the attribute is set to be the particular OMElement. * If the attribute already has an owner then the attribute is cloned (i.e. its name, * value and namespace are copied to a new attribute) and the new attribute is added * to the element. It's owner is then set to be the particular OMElement. * * @return The attribute that was added to the element. Note: The added attribute * may not be the same instance that was given to add. This can happen if the given * attribute already has an owner. In such case the returned attribute and the given * attribute are equal but not the same instance. * * @see OMAttributeImpl#equals(Object) */ public OMAttribute addAttribute(OMAttribute attr){ // If the attribute already has an owner element then clone the attribute if (attr.getOwner() !=null){ attr = new OMAttributeImpl( attr.getLocalName(), attr.getNamespace(), attr.getAttributeValue(), attr.getOMFactory()); } if (attributes == null) { this.attributes = new LinkedHashMap(5); } OMNamespace namespace = attr.getNamespace(); String nsURI; String nsPrefix; if (namespace != null && (nsURI = namespace.getNamespaceURI()) != null && !"".equals(nsURI) && this.findNamespace(nsURI, (nsPrefix = namespace.getPrefix())) == null) { this.declareNamespace(nsURI, nsPrefix); } // Set the owner element of the attribute ((OMAttributeImpl)attr).owner = this; attributes.put(attr.getQName(), attr); return attr; } /** Method removeAttribute. */ public void removeAttribute(OMAttribute attr) { if (attributes != null) { // Remove the owner from this attribute ((OMAttributeImpl)attr).owner = null; attributes.remove(attr.getQName()); } } /** * * Creates an OMAttributeImpl instance out of the given arguments and * inserts that attribute to this element. Implementor can decide as to insert this * in the front or at the end of set of attributes. * *

The owner of the attribute is set to be the particular OMElement. * If the attribute already has an owner then the attribute is cloned (i.e. its name, * value and namespace are copied to a new attribute) and the new attribute is added * to the element. It's owner is then set to be the particular OMElement. * * @param attributeName The name of the attribute * @param value The value of the attribute * @param ns The namespace of the attribute * * @return The attribute that was added to the element. Note: The added attribute * may not be the same instance that was given to add. This can happen if the given * attribute already has an owner. In such case the returned attribute and the given * attribute are equal but not the same instance. * * @see OMAttributeImpl#equals(Object) */ public OMAttribute addAttribute(String attributeName, String value, OMNamespace ns) { OMNamespace namespace = null; if (ns != null) { String namespaceURI = ns.getNamespaceURI(); String prefix = ns.getPrefix(); namespace = findNamespace(namespaceURI, prefix); if (namespace == null) { namespace = new OMNamespaceImpl(namespaceURI, prefix); } } return addAttribute(new OMAttributeImpl(attributeName, namespace, value, this.factory)); } /** Method setBuilder. */ public void setBuilder(OMXMLParserWrapper wrapper) { this.builder = wrapper; } /** * Method getBuilder. * * @return Returns OMXMLParserWrapper. */ public OMXMLParserWrapper getBuilder() { return builder; } /** Forces the parser to proceed, if parser has not yet finished with the XML input. */ public void buildNext() { if (builder != null) { if (!builder.isCompleted()) { builder.next(); } else { this.setComplete(true); if (DEBUG_ENABLED) { log.debug("Builder is complete. Setting OMElement to complete."); } } } } /** * Method getFirstOMChild. * * @return Returns child. */ public OMNode getFirstOMChild() { while ((firstChild == null) && !done) { buildNext(); } return firstChild; } /** Method setFirstChild. */ public void setFirstChild(OMNode firstChild) { if (firstChild != null) { ((OMNodeEx) firstChild).setParent(this); } this.firstChild = firstChild; } public void setLastChild(OMNode omNode) { this.lastChild = omNode; } /** * Removes this information item and its children, from the model completely. * * @throws OMException */ public OMNode detach() throws OMException { if (!done) { build(); } super.detach(); return this; } /** * Method isComplete. * * @return Returns boolean. */ public boolean isComplete() { return done; } /** Gets the type of node, as this is the super class of all the nodes. */ public int getType() { return OMNode.ELEMENT_NODE; } public void build() throws OMException { /** * builder is null. Meaning this is a programatical created element but it has children which are not completed * Build them all. */ if (builder == null && !done) { for (Iterator childrenIterator = this.getChildren(); childrenIterator.hasNext();) { OMNode omNode = (OMNode) childrenIterator.next(); omNode.build(); } } else { super.build(); } } /** * Method getXMLStreamReader. * * @see OMElement#getXMLStreamReader() */ public XMLStreamReader getXMLStreamReader() { return getXMLStreamReader(true); } /** * Method getXMLStreamReaderWithoutCaching. * * @see OMElement#getXMLStreamReaderWithoutCaching() */ public XMLStreamReader getXMLStreamReaderWithoutCaching() { return getXMLStreamReader(false); } /** * Method getXMLStreamReader. * * @return Returns reader. */ private XMLStreamReader getXMLStreamReader(boolean cache) { if (builder != null && this.builder instanceof StAXOMBuilder) { if (!isComplete()) { if (((StAXOMBuilder) builder).isLookahead()) { this.buildNext(); } } } // The om tree was built by hand and is already complete OMXMLStreamReader reader = null; if ((builder == null) && done) { reader = new OMStAXWrapper(null, this, false); } else { if ((builder == null) && !cache) { throw new UnsupportedOperationException( "This element was not created in a manner to be switched"); } if (builder != null && builder.isCompleted() && !cache && !done) { throw new UnsupportedOperationException( "The parser is already consumed!"); } reader = new OMStAXWrapper(builder, this, cache); } // If debug is enabled, wrap the OMXMLStreamReader in a validator. // The validator will check for mismatched events to help determine if the OMStAXWrapper // is functioning correctly. All problems are reported as debug.log messages if (DEBUG_ENABLED) { reader = new OMXMLStreamReaderValidator(reader, // delegate to actual reader false); // log problems (true will cause exceptions to be thrown) } return reader; } /** * Sets the text of the given element. caution - This method will wipe out all the text elements * (and hence any mixed content) before setting the text. */ public void setText(String text) { OMNode child = this.getFirstOMChild(); while (child != null) { if (child.getType() == OMNode.TEXT_NODE) { child.detach(); } child = child.getNextOMSibling(); } OMAbstractFactory.getOMFactory().createOMText(this, text); } /** * Sets the text, as a QName, of the given element. caution - This method will wipe out all the * text elements (and hence any mixed content) before setting the text. */ public void setText(QName text) { OMNode child = this.getFirstOMChild(); while (child != null) { if (child.getType() == OMNode.TEXT_NODE) { child.detach(); } child = child.getNextOMSibling(); } OMAbstractFactory.getOMFactory().createOMText(this, text); } /** * Selects all the text children and concatenates them to a single string. * * @return Returns String. */ public String getText() { String childText = null; StringBuffer buffer = null; OMNode child = this.getFirstOMChild(); while (child != null) { final int type = child.getType(); if (type == OMNode.TEXT_NODE || type == OMNode.CDATA_SECTION_NODE) { OMText textNode = (OMText) child; String textValue = textNode.getText(); if (textValue != null && textValue.length() != 0) { if (childText == null) { // This is the first non empty text node. Just save the string. childText = textValue; } else { // We've already seen a non empty text node before. Concatenate using // a StringBuffer. if (buffer == null) { // This is the first text node we need to append. Initialize the // StringBuffer. buffer = new StringBuffer(childText); } buffer.append(textValue); } } } child = child.getNextOMSibling(); } if (childText == null) { // We didn't see any text nodes. Return an empty string. return ""; } else if (buffer != null) { return buffer.toString(); } else { return childText; } } public QName getTextAsQName() { String childText = getTrimmedText(); if (childText != null) { return resolveQName(childText); } return null; } /** * Returns the concatination string of TRIMMED values of all OMText child nodes of this * element. This is included purely to improve usability. */ public String getTrimmedText() { String childText = null; StringBuffer buffer = null; OMNode child = this.getFirstOMChild(); while (child != null) { if (child.getType() == OMNode.TEXT_NODE) { OMText textNode = (OMText) child; String textValue = textNode.getText(); if (textValue != null && textValue.length() != 0) { if (childText == null) { // This is the first non empty text node. Just save the string. childText = textValue.trim(); } else { // We've already seen a non empty text node before. Concatenate using // a StringBuffer. if (buffer == null) { // This is the first text node we need to append. Initialize the // StringBuffer. buffer = new StringBuffer(childText); } buffer.append(textValue.trim()); } } } child = child.getNextOMSibling(); } if (childText == null) { // We didn't see any text nodes. Return an empty string. return ""; } else if (buffer != null) { return buffer.toString(); } else { return childText; } } /** * Method internalSerialize. * * @throws XMLStreamException */ public void internalSerialize(XMLStreamWriter writer) throws XMLStreamException { internalSerialize(writer, true); } /////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////// protected void internalSerialize(XMLStreamWriter writer, boolean cache) throws XMLStreamException { if (cache) { //in this case we don't care whether the elements are built or not //we just call the serializeAndConsume methods OMSerializerUtil.serializeStartpart(this, writer); //serialize children Iterator children = this.getChildren(); while (children.hasNext()) { ((OMNodeEx) children.next()).internalSerialize(writer); } OMSerializerUtil.serializeEndpart(writer); } else { //Now the caching is supposed to be off. However caching been switched off //has nothing to do if the element is already built! if (this.done || (this.builder == null)) { OMSerializerUtil.serializeStartpart(this, writer); OMNodeImpl child = (OMNodeImpl) firstChild; while (child != null) { if ((!(child instanceof OMElement)) || child.isComplete() || child.builder == null) { child.internalSerializeAndConsume(writer); } else { OMElement element = (OMElement) child; element.getBuilder().setCache(false); OMSerializerUtil.serializeByPullStream(element, writer, cache); } child = child.nextSibling; } OMSerializerUtil.serializeEndpart(writer); } else { OMSerializerUtil.serializeByPullStream(this, writer, cache); } } } //////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////// /** * This method serializes and consumes without building the object structure in memory. Misuse * of this method will cause loss of data. So it is advised to use populateYourSelf() method, * before calling this method, if one wants to preserve data in the stream. This was requested * during the second Axis2 summit. * * @throws XMLStreamException */ public void internalSerializeAndConsume(XMLStreamWriter writer) throws XMLStreamException { this.internalSerialize(writer, false); } /** * Gets first element. * * @return Returns element. */ public OMElement getFirstElement() { OMNode node = getFirstOMChild(); while (node != null) { if (node.getType() == OMNode.ELEMENT_NODE) { return (OMElement) node; } else { node = node.getNextOMSibling(); } } return null; } /** * Method getLocalName. * * @return Returns local name. */ public String getLocalName() { return localName; } /** Method setLocalName. */ public void setLocalName(String localName) { this.localName = localName; this.qName = null; } /** * Method getNamespace. * * @throws OMException */ public OMNamespace getNamespace() throws OMException { // return ns != null ? ns : DEFAULT_DEFAULT_NS_OBJECT; if (ns == null) { // User wants to keep this element in the default default namespace. Let's try to see the default namespace // is overriden by some one up in the tree OMNamespace parentDefaultNS = this.findNamespaceURI(""); if (parentDefaultNS != null && !"".equals(parentDefaultNS.getNamespaceURI())) { // if it was overriden, then we must explicitly declare default default namespace as the namespace // of this element ns = DEFAULT_DEFAULT_NS_OBJECT; this.qName = null; } } return ns; } /** Method setNamespace. */ public void setNamespace(OMNamespace namespace) { OMNamespace nsObject = null; if (namespace != null) { nsObject = handleNamespace(namespace); } this.ns = nsObject; this.qName = null; } public void setNamespaceWithNoFindInCurrentScope(OMNamespace namespace) { this.ns = namespace; this.qName = null; } /** * Method getQName. * * @return Returns QName. */ public QName getQName() { if (qName != null) { return qName; } if (ns != null) { if (ns.getPrefix() != null) { qName = new QName(ns.getNamespaceURI(), localName, ns.getPrefix()); } else { qName = new QName(ns.getNamespaceURI(), localName); } } else { qName = new QName(localName); } return qName; } public String toStringWithConsume() throws XMLStreamException { StringWriter writer = new StringWriter(); XMLStreamWriter writer2 = StAXUtils.createXMLStreamWriter(writer); try { this.serializeAndConsume(writer2); writer2.flush(); } finally { writer2.close(); } return writer.toString(); } public String toString() { StringWriter writer = new StringWriter(); try { XMLStreamWriter writer2 = StAXUtils.createXMLStreamWriter(writer); try { this.serialize(writer2); writer2.flush(); } finally { writer2.close(); } } catch (XMLStreamException e) { throw new RuntimeException("Can not serialize OM Element " + this.getLocalName(), e); } return writer.toString(); } /** * Method discard. * * @throws OMException */ public void discard() throws OMException { if (done || builder == null) { this.detach(); } else { builder.discard(this); } } /** * Converts a prefix:local qname string into a proper QName, evaluating it in the OMElement * context. Unprefixed qnames resolve to the local namespace. * * @param qname prefixed qname string to resolve * @return Returns null for any failure to extract a qname. */ public QName resolveQName(String qname) { ElementHelper helper = new ElementHelper(this); return helper.resolveQName(qname); } public OMElement cloneOMElement() { if (log.isDebugEnabled()) { log.debug("cloneOMElement start"); log.debug(" element string =" + getLocalName()); log.debug(" isComplete = " + isComplete()); log.debug(" builder = " + builder); } // Make sure the source (this node) is completed if (!isComplete()) { this.build(); } // Now get a parser for the full tree XMLStreamReader xmlStreamReader = this.getXMLStreamReader(true); if (log.isDebugEnabled()) { log.debug(" reader = " + xmlStreamReader); } // Get a new builder. Use an xop aware builder if the original // builder is xop aware StAXOMBuilder newBuilder = null; if (builder instanceof XOPBuilder) { Attachments attachments = ((XOPBuilder)builder).getAttachments(); attachments.getAllContentIDs(); if (xmlStreamReader instanceof OMXMLStreamReader) { if (log.isDebugEnabled()) { log.debug(" read optimized xop:include"); } ((OMXMLStreamReader)xmlStreamReader).setInlineMTOM(false); } newBuilder = new XOPAwareStAXOMBuilder(xmlStreamReader, attachments); } else { newBuilder = new StAXOMBuilder(xmlStreamReader); } if (log.isDebugEnabled()) { log.debug(" newBuilder = " + newBuilder); } // Build the (target) clonedElement from the parser OMElement clonedElement = newBuilder.getDocumentElement(); clonedElement.build(); return clonedElement; } public void setLineNumber(int lineNumber) { this.lineNumber = lineNumber; } public int getLineNumber() { return lineNumber; } /* (non-Javadoc) * @see org.apache.axiom.om.OMNode#buildAll() */ public void buildWithAttachments() { if (!done) { this.build(); } Iterator iterator = getChildren(); while (iterator.hasNext()) { OMNode node = (OMNode) iterator.next(); node.buildWithAttachments(); } } /** This method will be called when one of the children becomes complete. */ protected void notifyChildComplete() { if (!this.done && builder == null) { Iterator iterator = getChildren(); while (iterator.hasNext()) { OMNode node = (OMNode) iterator.next(); if (!node.isComplete()) { return; } } this.setComplete(true); } } } ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMProcessingInstructionImpl.javaaxiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMProcessingInstructionIm0000644000000000000000000000667011131637474032224 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.llom; import org.apache.axiom.om.OMContainer; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMException; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMNode; import org.apache.axiom.om.OMProcessingInstruction; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamWriter; public class OMProcessingInstructionImpl extends OMNodeImpl implements OMProcessingInstruction { protected String target; protected String value; /** * Constructor OMProcessingInstructionImpl. * * @param parentNode * @param target * @param value */ public OMProcessingInstructionImpl(OMContainer parentNode, String target, String value, OMFactory factory) { super(parentNode, factory, true); this.target = (target == null) ? null : target.trim(); this.value = (value == null) ? null : value.trim(); nodeType = OMNode.PI_NODE; } /** * Constructor OMProcessingInstructionImpl. * * @param parentNode */ public OMProcessingInstructionImpl(OMContainer parentNode, OMFactory factory) { this(parentNode, null, null, factory); } /** * Serializes the node with caching. * * @param writer * @throws XMLStreamException */ public void internalSerialize(XMLStreamWriter writer) throws XMLStreamException { writer.writeProcessingInstruction(this.target + " ", this.value); } /** * Serializes the node without caching. * * @param writer * @throws XMLStreamException */ public void internalSerializeAndConsume(XMLStreamWriter writer) throws XMLStreamException { internalSerialize(writer); } /** * Gets the value of this Processing Instruction. * * @return string */ public String getValue() { return value; } /** * Sets the target of this Processing Instruction. * * @param target */ public void setTarget(String target) { this.target = target; } /** * Gets the target of this Processing Instruction. * * @return Returns String. */ public String getTarget() { return target; } /** * Sets the value of this Processing Instruction. * * @param text */ public void setValue(String text) { this.value = text; } /** * Discards this node. * * @throws OMException */ public void discard() throws OMException { if (done) { this.detach(); } } } axiom-1.2.8/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMNavigator.java0000644000000000000000000001337611131637474030233 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.llom; import org.apache.axiom.om.OMContainer; import org.apache.axiom.om.OMDocument; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMNode; import org.apache.axiom.om.OMSourcedElement; /** * Refer to the test, org.apache.axiom.om.OMNavigatorTest, to find out how to use features like * isNavigable, isComplete and step. */ public class OMNavigator { /** Field node */ protected OMNode node; /** Field visited */ private boolean visited; /** Field next */ private OMNode next; // root is the starting element. Once the navigator comes back to the // root, the traversal is terminated /** Field root */ private OMNode root; /** Field backtracked */ private boolean backtracked; // flags that tell the status of the navigator /** Field end */ private boolean end = false; /** Field start */ private boolean start = true; /** Constructor OMNavigator. */ public OMNavigator() { } /** * Constructor OMNavigator. * * @param node */ public OMNavigator(OMNode node) { init(node); } /** * Method init. * * @param node */ public void init(OMNode node) { next = node; root = node; backtracked = false; } /** * Gets the next node. * * @return Returns OMnode in the sequence of preorder traversal. Note however that an element * node is treated slightly differently. Once the element is passed it returns the same * element in the next encounter as well. */ public OMNode next() { if (next == null) { return null; } node = next; visited = backtracked; backtracked = false; updateNextNode(); // set the starting and ending flags if (root.equals(node)) { if (!start) { end = true; } else { start = false; } } return node; } /** Private method to encapsulate the searching logic. */ private void updateNextNode() { if ((next instanceof OMElement) && !visited) { OMNode firstChild = _getFirstChild((OMElement) next); if (firstChild != null) { next = firstChild; } else if (next.isComplete()) { backtracked = true; } else { next = null; } } else { OMContainer parent = next.getParent(); OMNode nextSibling = getNextSibling(next); if (nextSibling != null) { next = nextSibling; } else if ((parent != null) && parent.isComplete() && !(parent instanceof OMDocument)) { next = (OMNodeImpl) parent; backtracked = true; } else { next = null; } } } /** * @param node * @return first child or null */ private OMNode _getFirstChild(OMElement node) { if (node instanceof OMSourcedElement) { OMNode first = node.getFirstOMChild(); OMNode sibling = first; while (sibling != null) { sibling = sibling.getNextOMSibling(); } return first; } else { // Field access is used to prevent advancing the parser. // Some tests fail if the following is used // return node.getFirstOMChild() return ((OMElementImpl) node).firstChild; } } /** * @param node * @return next sibling or null */ private OMNode getNextSibling(OMNode node) { if (node instanceof OMSourcedElement) { return node.getNextOMSibling(); } else { // Field access is used to prevent advancing the parser. // Some tests fail if the following is used // return node.getNextOMSibling() return ((OMNodeImpl) node).nextSibling; } } /** * Method visited. * * @return Returns boolean. */ public boolean visited() { return visited; } /** * This is a very special method. This allows the navigator to step once it has reached the * existing OM. At this point the isNavigable method will return false but the isComplete method * may return false which means that the navigating the given element is not complete and the * navigator cannot proceed. */ public void step() { if (!end) { next = node; updateNextNode(); } } /** * Returns the navigable status. * * @return Returns boolean. */ public boolean isNavigable() { if (end) { return false; } else { return !(next == null); } } /** * Returns the completed status. * * @return Returns boolean. */ public boolean isCompleted() { return end; } } axiom-1.2.8/modules/axiom-impl/src/test/0000755000000000000000000000000011131637472016634 5ustar rootrootaxiom-1.2.8/modules/axiom-impl/src/test/java/0000755000000000000000000000000011131637472017555 5ustar rootrootaxiom-1.2.8/modules/axiom-impl/src/test/java/org/0000755000000000000000000000000011131637472020344 5ustar rootrootaxiom-1.2.8/modules/axiom-impl/src/test/java/org/apache/0000755000000000000000000000000011131637472021565 5ustar rootrootaxiom-1.2.8/modules/axiom-impl/src/test/java/org/apache/axiom/0000755000000000000000000000000011131637472022702 5ustar rootrootaxiom-1.2.8/modules/axiom-impl/src/test/java/org/apache/axiom/om/0000755000000000000000000000000011131637472023315 5ustar rootrootaxiom-1.2.8/modules/axiom-impl/src/test/java/org/apache/axiom/om/impl/0000755000000000000000000000000011131637472024256 5ustar rootrootaxiom-1.2.8/modules/axiom-impl/src/test/java/org/apache/axiom/om/impl/llom/0000755000000000000000000000000011131637472025221 5ustar rootrootaxiom-1.2.8/modules/axiom-impl/src/test/java/org/apache/axiom/om/impl/llom/SOAPEnvelopeTest.java0000644000000000000000000000711411131637472031167 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.llom; import javax.xml.namespace.QName; import junit.framework.TestCase; import org.apache.axiom.om.OMElement; import org.apache.axiom.soap.SOAPEnvelope; import org.apache.axiom.soap.SOAPProcessingException; import org.apache.axiom.soap.impl.llom.soap11.SOAP11Factory; import org.apache.axiom.soap.impl.llom.soap12.SOAP12Factory; public class SOAPEnvelopeTest extends TestCase { public void testAppendSOAP11() throws Exception { SOAP11Factory factory; SOAPEnvelope env; // SOAP 1.1 allows for arbitrary elements after SOAPBody element // these addChild() should fail since appending before SOAPBody // but they do not at this point (need a better check). factory = new SOAP11Factory(); env = factory.createSOAPEnvelope(); checkAddChild(env, false); factory = new SOAP11Factory(); env = factory.createSOAPEnvelope(); factory.createSOAPHeader(env); checkAddChild(env, false); // these addChild() should work since appending after SOAPBody factory = new SOAP11Factory(); env = factory.createSOAPEnvelope(); factory.createSOAPBody(env); checkAddChild(env, false); factory = new SOAP11Factory(); env = factory.createSOAPEnvelope(); factory.createSOAPHeader(env); factory.createSOAPBody(env); checkAddChild(env, false); } public void testAppendSOAP12() throws Exception { SOAP12Factory factory; SOAPEnvelope env; // SOAP 1.2 only allows SOAPHeader and SOAPBody elements // All these addChild() should fail factory = new SOAP12Factory(); env = factory.createSOAPEnvelope(); checkAddChild(env, true); factory = new SOAP12Factory(); env = factory.createSOAPEnvelope(); factory.createSOAPHeader(env); checkAddChild(env, true); factory = new SOAP12Factory(); env = factory.createSOAPEnvelope(); factory.createSOAPBody(env); checkAddChild(env, true); factory = new SOAP12Factory(); env = factory.createSOAPEnvelope(); factory.createSOAPHeader(env); factory.createSOAPBody(env); checkAddChild(env, true); } private void checkAddChild(SOAPEnvelope env, boolean fail) { OMElement elem = env.getOMFactory().createOMElement(new QName("foo")); if (fail) { try { env.addChild(elem); fail("did not throw exception"); } catch (SOAPProcessingException e) { // expected } } else { env.addChild(elem); } } } axiom-1.2.8/modules/axiom-impl/src/test/java/org/apache/axiom/om/impl/llom/AttributeImplTest.java0000644000000000000000000000214111131637472031507 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.llom; import org.apache.axiom.om.OMAttributeTestBase; import org.apache.axiom.om.impl.llom.factory.OMLinkedListImplementation; public class AttributeImplTest extends OMAttributeTestBase { public AttributeImplTest() { super(new OMLinkedListImplementation()); } } axiom-1.2.8/modules/axiom-impl/src/test/java/org/apache/axiom/om/impl/llom/OMDocumentImplTest.java0000644000000000000000000000213411131637472031560 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.llom; import org.apache.axiom.om.OMDocumentTestBase; import org.apache.axiom.om.impl.llom.factory.OMLinkedListImplementation; public class OMDocumentImplTest extends OMDocumentTestBase { public OMDocumentImplTest() { super(new OMLinkedListImplementation()); } } axiom-1.2.8/modules/axiom-impl/pom.xml0000644000000000000000000001215511131637474016411 0ustar rootroot 4.0.0 org.apache.ws.commons.axiom axiom 1.2.8 axiom-impl Axiom Impl 1.2.8 The Axiom default implementation. org.apache.ws.commons.axiom axiom-api ${version} org.apache.geronimo.specs geronimo-activation_1.1_spec org.apache.geronimo.specs geronimo-javamail_1.4_spec ${stax.impl.groupid} ${stax.impl.artifact} commons-logging commons-logging junit junit org.apache.geronimo.specs geronimo-stax-api_1.0_spec org.apache.ws.commons.axiom axiom-api tests ${version} test src/main/resources ${project.build.directory}/legal-files maven-antrun-plugin copy-legal-files generate-resources run maven-jar-plugin src/main/resources/META-INF/MANIFEST.MF ${version} maven-jar-plugin test-jar axiom-1.2.8/modules/axiom-c14n/0000755000000000000000000000000011131640012014652 5ustar rootrootaxiom-1.2.8/modules/axiom-c14n/src/0000755000000000000000000000000011131637462015460 5ustar rootrootaxiom-1.2.8/modules/axiom-c14n/src/main/0000755000000000000000000000000011131637462016404 5ustar rootrootaxiom-1.2.8/modules/axiom-c14n/src/main/resources/0000755000000000000000000000000011131637462020416 5ustar rootrootaxiom-1.2.8/modules/axiom-c14n/src/main/resources/META-INF/0000755000000000000000000000000011131637462021556 5ustar rootrootaxiom-1.2.8/modules/axiom-c14n/src/main/resources/META-INF/exceptions.properties0000644000000000000000000000041511131637462026055 0ustar rootrootalgorithm.alreadyRegistered = URI {0} is already assigned to class {1} c14n.Canonicalizer.RelativeNamespace = Element {0} has a relative namespace: {1} = "{2}" empty = {0} c14n.Canonicalizer.UnknownCanonicalizer = Unknown canonicalizer. No handler installed for URI {0}axiom-1.2.8/modules/axiom-c14n/src/main/java/0000755000000000000000000000000011131637462017325 5ustar rootrootaxiom-1.2.8/modules/axiom-c14n/src/main/java/org/0000755000000000000000000000000011131637462020114 5ustar rootrootaxiom-1.2.8/modules/axiom-c14n/src/main/java/org/apache/0000755000000000000000000000000011131637462021335 5ustar rootrootaxiom-1.2.8/modules/axiom-c14n/src/main/java/org/apache/axiom/0000755000000000000000000000000011131637462022452 5ustar rootrootaxiom-1.2.8/modules/axiom-c14n/src/main/java/org/apache/axiom/c14n/0000755000000000000000000000000011131637462023217 5ustar rootrootaxiom-1.2.8/modules/axiom-c14n/src/main/java/org/apache/axiom/c14n/omwrapper/0000755000000000000000000000000011131637462025233 5ustar rootrootaxiom-1.2.8/modules/axiom-c14n/src/main/java/org/apache/axiom/c14n/omwrapper/NodeListImpl.java0000644000000000000000000000326011131637462030442 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.c14n.omwrapper; import org.apache.axiom.c14n.omwrapper.factory.WrapperFactory; import org.apache.axiom.c14n.omwrapper.interfaces.Node; import org.apache.axiom.c14n.omwrapper.interfaces.NodeList; import java.util.List; /** * @author Saliya Ekanayake (esaliya@gmail.com) */ public class NodeListImpl implements NodeList { private WrapperFactory fac = null; private List nodes = null; public NodeListImpl(List nodes, WrapperFactory fac) { this.fac = fac; this.nodes = nodes; } public Node item(int index) { try { return fac.getNode(nodes.get(index)); } catch(IndexOutOfBoundsException e) { return null; } } public int getLength() { return nodes.size(); } // Object should represent an OMNode protected int indexOf(Object o){ return nodes.indexOf(o); } } axiom-1.2.8/modules/axiom-c14n/src/main/java/org/apache/axiom/c14n/omwrapper/DocumentImpl.java0000644000000000000000000000575111131637462030506 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.c14n.omwrapper; import org.apache.axiom.c14n.omwrapper.factory.WrapperFactory; import org.apache.axiom.c14n.omwrapper.interfaces.Document; import org.apache.axiom.c14n.omwrapper.interfaces.Element; import org.apache.axiom.c14n.omwrapper.interfaces.Node; import org.apache.axiom.c14n.omwrapper.interfaces.NodeList; import org.apache.axiom.om.OMDocument; import org.apache.axiom.om.OMNode; import org.apache.axiom.om.OMText; import java.util.ArrayList; import java.util.Iterator; import java.util.List; /** * @author Saliya Ekanayake (esaliya@gmail.com) */ public class DocumentImpl extends NodeImpl implements Document { private OMDocument doc = null; private List list = null; private NodeList nl = null; public DocumentImpl(OMDocument doc, WrapperFactory fac){ this.fac = fac; this.doc = doc; } public Element getDocumentElement() { return (Element)fac.getNode(doc.getOMDocumentElement()); } public short getNodeType() { return Node.DOCUMENT_NODE; } public Node getFirstChild() { // an XML Document node should not give Text nodes as children. OMNode n = doc.getFirstOMChild(); do { if (!(n instanceof OMText)){ return fac.getNode(n); } n = n.getNextOMSibling(); } while (true); } public NodeList getChildNodes() { Iterator itr = null; if (nl == null) { // ok then this is the first call to this method list = new ArrayList(); nl = new NodeListImpl(list, fac); itr = doc.getChildren(); Object o; while(itr.hasNext()) { o = itr.next(); // Axiom returns OMText nodes even for newline characters // we don't want these to be returned from an XML Document node if (o instanceof OMText) { continue; } list.add(o); } } return nl; } public Node getNextSibling() { return null; } public Node getParentNode() { return null; } public Node getPreviousSibling() { return null; } } axiom-1.2.8/modules/axiom-c14n/src/main/java/org/apache/axiom/c14n/omwrapper/NamedNodeMapImpl.java0000644000000000000000000000353111131637462031212 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.c14n.omwrapper; import org.apache.axiom.c14n.omwrapper.factory.WrapperFactory; import org.apache.axiom.c14n.omwrapper.interfaces.NamedNodeMap; import org.apache.axiom.c14n.omwrapper.interfaces.Node; import org.apache.axiom.om.OMElement; import java.util.List; /** * @author Saliya Ekanayake (esaliya@gmail.com) */ public class NamedNodeMapImpl implements NamedNodeMap { private WrapperFactory fac = null; private List list = null; private OMElement parent = null; public NamedNodeMapImpl(List list, OMElement parent, WrapperFactory fac){ this.fac = fac; this.list = list; this.parent = parent; } public int getLength() { return list.size(); } public Node item(int index) { try { // returns an appropriate AttrImpl, wrapping either an OMNamespace or OMAttribute return fac.getAttribute(list.get(index), parent); } catch (IndexOutOfBoundsException e) { // returns null if index is invalid return null; } } } axiom-1.2.8/modules/axiom-c14n/src/main/java/org/apache/axiom/c14n/omwrapper/factory/0000755000000000000000000000000011131637462026702 5ustar rootroot././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootaxiom-1.2.8/modules/axiom-c14n/src/main/java/org/apache/axiom/c14n/omwrapper/factory/WrapperFactory.javaaxiom-1.2.8/modules/axiom-c14n/src/main/java/org/apache/axiom/c14n/omwrapper/factory/WrapperFactory.0000644000000000000000000000467411131637462031666 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.c14n.omwrapper.factory; import org.apache.axiom.c14n.omwrapper.*; import org.apache.axiom.c14n.omwrapper.interfaces.Attr; import org.apache.axiom.c14n.omwrapper.interfaces.Node; import org.apache.axiom.om.*; import java.util.HashMap; import java.util.Map; /** * class WrapperFactory * * @author Saliya Ekanayake (esaliya@gmail.com) */ public class WrapperFactory { private Map map = null; public WrapperFactory(){ map = new HashMap(); } // public static Map map = new HashMap(); public Node getNode(Object o){ Node n = (Node)map.get(o); if (n == null) { if(o instanceof OMElement){ n = new ElementImpl((OMElement)o, this); } else if (o instanceof OMDocument) { n = new DocumentImpl((OMDocument)o, this); } else if (o instanceof OMComment) { n = new CommentImpl((OMComment)o, this); } else if (o instanceof OMDocType) { n = new DoctypeImpl((OMDocType)o, this); } else if (o instanceof OMText){ n = new TextImpl((OMText)o, this); } else if (o instanceof OMProcessingInstruction){ n = new ProcessingInstructionImpl((OMProcessingInstruction)o, this); } map.put(o, n); } return n; } public Attr getAttribute(Object o, OMElement parent){ Attr at = (Attr)map.get(o); if (at == null){ if (o instanceof OMAttribute || o instanceof OMNamespace) { at = new AttrImpl(o, parent, this); } map.put(o, at); } return at; } } ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootaxiom-1.2.8/modules/axiom-c14n/src/main/java/org/apache/axiom/c14n/omwrapper/ProcessingInstructionImpl.javaaxiom-1.2.8/modules/axiom-c14n/src/main/java/org/apache/axiom/c14n/omwrapper/ProcessingInstructionIm0000644000000000000000000000320711131637462032024 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.c14n.omwrapper; import org.apache.axiom.c14n.omwrapper.factory.WrapperFactory; import org.apache.axiom.c14n.omwrapper.interfaces.Node; import org.apache.axiom.c14n.omwrapper.interfaces.ProcessingInstruction; import org.apache.axiom.om.OMProcessingInstruction; /** * @author Saliya Ekanayake (esaliya@gmail.com) */ public class ProcessingInstructionImpl extends NodeImpl implements ProcessingInstruction { private OMProcessingInstruction pi = null; public ProcessingInstructionImpl(OMProcessingInstruction pi, WrapperFactory fac) { this.fac = fac; this.pi = pi; node = pi; } public String getTarget() { return pi.getTarget(); } public String getData() { return pi.getValue(); } public short getNodeType() { return Node.PROCESSING_INSTRUCTION_NODE; } } axiom-1.2.8/modules/axiom-c14n/src/main/java/org/apache/axiom/c14n/omwrapper/NodeImpl.java0000644000000000000000000000571511131637462027615 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.c14n.omwrapper; import org.apache.axiom.c14n.omwrapper.factory.WrapperFactory; import org.apache.axiom.c14n.omwrapper.interfaces.Node; import org.apache.axiom.c14n.omwrapper.interfaces.NodeList; import org.apache.axiom.om.OMDocument; import org.apache.axiom.om.OMNode; import org.apache.axiom.om.OMText; /** * @author Saliya Ekanayake (esaliya@gmail.com) */ public class NodeImpl implements Node { protected WrapperFactory fac = null; protected OMNode node = null; protected Node next = null; protected Node prev = null; public String getNodeName() { return null; } public short getNodeType() { return 0; } public String getNodeValue() { return null; } public String getNamespaceURI() { return null; } public String getPrefix() { return null; } public Node getFirstChild() { return null; } public Node getNextSibling() { if (next == null) { if (node.getParent() instanceof OMDocument) { OMNode n = node.getNextOMSibling(); do { if (!(n instanceof OMText)) { next = fac.getNode(n); break; } n = n.getNextOMSibling(); } while (true); } else { next = fac.getNode(node.getNextOMSibling()); } } return next; } public Node getPreviousSibling() { if (prev == null) { if (node.getParent() instanceof OMDocument) { OMNode n = node.getPreviousOMSibling(); do { if (!(n instanceof OMText)) { prev = fac.getNode(n); break; } n = n.getPreviousOMSibling(); } while (true); } else { prev = fac.getNode(node.getPreviousOMSibling()); } } return prev; } public Node getParentNode() { return fac.getNode(node.getParent()); } public NodeList getChildNodes() { return null; } } axiom-1.2.8/modules/axiom-c14n/src/main/java/org/apache/axiom/c14n/omwrapper/DoctypeImpl.java0000644000000000000000000000262311131637462030332 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.c14n.omwrapper; import org.apache.axiom.c14n.omwrapper.factory.WrapperFactory; import org.apache.axiom.c14n.omwrapper.interfaces.Doctype; import org.apache.axiom.c14n.omwrapper.interfaces.Node; import org.apache.axiom.om.OMDocType; /** * @author Saliya Ekanayake (esaliya@gmail.com) */ public class DoctypeImpl extends NodeImpl implements Doctype { private OMDocType dt = null; public DoctypeImpl(OMDocType dt, WrapperFactory fac) { this.fac = fac; this.dt = dt; node = dt; } public short getNodeType() { return Node.DOCUMENT_TYPE_NODE; } } axiom-1.2.8/modules/axiom-c14n/src/main/java/org/apache/axiom/c14n/omwrapper/AttrImpl.java0000644000000000000000000001203511131637462027633 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.c14n.omwrapper; import org.apache.axiom.c14n.omwrapper.factory.WrapperFactory; import org.apache.axiom.c14n.omwrapper.interfaces.Attr; import org.apache.axiom.c14n.omwrapper.interfaces.Element; import org.apache.axiom.c14n.omwrapper.interfaces.Node; import org.apache.axiom.om.OMAttribute; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMNamespace; import javax.xml.namespace.QName; /** * @author Saliya Ekanayake (esaliya@gmail.com) */ public class AttrImpl extends NodeImpl implements Attr { public static final String XMLNS = "xmlns"; public static final String XMLNS_URI = "http://www.w3.org/2000/xmlns/"; private boolean isOMAttribute = false; private OMElement parent = null; private OMNamespace omns = null; private OMAttribute omattr = null; public AttrImpl(Object o, OMElement parent, WrapperFactory fac){ this.parent = parent; this.fac = fac; if (o instanceof OMAttribute) { isOMAttribute = true; omattr = (OMAttribute)o; } else { isOMAttribute = false; omns = (OMNamespace)o; } } public String getName() { // for attributes getName() is the same as getNodeName() return getNodeName(); } public String getValue() { // for attributes getValue() is the same as getNodeValue() return getNodeValue(); } public Element getOwnerElement() { return (Element) fac.getNode(parent); } public short getNodeType() { return Node.ATTRIBUTE_NODE; } public String getLocalName() { return (isOMAttribute) ? omattr.getLocalName() : getOMNamespaceLocalName(); } public String getNamespaceURI() { return (isOMAttribute) ? getOMAttributeNsURI() : XMLNS_URI; } // overridden getNodeName() method public String getNodeName() { return (isOMAttribute) ? getOMAttributeName() : getOMNamespaceName(); } // overridden getNodeValue() method public String getNodeValue() { return (isOMAttribute) ? omattr.getAttributeValue() : omns.getNamespaceURI(); } public String getPrefix() { return (isOMAttribute) ? getOMAttributePrefix() : getOMNamespacePrefix(); } // a call to this method assumes that AttrImpl wraps an OMAttribute private String getOMAttributeName(){ QName qn = omattr.getQName(); if (qn.getPrefix() == null || "".equals(qn.getPrefix())) { return qn.getLocalPart(); } return qn.getPrefix() + ":" + qn.getLocalPart(); } // a call to this method assumes that AttrImpl wraps an OMNamespace private String getOMNamespaceName() { String prefix = omns.getPrefix(); if(prefix == null || "".equals(prefix)) { return XMLNS; } return XMLNS + ":" + prefix; } // a call to this method assumes that AttrImpl wraps an OMNamespace private String getOMNamespaceLocalName() { String prefix = omns.getPrefix(); if(prefix == null || "".equals(prefix)) { return XMLNS; } return prefix; } // a call to this method assumes that AttrImpl wraps an OMAttribute private String getOMAttributeNsURI() { String nsURI = omattr.getQName().getNamespaceURI(); if (nsURI == null || "".equals(nsURI)) { return null; } return nsURI; } // a call to this method assumes that AttrImpl wraps an OMAttribute private String getOMAttributePrefix() { String prefix = omattr.getQName().getPrefix(); if (prefix == null || "".equals(prefix)){ return null; } return prefix; } // a call to this method assumes that AttrImpl wraps an OMNamespace private String getOMNamespacePrefix() { // OMNamespace prefix is what you get after xmlns: // in DOM the prefix of an attribute is what you get before : String prefix = omns.getPrefix(); if(prefix == null || "".equals(prefix)){ return null; } return XMLNS; } public Node getNextSibling() { return null; } public Node getPreviousSibling() { return null; } public Node getParentNode() { return null; } } axiom-1.2.8/modules/axiom-c14n/src/main/java/org/apache/axiom/c14n/omwrapper/CommentImpl.java0000644000000000000000000000275511131637462030333 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.c14n.omwrapper; import org.apache.axiom.c14n.omwrapper.factory.WrapperFactory; import org.apache.axiom.c14n.omwrapper.interfaces.Comment; import org.apache.axiom.c14n.omwrapper.interfaces.Node; import org.apache.axiom.om.OMComment; /** * @author Saliya Ekanayake (esaliya@gmail.com) */ public class CommentImpl extends NodeImpl implements Comment { private OMComment comment = null; public CommentImpl(OMComment comment, WrapperFactory fac){ this.fac = fac; this.comment = comment; node = comment; } public short getNodeType() { return Node.COMMENT_NODE; } public String getData() { return comment.getValue(); } } axiom-1.2.8/modules/axiom-c14n/src/main/java/org/apache/axiom/c14n/omwrapper/interfaces/0000755000000000000000000000000011131637462027356 5ustar rootroot././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootaxiom-1.2.8/modules/axiom-c14n/src/main/java/org/apache/axiom/c14n/omwrapper/interfaces/Comment.javaaxiom-1.2.8/modules/axiom-c14n/src/main/java/org/apache/axiom/c14n/omwrapper/interfaces/Comment.java0000644000000000000000000000172611131637462031631 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.c14n.omwrapper.interfaces; /** * @author Saliya Ekanayake (esaliya@gmail.com) */ public interface Comment extends Node{ public String getData(); } ././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootaxiom-1.2.8/modules/axiom-c14n/src/main/java/org/apache/axiom/c14n/omwrapper/interfaces/Element.javaaxiom-1.2.8/modules/axiom-c14n/src/main/java/org/apache/axiom/c14n/omwrapper/interfaces/Element.java0000644000000000000000000000205011131637462031607 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.c14n.omwrapper.interfaces; /** * @author Saliya Ekanayake (esaliya@gmail.com) */ public interface Element extends Node{ public boolean hasAttributes(); public String getTagName(); public NamedNodeMap getAttributes(); } axiom-1.2.8/modules/axiom-c14n/src/main/java/org/apache/axiom/c14n/omwrapper/interfaces/Node.java0000644000000000000000000000632711131637462031116 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.c14n.omwrapper.interfaces; /** * @author Saliya Ekanayake (esaliya@gmail.com) */ public interface Node { // some of these may not be actually necessary for the wrappers // but I kept them for the sake of future modifications public static final short ELEMENT_NODE = 1; /** * The node is an AttrImpl. */ public static final short ATTRIBUTE_NODE = 2; /** * The node is a Text node. */ public static final short TEXT_NODE = 3; /** * The node is a CDATASection. */ public static final short CDATA_SECTION_NODE = 4; /** * The node is an EntityReference. */ public static final short ENTITY_REFERENCE_NODE = 5; /** * The node is an Entity. */ public static final short ENTITY_NODE = 6; /** * The node is a ProcessingInstruction. */ public static final short PROCESSING_INSTRUCTION_NODE = 7; /** * The node is a Comment. */ public static final short COMMENT_NODE = 8; /** * The node is a Document. */ public static final short DOCUMENT_NODE = 9; /** * The node is a DocumentType. */ public static final short DOCUMENT_TYPE_NODE = 10; /** * The node is a DocumentFragment. */ public static final short DOCUMENT_FRAGMENT_NODE = 11; /** * The node is a Notation. */ public static final short NOTATION_NODE = 12; // this should be overridden as appropriate public short getNodeType(); // this should be overridden as appropriate public String getNodeValue(); // this should be overridden as appropriate public String getNodeName(); // this should be overridden as appropriate public Node getFirstChild(); // this should be overridden as appropriate public Node getNextSibling(); // this should be overridden as appropriate public Node getPreviousSibling(); // this should be overridden as appropriate public Node getParentNode(); // this should be overridden as appropriate public NodeList getChildNodes(); // this should be overridden as appropriate public String getNamespaceURI(); // this should be overridden as appropriate public String getPrefix(); } ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootaxiom-1.2.8/modules/axiom-c14n/src/main/java/org/apache/axiom/c14n/omwrapper/interfaces/NodeList.javaaxiom-1.2.8/modules/axiom-c14n/src/main/java/org/apache/axiom/c14n/omwrapper/interfaces/NodeList.jav0000644000000000000000000000175311131637462031607 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.c14n.omwrapper.interfaces; /** * @author Saliya Ekanayake (esaliya@gmail.com) */ public interface NodeList { public Node item(int index); public int getLength(); }././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootaxiom-1.2.8/modules/axiom-c14n/src/main/java/org/apache/axiom/c14n/omwrapper/interfaces/Document.javaaxiom-1.2.8/modules/axiom-c14n/src/main/java/org/apache/axiom/c14n/omwrapper/interfaces/Document.jav0000644000000000000000000000174511131637462031645 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.c14n.omwrapper.interfaces; /** * @author Saliya Ekanayake (esaliya@gmail.com) */ public interface Document extends Node{ public Element getDocumentElement(); } axiom-1.2.8/modules/axiom-c14n/src/main/java/org/apache/axiom/c14n/omwrapper/interfaces/Text.java0000644000000000000000000000172411131637462031151 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.c14n.omwrapper.interfaces; /** * @author Saliya Ekanayake (esaliya@gmail.com) */ public interface Text extends Node{ public char[] getText(); } ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootaxiom-1.2.8/modules/axiom-c14n/src/main/java/org/apache/axiom/c14n/omwrapper/interfaces/NamedNodeMap.javaaxiom-1.2.8/modules/axiom-c14n/src/main/java/org/apache/axiom/c14n/omwrapper/interfaces/NamedNodeMap0000644000000000000000000000176011131637462031575 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.c14n.omwrapper.interfaces; /** * @author Saliya Ekanayake (esaliya@gmail.com) */ public interface NamedNodeMap { public Node item(int index); public int getLength(); } ././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootaxiom-1.2.8/modules/axiom-c14n/src/main/java/org/apache/axiom/c14n/omwrapper/interfaces/Doctype.javaaxiom-1.2.8/modules/axiom-c14n/src/main/java/org/apache/axiom/c14n/omwrapper/interfaces/Doctype.java0000644000000000000000000000175711131637462031642 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.c14n.omwrapper.interfaces; /** * @author Saliya Ekanayake (esaliya@gmail.com) */ public interface Doctype extends Node{ // All I want is getNodeType() so nothing new here } axiom-1.2.8/modules/axiom-c14n/src/main/java/org/apache/axiom/c14n/omwrapper/interfaces/Attr.java0000644000000000000000000000214711131637462031137 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.c14n.omwrapper.interfaces; /** * @author Saliya Ekanayake (esaliya@gmail.com) */ public interface Attr extends Node{ public String getName(); public String getValue(); public Element getOwnerElement(); public String getLocalName(); public String getNamespaceURI(); } ././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootaxiom-1.2.8/modules/axiom-c14n/src/main/java/org/apache/axiom/c14n/omwrapper/interfaces/ProcessingInstruction.javaaxiom-1.2.8/modules/axiom-c14n/src/main/java/org/apache/axiom/c14n/omwrapper/interfaces/ProcessingIn0000644000000000000000000000200411131637462031700 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.c14n.omwrapper.interfaces; /** * @author Saliya Ekanayake (esaliya@gmail.com) */ public interface ProcessingInstruction extends Node{ public String getTarget(); public String getData(); } axiom-1.2.8/modules/axiom-c14n/src/main/java/org/apache/axiom/c14n/omwrapper/TextImpl.java0000644000000000000000000000302311131637462027642 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.c14n.omwrapper; import org.apache.axiom.c14n.omwrapper.factory.WrapperFactory; import org.apache.axiom.c14n.omwrapper.interfaces.Node; import org.apache.axiom.c14n.omwrapper.interfaces.Text; import org.apache.axiom.om.OMText; /** * @author Saliya Ekanayake (esaliya@gmail.com) */ public class TextImpl extends NodeImpl implements Text { private OMText txt = null; public TextImpl(OMText txt, WrapperFactory fac) { this.fac = fac; this.txt = txt; node = txt; } public char[] getText() { return txt.getText().toCharArray(); } public String getNodeValue() { return txt.getText(); } public short getNodeType() { return Node.TEXT_NODE; } } axiom-1.2.8/modules/axiom-c14n/src/main/java/org/apache/axiom/c14n/omwrapper/ElementImpl.java0000644000000000000000000001067111131637462030316 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.c14n.omwrapper; import org.apache.axiom.c14n.omwrapper.factory.WrapperFactory; import org.apache.axiom.c14n.omwrapper.interfaces.Element; import org.apache.axiom.c14n.omwrapper.interfaces.NamedNodeMap; import org.apache.axiom.c14n.omwrapper.interfaces.Node; import org.apache.axiom.c14n.omwrapper.interfaces.NodeList; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMNamespace; import javax.xml.namespace.QName; import java.util.ArrayList; import java.util.Iterator; import java.util.List; /** * @author Saliya Ekanayake (esaliya@gmail.com) */ public class ElementImpl extends NodeImpl implements Element { private OMElement e = null; private NamedNodeMap nnm = null; private List list = null; private List nodes = null; private NodeList nl = null; public ElementImpl(OMElement e, WrapperFactory fac) { this.fac = fac; this.e = e; node = e; } public String getTagName() { // for Element type getTagName() is similar to its getNodeName(); return getNodeName(); } public NamedNodeMap getAttributes() { if (nnm == null) { // ok now nnm == null implies this is the first time call to this method list = new ArrayList(); nnm = new NamedNodeMapImpl(list, e, fac); Iterator itr = e.getAllAttributes(); while (itr.hasNext()) { list.add(itr.next()); } itr = e.getAllDeclaredNamespaces(); while (itr.hasNext()) { list.add(itr.next()); } Object parent = e.getParent(); if (parent instanceof OMElement) { OMNamespace defaultNS = e.getDefaultNamespace(); OMNamespace defaultParentNS = ((OMElement) parent).getDefaultNamespace(); if (defaultNS != null && defaultParentNS != null && defaultNS.getNamespaceURI().equals(defaultParentNS.getNamespaceURI())) { list.remove(defaultNS); } } } return nnm; } public short getNodeType() { return Node.ELEMENT_NODE; } public boolean hasAttributes() { // no worries only the first time call would be expensive return getAttributes().getLength() != 0; } public String getNodeName() { // overriden getNodeName() QName qn = e.getQName(); if (qn.getPrefix() == null || "".equals(qn.getPrefix())) { return qn.getLocalPart(); } else { return qn.getPrefix() + ":" + qn.getLocalPart(); } } // For Element getNodeValue is null so no need to override // public String getNodeValue() { // return super.getNodeValue(); // } public Node getFirstChild() { return fac.getNode(e.getFirstOMChild()); } public NodeList getChildNodes() { Iterator itr = null; if (nl == null) { // ok then this is the first call to this method nodes = new ArrayList(); nl = new NodeListImpl(nodes, fac); itr = e.getChildren(); while(itr.hasNext()) { nodes.add(itr.next()); } } return nl; } public String getNamespaceURI() { OMNamespace ns = e.getNamespace(); if (ns != null){ return ns.getNamespaceURI(); } return null; } public String toString() { return e.toString(); } public String getPrefix() { String prefix = e.getQName().getPrefix(); if (prefix == null || "".equals(prefix)){ return null; } return prefix; } } axiom-1.2.8/modules/axiom-c14n/src/main/java/org/apache/axiom/c14n/CanonicalizerSpi.java0000644000000000000000000000475711131637462027334 0ustar rootroot /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.c14n; import org.apache.axiom.c14n.exceptions.CanonicalizationException; import org.apache.axiom.c14n.omwrapper.factory.WrapperFactory; import org.apache.axiom.c14n.omwrapper.interfaces.Node; import org.apache.axiom.om.impl.builder.StAXOMBuilder; import javax.xml.stream.XMLStreamException; import java.io.ByteArrayInputStream; import java.io.OutputStream; /** * @author Saliya Ekanayake (esaliya@gmail.com) */ public abstract class CanonicalizerSpi { protected boolean reset = false; /** * Method engineGetURI() * * @return the URI of the canonicalization method */ public abstract String engineGetURI(); /** * Method engineGetIncludeComments * * @return true if comments are included or false otherwise */ public abstract boolean engineGetIncludeComments(); /** * Method setWriter * @param os */ public abstract void setWriter(OutputStream os); public byte[] engineCanonicalize(byte[] inputBytes) throws CanonicalizationException { ByteArrayInputStream bais = new ByteArrayInputStream(inputBytes); StAXOMBuilder builder = null; try { builder = new StAXOMBuilder(bais); } catch (XMLStreamException e) { throw new CanonicalizationException(e); } byte [] result = this.engineCanonicalizeSubTree( new WrapperFactory().getNode(builder.getDocument())); return result; } public abstract byte[] engineCanonicalizeSubTree(Node node) throws CanonicalizationException; public abstract byte[] engineCanonicalizeSubTree(Node node, String inclusiveNamespaces) throws CanonicalizationException; } axiom-1.2.8/modules/axiom-c14n/src/main/java/org/apache/axiom/c14n/utils/0000755000000000000000000000000011131637462024357 5ustar rootroot././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootaxiom-1.2.8/modules/axiom-c14n/src/main/java/org/apache/axiom/c14n/utils/UnsyncByteArrayOutputStream.javaaxiom-1.2.8/modules/axiom-c14n/src/main/java/org/apache/axiom/c14n/utils/UnsyncByteArrayOutputStream0000644000000000000000000000476211131637462032012 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.c14n.utils; import java.io.OutputStream; /** * A simple Unsynced ByteArryOutputStream * * @author raul */ public class UnsyncByteArrayOutputStream extends OutputStream { private static ThreadLocal bufCahce = new ThreadLocal() { protected synchronized Object initialValue() { return new byte[8 * 1024]; } }; byte[] buf; int size = 8 * 1024;//buf.length; int pos = 0; /** * @inheritDoc */ public UnsyncByteArrayOutputStream() { buf = (byte[]) bufCahce.get(); } public void write(byte[] arg0) { int newPos = pos + arg0.length; if (newPos > size) { expandSize(); } System.arraycopy(arg0, 0, buf, pos, arg0.length); pos = newPos; } /** * @inheritDoc */ public void write(byte[] arg0, int arg1, int arg2) { int newPos = pos + arg2; if (newPos > size) { expandSize(); } System.arraycopy(arg0, arg1, buf, pos, arg2); pos = newPos; } /** * @inheritDoc */ public void write(int arg0) { if (pos >= size) { expandSize(); } buf[pos++] = (byte) arg0; } /** * @inheritDoc */ public byte[] toByteArray() { byte result[] = new byte[pos]; System.arraycopy(buf, 0, result, 0, pos); return result; } /** * @inheritDoc */ public void reset() { pos = 0; } /** @inheritDoc */ void expandSize() { int newSize = size << 2; byte newBuf[] = new byte[newSize]; System.arraycopy(buf, 0, newBuf, 0, pos); buf = newBuf; size = newSize; } } axiom-1.2.8/modules/axiom-c14n/src/main/java/org/apache/axiom/c14n/utils/PropLoader.java0000644000000000000000000000231711131637462027274 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.c14n.utils; import java.io.File; import java.util.ResourceBundle; /** * @author Saliya Ekanayake (esaliya@gmail.com) */ public class PropLoader { public static final String C14N_EXCEPTION_PROP = "META-INF" + File.separator; public static String getExceptionProperty(String key, String baseName){ return ResourceBundle.getBundle(C14N_EXCEPTION_PROP+baseName).getString(key); } } axiom-1.2.8/modules/axiom-c14n/src/main/java/org/apache/axiom/c14n/utils/Constants.java0000644000000000000000000000236511131637462027204 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.c14n.utils; /** * @author Saliya Ekanayake (esaliya@gmail.com) */ public class Constants { /** * The URI for XML spec */ public static final String XML_LANG_SPACE_SpecNS = "http://www.w3.org/XML/1998/namespace"; /** * The URI for XMLNS spec */ public static final String NamespaceSpecNS = "http://www.w3.org/2000/xmlns/"; private Constants() { // we don't allow instantiation } } axiom-1.2.8/modules/axiom-c14n/src/main/java/org/apache/axiom/c14n/Canonicalizer.java0000644000000000000000000001625311131637462026652 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.c14n; import org.apache.axiom.c14n.exceptions.AlgorithmAlreadyRegisteredException; import org.apache.axiom.c14n.exceptions.CanonicalizationException; import org.apache.axiom.c14n.exceptions.InvalidCanonicalizerException; import org.apache.axiom.c14n.omwrapper.factory.WrapperFactory; import org.apache.axiom.om.OMElement; import java.io.OutputStream; import java.util.HashMap; import java.util.Map; /** * @author Saliya Ekanayake (esaliya@gmail.com) */ public class Canonicalizer { /** * The URL defined in XML-SEC Rec for inclusive org.apache.axiom.c14n.impl without comments. */ public static final String ALGO_ID_C14N_OMIT_COMMENTS = "http://www.w3.org/TR/2001/REC-xml-c14n-20010315"; /** * The URL defined in XML-SEC Rec for inclusive org.apache.axiom.c14n.impl with comments. */ public static final String ALGO_ID_C14N_WITH_COMMENTS = ALGO_ID_C14N_OMIT_COMMENTS + "#WithComments"; /** * The URL defined in XML-SEC Rec for exclusive org.apache.axiom.c14n.impl without comments. */ public static final String ALGO_ID_C14N_EXCL_OMIT_COMMENTS = "http://www.w3.org/2001/10/xml-exc-c14n#"; /** * The URL defined in XML-SEC Rec for exclusive org.apache.axiom.c14n.impl with comments. */ public static final String ALGO_ID_C14N_EXCL_WITH_COMMENTS = ALGO_ID_C14N_EXCL_OMIT_COMMENTS + "WithComments"; static boolean _alreadyInitialized = false; static Map _canonicalizerHash = null; protected CanonicalizerSpi canonicalizerSpi = null; /** * Method init */ public static synchronized void init() { if (!Canonicalizer._alreadyInitialized) { Canonicalizer._canonicalizerHash = new HashMap(10); Canonicalizer._alreadyInitialized = true; } } /** * Constructor Canonicalizer * * @param algorithmURI * @throws org.apache.axiom.c14n.exceptions.InvalidCanonicalizerException * */ private Canonicalizer(String algorithmURI) throws InvalidCanonicalizerException { try { Class implementingClass = getImplementingClass(algorithmURI); this.canonicalizerSpi = (CanonicalizerSpi) implementingClass.newInstance(); this.canonicalizerSpi.reset = true; } catch (Exception e) { Object exArgs[] = {algorithmURI}; throw new InvalidCanonicalizerException( "c14n.Canonicalizer.UnknownCanonicalizer", exArgs); } } /** * Method getInstance * * @param algorithmURI * @return an appropriate Canonicalizer instance * @throws InvalidCanonicalizerException */ public static synchronized final Canonicalizer getInstance(String algorithmURI) throws InvalidCanonicalizerException { Canonicalizer canonicalizer = new Canonicalizer(algorithmURI); return canonicalizer; } /** * Method register * * @param algorithmURI * @param implementingClass * @throws AlgorithmAlreadyRegisteredException * */ public static synchronized void register(String algorithmURI, String implementingClass) throws AlgorithmAlreadyRegisteredException { // check whether URI is already registered Class registeredClass = getImplementingClass(algorithmURI); if (registeredClass != null) { Object exArgs[] = {algorithmURI, registeredClass}; throw new AlgorithmAlreadyRegisteredException( "algorithm.alreadyRegistered", exArgs); } try { _canonicalizerHash.put(algorithmURI, Class.forName(implementingClass)); } catch (ClassNotFoundException e) { throw new RuntimeException(implementingClass + " not found"); } } /** * Method engineGetURI() * * @return the URI of the canonicalization method */ public final String getURI() { return this.canonicalizerSpi.engineGetURI(); } /** * Method engineGetIncludeComments * * @return true if comments are included or false otherwise */ public boolean getIncludeComments() { return this.canonicalizerSpi.engineGetIncludeComments(); } /** * Method canonicalize * * @param inputBytes * @return the canonicalized array of bytes * @throws CanonicalizationException */ public byte[] canonicalize(byte[] inputBytes) throws CanonicalizationException { return this.canonicalizerSpi.engineCanonicalize(inputBytes); } /** * Canonicalizes the subtree rooted by element. * * @param element The element to canicalize * @return the result of the org.apache.axiom.c14n.impl. * @throws CanonicalizationException */ public byte[] canonicalizeSubtree(OMElement element) throws CanonicalizationException { return this.canonicalizerSpi.engineCanonicalizeSubTree( new WrapperFactory().getNode(element)); } /** * Canonicalizes the subtree rooted by element. * * @param element * @param inclusiveNamespaces * @return the result of the org.apache.axiom.c14n.impl. * @throws CanonicalizationException */ public byte[] canonicalizeSubtree(OMElement element, String inclusiveNamespaces) throws CanonicalizationException { return this.canonicalizerSpi.engineCanonicalizeSubTree(new WrapperFactory().getNode(element), inclusiveNamespaces); } /** * Sets the writter where the cannocalization ends. ByteArrayOutputStream if * none is setted. * * @param os */ public void setWriter(OutputStream os) { this.canonicalizerSpi.setWriter(os); } /** * Method getImplementingCanonicalizerClss * * @return the name of the implementing {@link CanonicalizerSpi} class */ public String getImplementingCanonicalizerClass() { return this.canonicalizerSpi.getClass().getName(); } /** * Method getImplementingClass * * @param URI * @return the class implementing the given URI */ private static Class getImplementingClass(String URI) { return (Class) _canonicalizerHash.get(URI); } /** * Set the canonicalizator behaviour to not reset. */ public void notReset() { this.canonicalizerSpi.reset = false; } } axiom-1.2.8/modules/axiom-c14n/src/main/java/org/apache/axiom/c14n/impl/0000755000000000000000000000000011131637462024160 5ustar rootroot././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootaxiom-1.2.8/modules/axiom-c14n/src/main/java/org/apache/axiom/c14n/impl/Canonicalizer20010315ExclOmitComments.javaaxiom-1.2.8/modules/axiom-c14n/src/main/java/org/apache/axiom/c14n/impl/Canonicalizer20010315ExclOmi0000644000000000000000000000271011131637462030761 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.c14n.impl; import org.apache.axiom.c14n.Canonicalizer; public class Canonicalizer20010315ExclOmitComments extends Canonicalizer20010315Excl { //public class Canonicalizer20010315ExclOmitComments extends Canonicalizer20010315Excl { /** * Constructor Canonicalizer20010315ExclOmitComments */ public Canonicalizer20010315ExclOmitComments() { super(false); } /** * @inheritDoc */ public final String engineGetURI() { return Canonicalizer.ALGO_ID_C14N_EXCL_OMIT_COMMENTS; } /** * @inheritDoc */ public final boolean engineGetIncludeComments() { return false; } } axiom-1.2.8/modules/axiom-c14n/src/main/java/org/apache/axiom/c14n/impl/CanonicalizerBase.java0000644000000000000000000004427011131637462030406 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.c14n.impl; import org.apache.axiom.c14n.CanonicalizerSpi; import org.apache.axiom.c14n.exceptions.CanonicalizationException; import org.apache.axiom.c14n.helpers.AttrCompare; import org.apache.axiom.c14n.omwrapper.AttrImpl; import org.apache.axiom.c14n.omwrapper.interfaces.*; import org.apache.axiom.c14n.utils.Constants; import org.apache.axiom.c14n.utils.UnsyncByteArrayOutputStream; import org.apache.axiom.om.OMAbstractFactory; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.OutputStream; import java.io.UnsupportedEncodingException; import java.util.*; public abstract class CanonicalizerBase extends CanonicalizerSpi { //Constants to be outputed, In char array form, so //less garbage is generate when outputed. private static final byte[] _END_PI = {'?', '>'}; private static final byte[] _BEGIN_PI = {'<', '?'}; private static final byte[] _END_COMM = {'-', '-', '>'}; private static final byte[] _BEGIN_COMM = {'<', '!', '-', '-'}; private static final byte[] __XA_ = {'&', '#', 'x', 'A', ';'}; private static final byte[] __X9_ = {'&', '#', 'x', '9', ';'}; private static final byte[] _QUOT_ = {'&', 'q', 'u', 'o', 't', ';'}; private static final byte[] __XD_ = {'&', '#', 'x', 'D', ';'}; private static final byte[] _GT_ = {'&', 'g', 't', ';'}; private static final byte[] _LT_ = {'&', 'l', 't', ';'}; private static final byte[] _END_TAG = {'<', '/'}; private static final byte[] _AMP_ = {'&', 'a', 'm', 'p', ';'}; final static AttrCompare COMPARE = new AttrCompare(); final static String XML = "xml"; final static String XMLNS = "xmlns"; final static byte[] equalsStr = {'=', '\"'}; static final int NODE_BEFORE_DOCUMENT_ELEMENT = -1; static final int NODE_NOT_BEFORE_OR_AFTER_DOCUMENT_ELEMENT = 0; static final int NODE_AFTER_DOCUMENT_ELEMENT = 1; //The null xmlns definiton. protected static final Attr nullNode; static { try { // nullNode = (Attr) WrapperFactory.getNode( // OMAbstractFactory.getOMFactory().createOMNamespace("", "")); nullNode = new AttrImpl( OMAbstractFactory.getOMFactory().createOMNamespace("", ""), null, null); } catch (Exception e) { throw new RuntimeException("Unable to create nullNode"/*,*/ + e); } } List nodeFilter; boolean _includeComments; /** * The node to be skiped/excluded from the OM tree * in subtree canonicalizations. */ Node _excludeNode = null; OutputStream _writer = new UnsyncByteArrayOutputStream();//null; /** * Constructor CanonicalizerBase * * @param includeComments */ public CanonicalizerBase(boolean includeComments) { this._includeComments = includeComments; } /** * Method engineCanonicalizeSubTree * * @param rootNode * @throws CanonicalizationException * @inheritDoc */ public byte[] engineCanonicalizeSubTree(Node rootNode) throws CanonicalizationException { return engineCanonicalizeSubTree(rootNode, (Node) null); } /** * @param _writer The _writer to set. */ public void setWriter(OutputStream _writer) { this._writer = _writer; } /** * Canonicalizes a Subtree node. * * @param rootNode the root of the subtree to canicalize * @param excludeNode a node to be excluded from the canonicalize operation * @return The canonicalize stream. * @throws CanonicalizationException */ byte[] engineCanonicalizeSubTree(Node rootNode, Node excludeNode) throws CanonicalizationException { this._excludeNode = excludeNode; try { NameSpaceSymbTable ns = new NameSpaceSymbTable(); int nodeLevel = NODE_BEFORE_DOCUMENT_ELEMENT; if (rootNode instanceof Element) { //Fills the nssymbtable with the definitions of the parent of the root subnode getParentNameSpaces((Element) rootNode, ns); nodeLevel = NODE_NOT_BEFORE_OR_AFTER_DOCUMENT_ELEMENT; } this.canonicalizeSubTree(rootNode, ns, rootNode, nodeLevel); this._writer.close(); if (this._writer instanceof ByteArrayOutputStream) { byte []result = ((ByteArrayOutputStream) this._writer).toByteArray(); if (reset) { ((ByteArrayOutputStream) this._writer).reset(); } return result; } else if (this._writer instanceof UnsyncByteArrayOutputStream) { byte []result = ((UnsyncByteArrayOutputStream) this._writer).toByteArray(); if (reset) { ((UnsyncByteArrayOutputStream) this._writer).reset(); } return result; } return null; } catch (UnsupportedEncodingException ex) { throw new CanonicalizationException("empty", ex); } catch (IOException ex) { throw new CanonicalizationException("empty", ex); } } /** * Method canonicalizeSubTree, this function is a recursive one. * * @param currentNode * @param ns * @param endnode * @throws CanonicalizationException * @throws IOException */ final void canonicalizeSubTree(Node currentNode, NameSpaceSymbTable ns, Node endnode, int documentLevel) throws CanonicalizationException, IOException { Node sibling = null; Node parentNode = null; final OutputStream writer = this._writer; final Node excludeNode = this._excludeNode; final boolean includeComments = this._includeComments; Map cache = new HashMap(); do { switch (currentNode.getNodeType()) { case Node.DOCUMENT_TYPE_NODE : default : break; case Node.ENTITY_NODE : case Node.NOTATION_NODE : case Node.ATTRIBUTE_NODE : // illegal node type during traversal throw new CanonicalizationException("empty"); case Node.DOCUMENT_FRAGMENT_NODE : case Node.DOCUMENT_NODE : ns.outputNodePush(); sibling = currentNode.getFirstChild(); break; case Node.COMMENT_NODE : if (includeComments) { outputCommentToWriter((Comment) currentNode, writer, documentLevel); } break; case Node.PROCESSING_INSTRUCTION_NODE : outputPItoWriter((ProcessingInstruction) currentNode, writer, documentLevel); break; case Node.TEXT_NODE : // Axiom gives everything as Text outputTextToWriter(currentNode.getNodeValue(), writer); break; case Node.CDATA_SECTION_NODE : // break; case Node.ELEMENT_NODE : documentLevel = NODE_NOT_BEFORE_OR_AFTER_DOCUMENT_ELEMENT; if (currentNode == excludeNode) { break; } Element currentElement = (Element) currentNode; //Add a level to the nssymbtable. So latter can be pop-back. ns.outputNodePush(); writer.write('<'); String name = currentElement.getTagName(); UtfHelper.writeByte(name, writer, cache); Iterator attrs = this.handleAttributesSubtree(currentElement, ns); if (attrs != null) { //we output all Attrs which are available while (attrs.hasNext()) { Attr attr = (Attr) attrs.next(); outputAttrToWriter(attr.getNodeName(), attr.getNodeValue(), writer, cache); } } writer.write('>'); sibling = currentNode.getFirstChild(); if (sibling == null) { writer.write(_END_TAG); UtfHelper.writeStringToUtf8(name, writer); writer.write('>'); //We fineshed with this level, pop to the previous definitions. ns.outputNodePop(); if (parentNode != null) { sibling = currentNode.getNextSibling(); } } else { parentNode = currentElement; } break; } while (sibling == null && parentNode != null) { writer.write(_END_TAG); UtfHelper.writeByte(((Element) parentNode).getTagName(), writer, cache); writer.write('>'); //We fineshed with this level, pop to the previous definitions. ns.outputNodePop(); if (parentNode == endnode) return; sibling = parentNode.getNextSibling(); parentNode = parentNode.getParentNode(); if (!(parentNode instanceof Element)) { documentLevel = NODE_AFTER_DOCUMENT_ELEMENT; parentNode = null; } } if (sibling == null) return; currentNode = sibling; sibling = currentNode.getNextSibling(); } while (true); } void handleParent(Element e, NameSpaceSymbTable ns) { if (!e.hasAttributes()) { return; } NamedNodeMap attrs = e.getAttributes(); int attrsLength = attrs.getLength(); for (int i = 0; i < attrsLength; i++) { Attr N = (Attr) attrs.item(i); if (Constants.NamespaceSpecNS != N.getNamespaceURI()) { //Not a namespace definition, ignore. continue; } String NName = N.getLocalName(); String NValue = N.getNodeValue(); if (XML.equals(NName) && Constants.XML_LANG_SPACE_SpecNS.equals(NValue)) { //xmlns:xml="http://www.w3.org/XML/1998/namespace" continue; } ns.addMapping(NName, NValue, N); } } /** * Adds to ns the definitons from the parent elements of el * * @param el * @param ns */ final void getParentNameSpaces(Element el, NameSpaceSymbTable ns) { List parents = new ArrayList(10); Node n1 = el.getParentNode(); if (!(n1 instanceof Element)) { return; } //Obtain all the parents of the elemnt Element parent = (Element) n1; while (parent != null) { parents.add(parent); Node n = parent.getParentNode(); if (!(n instanceof Element)) { break; } parent = (Element) n; } //Visit them in reverse order. ListIterator it = parents.listIterator(parents.size()); while (it.hasPrevious()) { Element ele = (Element) it.previous(); handleParent(ele, ns); } Attr nsprefix; if (((nsprefix = ns.getMappingWithoutRendered("xmlns")) != null) && "".equals(nsprefix.getValue())) { ns.addMappingAndRender("xmlns", "", nullNode); } } abstract Iterator handleAttributesSubtree(Element E, NameSpaceSymbTable ns) throws CanonicalizationException; /** * Outputs an Attribute to the internal Writer. *

* The string value of the node is modified by replacing *

    *
  • all ampersands (&) with &amp;
  • *
  • all open angle brackets (<) with &lt;
  • *
  • all quotation mark characters with &quot;
  • *
  • and the whitespace characters #x9, #xA, and #xD, with character * references. The character references are written in uppercase * hexadecimal with no leading zeroes (for example, #xD is represented * by the character reference &#xD;)
  • *
* * @param name * @param value * @param writer * @throws IOException */ static final void outputAttrToWriter(final String name, final String value, final OutputStream writer, final Map cache) throws IOException { writer.write(' '); UtfHelper.writeByte(name, writer, cache); writer.write(equalsStr); byte []toWrite; final int length = value.length(); int i = 0; while (i < length) { char c = value.charAt(i++); switch (c) { case '&' : toWrite = _AMP_; break; case '<' : toWrite = _LT_; break; case '"' : toWrite = _QUOT_; break; case 0x09 : // '\t' toWrite = __X9_; break; case 0x0A : // '\n' toWrite = __XA_; break; case 0x0D : // '\r' toWrite = __XD_; break; default : if (c < 0x80) { writer.write(c); } else { UtfHelper.writeCharToUtf8(c, writer); } ; continue; } writer.write(toWrite); } writer.write('\"'); } /** * Outputs a PI to the internal Writer. * * @param currentPI * @param writer where to write the things * @throws IOException */ static final void outputPItoWriter(ProcessingInstruction currentPI, OutputStream writer, int position) throws IOException { if (position == NODE_AFTER_DOCUMENT_ELEMENT) { writer.write('\n'); } writer.write(_BEGIN_PI); final String target = currentPI.getTarget(); int length = target.length(); for (int i = 0; i < length; i++) { char c = target.charAt(i); if (c == 0x0D) { writer.write(__XD_); } else { if (c < 0x80) { writer.write(c); } else { UtfHelper.writeCharToUtf8(c, writer); } ; } } final String data = currentPI.getData(); length = data.length(); if (length > 0) { writer.write(' '); for (int i = 0; i < length; i++) { char c = data.charAt(i); if (c == 0x0D) { writer.write(__XD_); } else { UtfHelper.writeCharToUtf8(c, writer); } } } writer.write(_END_PI); if (position == NODE_BEFORE_DOCUMENT_ELEMENT) { writer.write('\n'); } } /** * Method outputCommentToWriter * * @param currentComment * @param writer writer where to write the things * @throws IOException */ static final void outputCommentToWriter(Comment currentComment, OutputStream writer, int position) throws IOException { if (position == NODE_AFTER_DOCUMENT_ELEMENT) { writer.write('\n'); } writer.write(_BEGIN_COMM); final String data = currentComment.getData(); final int length = data.length(); for (int i = 0; i < length; i++) { char c = data.charAt(i); if (c == 0x0D) { writer.write(__XD_); } else { if (c < 0x80) { writer.write(c); } else { UtfHelper.writeCharToUtf8(c, writer); } ; } } writer.write(_END_COMM); if (position == NODE_BEFORE_DOCUMENT_ELEMENT) { writer.write('\n'); } } /** * Outputs a Text of CDATA section to the internal Writer. * * @param text * @param writer writer where to write the things * @throws IOException */ static final void outputTextToWriter(final String text, final OutputStream writer) throws IOException { final int length = text.length(); byte []toWrite; for (int i = 0; i < length; i++) { char c = text.charAt(i); switch (c) { case '&' : toWrite = _AMP_; break; case '<' : toWrite = _LT_; break; case '>' : toWrite = _GT_; break; case 0xD : toWrite = __XD_; break; default : if (c < 0x80) { writer.write(c); } else { UtfHelper.writeCharToUtf8(c, writer); } ; continue; } writer.write(toWrite); } } } axiom-1.2.8/modules/axiom-c14n/src/main/java/org/apache/axiom/c14n/impl/NameSpaceSymbTable.java0000644000000000000000000003024411131637462030465 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.c14n.impl; import org.apache.axiom.c14n.omwrapper.interfaces.Attr; import org.apache.axiom.c14n.omwrapper.interfaces.Node; import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; import java.util.List; /** * A stack based Symble Table. *
For speed reasons all the symbols are introduced in the same map, * and at the same time in a list so it can be removed when the frame is pop back. * * @author Raul Benito * * modified to work with Axiom wrapper by Saliya Ekanayake (esaliya@gmail.com) */ public class NameSpaceSymbTable { /** * The map betwen prefix-> entry table. */ SymbMap symb; /** * The level of nameSpaces (for Inclusive visibility). */ int nameSpaces = 0; /** * The stacks for removing the definitions when doing pop. */ List level; boolean cloned = true; static final String XMLNS = "xmlns"; final static SymbMap initialMap = new SymbMap(); static { NameSpaceSymbEntry ne = new NameSpaceSymbEntry("", null, true, XMLNS); ne.lastrendered = ""; initialMap.put(XMLNS, ne); } /** * Default constractor */ public NameSpaceSymbTable() { level = new ArrayList(10); //Insert the default binding for xmlns. symb = (SymbMap) initialMap.clone(); } /** * Get all the unrendered nodes in the name space. * For Inclusive rendering * * @param result the list where to fill the unrendered xmlns definitions. */ public void getUnrenderedNodes(Collection result) { //List result=new ArrayList(); Iterator it = symb.entrySet().iterator(); while (it.hasNext()) { NameSpaceSymbEntry n = (NameSpaceSymbEntry) (it.next()); //put them rendered? if ((!n.rendered) && (n.n != null)) { n = (NameSpaceSymbEntry) n.clone(); needsClone(); symb.put(n.prefix, n); n.lastrendered = n.uri; n.rendered = true; result.add(n.n); } } } /** * Push a frame for visible namespace. * For Inclusive rendering. */ public void outputNodePush() { nameSpaces++; push(); } /** * Pop a frame for visible namespace. */ public void outputNodePop() { nameSpaces--; pop(); } /** * Push a frame for a node. * Inclusive or Exclusive. */ public void push() { //Put the number of namespace definitions in the stack. level.add(null); cloned = false; } /** * Pop a frame. * Inclusive or Exclusive. */ public void pop() { int size = level.size() - 1; Object ob = level.remove(size); if (ob != null) { symb = (SymbMap) ob; if (size == 0) { cloned = false; } else cloned = (level.get(size - 1) != symb); } else { cloned = false; } } final void needsClone() { if (!cloned) { level.set(level.size() - 1, symb); symb = (SymbMap) symb.clone(); cloned = true; } } /** * Gets the attribute node that defines the binding for the prefix. * * @param prefix the prefix to obtain the attribute. * @return null if there is no need to render the prefix. Otherwise the node of * definition. */ public Attr getMapping(String prefix) { NameSpaceSymbEntry entry = symb.get(prefix); if (entry == null) { //There is no definition for the prefix(a bug?). return null; } if (entry.rendered) { //No need to render an entry already rendered. return null; } // Mark this entry as render. entry = (NameSpaceSymbEntry) entry.clone(); needsClone(); symb.put(prefix, entry); entry.rendered = true; entry.level = nameSpaces; entry.lastrendered = entry.uri; // Return the node for outputing. return entry.n; } /** * Gets a definition without mark it as render. * For render in exclusive main.java.org.apache.axiom.c14n.impl the namespaces in the include prefixes. * * @param prefix The prefix whose definition is neaded. * @return the attr to render, null if there is no need to render */ public Attr getMappingWithoutRendered(String prefix) { NameSpaceSymbEntry entry = symb.get(prefix); if (entry == null) { return null; } if (entry.rendered) { return null; } return entry.n; } /** * Adds the mapping for a prefix. * * @param prefix the prefix of definition * @param uri the Uri of the definition * @param n the attribute that have the definition * @return true if there is already defined. */ public boolean addMapping(String prefix, String uri, Attr n) { NameSpaceSymbEntry ob = symb.get(prefix); if ((ob != null) && uri.equals(ob.uri)) { //If we have it previously defined. Don't keep working. return false; } //Creates and entry in the table for this new definition. NameSpaceSymbEntry ne = new NameSpaceSymbEntry(uri, n, false, prefix); needsClone(); symb.put(prefix, ne); if (ob != null) { //We have a previous definition store it for the pop. //Check if a previous definition(not the inmidiatly one) has been rendered. ne.lastrendered = ob.lastrendered; if ((ob.lastrendered != null) && (ob.lastrendered.equals(uri))) { //Yes it is. Mark as rendered. ne.rendered = true; } } return true; } /** * Adds a definition and mark it as render. * For inclusive main.java.org.apache.axiom.c14n.impl. * * @param prefix the prefix of definition * @param uri the Uri of the definition * @param n the attribute that have the definition * @return the attr to render, null if there is no need to render */ public Node addMappingAndRender(String prefix, String uri, Attr n) { NameSpaceSymbEntry ob = symb.get(prefix); if ((ob != null) && uri.equals(ob.uri)) { if (!ob.rendered) { ob = (NameSpaceSymbEntry) ob.clone(); needsClone(); symb.put(prefix, ob); ob.lastrendered = uri; ob.rendered = true; return ob.n; } return null; } NameSpaceSymbEntry ne = new NameSpaceSymbEntry(uri, n, true, prefix); ne.lastrendered = uri; needsClone(); symb.put(prefix, ne); if (ob != null) { if ((ob.lastrendered != null) && (ob.lastrendered.equals(uri))) { ne.rendered = true; return null; } } return ne.n; } public int getLevel() { // Auto-generated method stub return level.size(); } public void removeMapping(String prefix) { NameSpaceSymbEntry ob = symb.get(prefix); if (ob != null) { needsClone(); symb.put(prefix, null); } } public void removeMappingIfNotRender(String prefix) { NameSpaceSymbEntry ob = symb.get(prefix); if (ob != null && !ob.rendered) { needsClone(); symb.put(prefix, null); } } public boolean removeMappingIfRender(String prefix) { NameSpaceSymbEntry ob = symb.get(prefix); if (ob != null && ob.rendered) { needsClone(); symb.put(prefix, null); } return false; } } /** * The internal structure of NameSpaceSymbTable. */ class NameSpaceSymbEntry implements Cloneable { NameSpaceSymbEntry(String name, Attr n, boolean rendered, String prefix) { this.uri = name; this.rendered = rendered; this.n = n; this.prefix = prefix; } /** * @inheritDoc */ public Object clone() { try { return super.clone(); } catch (CloneNotSupportedException e) { return null; } } /** * The level where the definition was rendered(Only for inclusive) */ int level = 0; String prefix; /** * The URI that the prefix defines */ String uri; /** * The last output in the URI for this prefix (This for speed reason). */ String lastrendered = null; /** * This prefix-URI has been already render or not. */ boolean rendered = false; /** * The attribute to include. */ Attr n; }; class SymbMap implements Cloneable { int free = 23; NameSpaceSymbEntry[] entries; String[] keys; SymbMap() { entries = new NameSpaceSymbEntry[free]; keys = new String[free]; } void put(String key, NameSpaceSymbEntry value) { int index = index(key); Object oldKey = keys[index]; keys[index] = key; entries[index] = value; if (oldKey == null || !oldKey.equals(key)) { if (--free == 0) { free = entries.length; int newCapacity = free << 2; rehash(newCapacity); } } } List entrySet() { List a = new ArrayList(); for (int i = 0; i < entries.length; i++) { if ((entries[i] != null) && !("".equals(entries[i].uri))) { a.add(entries[i]); } } return a; } protected int index(Object obj) { Object[] set = keys; int length = set.length; //abs of index int index = (obj.hashCode() & 0x7fffffff) % length; Object cur = set[index]; if (cur == null || (cur.equals(obj))) { return index; } length = length - 1; do { index = index == length ? 0 : ++index; cur = set[index]; } while (cur != null && (!cur.equals(obj))); return index; } /** * rehashes the map to the new capacity. * * @param newCapacity an int value */ protected void rehash(int newCapacity) { int oldCapacity = keys.length; String oldKeys[] = keys; NameSpaceSymbEntry oldVals[] = entries; keys = new String[newCapacity]; entries = new NameSpaceSymbEntry[newCapacity]; for (int i = oldCapacity; i-- > 0;) { if (oldKeys[i] != null) { String o = oldKeys[i]; int index = index(o); keys[index] = o; entries[index] = oldVals[i]; } } } NameSpaceSymbEntry get(String key) { return entries[index(key)]; } protected Object clone() { try { SymbMap copy = (SymbMap) super.clone(); copy.entries = new NameSpaceSymbEntry[entries.length]; System.arraycopy(entries, 0, copy.entries, 0, entries.length); copy.keys = new String[keys.length]; System.arraycopy(keys, 0, copy.keys, 0, keys.length); return copy; } catch (CloneNotSupportedException e) { // Auto-generated catch block e.printStackTrace(); } return null; } } ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootaxiom-1.2.8/modules/axiom-c14n/src/main/java/org/apache/axiom/c14n/impl/Canonicalizer20010315OmitComments.javaaxiom-1.2.8/modules/axiom-c14n/src/main/java/org/apache/axiom/c14n/impl/Canonicalizer20010315OmitCom0000644000000000000000000000275411131637462031000 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.c14n.impl; import org.apache.axiom.c14n.Canonicalizer; /** * @author Christian Geuer-Pollmann * * modified to work with Axiom wrapper by Saliya Ekanayake (esaliya@gmail.com) */ public class Canonicalizer20010315OmitComments extends Canonicalizer20010315 { /** * Constructor Canonicalizer20010315OmitComments */ public Canonicalizer20010315OmitComments() { super(false); } /** * @inheritDoc */ public final String engineGetURI() { return Canonicalizer.ALGO_ID_C14N_OMIT_COMMENTS; } /** * @inheritDoc */ public final boolean engineGetIncludeComments() { return false; } } ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootaxiom-1.2.8/modules/axiom-c14n/src/main/java/org/apache/axiom/c14n/impl/Canonicalizer20010315Excl.javaaxiom-1.2.8/modules/axiom-c14n/src/main/java/org/apache/axiom/c14n/impl/Canonicalizer20010315Excl.ja0000644000000000000000000001602111131637462030705 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.c14n.impl; import org.apache.axiom.c14n.exceptions.CanonicalizationException; import org.apache.axiom.c14n.helpers.C14nHelper; import org.apache.axiom.c14n.omwrapper.interfaces.Attr; import org.apache.axiom.c14n.omwrapper.interfaces.Element; import org.apache.axiom.c14n.omwrapper.interfaces.NamedNodeMap; import org.apache.axiom.c14n.omwrapper.interfaces.Node; import org.apache.axiom.c14n.utils.Constants; import java.util.Iterator; import java.util.SortedSet; import java.util.StringTokenizer; import java.util.TreeSet; /** * @author Christian Geuer-Pollmann * * modified to work with Axiom wrapper by Saliya Ekanayake (esaliya@gmail.com) */ public abstract class Canonicalizer20010315Excl extends CanonicalizerBase { /** * This Set contains the names (Strings like "xmlns" or "xmlns:foo") of * the inclusive namespaces. */ TreeSet _inclusiveNSSet = new TreeSet(); static final String XMLNS_URI = Constants.NamespaceSpecNS; final SortedSet result = new TreeSet(COMPARE); /** * Constructor Canonicalizer20010315Excl * * @param includeComments */ public Canonicalizer20010315Excl(boolean includeComments) { super(includeComments); } /** * Method engineCanonicalizeSubTree * * @param rootNode * @throws org.apache.axiom.c14n.exceptions.CanonicalizationException * * @inheritDoc */ public byte[] engineCanonicalizeSubTree(Node rootNode) throws CanonicalizationException { return this.engineCanonicalizeSubTree(rootNode, "", null); } /** * Method engineCanonicalizeSubTree * * @param rootNode * @param inclusiveNamespaces * @throws CanonicalizationException * @inheritDoc */ public byte[] engineCanonicalizeSubTree(Node rootNode, String inclusiveNamespaces) throws CanonicalizationException { return this.engineCanonicalizeSubTree(rootNode, inclusiveNamespaces, null); } /** * Method engineCanonicalizeSubTree * * @param rootNode * @param inclusiveNamespaces * @param excl A element to exclude from the org.apache.axiom.c14n.impl process. * @return the rootNode org.apache.axiom.c14n.impl. * @throws CanonicalizationException */ public byte[] engineCanonicalizeSubTree(Node rootNode, String inclusiveNamespaces, Node excl) throws CanonicalizationException { this._inclusiveNSSet = (TreeSet) prefixStr2Set(inclusiveNamespaces); return super.engineCanonicalizeSubTree(rootNode, excl); } /** * Method handleAttributesSubtree * * @param E * @throws CanonicalizationException * @inheritDoc */ Iterator handleAttributesSubtree(Element E, NameSpaceSymbTable ns) throws CanonicalizationException { SortedSet result = this.result; result.clear(); NamedNodeMap attrs = null; int attrsLength = 0; if (E.hasAttributes()) { attrs = E.getAttributes(); attrsLength = attrs.getLength(); } //The prefix visibly utilized(in the attribute or in the name) in the element SortedSet visiblyUtilized = (SortedSet) _inclusiveNSSet.clone(); for (int i = 0; i < attrsLength; i++) { Attr N = (Attr) attrs.item(i); if (XMLNS_URI != N.getNamespaceURI()) { //Not a namespace definition. //The Element is output element, add his prefix(if used) to visibyUtilized String prefix = N.getPrefix(); if ((prefix != null) && (!prefix.equals(XML) && !prefix.equals(XMLNS))) { visiblyUtilized.add(prefix); } //Add to the result. result.add(N); continue; } String NName = N.getLocalName(); String NNodeValue = N.getNodeValue(); if (ns.addMapping(NName, NNodeValue, N)) { //New definition check if it is relative. if (C14nHelper.namespaceIsRelative(NNodeValue)) { Object exArgs[] = {E.getTagName(), NName, N.getNodeValue()}; throw new CanonicalizationException( "c14n.Canonicalizer.RelativeNamespace", exArgs); } } } String prefix; if (E.getNamespaceURI() != null) { prefix = E.getPrefix(); if ((prefix == null) || (prefix.length() == 0)) { prefix = XMLNS; } } else { prefix = XMLNS; } visiblyUtilized.add(prefix); Iterator it = visiblyUtilized.iterator(); while (it.hasNext()) { String s = (String) it.next(); Attr key = ns.getMapping(s); if (key == null) { continue; } result.add(key); } return result.iterator(); } /** * Decodes the inclusiveNamespaces String and returns all * selected namespace prefixes as a Set. The #default * namespace token is represented as an empty namespace prefix * ("xmlns"). *
* The String inclusiveNamespaces=" xenc ds #default" * is returned as a Set containing the following Strings: *
    *
  • xmlns
  • *
  • xenc
  • *
  • ds
  • *
* * @param inclusiveNamespaces * @return A set to string */ public static SortedSet prefixStr2Set(String inclusiveNamespaces) { SortedSet prefixes = new TreeSet(); if ((inclusiveNamespaces == null) || (inclusiveNamespaces.length() == 0)) { return prefixes; } StringTokenizer st = new StringTokenizer(inclusiveNamespaces, " \t\r\n"); while (st.hasMoreTokens()) { String prefix = st.nextToken(); if (prefix.equals("#default")) { prefixes.add("xmlns"); } else { prefixes.add(prefix); } } return prefixes; } } axiom-1.2.8/modules/axiom-c14n/src/main/java/org/apache/axiom/c14n/impl/UtfHelper.java0000644000000000000000000001173711131637462026732 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.c14n.impl; import java.io.IOException; import java.io.OutputStream; import java.util.Map; public class UtfHelper { final static void writeByte(final String str, final OutputStream out, Map cache) throws IOException { byte []result = (byte[]) cache.get(str); if (result == null) { result = getStringInUtf8(str); cache.put(str, result); } out.write(result); } final static void writeCharToUtf8(final char c, final OutputStream out) throws IOException { if (c < 0x80) { out.write(c); return; } if ((c >= 0xD800 && c <= 0xDBFF) || (c >= 0xDC00 && c <= 0xDFFF)) { //No Surrogates in sun java out.write(0x3f); return; } int bias; int write; char ch; if (c > 0x07FF) { ch = (char) (c >>> 12); write = 0xE0; if (ch > 0) { write |= (ch & 0x0F); } out.write(write); write = 0x80; bias = 0x3F; } else { write = 0xC0; bias = 0x1F; } ch = (char) (c >>> 6); if (ch > 0) { write |= (ch & bias); } out.write(write); out.write(0x80 | ((c) & 0x3F)); } final static void writeStringToUtf8(final String str, final OutputStream out) throws IOException { final int length = str.length(); int i = 0; char c; while (i < length) { c = str.charAt(i++); if (c < 0x80) { out.write(c); continue; } if ((c >= 0xD800 && c <= 0xDBFF) || (c >= 0xDC00 && c <= 0xDFFF)) { //No Surrogates in sun java out.write(0x3f); continue; } char ch; int bias; int write; if (c > 0x07FF) { ch = (char) (c >>> 12); write = 0xE0; if (ch > 0) { write |= (ch & 0x0F); } out.write(write); write = 0x80; bias = 0x3F; } else { write = 0xC0; bias = 0x1F; } ch = (char) (c >>> 6); if (ch > 0) { write |= (ch & bias); } out.write(write); out.write(0x80 | ((c) & 0x3F)); } } public final static byte[] getStringInUtf8(final String str) { final int length = str.length(); boolean expanded = false; byte []result = new byte[length]; int i = 0; int out = 0; char c; while (i < length) { c = str.charAt(i++); if (c < 0x80) { result[out++] = (byte) c; continue; } if ((c >= 0xD800 && c <= 0xDBFF) || (c >= 0xDC00 && c <= 0xDFFF)) { //No Surrogates in sun java result[out++] = 0x3f; continue; } if (!expanded) { byte newResult[] = new byte[3 * length]; System.arraycopy(result, 0, newResult, 0, out); result = newResult; expanded = true; } char ch; int bias; byte write; if (c > 0x07FF) { ch = (char) (c >>> 12); write = (byte) 0xE0; if (ch > 0) { write |= (ch & 0x0F); } result[out++] = write; write = (byte) 0x80; bias = 0x3F; } else { write = (byte) 0xC0; bias = 0x1F; } ch = (char) (c >>> 6); if (ch > 0) { write |= (ch & bias); } result[out++] = write; result[out++] = (byte) (0x80 | ((c) & 0x3F));/**/ } if (expanded) { byte newResult[] = new byte[out]; System.arraycopy(result, 0, newResult, 0, out); result = newResult; } return result; } } axiom-1.2.8/modules/axiom-c14n/src/main/java/org/apache/axiom/c14n/impl/Canonicalizer20010315.java0000644000000000000000000001724511131637462030431 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.c14n.impl; import org.apache.axiom.c14n.exceptions.CanonicalizationException; import org.apache.axiom.c14n.helpers.C14nHelper; import org.apache.axiom.c14n.omwrapper.interfaces.Attr; import org.apache.axiom.c14n.omwrapper.interfaces.Element; import org.apache.axiom.c14n.omwrapper.interfaces.NamedNodeMap; import org.apache.axiom.c14n.omwrapper.interfaces.Node; import org.apache.axiom.c14n.utils.Constants; import java.util.*; /** * @author Christian Geuer-Pollmann * * modified to work with Axiom wrapper by Saliya Ekanayake (esaliya@gmail.com) */ public abstract class Canonicalizer20010315 extends CanonicalizerBase { boolean firstCall = true; final SortedSet result = new TreeSet(COMPARE); static final String XMLNS_URI = Constants.NamespaceSpecNS; static final String XML_LANG_URI = Constants.XML_LANG_SPACE_SpecNS; static class XmlAttrStack { int currentLevel = 0; int lastlevel = 0; XmlsStackElement cur; static class XmlsStackElement { int level; boolean rendered = false; List nodes = new ArrayList(); } ; List levels = new ArrayList(); void push(int level) { currentLevel = level; if (currentLevel == -1) return; cur = null; while (lastlevel > currentLevel) { levels.remove(levels.size() - 1); if (levels.size() == 0) { lastlevel = 0; return; } lastlevel = ((XmlsStackElement) levels.get(levels.size() - 1)).level; } } void addXmlnsAttr(Attr n) { if (cur == null) { cur = new XmlsStackElement(); cur.level = currentLevel; levels.add(cur); lastlevel = currentLevel; } cur.nodes.add(n); } void getXmlnsAttr(Collection col) { int size = levels.size() - 1; if (cur == null) { cur = new XmlsStackElement(); cur.level = currentLevel; lastlevel = currentLevel; levels.add(cur); } boolean parentRendered = false; XmlsStackElement e = null; if (size == -1) { parentRendered = true; } else { e = (XmlsStackElement) levels.get(size); if (e.rendered && e.level + 1 == currentLevel) parentRendered = true; } if (parentRendered) { col.addAll(cur.nodes); cur.rendered = true; return; } Map loa = new HashMap(); for (; size >= 0; size--) { e = (XmlsStackElement) levels.get(size); Iterator it = e.nodes.iterator(); while (it.hasNext()) { Attr n = (Attr) it.next(); if (!loa.containsKey(n.getName())) loa.put(n.getName(), n); } } ; cur.rendered = true; col.addAll(loa.values()); } } XmlAttrStack xmlattrStack = new XmlAttrStack(); /** * Constructor Canonicalizer20010315 * * @param includeComments */ public Canonicalizer20010315(boolean includeComments) { super(includeComments); } /** * @param E * @param ns * @return the Attr[]s to be outputted * @throws CanonicalizationException */ Iterator handleAttributesSubtree(Element E, NameSpaceSymbTable ns) throws CanonicalizationException { if (!E.hasAttributes() && !firstCall) { return null; } // result will contain the attrs which have to be outputted final SortedSet result = this.result; result.clear(); NamedNodeMap attrs = E.getAttributes(); int attrsLength = attrs.getLength(); for (int i = 0; i < attrsLength; i++) { Attr N = (Attr) attrs.item(i); String NUri = N.getNamespaceURI(); if (XMLNS_URI != NUri) { //It's not a namespace attr node. Add to the result and continue. result.add(N); continue; } String NName = N.getLocalName(); String NValue = N.getValue(); if (XML.equals(NName) && XML_LANG_URI.equals(NValue)) { //The default mapping for xml must not be output. continue; } Node n = ns.addMappingAndRender(NName, NValue, N); if (n != null) { //Render the ns definition result.add(n); if (C14nHelper.namespaceIsRelative(N)) { Object exArgs[] = {E.getTagName(), NName, N.getNodeValue()}; throw new CanonicalizationException( "c14n.Canonicalizer.RelativeNamespace", exArgs); } } } if (firstCall) { //It is the first node of the subtree //Obtain all the namespaces defined in the parents, and added to the output. ns.getUnrenderedNodes(result); //output the attributes in the xml namespace. xmlattrStack.getXmlnsAttr(result); firstCall = false; } return result.iterator(); } /** * Always throws a CanonicalizationException because this is inclusive org.apache.axiom.c14n.impl. * * @param rootNode * @param inclusiveNamespaces * @return none it always fails * @throws org.apache.axiom.c14n.exceptions.CanonicalizationException * */ public byte[] engineCanonicalizeSubTree(Node rootNode, String inclusiveNamespaces) throws CanonicalizationException { throw new CanonicalizationException("All Namespaces are Included by Default"); } void handleParent(Element e, NameSpaceSymbTable ns) { if (!e.hasAttributes()) { return; } xmlattrStack.push(-1); NamedNodeMap attrs = e.getAttributes(); int attrsLength = attrs.getLength(); for (int i = 0; i < attrsLength; i++) { Attr N = (Attr) attrs.item(i); if (Constants.NamespaceSpecNS != N.getNamespaceURI()) { //Not a namespace definition, ignore. if (XML_LANG_URI == N.getNamespaceURI()) { xmlattrStack.addXmlnsAttr(N); } continue; } String NName = N.getLocalName(); String NValue = N.getNodeValue(); if (XML.equals(NName) && Constants.XML_LANG_SPACE_SpecNS.equals(NValue)) { continue; } ns.addMapping(NName, NValue, N); } } } ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootaxiom-1.2.8/modules/axiom-c14n/src/main/java/org/apache/axiom/c14n/impl/Canonicalizer20010315WithComments.javaaxiom-1.2.8/modules/axiom-c14n/src/main/java/org/apache/axiom/c14n/impl/Canonicalizer20010315WithCom0000644000000000000000000000275311131637462031002 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.c14n.impl; import org.apache.axiom.c14n.Canonicalizer; /** * @author Christian Geuer-Pollmann * * modified to work with Axiom wrapper by Saliya Ekanayake (esaliya@gmail.com) */ public class Canonicalizer20010315WithComments extends Canonicalizer20010315 { /** * Constructor Canonicalizer20010315WithComments */ public Canonicalizer20010315WithComments() { super(true); } /** * @inheritDoc */ public final String engineGetURI() { return Canonicalizer.ALGO_ID_C14N_WITH_COMMENTS; } /** * @inheritDoc */ public final boolean engineGetIncludeComments() { return true; } } ././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootaxiom-1.2.8/modules/axiom-c14n/src/main/java/org/apache/axiom/c14n/impl/Canonicalizer20010315ExclWithComments.javaaxiom-1.2.8/modules/axiom-c14n/src/main/java/org/apache/axiom/c14n/impl/Canonicalizer20010315ExclWit0000644000000000000000000000270611131637462031005 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.c14n.impl; import org.apache.axiom.c14n.Canonicalizer; public class Canonicalizer20010315ExclWithComments extends Canonicalizer20010315Excl { //public class Canonicalizer20010315ExclWithComments extends Canonicalizer20010315Excl { /** * Constructor Canonicalizer20010315ExclWithComments */ public Canonicalizer20010315ExclWithComments() { super(true); } /** * @inheritDoc */ public final String engineGetURI() { return Canonicalizer.ALGO_ID_C14N_EXCL_WITH_COMMENTS; } /** * @inheritDoc */ public final boolean engineGetIncludeComments() { return true; } } axiom-1.2.8/modules/axiom-c14n/src/main/java/org/apache/axiom/c14n/helpers/0000755000000000000000000000000011131637462024661 5ustar rootrootaxiom-1.2.8/modules/axiom-c14n/src/main/java/org/apache/axiom/c14n/helpers/AttrCompare.java0000644000000000000000000001102511131637462027744 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.c14n.helpers; import org.apache.axiom.c14n.omwrapper.interfaces.Attr; import org.apache.axiom.c14n.utils.Constants; import java.io.Serializable; import java.util.Comparator; /** * Compares two attributes based on the C14n specification. *

*

    *
  • Namespace nodes have a lesser document order position than attribute * nodes. *
  • An element's namespace nodes are sorted lexicographically by * local name (the default namespace node, if one exists, has no * local name and is therefore lexicographically least). *
  • An element's attribute nodes are sorted lexicographically with * namespace URI as the primary key and local name as the secondary * key (an empty namespace URI is lexicographically least). *
* * @author Christian Geuer-Pollmann * * modified to work with Axiom wrapper by Saliya Ekanayake (esaliya@gmail.com) */ public class AttrCompare implements Comparator, Serializable { private final static long serialVersionUID = -7113259629930576230L; private final static int ATTR0_BEFORE_ATTR1 = -1; private final static int ATTR1_BEFORE_ATTR0 = 1; private final static String XMLNS = Constants.NamespaceSpecNS; /** * Compares two attributes based on the C14n specification. *

*

    *
  • Namespace nodes have a lesser document order position than * attribute nodes. *
  • An element's namespace nodes are sorted lexicographically by * local name (the default namespace node, if one exists, has no * local name and is therefore lexicographically least). *
  • An element's attribute nodes are sorted lexicographically with * namespace URI as the primary key and local name as the secondary * key (an empty namespace URI is lexicographically least). *
* * @param obj0 casted org.apache.axiom.c14n.omwrapper.interfaces.Attr * @param obj1 casted org.apache.axiom.c14n.omwrapper.interfaces.Attr * @return returns a negative integer, zero, or a positive integer as * obj0 is less than, equal to, or greater than obj1 */ public int compare(Object obj0, Object obj1) { Attr attr0 = (Attr) obj0; Attr attr1 = (Attr) obj1; String namespaceURI0 = attr0.getNamespaceURI(); String namespaceURI1 = attr1.getNamespaceURI(); boolean isNamespaceAttr0 = XMLNS == namespaceURI0; boolean isNamespaceAttr1 = XMLNS == namespaceURI1; if (isNamespaceAttr0) { if (isNamespaceAttr1) { // both are namespaces String localname0 = attr0.getLocalName(); String localname1 = attr1.getLocalName(); if (localname0.equals("xmlns")) { localname0 = ""; } if (localname1.equals("xmlns")) { localname1 = ""; } return localname0.compareTo(localname1); } // attr0 is a namespace, attr1 is not return ATTR0_BEFORE_ATTR1; } if (isNamespaceAttr1) { // attr1 is a namespace, attr0 is not return ATTR1_BEFORE_ATTR0; } // none is a namespace if (namespaceURI0 == null) { if (namespaceURI1 == null) { String name0 = attr0.getName(); String name1 = attr1.getName(); return name0.compareTo(name1); } return ATTR0_BEFORE_ATTR1; } if (namespaceURI1 == null) { return ATTR1_BEFORE_ATTR0; } int a = namespaceURI0.compareTo(namespaceURI1); if (a != 0) { return a; } return (attr0.getLocalName()).compareTo(attr1.getLocalName()); } } axiom-1.2.8/modules/axiom-c14n/src/main/java/org/apache/axiom/c14n/helpers/C14nHelper.java0000644000000000000000000001040311131637462027367 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.c14n.helpers; import org.apache.axiom.c14n.exceptions.CanonicalizationException; import org.apache.axiom.c14n.omwrapper.interfaces.Attr; import org.apache.axiom.c14n.omwrapper.interfaces.Element; import org.apache.axiom.c14n.omwrapper.interfaces.NamedNodeMap; /** * @author Christian Geuer-Pollmann * * modified to work with Axiom wrapper by Saliya Ekanayake (esaliya@gmail.com) */ public class C14nHelper { /** * Constructor C14nHelper */ private C14nHelper() { // don't allow instantiation } /** * Method namespaceIsRelative * * @param namespace * @return true if the given namespace is relative. */ public static boolean namespaceIsRelative(Attr namespace) { return !namespaceIsAbsolute(namespace); } /** * Method namespaceIsRelative * * @param namespaceValue * @return true if the given namespace is relative. */ public static boolean namespaceIsRelative(String namespaceValue) { return !namespaceIsAbsolute(namespaceValue); } /** * Method namespaceIsAbsolute * * @param namespace * @return true if the given namespace is absolute. */ public static boolean namespaceIsAbsolute(Attr namespace) { return namespaceIsAbsolute(namespace.getValue()); } /** * Method namespaceIsAbsolute * * @param namespaceValue * @return true if the given namespace is absolute. */ public static boolean namespaceIsAbsolute(String namespaceValue) { // assume empty namespaces are absolute if (namespaceValue.length() == 0) { return true; } return namespaceValue.indexOf(':') > 0; } /** * This method throws an exception if the Attribute value contains * a relative URI. * * @param attr * @throws org.apache.axiom.c14n.exceptions.CanonicalizationException */ public static void assertNotRelativeNS(Attr attr) throws CanonicalizationException { if (attr == null) { return; } String nodeAttrName = attr.getNodeName(); boolean definesDefaultNS = nodeAttrName.equals("xmlns"); boolean definesNonDefaultNS = nodeAttrName.startsWith("xmlns:"); if (definesDefaultNS || definesNonDefaultNS) { if (namespaceIsRelative(attr)) { String parentName = attr.getOwnerElement().getTagName(); String attrValue = attr.getValue(); Object exArgs[] = {parentName, nodeAttrName, attrValue}; throw new CanonicalizationException( "c14n.Canonicalizer.RelativeNamespace", exArgs); } } } /** * This method throws a CanonicalizationException if the supplied Element * contains any relative namespaces. * * @param ctxNode * @throws CanonicalizationException * @see C14nHelper#assertNotRelativeNS(Attr) */ public static void checkForRelativeNamespace(Element ctxNode) throws CanonicalizationException { if (ctxNode != null) { NamedNodeMap attributes = ctxNode.getAttributes(); for (int i = 0; i < attributes.getLength(); i++) { C14nHelper.assertNotRelativeNS((Attr) attributes.item(i)); } } else { throw new CanonicalizationException( "Called checkForRelativeNamespace() on null"); } } } axiom-1.2.8/modules/axiom-c14n/src/main/java/org/apache/axiom/c14n/exceptions/0000755000000000000000000000000011131637462025400 5ustar rootrootaxiom-1.2.8/modules/axiom-c14n/src/main/java/org/apache/axiom/c14n/exceptions/C14NException.java0000644000000000000000000000723311131637462030574 0ustar rootroot /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.c14n.exceptions; import org.apache.axiom.c14n.utils.PropLoader; import java.io.PrintStream; import java.io.PrintWriter; import java.text.MessageFormat; /** * class C14NException is the base class of all the exception classes * used in org.apache.axiom.c14n * * @author Saliya Ekanayake (esaliya@gmail.com) */ public class C14NException extends Exception { public static final String baseName = "exceptions"; protected Exception e = null; protected String msgID; public C14NException() { super("Missing message ID"); this.e = null; this.msgID = null; } public C14NException(String msgID) { super(PropLoader.getExceptionProperty(msgID, baseName)); this.e = null; this.msgID = msgID; } public C14NException(String msgID, Object[] exArgs) { super(MessageFormat.format( PropLoader.getExceptionProperty(msgID, baseName), exArgs)); this.e = null; this.msgID = msgID; } public C14NException(Exception e) { super(e.getMessage()); this.e = e; this.msgID = null; } public C14NException(String msgID, Exception e) { super(MessageFormat.format( PropLoader.getExceptionProperty(msgID, baseName), new Object[]{e.getMessage()})); this.e = e; this.msgID = msgID; } public C14NException(String msgID, Object [] exArgs, Exception e) { super(MessageFormat.format( PropLoader.getExceptionProperty(msgID, baseName), exArgs)); this.e = e; this.msgID = msgID; } public String getMsgID() { if (msgID == null) { return "Missing message ID"; } return msgID; } /** * @inheritDoc */ public String toString() { String s = this.getClass().getName(); String message = super.getLocalizedMessage(); if (message != null) { message = s + ": " + message; } else { message = s; } if (e != null) { message = message + "\nOriginal Exception was " + e.toString(); } return message; } public void printStackTrace() { synchronized (System.err) { super.printStackTrace(System.err); if (this.e != null) { this.e.printStackTrace(System.err); } } } public void printStackTrace(PrintWriter printwriter) { super.printStackTrace(printwriter); if (this.e != null) { this.e.printStackTrace(printwriter); } } public void printStackTrace(PrintStream printstream) { super.printStackTrace(printstream); if (this.e != null) { this.e.printStackTrace(printstream); } } public Exception getOriginalException() { return e; } } ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootaxiom-1.2.8/modules/axiom-c14n/src/main/java/org/apache/axiom/c14n/exceptions/CanonicalizationException.javaaxiom-1.2.8/modules/axiom-c14n/src/main/java/org/apache/axiom/c14n/exceptions/CanonicalizationExcept0000644000000000000000000000276111131637462031767 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.c14n.exceptions; /** * class CanonicalizationException * * @author Saliya Ekanayake (esaliya@gmail.com) */ public class CanonicalizationException extends C14NException{ public CanonicalizationException() { } public CanonicalizationException(String msg){ super(msg); } public CanonicalizationException(String msg, Object[] exArgs){ super(msg, exArgs); } public CanonicalizationException(Exception e) { super(e); } public CanonicalizationException(String msg, Exception e) { super(msg, e); } public CanonicalizationException(String msg, Object [] exArgs, Exception e) { super(msg, exArgs, e); } } ././@LongLink0000000000000000000000000000016700000000000011571 Lustar rootrootaxiom-1.2.8/modules/axiom-c14n/src/main/java/org/apache/axiom/c14n/exceptions/AlgorithmAlreadyRegisteredException.javaaxiom-1.2.8/modules/axiom-c14n/src/main/java/org/apache/axiom/c14n/exceptions/AlgorithmAlreadyRegist0000644000000000000000000000310111131637462031724 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.c14n.exceptions; /** * class AlgorithmAlreadyRegisteredException * * @author Saliya Ekanayake (esaliya@gmail.com) */ public class AlgorithmAlreadyRegisteredException extends C14NException{ public AlgorithmAlreadyRegisteredException() { } public AlgorithmAlreadyRegisteredException(String msg){ super(msg); } public AlgorithmAlreadyRegisteredException(String msg, Object[] exArgs){ super(msg, exArgs); } public AlgorithmAlreadyRegisteredException(Exception e) { super(e); } public AlgorithmAlreadyRegisteredException(String msg, Exception e) { super(msg, e); } public AlgorithmAlreadyRegisteredException(String msg, Object [] exArgs, Exception e) { super(msg, exArgs, e); } } ././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootaxiom-1.2.8/modules/axiom-c14n/src/main/java/org/apache/axiom/c14n/exceptions/InvalidCanonicalizerException.javaaxiom-1.2.8/modules/axiom-c14n/src/main/java/org/apache/axiom/c14n/exceptions/InvalidCanonicalizerEx0000644000000000000000000000302211131637462031705 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.c14n.exceptions; /** * class InvalidCanonicalizerException * * @author Saliya Ekanayake (esaliya@gmail.com) */ public class InvalidCanonicalizerException extends C14NException { public InvalidCanonicalizerException() { } public InvalidCanonicalizerException(String msg){ super(msg); } public InvalidCanonicalizerException(String msg, Object[] exArgs){ super(msg, exArgs); } public InvalidCanonicalizerException(Exception e) { super(e); } public InvalidCanonicalizerException(String msg, Exception e) { super(msg, e); } public InvalidCanonicalizerException(String msg, Object [] exArgs, Exception e) { super(msg, exArgs, e); } } axiom-1.2.8/modules/axiom-c14n/src/test/0000755000000000000000000000000011131637462016437 5ustar rootrootaxiom-1.2.8/modules/axiom-c14n/src/test/resources/0000755000000000000000000000000011131637462020451 5ustar rootrootaxiom-1.2.8/modules/axiom-c14n/src/test/resources/sample2.xml0000644000000000000000000000025111131637462022534 0ustar rootroot A B A B A B C axiom-1.2.8/modules/axiom-c14n/src/test/resources/sample4.xml0000644000000000000000000000101011131637462022530 0ustar rootroot ]> First line Second line 2 "0" && value<"10" ?"valid":"error"]]> valid axiom-1.2.8/modules/axiom-c14n/src/test/resources/sample1.xml0000644000000000000000000000153211131637462022536 0ustar rootroot]> I've no attributes © :)]]> axiom-1.2.8/modules/axiom-c14n/src/test/resources/sample3.xml0000644000000000000000000000107211131637462022537 0ustar rootroot]> axiom-1.2.8/modules/axiom-c14n/src/test/resources/sample6.xml0000644000000000000000000000007611131637462022545 0ustar rootroot © axiom-1.2.8/modules/axiom-c14n/src/test/resources/sample5.xml0000644000000000000000000000027211131637462022542 0ustar rootroot ]> &ent1;, &ent2;! axiom-1.2.8/modules/axiom-c14n/src/test/java/0000755000000000000000000000000011131637462017360 5ustar rootrootaxiom-1.2.8/modules/axiom-c14n/src/test/java/org/0000755000000000000000000000000011131637462020147 5ustar rootrootaxiom-1.2.8/modules/axiom-c14n/src/test/java/org/apache/0000755000000000000000000000000011131637462021370 5ustar rootrootaxiom-1.2.8/modules/axiom-c14n/src/test/java/org/apache/axiom/0000755000000000000000000000000011131637462022505 5ustar rootrootaxiom-1.2.8/modules/axiom-c14n/src/test/java/org/apache/axiom/c14n/0000755000000000000000000000000011131637462023252 5ustar rootrootaxiom-1.2.8/modules/axiom-c14n/src/test/java/org/apache/axiom/c14n/ImplTest.java0000644000000000000000000000314711131637462025663 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.c14n; import junit.framework.TestCase; import junit.framework.Test; import junit.framework.TestSuite; import junit.textui.TestRunner; import org.apache.axiom.c14n.impl.Canonicalizer20010315OmitCommentTest; import org.apache.axiom.c14n.impl.Canonicalizer20010315WithCommentTest; /** * @author Saliya Ekanayake (esaliya@gmail.com) */ public class ImplTest extends TestCase { public ImplTest(String name){ super(name); } public static Test suite(){ TestSuite suite = new TestSuite("All org.apache.axiom.c14n.impl JUnit Tests"); suite.addTest(Canonicalizer20010315OmitCommentTest.suite()); suite.addTest(Canonicalizer20010315WithCommentTest.suite()); return suite; } public static void main(String[] args) { TestRunner.run(suite()); } } axiom-1.2.8/modules/axiom-c14n/src/test/java/org/apache/axiom/c14n/omwrapper/0000755000000000000000000000000011131637462025266 5ustar rootroot././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootaxiom-1.2.8/modules/axiom-c14n/src/test/java/org/apache/axiom/c14n/omwrapper/NamedNodeMapImplTest.javaaxiom-1.2.8/modules/axiom-c14n/src/test/java/org/apache/axiom/c14n/omwrapper/NamedNodeMapImplTest.ja0000644000000000000000000000450011131637462031553 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.c14n.omwrapper; import org.apache.axiom.c14n.omwrapper.interfaces.NamedNodeMap; import org.apache.axiom.c14n.omwrapper.interfaces.Element; import org.apache.axiom.c14n.DataParser; import org.apache.axiom.om.OMElement; import javax.xml.namespace.QName; import junit.framework.TestCase; import junit.framework.Test; import junit.framework.TestSuite; import junit.textui.TestRunner; /** * @author Saliya Ekanayake (esaliya@gmail.com) */ public class NamedNodeMapImplTest extends TestCase { private DataParser dp = null; private NamedNodeMap nnm = null; public NamedNodeMapImplTest(String name){ super(name); } public static Test suite() { return new TestSuite(NamedNodeMapImplTest.class); } public static void main(String[] args) { TestRunner.run(suite()); } public void setUp() throws Exception { dp = new DataParser("/sample1.xml"); dp.init(); // get e5 OMElement e5 = dp.omDocEle.getFirstChildWithName(new QName("http://example.org", "e5")); // get the wrapped element of e5 Element e = (Element) dp.fac.getNode(e5); nnm = e.getAttributes(); } public void testGetLength(){ assertEquals(7, nnm.getLength()); } public void testItem(){ assertNotNull("valid index should not return null", nnm.item(nnm.getLength() - 1)); assertNull("invalid index should return null", nnm.item(-2)); assertNull("invalid index should return null", nnm.item(nnm.getLength())); } } axiom-1.2.8/modules/axiom-c14n/src/test/java/org/apache/axiom/c14n/omwrapper/ElementImplTest.java0000644000000000000000000001336711131637462031216 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.c14n.omwrapper; import org.apache.axiom.c14n.omwrapper.interfaces.Element; import org.apache.axiom.c14n.omwrapper.interfaces.Node; import org.apache.axiom.c14n.DataParser; import org.apache.axiom.om.OMElement; import javax.xml.namespace.QName; import junit.framework.TestCase; import junit.framework.Test; import junit.framework.TestSuite; import junit.textui.TestRunner; /** * @author Saliya Ekanayake (esaliya@gmail.com) */ public class ElementImplTest extends TestCase { private DataParser dp = null; public ElementImplTest(String name){ super(name); } public static Test suite() { return new TestSuite(ElementImplTest.class); } public static void main(String[] args) { TestRunner.run(suite()); } public void setUp() throws Exception{ dp = new DataParser("/sample1.xml"); dp.init(); } public void testHasAttributes() { // first child of docEle is of Text type. So we get the next sibling of that,i.e. e1 Element e = (Element) dp.docEle.getFirstChild().getNextSibling(); // e1 has one attribute which is in fact a namespace declaration assertEquals(true, e.hasAttributes()); // get e2 e = (Element) e.getNextSibling().getNextSibling(); // e2 has the default namespace declaration assertEquals(true, e.hasAttributes()); // get e2child e = (Element) e.getFirstChild(); // e2child gets the default namespace from parent, but it's not an attribute of it assertEquals(false, e.hasAttributes()); } public void testGetNamespaceURI() { // I've no attributes OMElement e2 = dp.omDocEle.getFirstChildWithName(new QName("http://www.blankns.com", "e2")); // get the wrapped element Element e = (Element) dp.fac.getNode(e2); assertEquals("http://www.blankns.com", e.getNamespaceURI()); // I've no attributes e = (Element) e.getFirstChild(); // e2child inherits the default namespace of e2 assertEquals("http://www.blankns.com", e.getNamespaceURI()); // OMElement e3 = dp.omDocEle.getFirstChildWithName(new QName("e3")); // get the wrapped element e = (Element) dp.fac.getNode(e3); assertNull("Namespace URI of e3 is null", e.getNamespaceURI()); } public void testGetPrefix() { // I've no attributes OMElement e2 = dp.omDocEle.getFirstChildWithName(new QName("http://www.blankns.com", "e2")); // get the wrapped element Element e = (Element) dp.fac.getNode(e2); assertNull("prefix of e2 is null", e.getPrefix()); // e = (Element) e.getPreviousSibling().getPreviousSibling(); assertEquals("a", e.getPrefix()); } public void testGetNodeName() { // OMElement e1 = dp.omDocEle.getFirstElement(); // get the wrapped element Element e = (Element) dp.fac.getNode(e1); assertEquals("a:e1", e.getNodeName()); // I've no attributes e = (Element) e.getNextSibling().getNextSibling(); assertEquals("e2", e.getNodeName()); } public void testGetFirstChild() { Element e = (Element) dp.fac.getNode(dp.omDocEle); // first child of root element represents the newline character so it's a text node assertEquals(Node.TEXT_NODE, e.getFirstChild().getNodeType()); } // there is a difference when it comes to CDATA. Axiom treats it as OMText. Eg., // // :)]]> // // getNextSibling() of e1 would return "\n:)\n" // in DOM it would be just "\n". Taking the next sibling of that would be // :) and taking the next sibling of that would be "\n" // so Axiom put all these three into one OMText node. This wasn't a issue yet :) // but thought to mention it for clarity. public void testGetNextSibling() { Element e = (Element) dp.fac.getNode(dp.omDocEle); // first child of root element represents the newline character so it's a text node // the getNextSibling() of that should return element e1 assertEquals(Node.ELEMENT_NODE, (e = (Element)e.getFirstChild().getNextSibling()).getNodeType()); assertEquals("a:e1", e.getNodeName()); } public void testGetPreviousSibling() { // Element e = (Element) dp.fac.getNode(dp.omDocEle.getFirstElement()); // this n is a text node representing the newline character Node n = e.getPreviousSibling(); assertEquals(Node.TEXT_NODE, n.getNodeType()); } } axiom-1.2.8/modules/axiom-c14n/src/test/java/org/apache/axiom/c14n/omwrapper/CommentImplTest.java0000644000000000000000000000467111131637462031225 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.c14n.omwrapper; import org.apache.axiom.c14n.omwrapper.interfaces.Comment; import org.apache.axiom.c14n.omwrapper.interfaces.Node; import org.apache.axiom.c14n.DataParser; import junit.framework.TestCase; import junit.framework.Test; import junit.framework.TestSuite; import junit.textui.TestRunner; /** * @author Saliya Ekanayake (esaliya@gmail.com) */ public class CommentImplTest extends TestCase { private DataParser dp = null; private Comment comment = null; public CommentImplTest(String name){ super(name); } public static Test suite() { return new TestSuite(CommentImplTest.class); } public static void main(String[] args) { TestRunner.run(suite()); } public void setUp() throws Exception{ dp = new DataParser("/sample1.xml"); dp.init(); // comment = (Comment)dp.doc.getFirstChild().getNextSibling(); } public void testGetData() { assertEquals(" Comment 2 ", comment.getData()); } public void testGetParent(){ assertEquals(Node.DOCUMENT_NODE, comment.getParentNode().getNodeType()); } public void testGetNextSibling(){ // this comment is inside the document so we don't want the next newline character // to get as a node assertEquals(Node.ELEMENT_NODE, comment.getNextSibling().getNodeType()); } public void testGetPreviousSibling(){ // this comment is inside the document so we don't want the previous newline character // to get as a node assertEquals(Node.DOCUMENT_TYPE_NODE, comment.getPreviousSibling().getNodeType()); } } axiom-1.2.8/modules/axiom-c14n/src/test/java/org/apache/axiom/c14n/omwrapper/NodeListImplTest.java0000644000000000000000000000373011131637462031337 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.c14n.omwrapper; import org.apache.axiom.c14n.omwrapper.interfaces.NodeList; import org.apache.axiom.c14n.DataParser; import junit.framework.TestCase; import junit.framework.Test; import junit.framework.TestSuite; import junit.textui.TestRunner; /** * @author Saliya Ekanayake (esaliya@gmail.com) */ public class NodeListImplTest extends TestCase { private DataParser dp = null; private NodeList nl = null; public NodeListImplTest(String name){ super(name); } public static Test suite() { return new TestSuite(NodeListImplTest.class); } public static void main(String[] args) { TestRunner.run(suite()); } public void setUp() throws Exception{ dp = new DataParser("/sample1.xml"); dp.init(); nl = dp.docEle.getChildNodes(); } public void testGetLength() { assertEquals(15, nl.getLength()); } public void testItem(){ assertNotNull("valid index should not return null", nl.item(nl.getLength() - 1)); assertNull("invalid index should return null", nl.item(-2)); assertNull("invalid index should return null", nl.item(nl.getLength())); } } axiom-1.2.8/modules/axiom-c14n/src/test/java/org/apache/axiom/c14n/omwrapper/AttrImplTest.java0000644000000000000000000001351411131637462030531 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.c14n.omwrapper; import java.util.HashMap; import java.util.Map; import org.apache.axiom.c14n.omwrapper.factory.WrapperFactory; import org.apache.axiom.c14n.omwrapper.interfaces.Document; import org.apache.axiom.c14n.omwrapper.interfaces.Element; import org.apache.axiom.c14n.omwrapper.interfaces.NamedNodeMap; import org.apache.axiom.c14n.omwrapper.interfaces.Attr; import org.apache.axiom.c14n.DataParser; import org.apache.axiom.om.impl.builder.StAXOMBuilder; import org.apache.axiom.om.OMDocument; import org.apache.axiom.om.OMElement; import junit.framework.TestCase; import junit.framework.Test; import junit.framework.TestSuite; import junit.textui.TestRunner; import javax.xml.namespace.QName; /** * @author Saliya Ekanayake (esaliya@gmail.com) */ public class AttrImplTest extends TestCase { private DataParser dp; private NamedNodeMap nnm; private Attr attr; public AttrImplTest(String name){ super(name); } public static Test suite() { return new TestSuite(AttrImplTest.class); } public static void main(String[] args) { TestRunner.run(suite()); } public void setUp() throws Exception{ dp = new DataParser("/sample1.xml"); dp.init(); // get e5 OMElement e5 = dp.omDocEle.getFirstChildWithName(new QName("http://example.org","e5")); // get the wrapped element of e5 Element e = (Element)dp.fac.getNode(e5); nnm = e.getAttributes(); } public void testAttrProperties(){ // e5 has 7 attributes assertEquals(7, nnm.getLength()); Map map = new HashMap(); for (int i = 0; i < 7; i++) { attr = (Attr)nnm.item(i); QName name = new QName(attr.getNamespaceURI(), attr.getLocalName()); map.put(name, attr); } //attr is a:attr="out" attr = (Attr)map.get(new QName("http://www.w3.org", "attr")); assertNotNull(attr); assertEquals("attr", attr.getLocalName()); assertEquals("a:attr", attr.getName()); assertEquals("a:attr", attr.getNodeName()); assertEquals("a", attr.getPrefix()); assertEquals("http://www.w3.org", attr.getNamespaceURI()); // attr is attr2="all" attr = (Attr)map.get(new QName("attr2")); assertNotNull(attr); assertEquals("attr2", attr.getLocalName()); assertEquals("attr2", attr.getName()); assertEquals("attr2", attr.getNodeName()); assertNull("prefix of attr2=\"all\" is null", attr.getPrefix()); assertNull("Namespace URI of attr2=\"all\" is null", attr.getNamespaceURI()); assertEquals("all", attr.getValue()); assertEquals("all", attr.getNodeValue()); // attr is xmlns:a="http://www.w3.org" attr = (Attr)map.get(new QName("http://www.w3.org/2000/xmlns/", "a")); assertNotNull(attr); assertEquals("a", attr.getLocalName()); assertEquals("xmlns:a", attr.getName()); assertEquals("xmlns:a", attr.getNodeName()); assertEquals("xmlns", attr.getPrefix()); // the namespace URI of xmlns is "http://www.w3.org/2000/xmlns/" assertEquals("http://www.w3.org/2000/xmlns/", attr.getNamespaceURI()); assertEquals("http://www.w3.org", attr.getValue()); assertEquals("http://www.w3.org", attr.getNodeValue()); // attr is xmlns="http://example.org" attr = (Attr)map.get(new QName("http://www.w3.org/2000/xmlns/", "xmlns")); assertNotNull(attr); assertEquals("xmlns", attr.getLocalName()); assertEquals("xmlns", attr.getName()); assertEquals("xmlns", attr.getNodeName()); assertNull("prefix of xmlns=\"http://example.org\" is null", attr.getPrefix()); // the namespace URI of xmlns is "http://www.w3.org/2000/xmlns/" assertEquals("http://www.w3.org/2000/xmlns/", attr.getNamespaceURI()); assertEquals("http://example.org", attr.getValue()); assertEquals("http://example.org", attr.getNodeValue()); } public void testOwnerElement() { // get e5 OMElement e5 = dp.omDocEle.getFirstChildWithName(new QName("http://example.org","e5")); // get the wrapped element of e5 Element e = (Element)dp.fac.getNode(e5); // attr is a:attr="out" attr = (Attr)e.getAttributes().item(0); // the getOwnerElement() should provide a reference to the same object pointed by reference e assertEquals(e, attr.getOwnerElement()); } public void testGetNextSibling() { // attr is a:attr="out" attr = (Attr)nnm.item(0); assertNull("getNextSibling() should return null", attr.getNextSibling()); } public void testGetPreviousSibling(){ // attr is a:attr="out" attr = (Attr)nnm.item(0); assertNull("getPreviousSibling() should return null", attr.getPreviousSibling()); } public void testGetParentNode(){ // attr is a:attr="out" attr = (Attr)nnm.item(0); assertNull("getParentNode() should return null", attr.getParentNode()); } } axiom-1.2.8/modules/axiom-c14n/src/test/java/org/apache/axiom/c14n/omwrapper/TextImplTest.java0000644000000000000000000000441011131637462030536 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.c14n.omwrapper; import org.apache.axiom.c14n.omwrapper.interfaces.NodeList; import org.apache.axiom.c14n.omwrapper.interfaces.Node; import org.apache.axiom.c14n.DataParser; import junit.framework.TestCase; import junit.framework.Test; import junit.framework.TestSuite; import junit.textui.TestRunner; /** * @author Saliya Ekanayake (esaliya@gmail.com) */ public class TextImplTest extends TestCase { private DataParser dp = null; private Node n = null; public TextImplTest(String name){ super(name); } public static Test suite() { return new TestSuite(TextImplTest.class); } public static void main(String[] args) { TestRunner.run(suite()); } public void setUp() throws Exception{ dp = new DataParser("/sample1.xml"); dp.init(); NodeList nl = dp.docEle.getChildNodes(); n = null; for (int i = 0; i < nl.getLength(); i++) { n = nl.item(i); if (n.getNodeType() == Node.ELEMENT_NODE && n.getNodeName().equals("e6")){ break; } } } public void testGetNodeType(){ // here n is e6 assertEquals(Node.TEXT_NODE, n.getNextSibling().getNodeType()); } // see issue mentioned with the testGetNextSibling() method in ElementImplTest public void testGetNodeValue() { // here n is e6 assertEquals("\n :)\n", n.getNextSibling().getNodeValue()); } } axiom-1.2.8/modules/axiom-c14n/src/test/java/org/apache/axiom/c14n/omwrapper/DocumentImplTest.java0000644000000000000000000000536611131637462031403 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.c14n.omwrapper; import org.apache.axiom.c14n.omwrapper.interfaces.NodeList; import org.apache.axiom.c14n.omwrapper.interfaces.Node; import org.apache.axiom.c14n.DataParser; import junit.framework.TestCase; import junit.framework.Test; import junit.framework.TestSuite; import junit.textui.TestRunner; /** * @author Saliya Ekanayake (esaliya@gmail.com) */ public class DocumentImplTest extends TestCase { private DataParser dp = null; public DocumentImplTest(String name){ super(name); } public static Test suite() { return new TestSuite(DocumentImplTest.class); } public static void main(String[] args) { TestRunner.run(suite()); } public void setUp() throws Exception{ dp = new DataParser("/sample1.xml"); dp.init(); } public void testGetChildNode() { // this nl should not contain any text node NodeList nl = dp.doc.getChildNodes(); for (int i = 0; i < nl.getLength(); i++) { assertFalse("node type can't be Text", (Node.TEXT_NODE == nl.item(i).getNodeType())); } } public void testGetNextSibling() { assertNull("getNextSibling() should return null", dp.doc.getNextSibling()); } public void testGetPreviousSibling() { assertNull("getPreviousSibling() should return null", dp.doc.getPreviousSibling()); } public void testGetParentNode() { assertNull("getParentNode() should return null", dp.doc.getParentNode()); } public void testGetFirstChild(){ assertFalse("document should not return Text nodes", (Node.TEXT_NODE == dp.doc.getFirstChild().getNodeType())); assertEquals(Node.DOCUMENT_TYPE_NODE, dp.doc.getFirstChild().getNodeType()); } public void testGetDocumentElement() { assertEquals(Node.ELEMENT_NODE, dp.doc.getDocumentElement().getNodeType()); assertEquals("doc", dp.doc.getDocumentElement().getNodeName()); } } axiom-1.2.8/modules/axiom-c14n/src/test/java/org/apache/axiom/c14n/AllC14NTests.java0000644000000000000000000000264711131637462026247 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.c14n; import junit.framework.TestCase; import junit.framework.Test; import junit.framework.TestSuite; import junit.textui.TestRunner; /** * @author Saliya Ekanayake (esaliya@gmail.com) */ public class AllC14NTests extends TestCase { public AllC14NTests(String name){ super(name); } public static Test suite() { TestSuite suite = new TestSuite("All org.apache.axiom.c14n JUnit Tests"); suite.addTest(ImplTest.suite()); suite.addTest(WrapperTest.suite()); return suite; } public static void main(String[] args) { TestRunner.run(suite()); } } axiom-1.2.8/modules/axiom-c14n/src/test/java/org/apache/axiom/c14n/impl/0000755000000000000000000000000011131637462024213 5ustar rootroot././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootaxiom-1.2.8/modules/axiom-c14n/src/test/java/org/apache/axiom/c14n/impl/Canonicalizer20010315WithCommentTest.javaaxiom-1.2.8/modules/axiom-c14n/src/test/java/org/apache/axiom/c14n/impl/Canonicalizer20010315WithCom0000644000000000000000000001060211131637462031025 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.c14n.impl; import org.apache.axiom.c14n.DataParser; import org.apache.axiom.c14n.Canonicalizer; import junit.framework.Test; import junit.framework.TestSuite; import junit.textui.TestRunner; /** * @author Saliya Ekanayake (esaliya@gmail.com) */ public class Canonicalizer20010315WithCommentTest extends AbstractCanonicalizerTest { public Canonicalizer20010315WithCommentTest(String name){ super(name); } public static Test suite(){ return new TestSuite(Canonicalizer20010315WithCommentTest.class); } public static void main(String[] args) { TestRunner.run(suite()); } private byte[] bytes = null; private String sample2Result = "\n" + " \n" + " A B \n" + " \n" + " A\n" + " \n" + " B\n" + " A B \n" + " C\n" + " \n" + ""; private String sample3Result = "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + ""; private String sample4Result = "\n" + " First line \n" + "Second line\n" + " 2\n" + " value>\"0\" && value<\"10\" ?\"valid\":\"error\"\n" + " "0" && value<"10" ?"valid":"error"\">valid\n" + " \n" + " \n" + " \n" + ""; public void setUp() throws Exception { // parse data of sample2.xml dp = new DataParser("/sample2.xml"); // get canonicalizer with comment c14n = Canonicalizer.getInstance( "http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"); } public void testSample2() throws Exception{ // get the canonicalized byte[] bytes = c14n.canonicalize(dp.getBytes()); // check against sample2Result assertEquals(sample2Result, new String(bytes)); } public void testSample3() throws Exception{ // parse data of sample3.xml dp.initWithNewFile("/sample3.xml"); // get the canonicalized byte[] bytes = c14n.canonicalize(dp.getBytes()); // check against sample3Result assertEquals(sample3Result, new String(bytes)); } public void testSample4() throws Exception { // parse data of sample3.xml dp.initWithNewFile("/sample4.xml"); // get the canonicalized byte[] bytes = c14n.canonicalize(dp.getBytes()); // check against sample3Result assertEquals(sample4Result, new String(bytes)); } } ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootaxiom-1.2.8/modules/axiom-c14n/src/test/java/org/apache/axiom/c14n/impl/AbstractCanonicalizerTest.javaaxiom-1.2.8/modules/axiom-c14n/src/test/java/org/apache/axiom/c14n/impl/AbstractCanonicalizerTest.ja0000644000000000000000000000426111131637462031637 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.c14n.impl; import junit.framework.TestCase; import org.apache.axiom.c14n.DataParser; import org.apache.axiom.c14n.Canonicalizer; import org.apache.axiom.c14n.exceptions.AlgorithmAlreadyRegisteredException; /** * @author Saliya Ekanayake (esaliya@gmail.com) */ public class AbstractCanonicalizerTest extends TestCase { protected DataParser dp = null; protected Canonicalizer c14n = null; public AbstractCanonicalizerTest(){} public AbstractCanonicalizerTest(String name){ super(name); } static { Canonicalizer.init(); try { Canonicalizer.register("http://www.w3.org/TR/2001/REC-xml-c14n-20010315", "org.apache.axiom.c14n.impl.Canonicalizer20010315OmitComments"); Canonicalizer.register("http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments", "org.apache.axiom.c14n.impl.Canonicalizer20010315WithComments"); Canonicalizer.register("http://www.w3.org/2001/10/xml-exc-c14n#", "org.apache.axiom.c14n.impl.Canonicalizer20010315ExclOmitComments"); Canonicalizer.register("http://www.w3.org/2001/10/xml-exc-c14n#WithComments", "org.apache.axiom.c14n.impl.Canonicalizer20010315ExclWithComments"); } catch (AlgorithmAlreadyRegisteredException e) { fail(e.getMessage()); } } } ././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootaxiom-1.2.8/modules/axiom-c14n/src/test/java/org/apache/axiom/c14n/impl/Canonicalizer20010315OmitCommentTest.javaaxiom-1.2.8/modules/axiom-c14n/src/test/java/org/apache/axiom/c14n/impl/Canonicalizer20010315OmitCom0000644000000000000000000000475011131637462031031 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.c14n.impl; import org.apache.axiom.c14n.DataParser; import org.apache.axiom.c14n.Canonicalizer; import junit.framework.Test; import junit.framework.TestSuite; import junit.textui.TestRunner; /** * @author Saliya Ekanayake (esaliya@gmail.com) */ public class Canonicalizer20010315OmitCommentTest extends AbstractCanonicalizerTest { public Canonicalizer20010315OmitCommentTest(String name) { super(name); } public static Test suite() { return new TestSuite(Canonicalizer20010315OmitCommentTest.class); } public static void main(String[] args) { TestRunner.run(suite()); } private byte[] bytes = null; private String sample5Result = "\n" + " Hello, world!\n" + ""; private String sample6Result = "©"; public void setUp() throws Exception { // parse data of sample5.xml dp = new DataParser("/sample5.xml"); // get canonicalizer which omits comments c14n = Canonicalizer.getInstance( "http://www.w3.org/TR/2001/REC-xml-c14n-20010315"); } public void testSample5() throws Exception { // get the canonicalized byte[] bytes = c14n.canonicalize(dp.getBytes()); // check against sample2Result assertEquals(sample5Result, new String(bytes)); } public void testSample6() throws Exception { // parse data of sample6.xml dp.initWithNewFile("/sample6.xml"); // get the canonicalized byte[] bytes = c14n.canonicalize(dp.getBytes()); // check against sample6Result assertEquals(sample6Result, new String(bytes)); } } axiom-1.2.8/modules/axiom-c14n/src/test/java/org/apache/axiom/c14n/DataParser.java0000644000000000000000000000464711131637462026156 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.c14n; import org.apache.axiom.c14n.omwrapper.factory.WrapperFactory; import org.apache.axiom.c14n.omwrapper.interfaces.Document; import org.apache.axiom.c14n.omwrapper.interfaces.Element; import org.apache.axiom.om.impl.builder.StAXOMBuilder; import org.apache.axiom.om.OMDocument; import org.apache.axiom.om.OMElement; import java.net.URL; import java.io.RandomAccessFile; import java.io.InputStream; import java.io.ByteArrayInputStream; /** * @author Saliya Ekanayake (esaliya@gmail.com) */ public class DataParser { private String fileName = null; private StAXOMBuilder builder = null; private byte [] bytes; public WrapperFactory fac = null; public Document doc = null; public Element docEle = null; public OMDocument omDoc = null; public OMElement omDocEle = null; public DataParser(String fileName) { this.fileName = fileName; } public void init() throws Exception { builder = new StAXOMBuilder(this.getClass().getResourceAsStream(fileName)); fac = new WrapperFactory(); omDoc = builder.getDocument(); omDocEle = omDoc.getOMDocumentElement(); doc = (Document) fac.getNode(omDoc); docEle = doc.getDocumentElement(); } public void initWithNewFile(String fileName) throws Exception{ this.fileName = fileName; init(); } public byte[] getBytes() throws Exception{ URL uri = getClass().getResource(fileName); RandomAccessFile raf = new RandomAccessFile(uri.getFile(),"r"); byte[] bytes = new byte[(int)raf.length()]; raf.readFully(bytes); return bytes; } } axiom-1.2.8/modules/axiom-c14n/src/test/java/org/apache/axiom/c14n/WrapperTest.java0000644000000000000000000000332511131637462026400 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.c14n; import junit.framework.TestCase; import junit.framework.Test; import junit.framework.TestSuite; import junit.textui.TestRunner; import org.apache.axiom.c14n.omwrapper.*; /** * @author Saliya Ekanayake (esaliya@gmail.com) */ public class WrapperTest extends TestCase { public WrapperTest(String name){ super(name); } public static Test suite() { TestSuite suite = new TestSuite("All org.apache.axiom.c14n.omwrapper JUnit Tests"); suite.addTest(AttrImplTest.suite()); suite.addTest(CommentImplTest.suite()); suite.addTest(DocumentImplTest.suite()); suite.addTest(ElementImplTest.suite()); suite.addTest(NamedNodeMapImplTest.suite()); suite.addTest(NodeListImplTest.suite()); suite.addTest(TextImplTest.suite()); return suite; } public static void main(String[] args) { TestRunner.run(suite()); } } axiom-1.2.8/modules/axiom-c14n/pom.xml0000644000000000000000000000730311131637462016211 0ustar rootroot axiom org.apache.ws.commons.axiom 1.2.8 4.0.0 org.apache.ws.commons.axiom axiom-c14n Axiom C14N 1.2.8 org.apache.ws.commons.axiom axiom-api ${version} org.apache.ws.commons.axiom axiom-impl ${version} junit junit src/main/resources ${project.build.directory}/legal-files maven-antrun-plugin copy-legal-files generate-resources run maven-surefire-plugin **/*Test.java **/*TestCase.java **/*AbstractCanonicalizerTest.java axiom-1.2.8/modules/axiom-api/0000755000000000000000000000000011131637526014676 5ustar rootrootaxiom-1.2.8/modules/axiom-api/src/0000755000000000000000000000000011131637462015464 5ustar rootrootaxiom-1.2.8/modules/axiom-api/src/main/0000755000000000000000000000000011131637470016407 5ustar rootrootaxiom-1.2.8/modules/axiom-api/src/main/resources/0000755000000000000000000000000011131637470020421 5ustar rootrootaxiom-1.2.8/modules/axiom-api/src/main/resources/META-INF/0000755000000000000000000000000011131637470021561 5ustar rootrootaxiom-1.2.8/modules/axiom-api/src/main/resources/META-INF/MANIFEST.MF0000644000000000000000000000270411131637470023216 0ustar rootrootManifest-Version: 1.0 Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt Import-Package: javax.activation, javax.mail, javax.mail.internet, javax.xml.namespace, javax.xml.stream, org.apache.commons.logging, org.jaxen;resolution:=optional, org.jaxen.saxpath;resolution:=optional, org.jaxen.util;resolution:=optional, org.apache.axiom.om.impl.dom.factory;resolution:=optional, org.apache.axiom.soap.impl.dom.factory;resolution:=optional, org.apache.axiom.om.impl.llom.factory;resolution:=optional, org.apache.axiom.soap.impl.llom.soap12;resolution:=optional, org.w3c.dom, org.xml.sax, org.xml.sax.helpers Export-Package: org.apache.axiom.attachments.impl, org.apache.axiom.attachments.lifecycle.impl, org.apache.axiom.attachments.lifecycle, org.apache.axiom.attachments.utils, org.apache.axiom.attachments, org.apache.axiom.om.ds.custombuilder, org.apache.axiom.om.ds, org.apache.axiom.om.impl.builder, org.apache.axiom.om.impl.exception, org.apache.axiom.om.impl.serialize, org.apache.axiom.om.impl.traverse, org.apache.axiom.om.impl.util, org.apache.axiom.om.impl, org.apache.axiom.om.util, org.apache.axiom.om.xpath, org.apache.axiom.om, org.apache.axiom.soap.impl.builder, org.apache.axiom.soap Bundle-Name: Axiom API Bundle-DocURL: http://www.apache.org/ Bundle-ManifestVersion: 2 Bundle-Vendor: Apache Software Foundation Bundle-SymbolicName: org.apache.ws.commons.axiom.axiom-api axiom-1.2.8/modules/axiom-api/src/main/java/0000755000000000000000000000000011131637462017331 5ustar rootrootaxiom-1.2.8/modules/axiom-api/src/main/java/org/0000755000000000000000000000000011131637462020120 5ustar rootrootaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/0000755000000000000000000000000011131637462021341 5ustar rootrootaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/0000755000000000000000000000000011131637464022460 5ustar rootrootaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/attachments/0000755000000000000000000000000011131637464024773 5ustar rootroot././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/attachments/BoundaryPushbackInputStream.javaaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/attachments/BoundaryPushbackInputStream0000644000000000000000000002625111131637464032364 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.attachments; import java.io.IOException; import java.io.InputStream; import java.io.PushbackInputStream; import org.apache.axiom.attachments.utils.ByteSearch; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; /** * An InputStream that reads bytes up to a boundary. * The boundary is not logically part of the bytes to read. * The wrapped PushbackInputStream is set to to the byte after * the boundary once the bytes are read. * The boundary is not logically returned. * * There are two forms that are supported, where . is a byte * * .......................boundary * * and * * ..................../r/nboundary * * In both cases, only the bytes (.) are returned. * */ public class BoundaryPushbackInputStream extends InputStream { private static Log log = LogFactory.getLog(BoundaryPushbackInputStream.class); private static boolean isDebugEnabled = log.isDebugEnabled(); PushbackInputStream is; boolean boundaryFound; byte[] boundary; int rnBoundaryLen; // '/r/nboundary' length byte[] buffer; int bufferSize; // BufferSize int numBytes; // Number of bytes in the buffer int index = -1; // Current index in buffer int bIndex = -1; // Index of boundary or /r/nboundary final int MIN_BUF_SIZE = 32; protected static final int BOUNDARY_NT_FOUND = -1; // Skip search array private short[] skip = null; // Working byte for read() private byte[] read_byte = new byte[1]; /** * @param inStream * @param boundary * @param pushBackSize */ public BoundaryPushbackInputStream(PushbackInputStream inStream, byte[] boundary, int pushBackSize) { super(); this.is = inStream; this.boundary = boundary; this.rnBoundaryLen = boundary.length + 2; // The buffer must accomodate twice the boundary length and // the maximum that we will ever push back (which is the entire buffer except for // the boundary) this.bufferSize = Math.max(rnBoundaryLen * 2, pushBackSize + boundary.length); } /** * Method readFromStream * * @param b * @param start * @param length * * @return * * @throws java.io.IOException */ private final int readFromStream( final byte[] b, final int start, final int length) throws java.io.IOException { // We need to make sure to capture enough data to // actually search for the rn + boundary int minRead = Math.max(rnBoundaryLen * 2, length); minRead = Math.min(minRead, length - start); int br = 0; int brTotal = 0; do { // Read data into the buffer br = is.read(b, brTotal + start, length - brTotal); if (br > 0) { brTotal += br; } } while ((br > 0) && (brTotal < minRead)); return (brTotal != 0) ? brTotal : br; } /** * @param b * @return * @throws java.io.IOException */ private final int readFromStream(final byte[] b) throws java.io.IOException { return readFromStream(b, 0, b.length); } /* (non-Javadoc) * @see java.io.InputStream#read(byte[]) */ public int read(byte[] b) throws java.io.IOException { return read(b, 0, b.length); } /** * Read from the boundary delimited stream. * Generally, this won't be called...callers will * most likely call the read(byte[]..) methods * @return The byte read, or -1 if endof stream. * * @throws java.io.IOException */ public int read() throws java.io.IOException { // Short cut to avoid buffer copying if (buffer != null && index > 0) { if ((bIndex > 0 && (index+1) < bIndex) || bIndex < 0 && index < (numBytes - rnBoundaryLen)) { index++; return (buffer[index-1]); } } int read = read(read_byte); if (read < 0) { return -1; } else { return read_byte[0]; } } /** * Read from the boundary delimited stream. * @param b is the array to read into. * @param off is the offset * @param len * @return the number of bytes read. -1 if endof stream. * * @throws java.io.IOException */ public int read(byte[] b, final int off, final int len) throws java.io.IOException { // If already found the buffer, then we are done if (boundaryFound) { return -1; } // The first time called, read a chunk of data if (buffer == null) { // Allocate the buffer. buffer = new byte[bufferSize]; numBytes = readFromStream(buffer); if (numBytes < 0) { buffer = null; boundaryFound = true; } index = 0; // Finds the boundary pos. bIndex = boundaryPosition(buffer, index, numBytes); if (bIndex >=0) { unread(); // Unread pushback inputstream } } int bwritten = 0; // Number of bytes written to b do { // Never read to the end of the buffer because // the boundary may span buffers. int bcopy = Math.min((numBytes - rnBoundaryLen) - index, len - bwritten); // Never read past the boundary if (bIndex >= 0) { bcopy = Math.min(bcopy, bIndex - index); } // Copy the bytes if (bcopy > 0) { System.arraycopy(buffer, index, b, off + bwritten, bcopy); bwritten += bcopy; index += bcopy; } if (index == bIndex) { boundaryFound = true; } else if (bwritten < len) { // If more data is needed, // create a temporary buffer to span // the straggling bytes in the current buffer // and the new yet unread bytes byte[] dstbuf = buffer; // Move straggling bytes from the current buffer int movecnt = numBytes - index; System.arraycopy(buffer, index, dstbuf, 0, movecnt); // Read in the new data. int readcnt = readFromStream(dstbuf, movecnt, dstbuf.length - movecnt); if (readcnt < 0) { if (log.isDebugEnabled()) { log.debug("End of Stream, but boundary not found"); log.debug(toString()); } buffer = null; boundaryFound = true; throw new java.io.IOException("End of Stream, but boundary not found"); } numBytes = readcnt + movecnt; buffer = dstbuf; index = 0; // start at the begining. // just move the boundary by what we moved if (bIndex >=0) { bIndex -= movecnt; } else { bIndex = boundaryPosition( buffer, index, numBytes); if (bIndex >= 0) { unread(); // Unread pushback inputstream } } } } // read till we get the amount or the stream is finished. while (!boundaryFound && (bwritten < len)); if (boundaryFound) { buffer = null; // GC the buffer } return bwritten; } /** * Unread the bytes past the buffer */ private void unread() throws IOException { int i = bIndex; if (buffer[i] == 13) { // If /r, must be /r/nboundary i = i + this.rnBoundaryLen; } else { i = i + boundary.length; } if (numBytes - i > 0) { is.unread(buffer, i, numBytes - i); } } /** * Read from the boundary delimited stream. * * @param searchbuf * @param start * @param end * @return The position of the boundary. * */ protected int boundaryPosition(byte[] searchbuf, int start, int end) throws java.io.IOException { if (skip == null) { skip = ByteSearch.getSkipArray(boundary, true); } int foundAt = ByteSearch.skipSearch(boundary, true,searchbuf, start, end, skip); // Backup 2 if the boundary is preceeded by /r/n // The /r/n are treated as part of the boundary if (foundAt >=2) { if (searchbuf[foundAt-2] == 13 && searchbuf[foundAt-1] == 10) { foundAt = foundAt -2; } } return foundAt; } public boolean getBoundaryStatus() { return boundaryFound; } /** * toString * dumps state information. Effective for debug trace. */ public String toString() { final String newline = "\n"; StringBuffer sb = new StringBuffer(); sb.append("========================"); sb.append(newline); sb.append("BoundaryPushbackInputStream"); sb.append(newline); sb.append(" boundary = " + new String(this.boundary) ); sb.append(newline); sb.append(" boundaryFound = " + boundaryFound); sb.append(newline); int available = 0; try { available = is.available(); } catch (Throwable t) { ; // Suppress...toString is called for debug } sb.append(" is available = " + available ); sb.append(newline); sb.append(" bufferSize = " + bufferSize); sb.append(newline); sb.append(" bufferNumBytes = " + bufferSize); sb.append(newline); sb.append(" bufferIndex = " + index); sb.append(newline); sb.append(" boundaryIndex = " + bIndex); sb.append(newline); sb.append(" buffer[0,num] = " + new String(buffer, 0, numBytes)); sb.append(newline); sb.append("========================"); return sb.toString(); } }axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/attachments/CachedFileDataSource.java0000644000000000000000000000251411131637464031562 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.attachments; import javax.activation.FileDataSource; import java.io.File; public class CachedFileDataSource extends FileDataSource { String contentType = null; public CachedFileDataSource(File arg0) { super(arg0); } public String getContentType() { if (this.contentType != null) { return contentType; } else { return super.getContentType(); } } public void setContentType(String contentType) { this.contentType = contentType; } } ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/attachments/MIMEBodyPartInputStream.javaaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/attachments/MIMEBodyPartInputStream.jav0000644000000000000000000001065711131637464032076 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.attachments; import java.io.IOException; import java.io.InputStream; import java.io.PushbackInputStream; /** * MIMEBodyPartInputStream * */ public class MIMEBodyPartInputStream extends InputStream { BoundaryPushbackInputStream bpis; PushbackInputStream inStream; Attachments parent = null; boolean done = false; /** * @param inStream * @param boundary */ public MIMEBodyPartInputStream(PushbackInputStream inStream, byte[] boundary) { this (inStream, boundary, null, boundary.length + 2); } /** * @param inStream * @param boundary * @param parent */ public MIMEBodyPartInputStream(PushbackInputStream inStream, byte[] boundary, Attachments parent) { this (inStream, boundary, parent, boundary.length + 2); } /** * @param inStream * @param boundary * @param parent * @param pushbacksize <= size of pushback buffer on inStream */ public MIMEBodyPartInputStream(PushbackInputStream inStream, byte[] boundary, Attachments parent, int pushbacksize) { bpis = new BoundaryPushbackInputStream(inStream, boundary, pushbacksize); this.inStream = inStream; this.parent = parent; } /* (non-Javadoc) * @see java.io.InputStream#read() */ public int read() throws IOException { if (done) { return -1; } int rc = bpis.read(); if (getBoundaryStatus()) { finish(); } return rc; } /* (non-Javadoc) * @see java.io.InputStream#read(byte[], int, int) */ public int read(byte[] b, int off, int len) throws IOException { if (done) { return -1; } int rc = bpis.read(b, off, len); if (getBoundaryStatus()) { finish(); } return rc; } /* (non-Javadoc) * @see java.io.InputStream#read(byte[]) */ public int read(byte[] b) throws IOException { if (done) { return -1; } int rc = bpis.read(b); if (getBoundaryStatus()) { finish(); } return rc; } /** * Called when done reading * This method detects trailing -- and alerts the parent * @throws IOException */ private void finish() throws IOException { if (!done) { int one = inStream.read(); // Accept -- if (one != -1) { int two = inStream.read(); if (two != -1) { if (one == 45 && two == 45) { // Accept -- if (parent != null) { parent.setEndOfStream(true); } } else { inStream.unread(two); inStream.unread(one); } } else { inStream.unread(one); } } one = inStream.read(); // Accept /r/n if (one != -1) { int two = inStream.read(); if (two != -1) { if (one == 13 && two == 10) { // Accept /r/n and continue } else { inStream.unread(two); inStream.unread(one); } } else { inStream.unread(one); } } } done = true; } public boolean getBoundaryStatus() { return bpis.getBoundaryStatus(); } }axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/attachments/Attachments.java0000644000000000000000000006470011131637464030120 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.attachments; import org.apache.axiom.attachments.impl.PartFactory; import org.apache.axiom.attachments.lifecycle.LifecycleManager; import org.apache.axiom.attachments.lifecycle.impl.LifecycleManagerImpl; import org.apache.axiom.om.OMAttachmentAccessor; import org.apache.axiom.om.OMException; import org.apache.axiom.om.impl.MTOMConstants; import org.apache.axiom.om.util.DetachableInputStream; import org.apache.axiom.om.util.UUIDGenerator; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import javax.activation.DataHandler; import javax.mail.MessagingException; import javax.mail.internet.ContentType; import javax.mail.internet.ParseException; import java.io.IOException; import java.io.InputStream; import java.io.PushbackInputStream; import java.io.UnsupportedEncodingException; import java.util.ArrayList; import java.util.List; import java.util.Set; import java.util.TreeMap; import java.util.Map; import java.util.Collections; public class Attachments implements OMAttachmentAccessor { /** ContentType of the MIME message */ ContentType contentType; int contentLength; // Content Length /** Mime boundary which separates mime parts */ byte[] boundary; /** * applicationType used to distinguish between MTOM & SWA If the message is MTOM * optimised type is application/xop+xml If the message is SWA, type is ??have to find out */ String applicationType; /** * pushbackInStream stores the reference to the incoming stream A PushbackStream * has the ability to "push back" or "unread" one byte. */ PushbackInputStream pushbackInStream; int PUSHBACK_SIZE = 4 * 1024; DetachableInputStream filterIS = null; /** * attachmentsMap stores the Data Handlers of the already parsed Mime Body Parts. * This ordered Map is keyed using the content-ID's. */ TreeMap attachmentsMap; /** * cids stores the content ids in the order that the attachments * occur in the message */ ArrayList cids = new ArrayList(); /** partIndex- Number of Mime parts parsed */ int partIndex = 0; /** Container to hold streams for direct access */ IncomingAttachmentStreams streams = null; /** boolean Indicating if any streams have been directly requested */ private boolean streamsRequested = false; /** boolean Indicating if any data handlers have been directly requested */ private boolean partsRequested = false; /** * endOfStreamReached flag which is to be set by MIMEBodyPartStream when MIME * message terminator is found. */ private boolean endOfStreamReached; /** * noStreams flag which is to be set when this class is instantiated by the SwA API * to handle programatic added attachements. An InputStream with attachments is not present at * that occation. */ private boolean noStreams = false; private String firstPartId; private boolean fileCacheEnable; private String attachmentRepoDir; private int fileStorageThreshold; private LifecycleManager manager; protected static Log log = LogFactory.getLog(Attachments.class); public LifecycleManager getLifecycleManager() { if(manager == null) { manager = new LifecycleManagerImpl(); } return manager; } public void setLifecycleManager(LifecycleManager manager) { this.manager = manager; } /** * Moves the pointer to the beginning of the first MIME part. Reads till first MIME boundary is * found or end of stream is reached. * * @param inStream * @param contentTypeString * @param fileCacheEnable * @param attachmentRepoDir * @throws OMException */ public Attachments(LifecycleManager manager, InputStream inStream, String contentTypeString, boolean fileCacheEnable, String attachmentRepoDir, String fileThreshold) throws OMException { this(manager, inStream, contentTypeString, fileCacheEnable, attachmentRepoDir, fileThreshold, 0); } /** * Moves the pointer to the beginning of the first MIME part. Reads * till first MIME boundary is found or end of stream is reached. * * @param inStream * @param contentTypeString * @param fileCacheEnable * @param attachmentRepoDir * @param fileThreshold * @param contentLength * @throws OMException */ public Attachments(LifecycleManager manager, InputStream inStream, String contentTypeString, boolean fileCacheEnable, String attachmentRepoDir, String fileThreshold, int contentLength) throws OMException { this.manager = manager; this.contentLength = contentLength; this.attachmentRepoDir = attachmentRepoDir; this.fileCacheEnable = fileCacheEnable; if (log.isDebugEnabled()) { log.debug("Attachments contentLength=" + contentLength + ", contentTypeString=" + contentTypeString); } if (fileThreshold != null && (!"".equals(fileThreshold))) { this.fileStorageThreshold = Integer.parseInt(fileThreshold); } else { this.fileStorageThreshold = 1; } attachmentsMap = new TreeMap(); try { contentType = new ContentType(contentTypeString); } catch (ParseException e) { throw new OMException( "Invalid Content Type Field in the Mime Message" , e); } // REVIEW: This conversion is hard-coded to UTF-8. // The complete solution is to respect the charset setting of the message. // However this may cause problems in BoundaryDelimittedStream and other // lower level classes. // Boundary always have the prefix "--". try { String encoding = contentType.getParameter("charset"); if(encoding == null || encoding.length()==0){ encoding = "UTF-8"; } String boundaryParam = contentType.getParameter("boundary"); if (boundaryParam == null) { throw new OMException("Content-type has no 'boundary' parameter"); } this.boundary = ("--" + boundaryParam).getBytes(encoding); if (log.isDebugEnabled()) { log.debug("boundary=" + new String(this.boundary)); } } catch (UnsupportedEncodingException e) { throw new OMException(e); } // If the length is not known, install a TeeInputStream // so that we can retrieve it later. InputStream is = inStream; if (contentLength <= 0) { filterIS = new DetachableInputStream(inStream); is = filterIS; } pushbackInStream = new PushbackInputStream(is, PUSHBACK_SIZE); // Move the read pointer to the beginning of the first part // read till the end of first boundary while (true) { int value; try { value = pushbackInStream.read(); if ((byte) value == boundary[0]) { int boundaryIndex = 0; while ((boundaryIndex < boundary.length) && ((byte) value == boundary[boundaryIndex])) { value = pushbackInStream.read(); if (value == -1) { throw new OMException( "Unexpected End of Stream while searching for first Mime Boundary"); } boundaryIndex++; } if (boundaryIndex == boundary.length) { // boundary found pushbackInStream.read(); break; } } else if ((byte) value == -1) { throw new OMException( "Mime parts not found. Stream ended while searching for the boundary"); } } catch (IOException e1) { throw new OMException("Stream Error" + e1.toString(), e1); } } // Read the SOAP part and cache it getDataHandler(getSOAPPartContentID()); // Now reset partsRequested. SOAP part is a special case which is always // read beforehand, regardless of request. partsRequested = false; } /** * Moves the pointer to the beginning of the first MIME part. Reads till first MIME boundary is * found or end of stream is reached. * * @param inStream * @param contentTypeString * @param fileCacheEnable * @param attachmentRepoDir * @throws OMException */ public Attachments(InputStream inStream, String contentTypeString, boolean fileCacheEnable, String attachmentRepoDir, String fileThreshold) throws OMException { this(null, inStream, contentTypeString, fileCacheEnable, attachmentRepoDir, fileThreshold, 0); } /** * Moves the pointer to the beginning of the first MIME part. Reads * till first MIME boundary is found or end of stream is reached. * * @param inStream * @param contentTypeString * @param fileCacheEnable * @param attachmentRepoDir * @param fileThreshold * @param contentLength * @throws OMException */ public Attachments(InputStream inStream, String contentTypeString, boolean fileCacheEnable, String attachmentRepoDir, String fileThreshold, int contentLength) throws OMException { this(null, inStream, contentTypeString, fileCacheEnable, attachmentRepoDir, fileThreshold, contentLength); } /** * Sets file cache to false. * * @param inStream * @param contentTypeString * @throws OMException */ public Attachments(InputStream inStream, String contentTypeString) throws OMException { this(null, inStream, contentTypeString, false, null, null); } /** * Use this constructor when instantiating this to store the attachments set programatically * through the SwA API. */ public Attachments() { attachmentsMap = new TreeMap(); noStreams = true; } /** * @return whether Message Type is SOAP with Attachments or MTOM optimized, by checking the * application type parameter in the Content Type. */ public String getAttachmentSpecType() { if (this.applicationType == null) { applicationType = contentType.getParameter("type"); if ((MTOMConstants.MTOM_TYPE).equalsIgnoreCase(applicationType)) { this.applicationType = MTOMConstants.MTOM_TYPE; } else if ((MTOMConstants.SWA_TYPE).equalsIgnoreCase(applicationType)) { this.applicationType = MTOMConstants.SWA_TYPE; } else if ((MTOMConstants.SWA_TYPE_12).equalsIgnoreCase(applicationType)) { this.applicationType = MTOMConstants.SWA_TYPE_12; } else { throw new OMException( "Invalid Application type. Support available for MTOM & SwA only."); } } return this.applicationType; } /** * Checks whether the MIME part is already parsed by checking the attachments HashMap. If it is * not parsed yet then call the getNextPart() till the required part is found. * * @param blobContentID (without the surrounding angle brackets and "cid:" prefix) * @return The DataHandler of the mime part referred by the Content-Id or *null* if the mime * part referred by the content-id does not exist */ public DataHandler getDataHandler(String blobContentID) { DataHandler dataHandler; if (attachmentsMap.containsKey(blobContentID)) { dataHandler = (DataHandler) attachmentsMap.get(blobContentID); return dataHandler; } else if (!noStreams) { //This loop will be terminated by the Exceptions thrown if the Mime // part searching was not found while ((dataHandler = this.getNextPartDataHandler()) != null) { if (attachmentsMap.containsKey(blobContentID)) { dataHandler = (DataHandler) attachmentsMap.get(blobContentID); return dataHandler; } } } return null; } /** * Programatically adding an SOAP with Attachments(SwA) Attachment. These attachments will get * serialized only if SOAP with Attachments is enabled. * * @param contentID * @param dataHandler */ public void addDataHandler(String contentID, DataHandler dataHandler) { attachmentsMap.put(contentID, dataHandler); if (!cids.contains(contentID)) { cids.add(contentID); } } /** * Removes the DataHandler corresponding to the given contenID. If it is not present, then * trying to find it calling the getNextPart() till the required part is found. * * @param blobContentID */ public void removeDataHandler(String blobContentID) { if (attachmentsMap.containsKey(blobContentID)) { attachmentsMap.remove(blobContentID); } else if (!noStreams) { //This loop will be terminated by the Exceptions thrown if the Mime // part searching was not found while (this.getNextPartDataHandler() != null) { if (attachmentsMap.containsKey(blobContentID)) { attachmentsMap.remove(blobContentID); } } } if (!cids.contains(blobContentID)) { cids.remove(blobContentID); } } /** * @return the InputStream which includes the SOAP Envelope. It assumes that the root mime part * is always pointed by "start" parameter in content-type. */ public InputStream getSOAPPartInputStream() throws OMException { DataHandler dh; if (noStreams) { throw new OMException("Invalid operation. Attachments are created programatically."); } try { dh = getDataHandler(getSOAPPartContentID()); if (dh == null) { throw new OMException( "Mandatory Root MIME part containing the SOAP Envelope is missing"); } return dh.getInputStream(); } catch (IOException e) { throw new OMException( "Problem with DataHandler of the Root Mime Part. ", e); } } /** * @return the Content-ID of the SOAP part It'll be the value Start Parameter of Content-Type * header if given in the Content type of the MIME message. Else it'll be the content-id * of the first MIME part of the MIME message */ public String getSOAPPartContentID() { if(contentType == null) { return null; } String rootContentID = contentType.getParameter("start"); if (log.isDebugEnabled()) { log.debug("getSOAPPartContentID rootContentID=" + rootContentID); } // to handle the Start parameter not mentioned situation if (rootContentID == null) { if (partIndex == 0) { getNextPartDataHandler(); } rootContentID = firstPartId; } else { rootContentID = rootContentID.trim(); if ((rootContentID.indexOf("<") > -1) & (rootContentID.indexOf(">") > -1)) { rootContentID = rootContentID.substring(1, (rootContentID .length() - 1)); } } // Strips off the "cid:" part from content-id if (rootContentID.length() > 4 && "cid:".equalsIgnoreCase(rootContentID.substring(0, 4))) { rootContentID = rootContentID.substring(4); } return rootContentID; } public String getSOAPPartContentType() { if (!noStreams) { DataHandler soapPart = getDataHandler(getSOAPPartContentID()); return soapPart.getContentType(); } else { throw new OMException( "The attachments map was created programatically. Unsupported operation."); } } /** * Stream based access * * @return The stream container of type IncomingAttachmentStreams * @throws IllegalStateException if application has alreadt started using Part's directly */ public IncomingAttachmentStreams getIncomingAttachmentStreams() throws IllegalStateException { if (partsRequested) { throw new IllegalStateException( "The attachments stream can only be accessed once; either by using the IncomingAttachmentStreams class or by getting a " + "collection of AttachmentPart objects. They cannot both be called within the life time of the same service request."); } if (noStreams) { throw new IllegalStateException( "The attachments map was created programatically. No streams are available."); } streamsRequested = true; if (this.streams == null) { BoundaryDelimitedStream boundaryDelimitedStream = new BoundaryDelimitedStream(pushbackInStream, boundary, 1024); this.streams = new MultipartAttachmentStreams(boundaryDelimitedStream); } return this.streams; } public String[] getAllContentIDs() { // Force reading of all attachments getContentIDSet(); String[] strings = new String[cids.size()]; return (String[]) cids.toArray(strings); } public Set getContentIDSet() { DataHandler dataHandler; while (!noStreams) { dataHandler = this.getNextPartDataHandler(); if (dataHandler == null) { break; } } return attachmentsMap.keySet(); } public Map getMap() { DataHandler dataHandler; while (!noStreams) { dataHandler = this.getNextPartDataHandler(); if (dataHandler == null) { break; } } return Collections.unmodifiableMap(attachmentsMap); } /** * @return List of content ids in order of appearance in message */ public List getContentIDList() { return cids; } /** * If the Attachments is backed by an InputStream, then this * method returns the length of the message contents * (Length of the entire message - Length of the Transport Headers) * @return length of message content or -1 if Attachments is not * backed by an InputStream * @see getMessageLength */ public long getContentLength() throws IOException { if (contentLength > 0) { return contentLength; } else if (filterIS != null) { // Ensure all parts are read this.getContentIDSet(); // Now get the count from the filter return filterIS.length(); } else { return -1; // not backed by an input stream } } /** * endOfStreamReached will be set to true if the message ended in MIME Style having "--" suffix * with the last mime boundary * * @param value */ protected void setEndOfStream(boolean value) { this.endOfStreamReached = value; } /** * Returns the rest of mime stream. It will contain all attachments without * soappart (first attachment) with headers and mime boundary. Raw content! */ public InputStream getIncomingAttachmentsAsSingleStream() throws IllegalStateException { if (partsRequested) { throw new IllegalStateException( "The attachments stream can only be accessed once; either by using the IncomingAttachmentStreams class or by getting a " + "collection of AttachmentPart objects. They cannot both be called within the life time of the same service request."); } if (noStreams) { throw new IllegalStateException( "The attachments map was created programatically. No streams are available."); } streamsRequested = true; return this.pushbackInStream; } /** * @return the Next valid MIME part + store the Part in the Parts List * @throws OMException throw if content id is null or if two MIME parts contain the same * content-ID & the exceptions throws by getPart() */ private DataHandler getNextPartDataHandler() throws OMException { if (endOfStreamReached) { return null; } Part nextPart; nextPart = getPart(); if (nextPart == null) { return null; } else try { long size = nextPart.getSize(); String partContentID; DataHandler dataHandler; try { partContentID = nextPart.getContentID(); if (partContentID == null & partIndex == 1) { String id = "firstPart_" + UUIDGenerator.getUUID(); firstPartId = id; if (size > 0) { dataHandler = nextPart.getDataHandler(); } else { // Either the mime part is empty or the stream ended without having // a MIME message terminator dataHandler = new DataHandler(new ByteArrayDataSource(new byte[]{})); } addDataHandler(id, dataHandler); return dataHandler; } if (partContentID == null) { throw new OMException( "Part content ID cannot be blank for non root MIME parts"); } if ((partContentID.indexOf("<") > -1) & (partContentID.indexOf(">") > -1)) { partContentID = partContentID.substring(1, (partContentID .length() - 1)); } if (partIndex == 1) { firstPartId = partContentID; } if (attachmentsMap.containsKey(partContentID)) { throw new OMException( "Two MIME parts with the same Content-ID not allowed."); } if (size > 0) { dataHandler = nextPart.getDataHandler(); } else { // Either the mime part is empty or the stream ended without having // a MIME message terminator dataHandler = new DataHandler(new ByteArrayDataSource(new byte[]{})); } addDataHandler(partContentID, dataHandler); return dataHandler; } catch (MessagingException e) { throw new OMException("Error reading Content-ID from the Part." + e); } } catch (MessagingException e) { throw new OMException(e); } } /** * @return This will return the next available MIME part in the stream. * @throws OMException if Stream ends while reading the next part... */ private Part getPart() throws OMException { if (streamsRequested) { throw new IllegalStateException("The attachments stream can only be accessed once; either by using the IncomingAttachmentStreams class or by getting a collection of AttachmentPart objects. They cannot both be called within the life time of the same service request."); } partsRequested = true; boolean isSOAPPart = (partIndex == 0); int threshhold = (fileCacheEnable) ? fileStorageThreshold : 0; // Create a MIMEBodyPartInputStream that simulates a single stream for this MIME body part MIMEBodyPartInputStream partStream = new MIMEBodyPartInputStream(pushbackInStream, boundary, this, PUSHBACK_SIZE); // The PartFactory will determine which Part implementation is most appropriate. Part part = PartFactory.createPart(getLifecycleManager(), partStream, isSOAPPart, threshhold, attachmentRepoDir, contentLength); // content-length for the whole message partIndex++; return part; } /** * Read bytes into the buffer until full or until the EOS * @param is * @param buffer * @return number of bytes read * @throws IOException */ private static int readToBuffer(InputStream is, byte[] buffer) throws IOException { int index = 0; int remainder = buffer.length; do { int bytesRead; while ((bytesRead = is.read(buffer, index, remainder)) > 0) { index += bytesRead; remainder -= bytesRead; } } while (remainder > 0 && is.available() > 0); // repeat if more bytes are now available return index; } }././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/attachments/IncomingAttachmentInputStream.javaaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/attachments/IncomingAttachmentInputStre0000644000000000000000000001044411131637464032353 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.attachments; import java.io.IOException; import java.io.InputStream; import java.util.HashMap; import java.util.Map; public class IncomingAttachmentInputStream extends InputStream { private HashMap _headers = null; private HashMap _headersLowerCase = null; private InputStream _stream = null; private IncomingAttachmentStreams parentContainer; public static final String HEADER_CONTENT_DESCRIPTION = "content-description"; public static final String HEADER_CONTENT_TYPE = "content-type"; public static final String HEADER_CONTENT_TRANSFER_ENCODING = "content-transfer-encoding"; public static final String HEADER_CONTENT_TYPE_JMS = "contentType"; public static final String HEADER_CONTENT_LENGTH = "content-length"; public static final String HEADER_CONTENT_LOCATION = "content-location"; public static final String HEADER_CONTENT_ID = "content-id"; /** @param in */ public IncomingAttachmentInputStream(InputStream in, IncomingAttachmentStreams parentContainer) { _stream = in; this.parentContainer = parentContainer; } /** @return MIME headers for this attachment. May be null if no headers were set. */ public Map getHeaders() { return _headers; } /** * Add a header. * * @param name * @param value */ public void addHeader(String name, String value) { if (_headers == null) { _headers = new HashMap(); _headersLowerCase = new HashMap(); } _headers.put(name, value); _headersLowerCase.put(name.toLowerCase(), value); } /** * Get a header value. * * @param name * @return The header found or null if not found. */ public String getHeader(String name) { Object header = null; if (_headersLowerCase == null || (header = _headersLowerCase.get(name.toLowerCase())) == null) { return null; } return header.toString(); } /** @return The header with HTTPConstants.HEADER_CONTENT_ID as the key. */ public String getContentId() { return getHeader(HEADER_CONTENT_ID); } /** @return The header with HTTPConstants.HEADER_CONTENT_LOCATION as the key. */ public String getContentLocation() { return getHeader(HEADER_CONTENT_LOCATION); } /** @return The header with HTTPConstants.HEADER_CONTENT_TYPE as the key. */ public String getContentType() { return getHeader(HEADER_CONTENT_TYPE); } /** * Don't want to support mark and reset since this may get us into concurrency problem when * different pieces of software may have a handle to the underlying InputStream. */ public boolean markSupported() { return false; } public void reset() throws IOException { throw new IOException("markNotSupported"); } public void mark(int readLimit) { // do nothing } public int read() throws IOException { int retval = _stream.read(); parentContainer.setReadyToGetNextStream(retval == -1); return retval; } public int read(byte[] b) throws IOException { int retval = _stream.read(b); parentContainer.setReadyToGetNextStream(retval == -1); return retval; } public int read(byte[] b, int off, int len) throws IOException { int retval = _stream.read(b, off, len); parentContainer.setReadyToGetNextStream(retval == -1); return retval; } } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/attachments/Part.java0000644000000000000000000000572511131637464026555 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.attachments; import javax.activation.DataHandler; import javax.mail.MessagingException; import java.io.IOException; import java.io.InputStream; import java.util.Enumeration; /** * Abstract for Part. A Part can be the SOAP Part or an Attachment Part. * There are several implementations for part, which are optimized for * space and time. * * A Part is created with the PartFactory. * * @see org.apache.axiom.attachments.impl.PartFactory */ public interface Part { /** * @return DataHandler representing this part * @throws MessagingException */ public DataHandler getDataHandler() throws MessagingException; /** * @return size * @throws MessagingException */ public long getSize() throws MessagingException; /** * @return content type of the part * @throws MessagingException */ public String getContentType() throws MessagingException; /** * @return content id of the part * @throws MessagingException */ public String getContentID() throws MessagingException; /** * The part may be backed by a file. If that is the case, * this method returns the file name. * * @return * @throws MessagingException * @deprecated The callers should not no how the part * is implemented. */ public String getFileName() throws MessagingException; /** * @return Get the part data as an input stream * @throws IOException * @throws MessagingException */ public InputStream getInputStream() throws IOException, MessagingException; /** * Add a Header (name, value) to the part * @param name * @param value * @throws MessagingException */ public void addHeader(String name, String value) throws MessagingException; /** * Get the value of a specific header * @param name * @return value or null * @throws MessagingException */ public String getHeader(String name) throws MessagingException; /** * @return Enumeration of javax.mail.Header * @throws MessagingException */ public Enumeration getAllHeaders() throws MessagingException; } ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/attachments/BoundaryDelimitedStream.javaaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/attachments/BoundaryDelimitedStream.jav0000644000000000000000000004156111131637464032264 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.attachments; import org.apache.axiom.om.OMException; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; /** This class takes the input stream and turns it multiple streams. */ public class BoundaryDelimitedStream extends java.io.FilterInputStream { /** The Log that this class should log all events to. */ protected static Log log = LogFactory.getLog(BoundaryDelimitedStream.class.getName()); protected byte[] boundary = null; /** The boundary length. */ int boundaryLen = 0; /** The boundary length plus crlf. */ int boundaryBufLen = 0; /** The source input stream. */ java.io.InputStream is = null; /** The stream has been closed. */ boolean closed = true; /** eof has been detected. */ boolean eos = false; /** There are no more streams left. */ boolean theEnd = false; /** Minimum to read at one time. */ int readbufsz = 0; /** The buffer we are reading. */ byte[] readbuf = null; /** Where we have read so far in the stream. */ int readBufPos = 0; /** The number of bytes in array. */ int readBufEnd = 0; /** Field BOUNDARY_NOT_FOUND. */ protected static final int BOUNDARY_NOT_FOUND = Integer.MAX_VALUE; // Where in the stream a boundary is located. /** Field boundaryPos. */ int boundaryPos = BOUNDARY_NOT_FOUND; /** The number of streams produced. */ static int streamCount = 0; /** Signal that a new stream has been created. */ protected static synchronized int newStreamNo() { log.debug("streamNo" + (streamCount + 1)); return ++streamCount; } /** Field streamNo. */ protected int streamNo = -1; // Keeps track of stream /** Field isDebugEnabled. */ static boolean isDebugEnabled = false; /** * Gets the next stream. From the previous using the same buffer size to read. * * @return the boundary delmited stream, null if there are no more streams. * @throws java.io.IOException if there was an error loading the data for the next stream */ public synchronized BoundaryDelimitedStream getNextStream() throws java.io.IOException { return getNextStream(readbufsz); } /** * Gets the next stream. From the previous using new buffer reading size. * * @param readbufsz * @return the boundary delmited stream, null if there are no more streams. * @throws java.io.IOException if there was an error loading the data for the next stream */ protected synchronized BoundaryDelimitedStream getNextStream( int readbufsz) throws java.io.IOException { BoundaryDelimitedStream ret = null; if (!theEnd) { // Create an new boundary stream that comes after this one. ret = new BoundaryDelimitedStream(this, readbufsz); } return ret; } /** * Constructor to create the next stream from the previous one. * * @param prev the previous stream * @param readbufsz how many bytes to make the read buffer * @throws java.io.IOException if there was a problem reading data from prev */ protected BoundaryDelimitedStream(BoundaryDelimitedStream prev, int readbufsz) throws java.io.IOException { super(null); streamNo = newStreamNo(); boundary = prev.boundary; boundaryLen = prev.boundaryLen; boundaryBufLen = prev.boundaryBufLen; skip = prev.skip; is = prev.is; closed = false; // The new one is not closed. eos = false; // Its not at th EOS. this.readbufsz = readbufsz; readbuf = prev.readbuf; // Move past the old boundary. readBufPos = prev.readBufPos + boundaryBufLen; readBufEnd = prev.readBufEnd; // find the new boundary. boundaryPos = boundaryPosition(readbuf, readBufPos, readBufEnd); prev.theEnd = theEnd; // The stream. } /** * Create a new boundary stream. * * @param is * @param boundary is the boundary that separates the individual streams. * @param readbufsz lets you have some control over the amount of buffering. by buffering you * can some effiency in searching. * @throws OMException */ BoundaryDelimitedStream( java.io.InputStream is, byte[] boundary, int readbufsz) throws OMException { // super (is); super(null); // we handle everything so this is not necessary, don't won't to hang on to a reference. isDebugEnabled = log.isDebugEnabled(); streamNo = newStreamNo(); closed = false; this.is = is; // Copy the boundary array to make certain it is never altered. this.boundary = new byte[boundary.length]; System.arraycopy(boundary, 0, this.boundary, 0, boundary.length); this.boundaryLen = this.boundary.length; // 2 for preceeding, and 2 for proceeding CRLF's this.boundaryBufLen = boundaryLen + 4; // allways leave room for at least a 2x boundary // Most mime boundaries are 40 bytes or so. this.readbufsz = Math.max((boundaryBufLen) * 2, readbufsz); } private int readFromStream(final byte[] b) throws java.io.IOException { return readFromStream(b, 0, b.length); } private int readFromStream( final byte[] b, final int start, final int length) throws java.io.IOException { int minRead = Math.max(boundaryBufLen * 2, length); minRead = Math.min(minRead, length - start); int br = 0; int brTotal = 0; do { br = is.read(b, brTotal + start, length - brTotal); if (br > 0) { brTotal += br; } } while ((br > -1) && (brTotal < minRead)); return (brTotal != 0) ? brTotal : br; } /** * Read from the boundary delimited stream. * * @param b is the array to read into. * @param off is the offset * @param len * @return the number of bytes read. -1 if endof stream. * @throws java.io.IOException */ public synchronized int read(byte[] b, final int off, final int len) throws java.io.IOException { if (closed) { throw new java.io.IOException("streamClosed"); } if (eos) { return -1; } if (readbuf == null) { // Allocate the buffer. readbuf = new byte[Math.max(len, readbufsz)]; readBufEnd = readFromStream(readbuf); if (readBufEnd < 0) { readbuf = null; closed = true; finalClose(); throw new java.io.IOException("eosBeforeMarker"); } readBufPos = 0; // Finds the boundary pos. boundaryPos = boundaryPosition(readbuf, 0, readBufEnd); } int bwritten = 0; // Number of bytes written. // read and copy bytes in. do { // Always allow to have a boundary length left in the buffer. int bcopy = Math.min(readBufEnd - readBufPos - boundaryBufLen, len - bwritten); // never go past the boundary. bcopy = Math.min(bcopy, boundaryPos - readBufPos); if (bcopy > 0) { System.arraycopy(readbuf, readBufPos, b, off + bwritten, bcopy); bwritten += bcopy; readBufPos += bcopy; } if (readBufPos == boundaryPos) { eos = true; // hit the boundary so it the end of the stream. log.debug("atEOS" + streamNo); } else if (bwritten < len) { // need to get more data. byte[] dstbuf = readbuf; if (readbuf.length < len) { dstbuf = new byte[len]; } int movecnt = readBufEnd - readBufPos; // copy what was left over. System.arraycopy(readbuf, readBufPos, dstbuf, 0, movecnt); // Read in the new data. int readcnt = readFromStream(dstbuf, movecnt, dstbuf.length - movecnt); if (readcnt < 0) { readbuf = null; closed = true; finalClose(); throw new java.io.IOException("eosBeforeMarker"); } readBufEnd = readcnt + movecnt; readbuf = dstbuf; readBufPos = 0; // start at the begining. // just move the boundary by what we moved if (BOUNDARY_NOT_FOUND != boundaryPos) { boundaryPos -= movecnt; } else { boundaryPos = boundaryPosition( readbuf, readBufPos, readBufEnd); // See if the boundary is now there. } } } // read till we get the amount or the stream is finished. while (!eos && (bwritten < len)); if (log.isDebugEnabled()) { if (bwritten > 0) { byte tb[] = new byte[bwritten]; System.arraycopy(b, off, tb, 0, bwritten); log.debug("readBStream" + new String[] { "" + bwritten, "" + streamNo, new String(tb) }); } } if (eos && theEnd) { readbuf = null; // dealloc even in Java. } return bwritten; } /** * Read from the boundary delimited stream. * * @param b is the array to read into. Read as much as possible into the size of this array. * @return the number of bytes read. -1 if endof stream. * @throws java.io.IOException */ public int read(byte[] b) throws java.io.IOException { return read(b, 0, b.length); } /** * Read from the boundary delimited stream. * * @return The byte read, or -1 if endof stream. * @throws java.io.IOException */ public int read() throws java.io.IOException { byte[] b = new byte[1]; // quick and dirty. //for now int read = read(b); if (read < 0) { return -1; } else { return b[0] & 0xff; } } /** * Closes the stream. * * @throws java.io.IOException */ public synchronized void close() throws java.io.IOException { if (closed) { return; } log.debug("bStreamClosed" + streamNo); closed = true; // mark it closed. if (!eos) { // We need get this off the stream. // Easy way to flush through the stream; byte[] readrest = new byte[1024 * 16]; int bread; do { bread = read(readrest); } while (bread > -1); } } /** * mark the stream. This is not supported. * * @param readlimit */ public void mark(int readlimit) { // do nothing } /** * reset the stream. This is not supported. * * @throws java.io.IOException */ public void reset() throws java.io.IOException { throw new java.io.IOException("attach.bounday.mns"); } /** markSupported return false; */ public boolean markSupported() { return false; } public int available() throws java.io.IOException { int bcopy = readBufEnd - readBufPos - boundaryBufLen; // never go past the boundary. bcopy = Math.min(bcopy, boundaryPos - readBufPos); return Math.max(0, bcopy); } /** * Read from the boundary delimited stream. * * @param searchbuf buffer to read from * @param start starting index * @param end ending index * @return The position of the boundary. Detects the end of the source stream. * @throws java.io.IOException if there was an error manipulating the underlying stream */ protected int boundaryPosition(byte[] searchbuf, int start, int end) throws java.io.IOException { int foundAt = boundarySearch(searchbuf, start, end); // First find the boundary marker if (BOUNDARY_NOT_FOUND != foundAt) { // Something was found. if (foundAt + boundaryLen + 2 > end) { foundAt = BOUNDARY_NOT_FOUND; } else { // If the marker has a "--" at the end then this is the last boundary. if ((searchbuf[foundAt + boundaryLen] == '-') && (searchbuf[foundAt + boundaryLen + 1] == '-')) { finalClose(); } else if ((searchbuf[foundAt + boundaryLen] != 13) || (searchbuf[foundAt + boundaryLen + 1] != 10)) { // If there really was no crlf at then end then this is not a boundary. foundAt = BOUNDARY_NOT_FOUND; } if ((foundAt != BOUNDARY_NOT_FOUND) && (searchbuf[foundAt - 2] == 13) && (searchbuf[foundAt - 1] == 10)) { // Section 7.2.1 of the MIME RFC (#1521) states that CRLF // preceeding boundary is part of the encapsulation // boundary foundAt -= 2; } } } return foundAt; } /* The below uses a standard textbook Boyer-Moore pattern search. */ private int[] skip = null; private int boundarySearch(final byte[] text, final int start, final int end) { // log.debug(">>>>" + start + "," + end); int i = 0, j = 0, k = 0; if (boundaryLen > (end - start)) { return BOUNDARY_NOT_FOUND; } if (null == skip) { skip = new int[256]; java.util.Arrays.fill(skip, boundaryLen); for (k = 0; k < boundaryLen - 1; k++) { skip[boundary[k]] = boundaryLen - k - 1; } } for (k = start + boundaryLen - 1; k < end; k += skip[text[k] & (0xff)]) { // log.debug(">>>>" + k); // printarry(text, k-boundaryLen+1, end); try { for (j = boundaryLen - 1, i = k; (j >= 0) && (text[i] == boundary[j]); j--) { i--; } } catch (ArrayIndexOutOfBoundsException e) { StringBuffer sb = new StringBuffer(); sb.append(">>>").append(e); // rr temporary till a boundary issue is resolved. sb.append("start=").append(start); sb.append("k=").append(k); sb.append("text.length=").append(text.length); sb.append("i=").append(i); sb.append("boundary.length=").append(boundary.length); sb.append("j=").append(j); sb.append("end=").append(end); log.warn("exception01" + sb.toString()); throw e; } if (j == (-1)) { return i + 1; } } // log.debug(">>>> not found" ); return BOUNDARY_NOT_FOUND; } /** * Close the underlying stream and remove all references to it. * * @throws java.io.IOException if the stream could not be closed */ protected void finalClose() throws java.io.IOException { if (theEnd) return; theEnd = true; is.close(); is = null; } /** * Method printarry * * @param b * @param start * @param end */ public static void printarry(byte[] b, int start, int end) { if (log.isDebugEnabled()) { byte tb[] = new byte[end - start]; System.arraycopy(b, start, tb, 0, end - start); log.debug("\"" + new String(tb) + "\""); } } } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/attachments/SizeAwareDataSource.java0000644000000000000000000000306711131637464031511 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.attachments; import javax.activation.DataSource; /** * Optional extension interface that can be implemented by data sources that support a * getSize method. * Code working with data sources can use this interface to optimize certain operations. * An example is * {@link org.apache.axiom.attachments.impl.BufferUtils#doesDataHandlerExceedLimit(javax.activation.DataHandler, int)}. */ public interface SizeAwareDataSource extends DataSource { /** * Get the size of the data source. * Implementations must return the number of bytes that can be read from * the input stream returned by {@link #getInputStream()} before reaching * the end of the stream. * * @return the size of the data source */ long getSize(); } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/attachments/utils/0000755000000000000000000000000011131637464026133 5ustar rootrootaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/attachments/utils/BAAOutputStream.java0000644000000000000000000000701511131637464031761 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.attachments.utils; import org.apache.axiom.attachments.impl.BufferUtils; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.ArrayList; /** * BAAOutputStream is like a ByteArrayOutputStream. * A ByteArrayOutputStream stores the backing data in a byte[]. * BAAOutputStream stores the backing data in a Array of * byte[]. Using several non-contiguous chunks reduces * memory copy and resizing. */ public class BAAOutputStream extends OutputStream { ArrayList data = new ArrayList(); final static int BUFFER_SIZE = BufferUtils.BUFFER_LEN; int index = 0; byte[] currBuffer = null; public BAAOutputStream() { super(); addBuffer(); } private void addBuffer() { currBuffer = new byte[BUFFER_SIZE]; data.add(currBuffer); index = 0; } public void write(byte[] b, int off, int len) throws IOException { int total = 0; while (total < len) { int copy = Math.min(len-total, BUFFER_SIZE-index); System.arraycopy(b, off, currBuffer, index, copy); total += copy; index += copy; off += copy; if (index >= BUFFER_SIZE) { addBuffer(); } } } public void write(byte[] b) throws IOException { this.write(b, 0, b.length); } byte[] writeByte = new byte[1]; public void write(int b) throws IOException { writeByte[0] = (byte) b; this.write(writeByte, 0, 1); } public ArrayList buffers() { return data; } public int length() { return (BUFFER_SIZE * (data.size()-1)) + index; } /** * @param is InputStream containing data * @param maxRead the maximum number of bytes to receive * @return bytesReceived */ public long receive(InputStream is, long maxRead) throws IOException { long bytesReceived = 0; // Now directly write to the buffers boolean done = false; while (!done) { // Don't get more than will fit in the current buffer int len = (int) Math.min(BUFFER_SIZE - index, maxRead-bytesReceived); // Now get the bytes int bytesRead = is.read(currBuffer, index, len); if (bytesRead >= 0) { bytesReceived += bytesRead; index += bytesRead; if (index >= BUFFER_SIZE) { addBuffer(); } if (bytesReceived >= maxRead) { done = true; } } else { done = true; } } return bytesReceived; } } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/attachments/utils/BAAInputStream.java0000644000000000000000000000772511131637464031570 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.attachments.utils; import org.apache.axiom.attachments.impl.BufferUtils; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.ArrayList; /** * BAAInputStream is like a ByteArrayInputStream. * A ByteArrayInputStream stores the backing data in a byte[]. * BAAInputStream stores the backing data in a Array of * byte[]. Using several non-contiguous chunks reduces * memory copy and resizing. */ public class BAAInputStream extends InputStream { ArrayList data = new ArrayList(); final static int BUFFER_SIZE = BufferUtils.BUFFER_LEN; int i; int size; int currIndex; int totalIndex; int mark = 0; byte[] currBuffer = null; byte[] read_byte = new byte[1]; public BAAInputStream(ArrayList data, int size) { this.data = data; this.size = size; i = 0; currIndex = 0; totalIndex = 0; currBuffer = (byte[]) data.get(0); } public int read() throws IOException { int read = read(read_byte); if (read < 0) { return -1; } else { return read_byte[0] & 0xFF; } } public int available() throws IOException { return size - totalIndex; } public synchronized void mark(int readlimit) { mark = totalIndex; } public boolean markSupported() { return true; } public int read(byte[] b, int off, int len) throws IOException { int total = 0; if (totalIndex >= size) { return -1; } while (total < len && totalIndex < size) { int copy = Math.min(len - total, BUFFER_SIZE - currIndex); copy = Math.min(copy, size - totalIndex); System.arraycopy(currBuffer, currIndex, b, off, copy); total += copy; currIndex += copy; totalIndex += copy; off += copy; if (currIndex >= BUFFER_SIZE) { if (i+1 < data.size()) { currBuffer = (byte[]) data.get(i+1); i++; currIndex = 0; } else { currBuffer = null; currIndex = BUFFER_SIZE; } } } return total; } public int read(byte[] b) throws IOException { return this.read(b, 0, b.length); } public synchronized void reset() throws IOException { i = mark / BUFFER_SIZE; currIndex = mark - (i * BUFFER_SIZE); currBuffer = (byte[]) data.get(i); totalIndex = mark; } /** * Write all of the buffers to the output stream * @param os * @throws IOException */ public void writeTo(OutputStream os) throws IOException { if (data != null) { int numBuffers = data.size(); for (int j = 0; j < numBuffers-1; j ++) { os.write( (byte[]) data.get(j), 0, BUFFER_SIZE); } if (numBuffers > 0) { int writeLimit = size - ((numBuffers-1) * BUFFER_SIZE); os.write( (byte[]) data.get(numBuffers-1), 0, writeLimit); } } } } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/attachments/utils/ByteSearch.java0000644000000000000000000001776211131637464031044 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.attachments.utils; /** * ByteSearch * * Various byte array searching utilities. * This includes a "skip search", which is a * an optimized search for finding a byte pattern in * a large byte array. * * @author Richard Scheuerle (scheu@us.ibm.com) * */ public class ByteSearch { /** * Search a byte sequence for a given pattern. The method uses the * skip search algorithm. The search can be performed in forward * or backward direction, i.e. beginning from the start or end of the * byte sequence. * * @param pattern byte[] * @param direction true if forward, false if backward * @param buffer byte[] to search * @param start index to start search * @param end index to end search (end index is not within the search) * @param skipArray short[256] A skipArray generated from a call to * generateSkipArray. * @return index or -1 if not found */ public static int skipSearch(byte[] pattern, boolean direction, byte[] buffer, int start, int end, short[] skip) { int patternLength = pattern.length; // If patternLength is larger than buffer, // return not found if (patternLength > (end - start)) { return -1; } if (direction) { int k = 0; for (k = start + patternLength - 1; k < end; // end is exclusive k += skip[buffer[k] & (0xff)]) // SKIP NOTE below { try { // k is the location in the buffer // that may match the last byte in the pattern. if (isEqual(pattern, buffer, (k-patternLength)+1, end)) { return (k-patternLength)+1; } // SKIP NOTE: The next k index is calculated from // the skip array. Basically if the k byte is not // within the pattern, we skip ahead the length of the // pattern. Otherwise we skip ahead a distance less // than the length. } catch (ArrayIndexOutOfBoundsException e) { throw e; } } } else { for (int k = end - patternLength; k <= start; k -= skip[buffer[k] & (0xff)]) { try { // k is the location in the buffer // that may match the first byte in the pattern. if (isEqual(pattern, buffer, k, end)) { return k; } } catch (ArrayIndexOutOfBoundsException e) { throw e; } } } return -1; } /** * skipArray * Builds a skip array for this pattern and direction. * The skipArray is used in the optimized skipSearch * @param pattern * @param direction * @return short[256] */ public static short[] getSkipArray(byte[] pattern, boolean direction) { // The index key is a byte. // The short[key] is the number of bytes that can // be skipped that won't match the pattern short[] skip = new short[256]; // If a byte is not within pattern, then we can // skip ahead the entire length of the pattern. // So fill the skip array with the pattern length java.util.Arrays.fill(skip, (short) pattern.length); if (direction) { // If the byte is found in the pattern, // this affects how far we can skip. // The skip distance is the distance of the // character from the end of the pattern. // The last character in the pattern is excluded. for (int k = 0; k < pattern.length -1; k++) { skip[pattern[k] & (0xff)] = (short)(pattern.length - k - 1); } } else { for (int k = pattern.length-2; k >= 0; k--) { skip[pattern[k] &(0xff)] = (short)(pattern.length - k - 1); } } return skip; } /** * * isEqual * @param pattern * @param buffer * @param start index * @param end index * @return true if the bytes in buffer[start] equal pattern * */ public static boolean isEqual(byte[] pattern, byte[] buffer, int start, int end) { // if (pattern.length >= end-start) { if (pattern.length > end-start) { return false; } for (int j=0; j= end) { found = false; } else { found = (bytes[i+i2] == search[i2]); } } // If found match, set return idx if (found) { idx = i; } } } } else { for (int i=end-1; idx < 0 && i>=start; i--) { if (bytes[i] == search[0]) { // Potential match..check remaining bytes boolean found = true; // assume found for (int i2=1; found && i2= end) { found = false; } else { found = (bytes[i+i2] == search[i2]); } } // If found match, set return idx if (found) { idx = i; } } } } return idx; } } ././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/attachments/utils/DataHandlerUtils.javaaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/attachments/utils/DataHandlerUtils.java0000644000000000000000000000270011131637464032165 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.attachments.utils; import org.apache.axiom.attachments.ByteArrayDataSource; import org.apache.axiom.om.util.Base64; import javax.activation.DataHandler; public class DataHandlerUtils { public static Object getDataHandlerFromText(String value, String mimeType) { ByteArrayDataSource dataSource; byte[] data = Base64.decode(value); if (mimeType != null) { dataSource = new ByteArrayDataSource(data, mimeType); } else { // Assumes type as application/octet-stream dataSource = new ByteArrayDataSource(data); } return new DataHandler(dataSource); } } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/attachments/utils/IOUtils.java0000644000000000000000000000650511131637464030334 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.attachments.utils; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; /** Utility class containing IO helper methods */ public class IOUtils { private IOUtils() { } /** * Reads into a byte array. Ensures that the full buffer is read. Helper method, just calls * readFully(in, b, 0, b.length) * * @see #readFully(java.io.InputStream, byte[], int, int) */ public static int readFully(InputStream in, byte[] b) throws IOException { return readFully(in, b, 0, b.length); } /** * Same as the normal in.read(b, off, len), but tries to ensure that the entire len * number of bytes is read. * * @return Returns the number of bytes read, or -1 if the end of file is reached before any * bytes are read */ public static int readFully(InputStream in, byte[] b, int off, int len) throws IOException { int total = 0; for (; ;) { int got = in.read(b, off + total, len - total); if (got < 0) { return (total == 0) ? -1 : total; } else { total += got; if (total == len) return total; } } } /** * Returns the contents of the input stream as byte array. * * @param stream the InputStream * @return the stream content as byte array */ public static byte[] getStreamAsByteArray(InputStream stream) throws IOException { return getStreamAsByteArray(stream, -1); } /** * Returns the contents of the input stream as byte array. * * @param stream the InputStream * @param length the number of bytes to copy, if length < 0, the number is unlimited * @return the stream content as byte array */ public static byte[] getStreamAsByteArray(InputStream stream, int length) throws IOException { if (length == 0) return new byte[0]; boolean checkLength = true; if (length < 0) { length = Integer.MAX_VALUE; checkLength = false; } ByteArrayOutputStream byteStream = new ByteArrayOutputStream(); int nextValue = stream.read(); if (checkLength) length--; while (-1 != nextValue && length >= 0) { byteStream.write(nextValue); nextValue = stream.read(); if (checkLength) length--; } return byteStream.toByteArray(); } } ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/attachments/IncomingAttachmentStreams.javaaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/attachments/IncomingAttachmentStreams.j0000644000000000000000000000400411131637464032257 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.attachments; import org.apache.axiom.om.OMException; /** * Container for AttachmentStream s. This class provides an SwA like access mechanism, allowing * applications to access the streams directly. Access it intentionally restrictred to either SwA * like (stream access), or MTOM like (part/data handler access via blob id), not both. */ public abstract class IncomingAttachmentStreams { /** * Boolean indicating weather or not the next stream can be read (next stream cannot be read until * previous is consumed */ protected boolean _readyToGetNextStream = true; /** @return True if the next stream can be read, false otherwise. */ public final boolean isReadyToGetNextStream() { return _readyToGetNextStream; } /** * Set the ready flag. Intended for the inner class to use. * * @param ready */ protected final void setReadyToGetNextStream(boolean ready) { _readyToGetNextStream = ready; } /** * Returns the next attachment stream in sequence. * * @return The next stream or null if no additional streams are left. */ public abstract IncomingAttachmentInputStream getNextStream() throws OMException; }././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/attachments/ConfigurableDataHandler.javaaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/attachments/ConfigurableDataHandler.jav0000644000000000000000000000516411131637464032173 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.attachments; import javax.activation.DataHandler; import javax.activation.DataSource; import java.net.URL; /** * This Axiom DataHandler inplementation allows the user to set custom values for the following MIME * body part headers.
  • content-transfer-encoding
  • content-type

Data * written to the MIME part gets encoded by content-transfer-encoding specified as above

*

*

Usage is Similar to the javax.activation.DataHandler except for the setting of the above * properties.

eg:

dataHandler = new ConfigurableDataHandler(new * ByteArrayDataSource(byteArray));

dataHandler.setTransferEncoding("quoted-printable");

*

dataHandler.setContentType("image/jpg");

* * @see javax.activation.DataHandler */ public class ConfigurableDataHandler extends DataHandler { private String transferEncoding; private String contentType; private String contentID; public ConfigurableDataHandler(DataSource arg0) { super(arg0); } public ConfigurableDataHandler(Object arg0, String arg1) { super(arg0, arg1); } public ConfigurableDataHandler(URL arg0) { super(arg0); } // public String getContentID() { // return contentID; // } // // public void setContentID(String contentID) { // this.contentID = contentID; // } public String getContentType() { if (contentType != null) { return contentType; } else { return super.getContentType(); } } public void setContentType(String contentType) { this.contentType = contentType; } public String getTransferEncoding() { return transferEncoding; } public void setTransferEncoding(String transferEncoding) { this.transferEncoding = transferEncoding; } } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/attachments/impl/0000755000000000000000000000000011131637464025734 5ustar rootrootaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/attachments/impl/PartOnMemory.java0000644000000000000000000001035311131637464031175 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.attachments.impl; import org.apache.axiom.om.OMException; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import javax.activation.DataHandler; import javax.activation.DataSource; import javax.mail.MessagingException; import javax.mail.internet.MimeUtility; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.Hashtable; /** * PartOnMemory stores the attachment in memory (in a byte[]) * This implementation is used for smaller attachments to enhance * performance. * * The PartOnMemory object is created by the PartFactory * @see org.apache.axiom.attachments.impl.PartFactory. */ public class PartOnMemory extends AbstractPart { private static Log log = LogFactory.getLog(PartOnMemory.class); byte[] bytes; int length; /** * Construct a PartOnMemory * @param headers * @param bytes * @param length (length of data in bytes) */ PartOnMemory(Hashtable headers, byte[] bytes, int length) { super(headers); this.bytes = bytes; this.length = length; } public DataHandler getDataHandler() throws MessagingException { DataSource ds = new MyByteArrayDataSource(); return new DataHandler(ds); } /* (non-Javadoc) * @see org.apache.axiom.attachments.impl.AbstractPart#getFileName() */ public String getFileName() throws MessagingException { // There is no file name return null; } public InputStream getInputStream() throws IOException, MessagingException { return new ByteArrayInputStream(bytes, 0, length); } public long getSize() throws MessagingException { return length; } /** * A DataSource that is backed by the byte[] and * headers map. */ class MyByteArrayDataSource implements DataSource { /* (non-Javadoc) * @see javax.activation.DataSource#getContentType() */ public String getContentType() { String ct = getHeader("content-type"); return (ct == null) ? "application/octet-stream" : ct; } /* (non-Javadoc) * @see javax.activation.DataSource#getInputStream() */ public InputStream getInputStream() throws IOException { InputStream is = new ByteArrayInputStream(bytes, 0, length); String cte = null; try { cte = getContentTransferEncoding(); if(cte != null){ if(log.isDebugEnabled()){ log.debug("Start Decoding stream"); } return MimeUtility.decode(is, cte); } } catch (MessagingException e) { if(log.isDebugEnabled()){ log.debug("Stream Failed decoding"); } throw new OMException(e); } return is; } /* (non-Javadoc) * @see javax.activation.DataSource#getName() */ public String getName() { return "MyByteArrayDataSource"; } /* (non-Javadoc) * @see javax.activation.DataSource#getOutputStream() */ public OutputStream getOutputStream() throws IOException { throw new IOException("Not Supported"); } } } ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/attachments/impl/PartOnMemoryEnhanced.javaaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/attachments/impl/PartOnMemoryEnhanced.j0000644000000000000000000001161611131637464032136 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.attachments.impl; import org.apache.axiom.attachments.utils.BAAInputStream; import org.apache.axiom.om.OMException; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import javax.activation.DataHandler; import javax.activation.DataSource; import javax.mail.MessagingException; import javax.mail.internet.MimeUtility; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.ArrayList; import java.util.Hashtable; /** * PartOnMemoryEnhanced stores the attachment in memory (in non-contigous byte arrays) * This implementation is used for smaller attachments to enhance * performance. * * The PartOnMemoryEnhanced object is created by the PartFactory * @see org.apache.axiom.attachments.impl.PartFactory. */ public class PartOnMemoryEnhanced extends AbstractPart { private static Log log = LogFactory.getLog(PartOnMemoryEnhanced.class); ArrayList data; // Arrays of 4K buffers int length; // total length of data /** * Construct a PartOnMemory * @param headers * @param data array list of 4K byte[] * @param length (length of data in bytes) */ PartOnMemoryEnhanced(Hashtable headers, ArrayList data, int length) { super(headers); this.data = data; this.length = length; } public DataHandler getDataHandler() throws MessagingException { DataSource ds = new MyByteArrayDataSource(); return new MyDataHandler(ds); } /* (non-Javadoc) * @see org.apache.axiom.attachments.impl.AbstractPart#getFileName() */ public String getFileName() throws MessagingException { // There is no file name return null; } public InputStream getInputStream() throws IOException, MessagingException { return new BAAInputStream(data, length); } public long getSize() throws MessagingException { return length; } class MyDataHandler extends DataHandler { DataSource ds; public MyDataHandler(DataSource ds) { super(ds); this.ds = ds; } public void writeTo(OutputStream os) throws IOException { InputStream is = ds.getInputStream(); if (is instanceof BAAInputStream) { ((BAAInputStream)is).writeTo(os); } else { BufferUtils.inputStream2OutputStream(is, os); } } } /** * A DataSource that is backed by the byte[] and * headers map. */ class MyByteArrayDataSource implements DataSource { /* (non-Javadoc) * @see javax.activation.DataSource#getContentType() */ public String getContentType() { String ct = getHeader("content-type"); return (ct == null) ? "application/octet-stream" : ct; } /* (non-Javadoc) * @see javax.activation.DataSource#getInputStream() */ public InputStream getInputStream() throws IOException { InputStream is = new BAAInputStream(data, length); String cte = null; try { cte = getContentTransferEncoding(); if(cte != null){ if(log.isDebugEnabled()){ log.debug("Start Decoding stream"); } return MimeUtility.decode(is, cte); } } catch (MessagingException e) { if(log.isDebugEnabled()){ log.debug("Stream Failed decoding"); } throw new OMException(e); } return is; } /* (non-Javadoc) * @see javax.activation.DataSource#getName() */ public String getName() { return "MyByteArrayDataSource"; } /* (non-Javadoc) * @see javax.activation.DataSource#getOutputStream() */ public OutputStream getOutputStream() throws IOException { throw new IOException("Not Supported"); } } } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/attachments/impl/AbstractPart.java0000644000000000000000000001152311131637464031173 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.attachments.impl; import org.apache.axiom.attachments.Part; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import javax.activation.DataHandler; import javax.mail.Header; import javax.mail.MessagingException; import javax.mail.internet.HeaderTokenizer; import java.io.IOException; import java.io.InputStream; import java.util.Enumeration; import java.util.Hashtable; /** * AbstractPart is a base class for the actual * Part implementations. The primary purpose of AbstractPart is * to define some of the common methods to promote code reuse. */ abstract class AbstractPart implements Part { private static Log log = LogFactory.getLog(AbstractPart.class); // Key is the lower-case name. // Value is a javax.mail.Header object private Hashtable headers; /** * The actual parts are constructed with the PartFactory. * @see org.apache.axiom.attachments.impl.PartFactory * @param headers */ AbstractPart(Hashtable in) { headers = in; if (headers == null) { headers = new Hashtable(); } } public void addHeader(String name, String value) { if (log.isDebugEnabled()){ log.debug("addHeader: (" + name + ") value=(" + value +")"); } Header headerObj = new Header(name, value); // Use the lower case name as the key String key = name.toLowerCase(); headers.put(key, headerObj); } public Enumeration getAllHeaders() throws MessagingException { if(log.isDebugEnabled()){ log.debug("getAllHeaders"); } return headers.elements(); } public String getHeader(String name) { String key = name.toLowerCase(); Header header = (Header) headers.get(key); String value = header == null ? null : header.getValue(); if(log.isDebugEnabled()){ log.debug("getHeader name=(" + name + ") value=(" + value +")"); } return value; } public String getContentID() throws MessagingException { return getHeader("content-id"); } public String getContentType() throws MessagingException { return getHeader("content-type"); } /** * @return contentTransferEncoding * @throws MessagingException */ public String getContentTransferEncoding() throws MessagingException { if(log.isDebugEnabled()){ log.debug("getContentTransferEncoding()"); } String cte = getHeader("content-transfer-encoding"); if(log.isDebugEnabled()){ log.debug(" CTE =" + cte); } if(cte!=null){ cte = cte.trim(); if(cte.equalsIgnoreCase("7bit") || cte.equalsIgnoreCase("8bit") || cte.equalsIgnoreCase("quoted-printable") || cte.equalsIgnoreCase("base64")){ return cte; } HeaderTokenizer ht = new HeaderTokenizer(cte, HeaderTokenizer.MIME); boolean done = false; while(!done){ HeaderTokenizer.Token token = ht.next(); switch(token.getType()){ case HeaderTokenizer.Token.EOF: if(log.isDebugEnabled()){ log.debug("HeaderTokenizer EOF"); } done = true; break; case HeaderTokenizer.Token.ATOM: return token.getValue(); } } return cte; } return null; } // The following classes must be implemented by the derived class. public abstract DataHandler getDataHandler() throws MessagingException; public abstract String getFileName() throws MessagingException; public abstract InputStream getInputStream() throws IOException, MessagingException; public abstract long getSize() throws MessagingException; } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/attachments/impl/BufferUtils.java0000644000000000000000000003165511131637464031043 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.attachments.impl; import java.io.ByteArrayInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.nio.ByteBuffer; import java.nio.channels.FileChannel; import java.nio.channels.FileLock; import javax.activation.DataHandler; import javax.activation.DataSource; import javax.activation.FileDataSource; import org.apache.axiom.attachments.SizeAwareDataSource; import org.apache.axiom.attachments.utils.BAAOutputStream; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; /** * Attachment processing uses a lot of buffers. * The BufferUtils class attempts to reuse buffers to prevent * excessive GarbageCollection */ public class BufferUtils { private static Log log = LogFactory.getLog(BufferUtils.class); // Performance testing indicates that 4K is the best size for medium // and small payloads. And there is a neglible effect on large payloads. public final static int BUFFER_LEN = 4 * 1024; // Copy Buffer size static boolean ENABLE_FILE_CHANNEL = true; // Enable file channel optimization static boolean ENABLE_BAAOS_OPT = true; // Enable BAAOutputStream opt private static byte[] _cacheBuffer = new byte[BUFFER_LEN]; private static boolean _cacheBufferInUse = false; private static ByteBuffer _cacheByteBuffer = ByteBuffer.allocate(BUFFER_LEN); private static boolean _cacheByteBufferInUse = false; /** * Private utility to write the InputStream contents to the OutputStream. * @param is * @param os * @throws IOException */ public static void inputStream2OutputStream(InputStream is, OutputStream os) throws IOException { // If this is a FileOutputStream, use the optimized method if (ENABLE_FILE_CHANNEL && os instanceof FileOutputStream) { if (inputStream2FileOutputStream(is, (FileOutputStream) os)) { return; } } // If this is a BAAOutputStream, use the optimized method if (ENABLE_BAAOS_OPT && os instanceof BAAOutputStream) { inputStream2BAAOutputStream(is, (BAAOutputStream) os, Long.MAX_VALUE); return; } byte[] buffer = getTempBuffer(); try { int bytesRead = is.read(buffer); // Continue reading until no bytes are read and no // bytes are now available. while (bytesRead > 0 || is.available() > 0) { if (bytesRead > 0) { os.write(buffer, 0, bytesRead); } bytesRead = is.read(buffer); } } finally { releaseTempBuffer(buffer); } } /** * @param is InputStream * @param os OutputStream * @param limit maximum number of bytes to read * @return total bytes read * @throws IOException */ public static int inputStream2OutputStream(InputStream is, OutputStream os, int limit) throws IOException { // If this is a BAAOutputStream, use the optimized method if (ENABLE_BAAOS_OPT && os instanceof BAAOutputStream) { return (int) inputStream2BAAOutputStream(is, (BAAOutputStream) os, (long) limit); } byte[] buffer = getTempBuffer(); int totalWritten = 0; int bytesRead = 0; try { do { int len = (limit-totalWritten) > BUFFER_LEN ? BUFFER_LEN : (limit-totalWritten); bytesRead = is.read(buffer, 0, len); if (bytesRead > 0) { os.write(buffer, 0, bytesRead); if (bytesRead > 0) { totalWritten += bytesRead; } } } while (totalWritten < limit && (bytesRead > 0 || is.available() > 0)); return totalWritten; } finally { releaseTempBuffer(buffer); } } /** * Opimized writing to FileOutputStream using a channel * @param is * @param fos * @return false if lock was not aquired * @throws IOException */ public static boolean inputStream2FileOutputStream(InputStream is, FileOutputStream fos) throws IOException { // See if a file channel and lock can be obtained on the FileOutputStream FileChannel channel = null; FileLock lock = null; ByteBuffer bb = null; try { channel = fos.getChannel(); if (channel != null) { lock = channel.tryLock(); } bb = getTempByteBuffer(); } catch (Throwable t) { } if (lock == null || bb == null || !bb.hasArray()) { releaseTempByteBuffer(bb); return false; // lock could not be set or bb does not have direct array access } try { // Read directly into the ByteBuffer array int bytesRead = is.read(bb.array()); // Continue reading until no bytes are read and no // bytes are now available. while (bytesRead > 0 || is.available() > 0) { if (bytesRead > 0) { int written = 0; if (bytesRead < BUFFER_LEN) { // If the ByteBuffer is not full, allocate a new one ByteBuffer temp = ByteBuffer.allocate(bytesRead); temp.put(bb.array(), 0, bytesRead); temp.position(0); written = channel.write(temp); } else { // Write to channel bb.position(0); written = channel.write(bb); bb.clear(); } } // REVIEW: Do we need to ensure that bytesWritten is // the same as the number of bytes sent ? bytesRead = is.read(bb.array()); } } finally { // Release the lock lock.release(); releaseTempByteBuffer(bb); } return true; } /** * inputStream2BAAOutputStream * @param is * @param baaos * @param limit * @return */ public static long inputStream2BAAOutputStream(InputStream is, BAAOutputStream baaos, long limit) throws IOException { return baaos.receive(is, limit); } /** * Exception used by SizeLimitedOutputStream if the size limit has been exceeded. */ private static class SizeLimitExceededException extends IOException { private static final long serialVersionUID = -6644887187061182165L; } /** * An output stream that counts the number of bytes written to it and throws an * exception when the size exceeds a given limit. */ private static class SizeLimitedOutputStream extends OutputStream { private final int maxSize; private int size; public SizeLimitedOutputStream(int maxSize) { this.maxSize = maxSize; } public void write(byte[] b, int off, int len) throws IOException { size += len; checkSize(); } public void write(byte[] b) throws IOException { size += b.length; checkSize(); } public void write(int b) throws IOException { size++; checkSize(); } private void checkSize() throws SizeLimitExceededException { if (size > maxSize) { throw new SizeLimitExceededException(); } } } /** * The method checks to see if attachment is eligble for optimization. * An attachment is eligible for optimization if and only if the size of * the attachment is greated then the optimzation threshold size limit. * if the Content represented by DataHandler has size less than the * optimize threshold size, the attachment will not be eligible for * optimization, instead it will be inlined. * returns 1 if DataHandler data is bigger than limit. * returns 0 if DataHandler data is smaller. * return -1 if an error occurs or unsupported. * @param in * @return * @throws IOException */ public static int doesDataHandlerExceedLimit(DataHandler dh, int limit){ //If Optimized Threshold not set return true. if(limit==0){ return -1; } DataSource ds = dh.getDataSource(); if (ds instanceof SizeAwareDataSource) { return ((SizeAwareDataSource)ds).getSize() > limit ? 1 : 0; } else if (ds instanceof javax.mail.util.ByteArrayDataSource) { // Special optimization for JavaMail's ByteArrayDataSource (Axiom's ByteArrayDataSource // already implements SizeAwareDataSource and doesn't need further optimization): // we know that ByteArrayInputStream#available() directly returns the size of the // data source. try { return ((ByteArrayInputStream)ds.getInputStream()).available() > limit ? 1 : 0; } catch (IOException ex) { // We will never get here... return -1; } } else if (ds instanceof FileDataSource) { // Special optimization for FileDataSources: no need to open and read the file // to know its size! return ((FileDataSource)ds).getFile().length() > limit ? 1 : 0; } else { // In all other cases, we prefer DataHandler#writeTo over DataSource#getInputStream. // The reason is that if the DataHandler was constructed from an Object rather than // a DataSource, a call to DataSource#getInputStream() will start a new thread and // return a PipedInputStream. This is so for Geronimo's as well as Sun's JAF // implementaion. The reason is that DataContentHandler only has a writeTo and no // getInputStream method. Obviously starting a new thread just to check the size of // the data is an overhead that we should avoid. try { dh.writeTo(new SizeLimitedOutputStream(limit)); } catch (SizeLimitExceededException ex) { return 1; } catch (IOException ex) { log.warn(ex.getMessage()); return -1; } return 0; } } private static synchronized byte[] getTempBuffer() { // Try using cached buffer synchronized(_cacheBuffer) { if (!_cacheBufferInUse) { _cacheBufferInUse = true; return _cacheBuffer; } } // Cache buffer in use, create new buffer return new byte[BUFFER_LEN]; } private static void releaseTempBuffer(byte[] buffer) { // Try using cached buffer synchronized(_cacheBuffer) { if (buffer == _cacheBuffer) { _cacheBufferInUse = false; } } } private static synchronized ByteBuffer getTempByteBuffer() { // Try using cached buffer synchronized(_cacheByteBuffer) { if (!_cacheByteBufferInUse) { _cacheByteBufferInUse = true; return _cacheByteBuffer; } } // Cache buffer in use, create new buffer return ByteBuffer.allocate(BUFFER_LEN); } private static void releaseTempByteBuffer(ByteBuffer buffer) { // Try using cached buffer synchronized(_cacheByteBuffer) { if (buffer == _cacheByteBuffer) { _cacheByteBufferInUse = false; } } } } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/attachments/impl/PartFactory.java0000644000000000000000000003363211131637464031044 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.attachments.impl; import org.apache.axiom.attachments.MIMEBodyPartInputStream; import org.apache.axiom.attachments.Part; import org.apache.axiom.attachments.lifecycle.LifecycleManager; import org.apache.axiom.attachments.utils.BAAInputStream; import org.apache.axiom.attachments.utils.BAAOutputStream; import org.apache.axiom.om.OMException; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import javax.mail.Header; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; import java.util.Hashtable; import java.util.Map; /** * The PartFactory creates an object that represents a Part * (implements the Part interface). There are different ways * to represent a part (backing file or backing array etc.). * These different implementations should not be exposed to the * other layers of the code. The PartFactory helps maintain this * abstraction, and makes it easier to add new implementations. */ public class PartFactory { private static int inflight = 0; // How many attachments are currently being built. private static String semifore = "PartFactory.semifore"; private static Log log = LogFactory.getLog(PartFactory.class); // Maximum number of threads allowed through createPart private static int INFLIGHT_MAX = 4; // Constants for dynamic threshold // Dynamic Threshold = availMemory / THRESHOLD_FACTOR private static final int THRESHOLD_FACTOR = 5; /** * Creates a part from the input stream. * The remaining parameters are used to determine if the * part should be represented in memory (byte buffers) or * backed by a file. * * @param in MIMEBodyPartInputStream * @param isSOAPPart * @param thresholdSize * @param attachmentDir * @param messageContentLength * @return Part * @throws OMException if any exception is encountered while processing. */ public static Part createPart(LifecycleManager manager, MIMEBodyPartInputStream in, boolean isSOAPPart, int thresholdSize, String attachmentDir, int messageContentLength ) throws OMException { if(log.isDebugEnabled()){ log.debug("Start createPart()"); log.debug(" isSOAPPart=" + isSOAPPart); log.debug(" thresholdSize= " + thresholdSize); log.debug(" attachmentDir=" + attachmentDir); log.debug(" messageContentLength " + messageContentLength); } try { // Read enough of the InputStream to build the headers // The readHeaders returns some extra bits that were read, but are part // of the data section. Hashtable headers = new Hashtable(); InputStream dross = readHeaders(in, headers); Part part; try { // Message throughput is increased if the number of threads in this // section is limited to INFLIGHT_MAX. Allowing more threads tends to cause // thrashing while reading from the HTTP InputStream. // Allowing fewer threads reduces the thrashing. And when the remaining threads // are notified their input (chunked) data is available. // // Note: SOAPParts are at the beginning of the message and much smaller than attachments, // so don't wait on soap parts. if (!isSOAPPart) { synchronized(semifore) { if (inflight >= INFLIGHT_MAX) { semifore.wait(); } inflight++; } } // Get new threshold based on the current available memory in the runtime. // We only use the thresholds for non-soap parts. if (!isSOAPPart && thresholdSize > 0) { thresholdSize = getRuntimeThreshold(thresholdSize, inflight); } if (isSOAPPart || thresholdSize <= 0 || (messageContentLength > 0 && messageContentLength < thresholdSize)) { // If the entire message is less than the threshold size, // keep it in memory. // If this is a SOAPPart, keep it in memory. // Get the bytes of the data without a lot // of resizing and GC. The BAAOutputStream // keeps the data in non-contiguous byte buffers. BAAOutputStream baaos = new BAAOutputStream(); BufferUtils.inputStream2OutputStream(dross, baaos); BufferUtils.inputStream2OutputStream(in, baaos); part = new PartOnMemoryEnhanced(headers, baaos.buffers(), baaos.length()); } else { // We need to read the input stream to determine whether // the size is bigger or smaller than the threshold. BAAOutputStream baaos = new BAAOutputStream(); int t1 = BufferUtils.inputStream2OutputStream(dross, baaos, thresholdSize); int t2 = BufferUtils.inputStream2OutputStream(in, baaos, thresholdSize - t1); int total = t1 + t2; if (total < thresholdSize) { return new PartOnMemoryEnhanced(headers, baaos.buffers(), baaos.length()); } else { // A BAAInputStream is an input stream over a list of non-contiguous 4K buffers. BAAInputStream baais = new BAAInputStream(baaos.buffers(), baaos.length()); part = new PartOnFile(manager, headers, baais, in, attachmentDir); } } } finally { if (!isSOAPPart) { synchronized(semifore) { semifore.notify(); inflight--; } } } return part; } catch (Exception e) { throw new OMException(e); } } /** * The implementing class must call initHeaders prior to using * any of the Part methods. * @param is * @param headers */ private static InputStream readHeaders(InputStream in, Map headers) throws IOException { if(log.isDebugEnabled()){ log.debug("initHeaders"); } boolean done = false; final int BUF_SIZE = 1024; byte[] headerBytes = new byte[BUF_SIZE]; int size = in.read(headerBytes); int index = 0; StringBuffer sb = new StringBuffer(50); while (!done && index < size) { // Get the next byte int ch = headerBytes[index]; index++; if (index == size) { size = in.read(headerBytes); index =0; } if (ch == 13) { // Get the next byte ch = headerBytes[index]; index++; if (index == size) { size = in.read(headerBytes); index =0; } if (ch == 10) { // 13, 10 indicates we are starting a new line...thus a new header // Get the next byte ch = headerBytes[index]; index++; if (index == size) { size = in.read(headerBytes); index =0; } if (ch == 13) { // Get the next byte ch = headerBytes[index]; index++; if (index == size) { size = in.read(headerBytes); index =0; } if (ch == 10) { // Blank line indicates we are done. readHeader(sb, headers); sb.delete(0, sb.length()); // Clear the buffer for reuse done = true; } } else { // Semicolon is a continuation character String check = sb.toString().trim(); if (!check.endsWith(";")) { // now parse and add the header String readHeader(sb, headers); sb.delete(0, sb.length()); // Clear the buffer for reuse } sb.append((char) ch); } } else { sb.append(13); sb.append((char) ch); } } else { sb.append((char) ch); } } if(log.isDebugEnabled()){ log.debug("End initHeaders"); } // Return an input stream containing the dross bits if (index >= size) { index = size; } ByteArrayInputStream dross = new ByteArrayInputStream(headerBytes, index, size-index); return dross; } /** * Parse the header into a name and value pair. * Add the name value pair to the map. * @param header StringBuffer * @param headers Map */ private static void readHeader(StringBuffer header, Map headers) { int delimiter = header.indexOf(":"); String name = header.substring(0, delimiter).trim(); String value = header.substring(delimiter + 1, header.length()).trim(); if (log.isDebugEnabled()){ log.debug("addHeader: (" + name + ") value=(" + value +")"); } Header headerObj = new Header(name, value); // Use the lower case name as the key String key = name.toLowerCase(); headers.put(key, headerObj); } /** * This method checks the configured threshold and * the current runtime information. If it appears that we could * run out of memory, the threshold is reduced. * * This method allows the user to request a much larger threshold without * fear of running out of memory. Using a larger in memory threshold generally * results in better throughput. * * @param configThreshold * @param inflight * @return threshold */ private static int getRuntimeThreshold(int configThreshold, int inflight) { // Determine how much free memory is available Runtime r = Runtime.getRuntime(); long totalmem = r.totalMemory(); long maxmem = r.maxMemory(); long freemem = r.freeMemory(); // @REVIEW // If maximum is not defined...limit to 1G if (maxmem == java.lang.Long.MAX_VALUE) { maxmem = 1024*1024*1024; } long availmem = maxmem - (totalmem - freemem); // Now determine the dynamic threshold int dynamicThreshold = (int) availmem / (THRESHOLD_FACTOR * inflight); // If it appears that we might run out of memory with this // threshold, reduce the threshold size. if (dynamicThreshold < configThreshold) { if (log.isDebugEnabled()) { log.debug("Using Runtime Attachment File Threshold " + dynamicThreshold); log.debug("maxmem = " + maxmem); log.debug("totalmem = " + totalmem); log.debug("freemem = " + freemem); log.debug("availmem = " + availmem); } } else { dynamicThreshold = configThreshold; if (log.isDebugEnabled()) { log.debug("Using Configured Attachment File Threshold " + configThreshold); log.debug("maxmem = " + maxmem); log.debug("totalmem = " + totalmem); log.debug("freemem = " + freemem); log.debug("availmem = " + availmem); } } return dynamicThreshold; } /** * A normal ByteArrayOutputStream, except that it returns the buffer * directly instead of returning a copy of the buffer. */ static class BAOS extends ByteArrayOutputStream { /** * Create a BAOS with a decent sized buffer */ public BAOS() { super(16 * 1024); } public byte[] toByteArray() { return buf; } } } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/attachments/impl/PartOnFile.java0000644000000000000000000000615511131637464030611 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.attachments.impl; import org.apache.axiom.attachments.lifecycle.LifecycleManager; import org.apache.axiom.attachments.lifecycle.impl.FileAccessor; import javax.activation.DataHandler; import javax.mail.MessagingException; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.Hashtable; /** * PartOnFile stores that attachment in a file. * This implementation is used for very large attachments to reduce * the in-memory footprint. * * The PartOnFile object is created by the PartFactory * @see org.apache.axiom.attachments.impl.PartFactory. */ public class PartOnFile extends AbstractPart { FileAccessor fileAccessor; LifecycleManager manager; /** * Create a PartOnFile from the specified InputStream * @param headers Hashtable of javax.mail.Headers * @param in1 InputStream containing data * @param in2 InputStream containing data * @param attachmentDir String */ PartOnFile(LifecycleManager manager, Hashtable headers, InputStream is1, InputStream is2, String attachmentDir) throws IOException { super(headers); fileAccessor = manager.create(attachmentDir); // Now write the data to the backing file OutputStream fos = fileAccessor.getOutputStream(); BufferUtils.inputStream2OutputStream(is1, fos); BufferUtils.inputStream2OutputStream(is2, fos); fos.flush(); fos.close(); } /* (non-Javadoc) * @see org.apache.axiom.attachments.impl.AbstractPart#getDataHandler() */ public DataHandler getDataHandler() throws MessagingException { return fileAccessor.getDataHandler(getContentType()); } /* (non-Javadoc) * @see org.apache.axiom.attachments.impl.AbstractPart#getFileName() */ public String getFileName() throws MessagingException { return fileAccessor.getFileName(); } /* (non-Javadoc) * @see org.apache.axiom.attachments.impl.AbstractPart#getInputStream() */ public InputStream getInputStream() throws IOException, MessagingException { return fileAccessor.getInputStream(); } /* (non-Javadoc) * @see org.apache.axiom.attachments.impl.AbstractPart#getSize() */ public long getSize() { return fileAccessor.getSize(); } } ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/attachments/MultipartAttachmentStreams.javaaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/attachments/MultipartAttachmentStreams.0000644000000000000000000000744111131637464032333 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.attachments; import org.apache.axiom.om.OMException; import javax.mail.Header; import javax.mail.MessagingException; import javax.mail.internet.InternetHeaders; import java.io.IOException; import java.util.Enumeration; /** * The MultipartAttachmentStreams class is used to create IncomingAttachmentInputStream objects when * the HTTP stream shows a marked separation between the SOAP and each attachment parts. Unlike the * DIME version, this class will use the BoundaryDelimitedStream to parse data in the SwA format. * Another difference between the two is that the MultipartAttachmentStreams class must also provide * a way to hold attachment parts parsed prior to where the SOAP part appears in the HTTP stream * (i.e. the root part of the multipart-related message). Our DIME counterpart didn't have to worry * about this since the SOAP part is guaranteed to be the first in the stream. But since SwA has no * such guarantee, we must fall back to caching these first parts. Afterwards, we can stream the * rest of the attachments that are after the SOAP part of the request message. */ public final class MultipartAttachmentStreams extends IncomingAttachmentStreams { private BoundaryDelimitedStream _delimitedStream = null; public MultipartAttachmentStreams(BoundaryDelimitedStream delimitedStream) throws OMException { this._delimitedStream = delimitedStream; } /** @see org.apache.axis.attachments.IncomingAttachmentStreams#getNextStream() */ public IncomingAttachmentInputStream getNextStream() throws OMException { IncomingAttachmentInputStream stream; if (!isReadyToGetNextStream()) { throw new IllegalStateException("nextStreamNotReady"); } InternetHeaders headers; try { _delimitedStream = _delimitedStream.getNextStream(); if (_delimitedStream == null) { return null; } headers = new InternetHeaders(_delimitedStream); } catch (IOException ioe) { ioe.printStackTrace(); throw new OMException(ioe); } catch (MessagingException me) { me.printStackTrace(); throw new OMException(me); } stream = new IncomingAttachmentInputStream(_delimitedStream, this); Header header; String name; String value; Enumeration e = headers.getAllHeaders(); while (e != null && e.hasMoreElements()) { header = (Header) e.nextElement(); name = header.getName(); value = header.getValue(); if (IncomingAttachmentInputStream.HEADER_CONTENT_ID.equals(name) || IncomingAttachmentInputStream.HEADER_CONTENT_TYPE.equals(name) || IncomingAttachmentInputStream.HEADER_CONTENT_LOCATION.equals(name)) { value = value.trim(); } stream.addHeader(name, value); } setReadyToGetNextStream(false); return stream; } } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/attachments/ByteArrayDataSource.java0000644000000000000000000000365411131637464031523 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.attachments; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class ByteArrayDataSource implements SizeAwareDataSource { private byte[] data; private String type; public ByteArrayDataSource(byte[] data, String type) { super(); this.data = data; this.type = type; } public ByteArrayDataSource(byte[] data) { super(); this.data = data; } public void setType(String type) { this.type = type; } public String getContentType() { if (type == null) return "application/octet-stream"; else return type; } public InputStream getInputStream() throws IOException { return new ByteArrayInputStream(data == null ? new byte[0] : data); } public String getName() { return "ByteArrayDataSource"; } public OutputStream getOutputStream() throws IOException { throw new IOException("Not Supported"); } public long getSize() { return data == null ? 0 : data.length; } } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/attachments/lifecycle/0000755000000000000000000000000011131637464026732 5ustar rootroot././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/attachments/lifecycle/LifecycleManager.javaaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/attachments/lifecycle/LifecycleManager.0000644000000000000000000000473211131637464032133 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.attachments.lifecycle; import java.io.File; import java.io.IOException; import org.apache.axiom.attachments.lifecycle.impl.FileAccessor; /** * Lifecycle Manager will be used to manage the lifecycle of attachment files. * * Axiom forks attachment processing based on the size of attachment to be processed. * Attachments are either processed by storing them in memory or by storing them in * file system based on the size of the attachment file. * * Lifecycle Manager provides and organized way of managing attachments, by providing * calls to create and delete attachments. */ public interface LifecycleManager { /** * Create a unique file in the designated directory * @param attachmentDir * @return * @throws IOException */ public FileAccessor create(String attachmentDir) throws IOException; /** * Deletes attachment file * @param File * @throws IOException */ public void delete(File file) throws IOException; /** * Mark the file for deletion on application/VM exit * @param File * @throws IOException */ public void deleteOnExit(File file) throws IOException; /** * Mark attachment file for deletion when designated time interval in seconds * has elapsed. * @param interval * @param File * @throws IOException */ public void deleteOnTimeInterval(int interval, File file) throws IOException; /** * This method will return the file accessor associated with this file. * @param file * @return * @throws IOException */ public FileAccessor getFileAccessor(String file) throws IOException; } ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/attachments/lifecycle/DataHandlerExt.javaaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/attachments/lifecycle/DataHandlerExt.ja0000644000000000000000000000367511131637464032111 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.attachments.lifecycle; import java.io.IOException; public interface DataHandlerExt { /** * This method will give users an option to trigger a purge * on temporary attachment files. Temp files are created for * attachment data that is greater than a threshold limit. * On client side These temp attachment files are not deleted * untilthe virtual machine exits as user can choose to read * this dataHandler. So if user is not going to use the data * handlers provided on this temproray files they can choose * to purge the file. */ public void purgeDataSource() throws IOException; /** * This method will give users an option to trigger a delete on * temporary attachment file when DataHandler associated with the * attachment is read once. Temp files are created for * attachment data that is greater than a threshold limit. * On client side These temp attachment files are not deleted untill * the virtual machine exits. This method gives options to user to * trigger a delete on attachment files when they read the dataHandler * once. */ public void deleteWhenReadOnce() throws IOException; } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/attachments/lifecycle/impl/0000755000000000000000000000000011131637464027673 5ustar rootroot././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/attachments/lifecycle/impl/VMShutdownHook.javaaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/attachments/lifecycle/impl/VMShutdownHo0000644000000000000000000000652211131637464032170 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.attachments.lifecycle.impl; import java.io.File; import java.util.Collections; import java.util.HashSet; import java.util.Iterator; import java.util.Set; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; /* * VMShutdown Hook will be registered with Runtime object to be invoked * when Virutal Machine is shutdown. * This class will be used to delete any cached attachments file that where * added by runtime to be deleted on VM shutdown. */ public class VMShutdownHook extends Thread { private static final Log log = LogFactory.getLog(VMShutdownHook.class); private static VMShutdownHook instance = null; private static Set files = Collections.synchronizedSet(new HashSet()); private boolean isRegistered = false; static VMShutdownHook hook() { if (instance == null){ if(log.isDebugEnabled()){ log.debug("creating VMShutdownHook"); } instance = new VMShutdownHook(); } if(log.isDebugEnabled()){ log.debug("returning VMShutdownHook instance"); } return instance; } private VMShutdownHook(){} void remove(File file){ if(file == null){ return; } if(log.isDebugEnabled()){ log.debug("Removing File to Shutdown Hook Collection"); } files.remove(file); } void add(File file) { if(file == null){ return; } if(log.isDebugEnabled()){ log.debug("Adding File to Shutdown Hook Collection"); } files.add(file); } public void run() { if(log.isDebugEnabled()){ log.debug("JVM running VM Shutdown Hook"); } Iterator iter = files.iterator(); while(iter.hasNext()){ File file = (File)iter.next(); if(log.isDebugEnabled()){ log.debug("Deleting File from Shutdown Hook Collection"+file.getAbsolutePath()); } file.delete(); } if(log.isDebugEnabled()){ log.debug("JVM Done running VM Shutdown Hook"); } } public boolean isRegistered() { if(log.isDebugEnabled()){ if(!isRegistered){ log.debug("hook isRegistered= false"); }else{ log.debug("hook isRegistered= true"); } } return isRegistered; } public void setRegistered(boolean isRegistered) { this.isRegistered = isRegistered; } } ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/attachments/lifecycle/impl/FileAccessor.javaaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/attachments/lifecycle/impl/FileAccessor0000644000000000000000000000660111131637464032163 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.attachments.lifecycle.impl; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.Observable; import javax.activation.DataHandler; import javax.mail.MessagingException; import org.apache.axiom.attachments.CachedFileDataSource; import org.apache.axiom.attachments.lifecycle.LifecycleManager; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; /** * FileAccessor wraps the attachment temp file. It is created from PartOnFile. * The idea behind wrapping the file is to give rumtime an ability to track * when the file is accessed with streams or data handler and accordingly trigger * events to handle the the files lifecycle. * */ public class FileAccessor extends Observable{ private static final Log log = LogFactory.getLog(FileAccessor.class); File file = null; LifecycleManager manager; private int accessCount = 0; public FileAccessor(LifecycleManager manager, File file) { super(); this.manager = manager; this.file = file; } public DataHandler getDataHandler(String contentType) throws MessagingException { if(log.isDebugEnabled()){ log.debug("getDataHandler()"); log.debug("accessCount =" +accessCount); } CachedFileDataSource dataSource = new CachedFileDataSource(file); dataSource.setContentType(contentType); accessCount++; setChanged(); notifyObservers(); DataHandler dataHandler = new DataHandler(dataSource); return new DataHandlerExtImpl(dataHandler, manager); } public String getFileName() throws MessagingException { if(log.isDebugEnabled()){ log.debug("getFileName()"); } return file.getAbsolutePath(); } public InputStream getInputStream() throws IOException, MessagingException { if(log.isDebugEnabled()){ log.debug("getInputStream()"); } return new FileInputStream(file); } public OutputStream getOutputStream() throws FileNotFoundException{ if(log.isDebugEnabled()){ log.debug("getOutputStream()"); } return new FileOutputStream(file); } public long getSize() { return file.length(); } public File getFile() { return file; } public void setFile(File file) { this.file = file; } public int getAccessCount() { return accessCount; } } ././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/attachments/lifecycle/impl/DataHandlerExtImpl.javaaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/attachments/lifecycle/impl/DataHandlerE0000644000000000000000000000736011131637464032100 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.attachments.lifecycle.impl; import java.io.File; import java.io.IOException; import java.util.Observable; import java.util.Observer; import javax.activation.DataHandler; import javax.activation.DataSource; import org.apache.axiom.attachments.CachedFileDataSource; import org.apache.axiom.attachments.lifecycle.DataHandlerExt; import org.apache.axiom.attachments.lifecycle.LifecycleManager; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; public class DataHandlerExtImpl extends DataHandler implements DataHandlerExt, Observer { private static final Log log = LogFactory.getLog(DataHandlerExtImpl.class); private DataHandler dataHandler = null; private LifecycleManager manager = null; private static int READ_COUNT = 1; private boolean deleteOnreadOnce = false; public DataHandlerExtImpl(DataHandler dataHandler, LifecycleManager manager){ super(dataHandler.getDataSource()); this.dataHandler = dataHandler; this.manager = manager; } public void deleteWhenReadOnce() throws IOException { deleteOnreadOnce = true; FileAccessor fa =manager.getFileAccessor(getName()); if(fa==null){ log.warn("Could not find FileAccessor, delete on readOnce Failed"); return; } if(fa.getAccessCount() >= READ_COUNT){ purgeDataSource(); }else{ fa.addObserver(this); } } public void purgeDataSource() throws IOException { if(log.isDebugEnabled()){ log.debug("Start purgeDataSource"); } File file = getFile(); if(file!=null){ //Invoke delete from LifecycleManager manager.delete(file); //If file was registered with VMShutdown hook //lets remove it from the list to be deleted on VMExit. VMShutdownHook hook =VMShutdownHook.hook(); if(hook.isRegistered()){ hook.remove(file); } if(log.isDebugEnabled()){ log.debug("File Purged and removed from Shutdown Hook Collection"); } }else{ if(log.isDebugEnabled()){ log.debug("DataSource is not a CachedFileDataSource, Unable to Purge."); } } if(log.isDebugEnabled()){ log.debug("End purgeDataSource"); } } public void update(Observable o, Object arg) { try{ if(log.isDebugEnabled()){ log.debug("Start update in Observer"); } if(o instanceof FileAccessor){ FileAccessor fa = (FileAccessor)o; if(deleteOnreadOnce && fa.getAccessCount()>=READ_COUNT){ purgeDataSource(); } } }catch(IOException e){ if(log.isDebugEnabled()){ log.debug("delete on readOnce Failed"); } log.warn("delete on readOnce Failed with IOException in Observer"+e.getMessage()); } if(log.isDebugEnabled()){ log.debug("End update in Observer"); } } private File getFile(){ //get DataSource from DataHandler DataSource dataSource = dataHandler.getDataSource(); if(dataSource instanceof CachedFileDataSource){ CachedFileDataSource cds = (CachedFileDataSource)dataSource; //get the file object from data source. return cds.getFile(); } return null; } } ././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/attachments/lifecycle/impl/LifecycleEventHandler.javaaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/attachments/lifecycle/impl/LifecycleEve0000644000000000000000000000357711131637464032171 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.attachments.lifecycle.impl; import java.io.IOException; /** * The attachment life cycle manager supports create and delete operations on the FileAccessor(which holds attachment file). * These operations are coupled to events, the LifecycleManager needs to execute an operation when an even * causes that operation to trigger. For example a delete operation should execute when a deleteOnExit * or deleteOnTimeInterval event occur on FileAccessor. * * The LifecycleManager should execute operation on FileAccessor based on the Events that trigger them. * EventHandler defines methods to execute LifecycleManager operation when a event occurs. * */ public interface LifecycleEventHandler { /** * When a Event occurs in FileAccessor, execute the LifecycleManager Operation * For example, if the delete behaviour is readOnce and if the inputstream on attachment is read * and closed the first time, the delete operation in LifecycleManager should be executed. * @param eventName */ public void handleEvent(int eventId) throws IOException; } ././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/attachments/lifecycle/impl/LifecycleManagerImpl.javaaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/attachments/lifecycle/impl/LifecycleMan0000644000000000000000000001557711131637464032170 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.attachments.lifecycle.impl; import java.io.File; import java.io.IOException; import java.security.AccessController; import java.security.PrivilegedActionException; import java.security.PrivilegedExceptionAction; import java.util.Hashtable; import org.apache.axiom.attachments.lifecycle.LifecycleManager; import org.apache.axiom.om.util.UUIDGenerator; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; public class LifecycleManagerImpl implements LifecycleManager { private static final Log log = LogFactory.getLog(LifecycleManagerImpl.class); //Hashtable to store file accessors. private static Hashtable table = new Hashtable(); private VMShutdownHook hook = null; public LifecycleManagerImpl() { super(); } /* (non-Javadoc) * @see org.apache.axiom.lifecycle.LifecycleManager#create(java.lang.String) */ public FileAccessor create(String attachmentDir) throws IOException { if(log.isDebugEnabled()){ log.debug("Start Create()"); } File file = null; File dir = null; if (attachmentDir != null) { dir = new File(attachmentDir); if (!dir.exists()) { dir.mkdirs(); } } if (!dir.isDirectory()) { throw new IllegalArgumentException("Given Axis2 Attachment File Cache Location " + dir + " should be a directory."); } // Generate unique id. The UUID generator is used so that we can limit // synchronization with the java random number generator. String id = UUIDGenerator.getUUID(); //Replace colons with underscores id = id.replaceAll(":", "_"); String fileString = "Axis2" + id + ".att"; file = new File(dir, fileString); FileAccessor fa = new FileAccessor(this, file); //add the fileAccesor to table table.put(fileString, fa); //Default behaviour deleteOnExit(file); if(log.isDebugEnabled()){ log.debug("End Create()"); } return fa; } /* (non-Javadoc) * @see org.apache.axiom.lifecycle.LifecycleManager#delete(java.io.File) */ public void delete(File file) throws IOException { if(log.isDebugEnabled()){ log.debug("Start delete()"); } if(file!=null && file.exists()){ table.remove(file); if(log.isDebugEnabled()){ log.debug("invoking file.delete()"); } if(file.delete()){ if(log.isDebugEnabled()){ log.debug("delete() successful"); } }else{ if(log.isDebugEnabled()){ log.debug("Cannot delete file, set to delete on VM shutdown"); } deleteOnExit(file); } } if(log.isDebugEnabled()){ log.debug("End delete()"); } } /* (non-Javadoc) * @see org.apache.axiom.lifecycle.LifecycleManager#deleteOnExit(java.io.File) */ public void deleteOnExit(File file) throws IOException { if(log.isDebugEnabled()){ log.debug("Start deleteOnExit()"); } if(hook == null){ hook = RegisterVMShutdownHook(); } if(file!=null){ if(log.isDebugEnabled()){ log.debug("Invoking deleteOnExit() for file = "+file.getAbsolutePath()); } hook.add(file); table.remove(file); } if(log.isDebugEnabled()){ log.debug("End deleteOnExit()"); } } /* (non-Javadoc) * @see org.apache.axiom.lifecycle.LifecycleManager#deleteOnTimeInterval(int) */ public void deleteOnTimeInterval(int interval, File file) throws IOException { if(log.isDebugEnabled()){ log.debug("Start deleteOnTimeInterval()"); } Thread t = new Thread(new LifecycleManagerImpl.FileDeletor(interval, file)); t.setDaemon(true); t.start(); if(log.isDebugEnabled()){ log.debug("End deleteOnTimeInterval()"); } } private VMShutdownHook RegisterVMShutdownHook() throws RuntimeException{ if(log.isDebugEnabled()){ log.debug("Start RegisterVMShutdownHook()"); } try{ hook = (VMShutdownHook)AccessController.doPrivileged(new PrivilegedExceptionAction() { public Object run() throws SecurityException, IllegalStateException, IllegalArgumentException { VMShutdownHook hook = VMShutdownHook.hook(); if(!hook.isRegistered()){ Runtime.getRuntime().addShutdownHook(hook); hook.setRegistered(true); } return hook; } }); }catch (PrivilegedActionException e) { if (log.isDebugEnabled()) { log.debug("Exception thrown from AccessController: " + e); log.debug("VM Shutdown Hook not registered."); } throw new RuntimeException(e); } if(log.isDebugEnabled()){ log.debug("Exit RegisterVMShutdownHook()"); } return hook; } public class FileDeletor implements Runnable{ int interval; File _file; public FileDeletor(int interval, File file) { super(); this.interval = interval; this._file = file; } public void run() { try{ Thread.sleep(interval*1000); if(_file.exists()){ table.remove(_file); _file.delete(); } }catch(InterruptedException e){ //Log Exception if(log.isDebugEnabled()){ log.warn("InterruptedException occured "+e.getMessage()); } } } } public FileAccessor getFileAccessor(String fileName) throws IOException { return (FileAccessor)table.get(fileName); } } ././@LongLink0000000000000000000000000000016700000000000011571 Lustar rootrootaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/attachments/lifecycle/impl/LifecycleEventDefinitions.javaaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/attachments/lifecycle/impl/LifecycleEve0000644000000000000000000000204411131637464032155 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.attachments.lifecycle.impl; public class LifecycleEventDefinitions { public static final int DELETE_ON_EXIT = 1; public static final int READ_ONCE_AND_DELETE = 2; public static final int DELETE_ON_TIME_INTERVAL = 3; } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/soap/0000755000000000000000000000000011131637464023422 5ustar rootrootaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/soap/SOAPProcessingException.java0000644000000000000000000000453411131637464030751 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap; import org.apache.axiom.om.OMException; public class SOAPProcessingException extends OMException { private static final long serialVersionUID = -5432612295193716211L; private String soapFaultCode; /** Eran Chinthaka (chinthaka@apache.org) */ public SOAPProcessingException(String message) { super(message); } public SOAPProcessingException(Throwable cause) { super(cause); } /** * @param messageText - this will appear as the Text in the Reason information item of SOAP * Fault * @param faultCode - this will appear as the Value in the Code information item of SOAP * Fault * @param cause - this will appear under the Detail information item of SOAP Fault */ public SOAPProcessingException(String messageText, String faultCode, Throwable cause) { super(messageText, cause); this.soapFaultCode = faultCode; } /** * @param messageText - this will appear as the Text in the Reason information item of SOAP * Fault * @param faultCode - this will appear as the Value in the Code information item of SOAP * Fault */ public SOAPProcessingException(String messageText, String faultCode) { super(messageText); this.soapFaultCode = faultCode; } public String getFaultCode() { return soapFaultCode; } public void setFaultCode(String soapFaultCode) { this.soapFaultCode = soapFaultCode; } } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/soap/SOAP12Version.java0000644000000000000000000000565611131637464026554 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap; import javax.xml.namespace.QName; /** * Version-specific stuff for SOAP 1.2 */ public class SOAP12Version implements SOAPVersion, SOAP12Constants { private static final SOAP12Version singleton = new SOAP12Version(); public static SOAP12Version getSingleton() { return singleton; } private SOAP12Version() { } /** Obtain the envelope namespace for this version of SOAP */ public String getEnvelopeURI() { return SOAP_ENVELOPE_NAMESPACE_URI; } /** Obtain the encoding namespace for this version of SOAP */ public String getEncodingURI() { return SOAP_ENCODING_NAMESPACE_URI; } /** Obtain the QName for the role attribute (actor/role) */ public QName getRoleAttributeQName() { return QNAME_ROLE; } /** Obtain the "next" role/actor URI */ public String getNextRoleURI() { return SOAP_ROLE_NEXT; } /** Obtain the QName for the MustUnderstand fault code */ public QName getMustUnderstandFaultCode() { return QNAME_MU_FAULTCODE; } /** * Obtain the QName for the Sender fault code * * @return Sender fault code as a QName */ public QName getSenderFaultCode() { return QNAME_SENDER_FAULTCODE; } /** * Obtain the QName for the Receiver fault code * * @return Receiver fault code as a QName */ public QName getReceiverFaultCode() { return QNAME_RECEIVER_FAULTCODE; } /** * Obtain the QName for the fault reason element * * @return */ public QName getFaultReasonQName() { return QNAME_FAULT_REASON; } /** * Obtain the QName for the fault code element * * @return */ public QName getFaultCodeQName() { return QNAME_FAULT_CODE; } /** * Obtain the QName for the fault detail element * * @return */ public QName getFaultDetailQName() { return QNAME_FAULT_DETAIL; } /** * Obtain the QName for the fault role/actor element * * @return */ public QName getFaultRoleQName() { return QNAME_FAULT_ROLE; } } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/soap/SOAPFaultCode.java0000644000000000000000000000250111131637464026614 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap; import org.apache.axiom.om.OMElement; public interface SOAPFaultCode extends OMElement { /** * Eran Chinthaka (chinthaka@apache.org) */ /** @param value */ void setValue(SOAPFaultValue value) throws SOAPProcessingException; /** @return Returns SOAPFaultValue. */ SOAPFaultValue getValue(); /** @param value */ void setSubCode(SOAPFaultSubCode value) throws SOAPProcessingException; /** @return Returns SOAPFaultSubCode. */ SOAPFaultSubCode getSubCode(); } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/soap/SOAP11Version.java0000644000000000000000000000566011131637464026546 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap; import javax.xml.namespace.QName; /** * Version-specific stuff for SOAP 1.1 */ public class SOAP11Version implements SOAPVersion, SOAP11Constants { private static final SOAP11Version singleton = new SOAP11Version(); public static SOAP11Version getSingleton() { return singleton; } private SOAP11Version() { } /** Obtain the envelope namespace for this version of SOAP */ public String getEnvelopeURI() { return SOAP_ENVELOPE_NAMESPACE_URI; } /** Obtain the encoding namespace for this version of SOAP */ public String getEncodingURI() { return SOAP_ENCODING_NAMESPACE_URI; } /** Obtain the QName for the role attribute (actor/role) */ public QName getRoleAttributeQName() { return QNAME_ACTOR; } /** Obtain the "next" role/actor URI */ public String getNextRoleURI() { return SOAP_ACTOR_NEXT; } /** Obtain the QName for the MustUnderstand fault code */ public QName getMustUnderstandFaultCode() { return QNAME_MU_FAULTCODE; } /** * Obtain the QName for the Sender fault code * * @return Sender fault code as a QName */ public QName getSenderFaultCode() { return QNAME_SENDER_FAULTCODE; } /** * Obtain the QName for the Receiver fault code * * @return Receiver fault code as a QName */ public QName getReceiverFaultCode() { return QNAME_RECEIVER_FAULTCODE; } /** * Obtain the QName for the fault reason element * * @return */ public QName getFaultReasonQName() { return QNAME_FAULT_REASON; } /** * Obtain the QName for the fault code element * * @return */ public QName getFaultCodeQName() { return QNAME_FAULT_CODE; } /** * Obtain the QName for the fault detail element * * @return */ public QName getFaultDetailQName() { return QNAME_FAULT_DETAIL; } /** * Obtain the QName for the fault role/actor element * * @return */ public QName getFaultRoleQName() { return QNAME_FAULT_ROLE; } } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/soap/SOAPMessage.java0000644000000000000000000000206511131637464026337 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap; import org.apache.axiom.om.OMDocument; public interface SOAPMessage extends OMDocument { SOAPEnvelope getSOAPEnvelope() throws SOAPProcessingException; void setSOAPEnvelope(SOAPEnvelope envelope) throws SOAPProcessingException; } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/soap/SOAPFaultDetail.java0000644000000000000000000000277111131637464027155 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap; import org.apache.axiom.om.OMElement; import java.util.Iterator; /** * The Detail element information item is intended for carrying application specific error * information related to the SOAP Body . *

* The Detail element information item has: A [local name] of Detail . A [namespace name] of * http://www.w3.org/2003/05/soap-envelope . Zero or more attribute information items in its * [attributes] property. Zero or more child element information items in its [children] property. */ public interface SOAPFaultDetail extends OMElement { /** Eran Chinthaka (chinthaka@apache.org) */ void addDetailEntry(OMElement detailElement); Iterator getAllDetailEntries(); } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/soap/SOAPFaultSubCode.java0000644000000000000000000000271011131637464027270 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap; import org.apache.axiom.om.OMElement; public interface SOAPFaultSubCode extends OMElement { /** * Eran Chinthaka (chinthaka@apache.org) */ /** * Fault SubCode contain only one mandatory Value child. This value child contains a QName * * @param soapFaultSubCodeValue */ void setValue(SOAPFaultValue soapFaultSubCodeValue) throws SOAPProcessingException; SOAPFaultValue getValue(); /** * Fault SubCode can contain an optional SubCode * * @param subCode */ void setSubCode(SOAPFaultSubCode subCode) throws SOAPProcessingException; SOAPFaultSubCode getSubCode(); } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/soap/SOAPFaultText.java0000644000000000000000000000251211131637464026670 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap; import org.apache.axiom.om.OMElement; public interface SOAPFaultText extends OMElement { /** * Eran Chinthaka (chinthaka@apache.org) */ /** * lang is a mandatory attribute within the SOAPFaultText which must have * SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_NS_URI as the namespace URI and * SOAP12constants.SOAP_FAULT_TEXT_LANG_ATTR_NS_PREFIX or a capitalization thereof as the * prefix * * @param lang */ void setLang(String lang); String getLang(); } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/soap/SOAPHeaderBlock.java0000644000000000000000000001135511131637464027120 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap; import org.apache.axiom.om.OMSourcedElement; /** *

An object representing the contents in the SOAP header part of the SOAP envelope. The * immediate children of a SOAPHeader object can be represented only as * SOAPHeaderBlock objects.

B SOAPHeaderBlock object can have other * OMElement objects as its children.

*/ public interface SOAPHeaderBlock extends OMSourcedElement { /** * A SOAPHeaderBlock may be represented as an unexpanded OMSourcedElement. * In such cases, the underlying OMDataSource may have a property that contains * the value of the ROLE/ACTOR, RELAY or MUST_UNDERSTAND setting. */ public String ROLE_PROPERTY = "org.apache.axiom.soap.SOAPHeader.ROLE"; public String RELAY_PROPERTY = "org.apache.axiom.soap.SOAPHeader.RELAY"; public String MUST_UNDERSTAND_PROPERTY = "org.apache.axiom.soap.SOAPHeader.MUST_UNDERSTAND"; /** * Sets the actor associated with this SOAPHeaderBlock object to the specified * actor. * * @param roleURI a String giving the URI of the actor to set * @throws IllegalArgumentException * if there is a problem in setting the actor. * @see #getRole() getRole() */ void setRole(String roleURI); /** * Returns the uri of the actor associated with this SOAPHeaderBlock object. * * @return a String giving the URI of the actor * @see #setRole(String) setRole(java.lang.String) */ String getRole(); /** * Sets the mustUnderstand attribute for this SOAPHeaderBlock object to be on or * off.

If the mustUnderstand attribute is on, the actor who receives the * SOAPHeaderBlock must process it correctly. This ensures, for example, that if * the SOAPHeaderBlock object modifies the message, that the message is being * modified correctly.

* * @param mustUnderstand true to set the mustUnderstand attribute on; * false to turn if off * @throws IllegalArgumentException * if there is a problem in setting the actor. * @see #getMustUnderstand() getMustUnderstand() */ void setMustUnderstand(boolean mustUnderstand); void setMustUnderstand(String mustUnderstand) throws SOAPProcessingException; /** * Returns whether the mustUnderstand attribute for this SOAPHeaderBlock object is * turned on. * * @return true if the mustUnderstand attribute of this * SOAPHeaderBlock object is turned on; false otherwise */ boolean getMustUnderstand() throws SOAPProcessingException; boolean isProcessed(); /** * We need to know whether all the mustUnderstand headers have been processed by the node. This * will done by a specific validation handler at the end of the execution chain. For this all * the handlers who process a particular header block must explicitly say that he processesd the * header by calling setProcessed() */ void setProcessed(); /** * Sets the relay attribute for this SOAPHeaderBlock to be either true or false. The SOAP relay * attribute is set to true to indicate that the SOAP header block must be relayed by any node * that is targeted by the header block but not actually process it. * * @param relay a boolean giving the value to be set */ void setRelay(boolean relay); /** * Returns the relay status associated with this SOAPHeaderBlock object. * * @return a boolean giving the relay status */ boolean getRelay(); /** * What SOAP version is this HeaderBlock? * * @return a SOAPVersion, one of the two singletons. */ SOAPVersion getVersion(); } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/soap/SOAPConstants.java0000644000000000000000000000544711131637464026736 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap; public interface SOAPConstants { /** * Eran Chinthaka (chinthaka@apache.org) */ /** Field SOAP_DEFAULT_NAMESPACE_PREFIX */ static final String SOAP_DEFAULT_NAMESPACE_PREFIX = "soapenv"; /** Field SOAPENVELOPE_LOCAL_NAME */ static final String SOAPENVELOPE_LOCAL_NAME = "Envelope"; /** Field HEADER_LOCAL_NAME */ static final String HEADER_LOCAL_NAME = "Header"; /** Field BODY_LOCAL_NAME */ static final String BODY_LOCAL_NAME = "Body"; /** Field BODY_NAMESPACE_PREFIX */ static final String BODY_NAMESPACE_PREFIX = SOAP_DEFAULT_NAMESPACE_PREFIX; /** Field BODY_FAULT_LOCAL_NAME */ static final String BODY_FAULT_LOCAL_NAME = "Fault"; /** Field ATTR_MUSTUNDERSTAND */ static final String ATTR_MUSTUNDERSTAND = "mustUnderstand"; static final String ATTR_MUSTUNDERSTAND_TRUE = "true"; static final String ATTR_MUSTUNDERSTAND_FALSE = "false"; static final String ATTR_MUSTUNDERSTAND_0 = "0"; static final String ATTR_MUSTUNDERSTAND_1 = "1"; /** Field SOAPFAULT_LOCAL_NAME */ static final String SOAPFAULT_LOCAL_NAME = "Fault"; /** Field SOAPFAULT_DETAIL_LOCAL_NAME */ static final String SOAPFAULT_DETAIL_LOCAL_NAME = "detail"; static final String SOAP_FAULT_DETAIL_EXCEPTION_ENTRY = "Exception"; // -------- SOAP Fault Codes ------------------------------ static final String FAULT_CODE_VERSION_MISMATCH = "VersionMismatch"; static final String FAULT_CODE_MUST_UNDERSTAND = "MustUnderstand"; static final String FAULT_CODE_DATA_ENCODING_UNKNOWN = "DataEncodingUnknown"; // Followings are different in SOAP 1.1 and 1.2 specifications static final String FAULT_CODE_SENDER = ""; static final String FAULT_CODE_RECEIVER = ""; // Special Property available on some parsers to get the // Qname of the first child element in the soap body. static final String SOAPBODY_FIRST_CHILD_ELEMENT_QNAME = "org.apache.axiom.SOAPBodyFirstChildElementQName"; } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/soap/SOAPVersion.java0000644000000000000000000000444711131637464026406 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap; import javax.xml.namespace.QName; /** * A generic way to get at SOAP-version-specific values. As long as we can get * one of these from a SOAP element, we can get at the right */ public interface SOAPVersion { /** * Obtain the envelope namespace for this version of SOAP */ String getEnvelopeURI(); /** * Obtain the encoding namespace for this version of SOAP */ String getEncodingURI(); /** * Obtain the QName for the role attribute (actor/role) */ QName getRoleAttributeQName(); /** * Obtain the "next" role/actor URI */ String getNextRoleURI(); /** * Obtain the QName for the MustUnderstand fault code */ QName getMustUnderstandFaultCode(); /** * Obtain the QName for the Sender fault code * @return Sender fault code as a QName */ QName getSenderFaultCode(); /** * Obtain the QName for the Receiver fault code * @return Receiver fault code as a QName */ QName getReceiverFaultCode(); /** * Obtain the QName for the fault reason element * @return */ QName getFaultReasonQName(); /** * Obtain the QName for the fault code element * @return */ QName getFaultCodeQName(); /** * Obtain the QName for the fault detail element * @return */ QName getFaultDetailQName(); /** * Obtain the QName for the fault role/actor element * @return */ QName getFaultRoleQName(); } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/soap/SOAPFaultNode.java0000644000000000000000000000273611131637464026641 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap; import org.apache.axiom.om.OMElement; public interface SOAPFaultNode extends OMElement { /** * Eran Chinthaka (chinthaka@apache.org) */ /** * each SOAP node is identified by a URI. The value of the Node element information item is the * URI that identifies the SOAP node that generated the fault. SOAP nodes that do not act as the * ultimate SOAP receiver MUST include this element information item. An ultimate SOAP receiver * MAY include this element information item to indicate explicitly that it generated the * fault. * * @param uri */ void setNodeValue(String uri); String getNodeValue(); } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/soap/SOAP12Constants.java0000644000000000000000000001232111131637464027066 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap; import javax.xml.namespace.QName; public interface SOAP12Constants extends SOAPConstants { /** Eran Chinthaka (chinthaka@apache.org) */ public String SOAP_ENVELOPE_NAMESPACE_URI = "http://www.w3.org/2003/05/soap-envelope"; public String SOAP_ENCODING_NAMESPACE_URI = "http://www.w3.org/2003/05/soap-encoding"; public static final String SOAP_ROLE = "role"; public static final String SOAP_RELAY = "relay"; // SOAP Fault Code public static final String SOAP_FAULT_CODE_LOCAL_NAME = "Code"; public static final String SOAP_FAULT_SUB_CODE_LOCAL_NAME = "Subcode"; public static final String SOAP_FAULT_VALUE_LOCAL_NAME = "Value"; // SOAP Fault Codes public static final String SOAP_FAULT_VALUE_VERSION_MISMATCH = "VersionMismatch"; public static final String SOAP_FAULT_VALUE_MUST_UNDERSTAND = "MustUnderstand"; public static final String SOAP_FAULT_VALUE_DATA_ENCODING_UKNOWN = "DataEncodingUnknown"; public static final String SOAP_FAULT_VALUE_SENDER = "Sender"; public static final String SOAP_FAULT_VALUE_RECEIVER = "Receiver"; // SOAP Fault Reason public static final String SOAP_FAULT_REASON_LOCAL_NAME = "Reason"; public static final String SOAP_FAULT_TEXT_LOCAL_NAME = "Text"; public static final String SOAP_FAULT_TEXT_LANG_ATTR_LOCAL_NAME = "lang"; public static final String SOAP_FAULT_TEXT_LANG_ATTR_NS_URI = "http://www.w3.org/XML/1998/namespace"; public static final String SOAP_FAULT_TEXT_LANG_ATTR_NS_PREFIX = "xml"; // SOAP Fault Node public static final String SOAP_FAULT_NODE_LOCAL_NAME = "Node"; // SOAP Fault Detail public static final String SOAP_FAULT_DETAIL_LOCAL_NAME = "Detail"; // SOAP Fault Role public static final String SOAP_FAULT_ROLE_LOCAL_NAME = "Role"; //SOAP 1.2 Content Type public static final String SOAP_12_CONTENT_TYPE = "application/soap+xml"; // -------- SOAP Fault Codes ------------------------------ public static final String FAULT_CODE_SENDER = "Sender"; public static final String FAULT_CODE_RECEIVER = "Receiver"; public static final String SOAP_ROLE_NEXT = "http://www.w3.org/2003/05/soap-envelope/role/next"; public static final String SOAP_ROLE_NONE = "http://www.w3.org/2003/05/soap-envelope/role/none"; public static final String SOAP_ROLE_ULTIMATE_RECEIVER = "http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver"; // QNames static final QName QNAME_ROLE = new QName(SOAP_ENVELOPE_NAMESPACE_URI, SOAP_ROLE); static final QName QNAME_RELAY = new QName(SOAP_ENVELOPE_NAMESPACE_URI, SOAP_RELAY); static final QName QNAME_MU_FAULTCODE = new QName(SOAP_ENVELOPE_NAMESPACE_URI, FAULT_CODE_MUST_UNDERSTAND); static final QName QNAME_SENDER_FAULTCODE = new QName(SOAP_ENVELOPE_NAMESPACE_URI, FAULT_CODE_SENDER); static final QName QNAME_RECEIVER_FAULTCODE = new QName(SOAP_ENVELOPE_NAMESPACE_URI, FAULT_CODE_RECEIVER); static final QName QNAME_FAULT_REASON = new QName(SOAP_ENVELOPE_NAMESPACE_URI, SOAP_FAULT_REASON_LOCAL_NAME); static final QName QNAME_FAULT_CODE = new QName(SOAP_ENVELOPE_NAMESPACE_URI, SOAP_FAULT_CODE_LOCAL_NAME); static final QName QNAME_FAULT_NODE = new QName(SOAP_ENVELOPE_NAMESPACE_URI, SOAP_FAULT_NODE_LOCAL_NAME); static final QName QNAME_FAULT_DETAIL = new QName(SOAP_ENVELOPE_NAMESPACE_URI, SOAP_FAULT_DETAIL_LOCAL_NAME); static final QName QNAME_FAULT_ROLE = new QName(SOAP_ENVELOPE_NAMESPACE_URI, SOAP_FAULT_ROLE_LOCAL_NAME); static final QName QNAME_FAULT_VALUE = new QName(SOAP_ENVELOPE_NAMESPACE_URI, SOAP_FAULT_VALUE_LOCAL_NAME); static final QName QNAME_FAULT_SUBCODE = new QName(SOAP_ENVELOPE_NAMESPACE_URI, SOAP_FAULT_SUB_CODE_LOCAL_NAME); static final QName QNAME_FAULT_TEXT = new QName(SOAP_ENVELOPE_NAMESPACE_URI, SOAP_FAULT_TEXT_LOCAL_NAME); } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/soap/SOAPBody.java0000644000000000000000000000662411131637464025655 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMException; import org.apache.axiom.om.OMNamespace; /** * An object that represents the contents of the SOAP body element in a SOAP message. B SOAP body * element consists of XML data that affects the way the application-specific content is processed. *

* B SOAPBody object contains OMBodyBlock objects, which have the content * for the SOAP body. B SOAPFault object, which carries status and/or error * information, is an example of a OMBodyBlock object. */ public interface SOAPBody extends OMElement { /** * Creates a new SOAPFault object and adds it to this SOAPBody * object. * * @param e * @return the new SOAPFault object * @throws org.apache.axiom.om.OMException * if there is a SOAP error * @throws org.apache.axiom.om.OMException * */ SOAPFault addFault(Exception e) throws OMException; /** * Indicates whether a SOAPFault object exists in this SOAPBody * object. * * @return true if a SOAPFault object exists in this * SOAPBody object; false otherwise */ boolean hasFault(); /** * Returns the SOAPFault object in this SOAPBody object. * * @return the SOAPFault object in this SOAPBody object */ SOAPFault getFault(); /** * @param soapFault * @throws OMException */ void addFault(SOAPFault soapFault) throws OMException; /** * Retrieves the OMNamespace of the first element in the body. * The implementation might build the OMElement or it may * obtain this information from the builder/parser without building * the OMElement. Use this method in the situations where you need * to know the OMNamespace, but don't necessarily need the OMElement. * @return OMNamespace of first element in the body or null */ public OMNamespace getFirstElementNS(); /** * Retrieves the local name of the first element in the body. * The implementation might build the OMElement or it may * obtain this information from the builder/parser without building * the OMElement. Use this method in the situations where you need * to know the name, but don't necessarily need the OMElement. * @return local name of first element in the body or null */ public String getFirstElementLocalName(); } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/soap/SOAPFactory.java0000644000000000000000000002535611131637464026372 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap; import org.apache.axiom.om.OMDataSource; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMXMLParserWrapper; public interface SOAPFactory extends OMFactory { String getSoapVersionURI(); SOAPVersion getSOAPVersion(); /** Eran Chinthaka (chinthaka@apache.org) */ SOAPMessage createSOAPMessage(); SOAPMessage createSOAPMessage(OMXMLParserWrapper builder); SOAPMessage createSOAPMessage(SOAPEnvelope envelope, OMXMLParserWrapper parserWrapper); /** @return Returns SOAPEnvelope. */ SOAPEnvelope createSOAPEnvelope() throws SOAPProcessingException; SOAPEnvelope createSOAPEnvelope(OMNamespace ns); SOAPEnvelope createSOAPEnvelope(OMXMLParserWrapper builder); /** * @param envelope * @return Returns SOAPHeader. */ SOAPHeader createSOAPHeader(SOAPEnvelope envelope) throws SOAPProcessingException; SOAPHeader createSOAPHeader() throws SOAPProcessingException; /** * @param envelope * @param builder * @return Returns SOAPHeader. */ SOAPHeader createSOAPHeader(SOAPEnvelope envelope, OMXMLParserWrapper builder); /** * @param localName * @param ns * @return Returns SOAPHeaderBlock. */ SOAPHeaderBlock createSOAPHeaderBlock(String localName, OMNamespace ns, SOAPHeader parent) throws SOAPProcessingException; SOAPHeaderBlock createSOAPHeaderBlock(String localName, OMNamespace ns) throws SOAPProcessingException; /** * Create SOAPHeaderBlock that has an OMDataSource * @param localName * @param ns * @param ds * @return SOAPHeaderBlock * @throws SOAPProcessingException */ SOAPHeaderBlock createSOAPHeaderBlock(String localName, OMNamespace ns, OMDataSource ds) throws SOAPProcessingException; /** * @param localName * @param ns * @param parent * @param builder * @return Returns SOAPHeaderBlock. */ SOAPHeaderBlock createSOAPHeaderBlock(String localName, OMNamespace ns, SOAPHeader parent, OMXMLParserWrapper builder) throws SOAPProcessingException; /** * @param parent * @param e * @return Returns SOAPFault. */ SOAPFault createSOAPFault(SOAPBody parent, Exception e) throws SOAPProcessingException; SOAPFault createSOAPFault(SOAPBody parent) throws SOAPProcessingException; SOAPFault createSOAPFault() throws SOAPProcessingException; /** * @param parent * @param builder * @return Returns SOAPFault. */ SOAPFault createSOAPFault(SOAPBody parent, OMXMLParserWrapper builder); /** * @param envelope * @return Returns SOAPBody. */ SOAPBody createSOAPBody(SOAPEnvelope envelope) throws SOAPProcessingException; SOAPBody createSOAPBody() throws SOAPProcessingException; /** * @param envelope * @param builder * @return Returns SOAPBody. */ SOAPBody createSOAPBody(SOAPEnvelope envelope, OMXMLParserWrapper builder); /* ======================== = SOAPFaultCode = ======================== */ /** * Code eii under SOAPFault (parent) * * @param parent * @return Returns SOAPFaultCode. */ SOAPFaultCode createSOAPFaultCode(SOAPFault parent) throws SOAPProcessingException; SOAPFaultCode createSOAPFaultCode() throws SOAPProcessingException; /** * Code eii under SOAPFault (parent) * * @param parent * @param builder * @return Returns SOAPFaultCode. */ SOAPFaultCode createSOAPFaultCode(SOAPFault parent, OMXMLParserWrapper builder); /*======================== = SOAPFaultCodeValue = ======================== */ /** * Value eii under Code (parent) * * @param parent * @return Returns SOAPFaultValue. */ SOAPFaultValue createSOAPFaultValue(SOAPFaultCode parent) throws SOAPProcessingException; SOAPFaultValue createSOAPFaultValue() throws SOAPProcessingException; /** * Value eii under Code (parent) * * @param parent * @param builder * @return Returns SOAPFaultValue. */ SOAPFaultValue createSOAPFaultValue(SOAPFaultCode parent, OMXMLParserWrapper builder); /*======================== = SOAPFaultSubCode = ======================== */ /** * SubCode eii under Value (parent) * * @param parent * @return Returns SOAPFaultValue. */ //added SOAPFaultValue createSOAPFaultValue(SOAPFaultSubCode parent) throws SOAPProcessingException; //added SOAPFaultValue createSOAPFaultValue(SOAPFaultSubCode parent, OMXMLParserWrapper builder); //changed SOAPFaultSubCode createSOAPFaultSubCode(SOAPFaultCode parent) throws SOAPProcessingException; SOAPFaultSubCode createSOAPFaultSubCode() throws SOAPProcessingException; /** * SubCode eii under Value (parent) * * @param parent * @param builder * @return Returns SOAPFaultSubCode. */ //changed SOAPFaultSubCode createSOAPFaultSubCode(SOAPFaultCode parent, OMXMLParserWrapper builder); /** * SubCode eii under SubCode (parent) * * @param parent * @return Returns SOAPFaultSubCode. */ SOAPFaultSubCode createSOAPFaultSubCode(SOAPFaultSubCode parent) throws SOAPProcessingException; /** * SubCode eii under SubCode (parent) * * @param parent * @param builder * @return Returns SOAPFaultSubCode. */ SOAPFaultSubCode createSOAPFaultSubCode(SOAPFaultSubCode parent, OMXMLParserWrapper builder); /*======================== = SOAPFaultReason = ======================== */ /** * Reason eii under SOAPFault (parent) * * @param parent * @return Returns SOAPFaultReason. */ SOAPFaultReason createSOAPFaultReason(SOAPFault parent) throws SOAPProcessingException; SOAPFaultReason createSOAPFaultReason() throws SOAPProcessingException; /** * Reason eii under SOAPFault (parent) * * @param parent * @param builder * @return Returns SOAPFaultReason. */ SOAPFaultReason createSOAPFaultReason(SOAPFault parent, OMXMLParserWrapper builder); /*======================== = SOAPFaultReasonText = ======================== */ /** * SubCode eii under SubCode (parent) * * @param parent * @return Returns SOAPFaultText. */ SOAPFaultText createSOAPFaultText(SOAPFaultReason parent) throws SOAPProcessingException; SOAPFaultText createSOAPFaultText() throws SOAPProcessingException; /** * SubCode eii under SubCode (parent) * * @param parent * @param builder * @return Returns SOAPFaultText. */ SOAPFaultText createSOAPFaultText(SOAPFaultReason parent, OMXMLParserWrapper builder); /*======================== = SOAPFaultNode = ======================== */ /** * Node eii under SOAPFault (parent) * * @param parent * @return Returns SOAPFaultNode. */ SOAPFaultNode createSOAPFaultNode(SOAPFault parent) throws SOAPProcessingException; SOAPFaultNode createSOAPFaultNode() throws SOAPProcessingException; /** * Node eii under SOAPFault (parent) * * @param parent * @param builder * @return Returns SOAPFaultNode. */ SOAPFaultNode createSOAPFaultNode(SOAPFault parent, OMXMLParserWrapper builder); /*======================== = SOAPFaultRole = ======================== */ /** * Role eii under SOAPFault (parent) * * @param parent * @return Returns SOAPFaultRole. */ SOAPFaultRole createSOAPFaultRole(SOAPFault parent) throws SOAPProcessingException; SOAPFaultRole createSOAPFaultRole() throws SOAPProcessingException; /** * Role eii under SOAPFault (parent) * * @param parent * @param builder * @return Returns SOAPFaultRole. */ SOAPFaultRole createSOAPFaultRole(SOAPFault parent, OMXMLParserWrapper builder); /*======================== = SOAPFaultDetail = ======================== */ /** * Detail eii under SOAPFault (parent) * * @param parent * @return Returns SOAPFaultDetail. */ SOAPFaultDetail createSOAPFaultDetail(SOAPFault parent) throws SOAPProcessingException; SOAPFaultDetail createSOAPFaultDetail() throws SOAPProcessingException; /** * Role eii under SOAPFault (parent) * * @param parent * @param builder * @return Returns SOAPFaultDetail. */ SOAPFaultDetail createSOAPFaultDetail(SOAPFault parent, OMXMLParserWrapper builder); /** * Method getDefaultEnvelope. This returns a SOAP envelope consisting with an empty Header and a * Body. This is just a util method which can be used everywhere. * * @return Returns SOAPEnvelope. */ SOAPEnvelope getDefaultEnvelope() throws SOAPProcessingException; SOAPEnvelope getDefaultFaultEnvelope() throws SOAPProcessingException; OMNamespace getNamespace(); } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/soap/SOAP11Constants.java0000644000000000000000000000564311131637464027076 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap; import javax.xml.namespace.QName; public interface SOAP11Constants extends SOAPConstants { /** Eran Chinthaka (chinthaka@apache.org) */ static final String SOAP_ENVELOPE_NAMESPACE_URI = "http://schemas.xmlsoap.org/soap/envelope/"; static final String SOAP_ENCODING_NAMESPACE_URI = "http://schemas.xmlsoap.org/soap/encoding/"; /** Field ATTR_ACTOR */ static final String ATTR_ACTOR = "actor"; /** Field SOAP_FAULT_CODE_LOCAL_NAME */ static final String SOAP_FAULT_CODE_LOCAL_NAME = "faultcode"; /** Field SOAP_FAULT_STRING_LOCAL_NAME */ static final String SOAP_FAULT_STRING_LOCAL_NAME = "faultstring"; /** Field SOAP_FAULT_ACTOR_LOCAL_NAME */ static final String SOAP_FAULT_ACTOR_LOCAL_NAME = "faultactor"; static final String SOAP_FAULT_DETAIL_LOCAL_NAME = "detail"; //SOAP 1.2 Content Type static final String SOAP_11_CONTENT_TYPE = "text/xml"; // -------- SOAP Fault Codes ------------------------------ static final String FAULT_CODE_SENDER = "Client"; static final String FAULT_CODE_RECEIVER = "Server"; static final String SOAP_ACTOR_NEXT = "http://schemas.xmlsoap.org/soap/actor/next"; // QNames static final QName QNAME_ACTOR = new QName(SOAP_ENVELOPE_NAMESPACE_URI, ATTR_ACTOR); static final QName QNAME_MU_FAULTCODE = new QName(SOAP_ENVELOPE_NAMESPACE_URI, FAULT_CODE_MUST_UNDERSTAND); static final QName QNAME_SENDER_FAULTCODE = new QName(SOAP_ENVELOPE_NAMESPACE_URI, FAULT_CODE_SENDER); static final QName QNAME_RECEIVER_FAULTCODE = new QName(SOAP_ENVELOPE_NAMESPACE_URI, FAULT_CODE_RECEIVER); static final QName QNAME_FAULT_REASON = new QName(SOAP_FAULT_STRING_LOCAL_NAME); static final QName QNAME_FAULT_CODE = new QName(SOAP_FAULT_CODE_LOCAL_NAME); static final QName QNAME_FAULT_DETAIL = new QName(SOAP_FAULT_DETAIL_LOCAL_NAME); static final QName QNAME_FAULT_ROLE = new QName(SOAP_FAULT_ACTOR_LOCAL_NAME); } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/soap/SOAPFault.java0000644000000000000000000000667511131637464026041 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMException; /** * An element in the SOAPBody object that contains error and/or status information. * This information may relate to errors in the OMMessage object or to problems that * are not related to the content in the message itself. Problems not related to the message itself * are generally errors in processing, such as the inability to communicate with an upstream * server. *

* The SOAPFault interface provides methods for retrieving the information contained in * a SOAPFault object and for setting the fault code, the fault actor, and a string * describing the fault. B fault code is one of the codes defined in the SOAP 1.1 specification that * describe the fault. An actor is an intermediate recipient to whom a message was routed. The * message path may include one or more actors, or, if no actors are specified, the message goes * only to the default actor, which is the final intended recipient. */ public interface SOAPFault extends OMElement { /** * SOAPFaultCode is a mandatory item in a Fault, in SOAP 1.2 specification * * @param soapFaultCode */ void setCode(SOAPFaultCode soapFaultCode) throws SOAPProcessingException; SOAPFaultCode getCode(); /** * SOAPFaultReason is a mandatory item in a Fault, in SOAP 1.2 specification * * @param reason */ void setReason(SOAPFaultReason reason) throws SOAPProcessingException; SOAPFaultReason getReason(); /** * SOAPFaultNode is an optional item in a Fault, in SOAP 1.2 specification * * @param node */ void setNode(SOAPFaultNode node) throws SOAPProcessingException; SOAPFaultNode getNode(); /** * SOAPFaultRoleImpl is an optional item in a Fault, in SOAP 1.2 specification * * @param role */ void setRole(SOAPFaultRole role) throws SOAPProcessingException; SOAPFaultRole getRole(); /** * SOAPFaultRoleImpl is an optional item in a Fault, in SOAP 1.2 specification * * @param detail */ void setDetail(SOAPFaultDetail detail) throws SOAPProcessingException; SOAPFaultDetail getDetail(); /** * Returns Exception if there is one in the SOAP fault. *

* If the exception is like; stack trace goes here * * * @return Returns Exception. * @throws org.apache.axiom.om.OMException * */ Exception getException() throws OMException; void setException(Exception e) throws OMException; } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/soap/RolePlayer.java0000644000000000000000000000322711131637464026347 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap; import java.util.List; /** * This interface represents the thing which provides us with the SOAP roles in a given * context. Used to search through SOAP header blocks. */ public interface RolePlayer { /** * Get a list of the roles supported. NOTE: the "next" role is automatically supported, * and the "none" role (for SOAP 1.2) is automatically disallowed. The roles returned * should only be the non-standard ones, since the ultimate destination role is also * handled by the isUltimateDestination method below. * * @return a List containing URI Strings, one per custom role supported, or null */ List getRoles(); /** * Are we the ultimate destination? * * @return true if this is the ultimate destination, false if an intermediary. */ boolean isUltimateDestination(); } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/soap/SOAPFaultReason.java0000644000000000000000000000226711131637464027202 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap; import org.apache.axiom.om.OMElement; import java.util.List; public interface SOAPFaultReason extends OMElement { /** Eran Chinthaka (chinthaka@apache.org) */ void addSOAPText(SOAPFaultText soapFaultText) throws SOAPProcessingException; SOAPFaultText getFirstSOAPText(); List getAllSoapTexts(); SOAPFaultText getSOAPFaultText(String language); } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/soap/SOAPEnvelope.java0000644000000000000000000000637311131637464026536 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMException; import org.apache.axiom.om.OMNamespace; /** Interface SOAPEnvelope */ public interface SOAPEnvelope extends OMElement { /** * Returns the SOAPHeader object for this SOAPEnvelope object.

* This SOAPHeader will just be a container for all the headers in the OMMessage *

* * @return the SOAPHeader object or null if there is none * @throws org.apache.axiom.om.OMException * if there is a problem obtaining the SOAPHeader object */ SOAPHeader getHeader() throws OMException; /** * Returns the SOAPBody object associated with this SOAPEnvelope * object.

This SOAPBody will just be a container for all the BodyElements in the * OMMessage

* * @return the SOAPBody object for this SOAPEnvelope object or * null if there is none * @throws OMException if there is a problem obtaining the SOAPBody object */ SOAPBody getBody() throws OMException; SOAPVersion getVersion(); /** * Returns true if there is a SOAPFault in the body. * The implementation may choose to get this information by building the OM * tree or use parser provided information. * @return true if SOAPFault in the body */ boolean hasFault(); /** * Retrieves the OMNamespace of the first element in the body. * The implementation might build the OMElement or it may * obtain this information from the builder/parser without building * the OMElement. Use this method in the situations where you need * to know the OMNamespace, but don't necessarily need the OMElement. * @return OMNamespace of first element in the body or null */ public OMNamespace getSOAPBodyFirstElementNS(); /** * Retrieves the local name of the first element in the body. * The implementation might build the OMElement or it may * obtain this information from the builder/parser without building * the OMElement. Use this method in the situations where you need * to know the name, but don't necessarily need the OMElement. * @return local name of first element in the body or null */ public String getSOAPBodyFirstElementLocalName(); } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/soap/impl/0000755000000000000000000000000011131637464024363 5ustar rootrootaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/soap/impl/builder/0000755000000000000000000000000011131637464026011 5ustar rootroot././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/soap/impl/builder/SOAPBuilderHelper.javaaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/soap/impl/builder/SOAPBuilderHelper.jav0000644000000000000000000001033111131637464031722 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.builder; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.impl.exception.OMBuilderException; import org.apache.axiom.soap.SOAP11Constants; import org.apache.axiom.soap.SOAP12Constants; import org.apache.axiom.soap.SOAPProcessingException; import javax.xml.stream.XMLStreamReader; public abstract class SOAPBuilderHelper { protected StAXSOAPModelBuilder builder; protected XMLStreamReader parser; protected SOAPBuilderHelper(StAXSOAPModelBuilder builder) { this.builder = builder; } public abstract OMElement handleEvent(XMLStreamReader parser, OMElement element, int elementLevel) throws SOAPProcessingException; protected void processNamespaceData(OMElement node, boolean checkSOAPNamespace) { int namespaceCount = parser.getNamespaceCount(); for (int i = 0; i < namespaceCount; i++) { String namespaceURI = parser.getNamespaceURI(i); if (namespaceURI != null) { node.declareNamespace(parser.getNamespaceURI(i), parser.getNamespacePrefix(i)); } } // set the own namespace String namespaceURI = parser.getNamespaceURI(); String prefix = parser.getPrefix(); OMNamespace namespace = null; if (namespaceURI != null && namespaceURI.length() > 0) { if (prefix == null) { // this means, this elements has a default namespace or it has inherited a default namespace from its parent namespace = node.findNamespace(namespaceURI, ""); if (namespace == null) { namespace = node.declareNamespace(namespaceURI, ""); } } else { namespace = node.findNamespace(namespaceURI, prefix); } node.setNamespace(namespace); } // TODO we got to have this to make sure OM reject mesagess that are not name space qualified // But got to comment this to interop with Axis.1.x // if (namespace == null) { // throw new OMException("All elements must be namespace qualified!"); // } if (checkSOAPNamespace) { if (node.getNamespace() != null && !node.getNamespace().getNamespaceURI().equals( SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI) && !node.getNamespace().getNamespaceURI().equals( SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI)) { throw new OMBuilderException("invalid SOAP namespace URI"); } } } protected void processAttributes(OMElement node) { int attribCount = parser.getAttributeCount(); for (int i = 0; i < attribCount; i++) { OMNamespace ns = null; String uri = parser.getAttributeNamespace(i); if (uri != null && uri.hashCode() != 0) { ns = node.findNamespace(uri, parser.getAttributePrefix(i)); } // todo if the attributes are supposed to namespace qualified all the time // todo then this should throw an exception here node.addAttribute(parser.getAttributeLocalName(i), parser.getAttributeValue(i), ns); } } } ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/soap/impl/builder/SOAP11BuilderHelper.javaaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/soap/impl/builder/SOAP11BuilderHelper.j0000644000000000000000000001445411131637464031547 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.builder; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.impl.OMNodeEx; import org.apache.axiom.om.impl.exception.OMBuilderException; import org.apache.axiom.soap.SOAP11Constants; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPFault; import org.apache.axiom.soap.SOAPFaultCode; import org.apache.axiom.soap.SOAPFaultReason; import org.apache.axiom.soap.SOAPProcessingException; import org.w3c.dom.Element; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; public class SOAP11BuilderHelper extends SOAPBuilderHelper implements SOAP11Constants { private SOAPFactory factory; private boolean faultcodePresent = false; private boolean faultstringPresent = false; public SOAP11BuilderHelper(StAXSOAPModelBuilder builder) { super(builder); factory = builder.getSoapFactory(); } public OMElement handleEvent(XMLStreamReader parser, OMElement parent, int elementLevel) throws SOAPProcessingException { this.parser = parser; OMElement element = null; String localName = parser.getLocalName(); if (elementLevel == 4) { if (SOAP_FAULT_CODE_LOCAL_NAME.equals(localName)) { SOAPFaultCode code = factory.createSOAPFaultCode( (SOAPFault) parent, builder); processNamespaceData(code, false); processAttributes(code); processText(parser, code); ((OMNodeEx) code).setComplete(true); element = code; ((StAXSOAPModelBuilder) builder).adjustElementLevel(-1); faultcodePresent = true; } else if (SOAP_FAULT_STRING_LOCAL_NAME.equals(localName)) { SOAPFaultReason reason = factory.createSOAPFaultReason( (SOAPFault) parent, builder); processNamespaceData(reason, false); processAttributes(reason); processText(parser, reason); ((OMNodeEx) reason).setComplete(true); element = reason; ((StAXSOAPModelBuilder) builder).adjustElementLevel(-1); faultstringPresent = true; } else if (SOAP_FAULT_ACTOR_LOCAL_NAME.equals(localName)) { element = factory.createSOAPFaultRole((SOAPFault) parent, builder); processNamespaceData(element, false); processAttributes(element); } else if (SOAP_FAULT_DETAIL_LOCAL_NAME.equals(localName)) { element = factory.createSOAPFaultDetail((SOAPFault) parent, builder); processNamespaceData(element, false); processAttributes(element); } else { element = factory.createOMElement( localName, null, parent, builder); processNamespaceData(element, false); processAttributes(element); } } else if (elementLevel == 5) { String parentTagName = ""; if (parent instanceof Element) { parentTagName = ((Element) parent).getTagName(); } else { parentTagName = parent.getLocalName(); } if (parentTagName.equals(SOAP_FAULT_CODE_LOCAL_NAME)) { throw new OMBuilderException( "faultcode element should not have children"); } else if (parentTagName.equals( SOAP_FAULT_STRING_LOCAL_NAME)) { throw new OMBuilderException( "faultstring element should not have children"); } else if (parentTagName.equals( SOAP_FAULT_ACTOR_LOCAL_NAME)) { throw new OMBuilderException( "faultactor element should not have children"); } else { element = this.factory.createOMElement( localName, null, parent, builder); processNamespaceData(element, false); processAttributes(element); } } else if (elementLevel > 5) { element = this.factory.createOMElement(localName, null, parent, builder); processNamespaceData(element, false); processAttributes(element); } return element; } private void processText(XMLStreamReader parser, OMElement value) { try { int token = parser.next(); while (token != XMLStreamReader.END_ELEMENT) { if (token == XMLStreamReader.CHARACTERS) { factory.createOMText(value, parser.getText()); } else if (token == XMLStreamReader.CDATA) { factory.createOMText(value, parser.getText()); } else { throw new SOAPProcessingException( "Only Characters are allowed here"); } token = parser.next(); } } catch (XMLStreamException e) { throw new SOAPProcessingException(e); } } }././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/soap/impl/builder/MTOMStAXSOAPModelBuilder.javaaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/soap/impl/builder/MTOMStAXSOAPModelBuil0000644000000000000000000001170411131637464031533 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.builder; import org.apache.axiom.attachments.Attachments; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMException; import org.apache.axiom.om.OMNode; import org.apache.axiom.om.OMText; import org.apache.axiom.om.impl.MTOMConstants; import org.apache.axiom.om.impl.OMContainerEx; import org.apache.axiom.om.impl.OMNodeEx; import org.apache.axiom.om.impl.builder.XOPBuilder; import org.apache.axiom.om.util.ElementHelper; import org.apache.axiom.soap.SOAPFactory; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import javax.activation.DataHandler; import javax.xml.stream.XMLStreamReader; public class MTOMStAXSOAPModelBuilder extends StAXSOAPModelBuilder implements MTOMConstants, XOPBuilder { private static final Log log = LogFactory.getLog(MTOMStAXSOAPModelBuilder.class); /** Attachments handles deferred parsing of incoming MIME Messages. */ Attachments attachments; int partIndex = 0; public MTOMStAXSOAPModelBuilder(XMLStreamReader parser, SOAPFactory factory, Attachments attachments, String soapVersion) { super(parser, factory, soapVersion); this.attachments = attachments; } /** * @param reader * @param attachments */ public MTOMStAXSOAPModelBuilder(XMLStreamReader reader, Attachments attachments, String soapVersion) { super(reader, soapVersion); this.attachments = attachments; } public MTOMStAXSOAPModelBuilder(XMLStreamReader reader, Attachments attachments) { super(reader); this.attachments = attachments; } protected OMNode createOMElement() throws OMException { String elementName = parser.getLocalName(); String namespaceURI = parser.getNamespaceURI(); // create an OMBlob if the element is an if (XOP_INCLUDE.equals(elementName) && XOP_NAMESPACE_URI.equals(namespaceURI)) { OMText node; String contentID = ElementHelper.getContentID(parser); if (log.isDebugEnabled()) { log.debug("Encountered xop:include for cid:" + contentID); } if (lastNode == null) { throw new OMException( "XOP:Include element is not supported here"); } else if (lastNode.isComplete() & lastNode.getParent() != null) { node = omfactory.createOMText(contentID, lastNode.getParent(), this); ((OMNodeEx) lastNode).setNextOMSibling(node); ((OMNodeEx) node).setPreviousOMSibling(lastNode); if (log.isDebugEnabled()) { log.debug("Create createOMText for cid:" + contentID); Object dh = node.getDataHandler(); String dhClass = (dh==null) ? "null" : dh.getClass().toString(); log.debug("The datahandler is " + dhClass); } } else { OMContainerEx e = (OMContainerEx) lastNode; node = omfactory.createOMText(contentID, (OMElement) lastNode, this); e.setFirstChild(node); } return node; } else { return super.createOMElement(); } } /* (non-Javadoc) * @see org.apache.axiom.soap.impl.builder.XOPBuilder#getDataHandler(java.lang.String) */ public DataHandler getDataHandler(String blobContentID) throws OMException { DataHandler dataHandler = attachments.getDataHandler(blobContentID); /* The getDataHandler javadoc indicates that null indicate that the datahandler * was not found * if (dataHandler == null) { throw new OMException( "Referenced Attachment not found in the MIME Message. ContentID:" + blobContentID); } */ return dataHandler; } public Attachments getAttachments() { return attachments; } } ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/soap/impl/builder/StAXSOAPModelBuilder.javaaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/soap/impl/builder/StAXSOAPModelBuilder.0000644000000000000000000004611611131637464031614 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.builder; import org.apache.axiom.om.OMAbstractFactory; import org.apache.axiom.om.OMContainer; import org.apache.axiom.om.OMDocument; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMException; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMNode; import org.apache.axiom.om.impl.OMContainerEx; import org.apache.axiom.om.impl.OMNodeEx; import org.apache.axiom.om.impl.builder.CustomBuilder; import org.apache.axiom.om.impl.builder.StAXOMBuilder; import org.apache.axiom.soap.SOAP11Constants; import org.apache.axiom.soap.SOAP12Constants; import org.apache.axiom.soap.SOAPBody; import org.apache.axiom.soap.SOAPConstants; import org.apache.axiom.soap.SOAPEnvelope; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPHeader; import org.apache.axiom.soap.SOAPMessage; import org.apache.axiom.soap.SOAPProcessingException; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import javax.xml.stream.XMLStreamReader; /** * StAX based builder that produces a SOAP infoset model. * It builds SOAP specific objects such as {@link SOAPEnvelope}, {@link SOAPHeader}, * {@link SOAPHeaderBlock} and {@link SOAPBody}. */ public class StAXSOAPModelBuilder extends StAXOMBuilder { SOAPMessage soapMessage; /** Field envelope */ private SOAPEnvelope envelope; private OMNamespace envelopeNamespace; private String namespaceURI; private SOAPFactory soapFactory; /** Field headerPresent */ private boolean headerPresent = false; /** Field bodyPresent */ private boolean bodyPresent = false; /** Field log */ private static final Log log = LogFactory.getLog(StAXSOAPModelBuilder.class); private boolean processingFault = false; //added /* This is used to indicate whether detail element is processing in soap 1.2 builderhelper */ private boolean processingDetailElements = false; private SOAPBuilderHelper builderHelper; private String parserVersion = null; private static final boolean isDebugEnabled = log.isDebugEnabled(); /** * Constructor StAXSOAPModelBuilder soapVersion parameter is to give the soap version from the * transport. For example, in HTTP case you can identify the version of the soap message u have * recd by looking at the HTTP headers. It is used to check whether the actual soap message * contained is of that version. If one is creates the builder from the transport, then can just * pass null for version. * * @param parser * @param soapVersion parameter is to give the soap version for the transport. */ public StAXSOAPModelBuilder(XMLStreamReader parser, String soapVersion) { super(parser); parserVersion = parser.getVersion(); identifySOAPVersion(soapVersion); } /** * Constructor StAXSOAPModelBuilder Users of this constructor needs to externally take care * validating the transport level soap version with the Envelope version. * * @param parser */ public StAXSOAPModelBuilder(XMLStreamReader parser) { super(parser); parserVersion = parser.getVersion(); SOAPEnvelope soapEnvelope = getSOAPEnvelope(); envelopeNamespace = soapEnvelope.getNamespace(); } /** * @param parser * @param factory * @param soapVersion parameter is to give the soap version from the transport. For example, in * HTTP case you can identify the version of the soap message u have recd by * looking at the HTTP headers. It is used to check whether the actual soap * message contained is of that version.If one is creates the builder from * the transport, then can just pass null for version. */ public StAXSOAPModelBuilder(XMLStreamReader parser, SOAPFactory factory, String soapVersion) { super(factory, parser); soapFactory = factory; parserVersion = parser.getVersion(); identifySOAPVersion(soapVersion); } /** @param soapVersionURIFromTransport */ protected void identifySOAPVersion(String soapVersionURIFromTransport) { SOAPEnvelope soapEnvelope = getSOAPEnvelope(); if (soapEnvelope == null) { throw new SOAPProcessingException("SOAP Message does not contain an Envelope", SOAPConstants.FAULT_CODE_VERSION_MISMATCH); } envelopeNamespace = soapEnvelope.getNamespace(); if (soapVersionURIFromTransport != null) { String namespaceName = envelopeNamespace.getNamespaceURI(); if (!(soapVersionURIFromTransport.equals(namespaceName))) { throw new SOAPProcessingException( "Transport level information does not match with SOAP" + " Message namespace URI", envelopeNamespace.getPrefix() + ":" + SOAPConstants.FAULT_CODE_VERSION_MISMATCH); } } } /** * Method getSOAPEnvelope. * * @return Returns SOAPEnvelope. * @throws OMException */ public SOAPEnvelope getSOAPEnvelope() throws OMException { while ((envelope == null) && !done) { next(); } return envelope; } /** * Creates a new OMElement using either a CustomBuilder or * the default Builder mechanism. * @return */ protected OMNode createNextOMElement() { OMNode newElement = null; if (elementLevel == 3 && customBuilderForPayload != null) { OMNode parent = lastNode; if (parent != null && parent.isComplete()) { parent = (OMNode) lastNode.getParent(); } if (parent instanceof SOAPBody) { newElement = createWithCustomBuilder(customBuilderForPayload, soapFactory); } } if (newElement == null && customBuilders != null && elementLevel <= maxDepthForCustomBuilders) { String namespace = parser.getNamespaceURI(); String localPart = parser.getLocalName(); CustomBuilder customBuilder = getCustomBuilder(namespace, localPart); if (customBuilder != null) { newElement = createWithCustomBuilder(customBuilder, soapFactory); } } if (newElement == null) { newElement = createOMElement(); } else { elementLevel--; // Decrease level since custom builder read the end element event } return newElement; } /** * Method createOMElement. * * @return Returns OMNode. * @throws OMException */ protected OMNode createOMElement() throws OMException { OMElement node; String elementName = parser.getLocalName(); if (lastNode == null) { node = constructNode(null, elementName, true); setSOAPEnvelope(node); } else if (lastNode.isComplete()) { OMContainer parent = lastNode.getParent(); if (parent == document) { // If we get here, this means that we found the SOAP envelope, but that it was // preceded by a comment node. Since constructNode will create a new document // based on the SOAP version of the envelope, we simply discard the last node // and do as if we just encountered the first node in the document. lastNode = null; node = constructNode(null, elementName, true); setSOAPEnvelope(node); } else { node = constructNode((OMElement)parent, elementName, false); ((OMNodeEx) lastNode).setNextOMSibling(node); ((OMNodeEx) node).setPreviousOMSibling(lastNode); } } else { OMContainerEx e = (OMContainerEx) lastNode; node = constructNode((OMElement) lastNode, elementName, false); e.setFirstChild(node); } if (isDebugEnabled) { log.debug("Build the OMElement " + node.getLocalName() + " by the StaxSOAPModelBuilder"); } return node; } protected void setSOAPEnvelope(OMElement node) { soapMessage.setSOAPEnvelope((SOAPEnvelope) node); soapMessage.setXMLVersion(parserVersion); soapMessage.setCharsetEncoding(charEncoding); } /** * Method constructNode * * @param parent * @param elementName * @param isEnvelope */ protected OMElement constructNode(OMElement parent, String elementName, boolean isEnvelope) { OMElement element; if (parent == null) { // Now I've found a SOAP Envelope, now create SOAPDocument and SOAPEnvelope here. if (!elementName.equals(SOAPConstants.SOAPENVELOPE_LOCAL_NAME)) { throw new SOAPProcessingException("First Element must contain the local name, " + SOAPConstants.SOAPENVELOPE_LOCAL_NAME + " , but found " + elementName, SOAPConstants.FAULT_CODE_SENDER); } // determine SOAP version and from that determine a proper factory here. if (soapFactory == null) { namespaceURI = this.parser.getNamespaceURI(); if (SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(namespaceURI)) { soapFactory = OMAbstractFactory.getSOAP12Factory(); if (isDebugEnabled) { log.debug("Starting to process SOAP 1.2 message"); } } else if (SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(namespaceURI)) { soapFactory = OMAbstractFactory.getSOAP11Factory(); if (isDebugEnabled) { log.debug("Starting to process SOAP 1.1 message"); } } else { throw new SOAPProcessingException( "Only SOAP 1.1 or SOAP 1.2 messages are supported in the" + " system", SOAPConstants.FAULT_CODE_VERSION_MISMATCH); } } else { namespaceURI = soapFactory.getSoapVersionURI(); } // create a SOAPMessage to hold the SOAP envelope and assign the SOAP envelope in that. soapMessage = soapFactory.createSOAPMessage(this); this.document = soapMessage; if (charEncoding != null) { document.setCharsetEncoding(charEncoding); } envelope = soapFactory.createSOAPEnvelope(this); element = envelope; processNamespaceData(element, true); // fill in the attributes processAttributes(element); } else if (elementLevel == 2) { // Must be in the right namespace regardless String elementNS = parser.getNamespaceURI(); if (!(namespaceURI.equals(elementNS))) { if (!bodyPresent || !SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(namespaceURI)) { throw new SOAPProcessingException("Disallowed element found inside Envelope : {" + elementNS + "}" + elementName); } } // this is either a header or a body if (elementName.equals(SOAPConstants.HEADER_LOCAL_NAME)) { if (headerPresent) { throw new SOAPProcessingException("Multiple headers encountered!", getSenderFaultCode()); } if (bodyPresent) { throw new SOAPProcessingException("Header Body wrong order!", getSenderFaultCode()); } headerPresent = true; element = soapFactory.createSOAPHeader((SOAPEnvelope) parent, this); processNamespaceData(element, true); processAttributes(element); } else if (elementName.equals(SOAPConstants.BODY_LOCAL_NAME)) { if (bodyPresent) { throw new SOAPProcessingException("Multiple body elements encountered", getSenderFaultCode()); } bodyPresent = true; element = soapFactory.createSOAPBody((SOAPEnvelope) parent, this); processNamespaceData(element, true); processAttributes(element); } else { throw new SOAPProcessingException(elementName + " is not supported here. Envelope can not have elements other than Header and Body.", getSenderFaultCode()); } } else if ((elementLevel == 3) && parent.getLocalName().equals(SOAPConstants.HEADER_LOCAL_NAME)) { // this is a headerblock try { element = soapFactory.createSOAPHeaderBlock(elementName, null, (SOAPHeader) parent, this); } catch (SOAPProcessingException e) { throw new SOAPProcessingException("Can not create SOAPHeader block", getReceiverFaultCode(), e); } processNamespaceData(element, false); processAttributes(element); } else if ((elementLevel == 3) && parent.getLocalName().equals(SOAPConstants.BODY_LOCAL_NAME) && elementName.equals(SOAPConstants.BODY_FAULT_LOCAL_NAME)) { // this is a headerblock element = soapFactory.createSOAPFault((SOAPBody) parent, this); processNamespaceData(element, false); processAttributes(element); processingFault = true; if (SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI .equals(envelopeNamespace.getNamespaceURI())) { builderHelper = new SOAP12BuilderHelper(this); } else if (SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI .equals(envelopeNamespace.getNamespaceURI())) { builderHelper = new SOAP11BuilderHelper(this); } } else if (elementLevel > 3 && processingFault) { element = builderHelper.handleEvent(parser, parent, elementLevel); } else { // this is neither of above. Just create an element element = soapFactory.createOMElement(elementName, null, parent, this); processNamespaceData(element, false); processAttributes(element); } return element; } private String getSenderFaultCode() { return envelope.getVersion().getSenderFaultCode().getLocalPart(); } private String getReceiverFaultCode() { return envelope.getVersion().getReceiverFaultCode().getLocalPart(); } public void endElement() { if (lastNode.isComplete()) { OMElement parent = (OMElement) lastNode.getParent(); ((OMNodeEx) parent).setComplete(true); lastNode = parent; } else { OMNode e = lastNode; ((OMNodeEx) e).setComplete(true); } } /** Method createDTD. Overriding the default behaviour as a SOAPMessage should not have a DTD. */ protected OMNode createDTD() throws OMException { throw new OMException("SOAP message MUST NOT contain a Document Type Declaration(DTD)"); } /** Method createPI. Overriding the default behaviour as a SOAP Message should not have a PI. */ protected OMNode createPI() throws OMException { throw new OMException("SOAP message MUST NOT contain Processing Instructions(PI)"); } /** * Method getDocumentElement. * * @return Returns OMElement. */ public OMElement getDocumentElement() { return envelope != null ? envelope : getSOAPEnvelope(); } /** * Method processNamespaceData. * * @param node * @param isSOAPElement */ protected void processNamespaceData(OMElement node, boolean isSOAPElement) { super.processNamespaceData(node); if (isSOAPElement) { if (node.getNamespace() != null && !node.getNamespace().getNamespaceURI() .equals(SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI) && !node.getNamespace().getNamespaceURI() .equals(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI)) { throw new SOAPProcessingException("invalid SOAP namespace URI. " + "Only " + SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI + " and " + SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI + " are supported.", SOAP12Constants.FAULT_CODE_SENDER); } } } /*these three methods to set and check detail element processing or mandatory fault element are present */ public OMNamespace getEnvelopeNamespace() { return envelopeNamespace; } public boolean isProcessingDetailElements() { return processingDetailElements; } public void setProcessingDetailElements(boolean value) { processingDetailElements = value; } public SOAPMessage getSoapMessage() { return soapMessage; } public OMDocument getDocument() { return this.soapMessage; } /** @return Returns the soapFactory. */ protected SOAPFactory getSoapFactory() { return soapFactory; } /** * Increase or decrease the element level by the desired amount. * This is needed by the SOAP11BuilderHelper to account for the different * depths for the SOAP fault sytax. * @param value */ void adjustElementLevel(int value) { elementLevel = elementLevel + value; } } ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/soap/impl/builder/SOAP12BuilderHelper.javaaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/soap/impl/builder/SOAP12BuilderHelper.j0000644000000000000000000003422211131637464031543 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.builder; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.impl.OMNodeEx; import org.apache.axiom.om.impl.exception.OMBuilderException; import org.apache.axiom.soap.SOAP12Constants; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPFault; import org.apache.axiom.soap.SOAPFaultCode; import org.apache.axiom.soap.SOAPFaultReason; import org.apache.axiom.soap.SOAPFaultSubCode; import org.apache.axiom.soap.SOAPProcessingException; import javax.xml.stream.XMLStreamReader; import java.util.Vector; public class SOAP12BuilderHelper extends SOAPBuilderHelper { private SOAPFactory factory; private boolean codePresent = false; private boolean reasonPresent = false; private boolean nodePresent = false; private boolean rolePresent = false; private boolean detailPresent = false; private boolean subcodeValuePresent = false; private boolean subSubcodePresent = false; private boolean valuePresent = false; private boolean subcodePresent = false; private boolean codeprocessing = false; private boolean subCodeProcessing = false; private boolean reasonProcessing = false; private Vector detailElementNames; public SOAP12BuilderHelper(StAXSOAPModelBuilder builder) { super(builder); factory = builder.getSoapFactory(); } public OMElement handleEvent(XMLStreamReader parser, OMElement parent, int elementLevel) throws SOAPProcessingException { this.parser = parser; OMElement element = null; if (elementLevel == 4) { if (parser.getLocalName().equals( SOAP12Constants.SOAP_FAULT_CODE_LOCAL_NAME)) { if (codePresent) { throw new OMBuilderException( "Multiple Code element encountered"); } else { element = factory.createSOAPFaultCode((SOAPFault) parent, builder); codePresent = true; codeprocessing = true; } } else if (parser.getLocalName().equals( SOAP12Constants.SOAP_FAULT_REASON_LOCAL_NAME)) { if (!codeprocessing && !subCodeProcessing) { if (codePresent) { if (reasonPresent) { throw new OMBuilderException( "Multiple Reason Element encountered"); } else { element = factory.createSOAPFaultReason( (SOAPFault) parent, builder); reasonPresent = true; reasonProcessing = true; } } else { throw new OMBuilderException( "Wrong element order encountred at " + parser.getLocalName()); } } else { if (codeprocessing) { throw new OMBuilderException( "Code doesn't have a value"); } else { throw new OMBuilderException( "A subcode doesn't have a Value"); } } } else if (parser.getLocalName().equals( SOAP12Constants.SOAP_FAULT_NODE_LOCAL_NAME)) { if (!reasonProcessing) { if (reasonPresent && !rolePresent && !detailPresent) { if (nodePresent) { throw new OMBuilderException( "Multiple Node element encountered"); } else { element = factory.createSOAPFaultNode( (SOAPFault) parent, builder); nodePresent = true; } } else { throw new OMBuilderException( "wrong element order encountered at " + parser.getLocalName()); } } else { throw new OMBuilderException( "Reason element Should have a text"); } } else if (parser.getLocalName().equals( SOAP12Constants.SOAP_FAULT_ROLE_LOCAL_NAME)) { if (!reasonProcessing) { if (reasonPresent && !detailPresent) { if (rolePresent) { throw new OMBuilderException( "Multiple Role element encountered"); } else { element = factory.createSOAPFaultRole( (SOAPFault) parent, builder); rolePresent = true; } } else { throw new OMBuilderException( "Wrong element order encountered at " + parser.getLocalName()); } } else { throw new OMBuilderException( "Reason element should have a text"); } } else if (parser.getLocalName().equals( SOAP12Constants.SOAP_FAULT_DETAIL_LOCAL_NAME)) { if (!reasonProcessing) { if (reasonPresent) { if (detailPresent) { throw new OMBuilderException( "Multiple detail element encountered"); } else { element = factory.createSOAPFaultDetail( (SOAPFault) parent, builder); detailPresent = true; } } else { throw new OMBuilderException( "wrong element order encountered at " + parser.getLocalName()); } } else { throw new OMBuilderException( "Reason element should have a text"); } } else { throw new OMBuilderException( parser.getLocalName() + " unsupported element in SOAPFault element"); } } else if (elementLevel == 5) { if (parent.getLocalName().equals( SOAP12Constants.SOAP_FAULT_CODE_LOCAL_NAME)) { if (parser.getLocalName().equals( SOAP12Constants.SOAP_FAULT_VALUE_LOCAL_NAME)) { if (!valuePresent) { element = factory.createSOAPFaultValue( (SOAPFaultCode) parent, builder); valuePresent = true; codeprocessing = false; } else { throw new OMBuilderException( "Multiple value Encountered in code element"); } } else if (parser.getLocalName().equals( SOAP12Constants.SOAP_FAULT_SUB_CODE_LOCAL_NAME)) { if (!subcodePresent) { if (valuePresent) { element = factory.createSOAPFaultSubCode( (SOAPFaultCode) parent, builder); subcodePresent = true; subCodeProcessing = true; } else { throw new OMBuilderException( "Value should present before the subcode"); } } else { throw new OMBuilderException( "multiple subcode Encountered in code element"); } } else { throw new OMBuilderException( parser.getLocalName() + " is not supported inside the code element"); } } else if (parent.getLocalName().equals( SOAP12Constants.SOAP_FAULT_REASON_LOCAL_NAME)) { if (parser.getLocalName().equals( SOAP12Constants.SOAP_FAULT_TEXT_LOCAL_NAME)) { element = factory.createSOAPFaultText( (SOAPFaultReason) parent, builder); ((OMNodeEx) element).setComplete(false); reasonProcessing = false; } else { throw new OMBuilderException( parser.getLocalName() + " is not supported inside the reason"); } } else if (parent.getLocalName().equals( SOAP12Constants.SOAP_FAULT_DETAIL_LOCAL_NAME)) { element = this.factory.createOMElement( parser.getLocalName(), null, parent, builder); builder.setProcessingDetailElements(true); detailElementNames = new Vector(); detailElementNames.add(parser.getLocalName()); } else { throw new OMBuilderException( parent.getLocalName() + " should not have child element"); } } else if (elementLevel > 5) { if (parent.getLocalName().equals( SOAP12Constants.SOAP_FAULT_SUB_CODE_LOCAL_NAME)) { if (parser.getLocalName().equals( SOAP12Constants.SOAP_FAULT_VALUE_LOCAL_NAME)) { if (subcodeValuePresent) { throw new OMBuilderException( "multiple subCode value encountered"); } else { element = factory.createSOAPFaultValue( (SOAPFaultSubCode) parent, builder); subcodeValuePresent = true; subSubcodePresent = false; subCodeProcessing = false; } } else if (parser.getLocalName().equals( SOAP12Constants.SOAP_FAULT_SUB_CODE_LOCAL_NAME)) { if (subcodeValuePresent) { if (!subSubcodePresent) { element = factory.createSOAPFaultSubCode( (SOAPFaultSubCode) parent, builder); subcodeValuePresent = false; subSubcodePresent = true; subCodeProcessing = true; } else { throw new OMBuilderException( "multiple subcode encountered"); } } else { throw new OMBuilderException( "Value should present before the subcode"); } } else { throw new OMBuilderException( parser.getLocalName() + " is not supported inside the subCode element"); } } else if (builder.isProcessingDetailElements()) { int detailElementLevel = 0; boolean localNameExist = false; for (int i = 0; i < detailElementNames.size(); i++) { if (parent.getLocalName().equals( detailElementNames.get(i))) { localNameExist = true; detailElementLevel = i + 1; } } if (localNameExist) { detailElementNames.setSize(detailElementLevel); element = this.factory.createOMElement( parser.getLocalName(), null, parent, builder); detailElementNames.add(parser.getLocalName()); } } else { throw new OMBuilderException( parent.getLocalName() + " should not have child at element level " + elementLevel); } } processNamespaceData(element, false); processAttributes(element); return element; } }axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/soap/SOAPFaultValue.java0000644000000000000000000000173511131637464027026 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap; import org.apache.axiom.om.OMElement; public interface SOAPFaultValue extends OMElement { /** * Eran Chinthaka (chinthaka@apache.org) */ } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/soap/SOAPFaultRole.java0000644000000000000000000000273611131637464026655 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap; import org.apache.axiom.om.OMElement; /** * The Role element information item identifies the role the node was operating in at the point the * fault occurred. *

* The Role element information item has: A [local name] of Role . A [namespace name] of * http://www.w3.org/2003/05/soap-envelope . */ public interface SOAPFaultRole extends OMElement { /** * Eran Chinthaka (chinthaka@apache.org) */ /** * The value of the Role element information item MUST be one of the roles assumed by the node * during processing of the message * * @param uri */ void setRoleValue(String uri); String getRoleValue(); } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/soap/SOAPHeader.java0000644000000000000000000001465211131637464026150 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMException; import org.apache.axiom.om.OMNamespace; import java.util.ArrayList; import java.util.Iterator; /** Interface SOAPHeader */ public interface SOAPHeader extends OMElement { /** * Creates a new SOAPHeaderBlock object initialized with the specified name and * adds it to this SOAPHeader object. * * @param localName * @param ns * @return the new SOAPHeaderBlock object that was inserted into this * SOAPHeader object * @throws org.apache.axiom.om.OMException * if a SOAP error occurs */ SOAPHeaderBlock addHeaderBlock(String localName, OMNamespace ns) throws OMException; /** * Get the appropriate set of headers for a RolePlayer. * * The RolePlayer indicates whether it is the ultimate destination (in which case * headers with no role or the explicit UltimateDestination role will be included), * and any non-standard roles it supports. Headers targeted to "next" will always * be included, and those targeted to "none" (for SOAP 1.2) will never be included. * * @return an Iterator over all the HeaderBlocks this RolePlayer should process. */ Iterator getHeadersToProcess(RolePlayer rolePlayer); /** * Returns a list of all the SOAPHeaderBlock objects in this * SOAPHeader object that have the the specified role. An role is a global * attribute that indicates the intermediate parties to whom the message should be sent. An role * receives the message and then sends it to the next role. The default role is the ultimate * intended recipient for the message, so if no role attribute is included in a * SOAPHeader object, the message is sent to its ultimate destination. * * @param role a String giving the URI of the role for which to search * @return Returns an Iterator object over all the SOAPHeaderBlock * objects that contain the specified role * @see #extractHeaderBlocks(String) extractHeaderBlocks(java.lang.String) */ Iterator examineHeaderBlocks(String role); /** * Returns a list of all the SOAPHeaderBlock objects in this * SOAPHeader object that have the the specified role and detaches them from this * SOAPHeader object. *

* This method allows an role to process only the parts of the SOAPHeader object * that apply to it and to remove them before passing the message on to the next role. * * @param role a String giving the URI of the role for which to search * @return Returns an Iterator object over all the SOAPHeaderBlock * objects that contain the specified role * @see #examineHeaderBlocks(String) examineHeaderBlocks(java.lang.String) */ Iterator extractHeaderBlocks(String role); /** * Returns an Iterator over all the SOAPHeaderBlock objects in this * SOAPHeader object that have the specified role and that have a MustUnderstand * attribute whose value is equivalent to true. * * @param role a String giving the URI of the role for which to search * @return Returns an Iterator object over all the SOAPHeaderBlock * objects that contain the specified role and are marked as MustUnderstand. */ Iterator examineMustUnderstandHeaderBlocks(String role); /** * Returns an Iterator over all the SOAPHeaderBlock objects in this * SOAPHeader object. * * @return an Iterator object over all the SOAPHeaderBlock objects * contained by this SOAPHeader. If there are no header blocks then an * empty iterator is returned. */ Iterator examineAllHeaderBlocks(); /** * Returns an Iterator over all the SOAPHeaderBlock objects in this * SOAPHeader object and detaches them from this SOAPHeader object. * * @return Returns an Iterator object over all the SOAPHeaderBlock * objects contained by this SOAPHeader */ Iterator extractAllHeaderBlocks(); /** * Return all the Headers that has the Namespace URI to given NS URI. * * @param nsURI * @return Returns ArrayList. */ ArrayList getHeaderBlocksWithNSURI(String nsURI); /** * Get the appropriate set of headers for a RolePlayer in a particular namespace *

* The RolePlayer indicates whether it is the ultimate destination (in which case headers with * no role or the explicit UltimateDestination role will be included), and any non-standard * roles it supports. Headers targeted to "next" will always be included, and those targeted to * "none" (for SOAP 1.2) will never be included. *

* This version of the API allows us to iterate only once over the headers searching for * a particular namespace for headers targeted at "us". * * @param rolePlayer a RolePlayer containing our role configuration * @param namespace if specified, we'll only return headers from this namespace * @return an Iterator over all the HeaderBlocks this RolePlayer should process. */ Iterator getHeadersToProcess(RolePlayer rolePlayer, String namespace); } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/0000755000000000000000000000000011131637470023070 5ustar rootrootaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/OMFactory.java0000644000000000000000000001505311131637470025602 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om; import javax.xml.namespace.QName; /** Class OMFactory */ public interface OMFactory { /** Creates a new OMDocument. */ OMDocument createOMDocument(); OMDocument createOMDocument(OMXMLParserWrapper builder); /** * @param localName * @param ns - This can be null */ OMElement createOMElement(String localName, OMNamespace ns); OMElement createOMElement(String localName, OMNamespace ns, OMContainer parent) throws OMException; /** * @param localName * @param ns - this can be null * @param parent * @param builder */ OMElement createOMElement(String localName, OMNamespace ns, OMContainer parent, OMXMLParserWrapper builder); /** * Construct element with arbitrary data source. This is an optional operation which may not be * supported by all factories. * * @param source * @param localName * @param ns */ OMSourcedElement createOMElement(OMDataSource source, String localName, OMNamespace ns); /** * This is almost the same as as createOMElement(localName,OMNamespace) method above. But some * people may, for some reason, need to use the conventional method of putting a namespace. Or * in other words people might not want to use the new OMNamespace. Well, this is for those * people. * * @param localName * @param namespaceURI * @param namespacePrefix * @return Returns the newly created OMElement. */ OMElement createOMElement(String localName, String namespaceURI, String namespacePrefix); /** * Create an OMElement with the given QName under the given parent. * * If the QName contains a prefix, we will ensure that an OMNamespace is created * mapping the given namespace to the given prefix. If no prefix is passed, we'll * use whatever's already mapped in the parent, or create a generated one. * * @param qname the QName of the element to create * @param parent the OMContainer in which to place the new element * @return Returns the new OMElement * @throws OMException if there's a namespace mapping problem */ OMElement createOMElement(QName qname, OMContainer parent) throws OMException; /** * Create an OMElement with the given QName * * If the QName contains a prefix, we will ensure that an OMNamespace is created * mapping the given namespace to the given prefix. If no prefix is passed, we'll * use whatever's already mapped in the parent, or create a generated one. * * @param qname * @return the new OMElement. */ OMElement createOMElement(QName qname) throws OMException; /** * @param uri * @param prefix * @return Returns OMNameSpace. */ OMNamespace createOMNamespace(String uri, String prefix); /** * @param parent * @param text * @return Returns OMText. */ OMText createOMText(OMContainer parent, String text); /** * Create OMText node that is a copy of the source text node * @param parent * @param source * @return */ public OMText createOMText(OMContainer parent, OMText source); /** * @param parent * @param text - This text itself can contain a namespace inside it. */ OMText createOMText(OMContainer parent, QName text); /** * @param parent * @param text * @param type - this should be either of XMLStreamConstants.CHARACTERS, * XMLStreamConstants.CDATA, XMLStreamConstants.SPACE, XMLStreamConstants.ENTITY_REFERENCE * @return Returns OMText. */ OMText createOMText(OMContainer parent, String text, int type); OMText createOMText(OMContainer parent, char[] charArary, int type); /** * @param parent * @param text - This text itself can contain a namespace inside it. * @param type */ OMText createOMText(OMContainer parent, QName text, int type); /** * @param s * @return Returns OMText. */ OMText createOMText(String s); /** * @param s * @param type - OMText node can handle SPACE, CHARACTERS, CDATA and ENTITY REFERENCES. For * Constants, use either XMLStreamConstants or constants found in OMNode. * @return Returns OMText. */ OMText createOMText(String s, int type); OMText createOMText(String s, String mimeType, boolean optimize); OMText createOMText(Object dataHandler, boolean optimize); OMText createOMText(OMContainer parent, String s, String mimeType, boolean optimize); OMText createOMText(String contentID, OMContainer parent, OMXMLParserWrapper builder); OMAttribute createOMAttribute(String localName, OMNamespace ns, String value); /** * Creates DocType/DTD. * * @param parent * @param content * @return Returns doctype. */ OMDocType createOMDocType(OMContainer parent, String content); /** * Creates a PI. * * @param parent * @param piTarget * @param piData * @return Returns OMProcessingInstruction. */ OMProcessingInstruction createOMProcessingInstruction(OMContainer parent, String piTarget, String piData); /** * Creates a comment. * * @param parent * @param content * @return Returns OMComment. */ OMComment createOMComment(OMContainer parent, String content); } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/xpath/0000755000000000000000000000000011131637464024217 5ustar rootrootaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/xpath/AXIOMXPath.java0000644000000000000000000001466111131637464026714 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.xpath; import org.apache.axiom.om.OMAttribute; import org.apache.axiom.om.OMContainer; import org.apache.axiom.om.OMDocument; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMNamespace; import org.jaxen.BaseXPath; import org.jaxen.JaxenException; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.Map; import java.util.Set; public class AXIOMXPath extends BaseXPath { private static final long serialVersionUID = -5839161412925154639L; private Map namespaces = new HashMap(); /** * Construct an XPath expression from a given string. * * @param xpathExpr the string representation of the XPath expression. * @throws JaxenException if there is a syntax error while parsing the expression */ public AXIOMXPath(String xpathExpr) throws JaxenException { super(xpathExpr, new DocumentNavigator()); } /** * Construct an XPath expression from a given string and initialize its * namespace context based on a given element. * * @param element The element that determines the namespace context of the * XPath expression. See {@link #addNamespaces(OMElement)} * for more details. * @param xpathExpr the string representation of the XPath expression. * @throws JaxenException if there is a syntax error while parsing the expression * or if the namespace context could not be set up */ public AXIOMXPath(OMElement element, String xpathExpr) throws JaxenException { this(xpathExpr); addNamespaces(element); } /** * Construct an XPath expression from a given attribute. * The string representation of the expression is taken from the attribute * value, while the attribute's owner element is used to determine the * namespace context of the expression. * * @param attribute the attribute to construct the expression from * @throws JaxenException if there is a syntax error while parsing the expression * or if the namespace context could not be set up */ public AXIOMXPath(OMAttribute attribute) throws JaxenException { this(attribute.getOwner(), attribute.getAttributeValue()); } /** * This override captures any added namespaces, as the Jaxen BaseXPath class nor * NamespaceContext (or SimpleNamespaceContext) exposes thier internal map of the prefixes to * the namespaces. This method - although is not the ideal solution to the issue, attempts to * provide an override to changing the Jaxen code. * * @param prefix a namespace prefix * @param uri the URI to which the prefix matches * @throws JaxenException if the underlying implementation throws an exception */ public void addNamespace(String prefix, String uri) throws JaxenException { try { super.addNamespace(prefix, uri); } catch (JaxenException e) { // the intention here is to prevent us caching a namespace, if the // underlying implementation does not accept it throw e; } namespaces.put(prefix, uri); } /** * Add the namespace declarations of a given {@link OMElement} to the namespace * context of an XPath expression. Typically this method is used with an XPath * expression appearing in an attribute of the given element. *

* Note that the default namespace is explicitly excluded and not added to the * namespace context. This makes the behaviour of this method consistent with * the rules followed in XSL stylesheets. Indeed, the XSLT specification defines * the namespace context of an XPath expression as follows: *

* the set of namespace declarations are those in scope on the element which has the * attribute in which the expression occurs; [...] the default namespace * (as declared by xmlns) is not part of this set *
* * @param element the element to retrieve the namespace context from * @throws JaxenException if an error occurred when adding the namespace declarations */ public void addNamespaces(OMElement element) throws JaxenException { OMElement current = element; // An element can redeclare a namespace prefix that has already been declared // by one of its ancestors. Since we visit the tree from child to parent, we // need to keep track of the prefixes we have already seen in order to avoid // adding namespace declarations that are overridden by a descendant of an element. Set seenPrefixes = new HashSet(); while (true) { for (Iterator it = current.getAllDeclaredNamespaces(); it.hasNext(); ) { OMNamespace ns = (OMNamespace) it.next(); if (ns != null) { String prefix = ns.getPrefix(); // Exclude the default namespace as explained in the Javadoc above if (prefix.length() != 0 && seenPrefixes.add(prefix)) { addNamespace(ns.getPrefix(), ns.getNamespaceURI()); } } } OMContainer parent = current.getParent(); if (parent == null || parent instanceof OMDocument) { break; } else { current = (OMElement)parent; } } } /** * Expose the prefix to namespace mapping for this expression * * @return a Map of namespace prefixes to the URIs */ public Map getNamespaces() { return namespaces; } } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/xpath/DocumentNavigator.java0000644000000000000000000007202111131637464030515 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.xpath; import org.apache.axiom.om.OMAttribute; import org.apache.axiom.om.OMComment; import org.apache.axiom.om.OMContainer; import org.apache.axiom.om.OMDocument; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMNode; import org.apache.axiom.om.OMProcessingInstruction; import org.apache.axiom.om.OMText; import org.apache.axiom.om.impl.OMNamespaceImpl; import org.apache.axiom.om.impl.builder.StAXOMBuilder; import org.apache.axiom.om.util.StAXUtils; import org.jaxen.BaseXPath; import org.jaxen.DefaultNavigator; import org.jaxen.FunctionCallException; import org.jaxen.JaxenConstants; import org.jaxen.UnsupportedAxisException; import org.jaxen.XPath; import org.jaxen.saxpath.SAXPathException; import org.jaxen.util.SingleObjectIterator; import javax.xml.namespace.QName; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLStreamReader; import java.io.FileInputStream; import java.net.URL; import java.util.ArrayList; import java.util.HashSet; import java.util.Iterator; import java.util.List; public class DocumentNavigator extends DefaultNavigator { private static final long serialVersionUID = 7325116153349780805L; /** * Returns a parsed form of the given xpath string, which will be suitable for queries on * documents that use the same navigator as this one. * * @param xpath the XPath expression * @return Returns a new XPath expression object. * @throws SAXPathException if the string is not a syntactically correct XPath expression * @see XPath */ public XPath parseXPath(String xpath) throws SAXPathException { return new BaseXPath(xpath, this); } /** * Retrieves the namespace URI of the given element node. * * @param object the context element node * @return Returns the namespace URI of the element node. */ public String getElementNamespaceUri(Object object) { OMElement attr = (OMElement) object; return attr.getQName().getNamespaceURI(); } /** * Retrieves the name of the given element node. * * @param object the context element node * @return Returns the name of the element node. */ public String getElementName(Object object) { OMElement attr = (OMElement) object; return attr.getQName().getLocalPart(); } /** * Retrieves the QName of the given element node. * * @param object the context element node * @return Returns the QName of the element node. */ public String getElementQName(Object object) { OMElement attr = (OMElement) object; String prefix = null; OMNamespace namespace = attr.getNamespace(); if (namespace != null) { prefix = namespace.getPrefix(); } if (prefix == null || "".equals(prefix)) { return attr.getQName().getLocalPart(); } return prefix + ":" + namespace.getNamespaceURI(); } /** * Retrieves the namespace URI of the given attribute node. * * @param object the context attribute node * @return Returns the namespace URI of the attribute node. */ public String getAttributeNamespaceUri(Object object) { OMAttribute attr = (OMAttribute) object; return attr.getQName().getNamespaceURI(); } /** * Retrieves the name of the given attribute node. * * @param object the context attribute node * @return Returns the name of the attribute node. */ public String getAttributeName(Object object) { OMAttribute attr = (OMAttribute) object; return attr.getQName().getLocalPart(); } /** * Retrieves the QName of the given attribute node. * * @param object the context attribute node * @return Returns the qualified name of the attribute node. */ public String getAttributeQName(Object object) { OMAttribute attr = (OMAttribute) object; String prefix = attr.getNamespace().getPrefix(); if (prefix == null || "".equals(prefix)) { return attr.getQName().getLocalPart(); } return prefix + ":" + attr.getNamespace().getNamespaceURI(); } /** * Returns whether the given object is a document node. A document node is the node that is * selected by the xpath expression /. * * @param object the object to test * @return Returns true if the object is a document node, else false * . */ public boolean isDocument(Object object) { return object instanceof OMDocument; } /** * Returns whether the given object is an element node. * * @param object the object to test * @return Returns true if the object is an element node, else false * . */ public boolean isElement(Object object) { return object instanceof OMElement; } /** * Returns whether the given object is an attribute node. * * @param object the object to test * @return Returns true if the object is an attribute node, else false * . */ public boolean isAttribute(Object object) { return object instanceof OMAttribute; } /** * Returns whether the given object is a namespace node. * * @param object the object to test * @return Returns true if the object is a namespace node, else false * . */ public boolean isNamespace(Object object) { return object instanceof OMNamespace; } /** * Returns whether the given object is a comment node. * * @param object the object to test * @return Returns true if the object is a comment node, else false . */ public boolean isComment(Object object) { return (object instanceof OMComment); } /** * Returns whether the given object is a text node. * * @param object the object to test * @return Returns true if the object is a text node, else false . */ public boolean isText(Object object) { return (object instanceof OMText); } /** * Returns whether the given object is a processing-instruction node. * * @param object the object to test * @return Returns true if the object is a processing-instruction node, else * false . */ public boolean isProcessingInstruction(Object object) { return (object instanceof OMProcessingInstruction); } /** * Retrieves the string-value of a comment node. This may be the empty string if the comment is * empty, but must not be null. * * @param object the comment node * @return Returns the string-value of the node. */ public String getCommentStringValue(Object object) { return ((OMComment) object).getValue(); } /** * Retrieves the string-value of an element node. This may be the empty string if the element is * empty, but must not be null. * * @param object the comment node. * @return Returns the string-value of the node. */ public String getElementStringValue(Object object) { if (isElement(object)) { return getStringValue((OMElement) object, new StringBuffer()) .toString(); } return null; } private StringBuffer getStringValue(OMNode node, StringBuffer buffer) { if (isText(node)) { buffer.append(((OMText) node).getText()); } else if (node instanceof OMElement) { Iterator children = ((OMElement) node).getChildren(); while (children.hasNext()) { getStringValue((OMNode) children.next(), buffer); } } return buffer; } /** * Retrieves the string-value of an attribute node. This should be the XML 1.0 normalized * attribute value. This may be the empty string but must not be null. * * @param object the attribute node * @return Returns the string-value of the node. */ public String getAttributeStringValue(Object object) { return ((OMAttribute) object).getAttributeValue(); } /** * Retrieves the string-value of a namespace node. This is generally the namespace URI. This may * be the empty string but must not be null. * * @param object the namespace node * @return Returns the string-value of the node. */ public String getNamespaceStringValue(Object object) { return ((OMNamespace) object).getNamespaceURI(); } /** * Retrieve the string-value of a text node. This must not be null and should not be the empty * string. The XPath data model does not allow empty text nodes. * * @param object the text node * @return Returns the string-value of the node. */ public String getTextStringValue(Object object) { return ((OMText) object).getText(); } /** * Retrieves the namespace prefix of a namespace node. * * @param object the namespace node * @return Returns the prefix associated with the node. */ public String getNamespacePrefix(Object object) { return ((OMNamespace) object).getPrefix(); } /** * Retrieves an Iterator matching the child XPath axis. * * @param contextNode the original context node * @return Returns an Iterator capable of traversing the axis, not null. * @throws UnsupportedAxisException if the semantics of the child axis are not supported by this * object model */ public Iterator getChildAxisIterator(Object contextNode) throws UnsupportedAxisException { if (contextNode instanceof OMContainer) { return ((OMContainer) contextNode).getChildren(); } return JaxenConstants.EMPTY_ITERATOR; } public Iterator getDescendantAxisIterator(Object object) throws UnsupportedAxisException { //TODO: Fix this better? return super.getDescendantAxisIterator(object); } /** * Retrieves an Iterator matching the attribute XPath axis. * * @param contextNode the original context node * @return Returns an Iterator capable of traversing the axis, not null. * @throws UnsupportedAxisException if the semantics of the attribute axis are not supported by * this object model */ public Iterator getAttributeAxisIterator(Object contextNode) throws UnsupportedAxisException { if (isElement(contextNode)) { ArrayList attributes = new ArrayList(); Iterator i = ((OMElement) contextNode).getAllAttributes(); while (i != null && i.hasNext()) { attributes.add(new OMAttributeEx((OMAttribute) i.next(), (OMContainer) contextNode, ((OMElement) contextNode) .getOMFactory())); } return attributes.iterator(); } return JaxenConstants.EMPTY_ITERATOR; } /** * Retrieves an Iterator matching the namespace XPath axis. * * @param contextNode the original context node * @return Returns an Iterator capable of traversing the axis, not null. * @throws UnsupportedAxisException if the semantics of the namespace axis are not supported by * this object model */ public Iterator getNamespaceAxisIterator(Object contextNode) throws UnsupportedAxisException { if (!(contextNode instanceof OMContainer && contextNode instanceof OMElement)) { return JaxenConstants.EMPTY_ITERATOR; } List nsList = new ArrayList(); HashSet prefixes = new HashSet(); for (OMContainer context = (OMContainer) contextNode; context != null && !(context instanceof OMDocument); context = ((OMElement) context).getParent()) { OMElement element = (OMElement) context; ArrayList declaredNS = new ArrayList(); Iterator i = element.getAllDeclaredNamespaces(); while (i != null && i.hasNext()) { declaredNS.add(i.next()); } declaredNS.add(element.getNamespace()); for (Iterator iter = element.getAllAttributes(); iter != null && iter.hasNext();) { OMAttribute attr = (OMAttribute) iter.next(); OMNamespace namespace = attr.getNamespace(); if (namespace != null) { declaredNS.add(namespace); } } for (Iterator iter = declaredNS.iterator(); iter != null && iter.hasNext();) { OMNamespace namespace = (OMNamespace) iter.next(); if (namespace != null) { String prefix = namespace.getPrefix(); if (prefix != null && !prefixes.contains(prefix)) { prefixes.add(prefix); nsList.add(new OMNamespaceEx(namespace, context)); } } } } nsList.add( new OMNamespaceEx( new OMNamespaceImpl( "http://www.w3.org/XML/1998/namespace", "xml"), (OMContainer) contextNode)); return nsList.iterator(); } /** * Retrieves an Iterator matching the self xpath axis. * * @param contextNode the original context node * @return Returns an Iterator capable of traversing the axis, not null. * @throws UnsupportedAxisException if the semantics of the self axis are not supported by this * object model */ public Iterator getSelfAxisIterator(Object contextNode) throws UnsupportedAxisException { //TODO: Fix this better? return super.getSelfAxisIterator(contextNode); } /** * Retrieves an Iterator matching the descendant-or-self XPath axis. * * @param contextNode the original context node * @return Returns an Iterator capable of traversing the axis, not null. * @throws UnsupportedAxisException if the semantics of the descendant-or-self axis are not * supported by this object model */ public Iterator getDescendantOrSelfAxisIterator(Object contextNode) throws UnsupportedAxisException { //TODO: Fix this better? return super.getDescendantOrSelfAxisIterator(contextNode); } /** * Retrieves an Iterator matching the ancestor-or-self XPath axis. * * @param contextNode the original context node * @return Returns an Iterator capable of traversing the axis, not null. * @throws UnsupportedAxisException if the semantics of the ancestor-or-self axis are not * supported by this object model */ public Iterator getAncestorOrSelfAxisIterator(Object contextNode) throws UnsupportedAxisException { //TODO: Fix this better? return super.getAncestorOrSelfAxisIterator(contextNode); } /** * Retrieves an Iterator matching the parent XPath axis. * * @param contextNode the original context node * @return Returns an Iterator capable of traversing the axis, not null. * @throws UnsupportedAxisException if the semantics of the parent axis are not supported by * this object model */ public Iterator getParentAxisIterator(Object contextNode) throws UnsupportedAxisException { if (contextNode instanceof OMNode) { return new SingleObjectIterator(((OMNode) contextNode).getParent()); } else if (contextNode instanceof OMNamespaceEx) { return new SingleObjectIterator( ((OMNamespaceEx) contextNode).getParent()); } else if (contextNode instanceof OMAttributeEx) { return new SingleObjectIterator( ((OMAttributeEx) contextNode).getParent()); } return JaxenConstants.EMPTY_ITERATOR; } /** * Retrieves an Iterator matching the ancestor XPath axis. * * @param contextNode the original context node * @return Returns an Iterator capable of traversing the axis, not null. * @throws UnsupportedAxisException if the semantics of the ancestor axis are not supported by * this object model */ public Iterator getAncestorAxisIterator(Object contextNode) throws UnsupportedAxisException { //TODO: Fix this better? return super.getAncestorAxisIterator(contextNode); } /** * Retrieves an Iterator matching the following-sibling XPath axis. * * @param contextNode the original context node * @return Returns an Iterator capable of traversing the axis, not null. * @throws UnsupportedAxisException if the semantics of the following-sibling axis are not * supported by this object model */ public Iterator getFollowingSiblingAxisIterator(Object contextNode) throws UnsupportedAxisException { ArrayList list = new ArrayList(); if (contextNode != null && contextNode instanceof OMNode) { while (contextNode != null && contextNode instanceof OMNode) { contextNode = ((OMNode) contextNode).getNextOMSibling(); if (contextNode != null) list.add(contextNode); } } return list.iterator(); } /** * Retrieves an Iterator matching the preceding-sibling XPath axis. * * @param contextNode the original context node * @return Returns an Iterator capable of traversing the axis, not null. * @throws UnsupportedAxisException if the semantics of the preceding-sibling axis are not * supported by this object model */ public Iterator getPrecedingSiblingAxisIterator(Object contextNode) throws UnsupportedAxisException { ArrayList list = new ArrayList(); if (contextNode != null && contextNode instanceof OMNode) { while (contextNode != null && contextNode instanceof OMNode) { contextNode = ((OMNode) contextNode).getPreviousOMSibling(); if (contextNode != null) list.add(contextNode); } } return list.iterator(); } /** * Retrieves an Iterator matching the following XPath axis. * * @param contextNode the original context node * @return Returns an Iterator capable of traversing the axis, not null. * @throws UnsupportedAxisException if the semantics of the following axis are not supported by * this object model */ public Iterator getFollowingAxisIterator(Object contextNode) throws UnsupportedAxisException { //TODO: Fix this better? return super.getFollowingAxisIterator(contextNode); } /** * Retrieves an Iterator matching the preceding XPath axis. * * @param contextNode the original context node * @return Returns an Iterator capable of traversing the axis, not null. * @throws UnsupportedAxisException if the semantics of the preceding axis are not supported by * this object model */ public Iterator getPrecedingAxisIterator(Object contextNode) throws UnsupportedAxisException { //TODO: Fix this better? return super.getPrecedingAxisIterator(contextNode); } /** * Loads a document from the given URI. * * @param uri the URI of the document to load * @return Returns the document. * @throws FunctionCallException if the document could not be loaded */ public Object getDocument(String uri) throws FunctionCallException { try { XMLStreamReader parser; XMLInputFactory xmlInputFactory = StAXUtils.getXMLInputFactory(); Boolean oldValue = (Boolean) xmlInputFactory.getProperty(XMLInputFactory.IS_COALESCING); try { xmlInputFactory.setProperty(XMLInputFactory.IS_COALESCING, Boolean.TRUE); if (uri.indexOf(':') == -1) { parser = xmlInputFactory.createXMLStreamReader( new FileInputStream(uri)); } else { URL url = new URL(uri); parser = xmlInputFactory.createXMLStreamReader( url.openStream()); } } finally { if (oldValue != null) { xmlInputFactory.setProperty(XMLInputFactory.IS_COALESCING, oldValue); } StAXUtils.releaseXMLInputFactory(xmlInputFactory); } StAXOMBuilder builder = new StAXOMBuilder(parser); return builder.getDocumentElement().getParent(); } catch (Exception e) { throw new FunctionCallException(e); } } /** * Returns the element whose ID is given by elementId. If no such element exists, returns null. * Attributes with the name "ID" are not of type ID unless so defined. Implementations that do * not know whether attributes are of type ID or not are expected to return null. * * @param contextNode a node from the document in which to look for the id * @param elementId id to look for * @return Returns element whose ID is given by elementId, or null if no such element exists in * the document or if the implementation does not know about attribute types. */ public Object getElementById(Object contextNode, String elementId) { //TODO: Fix this better? return super.getElementById(contextNode, elementId); } /** * Returns the document node that contains the given context node. * * @param contextNode the context node * @return Returns the document of the context node. * @see #isDocument(Object) */ public Object getDocumentNode(Object contextNode) { if (contextNode instanceof OMDocument) { return contextNode; } OMContainer parent = ((OMNode) contextNode).getParent(); if (parent == null) { // this node doesn't have a parent Document. So return the document element itself return contextNode; } else { return getDocumentNode(parent); } } /** * Translates a namespace prefix to a namespace URI, possibly considering a particular * element node. *

* Strictly speaking, prefix-to-URI translation should occur irrespective of any element in the * document. This method is provided to allow a non-conforming ease-of-use enhancement.

* * @param prefix the prefix to translate * @param element the element to consider during translation * @return Returns the namespace URI associated with the prefix. */ public String translateNamespacePrefixToUri(String prefix, Object element) { //TODO: Fix this better? return super.translateNamespacePrefixToUri(prefix, element); } /** * Retrieves the target of a processing-instruction. * * @param object the context processing-instruction node * @return Returns the target of the processing-instruction node. */ public String getProcessingInstructionTarget(Object object) { return ((OMProcessingInstruction) object).getTarget(); } /** * Retrieves the data of a processing-instruction. * * @param object the context processing-instruction node * @return Returns the data of the processing-instruction node. */ public String getProcessingInstructionData(Object object) { return ((OMProcessingInstruction) object).getValue(); } /** * Returns a number that identifies the type of node that the given object represents in this * navigator. See org.jaxen.pattern.Pattern * * @param node ???? * @return Returns short. */ public short getNodeType(Object node) { //TODO: Fix this better? return super.getNodeType(node); } /** * Returns the parent of the given context node. *

* The parent of any node must either be a document node or an element node. * * @param contextNode the context node * @return Returns the parent of the context node, or null if this is a document node. * @throws UnsupportedAxisException if the parent axis is not supported by the model * @see #isDocument * @see #isElement */ public Object getParentNode(Object contextNode) throws UnsupportedAxisException { if (contextNode == null || contextNode instanceof OMDocument) { return null; } else if (contextNode instanceof OMAttributeEx) { return ((OMAttributeEx) contextNode).getParent(); } else if (contextNode instanceof OMNamespaceEx) { return ((OMNamespaceEx) contextNode).getParent(); } return ((OMNode) contextNode).getParent(); } class OMNamespaceEx implements OMNamespace { OMNamespace originalNsp = null; OMContainer parent = null; OMNamespaceEx(OMNamespace nsp, OMContainer parent) { originalNsp = nsp; this.parent = parent; } public boolean equals(String uri, String prefix) { return originalNsp.equals(uri, prefix); } public String getPrefix() { return originalNsp.getPrefix(); } public String getName() { return originalNsp.getNamespaceURI(); } public String getNamespaceURI() { return originalNsp.getNamespaceURI(); } public OMContainer getParent() { return parent; } } class OMAttributeEx implements OMAttribute { OMAttribute attribute = null; OMContainer parent = null; OMFactory factory; OMAttributeEx(OMAttribute attribute, OMContainer parent, OMFactory factory) { this.attribute = attribute; this.parent = parent; } public String getLocalName() { return attribute.getLocalName(); } public void setLocalName(String localName) { attribute.setLocalName(localName); } public String getAttributeValue() { return attribute.getAttributeValue(); } public String getAttributeType() { return attribute.getAttributeType(); } public void setAttributeValue(String value) { attribute.setAttributeValue(value); } public void setAttributeType(String type) { attribute.setAttributeType(type); } public void setOMNamespace(OMNamespace omNamespace) { attribute.setOMNamespace(omNamespace); } public OMNamespace getNamespace() { return attribute.getNamespace(); } public QName getQName() { return attribute.getQName(); } public OMContainer getParent() { return parent; } public OMFactory getOMFactory() { return this.factory; } /** * Returns the owner element of this attribute * * @return OMElement If the parent OMContainer is an * instanceof OMElement we return that element else * we return null. To get the OMContainer itself use * the getParent() method. */ public OMElement getOwner() { return (parent instanceof OMElement) ? (OMElement)parent : null; } } } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/OMElement.java0000644000000000000000000002717211131637470025571 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om; import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import java.util.Iterator; /** * A particular kind of node that represents an element infoset information item. *

*

An element has a collection of children, attributes, and namespaces.

In contrast with * DOM, this interface exposes namespaces separately from the attributes.

*/ public interface OMElement extends OMNode, OMContainer { /** * Returns a filtered list of children - just the elements. * * @return Returns an iterator over the child elements. * @see #getChildren() * @see #getChildrenWithName(javax.xml.namespace.QName) */ Iterator getChildElements(); /** * Creates a namespace in the current element scope. * * @param uri The namespace to declare in the current scope. The caller is expected to * ensure that the URI is a valid namespace name. * @param prefix The prefix to associate with the given namespace. The caller is expected to * ensure that this is a valid XML prefix. If "" is given, first this will check * for an existing namespace with the same uri. If not found, a prefix will be * auto-generated. * @return Returns the created namespace information item. * @see #declareNamespace(OMNamespace) * @see #findNamespace(String, String) * @see #getAllDeclaredNamespaces() */ OMNamespace declareNamespace(String uri, String prefix); /** * This will declare a default namespace for this element explicitly * * @param uri */ OMNamespace declareDefaultNamespace(String uri); /** * This will retrieve the default namespace of this element, if available. null returned if none * is found. */ OMNamespace getDefaultNamespace(); /** * Declares a namespace with the element as its scope. * * @param namespace The namespace to declare. * @return Returns the namespace parameter passed. * @see #declareNamespace(String, String) * @see #findNamespace(String, String) * @see #getAllDeclaredNamespaces() */ OMNamespace declareNamespace(OMNamespace namespace); /** * Finds a namespace with the given uri and prefix, in the scope of the hierarchy. *

*

Searches from the current element and goes up the hiararchy until a match is found. If no * match is found, returns null.

*

*

Either prefix or uri should be null. Results are undefined if both are * specified.

* * @param uri The namespace to look for. If this is specified, prefix should be * null. * @param prefix The prefix to look for. If this is specified, uri should be null. * @return Returns the matching namespace declaration, or null if none was found. * @see #declareNamespace(String, String) * @see #declareNamespace(OMNamespace) * @see #getAllDeclaredNamespaces() */ OMNamespace findNamespace(String uri, String prefix); /** * Checks for a namespace in the context of this element with the given prefix and returns the * relevant namespace object, if available. If not available, returns null. * * @param prefix */ OMNamespace findNamespaceURI(String prefix); /** * Returns an iterator for all of the namespaces declared on this element. *

*

If you're interested in all namespaces in scope, you need to call this function for all * parent elements as well. Note that the iterator may be invalidated by any call to either * declareNamespace function.

* * @return Returns an iterator over the {@link OMNamespace} items declared on the current * element. * @see #findNamespace(String, String) * @see #declareNamespace(String, String) * @see #declareNamespace(OMNamespace) */ Iterator getAllDeclaredNamespaces() throws OMException; /** * Returns a list of OMAttributes. *

*

Note that the iterator returned by this function will be invalidated by any * addAttribute call.

* * @return Returns an {@link Iterator} of {@link OMAttribute} items associated with the * element. * @see #getAttribute * @see #addAttribute(OMAttribute) * @see #addAttribute(String, String, OMNamespace) */ Iterator getAllAttributes(); /** * Returns a named attribute if present. * * @param qname the qualified name to search for * @return Returns an OMAttribute with the given name if found, or null */ OMAttribute getAttribute(QName qname); /** * Returns a named attribute's value, if present. * * @param qname the qualified name to search for * @return Returns a String containing the attribute value, or null */ String getAttributeValue(QName qname); /** * Adds an attribute to this element. *

*

There is no order implied by added attributes.

* * @param attr The attribute to add. * @return Returns the passed in attribute. */ OMAttribute addAttribute(OMAttribute attr); /** * Adds an attribute to the current element. *

*

This function does not check to make sure that the given attribute value can be serialized * directly as an XML value. The caller may, for example, pass a string with the character * 0x01. * * @param attributeName The "local name" for the attribute. * @param value The string value of the attribute. * @param ns The namespace has to be one of the in scope namespace. i.e. the passed * namespace must be declared in the parent element of this attribute or * ancestors of the parent element of the attribute. * @return Returns the added attribute. */ OMAttribute addAttribute(String attributeName, String value, OMNamespace ns); /** * Method removeAttribute * * @param attr */ void removeAttribute(OMAttribute attr); /** * Method setBuilder. * * @param wrapper */ void setBuilder(OMXMLParserWrapper wrapper); /** * Returns the builder object. * * @return Returns the builder object used to construct the underlying XML infoset on the fly. */ OMXMLParserWrapper getBuilder(); /** * Sets the first child. * * @param node * @deprecated This method should not be called, un-intentionally. When some one randomly set * the first child, all the links handling will not happen inside this method. So we * have moved this method to the less visible interface, OMContainerEx. */ void setFirstChild(OMNode node); /** * Returns the first child element of the element. * * @return Returns the first child element of the element, or null if none was found. */ OMElement getFirstElement(); /** * Returns the pull parser that will generate the pull events relevant to THIS element. *

*

Caching is on.

* * @return Returns an XMLStreamReader relative to this element. */ XMLStreamReader getXMLStreamReader(); /** * Returns the pull parser that will generate the pull events relevant to THIS element. *

*

Caching is off.

* * @return Returns an XMLStreamReader relative to this element, with no caching. */ XMLStreamReader getXMLStreamReaderWithoutCaching(); /** @param text */ void setText(String text); void setText(QName text); /** * Returns the non-empty text children as a string. *

* This method iterates over all the text children of the element and concatenates * them to a single string. Only direct children will be considered, i.e. the text * is not extracted recursively. For example the return value for * <element>A<child>B</child>C</element> will be AC. *

* All whitespace will be preserved. * * @return A string representing the concatenation of the child text nodes. * If there are no child text nodes, an empty string is returned. */ String getText(); /** OMText can contain its information as a QName as well. This will return the text as a QName */ QName getTextAsQName(); /** * Returns the local name of the element. * * @return Returns the local name of the element. */ String getLocalName(); /** * Method setLocalName * * @param localName */ void setLocalName(String localName); /** * @return Returns the OMNamespace object associated with this element * @throws OMException */ OMNamespace getNamespace() throws OMException; /** * Sets the Namespace. This will first search for a namespace in the current scope with the * given namespace. If no namespace is found with the given details, then it will declare a new * one. Then that namespace will be assigned to this element. * * @param namespace */ void setNamespace(OMNamespace namespace); /** * This will not search the namespace in the scope nor will declare in the current element, as * in setNamespace(OMNamespace). This will just assign the given namespace to the element. * * @param namespace */ void setNamespaceWithNoFindInCurrentScope(OMNamespace namespace); /** * Gets the QName of this node. * * @return Returns the {@link QName} for the element. */ QName getQName(); /** * This is a convenience method only. This will basically serialize the given OMElement to a * String but will build the OMTree in the memory */ String toString(); /** * This is a convenience method only. This basically serializes the given OMElement to a String * but will NOT build the OMTree in the memory. So you are at your own risk of losing * information. */ String toStringWithConsume() throws XMLStreamException; /** * Turns a prefix:local qname string into a proper QName, evaluating it in the OMElement * context. Unprefixed qnames resolve to the local namespace. * * @param qname prefixed qname string to resolve * @return Returns null for any failure to extract a qname. */ QName resolveQName(String qname); /** * Clones this element. Since both elements are build compleletely, you will lose the differed * building capability. * * @return Returns OMElement. */ OMElement cloneOMElement(); void setLineNumber(int lineNumber); int getLineNumber(); } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/ds/0000755000000000000000000000000011131637470023476 5ustar rootrootaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/ds/OMDataSourceExtBase.java0000644000000000000000000001431011131637470030102 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.ds; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.io.UnsupportedEncodingException; import java.io.Writer; import java.util.HashMap; import java.util.Iterator; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import javax.xml.stream.XMLStreamWriter; import org.apache.axiom.om.OMDataSourceExt; import org.apache.axiom.om.OMDocument; import org.apache.axiom.om.OMNode; import org.apache.axiom.om.OMOutputFormat; import org.apache.axiom.om.impl.MTOMXMLStreamWriter; import org.apache.axiom.om.impl.builder.StAXOMBuilder; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; /** * OMDataSourceExtBase is a convenient base class that can be extended * by other OMDataSourceExt implementations. */ public abstract class OMDataSourceExtBase implements OMDataSourceExt { private static final Log log = LogFactory.getLog(OMDataSourceExtBase.class); private static boolean DEBUG_ENABLED = log.isDebugEnabled(); HashMap map = null; // Map of properties public Object getProperty(String key) { if (map == null) { return null; } return map.get(key); } public Object setProperty(String key, Object value) { if (map == null) { map = new HashMap(); } return map.put(key, value); } public boolean hasProperty(String key) { if (map == null) { return false; } return map.containsKey(key); } public InputStream getXMLInputStream(String encoding) throws UnsupportedEncodingException{ if (DEBUG_ENABLED) { log.debug("getXMLInputStream encoding="+encoding); } return new ByteArrayInputStream(getXMLBytes(encoding)); } public void serialize(OutputStream output, OMOutputFormat format) throws XMLStreamException { if (DEBUG_ENABLED) { log.debug("serialize output="+output+" format="+format); } try { // Write bytes to the output stream output.write(getXMLBytes(format.getCharSetEncoding())); } catch (IOException e) { throw new XMLStreamException(e); } } public void serialize(Writer writer, OMOutputFormat format) throws XMLStreamException { if (DEBUG_ENABLED) { log.debug("serialize writer="+writer+" format="+format); } try { // Convert the bytes into a String and write it to the Writer String text = new String(getXMLBytes(format.getCharSetEncoding())); writer.write(text); } catch (UnsupportedEncodingException e) { throw new XMLStreamException(e); } catch (IOException e) { throw new XMLStreamException(e); } } public void serialize(XMLStreamWriter xmlWriter) throws XMLStreamException { if (DEBUG_ENABLED) { log.debug("serialize xmlWriter="+xmlWriter); } // Some XMLStreamWriters (e.g. MTOMXMLStreamWriter) // provide direct access to the OutputStream. // This allows faster writing. OutputStream os = getOutputStream(xmlWriter); if (os != null) { if (DEBUG_ENABLED) { log.debug("serialize OutputStream optimisation: true"); } String encoding = getCharacterEncoding(xmlWriter); OMOutputFormat format = new OMOutputFormat(); format.setCharSetEncoding(encoding); serialize(os, format); } else { if (DEBUG_ENABLED) { log.debug("serialize OutputStream optimisation: false"); } // Read the bytes into a reader and // write to the writer. XMLStreamReader xmlReader = getReader(); reader2writer(xmlReader, xmlWriter); } } /** * Simple utility that takes an XMLStreamReader and writes it * to an XMLStreamWriter * @param reader * @param writer * @throws XMLStreamException */ private static void reader2writer(XMLStreamReader reader, XMLStreamWriter writer) throws XMLStreamException { StAXOMBuilder builder = new StAXOMBuilder(reader); builder.releaseParserOnClose(true); try { OMDocument omDocument = builder.getDocument(); Iterator it = omDocument.getChildren(); while (it.hasNext()) { OMNode omNode = (OMNode) it.next(); omNode.serializeAndConsume(writer); } } finally { builder.close(); } } /** * Some XMLStreamWriters expose an OutputStream that can be * accessed directly. * @return OutputStream or null */ private static OutputStream getOutputStream(XMLStreamWriter writer) throws XMLStreamException { if (writer instanceof MTOMXMLStreamWriter) { return ((MTOMXMLStreamWriter) writer).getOutputStream(); } return null; } /** * Get the character set encoding of the XMLStreamWriter * @return String or null */ private static String getCharacterEncoding(XMLStreamWriter writer) { if (writer instanceof MTOMXMLStreamWriter) { return ((MTOMXMLStreamWriter) writer).getCharSetEncoding(); } return null; } } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/ds/custombuilder/0000755000000000000000000000000011131637470026357 5ustar rootroot././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/ds/custombuilder/ByteArrayCustomBuilder.javaaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/ds/custombuilder/ByteArrayCustomBuil0000644000000000000000000000766411131637470032230 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.ds.custombuilder; import org.apache.axiom.om.OMContainer; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMException; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.ds.ByteArrayDataSource; import org.apache.axiom.om.impl.builder.CustomBuilder; import org.apache.axiom.om.impl.serialize.StreamingOMSerializer; import org.apache.axiom.om.util.StAXUtils; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPHeader; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import javax.xml.stream.XMLStreamWriter; import java.io.ByteArrayOutputStream; /** * CustomBuilder that creates an OMSourcedElement backed by a ByteArrayDataSource. * If you have a payload or header that will consume a lot of space, it * may be beneficial to plug in this CustomBuilder. * * Use this CustomBuilder as a pattern for other CustomBuilders. */ public class ByteArrayCustomBuilder implements CustomBuilder { private String encoding = null; /** * Constructor * @param encoding */ public ByteArrayCustomBuilder(String encoding) { this.encoding = (encoding == null) ? "utf-8" :encoding; } /* * Create an OMSourcedElement back by a ByteArrayDataSource */ public OMElement create(String namespace, String localPart, OMContainer parent, XMLStreamReader reader, OMFactory factory) throws OMException { try { // Get the prefix of the start tag String prefix = reader.getPrefix(); // Stream the events to a writer starting with the current event StreamingOMSerializer ser = new StreamingOMSerializer(); ByteArrayOutputStream baos = new ByteArrayOutputStream(); XMLStreamWriter writer = StAXUtils.createXMLStreamWriter(baos, encoding); ser.serialize(reader, writer, false); writer.flush(); // Capture the written byte array as a ByteArrayDataSource byte[] bytes = baos.toByteArray(); String text = new String(bytes, "utf-8"); ByteArrayDataSource ds = new ByteArrayDataSource(bytes, encoding); // Create an OMSourcedElement backed by the ByteArrayDataSource OMNamespace ns = factory.createOMNamespace(namespace, prefix); OMElement om = null; if (parent instanceof SOAPHeader && factory instanceof SOAPFactory) { om = ((SOAPFactory)factory).createSOAPHeaderBlock(localPart, ns, ds); } else { om = factory.createOMElement(ds, localPart, ns); } // Add the new OMSourcedElement ot the parent parent.addChild(om); return om; } catch (XMLStreamException e) { throw new OMException(e); } catch (OMException e) { throw e; } catch (Throwable t) { throw new OMException(t); } } } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/ds/InputStreamDataSource.java0000644000000000000000000001612211131637470030571 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.ds; import org.apache.axiom.om.OMDataSourceExt; import org.apache.axiom.om.OMDocument; import org.apache.axiom.om.OMException; import org.apache.axiom.om.OMNode; import org.apache.axiom.om.OMOutputFormat; import org.apache.axiom.om.impl.MTOMXMLStreamWriter; import org.apache.axiom.om.impl.builder.StAXOMBuilder; import org.apache.axiom.om.util.StAXUtils; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import javax.xml.stream.XMLStreamWriter; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.io.UnsupportedEncodingException; import java.io.Writer; import java.util.HashMap; import java.util.Iterator; /** * InputStream is an example OMDataSourceExt. * Use it to insert a (InputStream, encoding) into an OM Tree. * This data source is useful for placing an InputStream into an OM * tree, instead of having a deeply nested tree. */ public class InputStreamDataSource extends OMDataSourceExtBase { Data data = null; private static final int BUFFER_LEN = 4096; /** * Constructor * @param bytes * @param encoding */ public InputStreamDataSource(InputStream is, String encoding) { data = new Data(); data.is = is; data.encoding = encoding; } public void serialize(OutputStream output, OMOutputFormat format) throws XMLStreamException { if (data == null) { throw new OMException("The InputStreamDataSource does not have a backing object"); } String encoding = format.getCharSetEncoding(); try { if (!data.encoding.equalsIgnoreCase(encoding)) { byte[] bytes = getXMLBytes(encoding); output.write(bytes); } else { // Write the input stream to the output stream inputStream2OutputStream(data.is, output); } } catch (UnsupportedEncodingException e) { throw new XMLStreamException(e); } catch (IOException e) { throw new XMLStreamException(e); } } public void serialize(XMLStreamWriter xmlWriter) throws XMLStreamException { if (data == null) { throw new OMException("The InputStreamDataSource does not have a backing object"); } super.serialize(xmlWriter); } public XMLStreamReader getReader() throws XMLStreamException { if (data == null) { throw new OMException("The InputStreamDataSource does not have a backing object"); } return StAXUtils.createXMLStreamReader(data.is,data.encoding); } public InputStream getXMLInputStream(String encoding) throws UnsupportedEncodingException{ if (data == null) { throw new OMException("The InputStreamDataSource does not have a backing object"); } return data.is; } public Object getObject() { return data; } public boolean isDestructiveRead() { if (data == null) { throw new OMException("The InputStreamDataSource does not have a backing object"); } return true; } public boolean isDestructiveWrite() { if (data == null) { throw new OMException("The InputStreamDataSource does not have a backing object"); } // Writing an input stream is destructive return true; } public byte[] getXMLBytes(String encoding) throws UnsupportedEncodingException { // Return the byte array directly if it is the same encoding // Otherwise convert the bytes to the proper encoding ByteArrayOutputStream baos = new ByteArrayOutputStream(); OMOutputFormat format = new OMOutputFormat(); format.setCharSetEncoding(encoding); try { serialize(baos, format); } catch (XMLStreamException e) { throw new OMException(e); } return baos.toByteArray(); } public void close() { if (data.is != null) { try { data.is.close(); } catch (IOException e) { throw new OMException(e); } data.is = null; } } /** * Return a InputStreamDataSource backed by a ByteArrayInputStream */ public OMDataSourceExt copy() { byte[] bytes; try { bytes = getXMLBytes(data.encoding); } catch (UnsupportedEncodingException e) { throw new OMException(e); } InputStream is1 = new ByteArrayInputStream(bytes); InputStream is2 = new ByteArrayInputStream(bytes); data.is = is1; return new InputStreamDataSource(is2, data.encoding); } /** * Private utility to write the InputStream contents to the OutputStream. * @param is * @param os * @throws IOException */ private static void inputStream2OutputStream(InputStream is, OutputStream os) throws IOException { byte[] buffer = new byte[BUFFER_LEN]; int bytesRead = is.read(buffer); while (bytesRead > 0) { os.write(buffer, 0, bytesRead); bytesRead = is.read(buffer); } } /** * Simple utility that takes an XMLStreamReader and writes it * to an XMLStreamWriter * @param reader * @param writer * @throws XMLStreamException */ private static void reader2writer(XMLStreamReader reader, XMLStreamWriter writer) throws XMLStreamException { StAXOMBuilder builder = new StAXOMBuilder(reader); builder.releaseParserOnClose(true); try { OMDocument omDocument = builder.getDocument(); Iterator it = omDocument.getChildren(); while (it.hasNext()) { OMNode omNode = (OMNode) it.next(); omNode.serializeAndConsume(writer); } } finally { builder.close(); } } /** * Object containing the InputStream/encoding pair */ public class Data { public String encoding; public InputStream is; } } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/ds/ByteArrayDataSource.java0000644000000000000000000000713611131637470030225 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.ds; import org.apache.axiom.om.OMDataSourceExt; import org.apache.axiom.om.util.StAXUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import java.io.ByteArrayInputStream; import java.io.UnsupportedEncodingException; /** * ByteArrayDataSource is an example implementation of OMDataSourceExt. * Use it to insert a (byte[], encoding) into an OM Tree. * This data source is useful for placing bytes into an OM * tree, instead of having a deeply nested tree. */ public class ByteArrayDataSource extends OMDataSourceExtBase { private static final Log log = LogFactory.getLog(ByteArrayDataSource.class); private static boolean DEBUG_ENABLED = log.isDebugEnabled(); ByteArray byteArray = null; /** * Constructor * @param bytes * @param encoding */ public ByteArrayDataSource(byte[] bytes, String encoding) { byteArray = new ByteArray(); byteArray.bytes = bytes; byteArray.encoding = encoding; } public XMLStreamReader getReader() throws XMLStreamException { if (DEBUG_ENABLED) { log.debug("getReader"); } return StAXUtils.createXMLStreamReader(new ByteArrayInputStream(byteArray.bytes), byteArray.encoding); } public Object getObject() { return byteArray; } public boolean isDestructiveRead() { // Reading bytes is not destructive return false; } public boolean isDestructiveWrite() { // Writing bytes is not destructive return false; } public byte[] getXMLBytes(String encoding) throws UnsupportedEncodingException { if (DEBUG_ENABLED) { log.debug("getXMLBytes encoding="+encoding); } // Return the byte array directly if it is the same encoding // Otherwise convert the bytes to the proper encoding if (!byteArray.encoding.equalsIgnoreCase(encoding)) { String text = new String(byteArray.bytes, byteArray.encoding); // Convert the internal data structure to the new bytes/encoding byteArray.bytes = text.getBytes(encoding); byteArray.encoding = encoding; } return byteArray.bytes; } public void close() { byteArray = null; } public OMDataSourceExt copy() { // Return shallow copy return new ByteArrayDataSource(byteArray.bytes, byteArray.encoding); } /** * Object containing the byte[]/encoding pair */ public class ByteArray { public byte[] bytes; public String encoding; } } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/ds/CharArrayDataSource.java0000644000000000000000000000557111131637470030200 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.ds; import org.apache.axiom.om.OMDataSourceExt; import org.apache.axiom.om.OMOutputFormat; import org.apache.axiom.om.util.StAXUtils; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import java.io.CharArrayReader; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.io.Writer; /** * CharArrayDataSource is an example implementation of OMDataSourceExt. * Use it to insert a char[] into an OM Tree. * This data source is useful for placing characters into an OM * tree, instead of having a deeply nested tree. */ public class CharArrayDataSource extends OMDataSourceExtBase { char[] chars = null; /** * Constructor * @param bytes * @param encoding */ public CharArrayDataSource(char[] chars) { this.chars = chars; } public void serialize(Writer writer, OMOutputFormat format) throws XMLStreamException { try { writer.write(chars); } catch (UnsupportedEncodingException e) { throw new XMLStreamException(e); } catch (IOException e) { throw new XMLStreamException(e); } } public XMLStreamReader getReader() throws XMLStreamException { CharArrayReader reader = new CharArrayReader(chars); return StAXUtils.createXMLStreamReader(reader); } public Object getObject() { return chars; } public boolean isDestructiveRead() { // Reading chars is not destructive return false; } public boolean isDestructiveWrite() { // Writing chars is not destructive return false; } public byte[] getXMLBytes(String encoding) throws UnsupportedEncodingException { String text = new String(chars); return text.getBytes(encoding); } public void close() { chars = null; } public OMDataSourceExt copy() { // Return shallow copy return new CharArrayDataSource(chars); } } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/OMConstants.java0000644000000000000000000000604511131637470026150 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om; /** Interface OMConstants */ public interface OMConstants { // OMBuilder constants /** Field PUSH_TYPE_BUILDER */ static final short PUSH_TYPE_BUILDER = 0; /** Field PULL_TYPE_BUILDER */ static final short PULL_TYPE_BUILDER = 1; /** Field ARRAY_ITEM_NSURI */ static final String ARRAY_ITEM_NSURI = "http://axis.apache.org/encoding/Arrays"; /** Field ARRAY_ITEM_LOCALNAME */ static final String ARRAY_ITEM_LOCALNAME = "item"; /** Field ARRAY_ITEM_NS_PREFIX */ static final String ARRAY_ITEM_NS_PREFIX = "arrays"; /** Field ARRAY_ITEM_QNAME */ static final String ARRAY_ITEM_QNAME = OMConstants.ARRAY_ITEM_NS_PREFIX + ':' + OMConstants.ARRAY_ITEM_LOCALNAME; /** Field DEFAULT_CHAR_SET_ENCODING specifies the default character encoding scheme to be used */ static final String DEFAULT_CHAR_SET_ENCODING = "utf-8"; static final String DEFAULT_XML_VERSION = "1.0"; static final String XMLNS_URI = "http://www.w3.org/XML/1998/namespace"; static final String XMLNS_NS_URI = "http://www.w3.org/2000/xmlns/"; final static String XMLNS_NS_PREFIX = "xmlns"; static final String XMLNS_PREFIX = "xml"; String IS_BINARY = "Axiom.IsBinary"; String DATA_HANDLER = "Axiom.DataHandler"; // Indicates if the xmlstream reader is capable of handling data handlers. // Thus it is an immutable property and will either be true of false for the // lifetime of that parser. @see OMStaxWrapper for an example String IS_DATA_HANDLERS_AWARE = "IsDatahandlersAwareParsing"; /** No its not a mistake. This is the default nsURI of the default namespace of a node */ static final String DEFAULT_DEFAULT_NAMESPACE = "\"\""; static final String XMLATTRTYPE_CDATA = "CDATA"; static final String XMLATTRTYPE_ID = "ID"; static final String XMLATTRTYPE_IDREF = "IDREF"; static final String XMLATTRTYPE_IDREFS = "IDREFS"; static final String XMLATTRTYPE_NMTOKEN = "NMTOKEN"; static final String XMLATTRTYPE_NMTOKENS = "NMTOKENS"; static final String XMLATTRTYPE_ENTITY = "ENTITY"; static final String XMLATTRTYPE_ENTITIES = "ENTITIES"; static final String XMLATTRTYPE_NOTATION = "NOTATION"; } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/OMXMLStreamReader.java0000644000000000000000000000275711131637470027141 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om; import javax.xml.stream.XMLStreamReader; /** * Objects returned by OMElement.getXMLStreamReader may implement this interface */ /** * @author scheu * */ public interface OMXMLStreamReader extends XMLStreamReader, OMAttachmentAccessor { /** * By default, an OMText item that has an MTOM datahandler * will be rendered as a inlined text event. * @return true if inlined as TEXT, false if XOP_INCLUDE is used */ public boolean isInlineMTOM(); /** * @param value set to true if inlining of text is desired (default) * throw OMException if not the value is not supported. */ public void setInlineMTOM(boolean value); } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/OMXMLParserWrapper.java0000644000000000000000000000553211131637470027352 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om; /** Interface OMXMLParserWrapper */ public interface OMXMLParserWrapper { /** * Proceed the parser one step and return the event value. * * @return Returns int. * @throws org.apache.axiom.om.OMException * * @throws OMException */ int next() throws OMException; /** * Discards the current element. This will remove the given element and its descendants. * * @param el * @throws OMException * * @throws OMException */ void discard(OMElement el) throws OMException; /** * @param b * @throws org.apache.axiom.om.OMException * * @throws OMException */ void setCache(boolean b) throws OMException; /** * @return true if caching */ boolean isCache(); /** * Allows to access the underlying parser. Since the parser depends on the underlying * implementation, an Object is returned. However the implementations may have restrictions in * letting access to the parser. * * @return Returns Object. */ Object getParser(); /** @return Returns the complete status. */ boolean isCompleted(); /** @return Returns the document element. */ OMElement getDocumentElement(); /** * Returns the type of the builder. Can be either {@link OMConstants#PUSH_TYPE_BUILDER} * or {@link OMConstants#PULL_TYPE_BUILDER}. * * @return Returns short. */ short getBuilderType(); /** * Registers an external content handler. Especially useful for push type builders. Throws an * unsupportedOperationException if such handler registration is not supported. * * @param obj */ void registerExternalContentHandler(Object obj); /** * get the registered external content handler * * @return Returns Object. */ Object getRegisteredContentHandler(); /** * Returns the encoding style of the XML data * @return the character encoding, defaults to "UTF-8" */ public String getCharacterEncoding(); } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/OMText.java0000644000000000000000000000444711131637470025124 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om; import javax.xml.namespace.QName; /** * Interface OMText. *

* OMText can contain data as a String, char[] or a DataHandler. */ public interface OMText extends OMNode { /** * Returns the text value of this node. * * @return Returns String. */ String getText(); char[] getTextCharacters(); boolean isCharacters(); QName getTextAsQName(); /** * Returns the Namespace if this contains a QName Return null otherwise * * @deprecated This API is going away. Please use getTextAsQName() instead. * @return OMNamespace */ OMNamespace getNamespace(); /** * Gets the datahandler. * * @return Returns datahandler. */ Object getDataHandler(); /** @return Returns boolean flag saying whether the node contains an optimized text or not. */ boolean isOptimized(); /** * Sets the optimize flag. * * @param value true to optimize binary content (usually w/MTOM) */ void setOptimize(boolean value); /** @return Returns boolean flag saying whether the node contains binary or not. */ boolean isBinary(); /** * Sets the isBinary flag. * * @param value true if the content is binary */ void setBinary(boolean value); /** * Gets the content id. * * @return Returns String. */ String getContentID(); /** * Set a specific content id * @param cid */ void setContentID(String cid); } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/OMAbstractFactory.java0000644000000000000000000001611611131637470027267 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om; import org.apache.axiom.soap.SOAPFactory; /** * Provides default instances for plain XML, SOAP 1.1 and SOAP 1.2 object model factories. * *

The implementation class for each object model type is determined by a specific * system property. If the system property is not set, a default implementation class * is chosen. The following table summarizes the system properties and default implementation * used:

* * * * * * * * * * * * * * * * * * * * * * * * * *
Object modelMethodSystem propertyDefault implementation
Plain XML{@link #getOMFactory()}om.factory{@link org.apache.axiom.om.impl.llom.factory.OMLinkedListImplFactory}
SOAP 1.1{@link #getSOAP11Factory()}soap11.factory{@link org.apache.axiom.soap.impl.llom.soap11.SOAP11Factory}
SOAP 1.2{@link #getSOAP12Factory()}soap12.factory{@link org.apache.axiom.soap.impl.llom.soap12.SOAP12Factory}
*

The methods in this class assume that {@link OMFactory} instances are stateless and * return the same instance on every invocation, i.e. the factory for each OM type is instantiated * only once. Configuring the system properties with factory implementation that are not * stateless will lead to unexpected results. It should be noted that the factories provided * by the DOOM implementation are not stateless and should therefore never be used as default * factories.

*

Each method in this class uses {@link System#getProperty(String)} to determine the value of * the relevant system property. A {@link SecurityException} thrown by this method is simply ignored * and the default factory implementation is used.

*/ public class OMAbstractFactory { public static final String OM_FACTORY_NAME_PROPERTY = "om.factory"; public static final String SOAP11_FACTORY_NAME_PROPERTY = "soap11.factory"; public static final String SOAP12_FACTORY_NAME_PROPERTY = "soap12.factory"; private static final String DEFAULT_OM_FACTORY_CLASS_NAME = "org.apache.axiom.om.impl.llom.factory.OMLinkedListImplFactory"; private static final String DEFAULT_SOAP11_FACTORY_CLASS_NAME = "org.apache.axiom.soap.impl.llom.soap11.SOAP11Factory"; private static final String DEFAULT_SOAP12_FACTORY_CLASS_NAME = "org.apache.axiom.soap.impl.llom.soap12.SOAP12Factory"; private static OMFactory defaultOMFactory = null; private static SOAPFactory defaultSOAP11OMFactory = null; private static SOAPFactory defaultSOAP12OMFactory = null; private OMAbstractFactory() {} /** * Get the default OM factory instance. * * @return the default OM factory instance * @throws OMException if the factory's implementation class can't be found * or if the class can't be instantiated */ public static OMFactory getOMFactory() { if (defaultOMFactory != null) { return defaultOMFactory; } String omFactory; try { omFactory = System.getProperty(OM_FACTORY_NAME_PROPERTY); if (omFactory == null || "".equals(omFactory)) { omFactory = DEFAULT_OM_FACTORY_CLASS_NAME; } } catch (SecurityException e) { omFactory = DEFAULT_OM_FACTORY_CLASS_NAME; } try { defaultOMFactory = (OMFactory) Class.forName(omFactory).newInstance(); } catch (InstantiationException e) { throw new OMException(e); } catch (IllegalAccessException e) { throw new OMException(e); } catch (ClassNotFoundException e) { throw new OMException(e); } return defaultOMFactory; } /** * Get the default SOAP 1.1 OM factory instance. * * @return the default SOAP 1.1 OM factory instance * @throws OMException if the factory's implementation class can't be found * or if the class can't be instantiated */ public static SOAPFactory getSOAP11Factory() { if (defaultSOAP11OMFactory != null) { return defaultSOAP11OMFactory; } String omFactory; try { omFactory = System.getProperty(SOAP11_FACTORY_NAME_PROPERTY); if (omFactory == null || "".equals(omFactory)) { omFactory = DEFAULT_SOAP11_FACTORY_CLASS_NAME; } } catch (SecurityException e) { omFactory = DEFAULT_SOAP11_FACTORY_CLASS_NAME; } try { defaultSOAP11OMFactory = (SOAPFactory) Class.forName(omFactory).newInstance(); } catch (InstantiationException e) { throw new OMException(e); } catch (IllegalAccessException e) { throw new OMException(e); } catch (ClassNotFoundException e) { throw new OMException(e); } return defaultSOAP11OMFactory; } /** * Get the default SOAP 1.2 OM factory instance. * * @return the default SOAP 1.2 OM factory instance * @throws OMException if the factory's implementation class can't be found * or if the class can't be instantiated */ public static SOAPFactory getSOAP12Factory() { if (defaultSOAP12OMFactory != null) { return defaultSOAP12OMFactory; } String omFactory; try { omFactory = System.getProperty(SOAP12_FACTORY_NAME_PROPERTY); if (omFactory == null || "".equals(omFactory)) { omFactory = DEFAULT_SOAP12_FACTORY_CLASS_NAME; } } catch (SecurityException e) { omFactory = DEFAULT_SOAP12_FACTORY_CLASS_NAME; } try { defaultSOAP12OMFactory = (SOAPFactory) Class.forName(omFactory).newInstance(); } catch (InstantiationException e) { throw new OMException(e); } catch (IllegalAccessException e) { throw new OMException(e); } catch (ClassNotFoundException e) { throw new OMException(e); } return defaultSOAP12OMFactory; } } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/OMSerializer.java0000644000000000000000000000234511131637470026304 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import javax.xml.stream.XMLStreamWriter; /** Interface OMSerializer */ public interface OMSerializer { /** * Method serialize * * @param reader * @param writer * @throws XMLStreamException */ void serialize(XMLStreamReader reader, XMLStreamWriter writer) throws XMLStreamException; } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/OMSourcedElement.java0000644000000000000000000000401711131637470027107 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om; /** * An OMSourcedElement is an OMElement whose data is backed by * an arbitrary java object. The backing java object is accessed via * the OMDataSource (or OMDataSourceExt) interface. * * An OMSourcedElement can be in one of two states. * Not Expanded: In this state the backing object is used to read and write the xml * Expanded: In this state, the OMSourcedElement is backed by a normal OM tree. * * Here are the steps to place an arbitrary java object into the OM tree. * 1) Write an OMDataSourceExt class that provides access to your java object. * 2) Use OMFactory.createOMElement(OMDataSource, String, OMNamespace) to create * the OMSourcedElement. * 3) Attach the OMSourcedElement to your OMTree. */ public interface OMSourcedElement extends OMElement { /** * @return true if tree is expanded or being expanded. */ public boolean isExpanded(); /** * @return OMDataSource */ public OMDataSource getDataSource(); /** * Replace an existing OMDataSource with a new one. * @param dataSource new OMDataSource * @return null or old OMDataSource */ public OMDataSource setDataSource(OMDataSource dataSource); } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/OMAttribute.java0000644000000000000000000000340311131637470026132 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om; import javax.xml.namespace.QName; /** Interface OMAttribute */ public interface OMAttribute { /** @return Returns localName. */ String getLocalName(); /** @param localName */ void setLocalName(String localName); /** @return Returns String. */ String getAttributeValue(); /** @param value */ void setAttributeValue(String value); /** @return Returns String. */ String getAttributeType(); /** @param value */ void setAttributeType(String value); /** @param omNamespace */ void setOMNamespace(OMNamespace omNamespace); /** @return Returns OMNamespace. */ OMNamespace getNamespace(); /** @return Returns javax.xml.namespace.QName */ QName getQName(); /** Returns the OMFactory that created this object */ OMFactory getOMFactory(); /** * Returns the owner element of this attribute * @return OMElement - The owner element */ OMElement getOwner(); } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/OMContainer.java0000644000000000000000000000640611131637470026117 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om; import javax.xml.namespace.QName; import java.util.Iterator; /** * Captures the operations related to containment shared by both a document and an element. *

*

Exposes the ability to add, find, and iterate over the children of a document or element.

*/ public interface OMContainer { /** * Adds the given node as the last child. One must preserve the order of children, in this * operation. Tip : appending the new child is preferred. * * @param omNode */ void addChild(OMNode omNode); /** * Returns an iterator for child nodes matching the given QName. *

* * @param elementQName The QName specifying namespace and local name to match. * @return Returns an iterator of {@link OMElement} items that match the given QName */ Iterator getChildrenWithName(QName elementQName); /** * Returns an iterator for child nodes matching the local name. *

* * @param localName * @return Returns an iterator of {@link OMElement} items that match the given localName */ Iterator getChildrenWithLocalName(String localName); /** * Returns an iterator for child nodes matching the namespace uri. *

* * @param uri * @return Returns an iterator of {@link OMElement} items that match the given uri */ Iterator getChildrenWithNamespaceURI(String uri); /** * Returns the first child in document order that matches the given QName *

*

The QName filter is applied as in the function {@link #getChildrenWithName}.

* * @param elementQName The QName to use for matching. * @return Returns the first element in document order that matches the elementQName * criteria. * @throws OMException Could indirectly trigger building of child nodes. * @see #getChildrenWithName */ OMElement getFirstChildWithName(QName elementQName) throws OMException; /** * Returns an iterator for the children of the container. * * @return Returns a {@link Iterator} of children, all of which implement {@link OMNode}. * @see #getFirstChildWithName * @see #getChildrenWithName */ Iterator getChildren(); /** * Gets the first child. * * @return Returns the first child. May return null if the container has no children. */ OMNode getFirstOMChild(); boolean isComplete(); void buildNext(); } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/OMNamespace.java0000644000000000000000000000275111131637470026070 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om; /** Interface OMNamespace */ public interface OMNamespace { /** * Method equals. * * @param uri * @param prefix * @return Returns boolean. */ boolean equals(String uri, String prefix); /** * Method getPrefix. * * @return Returns String. */ String getPrefix(); /** * Method getName. * * @return Returns String. * @deprecated This method is deprecated. Please use getNamespaceURI() method instead. */ String getName(); /** * Provides the namespace URI of this namespace. * * @return - the namespace URI of the namespace. */ String getNamespaceURI(); } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/OMAttachmentAccessor.java0000644000000000000000000000243611131637470027747 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om; import javax.activation.DataHandler; /** * This interface is applied to objects that * can access attachments. */ public interface OMAttachmentAccessor { /** * @param blobContentID (without the surrounding angle brackets and "cid:" prefix) * @return The DataHandler of the mime part referred by the Content-Id or *null* if the mime * part referred by the content-id does not exist */ public DataHandler getDataHandler(String blobcid); } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/OMComment.java0000644000000000000000000000224511131637470025574 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om; /** Interface OMComment */ public interface OMComment extends OMNode { /** * Returns the value of this comment as defined by XPath 1.0. * * @return Returns String. */ String getValue(); /** * Sets the content of this comment to the specified string. * * @param text */ void setValue(String text); } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/util/0000755000000000000000000000000011131637470024045 5ustar rootrootaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/util/CopyUtils.java0000644000000000000000000005367311131637470026661 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.util; import org.apache.axiom.om.OMAttribute; import org.apache.axiom.om.OMComment; import org.apache.axiom.om.OMContainer; import org.apache.axiom.om.OMDataSource; import org.apache.axiom.om.OMDataSourceExt; import org.apache.axiom.om.OMDocument; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMException; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMNode; import org.apache.axiom.om.OMSourcedElement; import org.apache.axiom.om.OMText; import org.apache.axiom.om.impl.builder.StAXOMBuilder; import org.apache.axiom.soap.SOAPBody; import org.apache.axiom.soap.SOAPEnvelope; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPFault; import org.apache.axiom.soap.SOAPFaultCode; import org.apache.axiom.soap.SOAPFaultDetail; import org.apache.axiom.soap.SOAPFaultNode; import org.apache.axiom.soap.SOAPFaultReason; import org.apache.axiom.soap.SOAPFaultRole; import org.apache.axiom.soap.SOAPFaultSubCode; import org.apache.axiom.soap.SOAPFaultText; import org.apache.axiom.soap.SOAPFaultValue; import org.apache.axiom.soap.SOAPHeader; import org.apache.axiom.soap.SOAPHeaderBlock; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import javax.activation.DataHandler; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import javax.xml.stream.XMLStreamWriter; import java.util.Iterator; /** * CopyUtils provides static utility methods that are useful for creating a copy of * an OM/SOAPEnvelope tree. * During the expansion, the Source tree retains its shape * (OMSourcedElement nodes are not expanded). * The Target tree has nodes that retain the class identity of the source node. For * example, a SOAPFault in the source tree will have a SOAPFault in the target tree. */ public class CopyUtils { private static Log log = LogFactory.getLog(CopyUtils.class); private static final boolean IS_DEBUG_ENABLED = log.isDebugEnabled(); /** * Private Constructor */ private CopyUtils() { } /** * Creates a copy of the source envelope. * If there are OMSourcedElements in the source tree, * similar MSourcedElements are used in the target tree. * * @param sourceEnv * @return targetEnv */ public static SOAPEnvelope copy(SOAPEnvelope sourceEnv) { // Make sure to build the whole sourceEnv if (log.isDebugEnabled()) { log.debug("start copy SOAPEnvelope"); } SOAPFactory factory = (SOAPFactory) sourceEnv.getOMFactory(); // Create envelope with the same prefix SOAPEnvelope targetEnv = factory.createSOAPEnvelope(sourceEnv.getNamespace()); // Copy the attributes and namespaces from the source // envelope to the target envelope. copyTagData(sourceEnv, targetEnv); Iterator i = sourceEnv.getChildren(); while (i.hasNext()) { OMNode node = (OMNode) i.next(); if (node instanceof SOAPHeader) { // Copy the SOAPHeader tree SOAPHeader targetHeader = factory.createSOAPHeader(targetEnv); Iterator j = ((SOAPHeader)node).getChildren(); while (j.hasNext()) { OMNode child = (OMNode) j.next(); copy(factory, targetHeader, child); } } else if (node instanceof SOAPBody) { // Copy the SOAPBody tree SOAPBody targetBody = factory.createSOAPBody(targetEnv); Iterator j = ((SOAPBody)node).getChildren(); while (j.hasNext()) { OMNode child = (OMNode) j.next(); copy(factory, targetBody, child); } } else { // Comments, text, etc. copy(factory, targetEnv, node); } } if (log.isDebugEnabled()) { log.debug("end copy SOAPEnvelope"); } return targetEnv; } /** * Simple utility that takes an XMLStreamReader and writes it * to an XMLStreamWriter * @param reader * @param writer * @throws XMLStreamException */ public static void reader2writer(XMLStreamReader reader, XMLStreamWriter writer) throws XMLStreamException { StAXOMBuilder builder = new StAXOMBuilder(reader); builder.releaseParserOnClose(true); try { OMDocument omDocument = builder.getDocument(); Iterator it = omDocument.getChildren(); while (it.hasNext()) { OMNode omNode = (OMNode) it.next(); omNode.serializeAndConsume(writer); } } finally { builder.close(); } } /** * Create a copy of the sourceNode and attach it to the targetParent * @param factory OMFactory * @param targetParent * @param sourceNode */ private static void copy(SOAPFactory factory, OMContainer targetParent, OMNode sourceNode) { // Create and attach a node of the same class // TODO It would be nice if you could do this directly from the // OMNode, but OMNode.clone() does not gurantee that an object of the correct // class is created. if (sourceNode instanceof SOAPHeaderBlock) { copySOAPHeaderBlock(factory, targetParent, (SOAPHeaderBlock) sourceNode); } else if (sourceNode instanceof SOAPFault) { copySOAPFault(factory, targetParent, (SOAPFault) sourceNode); } else if (sourceNode instanceof OMSourcedElement) { copyOMSourcedElement(factory, targetParent, (OMSourcedElement) sourceNode); } else if (sourceNode instanceof OMElement) { copyOMElement(factory, targetParent, (OMElement) sourceNode); } else if (sourceNode instanceof OMText) { copyOMText(factory, targetParent, (OMText) sourceNode); } else if (sourceNode instanceof OMComment) { copyOMComment(factory, targetParent, (OMComment) sourceNode); } else { throw new OMException("Internal Failure: Cannot make a copy of " + sourceNode.getClass().getName()); } } /** * Create a copy of the source OMComment * @param factory * @param targetParent * @param sourceComment */ private static void copyOMComment(SOAPFactory factory, OMContainer targetParent, OMComment sourceComment) { // Create and attach the comment factory.createOMComment(targetParent, sourceComment.getValue()); } /** * Create a copy of the OM Text * @param factory * @param targetParent * @param sourceText */ private static void copyOMText(SOAPFactory factory, OMContainer targetParent, OMText sourceText) { if (IS_DEBUG_ENABLED) { log.debug("start copyOMText"); } if (sourceText.isBinary()) { // This forces a load of the datahandler so that it is saved on the copy. Object dh = sourceText.getDataHandler(); if (IS_DEBUG_ENABLED) { String dhclass = (dh == null) ? "null" : dh.getClass().toString(); log.debug("The source text's binary data handler is " + dhclass); } } factory.createOMText(targetParent, sourceText); if (IS_DEBUG_ENABLED) { log.debug("end copyOMText"); } } /** * Create a copy of an ordinary OMElement * @param factory * @param targetParent * @param sourceElement */ private static void copyOMElement(SOAPFactory factory, OMContainer targetParent, OMElement sourceElement) { // Clone and attach the OMElement. // REVIEW This clone will expand the underlying tree. We may want consider traversing // a few levels deeper to see if there are any additional OMSourcedElements. targetParent.addChild(sourceElement.cloneOMElement()); } /** * Create a copy of the OMSourcedElement * @param factory * @param targetParent * @param sourceOMSE */ private static void copyOMSourcedElement(SOAPFactory factory, OMContainer targetParent, OMSourcedElement sourceOMSE) { // If already expanded or this is not an OMDataSourceExt, then // create a copy of the OM Tree OMDataSource ds = sourceOMSE.getDataSource(); if (ds == null || sourceOMSE.isExpanded() || !(ds instanceof OMDataSourceExt)) { copyOMElement(factory, targetParent, sourceOMSE); return; } // If copying is destructive, then copy the OM tree OMDataSourceExt sourceDS = (OMDataSourceExt) ds; if (sourceDS.isDestructiveRead() || sourceDS.isDestructiveWrite()) { copyOMElement(factory, targetParent, sourceOMSE); return; } OMDataSourceExt targetDS = ((OMDataSourceExt) ds).copy(); if (targetDS == null) { copyOMElement(factory, targetParent, sourceOMSE); return; } // Otherwise create a target OMSE with the copied DataSource OMSourcedElement targetOMSE = factory.createOMElement(targetDS, sourceOMSE.getLocalName(), sourceOMSE.getNamespace()); targetParent.addChild(targetOMSE); } /** * Create a copy of the SOAPHeaderBlock * @param factory * @param targetParent * @param sourceSHB */ private static void copySOAPHeaderBlock(SOAPFactory factory, OMContainer targetParent, SOAPHeaderBlock sourceSHB) { // If already expanded or this is not an OMDataSourceExt, then // create a copy of the OM Tree OMDataSource ds = sourceSHB.getDataSource(); if (ds == null || sourceSHB.isExpanded() || !(ds instanceof OMDataSourceExt)) { copySOAPHeaderBlock_NoDataSource(factory, targetParent, sourceSHB); return; } // If copying is destructive, then copy the OM tree OMDataSourceExt sourceDS = (OMDataSourceExt) ds; if (sourceDS.isDestructiveRead() || sourceDS.isDestructiveWrite()) { copySOAPHeaderBlock_NoDataSource(factory, targetParent, sourceSHB); return; } // Otherwise create a copy of the OMDataSource OMDataSourceExt targetDS = ((OMDataSourceExt) ds).copy(); SOAPHeaderBlock targetSHB = factory.createSOAPHeaderBlock(sourceSHB.getLocalName(), sourceSHB.getNamespace(), targetDS); targetParent.addChild(targetSHB); copySOAPHeaderBlockData(sourceSHB, targetSHB); } /** * Create a copy of the SOAPHeaderBlock * @param factory * @param targetParent * @param sourceSHB */ private static void copySOAPHeaderBlock_NoDataSource(SOAPFactory factory, OMContainer targetParent, SOAPHeaderBlock sourceSHB) { SOAPHeader header = (SOAPHeader) targetParent; String localName = sourceSHB.getLocalName(); OMNamespace ns = sourceSHB.getNamespace(); SOAPHeaderBlock targetSHB = factory.createSOAPHeaderBlock(localName, ns, header); // A SOAPHeaderBlock has tag data, plus extra header processing flags copyTagData(sourceSHB, targetSHB); copySOAPHeaderBlockData(sourceSHB, targetSHB); Iterator i = sourceSHB.getChildren(); while (i.hasNext()) { OMNode node = (OMNode) i.next(); copy(factory, targetSHB, node); } } /** * Create a copy of a SOAPFault * @param factory * @param targetParent * @param sourceSOAPFault */ private static void copySOAPFault(SOAPFactory factory, OMContainer targetParent, SOAPFault sourceSOAPFault) { Exception e = sourceSOAPFault.getException(); SOAPFault newSOAPFault = (e == null) ? factory.createSOAPFault((SOAPBody) targetParent): factory.createSOAPFault((SOAPBody) targetParent, e); copyTagData(sourceSOAPFault, newSOAPFault); Iterator i = sourceSOAPFault.getChildren(); while (i.hasNext()) { OMNode node = (OMNode) i.next(); // Copy the tree under the SOAPFault copyFaultData(factory, newSOAPFault, node); } } /** * Copy the source Node, which is a child fo a SOAPFault, * to the target SOAPFault * @param factory * @param targetFault * @param sourceNode */ private static void copyFaultData(SOAPFactory factory, SOAPFault targetFault, OMNode sourceNode) { if (sourceNode instanceof SOAPFaultCode) { copySOAPFaultCode(factory, targetFault, (SOAPFaultCode) sourceNode); } else if (sourceNode instanceof SOAPFaultDetail) { copySOAPFaultDetail(factory, targetFault, (SOAPFaultDetail) sourceNode); } else if (sourceNode instanceof SOAPFaultNode) { copySOAPFaultNode(factory, targetFault, (SOAPFaultNode) sourceNode); } else if (sourceNode instanceof SOAPFaultReason) { copySOAPFaultReason(factory, targetFault, (SOAPFaultReason) sourceNode); } else if (sourceNode instanceof SOAPFaultRole) { copySOAPFaultRole(factory, targetFault, (SOAPFaultRole) sourceNode); } else if (sourceNode instanceof OMText) { copyOMText(factory, targetFault, (OMText) sourceNode); } else if (sourceNode instanceof OMComment) { copyOMComment(factory, targetFault, (OMComment) sourceNode); } else { throw new OMException("Internal Failure: Cannot make a copy of " + sourceNode.getClass().getName() + " object found in a SOAPFault."); } } /** * Create a copy of a SOAPFaultRole * @param factory * @param targetFault * @param sourceRole */ private static void copySOAPFaultRole(SOAPFactory factory, SOAPFault targetFault, SOAPFaultRole sourceRole) { SOAPFaultRole targetRole = factory.createSOAPFaultRole(targetFault); copyTagData(sourceRole, targetRole); targetRole.setRoleValue(sourceRole.getRoleValue()); } /** * Create a copy of a SOAPFaultNode * @param factory * @param targetFault * @param sourceNode */ private static void copySOAPFaultNode(SOAPFactory factory, SOAPFault targetFault, SOAPFaultNode sourceNode) { SOAPFaultNode targetNode = factory.createSOAPFaultNode(targetFault); copyTagData(sourceNode, targetNode); targetNode.setNodeValue(sourceNode.getNodeValue()); } /** * Create a copy of a SOAPFaultDetail * @param factory * @param targetFault * @param sourceDetail */ private static void copySOAPFaultDetail(SOAPFactory factory, SOAPFault targetFault, SOAPFaultDetail sourceDetail) { SOAPFaultDetail targetDetail = factory.createSOAPFaultDetail(targetFault); copyTagData(sourceDetail, targetDetail); // Copy the detail entries Iterator i = sourceDetail.getChildren(); while (i.hasNext()) { OMNode node = (OMNode) i.next(); copy(factory, targetDetail, node); } } /** * Create a copy of the SOAPFaultReason * @param factory * @param targetFault * @param sourceReason */ private static void copySOAPFaultReason(SOAPFactory factory, SOAPFault targetFault, SOAPFaultReason sourceReason) { SOAPFaultReason targetReason = factory.createSOAPFaultReason(targetFault); copyTagData(sourceReason, targetReason); Iterator i = sourceReason.getChildren(); while (i.hasNext()) { OMNode node = (OMNode) i.next(); if (node instanceof SOAPFaultText) { SOAPFaultText oldText = (SOAPFaultText) node; SOAPFaultText newText = factory.createSOAPFaultText(targetReason); copyTagData(oldText, newText); // The lang is copied as an attribute } else { // Copy any comments or child nodes copy(factory, targetReason, node); } } } /** * Copy the SOAPFaultCode tree * @param factory * @param targetFault * @param sourceCode */ private static void copySOAPFaultCode(SOAPFactory factory, SOAPFault targetFault, SOAPFaultCode sourceCode) { SOAPFaultCode targetCode = factory.createSOAPFaultCode(targetFault); copyTagData(sourceCode, targetCode); // Create the Value SOAPFaultValue sourceValue = sourceCode.getValue(); SOAPFaultValue targetValue = factory.createSOAPFaultValue(targetCode); copyTagData(sourceValue, targetValue); // There should only be a text node for the value, but in case there is more Iterator i = sourceValue.getChildren(); while (i.hasNext()) { OMNode node = (OMNode) i.next(); copy(factory, targetValue, node); } // Now get process the SubCode SOAPFaultSubCode sourceSubCode = sourceCode.getSubCode(); if (sourceSubCode != null) { copySOAPFaultSubCode(factory, targetCode, sourceSubCode); } } /** * Copy the SOAPFaultSubCode tree * @param factory * @param targetParent (SOAPFaultCode or SOAPFaultSubCode) * @param sourceSubCode */ private static void copySOAPFaultSubCode(SOAPFactory factory, OMElement targetParent, SOAPFaultSubCode sourceSubCode) { SOAPFaultSubCode targetSubCode; if (targetParent instanceof SOAPFaultSubCode) { targetSubCode = factory.createSOAPFaultSubCode((SOAPFaultSubCode) targetParent); } else { targetSubCode = factory.createSOAPFaultSubCode((SOAPFaultCode) targetParent); } copyTagData(sourceSubCode, targetSubCode); // Process the SOAP FaultValue SOAPFaultValue sourceValue = sourceSubCode.getValue(); SOAPFaultValue targetValue = factory.createSOAPFaultValue(targetSubCode); copyTagData(sourceValue, targetValue); // There should only be a text node for the value, but in case there is more Iterator i = sourceValue.getChildren(); while (i.hasNext()) { OMNode node = (OMNode) i.next(); copy(factory, targetValue, node); } // Now process the SubCode of the SubCode SOAPFaultSubCode sourceSubSubCode = sourceSubCode.getSubCode(); if (sourceSubSubCode != null) { copySOAPFaultSubCode(factory, targetSubCode, sourceSubSubCode); } } /** * Copy the tag data (attributes and namespaces) from the source * element to the target element. * @param sourceElement * @param targetElement */ private static void copyTagData(OMElement sourceElement, OMElement targetElement) { for (Iterator i = sourceElement.getAllDeclaredNamespaces(); i.hasNext();) { OMNamespace ns = (OMNamespace) i.next(); targetElement.declareNamespace(ns); } for (Iterator i = sourceElement.getAllAttributes(); i.hasNext();) { OMAttribute attr = (OMAttribute) i.next(); targetElement.addAttribute(attr); } } /** * Copy Header data (currently only the processed flag) from the * source SOAPHeaderBlock to the target SOAPHeaderBlock * @param sourceSHB * @param targetSHB */ private static void copySOAPHeaderBlockData(SOAPHeaderBlock sourceSHB, SOAPHeaderBlock targetSHB) { // Copy the processed flag. The other SOAPHeaderBlock information //(e.g. role, mustUnderstand) are attributes on the tag and are copied in copyTagData. if (sourceSHB.isProcessed()) { targetSHB.setProcessed(); } } } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/util/Base64.java0000644000000000000000000003065111131637470025741 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.util; import java.io.IOException; import java.io.OutputStream; import java.io.Writer; public class Base64 { private static final char[] S_BASE64CHAR = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/' }; private static final char S_BASE64PAD = '='; private static final byte[] S_DECODETABLE = new byte[128]; static { for (int i = 0; i < S_DECODETABLE.length; i++) S_DECODETABLE[i] = Byte.MAX_VALUE; // 127 for (int i = 0; i < S_BASE64CHAR.length; i++) // 0 to 63 S_DECODETABLE[S_BASE64CHAR[i]] = (byte) i; } private static int decode0(char[] ibuf, byte[] obuf, int wp) { int outlen = 3; if (ibuf[3] == S_BASE64PAD) outlen = 2; if (ibuf[2] == S_BASE64PAD) outlen = 1; int b0 = S_DECODETABLE[ibuf[0]]; int b1 = S_DECODETABLE[ibuf[1]]; int b2 = S_DECODETABLE[ibuf[2]]; int b3 = S_DECODETABLE[ibuf[3]]; switch (outlen) { case 1: obuf[wp] = (byte) (b0 << 2 & 0xfc | b1 >> 4 & 0x3); return 1; case 2: obuf[wp++] = (byte) (b0 << 2 & 0xfc | b1 >> 4 & 0x3); obuf[wp] = (byte) (b1 << 4 & 0xf0 | b2 >> 2 & 0xf); return 2; case 3: obuf[wp++] = (byte) (b0 << 2 & 0xfc | b1 >> 4 & 0x3); obuf[wp++] = (byte) (b1 << 4 & 0xf0 | b2 >> 2 & 0xf); obuf[wp] = (byte) (b2 << 6 & 0xc0 | b3 & 0x3f); return 3; default: throw new RuntimeException("internalError00"); } } /** * */ public static byte[] decode(char[] data, int off, int len) { char[] ibuf = new char[4]; int ibufcount = 0; byte[] obuf = new byte[len / 4 * 3 + 3]; int obufcount = 0; for (int i = off; i < off + len; i++) { char ch = data[i]; if (ch == S_BASE64PAD || ch < S_DECODETABLE.length && S_DECODETABLE[ch] != Byte.MAX_VALUE) { ibuf[ibufcount++] = ch; if (ibufcount == ibuf.length) { ibufcount = 0; obufcount += decode0(ibuf, obuf, obufcount); } } } if (obufcount == obuf.length) return obuf; byte[] ret = new byte[obufcount]; System.arraycopy(obuf, 0, ret, 0, obufcount); return ret; } /** * */ public static byte[] decode(String data) { char[] ibuf = new char[4]; int ibufcount = 0; byte[] obuf = new byte[data.length() / 4 * 3 + 3]; int obufcount = 0; for (int i = 0; i < data.length(); i++) { char ch = data.charAt(i); if (ch == S_BASE64PAD || ch < S_DECODETABLE.length && S_DECODETABLE[ch] != Byte.MAX_VALUE) { ibuf[ibufcount++] = ch; if (ibufcount == ibuf.length) { ibufcount = 0; obufcount += decode0(ibuf, obuf, obufcount); } } } if (obufcount == obuf.length) return obuf; byte[] ret = new byte[obufcount]; System.arraycopy(obuf, 0, ret, 0, obufcount); return ret; } /** * checks input string for invalid Base64 characters * * @param data * @return true, if String contains only valid Base64 characters. false, otherwise */ public static boolean isValidBase64Encoding(String data) { for (int i = 0; i < data.length(); i++) { char ch = data.charAt(i); if (ch == S_BASE64PAD || ch < S_DECODETABLE.length && S_DECODETABLE[ch] != Byte.MAX_VALUE) { //valid character.Do nothing } else if (ch == '\r' || ch == '\n') { //do nothing } else { return false; } }//iterate over all characters in the string return true; } /** * */ public static void decode(char[] data, int off, int len, OutputStream ostream) throws IOException { char[] ibuf = new char[4]; int ibufcount = 0; byte[] obuf = new byte[3]; for (int i = off; i < off + len; i++) { char ch = data[i]; if (ch == S_BASE64PAD || ch < S_DECODETABLE.length && S_DECODETABLE[ch] != Byte.MAX_VALUE) { ibuf[ibufcount++] = ch; if (ibufcount == ibuf.length) { ibufcount = 0; int obufcount = decode0(ibuf, obuf, 0); ostream.write(obuf, 0, obufcount); } } } } /** * */ public static void decode(String data, OutputStream ostream) throws IOException { char[] ibuf = new char[4]; int ibufcount = 0; byte[] obuf = new byte[3]; for (int i = 0; i < data.length(); i++) { char ch = data.charAt(i); if (ch == S_BASE64PAD || ch < S_DECODETABLE.length && S_DECODETABLE[ch] != Byte.MAX_VALUE) { ibuf[ibufcount++] = ch; if (ibufcount == ibuf.length) { ibufcount = 0; int obufcount = decode0(ibuf, obuf, 0); ostream.write(obuf, 0, obufcount); } } } } /** Returns base64 representation of specified byte array. */ public static String encode(byte[] data) { return encode(data, 0, data.length); } /** Returns base64 representation of specified byte array. */ public static String encode(byte[] data, int off, int len) { if (len <= 0) return ""; char[] out = new char[len / 3 * 4 + 4]; int rindex = off; int windex = 0; int rest = len - off; while (rest >= 3) { int i = ((data[rindex] & 0xff) << 16) + ((data[rindex + 1] & 0xff) << 8) + (data[rindex + 2] & 0xff); out[windex++] = S_BASE64CHAR[i >> 18]; out[windex++] = S_BASE64CHAR[(i >> 12) & 0x3f]; out[windex++] = S_BASE64CHAR[(i >> 6) & 0x3f]; out[windex++] = S_BASE64CHAR[i & 0x3f]; rindex += 3; rest -= 3; } if (rest == 1) { int i = data[rindex] & 0xff; out[windex++] = S_BASE64CHAR[i >> 2]; out[windex++] = S_BASE64CHAR[(i << 4) & 0x3f]; out[windex++] = S_BASE64PAD; out[windex++] = S_BASE64PAD; } else if (rest == 2) { int i = ((data[rindex] & 0xff) << 8) + (data[rindex + 1] & 0xff); out[windex++] = S_BASE64CHAR[i >> 10]; out[windex++] = S_BASE64CHAR[(i >> 4) & 0x3f]; out[windex++] = S_BASE64CHAR[(i << 2) & 0x3f]; out[windex++] = S_BASE64PAD; } return new String(out, 0, windex); } /** Outputs base64 representation of the specified byte array to the specified String Buffer */ public static void encode(byte[] data, int off, int len, StringBuffer buffer) { if (len <= 0) { return; } char[] out = new char[4]; int rindex = off; int rest = len - off; while (rest >= 3) { int i = ((data[rindex] & 0xff) << 16) + ((data[rindex + 1] & 0xff) << 8) + (data[rindex + 2] & 0xff); out[0] = S_BASE64CHAR[i >> 18]; out[1] = S_BASE64CHAR[(i >> 12) & 0x3f]; out[2] = S_BASE64CHAR[(i >> 6) & 0x3f]; out[3] = S_BASE64CHAR[i & 0x3f]; buffer.append(out); rindex += 3; rest -= 3; } if (rest == 1) { int i = data[rindex] & 0xff; out[0] = S_BASE64CHAR[i >> 2]; out[1] = S_BASE64CHAR[(i << 4) & 0x3f]; out[2] = S_BASE64PAD; out[3] = S_BASE64PAD; buffer.append(out); } else if (rest == 2) { int i = ((data[rindex] & 0xff) << 8) + (data[rindex + 1] & 0xff); out[0] = S_BASE64CHAR[i >> 10]; out[1] = S_BASE64CHAR[(i >> 4) & 0x3f]; out[2] = S_BASE64CHAR[(i << 2) & 0x3f]; out[3] = S_BASE64PAD; buffer.append(out); } } /** Outputs base64 representation of the specified byte array to a byte stream. */ public static void encode(byte[] data, int off, int len, OutputStream ostream) throws IOException { if (len <= 0) return; byte[] out = new byte[4]; int rindex = off; int rest = len - off; while (rest >= 3) { int i = ((data[rindex] & 0xff) << 16) + ((data[rindex + 1] & 0xff) << 8) + (data[rindex + 2] & 0xff); out[0] = (byte) S_BASE64CHAR[i >> 18]; out[1] = (byte) S_BASE64CHAR[(i >> 12) & 0x3f]; out[2] = (byte) S_BASE64CHAR[(i >> 6) & 0x3f]; out[3] = (byte) S_BASE64CHAR[i & 0x3f]; ostream.write(out, 0, 4); rindex += 3; rest -= 3; } if (rest == 1) { int i = data[rindex] & 0xff; out[0] = (byte) S_BASE64CHAR[i >> 2]; out[1] = (byte) S_BASE64CHAR[(i << 4) & 0x3f]; out[2] = (byte) S_BASE64PAD; out[3] = (byte) S_BASE64PAD; ostream.write(out, 0, 4); } else if (rest == 2) { int i = ((data[rindex] & 0xff) << 8) + (data[rindex + 1] & 0xff); out[0] = (byte) S_BASE64CHAR[i >> 10]; out[1] = (byte) S_BASE64CHAR[(i >> 4) & 0x3f]; out[2] = (byte) S_BASE64CHAR[(i << 2) & 0x3f]; out[3] = (byte) S_BASE64PAD; ostream.write(out, 0, 4); } } /** Outputs base64 representation of the specified byte array to a character stream. */ public static void encode(byte[] data, int off, int len, Writer writer) throws IOException { if (len <= 0) return; char[] out = new char[4]; int rindex = off; int rest = len - off; int output = 0; while (rest >= 3) { int i = ((data[rindex] & 0xff) << 16) + ((data[rindex + 1] & 0xff) << 8) + (data[rindex + 2] & 0xff); out[0] = S_BASE64CHAR[i >> 18]; out[1] = S_BASE64CHAR[(i >> 12) & 0x3f]; out[2] = S_BASE64CHAR[(i >> 6) & 0x3f]; out[3] = S_BASE64CHAR[i & 0x3f]; writer.write(out, 0, 4); rindex += 3; rest -= 3; output += 4; if (output % 76 == 0) writer.write("\n"); } if (rest == 1) { int i = data[rindex] & 0xff; out[0] = S_BASE64CHAR[i >> 2]; out[1] = S_BASE64CHAR[(i << 4) & 0x3f]; out[2] = S_BASE64PAD; out[3] = S_BASE64PAD; writer.write(out, 0, 4); } else if (rest == 2) { int i = ((data[rindex] & 0xff) << 8) + (data[rindex + 1] & 0xff); out[0] = S_BASE64CHAR[i >> 10]; out[1] = S_BASE64CHAR[(i >> 4) & 0x3f]; out[2] = S_BASE64CHAR[(i << 2) & 0x3f]; out[3] = S_BASE64PAD; writer.write(out, 0, 4); } } } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/util/LogOutputStream.java0000644000000000000000000000642111131637470030031 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.util; import org.apache.commons.logging.Log; import java.io.IOException; import java.io.OutputStream; /** * LogOutputStream * Writes to log.debug() * Also counts the number of bytes */ public class LogOutputStream extends OutputStream { private byte[] temp = new byte[1]; private boolean isDebugEnabled = false; private long count = 0; private Log log; private int BUFFER_LEN = 4 * 1024; private byte[] buffer = new byte[BUFFER_LEN]; private int bufferIndex = 0; private int limit; public LogOutputStream(Log log, int limit) { isDebugEnabled = log.isDebugEnabled(); this.log = log; this.limit = limit; } public long getLength() { return count; } public void close() throws IOException { if (bufferIndex > 0) { log.debug(new String(buffer, 0, bufferIndex)); bufferIndex = 0; } buffer = null; temp = null; log = null; } public void flush() throws IOException { // noop } public void write(byte[] b, int off, int len) throws IOException { // Adjust total count // Adjust length to write if (count >= limit) { count += len; return; } else if (count + len >= limit) { count += len; len = (int) (len - (limit - count)); // adjust length to write } else { count += len; } if (isDebugEnabled) { if (len + bufferIndex < BUFFER_LEN) { // buffer the text System.arraycopy(b, off, buffer, bufferIndex, len); bufferIndex += len; } else { // write buffered text if (bufferIndex > 0) { log.debug(new String(buffer, 0, bufferIndex)); bufferIndex = 0; } // buffer or write remaining text if (len + bufferIndex < BUFFER_LEN) { System.arraycopy(b, off, buffer, bufferIndex, len); bufferIndex += len; } else { log.debug(new String(b, off, len)); } } } } public void write(byte[] b) throws IOException { this.write(b, 0, b.length); } public void write(int b) throws IOException { temp[0] = (byte) b; this.write(temp, 0, 1); } } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/util/DigestGenerator.java0000644000000000000000000003164711131637470030011 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.util; import org.apache.axiom.om.OMAttribute; import org.apache.axiom.om.OMDocument; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMException; import org.apache.axiom.om.OMNode; import org.apache.axiom.om.OMProcessingInstruction; import org.apache.axiom.om.OMText; import java.io.ByteArrayOutputStream; import java.io.DataOutputStream; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.Iterator; import java.util.SortedMap; import java.util.TreeMap; /** * Helper class to provide the functionality of the digest value generation. This is an * implementation of the DOMHASH algorithm on OM. */ public class DigestGenerator { /** * This method is an overloaded method for the digest generation for OMDocument * * @param document * @param digestAlgorithm * @return Returns a byte array representing the calculated digest */ public byte[] getDigest(OMDocument document, String digestAlgorithm) throws OMException { byte[] digest = new byte[0]; try { MessageDigest md = MessageDigest.getInstance(digestAlgorithm); ByteArrayOutputStream baos = new ByteArrayOutputStream(); DataOutputStream dos = new DataOutputStream(baos); dos.writeInt(9); Collection childNodes = getValidElements(document); dos.writeInt(childNodes.size()); Iterator itr = childNodes.iterator(); while (itr.hasNext()) { OMNode node = (OMNode) itr.next(); if (node.getType() == OMNode.PI_NODE) dos.write(getDigest((OMProcessingInstruction) node, digestAlgorithm)); else if ( node.getType() == OMNode.ELEMENT_NODE) dos.write(getDigest((OMElement) node, digestAlgorithm)); } dos.close(); md.update(baos.toByteArray()); digest = md.digest(); } catch (NoSuchAlgorithmException e) { throw new OMException(e); } catch (IOException e) { throw new OMException(e); } return digest; } /** * This method is an overloaded method for the digest generation for OMNode * * @param node * @param digestAlgorithm * @return Returns a byte array representing the calculated digest value */ public byte[] getDigest(OMNode node, String digestAlgorithm) { if (node.getType() == OMNode.ELEMENT_NODE) return getDigest((OMElement) node, digestAlgorithm); else if ( node.getType() == OMNode.TEXT_NODE) return getDigest((OMText) node, digestAlgorithm); else if (node.getType() == OMNode.PI_NODE) return getDigest((OMProcessingInstruction) node, digestAlgorithm); else return new byte[0]; } /** * This method is an overloaded method for the digest generation for OMElement * * @param element * @param digestAlgorithm * @return Returns a byte array representing the calculated digest value */ public byte[] getDigest(OMElement element, String digestAlgorithm) throws OMException { byte[] digest = new byte[0]; try { MessageDigest md = MessageDigest.getInstance(digestAlgorithm); ByteArrayOutputStream baos = new ByteArrayOutputStream(); DataOutputStream dos = new DataOutputStream(baos); dos.writeInt(1); dos.write(getExpandedName(element).getBytes("UnicodeBigUnmarked")); dos.write((byte) 0); dos.write((byte) 0); Collection attrs = getAttributesWithoutNS(element); dos.writeInt(attrs.size()); Iterator itr = attrs.iterator(); while (itr.hasNext()) dos.write(getDigest((OMAttribute) itr.next(), digestAlgorithm)); OMNode node = element.getFirstOMChild(); // adjoining Texts are merged, // there is no 0-length Text, and // comment nodes are removed. int length = 0; itr = element.getChildElements(); while (itr.hasNext()) { length++; itr.next(); } dos.writeInt(length); while (node != null) { dos.write(getDigest(node, digestAlgorithm)); node = node.getNextOMSibling(); } dos.close(); md.update(baos.toByteArray()); digest = md.digest(); } catch (NoSuchAlgorithmException e) { throw new OMException(e); } catch (IOException e) { throw new OMException(e); } return digest; } /** * This method is an overloaded method for the digest generation for OMProcessingInstruction * * @param pi * @param digestAlgorithm * @return Returns a byte array representing the calculated digest value */ public byte[] getDigest(OMProcessingInstruction pi, String digestAlgorithm) throws OMException { byte[] digest = new byte[0]; try { MessageDigest md = MessageDigest.getInstance(digestAlgorithm); md.update((byte) 0); md.update((byte) 0); md.update((byte) 0); md.update((byte) 7); md.update(pi.getTarget().getBytes("UnicodeBigUnmarked")); md.update((byte) 0); md.update((byte) 0); md.update(pi.getValue().getBytes("UnicodeBigUnmarked")); digest = md.digest(); } catch (NoSuchAlgorithmException e) { throw new OMException(e); } catch (UnsupportedEncodingException e) { throw new OMException(e); } return digest; } /** * This method is an overloaded method for the digest generation for OMAttribute * * @param attribute * @param digestAlgorithm * @return Returns a byte array representing the calculated digest value */ public byte[] getDigest(OMAttribute attribute, String digestAlgorithm) throws OMException { byte[] digest = new byte[0]; if (!(attribute.getLocalName().equals("xmlns") || attribute.getLocalName().startsWith("xmlns:"))) try { MessageDigest md = MessageDigest.getInstance(digestAlgorithm); md.update((byte) 0); md.update((byte) 0); md.update((byte) 0); md.update((byte) 2); md.update(getExpandedName(attribute).getBytes("UnicodeBigUnmarked")); md.update((byte) 0); md.update((byte) 0); md.update(attribute.getAttributeValue().getBytes("UnicodeBigUnmarked")); digest = md.digest(); } catch (NoSuchAlgorithmException e) { throw new OMException(e); } catch (UnsupportedEncodingException e) { throw new OMException(e); } return digest; } /** * This method is an overloaded method for the digest generation for OMText * * @param text * @param digestAlgorithm * @return Returns a byte array representing the calculated digest value */ public byte[] getDigest(OMText text, String digestAlgorithm) throws OMException { byte[] digest = new byte[0]; try { MessageDigest md = MessageDigest.getInstance(digestAlgorithm); md.update((byte) 0); md.update((byte) 0); md.update((byte) 0); md.update((byte) 3); md.update(text.getText().getBytes("UnicodeBigUnmarked")); digest = md.digest(); } catch (NoSuchAlgorithmException e) { throw new OMException(e); } catch (UnsupportedEncodingException e) { throw new OMException(e); } return digest; } /** * This method is an overloaded method for getting the expanded name namespaceURI followed by * the local name for OMElement * * @param element * @return Returns the expanded name of OMElement */ public String getExpandedName(OMElement element) { return element.getNamespace().getNamespaceURI() + ":" + element.getLocalName(); } /** * This method is an overloaded method for getting the expanded name namespaceURI followed by * the local name for OMAttribute * * @param attribute * @return Returns the expanded name of the OMAttribute */ public String getExpandedName(OMAttribute attribute) { return attribute.getNamespace().getNamespaceURI() + ":" + attribute.getLocalName(); } /** * Gets the collection of attributes which are none namespace declarations for an OMElement * * @param element * @return Returns the collection of attributes which are none namespace declarations */ public Collection getAttributesWithoutNS(OMElement element) { SortedMap map = new TreeMap(); Iterator itr = element.getAllAttributes(); while (itr.hasNext()) { OMAttribute attribute = (OMAttribute) itr.next(); if (!(attribute.getLocalName().equals("xmlns") || attribute.getLocalName().startsWith("xmlns:"))) map.put(getExpandedName(attribute), attribute); } return map.values(); } /** * Gets the valid element collection of an OMDocument. OMElement and OMProcessingInstruction * only * * @param document * @return Returns a collection of OMProcessingInstructions and OMElements */ public Collection getValidElements(OMDocument document) { ArrayList list = new ArrayList(); Iterator itr = document.getChildren(); while (itr.hasNext()) { OMNode node = (OMNode) itr.next(); if (node.getType() == OMNode.ELEMENT_NODE || node.getType() == OMNode.PI_NODE) list.add(node); } return list; } /** * Gets the String representation of the byte array * * @param array * @return Returns the String of the byte */ public String getStringRepresentation(byte[] array) { String str = ""; for (int i = 0; i < array.length; i++) str += array[i]; return str; } /** * Compares two OMNodes for the XML equality * * @param node * @param comparingNode * @param digestAlgorithm * @return Returns true if the OMNode XML contents are equal */ public boolean compareOMNode(OMNode node, OMNode comparingNode, String digestAlgorithm) { return Arrays.equals(getDigest(node, digestAlgorithm), getDigest(comparingNode, digestAlgorithm)); } /** * Compares two OMDocuments for the XML equality * * @param document * @param comparingDocument * @param digestAlgorithm * @return Returns true if the OMDocument XML content are equal */ public boolean compareOMDocument(OMDocument document, OMDocument comparingDocument, String digestAlgorithm) { return Arrays.equals(getDigest(document, digestAlgorithm), getDigest(comparingDocument, digestAlgorithm)); } /** * Compares two OMAttributes for the XML equality * * @param attribute * @param comparingAttribute * @param digestAlgorithm * @return Returns true if the OMDocument XML content are equal */ public boolean compareOMAttribute(OMAttribute attribute, OMAttribute comparingAttribute, String digestAlgorithm) { return Arrays.equals(getDigest(attribute, digestAlgorithm), getDigest(comparingAttribute, digestAlgorithm)); } /** String representing the MD5 digest algorithm */ public static final String md5DigestAlgorithm = "MD5"; /** String representing the SHA digest algorithm */ public static final String shaDigestAlgorithm = "SHA"; /** String representing the SHA1 digest algorithm */ public static final String sha1DigestAlgorithm = "SHA1"; } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/util/ElementHelper.java0000644000000000000000000002051011131637470027437 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.util; import org.apache.axiom.om.OMAttribute; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMException; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMNode; import org.apache.axiom.om.ds.ByteArrayDataSource; import org.apache.axiom.om.impl.builder.StAXOMBuilder; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPHeaderBlock; import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamReader; import java.io.ByteArrayOutputStream; import java.io.UnsupportedEncodingException; import java.net.URLDecoder; import java.util.Iterator; /** * Helper class to provide extra utility stuff against elements. The code is designed to work with * any element implementation. */ public class ElementHelper { private OMElement element; /** * Constructs and binds to an element. * * @param element element to work with */ public ElementHelper(OMElement element) { this.element = element; } /** * Turns a prefix:local qname string into a proper QName, evaluating it in the OMElement * context. * * @param qname qname to resolve * @param defaultToParentNameSpace flag that controls behaviour when there is no namespace. * @return Returns null for any failure to extract a qname. */ public QName resolveQName(String qname, boolean defaultToParentNameSpace) { int colon = qname.indexOf(':'); if (colon < 0) { if (defaultToParentNameSpace) { //get the parent ns and use it for the child OMNamespace namespace = element.getNamespace(); if (namespace != null) { // Guard against QName implementation sillyness. if (namespace.getPrefix() == null) return new QName(namespace.getNamespaceURI(), qname); else return new QName(namespace.getNamespaceURI(), qname, namespace.getPrefix()); } } //else things without no prefix are local. return new QName(qname); } String prefix = qname.substring(0, colon); String local = qname.substring(colon + 1); if (local.length() == 0) { //empy local, exit accordingly return null; } OMNamespace namespace = element.findNamespaceURI(prefix); if (namespace == null) { return null; } return new QName(namespace.getNamespaceURI(), local, prefix); } /** * Turns a prefix:local qname string into a proper QName, evaluating it in the OMElement * context. Unprefixed qnames resolve to the local namespace. * * @param qname prefixed qname string to resolve * @return Returns null for any failure to extract a qname. */ public QName resolveQName(String qname) { return resolveQName(qname, true); } public static void setNewElement(OMElement parent, OMElement myElement, OMElement newElement) { if (myElement != null) { myElement.discard(); } parent.addChild(newElement); } /** * @deprecate please use OMElement.getFirstChildWithName(qname) instead! * @param parent * @param childName * @return */ public static OMElement getChildWithName(OMElement parent, String childName) { Iterator childrenIter = parent.getChildren(); while (childrenIter.hasNext()) { OMNode node = (OMNode) childrenIter.next(); if (node.getType() == OMNode.ELEMENT_NODE && childName.equals(((OMElement) node).getLocalName())) { return (OMElement) node; } } return null; } /** * @deprecated use {@link #getContentID(XMLStreamReader)} instead (see WSCOMMONS-429) */ public static String getContentID(XMLStreamReader parser, String charsetEncoding) { return getContentID(parser); } public static String getContentID(XMLStreamReader parser) { if (parser.getAttributeCount() > 0 && parser.getAttributeLocalName(0).equals("href")) { return getContentIDFromHref(parser.getAttributeValue(0)); } else { throw new OMException( "Href attribute not found in XOP:Include element"); } } /** * Extract the content ID from a href attribute value, i.e. from a URI following the * cid: scheme defined by RFC2392. * * @param href the value of the href attribute * @return the corresponding content ID */ public static String getContentIDFromHref(String href) { if (href.startsWith("cid:")) { try { // URIs should always be decoded using UTF-8 (see WSCOMMONS-429). On the // other hand, since non ASCII characters are not allowed in content IDs, // we can simply decode using ASCII (which is a subset of UTF-8) return URLDecoder.decode(href.substring(4), "ascii"); } catch (UnsupportedEncodingException ex) { // We should never get here throw new OMException(ex); } } else { throw new OMException("href attribute didn't contain a valid cid: URI"); } } /** * Some times two OMElements needs to be added to the same object tree. But in Axiom, a single * tree should always contain object created from the same type of factory (eg: * LinkedListImplFactory, DOMFactory, etc.,). If one OMElement is created from a different * factory than that of the factory which was used to create the object in the existing tree, we * need to convert the new OMElement to match to the factory of existing object tree. This * method will convert omElement to the given omFactory. * * @see AttributeHelper#importOMAttribute(OMAttribute, OMElement) to convert instances of * OMAttribute */ public static OMElement importOMElement(OMElement omElement, OMFactory omFactory) { // first check whether the given OMElement has the same omFactory if (omElement.getOMFactory().getClass().isInstance(omFactory)) { return omElement; } else { OMElement documentElement = new StAXOMBuilder(omFactory, omElement.getXMLStreamReader()) .getDocumentElement(); documentElement.build(); return documentElement; } } /** * This is a method to convert regular OMElements to SOAPHeaderBlocks. * * @param omElement * @param factory * @return * @throws Exception */ public static SOAPHeaderBlock toSOAPHeaderBlock(OMElement omElement, SOAPFactory factory) throws Exception { if (omElement instanceof SOAPHeaderBlock) return (SOAPHeaderBlock) omElement; QName name = omElement.getQName(); String localName = name.getLocalPart(); OMNamespace namespace = factory.createOMNamespace(name.getNamespaceURI(), name.getPrefix()); ByteArrayOutputStream baos = new ByteArrayOutputStream(); omElement.serialize(baos); ByteArrayDataSource bads = new ByteArrayDataSource(baos.toByteArray(), "utf-8"); SOAPHeaderBlock block = factory.createSOAPHeaderBlock(localName, namespace, bads); return block; } } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/util/AttributeHelper.java0000644000000000000000000000351011131637470030012 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.util; import org.apache.axiom.om.OMAttribute; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMFactory; /** Helper class for attributes. */ public class AttributeHelper { /** * In Axiom, a single tree should always contain objects created from the same type of factory * (eg: LinkedListImplFactory, DOMFactory, etc.,). This method will convert omAttribute to the * given omFactory. * * @see ElementHelper#importOMElement(OMElement, OMFactory) to convert instances of OMElement */ public static void importOMAttribute(OMAttribute omAttribute, OMElement omElement) { // first check whether the given OMAttribute has the same OMFactory if (omAttribute.getOMFactory().getClass().isInstance(omElement.getOMFactory())) { omElement.addAttribute(omAttribute); } else { omElement.addAttribute(omAttribute.getLocalName(), omAttribute.getAttributeValue(), omAttribute.getNamespace()); } } } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/util/DetachableInputStream.java0000644000000000000000000001346711131637470031133 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.util; import org.apache.axiom.attachments.impl.BufferUtils; import org.apache.axiom.attachments.utils.BAAInputStream; import org.apache.axiom.attachments.utils.BAAOutputStream; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import java.io.FilterInputStream; import java.io.IOException; import java.io.InputStream; /** * FilterInputStream that delegates to the original * InputStream. When detach() is called, the original * InputStream is consumed, and closed. The unread bytes are * stored in a local stream. * Subsequent requests are serviced by the local stream. * * Rationale: The detached stream can be closed and its * resources freed, but the consumer of the stream can * continue to receive data. * * Cons: If there are a lot of bytes remaining, these are * buffered. Currently they are buffered incore (this * could be improved to buffer in a file). * */ public class DetachableInputStream extends FilterInputStream { private static Log log = LogFactory.getLog(DetachableInputStream.class); private long count = 0; BAAInputStream localStream = null; boolean isClosed = false; public DetachableInputStream(InputStream in) { super(in); count = 0; } /** * @return count of bytes read */ public long length() throws IOException { if (localStream == null) { detach(); } return count; } /** * Consume the input stream and close it. * The bytes in the input stream are buffered. * (Thus the original input stream can release its * resources, but the consumer of the stream can * still receive data). * @throws IOException */ public void detach() throws IOException { if (localStream == null && !isClosed) { BAAOutputStream baaos = new BAAOutputStream(); try { // It is possible that the underlying stream was closed BufferUtils.inputStream2OutputStream(in, baaos); super.close(); } catch (Throwable t) { if (log.isDebugEnabled()) { log.debug("detach caught exception. Processing continues:" + t); log.debug(" " + stackToString(t)); } } finally { in = null; // GC the incoming stream } localStream = new BAAInputStream(baaos.buffers(), baaos.length()); if (log.isDebugEnabled()) { log.debug("The local stream built from the detached " + "stream has a length of:" + baaos.length()); } count = count + baaos.length(); } } public int available() throws IOException { if (localStream != null) { return localStream.available(); } else { return super.available(); } } public void close() throws IOException { isClosed = true; if (localStream != null) { localStream.close(); } else { super.close(); } } public boolean markSupported() { // Mark is not supported because stream can // switch return false; } public synchronized void mark(int readlimit) { throw new UnsupportedOperationException(); } public int read() throws IOException { if (localStream == null) { int rc = super.read(); if (rc != -1) { count++; } return rc; } else { return localStream.read(); } } public int read(byte[] b, int off, int len) throws IOException { if (localStream == null) { int rc = super.read(b, off, len); if (rc > 0) { count += rc; } return rc; } else { return localStream.read(b, off, len); } } public int read(byte[] b) throws IOException { if (localStream == null) { int rc = super.read(b); if (rc > 0) { count += rc; } return rc; } else { return localStream.read(b); } } public synchronized void reset() throws IOException { throw new IOException(); } public long skip(long n) throws IOException { if (localStream == null) { long rc = super.skip(n); if (rc > 0) { count += rc; } return rc; } else { return localStream.skip(n); } } private static String stackToString(Throwable e) { java.io.StringWriter sw = new java.io.StringWriter(); java.io.BufferedWriter bw = new java.io.BufferedWriter(sw); java.io.PrintWriter pw = new java.io.PrintWriter(bw); e.printStackTrace(pw); pw.close(); String text = sw.getBuffer().toString(); return text; } } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/util/TextHelper.java0000644000000000000000000001731711131637470027005 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.util; import org.apache.axiom.attachments.impl.BufferUtils; import org.apache.axiom.attachments.lifecycle.LifecycleManager; import org.apache.axiom.attachments.lifecycle.impl.FileAccessor; import org.apache.axiom.attachments.lifecycle.impl.LifecycleManagerImpl; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMText; import javax.activation.DataHandler; import javax.mail.MessagingException; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class TextHelper { private static int DEFAULT_FILE_THRESHOLD = 100 * 1024; private static String DEFAULT_ATTACHMENT_DIR = "axiomTmp"; private static int DELETE_TIME = 60 * 60; // 1 Hour /** * @param inStream InputStream * @return Base64 encoded string representint the data in inStream * @throws IOException */ public static String toString(InputStream inStream) throws IOException { StringBuffer buffer = new StringBuffer(); toStringBuffer(inStream, buffer); return buffer.toString(); } /** * Append Base64 encoding of the data in the inStream to the specified buffer * @param inStream InputStream * @param buffer Buffer * @throws IOException */ public static void toStringBuffer(InputStream inStream, StringBuffer buffer) throws IOException { int avail = inStream.available(); // The Base64 will increase the size by 1.33 + some additional // space at the data byte[] boundaries. So a factor of 1.35 is used // to ensure capacity. if (avail > 0) { buffer.ensureCapacity((int) (avail* 1.35) + buffer.length()); } // The size of the buffer must be a multiple of 3. Otherwise usage of the // stateless Base64 class would produce filler characters inside the Base64 // encoded text. byte[] data = new byte[1023]; boolean eos = false; do { int len = 0; do { // Always fill the buffer entirely (unless the end of the stream has // been reached); see above. int read = inStream.read(data, len, data.length-len); if (read == -1) { eos = true; break; } len += read; } while (len < data.length); Base64.encode(data, 0, len, buffer); } while (!eos); } /** * Append data in the omText to the specified buffer * @param inStream InputStream * @param buffer Buffer * @throws IOException */ public static void toStringBuffer(OMText omText, StringBuffer buffer) throws IOException { // If an InputStream is present, stream the BASE64 text to the StreamBuffer if (omText.isOptimized()) { Object dh = omText.getDataHandler(); if (dh instanceof DataHandler) { InputStream is = ((DataHandler) dh).getInputStream(); if (is != null) { toStringBuffer(is, buffer); return; } } } // Otherwise append the text buffer.append(omText.getText()); return; } /** * Create an OMText node from a byte array containing binary data * If the byte array is large and the optimize flag is set, then * the data is stored in a temp file to reduce in-core memory * @param is * @param factory * @param isOptimize */ public static OMText toOMText(byte[] b, int off, int length, OMFactory factory, boolean isOptimize) throws IOException, MessagingException { String attachmentDir = getAttachmentDir(factory); return toOMText(b, off, length, factory, isOptimize, attachmentDir); } /** * Create an OMText node from a byte array containing binary data * If the byte array is large and the optimize flag is set, then * the data is stored in a temp file to reduce in-core memory * @param is * @param factory * @param isOptimize */ public static OMText toOMText(byte[] b, int off, int length, OMFactory factory, boolean isOptimize, String attachmentDir) throws IOException, MessagingException { OMText omText = null; if (isOptimize) { LifecycleManager lm = getLifecycleManager(factory); int threshold = getThreshold(factory); // TODO Consider lowering the threshold in low memory situations ? //threshold = lm.getRuntimeThreshold(threshold); if (length >= threshold && attachmentDir != null) { // Get the file accessor FileAccessor fileAccessor = lm.create(attachmentDir); OutputStream fos = fileAccessor.getOutputStream(); //Copy the bytes into the file ByteArrayInputStream is = new ByteArrayInputStream(b, off, length); BufferUtils.inputStream2OutputStream(is, fos); fos.close(); // Delete this temp file on exit lm.deleteOnExit(fileAccessor.getFile()); lm.deleteOnTimeInterval(DELETE_TIME, fileAccessor.getFile()); // Create the OMText node from the datahandler DataHandler dh = fileAccessor.getDataHandler(null); omText = factory.createOMText(dh, isOptimize); } } if (omText == null) { omText = factory.createOMText(Base64.encode(b, off, length)); omText.setOptimize(isOptimize); } return omText; } private static LifecycleManager getLifecycleManager(OMFactory factory) { LifecycleManager lm = null; /* TODO Support access to lifecycle manager from the factory if (factory.getProperty(LIFECYCLE_MANAGER)) { ... } */ if (lm == null) { return new LifecycleManagerImpl(); } return lm; } private static int getThreshold(OMFactory factory) { int threshold = DEFAULT_FILE_THRESHOLD; /* TODO Support access to threshold from the factory if (factory.getProperty(FILE_THRESHOLD)) { ... } */ return threshold; } private static String getAttachmentDir(OMFactory factory) { String attachmentDir = DEFAULT_ATTACHMENT_DIR; /* TODO Support access to threshold from the factory if (factory.getProperty(FILE_THRESHOLD)) { ... } */ return attachmentDir; } } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/util/XPathEvaluator.java0000644000000000000000000000261711131637470027625 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.util; import org.apache.axiom.om.xpath.AXIOMXPath; import org.jaxen.SimpleNamespaceContext; import java.util.List; public class XPathEvaluator { public List evaluateXpath(String xpathExpression, Object element, String nsURI) throws Exception { AXIOMXPath xpath = new AXIOMXPath(xpathExpression); if (nsURI != null) { SimpleNamespaceContext nsContext = new SimpleNamespaceContext(); nsContext.addNamespace(null, nsURI); xpath.setNamespaceContext(nsContext); } return xpath.selectNodes(element); } } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/util/UUIDGenerator.java0000644000000000000000000000674211131637470027336 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.util; import java.net.InetAddress; import java.net.UnknownHostException; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.util.Date; import java.util.Random; import org.apache.axiom.om.OMException; public class UUIDGenerator { /** This class will give UUIDs for axis2. */ private static String baseUUID = null; private static long incrementingValue = 0; private static Random myRand = null; /** * MD5 a random string with localhost/date etc will return 128 bits construct a string of 18 * characters from those bits. * * @return string */ public static synchronized String getUUID() { if (baseUUID == null) { baseUUID = getInitialUUID(); baseUUID = "urn:uuid:" + baseUUID; } if (++incrementingValue >= Long.MAX_VALUE) { incrementingValue = 0; } return baseUUID + (System.currentTimeMillis() + incrementingValue); } protected static String getInitialUUID() { if (myRand == null) { myRand = new Random(); } long rand = myRand.nextLong(); String sid; try { sid = InetAddress.getLocalHost().toString(); } catch (UnknownHostException e) { sid = Thread.currentThread().getName(); } StringBuffer sb = new StringBuffer(); sb.append(sid); sb.append(":"); sb.append(Long.toString(rand)); MessageDigest md5 = null; try { md5 = MessageDigest.getInstance("MD5"); } catch (NoSuchAlgorithmException e) { throw new OMException(e); } md5.update(sb.toString().getBytes()); byte[] array = md5.digest(); StringBuffer sb2 = new StringBuffer(); for (int j = 0; j < array.length; ++j) { int b = array[j] & 0xFF; sb2.append(Integer.toHexString(b)); } int begin = myRand.nextInt(); if (begin < 0) begin = begin * -1; begin = begin % 8; return sb2.toString().substring(begin, begin + 18).toUpperCase(); } public static void main(String[] args) { long startTime = new Date().getTime(); for (int i = 0; i < 100000; i++) { UUIDGenerator.getInitialUUID(); } long endTime = new Date().getTime(); System.out.println("getInitialUUID Difference = " + (endTime - startTime)); startTime = new Date().getTime(); for (int i = 0; i < 100000; i++) { UUIDGenerator.getUUID(); } endTime = new Date().getTime(); System.out.println("getUUID Difference = " + (endTime - startTime)); } } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/util/CommonUtils.java0000644000000000000000000001334011131637470027162 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.util; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMOutputFormat; import org.apache.commons.logging.Log; import javax.xml.stream.XMLStreamException; /** * Common Utilities */ public class CommonUtils { /** * Private constructor. All methods of this class are static. */ private CommonUtils() {} /** * replace: Like String.replace except that the old and new items are strings. * * @param name string * @param oldT old text to replace * @param newT new text to use * @return replacement string */ public static final String replace(String name, String oldT, String newT) { if (name == null) return ""; // Create a string buffer that is twice initial length. // This is a good starting point. StringBuffer sb = new StringBuffer(name.length() * 2); int len = oldT.length(); try { int start = 0; int i = name.indexOf(oldT, start); while (i >= 0) { sb.append(name.substring(start, i)); sb.append(newT); start = i + len; i = name.indexOf(oldT, start); } if (start < name.length()) sb.append(name.substring(start)); } catch (NullPointerException e) { // No FFDC code needed } return new String(sb); } /** * Get a string containing the stack of the current location * * @return String */ public static String callStackToString() { return stackToString(new RuntimeException()); } /** * Get a string containing the stack of the specified exception * * @param e * @return */ public static String stackToString(Throwable e) { java.io.StringWriter sw = new java.io.StringWriter(); java.io.BufferedWriter bw = new java.io.BufferedWriter(sw); java.io.PrintWriter pw = new java.io.PrintWriter(bw); e.printStackTrace(pw); pw.close(); String text = sw.getBuffer().toString(); // Jump past the throwable text = text.substring(text.indexOf("at")); text = replace(text, "at ", "DEBUG_FRAME = "); return text; } /** * Writes the om to a log.debug. * This method assumes optimized mtom attachments * Also calculates the length of the message. * @param om OMElement * @param log Log * @return length of entire message */ public static long logDebug(OMElement om, Log log) { return logDebug(om, log, Integer.MAX_VALUE); } /** * Writes the om to a log.debug. * This method assumes optimized mtom attachments * Also calculates the length of the message. * @param om OMElement * @param log Log * @param int limit of message to write * @return length of entire message */ public static long logDebug(OMElement om, Log log, int limit) { OMOutputFormat format = new OMOutputFormat(); format.setDoOptimize(true); format.setAutoCloseWriter(true); format.setIgnoreXMLDeclaration(true); return logDebug(om, log, limit, format); } /** * Writes the om to a log.debug. * Also calculates the length of the message. * @param om OMElement * @param log Log * @param int limit of message to write * @param format OMOutputFormat * @return length of entire message */ public static long logDebug(OMElement om, Log log, int limit, OMOutputFormat format) { LogOutputStream logStream = new LogOutputStream(log, limit); try { om.serialize(logStream, format); logStream.flush(); logStream.close(); } catch (Throwable t) { // Problem occur while logging. Log error and continue log.debug(t); log.error(t); } return logStream.getLength(); } /** * A "textual part" has one or more of the following criteria * 1) a content-type that start with "text" * "application/xml" or "application/soap" * 2) has a charset parameter on the content-type. * * Example: * An part with a content-type of "image/gif" is a non-textual attachment. * An part with a content-type of "application/soap+xml" is an textual attachment * * @param contentType * @return true if text, false otherwise */ public static boolean isTextualPart(String contentType) { String ct = contentType.trim(); // REVIEW: What about content-type with a type of "message" return ct.startsWith("text/") || ct.startsWith("application/soap") || ct.startsWith("application/xml") || ct.indexOf("charset") != -1; } } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/util/StAXUtils.java0000644000000000000000000006500411131637470026555 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.util; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.axiom.om.OMConstants; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLOutputFactory; import javax.xml.stream.XMLResolver; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import javax.xml.stream.XMLStreamWriter; import java.io.ByteArrayInputStream; import java.io.InputStream; import java.io.OutputStream; import java.io.Reader; import java.io.Writer; import java.security.AccessController; import java.security.PrivilegedAction; import java.security.PrivilegedActionException; import java.security.PrivilegedExceptionAction; import java.util.Collections; import java.util.Map; import java.util.WeakHashMap; public class StAXUtils { private static Log log = LogFactory.getLog(StAXUtils.class); private static boolean isDebugEnabled = log.isDebugEnabled(); // If isFactoryPerClassLoader is true (default), then // a separate singleton XMLInputFactory and XMLOutputFactory is maintained // for the each classloader. The different classloaders may be using different // implementations of STAX. // // If isFactoryPerClassLoader is false, then // a single XMLInputFactory and XMLOutputFactory is constructed using // the classloader that loaded StAXUtils. private static boolean isFactoryPerClassLoader = true; // These static singletons are used when the XML*Factory is created with // the StAXUtils classloader. private static XMLInputFactory inputFactory = null; private static XMLInputFactory inputNDFactory = null; private static XMLOutputFactory outputFactory = null; // These maps are used for the isFactoryPerClassLoader==true case // The maps are synchronized and weak. private static Map inputFactoryPerCL = Collections.synchronizedMap(new WeakHashMap()); private static Map inputNDFactoryPerCL = Collections.synchronizedMap(new WeakHashMap()); private static Map outputFactoryPerCL = Collections.synchronizedMap(new WeakHashMap()); /** * Gets an XMLInputFactory instance from pool. * * @return an XMLInputFactory instance. */ public static XMLInputFactory getXMLInputFactory() { if (isFactoryPerClassLoader) { return getXMLInputFactory_perClassLoader(false); } else { return getXMLInputFactory_singleton(false); } } /** * Get XMLInputFactory * @param factoryPerClassLoaderPolicy * (if true, then factory using current classloader. * if false, then factory using the classloader that loaded StAXUtils) * @return XMLInputFactory */ public static XMLInputFactory getXMLInputFactory(boolean factoryPerClassLoaderPolicy) { if (factoryPerClassLoaderPolicy) { return getXMLInputFactory_perClassLoader(false); } else { return getXMLInputFactory_singleton(false); } } /** * @deprecated * Returns an XMLInputFactory instance for reuse. * * @param factory An XMLInputFactory instance that is available for reuse */ public static void releaseXMLInputFactory(XMLInputFactory factory) { } public static XMLStreamReader createXMLStreamReader(final InputStream in, final String encoding) throws XMLStreamException { final XMLInputFactory inputFactory = getXMLInputFactory(); try { XMLStreamReader reader = (XMLStreamReader) AccessController.doPrivileged(new PrivilegedExceptionAction() { public Object run() throws XMLStreamException { return inputFactory.createXMLStreamReader(in, encoding); } } ); if (isDebugEnabled) { log.debug("XMLStreamReader is " + reader.getClass().getName()); } return reader; } catch (PrivilegedActionException pae) { throw (XMLStreamException) pae.getException(); } } public static XMLStreamReader createXMLStreamReader(final InputStream in) throws XMLStreamException { final XMLInputFactory inputFactory = getXMLInputFactory(); try { XMLStreamReader reader = (XMLStreamReader) AccessController.doPrivileged(new PrivilegedExceptionAction() { public Object run() throws XMLStreamException { return inputFactory.createXMLStreamReader(in); } } ); if (isDebugEnabled) { log.debug("XMLStreamReader is " + reader.getClass().getName()); } return reader; } catch (PrivilegedActionException pae) { throw (XMLStreamException) pae.getException(); } } public static XMLStreamReader createXMLStreamReader(final Reader in) throws XMLStreamException { final XMLInputFactory inputFactory = getXMLInputFactory(); try { XMLStreamReader reader = (XMLStreamReader) AccessController.doPrivileged(new PrivilegedExceptionAction() { public Object run() throws XMLStreamException { return inputFactory.createXMLStreamReader(in); } } ); if (isDebugEnabled) { log.debug("XMLStreamReader is " + reader.getClass().getName()); } return reader; } catch (PrivilegedActionException pae) { throw (XMLStreamException) pae.getException(); } } /** * Gets an XMLOutputFactory instance from pool. * * @return an XMLOutputFactory instance. */ public static XMLOutputFactory getXMLOutputFactory() { if (isFactoryPerClassLoader) { return getXMLOutputFactory_perClassLoader(); } else { return getXMLOutputFactory_singleton(); } } /** * Get XMLOutputFactory * @param factoryPerClassLoaderPolicy * (if true, then factory using current classloader. * if false, then factory using the classloader that loaded StAXUtils) * @return XMLInputFactory */ public static XMLOutputFactory getXMLOutputFactory(boolean factoryPerClassLoaderPolicy) { if (factoryPerClassLoaderPolicy) { return getXMLOutputFactory_perClassLoader(); } else { return getXMLOutputFactory_singleton(); } } /** * Set the policy for how to maintain the XMLInputFactory and XMLOutputFactory * @param value (if false, then one singleton...if true...then singleton per class loader * (default is true) */ public static void setFactoryPerClassLoader(boolean value) { isFactoryPerClassLoader = value; } /** * @deprecated * Returns an XMLOutputFactory instance for reuse. * * @param factory An XMLOutputFactory instance that is available for reuse. */ public static void releaseXMLOutputFactory(XMLOutputFactory factory) { } public static XMLStreamWriter createXMLStreamWriter(final OutputStream out) throws XMLStreamException { final XMLOutputFactory outputFactory = getXMLOutputFactory(); try { XMLStreamWriter writer = (XMLStreamWriter) AccessController.doPrivileged(new PrivilegedExceptionAction() { public Object run() throws XMLStreamException { return outputFactory.createXMLStreamWriter(out, OMConstants.DEFAULT_CHAR_SET_ENCODING); } } ); if (isDebugEnabled) { log.debug("XMLStreamWriter is " + writer.getClass().getName()); } return writer; } catch (PrivilegedActionException pae) { throw (XMLStreamException) pae.getException(); } } public static XMLStreamWriter createXMLStreamWriter(final OutputStream out, final String encoding) throws XMLStreamException { final XMLOutputFactory outputFactory = getXMLOutputFactory(); try { XMLStreamWriter writer = (XMLStreamWriter) AccessController.doPrivileged(new PrivilegedExceptionAction() { public Object run() throws XMLStreamException { return outputFactory.createXMLStreamWriter(out, encoding); } } ); if (isDebugEnabled) { log.debug("XMLStreamWriter is " + writer.getClass().getName()); } return writer; } catch (PrivilegedActionException pae) { throw (XMLStreamException) pae.getException(); } } public static XMLStreamWriter createXMLStreamWriter(final Writer out) throws XMLStreamException { final XMLOutputFactory outputFactory = getXMLOutputFactory(); try { XMLStreamWriter writer = (XMLStreamWriter) AccessController.doPrivileged(new PrivilegedExceptionAction() { public Object run() throws XMLStreamException { return outputFactory.createXMLStreamWriter(out); } } ); if (isDebugEnabled) { log.debug("XMLStreamWriter is " + writer.getClass().getName()); } return writer; } catch (PrivilegedActionException pae) { throw (XMLStreamException) pae.getException(); } } /** * @deprecated */ public static void reset() { } // This has package access since it is used from within anonymous inner classes static XMLInputFactory newXMLInputFactory(boolean isNetworkDetached) { XMLInputFactory factory = XMLInputFactory.newInstance(); if (isNetworkDetached) { factory.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, Boolean.FALSE); // Some StAX parser such as Woodstox still try to load the external DTD subset, // even if IS_SUPPORTING_EXTERNAL_ENTITIES is set to false. To work around this, // we add a custom XMLResolver that returns empty documents. See WSTX-117 for // an interesting discussion about this. factory.setXMLResolver(new XMLResolver() { public Object resolveEntity(String publicID, String systemID, String baseURI, String namespace) throws XMLStreamException { return new ByteArrayInputStream(new byte[0]); } }); } return factory; } /** * @return XMLInputFactory for the current classloader */ private static XMLInputFactory getXMLInputFactory_perClassLoader(final boolean isNetworkDetached) { ClassLoader cl = getContextClassLoader(); XMLInputFactory factory; if (cl == null) { factory = getXMLInputFactory_singleton(isNetworkDetached); } else { // Check the cache if (isNetworkDetached) { factory = (XMLInputFactory) inputNDFactoryPerCL.get(cl); } else { factory = (XMLInputFactory) inputFactoryPerCL.get(cl); } // If not found in the cache map, crate a new factory if (factory == null) { if (log.isDebugEnabled()) { log.debug("About to create XMLInputFactory implementation with " + "classloader=" + cl); log.debug("The classloader for javax.xml.stream.XMLInputFactory is: " + XMLInputFactory.class.getClassLoader()); } factory = null; try { factory = (XMLInputFactory) AccessController.doPrivileged( new PrivilegedAction() { public Object run() { return newXMLInputFactory(isNetworkDetached); } }); } catch (ClassCastException cce) { if (log.isDebugEnabled()) { log.debug("Failed creation of XMLInputFactory implementation with " + "classloader=" + cl); log.debug("Exception is=" + cce); log.debug("Attempting with classloader: " + XMLInputFactory.class.getClassLoader()); } factory = (XMLInputFactory) AccessController.doPrivileged( new PrivilegedAction() { public Object run() { ClassLoader saveCL = getContextClassLoader(); try { Thread.currentThread(). setContextClassLoader( XMLInputFactory.class.getClassLoader()); return newXMLInputFactory(isNetworkDetached); } finally { Thread.currentThread(). setContextClassLoader(saveCL); } } }); } if (factory != null) { // Cache the new factory if (isNetworkDetached) { inputNDFactoryPerCL.put(cl, factory); } else { inputFactoryPerCL.put(cl, factory); } if (log.isDebugEnabled()) { log.debug("Created XMLInputFactory = " + factory.getClass() + " with classloader=" + cl); log.debug("Size of XMLInputFactory map =" + inputFactoryPerCL.size()); log.debug("isNetworkDetached =" + isNetworkDetached); } } else { factory = getXMLInputFactory_singleton(isNetworkDetached); } } } return factory; } /** * @return singleton XMLInputFactory loaded with the StAXUtils classloader */ private static XMLInputFactory getXMLInputFactory_singleton(final boolean isNetworkDetached) { XMLInputFactory f; if (isNetworkDetached) { f = inputNDFactory; } else { f = inputFactory; } if (f == null) { f = (XMLInputFactory) AccessController.doPrivileged( new PrivilegedAction() { public Object run() { Thread currentThread = Thread.currentThread(); ClassLoader savedClassLoader = currentThread.getContextClassLoader(); try { currentThread.setContextClassLoader(StAXUtils.class.getClassLoader()); return newXMLInputFactory(isNetworkDetached); } finally { currentThread.setContextClassLoader(savedClassLoader); } } }); if (isNetworkDetached) { inputNDFactory = f; } else { inputFactory = f; } if (log.isDebugEnabled()) { if (f != null) { if (isNetworkDetached) { log.debug("Created singleton network detached XMLInputFactory = " + f.getClass()); } else { log.debug("Created singleton XMLInputFactory = " + f.getClass()); } } } } return f; } /** * @return XMLOutputFactory for the current classloader */ public static XMLOutputFactory getXMLOutputFactory_perClassLoader() { ClassLoader cl = getContextClassLoader(); XMLOutputFactory factory; if (cl == null) { factory = getXMLOutputFactory_singleton(); } else { factory = (XMLOutputFactory) outputFactoryPerCL.get(cl); if (factory == null) { if (log.isDebugEnabled()) { log.debug("About to create XMLOutputFactory implementation with " + "classloader=" + cl); log.debug("The classloader for javax.xml.stream.XMLOutputFactory is: " + XMLOutputFactory.class.getClassLoader()); } try { factory = (XMLOutputFactory) AccessController.doPrivileged( new PrivilegedAction() { public Object run() { XMLOutputFactory factory = XMLOutputFactory.newInstance(); factory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, Boolean.FALSE); return factory; } }); } catch (ClassCastException cce) { if (log.isDebugEnabled()) { log.debug("Failed creation of XMLOutputFactory implementation with " + "classloader=" + cl); log.debug("Exception is=" + cce); log.debug("Attempting with classloader: " + XMLOutputFactory.class.getClassLoader()); } factory = (XMLOutputFactory) AccessController.doPrivileged( new PrivilegedAction() { public Object run() { XMLOutputFactory f = null; ClassLoader saveCL = getContextClassLoader(); try { Thread.currentThread(). setContextClassLoader( XMLOutputFactory.class.getClassLoader()); f =XMLOutputFactory.newInstance(); f.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, Boolean.FALSE); } finally { Thread.currentThread(). setContextClassLoader(saveCL); } return f; } }); } if (factory != null) { outputFactoryPerCL.put(cl, factory); if (log.isDebugEnabled()) { log.debug("Created XMLOutputFactory = " + factory.getClass() + " for classloader=" + cl); log.debug("Size of XMLOutputFactory map =" + outputFactoryPerCL.size()); } } else { factory = getXMLOutputFactory_singleton(); } } } return factory; } /** * @return XMLOutputFactory singleton loaded with the StAXUtils classloader */ public static XMLOutputFactory getXMLOutputFactory_singleton() { if (outputFactory == null) { outputFactory = (XMLOutputFactory) AccessController.doPrivileged( new PrivilegedAction() { public Object run() { Thread currentThread = Thread.currentThread(); ClassLoader savedClassLoader = currentThread.getContextClassLoader(); XMLOutputFactory factory = null; try { currentThread.setContextClassLoader(StAXUtils.class.getClassLoader()); factory = XMLOutputFactory.newInstance(); factory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, Boolean.FALSE); } finally { currentThread.setContextClassLoader(savedClassLoader); } return factory; } }); if (log.isDebugEnabled()) { if (outputFactory != null) { log.debug("Created singleton XMLOutputFactory = " + outputFactory.getClass()); } } } return outputFactory; } /** * @return Trhead Context ClassLoader */ private static ClassLoader getContextClassLoader() { ClassLoader cl = (ClassLoader) AccessController.doPrivileged( new PrivilegedAction() { public Object run() { return Thread.currentThread().getContextClassLoader(); } } ); return cl; } /** * Create an XMLStreamReader that will operate when detached from a network. * The XMLStreamReader is created from a OMInputFactory that has external * entities disabled. This kind of XMLStreamReader is useful for reading * deployment information. * @param in * @param encoding * @return * @throws XMLStreamException */ public static XMLStreamReader createNetworkDetachedXMLStreamReader(final InputStream in, final String encoding) throws XMLStreamException { final XMLInputFactory inputFactory = getNetworkDetachedXMLInputFactory(); try { XMLStreamReader reader = (XMLStreamReader) AccessController.doPrivileged(new PrivilegedExceptionAction() { public Object run() throws XMLStreamException { return inputFactory.createXMLStreamReader(in, encoding); } } ); if (isDebugEnabled) { log.debug("XMLStreamReader is " + reader.getClass().getName()); } return reader; } catch (PrivilegedActionException pae) { throw (XMLStreamException) pae.getException(); } } /** * Gets an XMLInputFactory instance from pool. * * @return an XMLInputFactory instance. */ public static XMLInputFactory getNetworkDetachedXMLInputFactory() { if (isFactoryPerClassLoader) { return getXMLInputFactory_perClassLoader(true); } else { return getXMLInputFactory_singleton(true); } } /** * Create an XMLStreamReader that will operate when detached from a network. * The XMLStreamReader is created from a OMInputFactory that has external * entities disabled. This kind of XMLStreamReader is useful for reading * deployment information. * * @param in * @return * @throws XMLStreamException */ public static XMLStreamReader createNetworkDetachedXMLStreamReader(final InputStream in) throws XMLStreamException { final XMLInputFactory inputFactory = getNetworkDetachedXMLInputFactory(); try { XMLStreamReader reader = (XMLStreamReader) AccessController.doPrivileged(new PrivilegedExceptionAction() { public Object run() throws XMLStreamException { return inputFactory.createXMLStreamReader(in); } } ); if (isDebugEnabled) { log.debug("XMLStreamReader is " + reader.getClass().getName()); } return reader; } catch (PrivilegedActionException pae) { throw (XMLStreamException) pae.getException(); } } /** * Create an XMLStreamReader that will operate when detached from a network. * The XMLStreamReader is created from a OMInputFactory that has external * entities disabled. This kind of XMLStreamReader is useful for reading * deployment information. * * @param in * @return * @throws XMLStreamException */ public static XMLStreamReader createNetworkDetachedXMLStreamReader(final Reader in) throws XMLStreamException { final XMLInputFactory inputFactory = getNetworkDetachedXMLInputFactory(); try { XMLStreamReader reader = (XMLStreamReader) AccessController.doPrivileged(new PrivilegedExceptionAction() { public Object run() throws XMLStreamException { return inputFactory.createXMLStreamReader(in); } } ); if (isDebugEnabled) { log.debug("XMLStreamReader is " + reader.getClass().getName()); } return reader; } catch (PrivilegedActionException pae) { throw (XMLStreamException) pae.getException(); } } } ././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/util/OMXMLStreamReaderValidator.javaaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/util/OMXMLStreamReaderValidator.java0000644000000000000000000002656611131637470031770 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.util; import org.apache.axiom.om.OMException; import org.apache.axiom.om.OMXMLStreamReader; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import javax.activation.DataHandler; import javax.xml.namespace.NamespaceContext; import javax.xml.namespace.QName; import javax.xml.stream.Location; import javax.xml.stream.XMLStreamConstants; import javax.xml.stream.XMLStreamException; import java.util.Stack; /** * There are several places in the code where events are passed from * a source to a consumer using XMLStreamReader events. * * OMXMLStreamReader (impl)--> consumer of XMLStreamReader events * * This simple class can be interjected as a filter and used to do some simple validation. * Validating the events coming from source (impl) can help find and correct errors * when they occur. Otherwise the errors may be caught much further downstream and hard to fix. * * OMXMLStreamReader (impl)--> OMXMLStreamReaderValiator-> consumer of XMLStreamReader events * * * In the initial version, the XMStreamValidator ensures that the start element events match the * end element events. * */ public class OMXMLStreamReaderValidator implements OMXMLStreamReader { private static Log log = LogFactory.getLog(OMXMLStreamReaderValidator.class); private static boolean IS_DEBUG_ENABLED = log.isDebugEnabled(); private static boolean IS_ADV_DEBUG_ENABLED = false; // Turn this on to trace every event private final OMXMLStreamReader delegate; // Actual XMLStreamReader implementation private boolean throwExceptions = false; // Indicates whether OMException should be thrown if errors are disovered private Stack stack = new Stack(); // Stack keeps track of the nested element QName /** * @param delegate XMLStreamReader to validate * @param throwExceptions (true if exceptions should be thrown when errors are encountered) */ public OMXMLStreamReaderValidator(OMXMLStreamReader delegate, boolean throwExceptions) { super(); this.delegate = delegate; this.throwExceptions = throwExceptions; } public int next() throws XMLStreamException { int event = delegate.next(); logParserState(); // Make sure that the start element and end element events match. // Mismatched events are a key indication that the delegate stream reader is // broken or corrupted. switch (event) { case XMLStreamConstants.START_ELEMENT: stack.push(delegate.getName()); break; case XMLStreamConstants.END_ELEMENT: QName delegateQName = delegate.getName(); if (stack.isEmpty()) { reportMismatchedEndElement(null, delegateQName); } else { QName expectedQName = (QName) stack.pop(); if (!expectedQName.equals(delegateQName)) { reportMismatchedEndElement(expectedQName, delegateQName); } } break; default : } return event; } /** * Report a mismatched end element. * @param expectedQName * @param delegateQName */ private void reportMismatchedEndElement(QName expectedQName, QName delegateQName) { String text = null; if (expectedQName == null) { text = "An END_ELEMENT event for " + delegateQName + " was encountered, but the START_ELEMENT stack is empty."; } else { text = "An END_ELEMENT event for " + delegateQName + " was encountered. But this does match the corresponding START_ELEMENT " + expectedQName + " event."; } if (IS_DEBUG_ENABLED) { log.debug(text); } if (throwExceptions) { throw new OMException(text); } } public void close() throws XMLStreamException { delegate.close(); } public int getAttributeCount() { return delegate.getAttributeCount(); } public String getAttributeLocalName(int arg0) { return delegate.getAttributeLocalName(arg0); } public QName getAttributeName(int arg0) { return delegate.getAttributeName(arg0); } public String getAttributeNamespace(int arg0) { return delegate.getAttributeNamespace(arg0); } public String getAttributePrefix(int arg0) { return delegate.getAttributePrefix(arg0); } public String getAttributeType(int arg0) { return delegate.getAttributeType(arg0); } public String getAttributeValue(int arg0) { return delegate.getAttributeValue(arg0); } public String getAttributeValue(String arg0, String arg1) { return delegate.getAttributeValue(arg0, arg1); } public String getCharacterEncodingScheme() { return delegate.getCharacterEncodingScheme(); } public String getElementText() throws XMLStreamException { return delegate.getElementText(); } public String getEncoding() { return delegate.getEncoding(); } public int getEventType() { return delegate.getEventType(); } public String getLocalName() { return delegate.getLocalName(); } public Location getLocation() { return delegate.getLocation(); } public QName getName() { return delegate.getName(); } public NamespaceContext getNamespaceContext() { return delegate.getNamespaceContext(); } public int getNamespaceCount() { return delegate.getNamespaceCount(); } public String getNamespacePrefix(int arg0) { return delegate.getNamespacePrefix(arg0); } public String getNamespaceURI() { return delegate.getNamespaceURI(); } public String getNamespaceURI(int arg0) { return delegate.getNamespaceURI(arg0); } public String getNamespaceURI(String arg0) { return delegate.getNamespaceURI(arg0); } public String getPIData() { return delegate.getPIData(); } public String getPITarget() { return delegate.getPITarget(); } public String getPrefix() { return delegate.getPrefix(); } public Object getProperty(String arg0) throws IllegalArgumentException { return delegate.getProperty(arg0); } public String getText() { return delegate.getText(); } public char[] getTextCharacters() { return delegate.getTextCharacters(); } public int getTextCharacters(int arg0, char[] arg1, int arg2, int arg3) throws XMLStreamException { return delegate.getTextCharacters(arg0, arg1, arg2, arg3); } public int getTextLength() { return delegate.getTextLength(); } public int getTextStart() { return delegate.getTextStart(); } public String getVersion() { return delegate.getVersion(); } public boolean hasName() { return delegate.hasName(); } public boolean hasNext() throws XMLStreamException { return delegate.hasNext(); } public boolean hasText() { return delegate.hasText(); } public boolean isAttributeSpecified(int arg0) { return delegate.isAttributeSpecified(arg0); } public boolean isCharacters() { return delegate.isCharacters(); } public boolean isEndElement() { return delegate.isEndElement(); } public boolean isStandalone() { return delegate.isStandalone(); } public boolean isStartElement() { return delegate.isStartElement(); } public boolean isWhiteSpace() { return delegate.isWhiteSpace(); } public int nextTag() throws XMLStreamException { return delegate.nextTag(); } public void require(int arg0, String arg1, String arg2) throws XMLStreamException { delegate.require(arg0, arg1, arg2); } public boolean standaloneSet() { return delegate.standaloneSet(); } /** * Dump the current event of the delegate. */ protected void logParserState() { if (IS_ADV_DEBUG_ENABLED) { int currentEvent = delegate.getEventType(); switch (currentEvent) { case XMLStreamConstants.START_ELEMENT: log.trace("START_ELEMENT: "); log.trace(" QName: " + delegate.getName()); break; case XMLStreamConstants.START_DOCUMENT: log.trace("START_DOCUMENT: "); break; case XMLStreamConstants.CHARACTERS: log.trace("CHARACTERS: "); log.trace( "[" + delegate.getText() + "]"); break; case XMLStreamConstants.CDATA: log.trace("CDATA: "); log.trace( "[" + delegate.getText() + "]"); break; case XMLStreamConstants.END_ELEMENT: log.trace("END_ELEMENT: "); log.trace(" QName: " + delegate.getName()); break; case XMLStreamConstants.END_DOCUMENT: log.trace("END_DOCUMENT: "); break; case XMLStreamConstants.SPACE: log.trace("SPACE: "); log.trace( "[" + delegate.getText() + "]"); break; case XMLStreamConstants.COMMENT: log.trace("COMMENT: "); log.trace( "[" + delegate.getText() + "]"); break; case XMLStreamConstants.DTD: log.trace("DTD: "); log.trace( "[" + delegate.getText() + "]"); break; case XMLStreamConstants.PROCESSING_INSTRUCTION: log.trace("PROCESSING_INSTRUCTION: "); log.trace(" [" + delegate.getPITarget() + "][" + delegate.getPIData() + "]"); break; case XMLStreamConstants.ENTITY_REFERENCE: log.trace("ENTITY_REFERENCE: "); log.trace(" " + delegate.getLocalName() + "[" + delegate.getText() + "]"); break; default : log.trace("UNKNOWN_STATE: " + currentEvent); } } } public DataHandler getDataHandler(String blobcid) { return delegate.getDataHandler(blobcid); } public boolean isInlineMTOM() { return delegate.isInlineMTOM(); } public void setInlineMTOM(boolean value) { delegate.setInlineMTOM(value); } } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/OMOutputFormat.java0000644000000000000000000002612111131637470026642 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om; import java.util.HashMap; import org.apache.axiom.om.impl.MTOMConstants; import org.apache.axiom.om.util.UUIDGenerator; import org.apache.axiom.soap.SOAP11Constants; import org.apache.axiom.soap.SOAP12Constants; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; /** * Formats options for OM Output. *

* Setting of all the properties in a OMOutputFormat should be done before calling the * getContentType() method. It is advised to set all the properties at the creation time of the * OMOutputFormat and not to change them later. */ public class OMOutputFormat { private static Log log = LogFactory.getLog(OMOutputFormat.class); private String mimeBoundary = null; private String rootContentId = null; private int nextid = 0; private boolean doOptimize = false; private boolean doingSWA = false; private boolean isSoap11 = true; private int optimizedThreshold = 0; /** Field DEFAULT_CHAR_SET_ENCODING. Specifies the default character encoding scheme to be used. */ public static final String DEFAULT_CHAR_SET_ENCODING = "utf-8"; private String charSetEncoding; private String xmlVersion; private String contentType; private boolean ignoreXMLDeclaration = false; private boolean autoCloseWriter = false; public static final String ACTION_PROPERTY = "action"; // The value of this property is a Boolean. // A missing value indicates the default action, which is Boolean.FALSE // If Boolean.TRUE, attachments that are "non textual" are written out with // a content-transfer-encoding type of base64. // @See CommonUtils.isTextualPart for the textual part definition. // // Example: // An attachment with a content-type of "image/gif" is a non-textual attachment. // An attachment with a content-type of "application/soap+xml" is an textual attachment // public static final String USE_CTE_BASE64_FOR_NON_TEXTUAL_ATTACHMENTS = "org.apache.axiom.om.OMFormat.use.cteBase64.forNonTextualAttachments"; HashMap map = null; // Map of generic properties public OMOutputFormat() { } /** * @param key String * @return property or null */ public Object getProperty(String key) { if (map == null) { return null; } return map.get(key); } /** * @param key String * @param value Object * @return old value or null */ public Object setProperty(String key, Object value) { if (map == null) { map = new HashMap(); } return map.put(key, value); } /** * @param key * @return true if known key */ public boolean containsKey(String key) { if (map == null) { return false; } return map.containsKey(key); } public boolean isOptimized() { return doOptimize && !doingSWA; // optimize is disabled if SWA } /** * Return the content-type value that should be written with the message. * (i.e. if optimized, then a multipart/related content-type is returned). * @return content-type value */ public String getContentType() { String ct = null; if (log.isDebugEnabled()) { log.debug("Start getContentType: " + toString()); } if (contentType == null) { if (isSoap11) { contentType = SOAP11Constants.SOAP_11_CONTENT_TYPE; } else { contentType = SOAP12Constants.SOAP_12_CONTENT_TYPE; } } // If MTOM or SWA, the returned content-type is an // appropriate multipart/related content type. if (isOptimized()) { if (isDoingSWA()) { // If both optimized and SWA, then prefer SWA // for the content type ct = this.getContentTypeForSwA(contentType); } else { // Optimized without SWA is MTOM ct = this.getContentTypeForMTOM(contentType); } } else if (isDoingSWA()) { ct = this.getContentTypeForSwA(contentType); } else { ct = contentType; } if (log.isDebugEnabled()) { log.debug("getContentType= {" + ct + "} " + toString()); } return ct; } /** * Set a raw content-type * (i.e. "text/xml" (SOAP 1.1) or "application/xml" (REST)) * If this method is not invoked, OMOutputFormat will choose * a content-type value consistent with the soap version. * @param c */ public void setContentType(String c) { contentType = c; } public String getMimeBoundary() { if (mimeBoundary == null) { mimeBoundary = "MIMEBoundary" + UUIDGenerator.getUUID().replace(':', '_'); } return mimeBoundary; } public String getRootContentId() { if (rootContentId == null) { rootContentId = "0." + UUIDGenerator.getUUID() + "@apache.org"; } return rootContentId; } public String getNextContentId() { nextid++; return nextid + "." + UUIDGenerator.getUUID() + "@apache.org"; } /** * Returns the character set encoding scheme. If the value of the charSetEncoding is not set * then the default will be returned. * * @return Returns encoding string. */ public String getCharSetEncoding() { return this.charSetEncoding; } public void setCharSetEncoding(String charSetEncoding) { this.charSetEncoding = charSetEncoding; } public String getXmlVersion() { return xmlVersion; } public void setXmlVersion(String xmlVersion) { this.xmlVersion = xmlVersion; } public void setSOAP11(boolean b) { isSoap11 = b; } public boolean isSOAP11() { return isSoap11; } public boolean isIgnoreXMLDeclaration() { return ignoreXMLDeclaration; } public void setIgnoreXMLDeclaration(boolean ignoreXMLDeclaration) { this.ignoreXMLDeclaration = ignoreXMLDeclaration; } public void setDoOptimize(boolean b) { doOptimize = b; } public boolean isDoingSWA() { return doingSWA; } public void setDoingSWA(boolean doingSWA) { this.doingSWA = doingSWA; } /** * Generates a Content-Type value for MTOM messages. This is a MIME Multipart/Related * Content-Type value as defined by RFC 2387 and the XOP specification. The generated * header will look like the following: * * Content-Type: multipart/related; boundary=[MIME BOUNDARY VALUE]; * type="application/xop+xml"; * start="[MESSAGE CONTENT ID]"; * start-info="[MESSAGE CONTENT TYPE]"; * * @param SOAPContentType * @return */ public String getContentTypeForMTOM(String SOAPContentType) { // If an action was set, we need to include it within the value // for the start-info attribute. if (containsKey(ACTION_PROPERTY)) { String action = (String) getProperty(ACTION_PROPERTY); if (action != null && action.length() > 0) { SOAPContentType = SOAPContentType + "; action=\\\"" + action + "\\\""; } } StringBuffer sb = new StringBuffer(); sb.append("multipart/related"); sb.append("; "); sb.append("boundary="); sb.append(getMimeBoundary()); sb.append("; "); sb.append("type=\"" + MTOMConstants.MTOM_TYPE + "\""); sb.append("; "); sb.append("start=\"<").append(getRootContentId()).append(">\""); sb.append("; "); sb.append("start-info=\"").append(SOAPContentType).append("\""); return sb.toString(); } public String getContentTypeForSwA(String SOAPContentType) { StringBuffer sb = new StringBuffer(); sb.append("multipart/related"); sb.append("; "); sb.append("boundary="); sb.append(getMimeBoundary()); sb.append("; "); sb.append("type=\"").append(SOAPContentType).append("\""); sb.append("; "); sb.append("start=\"<").append(getRootContentId()).append(">\""); return sb.toString(); } public boolean isAutoCloseWriter() { return autoCloseWriter; } public void setAutoCloseWriter(boolean autoCloseWriter) { this.autoCloseWriter = autoCloseWriter; } public void setMimeBoundary(String mimeBoundary) { this.mimeBoundary = mimeBoundary; } public void setRootContentId(String rootContentId) { this.rootContentId = rootContentId; } /** * Use toString for logging state of the OMOutputFormat */ public String toString() { StringBuffer sb = new StringBuffer(); sb.append("OMOutputFormat ["); sb.append(" mimeBoundary ="); sb.append(mimeBoundary); sb.append(" rootContentId="); sb.append(rootContentId); sb.append(" doOptimize="); sb.append(doOptimize); sb.append(" doingSWA="); sb.append(doingSWA); sb.append(" isSOAP11="); sb.append(isSoap11); sb.append(" charSetEncoding="); sb.append(charSetEncoding); sb.append(" xmlVersion="); sb.append(xmlVersion); sb.append(" contentType="); sb.append(contentType); sb.append(" ignoreXmlDeclaration="); sb.append(ignoreXMLDeclaration); sb.append(" autoCloseWriter="); sb.append(autoCloseWriter); // TODO Print all properties sb.append(" actionProperty="); sb.append(getProperty(ACTION_PROPERTY)); sb.append(" optimizedThreshold="); sb.append(optimizedThreshold); sb.append("]"); return sb.toString(); } public void setOptimizedThreshold(int optimizedThreshold) { this.optimizedThreshold = optimizedThreshold; } public int getOptimizedThreshold() { return optimizedThreshold; } } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/OMException.java0000644000000000000000000000300211131637470026120 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om; /** Class OMException */ public class OMException extends RuntimeException { private static final long serialVersionUID = -730218408325095333L; /** Constructor OMException */ public OMException() { } /** * Constructor OMException * * @param message */ public OMException(String message) { super(message); } /** * Constructor OMException * * @param message * @param cause */ public OMException(String message, Throwable cause) { super(message, cause); } /** * Constructor OMException * * @param cause */ public OMException(Throwable cause) { super(cause); } } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/OMProcessingInstruction.java0000644000000000000000000000267111131637470030553 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om; /** Interface OMProcessingInstruction */ public interface OMProcessingInstruction extends OMNode { /** * Sets the target of this Processing Instruction. * * @param target */ void setTarget(String target); /** * Gets the target of this Processing Instruction. * * @return Returns string. */ String getTarget(); /** * Sets the value of this Processing Instruction. * * @param value */ void setValue(String value); /** * Gets the value of this Processing Instruction. * * @return Returns String. */ String getValue(); } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/OMImplementation.java0000644000000000000000000000471411131637470027162 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om; import org.apache.axiom.soap.SOAPFactory; /** * Abstract class encapsulating a particular object model. * It provides instances for plain XML, SOAP 1.1 and SOAP 1.2 object model factories for the * given object model implementation. Currently the two OM implementations provided by * Axiom are LLOM (linked list) and DOM. *

* The factories returned by {@link #getOMFactory()}, {@link #getSOAP11Factory()} and * {@link #getSOAP12Factory()} might be stateless (and thread safe) or not. In the former * case the implementation should return the same instance on every invocation, i.e. * instantiate the factory for each OM type only once. In the latter case, the implementation * must return a new instance on every invocation. In order to work with any OM implementation, * code using an implementation of this class must call the relevant method once and only once * for every document processed. */ // NOTE: It is intentional that this is implemented as an abstract class rather than an interface. // Probably there will be a static getInstance() method in the future. public abstract class OMImplementation { /** * Get an OM factory instance for the XML infoset model. * * @return the OM factory instance */ public abstract OMFactory getOMFactory(); /** * Get an OM factory instance for the SOAP 1.1 infoset model. * * @return the OM factory instance */ public abstract SOAPFactory getSOAP11Factory(); /** * Get an OM factory instance for the SOAP 1.2 infoset model. * * @return the OM factory instance */ public abstract SOAPFactory getSOAP12Factory(); } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/OMDocType.java0000644000000000000000000000221511131637470025536 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om; /** Interface OMDocType */ public interface OMDocType extends OMNode { /** * Returns the value of this DocType. * * @return Returns String. */ String getValue(); /** * Sets the content of this DocType to the specified string. * * @param text */ void setValue(String text); } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/OMNode.java0000644000000000000000000002134311131637470025057 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om; import javax.xml.stream.XMLStreamConstants; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamWriter; import java.io.OutputStream; import java.io.Writer; /** * Defines the base interface used by most of the XML object model within Axis. *

*

* This tree model for XML captures the idea of deferring the construction of child nodes until they * are needed. The isComplete function identifies whether or not a particular node has * been fully parsed. A node may not be fully parsed, for example, if all of the children of an * element have not yet been parsed.

*

*

* In comparison to DOM, in this model, you will not find document fragments, or entities. In * addition, while {@link OMDocument} and {@link OMAttribute} exist, neither is an extension of * OMNode.

*/ public interface OMNode { /** * The node is an Element. * * @see #getType() */ static final short ELEMENT_NODE = 1; /** * The node is a Text node. * * @see #getType() */ static final short TEXT_NODE = XMLStreamConstants.CHARACTERS; /** * The node is a CDATASection. * * @see #getType() */ static final short CDATA_SECTION_NODE = XMLStreamConstants.CDATA; /** * The node is a Comment. * * @see #getType() */ static final short COMMENT_NODE = XMLStreamConstants.COMMENT; /** * This node is a DTD. * * @see #getType() */ static final short DTD_NODE = XMLStreamConstants.DTD; /** * This node is a ProcessingInstruction. * * @see #getType() */ static final short PI_NODE = XMLStreamConstants.PROCESSING_INSTRUCTION; /** * This node is an Entity Reference. * * @see #getType() */ static final short ENTITY_REFERENCE_NODE = XMLStreamConstants.ENTITY_REFERENCE; /** * This node is an Entity Reference. * * @see #getType() */ static final short SPACE_NODE = XMLStreamConstants.SPACE; /** * Returns the parent containing node. *

*

* Returns the parent container, which may be either an {@link OMDocument} or {@link OMElement}. * * @return The {@link OMContainer} of the node. */ OMContainer getParent(); /** * Returns the next sibling in document order. * * @return Returns the next sibling in document order. */ OMNode getNextOMSibling() throws OMException; /** * Indicates whether parser has parsed this information item completely or not. If some info are * not available in the item, one has to check this attribute to make sure that, this item has been * parsed completely or not. * * @return Returns boolean. */ boolean isComplete(); /** * Removes a node (and all of its children) from its containing parent. *

*

* Removes a node from its parent. Partially complete nodes will be completed before they are * detached from the model. A node cannot be detached until its next sibling has been identified, * so that the next sibling and parent can be updated appropriately. Please note that this will not * handle the namespaces. For example, if there you have used a namespace within the detaching node * and which is defined outside the detaching node, user has to handle it manually.

* * @throws OMException If a node is not complete, the detach can trigger further parsing, which may * cause an exception. */ OMNode detach() throws OMException; /** * Discards a node. *

*

* Discard goes to the parser level and if the element is not completely built, then it will be * completely skipped at the parser level.

* * @throws OMException */ void discard() throws OMException; /** * Inserts a new sibling after the current node. * * @param sibling The node that will be added after the current node. * @throws OMException */ void insertSiblingAfter(OMNode sibling) throws OMException; /** * Inserts a sibling just before the current node. * * @param sibling The node that will be added before the current node. * @throws OMException */ void insertSiblingBefore(OMNode sibling) throws OMException; /** * Returns the type of node. * * @return Returns one of {@link #ELEMENT_NODE}, {@link #TEXT_NODE}, {@link #CDATA_SECTION_NODE}, * {@link #COMMENT_NODE}, {@link #DTD_NODE}, {@link #PI_NODE}, {@link * #ENTITY_REFERENCE_NODE}, {@link #SPACE_NODE}, or {@link #TEXT_NODE}. */ int getType(); /** * Gets the previous sibling. * * @return Returns node. */ OMNode getPreviousOMSibling(); /** * Serializes the node with caching. * * @param xmlWriter * @throws XMLStreamException */ void serialize(XMLStreamWriter xmlWriter) throws XMLStreamException; /** * Serializes the node with caching. * * @param output * @throws XMLStreamException */ void serialize(OutputStream output) throws XMLStreamException; /** * Serializes the node with caching. * * @param writer * @throws XMLStreamException */ void serialize(Writer writer) throws XMLStreamException; /** * Serializes the node with caching. * * @param output * @param format * @throws XMLStreamException */ void serialize(OutputStream output, OMOutputFormat format) throws XMLStreamException; /** * Serializes the node with caching. * * @param writer * @param format * @throws XMLStreamException */ void serialize(Writer writer, OMOutputFormat format) throws XMLStreamException; /** * Serializes the node without caching. * * @param xmlWriter * @throws XMLStreamException */ void serializeAndConsume(XMLStreamWriter xmlWriter) throws XMLStreamException; /** * Serializes the node without caching. * * @param output * @throws XMLStreamException */ void serializeAndConsume(OutputStream output) throws XMLStreamException; /** * Serializes the node without caching. * * @param writer * @throws XMLStreamException */ void serializeAndConsume(Writer writer) throws XMLStreamException; /** * Serializes the node without caching. * * @param output * @param format * @throws XMLStreamException */ void serializeAndConsume(OutputStream output, OMOutputFormat format) throws XMLStreamException; /** * Serializes the node without caching. * * @param writer * @param format * @throws XMLStreamException */ void serializeAndConsume(Writer writer, OMOutputFormat format) throws XMLStreamException; /** Builds itself. */ void build(); /** * Builds itself with the OMText binary content. AXIOM supports two levels of deffered building. * First is deffered building of AXIOM using StAX. Second level is the deffered building of * attachments. AXIOM reads in the attachements from the stream only when user asks by calling * getDataHandler(). build() method builds the OM without the attachments. buildAll() builds the OM * together with attachement data. This becomes handy when user wants to free the input stream. */ void buildWithAttachments(); /** * If a builder and parser is associated with the node, it is closed. * @param build if true, the object is built first before closing the builder/parser */ void close(boolean build); /** * Returns the OMFactory that created this object */ OMFactory getOMFactory(); } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/OMDataSourceExt.java0000644000000000000000000001332211131637470026703 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import javax.xml.stream.XMLStreamWriter; import java.io.InputStream; import java.io.OutputStream; import java.io.UnsupportedEncodingException; import java.io.Writer; /** * Interface to a backing object that can can be read and written as XML. * * To plug an arbitrary object into an OM tree. Follow these steps * 1) Provide a class that implements OMDataSourceExt. * 2) Use OMFactory.createOMElement(OMDataSource, String, OMNamespace) to build an * OMSourcedElement. * 3) Add the OMSourcedElement to the OM tree. * * OMDataSourceExt provides additional methods that are not available on the * original OMDataSource. * * @see OMDataSource * @see OMSourceElementImpl */ public interface OMDataSourceExt extends OMDataSource { /* Property lossyPrefix * Value null or Boolean.TRUE or Boolean.FALSE * If Boolean.TRUE, this indicates that expansion is needed to * obtain the actual prefix name. */ public static final String LOSSY_PREFIX = "lossyPrefix"; /** * Serializes element data directly to stream. * Assumes that the backing object is destroyed during serialization if isDestructiveWrite * @see OMDataSourceExt * * @param output destination stream for element XML text * @param format Output format information. The implementation must use this information * to choose the correct character set encoding when writing to the * output stream. This parameter must not be null. * @throws XMLStreamException */ public void serialize(OutputStream output, OMOutputFormat format) throws XMLStreamException; /** * Serializes element data directly to writer. * Assumes that the backing object is destroyed during serialization isDestructiveWrite * @see OMDataSourceExt * * @param writer destination writer for element XML text * @param format output format information (null if none; may * be ignored if not supported by data binding even if supplied) * @throws XMLStreamException */ public void serialize(Writer writer, OMOutputFormat format) throws XMLStreamException; /** * Serializes element data directly to StAX writer. * Assumes that the backing object is destroyed during serialization isDestructiveWrite * @see OMDataSourceExt * * @param xmlWriter destination writer * @throws XMLStreamException */ public void serialize(XMLStreamWriter xmlWriter) throws XMLStreamException; /** * Get parser for element data. In the general case this may require the * data source to serialize data as XML text and then parse that text. * * @return element parser * @throws XMLStreamException */ public XMLStreamReader getReader() throws XMLStreamException; /** * Returns the backing Object. * @return Object */ public Object getObject(); /** * Returns true if reading the backing object is destructive. * An example of an object with a destructive read is an InputSteam. * The owning OMSourcedElement uses this information to detemine if OM tree * expansion is needed when reading the OMDataSourceExt. * @return boolean */ public boolean isDestructiveRead(); /** * Returns true if writing the backing object is destructive. * An example of an object with a destructive write is an InputStream. * The owning OMSourcedElement uses this information to detemine if OM tree * expansion is needed when writing the OMDataSourceExt. * @return boolean */ public boolean isDestructiveWrite(); /** * Returns a InputStream representing the xml data * @param encoding String encoding of InputStream * @return InputStream */ public InputStream getXMLInputStream(String encoding) throws UnsupportedEncodingException; /** * Returns a byte[] representing the xml data * @param encoding String encoding of InputStream * @return byte[] * @see getXMLInputStream */ public byte[] getXMLBytes(String encoding) throws UnsupportedEncodingException; /** * Close the DataSource and free its resources. */ public void close(); /** * Create a copy of the OMDataSourceExt * @return OMDataSourceExt */ public OMDataSourceExt copy(); /** * Returns true if property is set * @param key * @return */ public boolean hasProperty(String key); /** * Query a property stored on the OMDataSource * @param key * @return value or null */ public Object getProperty(String key); /** * Set a property on the OMDataSource * @param key * @param value * @return old property object or null */ public Object setProperty(String key, Object value); } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/0000755000000000000000000000000011131637466024036 5ustar rootrootaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/MTOMConstants.java0000644000000000000000000000267311131637466027362 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl; public interface MTOMConstants { public static final String XOP_INCLUDE = "Include"; public static final String XOP_NAMESPACE_URI = "http://www.w3.org/2004/08/xop/include"; /** If the Message is MTOM optimised then MTOM_TYPE */ String MTOM_TYPE = "application/xop+xml"; /** If the message is Soap with Attachments SWA_TYPE */ String SWA_TYPE = "text/xml"; String SWA_TYPE_12 = "application/soap+xml"; /** rootPart is used as the key for the root BodyPart in the Parts HashMap */ String ROOT_PART = "SoapPart"; String ATTACHMENTS = "Attachments"; } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/OMContainerEx.java0000644000000000000000000000276111131637466027362 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl; import org.apache.axiom.om.OMContainer; import org.apache.axiom.om.OMNode; /** * Interface OMContainerEx *

* Internal Implementation detail. Adding special interface to stop folks from accidently using * OMContainer. Please use at your own risk. May corrupt the data integrity. */ public interface OMContainerEx extends OMContainer { public void setComplete(boolean state); /** * forcefully set the first element in this parent element * @param omNode */ public void setFirstChild(OMNode omNode); /** * forcefully set the last element in this parent element * @param omNode */ public void setLastChild(OMNode omNode); } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/jaxp/0000755000000000000000000000000011131637464024776 5ustar rootrootaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/jaxp/OMResult.java0000644000000000000000000000267411131637464027364 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.jaxp; import javax.xml.transform.sax.SAXResult; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.impl.builder.SAXOMBuilder; /** * Implementation of {@link javax.xml.transform.Result} for AXIOM. * The implementation is based on {@link SAXResult} and transforms the stream * of SAX events to an AXIOM tree using {@link SAXOMBuilder}. */ public class OMResult extends SAXResult { private final SAXOMBuilder builder; public OMResult() { builder = new SAXOMBuilder(); setHandler(builder); } public OMElement getRootElement() { return builder.getRootElement(); } } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/jaxp/OMSource.java0000644000000000000000000000255211131637464027341 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.jaxp; import javax.xml.transform.sax.SAXSource; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.impl.serialize.OMXMLReader; import org.xml.sax.InputSource; /** * Implementation of {@link javax.xml.transform.Source} for AXIOM. * The implementation is based on {@link SAXSource} and directly transforms an AXIOM * tree into a stream of SAX events using {@link OMXMLReader}. */ public class OMSource extends SAXSource { public OMSource(OMElement element) { super(new OMXMLReader(element), new InputSource()); } } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/EmptyOMLocation.java0000644000000000000000000000313611131637466027727 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl; import javax.xml.stream.Location; public class EmptyOMLocation implements Location { public int getLineNumber() { return -1; //To change body of implemented methods use File | Settings | File Templates. } public int getColumnNumber() { return -1; //To change body of implemented methods use File | Settings | File Templates. } public int getCharacterOffset() { return 0; //To change body of implemented methods use File | Settings | File Templates. } public String getPublicId() { return null; //To change body of implemented methods use File | Settings | File Templates. } public String getSystemId() { return null; //To change body of implemented methods use File | Settings | File Templates. } } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/MIMEOutputUtils.java0000644000000000000000000005056411131637466027704 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl; import java.io.IOException; import java.io.OutputStream; import java.io.StringWriter; import java.util.Iterator; import java.util.LinkedList; import java.util.Map; import javax.activation.DataHandler; import javax.mail.MessagingException; import javax.mail.internet.MimeBodyPart; import org.apache.axiom.attachments.Attachments; import org.apache.axiom.attachments.ConfigurableDataHandler; import org.apache.axiom.attachments.ByteArrayDataSource; import org.apache.axiom.om.OMException; import org.apache.axiom.om.OMOutputFormat; import org.apache.axiom.om.OMText; import org.apache.axiom.om.util.CommonUtils; import org.apache.axiom.soap.SOAP11Constants; import org.apache.axiom.soap.SOAP12Constants; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; /** * Utility class used to write out XML with Attachments * @See MTOMXMLStreamWriter * */ public class MIMEOutputUtils { private static Log log = LogFactory.getLog(MIMEOutputUtils.class); private static boolean isDebugEnabled = log.isDebugEnabled(); private static byte[] CRLF = { 13, 10 }; /** * @deprecated is anyone really using this? * * Invoked by MTOMXMLStreamWriter to write the SOAP Part and the attachemts * @param outStream OutputStream target * @param bufferedXML String containing XML of SOAPPart * @param binaryNodeList Text nodes with the attachment Data Handlers * @param boundary Boundary String * @param contentId Content-ID of SOAPPart * @param charSetEncoding Character Encoding of SOAPPart * @param SOAPContentType Content-Type of SOAPPart */ public static void complete(OutputStream outStream, String bufferedXML, LinkedList binaryNodeList, String boundary, String contentId, String charSetEncoding, String SOAPContentType) { try { // TODO: Instead of buffering the SOAPPart contents, it makes more // sense to split this method in two. Write out the SOAPPart headers // and later write out the attachments. This will avoid the cost and // space of buffering. // Write out the mime boundary startWritingMime(outStream, boundary); javax.activation.DataHandler dh = new javax.activation.DataHandler(bufferedXML, "text/xml; charset=" + charSetEncoding); MimeBodyPart rootMimeBodyPart = new MimeBodyPart(); rootMimeBodyPart.setDataHandler(dh); rootMimeBodyPart.addHeader("Content-Type", "application/xop+xml; charset=" + charSetEncoding + "; type=\"" + SOAPContentType + "\""); rootMimeBodyPart.addHeader("Content-Transfer-Encoding", "binary"); rootMimeBodyPart.addHeader("Content-ID", "<" + contentId + ">"); // Write out the SOAPPart writeBodyPart(outStream, rootMimeBodyPart, boundary); // Now write out the Attachment parts (which are represented by the // text nodes int the binary node list) Iterator binaryNodeIterator = binaryNodeList.iterator(); while (binaryNodeIterator.hasNext()) { OMText binaryNode = (OMText) binaryNodeIterator.next(); writeBodyPart(outStream, createMimeBodyPart(binaryNode .getContentID(), (DataHandler) binaryNode .getDataHandler()), boundary); } finishWritingMime(outStream); outStream.flush(); } catch (IOException e) { throw new OMException("Error while writing to the OutputStream.", e); } catch (MessagingException e) { throw new OMException("Problem writing Mime Parts.", e); } } /** * Invoked by MTOMXMLStreamWriter to write the SOAP Part and the attachements. * * @param outStream OutputStream target * @param bufferedXML String containing XML of SOAPPart * @param binaryNodeList Text nodes with the attachment Data Handlers * @param boundary Boundary String * @param contentId Content-ID of SOAPPart * @param charSetEncoding Character Encoding of SOAPPart * @param SOAPContentType Content-Type of SOAPPart */ public static void complete(OutputStream outStream, byte[] xmlData, LinkedList binaryNodeList, String boundary, String contentId, String charSetEncoding, String SOAPContentType) { complete(outStream, xmlData, binaryNodeList, boundary, contentId, charSetEncoding, SOAPContentType, null); } /** * Invoked by MTOMXMLStreamWriter to write the SOAP Part and the attachements. * * @param outStream OutputStream target * @param bufferedXML String containing XML of SOAPPart * @param binaryNodeList Text nodes with the attachment Data Handlers * @param boundary Boundary String * @param contentId Content-ID of SOAPPart * @param charSetEncoding Character Encoding of SOAPPart * @param SOAPContentType Content-Type of SOAPPart * @param OMOutputFormat */ public static void complete(OutputStream outStream, byte[] xmlData, LinkedList binaryNodeList, String boundary, String contentId, String charSetEncoding, String SOAPContentType, OMOutputFormat omOutputFormat) { try { if (isDebugEnabled) { log.debug("Start: write the SOAPPart and the attachments"); } // TODO: Instead of buffering the SOAPPart contents, it makes more // sense to split this method in two. Write out the SOAPPart headers // and later write out the attachments. This will avoid the cost and // space of buffering. // Write out the mime boundary startWritingMime(outStream, boundary); javax.activation.DataHandler dh = new javax.activation.DataHandler(new ByteArrayDataSource(xmlData, "text/xml; charset=" + charSetEncoding)); MimeBodyPart rootMimeBodyPart = new MimeBodyPart(); rootMimeBodyPart.setDataHandler(dh); rootMimeBodyPart.addHeader("Content-Type", "application/xop+xml; charset=" + charSetEncoding + "; type=\"" + SOAPContentType + "\""); rootMimeBodyPart.addHeader("Content-Transfer-Encoding", "binary"); rootMimeBodyPart.addHeader("Content-ID", "<" + contentId + ">"); // Write out the SOAPPart writeBodyPart(outStream, rootMimeBodyPart, boundary); // Now write out the Attachment parts (which are represented by the // text nodes int the binary node list) Iterator binaryNodeIterator = binaryNodeList.iterator(); while (binaryNodeIterator.hasNext()) { OMText binaryNode = (OMText) binaryNodeIterator.next(); writeBodyPart(outStream, createMimeBodyPart(binaryNode .getContentID(), (DataHandler) binaryNode .getDataHandler(), omOutputFormat), boundary); } finishWritingMime(outStream); outStream.flush(); if (isDebugEnabled) { log.debug("End: write the SOAPPart and the attachments"); } } catch (IOException e) { throw new OMException("Error while writing to the OutputStream.", e); } catch (MessagingException e) { throw new OMException("Problem writing Mime Parts.", e); } } /** * @deprecated - is anyone really using this? * * Write the SOAPPart and attachments * @param outStream * @param writer * @param binaryNodeList * @param boundary * @param contentId * @param charSetEncoding * @param SOAPContentType */ public static void complete(OutputStream outStream, StringWriter writer, LinkedList binaryNodeList, String boundary, String contentId, String charSetEncoding, String SOAPContentType) { complete(outStream, writer.toString(), binaryNodeList, boundary, contentId, charSetEncoding, SOAPContentType); } public static MimeBodyPart createMimeBodyPart(String contentID, DataHandler dataHandler) throws MessagingException { return createMimeBodyPart(contentID, dataHandler, null); } public static MimeBodyPart createMimeBodyPart(String contentID, DataHandler dataHandler, OMOutputFormat omOutputFormat) throws MessagingException { String contentType = dataHandler.getContentType(); // Get the content-transfer-encoding String contentTransferEncoding = "binary"; if (dataHandler instanceof ConfigurableDataHandler) { ConfigurableDataHandler configurableDataHandler = (ConfigurableDataHandler) dataHandler; contentTransferEncoding = configurableDataHandler.getTransferEncoding(); } if (isDebugEnabled) { log.debug("Create MimeBodyPart"); log.debug(" Content-ID = " + contentID); log.debug(" Content-Type = " + contentType); log.debug(" Content-Transfer-Encoding = " + contentTransferEncoding); } boolean useCTEBase64 = omOutputFormat != null && Boolean.TRUE.equals( omOutputFormat.getProperty( OMOutputFormat.USE_CTE_BASE64_FOR_NON_TEXTUAL_ATTACHMENTS)); if (useCTEBase64) { if (!CommonUtils.isTextualPart(contentType) && "binary".equals(contentTransferEncoding)) { if (isDebugEnabled) { log.debug(" changing Content-Transfer-Encoding from " + contentTransferEncoding + " to base-64"); } contentTransferEncoding = "base64"; } } // Now create the mimeBodyPart for the datahandler and add the appropriate content headers MimeBodyPart mimeBodyPart = new MimeBodyPart(); mimeBodyPart.setDataHandler(dataHandler); mimeBodyPart.addHeader("Content-ID", "<" + contentID + ">"); mimeBodyPart.addHeader("Content-Type", contentType); mimeBodyPart.addHeader("Content-Transfer-Encoding", contentTransferEncoding); return mimeBodyPart; } /** @throws IOException This will write the boundary to output Stream */ public static void writeMimeBoundary(OutputStream outStream, String boundary) throws IOException { // REVIEW: This conversion is hard-coded to UTF-8. // The complete solution is to respect the charset setting of the message. // However this may cause problems in BoundaryDelimittedStream and other // lower level classes. outStream.write(new byte[] { 45, 45 }); outStream.write(boundary.getBytes("UTF-8")); } /** @throws IOException This will write the boundary with CRLF */ public static void startWritingMime(OutputStream outStream, String boundary) throws IOException { writeMimeBoundary(outStream, boundary); //outStream.write(CRLF); } /** * Writes a CRLF for the earlier boundary then the BodyPart data with headers followed by * boundary. Writes only the boundary. No more CRLF's are written after that. * * @throws IOException * @throws MessagingException */ public static void writeBodyPart(OutputStream outStream, MimeBodyPart part, String boundary) throws IOException, MessagingException { if (isDebugEnabled) { log.debug("Start writeMimeBodyPart for " + part.getContentID()); } outStream.write(CRLF); part.writeTo(outStream); outStream.write(CRLF); writeMimeBoundary(outStream, boundary); outStream.flush(); if (isDebugEnabled) { log.debug("End writeMimeBodyPart"); } } /** @throws IOException This will write "--" to the end of last boundary */ public static void finishWritingMime(OutputStream outStream) throws IOException { if (isDebugEnabled) { log.debug("Write --, which indicates the end of the last boundary"); } outStream.write(new byte[] { 45, 45 }); } public static void writeSOAPWithAttachmentsMessage(StringWriter writer, OutputStream outputStream, Attachments attachments, OMOutputFormat format) { String SOAPContentType; if (format.isSOAP11()) { SOAPContentType = SOAP11Constants.SOAP_11_CONTENT_TYPE; } else { SOAPContentType = SOAP12Constants.SOAP_12_CONTENT_TYPE; } String contentType = SOAPContentType + "; charset=" + format.getCharSetEncoding(); javax.activation.DataHandler dh = new javax.activation.DataHandler( writer.toString(), "text/xml; charset=" + format.getCharSetEncoding()); writeDataHandlerWithAttachmentsMessage(dh, contentType, outputStream, attachments.getMap(), format); } public static void writeDataHandlerWithAttachmentsMessage(DataHandler rootDataHandler, String contentType, OutputStream outputStream, Map attachments, OMOutputFormat format) { try { startWritingMime(outputStream, format.getMimeBoundary()); MimeBodyPart rootMimeBodyPart = new MimeBodyPart(); rootMimeBodyPart.setDataHandler(rootDataHandler); rootMimeBodyPart.addHeader("Content-Type", contentType); rootMimeBodyPart.addHeader("Content-Transfer-Encoding", "8bit"); rootMimeBodyPart.addHeader("Content-ID", "<" + format.getRootContentId() + ">"); writeBodyPart(outputStream, rootMimeBodyPart, format .getMimeBoundary()); Iterator iterator = attachments.keySet().iterator(); while (iterator.hasNext()) { String key = (String) iterator.next(); MimeBodyPart part = createMimeBodyPart(key, (DataHandler) attachments.get(key), format); writeBodyPart(outputStream, part, format.getMimeBoundary()); } finishWritingMime(outputStream); outputStream.flush(); } catch (IOException e) { throw new OMException("Error while writing to the OutputStream.", e); } catch (MessagingException e) { throw new OMException("Problem writing Mime Parts.", e); } } /** * Pack all the attachments in to a multipart/related MIME part and attachs it as the second * MIME Part of MIME message * * @param writer * @param outputStream * @param attachments * @param format * @param innerBoundary */ public static void writeMM7Message(StringWriter writer, OutputStream outputStream, Attachments attachments, OMOutputFormat format, String innerPartCID, String innerBoundary) { String SOAPContentType; try { if (format.isSOAP11()) { SOAPContentType = SOAP11Constants.SOAP_11_CONTENT_TYPE; } else { SOAPContentType = SOAP12Constants.SOAP_12_CONTENT_TYPE; } startWritingMime(outputStream, format.getMimeBoundary()); javax.activation.DataHandler dh = new javax.activation.DataHandler( writer.toString(), "text/xml; charset=" + format.getCharSetEncoding()); MimeBodyPart rootMimeBodyPart = new MimeBodyPart(); rootMimeBodyPart.setDataHandler(dh); rootMimeBodyPart.addHeader("Content-Type", SOAPContentType + "; charset=" + format.getCharSetEncoding()); rootMimeBodyPart.addHeader("Content-ID", "<" + format.getRootContentId() + ">"); writeBodyPart(outputStream, rootMimeBodyPart, format .getMimeBoundary()); if (attachments.getContentIDSet().size() != 0) { outputStream.write(CRLF); StringBuffer sb = new StringBuffer(); sb.append("Content-Type: multipart/related"); sb.append("; "); sb.append("boundary="); sb.append("\"" + innerBoundary + "\""); // REVIEW Should this be getBytes("UTF-8") or getBytes(charset) outputStream.write(sb.toString().getBytes()); outputStream.write(CRLF); StringBuffer sb1 = new StringBuffer(); sb1.append("Content-ID: "); sb1.append("<"); sb1.append(innerPartCID); sb1.append(">"); // REVIEW Should this be getBytes("UTF-8") or getBytes(charset) outputStream.write(sb1.toString().getBytes()); outputStream.write(CRLF); outputStream.write(CRLF); startWritingMime(outputStream, innerBoundary); Iterator attachmentIDIterator = attachments.getContentIDSet().iterator(); while (attachmentIDIterator.hasNext()) { String contentID = (String) attachmentIDIterator.next(); DataHandler dataHandler = attachments.getDataHandler(contentID); writeBodyPart(outputStream, createMimeBodyPart(contentID, dataHandler), innerBoundary); } finishWritingMime(outputStream); outputStream.write(CRLF); writeMimeBoundary(outputStream, format.getMimeBoundary()); } finishWritingMime(outputStream); outputStream.flush(); } catch (IOException e) { throw new OMException("Error while writing to the OutputStream.", e); } catch (MessagingException e) { throw new OMException("Problem writing Mime Parts.", e); } } } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/builder/0000755000000000000000000000000011131637466025464 5ustar rootrootaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/builder/SAXOMBuilder.java0000644000000000000000000002017511131637466030532 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.builder; import org.apache.axiom.om.OMAbstractFactory; import org.apache.axiom.om.OMAttribute; import org.apache.axiom.om.OMContainer; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMException; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMNode; import org.apache.axiom.om.impl.OMContainerEx; import org.apache.axiom.om.impl.OMNodeEx; import org.xml.sax.Attributes; import org.xml.sax.Locator; import org.xml.sax.SAXException; import org.xml.sax.ext.LexicalHandler; import org.xml.sax.helpers.DefaultHandler; import java.util.ArrayList; import java.util.List; public class SAXOMBuilder extends DefaultHandler implements LexicalHandler { OMElement root = null; OMNode lastNode = null; OMElement nextElem = null; OMFactory factory = OMAbstractFactory.getOMFactory(); List prefixMappings = new ArrayList(); int textNodeType = OMNode.TEXT_NODE; public void setDocumentLocator(Locator arg0) { } public void startDocument() throws SAXException { } public void endDocument() throws SAXException { } public void startDTD(String name, String publicId, String systemId) throws SAXException { } public void endDTD() throws SAXException { } protected OMElement createNextElement(String localName) throws OMException { OMElement e; if (lastNode == null) { root = e = factory.createOMElement(localName, null, null, null); } else if (lastNode.isComplete()) { e = factory.createOMElement(localName, null, lastNode.getParent(), null); ((OMNodeEx) lastNode).setNextOMSibling(e); ((OMNodeEx) e).setPreviousOMSibling(lastNode); } else { OMContainerEx parent = (OMContainerEx) lastNode; e = factory.createOMElement(localName, null, (OMElement) lastNode, null); parent.setFirstChild(e); } return e; } /* * (non-Javadoc) * * @see org.xml.sax.ContentHandler#startPrefixMapping(java.lang.String, * java.lang.String) */ public void startPrefixMapping(String prefix, String uri) throws SAXException { if (nextElem == null) nextElem = createNextElement(null); if (prefix.length() == 0) { nextElem.declareDefaultNamespace(uri); } else { nextElem.declareNamespace(uri, prefix); } } public void endPrefixMapping(String arg0) throws SAXException { } /* * (non-Javadoc) * * @see org.xml.sax.ContentHandler#startElement(java.lang.String, * java.lang.String, java.lang.String, org.xml.sax.Attributes) */ public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException { if (localName == null || localName.trim().equals("")) localName = qName.substring(qName.indexOf(':') + 1); if (nextElem == null) nextElem = createNextElement(localName); else nextElem.setLocalName(localName); nextElem.setNamespace(nextElem.findNamespace(namespaceURI, null)); int j = atts.getLength(); for (int i = 0; i < j; i++) { // Note that some SAX parsers report namespace declarations as attributes in addition // to calling start/endPrefixMapping. // NOTE: This filter was introduced to make SAXOMBuilder work with some versions of // XMLBeans (2.3.0). It is not clear whether this is a bug in XMLBeans or not. // See http://forum.springframework.org/showthread.php?t=43958 for a discussion. // If this test causes problems with other parsers, don't hesitate to remove it. if (!atts.getQName(i).startsWith("xmlns")) { OMAttribute attr = nextElem.addAttribute(atts.getLocalName(i), atts.getValue(i), nextElem.findNamespace(atts.getURI(i), null)); attr.setAttributeType(atts.getType(i)); } } lastNode = nextElem; nextElem = null; } /* * (non-Javadoc) * * @see org.xml.sax.ContentHandler#endElement(java.lang.String, * java.lang.String, java.lang.String) */ public void endElement(String arg0, String arg1, String arg2) throws SAXException { if (lastNode.isComplete()) { OMContainer parent = lastNode.getParent(); ((OMNodeEx) parent).setComplete(true); lastNode = (OMNode) parent; } else { OMElement e = (OMElement) lastNode; ((OMNodeEx) e).setComplete(true); } } public void startCDATA() throws SAXException { textNodeType = OMNode.CDATA_SECTION_NODE; } public void endCDATA() throws SAXException { textNodeType = OMNode.TEXT_NODE; } /* * (non-Javadoc) * * @see org.xml.sax.ContentHandler#characters(char[], int, int) */ public void characters(char[] ch, int start, int length) throws SAXException { if (lastNode == null) { throw new SAXException(""); } OMNode node; if (lastNode.isComplete()) { node = factory.createOMText(lastNode.getParent(), new String(ch, start, length), textNodeType); ((OMNodeEx) lastNode).setNextOMSibling(node); ((OMNodeEx) node).setPreviousOMSibling(lastNode); } else { OMContainerEx e = (OMContainerEx) lastNode; node = factory.createOMText(e, new String(ch, start, length), textNodeType); e.setFirstChild(node); } lastNode = node; } public void ignorableWhitespace(char[] arg0, int arg1, int arg2) throws SAXException { } public void processingInstruction(String arg0, String arg1) throws SAXException { } public void comment(char[] ch, int start, int length) throws SAXException { if (lastNode == null) { // Do nothing: the comment appears before the root element. return; } OMNode node; if (lastNode.isComplete()) { node = factory.createOMComment(lastNode.getParent(), new String(ch, start, length)); ((OMNodeEx) lastNode).setNextOMSibling(node); ((OMNodeEx) node).setPreviousOMSibling(lastNode); } else { OMContainerEx e = (OMContainerEx) lastNode; node = factory.createOMComment(e, new String(ch, start, length)); e.setFirstChild(node); } lastNode = node; } public void skippedEntity(String arg0) throws SAXException { } public void startEntity(String name) throws SAXException { } public void endEntity(String name) throws SAXException { } /** * Get the root element of the Axiom tree built by this content handler. * * @return the root element of the tree * @throws OMException if the tree is not complete */ public OMElement getRootElement() { if (root != null && root.isComplete()) { return root; } else { throw new OMException("Tree not complete"); } } } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/builder/StAXOMBuilder.java0000644000000000000000000005723411131637466030724 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.builder; import org.apache.axiom.om.OMAbstractFactory; import org.apache.axiom.om.OMContainer; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMException; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMHierarchyException; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMNode; import org.apache.axiom.om.OMText; import org.apache.axiom.om.impl.OMContainerEx; import org.apache.axiom.om.impl.OMNodeEx; import org.apache.axiom.om.util.StAXUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import javax.xml.stream.XMLStreamConstants; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import javax.xml.stream.Location; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.InputStream; /** * StAX based builder that produces a pure XML infoset compliant object model. */ public class StAXOMBuilder extends StAXBuilder { /** Field document */ private static final Log log = LogFactory.getLog(StAXOMBuilder.class); private boolean doTrace = log.isDebugEnabled(); private static int nsCount = 0; // namespaceURI interning // default is false because most XMLStreamReader implementations don't do interning // due to performance impacts. Thus a customer should not assume that a namespace // on an OMElement is interned. boolean namespaceURIInterning = false; int lookAheadToken = -1; /** * Constructor StAXOMBuilder. * * @param ombuilderFactory * @param parser */ public StAXOMBuilder(OMFactory ombuilderFactory, XMLStreamReader parser) { super(ombuilderFactory, parser); document = ombuilderFactory.createOMDocument(this); if (charEncoding != null) { document.setCharsetEncoding(charEncoding); } } /** * Constructor linked to existing element. * * @param factory * @param parser * @param element * @param characterEncoding of existing element */ public StAXOMBuilder(OMFactory factory, XMLStreamReader parser, OMElement element, String characterEncoding) { // Use this constructor because the parser is passed the START_DOCUMENT state. super(factory, parser, characterEncoding); doTrace = log.isDebugEnabled(); namespaceURIInterning = false; lookAheadToken = -1; document = factory.createOMDocument(this); if (charEncoding != null) { document.setCharsetEncoding(charEncoding); } lastNode = element; document.setOMDocumentElement(element); populateOMElement(element); } /** * Constructor linked to existing element. * * @param factory * @param parser * @param element */ public StAXOMBuilder(OMFactory factory, XMLStreamReader parser, OMElement element) { this(factory, parser, element, null); } /** * @param filePath - Path to the XML file * @throws XMLStreamException * @throws FileNotFoundException */ public StAXOMBuilder(String filePath) throws XMLStreamException, FileNotFoundException { this(StAXUtils.createXMLStreamReader(new FileInputStream(filePath))); } /** * Constructor StAXOMBuilder. * * @param parser */ public StAXOMBuilder(XMLStreamReader parser) { super(parser); doTrace = log.isDebugEnabled(); namespaceURIInterning = false; lookAheadToken = -1; omfactory = OMAbstractFactory.getOMFactory(); document = omfactory.createOMDocument(this); if (charEncoding != null) { document.setCharsetEncoding(charEncoding); } } /** * @param inStream - instream which contains the XML * @throws XMLStreamException */ public StAXOMBuilder(InputStream inStream) throws XMLStreamException { this(StAXUtils.createXMLStreamReader(inStream)); } /** * Init() *must* be called after creating the builder using this constructor. */ public StAXOMBuilder() { super(); doTrace = log.isDebugEnabled(); namespaceURIInterning = false; lookAheadToken = -1; } /** * Method next. * * @return Returns int. * @throws OMException */ public int next() throws OMException { try { // We need a loop here because we may decide to skip an event while (true) { if (done) { throw new OMException(); } int token = parserNext(); if (!cache) { return token; } // The current token should be the same as the // one just obtained. This bit of code is used to // detect invalid parser state. if (doTrace) { int currentParserToken = parser.getEventType(); if (currentParserToken != token) { log.debug("WARNING: The current state of the parser is not equal to the " + "state just received from the parser. The current state in the paser is " + getStateString(currentParserToken) + " the state just received is " + getStateString(token)); /* throw new OMException("The current token " + token + " does not match the current event " + "reported by the parser token. The parser did not update its state correctly. " + "The parser is " + parser); */ } } // Now log the current state of the parser if (doTrace) { logParserState(); } switch (token) { case XMLStreamConstants.START_ELEMENT: elementLevel++; lastNode = createNextOMElement(); break; case XMLStreamConstants.START_DOCUMENT: // Document has already being created. document.setXMLVersion(parser.getVersion()); document.setCharsetEncoding(parser.getEncoding()); document.setStandalone(parser.isStandalone() ? "yes" : "no"); break; case XMLStreamConstants.CHARACTERS: lastNode = createOMText(XMLStreamConstants.CHARACTERS); break; case XMLStreamConstants.CDATA: lastNode = createOMText(XMLStreamConstants.CDATA); break; case XMLStreamConstants.END_ELEMENT: endElement(); elementLevel--; break; case XMLStreamConstants.END_DOCUMENT: done = true; ((OMContainerEx) this.document).setComplete(true); break; case XMLStreamConstants.SPACE: try { lastNode = createOMText(XMLStreamConstants.SPACE); } catch (OMHierarchyException ex) { // The OM implementation doesn't allow text nodes at the current // position in the tree. Since it is only whitespace, we can safely // skip this event. continue; } break; case XMLStreamConstants.COMMENT: lastNode = createComment(); break; case XMLStreamConstants.DTD: createDTD(); break; case XMLStreamConstants.PROCESSING_INSTRUCTION: lastNode = createPI(); break; case XMLStreamConstants.ENTITY_REFERENCE: lastNode = createOMText(XMLStreamConstants.ENTITY_REFERENCE); break; default : throw new OMException(); } return token; } } catch (OMException e) { throw e; } catch (Exception e) { throw new OMException(e); } } /** * Creates a new OMElement using either a CustomBuilder or * the default Builder mechanism. * @return */ protected OMNode createNextOMElement() { OMNode newElement = null; if (elementLevel == 1 && this.customBuilderForPayload != null) { newElement = createWithCustomBuilder(customBuilderForPayload, omfactory); } else if (customBuilders != null && elementLevel <= this.maxDepthForCustomBuilders) { String namespace = parser.getNamespaceURI(); String localPart = parser.getLocalName(); CustomBuilder customBuilder = getCustomBuilder(namespace, localPart); if (customBuilder != null) { newElement = createWithCustomBuilder(customBuilder, omfactory); } } if (newElement == null) { newElement = createOMElement(); } else { elementLevel--; // Decrease level since custom builder read the end element event } return newElement; } protected OMNode createWithCustomBuilder(CustomBuilder customBuilder, OMFactory factory) { String namespace = parser.getNamespaceURI(); String localPart = parser.getLocalName(); if (log.isDebugEnabled()) { log.debug("Invoking CustomBuilder, " + customBuilder.toString() + ", to the OMNode for {" + namespace + "}" + localPart); } OMContainer parent = null; if (lastNode != null) { if (lastNode.isComplete()) { parent = lastNode.getParent(); } else { parent = (OMContainer)lastNode; } } else { parent = document; } OMNode node = customBuilder.create(namespace, localPart, parent, parser, factory); if (log.isDebugEnabled()) { if (node != null) { log.debug("The CustomBuilder, " + customBuilder.toString() + "successfully constructed the OMNode for {" + namespace + "}" + localPart); } else { log.debug("The CustomBuilder, " + customBuilder.toString() + " did not construct an OMNode for {" + namespace + "}" + localPart + ". The OMNode will be constructed using the installed stax om builder"); } log.debug("The current state of the parser is: "); logParserState(); } return node; } /** * Dump the current event of the parser. */ protected void logParserState() { if (doTrace) { int currentEvent = parser.getEventType(); switch (currentEvent) { case XMLStreamConstants.START_ELEMENT: log.trace("START_ELEMENT: "); log.trace(" QName: " + parser.getName()); break; case XMLStreamConstants.START_DOCUMENT: log.trace("START_DOCUMENT: "); break; case XMLStreamConstants.CHARACTERS: log.trace("CHARACTERS: "); // This can bust up a datahandler //log.trace( "[" + parser.getText() + "]"); break; case XMLStreamConstants.CDATA: log.trace("CDATA: "); // This can but //log.trace( "[" + parser.getText() + "]"); break; case XMLStreamConstants.END_ELEMENT: log.trace("END_ELEMENT: "); log.trace(" QName: " + parser.getName()); break; case XMLStreamConstants.END_DOCUMENT: log.trace("END_DOCUMENT: "); break; case XMLStreamConstants.SPACE: log.trace("SPACE: "); //log.trace( "[" + parser.getText() + "]"); break; case XMLStreamConstants.COMMENT: log.trace("COMMENT: "); //log.trace( "[" + parser.getText() + "]"); break; case XMLStreamConstants.DTD: log.trace("DTD: "); log.trace( "[" + parser.getText() + "]"); break; case XMLStreamConstants.PROCESSING_INSTRUCTION: log.trace("PROCESSING_INSTRUCTION: "); log.trace(" [" + parser.getPITarget() + "][" + parser.getPIData() + "]"); break; case XMLStreamConstants.ENTITY_REFERENCE: log.trace("ENTITY_REFERENCE: "); log.trace(" " + parser.getLocalName() + "[" + parser.getText() + "]"); break; default : log.trace("UNKNOWN_STATE: " + currentEvent); } } } /** * Populate element with data from parser START_ELEMENT event. This is used when the source of * data for an element needs to be parsed on demand. The supplied element must already be set to * the proper name and namespace. * * @param node element to be populated */ private void populateOMElement(OMElement node) { // create the namespaces processNamespaceData(node); // fill in the attributes processAttributes(node); Location location = parser.getLocation(); if(location != null) { node.setLineNumber(location.getLineNumber()); } } /** * Method createOMElement. * * @return Returns OMNode. * @throws OMException */ protected OMNode createOMElement() throws OMException { OMElement node; String elementName = parser.getLocalName(); if (lastNode == null) { node = omfactory.createOMElement(elementName, null, document, this); } else if (lastNode.isComplete()) { node = omfactory.createOMElement(elementName, null, lastNode.getParent(), this); ((OMNodeEx) lastNode).setNextOMSibling(node); ((OMNodeEx) node).setPreviousOMSibling(lastNode); } else { OMContainerEx e = (OMContainerEx) lastNode; node = omfactory.createOMElement(elementName, null, (OMElement) lastNode, this); e.setFirstChild(node); } populateOMElement(node); return node; } /** * Method createOMText. * * @return Returns OMNode. * @throws OMException */ protected OMNode createComment() throws OMException { OMNode node; if (lastNode == null) { node = omfactory.createOMComment(document, parser.getText()); } else if (lastNode.isComplete()) { node = omfactory.createOMComment(lastNode.getParent(), parser.getText()); } else { node = omfactory.createOMComment((OMElement) lastNode, parser.getText()); } return node; } /** * Method createDTD. * * @return Returns OMNode. * @throws OMException */ protected OMNode createDTD() throws OMException { if (!parser.hasText()) { return null; } lastNode = omfactory.createOMDocType(document, parser.getText()); return lastNode; } /** * Method createPI. * * @return Returns OMNode. * @throws OMException */ protected OMNode createPI() throws OMException { OMNode node; String target = parser.getPITarget(); String data = parser.getPIData(); if (lastNode == null) { node = omfactory.createOMProcessingInstruction(document, target, data); } else if (lastNode.isComplete()) { node = omfactory.createOMProcessingInstruction(lastNode.getParent(), target, data); } else if (lastNode instanceof OMText) { node = omfactory.createOMProcessingInstruction(lastNode.getParent(), target, data); } else { node = omfactory.createOMProcessingInstruction((OMContainer) lastNode, target, data); } return node; } protected void endElement() { if (lastNode.isComplete()) { OMNodeEx parent = (OMNodeEx) lastNode.getParent(); parent.setComplete(true); lastNode = parent; } else { OMNodeEx e = (OMNodeEx) lastNode; e.setComplete(true); } //return lastNode; } /** * Method getDocumentElement. * * @return Returns root element. */ public OMElement getDocumentElement() { return document.getOMDocumentElement(); } /** * Method processNamespaceData. * * @param node */ protected void processNamespaceData(OMElement node) { // set the own namespace String namespaceURI = parser.getNamespaceURI(); String prefix = parser.getPrefix(); int namespaceCount = parser.getNamespaceCount(); String nsprefix; String namespaceURIFromParser; for (int i = 0; i < namespaceCount; i++) { nsprefix = parser.getNamespacePrefix(i); //if the namespace is not defined already when we write the start tag declare it // check whether this is the default namespace and make sure we have not declared that earlier namespaceURIFromParser = parser.getNamespaceURI(i); if (nsprefix == null || "".equals(nsprefix)) { node.declareDefaultNamespace(parser.getNamespaceURI(i)); } else { // NOTE_A: // By default most parsers don't intern the namespace. // Unfortunately the property to detect interning on the delegate parsers is hard to detect. // Woodstox has a proprietary property on the XMLInputFactory. // IBM has a proprietary property on the XMLStreamReader. // For now only force the interning if requested. if (isNamespaceURIInterning()) { namespaceURIFromParser = namespaceURIFromParser.intern(); } node.declareNamespace(namespaceURIFromParser, nsprefix); } } if (namespaceURI != null && namespaceURI.length() > 0) { OMNamespace namespace = node.findNamespace(namespaceURI, prefix); if (namespace == null || (!namespace.getPrefix().equals(prefix))) { // See NOTE_A above if (isNamespaceURIInterning()) { namespaceURI = namespaceURI.intern(); } if (prefix == null || "".equals(prefix)) { namespace = node.declareDefaultNamespace(namespaceURI); } else { namespace = node.declareNamespace(namespaceURI, prefix); } } node.setNamespaceWithNoFindInCurrentScope(namespace); } } /** * @param doDebug * @deprecated */ public void setDoDebug(boolean doDebug) { this.doTrace = doDebug; } protected String createPrefix() { return "ns" + nsCount++; } /** * Set namespace uri interning * @param b */ public void setNamespaceURIInterning(boolean b) { this.namespaceURIInterning = b; } /** * @return if namespace uri interning */ public boolean isNamespaceURIInterning() { return this.namespaceURIInterning; } /** * Pushes the virtual parser ahead one token. * If a look ahead token was calculated it is returned. * @return next token * @throws XMLStreamException */ private int parserNext() throws XMLStreamException { if (lookAheadToken >= 0) { int token = lookAheadToken; lookAheadToken = -1; // Reset return token; } else { return parser.next(); } } /** * This method looks ahead to the next start element. * @return true if successful */ public boolean lookahead() { try { while (true) { if (lookAheadToken < 0) { lookAheadToken = parserNext(); } if (lookAheadToken == XMLStreamConstants.START_ELEMENT) { return true; } else if (lookAheadToken == XMLStreamConstants.END_ELEMENT || lookAheadToken == XMLStreamConstants.START_DOCUMENT || lookAheadToken == XMLStreamConstants.END_DOCUMENT) { next(); return false; // leaving scope...start element not found } else { next(); // continue looking past whitespace etc. } } } catch (XMLStreamException e) { throw new OMException(e); } } public boolean isLookahead() { return lookAheadToken >= 0; } private String getStateString(int token) { String state = null; switch(token) { case XMLStreamConstants.START_ELEMENT: state = "START_ELEMENT"; break; case XMLStreamConstants.START_DOCUMENT: state = "START_DOCUMENT"; break; case XMLStreamConstants.CHARACTERS: state = "CHARACTERS"; break; case XMLStreamConstants.CDATA: state = "CDATA"; break; case XMLStreamConstants.END_ELEMENT: state = "END_ELEMENT"; break; case XMLStreamConstants.END_DOCUMENT: state = "END_DOCUMENT"; break; case XMLStreamConstants.SPACE: state = "SPACE"; break; case XMLStreamConstants.COMMENT: state = "COMMENT"; break; case XMLStreamConstants.DTD: state = "DTD"; break; case XMLStreamConstants.PROCESSING_INSTRUCTION: state = "PROCESSING_INSTRUCTION"; break; case XMLStreamConstants.ENTITY_REFERENCE: state = "ENTITY_REFERENCE"; break; default : state = "UNKNOWN_STATE: " + token; } return state; } } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/builder/CustomBuilder.java0000644000000000000000000000362111131637466031112 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.builder; import org.apache.axiom.om.OMContainer; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMException; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMNamespace; import javax.xml.stream.XMLStreamReader; /** * A Custom Builder is registered on the StAXBuilder for a particular QName or payload. * When the QName or payload is encountered, the CustomBuilder will build the OMElement * or OMSourcedElement for the StAXBuilder. * * @See StAXBuilder.registerCustomBuilder() */ public interface CustomBuilder { /** * Create an OMElement for this whole subtree. * A null is returned if the default StAXBuilder behavior should be used. * @param namespace * @param localPart * @param parent * @param reader * @return null or OMElement */ public OMElement create(String namespace, String localPart, OMContainer parent, XMLStreamReader reader, OMFactory factory) throws OMException; } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/builder/XOPBuilder.java0000644000000000000000000000226411131637466030310 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.builder; import org.apache.axiom.attachments.Attachments; import org.apache.axiom.om.OMAttachmentAccessor; import org.apache.axiom.om.OMException; import javax.activation.DataHandler; public interface XOPBuilder extends OMAttachmentAccessor { DataHandler getDataHandler(String blobContentID) throws OMException; Attachments getAttachments(); }././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/builder/SafeXMLStreamReader.javaaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/builder/SafeXMLStreamReader.jav0000644000000000000000000001563611131637466031737 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.builder; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import javax.xml.stream.util.StreamReaderDelegate; /** * XMLStreamReader wrapper that prevents access to the underlying parser * after the first error occurs. *

* Usually, code that uses StAX directly just stops processing of an XML document * once the first parsing error has been reported. However, since Axiom * uses deferred parsing, and client code accesses the XML infoset using * an object model, things are more complicated. Indeed, if the XML * document is not well formed, the corresponding error might be reported * as a runtime exception by any call to a method of an OM node. *

* Typically the client code will have some error handling that will intercept * runtime exceptions and take appropriate action. Very often this error handling * code might want to access the object model again, for example to log the request that caused the * failure. This causes no problem except if the runtime exception was caused by a * parsing error, in which case Axiom would again try to pull events from the parser. *

* This would lead to a situation where Axiom accesses a parser that has reported a parsing * error before. While one would expect that after a first error reported by the parser, all * subsequent invocations of the parser will fail, this is not the case for all parsers * (at least not in all situations). Instead, the parser might be left in an inconsistent * state after the error. E.g. WSCOMMONS-372 describes a case where Woodstox * encounters an error in {@link XMLStreamReader#getText()} but continues to return * (incorrect) events afterwards. The explanation for this behaviour might be that * the situation described here is quite uncommon when StAX is used directly (i.e. not through * Axiom). *

* This class provides a simple way to prevent this type of issue by wrapping the underlying * parser implementation. After the first parsing error occurs, the wrapper prevents any call * to {@link XMLStreamReader#next()} and similar methods on the underlying parser. * Any attempt to do so will immediately result in an error. */ public class SafeXMLStreamReader extends StreamReaderDelegate { private boolean parserError; public SafeXMLStreamReader(XMLStreamReader reader) { super(reader); } private void checkError() throws XMLStreamException { if (parserError) { throw new XMLStreamException( "Trying to read events from a parser that already reported an error before"); } } public String getElementText() throws XMLStreamException { try { return super.getElementText(); } catch (XMLStreamException ex) { parserError = true; throw ex; } catch (RuntimeException ex) { parserError = true; throw ex; } catch (Error ex) { parserError = true; throw ex; } } public String getPIData() { try { return super.getPIData(); } catch (RuntimeException ex) { parserError = true; throw ex; } catch (Error ex) { parserError = true; throw ex; } } public String getText() { try { return super.getText(); } catch (RuntimeException ex) { parserError = true; throw ex; } catch (Error ex) { parserError = true; throw ex; } } public char[] getTextCharacters() { try { return super.getTextCharacters(); } catch (RuntimeException ex) { parserError = true; throw ex; } catch (Error ex) { parserError = true; throw ex; } } public int getTextCharacters(int sourceStart, char[] target, int targetStart, int length) throws XMLStreamException { checkError(); try { return super.getTextCharacters(sourceStart, target, targetStart, length); } catch (XMLStreamException ex) { parserError = true; throw ex; } catch (RuntimeException ex) { parserError = true; throw ex; } catch (Error ex) { parserError = true; throw ex; } } public int getTextLength() { try { return super.getTextLength(); } catch (RuntimeException ex) { parserError = true; throw ex; } catch (Error ex) { parserError = true; throw ex; } } public int getTextStart() { try { return super.getTextStart(); } catch (RuntimeException ex) { parserError = true; throw ex; } catch (Error ex) { parserError = true; throw ex; } } public boolean hasNext() throws XMLStreamException { checkError(); try { return super.hasNext(); } catch (XMLStreamException ex) { parserError = true; throw ex; } catch (RuntimeException ex) { parserError = true; throw ex; } catch (Error ex) { parserError = true; throw ex; } } public int next() throws XMLStreamException { checkError(); try { return super.next(); } catch (XMLStreamException ex) { parserError = true; throw ex; } catch (RuntimeException ex) { parserError = true; throw ex; } catch (Error ex) { parserError = true; throw ex; } } public int nextTag() throws XMLStreamException { checkError(); try { return super.nextTag(); } catch (XMLStreamException ex) { parserError = true; throw ex; } catch (RuntimeException ex) { parserError = true; throw ex; } catch (Error ex) { parserError = true; throw ex; } } } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/builder/StAXBuilder.java0000644000000000000000000005436611131637466030473 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.builder; import org.apache.axiom.om.OMAbstractFactory; import org.apache.axiom.om.OMAttribute; import org.apache.axiom.om.OMConstants; import org.apache.axiom.om.OMContainer; import org.apache.axiom.om.OMDocument; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMException; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMNode; import org.apache.axiom.om.OMText; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.om.impl.OMContainerEx; import org.apache.axiom.om.impl.OMNodeEx; import org.apache.axiom.om.impl.util.OMSerializerUtil; import org.apache.axiom.om.util.StAXUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamConstants; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import java.io.InputStream; import java.util.HashMap; import java.util.Map; /** * OM should be able to be built from any data source. And the model it builds may be a SOAP * specific one or just an XML model. This class will give some common functionality of OM Building * from StAX. */ public abstract class StAXBuilder implements OMXMLParserWrapper { private static Log log = LogFactory.getLog(StAXBuilder.class); /** Field parser */ protected XMLStreamReader parser; /** Field omfactory */ protected OMFactory omfactory; /** Field lastNode */ protected OMNode lastNode; // returns the state of completion /** Field done */ protected boolean done = false; // keeps the state of the cache /** Field cache */ protected boolean cache = true; // keeps the state of the parser access. if the parser is // accessed atleast once,this flag will be set /** Field parserAccessed */ protected boolean parserAccessed = false; protected OMDocument document; protected String charEncoding = null; protected boolean _isClosed = false; // Indicate if parser is closed protected boolean _releaseParserOnClose = false; // Defaults to legacy behavior, which is keep the reference // Fields for Custom Builder implementation protected CustomBuilder customBuilderForPayload = null; protected Map customBuilders = null; protected int maxDepthForCustomBuilders = -1; /** * Field showing whether the parser is datahandler-aware or not. Client should not directly access this field. * Instead, they should use {@link #setIsDataHandlerAware(Boolean)} and {@link #isDataHandlerAware()}. * * @deprecated * @see #isDataHandlerAware() * @see #setIsDataHandlerAware(Boolean) */ protected Boolean isDataHandlerAware = null; // property of parser, https://issues.apache.org/jira/browse/WSCOMMONS-300 /** * Element level is the depth of the element. * The root element (i.e. envelope) is defined as 1. */ protected int elementLevel = 0; /** * Constructor StAXBuilder. * This constructor is used if the parser is at the beginning (START_DOCUMENT). * * @param ombuilderFactory * @param parser */ protected StAXBuilder(OMFactory ombuilderFactory, XMLStreamReader parser) { omfactory = ombuilderFactory; // The getCharacterEncodingScheme and getEncoding information are // only available at the START_DOCUMENT event. charEncoding = parser.getCharacterEncodingScheme(); if(charEncoding == null){ charEncoding = parser.getEncoding(); } initParser(parser); } /** * Constructor StAXBuilder. * This constructor is used if the parser is not at the START_DOCUMENT. * * @param ombuilderFactory * @param parser * @param characterEncoding */ protected StAXBuilder(OMFactory ombuilderFactory, XMLStreamReader parser, String characterEncoding) { omfactory = ombuilderFactory; charEncoding = characterEncoding; initParser(parser); } private void initParser(XMLStreamReader parser) { if (parser instanceof BuilderAwareReader) { ((BuilderAwareReader) parser).setBuilder(this); } this.parser = new SafeXMLStreamReader(parser); } /** * Constructor StAXBuilder. * * @param parser */ protected StAXBuilder(XMLStreamReader parser) { this(OMAbstractFactory.getOMFactory(), parser); } /** Init() *must* be called after creating the builder using this constructor. */ protected StAXBuilder() { } /** * @deprecated Not used anywhere */ public void init(InputStream inputStream, String charSetEncoding, String url, String contentType) throws OMException { try { this.parser = StAXUtils.createXMLStreamReader(inputStream); } catch (XMLStreamException e1) { throw new OMException(e1); } omfactory = OMAbstractFactory.getOMFactory(); } /** * Method setOMBuilderFactory. * * @param ombuilderFactory */ public void setOMBuilderFactory(OMFactory ombuilderFactory) { this.omfactory = ombuilderFactory; } /** * Method processNamespaceData. * * @param node */ protected abstract void processNamespaceData(OMElement node); // since the behaviors are different when it comes to namespaces // this must be implemented differently /** * Method processAttributes. * * @param node */ protected void processAttributes(OMElement node) { int attribCount = parser.getAttributeCount(); for (int i = 0; i < attribCount; i++) { String uri = parser.getAttributeNamespace(i); String prefix = parser.getAttributePrefix(i); OMNamespace namespace = null; if (uri != null && uri.length() > 0) { // prefix being null means this elements has a default namespace or it has inherited // a default namespace from its parent namespace = node.findNamespace(uri, prefix); if (namespace == null) { if (prefix == null || "".equals(prefix)) { prefix = OMSerializerUtil.getNextNSPrefix(); } namespace = node.declareNamespace(uri, prefix); } } // todo if the attributes are supposed to namespace qualified all the time // todo then this should throw an exception here OMAttribute attr = node.addAttribute(parser.getAttributeLocalName(i), parser.getAttributeValue(i), namespace); attr.setAttributeType(parser.getAttributeType(i)); } } /** * Method createOMText. * * @return Returns OMNode. * @throws OMException */ protected OMNode createOMText(int textType) throws OMException { OMNode node; if (lastNode == null) { return null; } else if (!lastNode.isComplete()) { node = createOMText((OMElement) lastNode, textType); } else { node = createOMText(lastNode.getParent(), textType); } return node; } /** * This method will check whether the text can be optimizable using IS_BINARY flag. If that is * set then we try to get the data handler. * * @param omContainer * @param textType * @return omNode */ private OMNode createOMText(OMContainer omContainer, int textType) { try { if (isDataHandlerAware() && Boolean.TRUE.equals(parser.getProperty(OMConstants.IS_BINARY))) { Object dataHandler = parser.getProperty(OMConstants.DATA_HANDLER); OMText text = omfactory.createOMText(dataHandler, true); text.setBinary(true); omContainer.addChild(text); return text; } } catch (IllegalArgumentException e) { //parser.getProperty may throw illegalArgument exception, ignore } catch (IllegalStateException e) { //parser.getProperty may throw illegalState exceptions, ignore } return omfactory.createOMText(omContainer, parser.getText(), textType); } /** * Method reset. * * @param node * @throws OMException */ public void reset(OMNode node) throws OMException { lastNode = null; } /** * Method discard. * * @param element * @throws OMException */ public void discard(OMElement element) throws OMException { if (element.isComplete() || !cache) { throw new OMException(); } try { // We simply cannot use the parser instance from the builder for this case // it is not safe to assume that the parser inside the builder will be in // sync with the parser of the element in question // Note 1 - however calling getXMLStreamReaderWithoutCaching sets off two flags // the cache flag for this builder and the parserAccessed flag. These flags will be // reset later in this procedure int event =0; XMLStreamReader elementParser = element.getXMLStreamReaderWithoutCaching(); do{ event = elementParser.next(); }while(!(event == XMLStreamConstants.END_ELEMENT && element.getLocalName().equals(elementParser.getLocalName()))); //at this point we are safely at the end_element event of the element we discarded lastNode = element.getPreviousOMSibling(); // resetting the flags - see Note 1 above cache = true; parserAccessed = false; if (lastNode != null) { // if the last node is not an element, we are in trouble because leaf nodes // (such as text) cannot build themselves. worst the lastchild of the // currentparent is still the removed node! we have to correct it OMContainerEx ex = ((OMContainerEx) lastNode.getParent()); ex.setLastChild(lastNode); if (!(lastNode instanceof OMContainerEx)){ ex.buildNext(); }else{ ((OMNodeEx) lastNode).setNextOMSibling(null); } } else { OMElement parent = (OMElement) element.getParent(); if (parent == null) { throw new OMException(); } ((OMContainerEx) parent).setFirstChild(null); lastNode = parent; } } catch (OMException e) { throw e; } catch (Exception e) { throw new OMException(e); } // when an element is discarded the element index that was incremented //at creation needs to be decremented ! elementLevel--; } /** * Method getText. * * @return Returns String. * @throws OMException */ public String getText() throws OMException { return parser.getText(); } /** * Method getNamespace. * * @return Returns String. * @throws OMException */ public String getNamespace() throws OMException { return parser.getNamespaceURI(); } /** * Method getNamespaceCount. * * @return Returns int. * @throws OMException */ public int getNamespaceCount() throws OMException { try { return parser.getNamespaceCount(); } catch (Exception e) { throw new OMException(e); } } /** * Method getNamespacePrefix. * * @param index * @return Returns String. * @throws OMException */ public String getNamespacePrefix(int index) throws OMException { try { return parser.getNamespacePrefix(index); } catch (Exception e) { throw new OMException(e); } } /** * Method getNamespaceUri. * * @param index * @return Returns String. * @throws OMException */ public String getNamespaceUri(int index) throws OMException { try { return parser.getNamespaceURI(index); } catch (Exception e) { throw new OMException(e); } } /** * Method setCache. * * @param b */ public void setCache(boolean b) { if (parserAccessed && b) { throw new UnsupportedOperationException( "parser accessed. cannot set cache"); } cache = b; } /** * @return true if caching */ public boolean isCache() { return cache; } /** * Method getName. * * @return Returns String. * @throws OMException */ public String getName() throws OMException { return parser.getLocalName(); } /** * Method getPrefix. * * @return Returns String. * @throws OMException */ public String getPrefix() throws OMException { return parser.getPrefix(); } /** * Method getAttributeCount. * * @return Returns int. * @throws OMException */ public int getAttributeCount() throws OMException { return parser.getAttributeCount(); } /** * Method getAttributeNamespace. * * @param arg * @return Returns String. * @throws OMException */ public String getAttributeNamespace(int arg) throws OMException { return parser.getAttributeNamespace(arg); } /** * Method getAttributeName. * * @param arg * @return Returns String. * @throws OMException */ public String getAttributeName(int arg) throws OMException { return parser.getAttributeNamespace(arg); } /** * Method getAttributePrefix. * * @param arg * @return Returns String. * @throws OMException */ public String getAttributePrefix(int arg) throws OMException { return parser.getAttributeNamespace(arg); } /** * Method getParser. * * @return Returns Object. */ public Object getParser() { if (parserAccessed) { throw new IllegalStateException( "Parser already accessed!"); } if (!cache) { parserAccessed = true; return parser; } else { throw new IllegalStateException( "cache must be switched off to access the parser"); } } /** * Method isCompleted. * * @return Returns boolean. */ public boolean isCompleted() { return done; } /** * This method is called with the XMLStreamConstants.START_ELEMENT event. * * @return Returns OMNode. * @throws OMException */ protected abstract OMNode createOMElement() throws OMException; /** * Forwards the parser one step further, if parser is not completed yet. If this is called after * parser is done, then throw an OMException. If the cache is set to false, then returns the * event, *without* building the OM tree. If the cache is set to true, then handles all the * events within this, and builds the object structure appropriately and returns the event. * * @return Returns int. * @throws OMException */ public abstract int next() throws OMException; /** * Register a CustomBuilder associated with the indicated QName. * The CustomBuilder will be used when an element of that qname is encountered. * @param qName * @param maxDepth indicate the maximum depth that this qname will be found. (root = 0) * @param customBuilder * @return replaced CustomBuilder or null */ public CustomBuilder registerCustomBuilder(QName qName, int maxDepth, CustomBuilder customBuilder) { CustomBuilder old = null; if (customBuilders == null) { customBuilders = new HashMap(); } else { old = (CustomBuilder) customBuilders.get(qName); } maxDepthForCustomBuilders = (maxDepthForCustomBuilders > maxDepth) ? maxDepthForCustomBuilders: maxDepth; customBuilders.put(qName, customBuilder); return old; } /** * Register a CustomBuilder for a payload. * The payload is defined as the elements inside a SOAPBody or the * document element of a REST message. * @param customBuilder * @return replaced CustomBuilder or null */ public CustomBuilder registerCustomBuilderForPayload(CustomBuilder customBuilder) { CustomBuilder old = null; this.customBuilderForPayload = customBuilder; return old; } /** * Return CustomBuilder associated with the namespace/localPart * @param namespace * @param localPart * @return CustomBuilder or null */ protected CustomBuilder getCustomBuilder(String namespace, String localPart) { if (customBuilders == null) { return null; } QName qName = new QName(namespace, localPart); return (CustomBuilder) customBuilders.get(qName); } /** @return Returns short. */ public short getBuilderType() { return OMConstants.PULL_TYPE_BUILDER; } /** * Method registerExternalContentHandler. * * @param obj */ public void registerExternalContentHandler(Object obj) { throw new UnsupportedOperationException(); } /** * Method getRegisteredContentHandler. * * @return Returns Object. */ public Object getRegisteredContentHandler() { throw new UnsupportedOperationException(); } public OMDocument getDocument() { return document; } public String getCharsetEncoding() { return document.getCharsetEncoding(); } public OMNode getLastNode() { return this.lastNode; } public void close() { try { if (!isClosed()) { parser.close(); } } catch (Throwable e) { // Can't see a reason why we would want to surface an exception // while closing the parser. if (log.isDebugEnabled()) { log.debug("Exception occurred during parser close. " + "Processing continues. " + e); } } finally { _isClosed = true; done = true; // Release the parser so that it can be GC'd or reused. if (_releaseParserOnClose) { parser = null; } } } /** * Get the value of a feature/property from the underlying XMLStreamReader implementation * without accessing the XMLStreamReader. https://issues.apache.org/jira/browse/WSCOMMONS-155 * * @param name * @return */ public Object getReaderProperty(String name) throws IllegalArgumentException { if (!isClosed()) { return parser.getProperty(name); } return null; } /** * Check if the underlying parse is aware of data handlers. (example ADB generated code) * * @return true if the parser is aware of data handlers, otherwise false */ protected boolean isDataHandlerAware() { // Is datahandler is immutable for a parser's lifetime. Thus it should // only be checked one time. if (isDataHandlerAware == null) { // check whether data handlers are treated seperately try { if (parser != null && (Boolean.TRUE == parser.getProperty(OMConstants.IS_DATA_HANDLERS_AWARE))) { isDataHandlerAware = Boolean.TRUE; } else { isDataHandlerAware = Boolean.FALSE; } } catch (IllegalArgumentException e) { // according to the parser api, get property will return IllegalArgumentException, when that // property is not found. isDataHandlerAware = Boolean.FALSE; } catch (IllegalStateException e) { // it will also throw illegalStateExceptions if in wrong state, ignore } } if (Boolean.TRUE.equals(isDataHandlerAware)) { return true; } return false; } /** * Sets the isDataHandlerAware state of this {@link StAXBuilder}. * * @param value a boolean value - may be null */ protected void setIsDataHandlerAware(Boolean value) { this.isDataHandlerAware = value; } /** * Returns the encoding style of the XML data * @return the character encoding, defaults to "UTF-8" */ public String getCharacterEncoding() { if(this.charEncoding == null){ return "UTF-8"; } return this.charEncoding; } /** * @return if parser is closed */ public boolean isClosed() { return _isClosed; } /** * Indicate if the parser resource should be release when closed. * @param value boolean */ public void releaseParserOnClose(boolean value) { // Release parser if already closed if (isClosed() && value) { parser = null; } _releaseParserOnClose = value; } } ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/builder/XOPAwareStAXOMBuilder.javaaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/builder/XOPAwareStAXOMBuilder.j0000644000000000000000000001263111131637466031573 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.builder; import org.apache.axiom.attachments.Attachments; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMException; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMNode; import org.apache.axiom.om.OMText; import org.apache.axiom.om.impl.MTOMConstants; import org.apache.axiom.om.impl.OMContainerEx; import org.apache.axiom.om.impl.OMNodeEx; import org.apache.axiom.om.util.ElementHelper; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import javax.activation.DataHandler; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import java.io.FileNotFoundException; import java.io.InputStream; public class XOPAwareStAXOMBuilder extends StAXOMBuilder implements XOPBuilder { private static final Log log = LogFactory.getLog(XOPAwareStAXOMBuilder.class); /** Attachments handles deferred parsing of incoming MIME Messages. */ Attachments attachments; /** * Constructor StAXOMBuilder. * * @param ombuilderFactory * @param parser */ public XOPAwareStAXOMBuilder(OMFactory ombuilderFactory, XMLStreamReader parser, Attachments attachments) { super(ombuilderFactory, parser); this.attachments = attachments; } /** * Constructor linked to existing element. * * @param factory * @param parser * @param element */ public XOPAwareStAXOMBuilder(OMFactory factory, XMLStreamReader parser, OMElement element, Attachments attachments) { super(factory, parser, element); this.attachments = attachments; } /** * @param filePath - Path to the XML file * @throws XMLStreamException * @throws FileNotFoundException */ public XOPAwareStAXOMBuilder(String filePath, Attachments attachments) throws XMLStreamException, FileNotFoundException { super(filePath); this.attachments = attachments; } /** * @param inStream - instream which contains the XML * @throws XMLStreamException */ public XOPAwareStAXOMBuilder(InputStream inStream, Attachments attachments) throws XMLStreamException { super(inStream); this.attachments = attachments; } /** * Constructor StAXXOPAwareOMBuilder. * * @param parser */ public XOPAwareStAXOMBuilder(XMLStreamReader parser, Attachments attachments) { super(parser); this.attachments = attachments; } /** * Method createOMElement. Overriding the createOMElement of StAXOMBuilder to to XOP aware * building * * @return Returns OMNode. * @throws OMException */ protected OMNode createOMElement() throws OMException { String elementName = parser.getLocalName(); String namespaceURI = parser.getNamespaceURI(); if (MTOMConstants.XOP_INCLUDE.equals(elementName) && MTOMConstants.XOP_NAMESPACE_URI.equals(namespaceURI)) { OMText node; String contentID = ElementHelper.getContentID(parser); if (log.isDebugEnabled()) { log.debug("Encountered xop:include for cid:" + contentID); } if (lastNode == null) { throw new OMException( "XOP:Include element is not supported here"); } else if (lastNode.isComplete() & lastNode.getParent() != null) { node = omfactory.createOMText(contentID, (OMElement) lastNode .getParent(), this); if (log.isDebugEnabled()) { log.debug("Create createOMText for cid:" + contentID); Object dh = node.getDataHandler(); String dhClass = (dh==null) ? "null" : dh.getClass().toString(); log.debug("The datahandler is " + dhClass); } ((OMNodeEx) lastNode).setNextOMSibling(node); ((OMNodeEx) node).setPreviousOMSibling(lastNode); } else { OMContainerEx e = (OMContainerEx) lastNode; node = omfactory.createOMText(contentID, (OMElement) lastNode, this); e.setFirstChild(node); } return node; } else { return super.createOMElement(); } } public DataHandler getDataHandler(String blobContentID) throws OMException { return attachments.getDataHandler(blobContentID); } public Attachments getAttachments() { return attachments; } } ././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/builder/BuilderAwareReader.javaaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/builder/BuilderAwareReader.java0000644000000000000000000000165111131637466032023 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.builder; public interface BuilderAwareReader { public void setBuilder(StAXBuilder builder); } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/util/0000755000000000000000000000000011131637466025013 5ustar rootrootaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/util/EmptyIterator.java0000644000000000000000000000220111131637466030461 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.util; import java.util.Iterator; public class EmptyIterator implements Iterator { public void remove() { throw new UnsupportedOperationException(); } public boolean hasNext() { return false; } public Object next() { throw new UnsupportedOperationException(); } } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/util/OMSerializerUtil.java0000644000000000000000000007607711131637466031102 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.util; import org.apache.axiom.om.OMAttribute; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMNode; import org.apache.axiom.om.OMConstants; import org.apache.axiom.om.impl.serialize.StreamingOMSerializer; import org.apache.axiom.om.util.CommonUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import javax.xml.namespace.NamespaceContext; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import javax.xml.stream.XMLStreamWriter; import java.util.ArrayList; import java.util.Iterator; public class OMSerializerUtil { private static Log log = LogFactory.getLog(OMSerializerUtil.class); private static boolean DEBUG_ENABLED = log.isDebugEnabled(); private static boolean ADV_DEBUG_ENABLED = true; static long nsCounter = 0; // This property should be used by the parser to indicate whether // setPrefix should be done before or after the Start Element event. // This property is not yet a standard, but at least one parser. private static final String IS_SET_PREFIX_BEFORE_PROPERTY = "javax.xml.stream.XMLStreamWriter.isSetPrefixBeforeStartElement"; /** * Method serializeEndpart. * * @param writer * @throws javax.xml.stream.XMLStreamException * */ public static void serializeEndpart(XMLStreamWriter writer) throws XMLStreamException { writer.writeEndElement(); } /** * Method serializeAttribute. * * @param attr * @param writer * @throws XMLStreamException * @deprecated use serializeStartpart instead */ public static void serializeAttribute(OMAttribute attr, XMLStreamWriter writer) throws XMLStreamException { // first check whether the attribute is associated with a namespace OMNamespace ns = attr.getNamespace(); String prefix = null; String namespaceName = null; if (ns != null) { // add the prefix if it's availble prefix = ns.getPrefix(); namespaceName = ns.getNamespaceURI(); if (prefix != null) { writer.writeAttribute(prefix, namespaceName, attr.getLocalName(), attr.getAttributeValue()); } else { writer.writeAttribute(namespaceName, attr.getLocalName(), attr.getAttributeValue()); } } else { String localName = attr.getLocalName(); String attributeValue = attr.getAttributeValue(); writer.writeAttribute(localName, attributeValue); } } /** * Method serializeNamespace. * * @param namespace * @param writer * @throws XMLStreamException * @deprecated Use serializeStartpart instead */ public static void serializeNamespace(OMNamespace namespace, XMLStreamWriter writer) throws XMLStreamException { if (namespace == null) { return; } String uri = namespace.getNamespaceURI(); String prefix = namespace.getPrefix(); if (uri != null && !"".equals(uri)) { String prefixFromWriter = writer.getPrefix(uri); // Handling Default Namespaces First // Case 1 : // here we are trying define a default namespace. But has this been defined in the current context. // yes, there can be a default namespace, but it may have a different URI. If its a different URI // then explicitly define the default namespace here. // Case 2 : // The passed in namespace is a default ns, but there is a non-default ns declared // in the current scope. if (("".equals(prefix) && "".equals(prefixFromWriter) && !uri.equals(writer.getNamespaceContext().getNamespaceURI(""))) || (prefix != null && "".equals(prefix) && (prefixFromWriter == null || !prefix.equals(prefixFromWriter)))) { // this has not been declared earlier writer.writeDefaultNamespace(uri); writer.setDefaultNamespace(uri); } else { prefix = prefix == null ? getNextNSPrefix(writer) : prefix; if (prefix != null && !prefix.equals(prefixFromWriter) && !checkForPrefixInTheCurrentContext(writer, uri, prefix)) { writer.writeNamespace(prefix, uri); writer.setPrefix(prefix, uri); } } } else { // now the nsURI passed is "" or null. Meaning we gonna work with defaultNS. // check whether there is a defaultNS already declared. If yes, is it the same as this ? String currentDefaultNSURI = writer.getNamespaceContext().getNamespaceURI(""); if ((currentDefaultNSURI != null && !currentDefaultNSURI.equals(uri)) || uri != null && !uri.equals(currentDefaultNSURI)) { // this has not been declared earlier writer.writeDefaultNamespace(uri); writer.setDefaultNamespace(uri); } } } /** * Unfortunately there is disagreement in the user community about the semantics of setPrefix on * the XMLStreamWriter. An example will explain the difference: writer.startElement("a") * writer.setPrefix("pre", "urn://sample") writer.startElement("b") *

* Some user communities (woodstox) believe that the setPrefix is associate with the scope for * "a" and thus remains in scope until the end of a. The basis for this believe is * XMLStreamWriter javadoc (which some would argue is incomplete). *

* Some user communities believe that the setPrefix is associated with the "b" element. These * communities reference an example in the specification and historical usage of SAX. *

* This method will return true if the setPrefix is associated with the next writeStartElement. * * @param writer * @return true if setPrefix should be generated before startElement */ private static boolean cache_isSetPrefixBeforeStartElement; private static XMLStreamWriter cache_isSetPrefixBeforeStartElement_writer = null; private static String semifore = "isSetPrefixBeforeStartElement"; public static boolean isSetPrefixBeforeStartElement(XMLStreamWriter writer) { // Try the cached value if (cache_isSetPrefixBeforeStartElement_writer == writer) { synchronized(semifore) { if (cache_isSetPrefixBeforeStartElement_writer == writer) { return cache_isSetPrefixBeforeStartElement; } } } // There is no cached value for this writer, so try getting // the property from the writer. boolean ret = false; try { Boolean value = (Boolean)writer.getProperty(IS_SET_PREFIX_BEFORE_PROPERTY); // this will always be false if the property is defined if (value != null) { ret = value.booleanValue(); // Cache the answer synchronized(semifore) { cache_isSetPrefixBeforeStartElement_writer = writer; cache_isSetPrefixBeforeStartElement = ret; } return ret; } } catch (IllegalArgumentException e) { // Some parsers throw an exception for unknown properties. } if (!ret) { // Fallback: Toggle based on sun or woodstox implementation. NamespaceContext nc = writer.getNamespaceContext(); ret = (nc == null || (nc.getClass().getName().indexOf("wstx") == -1 && nc.getClass().getName().indexOf("weblogic") == -1 && nc.getClass().getName().indexOf("sun") == -1)); } // Cache the answer synchronized(semifore) { cache_isSetPrefixBeforeStartElement_writer = writer; cache_isSetPrefixBeforeStartElement = ret; } return ret; } /** * Method serializeStartpart. Serialize the start tag of an element. * * @param element * @param writer * @throws XMLStreamException */ public static void serializeStartpart(OMElement element, XMLStreamWriter writer) throws XMLStreamException { serializeStartpart(element, element.getLocalName(), writer); } /** * Method serializeStartpart. Serialize the start tag of an element. * * @param element * @param localName (in some cases, the caller wants to force a different localName) * @param writer * @throws XMLStreamException */ public static void serializeStartpart(OMElement element, String localName, XMLStreamWriter writer) throws XMLStreamException { // Note: To serialize the start tag, we must follow the order dictated by the JSR-173 (StAX) specification. // Please keep this code in sync with the code in StreamingOMSerializer.serializeElement // The algorithm is: // ... generate setPrefix/setDefaultNamespace for each namespace declaration if the prefix is unassociated. // ... generate setPrefix/setDefaultNamespace if the prefix of the element is unassociated // ... generate setPrefix/setDefaultNamespace for each unassociated prefix of the attributes. // // ... generate writeStartElement (See NOTE_A) // // ... generate writeNamespace/writerDefaultNamespace for the new namespace declarations determine during the "set" processing // ... generate writeAttribute for each attribute // NOTE_A: To confuse matters, some StAX vendors (including woodstox), believe that the setPrefix bindings // should occur after the writeStartElement. If this is the case, the writeStartElement is generated first. ArrayList writePrefixList = null; ArrayList writeNSList = null; // Get the namespace and prefix of the element OMNamespace eOMNamespace = element.getNamespace(); String ePrefix = null; String eNamespace = null; if (eOMNamespace != null) { ePrefix = eOMNamespace.getPrefix(); eNamespace = eOMNamespace.getNamespaceURI(); } ePrefix = (ePrefix != null && ePrefix.length() == 0) ? null : ePrefix; eNamespace = (eNamespace != null && eNamespace.length() == 0) ? null : eNamespace; // Write the startElement if required boolean setPrefixFirst = isSetPrefixBeforeStartElement(writer); if (!setPrefixFirst) { if (eNamespace != null) { if (ePrefix == null) { if (!isAssociated("", eNamespace, writer)) { if (writePrefixList == null) { writePrefixList = new ArrayList(); writeNSList = new ArrayList(); } if (! writePrefixList.contains("")) { writePrefixList.add(""); writeNSList.add(eNamespace); } } writer.writeStartElement("", localName, eNamespace); } else { /* * If XMLStreamWriter.writeStartElement(prefix,localName,namespaceURI) associates * the prefix with the namespace .. */ if (!isAssociated(ePrefix, eNamespace, writer)) { if (writePrefixList == null) { writePrefixList = new ArrayList(); writeNSList = new ArrayList(); } if (! writePrefixList.contains(ePrefix)) { writePrefixList.add(ePrefix); writeNSList.add(eNamespace); } } writer.writeStartElement(ePrefix, localName, eNamespace); } } else { writer.writeStartElement(localName); } } // Generate setPrefix for the namespace declarations Iterator it = element.getAllDeclaredNamespaces(); while (it != null && it.hasNext()) { OMNamespace omNamespace = (OMNamespace) it.next(); String prefix = null; String namespace = null; if (omNamespace != null) { prefix = omNamespace.getPrefix(); namespace = omNamespace.getNamespaceURI(); } prefix = (prefix != null && prefix.length() == 0) ? null : prefix; namespace = (namespace != null && namespace.length() == 0) ? null : namespace; String newPrefix = generateSetPrefix(prefix, namespace, writer, false, setPrefixFirst); // If this is a new association, remember it so that it can written out later if (newPrefix != null) { if (writePrefixList == null) { writePrefixList = new ArrayList(); writeNSList = new ArrayList(); } if (!writePrefixList.contains(newPrefix)) { writePrefixList.add(newPrefix); writeNSList.add(namespace); } } } // Generate setPrefix for the element // Get the prefix and namespace of the element. "" and null are identical. String newPrefix = generateSetPrefix(ePrefix, eNamespace, writer, false, setPrefixFirst); // If this is a new association, remember it so that it can written out later if (newPrefix != null) { if (writePrefixList == null) { writePrefixList = new ArrayList(); writeNSList = new ArrayList(); } if (!writePrefixList.contains(newPrefix)) { writePrefixList.add(newPrefix); writeNSList.add(eNamespace); } } // Now Generate setPrefix for each attribute Iterator attrs = element.getAllAttributes(); while (attrs != null && attrs.hasNext()) { OMAttribute attr = (OMAttribute) attrs.next(); OMNamespace omNamespace = attr.getNamespace(); String prefix = null; String namespace = null; if (omNamespace != null) { prefix = omNamespace.getPrefix(); namespace = omNamespace.getNamespaceURI(); } prefix = (prefix != null && prefix.length() == 0) ? null : prefix; namespace = (namespace != null && namespace.length() == 0) ? null : namespace; // Default prefix referencing is not allowed on an attribute if (prefix == null && namespace != null) { String writerPrefix = writer.getPrefix(namespace); writerPrefix = (writerPrefix != null && writerPrefix.length() == 0) ? null : writerPrefix; prefix = (writerPrefix != null) ? writerPrefix : getNextNSPrefix(); } newPrefix = generateSetPrefix(prefix, namespace, writer, true, setPrefixFirst); // If the prefix is not associated with a namespace yet, remember it so that we can // write out a namespace declaration if (newPrefix != null) { if (writePrefixList == null) { writePrefixList = new ArrayList(); writeNSList = new ArrayList(); } if (!writePrefixList.contains(newPrefix)) { writePrefixList.add(newPrefix); writeNSList.add(namespace); } } } // Write the startElement if required if (setPrefixFirst) { if (eNamespace != null) { if (ePrefix == null) { writer.writeStartElement("", localName, eNamespace); } else { writer.writeStartElement(ePrefix, localName, eNamespace); } } else { writer.writeStartElement(localName); } } // Now write out the list of namespace declarations in this list that we constructed // while doing the "set" processing. if (writePrefixList != null) { for (int i = 0; i < writePrefixList.size(); i++) { String prefix = (String) writePrefixList.get(i); String namespace = (String) writeNSList.get(i); if (prefix != null) { if (namespace == null) { writer.writeNamespace(prefix, ""); } else { writer.writeNamespace(prefix, namespace); } } else { writer.writeDefaultNamespace(namespace); } } } // Now write the attributes attrs = element.getAllAttributes(); while (attrs != null && attrs.hasNext()) { OMAttribute attr = (OMAttribute) attrs.next(); OMNamespace omNamespace = attr.getNamespace(); String prefix = null; String namespace = null; if (omNamespace != null) { prefix = omNamespace.getPrefix(); namespace = omNamespace.getNamespaceURI(); } prefix = (prefix != null && prefix.length() == 0) ? null : prefix; namespace = (namespace != null && namespace.length() == 0) ? null : namespace; if (prefix == null && namespace != null) { // Default namespaces are not allowed on an attribute reference. // Earlier in this code, a unique prefix was added for this case...now obtain and use it prefix = writer.getPrefix(namespace); //XMLStreamWriter doesn't allow for getPrefix to know whether you're asking for the prefix //for an attribute or an element. So if the namespace matches the default namespace getPrefix will return //the empty string, as if it were an element, in all cases (even for attributes, and even if //there was a prefix specifically set up for this), which is not the desired behavior. //Since the interface is base java, we can't fix it where we need to (by adding an attr boolean to //XMLStreamWriter.getPrefix), so we hack it in here... if (prefix == null || "".equals(prefix)) { for (int i = 0; i < writePrefixList.size(); i++) { if (namespace.equals((String) writeNSList.get(i))) { prefix = (String) writePrefixList.get(i); } } } } else if (namespace != null) { // Use the writer's prefix if it is different, but if the writers // prefix is empty then do not replace because attributes do not // default to the default namespace like elements do. String writerPrefix = writer.getPrefix(namespace); if (!prefix.equals(writerPrefix) && writerPrefix != null && !"".equals(writerPrefix)) { prefix = writerPrefix; } } if (namespace != null) { if(prefix == null && OMConstants.XMLNS_URI.equals(namespace)){ prefix = OMConstants.XMLNS_PREFIX; } // Qualified attribute writer.writeAttribute(prefix, namespace, attr.getLocalName(), attr.getAttributeValue()); } else { // Unqualified attribute writer.writeAttribute(attr.getLocalName(), attr.getAttributeValue()); } } } private static boolean checkForPrefixInTheCurrentContext(XMLStreamWriter writer, String nameSpaceName, String prefix) throws XMLStreamException { Iterator prefixesIter = writer.getNamespaceContext().getPrefixes(nameSpaceName); while (prefixesIter.hasNext()) { String prefix_w = (String) prefixesIter.next(); if (prefix_w.equals(prefix)) { // if found do not declare the ns return true; } } return false; } /** * serializeNamespaces * * @param element * @param writer * @throws XMLStreamException * @deprecated Use serializeStartpart instead */ public static void serializeNamespaces (OMElement element, XMLStreamWriter writer) throws XMLStreamException { Iterator namespaces = element.getAllDeclaredNamespaces(); if (namespaces != null) { while (namespaces.hasNext()) { serializeNamespace((OMNamespace) namespaces.next(), writer); } } } /** * Serialize attributes * * @param element * @param writer * @throws XMLStreamException * @deprecated Consider using serializeStartpart instead */ public static void serializeAttributes (OMElement element, XMLStreamWriter writer) throws XMLStreamException { Iterator attributes = element.getAllAttributes(); if (attributes != null && attributes.hasNext()) { while (attributes.hasNext()) { serializeAttribute((OMAttribute) attributes.next(), writer); } } } /** * Method serializeNormal. * * @param writer * @param cache * @throws XMLStreamException */ public static void serializeNormal (OMElement element, XMLStreamWriter writer, boolean cache) throws XMLStreamException { if (cache) { element.build(); } serializeStartpart(element, writer); OMNode firstChild = element.getFirstOMChild(); if (firstChild != null) { if (cache) { (firstChild).serialize(writer); } else { (firstChild).serializeAndConsume(writer); } } serializeEndpart(writer); } public static void serializeByPullStream (OMElement element, XMLStreamWriter writer) throws XMLStreamException { serializeByPullStream(element, writer, false); } public static void serializeByPullStream (OMElement element, XMLStreamWriter writer, boolean cache) throws XMLStreamException { StreamingOMSerializer streamingOMSerializer = new StreamingOMSerializer(); if (cache) { streamingOMSerializer.serialize(element.getXMLStreamReader(), writer); } else { XMLStreamReader xmlStreamReaderWithoutCaching = element.getXMLStreamReaderWithoutCaching(); streamingOMSerializer.serialize(xmlStreamReaderWithoutCaching, writer); } } /** * Get the next prefix name * @return next prefix name */ public static String getNextNSPrefix() { String prefix = "axis2ns" + ++nsCounter % Long.MAX_VALUE; /** * Calling getNextNSPrefix is "a last gasp" approach * for obtaining a prefix. In almost all cases, the * OM element should be provided a prefix by the source parser * or programatically by the user. We only get to this * spot if one was not supplied. * * The debug information is two-fold. * (1) It helps users determine at what point in the code this default * prefix is getting built. This will help them identify * where to change their code if they don't want a default * prefix. * * (2) It identifies this place in the code as suspect. * Do we really want to keep generating new prefixes (?). * This could result in lots of symbol table entries for the * subsequent parser that reads this data. This could hamper * extremely long run usages. * This could be a point where we want a plugin so that users can * decide their own strategy. Examples from other products * include generating a prefix number from the namespace * string. * */ if (DEBUG_ENABLED) { log.debug("Obtained next prefix:" + prefix); if (ADV_DEBUG_ENABLED && log.isTraceEnabled()) { log.trace(CommonUtils.callStackToString()); } } return prefix; } public static String getNextNSPrefix(XMLStreamWriter writer) { String prefix = getNextNSPrefix(); while (writer.getNamespaceContext().getNamespaceURI(prefix) != null) { prefix = getNextNSPrefix(); } return prefix; } /** * Generate setPrefix/setDefaultNamespace if the prefix is not associated * * @param prefix * @param namespace * @param writer * @param attr * @return prefix name if a setPrefix/setDefaultNamespace is performed */ public static String generateSetPrefix(String prefix, String namespace, XMLStreamWriter writer, boolean attr, boolean isSetPrefixFirst) throws XMLStreamException { prefix = (prefix == null) ? "" : prefix; // If the prefix and namespace are already associated, no generation is needed if (isAssociated(prefix, namespace, writer)) { return null; } // Attributes without a prefix always are associated with the unqualified namespace // according to the schema specification. No generation is needed. if (prefix.length() == 0 && namespace == null && attr) { return null; } // Generate setPrefix/setDefaultNamespace if the prefix is not associated. String newPrefix = null; if (namespace != null) { // Qualified Namespace if (prefix.length() == 0) { writer.setDefaultNamespace(namespace); newPrefix = ""; } else { writer.setPrefix(prefix, namespace); newPrefix = prefix; } } else { // Unqualified Namespace // Disable the default namespace writer.setDefaultNamespace(""); newPrefix = ""; } return newPrefix; } /** * @param prefix * @param namespace * @param writer * @return true if the prefix is associated with the namespace in the current context */ public static boolean isAssociated(String prefix, String namespace, XMLStreamWriter writer) throws XMLStreamException { // The "xml" prefix is always (implicitly) associated. Returning true here makes sure that // we never write a declaration for the xml namespace. See WSCOMMONS-281 for a discussion // of this issue. if ("xml".equals(prefix)) { return true; } // NOTE: Calling getNamespaceContext() on many XMLStreamWriter implementations is expensive. // Please use other writer methods first. // For consistency, convert null arguments. // This helps get around the parser implementation differences. // In addition, the getPrefix/getNamespace methods cannot be called with null parameters. prefix = (prefix == null) ? "" : prefix; namespace = (namespace == null) ? "" : namespace; if (namespace.length() > 0) { // QUALIFIED NAMESPACE // Get the namespace associated with the prefix String writerPrefix = writer.getPrefix(namespace); if (prefix.equals(writerPrefix)) { return true; } // It is possible that the namespace is associated with multiple prefixes, // So try getting the namespace as a second step. if (writerPrefix != null) { NamespaceContext nsContext = writer.getNamespaceContext(); if(nsContext != null) { String writerNS = nsContext.getNamespaceURI(prefix); return namespace.equals(writerNS); } } return false; } else { // UNQUALIFIED NAMESPACE // Cannot associate a prefix with an unqualifed name. // However sometimes axiom creates a fake prefix name if xmns="" is not in effect. // So return true if (prefix.length() > 0) { return true; } // Get the namespace associated with the prefix. // It is illegal to call getPrefix with null, but the specification is not // clear on what happens if called with "". So the following code is // protected try { String writerPrefix = writer.getPrefix(""); if (writerPrefix != null && writerPrefix.length() == 0) { return true; } } catch (Throwable t) { if (DEBUG_ENABLED) { log.debug("Caught exception from getPrefix(\"\"). Processing continues: " + t); } } // Fallback to using the namespace context NamespaceContext nsContext = writer.getNamespaceContext(); if (nsContext != null) { String writerNS = nsContext.getNamespaceURI(""); if (writerNS != null && writerNS.length() > 0) { return false; } } return true; } } } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/OMNamespaceImpl.java0000644000000000000000000000467511131637466027667 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl; import org.apache.axiom.om.OMNamespace; /** Class OMNamespaceImpl */ public class OMNamespaceImpl implements OMNamespace { /** Field prefix */ private String prefix; /** Field uri */ private String uri; /** * @param uri * @param prefix */ public OMNamespaceImpl(String uri, String prefix) { if (uri == null) { throw new IllegalArgumentException("Namespace URI may not be null"); } this.uri = uri; this.prefix = prefix; } /** * Method equals. * * @param uri * @param prefix * @return Returns boolean. */ public boolean equals(String uri, String prefix) { return (this.uri.equals(uri) && (this.prefix == null ? prefix == null : this.prefix.equals(prefix))); } public boolean equals(Object obj) { if (!(obj instanceof OMNamespace)) return false; OMNamespace other = (OMNamespace)obj; String otherPrefix = other.getPrefix(); return (uri.equals(other.getNamespaceURI()) && (prefix == null ? otherPrefix == null : prefix.equals(otherPrefix))); } /** * Method getPrefix. * * @return Returns String. */ public String getPrefix() { return prefix; } /** * Method getName. * * @return Returns String. */ public String getName() { return uri; } public String getNamespaceURI() { return uri; } public int hashCode() { return uri.hashCode() ^ (prefix != null ? prefix.hashCode() : 0); } } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/MTOMXMLStreamWriter.java0000644000000000000000000003730011131637466030412 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.OutputStream; import java.io.UnsupportedEncodingException; import java.util.LinkedList; import javax.activation.DataHandler; import javax.xml.namespace.NamespaceContext; import javax.xml.stream.FactoryConfigurationError; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamWriter; import org.apache.axiom.attachments.impl.BufferUtils; import org.apache.axiom.om.OMException; import org.apache.axiom.om.OMNode; import org.apache.axiom.om.OMOutputFormat; import org.apache.axiom.om.OMText; import org.apache.axiom.om.util.CommonUtils; import org.apache.axiom.om.util.StAXUtils; import org.apache.axiom.soap.SOAP11Constants; import org.apache.axiom.soap.SOAP12Constants; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; /** * MTOMXMLStreamWriter is an XML + Attachments stream writer. * * For the moment this assumes that transport takes the decision of whether to optimize or not by * looking at whether the MTOM optimize is enabled & also looking at the OM tree whether it has any * optimizable content. */ public class MTOMXMLStreamWriter implements XMLStreamWriter { private static Log log = LogFactory.getLog(MTOMXMLStreamWriter.class); private static boolean isDebugEnabled = log.isDebugEnabled(); private static boolean isTraceEnabled = log.isTraceEnabled(); private final static int UNSUPPORTED = -1; private final static int EXCEED_LIMIT = 1; private XMLStreamWriter xmlWriter; private OutputStream outStream; private LinkedList binaryNodeList = new LinkedList(); private ByteArrayOutputStream bufferedXML; // XML for the SOAPPart private OMOutputFormat format = new OMOutputFormat(); // State variables private boolean isEndDocument = false; // has endElement been called private boolean isComplete = false; // have the attachments been written private int depth = 0; // current eleement depth public MTOMXMLStreamWriter(XMLStreamWriter xmlWriter) { this.xmlWriter = xmlWriter; if (isTraceEnabled) { log.trace("Call Stack =" + CommonUtils.callStackToString()); } } /** * Creates a new MTOMXMLStreamWriter with specified encoding. * * @param outStream * @param format * @throws XMLStreamException * @throws FactoryConfigurationError * @see OMOutputFormat#DEFAULT_CHAR_SET_ENCODING */ public MTOMXMLStreamWriter(OutputStream outStream, OMOutputFormat format) throws XMLStreamException, FactoryConfigurationError { if (isDebugEnabled) { log.debug("OutputStream =" + outStream.getClass()); log.debug("OMFormat = " + format.toString()); } if (isTraceEnabled) { log.trace("Call Stack =" + CommonUtils.callStackToString()); } this.format = format; this.outStream = outStream; if (format.getCharSetEncoding() == null) //Default encoding is UTF-8 format.setCharSetEncoding(OMOutputFormat.DEFAULT_CHAR_SET_ENCODING); if (format.isOptimized()) { // REVIEW If the buffered XML gets too big, should it be written out to a file bufferedXML = new ByteArrayOutputStream(); xmlWriter = StAXUtils.createXMLStreamWriter(bufferedXML,format.getCharSetEncoding()); } else { xmlWriter = StAXUtils.createXMLStreamWriter(outStream, format.getCharSetEncoding()); } } public void writeStartElement(String string) throws XMLStreamException { xmlWriter.writeStartElement(string); depth++; } public void writeStartElement(String string, String string1) throws XMLStreamException { xmlWriter.writeStartElement(string, string1); depth++; } public void writeStartElement(String string, String string1, String string2) throws XMLStreamException { xmlWriter.writeStartElement(string, string1, string2); depth++; } public void writeEmptyElement(String string, String string1) throws XMLStreamException { xmlWriter.writeEmptyElement(string, string1); } public void writeEmptyElement(String string, String string1, String string2) throws XMLStreamException { xmlWriter.writeEmptyElement(string, string1, string2); } public void writeEmptyElement(String string) throws XMLStreamException { xmlWriter.writeEmptyElement(string); } public void writeEndElement() throws XMLStreamException { xmlWriter.writeEndElement(); depth--; } public void writeEndDocument() throws XMLStreamException { if (isDebugEnabled) { log.debug("writeEndDocument"); } xmlWriter.writeEndDocument(); isEndDocument = true; } public void close() throws XMLStreamException { if (isDebugEnabled) { log.debug("close"); } xmlWriter.close(); } /** * Flush is overridden to trigger the attachment serialization */ public void flush() throws XMLStreamException { if (isDebugEnabled) { log.debug("Calling MTOMXMLStreamWriter.flush"); } xmlWriter.flush(); String SOAPContentType; // flush() triggers the optimized attachment writing. // If the optimized attachments are specified, and the xml // document is completed, then write out the attachments. if (format.isOptimized() && !isComplete & (isEndDocument || depth == 0)) { if (isDebugEnabled) { log.debug("The XML writing is completed. Now the attachments are written"); } isComplete = true; if (format.isSOAP11()) { SOAPContentType = SOAP11Constants.SOAP_11_CONTENT_TYPE; } else { SOAPContentType = SOAP12Constants.SOAP_12_CONTENT_TYPE; } try { MIMEOutputUtils.complete(outStream, bufferedXML.toByteArray(), binaryNodeList, format.getMimeBoundary(), format.getRootContentId(), format.getCharSetEncoding(), SOAPContentType, format); bufferedXML.close(); bufferedXML = null; } catch (UnsupportedEncodingException e) { throw new OMException(e); } catch (IOException e) { throw new OMException(e); } } } public void writeAttribute(String string, String string1) throws XMLStreamException { xmlWriter.writeAttribute(string, string1); } public void writeAttribute(String string, String string1, String string2, String string3) throws XMLStreamException { xmlWriter.writeAttribute(string, string1, string2, string3); } public void writeAttribute(String string, String string1, String string2) throws XMLStreamException { xmlWriter.writeAttribute(string, string1, string2); } public void writeNamespace(String string, String string1) throws XMLStreamException { xmlWriter.writeNamespace(string, string1); } public void writeDefaultNamespace(String string) throws XMLStreamException { xmlWriter.writeDefaultNamespace(string); } public void writeComment(String string) throws XMLStreamException { xmlWriter.writeComment(string); } public void writeProcessingInstruction(String string) throws XMLStreamException { xmlWriter.writeProcessingInstruction(string); } public void writeProcessingInstruction(String string, String string1) throws XMLStreamException { xmlWriter.writeProcessingInstruction(string, string1); } public void writeCData(String string) throws XMLStreamException { xmlWriter.writeCData(string); } public void writeDTD(String string) throws XMLStreamException { xmlWriter.writeDTD(string); } public void writeEntityRef(String string) throws XMLStreamException { xmlWriter.writeEntityRef(string); } public void writeStartDocument() throws XMLStreamException { xmlWriter.writeStartDocument(); } public void writeStartDocument(String string) throws XMLStreamException { xmlWriter.writeStartDocument(string); } public void writeStartDocument(String string, String string1) throws XMLStreamException { xmlWriter.writeStartDocument(string, string1); } public void writeCharacters(String string) throws XMLStreamException { xmlWriter.writeCharacters(string); } public void writeCharacters(char[] chars, int i, int i1) throws XMLStreamException { xmlWriter.writeCharacters(chars, i, i1); } public String getPrefix(String string) throws XMLStreamException { return xmlWriter.getPrefix(string); } public void setPrefix(String string, String string1) throws XMLStreamException { xmlWriter.setPrefix(string, string1); } public void setDefaultNamespace(String string) throws XMLStreamException { xmlWriter.setDefaultNamespace(string); } public void setNamespaceContext(NamespaceContext namespaceContext) throws XMLStreamException { xmlWriter.setNamespaceContext(namespaceContext); } public NamespaceContext getNamespaceContext() { return xmlWriter.getNamespaceContext(); } public Object getProperty(String string) throws IllegalArgumentException { return xmlWriter.getProperty(string); } public boolean isOptimized() { return format.isOptimized(); } public String getContentType() { return format.getContentType(); } public void writeOptimized(OMText node) { if(isDebugEnabled){ log.debug("Start MTOMXMLStreamWriter.writeOptimized()"); } binaryNodeList.add(node); if(isDebugEnabled){ log.debug("Exit MTOMXMLStreamWriter.writeOptimized()"); } } /* * This method check if size of dataHandler exceeds the optimization Threshold * set on OMOutputFormat. * return true is size exceeds the threshold limit. * return false otherwise. */ public boolean isOptimizedThreshold(OMText node){ if(isDebugEnabled){ log.debug("Start MTOMXMLStreamWriter.isOptimizedThreshold()"); } DataHandler dh = (DataHandler)node.getDataHandler(); int optimized = UNSUPPORTED; if(dh!=null){ if(isDebugEnabled){ log.debug("DataHandler fetched, starting optimized Threshold processing"); } optimized= BufferUtils.doesDataHandlerExceedLimit(dh, format.getOptimizedThreshold()); } if(optimized == UNSUPPORTED || optimized == EXCEED_LIMIT){ if(log.isDebugEnabled()){ log.debug("node should be added to binart NodeList for optimization"); } return true; } return false; } public void setXmlStreamWriter(XMLStreamWriter xmlWriter) { this.xmlWriter = xmlWriter; } public XMLStreamWriter getXmlStreamWriter() { return xmlWriter; } public String getMimeBoundary() { return format.getMimeBoundary(); } public String getRootContentId() { return format.getRootContentId(); } public String getNextContentId() { return format.getNextContentId(); } /** * Returns the character set encoding scheme. If the value of the charSetEncoding is not set * then the default will be returned. * * @return Returns encoding. */ public String getCharSetEncoding() { return format.getCharSetEncoding(); } public void setCharSetEncoding(String charSetEncoding) { format.setCharSetEncoding(charSetEncoding); } public String getXmlVersion() { return format.getXmlVersion(); } public void setXmlVersion(String xmlVersion) { format.setXmlVersion(xmlVersion); } public void setSoap11(boolean b) { format.setSOAP11(b); } public boolean isIgnoreXMLDeclaration() { return format.isIgnoreXMLDeclaration(); } public void setIgnoreXMLDeclaration(boolean ignoreXMLDeclaration) { format.setIgnoreXMLDeclaration(ignoreXMLDeclaration); } public void setDoOptimize(boolean b) { format.setDoOptimize(b); } /** * Get the output format used by this writer. *

* The caller should use the returned instance in a read-only way, i.e. * he should not modify the settings of the output format. Any attempt * to do so will lead to unpredictable results. * * @return the output format used by this writer */ public OMOutputFormat getOutputFormat() { return format; } public void setOutputFormat(OMOutputFormat format) { this.format = format; } /** * If this XMLStreamWriter is connected to an OutputStream * then the OutputStream is returned. This allows a node * (perhaps an OMSourcedElement) to write its content * directly to the OutputStream. * @return OutputStream or null */ public OutputStream getOutputStream() throws XMLStreamException { OutputStream os = null; if (bufferedXML != null) { os = bufferedXML; } else { os = outStream; } if (isDebugEnabled) { if (os == null) { log.debug("Direct access to the output stream is not available."); } else if (bufferedXML != null) { log.debug("Returning access to the buffered xml stream: " + bufferedXML); } else { log.debug("Returning access to the original output stream: " + os); } } if (os != null) { // Flush the state of the writer..Many times the // write defers the writing of tag characters (>) // until the next write. Flush out this character this.writeCharacters(""); this.flush(); } return os; } /** * Writes the relevant output. * * @param writer * @throws XMLStreamException */ private void writeOutput(OMText textNode) throws XMLStreamException { int type = textNode.getType(); if (type == OMNode.TEXT_NODE || type == OMNode.SPACE_NODE) { writeCharacters(textNode.getText()); } else if (type == OMNode.CDATA_SECTION_NODE) { writeCData(textNode.getText()); } else if (type == OMNode.ENTITY_REFERENCE_NODE) { writeEntityRef(textNode.getText()); } } } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/traverse/0000755000000000000000000000000011131637466025671 5ustar rootrootaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/traverse/OMFilterIterator.java0000644000000000000000000000456511131637466031741 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.traverse; import java.util.Iterator; import java.util.NoSuchElementException; import org.apache.axiom.om.OMNode; /** * Abstract iterator that returns matching nodes from another iterator. */ // TODO: We should use this as base class for the OMChildrenXxxIterator classes public abstract class OMFilterIterator implements Iterator { private final Iterator parent; private OMNode nextNode; private boolean noMoreNodes; public OMFilterIterator(Iterator parent) { this.parent = parent; } /** * Determine whether the given node matches the filter criteria. * * @param node the node to test * @return true if the node matches, i.e. if it should be returned * by a call to {@link #next()} */ protected abstract boolean matches(OMNode node); public boolean hasNext() { if (noMoreNodes) { return false; } else if (nextNode != null) { return true; } else { while (parent.hasNext()) { OMNode node = (OMNode)parent.next(); if (matches(node)) { nextNode = node; return true; } } noMoreNodes = true; return false; } } public Object next() { if (hasNext()) { OMNode result = nextNode; nextNode = null; return result; } else { throw new NoSuchElementException(); } } public void remove() { parent.remove(); } } ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/traverse/OMDescendantsIterator.javaaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/traverse/OMDescendantsIterator.0000644000000000000000000000351011131637466032072 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.traverse; import org.apache.axiom.om.OMContainer; import org.apache.axiom.om.OMNode; /** * Iterator that iterates over all descendants in document order. */ public class OMDescendantsIterator extends OMAbstractIterator { private int level; public OMDescendantsIterator(OMNode firstNode) { super(firstNode); } protected OMNode getNextNode(OMNode currentNode) { if (currentNode instanceof OMContainer) { OMNode firstChild = ((OMContainer)currentNode).getFirstOMChild(); if (firstChild != null) { level++; return firstChild; } } OMNode node = currentNode; while (true) { OMNode nextSibling = node.getNextOMSibling(); if (nextSibling != null) { return nextSibling; } else if (level == 0) { return null; } else { node = (OMNode)node.getParent(); level--; } } } } ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/traverse/OMChildrenIterator.javaaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/traverse/OMChildrenIterator.jav0000644000000000000000000000740711131637466032101 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.traverse; import org.apache.axiom.om.OMException; import org.apache.axiom.om.OMNode; import java.util.Iterator; import java.util.NoSuchElementException; /** Class OMChildrenIterator */ public class OMChildrenIterator implements Iterator { /** Field currentChild */ protected OMNode currentChild; /** Field lastChild */ protected OMNode lastChild; /** Field nextCalled */ protected boolean nextCalled = false; /** Field removeCalled */ protected boolean removeCalled = false; /** * Constructor OMChildrenIterator. * * @param currentChild */ public OMChildrenIterator(OMNode currentChild) { this.currentChild = currentChild; } /** * Removes the last element returned by the iterator (optional operation) from the underlying * collection. This method must be called only once per call to next. The behavior * of an iterator is unspecified if the underlying collection is modified while the iteration is * in progress in any way other than by calling this method. * * @throws UnsupportedOperationException if the remove operation is not supported by * this Iterator. * @throws IllegalStateException if the next method has not yet been called, or * the remove method has already been called * after the last call to the next method. */ public void remove() { if (!nextCalled) { throw new IllegalStateException( "next method has not yet being called"); } if (removeCalled) { throw new IllegalStateException("remove has already being called"); } removeCalled = true; // since this acts on the last child there is no need to mess with the current child if (lastChild == null) { throw new OMException("cannot remove a child at this stage!"); } lastChild.detach(); } /** * Returns true if the iteration has more elements. (In other words, returns * true if next would return an element rather than throwing an exception.) * * @return Returns true if the iterator has more elements. */ public boolean hasNext() { return (currentChild != null); } /** * Returns the next element in the iteration. * * @return Returns the next element in the iteration. * @throws java.util.NoSuchElementException * iteration has no more elements. */ public Object next() { nextCalled = true; removeCalled = false; if (hasNext()) { lastChild = currentChild; currentChild = currentChild.getNextOMSibling(); return lastChild; } else { throw new NoSuchElementException(); } } } ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/traverse/OMChildrenNamespaceIterator.javaaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/traverse/OMChildrenNamespaceIte0000644000000000000000000000277511131637466032072 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.traverse; import org.apache.axiom.om.OMNode; import javax.xml.namespace.QName; /** * Iterate over elements with the same namespace uri * */ public class OMChildrenNamespaceIterator extends OMChildrenQNameIterator { public OMChildrenNamespaceIterator(OMNode currentChild, String uri) { super(currentChild, new QName(uri, "dummyName")); } /** * This version of equals returns true if the local parts match. * * @param searchQName * @param currentQName * @return true if equals */ public boolean isEqual(QName searchQName, QName currentQName) { return searchQName.getNamespaceURI().equals(searchQName.getNamespaceURI()); } } ././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/traverse/OMQualifiedNameFilterIterator.javaaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/traverse/OMQualifiedNameFilterI0000644000000000000000000000434011131637466032034 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.traverse; import java.util.Iterator; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMNode; /** * Iterator that selects elements based on prefix and local name. * Note that namespace URIs are not taken into account by the filter. */ public class OMQualifiedNameFilterIterator extends OMFilterIterator { private final String prefix; private final String localName; public OMQualifiedNameFilterIterator(Iterator parent, String qualifiedName) { super(parent); int idx = qualifiedName.indexOf(':'); if (idx == -1) { prefix = null; localName = qualifiedName; } else { prefix = qualifiedName.substring(0, idx); localName = qualifiedName.substring(idx+1); } } protected boolean matches(OMNode node) { if (node instanceof OMElement) { OMElement element = (OMElement)node; if (!localName.equals(element.getLocalName())) { return false; } else { OMNamespace ns = ((OMElement)node).getNamespace(); if (prefix == null) { return ns == null || ns.getPrefix().length() == 0; } else { return ns != null && prefix.equals(ns.getPrefix()); } } } else { return false; } } } ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/traverse/OMChildElementIterator.javaaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/traverse/OMChildElementIterator0000644000000000000000000000746611131637466032134 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.traverse; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMException; import org.apache.axiom.om.OMNode; import java.util.Iterator; public class OMChildElementIterator implements Iterator { /** Field currentChild */ protected OMNode currentChild; /** Field lastChild */ protected OMNode lastChild; /** Field nextCalled */ protected boolean nextCalled = false; /** Field removeCalled */ protected boolean removeCalled = false; /** * Constructor OMChildrenIterator. * * @param currentChild */ public OMChildElementIterator(OMElement currentChild) { this.currentChild = currentChild; } /** * Removes the last element returned by the iterator (optional operation) from the underlying * collection. This method can be called only once per call to next. The behavior of * an iterator is unspecified if the underlying collection is modified while the iteration is in * progress in any way other than by calling this method. * * @throws UnsupportedOperationException if the remove operation is not supported by * this Iterator. * @throws IllegalStateException if the next method has not yet been called, or * the remove method has already been called * after the last call to the next method. */ public void remove() { if (!nextCalled) { throw new IllegalStateException( "next method has not yet being called"); } if (removeCalled) { throw new IllegalStateException("remove has already being called"); } removeCalled = true; // since this acts on the last child there is no need to mess with the current child if (lastChild == null) { throw new OMException("cannot remove a child at this stage!"); } lastChild.detach(); } /** * Returns true if the iteration has more elements. (In other words, returns * true if next would return an element rather than throwing an exception.) * * @return Returns true if the iterator has more elements. */ public boolean hasNext() { return (currentChild != null); } /** * Returns the next element in the iteration. * * @return Returns the next element in the iteration. * @throws java.util.NoSuchElementException * iteration has no more elements. */ public Object next() { nextCalled = true; removeCalled = false; if (hasNext()) { lastChild = currentChild; do { currentChild = currentChild.getNextOMSibling(); } while (currentChild != null && currentChild.getType() != OMNode.ELEMENT_NODE); return lastChild; } return null; } } ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/traverse/OMAbstractIterator.javaaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/traverse/OMAbstractIterator.jav0000644000000000000000000000435111131637466032107 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.traverse; import java.util.Iterator; import java.util.NoSuchElementException; import org.apache.axiom.om.OMNode; /** * Abstract base class for iterators over sets of OM nodes. */ // TODO: We should implement remove and use this as base class for OMChildrenIterator public abstract class OMAbstractIterator implements Iterator { private OMNode currentNode; private OMNode nextNode; private boolean noMoreNodes; public OMAbstractIterator(OMNode firstNode) { if (firstNode == null) { noMoreNodes = true; } else { nextNode = firstNode; } } /** * Get the next node. * * @param currentNode the predecessor of the node to retrieve * @return the next node */ protected abstract OMNode getNextNode(OMNode currentNode); public boolean hasNext() { if (noMoreNodes) { return false; } else if (nextNode != null) { return true; } else { nextNode = getNextNode(currentNode); noMoreNodes = nextNode == null; return !noMoreNodes; } } public Object next() { if (hasNext()) { currentNode = nextNode; nextNode = null; return currentNode; } else { throw new NoSuchElementException(); } } public void remove() { throw new UnsupportedOperationException(); } } ././@LongLink0000000000000000000000000000017300000000000011566 Lustar rootrootaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/traverse/OMChildrenWithSpecificAttributeIterator.javaaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/traverse/OMChildrenWithSpecific0000644000000000000000000000766111131637466032114 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.traverse; import org.apache.axiom.om.OMAttribute; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMNode; import javax.xml.namespace.QName; /** Class OMChildrenWithSpecificAttributeIterator */ public class OMChildrenWithSpecificAttributeIterator extends OMChildrenIterator { /** Field attributeName */ private QName attributeName; /** Field attributeValue */ private String attributeValue; /** Field detach */ private boolean detach; private boolean doCaseSensitiveValueChecks = true; /** * Constructor OMChildrenWithSpecificAttributeIterator. * * @param currentChild * @param attributeName * @param attributeValue * @param detach */ public OMChildrenWithSpecificAttributeIterator(OMNode currentChild, QName attributeName, String attributeValue, boolean detach) { super(currentChild); this.attributeName = attributeName; this.attributeValue = attributeValue; this.detach = detach; } public void setCaseInsensitiveValueChecks(boolean val) { doCaseSensitiveValueChecks = val; } /** * Method hasNext. * * @return Returns boolean. */ public boolean hasNext() { // First check whether we have a child, using the super class if (currentChild == null) { return false; } boolean isMatchingNodeFound = false; boolean needToMoveForward = true; // now we have a child to check. If its an OMElement and matches the criteria, then we are done while (needToMoveForward) { // check the current node for the criteria if (currentChild instanceof OMElement) { OMAttribute attr = ((OMElement) currentChild).getAttribute( attributeName); if ((attr != null) && (doCaseSensitiveValueChecks ? attr.getAttributeValue().equals(attributeValue) : attr.getAttributeValue().equalsIgnoreCase(attributeValue))) { isMatchingNodeFound = true; needToMoveForward = false; } else { currentChild = currentChild.getNextOMSibling(); needToMoveForward = !(currentChild == null); } } else { // get the next named node currentChild = currentChild.getNextOMSibling(); needToMoveForward = !(currentChild == null); } } return isMatchingNodeFound; } /** * Method next. * * @return Returns Object. */ public Object next() { nextCalled = true; removeCalled = false; lastChild = currentChild; currentChild = currentChild.getNextOMSibling(); if ((lastChild != null) && detach && lastChild.getParent() != null) { lastChild.detach(); } return lastChild; } } ././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/traverse/OMChildrenLegacyQNameIterator.javaaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/traverse/OMChildrenLegacyQNameI0000644000000000000000000000432311131637466031762 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.traverse; import org.apache.axiom.om.OMNode; import javax.xml.namespace.QName; /** * Iterate over elements with the QName that uses the * legacy algorithm. This iterator is only retained for migrating * some existing customers that have a dependency on the old algorithm * @deprecated */ public class OMChildrenLegacyQNameIterator extends OMChildrenQNameIterator { public OMChildrenLegacyQNameIterator(OMNode currentChild, QName qName) { super(currentChild, qName); } /** * This version of equals returns true if the local parts match. * * @param searchQName * @param currentQName * @return true if equals */ public boolean isEqual(QName searchQName, QName currentQName) { // if the given localname is null, whatever value this.qname has, its a match. // But can one give a QName without a localName ?? String localPart = searchQName.getLocalPart(); boolean localNameMatch =(localPart == null) || (localPart.equals("")) || ((currentQName != null) && currentQName.getLocalPart().equals(localPart)); String namespaceURI = searchQName.getNamespaceURI(); boolean namespaceURIMatch = (namespaceURI == null) || (namespaceURI.equals(""))|| ((currentQName != null) && currentQName.getNamespaceURI().equals(namespaceURI)); return localNameMatch && namespaceURIMatch; } } ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/traverse/OMQNameFilterIterator.javaaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/traverse/OMQNameFilterIterator.0000644000000000000000000000275711131637466032022 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.traverse; import java.util.Iterator; import javax.xml.namespace.QName; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMNode; /** * Iterator that selects elements based on {@link QName} equality, * i.e. namespace URI and local name. * Namespace prefixes are not taken into account by the filter. */ public class OMQNameFilterIterator extends OMFilterIterator { private final QName qname; public OMQNameFilterIterator(Iterator parent, QName qname) { super(parent); this.qname = qname; } protected boolean matches(OMNode node) { return node instanceof OMElement && ((OMElement)node).getQName().equals(qname); } } ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/traverse/OMChildrenQNameIterator.javaaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/traverse/OMChildrenQNameIterato0000644000000000000000000001213511131637466032054 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.traverse; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMNode; import javax.xml.namespace.QName; /** * Class OMChildrenQNameIterator * * This iterator returns the elements that have a matching QName. * This class can be extended to customize the QName equality. * */ public class OMChildrenQNameIterator extends OMChildrenIterator { /** Field givenQName */ private final QName givenQName; /** Field needToMoveForward */ private boolean needToMoveForward = true; /** Field isMatchingNodeFound */ private boolean isMatchingNodeFound = false; /** * Constructor OMChildrenQNameIterator. * * @param currentChild * @param givenQName */ public OMChildrenQNameIterator(OMNode currentChild, QName givenQName) { super(currentChild); this.givenQName = givenQName; findNextElementWithQName(); } /** * Returns true if the qnames are equal. * The default algorithm is to use the QName equality (which examines the namespace and localPart). * You can extend this class to provide your own equality algorithm. * @param searchQName * @param currentQName * @return true if qnames are equal. */ public boolean isEqual(QName searchQName, QName currentQName) { return searchQName.equals(currentQName); } /** * Returns true if the iteration has more elements. (In other words, returns * true if next would return an element rather than throwing an exception.) * * @return Returns true if the iterator has more elements. */ public boolean hasNext() { while (needToMoveForward) { findNextElementWithQName(); } return isMatchingNodeFound; } private void findNextElementWithQName() { if (currentChild != null) { // check the current node for the criteria if (currentChild instanceof OMElement) { QName thisQName = ((OMElement)currentChild).getQName(); // A null givenName is an indicator to return all elements if (givenQName == null || isEqual(givenQName, thisQName)) { isMatchingNodeFound = true; needToMoveForward = false; return; } } // get the next named node currentChild = currentChild.getNextOMSibling(); isMatchingNodeFound = needToMoveForward = !(currentChild == null); } else { needToMoveForward = false; } } /** * Returns the next element in the iteration. * * @return Returns the next element in the iteration. * @throws java.util.NoSuchElementException * iteration has no more elements. */ public Object next() { // reset the flags needToMoveForward = true; isMatchingNodeFound = false; nextCalled = true; removeCalled = false; lastChild = currentChild; currentChild = currentChild.getNextOMSibling(); return lastChild; } /** * Prior versions of the OMChildrenQNameIterator used the following * logic to check equality. This algorithm is incorrect; however some customers * have dependency on this behavior. This method is retained (but deprecated) to allow * them an opportunity to use the old algorithm. * * @param searchQName * @param currentQName * @return true using legacy equality match * @deprecated */ public static boolean isEquals_Legacy(QName searchQName, QName currentQName) { // if the given localname is null, whatever value this.qname has, its a match. But can one give a QName without a localName ?? String localPart = searchQName.getLocalPart(); boolean localNameMatch =(localPart == null) || (localPart.equals("")) || ((currentQName != null) && currentQName.getLocalPart().equals(localPart)); String namespaceURI = searchQName.getNamespaceURI(); boolean namespaceURIMatch = (namespaceURI == null) || (namespaceURI.equals(""))|| ((currentQName != null) && currentQName.getNamespaceURI().equals(namespaceURI)); return localNameMatch && namespaceURIMatch; } } ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/traverse/OMChildrenLocalNameIterator.javaaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/traverse/OMChildrenLocalNameIte0000644000000000000000000000276611131637466032031 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.traverse; import org.apache.axiom.om.OMNode; import javax.xml.namespace.QName; /** * Iterate over elements with the same LocalName * */ public class OMChildrenLocalNameIterator extends OMChildrenQNameIterator { public OMChildrenLocalNameIterator(OMNode currentChild, String localName) { super(currentChild, new QName("", localName)); } /** * This version of equals returns true if the local parts match. * * @param searchQName * @param currentQName * @return true if equals */ public boolean isEqual(QName searchQName, QName currentQName) { return searchQName.getLocalPart().equals(searchQName.getLocalPart()); } } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/serialize/0000755000000000000000000000000011131637466026025 5ustar rootroot././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/serialize/StreamingOMSerializer.javaaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/serialize/StreamingOMSerializer0000644000000000000000000006074511131637466032203 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.serialize; import org.apache.axiom.om.OMAbstractFactory; import org.apache.axiom.om.OMAttachmentAccessor; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMSerializer; import org.apache.axiom.om.OMText; import org.apache.axiom.om.impl.MTOMXMLStreamWriter; import org.apache.axiom.om.impl.util.OMSerializerUtil; import org.apache.axiom.om.util.ElementHelper; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import javax.activation.DataHandler; import javax.xml.namespace.NamespaceContext; import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamConstants; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import javax.xml.stream.XMLStreamWriter; import java.util.ArrayList; /** Class StreamingOMSerializer */ public class StreamingOMSerializer implements XMLStreamConstants, OMSerializer { Log log = LogFactory.getLog(StreamingOMSerializer.class); private static int namespaceSuffix = 0; public static final String NAMESPACE_PREFIX = "ns"; /* * The behavior of the serializer is such that it returns when it encounters the * starting element for the second time. The depth variable tracks the depth of the * serilizer and tells it when to return. * Note that it is assumed that this serialization starts on an Element. */ /** Field depth */ private int depth = 0; public static final QName XOP_INCLUDE = new QName("http://www.w3.org/2004/08/xop/include", "Include"); private boolean inputHasAttachments = false; private boolean skipEndElement = false; /** * Method serialize. * * @param node * @param writer * @throws XMLStreamException */ public void serialize(XMLStreamReader node, XMLStreamWriter writer) throws XMLStreamException { serialize(node, writer, true); } /** * @param node * @param writer * @param startAtNext indicate if reading should start at next event or current event * @throws XMLStreamException */ public void serialize(XMLStreamReader node, XMLStreamWriter writer, boolean startAtNext) throws XMLStreamException { // Set attachment status if (node instanceof OMAttachmentAccessor) { inputHasAttachments = true; } serializeNode(node, writer, startAtNext); } /** * Method serializeNode. * * @param reader * @param writer * @throws XMLStreamException */ protected void serializeNode(XMLStreamReader reader, XMLStreamWriter writer) throws XMLStreamException { serializeNode(reader, writer, true); } protected void serializeNode(XMLStreamReader reader, XMLStreamWriter writer, boolean startAtNext) throws XMLStreamException { // TODO We get the StAXWriter at this point and uses it hereafter // assuming that this is the only entry point to this class. // If there can be other classes calling methodes of this we might // need to change methode signatures to OMOutputer // If not startAtNext, then seed the processing with the current element. boolean useCurrentEvent = !startAtNext; while (reader.hasNext() || useCurrentEvent) { int event = 0; if (useCurrentEvent) { event = reader.getEventType(); useCurrentEvent = false; } else { event = reader.next(); } if (event == START_ELEMENT) { serializeElement(reader, writer); depth++; } else if (event == ATTRIBUTE) { serializeAttributes(reader, writer); } else if (event == CHARACTERS) { serializeText(reader, writer); } else if (event == COMMENT) { serializeComment(reader, writer); } else if (event == CDATA) { serializeCData(reader, writer); } else if (event == END_ELEMENT) { serializeEndElement(writer); depth--; } else if (event == START_DOCUMENT) { depth++; //if a start document is found then increment the depth } else if (event == END_DOCUMENT) { if (depth != 0) depth--; //for the end document - reduce the depth try { serializeEndElement(writer); } catch (Exception e) { //TODO: log exceptions } } if (depth == 0) { break; } } } /** * @param reader * @param writer * @throws XMLStreamException */ protected void serializeElement(XMLStreamReader reader, XMLStreamWriter writer) throws XMLStreamException { // Note: To serialize the start tag, we must follow the order dictated by the JSR-173 (StAX) specification. // Please keep this code in sync with the code in OMSerializerUtil.serializeStartpart // The algorithm is: // ... generate setPrefix/setDefaultNamespace for each namespace declaration if the prefix is unassociated. // ... generate setPrefix/setDefaultNamespace if the prefix of the element is unassociated // ... generate setPrefix/setDefaultNamespace for each unassociated prefix of the attributes. // // ... generate writeStartElement (See NOTE_A) // // ... generate writeNamespace/writerDefaultNamespace for the new namespace declarations determine during the "set" processing // ... generate writeAttribute for each attribute // NOTE_A: To confuse matters, some StAX vendors (including woodstox), believe that the setPrefix bindings // should occur after the writeStartElement. If this is the case, the writeStartElement is generated first. ArrayList writePrefixList = null; ArrayList writeNSList = null; // Get the prefix and namespace of the element. "" and null are identical. String ePrefix = reader.getPrefix(); ePrefix = (ePrefix != null && ePrefix.length() == 0) ? null : ePrefix; String eNamespace = reader.getNamespaceURI(); eNamespace = (eNamespace != null && eNamespace.length() == 0) ? null : eNamespace; if (this.inputHasAttachments && XOP_INCLUDE.getNamespaceURI().equals(eNamespace)) { String eLocalPart = reader.getLocalName(); if (XOP_INCLUDE.getLocalPart().equals(eLocalPart)) { if (serializeXOPInclude(reader, writer)) { // Since the xop:include is replaced with inlined text, // skip the rest of serialize element and skip the end event for // of the xop:include skipEndElement = true; return; } } } // Write the startElement if required boolean setPrefixFirst = OMSerializerUtil.isSetPrefixBeforeStartElement(writer); if (!setPrefixFirst) { if (eNamespace != null) { if (ePrefix == null) { if (!OMSerializerUtil.isAssociated("", eNamespace, writer)) { if (writePrefixList == null) { writePrefixList = new ArrayList(); writeNSList = new ArrayList(); } writePrefixList.add(""); writeNSList.add(eNamespace); } writer.writeStartElement("", reader.getLocalName(), eNamespace); } else { if (!OMSerializerUtil.isAssociated(ePrefix, eNamespace, writer)) { if (writePrefixList == null) { writePrefixList = new ArrayList(); writeNSList = new ArrayList(); } writePrefixList.add(ePrefix); writeNSList.add(eNamespace); } writer.writeStartElement(ePrefix, reader.getLocalName(), eNamespace); } } else { writer.writeStartElement(reader.getLocalName()); } } // Generate setPrefix for the namespace declarations int count = reader.getNamespaceCount(); for (int i = 0; i < count; i++) { String prefix = reader.getNamespacePrefix(i); prefix = (prefix != null && prefix.length() == 0) ? null : prefix; String namespace = reader.getNamespaceURI(i); namespace = (namespace != null && namespace.length() == 0) ? null : namespace; String newPrefix = OMSerializerUtil.generateSetPrefix(prefix, namespace, writer, false, setPrefixFirst); // If this is a new association, remember it so that it can written out later if (newPrefix != null) { if (writePrefixList == null) { writePrefixList = new ArrayList(); writeNSList = new ArrayList(); } if (!writePrefixList.contains(newPrefix)) { writePrefixList.add(newPrefix); writeNSList.add(namespace); } } } // Generate setPrefix for the element // If the prefix is not associated with a namespace yet, remember it so that we can // write out a namespace declaration String newPrefix = OMSerializerUtil.generateSetPrefix(ePrefix, eNamespace, writer, false, setPrefixFirst); // If this is a new association, remember it so that it can written out later if (newPrefix != null) { if (writePrefixList == null) { writePrefixList = new ArrayList(); writeNSList = new ArrayList(); } if (!writePrefixList.contains(newPrefix)) { writePrefixList.add(newPrefix); writeNSList.add(eNamespace); } } // Now Generate setPrefix for each attribute count = reader.getAttributeCount(); for (int i = 0; i < count; i++) { String prefix = reader.getAttributePrefix(i); prefix = (prefix != null && prefix.length() == 0) ? null : prefix; String namespace = reader.getAttributeNamespace(i); namespace = (namespace != null && namespace.length() == 0) ? null : namespace; // Default prefix referencing is not allowed on an attribute if (prefix == null && namespace != null) { String writerPrefix = writer.getPrefix(namespace); writerPrefix = (writerPrefix != null && writerPrefix.length() == 0) ? null : writerPrefix; prefix = (writerPrefix != null) ? writerPrefix : generateUniquePrefix(writer.getNamespaceContext()); } newPrefix = OMSerializerUtil.generateSetPrefix(prefix, namespace, writer, true, setPrefixFirst); // If the prefix is not associated with a namespace yet, remember it so that we can // write out a namespace declaration if (newPrefix != null) { if (writePrefixList == null) { writePrefixList = new ArrayList(); writeNSList = new ArrayList(); } if (!writePrefixList.contains(newPrefix)) { writePrefixList.add(newPrefix); writeNSList.add(namespace); } } } // Now write the startElement if (setPrefixFirst) { if (eNamespace != null) { if (ePrefix == null) { writer.writeStartElement("", reader.getLocalName(), eNamespace); } else { writer.writeStartElement(ePrefix, reader.getLocalName(), eNamespace); } } else { writer.writeStartElement(reader.getLocalName()); } } // Now write out the list of namespace declarations in this list that we constructed // while doing the "set" processing. if (writePrefixList != null) { for (int i = 0; i < writePrefixList.size(); i++) { String prefix = (String) writePrefixList.get(i); String namespace = (String) writeNSList.get(i); if (prefix != null) { if (namespace == null) { writer.writeNamespace(prefix, ""); } else { writer.writeNamespace(prefix, namespace); } } else { writer.writeDefaultNamespace(namespace); } } } // Now write the attributes count = reader.getAttributeCount(); for (int i = 0; i < count; i++) { String prefix = reader.getAttributePrefix(i); prefix = (prefix != null && prefix.length() == 0) ? null : prefix; String namespace = reader.getAttributeNamespace(i); namespace = (namespace != null && namespace.length() == 0) ? null : namespace; if (prefix == null && namespace != null) { // Default namespaces are not allowed on an attribute reference. // Earlier in this code, a unique prefix was added for this case...now obtain and use it prefix = writer.getPrefix(namespace); //XMLStreamWriter doesn't allow for getPrefix to know whether you're asking for the prefix //for an attribute or an element. So if the namespace matches the default namespace getPrefix will return //the empty string, as if it were an element, in all cases (even for attributes, and even if //there was a prefix specifically set up for this), which is not the desired behavior. //Since the interface is base java, we can't fix it where we need to (by adding an attr boolean to //XMLStreamWriter.getPrefix), so we hack it in here... if (prefix == null || "".equals(prefix)) { for (int j = 0; j < writePrefixList.size(); j++) { if (namespace.equals((String) writeNSList.get(j))) { prefix = (String) writePrefixList.get(j); } } } } else if (namespace != null) { // Use the writer's prefix if it is different, but if the writers // prefix is empty then do not replace because attributes do not // default to the default namespace like elements do. String writerPrefix = writer.getPrefix(namespace); if (!prefix.equals(writerPrefix) && !"".equals(writerPrefix)) { prefix = writerPrefix; } } if (namespace != null) { // Qualified attribute writer.writeAttribute(prefix, namespace, reader.getAttributeLocalName(i), reader.getAttributeValue(i)); } else { // Unqualified attribute writer.writeAttribute(reader.getAttributeLocalName(i), reader.getAttributeValue(i)); } } } /** * Method serializeEndElement. * * @param writer * @throws XMLStreamException */ protected void serializeEndElement(XMLStreamWriter writer) throws XMLStreamException { if (this.skipEndElement) { skipEndElement = false; return; } writer.writeEndElement(); } /** * @param reader * @param writer * @throws XMLStreamException */ protected void serializeText(XMLStreamReader reader, XMLStreamWriter writer) throws XMLStreamException { writer.writeCharacters(reader.getText()); } /** * Method serializeCData. * * @param reader * @param writer * @throws XMLStreamException */ protected void serializeCData(XMLStreamReader reader, XMLStreamWriter writer) throws XMLStreamException { writer.writeCData(reader.getText()); } /** * Method serializeComment. * * @param reader * @param writer * @throws XMLStreamException */ protected void serializeComment(XMLStreamReader reader, XMLStreamWriter writer) throws XMLStreamException { writer.writeComment(reader.getText()); } /** * @param reader * @param writer * @throws XMLStreamException */ protected void serializeAttributes(XMLStreamReader reader, XMLStreamWriter writer) throws XMLStreamException { int count = reader.getAttributeCount(); String prefix = null; String namespaceName = null; String writerPrefix = null; for (int i = 0; i < count; i++) { prefix = reader.getAttributePrefix(i); namespaceName = reader.getAttributeNamespace(i); /* Some parser implementations return null for the unqualified namespace. But getPrefix(null) will throw an exception (according to the XMLStreamWriter javadoc. We guard against this by using "" for the unqualified namespace. */ namespaceName =(namespaceName == null) ? "" : namespaceName; // Using getNamespaceContext should be avoided when not necessary. // Some parser implementations construct a new NamespaceContext each time it is invoked. // writerPrefix = writer.getNamespaceContext().getPrefix(namespaceName); writerPrefix = writer.getPrefix(namespaceName); if (!"".equals(namespaceName)) { //prefix has already being declared but this particular attrib has a //no prefix attached. So use the prefix provided by the writer if (writerPrefix != null && (prefix == null || prefix.equals(""))) { writer.writeAttribute(writerPrefix, namespaceName, reader.getAttributeLocalName(i), reader.getAttributeValue(i)); //writer prefix is available but different from the current //prefix of the attrib. We should be decalring the new prefix //as a namespace declaration } else if (prefix != null && !"".equals(prefix) && !prefix.equals(writerPrefix)) { writer.writeNamespace(prefix, namespaceName); writer.writeAttribute(prefix, namespaceName, reader.getAttributeLocalName(i), reader.getAttributeValue(i)); //prefix is null (or empty), but the namespace name is valid! it has not //being written previously also. So we need to generate a prefix //here } else { prefix = generateUniquePrefix(writer.getNamespaceContext()); writer.writeNamespace(prefix, namespaceName); writer.writeAttribute(prefix, namespaceName, reader.getAttributeLocalName(i), reader.getAttributeValue(i)); } } else { //empty namespace is equal to no namespace! writer.writeAttribute(reader.getAttributeLocalName(i), reader.getAttributeValue(i)); } } } /** * Generates a unique namespace prefix that is not in the scope of the NamespaceContext * * @param nsCtxt * @return string */ private String generateUniquePrefix(NamespaceContext nsCtxt) { String prefix = NAMESPACE_PREFIX + namespaceSuffix++; //null should be returned if the prefix is not bound! while (nsCtxt.getNamespaceURI(prefix) != null) { prefix = NAMESPACE_PREFIX + namespaceSuffix++; } return prefix; } /** * Method serializeNamespace. * * @param prefix * @param URI * @param writer * @throws XMLStreamException */ private void serializeNamespace(String prefix, String URI, XMLStreamWriter writer) throws XMLStreamException { String prefix1 = writer.getPrefix(URI); if (prefix1 == null) { writer.writeNamespace(prefix, URI); writer.setPrefix(prefix, URI); } } /** * Inspect the current element and if it is an * XOP Include then write it out as inlined or optimized. * @param reader * @param writer * @return true if inlined */ protected boolean serializeXOPInclude(XMLStreamReader reader, XMLStreamWriter writer) { String cid = ElementHelper.getContentID(reader); DataHandler dh = getDataHandler(cid, (OMAttachmentAccessor) reader); if (dh == null) { return false; } OMFactory omFactory = OMAbstractFactory.getOMFactory(); OMText omText = omFactory.createOMText(dh, true); omText.setContentID(cid); MTOMXMLStreamWriter mtomWriter = (writer instanceof MTOMXMLStreamWriter) ? (MTOMXMLStreamWriter) writer : null; if (mtomWriter != null && mtomWriter.isOptimized() && mtomWriter.isOptimizedThreshold(omText)) { // This will write the attachment after the xml message mtomWriter.writeOptimized(omText); return false; } // This will inline the attachment omText.setOptimize(false); try { writer.writeCharacters(omText.getText()); return true; } catch (XMLStreamException e) { // Just writer out the xop:include return false; } } private DataHandler getDataHandler(String cid, OMAttachmentAccessor oaa) { DataHandler dh = null; String blobcid = cid; if (blobcid.startsWith("cid:")) { blobcid = blobcid.substring(4); } // Get the attachment if (oaa != null) { dh = oaa.getDataHandler(blobcid); } if (dh == null) { blobcid = getNewCID(cid); if (blobcid.startsWith("cid:")) { blobcid = blobcid.substring(4); } if (oaa != null) { dh = oaa.getDataHandler(blobcid); } } return dh; } /** * @param cid * @return cid with translated characters */ private String getNewCID(String cid) { String cid2 = cid; try { cid2 = java.net.URLDecoder.decode(cid, "UTF-8"); } catch (Exception e) { if (log.isDebugEnabled()) { log.debug("getNewCID decoding " + cid + " as UTF-8 decoding error: " + e); } } return cid2; } } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/serialize/OMXMLReader.java0000644000000000000000000002516111131637466030714 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.serialize; import java.io.IOException; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import org.apache.axiom.om.OMAttribute; import org.apache.axiom.om.OMComment; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMNode; import org.apache.axiom.om.OMText; import org.xml.sax.Attributes; import org.xml.sax.ContentHandler; import org.xml.sax.DTDHandler; import org.xml.sax.EntityResolver; import org.xml.sax.ErrorHandler; import org.xml.sax.InputSource; import org.xml.sax.SAXException; import org.xml.sax.SAXNotRecognizedException; import org.xml.sax.SAXNotSupportedException; import org.xml.sax.XMLReader; import org.xml.sax.ext.LexicalHandler; /** * SAX {@link XMLReader} implementation that traverses a given OM tree and invokes the * callback methods on the configured {@link ContentHandler}. This can be used to * serialize an Axiom tree to SAX. */ public class OMXMLReader implements XMLReader { private static final String URI_LEXICAL_HANDLER = "http://xml.org/sax/properties/lexical-handler"; private final OMElement element; private final AttributesAdapter attributesAdapter = new AttributesAdapter(); private boolean namespaces = true; private boolean namespacePrefixes = false; private ContentHandler contentHandler; private LexicalHandler lexicalHandler; private DTDHandler dtdHandler; private EntityResolver entityResolver; private ErrorHandler errorHandler; public OMXMLReader(OMElement element) { this.element = element; } public ContentHandler getContentHandler() { return contentHandler; } public void setContentHandler(ContentHandler contentHandler) { this.contentHandler = contentHandler; } public DTDHandler getDTDHandler() { return dtdHandler; } public void setDTDHandler(DTDHandler dtdHandler) { this.dtdHandler = dtdHandler; } public EntityResolver getEntityResolver() { return entityResolver; } public void setEntityResolver(EntityResolver entityResolver) { this.entityResolver = entityResolver; } public ErrorHandler getErrorHandler() { return errorHandler; } public void setErrorHandler(ErrorHandler errorHandler) { this.errorHandler = errorHandler; } public boolean getFeature(String name) throws SAXNotRecognizedException, SAXNotSupportedException { throw new SAXNotRecognizedException(name); } public void setFeature(String name, boolean value) throws SAXNotRecognizedException, SAXNotSupportedException { if ("http://xml.org/sax/features/namespaces".equals(name)) { namespaces = value; } else if ("http://xml.org/sax/features/namespace-prefixes".equals(name)) { namespacePrefixes = value; } else { throw new SAXNotRecognizedException(name); } } public Object getProperty(String name) throws SAXNotRecognizedException, SAXNotSupportedException { if ("http://xml.org/sax/features/namespaces".equals(name)) { return Boolean.valueOf(namespaces); } else if ("http://xml.org/sax/features/namespace-prefixes".equals(name)) { return Boolean.valueOf(namespacePrefixes); } else if (URI_LEXICAL_HANDLER.equals(name)) { return lexicalHandler; } else { throw new SAXNotRecognizedException(name); } } public void setProperty(String name, Object value) throws SAXNotRecognizedException, SAXNotSupportedException { if (URI_LEXICAL_HANDLER.equals(name)) { lexicalHandler = (LexicalHandler)value; } else { throw new SAXNotRecognizedException(name); } } public void parse(InputSource input) throws IOException, SAXException { parse(); } public void parse(String systemId) throws IOException, SAXException { parse(); } private void parse() throws SAXException { contentHandler.startDocument(); generateEvents(element); contentHandler.endDocument(); } private void generatePrefixMappingEvents(OMElement omElement, boolean start) throws SAXException { for (Iterator it = omElement.getAllDeclaredNamespaces(); it.hasNext(); ) { OMNamespace ns = (OMNamespace)it.next(); String prefix = ns.getPrefix(); if (prefix != null) { if (start) { contentHandler.startPrefixMapping(prefix, ns.getNamespaceURI()); } else { contentHandler.endPrefixMapping(prefix); } } } } private void generateEvents(OMElement omElement) throws SAXException { generatePrefixMappingEvents(omElement, true); OMNamespace omNamespace = omElement.getNamespace(); String uri; String prefix; if (omNamespace != null) { uri = omNamespace.getNamespaceURI(); prefix = omNamespace.getPrefix(); } else { uri = ""; prefix = null; } String localName = omElement.getLocalName(); String qName; if (prefix == null || prefix.length() == 0) { qName = localName; } else { qName = prefix + ":" + localName; } // For performance reasons, we always reuse the same instance of AttributesAdapter. // This is explicitely allowed by the specification of the startElement method. attributesAdapter.setAttributes(omElement); contentHandler.startElement(uri, localName, qName, attributesAdapter); for (Iterator it = omElement.getChildren(); it.hasNext(); ) { OMNode node = (OMNode)it.next(); switch (node.getType()) { case OMNode.ELEMENT_NODE: generateEvents((OMElement)node); break; case OMNode.TEXT_NODE: generateEvents((OMText)node); break; case OMNode.CDATA_SECTION_NODE: if (lexicalHandler != null) { lexicalHandler.startCDATA(); } generateEvents((OMText)node); if (lexicalHandler != null) { lexicalHandler.endCDATA(); } break; case OMNode.COMMENT_NODE: if (lexicalHandler != null) { char[] ch = ((OMComment)node).getValue().toCharArray(); lexicalHandler.comment(ch, 0, ch.length); } } } contentHandler.endElement(uri, localName, qName); generatePrefixMappingEvents(omElement, false); } private void generateEvents(OMText omText) throws SAXException { char[] ch = omText.getTextCharacters(); contentHandler.characters(ch, 0, ch.length); } protected static class AttributesAdapter implements Attributes { private List/**/ attributes = new ArrayList(5); public void setAttributes(OMElement element) { attributes.clear(); for (Iterator it = element.getAllAttributes(); it.hasNext(); ) { attributes.add(it.next()); } } public int getLength() { return attributes.size(); } public int getIndex(String qName) { for (int i=0, len=attributes.size(); i * Internal Implementation detail. Adding special interface to stop folks from accidently using * OMNode. Please use at your own risk. May corrupt the data integrity. */ public interface OMNodeEx extends OMNode { public void setNextOMSibling(OMNode node); public void setPreviousOMSibling(OMNode previousSibling); public void setParent(OMContainer element); public void setComplete(boolean state); public void setType(int nodeType) throws OMException; /** * Serializes the node with caching. * * @param writer * @throws javax.xml.stream.XMLStreamException * */ public void internalSerialize(XMLStreamWriter writer) throws XMLStreamException; /** * Serializes the node without caching. * * @param writer * @throws XMLStreamException */ public void internalSerializeAndConsume(XMLStreamWriter writer) throws XMLStreamException; } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/exception/0000755000000000000000000000000011131637466026034 5ustar rootroot././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/exception/OMStreamingException.javaaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/exception/OMStreamingException.0000644000000000000000000000321711131637466032104 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.exception; import org.apache.axiom.om.OMException; /** Class OMStreamingException */ public class OMStreamingException extends OMException { private static final long serialVersionUID = 8108888406034145092L; /** Constructor OMStreamingException */ public OMStreamingException() { } /** * Constructor OMStreamingException * * @param message */ public OMStreamingException(String message) { super(message); } /** * Constructor OMStreamingException * * @param message * @param cause */ public OMStreamingException(String message, Throwable cause) { super(message, cause); } /** * Constructor OMStreamingException * * @param cause */ public OMStreamingException(Throwable cause) { super(cause); } } ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/exception/OMBuilderException.javaaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/exception/OMBuilderException.ja0000644000000000000000000000237011131637466032053 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.exception; import org.apache.axiom.om.OMException; /** Class OMBuilderException */ public class OMBuilderException extends OMException { private static final long serialVersionUID = -7447667411291193889L; /** * Constructor OMBuilderException * * @param s */ public OMBuilderException(String s) { super(s); } public OMBuilderException(Throwable cause) { super(cause); } } ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/exception/XMLComparisonException.javaaxiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/exception/XMLComparisonExceptio0000644000000000000000000000242411131637466032155 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.exception; public class XMLComparisonException extends Exception { /** Eran Chinthaka (chinthaka@apache.org) */ private static final long serialVersionUID = -7918497983548520994L; public XMLComparisonException(String message) { super(message); } public XMLComparisonException(Throwable cause) { super(cause); } public XMLComparisonException(String message, Throwable cause) { super(message, cause); } } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/OMDocumentImplUtil.java0000644000000000000000000000510411131637466030373 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl; import java.util.Iterator; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamWriter; import org.apache.axiom.om.OMDocument; /** * Utility class with default implementations for some of the methods defined by the * {@link OMDocument} interface. */ public class OMDocumentImplUtil { private OMDocumentImplUtil() {} public static void internalSerialize(OMDocument document, XMLStreamWriter writer2, boolean cache, boolean includeXMLDeclaration) throws XMLStreamException { MTOMXMLStreamWriter writer = (MTOMXMLStreamWriter) writer2; if (includeXMLDeclaration) { //Check whether the OMOutput char encoding and OMDocument char //encoding matches, if not use char encoding of OMOutput String outputCharEncoding = writer.getCharSetEncoding(); if (outputCharEncoding == null || "".equals(outputCharEncoding)) { writer.getXmlStreamWriter().writeStartDocument(document.getCharsetEncoding(), document.getXMLVersion()); } else { writer.getXmlStreamWriter().writeStartDocument(outputCharEncoding, document.getXMLVersion()); } } Iterator children = document.getChildren(); if (cache) { while (children.hasNext()) { OMNodeEx omNode = (OMNodeEx) children.next(); omNode.internalSerialize(writer); } } else { while (children.hasNext()) { OMNodeEx omNode = (OMNodeEx) children.next(); omNode.internalSerializeAndConsume(writer); } } } } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/OMDocument.java0000644000000000000000000000630511131637470025751 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om; import javax.xml.stream.XMLStreamException; import java.io.OutputStream; public interface OMDocument extends OMContainer { /** Field XML_10 XML Version 1.0 */ final static String XML_10 = "1.0"; /** Field XML_11 XML Version 1.1 */ final static String XML_11 = "1.1"; /** * Returns the document element. * * @return Returns OMElement. */ OMElement getOMDocumentElement(); /** * Sets the document element of the XML document. * * @param rootElement */ void setOMDocumentElement(OMElement rootElement); /** * Returns the XML version. * * @return Returns String. */ String getXMLVersion(); /** * Sets the XML version. * * @param version * @see org.apache.axiom.om.impl.llom.OMDocumentImpl#XML_10 XML 1.0 * @see org.apache.axiom.om.impl.llom.OMDocumentImpl#XML_11 XML 1.1 */ void setXMLVersion(String version); /** * Returns the character set encoding scheme. * * @return Returns String. */ String getCharsetEncoding(); /** * Sets the character set encoding scheme to be used. * * @param charsetEncoding */ void setCharsetEncoding(String charsetEncoding); /** * XML standalone value. This will be yes, no or null (if not available) * * @return Returns boolean. */ String isStandalone(); void setStandalone(String isStandalone); /** * Serializes the OMDocument. * * @param output * @param format * @throws XMLStreamException */ void serializeAndConsume(OutputStream output, OMOutputFormat format) throws XMLStreamException; /** * Builds the OM node/tree and then serializes the document. * * @param output * @param format * @throws XMLStreamException */ void serialize(OutputStream output, OMOutputFormat format) throws XMLStreamException; /** * Serializes the OMDocument. * * @param output * @throws XMLStreamException */ void serializeAndConsume(OutputStream output) throws XMLStreamException; /** * Serializes the document with cache on. * * @param output * @throws XMLStreamException */ void serialize(OutputStream output) throws XMLStreamException; /** Returns the OMFactory that created this object */ OMFactory getOMFactory(); } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/OMHierarchyException.java0000644000000000000000000000341311131637470027765 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om; /** * Thrown if an object model operation would lead to a hierarchy that is not allowed in the * given object model implementation. *

* If this exception is encountered by a builder when creating an OM node from an event received * by the parser and if the corresponding content can be ignored (i.e. is not semantically * relevant), the builder should ignore the exception and skip the event. An example is whitespace * appearing before or after the root element of a document. This would be represented as an * {@link OMText} node below the {@link OMDocument}. If the OM implementation doesn't allow text * nodes as children of a document (as for example in DOM), it should throw this exception so * that the builder can discard the event. */ public class OMHierarchyException extends OMException { private static final long serialVersionUID = 8391435427221729190L; public OMHierarchyException(String message) { super(message); } } axiom-1.2.8/modules/axiom-api/src/main/java/org/apache/axiom/om/OMDataSource.java0000644000000000000000000000527211131637470026227 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import javax.xml.stream.XMLStreamWriter; import java.io.OutputStream; import java.io.Writer; /** * Interface to arbitrary source of XML element data. This provides the hook for using a general * data source (such as data binding frameworks) as the backing source of data for an element. */ public interface OMDataSource { /** * Serializes element data directly to stream. * * @param output destination stream for element XML text * @param format Output format information. The implementation must use this information * to choose the correct character set encoding when writing to the * output stream. This parameter must not be null. * @throws XMLStreamException */ void serialize(OutputStream output, OMOutputFormat format) throws XMLStreamException; /** * Serializes element data directly to writer. * * @param writer destination writer for element XML text * @param format output format information (null if none; may be ignored if not * supported by data binding even if supplied) * @throws XMLStreamException */ void serialize(Writer writer, OMOutputFormat format) throws XMLStreamException; /** * Serializes element data directly to StAX writer. * * @param xmlWriter destination writer * @throws XMLStreamException */ void serialize(XMLStreamWriter xmlWriter) throws XMLStreamException; /** * Get parser for element data. In the general case this may require the data source to * serialize data as XML text and then parse that text. * * @return element parser * @throws XMLStreamException */ XMLStreamReader getReader() throws XMLStreamException; } axiom-1.2.8/modules/axiom-api/src/test/0000755000000000000000000000000011131637462016443 5ustar rootrootaxiom-1.2.8/modules/axiom-api/src/test/java/0000755000000000000000000000000011131637462017364 5ustar rootrootaxiom-1.2.8/modules/axiom-api/src/test/java/org/0000755000000000000000000000000011131637462020153 5ustar rootrootaxiom-1.2.8/modules/axiom-api/src/test/java/org/apache/0000755000000000000000000000000011131637462021374 5ustar rootrootaxiom-1.2.8/modules/axiom-api/src/test/java/org/apache/axiom/0000755000000000000000000000000011131637462022511 5ustar rootrootaxiom-1.2.8/modules/axiom-api/src/test/java/org/apache/axiom/attachments/0000755000000000000000000000000011131637462025024 5ustar rootrootaxiom-1.2.8/modules/axiom-api/src/test/java/org/apache/axiom/attachments/utils/0000755000000000000000000000000011131637462026164 5ustar rootrootaxiom-1.2.8/modules/axiom-api/src/test/java/org/apache/axiom/attachments/utils/BAATest.java0000644000000000000000000000776611131637462030272 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.attachments.utils; import org.apache.axiom.attachments.impl.BufferUtils; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import junit.framework.TestCase; /** * UnitTest for the BAAInputStream and BAAOutputStream classes. */ public class BAATest extends TestCase { static final int INPUT_SIZE = 100 * 1024; static final int ITERATIONS = 10; static final int PRIME = ITERATIONS/10; static final int BAOS_SIZE = 4 * 1024; byte[] input; ByteArrayInputStream inputBAIS; public BAATest(String arg0) { super(arg0); } protected void setUp() throws Exception { super.setUp(); input = new byte[INPUT_SIZE]; for (int i=0; i < INPUT_SIZE; i++) { input[i] = 25; } inputBAIS = new ByteArrayInputStream(input); } public void test() throws Exception { for (int i=0; i<5; i++) { normal(); enhanced(); } } public void normal() throws Exception { long time = System.currentTimeMillis(); for (int i=0; i" + "" + "" + " The Apache Web Sevices Project" + ""; private final OMImplementation omImplementation; public OMDocumentTestBase(OMImplementation omImplementation) { this.omImplementation = omImplementation; } public void testParse() { checkSampleXML(getSampleOMDocument(sampleXML)); } public void testSerializeAndConsume() throws XMLStreamException { // read the string in to the builder OMDocument omDocument = getSampleOMDocument(sampleXML); // serialise it to a string String outXML = ""; ByteArrayOutputStream outStream = new ByteArrayOutputStream(); omDocument.serializeAndConsume(outStream); outXML = new String(outStream.toByteArray()); // again load that to another builder checkSampleXML(getSampleOMDocument(outXML)); } private void checkSampleXML(OMDocument document) { // check for the comment and the PI boolean commentFound = false; boolean piFound = false; Iterator children = document.getChildren(); while (children.hasNext()) { OMNode omNode = (OMNode) children.next(); if (omNode instanceof OMComment) { commentFound = true; } else if (omNode instanceof OMProcessingInstruction) { piFound = true; } else if (omNode instanceof OMElement && !commentFound && !piFound) { fail("OMElement should come after Comment and PI"); } } assertTrue(commentFound && piFound); } /** * Test that a document that is not well formed triggers an appropriate error. */ public void testMalformedDocument() { OMDocument document = getSampleOMDocument(""); try { document.serialize(new ByteArrayOutputStream()); fail("Expected exception"); } catch (Exception ex) { // We expect an exception here } } private OMDocument getSampleOMDocument(String xml) { try { XMLStreamReader xmlStreamReader = XMLInputFactory.newInstance().createXMLStreamReader(new StringReader(xml)); StAXOMBuilder builder = new StAXOMBuilder(omImplementation.getOMFactory(), xmlStreamReader); return builder.getDocument(); } catch (XMLStreamException e) { throw new UnsupportedOperationException(); } } // private OMDocument getSampleOMDocument() { // OMFactory omFactory = OMAbstractFactory.getOMFactory(); // OMDocument omDocument = omFactory.createOMDocument(); // omFactory.createOMComment(omDocument, "This is some comments at the start of the document"); // omDocument.setCharsetEncoding("utf-8"); // omFactory.createOMProcessingInstruction(omDocument, "PITarget", "PIData"); // // OMElement documentElement = omFactory.createOMElement("Axis2", null, omDocument); // omDocument.setDocumentElement(documentElement); // omFactory.createOMElement("ProjectName", null, documentElement); // documentElement.getFirstElement().setText("The Apache Web Sevices Project"); // // return omDocument; // } } axiom-1.2.8/modules/axiom-api/pom.xml0000644000000000000000000001212011131637470016205 0ustar rootroot 4.0.0 org.apache.ws.commons.axiom axiom 1.2.8 axiom-api Axiom API 1.2.8 The Axiom API org.apache.geronimo.specs geronimo-activation_1.1_spec org.apache.geronimo.specs geronimo-javamail_1.4_spec commons-logging commons-logging jaxen jaxen xml-apis xml-apis org.apache.geronimo.specs geronimo-stax-api_1.0_spec junit junit src/main/resources ${project.build.directory}/legal-files maven-antrun-plugin copy-legal-files generate-resources run maven-jar-plugin src/main/resources/META-INF/MANIFEST.MF ${version} maven-jar-plugin test-jar maven-surefire-plugin **/*Test.java **/*TestCase.java axiom-1.2.8/modules/axiom-tests/0000755000000000000000000000000011131640066015260 5ustar rootrootaxiom-1.2.8/modules/axiom-tests/src/0000755000000000000000000000000011131637474016060 5ustar rootrootaxiom-1.2.8/modules/axiom-tests/src/test/0000755000000000000000000000000011131637474017037 5ustar rootrootaxiom-1.2.8/modules/axiom-tests/src/test/java/0000755000000000000000000000000011131637474017760 5ustar rootrootaxiom-1.2.8/modules/axiom-tests/src/test/java/org/0000755000000000000000000000000011131637474020547 5ustar rootrootaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/0000755000000000000000000000000011131637474021770 5ustar rootrootaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/0000755000000000000000000000000011131637474023105 5ustar rootrootaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/xpath/0000755000000000000000000000000011131637474024231 5ustar rootrootaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/xpath/AXIOMXPathTest2.java0000644000000000000000000000423311131637474027642 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.xpath; import junit.framework.TestCase; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.impl.llom.util.AXIOMUtil; import org.apache.axiom.om.xpath.AXIOMXPath; /** * This class contains Axiom specific tests, while AXIOMXPathTest is * used for the Jaxen test harness. */ public class AXIOMXPathTest2 extends TestCase { public void testAddNamespaces() throws Exception { OMElement root1 = AXIOMUtil.stringToOM( ""); OMElement root2 = AXIOMUtil.stringToOM( "text"); AXIOMXPath xpath = new AXIOMXPath("/ns1:root/ns2:child"); xpath.addNamespaces(root1.getFirstElement()); assertEquals("text", xpath.stringValueOf(root2.getParent())); } public void testAddNamespaces2() throws Exception { OMElement root1 = AXIOMUtil.stringToOM( ""); OMElement root2 = AXIOMUtil.stringToOM( "text"); AXIOMXPath xpath = new AXIOMXPath("//ns:child"); xpath.addNamespaces(root1.getFirstElement()); assertEquals("text", xpath.stringValueOf(root2.getParent())); } } ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/xpath/XPathAppliedToSOAPEnvelopeTest.javaaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/xpath/XPathAppliedToSOAPEnvelopeTest.0000644000000000000000000000541711131637474032110 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.xpath; import junit.framework.TestCase; import org.apache.axiom.om.OMAbstractFactory; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMNode; import org.apache.axiom.om.xpath.AXIOMXPath; import org.apache.axiom.soap.SOAPEnvelope; import org.apache.axiom.soap.SOAPFactory; public class XPathAppliedToSOAPEnvelopeTest extends TestCase { public void testDocumentNotAdded() throws Exception { SOAPFactory factory = OMAbstractFactory.getSOAP11Factory(); OMElement elem1 = factory.createOMElement("elem1", null); OMElement elem2 = factory.createOMElement("elem2", null); OMElement elem3 = factory.createOMElement("elem3", null); elem2.addChild(elem3); elem1.addChild(elem2); SOAPEnvelope envelope = factory.getDefaultEnvelope(); envelope.getBody().addChild(elem1); //The only difference of the two test methods is the following line. // factory.createOMDocument().addChild(envelope); String XPathString = "//elem1"; AXIOMXPath XPath = new AXIOMXPath(XPathString); OMNode node = (OMNode) XPath.selectSingleNode(envelope); assertNotNull(node); } public void testDocumentAdded() throws Exception { SOAPFactory factory = OMAbstractFactory.getSOAP11Factory(); OMElement elem1 = factory.createOMElement("elem1", null); OMElement elem2 = factory.createOMElement("elem2", null); OMElement elem3 = factory.createOMElement("elem3", null); elem2.addChild(elem3); elem1.addChild(elem2); SOAPEnvelope envelope = factory.getDefaultEnvelope(); envelope.getBody().addChild(elem1); //The only difference of the two test methods is the following line. factory.createOMDocument().addChild(envelope); String XPathString = "//elem1"; AXIOMXPath XPath = new AXIOMXPath(XPathString); OMNode node = (OMNode) XPath.selectSingleNode(envelope); assertNotNull(node); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/xpath/AXIOMXPathTest.java0000644000000000000000000000364711131637474027570 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.xpath; import junit.framework.Test; import junit.framework.TestSuite; import org.apache.axiom.om.impl.builder.StAXOMBuilder; import org.apache.axiom.om.xpath.DocumentNavigator; import org.jaxen.FunctionCallException; import org.jaxen.Navigator; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLStreamReader; import java.io.FileInputStream; public class AXIOMXPathTest extends XPathTestBase { public AXIOMXPathTest(String name) { super(name); } public static Test suite() { return new TestSuite(AXIOMXPathTest.class); } public Navigator getNavigator() { return new DocumentNavigator(); } public Object getDocument(String uri) throws Exception { try { XMLStreamReader parser = XMLInputFactory.newInstance().createXMLStreamReader( new FileInputStream(uri)); StAXOMBuilder builder = new StAXOMBuilder(parser); return builder.getDocumentElement(); } catch (Exception e) { throw new FunctionCallException(e); } } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/xpath/XPathTestBase.java0000644000000000000000000021211111131637474027551 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.xpath; import junit.framework.TestCase; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.jaxen.BaseXPath; import org.jaxen.Context; import org.jaxen.ContextSupport; import org.jaxen.FunctionCallException; import org.jaxen.JaxenException; import org.jaxen.Navigator; import org.jaxen.SimpleNamespaceContext; import org.jaxen.SimpleVariableContext; import org.jaxen.UnsupportedAxisException; import org.jaxen.XPath; import org.jaxen.XPathFunctionContext; import org.jaxen.function.StringFunction; import org.jaxen.pattern.Pattern; import org.jaxen.saxpath.helpers.XPathReaderFactory; import java.util.ArrayList; import java.util.Iterator; import java.util.List; public abstract class XPathTestBase extends TestCase { protected static String VAR_URI = "http://jaxen.org/test-harness/var"; protected static String TESTS_ROOT = "test-resources/"; protected static String TESTS_XML = TESTS_ROOT + "xml/test/tests.xml"; protected static boolean verbose = false; protected static boolean debug = false; private ContextSupport contextSupport; private static Log log = LogFactory.getLog(XPathTestBase.class); public XPathTestBase(String name) { super(name); } public void setUp() { this.contextSupport = null; System.setProperty(XPathReaderFactory.DRIVER_PROPERTY, ""); log("-----------------------------"); } public void log(String text) { log(verbose, text); } public void log(boolean actualVerbose, String text) { if (actualVerbose) log.info(text); } protected void assertCountXPath(int expectedSize, Object context, String xpathStr) throws JaxenException { assertCountXPath2(expectedSize, context, xpathStr); } protected Object assertCountXPath2(int expectedSize, Object context, String xpathStr) throws JaxenException { log(debug, " Select :: " + xpathStr); BaseXPath xpath = new BaseXPath(xpathStr, getNavigator()); List results = xpath.selectNodes(getContext(context)); log(debug, " Expected Size :: " + expectedSize); log(debug, " Result Size :: " + results.size()); if (expectedSize != results.size()) { log(debug, " ## FAILED"); log(debug, " ## xpath: " + xpath + " = " + xpath.debug()); Iterator resultIter = results.iterator(); while (resultIter.hasNext()) { log(debug, " --> " + resultIter.next()); } } assertEquals(xpathStr, expectedSize, results.size()); if (expectedSize > 0) { return results.get(0); } return null; } protected void assertInvalidXPath(Object context, String xpathStr) { try { log(debug, " Select :: " + xpathStr); BaseXPath xpath = new BaseXPath(xpathStr, getNavigator()); List results = xpath.selectNodes(getContext(context)); log(debug, " Result Size :: " + results.size()); fail("An exception was expected."); } catch (UnsupportedAxisException e) { log(debug, " ## SKIPPED -- Unsupported Axis"); } catch (JaxenException e) { log(debug, " Caught expected exception " + e.getMessage()); } } protected void assertValueOfXPath(String expected, Object context, String xpathStr) throws JaxenException { try { BaseXPath xpath = new BaseXPath(xpathStr, getNavigator()); Object node = xpath.evaluate(getContext(context)); String result = StringFunction.evaluate(node, getNavigator()); log(debug, " Select :: " + xpathStr); log(debug, " Expected :: " + expected); log(debug, " Result :: " + result); if (!expected.equals(result)) { log(debug, " ## FAILED"); log(debug, " ## xpath: " + xpath + " = " + xpath.debug()); } assertEquals(xpathStr, expected, result); } catch (UnsupportedAxisException e) { log(debug, " ## SKIPPED -- Unsupported Axis "); } } protected Context getContext(Object contextNode) { Context context = new Context(getContextSupport()); List list = new ArrayList(1); list.add(contextNode); context.setNodeSet(list); return context; } public ContextSupport getContextSupport() { if (this.contextSupport == null) { this.contextSupport = new ContextSupport(new SimpleNamespaceContext(), XPathFunctionContext.getInstance(), new SimpleVariableContext(), getNavigator()); } return this.contextSupport; } public abstract Navigator getNavigator(); public abstract Object getDocument(String url) throws Exception; public void testGetNodeType() throws FunctionCallException, UnsupportedAxisException { Navigator nav = getNavigator(); Object document = nav.getDocument(TESTS_ROOT + "xml/testNamespaces.xml"); int count = 0; Iterator descendantOrSelfAxisIterator = nav.getDescendantOrSelfAxisIterator(document); while (descendantOrSelfAxisIterator.hasNext()) { Object node = descendantOrSelfAxisIterator.next(); Iterator namespaceAxisIterator = nav.getNamespaceAxisIterator(node); while (namespaceAxisIterator.hasNext()) { count++; Object o = namespaceAxisIterator.next(); assertEquals("Node type mismatch", Pattern.NAMESPACE_NODE, nav.getNodeType(o)); } } assertEquals(25, count); } /* test for jaxen-24 */ public void testid53371() throws JaxenException { Navigator nav = getNavigator(); String url = TESTS_ROOT + "xml/jaxen24.xml"; log("Document [" + url + "]"); Object document = nav.getDocument(url); XPath contextpath = new BaseXPath("/body/div", nav); log("Initial Context :: " + contextpath); List list = contextpath.selectNodes(document); Iterator iter = list.iterator(); while (iter.hasNext()) { Object context = iter.next(); assertCountXPath(1, context, "preceding::*[1]"); assertValueOfXPath("span", context, "local-name(preceding::*[1])"); } } /* jaxen-58 */ public void testid53391() throws JaxenException { Navigator nav = getNavigator(); String url = TESTS_ROOT + "xml/jaxen24.xml"; log("Document [" + url + "]"); Object document = nav.getDocument(url); XPath contextpath = new BaseXPath("/", nav); log("Initial Context :: " + contextpath); List list = contextpath.selectNodes(document); Iterator iter = list.iterator(); while (iter.hasNext()) { Object context = iter.next(); assertCountXPath(0, context, "//preceding::x"); assertCountXPath(0, context, "//following::x"); assertCountXPath(0, context, "/descendant::*/preceding::x"); assertCountXPath(0, context, "/descendant::node()/preceding::x"); } } /* test for jaxen-3 */ public void testid53430() throws JaxenException { Navigator nav = getNavigator(); String url = TESTS_ROOT + "xml/simple.xml"; log("Document [" + url + "]"); Object document = nav.getDocument(url); XPath contextpath = new BaseXPath("/", nav); log("Initial Context :: " + contextpath); List list = contextpath.selectNodes(document); Iterator iter = list.iterator(); while (iter.hasNext()) { Object context = iter.next(); assertValueOfXPath("abd", context, "string()"); } } public void testid53441() throws JaxenException { Navigator nav = getNavigator(); String url = TESTS_ROOT + "xml/simple.xml"; log("Document [" + url + "]"); Object document = nav.getDocument(url); XPath contextpath = new BaseXPath("/root", nav); log("Initial Context :: " + contextpath); List list = contextpath.selectNodes(document); Iterator iter = list.iterator(); while (iter.hasNext()) { Object context = iter.next(); assertValueOfXPath("abd", context, "string()"); } } public void testid53452() throws JaxenException { Navigator nav = getNavigator(); String url = TESTS_ROOT + "xml/simple.xml"; log("Document [" + url + "]"); Object document = nav.getDocument(url); XPath contextpath = new BaseXPath("/root/a", nav); log("Initial Context :: " + contextpath); List list = contextpath.selectNodes(document); Iterator iter = list.iterator(); while (iter.hasNext()) { Object context = iter.next(); assertValueOfXPath("a", context, "string()"); } } public void testid53463() throws JaxenException { Navigator nav = getNavigator(); String url = TESTS_ROOT + "xml/simple.xml"; log("Document [" + url + "]"); Object document = nav.getDocument(url); XPath contextpath = new BaseXPath("/root/c", nav); log("Initial Context :: " + contextpath); List list = contextpath.selectNodes(document); Iterator iter = list.iterator(); while (iter.hasNext()) { Object context = iter.next(); assertValueOfXPath("d", context, "string()"); } } /* test for jaxen-3 */ public void testid53482() throws JaxenException { Navigator nav = getNavigator(); String url = TESTS_ROOT + "xml/jaxen3.xml"; log("Document [" + url + "]"); Object document = nav.getDocument(url); XPath contextpath = new BaseXPath("/", nav); log("Initial Context :: " + contextpath); List list = contextpath.selectNodes(document); Iterator iter = list.iterator(); while (iter.hasNext()) { Object context = iter.next(); assertCountXPath(1, context, "/Configuration/hostname/attrlist/hostname[. = 'CE-A'] "); } } /* parser test cases all of which should fail */ public void testid53502() throws JaxenException { Navigator nav = getNavigator(); String url = TESTS_ROOT + "xml/numbers.xml"; log("Document [" + url + "]"); Object document = nav.getDocument(url); XPath contextpath = new BaseXPath("/", nav); log("Initial Context :: " + contextpath); List list = contextpath.selectNodes(document); Iterator iter = list.iterator(); while (iter.hasNext()) { Object context = iter.next(); /* repeated xpaths, jaxen-35 */ assertInvalidXPath(context, "/numbers numbers"); /* invalid xpath, jaxen-34 */ assertInvalidXPath(context, "/a/b[c > d]efg"); /* invalid xpath, jaxen-27 */ assertInvalidXPath(context, "/inv/child::"); /* invalid xpath, jaxen-26 */ assertInvalidXPath(context, "/invoice/@test[abcd"); assertInvalidXPath(context, "/invoice/@test[abcd > x"); /* unterminated string */ assertInvalidXPath(context, "string-length('a"); /* various edge cases where code threw no exception */ assertInvalidXPath(context, "/descendant::()"); assertInvalidXPath(context, "(1 + 1"); } } /* test cases for the use of underscores in names */ public void testid53602() throws JaxenException { Navigator nav = getNavigator(); String url = TESTS_ROOT + "xml/underscore.xml"; log("Document [" + url + "]"); Object document = nav.getDocument(url); XPath contextpath = new BaseXPath("/", nav); log("Initial Context :: " + contextpath); List list = contextpath.selectNodes(document); Iterator iter = list.iterator(); while (iter.hasNext()) { Object context = iter.next(); assertCountXPath(1, context, "/root/@a"); assertCountXPath(1, context, "/root/@_a"); assertCountXPath(1, context, "/root/b"); assertCountXPath(1, context, "/root/_b"); assertValueOfXPath("1", context, "/root/@a"); assertValueOfXPath("2", context, "/root/@_a"); assertValueOfXPath("1", context, "/root/b"); assertValueOfXPath("2", context, "/root/_b"); } } /* test cases for the use of = with node-sets */ public void testid53662() throws JaxenException { Navigator nav = getNavigator(); String url = TESTS_ROOT + "xml/web.xml"; log("Document [" + url + "]"); Object document = nav.getDocument(url); XPath contextpath = new BaseXPath("/", nav); log("Initial Context :: " + contextpath); List list = contextpath.selectNodes(document); Iterator iter = list.iterator(); while (iter.hasNext()) { Object context = iter.next(); assertValueOfXPath("true", context, "/web-app/servlet/servlet-name = 'file'"); assertValueOfXPath("true", context, "/web-app/servlet/servlet-name = 'snoop'"); } } public void testid53685() throws JaxenException { Navigator nav = getNavigator(); String url = TESTS_ROOT + "xml/numbers.xml"; log("Document [" + url + "]"); Object document = nav.getDocument(url); XPath contextpath = new BaseXPath("/", nav); log("Initial Context :: " + contextpath); List list = contextpath.selectNodes(document); Iterator iter = list.iterator(); while (iter.hasNext()) { Object context = iter.next(); assertValueOfXPath("true", context, "/numbers/set/nr = '-3'"); assertValueOfXPath("true", context, "/numbers/set/nr = -3"); assertValueOfXPath("true", context, "/numbers/set/nr = 24"); assertValueOfXPath("true", context, "/numbers/set/nr/@value = '9999'"); assertValueOfXPath("true", context, "/numbers/set/nr/@value = 9999.0"); assertValueOfXPath("true", context, "/numbers/set/nr/@value = 66"); } } /* test basic math... */ public void testid53733() throws JaxenException { Navigator nav = getNavigator(); String url = TESTS_ROOT + "xml/numbers.xml"; log("Document [" + url + "]"); Object document = nav.getDocument(url); XPath contextpath = new BaseXPath("/", nav); log("Initial Context :: " + contextpath); List list = contextpath.selectNodes(document); Iterator iter = list.iterator(); while (iter.hasNext()) { Object context = iter.next(); assertValueOfXPath("true", context, "(8 * 2 + 1) = 17"); assertValueOfXPath("true", context, "(1 + 8 * 2) = 17"); assertValueOfXPath("true", context, "(7 - 3 + 1) = 5"); assertValueOfXPath("true", context, "(8 - 4 + 5 - 6) = 3"); /* left-assoc tests, comments show WRONG evaluation */ /* 3 - 2 - 1 != 2 */ assertValueOfXPath("0", context, "3 - 2 - 1"); /* 8 div 4 div 2 != 4 */ assertValueOfXPath("1", context, "8 div 4 div 2"); /* 3 mod 5 mod 7 != 1 */ assertValueOfXPath("3", context, "3 mod 7 mod 5"); /* 1=(2=2) is true */ assertValueOfXPath("false", context, "1 = 2 = 2"); /* 2!=(3!=1) => 2!=1 => true, (2!=3)!=1 => 1!=1 => false */ assertValueOfXPath("false", context, "2 != 3 != 1"); /* 3 > (2 > 1) is true */ assertValueOfXPath("false", context, "3 > 2 > 1"); /* 3 >= (2 >= 2) is true */ assertValueOfXPath("false", context, "3 >= 2 >= 2"); /* 1 < (2 < 3) is false */ assertValueOfXPath("true", context, "1 < 2 < 3"); /* 0 <= (2 <= 3) is true */ assertValueOfXPath("true", context, "2 <= 2 <= 3"); } } /* test cases for preceding axis with different node types */ public void testid53850() throws JaxenException { Navigator nav = getNavigator(); String url = TESTS_ROOT + "xml/pi2.xml"; log("Document [" + url + "]"); Object document = nav.getDocument(url); XPath contextpath = new BaseXPath("/a/c", nav); log("Initial Context :: " + contextpath); List list = contextpath.selectNodes(document); Iterator iter = list.iterator(); while (iter.hasNext()) { Object context = iter.next(); assertCountXPath(1, context, "//processing-instruction()"); assertCountXPath(1, context, "preceding-sibling::*"); assertCountXPath(5, context, "preceding-sibling::node()"); assertCountXPath(1, context, "preceding-sibling::*[1]"); assertCountXPath(1, context, "preceding-sibling::processing-instruction()"); assertValueOfXPath("order-by=\"x\"", context, "preceding-sibling::processing-instruction()"); assertValueOfXPath("foo", context, "preceding-sibling::*[1]"); assertValueOfXPath("order-by=\"x\"", context, "preceding-sibling::node()[2]"); } } public void testid53911() throws JaxenException { Navigator nav = getNavigator(); String url = TESTS_ROOT + "xml/id.xml"; log("Document [" + url + "]"); Object document = nav.getDocument(url); XPath contextpath = new BaseXPath("/", nav); log("Initial Context :: " + contextpath); List list = contextpath.selectNodes(document); SimpleVariableContext varContext = new SimpleVariableContext(); varContext.setVariableValue(null, "foobar", "foobar"); varContext.setVariableValue(null, "foo", "foo"); getContextSupport().setVariableContext(varContext); Iterator iter = list.iterator(); while (iter.hasNext()) { Object context = iter.next(); assertValueOfXPath("foobar", context, "$foobar"); assertCountXPath(1, context, "/foo[@id=$foobar]"); assertCountXPath(0, context, "/foo[@id='$foobar']"); assertCountXPath(1, context, "/foo[concat($foo, 'bar')=@id]"); assertCountXPath(0, context, "CD_Library/artist[@name=$artist]"); } } public void testid53957() throws JaxenException { Navigator nav = getNavigator(); String url = TESTS_ROOT + "xml/id.xml"; log("Document [" + url + "]"); Object document = nav.getDocument(url); XPath contextpath = new BaseXPath("/", nav); log("Initial Context :: " + contextpath); List list = contextpath.selectNodes(document); Iterator iter = list.iterator(); while (iter.hasNext()) { Object context = iter.next(); /* attributes have a parent: their element */ assertCountXPath(1, context, "/foo/@id/parent::foo"); } } /* attributes can also be used as context nodes */ public void testid53975() throws JaxenException { Navigator nav = getNavigator(); String url = TESTS_ROOT + "xml/id.xml"; log("Document [" + url + "]"); Object document = nav.getDocument(url); XPath contextpath = new BaseXPath("/foo/@id", nav); log("Initial Context :: " + contextpath); List list = contextpath.selectNodes(document); Iterator iter = list.iterator(); while (iter.hasNext()) { Object context = iter.next(); assertCountXPath(1, context, "parent::foo"); } } public void testid53992() throws JaxenException { Navigator nav = getNavigator(); String url = TESTS_ROOT + "xml/pi.xml"; log("Document [" + url + "]"); Object document = nav.getDocument(url); XPath contextpath = new BaseXPath("/", nav); log("Initial Context :: " + contextpath); List list = contextpath.selectNodes(document); Iterator iter = list.iterator(); while (iter.hasNext()) { Object context = iter.next(); assertCountXPath(3, context, "//processing-instruction()"); assertCountXPath(2, context, "//processing-instruction('cheese')"); try { Object result = assertCountXPath2(1, context, "//processing-instruction('toast')"); assertValueOfXPath("is tasty", result, "string()"); } catch (UnsupportedAxisException e) { log(debug, " ## SKIPPED -- Unsupported Axis"); } } } /* test evaluate() extension function */ public void testid54032() throws JaxenException { Navigator nav = getNavigator(); String url = TESTS_ROOT + "xml/evaluate.xml"; log("Document [" + url + "]"); Object document = nav.getDocument(url); XPath contextpath = new BaseXPath("/", nav); log("Initial Context :: " + contextpath); List list = contextpath.selectNodes(document); Iterator iter = list.iterator(); while (iter.hasNext()) { Object context = iter.next(); assertCountXPath(3, context, "evaluate('//jumps/*')"); assertCountXPath(1, context, "evaluate('//jumps/object/dog')"); assertCountXPath(0, context, "evaluate('//jumps/object')/evaluate"); assertCountXPath(1, context, "evaluate('//jumps/object')/dog"); assertCountXPath(1, context, "evaluate('//jumps/*')/dog"); assertCountXPath(1, context, "//metatest[ evaluate(@select) = . ]"); } } public void testid54082() throws JaxenException { Navigator nav = getNavigator(); String url = TESTS_ROOT + "xml/numbers.xml"; log("Document [" + url + "]"); Object document = nav.getDocument(url); XPath contextpath = new BaseXPath("/numbers/set[1]", nav); log("Initial Context :: " + contextpath); List list = contextpath.selectNodes(document); Iterator iter = list.iterator(); while (iter.hasNext()) { Object context = iter.next(); assertCountXPath(1, context, "*[-3 = .]"); assertValueOfXPath("true", context, "54 < *"); assertValueOfXPath("true", context, "55 <= *"); assertValueOfXPath("false", context, "69 < *"); assertValueOfXPath("true", context, "-2 > *"); assertValueOfXPath("true", context, "-3 >= *"); assertValueOfXPath("false", context, "-4 >= *"); } } /* TODO This context should work, but needs a fixed version of saxpath to parse the right-hand side of the greater-than expression. false false true true */ /* test sibling axes */ public void testid54145() throws JaxenException { Navigator nav = getNavigator(); String url = TESTS_ROOT + "xml/axis.xml"; log("Document [" + url + "]"); Object document = nav.getDocument(url); XPath contextpath = new BaseXPath("/root", nav); log("Initial Context :: " + contextpath); List list = contextpath.selectNodes(document); Iterator iter = list.iterator(); while (iter.hasNext()) { Object context = iter.next(); assertCountXPath(0, context, "preceding-sibling::*"); } } public void testid54156() throws JaxenException { Navigator nav = getNavigator(); String url = TESTS_ROOT + "xml/axis.xml"; log("Document [" + url + "]"); Object document = nav.getDocument(url); XPath contextpath = new BaseXPath("/root/a/a.3", nav); log("Initial Context :: " + contextpath); List list = contextpath.selectNodes(document); Iterator iter = list.iterator(); while (iter.hasNext()) { Object context = iter.next(); assertCountXPath(2, context, "preceding::*"); } } public void testid54168() throws JaxenException { Navigator nav = getNavigator(); String url = TESTS_ROOT + "xml/axis.xml"; log("Document [" + url + "]"); Object document = nav.getDocument(url); XPath contextpath = new BaseXPath("/root/a/a.3", nav); log("Initial Context :: " + contextpath); List list = contextpath.selectNodes(document); Iterator iter = list.iterator(); while (iter.hasNext()) { Object context = iter.next(); assertCountXPath(2, context, "preceding-sibling::*"); } } public void testid54180() throws JaxenException { Navigator nav = getNavigator(); String url = TESTS_ROOT + "xml/axis.xml"; log("Document [" + url + "]"); Object document = nav.getDocument(url); XPath contextpath = new BaseXPath("/", nav); log("Initial Context :: " + contextpath); List list = contextpath.selectNodes(document); Iterator iter = list.iterator(); while (iter.hasNext()) { Object context = iter.next(); assertValueOfXPath("a.2", context, "name(/root/a/a.3/preceding-sibling::*[1])"); assertValueOfXPath("a.1", context, "name(/root/a/a.3/preceding-sibling::*[2])"); } } public void testid54197() throws JaxenException { Navigator nav = getNavigator(); String url = TESTS_ROOT + "xml/axis.xml"; log("Document [" + url + "]"); Object document = nav.getDocument(url); XPath contextpath = new BaseXPath("/", nav); log("Initial Context :: " + contextpath); List list = contextpath.selectNodes(document); Iterator iter = list.iterator(); while (iter.hasNext()) { Object context = iter.next(); assertValueOfXPath("a.4", context, "name(/root/a/a.3/following-sibling::*[1])"); assertValueOfXPath("a.5", context, "name(/root/a/a.3/following-sibling::*[2])"); } } public void testid54219() throws JaxenException { Navigator nav = getNavigator(); String url = TESTS_ROOT + "xml/web.xml"; log("Document [" + url + "]"); Object document = nav.getDocument(url); XPath contextpath = new BaseXPath("/", nav); log("Initial Context :: " + contextpath); List list = contextpath.selectNodes(document); Iterator iter = list.iterator(); while (iter.hasNext()) { Object context = iter.next(); assertValueOfXPath("snoop", context, "/web-app/servlet[1]/servlet-name"); assertValueOfXPath("snoop", context, "/web-app/servlet[1]/servlet-name/text()"); assertValueOfXPath("file", context, "/web-app/servlet[2]/servlet-name"); assertValueOfXPath("file", context, "/web-app/servlet[2]/servlet-name/text()"); } } public void testid54249() throws JaxenException { Navigator nav = getNavigator(); String url = TESTS_ROOT + "xml/web.xml"; log("Document [" + url + "]"); Object document = nav.getDocument(url); XPath contextpath = new BaseXPath("/web-app/servlet[1]", nav); log("Initial Context :: " + contextpath); List list = contextpath.selectNodes(document); Iterator iter = list.iterator(); while (iter.hasNext()) { Object context = iter.next(); assertValueOfXPath("snoop", context, "servlet-name"); assertValueOfXPath("snoop", context, "servlet-name/text()"); } } public void testid54266() throws JaxenException { Navigator nav = getNavigator(); String url = TESTS_ROOT + "xml/web.xml"; log("Document [" + url + "]"); Object document = nav.getDocument(url); XPath contextpath = new BaseXPath("/web-app/servlet[2]/servlet-name", nav); log("Initial Context :: " + contextpath); List list = contextpath.selectNodes(document); Iterator iter = list.iterator(); while (iter.hasNext()) { Object context = iter.next(); assertCountXPath(3, context, "preceding::*"); } } public void testid54278() throws JaxenException { Navigator nav = getNavigator(); String url = TESTS_ROOT + "xml/web.xml"; log("Document [" + url + "]"); Object document = nav.getDocument(url); XPath contextpath = new BaseXPath("/web-app/servlet[2]/servlet-name", nav); log("Initial Context :: " + contextpath); List list = contextpath.selectNodes(document); Iterator iter = list.iterator(); while (iter.hasNext()) { Object context = iter.next(); assertCountXPath(13, context, "following::*"); } } /* test name */ public void testid54298() throws JaxenException { Navigator nav = getNavigator(); String url = TESTS_ROOT + "xml/web.xml"; log("Document [" + url + "]"); Object document = nav.getDocument(url); XPath contextpath = new BaseXPath("/", nav); log("Initial Context :: " + contextpath); List list = contextpath.selectNodes(document); Iterator iter = list.iterator(); while (iter.hasNext()) { Object context = iter.next(); try { Object result = assertCountXPath2(1, context, "*"); assertValueOfXPath("web-app", result, "name()"); } catch (UnsupportedAxisException e) { log(debug, " ## SKIPPED -- Unsupported Axis"); } /* NOTE that the child::node() tests only work if the XML document does not comments or PIs */ try { Object result = assertCountXPath2(1, context, "./*"); assertValueOfXPath("web-app", result, "name()"); } catch (UnsupportedAxisException e) { log(debug, " ## SKIPPED -- Unsupported Axis"); } try { Object result = assertCountXPath2(1, context, "child::*"); assertValueOfXPath("web-app", result, "name()"); } catch (UnsupportedAxisException e) { log(debug, " ## SKIPPED -- Unsupported Axis"); } try { Object result = assertCountXPath2(1, context, "/*"); assertValueOfXPath("web-app", result, "name()"); } catch (UnsupportedAxisException e) { log(debug, " ## SKIPPED -- Unsupported Axis"); } try { Object result = assertCountXPath2(1, context, "/child::node()"); assertValueOfXPath("web-app", result, "name(.)"); } catch (UnsupportedAxisException e) { log(debug, " ## SKIPPED -- Unsupported Axis"); } try { Object result = assertCountXPath2(1, context, "child::node()"); assertValueOfXPath("web-app", result, "name(.)"); } catch (UnsupportedAxisException e) { log(debug, " ## SKIPPED -- Unsupported Axis"); } /* empty names */ assertValueOfXPath("", context, "name()"); assertValueOfXPath("", context, "name(.)"); assertValueOfXPath("", context, "name(parent::*)"); assertValueOfXPath("", context, "name(/)"); assertValueOfXPath("", context, "name(/.)"); assertValueOfXPath("", context, "name(/self::node())"); /* name of root elemet */ assertValueOfXPath("web-app", context, "name(node())"); assertValueOfXPath("web-app", context, "name(/node())"); assertValueOfXPath("web-app", context, "name(/*)"); assertValueOfXPath("web-app", context, "name(/child::*)"); assertValueOfXPath("web-app", context, "name(/child::node())"); assertValueOfXPath("web-app", context, "name(/child::node())"); assertValueOfXPath("web-app", context, "name(child::node())"); assertValueOfXPath("web-app", context, "name(./*)"); assertValueOfXPath("web-app", context, "name(*)"); } } public void testid54467() throws JaxenException { Navigator nav = getNavigator(); String url = TESTS_ROOT + "xml/web.xml"; log("Document [" + url + "]"); Object document = nav.getDocument(url); XPath contextpath = new BaseXPath("/*", nav); log("Initial Context :: " + contextpath); List list = contextpath.selectNodes(document); Iterator iter = list.iterator(); while (iter.hasNext()) { Object context = iter.next(); /* empty names */ assertValueOfXPath("", context, "name(..)"); assertValueOfXPath("", context, "name(parent::node())"); assertValueOfXPath("", context, "name(parent::*)"); /* name of root elemet */ assertValueOfXPath("web-app", context, "name()"); assertValueOfXPath("web-app", context, "name(.)"); assertValueOfXPath("web-app", context, "name(../*)"); assertValueOfXPath("web-app", context, "name(../child::node())"); } } /* test predicates */ public void testid54522() throws JaxenException { Navigator nav = getNavigator(); String url = TESTS_ROOT + "xml/nitf.xml"; log("Document [" + url + "]"); Object document = nav.getDocument(url); XPath contextpath = new BaseXPath("/nitf/head/docdata", nav); log("Initial Context :: " + contextpath); List list = contextpath.selectNodes(document); Iterator iter = list.iterator(); while (iter.hasNext()) { Object context = iter.next(); assertCountXPath(1, context, "doc-id[@regsrc='AP' and @id-string='D76UIMO80']"); } } public void testid54534() throws JaxenException { Navigator nav = getNavigator(); String url = TESTS_ROOT + "xml/nitf.xml"; log("Document [" + url + "]"); Object document = nav.getDocument(url); XPath contextpath = new BaseXPath("/nitf/head", nav); log("Initial Context :: " + contextpath); List list = contextpath.selectNodes(document); Iterator iter = list.iterator(); while (iter.hasNext()) { Object context = iter.next(); assertCountXPath(1, context, "meta[@name='ap-cycle']"); assertCountXPath(1, context, "meta[@content='AP']"); assertCountXPath(8, context, "meta[@name and @content]"); assertCountXPath(1, context, "meta[@name='ap-cycle' and @content='AP']"); assertCountXPath(7, context, "meta[@name != 'ap-cycle']"); } } public void testid54570() throws JaxenException { Navigator nav = getNavigator(); String url = TESTS_ROOT + "xml/nitf.xml"; log("Document [" + url + "]"); Object document = nav.getDocument(url); XPath contextpath = new BaseXPath("/", nav); log("Initial Context :: " + contextpath); List list = contextpath.selectNodes(document); Iterator iter = list.iterator(); while (iter.hasNext()) { Object context = iter.next(); assertCountXPath(1, context, "/nitf/head/meta[@name='ap-cycle']"); assertCountXPath(1, context, "/nitf/head/meta[@content='AP']"); assertCountXPath(8, context, "/nitf/head/meta[@name and @content]"); assertCountXPath(1, context, "/nitf/head/meta[@name='ap-cycle' and @content='AP']"); assertCountXPath(7, context, "/nitf/head/meta[@name != 'ap-cycle']"); } } public void testid54614() throws JaxenException { Navigator nav = getNavigator(); String url = TESTS_ROOT + "xml/moreover.xml"; log("Document [" + url + "]"); Object document = nav.getDocument(url); XPath contextpath = new BaseXPath("/", nav); log("Initial Context :: " + contextpath); List list = contextpath.selectNodes(document); Iterator iter = list.iterator(); while (iter.hasNext()) { Object context = iter.next(); assertCountXPath(1, context, "/child::node()"); assertCountXPath(1, context, "/*"); assertCountXPath(20, context, "/*/article"); assertCountXPath(221, context, "//*"); assertCountXPath(20, context, "//*[local-name()='article']"); assertCountXPath(20, context, "//article"); assertCountXPath(20, context, "/*/*[@code]"); assertCountXPath(1, context, "/moreovernews/article[@code='13563275']"); try { BaseXPath xpath = new BaseXPath("/moreovernews/article[@code='13563275']", getNavigator()); List results = xpath.selectNodes(getContext(context)); Object result = results.get(0); assertValueOfXPath("http://c.moreover.com/click/here.pl?x13563273", result, "url"); } catch (UnsupportedAxisException e) { log(debug, " ## SKIPPED -- Unsupported Axis"); } try { BaseXPath xpath = new BaseXPath("/*/article[@code='13563275']", getNavigator()); List results = xpath.selectNodes(getContext(context)); Object result = results.get(0); assertValueOfXPath("http://c.moreover.com/click/here.pl?x13563273", result, "url"); } catch (UnsupportedAxisException e) { log(debug, " ## SKIPPED -- Unsupported Axis"); } try { BaseXPath xpath = new BaseXPath("//article[@code='13563275']", getNavigator()); List results = xpath.selectNodes(getContext(context)); Object result = results.get(0); assertValueOfXPath("http://c.moreover.com/click/here.pl?x13563273", result, "url"); } catch (UnsupportedAxisException e) { log(debug, " ## SKIPPED -- Unsupported Axis"); } try { BaseXPath xpath = new BaseXPath("//*[@code='13563275']", getNavigator()); List results = xpath.selectNodes(getContext(context)); Object result = results.get(0); assertValueOfXPath("http://c.moreover.com/click/here.pl?x13563273", result, "url"); } catch (UnsupportedAxisException e) { log(debug, " ## SKIPPED -- Unsupported Axis"); } try { BaseXPath xpath = new BaseXPath("/child::node()/child::node()[@code='13563275']", getNavigator()); List results = xpath.selectNodes(getContext(context)); Object result = results.get(0); assertValueOfXPath("http://c.moreover.com/click/here.pl?x13563273", result, "url"); } catch (UnsupportedAxisException e) { log(debug, " ## SKIPPED -- Unsupported Axis"); } try { BaseXPath xpath = new BaseXPath("/*/*[@code='13563275']", getNavigator()); List results = xpath.selectNodes(getContext(context)); Object result = results.get(0); assertValueOfXPath("http://c.moreover.com/click/here.pl?x13563273", result, "url"); } catch (UnsupportedAxisException e) { log(debug, " ## SKIPPED -- Unsupported Axis"); } } } /* test other node types */ public void testid54747() throws JaxenException { Navigator nav = getNavigator(); String url = TESTS_ROOT + "xml/contents.xml"; log("Document [" + url + "]"); Object document = nav.getDocument(url); XPath contextpath = new BaseXPath("/", nav); log("Initial Context :: " + contextpath); List list = contextpath.selectNodes(document); Iterator iter = list.iterator(); while (iter.hasNext()) { Object context = iter.next(); assertCountXPath(3, context, "processing-instruction()"); assertCountXPath(3, context, "/processing-instruction()"); assertCountXPath(1, context, "/comment()"); assertCountXPath(1, context, "comment()"); assertCountXPath(2, context, "/child::node()/comment()"); assertCountXPath(2, context, "/*/comment()"); assertCountXPath(3, context, "//comment()"); } } /* test positioning */ public void testid54802() throws JaxenException { Navigator nav = getNavigator(); String url = TESTS_ROOT + "xml/fibo.xml"; log("Document [" + url + "]"); Object document = nav.getDocument(url); XPath contextpath = new BaseXPath("/", nav); log("Initial Context :: " + contextpath); List list = contextpath.selectNodes(document); Iterator iter = list.iterator(); while (iter.hasNext()) { Object context = iter.next(); assertCountXPath(9, context, "/*/fibonacci[position() < 10]"); assertValueOfXPath("196417", context, "sum(//fibonacci)"); assertValueOfXPath("325", context, "sum(//fibonacci/@index)"); assertValueOfXPath("1", context, "/*/fibonacci[2]"); assertValueOfXPath("75025", context, "/*/fibonacci[ count(/*/fibonacci) ]"); assertValueOfXPath("46368", context, "/*/fibonacci[ count(/*/fibonacci) - 1 ]"); } } /* test number functions */ /* test Axes */ public void testid54853() throws JaxenException { Navigator nav = getNavigator(); String url = TESTS_ROOT + "xml/web.xml"; log("Document [" + url + "]"); Object document = nav.getDocument(url); XPath contextpath = new BaseXPath("/", nav); log("Initial Context :: " + contextpath); List list = contextpath.selectNodes(document); Iterator iter = list.iterator(); while (iter.hasNext()) { Object context = iter.next(); assertCountXPath(19, context, "descendant-or-self::*"); assertCountXPath(19, context, "descendant::*"); assertCountXPath(19, context, "/descendant::*"); assertCountXPath(19, context, "/descendant-or-self::*"); assertCountXPath(2, context, "/descendant::servlet"); assertCountXPath(2, context, "/descendant-or-self::servlet"); assertCountXPath(2, context, "descendant-or-self::servlet"); assertCountXPath(2, context, "descendant::servlet"); assertCountXPath(2, context, "/*/servlet"); assertValueOfXPath("2", context, "count(/*/servlet)"); assertCountXPath(2, context, "//servlet"); assertValueOfXPath("2", context, "count(//servlet)"); } } public void testid54932() throws JaxenException { Navigator nav = getNavigator(); String url = TESTS_ROOT + "xml/web.xml"; log("Document [" + url + "]"); Object document = nav.getDocument(url); XPath contextpath = new BaseXPath("/web-app", nav); log("Initial Context :: " + contextpath); List list = contextpath.selectNodes(document); Iterator iter = list.iterator(); while (iter.hasNext()) { Object context = iter.next(); assertCountXPath(2, context, "/descendant::servlet"); assertCountXPath(2, context, "/descendant-or-self::servlet"); assertCountXPath(2, context, "descendant-or-self::servlet"); assertCountXPath(2, context, "descendant::servlet"); } } public void testid54968() throws JaxenException { Navigator nav = getNavigator(); String url = TESTS_ROOT + "xml/much_ado.xml"; log("Document [" + url + "]"); Object document = nav.getDocument(url); XPath contextpath = new BaseXPath("/", nav); log("Initial Context :: " + contextpath); List list = contextpath.selectNodes(document); Iterator iter = list.iterator(); while (iter.hasNext()) { Object context = iter.next(); assertCountXPath(5, context, "/descendant::ACT"); assertCountXPath(5, context, "descendant::ACT"); assertValueOfXPath("Much Ado about Nothing", context, "/PLAY/TITLE"); assertValueOfXPath("4", context, "2+2"); assertValueOfXPath("21", context, "5 * 4 + 1"); assertValueOfXPath("5", context, "count(descendant::ACT)"); assertValueOfXPath("35", context, "10 + count(descendant::ACT) * 5"); assertValueOfXPath("75", context, "(10 + count(descendant::ACT)) * 5"); } } public void testid55020() throws JaxenException { Navigator nav = getNavigator(); String url = TESTS_ROOT + "xml/much_ado.xml"; log("Document [" + url + "]"); Object document = nav.getDocument(url); XPath contextpath = new BaseXPath("/PLAY/ACT[2]/SCENE[1]", nav); log("Initial Context :: " + contextpath); List list = contextpath.selectNodes(document); Iterator iter = list.iterator(); while (iter.hasNext()) { Object context = iter.next(); assertCountXPath(5, context, "/descendant::ACT"); assertCountXPath(5, context, "../../descendant::ACT"); assertCountXPath(141, context, "/PLAY/ACT[2]/SCENE[1]/descendant::SPEAKER"); assertCountXPath(141, context, "descendant::SPEAKER"); assertValueOfXPath("646", context, "count(descendant::*)+1"); assertValueOfXPath("142", context, "count(descendant::SPEAKER)+1"); assertValueOfXPath("2", context, "count(ancestor::*)"); assertValueOfXPath("1", context, "count(ancestor::PLAY)"); assertValueOfXPath("3", context, "count(ancestor-or-self::*)"); assertValueOfXPath("1", context, "count(ancestor-or-self::PLAY)"); assertValueOfXPath("6", context, "5+count(ancestor::*)-1"); } } public void testid55090() throws JaxenException { Navigator nav = getNavigator(); String url = TESTS_ROOT + "xml/much_ado.xml"; log("Document [" + url + "]"); Object document = nav.getDocument(url); XPath contextpath = new BaseXPath("/", nav); log("Initial Context :: " + contextpath); List list = contextpath.selectNodes(document); Iterator iter = list.iterator(); while (iter.hasNext()) { Object context = iter.next(); /* Test correct predicate application */ assertValueOfXPath("5", context, "count(/PLAY/ACT/SCENE[1])"); } } /* test axis node ordering */ public void testid55112() throws JaxenException { Navigator nav = getNavigator(); String url = TESTS_ROOT + "xml/web.xml"; log("Document [" + url + "]"); Object document = nav.getDocument(url); XPath contextpath = new BaseXPath("/", nav); log("Initial Context :: " + contextpath); List list = contextpath.selectNodes(document); Iterator iter = list.iterator(); while (iter.hasNext()) { Object context = iter.next(); /* Reported as Jira issue JAXEN-24 */ assertCountXPath(1, context, "//servlet-mapping/preceding::*[1][name()='description']"); assertCountXPath(1, context, "/web-app/servlet//description/following::*[1][name()='servlet-mapping']"); assertCountXPath(1, context, "/web-app/servlet//description/following::*[2][name()='servlet-name']"); } } /* test document function */ public void testid55150() throws JaxenException { Navigator nav = getNavigator(); String url = TESTS_ROOT + "xml/text.xml"; log("Document [" + url + "]"); Object document = nav.getDocument(url); XPath contextpath = new BaseXPath("/", nav); log("Initial Context :: " + contextpath); List list = contextpath.selectNodes(document); Iterator iter = list.iterator(); while (iter.hasNext()) { Object context = iter.next(); try { Object result = assertCountXPath2(1, context, "document('test-resources/xml/web.xml')"); assertValueOfXPath("snoop", result, "/web-app/servlet[1]/servlet-name"); assertValueOfXPath("snoop", result, "/web-app/servlet[1]/servlet-name/text()"); } catch (UnsupportedAxisException e) { log(debug, " ## SKIPPED -- Unsupported Axis"); } assertValueOfXPath("snoop", context, "document('test-resources/xml/web.xml')/web-app/servlet[1]/servlet-name"); } } /* Test to check if the context changes when an extension function is used. First test is an example, second is the actual test. */ public void testid55189() throws JaxenException { Navigator nav = getNavigator(); String url = TESTS_ROOT + "xml/text.xml"; log("Document [" + url + "]"); Object document = nav.getDocument(url); XPath contextpath = new BaseXPath("/foo/bar/cheese[1]", nav); log("Initial Context :: " + contextpath); List list = contextpath.selectNodes(document); Iterator iter = list.iterator(); while (iter.hasNext()) { Object context = iter.next(); assertValueOfXPath("3foo3", context, "concat(./@id,'foo',@id)"); assertValueOfXPath("3snoop3", context, "concat(./@id,document('test-resources/xml/web.xml')/web-app/servlet[1]/servlet-name,./@id)"); } } public void testid55211() throws JaxenException { Navigator nav = getNavigator(); String url = TESTS_ROOT + "xml/message.xml"; log("Document [" + url + "]"); Object document = nav.getDocument(url); XPath contextpath = new BaseXPath("/", nav); log("Initial Context :: " + contextpath); List list = contextpath.selectNodes(document); Iterator iter = list.iterator(); while (iter.hasNext()) { Object context = iter.next(); assertValueOfXPath("Pruefgebiete", context, "/message/body/data/items/item[name/text()='parentinfo']/value"); assertValueOfXPath("Pruefgebiete", context, "document('test-resources/xml/message.xml')/message/body/data/items/item[name/text()='parentinfo']/value"); } } /* test behaviour of AbsoluteLocationPath */ public void testid55183() throws JaxenException { Navigator nav = getNavigator(); String url = TESTS_ROOT + "xml/simple.xml"; log("Document [" + url + "]"); Object document = nav.getDocument(url); XPath contextpath = new BaseXPath("/root/a", nav); log("Initial Context :: " + contextpath); List list = contextpath.selectNodes(document); Iterator iter = list.iterator(); while (iter.hasNext()) { Object context = iter.next(); assertValueOfXPath("ab", context, "concat( ., /root/b )"); assertValueOfXPath("ba", context, "concat( ../b, . )"); assertValueOfXPath("ba", context, "concat( /root/b, . )"); assertValueOfXPath("db", context, "concat( /root/c/d, ../b )"); } } /* test the translate() function */ public void testid55268() throws JaxenException { Navigator nav = getNavigator(); String url = TESTS_ROOT + "xml/simple.xml"; log("Document [" + url + "]"); Object document = nav.getDocument(url); XPath contextpath = new BaseXPath("/", nav); log("Initial Context :: " + contextpath); List list = contextpath.selectNodes(document); Iterator iter = list.iterator(); while (iter.hasNext()) { Object context = iter.next(); assertValueOfXPath("", context, "translate( '', '', '' )"); assertValueOfXPath("abcd", context, "translate( 'abcd', '', '' )"); assertValueOfXPath("abcd", context, "translate( 'abcd', 'abcd', 'abcd' )"); assertValueOfXPath("abcd", context, "translate( 'abcd', 'dcba', 'dcba' )"); assertValueOfXPath("dcba", context, "translate( 'abcd', 'abcd', 'dcba' )"); assertValueOfXPath("ab", context, "translate( 'abcd', 'abcd', 'ab' )"); assertValueOfXPath("cd", context, "translate( 'abcd', 'cdab', 'cd' )"); assertValueOfXPath("xy", context, "translate( 'abcd', 'acbd', 'xy' )"); assertValueOfXPath("abcd", context, "translate( 'abcd', 'abcdb', 'abcdb' )"); assertValueOfXPath("abcd", context, "translate( 'abcd', 'abcd', 'abcdb' )"); } } public void testid55331() throws JaxenException { Navigator nav = getNavigator(); String url = TESTS_ROOT + "xml/simple.xml"; log("Document [" + url + "]"); Object document = nav.getDocument(url); XPath contextpath = new BaseXPath("/", nav); log("Initial Context :: " + contextpath); List list = contextpath.selectNodes(document); Iterator iter = list.iterator(); while (iter.hasNext()) { Object context = iter.next(); assertValueOfXPath("234", context, "substring('12345', 1.5, 2.6)"); assertValueOfXPath("12", context, "substring('12345', 0, 3)"); assertValueOfXPath("", context, "substring('12345', 0 div 0, 3)"); assertValueOfXPath("", context, "substring('12345', 1, 0 div 0)"); assertValueOfXPath("12345", context, "substring('12345', -42, 1 div 0)"); assertValueOfXPath("", context, "substring('12345', -1 div 0, 1 div 0)"); assertValueOfXPath("345", context, "substring('12345', 3)"); assertValueOfXPath("12345", context, "substring('12345',1,15)"); } } /* Some tests for the normalize-space() function */ public void testid55382() throws JaxenException { Navigator nav = getNavigator(); String url = TESTS_ROOT + "xml/simple.xml"; log("Document [" + url + "]"); Object document = nav.getDocument(url); XPath contextpath = new BaseXPath("/", nav); log("Initial Context :: " + contextpath); List list = contextpath.selectNodes(document); Iterator iter = list.iterator(); while (iter.hasNext()) { Object context = iter.next(); assertValueOfXPath("abc", context, "normalize-space(' abc ')"); assertValueOfXPath("a b c", context, "normalize-space(' a b c ')"); assertValueOfXPath("a b c", context, "normalize-space(' a \n b \n c')"); /* Next test case addresses issue JAXEN-22 */ assertValueOfXPath("", context, "normalize-space(' ')"); /* Next test case addresses issue JAXEN-29 */ assertValueOfXPath("", context, "normalize-space('')"); } } /* test cases for String extension functions */ public void testid55429() throws JaxenException { Navigator nav = getNavigator(); String url = TESTS_ROOT + "xml/web.xml"; log("Document [" + url + "]"); Object document = nav.getDocument(url); XPath contextpath = new BaseXPath("/web-app/servlet[1]", nav); log("Initial Context :: " + contextpath); List list = contextpath.selectNodes(document); Iterator iter = list.iterator(); while (iter.hasNext()) { Object context = iter.next(); assertValueOfXPath("SNOOPSERVLET", context, "upper-case( servlet-class )"); assertValueOfXPath("snoopservlet", context, "lower-case( servlet-class )"); assertValueOfXPath("SNOOPSERVLET", context, "upper-case( servlet-class, 'fr' )"); assertValueOfXPath("SNOOPSERVLET", context, "upper-case( servlet-class, 'fr-CA' )"); assertValueOfXPath("SNOOPSERVLET", context, "upper-case( servlet-class, 'es-ES-Traditional_WIN' )"); assertValueOfXPath("true", context, "ends-with( servlet-class, 'Servlet' )"); assertValueOfXPath("false", context, "ends-with( servlet-class, 'S' )"); } } /* test cases for the lang() function */ public void testid55485() throws JaxenException { Navigator nav = getNavigator(); String url = TESTS_ROOT + "xml/lang.xml"; log("Document [" + url + "]"); Object document = nav.getDocument(url); XPath contextpath = new BaseXPath("/", nav); log("Initial Context :: " + contextpath); List list = contextpath.selectNodes(document); Iterator iter = list.iterator(); while (iter.hasNext()) { Object context = iter.next(); assertCountXPath(0, context, "/e1/e2[lang('hr')]"); // assertCountXPath(1, context, "/e1/e2/e3[lang('en')]"); // assertCountXPath(1, context, "/e1/e2/e3[lang('en-US')]"); assertCountXPath(0, context, "/e1/e2/e3[lang('en-GB')]"); assertCountXPath(2, context, "/e1/e2/e3[lang('hu')]"); assertCountXPath(0, context, "/e1/e2/e3[lang('hu-HU')]"); assertCountXPath(1, context, "/e1/e2/e3[lang('es')]"); assertCountXPath(0, context, "/e1/e2/e3[lang('es-BR')]"); } } /* test namespace */ public void testid55235() throws JaxenException { Navigator nav = getNavigator(); String url = TESTS_ROOT + "xml/namespaces.xml"; log("Document [" + url + "]"); Object document = nav.getDocument(url); XPath contextpath = new BaseXPath("/", nav); log("Initial Context :: " + contextpath); List list = contextpath.selectNodes(document); SimpleNamespaceContext nsContext = new SimpleNamespaceContext(); nsContext.addNamespace("alias", "http://fooNamespace/"); nsContext.addNamespace("bar", "http://barNamespace/"); nsContext.addNamespace("voo", "http://fooNamespace/"); nsContext.addNamespace("foo", "http://fooNamespace/"); getContextSupport().setNamespaceContext(nsContext); Iterator iter = list.iterator(); while (iter.hasNext()) { Object context = iter.next(); assertCountXPath(1, context, "/*"); assertCountXPath(1, context, "/foo:a"); assertCountXPath(1, context, "/foo:a/b"); assertCountXPath(1, context, "/voo:a/b/c"); assertCountXPath(1, context, "/voo:a/bar:f"); assertCountXPath(1, context, "/*[namespace-uri()='http://fooNamespace/' and local-name()='a']"); assertCountXPath(1, context, "/*[local-name()='a' and namespace-uri()='http://fooNamespace/']/*[local-name()='x' and namespace-uri()='http://fooNamespace/']"); assertCountXPath(1, context, "/*[local-name()='a' and namespace-uri()='http://fooNamespace/']/*[local-name()='x' and namespace-uri()='http://fooNamespace/']/*[local-name()='y' and namespace-uri()='http://fooNamespace/']"); } } /* the prefix here and in the document have no relation; it's their namespace-uri binding that counts */ public void testid55615() throws JaxenException { Navigator nav = getNavigator(); String url = TESTS_ROOT + "xml/namespaces.xml"; log("Document [" + url + "]"); Object document = nav.getDocument(url); XPath contextpath = new BaseXPath("/", nav); log("Initial Context :: " + contextpath); List list = contextpath.selectNodes(document); SimpleNamespaceContext nsContext = new SimpleNamespaceContext(); nsContext.addNamespace("foo", "http://somethingElse/"); getContextSupport().setNamespaceContext(nsContext); Iterator iter = list.iterator(); while (iter.hasNext()) { Object context = iter.next(); assertCountXPath(0, context, "/foo:a/b/c"); } } public void testid55632() throws JaxenException { Navigator nav = getNavigator(); String url = TESTS_ROOT + "xml/namespaces.xml"; log("Document [" + url + "]"); Object document = nav.getDocument(url); XPath contextpath = new BaseXPath("/", nav); log("Initial Context :: " + contextpath); List list = contextpath.selectNodes(document); SimpleNamespaceContext nsContext = new SimpleNamespaceContext(); nsContext.addNamespace("alias", "http://fooNamespace/"); nsContext.addNamespace("bar", "http://barNamespace/"); nsContext.addNamespace("foo", "http://fooNamespace/"); getContextSupport().setNamespaceContext(nsContext); Iterator iter = list.iterator(); while (iter.hasNext()) { Object context = iter.next(); assertValueOfXPath("Hello", context, "/foo:a/b/c"); assertValueOfXPath("Hey", context, "/foo:a/foo:d/foo:e"); assertValueOfXPath("Hey3", context, "/foo:a/alias:x/alias:y"); assertValueOfXPath("Hey3", context, "/foo:a/foo:x/foo:y"); assertValueOfXPath("Hey3", context, "/*[local-name()='a' and namespace-uri()='http://fooNamespace/']/*[local-name()='x' and namespace-uri()='http://fooNamespace/']/*[local-name()='y' and namespace-uri()='http://fooNamespace/']"); } } public void testid55676() throws JaxenException { Navigator nav = getNavigator(); String url = TESTS_ROOT + "xml/defaultNamespace.xml"; log("Document [" + url + "]"); Object document = nav.getDocument(url); XPath contextpath = new BaseXPath("/", nav); log("Initial Context :: " + contextpath); List list = contextpath.selectNodes(document); Iterator iter = list.iterator(); while (iter.hasNext()) { Object context = iter.next(); /* NOTE: /a/b/c selects elements in no namespace only! */ assertCountXPath(0, context, "/a/b/c"); /* The following test uses an unbound prefix 'x' and should throw an exception. Addresses issue JAXEN-18. Turns out this isn't really tested as the test didn't fail when the exception wasn't thrown. */ } } public void testid55692() throws JaxenException { Navigator nav = getNavigator(); String url = TESTS_ROOT + "xml/defaultNamespace.xml"; log("Document [" + url + "]"); Object document = nav.getDocument(url); XPath contextpath = new BaseXPath("/", nav); log("Initial Context :: " + contextpath); List list = contextpath.selectNodes(document); SimpleNamespaceContext nsContext = new SimpleNamespaceContext(); nsContext.addNamespace("dummy", "http://dummyNamespace/"); getContextSupport().setNamespaceContext(nsContext); Iterator iter = list.iterator(); while (iter.hasNext()) { Object context = iter.next(); assertCountXPath(1, context, "/dummy:a/dummy:b/dummy:c"); } } public void testid55716() throws JaxenException { Navigator nav = getNavigator(); String url = TESTS_ROOT + "xml/text.xml"; log("Document [" + url + "]"); Object document = nav.getDocument(url); XPath contextpath = new BaseXPath("/", nav); log("Initial Context :: " + contextpath); List list = contextpath.selectNodes(document); Iterator iter = list.iterator(); while (iter.hasNext()) { Object context = iter.next(); assertCountXPath(3, context, "/foo/bar/text()"); assertValueOfXPath("baz", context, "normalize-space(/foo/bar/text())"); } } public void testid55739() throws JaxenException { Navigator nav = getNavigator(); String url = TESTS_ROOT + "xml/testNamespaces.xml"; log("Document [" + url + "]"); Object document = nav.getDocument(url); XPath contextpath = new BaseXPath("/", nav); log("Initial Context :: " + contextpath); List list = contextpath.selectNodes(document); Iterator iter = list.iterator(); while (iter.hasNext()) { Object context = iter.next(); /* the root is not an element, so no namespaces */ assertCountXPath(0, context, "namespace::*"); assertCountXPath(0, context, "/namespace::*"); /* must count the default xml: prefix as well */ assertCountXPath(3, context, "/Template/Application1/namespace::*"); assertCountXPath(3, context, "/Template/Application2/namespace::*"); /* every element has separate copies */ assertCountXPath(25, context, "//namespace::*"); } } public void testid55797() throws JaxenException { Navigator nav = getNavigator(); String url = TESTS_ROOT + "xml/testNamespaces.xml"; log("Document [" + url + "]"); Object document = nav.getDocument(url); XPath contextpath = new BaseXPath("/Template/Application1", nav); log("Initial Context :: " + contextpath); List list = contextpath.selectNodes(document); Iterator iter = list.iterator(); while (iter.hasNext()) { Object context = iter.next(); /* must count the default xml: prefix as well */ assertCountXPath(3, context, "namespace::*"); assertCountXPath(0, context, "/namespace::*"); assertCountXPath(3, context, "/Template/Application1/namespace::*"); assertCountXPath(3, context, "/Template/Application2/namespace::*"); assertCountXPath(25, context, "//namespace::*"); assertCountXPath(8, context, "//namespace::xplt"); /* the name test literally matches the prefix as given in the document, and does not use the uri */ assertCountXPath(0, context, "//namespace::somethingelse"); } } public void testid55873() throws JaxenException { Navigator nav = getNavigator(); String url = TESTS_ROOT + "xml/testNamespaces.xml"; log("Document [" + url + "]"); Object document = nav.getDocument(url); XPath contextpath = new BaseXPath("/", nav); log("Initial Context :: " + contextpath); List list = contextpath.selectNodes(document); Iterator iter = list.iterator(); while (iter.hasNext()) { Object context = iter.next(); /* namespace nodes have their element as their parent */ assertCountXPath(1, context, "/Template/namespace::xml/parent::Template"); } } /* namespace nodes can also be used as context nodes */ public void testid55893() throws JaxenException { Navigator nav = getNavigator(); String url = TESTS_ROOT + "xml/testNamespaces.xml"; log("Document [" + url + "]"); Object document = nav.getDocument(url); XPath contextpath = new BaseXPath("/Template/namespace::xml", nav); log("Initial Context :: " + contextpath); List list = contextpath.selectNodes(document); Iterator iter = list.iterator(); while (iter.hasNext()) { Object context = iter.next(); assertCountXPath(1, context, "parent::Template"); } } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/binary/0000755000000000000000000000000011131637474024371 5ustar rootrootaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/binary/fastinfoset/0000755000000000000000000000000011131637474026716 5ustar rootrootaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/attachments/0000755000000000000000000000000011131637474025420 5ustar rootrootaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/attachments/AttachmentsTest.java0000644000000000000000000003707611131637474031413 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.attachments; import org.apache.axiom.om.AbstractTestCase; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMOutputFormat; import org.apache.axiom.om.impl.MTOMXMLStreamWriter; import org.apache.axiom.om.impl.builder.XOPAwareStAXOMBuilder; import org.apache.axiom.om.util.CommonUtils; import javax.activation.DataHandler; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.util.Arrays; import java.util.Set; public class AttachmentsTest extends AbstractTestCase { public AttachmentsTest(String testName) { super(testName); } String inMimeFileName = "mtom/MTOMAttachmentStream.bin"; String img1FileName = "mtom/img/test.jpg"; String img2FileName = "mtom/img/test2.jpg"; String boundary = "MIMEBoundaryurn:uuid:A3ADBAEE51A1A87B2A11443668160701"; String start= "0.urn:uuid:A3ADBAEE51A1A87B2A11443668160702@apache.org"; String contentTypeString = "multipart/related; " + "boundary=\"" + boundary + "\"; " + "type=\"application/xop+xml\"; " + "start=\"<" + start +">\"; " + "start-info=\"application/soap+xml\"; " + "charset=UTF-8;" + "action=\"mtomSample\""; public void testMIMEHelper() { } public void testGetAttachmentSpecType() { } public void testSimultaneousStreamAccess() throws Exception { InputStream inStream; Attachments attachments; inStream = getTestResource(inMimeFileName); attachments = new Attachments(inStream, contentTypeString); attachments.getDataHandler("2.urn:uuid:A3ADBAEE51A1A87B2A11443668160994@apache.org"); // This should throw an error try { attachments.getIncomingAttachmentStreams(); fail("No exception caught when attempting to access datahandler and stream at the same time"); } catch (IllegalStateException ise) { // Nothing } inStream.close(); // Try the other way around. inStream = getTestResource(inMimeFileName); attachments = new Attachments(inStream, contentTypeString); attachments.getIncomingAttachmentStreams(); // These should NOT throw error even though they are using part based access try { String contentType = attachments.getSOAPPartContentType(); assertTrue(contentType.indexOf("application/xop+xml;") >=0); assertTrue(contentType.indexOf("charset=UTF-8;") >=0); assertTrue(contentType.indexOf("type=\"application/soap+xml\";") >=0); } catch (IllegalStateException ise) { fail("No exception expected when requesting SOAP part data"); ise.printStackTrace(); } try { attachments.getSOAPPartInputStream(); } catch (IllegalStateException ise) { fail("No exception expected when requesting SOAP part data"); } // These should throw an error try { attachments.getDataHandler("2.urn:uuid:A3ADBAEE51A1A87B2A11443668160994@apache.org"); fail("No exception caught when attempting to access stream and datahandler at the same time"); } catch (IllegalStateException ise) { // Nothing } // Additionally, we also need to ensure mutual exclusion if someone // tries to access part data directly try { attachments.getAllContentIDs(); fail("No exception caught when attempting to access stream and contentids list at the same time"); } catch (IllegalStateException ise) { // Nothing } try { attachments.getDataHandler("2.urn:uuid:A3ADBAEE51A1A87B2A11443668160994@apache.org"); fail("No exception caught when attempting to access stream and part at the same time"); } catch (IllegalStateException ise) { // Nothing } } public void testGetInputAttachhmentStreams() throws Exception { IncomingAttachmentInputStream dataIs; InputStream expectedDataIs; InputStream inStream = getTestResource(inMimeFileName); Attachments attachments = new Attachments(inStream, contentTypeString); // Since SOAP part operated independently of other streams, access it // directly, and then get to the streams. If this sequence throws an // error, something is wrong with the stream handling code. InputStream is = attachments.getSOAPPartInputStream(); while (is.read() != -1) ; // Get the inputstream container IncomingAttachmentStreams ias = attachments.getIncomingAttachmentStreams(); dataIs = ias.getNextStream(); expectedDataIs = getTestResource(img1FileName); compareStreams(dataIs, expectedDataIs); dataIs = ias.getNextStream(); expectedDataIs = getTestResource(img2FileName); compareStreams(dataIs, expectedDataIs); // Confirm that no more streams are left assertEquals(null, ias.getNextStream()); // After all is done, we should *still* be able to access and // re-consume the SOAP part stream, as it should be cached.. can we? is = attachments.getSOAPPartInputStream(); while (is.read() != -1) ; } public void testWritingBinaryAttachments() throws Exception { // Read in message: SOAPPart and 2 image attachments InputStream inStream = getTestResource(inMimeFileName); Attachments attachments = new Attachments(inStream, contentTypeString); attachments.getSOAPPartInputStream(); String[] contentIDs = attachments.getAllContentIDs(); OMOutputFormat oof = new OMOutputFormat(); oof.setDoOptimize(true); oof.setMimeBoundary(boundary); oof.setRootContentId(start); // Write out the message ByteArrayOutputStream baos = new ByteArrayOutputStream(); MTOMXMLStreamWriter writer = new MTOMXMLStreamWriter(baos, oof); XOPAwareStAXOMBuilder builder = new XOPAwareStAXOMBuilder(attachments.getSOAPPartInputStream(), attachments); OMElement om = builder.getDocumentElement(); om.serialize(writer); String outNormal = baos.toString(); assertTrue(outNormal.indexOf("base64") == -1); // Now do it again but use base64 content-type-encoding for // binary attachments baos = new ByteArrayOutputStream(); oof.setProperty(OMOutputFormat.USE_CTE_BASE64_FOR_NON_TEXTUAL_ATTACHMENTS, Boolean.TRUE); writer = new MTOMXMLStreamWriter(baos, oof); builder = new XOPAwareStAXOMBuilder(attachments.getSOAPPartInputStream(), attachments); om = builder.getDocumentElement(); om.serialize(writer); String outBase64 = baos.toString(); // Do a quick check to see if the data is base64 and is // writing base64 compliant code. assertTrue(outBase64.indexOf("base64") != -1); assertTrue(outBase64.indexOf("GBgcGBQgHBwcJCQgKDBQNDAsL") != -1); // Now read the data back in InputStream is = new ByteArrayInputStream(outBase64.getBytes()); Attachments attachments2 = new Attachments(is, contentTypeString); // Now write it back out with binary... baos = new ByteArrayOutputStream(); oof.setProperty(OMOutputFormat.USE_CTE_BASE64_FOR_NON_TEXTUAL_ATTACHMENTS, Boolean.FALSE); writer = new MTOMXMLStreamWriter(baos, oof); builder = new XOPAwareStAXOMBuilder(attachments2.getSOAPPartInputStream(), attachments2); om = builder.getDocumentElement(); om.serialize(writer); String outBase64ToNormal = baos.toString(); assertTrue(outBase64ToNormal.indexOf("base64") == -1); // Now do it again but use base64 content-type-encoding for // binary attachments baos = new ByteArrayOutputStream(); oof.setProperty(OMOutputFormat.USE_CTE_BASE64_FOR_NON_TEXTUAL_ATTACHMENTS, Boolean.TRUE); writer = new MTOMXMLStreamWriter(baos, oof); builder = new XOPAwareStAXOMBuilder(attachments2.getSOAPPartInputStream(), attachments2); om = builder.getDocumentElement(); om.serialize(writer); String outBase64ToBase64 = baos.toString(); // Do a quick check to see if the data is base64 and is // writing base64 compliant code. assertTrue(outBase64ToBase64.indexOf("base64") != -1); assertTrue(outBase64ToBase64.indexOf("GBgcGBQgHBwcJCQgKDBQNDAsL") != -1); // Some quick verifications of the isTextualPart logic assertTrue(CommonUtils.isTextualPart("text/xml")); assertTrue(CommonUtils.isTextualPart("application/xml")); assertTrue(CommonUtils.isTextualPart("application/soap+xml")); assertTrue(CommonUtils.isTextualPart("foo/bar; charset=UTF-8")); assertTrue(!CommonUtils.isTextualPart("image/gif")); } private void compareStreams(InputStream data, InputStream expected) throws Exception { byte[] dataArray = this.getStreamAsByteArray(data, -1); byte[] expectedArray = this.getStreamAsByteArray(expected, -1); if (dataArray.length == expectedArray.length) { assertTrue(Arrays.equals(dataArray, expectedArray)); } else { System.out.println("Skipping compare because of lossy image i/o [" + dataArray.length + "][" + expectedArray.length + "]"); } } public void testGetDataHandler() throws Exception { InputStream inStream = getTestResource(inMimeFileName); Attachments attachments = new Attachments(inStream, contentTypeString); DataHandler dh = attachments .getDataHandler("2.urn:uuid:A3ADBAEE51A1A87B2A11443668160994@apache.org"); InputStream dataIs = dh.getDataSource().getInputStream(); InputStream expectedDataIs = getTestResource(img2FileName); // Compare data across streams compareStreams(dataIs, expectedDataIs); } public void testNonExistingMIMEPart() throws Exception { InputStream inStream = getTestResource(inMimeFileName); Attachments attachments = new Attachments(inStream, contentTypeString); DataHandler dh = attachments.getDataHandler("ThisShouldReturnNull"); assertNull(dh); } public void testGetAllContentIDs() throws Exception { File f = getTestResourceFile(inMimeFileName); InputStream inStream = new FileInputStream(f); Attachments attachments = new Attachments(inStream, contentTypeString); String[] contentIDs = attachments.getAllContentIDs(); assertEquals(contentIDs.length, 3); assertEquals(contentIDs[0], "0.urn:uuid:A3ADBAEE51A1A87B2A11443668160702@apache.org"); assertEquals(contentIDs[1], "1.urn:uuid:A3ADBAEE51A1A87B2A11443668160943@apache.org"); assertEquals(contentIDs[2], "2.urn:uuid:A3ADBAEE51A1A87B2A11443668160994@apache.org"); Set idSet = attachments.getContentIDSet(); assertTrue(idSet.contains("0.urn:uuid:A3ADBAEE51A1A87B2A11443668160702@apache.org")); assertTrue(idSet.contains("2.urn:uuid:A3ADBAEE51A1A87B2A11443668160994@apache.org")); assertTrue(idSet.contains("1.urn:uuid:A3ADBAEE51A1A87B2A11443668160943@apache.org")); // Make sure the length is correct long length = attachments.getContentLength(); long fileSize = f.length(); assertTrue("Expected MessageContent Length of " + fileSize + " but received " + length, length == fileSize); } /** * Returns the contents of the input stream as byte array. * * @param stream the InputStream * @param length the number of bytes to copy, if length < 0, the number is unlimited * @return the stream content as byte array */ private byte[] getStreamAsByteArray(InputStream stream, int length) throws IOException { if (length == 0) return new byte[0]; boolean checkLength = true; if (length < 0) { length = Integer.MAX_VALUE; checkLength = false; } ByteArrayOutputStream byteStream = new ByteArrayOutputStream(); int nextValue = stream.read(); if (checkLength) length--; while (-1 != nextValue && length >= 0) { byteStream.write(nextValue); nextValue = stream.read(); if (checkLength) length--; } return byteStream.toByteArray(); } private void testGetSOAPPartContentID(String contentTypeStartParam, String contentId) throws Exception { // It doesn't actually matter what the stream *is* it just needs to exist String contentType = "multipart/related; boundary=\"" + boundary + "\"; type=\"text/xml\"; start=\"" + contentTypeStartParam + "\""; InputStream inStream = getTestResource(inMimeFileName); Attachments attachments = new Attachments(inStream, contentType); assertEquals("Did not obtain correct content ID", contentId, attachments.getSOAPPartContentID()); } public void testGetSOAPPartContentIDWithoutBrackets() throws Exception { testGetSOAPPartContentID("my-content-id@localhost", "my-content-id@localhost"); } public void testGetSOAPPartContentIDWithBrackets() throws Exception { testGetSOAPPartContentID("", "my-content-id@localhost"); } // Not sure when exactly somebody uses the "cid:" prefix in the start parameter, but // this is how the code currently works. public void testGetSOAPPartContentIDWithCidPrefix() throws Exception { testGetSOAPPartContentID("cid:my-content-id@localhost", "my-content-id@localhost"); } // Regression test for WSCOMMONS-329 public void testGetSOAPPartContentIDWithCidPrefix2() throws Exception { testGetSOAPPartContentID("", "cid-73920@192.168.0.1"); } public void testGetSOAPPartContentIDShort() throws Exception { testGetSOAPPartContentID("bbb", "bbb"); } public void testGetSOAPPartContentIDShortWithBrackets() throws Exception { testGetSOAPPartContentID("", "b"); } public void testGetSOAPPartContentIDBorderline() throws Exception { testGetSOAPPartContentID("cid:", "cid:"); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/attachments/PartOnFileTest.java0000644000000000000000000001117311131637474031131 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.attachments; import org.apache.axiom.om.AbstractTestCase; import javax.activation.DataHandler; import javax.activation.FileDataSource; import java.io.File; import java.io.InputStream; /** Test the PartOnFile class */ public class PartOnFileTest extends AbstractTestCase { public PartOnFileTest(String testName) { super(testName); } String inMimeFileName = "mtom/MTOMAttachmentStream.bin"; String contentTypeString = "multipart/related; boundary=\"MIMEBoundaryurn:uuid:A3ADBAEE51A1A87B2A11443668160701\"; type=\"application/xop+xml\"; start=\"<0.urn:uuid:A3ADBAEE51A1A87B2A11443668160702@apache.org>\"; start-info=\"application/soap+xml\"; charset=UTF-8;action=\"mtomSample\""; File temp; public void setUp() throws Exception { createTemporaryDirectory(); } public void tearDown() throws Exception { deleteTemporaryDirectory(); } public void testHeaderGetSet() throws Exception { InputStream inStream = getTestResource(inMimeFileName); Attachments attachments = new Attachments(inStream, contentTypeString, true, temp.getPath(), "1"); DataHandler p = attachments .getDataHandler("1.urn:uuid:A3ADBAEE51A1A87B2A11443668160943@apache.org"); if (!(p.getDataSource() instanceof FileDataSource)) { fail("Expected PartOnFile"); } // assertEquals("<1.urn:uuid:A3ADBAEE51A1A87B2A11443668160943@apache.org>", p.getContentID()); assertEquals("image/jpeg", p.getContentType()); // p.addHeader("Some-New-Header", "TestNH"); // assertEquals(p.getHeader("Some-New-Header"), "TestNH"); } public void testGetAllheaders() throws Exception { // InputStream inStream = new FileInputStream(getTestResourceFile(inMimeFileName)); // Attachments attachments = new Attachments(inStream, contentTypeString, true, temp.getPath(), "1"); // // Part p = attachments.getDataHandler("1.urn:uuid:A3ADBAEE51A1A87B2A11443668160943@apache.org"); // // if (!(p instanceof PartOnFile)) { // fail("Expected PartOnFile"); // } // // assertEquals("<1.urn:uuid:A3ADBAEE51A1A87B2A11443668160943@apache.org>", p.getContentID()); // // // Check if the enumeration works // p.addHeader("Some-New-Header", "TestNH"); // // Enumeration e = p.getAllHeaders(); // boolean cTypeFound = false; // boolean cTransferEncFound = false; // boolean cIdFound = false; // boolean snhFound = false; // // while (e.hasMoreElements()) { // Header h = (Header) e.nextElement(); // if (h.getName().toLowerCase().equals("content-type")) { // cTypeFound = true; // } // // if (h.getName().toLowerCase().equals("content-transfer-encoding")) { // cTransferEncFound = true; // } // // if (h.getName().toLowerCase().equals("content-id")) { // cIdFound = true; // } // // if (h.getName().toLowerCase().equals("some-new-header")) { // snhFound = true; // } // } // // if (!cTypeFound || !cTransferEncFound || !cIdFound || !snhFound) { // fail("Header enumeration failed"); // } } private void createTemporaryDirectory() throws Exception { temp = File.createTempFile("partOnFileTest", ".tmp"); if (!temp.delete()) { fail("Cannot delete from temporary directory. File: " + temp.toURL()); } if (!temp.mkdir()) { fail("Cannot create a temporary location for part files"); } } private void deleteTemporaryDirectory() throws Exception { String[] fileList = temp.list(); for (int i = 0; i < fileList.length; i++) { if (!(new File(temp, fileList[i])).delete()) { System.err.println("WARNING: temporary directory removal failed."); } } if (!temp.delete()) { System.err.println("WARNING: temporary directory removal failed."); } } } ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/attachments/IncomingAttachmentInputTest.javaaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/attachments/IncomingAttachmentInputTe0000644000000000000000000000520511131637474032432 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.attachments; import org.apache.axiom.om.AbstractTestCase; import java.io.File; import java.io.InputStream; /** Test the PartOnFile class */ public class IncomingAttachmentInputTest extends AbstractTestCase { public IncomingAttachmentInputTest(String testName) { super(testName); } String inMimeFileName = "mtom/MTOMAttachmentStream.bin"; String contentTypeString = "multipart/related; boundary=\"MIMEBoundaryurn:uuid:A3ADBAEE51A1A87B2A11443668160701\"; type=\"application/xop+xml\"; start=\"<0.urn:uuid:A3ADBAEE51A1A87B2A11443668160702@apache.org>\"; start-info=\"application/soap+xml\"; charset=UTF-8;action=\"mtomSample\""; File temp; public void testIncomingAttachmentInputStreamFunctions() throws Exception { InputStream inStream = getTestResource(inMimeFileName); Attachments attachments = new Attachments(inStream, contentTypeString); // Get the inputstream container IncomingAttachmentStreams ias = attachments.getIncomingAttachmentStreams(); IncomingAttachmentInputStream dataIs; // Img1 stream dataIs = ias.getNextStream(); // Make sure it was the first attachment assertEquals("<1.urn:uuid:A3ADBAEE51A1A87B2A11443668160943@apache.org>", dataIs.getContentId()); // Consume the stream while (dataIs.read() != -1) ; // Img2 stream dataIs = ias.getNextStream(); assertEquals("<2.urn:uuid:A3ADBAEE51A1A87B2A11443668160994@apache.org>", dataIs.getContentId()); // Test if getContentType() works.. assertEquals("image/jpeg", dataIs.getContentType()); // Test if a adding/getting a header works dataIs.addHeader("new-header", "test-value"); assertEquals("test-value", dataIs.getHeader("new-header")); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/attachments/ImageSampleTest.java0000644000000000000000000001411611131637474031312 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.attachments; import org.apache.axiom.om.AbstractTestCase; import org.apache.axiom.om.OMAbstractFactory; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMOutputFormat; import org.apache.axiom.om.OMText; import org.apache.axiom.om.impl.OMNamespaceImpl; import org.apache.axiom.om.impl.llom.OMElementImpl; import org.apache.axiom.om.impl.llom.OMTextImpl; import org.apache.axiom.soap.impl.builder.MTOMStAXSOAPModelBuilder; import javax.activation.DataHandler; import javax.activation.DataSource; import javax.imageio.IIOImage; import javax.imageio.ImageIO; import javax.imageio.ImageWriter; import javax.imageio.stream.ImageOutputStream; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLStreamReader; import java.awt.*; import java.awt.image.BufferedImage; import java.io.BufferedReader; import java.io.File; import java.io.FileOutputStream; import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStream; import java.util.Iterator; public class ImageSampleTest extends AbstractTestCase { public ImageSampleTest(String testName) { super(testName); } /* * @see TestCase#setUp() */ Image expectedImage; MTOMStAXSOAPModelBuilder builder; DataHandler expectedDH; File outMTOMFile; File outBase64File; String outFileName = "target/ActualImageMTOMOut.bin"; String outBase64FileName = "target/OMSerializeBase64Out.xml"; String imageInFileName = "mtom/img/test.jpg"; String imageOutFileName = "target/testOut.jpg"; String inMimeFileName = "mtom/ImageMTOMOut.bin"; String contentTypeString = "multipart/Related; type=\"application/xop+xml\";start=\"\"; boundary=\"----=_AxIs2_Def_boundary_=42214532\""; public void testImageSampleSerialize() throws Exception { outMTOMFile = new File(outFileName); outBase64File = new File(outBase64FileName); OMOutputFormat mtomOutputFormat = new OMOutputFormat(); mtomOutputFormat.setDoOptimize(true); OMOutputFormat baseOutputFormat = new OMOutputFormat(); baseOutputFormat.setDoOptimize(false); OMFactory fac = OMAbstractFactory.getOMFactory(); OMNamespaceImpl soap = new OMNamespaceImpl( "http://schemas.xmlsoap.org/soap/envelope/", "soap"); OMElement envelope = new OMElementImpl("Envelope", soap, fac); OMElement body = new OMElementImpl("Body", soap, fac); OMNamespaceImpl dataName = new OMNamespaceImpl( "http://www.example.org/stuff", "m"); OMElement data = new OMElementImpl("data", dataName, fac); DataSource dataSource = getTestResourceDataSource(imageInFileName); expectedDH = new DataHandler(dataSource); OMText binaryNode = new OMTextImpl(expectedDH, true, fac); envelope.addChild(body); body.addChild(data); data.addChild(binaryNode); envelope.serializeAndConsume(new FileOutputStream(outBase64File), baseOutputFormat); envelope.serializeAndConsume(new FileOutputStream(outMTOMFile), mtomOutputFormat); } public void testImageSampleDeserialize() throws Exception { InputStream inStream = getTestResource(inMimeFileName); Attachments attachments = new Attachments(inStream, contentTypeString); XMLStreamReader reader = XMLInputFactory.newInstance() .createXMLStreamReader( new BufferedReader( new InputStreamReader( attachments .getSOAPPartInputStream()))); builder = new MTOMStAXSOAPModelBuilder(reader, attachments, null); OMElement root = builder.getDocumentElement(); OMElement body = (OMElement) root.getFirstOMChild(); OMElement data = (OMElement) body.getFirstOMChild(); OMText blob = (OMText) data.getFirstOMChild(); /* * Following is the procedure the user has to follow to read objects in * OBBlob User has to know the object type & whether it is serializable. * If it is not he has to use a Custom Defined DataSource to get the * Object. */ DataHandler actualDH; actualDH = (DataHandler) blob.getDataHandler(); BufferedImage bufferedImage = ImageIO.read(actualDH.getDataSource().getInputStream()); this.saveImage("image/jpeg", bufferedImage, new FileOutputStream(imageOutFileName)); } /** * Saves an image. * * @param mimeType the mime-type of the format to save the image * @param image the image to save * @param os the stream to write to * @throws Exception if an error prevents image encoding */ public void saveImage(String mimeType, BufferedImage image, OutputStream os) throws Exception { ImageWriter writer = null; Iterator iter = javax.imageio.ImageIO.getImageWritersByMIMEType(mimeType); if (iter.hasNext()) { writer = (ImageWriter) iter.next(); } ImageOutputStream ios = javax.imageio.ImageIO.createImageOutputStream(os); writer.setOutput(ios); writer.write(new IIOImage(image, null, null)); ios.flush(); writer.dispose(); } // saveImage }././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/attachments/PdfAttachmentStreamingTest.javaaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/attachments/PdfAttachmentStreamingTes0000644000000000000000000000517411131637474032422 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.attachments; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import javax.activation.DataHandler; import org.apache.axiom.om.AbstractTestCase; public class PdfAttachmentStreamingTest extends AbstractTestCase { String contentType = "multipart/related;type=\"text/xml\";boundary=\"----=_Part_0_3437046.1188904239130\";start=__WLS__1188904239161__SOAP__"; String inputFile = "mtom/msg-soap-wls81.txt"; public PdfAttachmentStreamingTest(String name) { super(name); } public void testStreamingAttachments() throws Exception { InputStream inStream = getTestResource(inputFile); // creating attachments using that stream Attachments attachments = new Attachments(inStream, contentType); // getting attachments as streams IncomingAttachmentStreams attachStreams = attachments.getIncomingAttachmentStreams(); // getting first attachments after the soap part IncomingAttachmentInputStream firstAttach = attachStreams.getNextStream(); // coping contents of the attachment to byte array ByteArrayOutputStream output = new ByteArrayOutputStream(); copy(firstAttach, output); // reading the message again, getting second attachment using datahandlers inStream = getTestResource(inputFile); attachments = new Attachments(inStream, contentType); DataHandler h = attachments.getDataHandler((String)attachments.getAllContentIDs()[1]); ByteArrayOutputStream input = new ByteArrayOutputStream(); copy(h.getInputStream(), input); assertEquals(input.toString("UTF-8"), output.toString("UTF-8")); } public static void copy(InputStream in, OutputStream out) throws IOException { byte[] buf = new byte[4096]; while(true) { int len = in.read(buf); if (len != -1) { out.write(buf, 0, len); } else { break; } } } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/0000755000000000000000000000000011131637474024047 5ustar rootrootaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPFaultTextTestBase.java0000644000000000000000000002034511131637474030754 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap; import org.apache.axiom.om.OMAttribute; import org.apache.axiom.om.OMImplementation; public class SOAPFaultTextTestBase extends SOAPFaultReasonTestCase { protected SOAPFaultText soap11FaultText; protected SOAPFaultText soap12FaultText; protected String soap11FaultTextWithParser; protected SOAPFaultText soap12FaultTextWithParser; public SOAPFaultTextTestBase(OMImplementation omImplementation) { super(omImplementation); } protected void setUp() throws Exception { super.setUp(); soap11FaultText = soap11Factory.createSOAPFaultText(soap11FaultReason); soap12FaultText = soap12Factory.createSOAPFaultText(soap12FaultReason); soap11FaultTextWithParser = soap11FaultReasonWithParser.getText(); soap12FaultTextWithParser = soap12FaultReasonWithParser.getFirstSOAPText(); } //SOAP 1.1 Fault Text Test (Programaticaly Created) public void testSOAP11SetLang() { soap11FaultText.setLang("en"); assertTrue( "SOAP 1.1 Fault Text Test : - After calling setLang method, Lang attribute value mismatch", soap11FaultText.getLang().equals("en")); OMAttribute langAttribute = (OMAttribute) soap11FaultText.getAllAttributes() .next(); assertTrue( "SOAP 1.1 Fault Text Test : - After calling setLang method, Lang attribute local name mismaatch", langAttribute.getLocalName().equals( SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_LOCAL_NAME)); assertTrue( "SOAP 1.1 Fault Text Test : - After calling setLang method, Lang attribute namespace prefix mismatch", langAttribute.getNamespace().getPrefix().equals( SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_NS_PREFIX)); assertTrue( "SOAP 1.1 Fault Text Test : - After calling setLang method, Lang attribute namespace uri mismatch", langAttribute.getNamespace().getNamespaceURI().equals( SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_NS_URI)); } public void testSOAP11GetLang() { assertNull( "SOAP 1.1 Fault Text Test : - After creating SOAPFaultText, it has a Lnag attribute", soap11FaultText.getLang()); soap11FaultText.setLang("en"); assertTrue( "SOAP 1.1 Fault Text Test : - After calling setLang method, Lang attribute value mismatch", soap11FaultText.getLang().equals("en")); } public void testSOAP11SetText() { soap11FaultText.setText("This is only a test"); assertTrue( "SOAP 1.1 Fault Text Test : - After calling setText method, getText method return incorrect string", soap11FaultText.getText().equals("This is only a test")); } public void testSOAP11GetText() { assertTrue( "SOAP 1.1 Fault Text Test : - After creating SOAPFaultText, it has a text", soap11FaultText.getText().equals("")); soap11FaultText.setText("This is only a test"); assertTrue( "SOAP 1.1 Fault Text Test : - After calling setText method, getText method return incorrect string", soap11FaultText.getText().equals("This is only a test")); } //SOAP 1.2 Fault Text Test (Programaticaly Created) public void testSOAP12SetLang() { soap12FaultText.setLang("en"); assertTrue( "SOAP 1.2 Fault Text Test : - After calling setLang method, Lang attribute value mismatch", soap12FaultText.getLang().equals("en")); OMAttribute langAttribute = (OMAttribute) soap12FaultText.getAllAttributes() .next(); assertTrue( "SOAP 1.2 Fault Text Test : - After calling setLang method, Lang attribute local name mismaatch", langAttribute.getLocalName().equals( SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_LOCAL_NAME)); assertTrue( "SOAP 1.2 Fault Text Test : - After calling setLang method, Lang attribute namespace prefix mismatch", langAttribute.getNamespace().getPrefix().equals( SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_NS_PREFIX)); assertTrue( "SOAP 1.2 Fault Text Test : - After calling setLang method, Lang attribute namespace uri mismatch", langAttribute.getNamespace().getNamespaceURI().equals( SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_NS_URI)); } public void testSOAP12GetLang() { assertNull( "SOAP 1.2 Fault Text Test : - After creating SOAPFaultText, it has a Lnag attribute", soap12FaultText.getLang()); soap12FaultText.setLang("en"); assertTrue( "SOAP 1.2 Fault Text Test : - After calling setLang method, Lang attribute value mismatch", soap12FaultText.getLang().equals("en")); } public void testSOAP12SetText() { soap12FaultText.setText("This is only a test"); assertTrue( "SOAP 1.2 Fault Text Test : - After calling setText method, getText method return incorrect string", soap12FaultText.getText().equals("This is only a test")); } public void testSOAP12GetText() { assertTrue( "SOAP 1.2 Fault Text Test : - After creating SOAPFaultText, it has a text", soap12FaultText.getText().equals("")); soap12FaultText.setText("This is only a test"); assertTrue( "SOAP 1.2 Fault Text Test : - After calling setText method, getText method return incorrect string", soap12FaultText.getText().equals("This is only a test")); } //SOAP 1.1 Fault Text Test (With Parser) public void testSOAP11GetTextWithParser() { assertTrue( "SOAP 1.1 Fault Text Test With Parser : - getText method returns incorrect string", soap11FaultTextWithParser.trim().equals("Sender Timeout")); } //SOAP 1.2 Fault Text Test (With Parser) public void testSOAP12GetLangWithParser() { assertTrue( "SOAP 1.2 Fault Text Test With Parser : - getLang method returns incorrect string", soap12FaultTextWithParser.getLang().equals("en")); OMAttribute langAttribute = (OMAttribute) soap12FaultTextWithParser.getAllAttributes() .next(); assertTrue( "SOAP 1.2 Fault Text Test With Parser : - Lang attribute local name mismaatch", langAttribute.getLocalName().equals( SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_LOCAL_NAME)); assertTrue( "SOAP 1.2 Fault Text Test With Parser : - Lang attribute namespace prefix mismatch", langAttribute.getNamespace().getPrefix().equals( SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_NS_PREFIX)); assertTrue( "SOAP 1.2 Fault Text Test With Parser : - Lang attribute namespace uri mismatch", langAttribute.getNamespace().getNamespaceURI().equals( SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_NS_URI)); } public void testSOAP12GetTextWithParser() { assertTrue( "SOAP 1.2 Fault Text Test With Parser : - getText method returns incorrect string", soap12FaultTextWithParser.getText().equals("Sender Timeout")); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPFaultRoleTestBase.java0000644000000000000000000001015111131637474030723 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap; import org.apache.axiom.om.OMImplementation; public class SOAPFaultRoleTestBase extends SOAPFaultTestCase { protected SOAPFaultRole soap11FaultRole; protected SOAPFaultRole soap12FaultRole; protected SOAPFaultRole soap11FaultRoleWithParser; protected SOAPFaultRole soap12FaultRoleWithParser; public SOAPFaultRoleTestBase(OMImplementation omImplementation) { super(omImplementation); } protected void setUp() throws Exception { super.setUp(); soap11FaultRole = soap11Factory.createSOAPFaultRole(soap11Fault); soap12FaultRole = soap12Factory.createSOAPFaultRole(soap12Fault); soap11FaultRoleWithParser = soap11FaultWithParser.getRole(); soap12FaultRoleWithParser = soap12FaultWithParser.getRole(); } //SOAP 1.1 Fault Role Test (Programaticaly Created) public void testSOAP11SetRoleValue() { soap11FaultRole.setRoleValue("This is only a test"); assertTrue( "SOAP 1.1 Fault Role Test : - After calling setRoleValue method, getRoleValue method returns incorrect value", soap11FaultRole.getRoleValue().trim().equals("This is only a test")); } public void testSOAP11GetRoleValue() { assertTrue( "SOAP 1.1 Fault Role Test : - After creating SOAPFaultRole, it has a value", soap11FaultRole.getRoleValue().equals("")); soap11FaultRole.setRoleValue("This is only a test"); assertTrue( "SOAP 1.1 Fault Role Test : - After calling setRoleValue method, getRoleValue method returns incorrect value", soap11FaultRole.getRoleValue().trim().equals("This is only a test")); } //SOAP 1.2 Fault Role Test (Programaticaly Created) public void testSOAP12SetRoleValue() { soap12FaultRole.setRoleValue("This is only a test"); assertTrue( "SOAP 1.2 Fault Role Test : - After calling setRoleValue method, getRoleValue method returns incorrect value", soap12FaultRole.getRoleValue().trim().equals("This is only a test")); } public void testSOAP12GetRoleValue() { assertTrue( "SOAP 1.2 Fault Role Test : - After creating SOAPFaultRole, it has a value", soap12FaultRole.getRoleValue().trim().equals("")); soap12FaultRole.setRoleValue("This is only a test"); assertTrue( "SOAP 1.2 Fault Role Test : - After calling setRoleValue method, getRoleValue method returns incorrect value", soap12FaultRole.getRoleValue().trim().equals("This is only a test")); } //SOAP 1.1 Fault Role Test (With Parser) public void testSOAP11GetRoleValueWithParser() { assertTrue( "SOAP 1.1 Fault Role Test With Parser : - getRoleValue method returns incorrect value", soap11FaultRoleWithParser.getRoleValue().trim().equals( "http://schemas.xmlsoap.org/soap/envelope/actor/ultimateReceiver")); } //SOAP 1.2 Fault Role Test (With Parser) public void testSOAP12GetRoleValueWithParser() { assertTrue( "SOAP 1.2 Fault Role Test With Parser : - getRoleValue method returns incorrect value", soap12FaultRoleWithParser.getRoleValue().trim().equals( "ultimateReceiver")); } } ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAP11DefaultFaultConversionTest.javaaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAP11DefaultFaultConversionTest0000644000000000000000000000545211131637474032113 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap; import org.apache.axiom.om.OMAbstractFactory; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMNode; import org.apache.axiom.om.impl.dom.DOOMAbstractFactory; import org.apache.axiom.soap.SOAPEnvelope; import org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder; import junit.framework.TestCase; /** * Test case to check conversion of the default fault envelope generated * http://issues.apache.org/jira/browse/WSCOMMONS-343 */ public class SOAP11DefaultFaultConversionTest extends TestCase { public void testConversion() { String faultCode = "soapenv" + ":" + "Server"; String faultReason = "/ by zero"; String faultDetail = "org.apache.axis2.AxisFault: / by zero \n" + "... 24 more)"; SOAPFactory factory = OMAbstractFactory.getSOAP11Factory(); SOAPEnvelope envelope = factory.getDefaultFaultEnvelope(); SOAPFault fault = envelope.getBody().getFault(); fault.getCode().setText(faultCode); fault.getReason().setText(faultReason); OMElement exception = factory.createOMElement("Exception", null); exception.setText(faultDetail); fault.getDetail().addDetailEntry(exception); envelope.build(); factory = DOOMAbstractFactory.getSOAP11Factory(); StAXSOAPModelBuilder stAXSOAPModelBuilder = new StAXSOAPModelBuilder( envelope.getXMLStreamReader(), factory,SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI); SOAPEnvelope env = stAXSOAPModelBuilder.getSOAPEnvelope(); ((OMNode) env.getParent()).build(); fault = env.getBody().getFault(); assertEquals(faultCode, fault.getCode().getText()); assertEquals(faultReason,fault.getReason().getText()); exception = (OMElement)fault.getDetail().getFirstOMChild(); assertEquals(faultDetail, exception.getText()); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPBodyTestCase.java0000644000000000000000000000302611131637474027727 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap; import org.apache.axiom.om.OMImplementation; public abstract class SOAPBodyTestCase extends SOAPTestCase { protected SOAPBody soap11Body; protected SOAPBody soap12Body; protected SOAPBody soap11BodyWithParser; protected SOAPBody soap12BodyWithParser; public SOAPBodyTestCase(OMImplementation omImplementation) { super(omImplementation); } protected void setUp() throws Exception { super.setUp(); soap11Body = soap11Factory.createSOAPBody(soap11Envelope); soap12Body = soap12Factory.createSOAPBody(soap12Envelope); soap11BodyWithParser = soap11EnvelopeWithParser.getBody(); soap12BodyWithParser = soap12EnvelopeWithParser.getBody(); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPFaultCodeTestCase.java0000644000000000000000000000314011131637474030675 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap; import org.apache.axiom.om.OMImplementation; public abstract class SOAPFaultCodeTestCase extends SOAPFaultTestCase { protected SOAPFaultCode soap11FaultCode; protected SOAPFaultCode soap12FaultCode; protected SOAPFaultCode soap11FaultCodeWithParser; protected SOAPFaultCode soap12FaultCodeWithParser; public SOAPFaultCodeTestCase(OMImplementation omImplementation) { super(omImplementation); } protected void setUp() throws Exception { super.setUp(); soap11FaultCode = soap11Factory.createSOAPFaultCode(soap11Fault); soap12FaultCode = soap12Factory.createSOAPFaultCode(soap12Fault); soap11FaultCodeWithParser = soap11FaultWithParser.getCode(); soap12FaultCodeWithParser = soap12FaultWithParser.getCode(); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPFaultSubCodeTestCase.java0000644000000000000000000000521611131637474031355 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap; import org.apache.axiom.om.OMImplementation; public abstract class SOAPFaultSubCodeTestCase extends SOAPFaultCodeTestCase { protected SOAPFaultValue soap11FaultValue; protected SOAPFaultValue soap12FaultValueInFaultCode; protected SOAPFaultSubCode soap12FaultSubCodeInCode; protected SOAPFaultValue soap12FaultValueInFaultSubCode; protected SOAPFaultSubCode soap12FaultSubCodeInSubCode; protected String soap11FaultValueWithParser; protected SOAPFaultValue soap12FaultValueInFaultCodeWithParser; protected SOAPFaultSubCode soap12FaultSubCodeInFaultCodeWithParser; protected SOAPFaultValue soap12FaultValueInFaultSubCodeWithParser; protected SOAPFaultSubCode soap12FaultSubCodeInSubCodeWithParser; public SOAPFaultSubCodeTestCase(OMImplementation omImplementation) { super(omImplementation); } protected void setUp() throws Exception { super.setUp(); soap11FaultValue = soap11Factory.createSOAPFaultValue(soap11FaultCode); soap12FaultValueInFaultCode = soap12Factory.createSOAPFaultValue(soap12FaultCode); soap12FaultSubCodeInCode = soap12Factory.createSOAPFaultSubCode(soap12FaultCode); soap12FaultSubCodeInSubCode = soap12Factory.createSOAPFaultSubCode(soap12FaultSubCodeInCode); soap11FaultValueWithParser = soap11FaultCodeWithParser.getText(); soap12FaultValueInFaultCodeWithParser = soap12FaultCodeWithParser.getValue(); soap12FaultSubCodeInFaultCodeWithParser = soap12FaultCodeWithParser.getSubCode(); soap12FaultValueInFaultSubCodeWithParser = soap12FaultSubCodeInFaultCodeWithParser.getValue(); soap12FaultSubCodeInSubCodeWithParser = soap12FaultSubCodeInFaultCodeWithParser.getSubCode(); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPHeaderBlockTestBase.java0000644000000000000000000003031211131637474031172 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap; import org.apache.axiom.om.OMImplementation; import org.apache.axiom.om.OMNamespace; import java.util.Iterator; public class SOAPHeaderBlockTestBase extends SOAPHeaderTestCase { protected SOAPHeaderBlock soap11HeaderBlock; protected SOAPHeaderBlock soap12HeaderBlock; protected SOAPHeaderBlock soap11HeaderBlock1WithParser; protected SOAPHeaderBlock soap12HeaderBlock1WithParser; protected SOAPHeaderBlock soap11HeaderBlock2WithParser; protected SOAPHeaderBlock soap12HeaderBlock2WithParser; protected SOAPHeaderBlock soap11HeaderBlock3WithParser; protected SOAPHeaderBlock soap12HeaderBlock3WithParser; public SOAPHeaderBlockTestBase(OMImplementation omImplementation) { super(omImplementation); } protected void setUp() throws Exception { super.setUp(); soap11HeaderBlock = soap11Factory.createSOAPHeaderBlock("testHeaderBlock", namespace, soap11Header); soap12HeaderBlock = soap12Factory.createSOAPHeaderBlock("testHeaderBlock", namespace, soap12Header); Iterator iterator = soap11HeaderWithParser.examineAllHeaderBlocks(); soap11HeaderBlock1WithParser = (SOAPHeaderBlock) iterator.next(); soap11HeaderBlock2WithParser = (SOAPHeaderBlock) iterator.next(); soap11HeaderBlock3WithParser = (SOAPHeaderBlock) iterator.next(); iterator = soap12HeaderWithParser.examineAllHeaderBlocks(); soap12HeaderBlock1WithParser = (SOAPHeaderBlock) iterator.next(); soap12HeaderBlock2WithParser = (SOAPHeaderBlock) iterator.next(); soap12HeaderBlock3WithParser = (SOAPHeaderBlock) iterator.next(); } //SOAP 1.1 SOAPHeaderBlock Test (Programaticaly Created) public void testSOAP11SetRole() { soap11HeaderBlock.setRole( "http://schemas.xmlsoap.org/soap/envelope/actor/next"); assertTrue( "SOAP 1.1 HeaderBlock Test : - After calling setRole method, getRole method returns incorrect role value", soap11HeaderBlock.getRole().equals( "http://schemas.xmlsoap.org/soap/envelope/actor/next")); try { soap11HeaderBlock.setRole("Any Value"); } catch (Exception e) { fail( "SOAP 1.1 HeaderBlock Test : - role value can not be set to any value"); } } public void testSOAP11GetRole() { assertTrue( "SOAP 1.1 HeaderBlock Test : - After creating SOAPHeaderBlock, it has a role", soap11HeaderBlock.getRole() == null); soap11HeaderBlock.setRole( "http://schemas.xmlsoap.org/soap/envelope/actor/next"); assertTrue( "SOAP 1.1 HeaderBlock Test : - After calling setRole method, getRole method returns incorrect role value", soap11HeaderBlock.getRole().equals( "http://schemas.xmlsoap.org/soap/envelope/actor/next")); } public void testSOAP11SetMustUnderstand() { soap11HeaderBlock.setMustUnderstand(true); assertTrue( "SOAP 1.1 HeaderBlock Test : - After setting MustUnderstand true calling setMustUnderstand method , getMustUnderstand method returns false", soap11HeaderBlock.getMustUnderstand()); soap11HeaderBlock.setMustUnderstand(false); assertFalse( "SOAP 1.1 HeaderBlock Test : - After setting MustUnderstand false calling setMustUnderstand method , getMustUnderstand method returns true", soap11HeaderBlock.getMustUnderstand()); soap11HeaderBlock.setMustUnderstand("1"); assertTrue( "SOAP 1.1 HeaderBlock Test : - After setting MustUnderstand \"1\" calling setMustUnderstand method , getMustUnderstand method returns false", soap11HeaderBlock.getMustUnderstand()); soap11HeaderBlock.setMustUnderstand("0"); assertFalse( "SOAP 1.1 HeaderBlock Test : - After setting MustUnderstand \"0\" calling setMustUnderstand method , getMustUnderstand method returns true", soap11HeaderBlock.getMustUnderstand()); try { soap11HeaderBlock.setMustUnderstand("true"); } catch (Exception e) { fail( "SOAP 1.1 HeaderBlock Test : - MustUnderstand value can not be set to any value rather than 1 or 0"); } } public void testSOAP11GetMustUnderstand() { assertFalse( "SOAP 1.1 HeaderBlock Test : - After creating SOAPHeaderBlock, default MustUnderstand value true", soap11HeaderBlock.getMustUnderstand()); soap11HeaderBlock.setMustUnderstand(true); assertTrue( "SOAP 1.1 HeaderBlock Test : - After setting MustUnderstand true calling setMustUnderstand method , getMustUnderstand method returns false", soap11HeaderBlock.getMustUnderstand()); } //SOAP 1.2 SOAPHeaderBlock Test (Programaticaly Created) public void testSOAP12SetRole() { soap12HeaderBlock.setRole( "http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver"); assertTrue( "SOAP 1.2 HeaderBlock Test : - After calling setRole method, getRole method returns incorrect role value", soap12HeaderBlock.getRole().equals( "http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver")); try { soap12HeaderBlock.setRole("Any Value"); } catch (Exception e) { fail( "SOAP 1.2 HeaderBlock Test : - role value can not be set to any value"); } } public void testSOAP12GetRole() { assertTrue( "SOAP 1.2 HeaderBlock Test : - After creating SOAPHeaderBlock, it has a role", soap12HeaderBlock.getRole() == null); soap12HeaderBlock.setRole( "http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver"); assertTrue( "SOAP 1.2 HeaderBlock Test : - After calling setRole method, getRole method returns incorrect role value", soap12HeaderBlock.getRole().equals( "http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver")); } public void testSOAP12SetMustUnderstand() { soap12HeaderBlock.setMustUnderstand(true); assertTrue( "SOAP 1.2 HeaderBlock Test : - After setting MustUnderstand true calling setMustUnderstand method , getMustUnderstand method returns false", soap12HeaderBlock.getMustUnderstand()); soap12HeaderBlock.setMustUnderstand(false); assertFalse( "SOAP 1.2 HeaderBlock Test : - After setting MustUnderstand false calling setMustUnderstand method , getMustUnderstand method returns true", soap12HeaderBlock.getMustUnderstand()); soap12HeaderBlock.setMustUnderstand("true"); assertTrue( "SOAP 1.2 HeaderBlock Test : - After setting MustUnderstand \"true\" calling setMustUnderstand method , getMustUnderstand method returns false", soap12HeaderBlock.getMustUnderstand()); soap12HeaderBlock.setMustUnderstand("false"); assertFalse( "SOAP 1.2 HeaderBlock Test : - After setting MustUnderstand \"false\" calling setMustUnderstand method , getMustUnderstand method returns true", soap12HeaderBlock.getMustUnderstand()); soap12HeaderBlock.setMustUnderstand("1"); assertTrue( "SOAP 1.2 HeaderBlock Test : - After setting MustUnderstand \"1\" calling setMustUnderstand method , getMustUnderstand method returns false", soap12HeaderBlock.getMustUnderstand()); soap12HeaderBlock.setMustUnderstand("0"); assertFalse( "SOAP 1.2 HeaderBlock Test : - After setting MustUnderstand \"0\" calling setMustUnderstand method , getMustUnderstand method returns true", soap12HeaderBlock.getMustUnderstand()); try { soap12HeaderBlock.setMustUnderstand("otherValue"); fail( "SOAP 1.2 HeaderBlock Test : - MustUnderstand value can not be set to any value rather than 1 , 0 , true , false"); } catch (Exception e) { assertTrue(true); } } public void testSOAP12GetMustUnderstand() { assertFalse( "SOAP 1.2 HeaderBlock Test : - After creating SOAPHeaderBlock, default MustUnderstand value true", soap12HeaderBlock.getMustUnderstand()); soap12HeaderBlock.setMustUnderstand(true); assertTrue( "SOAP 1.2 HeaderBlock Test : - After setting MustUnderstand true calling setMustUnderstand method , getMustUnderstand method returns false", soap12HeaderBlock.getMustUnderstand()); } //SOAP 1.1 SOAPHeaderBlock Test (With Parser) public void testSOAP11GetRoleWithParser() { assertTrue( "SOAP 1.1 HeaderBlock Test With Parser : - getRole method returns incorrect role value", soap11HeaderBlock1WithParser.getRole().equals( "http://schemas.xmlsoap.org/soap/actor/next")); } public void testSOAP11GetMustUnderstandWithParser() { assertTrue( "SOAP 1.1 HeaderBlock Test With Parser : - getMustUnderstand method returns incorrect value", soap11HeaderBlock2WithParser.getMustUnderstand()); assertFalse( "SOAP 1.1 HeaderBlock Test With Parser : - getMustUnderstand method returns incorrect value", soap11HeaderBlock3WithParser.getMustUnderstand()); } //SOAP 1.2 SOAPHeaderBlock Test (With Parser) public void testSOAP12GetRoleWithParser() { assertTrue( "SOAP 1.2 HeaderBlock Test With Parser : - getRole method returns incorrect role value", soap12HeaderBlock1WithParser.getRole().equals( "http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver")); } public void testSOAP12GetMustUnderstandWithParser() { assertTrue( "SOAP 1.2 HeaderBlock Test With Parser : - getMustUnderstand method returns incorrect value", soap12HeaderBlock1WithParser.getMustUnderstand()); assertFalse( "SOAP 1.2 HeaderBlock Test With Parser : - getMustUnderstand method returns incorrect value", soap12HeaderBlock2WithParser.getMustUnderstand()); soap12HeaderBlock3WithParser.getMustUnderstand(); } public void testRelayAttribute() throws Exception { assertFalse(soap12HeaderBlock1WithParser.getRelay()); assertTrue(soap12HeaderBlock2WithParser.getRelay()); assertFalse(soap12HeaderBlock3WithParser.getRelay()); SOAPEnvelope env = soap12Factory.createSOAPEnvelope(); SOAPHeader header = soap12Factory.createSOAPHeader(env); soap12Factory.createSOAPBody(env); OMNamespace ns = soap12Factory.createOMNamespace("http://ns1", "ns1"); SOAPHeaderBlock relayHeader = header.addHeaderBlock("foo", ns); relayHeader.setText("hey there"); relayHeader.setRelay(true); String envString = env.toString(); assertTrue("No relay header after setRelay(true)", envString.indexOf("relay=\"true\"") >= 0); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPDiscardTestBase.java0000644000000000000000000000270011131637474030400 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap; import javax.xml.stream.XMLStreamException; import org.apache.axiom.om.OMImplementation; /** * @author : Ajith Ranabahu * Date: Aug 15, 2007 * Time: 11:57:54 PM */ public class SOAPDiscardTestBase extends SOAPTestCase{ public SOAPDiscardTestBase(OMImplementation omImplementation) { super(omImplementation); } public void testDiscardHeader(){ try { soap11EnvelopeWithParser.getHeader().discard(); soap11EnvelopeWithParser.getBody().toStringWithConsume(); } catch (Exception e) { e.printStackTrace(); fail(); } } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPFaultValueTestBase.java0000644000000000000000000001257711131637474031114 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap; import org.apache.axiom.om.OMImplementation; public class SOAPFaultValueTestBase extends SOAPFaultSubCodeTestCase { public SOAPFaultValueTestBase(OMImplementation omImplementation) { super(omImplementation); } protected void setUp() throws Exception { super.setUp(); soap12FaultValueInFaultSubCode = soap12Factory.createSOAPFaultValue(soap12FaultSubCodeInCode); } //SOAP 1.1 Fault Value Test (Programaticaly Created) public void testSOAP11setText() { soap11FaultValue.setText("This is only Test"); assertTrue("SOAP 1.1 Fault Value Test : - value text mismatch", soap11FaultValue.getText().equals("This is only Test")); } public void testSOAP11GetText() { assertTrue( "SOAP 1.1 Fault Value Test : - After creating Fault Value, it has a text", soap11FaultValue.getText().equals("")); soap11FaultValue.setText("This is only Test"); assertFalse( "SOAP 1.1 Fault Value Test : - After calling setText method, getText method returns null", soap11FaultValue.getText().equals("")); assertTrue("SOAP 1.1 Fault Value Test : - value text mismatch", soap11FaultValue.getText().equals("This is only Test")); } //SOAP 1.2 Fault Value(In Fault Code) Test (Programaticaly Created) public void testSOAP12setTextInFaultCode() { soap12FaultValueInFaultCode.setText("This is only Test"); assertTrue( "SOAP 1.2 Fault Value Test in Fault Code : - value text mismatch", soap12FaultValueInFaultCode.getText().equals( "This is only Test")); } public void testSOAP12GetTextInFaultCode() { assertTrue( "SOAP 1.2 Fault Value Test in Fault Code : - After creating Fault Value, it has a text", soap12FaultValueInFaultCode.getText().equals("")); soap12FaultValueInFaultCode.setText("This is only Test"); assertFalse( "SOAP 1.2 Fault Value Test in Fault Code : - After calling setText method, getText method returns null", soap12FaultValueInFaultCode.getText().equals("")); assertTrue( "SOAP 1.2 Fault Value Test in Fault Code : - value text mismatch", soap12FaultValueInFaultCode.getText().equals( "This is only Test")); } //SOAP 1.2 Fault Value(In Fault SubCode) Test (Programaticaly Created) public void testSOAP12setTextInFaultSubCode() { soap12FaultValueInFaultSubCode.setText("This is only Test"); assertTrue( "SOAP 1.2 Fault Value Test in Fault SubCode : - value text mismatch", soap12FaultValueInFaultSubCode.getText().equals( "This is only Test")); } public void testSOAP12GetTextInFaultSubCode() { assertTrue( "SOAP 1.2 Fault Value Test in Fault SubCode : - After creating Fault Value, it has a text", soap12FaultValueInFaultSubCode.getText().equals("")); soap12FaultValueInFaultSubCode.setText("This is only Test"); assertFalse( "SOAP 1.2 Fault Value Test in Fault SubCode : - After calling setText method, getText method returns null", soap12FaultValueInFaultSubCode.getText().equals("")); assertTrue( "SOAP 1.2 Fault Value Test in Fault SubCode : - value text mismatch", soap12FaultValueInFaultSubCode.getText().equals( "This is only Test")); } //SOAP 1.1 Fault Value Test (With Parser) public void testSOAP11GetTextWithParser() { assertTrue( "SOAP 1.1 Fault Value Test with parser : - value text mismatch", soap11FaultValueWithParser.trim().equals("env:Sender")); } //SOAP 1.2 Fault Value(In Fault Code) Test (With Parser) public void testSOAP12setTextWithParserInFaultCode() { assertTrue( "SOAP 1.2 Fault Value Test with parser in Fault Code : - value text mismatch", soap12FaultValueInFaultCodeWithParser.getText().equals( "env:Sender")); } //SOAP 1.2 Fault Value(In Fault SubCode) Test (With Parser) public void testSOAP12setTextWithParserInFaultSubCode() { assertTrue( "SOAP 1.2 Fault Value Test with parser in Fault SubCode : - value text mismatch", soap12FaultValueInFaultSubCodeWithParser.getText().equals( "m:MessageTimeout In First Subcode")); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPMessageTest.java0000644000000000000000000000251011131637474027617 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap; import org.apache.axiom.om.OMTestCase; import org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder; public class SOAPMessageTest extends OMTestCase { public SOAPMessageTest(String testName) { super(testName); } public void testSOAPMessageCreation() throws Exception { StAXSOAPModelBuilder soapBuilder = getOMBuilder(""); SOAPMessage soapMessage = soapBuilder.getSoapMessage(); assertNotNull(soapMessage); assertNotNull(soapMessage.getSOAPEnvelope()); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPFaultTestCase.java0000644000000000000000000000303011131637474030100 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap; import org.apache.axiom.om.OMImplementation; public abstract class SOAPFaultTestCase extends SOAPBodyTestCase { protected SOAPFault soap11Fault; protected SOAPFault soap12Fault; protected SOAPFault soap11FaultWithParser; protected SOAPFault soap12FaultWithParser; public SOAPFaultTestCase(OMImplementation omImplementation) { super(omImplementation); } protected void setUp() throws Exception { super.setUp(); soap11Fault = soap11Factory.createSOAPFault(soap11Body); soap12Fault = soap12Factory.createSOAPFault(soap12Body); soap11FaultWithParser = soap11BodyWithParser.getFault(); soap12FaultWithParser = soap12BodyWithParser.getFault(); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPFaultNodeTestBase.java0000644000000000000000000000570011131637474030713 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap; import org.apache.axiom.om.OMImplementation; public class SOAPFaultNodeTestBase extends SOAPFaultTestCase { protected SOAPFaultNode soap12FaultNode; protected SOAPFaultNode soap12FaultNodeWithParser; public SOAPFaultNodeTestBase(OMImplementation omImplementation) { super(omImplementation); } protected void setUp() throws Exception { super.setUp(); soap12FaultNode = soap12Factory.createSOAPFaultNode(soap12Fault); soap12FaultNodeWithParser = soap12FaultWithParser.getNode(); } //SOAP 1.1 Fault Node Test (Programaticaly Created) public void testSOAP11SetNodeValue() { try { soap11Factory.createSOAPFaultNode(soap11Fault); } catch (UnsupportedOperationException e) { // Good! return; } fail("Unsupported SOAP 1.1 node was created"); } //SOAP 1.2 Fault Node Test (Programaticaly Created) public void testSOAP12SetNodeValue() { soap12FaultNode.setNodeValue("This is only a test"); assertTrue( "SOAP 1.2 Fault Node Test : - After calling setNodeValue method, getNodeValue method returns incorrect value", soap12FaultNode.getNodeValue().equals("This is only a test")); } public void testSOAP12GetNodeValue() { assertTrue( "SOAP 1.2 Fault Node Test : - After creating SOAPFaultNode, it has a value", soap12FaultNode.getNodeValue().equals("")); soap12FaultNode.setNodeValue("This is only a test"); assertTrue( "SOAP 1.2 Fault Node Test : - After calling setNodeValue method, getNodeValue method returns incorrect value", soap12FaultNode.getNodeValue().equals("This is only a test")); } //SOAP 1.2 Fault Node Test (With Parser) public void testSOAP12GetNodeValueWithParser() { assertTrue( "SOAP 1.2 Fault Node Test With Parser : - getNodeValue method returns incorrect value", soap12FaultNodeWithParser.getNodeValue().trim().equals( "http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver")); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPFaultCodeTestBase.java0000644000000000000000000001503011131637474030675 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap; import org.apache.axiom.om.OMImplementation; public class SOAPFaultCodeTestBase extends SOAPFaultCodeTestCase { public SOAPFaultCodeTestBase(OMImplementation omImplementation) { super(omImplementation); } //SOAP 1.1 Fault Code Test (Programaticaly Created) // public void testSOAP11SetValue() { // soap11FaultCode.setValue( // soap11Factory.createSOAPFaultValue(soap11FaultCode)); // assertFalse( // "SOAP 1.1 Fault Code Test :- After calling setValue method, getValue method returns null", // soap11FaultCode.getValue() == null); // try { // soap11FaultCode.setValue( // soap12Factory.createSOAPFaultValue(soap12FaultCode)); // fail("SOAP12FaultValue should not be inserted to SOAP11FaultCode"); // } catch (SOAPProcessingException e) { // assertTrue(true); // } // // } public void testSOAP11GetValue() { assertNull(soap11FaultCode.getValue()); // assertTrue( // "SOAP 1.1 Fault Code Test :- After creating soapfaultcode, it has a value", // soap11FaultCode.getValue() == null); // soap11FaultCode.setValue( // soap11Factory.createSOAPFaultValue(soap11FaultCode)); // assertFalse( // "SOAP 1.1 Fault Code Test :- After calling setValue method, getValue method returns null", // soap11FaultCode.getValue() == null); } //SOAP 1.2 Fault Code Test (Programaticaly Created) public void testSOAP12SetValue() { soap12FaultCode.setValue( soap12Factory.createSOAPFaultValue(soap12FaultCode)); assertFalse( "SOAP 1.2 Fault Code Test :- After calling setValue method, getValue method returns null", soap12FaultCode.getValue() == null); try { soap12FaultCode.setValue( soap11Factory.createSOAPFaultValue(soap11FaultCode)); fail("SOAP11FaultValue should not be inserted to SOAP12FaultCode"); } catch (SOAPProcessingException e) { assertTrue(true); } try { soap12FaultCode.setValue( soap12Factory.createSOAPFaultValue( soap12Factory.createSOAPFaultSubCode( soap12FaultCode))); } catch (Exception e) { fail( "SOAP 1.2 Fault Code Test :- When calling setValue method, parent of value element mismatch"); } } public void testSOAP12GetValue() { assertTrue( "SOAP 1.2 Fault Code Test :- After creating soapfaultcode, it has a value", soap12FaultCode.getValue() == null); soap12FaultCode.setValue( soap12Factory.createSOAPFaultValue(soap12FaultCode)); assertFalse( "SOAP 1.2 Fault Code Test :- After calling setValue method, getValue method returns null", soap12FaultCode.getValue() == null); } public void testSOAP12SetSubCode() { soap12FaultCode.setSubCode( soap12Factory.createSOAPFaultSubCode(soap12FaultCode)); assertFalse( "SOAP 1.2 Fault Code Test :- After calling setSubCode method, getSubCode method returns null", soap12FaultCode.getSubCode() == null); try { soap12FaultCode.setSubCode( soap11Factory.createSOAPFaultSubCode(soap11FaultCode)); fail( "SOAP11FaultSubCode should not be inserted to SOAP12FaultCode"); } catch (SOAPProcessingException e) { assertTrue(true); } try { soap12FaultCode.setSubCode( soap12Factory.createSOAPFaultSubCode( soap12Factory.createSOAPFaultSubCode( soap12FaultCode))); } catch (Exception e) { fail( "SOAP 1.2 Fault Code Test :- When calling setSubCode method, parent of subcode element mismatch"); } } public void testSOAP12GetSubCode() { assertTrue( "SOAP 1.2 Fault Code Test :- After creating soapfaultcode, it has a subcode", soap12FaultCode.getSubCode() == null); soap12FaultCode.setSubCode( soap12Factory.createSOAPFaultSubCode(soap12FaultCode)); assertFalse( "SOAP 1.2 Fault Code Test :- After calling setSubCode method, getSubCode method returns null", soap12FaultCode.getSubCode() == null); } //SOAP 1.1 Fault Code Test (With Parser) public void testSOAP11GetValueWithParser() { assertNull(soap11FaultCodeWithParser.getValue()); } //SOAP 1.2 Fault Code Test (With Parser) public void testSOAP12GetValueWithParser() { assertFalse( "SOAP 1.2 Fault Code Test with parser : - getValue method returns null", soap12FaultCodeWithParser.getValue() == null); assertTrue( "SOAP 1.2 Fault Code Test with parser : - Value local name mismatch", soap12FaultCodeWithParser.getValue().getLocalName().equals( SOAP12Constants.SOAP_FAULT_VALUE_LOCAL_NAME)); } public void testSOAP12GetSubCodeWithParser() { assertFalse( "SOAP 1.2 Fault Code Test with parser :- getSubCode method returns null", soap12FaultCodeWithParser.getSubCode() == null); assertTrue( "SOAP 1.2 Fault Code Test with parser : - subcode local name mismatch", soap12FaultCodeWithParser.getSubCode().getLocalName().equals( SOAP12Constants.SOAP_FAULT_SUB_CODE_LOCAL_NAME)); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPFaultReasonTestCase.java0000644000000000000000000000320111131637474031250 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap; import org.apache.axiom.om.OMImplementation; public abstract class SOAPFaultReasonTestCase extends SOAPFaultTestCase { protected SOAPFaultReason soap11FaultReason; protected SOAPFaultReason soap12FaultReason; protected SOAPFaultReason soap11FaultReasonWithParser; protected SOAPFaultReason soap12FaultReasonWithParser; public SOAPFaultReasonTestCase(OMImplementation omImplementation) { super(omImplementation); } protected void setUp() throws Exception { super.setUp(); soap11FaultReason = soap11Factory.createSOAPFaultReason(soap11Fault); soap12FaultReason = soap12Factory.createSOAPFaultReason(soap12Fault); soap11FaultReasonWithParser = soap11FaultWithParser.getReason(); soap12FaultReasonWithParser = soap12FaultWithParser.getReason(); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPHeaderTestBase.java0000644000000000000000000005646711131637474030242 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap; import java.util.ArrayList; import java.util.Iterator; import org.apache.axiom.om.OMImplementation; public class SOAPHeaderTestBase extends SOAPHeaderTestCase { private static final String ROLE_URI = "http://schemas.xmlsoap.org/soap/envelope/actor/next"; public SOAPHeaderTestBase(OMImplementation omImplementation) { super(omImplementation); } //SOAP 1.1 Header Test (Programaticaly Created)-------------------------------------------------------------------------------- public void testSOAP11AddHeaderBlock() { soap11Header.addHeaderBlock("echoOk1", namespace); soap11Header.addHeaderBlock("echoOk2", namespace); Iterator iterator = soap11Header.getChildren(); SOAPHeaderBlock headerBlock1 = (SOAPHeaderBlock) iterator.next(); assertFalse( "SOAP 1.1 Header Test : - After calling addHeaderBlock method twice, getChildren method returns empty iterator", headerBlock1 == null); assertTrue("SOAP 1.1 Header Test : - HeaderBlock1 local name mismatch", headerBlock1.getLocalName().equals("echoOk1")); assertTrue( "SOAP 1.1 Header Test : - HeaderBlock1 namespace uri mismatch", headerBlock1.getNamespace().getNamespaceURI().equals( "http://www.example.org")); SOAPHeaderBlock headerBlock2 = (SOAPHeaderBlock) iterator.next(); assertFalse( "SOAP 1.1 Header Test : - After calling addHeaderBlock method twice, getChildren method returns an iterator with only one object", headerBlock2 == null); assertTrue("SOAP 1.1 Header Test : - HeaderBlock2 local name mismatch", headerBlock2.getLocalName().equals("echoOk2")); assertTrue( "SOAP 1.1 Header Test : - HeaderBlock2 namespace uri mismatch", headerBlock2.getNamespace().getNamespaceURI().equals( "http://www.example.org")); assertTrue( "SOAP 1.1 Header Test : - After calling addHeaderBlock method twice, getChildren method returns an iterator with more than two object", !iterator.hasNext()); } public void testSOAP11ExamineHeaderBlocks() { System.out.println("Failing test..."); soap11Header.addHeaderBlock("echoOk1", namespace).setRole( "http://schemas.xmlsoap.org/soap/envelope/actor/ultimateReceiver"); soap11Header.addHeaderBlock("echoOk2", namespace).setRole(ROLE_URI); Iterator iterator = soap11Header.examineHeaderBlocks(ROLE_URI); iterator.hasNext(); SOAPHeaderBlock headerBlockWithRole1 = (SOAPHeaderBlock) iterator.next(); assertEquals( "SOAP 1.1 Header Test : - headerBlockWithRole local name mismatch", "echoOk2", headerBlockWithRole1.getLocalName()); assertEquals( "SOAP 1.1 Header Test : - headerBlockWithRole role value mismatch", ROLE_URI, headerBlockWithRole1.getRole()); assertFalse( "SOAP 1.1 Header Test : - header has three headerBlocks with the given role, but examineHeaderBlocks(String role) method returns an iterator with more than three objects", iterator.hasNext()); } // public void testSOAP11ExtractHeaderBlocks() { // } public void testSOAP11ExamineAllHeaderBlocks() { soap11Header.addHeaderBlock("echoOk1", namespace); soap11Header.addHeaderBlock("echoOk2", namespace); Iterator iterator = soap11Header.examineAllHeaderBlocks(); iterator.hasNext(); SOAPHeaderBlock headerBlock1 = (SOAPHeaderBlock) iterator.next(); assertFalse( "SOAP 1.1 Header Test : - After calling addHeaderBlock method twice, examineAllHeaderBlocks method returns empty iterator", headerBlock1 == null); assertTrue("SOAP 1.1 Header Test : - HeaderBlock1 local name mismatch", headerBlock1.getLocalName().equals("echoOk1")); assertTrue( "SOAP 1.1 Header Test : - HeaderBlock1 namespace uri mismatch", headerBlock1.getNamespace().getNamespaceURI().equals( "http://www.example.org")); iterator.hasNext(); SOAPHeaderBlock headerBlock2 = (SOAPHeaderBlock) iterator.next(); assertFalse( "SOAP 1.1 Header Test : - After calling addHeaderBlock method twice, examineAllHeaderBlocks method returns an iterator with only one object", headerBlock2 == null); assertTrue("SOAP 1.1 Header Test : - HeaderBlock2 local name mismatch", headerBlock2.getLocalName().equals("echoOk2")); assertTrue( "SOAP 1.1 Header Test : - HeaderBlock2 namespace uri mismatch", headerBlock2.getNamespace().getNamespaceURI().equals( "http://www.example.org")); assertFalse( "SOAP 1.1 Header Test : - After calling addHeaderBlock method twice, examineAllHeaderBlocks method returns an iterator with more than two object", iterator.hasNext()); } // public void testSOAP11ExtractAllHeaderBlocks() { // // } public void testSOAP11getHeaderBlocksWithNSURI() { soap11Header.addHeaderBlock("echoOk1", namespace); soap11Header.addHeaderBlock("echoOk2", omFactory.createOMNamespace("http://www.test1.org", "test1")); ArrayList arrayList = soap11Header.getHeaderBlocksWithNSURI( "http://www.test1.org"); assertTrue( "SOAP 1.1 Header Test : - getHeaderBlocksWithNSURI returns an arrayList of incorrect size", arrayList.size() == 1); assertTrue( "SOAP 1.1 Header Test : - headerBlock of given namespace uri mismatch", ((SOAPHeaderBlock) arrayList.get(0)).getNamespace().getNamespaceURI() .equals("http://www.test1.org")); } //SOAP 1.2 Header Test (Programaticaly Created)---------------------------------------------------------------------------------- public void testSOAP12AddHeadearBlock() { soap12Header.addHeaderBlock("echoOk1", namespace); soap12Header.addHeaderBlock("echoOk2", namespace); Iterator iterator = soap12Header.getChildren(); SOAPHeaderBlock headerBlock1 = (SOAPHeaderBlock) iterator.next(); assertFalse( "SOAP 1.2 Header Test : - After calling addHeaderBlock method, getChildren method returns empty iterator", headerBlock1 == null); assertTrue("SOAP 1.2 Header Test : - HeaderBlock1 local name mismatch", headerBlock1.getLocalName().equals("echoOk1")); assertTrue( "SOAP 1.2 Header Test : - HeaderBlock1 namespace uri mismatch", headerBlock1.getNamespace().getNamespaceURI().equals( "http://www.example.org")); SOAPHeaderBlock headerBlock2 = (SOAPHeaderBlock) iterator.next(); assertFalse( "SOAP 1.2 Header Test : - After calling addHeaderBlock method, getChildren method returns an iterator with only one object", headerBlock2 == null); assertTrue("SOAP 1.2 Header Test : - HeaderBlock2 local name mismatch", headerBlock2.getLocalName().equals("echoOk2")); assertTrue( "SOAP 1.2 Header Test : - HeaderBlock2 namespace uri mismatch", headerBlock2.getNamespace().getNamespaceURI().equals( "http://www.example.org")); assertTrue( "SOAP 1.2 Header Test : - After calling addHeaderBlock method twice, getChildren method returns an iterator with more than two elements", !iterator.hasNext()); } public void testSOAP12ExamineHeaderBlocks() { soap12Header.addHeaderBlock("echoOk1", namespace); soap12Header.addHeaderBlock("echoOk2", namespace).setRole( "http://schemas.xmlsoap.org/soap/envelope/actor/ultimateReceiver"); Iterator iterator = soap12Header.examineHeaderBlocks( "http://schemas.xmlsoap.org/soap/envelope/actor/ultimateReceiver"); iterator.hasNext(); SOAPHeaderBlock headerBlockWithRole = (SOAPHeaderBlock) iterator.next(); assertTrue( "SOAP 1.2 Header Test : - headerBlockWithRole local name mismatch", headerBlockWithRole.getLocalName().equals("echoOk2")); assertTrue( "SOAP 1.2 Header Test : - headerBlockWithRole role value mismatch", headerBlockWithRole.getRole().equals( "http://schemas.xmlsoap.org/soap/envelope/actor/ultimateReceiver")); assertFalse( "SOAP 1.2 Header Test : - header has one headerBlock with role, but examineHeaderBlocks(String role) method returns an iterator with more than one object", iterator.hasNext()); } public void testSOAP12ExamineMustUnderstandHeaderBlocks() { soap12Header.addHeaderBlock("echoOk1", namespace).setRole( "http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver"); SOAPHeaderBlock headerBlock1 = soap12Header.addHeaderBlock("echoOk2", namespace); headerBlock1.setRole( "http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver"); headerBlock1.setMustUnderstand(true); soap12Header.addHeaderBlock("echoOk3", namespace).setMustUnderstand( true); Iterator iterator = soap12Header.examineMustUnderstandHeaderBlocks( "http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver"); iterator.hasNext(); SOAPHeaderBlock headerBlock = (SOAPHeaderBlock) iterator.next(); assertFalse( "SOAP 1.2 Header Test : - examineMustUnderstandHeaderBlocks method returns empty iterator", headerBlock == null); assertTrue("SOAP 1.2 Header Test : - HeaderBlock local name mismatch", headerBlock.getLocalName().equals("echoOk2")); assertTrue("SOAP 1.2 Header Test : - HeaderBlock role value mismatch", headerBlock.getRole().equals( "http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver")); assertFalse( "SOAP 1.2 Header Test : - examineMustUnderstandHeaderBlocks method returns an iterator with more than one object", iterator.hasNext()); } public void testSOAP12ExamineAllHeaderBlocks() { soap12Header.addHeaderBlock("echoOk1", namespace); soap12Header.addHeaderBlock("echoOk2", namespace); Iterator iterator = soap12Header.examineAllHeaderBlocks(); iterator.hasNext(); SOAPHeaderBlock headerBlock1 = (SOAPHeaderBlock) iterator.next(); assertFalse( "SOAP 1.2 Header Test : - After calling addHeaderBlock method twice, examineAllHeaderBlocks method returns empty iterator", headerBlock1 == null); assertTrue("SOAP 1.2 Header Test : - HeaderBlock1 local name mismatch", headerBlock1.getLocalName().equals("echoOk1")); assertTrue( "SOAP 1.2 Header Test : - HeaderBlock1 namespace uri mismatch", headerBlock1.getNamespace().getNamespaceURI().equals( "http://www.example.org")); SOAPHeaderBlock headerBlock2 = (SOAPHeaderBlock) iterator.next(); assertFalse( "SOAP 1.2 Header Test : - After calling addHeaderBlock method twice, examineAllHeaderBlocks method returns an iterator with only one object", headerBlock2 == null); assertTrue("SOAP 1.2 Header Test : - HeaderBlock2 local name mismatch", headerBlock2.getLocalName().equals("echoOk2")); assertTrue( "SOAP 1.2 Header Test : - HeaderBlock2 namespace uri mismatch", headerBlock2.getNamespace().getNamespaceURI().equals( "http://www.example.org")); assertFalse( "SOAP 1.2 Header Test : - After calling addHeaderBlock method twice, examineAllHeaderBlocks method returns an iterator with more than two object", iterator.hasNext()); } // public void testSOAP12ExtractAllHeaderBlocks() { // // } public void testSOAP12getHeaderBlocksWithNSURI() { soap12Header.addHeaderBlock("echoOk1", namespace); soap12Header.addHeaderBlock("echoOk2", omFactory.createOMNamespace("http://www.test1.org", "test1")); ArrayList arrayList = soap12Header.getHeaderBlocksWithNSURI( "http://www.test1.org"); assertTrue( "SOAP 1.2 Header Test : - getHeaderBlocksWithNSURI returns an arrayList of incorrect size", arrayList.size() == 1); assertTrue( "SOAP 1.2 Header Test : - headerBlock of given namespace uri, mismatch", ((SOAPHeaderBlock) arrayList.get(0)).getNamespace().getNamespaceURI() .equals("http://www.test1.org")); } //SOAP 1.1 Header Test (With Parser)--------------------------------------------------------------------------------------------- public void testSOAP11ExamineHeaderBlocksWithParser() { Iterator iterator = soap11HeaderWithParser.examineHeaderBlocks( "http://schemas.xmlsoap.org/soap/actor/next"); iterator.hasNext(); SOAPHeaderBlock headerBlock1 = (SOAPHeaderBlock) iterator.next(); assertEquals( "SOAP 1.1 Header Test With Parser : - headerBlock1 localname mismatch", headerBlock1.getLocalName(), "From"); assertTrue( "SOAP 1.1 Header Test With Parser : - headerBlock1 role value mismatch", headerBlock1.getRole().equals( "http://schemas.xmlsoap.org/soap/actor/next")); iterator.hasNext(); SOAPHeaderBlock headerBlock2 = (SOAPHeaderBlock) iterator.next(); assertTrue( "SOAP 1.1 Header Test With Parser : - headerBlock2 localname mmismatch", headerBlock2.getLocalName().equals("MessageID")); assertTrue( "SOAP 1.1 Header Test With Parser : - headerBlock2 role value mmismatch", headerBlock2.getRole().equals( "http://schemas.xmlsoap.org/soap/actor/next")); assertFalse( "SOAP 1.1 Header Test With Parser : - examineHeaderBlocks(String role) method returns an iterator with more than two objects", iterator.hasNext()); } public void testSOAP11ExamineMustUnderstandHeaderBlocksWithParser() { Iterator iterator = soap11HeaderWithParser.examineMustUnderstandHeaderBlocks( "http://schemas.xmlsoap.org/soap/actor/next"); iterator.hasNext(); SOAPHeaderBlock headerBlock1 = (SOAPHeaderBlock) iterator.next(); assertTrue( "SOAP 1.1 Header Test With Parser : - headerBlock1 localname mmismatch", headerBlock1.getLocalName().equals("MessageID")); assertTrue( "SOAP 1.1 Header Test With Parser : - headerBlock1 role value mmismatch", headerBlock1.getRole().equals( "http://schemas.xmlsoap.org/soap/actor/next")); assertFalse( "SOAP 1.1 Header Test With Parser : - examineMustUnderstandHeaderBlocks(String role) method returns an iterator with more than one objects", iterator.hasNext()); } public void testSOAP11ExamineAllHeaderBlocksWithParser() { Iterator iterator = soap11HeaderWithParser.examineAllHeaderBlocks(); iterator.hasNext(); SOAPHeaderBlock headerBlock1 = (SOAPHeaderBlock) iterator.next(); assertTrue( "SOAP 1.1 Header Test With Parser : - headerBlock1 localname mmismatch", headerBlock1.getLocalName().equals("From")); iterator.hasNext(); SOAPHeaderBlock headerBlock2 = (SOAPHeaderBlock) iterator.next(); assertTrue( "SOAP 1.1 Header Test With Parser : - headerBlock1 localname mmismatch", headerBlock2.getLocalName().equals("MessageID")); iterator.hasNext(); SOAPHeaderBlock headerBlock3 = (SOAPHeaderBlock) iterator.next(); assertTrue( "SOAP 1.1 Header Test With Parser : - headerBlock1 localname mmismatch", headerBlock3.getLocalName().equals("To")); assertFalse( "SOAP 1.1 Header Test With Parser : - examineAllHeaderBlocks method returns an iterator with more than three objects", iterator.hasNext()); } public void testSOAP11getHeaderBlocksWithNSURIWithParser() { ArrayList arrayList = soap11HeaderWithParser.getHeaderBlocksWithNSURI( "http://example.org/ts-tests"); assertTrue( "SOAP 1.1 Header Test With Parser : - getHeaderBlocksWithNSURI returns an arrayList of incorrect size", arrayList.size() == 1); assertTrue( "SOAP 1.1 Header Test With Parser : - headerBlock of given namespace uri, local name mismatch", ((SOAPHeaderBlock) arrayList.get(0)).getLocalName().equals( "MessageID")); assertTrue( "SOAP 1.1 Header Test With Parser : - headerBlock of given namespace uri, mismatch", ((SOAPHeaderBlock) arrayList.get(0)).getNamespace().getNamespaceURI() .equals("http://example.org/ts-tests")); } //SOAP 1.2 Header Test (With Parser)------------------------------------------------------------------------------------------- public void testSOAP12ExamineHeaderBlocksWithParser() { Iterator iterator = soap12HeaderWithParser.examineHeaderBlocks( "http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver"); iterator.hasNext(); SOAPHeaderBlock headerBlock1 = (SOAPHeaderBlock) iterator.next(); assertTrue( "SOAP 1.2 Header Test With Parser : - headerBlock1 localname mmismatch", headerBlock1.getLocalName().equals("echoOk")); assertTrue( "SOAP 1.2 Header Test With Parser : - headerBlock1 role value mmismatch", headerBlock1.getRole().equals( "http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver")); iterator.hasNext(); SOAPHeaderBlock headerBlock2 = (SOAPHeaderBlock) iterator.next(); assertTrue( "SOAP 1.2 Header Test With Parser : - headerBlock2 localname mmismatch", headerBlock2.getLocalName().equals("echoOk2")); assertTrue( "SOAP 1.2 Header Test With Parser : - headerBlock2 role value mmismatch", headerBlock2.getRole().equals( "http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver")); assertFalse( "SOAP 1.2 Header Test With Parser : - examineHeaderBlocks(String role) method returns an iterator with more than two objects", iterator.hasNext()); } public void testSOAP12ExamineMustUnderstandHeaderBlocksWithParser() { Iterator iterator = soap12HeaderWithParser.examineMustUnderstandHeaderBlocks( "http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver"); iterator.hasNext(); SOAPHeaderBlock headerBlock1 = (SOAPHeaderBlock) iterator.next(); assertEquals( "SOAP 1.2 Header Test With Parser : - headerBlock localname mmismatch", headerBlock1.getLocalName(), "echoOk"); assertEquals( "SOAP 1.2 Header Test With Parser : - headerBlock role value mmismatch", headerBlock1.getRole(), "http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver"); iterator.hasNext(); SOAPHeaderBlock headerBlock2 = (SOAPHeaderBlock) iterator.next(); assertEquals( "SOAP 1.2 Header Test With Parser : - headerBlock localname mmismatch", headerBlock2.getLocalName(), "echoOk2"); assertEquals( "SOAP 1.2 Header Test With Parser : - headerBlock role value mmismatch", headerBlock1.getRole(), "http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver"); assertFalse( "SOAP 1.2 Header Test With Parser : - examineMustUnderstandHeaderBlocks(String role) method returns an iterator with more than one objects", iterator.hasNext()); } public void testSOAP12ExamineAllHeaderBlocksWithParser() { Iterator iterator = soap12HeaderWithParser.examineAllHeaderBlocks(); SOAPHeaderBlock headerBlock1 = (SOAPHeaderBlock) iterator.next(); assertTrue( "SOAP 1.2 Header Test With Parser : - headerBlock1 localname mmismatch", headerBlock1.getLocalName().equals("echoOk")); SOAPHeaderBlock headerBlock2 = (SOAPHeaderBlock) iterator.next(); assertTrue( "SOAP 1.2 Header Test With Parser : - headerBlock1 localname mmismatch", headerBlock2.getLocalName().equals("echoOk1")); SOAPHeaderBlock headerBlock3 = (SOAPHeaderBlock) iterator.next(); assertTrue( "SOAP 1.2 Header Test With Parser : - headerBlock1 localname mmismatch", headerBlock3.getLocalName().equals("echoOk2")); assertFalse( "SOAP 1.2 Header Test With Parser : - examineAllHeaderBlocks method returns an iterator with more than three objects", iterator.hasNext()); } public void testSOAP12getHeaderBlocksWithNSURIWithParser() { ArrayList arrayList = soap12HeaderWithParser.getHeaderBlocksWithNSURI( "http://example.org/ts-tests"); assertTrue( "SOAP 1.2 Header Test With Parser : - getHeaderBlocksWithNSURI returns an arrayList of incorrect size", arrayList.size() == 1); assertTrue( "SOAP 1.2 Header Test With Parser : - headerBlock of given namespace uri, local name mismatch", ((SOAPHeaderBlock) arrayList.get(0)).getLocalName().equals( "echoOk")); assertTrue( "SOAP 1.2 Header Test With Parser : - headerBlock of given namespace uri, mismatch", ((SOAPHeaderBlock) arrayList.get(0)).getNamespace().getNamespaceURI() .equals("http://example.org/ts-tests")); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPFactoryTest.java0000644000000000000000000000451311131637474027647 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap; import junit.framework.TestCase; import org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLStreamException; import java.io.FileInputStream; import java.io.FileNotFoundException; public class SOAPFactoryTest extends TestCase { protected static final String SOAP11_FILE_NAME = "test-resources/soap/soap11/soap11message.xml"; protected static final String SOAP12_FILE_NAME = "test-resources/soap/soap12message.xml"; private static Log log = LogFactory.getLog(SOAPFactoryTest.class); public void testSOAPFactory() { try { SOAPEnvelope soapEnvelope = (SOAPEnvelope) new StAXSOAPModelBuilder(XMLInputFactory.newInstance(). createXMLStreamReader(new FileInputStream(SOAP11_FILE_NAME)), null) .getDocumentElement(); assertTrue(soapEnvelope != null); soapEnvelope = (SOAPEnvelope) new StAXSOAPModelBuilder(XMLInputFactory.newInstance(). createXMLStreamReader(new FileInputStream(SOAP12_FILE_NAME)), null) .getDocumentElement(); assertTrue(soapEnvelope != null); } catch (XMLStreamException e) { fail("Can not load soap envelope. Exception = " + e); } catch (FileNotFoundException e) { fail("Given XML can not be found. Exception = " + e); } } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPBodyTestBase.java0000644000000000000000000001314711131637474027733 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap; import org.apache.axiom.om.OMImplementation; public class SOAPBodyTestBase extends SOAPBodyTestCase { public SOAPBodyTestBase(OMImplementation omImplementation) { super(omImplementation); } //SOAP 1.1 Body Test (Programaticaly created)---------------------------------------------------------------------------------- public void testSOAP11AddFault1() { soap11Body.addFault(new Exception("This an exception for testing")); assertTrue( "SOAP 1.1 Body Test:- After calling addFault method, SOAP body has no fault", soap11Body.hasFault()); } public void testSOAP11addFault2() { soap11Body.addFault(soap11Factory.createSOAPFault(soap11Body)); assertTrue( "SOAP 1.1 Body Test:- After calling addFault method, SOAP body has no fault", soap11Body.hasFault()); } public void testSOAP11HasFault() { assertFalse( "SOAP 1.1 Body Test:- After creating a soap body it has a fault", soap11Body.hasFault()); soap11Body.addFault(new Exception("This an exception for testing")); assertTrue( "SOAP 1.1 Body Test:- After calling addFault method, hasFault method returns false", soap11Body.hasFault()); } public void testSOAP11GetFault() { assertTrue( "SOAP 1.1 Body Test:- After creating a soap body it has a fault", soap11Body.getFault() == null); soap11Body.addFault(new Exception("This an exception for testing")); assertFalse( "SOAP 1.1 Body Test:- After calling addFault method, getFault method returns null", soap11Body.getFault() == null); } //SOAP 1.2 Body Test (Programaticaly Created)---------------------------------------------------------------------------------- public void testSOAP12AddFault1() { soap12Body.addFault(new Exception("This an exception for testing")); assertTrue( "SOAP 1.2 Body Test:- After calling addFault method, SOAP body has no fault", soap12Body.hasFault()); } public void testSOAP12AddFault2() { soap12Body.addFault(soap12Factory.createSOAPFault(soap12Body)); assertTrue( "SOAP 1.2 Body Test:- After calling addFault method, SOAP body has no fault", soap12Body.hasFault()); } public void testSOAP12HasFault() { assertFalse( "SOAP 1.2 Body Test:- After creating a soap body it has a fault", soap12Body.hasFault()); soap12Body.addFault(new Exception("This an exception for testing")); assertTrue( "SOAP 1.2 Body Test:- After calling addFault method, hasFault method returns false", soap12Body.hasFault()); } public void testSOAP12GetFault() { assertTrue( "SOAP 1.2 Body Test:- After creating a soap body it has a fault", soap12Body.getFault() == null); soap12Body.addFault(new Exception("This an exception for testing")); assertFalse( "SOAP 1.2 Body Test:- After calling addFault method, getFault method returns null", soap12Body.getFault() == null); } //SOAP 1.1 Body Test (With Parser)------------------------------------------------------------------------------------------- public void testSOAP11HasFaultWithParser() { assertTrue( "SOAP 1.1 Body Test With parser :- hasFault method returns false", soap11BodyWithParser.hasFault()); } public void testSOAP11GetFaultWithParser() { assertFalse( "SOAP 1.1 Body Test With parser :- getFault method returns null", soap11BodyWithParser.getFault() == null); assertTrue( "SOAP 1.1 Body Test With parser : - SOAP fault name mismatch", soap11BodyWithParser.getFault().getLocalName().equals( SOAPConstants.SOAPFAULT_LOCAL_NAME)); } //SOAP 1.2 Body Test (With Parser)------------------------------------------------------------------------------------------------- public void testSOAP12HasFaultWithParser() { assertTrue( "SOAP 1.2 Body Test With parser :- hasFault method returns false", soap12BodyWithParser.hasFault()); } public void testSOAP12GetFaultWithParser() { assertFalse( "SOAP 1.2 Body Test With parser :- getFault method returns null", soap12BodyWithParser.getFault() == null); assertTrue( "SOAP 1.2 Body Test With parser : - SOAP fault name mismatch", soap12BodyWithParser.getFault().getLocalName().equals( SOAPConstants.SOAPFAULT_LOCAL_NAME)); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPRoleTest.java0000644000000000000000000001206411131637474027141 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap; import javax.xml.stream.XMLStreamReader; import javax.xml.stream.XMLInputFactory; import java.util.List; import java.util.ArrayList; import java.util.Iterator; import org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder; import org.apache.axiom.om.AbstractTestCase; public class SOAPRoleTest extends AbstractTestCase { public static final String CUSTOM_ROLE = "http://example.org/myCustomRole"; class MyRolePlayer implements RolePlayer { boolean ultimateReceiver; List roles; public MyRolePlayer(boolean ultimateReceiver) { this.ultimateReceiver = ultimateReceiver; roles = null; } public MyRolePlayer(boolean ultimateReceiver, String [] roles) { this.ultimateReceiver = ultimateReceiver; this.roles = new ArrayList(); for (int i = 0; i < roles.length; i++) { this.roles.add(roles[i]); } } public List getRoles() { return roles; } public boolean isUltimateDestination() { return ultimateReceiver; } } public SOAPRoleTest(String testName) { super(testName); } protected void setUp() throws Exception { } public StAXSOAPModelBuilder getSOAPBuilder(String fileName) throws Exception { XMLStreamReader parser = XMLInputFactory.newInstance().createXMLStreamReader( getTestResource(fileName)); return new StAXSOAPModelBuilder(parser, null); } public void testSOAP11Roles() throws Exception { String testfile = "soap/soap11/soap11RoleMessage.xml"; StAXSOAPModelBuilder builder = getSOAPBuilder(testfile); SOAPEnvelope env = builder.getSOAPEnvelope(); SOAPHeader soapHeader = env.getHeader(); String roles [] = { CUSTOM_ROLE }; RolePlayer rp = new MyRolePlayer(true, roles); Iterator headers = soapHeader.getHeadersToProcess(rp); assertTrue("No headers!", headers.hasNext()); int numHeaders = 0; while (headers.hasNext()) { SOAPHeaderBlock header = (SOAPHeaderBlock)headers.next(); assertNotNull(header); numHeaders++; } assertEquals("Didn't get right number of headers (with custom role)", 4, numHeaders); rp = new MyRolePlayer(true); headers = soapHeader.getHeadersToProcess(rp); assertTrue(headers.hasNext()); numHeaders = 0; while (headers.hasNext()) { SOAPHeaderBlock header = (SOAPHeaderBlock)headers.next(); assertNotNull(header); numHeaders++; } assertEquals("Didn't get right number of headers (no custom role)", 3, numHeaders); } public void testSOAP12Roles() throws Exception { String testfile = "soap/soap12RoleMessage.xml"; StAXSOAPModelBuilder builder = getSOAPBuilder(testfile); SOAPEnvelope env = builder.getSOAPEnvelope(); SOAPHeader soapHeader = env.getHeader(); String roles [] = { CUSTOM_ROLE }; RolePlayer rp = new MyRolePlayer(true, roles); Iterator headers = soapHeader.getHeadersToProcess(rp); assertTrue("No headers!", headers.hasNext()); int numHeaders = 0; while (headers.hasNext()) { SOAPHeaderBlock header = (SOAPHeaderBlock)headers.next(); numHeaders++; } assertEquals("Didn't get right number of headers (with custom role)", 5, numHeaders); rp = new MyRolePlayer(true); headers = soapHeader.getHeadersToProcess(rp); assertTrue(headers.hasNext()); numHeaders = 0; while (headers.hasNext()) { SOAPHeaderBlock header = (SOAPHeaderBlock)headers.next(); numHeaders++; } assertEquals("Didn't get right number of headers (no custom role)", 4, numHeaders); // Intermediary test rp = new MyRolePlayer(false); headers = soapHeader.getHeadersToProcess(rp); assertTrue(headers.hasNext()); numHeaders = 0; while (headers.hasNext()) { SOAPHeaderBlock header = (SOAPHeaderBlock)headers.next(); numHeaders++; } assertEquals("Didn't get right number of headers (no custom role)", 1, numHeaders); } } ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAP11FaultImplConversionTest.javaaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAP11FaultImplConversionTest.ja0000644000000000000000000000400411131637474032011 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap; import junit.framework.TestCase; import org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLStreamReader; import java.io.FileInputStream; import java.io.InputStream; public class SOAP11FaultImplConversionTest extends TestCase { private String soap11FaulXmlPath = "test-resources/soap/soap11/soapfault2.xml"; public void testConversion() { try { InputStream is = new FileInputStream(soap11FaulXmlPath); XMLInputFactory xmlInputFactory = XMLInputFactory.newInstance(); xmlInputFactory.setProperty(XMLInputFactory.IS_NAMESPACE_AWARE, Boolean.TRUE) ; XMLStreamReader reader = xmlInputFactory.createXMLStreamReader(is); SOAPEnvelope env = new StAXSOAPModelBuilder(reader, null).getSOAPEnvelope(); env.build(); SOAPEnvelope env2 = new StAXSOAPModelBuilder(env.getXMLStreamReader(), null).getSOAPEnvelope(); env2.build(); env2.toString(); //System.out.println(env2); } catch (Exception e) { e.printStackTrace(); fail(e.getMessage()); } } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPFaultDetailTestBase.java0000644000000000000000000003071611131637474031235 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap; import org.apache.axiom.om.OMAbstractFactory; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMImplementation; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMText; import java.util.Iterator; public class SOAPFaultDetailTestBase extends SOAPFaultTestCase { protected SOAPFaultDetail soap11FaultDetail; protected SOAPFaultDetail soap12FaultDetail; protected SOAPFaultDetail soap11FaultDetailWithParser; protected SOAPFaultDetail soap12FaultDetailWithParser; protected OMNamespace omNamespace; public SOAPFaultDetailTestBase(OMImplementation omImplementation) { super(omImplementation); omNamespace = omFactory.createOMNamespace("http://www.test.org", "test"); } protected void setUp() throws Exception { super.setUp(); soap11FaultDetail = soap11Factory.createSOAPFaultDetail(soap11Fault); soap12FaultDetail = soap12Factory.createSOAPFaultDetail(soap12Fault); soap11FaultDetailWithParser = soap11FaultWithParser.getDetail(); soap12FaultDetailWithParser = soap12FaultWithParser.getDetail(); } //SOAP 1.1 Fault Detail Test (Programaticaly Created) public void testSOAP11AddDetailEntry() { soap11FaultDetail.addDetailEntry( omFactory.createOMElement("DetailEntry1", omNamespace)); soap11FaultDetail.addDetailEntry( omFactory.createOMElement("DetailEntry2", omNamespace)); Iterator iterator = soap11FaultDetail.getAllDetailEntries(); OMElement detailEntry1 = (OMElement) iterator.next(); assertFalse( "SOAP 1.1 Fault Detail Test : - After calling addDetailEntry method twice, getAllDetailEntries method returns empty iterator", detailEntry1 == null); assertTrue( "SOAP 1.1 Fault Detail Test : - detailEntry1 local name mismatch", detailEntry1.getLocalName().equals("DetailEntry1")); assertTrue( "SOAP 1.1 Fault Detail Test : - detailEntry1 namespace uri mismatch", detailEntry1.getNamespace().getNamespaceURI().equals( "http://www.test.org")); OMElement detailEntry2 = (OMElement) iterator.next(); assertFalse( "SOAP 1.1 Fault Detail Test : - After calling addDetailEntry method twice, getAllDetailEntries method returns an iterator with only one object", detailEntry2 == null); assertTrue( "SOAP 1.1 Fault Detail Test : - detailEntry2 local name mismatch", detailEntry2.getLocalName().equals("DetailEntry2")); assertTrue( "SOAP 1.1 Fault Detail Test : - detailEntry2 namespace uri mismatch", detailEntry2.getNamespace().getNamespaceURI().equals( "http://www.test.org")); assertTrue( "SOAP 1.1 Fault Detail Test : - After calling addDetailEntry method twice, getAllDetailEntries method returns an iterator with three objects", !iterator.hasNext()); } public void testSOAP11GetAllDetailEntries() { Iterator iterator = soap11FaultDetail.getAllDetailEntries(); assertTrue( "SOAP 1.1 Fault Detail Test : - After creating SOAP11FaultDetail element, it has DetailEntries", !iterator.hasNext()); soap11FaultDetail.addDetailEntry( omFactory.createOMElement("DetailEntry", omNamespace)); iterator = soap11FaultDetail.getAllDetailEntries(); OMElement detailEntry = (OMElement) iterator.next(); assertFalse( "SOAP 1.1 Fault Detail Test : - After calling addDetailEntry method, getAllDetailEntries method returns empty iterator", detailEntry == null); assertTrue( "SOAP 1.1 Fault Detail Test : - detailEntry local name mismatch", detailEntry.getLocalName().equals("DetailEntry")); assertTrue( "SOAP 1.1 Fault Detail Test : - detailEntry namespace uri mismatch", detailEntry.getNamespace().getNamespaceURI().equals( "http://www.test.org")); assertTrue( "SOAP 1.1 Fault Detail Test : - After calling addDetailEntry method once, getAllDetailEntries method returns an iterator with two objects", !iterator.hasNext()); } //SOAP 1.2 Fault Detail Test (Programaticaly Created) public void testSOAP12AddDetailEntry() { soap12FaultDetail.addDetailEntry( omFactory.createOMElement("DetailEntry1", omNamespace)); soap12FaultDetail.addDetailEntry( omFactory.createOMElement("DetailEntry2", omNamespace)); Iterator iterator = soap12FaultDetail.getAllDetailEntries(); OMElement detailEntry1 = (OMElement) iterator.next(); assertFalse( "SOAP 1.2 Fault Detail Test : - After calling addDetailEntry method twice, getAllDetailEntries method returns empty iterator", detailEntry1 == null); assertTrue( "SOAP 1.2 Fault Detail Test : - detailEntry1 local name mismatch", detailEntry1.getLocalName().equals("DetailEntry1")); assertTrue( "SOAP 1.2 Fault Detail Test : - detailEntry1 namespace uri mismatch", detailEntry1.getNamespace().getNamespaceURI().equals( "http://www.test.org")); OMElement detailEntry2 = (OMElement) iterator.next(); assertFalse( "SOAP 1.2 Fault Detail Test : - After calling addDetailEntry method twice, getAllDetailEntries method returns an iterator with only one object", detailEntry2 == null); assertTrue( "SOAP 1.2 Fault Detail Test : - detailEntry2 local name mismatch", detailEntry2.getLocalName().equals("DetailEntry2")); assertTrue( "SOAP 1.2 Fault Detail Test : - detailEntry2 namespace uri mismatch", detailEntry2.getNamespace().getNamespaceURI().equals( "http://www.test.org")); assertTrue( "SOAP 1.2 Fault Detail Test : - After calling addDetailEntry method twice, getAllDetailEntries method returns an iterator with three objects", !iterator.hasNext()); } public void testSOAP12GetAllDetailEntries() { Iterator iterator = soap12FaultDetail.getAllDetailEntries(); assertTrue( "SOAP 1.2 Fault Detail Test : - After creating SOAP11FaultDetail element, it has DetailEntries", !iterator.hasNext()); soap12FaultDetail.addDetailEntry( omFactory.createOMElement("DetailEntry", omNamespace)); iterator = soap12FaultDetail.getAllDetailEntries(); OMElement detailEntry = (OMElement) iterator.next(); assertFalse( "SOAP 1.2 Fault Detail Test : - After calling addDetailEntry method, getAllDetailEntries method returns empty iterator", detailEntry == null); assertTrue( "SOAP 1.2 Fault Detail Test : - detailEntry local name mismatch", detailEntry.getLocalName().equals("DetailEntry")); assertTrue( "SOAP 1.2 Fault Detail Test : - detailEntry namespace uri mismatch", detailEntry.getNamespace().getNamespaceURI().equals( "http://www.test.org")); assertTrue( "SOAP 1.2 Fault Detail Test : - After calling addDetailEntry method once, getAllDetailEntries method returns an iterator with two objects", !iterator.hasNext()); } //SOAP 1.1 Fault Detail Test (With Parser) public void testSOAP11GetAllDetailEntriesWithParser() { Iterator iterator = soap11FaultDetailWithParser.getAllDetailEntries(); OMText textEntry = (OMText) iterator.next(); assertFalse( "SOAP 1.1 Fault Detail Test With Parser : - getAllDetailEntries method returns empty iterator", textEntry == null); assertTrue( "SOAP 1.1 Fault Detail Test With Parser : - text value mismatch", textEntry.getText().trim().equals("Details of error")); OMElement detailEntry1 = (OMElement) iterator.next(); assertFalse( "SOAP 1.1 Fault Detail Test With Parser : - getAllDetailEntries method returns an itrator without detail entries", detailEntry1 == null); assertTrue( "SOAP 1.1 Fault Detail Test With Parser : - detailEntry1 localname mismatch", detailEntry1.getLocalName().equals("MaxTime")); iterator.next(); OMElement detailEntry2 = (OMElement) iterator.next(); assertFalse( "SOAP 1.1 Fault Detail Test With Parser : - getAllDetailEntries method returns an itrator with only one detail entries", detailEntry2 == null); assertTrue( "SOAP 1.1 Fault Detail Test With Parser : - detailEntry2 localname mismatch", detailEntry2.getLocalName().equals("AveTime")); iterator.next(); assertTrue( "SOAP 1.1 Fault Detail Test With Parser : - getAllDetailEntries method returns an itrator with more than two detail entries", !iterator.hasNext()); } //SOAP 1.2 Fault Detail Test (With Parser) public void testSOAP12GetAllDetailEntriesWithParser() { Iterator iterator = soap12FaultDetailWithParser.getAllDetailEntries(); OMText textEntry = (OMText) iterator.next(); assertFalse( "SOAP 1.2 Fault Detail Test With Parser : - getAllDetailEntries method returns empty iterator", textEntry == null); assertTrue( "SOAP 1.2 Fault Detail Test With Parser : - text value mismatch", textEntry.getText().trim().equals("Details of error")); OMElement detailEntry1 = (OMElement) iterator.next(); assertFalse( "SOAP 1.2 Fault Detail Test With Parser : - getAllDetailEntries method returns an itrator without detail entries", detailEntry1 == null); assertTrue( "SOAP 1.2 Fault Detail Test With Parser : - detailEntry1 localname mismatch", detailEntry1.getLocalName().equals("MaxTime")); iterator.next(); OMElement detailEntry2 = (OMElement) iterator.next(); assertFalse( "SOAP 1.2 Fault Detail Test With Parser : - getAllDetailEntries method returns an itrator with only one detail entries", detailEntry2 == null); assertTrue( "SOAP 1.2 Fault Detail Test With Parser : - detailEntry2 localname mismatch", detailEntry2.getLocalName().equals("AveTime")); iterator.next(); assertTrue( "SOAP 1.2 Fault Detail Test With Parser : - getAllDetailEntries method returns an itrator with more than two detail entries", !iterator.hasNext()); } public void testWSCommons202() { SOAPFactory factory = OMAbstractFactory.getSOAP12Factory(); SOAPFaultDetail soapFaultDetail = factory.createSOAPFaultDetail(); soapFaultDetail.setText("a"); assertTrue(soapFaultDetail.getText().trim().equals("a")); assertTrue("Text serialization has problems. It had serialized same text twice", soapFaultDetail.toString().indexOf("aa") == -1); OMElement omElement = factory.createOMElement("DummyElement", null); soapFaultDetail.addChild(omElement); omElement.setText("Some text is here"); assertTrue("Children of SOAP Fault Detail element are not serialized properly", soapFaultDetail.toString().indexOf("Some text is here") != -1); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/CashWihBuildElementTest.java0000644000000000000000000000416311131637474031376 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap; import org.apache.axiom.om.AbstractTestCase; import org.apache.axiom.om.OMAbstractFactory; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.impl.builder.StAXOMBuilder; import org.apache.axiom.om.impl.llom.factory.OMXMLBuilderFactory; import org.apache.axiom.soap.impl.llom.soap11.SOAP11Factory; import javax.xml.stream.XMLInputFactory; public class CashWihBuildElementTest extends AbstractTestCase { StAXOMBuilder stAXOMBuilder; private OMElement rootElement; /** * Constructor. */ public CashWihBuildElementTest(String testName) { super(testName); } protected void setUp() throws Exception { stAXOMBuilder = OMXMLBuilderFactory.createStAXOMBuilder( OMAbstractFactory.getSOAP11Factory(), XMLInputFactory.newInstance().createXMLStreamReader( getTestResource("non_soap.xml"))); rootElement = stAXOMBuilder.getDocumentElement(); } public void testWithCashAndBuild() throws Exception { SOAPFactory soapFactory = new SOAP11Factory(); SOAPEnvelope envelope = soapFactory.getDefaultEnvelope(); envelope.getBody().addChild(rootElement); envelope.getBody().getFirstElement().getXMLStreamReaderWithoutCaching(); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPEnvelopeBuildTest.java0000644000000000000000000001652611131637474031004 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap; import java.io.StringReader; import java.io.StringWriter; import java.util.Iterator; import javax.xml.stream.XMLStreamReader; import junit.framework.TestCase; import org.apache.axiom.om.util.CommonUtils; import org.apache.axiom.om.util.StAXUtils; import org.apache.axiom.om.impl.builder.StAXOMBuilder; import org.apache.axiom.om.OMElement; import org.apache.axiom.soap.SOAPBody; import org.apache.axiom.soap.SOAPEnvelope; import org.apache.axiom.soap.SOAPHeader; import org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You 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. */ public class SOAPEnvelopeBuildTest extends TestCase { String testMessage=""+ "Hello"+ "Hello"+ ""; public void testBodyPreservedSerialize() throws Exception{ XMLStreamReader parser = StAXUtils.createXMLStreamReader(new StringReader(testMessage)); StAXSOAPModelBuilder sob = new StAXSOAPModelBuilder(parser, null); SOAPEnvelope se = (SOAPEnvelope)sob.getDocumentElement(); SOAPHeader sh = se.getHeader(); Iterator iter = sh.getChildElements(); while(iter.hasNext())iter.next(); StringWriter sw = new StringWriter(); se.serialize(sw); checkBodyExists(sw.toString()); } public void testBodyPreservedSerializeAndConsume() throws Exception{ XMLStreamReader parser = StAXUtils.createXMLStreamReader(new StringReader(testMessage)); StAXSOAPModelBuilder sob = new StAXSOAPModelBuilder(parser, null); SOAPEnvelope se = (SOAPEnvelope)sob.getDocumentElement(); SOAPHeader sh = se.getHeader(); sh.build(); StringWriter sw = new StringWriter(); se.serializeAndConsume(sw); checkBodyExists(sw.toString()); } public void testBodyPreservedSerializeAndConsumeAsXML() throws Exception{ XMLStreamReader parser = StAXUtils.createXMLStreamReader(new StringReader(testMessage)); StAXOMBuilder sob = new StAXOMBuilder(parser); OMElement se = sob.getDocumentElement(); OMElement sh = se.getFirstElement(); Iterator iter = sh.getChildElements(); while(iter.hasNext())iter.next(); StringWriter sw = new StringWriter(); se.serializeAndConsume(sw); checkBodyExists(sw.toString()); } public void testBodyPreservedSerializeAndConsumeDoesntTouchHeaders() throws Exception{ XMLStreamReader parser = StAXUtils.createXMLStreamReader(new StringReader(testMessage)); StAXSOAPModelBuilder sob = new StAXSOAPModelBuilder(parser, null); SOAPEnvelope se = (SOAPEnvelope)sob.getDocumentElement(); StringWriter sw = new StringWriter(); se.serializeAndConsume(sw); checkBodyExists(sw.toString()); } public void testBodyPreservedSerializeAndConsumeTouchesBody() throws Exception{ XMLStreamReader parser = StAXUtils.createXMLStreamReader(new StringReader(testMessage)); StAXSOAPModelBuilder sob = new StAXSOAPModelBuilder(parser, null); SOAPEnvelope se = (SOAPEnvelope)sob.getDocumentElement(); SOAPHeader sh = se.getHeader(); Iterator iter = sh.getChildElements(); while(iter.hasNext())iter.next(); se.getBody(); StringWriter sw = new StringWriter(); se.serializeAndConsume(sw); checkBodyExists(sw.toString()); } private void checkBodyExists(String str) throws Exception{ XMLStreamReader parser = StAXUtils.createXMLStreamReader(new StringReader(str)); StAXSOAPModelBuilder sob = new StAXSOAPModelBuilder(parser, null); SOAPEnvelope se = (SOAPEnvelope)sob.getDocumentElement(); SOAPBody sb = se.getBody(); if(sb == null){ fail("No SOAP Body"); } Iterator children = sb.getChildElements(); if(!children.hasNext()){ fail("No children of the Body element"); } } public void testTrace() throws Exception{ XMLStreamReader parser = StAXUtils.createXMLStreamReader(new StringReader(testMessage)); StAXSOAPModelBuilder sob = new StAXSOAPModelBuilder(parser, null); SOAPEnvelope se = (SOAPEnvelope)sob.getDocumentElement(); SOAPHeader sh = se.getHeader(); MyDebugLogger log = new MyDebugLogger(); long length = CommonUtils.logDebug(se, log); assertTrue(length > 100); assertTrue(log.outputText.indexOf("x:Content") > 0); } class MyDebugLogger implements Log { public String outputText = ""; public void debug(Object arg0) { outputText = outputText.concat(arg0.toString()); } public void debug(Object arg0, Throwable arg1) {} public void error(Object arg0) {} public void error(Object arg0, Throwable arg1) {} public void fatal(Object arg0) {} public void fatal(Object arg0, Throwable arg1) {} public void info(Object arg0) {} public void info(Object arg0, Throwable arg1) {} public boolean isDebugEnabled() { return true; } public boolean isErrorEnabled() { return false; } public boolean isFatalEnabled() { return false; } public boolean isInfoEnabled() { return false; } public boolean isTraceEnabled() { return false; } public boolean isWarnEnabled() { return false; } public void trace(Object arg0) {} public void trace(Object arg0, Throwable arg1) {} public void warn(Object arg0) {} public void warn(Object arg0, Throwable arg1) {} } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPHeaderTestCase.java0000644000000000000000000000334611131637474030227 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap; import org.apache.axiom.om.OMImplementation; import org.apache.axiom.om.OMNamespace; public abstract class SOAPHeaderTestCase extends SOAPTestCase { protected SOAPHeader soap11Header; protected SOAPHeader soap12Header; protected SOAPHeader soap11HeaderWithParser; protected SOAPHeader soap12HeaderWithParser; protected OMNamespace namespace; public SOAPHeaderTestCase(OMImplementation omImplementation) { super(omImplementation); namespace = omFactory.createOMNamespace("http://www.example.org", "test"); } protected void setUp() throws Exception { super.setUp(); soap11Header = soap11Factory.createSOAPHeader(soap11Envelope); soap12Header = soap12Factory.createSOAPHeader(soap12Envelope); soap11HeaderWithParser = soap11EnvelopeWithParser.getHeader(); soap12HeaderWithParser = soap12EnvelopeWithParser.getHeader(); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPEnvelopeTestBase.java0000644000000000000000000001445611131637474030617 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap; import org.apache.axiom.om.OMAbstractFactory; import org.apache.axiom.om.OMImplementation; public class SOAPEnvelopeTestBase extends SOAPTestCase { protected SOAPEnvelope soap11Envelope; protected SOAPEnvelope soap12Envelope; public SOAPEnvelopeTestBase(OMImplementation omImplementation) { super(omImplementation); soap11Envelope = omImplementation.getSOAP11Factory().getDefaultEnvelope(); soap12Envelope = omImplementation.getSOAP12Factory().getDefaultEnvelope(); } //SOAP 1.1 Envelope Test (Programaticaly Created)----------------------------------------------- public void testSOAP11GetHeader() { SOAPHeader header = soap11Envelope.getHeader(); assertTrue("SOAP 1.1 Header Test : - Header local name mismatch", header.getLocalName().equals(SOAPConstants.HEADER_LOCAL_NAME)); assertTrue("SOAP 1.1 Header Test : - Header namespace mismatch", header.getNamespace().getNamespaceURI().equals( SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI)); } public void testSOAP11GetBody() { SOAPBody body = soap11Envelope.getBody(); assertTrue("SOAP 1.1 Body Test : - Body local name mismatch", body.getLocalName().equals(SOAPConstants.BODY_LOCAL_NAME)); assertTrue("SOAP 1.1 Body Test : - Body namespace mismatch", body.getNamespace().getNamespaceURI().equals( SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI)); } //SOAP 1.2 Envelope Test (Programaticaly Created)------------------------------------------------- public void testSOAP12GetHeader() { SOAPHeader header = soap12Envelope.getHeader(); assertTrue("SOAP 1.2 Header Test : - Header local name mismatch", header.getLocalName().equals(SOAPConstants.HEADER_LOCAL_NAME)); assertTrue("SOAP 1.2 Header Test : - Header namespace mismatch", header.getNamespace().getNamespaceURI().equals( SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI)); } public void testSOAP12GetBody() { SOAPBody body = soap12Envelope.getBody(); assertTrue("SOAP 1.2 Body Test : - Body local name mismatch", body.getLocalName().equals(SOAPConstants.BODY_LOCAL_NAME)); assertTrue("SOAP 1.2 Body Test : - Body namespace mismatch", body.getNamespace().getNamespaceURI().equals( SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI)); } //SOAP 1.1 Envelope Test (With Parser)----------------------------------------------------------------- public void testSOAP11GetHeaderWithParser() { SOAPHeader header = soap11EnvelopeWithParser.getHeader(); assertTrue("SOAP 1.1 Header Test : - Header local name mismatch", header.getLocalName().equals(SOAPConstants.HEADER_LOCAL_NAME)); assertTrue("SOAP 1.1 Header Test : - Header namespace mismatch", header.getNamespace().getNamespaceURI().equals( SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI)); } public void testSOAP11GetBodyWithParser() { SOAPBody body = soap11EnvelopeWithParser.getBody(); assertTrue("SOAP 1.1 Body Test : - Body local name mismatch", body.getLocalName().equals(SOAPConstants.BODY_LOCAL_NAME)); assertTrue("SOAP 1.1 Body Test : - Body namespace mismatch", body.getNamespace().getNamespaceURI().equals( SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI)); } //SOAP 1.2 Envelope Test (With Parser)-------------------------------------------------------------------- public void testSOAP12GetHeaderWithParser() { SOAPHeader header = soap12EnvelopeWithParser.getHeader(); assertTrue("SOAP 1.2 Header Test : - Header local name mismatch", header.getLocalName().equals(SOAPConstants.HEADER_LOCAL_NAME)); assertTrue("SOAP 1.2 Header Test : - Header namespace mismatch", header.getNamespace().getNamespaceURI().equals( SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI)); } public void testSOAP12GetBodyWithParser() { SOAPBody body = soap12EnvelopeWithParser.getBody(); assertTrue("SOAP 1.2 Body Test : - Body local name mismatch", body.getLocalName().equals(SOAPConstants.BODY_LOCAL_NAME)); assertTrue("SOAP 1.2 Body Test : - Body namespace mismatch", body.getNamespace().getNamespaceURI().equals( SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI)); } public void testRandomSOAPHeader() { SOAPFactory soapFac = OMAbstractFactory.getSOAP12Factory(); SOAPEnvelope defaultEnvelope = soapFac.getDefaultEnvelope(); defaultEnvelope.build(); defaultEnvelope.getHeader().detach(); soapFac.createSOAPHeader(defaultEnvelope); } // Make sure order of header/body creation doesn't matter public void testBodyHeaderOrder() throws Exception { // SOAPFactory soapFac = new org.apache.axiom.soap.impl.llom.soap11.SOAP11Factory(); SOAPFactory soapFac = new org.apache.axiom.soap.impl.dom.soap11.SOAP11Factory(); SOAPEnvelope env = soapFac.createSOAPEnvelope(); SOAPBody body = soapFac.createSOAPBody(env); SOAPHeader header = soapFac.createSOAPHeader(env); assertTrue("Header isn't the first child!", env.getFirstElement() instanceof SOAPHeader); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPFaultSubCodeTestBase.java0000644000000000000000000002153511131637474031356 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap; import org.apache.axiom.om.OMImplementation; public class SOAPFaultSubCodeTestBase extends SOAPFaultSubCodeTestCase { public SOAPFaultSubCodeTestBase(OMImplementation omImplementation) { super(omImplementation); } //SOAP Fault SubCode(In Fault Code) Test (Programaticaly Created) public void testSetValueInFaultCode() { soap12FaultSubCodeInCode.setValue( soap12Factory.createSOAPFaultValue(soap12FaultSubCodeInCode)); assertFalse( "SOAP 1.2 Subcode Test In Fault Code : - After calling setValue method, getValue method returns null", soap12FaultSubCodeInCode.getValue() == null); try { soap12FaultSubCodeInCode.setValue( soap12Factory.createSOAPFaultValue(soap12FaultCode)); } catch (SOAPProcessingException e) { fail( "SOAP 1.2 SOAPFaultSubCode Test In FaultCode : - FaultValue whose parent is FaultCode should not be set in to FaultSubCode, as a child"); } } public void testGetValueInFaultCode() { assertTrue( "After creating SOAP12FaultSubCode In Fault Code, it has a FaultValue", soap12FaultSubCodeInCode.getValue() == null); soap12FaultSubCodeInCode.setValue( soap12Factory.createSOAPFaultValue(soap12FaultSubCodeInCode)); assertFalse( "SOAP 1.2 SOAPFaultSubCode Test In FaultCode : - After calling setValue method, getValue method returns null", soap12FaultSubCodeInCode.getValue() == null); } public void testsetSubCodeInFaultCode() { soap12FaultSubCodeInCode.setSubCode( soap12Factory.createSOAPFaultSubCode(soap12FaultSubCodeInCode)); assertFalse( "SOAP 1.2 Subcode Test In Fault Code : - After calling setSubCode method, getSubCode method returns null", soap12FaultSubCodeInCode.getSubCode() == null); try { soap12FaultSubCodeInCode.setSubCode( soap12Factory.createSOAPFaultSubCode(soap12FaultCode)); } catch (SOAPProcessingException e) { fail( "SOAP 1.2 SOAPFaultSubCode Test In FaultCode : - FaultSubCode whose parent is FaultCode should not be set in to FaultSubCode, as a child"); } } public void testGetSubCodeInFaultCode() { //soap12FaultSubCodeInCode has a SubCode because a SubCode was created in setUp method of super class // assertTrue("After creating SOAP12FaultSubCode In Fault Code, it has a FaultSubCode",soap12FaultSubCodeInCode.getSubCode() == null); soap12FaultSubCodeInCode.setSubCode( soap12Factory.createSOAPFaultSubCode(soap12FaultSubCodeInCode)); assertFalse( "SOAP 1.2 SOAPFaultSubCode Test In FaultCode : - After calling setSubCode method, getSubCode method returns null", soap12FaultSubCodeInCode.getSubCode() == null); } //SOAP Fault SubCode(In Fault SubCode) Test (Programaticaly Created) public void testSetValueInFaultSubCode() { soap12FaultSubCodeInSubCode.setValue( soap12Factory.createSOAPFaultValue(soap12FaultSubCodeInSubCode)); assertFalse( "SOAP 1.2 Subcode Test In Fault SubCode : - After calling setValue method, getValue method returns null", soap12FaultSubCodeInSubCode.getValue() == null); try { soap12FaultSubCodeInSubCode.setValue( soap12Factory.createSOAPFaultValue(soap12FaultCode)); } catch (SOAPProcessingException e) { fail( "SOAP 1.2 SOAPFaultSubCode Test In FaultCode : - FaultValue whose parent is FaultCode should not be set in to FaultSubCode, as a child"); } } public void testGetValueInFaultSubCode() { assertTrue( "After creating SOAP12FaultSubCode In Fault SubCode, it has a Fault Value", soap12FaultSubCodeInSubCode.getValue() == null); soap12FaultSubCodeInSubCode.setValue( soap12Factory.createSOAPFaultValue(soap12FaultSubCodeInSubCode)); assertFalse( "SOAP 1.2 SOAPFaultSubCode Test In FaultSubCode : - After calling setValue method, getValue method returns null", soap12FaultSubCodeInSubCode.getValue() == null); } public void testsetSubCodeInFaultSubCode() { soap12FaultSubCodeInSubCode.setSubCode( soap12Factory.createSOAPFaultSubCode( soap12FaultSubCodeInSubCode)); assertFalse( "SOAP 1.2 Subcode Test In Fault SubCode : - After calling setSubCode method, getSubCode method returns null", soap12FaultSubCodeInSubCode.getSubCode() == null); try { soap12FaultSubCodeInSubCode.setSubCode( soap12Factory.createSOAPFaultSubCode(soap12FaultCode)); } catch (SOAPProcessingException e) { fail( "SOAP 1.2 SOAPFaultSubCode Test In FaultSubCode : - FaultSubCode whose parent is FaultCode should not be set in to FaultSubCode, as a child"); } } public void testGetSubCodeInFaultSubCode() { assertTrue( "After creating SOAP12FaultSubCode In Fault SubCode, it has a FaultSubCode", soap12FaultSubCodeInSubCode.getSubCode() == null); soap12FaultSubCodeInSubCode.setSubCode( soap12Factory.createSOAPFaultSubCode( soap12FaultSubCodeInSubCode)); assertFalse( "SOAP 1.2 SOAPFaultSubCode Test In FaultSubCode : - After calling setSubCode method, getSubCode method returns null", soap12FaultSubCodeInSubCode.getSubCode() == null); } //SOAP Fault SubCode(In Fault Code) Test (With Parser) public void testGetValueInFaultCodeWithParser() { assertFalse( "SOAP 1.2 SOAPFaultSubCode Test In FaultCode With Parser : - getValue method returns null", soap12FaultSubCodeInFaultCodeWithParser.getValue() == null); assertTrue( "SOAP 1.2 SOAPFaultSubCode Test In FaultCode With Parser : - Value text mismatch", soap12FaultSubCodeInFaultCodeWithParser.getValue().getText() .equals("m:MessageTimeout In First Subcode")); } public void testGetSubCodeInFaultCodeWithParser() { assertFalse( "SOAP 1.2 SOAPFaultSubCode Test In FaultCode With Parser : - getSubCode method returns null", soap12FaultSubCodeInFaultCodeWithParser.getSubCode() == null); assertTrue( "SOAP 1.2 SOAPFaultSubCode Test In FaultCode With Parser : - SubCode local name mismatch", soap12FaultSubCodeInFaultCodeWithParser.getSubCode() .getLocalName() .equals(SOAP12Constants.SOAP_FAULT_SUB_CODE_LOCAL_NAME)); } //SOAP Fault SubCode(In Fault SubCode) Test (With Parser) public void testGetValueInFaultSubCodeWithParser() { assertFalse( "SOAP 1.2 SOAPFaultSubCode Test In FaultSubCode With Parser : - getValue method returns null", soap12FaultSubCodeInSubCodeWithParser.getValue() == null); assertTrue( "SOAP 1.2 SOAPFaultSubCode Test In FaultSubCode With Parser : - Value text mismatch", soap12FaultSubCodeInSubCodeWithParser.getValue().getText() .equals("m:MessageTimeout In Second Subcode")); } public void testGetSubCodeInFaultSubCodeWithParser() { assertFalse( "SOAP 1.2 SOAPFaultSubCode Test In FaultSubCode With Parser : - getSubCode method returns null", soap12FaultSubCodeInSubCodeWithParser.getSubCode() == null); assertTrue( "SOAP 1.2 SOAPFaultSubCode Test In FaultSubCode With Parser : - SubCode local name mismatch", soap12FaultSubCodeInSubCodeWithParser.getSubCode() .getLocalName() .equals(SOAP12Constants.SOAP_FAULT_SUB_CODE_LOCAL_NAME)); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/0000755000000000000000000000000011131637474025010 5ustar rootrootaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/dom/0000755000000000000000000000000011131637474025567 5ustar rootrootaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/dom/SOAPFaultTextTest.java0000644000000000000000000000212411131637474031674 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.dom; import org.apache.axiom.om.impl.dom.factory.OMDOMImplementation; import org.apache.axiom.soap.SOAPFaultTextTestBase; public class SOAPFaultTextTest extends SOAPFaultTextTestBase { public SOAPFaultTextTest() { super(new OMDOMImplementation()); } } ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/dom/SOAPFaultReasonTest.javaaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/dom/SOAPFaultReasonTest.jav0000644000000000000000000000213411131637474032037 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.dom; import org.apache.axiom.om.impl.dom.factory.OMDOMImplementation; import org.apache.axiom.soap.SOAPFaultReasonTestBase; public class SOAPFaultReasonTest extends SOAPFaultReasonTestBase { public SOAPFaultReasonTest() { super(new OMDOMImplementation()); } } ././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/dom/SOAPFaultValueTest.javaaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/dom/SOAPFaultValueTest.java0000644000000000000000000000213011131637474032021 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.dom; import org.apache.axiom.om.impl.dom.factory.OMDOMImplementation; import org.apache.axiom.soap.SOAPFaultValueTestBase; public class SOAPFaultValueTest extends SOAPFaultValueTestBase { public SOAPFaultValueTest() { super(new OMDOMImplementation()); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/dom/SOAPEnvelopeTest.java0000644000000000000000000000212011131637474031525 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.dom; import org.apache.axiom.om.impl.dom.factory.OMDOMImplementation; import org.apache.axiom.soap.SOAPEnvelopeTestBase; public class SOAPEnvelopeTest extends SOAPEnvelopeTestBase { public SOAPEnvelopeTest() { super(new OMDOMImplementation()); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/dom/SOAPFaultTest.java0000644000000000000000000000210411131637474031025 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.dom; import org.apache.axiom.om.impl.dom.factory.OMDOMImplementation; import org.apache.axiom.soap.SOAPFaultTestBase; public class SOAPFaultTest extends SOAPFaultTestBase { public SOAPFaultTest() { super(new OMDOMImplementation()); } } ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/dom/SOAPFaultSubCodeTest.javaaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/dom/SOAPFaultSubCodeTest.ja0000644000000000000000000000214011131637474031743 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.dom; import org.apache.axiom.om.impl.dom.factory.OMDOMImplementation; import org.apache.axiom.soap.SOAPFaultSubCodeTestBase; public class SOAPFaultSubCodeTest extends SOAPFaultSubCodeTestBase { public SOAPFaultSubCodeTest() { super(new OMDOMImplementation()); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/dom/SOAPFaultRoleTest.java0000644000000000000000000000212411131637474031651 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.dom; import org.apache.axiom.om.impl.dom.factory.OMDOMImplementation; import org.apache.axiom.soap.SOAPFaultRoleTestBase; public class SOAPFaultRoleTest extends SOAPFaultRoleTestBase { public SOAPFaultRoleTest() { super(new OMDOMImplementation()); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/dom/SOAPFaultCodeTest.java0000644000000000000000000000212411131637474031622 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.dom; import org.apache.axiom.om.impl.dom.factory.OMDOMImplementation; import org.apache.axiom.soap.SOAPFaultCodeTestBase; public class SOAPFaultCodeTest extends SOAPFaultCodeTestBase { public SOAPFaultCodeTest() { super(new OMDOMImplementation()); } } ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/dom/SOAPFaultDetailTest.javaaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/dom/SOAPFaultDetailTest.jav0000644000000000000000000000213411131637474032012 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.dom; import org.apache.axiom.om.impl.dom.factory.OMDOMImplementation; import org.apache.axiom.soap.SOAPFaultDetailTestBase; public class SOAPFaultDetailTest extends SOAPFaultDetailTestBase { public SOAPFaultDetailTest() { super(new OMDOMImplementation()); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/dom/SOAPBodyTest.java0000644000000000000000000000210011131637474030643 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.dom; import org.apache.axiom.om.impl.dom.factory.OMDOMImplementation; import org.apache.axiom.soap.SOAPBodyTestBase; public class SOAPBodyTest extends SOAPBodyTestBase { public SOAPBodyTest() { super(new OMDOMImplementation()); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/dom/SOAPHeaderTest.java0000644000000000000000000000211011131637474031137 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.dom; import org.apache.axiom.om.impl.dom.factory.OMDOMImplementation; import org.apache.axiom.soap.SOAPHeaderTestBase; public class SOAPHeaderTest extends SOAPHeaderTestBase { public SOAPHeaderTest() { super(new OMDOMImplementation()); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/builder/0000755000000000000000000000000011131637474026436 5ustar rootroot././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/builder/StAXSOAPModelBuilderTest.javaaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/builder/StAXSOAPModelBuilde0000644000000000000000000010735411131637474032003 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.builder; import junit.framework.TestCase; import org.apache.axiom.om.OMAttribute; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.om.OMException; import org.apache.axiom.soap.SOAP11Constants; import org.apache.axiom.soap.SOAP12Constants; import org.apache.axiom.soap.SOAPBody; import org.apache.axiom.soap.SOAPConstants; import org.apache.axiom.soap.SOAPEnvelope; import org.apache.axiom.soap.SOAPFault; import org.apache.axiom.soap.SOAPFaultCode; import org.apache.axiom.soap.SOAPFaultDetail; import org.apache.axiom.soap.SOAPFaultNode; import org.apache.axiom.soap.SOAPFaultReason; import org.apache.axiom.soap.SOAPFaultRole; import org.apache.axiom.soap.SOAPFaultSubCode; import org.apache.axiom.soap.SOAPFaultText; import org.apache.axiom.soap.SOAPFaultValue; import org.apache.axiom.soap.SOAPHeader; import org.apache.axiom.soap.SOAPHeaderBlock; import org.custommonkey.xmlunit.XMLTestCase; import org.custommonkey.xmlunit.XMLUnit; import javax.xml.namespace.QName; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLStreamReader; import java.io.StringReader; import java.util.Iterator; public class StAXSOAPModelBuilderTest extends XMLTestCase { public void setUp() { } public void testStAXSOAPModelBuilder() throws Exception { String soap12Message = "\n" + " \n" + " \n" + " foo\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " env:Sender\n" + " \n" + " m:MessageTimeout\n" + " \n" + " m:MessageTimeout\n" + " \n" + " \n" + " \n" + " \n" + " Sender Timeout\n" + " \n" + " \n" + " http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver\n" + " \n" + " \n" + " ultimateReceiver\n" + " \n" + " \n" + " Details of error\n" + " \n" + " P5M\n" + " \n" + " \n" + " \n" + " P3M\n" + " \n" + " \n" + " \n" + " \n" + " \n" + ""; String soap11Message = "" + "\n" + " \n" + " \n" + " foo\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " env:Sender\n" + " \n" + " \n" + " Sender Timeout\n" + " \n" + " \n" + " http://schemas.xmlsoap.org/soap/envelope/actor/ultimateReceiver\n" + " \n" + " \n" + " Details of error\n" + " \n" + " P5M\n" + " \n" + " \n" + " \n" + " P3M\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " This is only a test\n" + " \n" + " \n" + " \n" + " \n" + ""; XMLStreamReader soap12Parser = XMLInputFactory.newInstance() .createXMLStreamReader(new StringReader(soap12Message)); OMXMLParserWrapper soap12Builder = new StAXSOAPModelBuilder(soap12Parser, null); SOAPEnvelope soap12Envelope = (SOAPEnvelope) soap12Builder.getDocumentElement(); assertTrue("SOAP 1.2 :- envelope local name mismatch", soap12Envelope.getLocalName().equals( SOAPConstants.SOAPENVELOPE_LOCAL_NAME)); assertTrue("SOAP 1.2 :- envelope namespace uri mismatch", soap12Envelope.getNamespace().getNamespaceURI().equals( SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI)); SOAPHeader header = soap12Envelope.getHeader(); assertTrue("SOAP 1.2 :- Header local name mismatch", header.getLocalName().equals( SOAPConstants.HEADER_LOCAL_NAME)); assertTrue("SOAP 1.2 :- Header namespace uri mismatch", header.getNamespace().getNamespaceURI().equals( SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI)); SOAPHeaderBlock headerBlock = (SOAPHeaderBlock) header.getFirstElement(); assertTrue("SOAP 1.2 :- Header block name mismatch", headerBlock.getLocalName().equals("echoOk")); assertTrue("SOAP 1.2 :- Header block name space uri mismatch", headerBlock.getNamespace().getNamespaceURI().equals( "http://example.org/ts-tests")); assertEquals("SOAP 1.2 :- Header block text mismatch", headerBlock.getText().trim(), "foo"); // Attribute iteration is not in any guaranteed order. // Use QNames to get the OMAttributes. QName roleQName = new QName(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI, SOAP12Constants.SOAP_ROLE); QName mustUnderstandQName = new QName(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI, SOAP12Constants.ATTR_MUSTUNDERSTAND); OMAttribute roleAttribute = headerBlock.getAttribute(roleQName); OMAttribute mustUnderstandAttribute = headerBlock.getAttribute(mustUnderstandQName); assertTrue("SOAP 1.2 :- Role attribute name not found", roleAttribute != null); assertTrue("SOAP 1.2 :- Role value mismatch", roleAttribute.getAttributeValue().trim().equals( SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI + "/" + SOAP12Constants.SOAP_ROLE + "/" + "ultimateReceiver")); assertTrue("SOAP 1.2 :- Mustunderstand attribute not found", mustUnderstandAttribute != null); assertTrue("SOAP 1.2 :- Mustunderstand value mismatch", mustUnderstandAttribute.getAttributeValue().equals( SOAPConstants.ATTR_MUSTUNDERSTAND_TRUE)); SOAPBody body = soap12Envelope.getBody(); assertTrue("SOAP 1.2 :- Body local name mismatch", body.getLocalName().equals(SOAPConstants.BODY_LOCAL_NAME)); assertTrue("SOAP 1.2 :- Body namespace uri mismatch", body.getNamespace().getNamespaceURI().equals( SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI)); SOAPFault fault = body.getFault(); assertTrue("SOAP 1.2 :- Fault local name mismatch", fault.getLocalName().equals( SOAPConstants.SOAPFAULT_LOCAL_NAME)); assertTrue("SOAP 1.2 :- Fault namespace uri mismatch", fault.getNamespace().getNamespaceURI().equals( SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI)); Iterator iteratorInFault = fault.getChildren(); iteratorInFault.next(); SOAPFaultCode code = (SOAPFaultCode) iteratorInFault.next(); assertTrue("SOAP 1.2 :- Fault code local name mismatch", code.getLocalName().equals( SOAP12Constants.SOAP_FAULT_CODE_LOCAL_NAME)); assertTrue("SOAP 1.2 :- Fault code namespace uri mismatch", code.getNamespace().getNamespaceURI().equals( SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI)); Iterator iteratorInCode = code.getChildren(); iteratorInCode.next(); SOAPFaultValue value1 = (SOAPFaultValue) iteratorInCode.next(); assertTrue("SOAP 1.2 :- Fault code value local name mismatch", value1.getLocalName().equals( SOAP12Constants.SOAP_FAULT_VALUE_LOCAL_NAME)); assertTrue("SOAP 1.2 :- Fault code namespace uri mismatch", value1.getNamespace().getNamespaceURI().equals( SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI)); assertTrue("SOAP 1.2 :- Value1 text mismatch", value1.getText().equals("env:Sender")); QName valueQName = value1.getTextAsQName(); assertTrue("SOAP 1.2 :- Fault code value's qname local name mismatch", valueQName.getLocalPart().equals("Sender")); assertTrue("SOAP 1.2 :- Fault code value's qname namespace uri mismatch", valueQName.getNamespaceURI().equals( SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI)); iteratorInCode.next(); SOAPFaultSubCode subCode1 = (SOAPFaultSubCode) iteratorInCode.next(); assertTrue("SOAP 1.2 :- Fault sub code local name mismatch", subCode1.getLocalName().equals( SOAP12Constants.SOAP_FAULT_SUB_CODE_LOCAL_NAME)); assertTrue("SOAP 1.2 :- Fault subcode namespace uri mismatch", subCode1.getNamespace().getNamespaceURI().equals( SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI)); Iterator iteratorInSubCode1 = subCode1.getChildren(); iteratorInSubCode1.next(); SOAPFaultValue value2 = (SOAPFaultValue) iteratorInSubCode1.next(); assertTrue("SOAP 1.2 :- Fault code value local name mismatch", value2.getLocalName().equals( SOAP12Constants.SOAP_FAULT_VALUE_LOCAL_NAME)); assertTrue("SOAP 1.2 :- Fault code namespace uri mismatch", value2.getNamespace().getNamespaceURI().equals( SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI)); assertTrue("SOAP 1.2 :- Value2 text mismatch", value2.getText().equals("m:MessageTimeout")); iteratorInSubCode1.next(); SOAPFaultSubCode subCode2 = (SOAPFaultSubCode) iteratorInSubCode1.next(); assertTrue("SOAP 1.2 :- Fault sub code local name mismatch", subCode2.getLocalName().equals( SOAP12Constants.SOAP_FAULT_SUB_CODE_LOCAL_NAME)); assertTrue("SOAP 1.2 :- Fault subcode namespace uri mismatch", subCode2.getNamespace().getNamespaceURI().equals( SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI)); Iterator iteratorInSubCode2 = subCode2.getChildren(); iteratorInSubCode2.next(); SOAPFaultValue value3 = (SOAPFaultValue) iteratorInSubCode2.next(); assertTrue("SOAP 1.2 :- Fault code value local name mismatch", value3.getLocalName().equals( SOAP12Constants.SOAP_FAULT_VALUE_LOCAL_NAME)); assertTrue("SOAP 1.2 :- Fault code namespace uri mismatch", value3.getNamespace().getNamespaceURI().equals( SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI)); assertTrue("SOAP 1.2 :- Value2 text mismatch", value3.getText().equals("m:MessageTimeout")); iteratorInFault.next(); SOAPFaultReason reason = (SOAPFaultReason) iteratorInFault.next(); assertTrue("SOAP 1.2 :- Fault reason local name mismatch", reason.getLocalName().equals( SOAP12Constants.SOAP_FAULT_REASON_LOCAL_NAME)); assertTrue("SOAP 1.2 :- Fault reason namespace uri mismatch", reason.getNamespace().getNamespaceURI().equals( SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI)); Iterator iteratorInReason = reason.getChildren(); iteratorInReason.next(); SOAPFaultText text = (SOAPFaultText) iteratorInReason.next(); assertTrue("SOAP 1.2 :- Fault text local name mismatch", text.getLocalName().equals( SOAP12Constants.SOAP_FAULT_TEXT_LOCAL_NAME)); assertTrue("SOAP 1.2 :- Text namespace uri mismatch", text.getNamespace().getNamespaceURI().equals( SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI)); assertTrue("SOAP 1.2 :- Text value mismatch", text.getText().equals("Sender Timeout")); iteratorInFault.next(); SOAPFaultNode node = (SOAPFaultNode) iteratorInFault.next(); assertTrue("SOAP 1.2 :- Fault node local name mismatch", node.getLocalName().equals( SOAP12Constants.SOAP_FAULT_NODE_LOCAL_NAME)); assertTrue("SOAP 1.2 :- Fault node namespace uri mismatch", node.getNamespace().getNamespaceURI().equals( SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI)); assertTrue("SOAP 1.2 :- Node value mismatch", node.getText().trim().equals( "http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver")); iteratorInFault.next(); SOAPFaultRole role = (SOAPFaultRole) iteratorInFault.next(); assertTrue("SOAP 1.2 :- Fault role local name mismatch", role.getLocalName().equals( SOAP12Constants.SOAP_FAULT_ROLE_LOCAL_NAME)); assertTrue("SOAP 1.2 :- Fault role namespace uri mismatch", role.getNamespace().getNamespaceURI().equals( SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI)); assertTrue("SOAP 1.2 :- Role value mismatch", role.getText().trim().equals("ultimateReceiver")); iteratorInFault.next(); SOAPFaultDetail detail = (SOAPFaultDetail) iteratorInFault.next(); assertTrue("SOAP 1.2 :- Fault detail local name mismatch", detail.getLocalName().equals( SOAP12Constants.SOAP_FAULT_DETAIL_LOCAL_NAME)); assertTrue("SOAP 1.2 :- Fault detail namespace uri mismatch", detail.getNamespace().getNamespaceURI().equals( SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI)); assertTrue("SOAP 1.2 :- Text in detail mismatch", detail.getText().trim().equals("Details of error")); Iterator iteratorInDetail = detail.getChildren(); iteratorInDetail.next(); OMElement element1 = (OMElement) iteratorInDetail.next(); assertTrue("SOAP 1.2 :- MaxTime element mismatch", element1.getLocalName().equals("MaxTime")); assertTrue("SOAP 1.2 :- MaxTime element namespace mismatch", element1.getNamespace().getNamespaceURI().equals( "http:www.sample.org")); assertTrue("SOAP 1.2 :- Text value in MaxTime element mismatch", element1.getText().trim().equals("P5M")); Iterator attributeIterator = element1.getAllAttributes(); OMAttribute attributeInMaxTime = (OMAttribute) attributeIterator.next(); assertTrue("SOAP 1.2 :- Attribute local name mismatch", attributeInMaxTime.getLocalName().equals("detail")); assertTrue("SOAP 1.2 :- Attribute namespace mismatch", attributeInMaxTime.getNamespace().getNamespaceURI().equals( "http:www.sample.org")); assertTrue("SOAP 1.2 :- Attribute value mismatch", attributeInMaxTime.getAttributeValue().trim().equals("This is only a test")); iteratorInDetail.next(); OMElement element2 = (OMElement) iteratorInDetail.next(); assertTrue("SOAP 1.2 :- AveTime element mismatch", element2.getLocalName().equals("AveTime")); assertTrue("SOAP 1.2 :- AveTime element namespace mismatch", element2.getNamespace().getNamespaceURI().equals( "http:www.sample.org")); Iterator iteratorInAveTimeElement = element2.getChildren(); iteratorInAveTimeElement.next(); OMElement element21 = (OMElement) iteratorInAveTimeElement.next(); assertTrue("SOAP 1.2 :- Time element mismatch", element21.getLocalName().equals("Time")); assertTrue("SOAP 1.2 :- Time element namespace mismatch", element21.getNamespace().getNamespaceURI().equals( "http:www.sample.org")); assertTrue("SOAP 1.2 :- Text value in Time element mismatch", element21.getText().trim().equals("P3M")); XMLStreamReader sopa11Parser = XMLInputFactory.newInstance() .createXMLStreamReader(new StringReader(soap11Message)); OMXMLParserWrapper soap11Builder = new StAXSOAPModelBuilder(sopa11Parser, null); SOAPEnvelope soap11Envelope = (SOAPEnvelope) soap11Builder.getDocumentElement(); // soap11Envelope.build(); // writer = XMLOutputFactory.newInstance().createXMLStreamWriter(System.out); // soap11Envelope.internalSerializeAndConsume(writer); // writer.flush(); assertTrue("SOAP 1.1 :- envelope local name mismatch", soap11Envelope.getLocalName().equals( SOAPConstants.SOAPENVELOPE_LOCAL_NAME)); assertTrue("SOAP 1.1 :- envelope namespace uri mismatch", soap11Envelope.getNamespace().getNamespaceURI().equals( SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI)); header = soap11Envelope.getHeader(); assertTrue("SOAP 1.1 :- Header local name mismatch", header.getLocalName().equals( SOAPConstants.HEADER_LOCAL_NAME)); assertTrue("SOAP 1.1 :- Header namespace uri mismatch", header.getNamespace().getNamespaceURI().equals( SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI)); headerBlock = (SOAPHeaderBlock) header.getFirstElement(); assertTrue("SOAP 1.1 :- Header block name mismatch", headerBlock.getLocalName().equals("echoOk")); assertTrue("SOAP 1.1 :- Header block name space uri mismatch", headerBlock.getNamespace().getNamespaceURI().equals( "http://example.org/ts-tests")); assertTrue("SOAP 1.1 :- Headaer block text mismatch", headerBlock.getText().trim().equals("foo")); // Attribute iteration is not in any guaranteed order. // Use QNames to get the OMAttributes. QName actorQName = new QName(SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI, SOAP11Constants.ATTR_ACTOR); mustUnderstandQName = new QName(SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI, SOAP11Constants.ATTR_MUSTUNDERSTAND); OMAttribute actorAttribute = headerBlock.getAttribute(actorQName); mustUnderstandAttribute = headerBlock.getAttribute(mustUnderstandQName); assertTrue("SOAP 1.1 :- Mustunderstand attribute not found", mustUnderstandAttribute != null); assertTrue("SOAP 1.1 :- Mustunderstand value mismatch", mustUnderstandAttribute.getAttributeValue().equals( SOAPConstants.ATTR_MUSTUNDERSTAND_1)); assertTrue( "SOAP 1.1 :- Mustunderstand attribute namespace uri mismatch", mustUnderstandAttribute.getNamespace().getNamespaceURI().equals( SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI)); assertTrue("SOAP 1.1 :- Actor attribute name not found", actorAttribute != null); assertTrue("SOAP 1.1 :- Actor value mismatch", actorAttribute.getAttributeValue().trim().equals( "http://schemas.xmlsoap.org/soap/" + SOAP11Constants.ATTR_ACTOR + "/" + "next")); assertTrue("SOAP 1.1 :- Actor attribute namespace uri mismatch", actorAttribute.getNamespace().getNamespaceURI().equals( SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI)); body = soap11Envelope.getBody(); assertTrue("SOAP 1.1 :- Body local name mismatch", body.getLocalName().equals(SOAPConstants.BODY_LOCAL_NAME)); assertTrue("SOAP 1.1 :- Body namespace uri mismatch", body.getNamespace().getNamespaceURI().equals( SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI)); fault = body.getFault(); assertTrue("SOAP 1.1 :- Fault namespace uri mismatch", fault.getNamespace().getNamespaceURI().equals( SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI)); iteratorInFault = fault.getChildren(); iteratorInFault.next(); code = (SOAPFaultCode) iteratorInFault.next(); assertEquals("SOAP Fault code local name mismatch", code.getLocalName(), (SOAP11Constants.SOAP_FAULT_CODE_LOCAL_NAME)); assertEquals("SOAP 1.1 :- Fault code value mismatch", code.getText().trim(), "env:Sender"); iteratorInFault.next(); reason = (SOAPFaultReason) iteratorInFault.next(); assertTrue("SOAP 1.1 :- Fault string local name mismatch", reason.getLocalName().equals( SOAP11Constants.SOAP_FAULT_STRING_LOCAL_NAME)); assertTrue("SOAP 1.1 :- Fault string value mismatch", reason.getText().trim().equals("Sender Timeout")); iteratorInFault.next(); role = (SOAPFaultRole) iteratorInFault.next(); assertTrue("SOAP 1.1 :- Fault actor local name mismatch", role.getLocalName().equals( SOAP11Constants.SOAP_FAULT_ACTOR_LOCAL_NAME)); assertTrue("SOAP 1.1 :- Actor value mismatch", role.getText().trim().equals( "http://schemas.xmlsoap.org/soap/envelope/actor/ultimateReceiver")); iteratorInFault.next(); detail = (SOAPFaultDetail) iteratorInFault.next(); assertTrue("SOAP 1.1 :- Fault detail local name mismatch", detail.getLocalName().equals( SOAP11Constants.SOAP_FAULT_DETAIL_LOCAL_NAME)); assertTrue("SOAP 1.2 :- Text in detail mismatch", detail.getText().trim().equals("Details of error")); iteratorInDetail = detail.getChildren(); iteratorInDetail.next(); element1 = (OMElement) iteratorInDetail.next(); assertTrue("SOAP 1.1 :- MaxTime element mismatch", element1.getLocalName().equals("MaxTime")); assertTrue("SOAP 1.1 :- MaxTime element namespace mismatch", element1.getNamespace().getNamespaceURI().equals( "http:www.sample.org")); assertTrue("SOAP 1.1 :- Text value in MaxTime element mismatch", element1.getText().trim().equals("P5M")); attributeIterator = element1.getAllAttributes(); attributeInMaxTime = (OMAttribute) attributeIterator.next(); assertTrue("SOAP 1.1 :- Attribute local name mismatch", attributeInMaxTime.getLocalName().equals("detail")); assertTrue("SOAP 1.1 :- Attribute namespace mismatch", attributeInMaxTime.getNamespace().getNamespaceURI().equals( "http:www.sample.org")); assertTrue("SOAP 1.1 :- Attribute value mismatch", attributeInMaxTime.getAttributeValue().equals("This is only a test")); iteratorInDetail.next(); element2 = (OMElement) iteratorInDetail.next(); assertTrue("SOAP 1.1 :- AveTime element mismatch", element2.getLocalName().equals("AveTime")); assertTrue("SOAP 1.1 :- AveTime element namespace mismatch", element2.getNamespace().getNamespaceURI().equals( "http:www.sample.org")); iteratorInAveTimeElement = element2.getChildren(); iteratorInAveTimeElement.next(); element21 = (OMElement) iteratorInAveTimeElement.next(); assertTrue("SOAP 1.1 :- Time element mismatch", element21.getLocalName().equals("Time")); assertTrue("SOAP 1.1 :- Time element namespace mismatch", element21.getNamespace().getNamespaceURI().equals( "http:www.sample.org")); assertTrue("SOAP 1.1 :- Text value in Time element mismatch", element21.getText().trim().equals("P3M")); iteratorInFault.next(); OMElement testElement = (OMElement) iteratorInFault.next(); assertTrue("SOAP 1.1 :- Test element mismatch", testElement.getLocalName().equals("Test")); assertTrue("SOAP 1.1 :- Test element namespace mismatch", testElement.getNamespace().getNamespaceURI().equals( "http:www.Test.org")); OMElement childOfTestElement = testElement.getFirstElement(); assertTrue("SOAP 1.1 :- Test element child local name mismatch", childOfTestElement.getLocalName().equals("TestElement")); assertTrue("SOAP 1.1 :- Test element child namespace mismatch", childOfTestElement.getNamespace().getNamespaceURI().equals( "http:www.Test.org")); assertTrue("SOAP 1.1 :- Test element child value mismatch", childOfTestElement.getText().trim().equals("This is only a test")); } /** * Test a couple of malformed envelopes, make sure parsing fails correctly. * * @throws Exception */ public void testBadEnvelope() throws Exception { String badEnvStart = "\n"; String badEnvHeader = " \n" + " foo\n" + " \n"; String badEnvEnd = " \n" + ""; String [] badHeaders = { "env:HeaDER", // Bad case "Header" // No namespace }; for (int i = 0; i < badHeaders.length; i++) { String soap12Message = badEnvStart + "<" + badHeaders[i] + ">\n" + badEnvHeader + "\n" + badEnvEnd; XMLStreamReader soap12Parser = XMLInputFactory.newInstance() .createXMLStreamReader(new StringReader(soap12Message)); StAXSOAPModelBuilder soap12Builder = new StAXSOAPModelBuilder(soap12Parser, null); SOAPEnvelope soap12Envelope = (SOAPEnvelope) soap12Builder.getDocumentElement(); try { soap12Envelope.getHeader(); } catch (OMException e) { // Good, we failed. Keep going. continue; } fail("Successfully parsed bad envelope ('" + badHeaders[i] + "')"); } } public void testFault() throws Exception { String soap11Fault = "\n" + "" + "" + "" + "SOAP-ENV:Server" + "handleMessage throws SOAPFaultException for ThrowsSOAPFaultToClientHandlersTest" + "" + "" + "" + "faultActor" + "" + "" + ""; XMLStreamReader soap11Parser = XMLInputFactory.newInstance() .createXMLStreamReader(new StringReader(soap11Fault)); StAXSOAPModelBuilder soap11Builder = new StAXSOAPModelBuilder(soap11Parser, null); OMElement element = soap11Builder.getDocumentElement(); element.build(); this.assertXMLEqual(soap11Fault, element.toString()); } /** * @throws Exception */ public void testOptimizedFault() throws Exception { String soap11Fault = "\n" + "" + "" + "" + "SOAP-ENV:Server" + "handleMessage throws SOAPFaultException for ThrowsSOAPFaultToClientHandlersTest" + "" + "" + "" + "faultActor" + "" + "" + ""; // Use the test parser that is aware of the first qname in the body. // This simulates the use of the parser that has this information built into its // implementation. XMLStreamReader soap11Parser = XMLInputFactory.newInstance() .createXMLStreamReader(new StringReader(soap11Fault)); QName qname = new QName(SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI, SOAP11Constants.BODY_FAULT_LOCAL_NAME, "SOAP-ENV"); XMLStreamReaderWithQName parser = new XMLStreamReaderWithQName(soap11Parser, qname); StAXSOAPModelBuilder soap11Builder = new StAXSOAPModelBuilder(parser, null); SOAPEnvelope env = soap11Builder.getSOAPEnvelope(); boolean isFault = env.hasFault(); this.assertTrue(isFault); this.assertTrue(!parser.isReadBody()); // Get the name of the first element in the body String localName = env.getSOAPBodyFirstElementLocalName(); this.assertTrue(localName.equals("Fault")); this.assertTrue(!parser.isReadBody()); } public void testFaultWithCDATA() throws Exception { String soap11Fault = "\n" + "" + "" + "" + "SOAP-ENV:Server" + "" + "" + "" + "" + "faultActor" + "" + "" + ""; XMLStreamReader soap11Parser = XMLInputFactory.newInstance() .createXMLStreamReader(new StringReader(soap11Fault)); StAXSOAPModelBuilder soap11Builder = new StAXSOAPModelBuilder(soap11Parser, null); OMElement element = soap11Builder.getDocumentElement(); element.build(); assertTrue(element instanceof SOAPEnvelope); SOAPEnvelope se = (SOAPEnvelope) element; SOAPFault fault = se.getBody().getFault(); SOAPFaultReason reason = fault.getReason(); assertTrue(reason.getText().equals("handleMessage throws SOAPFaultException for ThrowsSOAPFaultToClientHandlersTest")); } } ././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/builder/XMLStreamReaderWithQName.javaaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/builder/XMLStreamReaderWith0000644000000000000000000001426111131637474032160 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.builder; import org.apache.axiom.soap.SOAPConstants; import javax.xml.namespace.NamespaceContext; import javax.xml.namespace.QName; import javax.xml.stream.Location; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; /** * Used by StAXSOAPModelBuilderTest to simulate * */ public class XMLStreamReaderWithQName implements javax.xml.stream.XMLStreamReader { private XMLStreamReader delegate; private QName soapBodyFirstChildElementQName; private boolean readBody = false; public XMLStreamReaderWithQName(XMLStreamReader delegate, QName soapBodyFirstChildElementQName) { super(); this.delegate = delegate; this.soapBodyFirstChildElementQName = soapBodyFirstChildElementQName; } public void close() throws XMLStreamException { delegate.close(); } public int getAttributeCount() { return delegate.getAttributeCount(); } public String getAttributeLocalName(int arg0) { return delegate.getAttributeLocalName(arg0); } public QName getAttributeName(int arg0) { return delegate.getAttributeName(arg0); } public String getAttributeNamespace(int arg0) { return delegate.getAttributeNamespace(arg0); } public String getAttributePrefix(int arg0) { return delegate.getAttributePrefix(arg0); } public String getAttributeType(int arg0) { return delegate.getAttributeType(arg0); } public String getAttributeValue(int arg0) { return delegate.getAttributeValue(arg0); } public String getAttributeValue(String arg0, String arg1) { return delegate.getAttributeValue(arg0, arg1); } public String getCharacterEncodingScheme() { return delegate.getCharacterEncodingScheme(); } public String getElementText() throws XMLStreamException { return delegate.getElementText(); } public String getEncoding() { return delegate.getEncoding(); } public int getEventType() { return delegate.getEventType(); } public String getLocalName() { String localName = delegate.getLocalName(); if (localName.equals("Body")) { this.readBody = true; } return localName; } public boolean isReadBody() { return readBody; } public Location getLocation() { return delegate.getLocation(); } public QName getName() { return delegate.getName(); } public NamespaceContext getNamespaceContext() { return delegate.getNamespaceContext(); } public int getNamespaceCount() { return delegate.getNamespaceCount(); } public String getNamespacePrefix(int arg0) { return delegate.getNamespacePrefix(arg0); } public String getNamespaceURI() { return delegate.getNamespaceURI(); } public String getNamespaceURI(int arg0) { return delegate.getNamespaceURI(arg0); } public String getNamespaceURI(String arg0) { return delegate.getNamespaceURI(arg0); } public String getPIData() { return delegate.getPIData(); } public String getPITarget() { return delegate.getPITarget(); } public String getPrefix() { return delegate.getPrefix(); } public Object getProperty(String arg0) throws IllegalArgumentException { // Return the qname if (arg0.equals(SOAPConstants.SOAPBODY_FIRST_CHILD_ELEMENT_QNAME)) { return this.soapBodyFirstChildElementQName; } return delegate.getProperty(arg0); } public String getText() { return delegate.getText(); } public char[] getTextCharacters() { return delegate.getTextCharacters(); } public int getTextCharacters(int arg0, char[] arg1, int arg2, int arg3) throws XMLStreamException { return delegate.getTextCharacters(arg0, arg1, arg2, arg3); } public int getTextLength() { return delegate.getTextLength(); } public int getTextStart() { return delegate.getTextStart(); } public String getVersion() { return delegate.getVersion(); } public boolean hasName() { return delegate.hasName(); } public boolean hasNext() throws XMLStreamException { return delegate.hasNext(); } public boolean hasText() { return delegate.hasText(); } public boolean isAttributeSpecified(int arg0) { return delegate.isAttributeSpecified(arg0); } public boolean isCharacters() { return delegate.isCharacters(); } public boolean isEndElement() { return delegate.isEndElement(); } public boolean isStandalone() { return delegate.isStandalone(); } public boolean isStartElement() { return delegate.isStartElement(); } public boolean isWhiteSpace() { return delegate.isWhiteSpace(); } public int next() throws XMLStreamException { return delegate.next(); } public int nextTag() throws XMLStreamException { return delegate.nextTag(); } public void require(int arg0, String arg1, String arg2) throws XMLStreamException { delegate.require(arg0, arg1, arg2); } public boolean standaloneSet() { return delegate.standaloneSet(); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/llom/0000755000000000000000000000000011131637474025753 5ustar rootroot././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/llom/SOAPFaultTextTest.javaaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/llom/SOAPFaultTextTest.java0000644000000000000000000000214411131637474032062 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.llom; import org.apache.axiom.om.impl.llom.factory.OMLinkedListImplementation; import org.apache.axiom.soap.SOAPFaultTextTestBase; public class SOAPFaultTextTest extends SOAPFaultTextTestBase { public SOAPFaultTextTest() { super(new OMLinkedListImplementation()); } } ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/llom/SOAPFaultReasonTest.javaaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/llom/SOAPFaultReasonTest.ja0000644000000000000000000000215411131637474032037 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.llom; import org.apache.axiom.om.impl.llom.factory.OMLinkedListImplementation; import org.apache.axiom.soap.SOAPFaultReasonTestBase; public class SOAPFaultReasonTest extends SOAPFaultReasonTestBase { public SOAPFaultReasonTest() { super(new OMLinkedListImplementation()); } } ././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/llom/SOAPFaultNodeTest.javaaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/llom/SOAPFaultNodeTest.java0000644000000000000000000000214411131637474032023 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.llom; import org.apache.axiom.om.impl.llom.factory.OMLinkedListImplementation; import org.apache.axiom.soap.SOAPFaultNodeTestBase; public class SOAPFaultNodeTest extends SOAPFaultNodeTestBase { public SOAPFaultNodeTest() { super(new OMLinkedListImplementation()); } } ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/llom/SOAPFaultValueTest.javaaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/llom/SOAPFaultValueTest.jav0000644000000000000000000000215011131637474032046 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.llom; import org.apache.axiom.om.impl.llom.factory.OMLinkedListImplementation; import org.apache.axiom.soap.SOAPFaultValueTestBase; public class SOAPFaultValueTest extends SOAPFaultValueTestBase { public SOAPFaultValueTest() { super(new OMLinkedListImplementation()); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/llom/OMElementTest.java0000644000000000000000000002161511131637474031310 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.llom; import org.apache.axiom.om.OMAbstractFactory; import org.apache.axiom.om.OMComment; import org.apache.axiom.om.OMConstants; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMTestCase; import org.apache.axiom.om.OMText; import org.apache.axiom.om.impl.builder.StAXOMBuilder; import org.apache.axiom.om.impl.dom.DOOMAbstractFactory; import org.apache.axiom.soap.SOAPEnvelope; import org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; import java.util.Iterator; public class OMElementTest extends OMTestCase implements OMConstants { private static final String WSA_URI = "http://schemas.xmlsoap.org/ws/2004/03/addressing"; private static final String WSA_TO = "To"; private static Log log = LogFactory.getLog(OMElementTest.class); OMFactory factory = OMAbstractFactory.getOMFactory(); private OMElement firstElement; private OMElement secondElement; public OMElementTest(String testName) { super(testName); } /* * @see TestCase#setUp() */ protected void setUp() throws Exception { OMNamespace testingNamespace = factory.createOMNamespace( "http://testing.ws.org", "ws"); firstElement = factory.createOMElement("FirstElement", testingNamespace); secondElement = factory.createOMElement("SecondElement", factory.createOMNamespace( "http://moretesting.ws.org", "ws"), firstElement); } public void testGetText() { try { StAXSOAPModelBuilder soapBuilder = getOMBuilder( "soap/OMElementTest.xml"); SOAPEnvelope soapEnvelope = (SOAPEnvelope) soapBuilder.getDocumentElement(); OMElement wsaTo = soapEnvelope.getHeader().getFirstChildWithName( new QName(WSA_URI, WSA_TO)); String expectedString = "http://localhost:8081/axis/services/BankPort"; assertEquals("getText is not returning the correct value", wsaTo.getText().trim(), expectedString); } catch (Exception e) { log.info(e.getMessage()); } } public void testConstructors() { try { factory.createOMElement("", null); fail("This should fail as OMElement should not be allowed to create without a local name "); } catch (Exception e) { assertTrue(true); } assertTrue("Namespace having same information, declared in the same context, should share" + " the same namespace object", firstElement.getNamespace() != secondElement.getNamespace()); assertEquals("OMElement children addition has not worked properly", secondElement, firstElement.getFirstElement()); OMNamespace testNamespace2 = factory.createOMNamespace("ftp://anotherTest.ws.org", "ws"); firstElement.declareNamespace(testNamespace2); OMNamespace inheritedSecondNamespace = secondElement.findNamespace(testNamespace2.getNamespaceURI(), testNamespace2.getPrefix()); assertNotNull("Children should inherit namespaces declared in parent", inheritedSecondNamespace); assertEquals("inherited namespace uri should be equal", inheritedSecondNamespace.getNamespaceURI(), testNamespace2.getNamespaceURI()); assertEquals("inherited namespace prefix should be equal", inheritedSecondNamespace.getPrefix(), testNamespace2.getPrefix()); } public void testChildDetachment() { OMNamespace testNamespace2 = factory.createOMNamespace("ftp://anotherTest.ws.org", "ws"); secondElement.detach(); assertTrue("OMElement children detachment has not worked properly", !secondElement.equals(firstElement.getFirstElement())); assertNull("First Element should not contain elements after detaching. ", firstElement.getFirstElement()); assertNull("First Element should not contain elements after detaching. ", firstElement.getFirstOMChild()); assertNull(secondElement.findNamespace(testNamespace2.getNamespaceURI(), testNamespace2.getPrefix())); firstElement.addChild(secondElement); firstElement.setText("Some Sample Text"); assertTrue("First added child must be the first child", secondElement.equals(firstElement.getFirstOMChild())); Iterator children = firstElement.getChildren(); int childCount = 0; while (children.hasNext()) { children.next(); childCount++; } assertEquals("Children count should be two", childCount, 2); secondElement.detach(); assertTrue("First child should be the text child", firstElement.getFirstOMChild() instanceof OMText); } public void testAddDOOMElementAsChild() throws XMLStreamException { OMFactory doomFactory = DOOMAbstractFactory.getOMFactory(); OMFactory llomFactory = OMAbstractFactory.getOMFactory(); String text = "This was a DOOM Text"; OMElement llomRoot = llomFactory.createOMElement("root", null); OMElement doomElement = doomFactory.createOMElement("second", "test", "a"); doomElement.setText(text); llomRoot.addChild(doomElement); OMElement newElement = (new StAXOMBuilder(this.factory, llomRoot .getXMLStreamReader())).getDocumentElement(); newElement.build(); OMElement secondElement = newElement.getFirstElement(); assertNotNull(secondElement); assertEquals(secondElement.getText(), text); } public void testAddDOOMTextAsChild() throws XMLStreamException { OMFactory doomFactory = DOOMAbstractFactory.getOMFactory(); OMFactory llomFactory = OMAbstractFactory.getOMFactory(); String text = "This was a DOOM Text"; OMElement llomRoot = llomFactory.createOMElement("root", null); OMText doomText = doomFactory.createOMText(text); llomRoot.addChild(doomText); OMElement newElement = (new StAXOMBuilder(this.factory, llomRoot .getXMLStreamReader())).getDocumentElement(); newElement.build(); assertEquals(newElement.getText(), text); } public void testAddLLOMElementChildToDOOM() throws XMLStreamException { OMFactory doomFactory = DOOMAbstractFactory.getOMFactory(); OMFactory llomFactory = OMAbstractFactory.getOMFactory(); String text = "This was a LLOM Text"; OMElement doomRoot = doomFactory.createOMElement("root", null); OMElement llomElement = llomFactory.createOMElement("second", "test", "a"); llomElement.setText(text); doomRoot.addChild(llomElement); OMElement newElement = (new StAXOMBuilder(this.factory, doomRoot .getXMLStreamReader())).getDocumentElement(); newElement.build(); OMElement secondElement = newElement.getFirstElement(); assertNotNull(secondElement); assertEquals(secondElement.getText(), text); } public void testAddLLOMTextChildToDOOM() throws XMLStreamException { OMFactory doomFactory = DOOMAbstractFactory.getOMFactory(); OMFactory llomFactory = OMAbstractFactory.getOMFactory(); String text = "This was a DOOM Text"; OMElement doomRoot = doomFactory.createOMElement("root", null); OMText llomText = llomFactory.createOMText(text); OMComment comment = llomFactory.createOMComment(null, "comment"); doomRoot.addChild(llomText); doomRoot.addChild(comment); OMElement newElement = (new StAXOMBuilder(this.factory, doomRoot .getXMLStreamReader())).getDocumentElement(); newElement.build(); assertEquals(newElement.getText(), text); } } ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/llom/CharacterEncodingTest.javaaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/llom/CharacterEncodingTest.0000644000000000000000000001140411131637474032157 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.llom; import junit.framework.TestCase; import org.apache.axiom.om.OMAbstractFactory; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMOutputFormat; import org.apache.axiom.soap.SOAPEnvelope; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder; import javax.xml.stream.FactoryConfigurationError; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLStreamException; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; /** Test for serialization and deserialization using UTF-16 character encoding */ public class CharacterEncodingTest extends TestCase { public static final String UTF_16 = "utf-16"; public CharacterEncodingTest(String name) { super(name); } public void runTest(String value, String expected) throws XMLStreamException, FactoryConfigurationError, IOException { SOAPFactory factory = OMAbstractFactory.getSOAP12Factory(); SOAPEnvelope envelope = factory.getDefaultEnvelope(); String ns = "http://testuri.org"; OMNamespace namespace = factory.createOMNamespace(ns, "tst"); String ln = "Child"; OMElement bodyChild = factory.createOMElement(ln, namespace); bodyChild.addChild(factory.createOMText(value)); envelope.getBody().addChild(bodyChild); ByteArrayOutputStream byteOutStr = new ByteArrayOutputStream(); OMOutputFormat outputFormat = new OMOutputFormat(); outputFormat.setCharSetEncoding(UTF_16); envelope.serialize(byteOutStr, outputFormat); ByteArrayInputStream byteInStr = new ByteArrayInputStream(byteOutStr.toByteArray()); StAXSOAPModelBuilder builder = new StAXSOAPModelBuilder( XMLInputFactory.newInstance().createXMLStreamReader(byteInStr, UTF_16), null); SOAPEnvelope resultEnv = builder.getSOAPEnvelope(); OMElement bodyChildResult = resultEnv.getBody().getFirstElement(); assertNotNull("No child in body element", bodyChildResult); String result = bodyChildResult.getText(); assertNotNull("No value for testParam param", result); assertEquals("Expected result not received.", expected, result); } private void runtest(String value) throws Exception { runTest(value, value); } public void testSimpleString() throws Exception { runtest("a simple string"); } public void testStringWithApostrophes() throws Exception { runtest("this isn't a simple string"); } public void testStringWithEntities() throws Exception { runTest("&<>'"", "&<>'""); } public void testStringWithRawEntities() throws Exception { runTest("&<>'\"", "&<>'\""); } public void testStringWithLeadingAndTrailingSpaces() throws Exception { runtest(" centered "); } public void testWhitespace() throws Exception { runtest(" \n \t "); // note: \r fails } public void testFrenchAccents() throws Exception { runtest("\u00e0\u00e2\u00e4\u00e7\u00e8\u00e9\u00ea\u00eb\u00ee\u00ef\u00f4\u00f6\u00f9\u00fb\u00fc"); } public void testGermanUmlauts() throws Exception { runtest(" Some text \u00df with \u00fc special \u00f6 chars \u00e4."); } public void testWelcomeUnicode() throws Exception { // welcome in several languages runtest( "Chinese (trad.) : \u6b61\u8fce "); } public void testWelcomeUnicode2() throws Exception { // welcome in several languages runtest( "Greek : \u03ba\u03b1\u03bb\u03ce\u03c2 \u03bf\u03c1\u03af\u03c3\u03b1\u03c4\u03b5"); } public void testWelcomeUnicode3() throws Exception { // welcome in several languages runtest( "Japanese : \u3088\u3046\u3053\u305d"); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/llom/SOAPEnvelopeTest.java0000644000000000000000000000214011131637474031713 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.llom; import org.apache.axiom.om.impl.llom.factory.OMLinkedListImplementation; import org.apache.axiom.soap.SOAPEnvelopeTestBase; public class SOAPEnvelopeTest extends SOAPEnvelopeTestBase { public SOAPEnvelopeTest() { super(new OMLinkedListImplementation()); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/llom/SOAPFaultTest.java0000644000000000000000000000212411131637474031213 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.llom; import org.apache.axiom.om.impl.llom.factory.OMLinkedListImplementation; import org.apache.axiom.soap.SOAPFaultTestBase; public class SOAPFaultTest extends SOAPFaultTestBase { public SOAPFaultTest() { super(new OMLinkedListImplementation()); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/llom/OMHeaderTest.java0000644000000000000000000000547411131637474031114 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.llom; import org.apache.axiom.om.OMTestCase; import org.apache.axiom.om.impl.OMNamespaceImpl; import org.apache.axiom.soap.SOAPHeader; import org.apache.axiom.soap.SOAPHeaderBlock; import java.util.Iterator; public class OMHeaderTest extends OMTestCase { SOAPHeader soapHeader; public OMHeaderTest(String testName) { super(testName); } public static void main(String[] args) { } /* * @see TestCase#setUp() */ protected void setUp() throws Exception { super.setUp(); soapHeader = soapEnvelope.getHeader(); } public void testAddHeaderElement() { String newElementName = "MyHeaderElement"; SOAPHeaderBlock soapHeaderElement = soapHeader.addHeaderBlock( newElementName, new OMNamespaceImpl("http://opensource.lk", "lsf")); assertTrue( "Header Element added has different parent than it should have", soapHeaderElement.getParent() == soapHeader); assertTrue( "Header Element added has different localname than it was given", soapHeaderElement.getLocalName().equalsIgnoreCase( newElementName)); } public void testExamineHeaderElements() { } public void testExtractHeaderElements() { //TODO Implement extractHeaderBlocks(). } public void testExamineMustUnderstandHeaderElements() { //TODO Implement examineMustUnderstandHeaderBlocks(). } public void testExamineAllHeaderElements() { Iterator iterator = soapHeader.examineAllHeaderBlocks(); int headerElementCount = 0; while (iterator.hasNext()) { iterator.next(); headerElementCount++; } assertTrue( "Number of header elements in the header differs from expected value of 3", headerElementCount == 3); } public void testExtractAllHeaderElements() { //TODO Implement extractAllHeaderBlocks(). } } ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/llom/SOAPFaultSubCodeTest.javaaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/llom/SOAPFaultSubCodeTest.j0000644000000000000000000000216011131637474031770 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.llom; import org.apache.axiom.om.impl.llom.factory.OMLinkedListImplementation; import org.apache.axiom.soap.SOAPFaultSubCodeTestBase; public class SOAPFaultSubCodeTest extends SOAPFaultSubCodeTestBase { public SOAPFaultSubCodeTest() { super(new OMLinkedListImplementation()); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/llom/soap11/0000755000000000000000000000000011131637474027057 5ustar rootroot././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11SerializerTest.javaaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11Serialize0000644000000000000000000000400711131637474031557 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.llom.soap11; import org.apache.axiom.om.OMTestCase; import org.apache.axiom.soap.SOAPEnvelope; import org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder; import javax.xml.stream.XMLStreamException; public class SOAP11SerializerTest extends OMTestCase { public SOAP11SerializerTest(String testName) { super(testName); } protected StAXSOAPModelBuilder getOMBuilder(String fileName) throws Exception { return super.getOMBuilder(fileName); } protected void setUp() throws Exception { super.setUp(); soapEnvelope = (SOAPEnvelope) getOMBuilder("soap/soap11/soap11fault.xml") .getDocumentElement(); } /** * This will check whether we can call the serialize method two times, if the first calls makes * the object model. * * @throws Exception */ public void testSerialize() throws Exception { try { soapEnvelope.toString(); soapEnvelope.toStringWithConsume(); } catch (XMLStreamException e) { fail("This test should not fail as one must be able to serialize twice if the object model is built in the first time"); } } } ././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/llom/SOAPFaultRoleTest.javaaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/llom/SOAPFaultRoleTest.java0000644000000000000000000000214411131637474032037 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.llom; import org.apache.axiom.om.impl.llom.factory.OMLinkedListImplementation; import org.apache.axiom.soap.SOAPFaultRoleTestBase; public class SOAPFaultRoleTest extends SOAPFaultRoleTestBase { public SOAPFaultRoleTest() { super(new OMLinkedListImplementation()); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/llom/OMEnvelopeTest.java0000644000000000000000000000624211131637474031473 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.llom; import org.apache.axiom.om.OMAbstractFactory; import org.apache.axiom.om.OMTestCase; import org.apache.axiom.om.OMTestUtils; import org.apache.axiom.om.TestConstants; import org.apache.axiom.soap.SOAPBody; import org.apache.axiom.soap.SOAPEnvelope; import org.apache.axiom.soap.SOAPHeader; import org.apache.axiom.soap.SOAPProcessingException; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; public class OMEnvelopeTest extends OMTestCase { private static Log log = LogFactory.getLog(OMEnvelopeTest.class); public OMEnvelopeTest(String testName) { super(testName); } protected void setUp() throws Exception { super.setUp(); } public void testGetHeader1() { SOAPHeader header = soapEnvelope.getHeader(); assertTrue("Header information retrieved not correct", (header != null && header.getLocalName().equalsIgnoreCase("Header"))); } public void testGetBody1() { SOAPBody body = soapEnvelope.getBody(); assertTrue("Header information retrieved not correct", (body != null && body.getLocalName().equalsIgnoreCase("Body"))); } private SOAPEnvelope getSecondEnvelope() throws Exception { return (SOAPEnvelope) OMTestUtils.getOMBuilder( getTestResource(TestConstants.SAMPLE1)) .getDocumentElement(); } public void testGetHeader2() throws Exception { SOAPHeader header = getSecondEnvelope().getHeader(); assertTrue("Header information retrieved not correct", (header != null && header.getLocalName().equalsIgnoreCase("Header"))); } public void testGetBody2() throws Exception { SOAPBody body = getSecondEnvelope().getBody(); assertTrue("Header information retrieved not correct", (body != null && body.getLocalName().equalsIgnoreCase("Body"))); } public void testDefaultEnveleope() { SOAPEnvelope env = null; try { env = OMAbstractFactory.getSOAP11Factory().getDefaultEnvelope(); } catch (SOAPProcessingException e) { log.info(e.getMessage()); fail(e.getMessage()); } assertNotNull(env); assertNotNull("Body should not be null", env.getBody()); } } ././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/llom/SOAPFaultCodeTest.javaaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/llom/SOAPFaultCodeTest.java0000644000000000000000000000214411131637474032010 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.llom; import org.apache.axiom.om.impl.llom.factory.OMLinkedListImplementation; import org.apache.axiom.soap.SOAPFaultCodeTestBase; public class SOAPFaultCodeTest extends SOAPFaultCodeTestBase { public SOAPFaultCodeTest() { super(new OMLinkedListImplementation()); } } ././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/llom/OMHeaderBlockTest.javaaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/llom/OMHeaderBlockTest.java0000644000000000000000000000411111131637474032052 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.llom; import org.apache.axiom.om.OMTestCase; import org.apache.axiom.soap.SOAPHeader; import org.apache.axiom.soap.SOAPHeaderBlock; import java.util.Iterator; public class OMHeaderBlockTest extends OMTestCase { SOAPHeader soapHeader; SOAPHeaderBlock soapHeaderElement; public OMHeaderBlockTest(String testName) { super(testName); } protected void setUp() throws Exception { super.setUp(); soapHeader = soapEnvelope.getHeader(); Iterator headerElementIter = soapHeader.examineAllHeaderBlocks(); if (headerElementIter.hasNext()) { soapHeaderElement = (SOAPHeaderBlock) headerElementIter.next(); } } public void testSetAndGetActor() { String newActorURI = "http://newActor.org"; soapHeaderElement.setRole(newActorURI); assertTrue("Actor was not properly set", soapHeaderElement.getRole().equalsIgnoreCase(newActorURI)); } public void testSetAndGetMustUnderstand() { soapHeaderElement.setMustUnderstand(false); assertTrue("MustUnderstand was not properly set", !soapHeaderElement.getMustUnderstand()); } public void testGetMustUnderstand() { //TODO Implement getMustUnderstand(). } } ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/llom/CharacterEncoding2Test.javaaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/llom/CharacterEncoding2Test0000644000000000000000000000547511131637474032176 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.llom; import org.apache.axiom.soap.SOAPEnvelope; import org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder; import org.apache.axiom.om.OMOutputFormat; import org.custommonkey.xmlunit.XMLTestCase; import org.custommonkey.xmlunit.XMLUnit; import javax.xml.stream.XMLInputFactory; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.StringReader; import java.io.InputStreamReader; public class CharacterEncoding2Test extends XMLTestCase { String xml = "" + "" + "" + "" + "0" + "" + "C" + "lucia" + "177" + "Abricó Gimarães" + "" + "" + "" + "" + ""; public void testISO99591() throws Exception { ByteArrayInputStream byteInStr = new ByteArrayInputStream(xml.getBytes("iso-8859-1")); StAXSOAPModelBuilder builder = new StAXSOAPModelBuilder( XMLInputFactory.newInstance().createXMLStreamReader(byteInStr)); SOAPEnvelope envelope = builder.getSOAPEnvelope(); envelope.build(); assertEquals("iso-8859-1", envelope.getXMLStreamReader().getCharacterEncodingScheme()); ByteArrayOutputStream byteOutStr = new ByteArrayOutputStream(); OMOutputFormat outputFormat = new OMOutputFormat(); outputFormat.setCharSetEncoding("iso-8859-1"); envelope.serialize(byteOutStr, outputFormat); assertXMLEqual(new InputStreamReader(new ByteArrayInputStream(xml.getBytes("iso-8859-1")),"iso-8859-1"), new InputStreamReader(new ByteArrayInputStream(byteOutStr.toByteArray()),"iso-8859-1")); } } ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/llom/SOAPFaultDetailTest.javaaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/llom/SOAPFaultDetailTest.ja0000644000000000000000000000215411131637474032012 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.llom; import org.apache.axiom.om.impl.llom.factory.OMLinkedListImplementation; import org.apache.axiom.soap.SOAPFaultDetailTestBase; public class SOAPFaultDetailTest extends SOAPFaultDetailTestBase { public SOAPFaultDetailTest() { super(new OMLinkedListImplementation()); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/llom/SOAPBodyTest.java0000644000000000000000000000303311131637474031035 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.llom; import org.apache.axiom.om.OMException; import org.apache.axiom.om.impl.llom.factory.OMLinkedListImplementation; import org.apache.axiom.soap.SOAPBodyTestBase; public class SOAPBodyTest extends SOAPBodyTestBase { public SOAPBodyTest() { super(new OMLinkedListImplementation()); } public void testSOAPBodyDetachment() { try { soap11Body.detach(); fail("Detachment of SOAP Body is not allowed !!"); } catch (OMException e) { assertTrue(true); } try { soap12Body.detach(); fail("Detachment of SOAP Body is not allowed !!"); } catch (OMException e) { assertTrue(true); } } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/llom/SOAPDiscardTest.java0000644000000000000000000000213411131637474031512 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.llom; import org.apache.axiom.om.impl.llom.factory.OMLinkedListImplementation; import org.apache.axiom.soap.SOAPDiscardTestBase; public class SOAPDiscardTest extends SOAPDiscardTestBase { public SOAPDiscardTest() { super(new OMLinkedListImplementation()); } } ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/llom/SOAPHeaderBlockTest.javaaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/llom/SOAPHeaderBlockTest.ja0000644000000000000000000000215411131637474031757 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.llom; import org.apache.axiom.om.impl.llom.factory.OMLinkedListImplementation; import org.apache.axiom.soap.SOAPHeaderBlockTestBase; public class SOAPHeaderBlockTest extends SOAPHeaderBlockTestBase { public SOAPHeaderBlockTest() { super(new OMLinkedListImplementation()); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/llom/SOAPHeaderTest.java0000644000000000000000000000213011131637474031325 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap.impl.llom; import org.apache.axiom.om.impl.llom.factory.OMLinkedListImplementation; import org.apache.axiom.soap.SOAPHeaderTestBase; public class SOAPHeaderTest extends SOAPHeaderTestBase { public SOAPHeaderTest() { super(new OMLinkedListImplementation()); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPFaultTestBase.java0000644000000000000000000004345211131637474030113 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap; import org.apache.axiom.om.OMAbstractFactory; import org.apache.axiom.om.OMImplementation; public class SOAPFaultTestBase extends SOAPFaultTestCase { public SOAPFaultTestBase(OMImplementation omImplementation) { super(omImplementation); } //SOAP 1.1 Fault Test (Programaticaly created)----------------------------------------------------------------------------------- public void testSOAP11SetCode() { soap11Fault.setCode(soap11Factory.createSOAPFaultCode(soap11Fault)); assertNotNull( "SOAP 1.1 Fault Test:- After calling setCode method, Fault has no code", soap11Fault.getCode()); try { soap11Fault.setCode(soap12Factory.createSOAPFaultCode(soap12Fault)); fail("SOAP12FaultCode should not not be set in to a SOAP11Fault"); } catch (Exception e) { } } public void testSOAP11GetCode() { assertTrue( "SOAP 1.1 Fault Test:- After creating a SOAP11Fault, it has a code", soap11Fault.getCode() == null); soap11Fault.setCode(soap11Factory.createSOAPFaultCode(soap11Fault)); assertFalse( "SOAP 1.1 Fault Test:- After calling setCode method, Fault has no code", soap11Fault.getCode() == null); } public void testSOAP11SetReason() { soap11Fault.setReason(soap11Factory.createSOAPFaultReason(soap11Fault)); assertFalse( "SOAP 1.1 Fault Test:- After calling setReason method, Fault has no reason", soap11Fault.getReason() == null); try { soap11Fault.setReason( soap12Factory.createSOAPFaultReason(soap12Fault)); fail("SOAP12FaultReason should not be set in to a SOAP11Fault"); } catch (Exception e) { assertTrue(true); } } public void testSOAP11GetReason() { assertTrue( "SOAP 1.1 Fault Test:- After creating a SOAP11Fault, it has a reason", soap11Fault.getReason() == null); soap11Fault.setReason(soap11Factory.createSOAPFaultReason(soap11Fault)); assertFalse( "SOAP 1.1 Fault Test:- After calling setReason method, Fault has no reason", soap11Fault.getReason() == null); } public void testSOAP11SetNode() { try { soap11Fault.setNode(soap11Factory.createSOAPFaultNode(soap11Fault)); } catch (UnsupportedOperationException e) { // Exactly! return; } fail("Didn't get UnsupportedOperationException"); } public void testSOAP11GetNode() { // TODO: LLOM returns null while DOM throws UnsupportedOperationException try { assertTrue( "SOAP 1.1 Fault Test:- After creating a SOAP11Fault, it has a node", soap11Fault.getNode() == null); } catch (UnsupportedOperationException ex) { // This is also fine. } } public void testSOAP11SetRole() { soap11Fault.setRole(soap11Factory.createSOAPFaultRole(soap11Fault)); assertFalse( "SOAP 1.1 Fault Test:- After calling setRole method, Fault has no role", soap11Fault.getRole() == null); try { soap11Fault.setRole(soap12Factory.createSOAPFaultRole(soap12Fault)); fail("SOAP12FaultRole should not be set in to a SOAP11Fault"); } catch (Exception e) { assertTrue(true); } } public void testSOAP11GetRole() { assertTrue( "SOAP 1.1 Fault Test:- After creating a SOAP11Fault, it has a role", soap11Fault.getRole() == null); soap11Fault.setRole(soap11Factory.createSOAPFaultRole(soap11Fault)); assertFalse( "SOAP 1.1 Fault Test:- After calling setRole method, Fault has no role", soap11Fault.getRole() == null); } public void testSOAP11SetDetail() { soap11Fault.setDetail(soap11Factory.createSOAPFaultDetail(soap11Fault)); assertFalse( "SOAP 1.1 Fault Test:- After calling setDetail method, Fault has no detail", soap11Fault.getDetail() == null); try { soap11Fault.setDetail( soap12Factory.createSOAPFaultDetail(soap12Fault)); fail("SOAP12FaultDetail should not be set in to a SOAP11Fault"); } catch (Exception e) { assertTrue(true); } } public void testSOAP11GetDetail() { assertTrue( "SOAP 1.1 Fault Test:- After creating a SOAP11Fault, it has a detail", soap11Fault.getDetail() == null); soap11Fault.setDetail(soap11Factory.createSOAPFaultDetail(soap11Fault)); assertFalse( "SOAP 1.1 Fault Test:- After calling setDetail method, Fault has no detail", soap11Fault.getDetail() == null); } //SOAP 1.2 Fault Test ((Programaticaly created)-------------------------------------------------------------------------------- public void testSOAP12SetCode() { soap12Fault.setCode(soap12Factory.createSOAPFaultCode(soap12Fault)); assertFalse( "SOAP 1.2 Fault Test:- After calling setCode method, Fault has no code", soap12Fault.getCode() == null); assertTrue("SOAP 1.2 Fault Test:- Code local name mismatch", soap12Fault.getCode().getLocalName().equals( SOAP12Constants.SOAP_FAULT_CODE_LOCAL_NAME)); try { soap12Fault.setCode(soap11Factory.createSOAPFaultCode(soap11Fault)); fail("SOAP11FaultCode should not be set in to a SOAP12Fault"); } catch (Exception e) { assertTrue(true); } } public void testSOAP12GetCode() { assertTrue( "SOAP 1.2 Fault Test:- After creating a SOAP12Fault, it has a code", soap12Fault.getCode() == null); soap12Fault.setCode(soap12Factory.createSOAPFaultCode(soap12Fault)); assertFalse( "SOAP 1.2 Fault Test:- After calling setCode method, Fault has no code", soap12Fault.getCode() == null); assertTrue("SOAP 1.2 Fault Test:- Fault code local name mismatch", soap12Fault.getCode().getLocalName().equals( SOAP12Constants.SOAP_FAULT_CODE_LOCAL_NAME)); } public void testSOAP12SetReason() { soap12Fault.setReason(soap12Factory.createSOAPFaultReason(soap12Fault)); assertFalse( "SOAP 1.2 Fault Test:- After calling setReason method, Fault has no reason", soap12Fault.getReason() == null); assertTrue("SOAP 1.2 Fault Test:- Fault reason local name mismatch", soap12Fault.getReason().getLocalName().equals( SOAP12Constants.SOAP_FAULT_REASON_LOCAL_NAME)); try { soap12Fault.setReason( soap11Factory.createSOAPFaultReason(soap11Fault)); fail("SOAP11FaultReason should not be set in to a SOAP12Fault"); } catch (Exception e) { assertTrue(true); } } public void testSOAP12GetReason() { assertTrue( "SOAP 1.2 Fault Test:- After creating a SOAP12Fault, it has a reason", soap12Fault.getReason() == null); soap12Fault.setReason(soap12Factory.createSOAPFaultReason(soap12Fault)); assertFalse( "SOAP 1.2 Fault Test:- After calling setReason method, Fault has no reason", soap12Fault.getReason() == null); assertTrue("SOAP 1.2 Fault Test:- Fault reason local name mismatch", soap12Fault.getReason().getLocalName().equals( SOAP12Constants.SOAP_FAULT_REASON_LOCAL_NAME)); } public void testSOAP12SetNode() { soap12Fault.setNode(soap12Factory.createSOAPFaultNode(soap12Fault)); assertFalse( "SOAP 1.2 Fault Test:- After calling setNode method, Fault has no node", soap12Fault.getNode() == null); assertTrue("SOAP 1.2 Fault Test:- Fault node local name mismatch", soap12Fault.getNode().getLocalName().equals( SOAP12Constants.SOAP_FAULT_NODE_LOCAL_NAME)); try { soap12Fault.setNode(soap11Factory.createSOAPFaultNode(soap11Fault)); fail("SOAP11FaultNode should nott be set in to a SOAP12Fault"); } catch (Exception e) { assertTrue(true); } } public void testSOAP12GetNode() { assertTrue( "SOAP 1.2 Fault Test:- After creating a SOAP12Fault, it has a node", soap12Fault.getNode() == null); soap12Fault.setNode(soap12Factory.createSOAPFaultNode(soap12Fault)); assertFalse( "SOAP 1.2 Fault Test:- After calling setNode method, Fault has no node", soap12Fault.getNode() == null); assertTrue("SOAP 1.2 Fault Test:- Fault node local name mismatch", soap12Fault.getNode().getLocalName().equals( SOAP12Constants.SOAP_FAULT_NODE_LOCAL_NAME)); } public void testSOAP12SetRole() { soap12Fault.setRole(soap12Factory.createSOAPFaultRole(soap12Fault)); assertFalse( "SOAP 1.2 :- After calling setRole method, Fault has no role", soap12Fault.getRole() == null); assertTrue("SOAP 1.2 Fault Test:- Fault role local name mismatch", soap12Fault.getRole().getLocalName().equals( SOAP12Constants.SOAP_FAULT_ROLE_LOCAL_NAME)); try { soap12Fault.setRole(soap11Factory.createSOAPFaultRole(soap11Fault)); fail("SOAP11FaultRole should not be set in to a SOAP12Fault"); } catch (Exception e) { assertTrue(true); } } public void testSOAP12GetRole() { assertTrue( "SOAP 1.2 Fault Test:- After creating a SOAP11Fault, it has a role", soap12Fault.getRole() == null); soap12Fault.setRole(soap12Factory.createSOAPFaultRole(soap12Fault)); assertFalse( "SOAP 1.2 Fault Test:- After calling setRole method, Fault has no role", soap12Fault.getRole() == null); assertTrue("SOAP 1.2 Fault Test:- Fault role local name mismatch", soap12Fault.getRole().getLocalName().equals( SOAP12Constants.SOAP_FAULT_ROLE_LOCAL_NAME)); } public void testSOAP12SetDetail() { soap12Fault.setDetail(soap12Factory.createSOAPFaultDetail(soap12Fault)); assertFalse( "SOAP 1.2 Fault Test:- After calling setDetaile method, Fault has no detail", soap12Fault.getDetail() == null); assertTrue("SOAP 1.2 Fault Test:- Fault detail local name mismatch", soap12Fault.getDetail().getLocalName().equals( SOAP12Constants.SOAP_FAULT_DETAIL_LOCAL_NAME)); try { soap12Fault.setDetail( soap11Factory.createSOAPFaultDetail(soap11Fault)); fail("SOAP11FaultDetail should not be set in to a SOAP12Fault"); } catch (Exception e) { assertTrue(true); } } public void testSOAP12GetDetail() { assertTrue( "SOAP 1.2 Fault Test:- After creating a SOAP12Fault, it has a detail", soap12Fault.getDetail() == null); soap12Fault.setDetail(soap12Factory.createSOAPFaultDetail(soap12Fault)); assertFalse( "SOAP 1.2 Fault Test:- After calling setDetail method, Fault has no detail", soap12Fault.getDetail() == null); assertTrue("SOAP 1.2 Fault Test:- Fault detail local name mismatch", soap12Fault.getDetail().getLocalName().equals( SOAP12Constants.SOAP_FAULT_DETAIL_LOCAL_NAME)); } //SOAP 1.1 Fault Test (With parser) public void testSOAP11GetCodeWithParser() { assertFalse( "SOAP 1.1 Fault Test with parser: - getCode method returns null", soap11FaultWithParser.getCode() == null); } public void testSOAP11GetRoleWithParser() { assertFalse( "SOAP 1.1 Fault Test with parser: - getRole method returns null", soap11FaultWithParser.getRole() == null); } public void testSOAP11GetDetailWithParser() { assertNotNull( "SOAP 1.1 Fault Test with parser: - getDetail method returns null", soap11FaultWithParser.getDetail()); } //SOAP 1.2 Fault Test (With parser) public void testSOAP12GetCodeWithParser() { assertNotNull( "SOAP 1.2 Fault Test with parser: - getCode method returns null", soap12FaultWithParser.getCode()); assertTrue( "SOAP 1.2 Fault Test with parser: - Fault code local name mismatch", soap12FaultWithParser.getCode().getLocalName().equals( SOAP12Constants.SOAP_FAULT_CODE_LOCAL_NAME)); } public void testSOAP12GetReasonWithParser() { assertFalse( "SOAP 1.2 Fault Test with parser: - getReason method returns null", soap12FaultWithParser.getReason() == null); assertTrue( "SOAP 1.2 Fault Test with parser: - Fault reason local name mismatch", soap12FaultWithParser.getReason().getLocalName().equals( SOAP12Constants.SOAP_FAULT_REASON_LOCAL_NAME)); } public void testSOAP12GetNodeWithParser() { assertFalse( "SOAP 1.2 Fault Test with parser: - getNode method returns null", soap12FaultWithParser.getNode() == null); assertTrue( "SOAP 1.2 Fault Test with parser: - Fault node local name mismatch", soap12FaultWithParser.getNode().getLocalName().equals( SOAP12Constants.SOAP_FAULT_NODE_LOCAL_NAME)); } public void testSOAP12GetRoleWithParser() { assertFalse( "SOAP 1.2 Fault Test with parser: - getRole method returns null", soap12FaultWithParser.getRole() == null); assertTrue( "SOAP 1.2 Fault Test with parser: - Fault role local name mismatch", soap12FaultWithParser.getRole().getLocalName().equals( SOAP12Constants.SOAP_FAULT_ROLE_LOCAL_NAME)); } public void testSOAP12GetDetailWithParser() { assertFalse( "SOAP 1.2 Fault Test with parser: - getDetail method returns null", soap12FaultWithParser.getDetail() == null); assertTrue( "SOAP 1.2 Fault Test with parser: - Fault detail local name mismatch", soap12FaultWithParser.getDetail().getLocalName().equals( SOAP12Constants.SOAP_FAULT_DETAIL_LOCAL_NAME)); } public void testMoreChildrenAddition() { try { SOAPFactory soapFactory = OMAbstractFactory.getSOAP12Factory(); SOAPEnvelope envelope = soapFactory.getDefaultFaultEnvelope(); assertNotNull("Default FaultEnvelope must have a SOAPFault in it", envelope.getBody().getFault()); assertNotNull( "Default FaultEnvelope must have a SOAPFaultCode in it", envelope.getBody().getFault().getCode()); assertNotNull( "Default FaultEnvelope must have a SOAPFaultCodeValue in it", envelope.getBody().getFault().getCode().getValue()); assertNotNull( "Default FaultEnvelope must have a SOAPFaultReason in it", envelope.getBody().getFault().getReason()); assertNotNull( "Default FaultEnvelope must have a SOAPFaultText in it", envelope.getBody().getFault().getReason().getFirstSOAPText()); SOAPEnvelope soapEnvelope = soapFactory.getDefaultFaultEnvelope(); String errorCodeString = "Some Error occurred !!"; soapEnvelope.getBody().getFault().getCode().getValue().setText( errorCodeString); SOAPFaultCode code = soapEnvelope.getBody().getFault().getCode(); envelope.getBody().getFault().setCode(code); assertTrue("Parent Value of Code has not been set to new fault", code.getParent() == envelope.getBody().getFault()); assertTrue("Parent Value of Code is still pointing to old fault", code.getParent() != soapEnvelope.getBody().getFault()); assertNull("Old fault must not have a fault code", soapEnvelope.getBody().getFault().getCode()); assertEquals("The SOAP Code value must be " + errorCodeString, errorCodeString, envelope.getBody().getFault().getCode().getValue().getText()); } catch (Exception e) { fail(e.getMessage()); } } }axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPFaultReasonTestBase.java0000644000000000000000000000671311131637474031262 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap; import org.apache.axiom.om.OMImplementation; public class SOAPFaultReasonTestBase extends SOAPFaultReasonTestCase { public SOAPFaultReasonTestBase(OMImplementation omImplementation) { super(omImplementation); } //SOAP 1.1 Fault Reason Test (Programaticaly Created) public void testSOAP11SOAPTextAPIs() { boolean gotFault = false; try { soap11FaultReason.addSOAPText(soap11Factory.createSOAPFaultText(soap11FaultReason)); } catch (UnsupportedOperationException e) { // Cool, continue. gotFault = true; } assertTrue("Didn't get expected Exception for addSOAPText()!", gotFault); try { soap11FaultReason.getFirstSOAPText(); } catch (UnsupportedOperationException e) { // Cool, continue. return; } fail("Didn't get expected Exception for getFirstSOAPText()!"); } //SOAP 1.2 Fault Reason Test (Programaticaly Created) public void testSOAP12SetSOAPText() { soap12FaultReason.addSOAPText( soap12Factory.createSOAPFaultText(soap12FaultReason)); assertFalse( "SOAP 1.2 FaultReason Test : - After calling addSOAPText, getFirstSOAPText returns null", soap12FaultReason.getFirstSOAPText() == null); try { soap12FaultReason.addSOAPText( soap11Factory.createSOAPFaultText(soap11FaultReason)); fail("SOAP11FaultText should not be added to SOAP12FaultReason"); } catch (Exception e) { assertTrue(true); } } public void testSOAP12GetSOAPText() { assertTrue( "SOAP 1.2 FaultReason Test : - After creating SOAP12FaultReason, it has a SOAPFaultText", soap12FaultReason.getFirstSOAPText() == null); soap12FaultReason.addSOAPText( soap12Factory.createSOAPFaultText(soap12FaultReason)); assertFalse( "SOAP 1.2 FaultReason Test : - After calling addSOAPText, getFirstSOAPText returns null", soap12FaultReason.getFirstSOAPText() == null); } //SOAP 1.2 Fault Reason Test (With Parser) public void testSOAP12GetSOAPTextWithParser() { assertFalse( "SOAP 1.2 FaultReason Test With Parser : - getFirstSOAPText method returns null", soap12FaultReasonWithParser.getFirstSOAPText() == null); } // public void testMultipleSOAPReasonTexts() { // SOAPFactory soapFactory = OMAbstractFactory.getSOAP11Factory(); // // SOAPFaultReason soapFaultReason = soapFactory.createSOAPFaultReason(); //// soap // } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPTestCase.java0000644000000000000000000000516411131637474027116 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap; import org.apache.axiom.om.AbstractTestCase; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMImplementation; import org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLStreamReader; public abstract class SOAPTestCase extends AbstractTestCase { protected SOAPFactory soap11Factory; protected SOAPFactory soap12Factory; protected OMFactory omFactory; protected SOAPEnvelope soap11Envelope; protected SOAPEnvelope soap12Envelope; protected SOAPEnvelope soap11EnvelopeWithParser; protected SOAPEnvelope soap12EnvelopeWithParser; protected static final String SOAP11_FILE_NAME = "soap/soap11/soap11message.xml"; protected static final String SOAP12_FILE_NAME = "soap/soap12message.xml"; public SOAPTestCase(OMImplementation omImplementation) { soap11Factory = omImplementation.getSOAP11Factory(); soap12Factory = omImplementation.getSOAP12Factory(); omFactory = omImplementation.getOMFactory(); } protected void setUp() throws Exception { super.setUp(); soap11Envelope = soap11Factory.createSOAPEnvelope(); soap12Envelope = soap12Factory.createSOAPEnvelope(); soap11EnvelopeWithParser = (SOAPEnvelope) this.getSOAPBuilder(SOAP11_FILE_NAME) .getDocumentElement(); soap12EnvelopeWithParser = (SOAPEnvelope) this.getSOAPBuilder(SOAP12_FILE_NAME) .getDocumentElement(); } protected StAXSOAPModelBuilder getSOAPBuilder(String fileName) throws Exception { XMLStreamReader parser = XMLInputFactory.newInstance().createXMLStreamReader( getTestResource(fileName)); return new StAXSOAPModelBuilder(parser, null); } } ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/WrongEnvelopeNamespaceTester.javaaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/soap/WrongEnvelopeNamespaceTester.jav0000644000000000000000000000405511131637474032353 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.soap; import junit.framework.TestCase; import org.apache.axiom.om.impl.builder.StAXBuilder; import org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLStreamReader; import java.io.FileInputStream; import java.io.FileNotFoundException; public class WrongEnvelopeNamespaceTester extends TestCase { public void testCode() { try { String filename = "test-resources/soap/wrongEnvelopeNamespace.xml"; XMLStreamReader xmlr = XMLInputFactory.newInstance() .createXMLStreamReader(new FileInputStream(filename)); StAXBuilder builder = new StAXSOAPModelBuilder(xmlr, null); //exception here fail("Builder must fail here due to wrong SOAP namespace"); } catch (SOAPProcessingException e) { assertTrue(true); } catch (FileNotFoundException e) { fail("Only SOAPProcessingException can be thrown here"); } catch (Exception e) { fail("Only SOAPProcessingException can be thrown here"); } } public static void main(String[] args) { WrongEnvelopeNamespaceTester tester = new WrongEnvelopeNamespaceTester(); tester.testCode(); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/0000755000000000000000000000000011131637476023522 5ustar rootrootaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/OMDiscardTest.java0000644000000000000000000000400511131637476027031 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om; import org.apache.axiom.om.impl.builder.StAXOMBuilder; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import javax.xml.stream.XMLInputFactory; import java.io.FileNotFoundException; /** *Test the discard method */ public class OMDiscardTest extends AbstractTestCase { public OMDiscardTest(String testName) { super(testName); } public void testDiscard(){ OMElement documentElement = null; try { // first build the OM tree without caching and see whether we can discard // an element from it StAXOMBuilder builder = new StAXOMBuilder(getXMLStreamReader()); documentElement = builder.getDocumentElement(); documentElement.getFirstElement().discard(); String envelopeString = documentElement.toStringWithConsume(); } catch (Exception e) { fail("discarding an element should work!"); } } private XMLStreamReader getXMLStreamReader() throws XMLStreamException, FileNotFoundException { return XMLInputFactory.newInstance(). createXMLStreamReader(getTestResource(TestConstants.SOAP_SOAPMESSAGE)); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/OMNavigatorTest.java0000644000000000000000000000665511131637476027427 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om; import org.apache.axiom.om.impl.llom.OMNavigator; import org.apache.axiom.soap.SOAPEnvelope; import org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLOutputFactory; import javax.xml.stream.XMLStreamReader; import javax.xml.stream.XMLStreamWriter; import java.io.File; import java.io.FileOutputStream; public class OMNavigatorTest extends AbstractTestCase { private SOAPEnvelope envelope = null; private OMXMLParserWrapper builder; private File tempFile; private XMLStreamWriter output; public OMNavigatorTest(String testName) { super(testName); } protected void setUp() throws Exception { XMLStreamReader xmlStreamReader = XMLInputFactory.newInstance(). createXMLStreamReader(getTestResource(TestConstants.SOAP_SOAPMESSAGE1)); builder = new StAXSOAPModelBuilder(xmlStreamReader, null); envelope = (SOAPEnvelope) builder.getDocumentElement(); tempFile = File.createTempFile("temp", "xml"); output = XMLOutputFactory.newInstance().createXMLStreamWriter( new FileOutputStream(tempFile), OMConstants.DEFAULT_CHAR_SET_ENCODING); } public void testnavigatorFullyBuilt() throws Exception { assertNotNull(envelope); //dump the out put to a temporary file envelope.serialize(output); //now the OM is fully created -> test the navigation OMNavigator navigator = new OMNavigator(envelope); OMNode node = null; while (navigator.isNavigable()) { node = navigator.next(); assertNotNull(node); } } public void testnavigatorHalfBuilt() { assertNotNull(envelope); //now the OM is not fully created. Try to navigate it OMNavigator navigator = new OMNavigator(envelope); OMNode node = null; while (navigator.isNavigable()) { node = navigator.next(); assertNotNull(node); } } public void testnavigatorHalfBuiltStep() { assertNotNull(envelope); //now the OM is not fully created OMNavigator navigator = new OMNavigator(envelope); OMNode node = null; while (!navigator.isCompleted()) { if (navigator.isNavigable()) { node = navigator.next(); } else { builder.next(); navigator.step(); node = navigator.next(); } assertNotNull(node); } } protected void tearDown() throws Exception { tempFile.delete(); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/DefaultNSHandlingTest.java0000644000000000000000000002212311131637476030517 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om; import org.apache.axiom.om.impl.builder.StAXOMBuilder; import org.apache.axiom.om.xpath.AXIOMXPath; import org.custommonkey.xmlunit.XMLTestCase; import org.jaxen.JaxenException; import org.jaxen.SimpleNamespaceContext; import org.jaxen.XPath; import javax.xml.namespace.QName; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLOutputFactory; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import javax.xml.stream.XMLStreamWriter; import java.io.ByteArrayInputStream; import java.util.Iterator; public class DefaultNSHandlingTest extends XMLTestCase { public void testDefaultNamespaceWithSameDefaultNSForAll() { String testXML = "" + "Frobnostication" + "

Moved to here.

" + ""; try { StAXOMBuilder stAXOMBuilder = new StAXOMBuilder(new ByteArrayInputStream(testXML.getBytes())); OMElement documentElement = stAXOMBuilder.getDocumentElement(); checkNS(documentElement); checkNSWithChildren(documentElement); } catch (XMLStreamException e) { e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates. } } private void checkNSWithChildren(OMElement documentElement) { Iterator childElementsIter = documentElement.getChildElements(); while (childElementsIter.hasNext()) { OMElement omElement = (OMElement) childElementsIter.next(); checkNS(omElement); checkNSWithChildren(omElement); } } private void checkNS(OMElement element) { assertTrue( "http://www.w3.org/TR/REC-html40".equals(element.getNamespace().getNamespaceURI())); } public void testMultipleDefaultNS() { OMFactory omFactory = OMAbstractFactory.getOMFactory(); OMNamespace defaultNS1 = omFactory.createOMNamespace("http://defaultNS1.org", null); OMNamespace defaultNS2 = omFactory.createOMNamespace("http://defaultNS2.org", null); OMElement omElementOne = omFactory.createOMElement("DocumentElement", null); omElementOne.declareDefaultNamespace("http://defaultNS1.org"); OMElement omElementOneChild = omFactory.createOMElement("ChildOne", null, omElementOne); OMElement omElementTwo = omFactory.createOMElement("Foo", defaultNS2, omElementOne); omElementTwo.declareDefaultNamespace("http://defaultNS2.org"); OMElement omElementTwoChild = omFactory.createOMElement("ChildOne", null, omElementTwo); OMElement omElementThree = omFactory.createOMElement("Bar", defaultNS1, omElementTwo); omElementThree.declareDefaultNamespace("http://defaultNS1.org"); assertTrue("".equals(omElementOneChild.getNamespace().getNamespaceURI())); assertTrue("".equals(omElementTwoChild.getNamespace().getNamespaceURI())); } public void testChildReDeclaringParentsDefaultNSWithPrefix() { try { OMFactory fac = OMAbstractFactory.getOMFactory(); OMElement elem = fac.createOMElement("RequestSecurityToken", null); elem.declareDefaultNamespace("http://schemas.xmlsoap.org/ws/2005/02/trust"); fac.createOMElement(new QName("TokenType"), elem).setText("test"); fac.createOMElement(new QName("RequestType"), elem).setText("test1"); fac.createOMElement( new QName("http://schemas.xmlsoap.org/ws/2005/02/trust", "Entropy", "wst"), elem); String xml = elem.toString(); XMLStreamReader reader = XMLInputFactory.newInstance() .createXMLStreamReader(new ByteArrayInputStream(xml.getBytes())); StAXOMBuilder builder = new StAXOMBuilder(reader); builder.getDocumentElement().build(); // The StAX implementation may or may not have a trailing blank in the tag String assertText1 = ""; String assertText2 = ""; String assertText3 = ""; assertTrue((xml.indexOf(assertText1) != -1) || (xml.indexOf(assertText2) != -1) || (xml.indexOf(assertText3) != -1)); } catch (Exception e) { fail(e.getMessage()); } } public void testChildReDeclaringGrandParentsDefaultNSWithPrefix() { try { OMFactory fac = OMAbstractFactory.getOMFactory(); OMElement elem = fac.createOMElement("RequestSecurityToken", null); elem.declareDefaultNamespace("http://schemas.xmlsoap.org/ws/2005/02/trust"); fac.createOMElement(new QName("TokenType"), elem).setText("test"); fac.createOMElement(new QName("RequestType"), elem).setText("test1"); OMElement entElem = fac.createOMElement( new QName("http://schemas.xmlsoap.org/ws/2005/02/trust", "Entropy", "wst"), elem); OMElement binSecElem = fac.createOMElement( new QName("http://schemas.xmlsoap.org/ws/2005/02/trust", "Binarysecret", "wst"), entElem); binSecElem.setText("secret value"); String xml = elem.toString(); assertTrue("Binarysecret element should have \'wst\' ns prefix", xml.indexOf("Payload One"; String payload2 = "Payload Two"; public OMSourcedElementTest(String testName) { super(testName); ombuilderFactory = OMAbstractFactory.getOMFactory(); soapFactory = OMAbstractFactory.getSOAP11Factory(); } /* * @see TestCase#setUp() */ protected void setUp() throws Exception { super.setUp(); soapEnvelope = soapFactory.createSOAPEnvelope(); SOAPBody soapBody = soapFactory.createSOAPBody(soapEnvelope); SOAPHeader soapHeader = soapFactory.createSOAPHeader(soapEnvelope); bads1 = new ByteArrayDataSource(payload1.getBytes(ENCODING), ENCODING); bads2 = new ByteArrayDataSource(payload2.getBytes(ENCODING), ENCODING); ByteArrayInputStream bais1 = new ByteArrayInputStream(payload1.getBytes(ENCODING)); ByteArrayInputStream bais2 = new ByteArrayInputStream(payload2.getBytes(ENCODING)); isds1 = new InputStreamDataSource(bais1, ENCODING); isds2 = new InputStreamDataSource(bais2, ENCODING); cads = new CharArrayDataSource(payload1.toCharArray()); ns = soapFactory.createOMNamespace("urn://test", "tns"); } /** * Validates creation and insertion of OMSourcedElement * @throws Exception */ public void testFactory() throws Exception { SOAPBody soapBody = soapEnvelope.getBody(); OMFactory factory = soapBody.getOMFactory(); OMSourcedElement omse = factory.createOMElement(bads1, localName, ns); soapBody.addChild(omse); OMNode firstChild = soapBody.getFirstOMChild(); assertTrue("Expected OMSourcedElement child", firstChild instanceof OMSourcedElement); } /** * Tests functionality of ByteArrayDataSource * @throws Exception */ public void testByteArrayDS() throws Exception { SOAPBody soapBody = soapEnvelope.getBody(); OMFactory factory = soapBody.getOMFactory(); OMSourcedElement omse = factory.createOMElement(bads1, localName, ns); soapBody.addChild(omse); OMNode firstChild = soapBody.getFirstOMChild(); assertTrue("Expected OMSourcedElement child", firstChild instanceof OMSourcedElement); OMSourcedElement child = (OMSourcedElement) firstChild; assertTrue("OMSourcedElement is expanded. This is unexpected", !child.isExpanded()); assertTrue("OMSourcedElement should be backed by a ByteArrayDataSource", child.getDataSource() instanceof ByteArrayDataSource); // A ByteArrayDataSource does not consume the backing object when read. // Thus getting the XMLStreamReader of the ByteArrayDataSource should not // cause expansion of the OMSourcedElement. XMLStreamReader reader = child.getXMLStreamReader(); reader.next(); assertTrue("OMSourcedElement is expanded. This is unexpected", !child.isExpanded()); // Likewise, a ByteArrayDataSource does not consume the backing object when // written. Thus serializing the OMSourcedElement should not cause the expansion // of the OMSourcedElement. ByteArrayOutputStream baos = new ByteArrayOutputStream(); soapBody.serialize(baos); String output = baos.toString(ENCODING); System.out.println(output); assertTrue("The payload was not present in the output", output.indexOf(payload1) > 0); assertTrue("OMSourcedElement is expanded. This is unexpected", !child.isExpanded()); // If a consumer calls build or buildWithAttachments on the tree, the // tree should not be expanded. soapBody.build(); assertTrue("OMSourcedElement is expanded after build(). This is unexpected", !child.isExpanded()); soapBody.buildWithAttachments(); assertTrue("OMSourcedElement is expanded after buildWithAttachments(). This is unexpected", !child.isExpanded()); // Test getting the raw bytes from the ByteArrayDataSource. OMDataSourceExt ds = (OMDataSourceExt) child.getDataSource(); byte[] bytes = ds.getXMLBytes("UTF-16"); // Get the bytes as UTF-16 String payload = new String(bytes, "utf-16"); assertTrue("The obtained bytes did not match the payload", payload1.equals(payload)); } /** * Tests functionality of ByteArrayDataSource * @throws Exception */ public void testHeader_ByteArrayDS() throws Exception { SOAPHeader soapHeader = soapEnvelope.getHeader(); OMFactory factory = soapHeader.getOMFactory(); // Set an empty MustUnderstand property on the data source bads1.setProperty(SOAPHeaderBlock.MUST_UNDERSTAND_PROPERTY, null); OMSourcedElement omse = ((SOAPFactory)factory).createSOAPHeaderBlock(localName, ns, bads1); soapHeader.addChild(omse); OMNode firstChild = soapHeader.getFirstOMChild(); assertTrue("Expected OMSourcedElement child", firstChild instanceof SOAPHeaderBlock); SOAPHeaderBlock child = (SOAPHeaderBlock) firstChild; assertTrue("OMSourcedElement is expanded. This is unexpected", !child.isExpanded()); assertTrue("OMSourcedElement should be backed by a ByteArrayDataSource", child.getDataSource() instanceof ByteArrayDataSource); // Make sure that getting the MustUnderstand property does not cause expansion. assertTrue(!child.getMustUnderstand()); assertTrue("OMSourcedElement is expanded. This is unexpected", !child.isExpanded()); assertTrue("OMSourcedElement should be backed by a ByteArrayDataSource", child.getDataSource() instanceof ByteArrayDataSource); // A ByteArrayDataSource does not consume the backing object when read. // Thus getting the XMLStreamReader of the ByteArrayDataSource should not // cause expansion of the OMSourcedElement. XMLStreamReader reader = child.getXMLStreamReader(); reader.next(); assertTrue("OMSourcedElement is expanded. This is unexpected", !child.isExpanded()); // Likewise, a ByteArrayDataSource does not consume the backing object when // written. Thus serializing the OMSourcedElement should not cause the expansion // of the OMSourcedElement. ByteArrayOutputStream baos = new ByteArrayOutputStream(); soapHeader.serialize(baos); String output = baos.toString(ENCODING); System.out.println(output); assertTrue("The payload was not present in the output", output.indexOf(payload1) > 0); assertTrue("OMSourcedElement is expanded. This is unexpected", !child.isExpanded()); // Test getting the raw bytes from the ByteArrayDataSource. OMDataSourceExt ds = (OMDataSourceExt) child.getDataSource(); byte[] bytes = ds.getXMLBytes("UTF-16"); // Get the bytes as UTF-16 String payload = new String(bytes, "utf-16"); assertTrue("The obtained bytes did not match the payload", payload1.equals(payload)); } /** * Tests functionality of ByteArrayDataSource * @throws Exception */ public void testCharArrayDS() throws Exception { SOAPBody soapBody = soapEnvelope.getBody(); OMFactory factory = soapBody.getOMFactory(); OMSourcedElement omse = factory.createOMElement(cads, localName, ns); soapBody.addChild(omse); OMNode firstChild = soapBody.getFirstOMChild(); assertTrue("Expected OMSourcedElement child", firstChild instanceof OMSourcedElement); OMSourcedElement child = (OMSourcedElement) firstChild; assertTrue("OMSourcedElement is expanded. This is unexpected", !child.isExpanded()); assertTrue("OMSourcedElement should be backed by a ByteArrayDataSource", child.getDataSource() instanceof CharArrayDataSource); // A CharArrayDataSource does not consume the backing object when read. // Thus getting the XMLStreamReader of the CharArrayDataSource should not // cause expansion of the OMSourcedElement. XMLStreamReader reader = child.getXMLStreamReader(); reader.next(); assertTrue("OMSourcedElement is expanded. This is unexpected", !child.isExpanded()); // Likewise, a CharArrayDataSource does not consume the backing object when // written. Thus serializing the OMSourcedElement should not cause the expansion // of the OMSourcedElement. ByteArrayOutputStream baos = new ByteArrayOutputStream(); soapBody.serialize(baos); String output = baos.toString(ENCODING); System.out.println(output); assertTrue("The payload was not present in the output", output.indexOf(payload1) > 0); assertTrue("OMSourcedElement is expanded. This is unexpected", !child.isExpanded()); // Test getting the raw bytes from the ByteArrayDataSource. OMDataSourceExt ds = (OMDataSourceExt) child.getDataSource(); char[] chars = (char[]) ds.getObject(); // Get the chars String payload = new String(chars); assertTrue("The obtained chars did not match the payload", payload1.equals(payload)); // Validate close ds.close(); assertTrue("Close should free the resource", ds.getObject() == null); } /** * Tests functionality of InputStreamDataSource * @throws Exception */ public void testInputStreamDS() throws Exception { SOAPBody soapBody = soapEnvelope.getBody(); OMFactory factory = soapBody.getOMFactory(); OMSourcedElement omse = factory.createOMElement(isds1, localName, ns); soapBody.addChild(omse); OMNode firstChild = soapBody.getFirstOMChild(); assertTrue("Expected OMSourcedElement child", firstChild instanceof OMSourcedElement); OMSourcedElement child = (OMSourcedElement) firstChild; assertTrue("OMSourcedElement is expanded. This is unexpected", !child.isExpanded()); assertTrue("OMSourcedElement should be backed by a InputStreamDataSource", child.getDataSource() instanceof InputStreamDataSource); // A InputStreamDataSource consumes the backing object when read. // Thus getting the XMLStreamReader of the ByteArrayDataSource should // cause expansion of the OMSourcedElement. XMLStreamReader reader = child.getXMLStreamReader(); reader.next(); assertTrue("OMSourcedElement is not expanded. This is unexpected", child.isExpanded()); child.detach(); // Reset the tree isds1 = new InputStreamDataSource( new ByteArrayInputStream(payload1.getBytes(ENCODING)), ENCODING); omse = factory.createOMElement(isds1, localName, ns); soapBody.addChild(omse); firstChild = soapBody.getFirstOMChild(); child = (OMSourcedElement) firstChild; // Likewise, an InputStreamDataSource consumes the backing object when // written. Thus serializing the OMSourcedElement should cause the expansion // of the OMSourcedElement. ByteArrayOutputStream baos = new ByteArrayOutputStream(); soapBody.serialize(baos); String output = baos.toString(ENCODING); assertTrue("The payload was not present in the output", output.indexOf(payload1) > 0); assertTrue("OMSourcedElement is not expanded. This is unexpected", child.isExpanded()); // Reset the tree child.detach(); isds1 = new InputStreamDataSource( new ByteArrayInputStream(payload1.getBytes(ENCODING)), ENCODING); omse = factory.createOMElement(isds1, localName, ns); soapBody.addChild(omse); firstChild = soapBody.getFirstOMChild(); child = (OMSourcedElement) firstChild; // Test getting the raw bytes from the ByteArrayDataSource. OMDataSourceExt ds = (OMDataSourceExt) child.getDataSource(); byte[] bytes = ds.getXMLBytes(ENCODING); // Get the bytes as UTF-16 String payload = new String(bytes, ENCODING); assertTrue("The obtained bytes did not match the payload", payload1.equals(payload)); } /** * Verifies that a OMDataSource can be replaced with another one * @throws Exception */ public void testOMSEReplacement() throws Exception { SOAPBody soapBody = soapEnvelope.getBody(); OMFactory factory = soapBody.getOMFactory(); OMSourcedElement omse = factory.createOMElement(bads1, localName, ns); soapBody.addChild(omse); OMNode firstChild = soapBody.getFirstOMChild(); assertTrue("Expected OMSourcedElement child", firstChild instanceof OMSourcedElement); OMSourcedElement child = (OMSourcedElement) firstChild; assertTrue("OMSourcedElement is expanded. This is unexpected", !child.isExpanded()); assertTrue("OMSourcedElement should be backed by a ByteArrayDataSource", child.getDataSource() instanceof ByteArrayDataSource); // Write out the body ByteArrayOutputStream baos = new ByteArrayOutputStream(); soapBody.serialize(baos); String output = baos.toString(ENCODING); System.out.println(output); assertTrue("The payload was not present in the output", output.indexOf(payload1) > 0); assertTrue("OMSourcedElement is expanded. This is unexpected", !child.isExpanded()); // Replace with payload2. // Important note, it is legal to replace the OMDataSource, but // the namespace and local name of the OMSourcedElement cannot be changed. child.setDataSource(bads2); // Write out the body baos = new ByteArrayOutputStream(); soapBody.serialize(baos); output = baos.toString(ENCODING); System.out.println(output); assertTrue("The payload was not present in the output", output.indexOf(payload2) > 0); assertTrue("OMSourcedElement is expanded. This is unexpected", !child.isExpanded()); // Now Replace with payload1 from an InputStreamDataSource child.setDataSource(isds1); baos = new ByteArrayOutputStream(); soapBody.serialize(baos); output = baos.toString(ENCODING); System.out.println(output); assertTrue("The payload was not present in the output", output.indexOf(payload1) > 0); // Now Replace with payload2 from an InputStreamDataSource. // Note at this point, the child's tree is expanded. child.setDataSource(isds2); baos = new ByteArrayOutputStream(); soapBody.serialize(baos); output = baos.toString(ENCODING); System.out.println(output); assertTrue("The payload was not present in the output", output.indexOf(payload2) > 0); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/AttrNsTest.java0000644000000000000000000001572611131637476026453 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om; import org.apache.axiom.om.impl.builder.StAXOMBuilder; import org.custommonkey.xmlunit.Diff; import org.w3c.dom.Document; import org.xml.sax.SAXException; import javax.xml.namespace.QName; import javax.xml.parsers.ParserConfigurationException; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLStreamReader; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.StringReader; import java.util.Iterator; public class AttrNsTest extends AbstractOMSerializationTest { private String attrNamespaceTestXML = "\n" + "" + " test1" + " test2" + ""; public void testAttributeNamespaces() throws Exception { ignoreXMLDeclaration = true; ignoreDocument = true; Document document1 = newDocument(attrNamespaceTestXML); String serializedOM = getSerializedOM(attrNamespaceTestXML); Document document2 = newDocument(serializedOM); Diff diff = compareXML(document1, document2); assertXMLEqual(diff, true); } /** * Test method to test the XML namespace * * @throws Exception */ public void testAttr() throws Exception { String xml = "" + ""; ByteArrayInputStream bais = new ByteArrayInputStream(xml.getBytes()); StAXOMBuilder builder = new StAXOMBuilder(bais); OMElement elem = builder.getDocumentElement(); elem.build(); assertEquals("Attribute value mismatch", "uri:thisBase", elem.getAttributeValue(new QName(OMConstants.XMLNS_URI, "base"))); OMAttribute attr = elem.getAttribute(new QName(OMConstants.XMLNS_URI, "base")); assertEquals("Attribute namespace mismatch", OMConstants.XMLNS_URI, attr.getNamespace().getNamespaceURI()); } /** * Test method to test the XML namespace of an attr without any other ns declarations in the * element * * @throws Exception */ public void testAttrWithoutElementNS() throws Exception { String xml = ""; ByteArrayInputStream bais = new ByteArrayInputStream(xml.getBytes()); StAXOMBuilder builder = new StAXOMBuilder(bais); OMElement elem = builder.getDocumentElement(); elem.build(); assertEquals("Attribute value mismatch", "uri:thisBase", elem.getAttributeValue(new QName(OMConstants.XMLNS_URI, "base"))); OMAttribute attr = elem.getAttribute(new QName(OMConstants.XMLNS_URI, "base")); assertEquals("Attribute namespace mismatch", OMConstants.XMLNS_URI, attr.getNamespace().getNamespaceURI()); } public void testAttributesWithProgrammaticalCreation() { try { String expectedXML = ""; OMFactory omFactory = OMAbstractFactory.getOMFactory(); OMNamespace attrNS1 = omFactory.createOMNamespace("http://test-attributes-1.org", "myAttr1NS"); OMNamespace attrNS2 = omFactory.createOMNamespace("http://test-attributes-2.org", "myAttr2NS"); OMElement omElement = omFactory.createOMElement("AttributeTester", null); omElement.addAttribute(omFactory.createOMAttribute("attrNumber", attrNS1, "1")); omElement.addAttribute(omFactory.createOMAttribute("attrNumber", attrNS2, "2")); int nsCount = 0; for (Iterator iterator = omElement.getAllDeclaredNamespaces(); iterator.hasNext();) { iterator.next(); nsCount++; } assertTrue(nsCount == 2); Document document1 = newDocument(expectedXML); Document document2 = newDocument(omElement.toString()); Diff diff = compareXML(document1, document2); assertXMLEqual(diff, true); } catch (ParserConfigurationException e) { fail(e.getMessage()); } catch (SAXException e) { fail(e.getMessage()); } catch (IOException e) { fail(e.getMessage()); } } public void testAttributesWithNamespaceSerialization() { try { String xmlString = ""; XMLStreamReader xmlStreamReader = XMLInputFactory.newInstance() .createXMLStreamReader(new StringReader(xmlString)); // copied code from the generated stub class toOM method org.apache.axiom.om.impl.builder.StAXOMBuilder builder = new org.apache.axiom.om.impl.builder.StAXOMBuilder(xmlStreamReader); org.apache.axiom.om.OMElement documentElement = builder .getDocumentElement(); ((org.apache.axiom.om.impl.OMNodeEx) documentElement).setParent(null); // end copied code // now print the object after it has been processed System.out.println("after - '" + documentElement.toString() + "'"); Document document1 = newDocument(xmlString); Document document2 = newDocument(documentElement.toString()); Diff diff = compareXML(document1, document2); assertXMLEqual(diff, true); } catch (ParserConfigurationException e) { fail(e.getMessage()); } catch (SAXException e) { fail(e.getMessage()); } catch (IOException e) { fail(e.getMessage()); } catch (javax.xml.stream.XMLStreamException e) { fail(e.getMessage()); } } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/MessagesTest.java0000644000000000000000000000447211131637476027003 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om; import org.apache.axiom.soap.SOAPEnvelope; public class MessagesTest extends OMTestCase { SOAPEnvelope soapEnvelope; public MessagesTest(String testName) { super(testName); } public void testMessageWithLotOfWhiteSpaces() throws OMException, Exception { soapEnvelope = (SOAPEnvelope) OMTestUtils.getOMBuilder( getTestResource(TestConstants.WHITESPACE_MESSAGE)) .getDocumentElement(); OMTestUtils.walkThrough(soapEnvelope); } public void testMinimalMessage() throws OMException, Exception { soapEnvelope = (SOAPEnvelope) OMTestUtils.getOMBuilder( getTestResource(TestConstants.MINIMAL_MESSAGE)) .getDocumentElement(); OMTestUtils.walkThrough(soapEnvelope); } public void testReallyBigMessage() throws OMException, Exception { soapEnvelope = (SOAPEnvelope) OMTestUtils.getOMBuilder( getTestResource(TestConstants.REALLY_BIG_MESSAGE)) .getDocumentElement(); OMTestUtils.walkThrough(soapEnvelope); } public void testEmptyBodiedMessage() throws OMException, Exception { soapEnvelope = (SOAPEnvelope) OMTestUtils.getOMBuilder( getTestResource(TestConstants.EMPTY_BODY_MESSAGE)) .getDocumentElement(); OMTestUtils.walkThrough(soapEnvelope); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/OMBlankElementTest.java0000644000000000000000000000367611131637476030036 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om; import junit.framework.TestCase; import javax.xml.stream.XMLStreamException; import java.io.StringWriter; public class OMBlankElementTest extends TestCase { public OMBlankElementTest(String name) { super(name); } public void testBlankOMElem() { try { //We should not get anything as the return value here: the output of the serialization String value = buildBlankOMElem(); assertNull("There's a serialized output for a blank XML element that cannot exist", value); } catch (Exception e) { //An exception is thrown trying to serializeAndConsume a blank element assertTrue(true); } } String buildBlankOMElem() throws XMLStreamException { OMFactory factory = OMAbstractFactory.getOMFactory(); OMNamespace namespace1 = factory.createOMNamespace("", ""); OMElement elem1 = factory.createOMElement("", namespace1); StringWriter writer = new StringWriter(); elem1.build(); elem1.serialize(writer); writer.flush(); return writer.toString(); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/OMWrapperTest.java0000644000000000000000000000705411131637476027107 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om; import junit.framework.TestCase; import org.apache.axiom.om.impl.builder.StAXOMBuilder; import org.apache.axiom.om.impl.llom.OMStAXWrapper; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import java.io.StringReader; public class OMWrapperTest extends TestCase { public void testSingleElementWrapper() { try { String xml = "" + "" + "" + "" + "IncludedText" + "" + "" + "" + ""; XMLStreamReader xmlStreamReader = XMLInputFactory.newInstance().createXMLStreamReader(new StringReader(xml)); StAXOMBuilder b = new StAXOMBuilder(xmlStreamReader); OMElement documentElement = b.getDocumentElement(); OMElement wrap2Element = documentElement.getFirstElement(). getFirstElement(). getFirstElement(); OMElement elt = OMAbstractFactory.getOMFactory().createOMElement( "testName", "urn:testNs", "ns1" ); elt.addChild(wrap2Element); XMLStreamReader reader = wrap2Element.getXMLStreamReaderWithoutCaching(); // Make sure the reader is an OMStAXWrapper if (reader instanceof OMStAXWrapper) { OMStAXWrapper wrapper = (OMStAXWrapper) reader; assertTrue(!wrapper.isClosed()); wrapper.releaseParserOnClose(true); } int count = 0; while (reader.hasNext()) { reader.next(); count ++; } assertEquals(3, count); // Make sure that the wrapper can be closed without failing reader.close(); reader.close(); // This should be a noop since the parser is closed. // Closing the parser should also close the parser on the builder (since they are the same) assertTrue(b.isClosed()); b.close(); // This should be a noop since the parser is closed // Calling getProperty after a close should return null, not an exception assertTrue(reader.getProperty("dummyProperty") == null); // Calling builder.getReaderProperty should return null, not an exception assertTrue(b.getReaderProperty("dummyProperty") == null); } catch (XMLStreamException e) { fail(e.getMessage()); } } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/factory/0000755000000000000000000000000011131637476025171 5ustar rootroot././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/factory/OMLinkedListImplFactoryTest.javaaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/factory/OMLinkedListImplFactoryTes0000644000000000000000000002342511131637476032246 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.factory; import org.apache.axiom.om.AbstractTestCase; import org.apache.axiom.om.OMAbstractFactory; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMNode; import org.apache.axiom.om.OMTestUtils; import org.apache.axiom.om.OMText; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.om.TestConstants; import org.apache.axiom.soap.SOAP11Constants; import org.apache.axiom.soap.SOAPBody; import org.apache.axiom.soap.SOAPConstants; import org.apache.axiom.soap.SOAPEnvelope; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPFault; import org.apache.axiom.soap.SOAPHeader; import org.apache.axiom.soap.SOAPHeaderBlock; import javax.xml.namespace.QName; /** User: Eran Chinthaka (eran.chinthaka@gmail.com) Date: Feb 8, 2005 Time: 11:06:09 AM */ public class OMLinkedListImplFactoryTest extends AbstractTestCase { public OMLinkedListImplFactoryTest(String testName) { super(testName); } SOAPFactory omFactory; OMNamespace namespace; String nsUri = "http://www.apache.org/~chinthaka"; String nsPrefix = "myhome"; protected void setUp() throws Exception { super.setUp(); omFactory = OMAbstractFactory.getSOAP11Factory(); namespace = omFactory.createOMNamespace(nsUri, nsPrefix); } public void testCreateOMElementWithNoBuilder() { OMElement omElement = omFactory.createOMElement("chinthaka", namespace); assertTrue( "Programatically created OMElement should have done = true ", omElement.isComplete()); } public void testCreateOMElement() throws Exception { OMXMLParserWrapper omBuilder = OMTestUtils.getOMBuilder( getTestResource(TestConstants.WHITESPACE_MESSAGE)); OMElement envelope = omBuilder.getDocumentElement(); // The body is the second element OMNode node = envelope.getFirstElement(); node = node.getNextOMSibling(); while (node != null && !(node instanceof OMElement)) { node = node.getNextOMSibling(); } OMElement body = (OMElement) node; OMElement child = omFactory.createOMElement("child", namespace, body, omBuilder); assertFalse("OMElement with a builder should start with done = false", child.isComplete()); assertNotNull("This OMElement must have a builder", child.getBuilder()); // Try the QName version QName qname = new QName(nsUri, "local", nsPrefix); OMElement element = omFactory.createOMElement(qname); assertNotNull(element); // Now make one with a parent (and thus inherit the NS) element = omFactory.createOMElement(qname, child); assertNotNull(element); assertEquals("Namespace wasn't found correctly", element.getNamespace(), namespace); } public void testCreateOMNamespace() throws Exception { assertTrue("OMNamespace uri not correct", nsUri.equals( namespace.getNamespaceURI())); // here equalsIgnoreCase should not be used as case does matter assertTrue("OMNamespace prefix not correct", nsPrefix.equals( namespace.getPrefix())); // here equalsIgnoreCase should not be used as case does matter } public void testCreateText() { OMElement omElement = omFactory.createOMElement("chinthaka", namespace); String text = "sampleText"; OMText omText = omFactory.createOMText(omElement, text); assertTrue("Programatically created OMText should have done = true ", omText.isComplete()); assertTrue( "Programatically created OMText should have correct text value ", text.equals(omText.getText())); } public void testCreateSOAPBody() throws Exception { OMXMLParserWrapper omBuilder = OMTestUtils.getOMBuilder( getTestResource(TestConstants.MINIMAL_MESSAGE)); SOAPEnvelope soapEnvelope = (SOAPEnvelope) omBuilder.getDocumentElement(); SOAPBody soapBodyOne = omFactory.createSOAPBody(soapEnvelope); assertTrue( "Programatically created SOAPBody should have done = true ", soapBodyOne.isComplete()); } public void testCreateSOAPBodyWithBuilder() throws Exception { OMXMLParserWrapper omBuilder = OMTestUtils.getOMBuilder( getTestResource(TestConstants.MINIMAL_MESSAGE)); SOAPEnvelope soapEnvelope = (SOAPEnvelope) omBuilder.getDocumentElement(); SOAPBody soapBodyTwo = omFactory.createSOAPBody(soapEnvelope, omBuilder); assertTrue( "SOAPBody with a builder should start with done = false ", !soapBodyTwo.isComplete()); assertNotNull("This SOAPBody must have a builder ", soapBodyTwo.getBuilder()); } public void testCreateSOAPEnvelope() throws Exception { omFactory.createOMNamespace( SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI, SOAPConstants.SOAP_DEFAULT_NAMESPACE_PREFIX); SOAPEnvelope soapEnvelopeTwo = omFactory.createSOAPEnvelope(); assertTrue( "Programatically created SOAPEnvelope should have done = true ", soapEnvelopeTwo.isComplete()); SOAPEnvelope soapEnvelope = omFactory.createSOAPEnvelope( OMTestUtils.getOMBuilder( getTestResource(TestConstants.MINIMAL_MESSAGE))); assertTrue( "SOAPEnvelope with a builder should start with done = false ", !soapEnvelope.isComplete()); assertNotNull("This SOAPEnvelope must have a builder", soapEnvelope.getBuilder()); } public void testCreateSOAPHeader() throws Exception { OMXMLParserWrapper omBuilder = OMTestUtils.getOMBuilder( getTestResource(TestConstants.MINIMAL_MESSAGE)); SOAPEnvelope soapEnvelope = (SOAPEnvelope) omBuilder.getDocumentElement(); SOAPHeader soapHeader = omFactory.createSOAPHeader(soapEnvelope); assertTrue( "Programatically created SOAPHeader should have done = true ", soapHeader.isComplete()); soapHeader.detach(); SOAPHeader soapHeaderTwo = omFactory.createSOAPHeader(soapEnvelope, omBuilder); assertTrue( "SOAPHeader with a builder should start with done = false ", !soapHeaderTwo.isComplete()); assertNotNull("This SOAPHeader must have a builder ", soapHeaderTwo.getBuilder()); } public void testCreateSOAPHeaderBlock() throws Exception { OMXMLParserWrapper omBuilder = OMTestUtils.getOMBuilder( getTestResource(TestConstants.SOAP_SOAPMESSAGE)); SOAPEnvelope soapEnvelope = (SOAPEnvelope) omBuilder.getDocumentElement(); SOAPHeader soapHeader = soapEnvelope.getHeader(); SOAPHeaderBlock soapHeaderBlock = omFactory.createSOAPHeaderBlock( "soapHeaderBlockOne", namespace, soapHeader); assertTrue( "Programatically created SOAPHeaderBlock should have done = true ", soapHeaderBlock.isComplete()); SOAPHeaderBlock soapHeaderBlockTwo = omFactory.createSOAPHeaderBlock( "soapHeaderBlockOne", namespace, soapHeader, omBuilder); assertTrue( "SOAPHeaderBlock with a builder should start with done = false ", !soapHeaderBlockTwo.isComplete()); assertNotNull("SOAPHeaderBlock must have a builder", soapHeaderBlockTwo.getBuilder()); } public void testCreateSOAPFault() throws Exception { OMXMLParserWrapper omBuilder = OMTestUtils.getOMBuilder( getTestResource(TestConstants.SOAP_SOAPMESSAGE)); SOAPEnvelope soapEnvelope = (SOAPEnvelope) omBuilder.getDocumentElement(); SOAPBody soapBody = soapEnvelope.getBody(); SOAPFault soapFault = omFactory.createSOAPFault(soapBody, new Exception(" this is just a test ")); assertTrue( "Programatically created SOAPFault should have done = true ", soapFault.isComplete()); soapFault.detach(); SOAPFault soapFaultTwo = omFactory.createSOAPFault(soapBody, omBuilder); assertTrue( "SOAPFault with a builder should start with done = false ", !soapFaultTwo.isComplete()); assertNotNull("This SOAPFault must have a builder", soapFaultTwo.getBuilder()); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/CompareOMWithDOMTest.java0000644000000000000000000000431711131637476030250 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om; import org.apache.axiom.soap.SOAPEnvelope; import org.w3c.dom.Document; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import java.io.File; /** @version $Rev: $ $Date: $ */ public class CompareOMWithDOMTest extends AbstractTestCase { /** @param testName */ public CompareOMWithDOMTest(String testName) { super(testName); } public void testAllMessagesInSOAP() throws OMException, Exception { File dir = new File(testResourceDir, "soap"); File[] files = dir.listFiles(); if (files != null) { for (int i = 0; i < files.length; i++) { if (files[i].isFile() && files[i].getName().endsWith(".xml") && !files[i].getName().startsWith("wrong")) { SOAPEnvelope soapEnvelope = (SOAPEnvelope) OMTestUtils.getOMBuilder( files[i]) .getDocumentElement(); DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); dbf.setNamespaceAware(true); DocumentBuilder builder = dbf.newDocumentBuilder(); Document doc = builder.parse(files[i].getAbsolutePath()); OMTestUtils.compare(doc.getDocumentElement(), soapEnvelope); } } } } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/AbstractOMSerializationTest.java0000644000000000000000000001527111131637476031770 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om; import org.apache.axiom.om.impl.builder.StAXOMBuilder; import org.apache.axiom.om.impl.llom.factory.OMXMLBuilderFactory; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.custommonkey.xmlunit.Diff; import org.custommonkey.xmlunit.XMLTestCase; import org.w3c.dom.Document; import org.xml.sax.InputSource; import org.xml.sax.SAXException; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLStreamException; import javax.xml.transform.Result; import javax.xml.transform.Source; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerConfigurationException; import javax.xml.transform.TransformerException; import javax.xml.transform.TransformerFactory; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; public class AbstractOMSerializationTest extends XMLTestCase { protected boolean ignoreXMLDeclaration = true; protected boolean ignoreDocument = false; protected Log log = LogFactory.getLog(getClass()); /** @param xmlString - remember this is not the file path. this is the xml string */ public Diff getDiffForComparison(String xmlString) throws Exception { return getDiffForComparison(new ByteArrayInputStream(xmlString.getBytes())); } public Diff getDiffForComparison(File xmlFile) throws Exception { return getDiffForComparison(new FileInputStream(xmlFile)); } public String getSerializedOM(String xmlString) throws Exception { try { XMLInputFactory factory = XMLInputFactory.newInstance(); ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(xmlString.getBytes()); StAXOMBuilder staxOMBuilder = OMXMLBuilderFactory. createStAXOMBuilder(OMAbstractFactory.getOMFactory(), factory.createXMLStreamReader(byteArrayInputStream)); OMElement rootElement = staxOMBuilder.getDocumentElement(); ByteArrayOutputStream baos = new ByteArrayOutputStream(); OMOutputFormat format = new OMOutputFormat(); format.setIgnoreXMLDeclaration(ignoreXMLDeclaration); ((OMDocument) rootElement.getParent()).serialize(baos, format); return new String(baos.toByteArray()); } catch (Exception e) { throw e; } } public Diff getDiffForComparison(InputStream inStream) throws Exception { try { XMLInputFactory factory = XMLInputFactory.newInstance(); StAXOMBuilder staxOMBuilder = OMXMLBuilderFactory. createStAXOMBuilder(OMAbstractFactory.getOMFactory(), factory.createXMLStreamReader(inStream)); OMElement rootElement = staxOMBuilder.getDocumentElement(); ByteArrayOutputStream baos = new ByteArrayOutputStream(); if (ignoreDocument) { rootElement.serialize(baos); } else { ((OMDocument) rootElement.getParent()).serialize(baos); } InputSource resultXML = new InputSource(new InputStreamReader( new ByteArrayInputStream(baos.toByteArray()))); Document dom2 = newDocument(resultXML); Document dom1 = newDocument(inStream); return compareXML(dom1, dom2); } catch (XMLStreamException e) { fail(e.getMessage()); throw new Exception(e); } catch (ParserConfigurationException e) { fail(e.getMessage()); throw new Exception(e); } catch (SAXException e) { fail(e.getMessage()); throw new Exception(e); } catch (IOException e) { fail(e.getMessage()); throw new Exception(e); } } public Document newDocument(InputSource in) throws ParserConfigurationException, SAXException, IOException { DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); dbf.setNamespaceAware(true); DocumentBuilder db = dbf.newDocumentBuilder(); return db.parse(in); } public Document newDocument(InputStream in) throws ParserConfigurationException, SAXException, IOException { DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); dbf.setNamespaceAware(true); DocumentBuilder db = dbf.newDocumentBuilder(); return db.parse(in); } public Document newDocument(String xml) throws ParserConfigurationException, SAXException, IOException { DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); dbf.setNamespaceAware(true); DocumentBuilder db = dbf.newDocumentBuilder(); return db.parse(new ByteArrayInputStream(xml.getBytes())); } public String writeXmlFile(Document doc) { try { // Prepare the DOM document for writing Source source = new DOMSource(doc); ByteArrayOutputStream baos = new ByteArrayOutputStream(); Result result = new StreamResult(baos); // Write the DOM document to the file Transformer xformer = TransformerFactory.newInstance().newTransformer(); xformer.transform(source, result); return new String(baos.toByteArray()); } catch (TransformerConfigurationException e) { log.error(e.getMessage(), e); } catch (TransformerException e) { log.error(e.getMessage(), e); } return null; } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/OMOutputFormatTest.java0000644000000000000000000001236011131637476030134 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om; import org.apache.axiom.om.impl.MTOMConstants; import org.apache.axiom.soap.SOAP11Constants; import org.apache.axiom.soap.SOAP12Constants; import java.lang.reflect.Field; import java.lang.reflect.Method; import junit.framework.TestCase; public class OMOutputFormatTest extends TestCase { public void testAPI_getProperty() throws Exception { Method m = OMOutputFormat.class.getMethod("getProperty", new Class[] {String.class}); assertTrue(m != null); Class returnType = m.getReturnType(); assertTrue(returnType == Object.class); } public void testAPI_setProperty() throws Exception { Method m = OMOutputFormat.class.getMethod("setProperty", new Class[] {String.class, Object.class}); assertTrue(m != null); Class returnType = m.getReturnType(); assertTrue(returnType == Object.class); } public void testAPI_publicProperties() throws Exception { Field f = OMOutputFormat.class.getField("ACTION_PROPERTY"); assertTrue(f != null); } public void testGetContentTypeDefault() { OMOutputFormat format = new OMOutputFormat(); String contentType = format.getContentType(); assertTrue(contentType.equals(SOAP11Constants.SOAP_11_CONTENT_TYPE)); } public void testGetContentTypeSOAP12() { OMOutputFormat format = new OMOutputFormat(); format.setSOAP11(false); String contentType = format.getContentType(); assertTrue(contentType.equals(SOAP12Constants.SOAP_12_CONTENT_TYPE)); } public void testGetContentTypeSOAP11MTOM() { OMOutputFormat format = new OMOutputFormat(); format.setDoOptimize(true); String contentType = format.getContentType(); // This is rudimentary. We can add a more complete test that checks // sub items in the future. assertTrue(contentType.indexOf(SOAP11Constants.SOAP_11_CONTENT_TYPE)!=-1); assertTrue(contentType.indexOf(MTOMConstants.MTOM_TYPE)!=-1); } public void testGetContentTypeSOAP11SWA() { OMOutputFormat format = new OMOutputFormat(); format.setSOAP11(true); format.setDoingSWA(true); String contentType = format.getContentType(); // This is rudimentary. We can add a more complete test that checks // sub items in the future. assertTrue(contentType.indexOf(SOAP11Constants.SOAP_11_CONTENT_TYPE)>=0); assertTrue(contentType.indexOf("multipart/related")>=0); assertTrue(contentType.indexOf(MTOMConstants.MTOM_TYPE) < 0); // Sometimes the OMOutputFormat has both "optimized" and "doing swa". // In such cases, the winner should be swa. format = new OMOutputFormat(); format.setSOAP11(true); format.setDoingSWA(true); format.setDoOptimize(true); contentType = format.getContentType(); // This is rudimentary. We can add a more complete test that checks // sub items in the future. assertTrue(contentType.indexOf(SOAP11Constants.SOAP_11_CONTENT_TYPE)>=0); assertTrue(contentType.indexOf("multipart/related")>=0); assertTrue(contentType.indexOf(MTOMConstants.MTOM_TYPE) < 0); } public void testGetContentTypeSOAP12MTOM() { OMOutputFormat format = new OMOutputFormat(); format.setDoOptimize(true); format.setSOAP11(false); String contentType = format.getContentType(); // This is rudimentary. We can add a more complete test that checks // sub items in the future. assertTrue(contentType.indexOf(SOAP12Constants.SOAP_12_CONTENT_TYPE)!=-1); assertTrue(contentType.indexOf(MTOMConstants.MTOM_TYPE)!=-1); } public void testGetContentTypeSOAP12MTOMWithAction() { OMOutputFormat format = new OMOutputFormat(); format.setDoOptimize(true); format.setSOAP11(false); format.setProperty(OMOutputFormat.ACTION_PROPERTY, "testSoapAction"); String contentType = format.getContentType(); // This is rudimentary. We can add a more complete test that checks // sub items in the future. assertTrue(contentType.indexOf(SOAP12Constants.SOAP_12_CONTENT_TYPE)!=-1); assertTrue(contentType.indexOf(MTOMConstants.MTOM_TYPE)!=-1); assertTrue(contentType.indexOf("action=\\\"testSoapAction\\\"")!=-1); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/BadInputTest.java0000644000000000000000000001122311131637476026732 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om; import org.apache.axiom.soap.SOAPEnvelope; public class BadInputTest extends OMTestCase { public BadInputTest(String testName) { super(testName); } //done public void testEnvelopeMissing() throws Exception { try { SOAPEnvelope soapEnvelope = (SOAPEnvelope) OMTestUtils.getOMBuilder( getTestResource(TestConstants.BAD_ENVELOPE_MISSING)) .getDocumentElement(); OMTestUtils.walkThrough(soapEnvelope); fail("this must failed gracefully with OMException or AxisFault"); } catch (OMException e) { return; } } //done public void testHeaderBodyWrongOrder() throws Exception { try { SOAPEnvelope soapEnvelope = (SOAPEnvelope) OMTestUtils.getOMBuilder( getTestResource(TestConstants.BAD_HEADER_BODY_WRONG_ORDER)) .getDocumentElement(); soapEnvelope.build(); fail("this must failed gracefully with OMException or AxisFault"); } catch (OMException e) { return; } } //done // public void testNotnamespaceQualified() throws Exception { // try { // SOAPEnvelope soapEnvelope = // (SOAPEnvelope) OMTestUtils.getOMBuilder(new File(dir, "notnamespaceQualified.xml")).getDocumentElement(); // OMTestUtils.walkThrough(soapEnvelope); // fail("this must failed gracefully with OMException or AxisFault"); // } catch (OMException e) { // return; // } catch (AxisFault e) { // return; // } // // } //done // public void testBodyNotQualified() throws Exception { // try { // SOAPEnvelope soapEnvelope = // (SOAPEnvelope) OMTestUtils.getOMBuilder(new File(dir, "bodyNotQualified.xml")).getDocumentElement(); // OMTestUtils.walkThrough(soapEnvelope); // fail("this must failed gracefully with OMException or AxisFault"); // } catch (OMException e) { // //we are OK! // return; // } catch (AxisFault e) { // //we are OK here too! // return; // } // // } //done public void testTwoBodymessage() throws Exception { try { SOAPEnvelope soapEnvelope = (SOAPEnvelope) OMTestUtils.getOMBuilder( getTestResource(TestConstants.BAD_TWO_BODY)) .getDocumentElement(); soapEnvelope.build(); fail("this must failed gracefully with OMException or AxisFault"); } catch (OMException e) { return; } } //done public void testTwoheaders() throws Exception { try { SOAPEnvelope soapEnvelope = (SOAPEnvelope) OMTestUtils.getOMBuilder( getTestResource(TestConstants.BAD_TWO_HEADERS)) .getDocumentElement(); soapEnvelope.build(); fail("this must failed gracefully with OMException or AxisFault"); } catch (OMException e) { return; } } //done public void testWrongSoapNs() throws Exception { try { SOAPEnvelope soapEnvelope = (SOAPEnvelope) OMTestUtils.getOMBuilder( getTestResource(TestConstants.BAD_WRONG_SOAP_NS)) .getDocumentElement(); OMTestUtils.walkThrough(soapEnvelope); fail("this must failed gracefully with OMException or AxisFault"); } catch (OMException e) { return; } } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/TestConstants.java0000644000000000000000000000356611131637476027213 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om; /** All the various files created 03-Nov-2005 12:02:12 */ public class TestConstants { public static final String SOAP_SOAPMESSAGE = "soap/soapmessage.xml"; public static final String SOAP_SOAPMESSAGE1 = "soap/soapmessage1.xml"; public static final String SAMPLE1 = "soap/sample1.xml"; public static final String WHITESPACE_MESSAGE = "soap/whitespacedMessage.xml"; public static final String MINIMAL_MESSAGE = "soap/minimalMessage.xml"; public static final String REALLY_BIG_MESSAGE = "soap/reallyReallyBigMessage.xml"; public static final String EMPTY_BODY_MESSAGE = "soap/emtyBodymessage.xml"; public static final String BAD_WRONG_SOAP_NS = "badsoap/wrongSoapNs.xml"; public static final String BAD_TWO_HEADERS = "badsoap/twoheaders.xml"; public static final String BAD_TWO_BODY = "badsoap/twoBodymessage.xml"; public static final String BAD_ENVELOPE_MISSING = "badsoap/envelopeMissing.xml"; public static final String BAD_HEADER_BODY_WRONG_ORDER = "badsoap/haederBodyWrongOrder.xml"; private TestConstants() { } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/OMCachingTest.java0000644000000000000000000000664211131637476027025 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om; import org.apache.axiom.om.impl.builder.StAXOMBuilder; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import java.io.FileNotFoundException; public class OMCachingTest extends AbstractTestCase { private XMLStreamReader xmlStreamReader; /** @param testName */ public OMCachingTest(String testName) { super(testName); } protected void setUp() throws Exception { } /** This will first serialize the element without caching. Then it tries to serialize again . */ public void testCachingOne() { OMElement documentElement = null; try { // first build the OM tree without caching and see whether up can cosume it again StAXOMBuilder builder = new StAXOMBuilder(getXMLStreamReader()); documentElement = builder.getDocumentElement(); String envelopeString = documentElement.toStringWithConsume(); } catch (XMLStreamException e) { e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates. } catch (FileNotFoundException e) { e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates. } try { String envelopeString = documentElement.toStringWithConsume(); fail("Parser should fail as its already being accessed without caching"); } catch (XMLStreamException e) { assertTrue(true); } } /** This will first serialize the OMElement with caching and again will try to serialize. */ public void testCachingTwo() { OMElement documentElement = null; try { // first build the OM tree without caching and see whether up can cosume it again StAXOMBuilder builder = new StAXOMBuilder(getXMLStreamReader()); documentElement = builder.getDocumentElement(); String envelopeString = documentElement.toString(); envelopeString = documentElement.toStringWithConsume(); assertTrue(true); } catch (XMLStreamException e) { fail("Parser should not failt as the element was serialized with caching"); } catch (FileNotFoundException e) { fail("Parser should not failt as the element was serialized with caching"); } } private XMLStreamReader getXMLStreamReader() throws XMLStreamException, FileNotFoundException { return XMLInputFactory.newInstance(). createXMLStreamReader(getTestResource(TestConstants.SOAP_SOAPMESSAGE)); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/OMTestUtils.java0000644000000000000000000001150411131637476026562 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om; import junit.framework.TestCase; import org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder; import org.w3c.dom.Attr; import org.w3c.dom.Element; import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLStreamReader; import java.io.File; import java.io.FileReader; import java.io.InputStream; import java.util.Iterator; public class OMTestUtils { public static OMXMLParserWrapper getOMBuilder(File file) throws Exception { XMLStreamReader parser = XMLInputFactory.newInstance() .createXMLStreamReader(new FileReader(file)); return new StAXSOAPModelBuilder(parser, null); } public static OMXMLParserWrapper getOMBuilder(InputStream in) throws Exception { XMLStreamReader parser = XMLInputFactory.newInstance() .createXMLStreamReader(in); return new StAXSOAPModelBuilder(parser, null); } public static void walkThrough(OMElement omEle) { Iterator attibIt = omEle.getAllAttributes(); if (attibIt != null) { while (attibIt.hasNext()) { TestCase.assertNotNull("once the has next is not null, the " + "element should not be null", attibIt.next()); } } Iterator it = omEle.getChildren(); if (it != null) { while (it.hasNext()) { OMNode ele = (OMNode) it.next(); TestCase.assertNotNull("once the has next is not null, the " + "element should not be null", ele); if (ele instanceof OMElement) { walkThrough((OMElement) ele); } } } } public static void compare(Element ele, OMElement omele) throws Exception { if (ele == null && omele == null) { return; } else if (ele != null && omele != null) { TestCase.assertEquals("Element name not correct", ele.getLocalName(), omele.getLocalName()); if (omele.getNamespace() != null) { TestCase.assertEquals("Namespace URI not correct", ele.getNamespaceURI(), omele.getNamespace().getNamespaceURI()); } //go through the attributes NamedNodeMap map = ele.getAttributes(); Iterator attIterator = omele.getAllAttributes(); OMAttribute omattribute; while (attIterator != null && attIterator.hasNext() && map == null) { omattribute = (OMAttribute) attIterator.next(); Node node = map.getNamedItemNS( omattribute.getNamespace().getNamespaceURI(), omattribute.getLocalName()); if (node.getNodeType() == Node.ATTRIBUTE_NODE) { Attr attr = (Attr) node; TestCase.assertEquals(attr.getValue(), omattribute.getAttributeValue()); } else { throw new OMException("return type is not a Attribute"); } } Iterator it = omele.getChildren(); NodeList list = ele.getChildNodes(); for (int i = 0; i < list.getLength(); i++) { Node node = list.item(i); if (node.getNodeType() == Node.ELEMENT_NODE) { TestCase.assertTrue(it.hasNext()); OMNode tempOmNode = (OMNode) it.next(); while (tempOmNode.getType() != OMNode.ELEMENT_NODE) { TestCase.assertTrue(it.hasNext()); tempOmNode = (OMNode) it.next(); } compare((Element) node, (OMElement) tempOmNode); } } } else { throw new Exception("One is null"); } } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/SpacesTest.java0000644000000000000000000001047611131637476026453 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om; import org.apache.axiom.om.impl.builder.StAXOMBuilder; import org.apache.axiom.om.impl.llom.factory.OMXMLBuilderFactory; import org.custommonkey.xmlunit.Diff; import org.custommonkey.xmlunit.XMLTestCase; import org.w3c.dom.Document; import org.xml.sax.InputSource; import org.xml.sax.SAXException; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLStreamException; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.util.Iterator; public class SpacesTest extends XMLTestCase { private static final String filePath = "test-resources/xml/spaces.xml"; private static final String filePath2 = "test-resources/xml/spaces2.xml"; private OMElement rootElement; public void testCData() throws Exception { checkOMConformance(new FileInputStream(filePath)); } private void checkOMConformance(InputStream iStream) throws Exception { try { XMLInputFactory factory = XMLInputFactory.newInstance(); StAXOMBuilder staxOMBuilder = OMXMLBuilderFactory. createStAXOMBuilder(OMAbstractFactory.getOMFactory(), factory.createXMLStreamReader( iStream)); rootElement = staxOMBuilder.getDocumentElement(); boolean hasCDataNode = hasCDataNode(rootElement); String file = hasCDataNode ? filePath : filePath2; ByteArrayOutputStream baos = new ByteArrayOutputStream(); ((OMDocument) rootElement.getParent()).serialize(baos); InputSource resultXML = new InputSource(new InputStreamReader( new ByteArrayInputStream(baos.toByteArray()))); Document dom1 = newDocument(new InputSource(new FileInputStream(file))); Document dom2 = newDocument(resultXML); Diff diff = compareXML(dom1, dom2); assertXMLEqual(diff, true); } catch (XMLStreamException e) { fail(e.getMessage()); throw new Exception(e); } catch (ParserConfigurationException e) { fail(e.getMessage()); throw new Exception(e); } catch (SAXException e) { fail(e.getMessage()); throw new Exception(e); } catch (IOException e) { fail(e.getMessage()); throw new Exception(e); } } private boolean hasCDataNode(OMNode pNode) { switch (pNode.getType()) { case OMNode.CDATA_SECTION_NODE: return true; case OMNode.ELEMENT_NODE: OMElement e = (OMElement) pNode; for (Iterator iter = e.getChildren(); iter.hasNext();) { if (hasCDataNode((OMNode) iter.next())) { return true; } } break; default: break; } return false; } public Document newDocument(InputSource in) throws ParserConfigurationException, SAXException, IOException { DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); dbf.setNamespaceAware(true); DocumentBuilder db = dbf.newDocumentBuilder(); return db.parse(in); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/util/0000755000000000000000000000000011131637476024477 5ustar rootrootaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/util/TextHelperTest.java0000644000000000000000000001515111131637476030271 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.util; import org.apache.axiom.attachments.impl.BufferUtils; import org.apache.axiom.om.AbstractTestCase; import org.apache.axiom.om.OMAbstractFactory; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMText; import javax.activation.DataHandler; import javax.activation.FileDataSource; import java.io.BufferedOutputStream; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.InputStream; import java.io.SequenceInputStream; /** * Validate TextHelper code */ public class TextHelperTest extends AbstractTestCase { private File file; private FileInputStream fis; private static final long SIZE = 101 * 1024; // More than the threshold private static final long EXPECTED_BASE64_SIZE = 137900; private static final String EXPECTED_STARTS_WITH = "AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISIjJC"; public TextHelperTest(String testName) { super(testName); } protected void setUp() throws Exception { super.setUp(); file = File.createTempFile("TextHelperTest", "txt"); FileOutputStream fos = new FileOutputStream(file); BufferedOutputStream bos = new BufferedOutputStream(fos); for (long i = 0; i < SIZE; i++) { bos.write((byte)(i % 256)); } bos.flush(); bos.close(); fis = new FileInputStream(file); file.deleteOnExit(); } protected void tearDown() throws Exception { super.tearDown(); if (file != null) { file.delete(); } } /** * Test the InputStream - > BASE64 String * code. * * @throws Exception */ public void test_toString() throws Exception { String text = TextHelper.toString(fis); assertTrue(text.length() > SIZE); assertTrue(text.length() == EXPECTED_BASE64_SIZE); assertTrue(text.startsWith(EXPECTED_STARTS_WITH)); } /** * Regression test for WSCOMMONS-101. * * @throws Exception */ public void test_toString2() throws Exception { InputStream in = new SequenceInputStream( new ByteArrayInputStream("aa".getBytes()), new ByteArrayInputStream("a".getBytes())); assertEquals("YWFh", TextHelper.toString(in)); } /** * Test the InputStream -> BASE64 StringBuffer code * @throws Exception */ public void test_toStringBuffer() throws Exception { StringBuffer buffer = new StringBuffer(); TextHelper.toStringBuffer(fis, buffer); assertTrue(buffer.length() > SIZE); String text = buffer.toString(); assertTrue(text.length() == EXPECTED_BASE64_SIZE); assertTrue(text.startsWith(EXPECTED_STARTS_WITH)); } /** * Test the OMText -> StringBuffer code * @throws Exception */ public void test_fromOMText() throws Exception { OMFactory factory = OMAbstractFactory.getOMFactory(); FileDataSource fds = new FileDataSource(file); DataHandler dh = new DataHandler(fds); OMText omText = factory.createOMText(dh, true); StringBuffer buffer = new StringBuffer(); TextHelper.toStringBuffer(omText, buffer); assertTrue(buffer.length() > SIZE); String text = buffer.toString(); assertTrue(text.length() == EXPECTED_BASE64_SIZE); assertTrue(text.startsWith(EXPECTED_STARTS_WITH)); } /** * Test binary bytes -> OMText code * @throws Exception */ public void test_toOMText_fromBytes_optimized() throws Exception { // Start with a binary bytes stream InputStream is = new FileInputStream(file); // Get bytes ByteArrayOutputStream baos = new ByteArrayOutputStream(); BufferUtils.inputStream2OutputStream(is, baos); byte[] b = baos.toByteArray(); // Create an OMText node from the binary bytes OMFactory factory = OMAbstractFactory.getOMFactory(); OMText omText = TextHelper.toOMText(b, 0, b.length, factory, true, this.tempDir); // Ensure text is optimized assertTrue(omText != null); assertTrue(omText.isOptimized()); // Now check the text StringBuffer buffer = new StringBuffer(); TextHelper.toStringBuffer(omText, buffer); assertTrue(buffer.length() > SIZE); String text = buffer.toString(); assertTrue(text.length() == EXPECTED_BASE64_SIZE); assertTrue(text.startsWith(EXPECTED_STARTS_WITH)); } /** * Test binary bytes -> OMText code * @throws Exception */ public void test_toOMText_fromBytes_notOptimized() throws Exception { // Start with a binary bytes stream InputStream is = new FileInputStream(file); // Get bytes ByteArrayOutputStream baos = new ByteArrayOutputStream(); BufferUtils.inputStream2OutputStream(is, baos); byte[] b = baos.toByteArray(); // Create an OMText node from the binary bytes OMFactory factory = OMAbstractFactory.getOMFactory(); OMText omText = TextHelper.toOMText(b, 0, b.length, factory, false); // Ensure text is optimized assertTrue(omText != null); assertTrue(!omText.isOptimized()); // Now check the text StringBuffer buffer = new StringBuffer(); TextHelper.toStringBuffer(omText, buffer); assertTrue(buffer.length() > SIZE); String text = buffer.toString(); assertTrue(text.length() == EXPECTED_BASE64_SIZE); assertTrue(text.startsWith(EXPECTED_STARTS_WITH)); } }axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/util/OMElementHelperTest.java0000644000000000000000000000525411131637476031175 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.util; import org.apache.axiom.om.OMAbstractFactory; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.impl.builder.StAXOMBuilder; import org.apache.axiom.om.impl.dom.DOOMAbstractFactory; import org.custommonkey.xmlunit.XMLTestCase; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import java.io.FileInputStream; import java.io.FileNotFoundException; public class OMElementHelperTest extends XMLTestCase { private String testXMLFilePath = "test-resources/soap/soapmessage.xml"; public void testImportOMElement() { try { XMLStreamReader xmlStreamReader = XMLInputFactory.newInstance() .createXMLStreamReader(new FileInputStream(testXMLFilePath)); OMElement documentElement = new StAXOMBuilder(OMAbstractFactory.getOMFactory(), xmlStreamReader) .getDocumentElement(); // first lets try to import an element created from llom in to llom factory. This should return the same element assertTrue(ElementHelper .importOMElement(documentElement, OMAbstractFactory.getOMFactory()) == documentElement); // then lets pass in an OMElement created using llom and pass DOOMFactory OMElement importedElement = ElementHelper .importOMElement(documentElement, DOOMAbstractFactory.getOMFactory()); assertTrue(importedElement != documentElement); assertTrue(importedElement.getOMFactory().getClass().isInstance( DOOMAbstractFactory.getOMFactory())); } catch (XMLStreamException e) { e.printStackTrace(); fail(); } catch (FileNotFoundException e) { e.printStackTrace(); fail(); } } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/util/CopyUtilsTest.java0000644000000000000000000002206011131637476030135 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.util; import org.apache.axiom.om.AbstractTestCase; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMNode; import org.apache.axiom.om.OMSourcedElement; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.om.TestConstants; import org.apache.axiom.om.ds.ByteArrayDataSource; import org.apache.axiom.soap.SOAPBody; import org.apache.axiom.soap.SOAPEnvelope; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPHeader; import org.apache.axiom.soap.SOAPHeaderBlock; import org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLStreamReader; import java.io.InputStream; import java.util.Iterator; /** * Validates CopyUtils utility */ public class CopyUtilsTest extends AbstractTestCase { public CopyUtilsTest(String testName) { super(testName); } public void testSample1() throws Exception { copyAndCheck(createEnvelope(getTestResource(TestConstants.SAMPLE1)), true); } public void testSOAPMESSAGE() throws Exception { copyAndCheck(createEnvelope(getTestResource(TestConstants.SOAP_SOAPMESSAGE)), true); } public void testSOAPMESSAGE1() throws Exception { // Ignore the serialization comparison copyAndCheck(createEnvelope(getTestResource(TestConstants.SOAP_SOAPMESSAGE1)), false); } public void testWHITESPACE_MESSAGE() throws Exception { copyAndCheck(createEnvelope(getTestResource(TestConstants.WHITESPACE_MESSAGE)), true); } public void testMINIMAL_MESSAGE() throws Exception { copyAndCheck(createEnvelope(getTestResource(TestConstants.MINIMAL_MESSAGE)), true); } public void testREALLY_BIG_MESSAGE() throws Exception { // Ignore the serialization comparison copyAndCheck(createEnvelope(getTestResource(TestConstants.REALLY_BIG_MESSAGE)), false); } public void testEMPTY_BODY_MESSAGE() throws Exception { copyAndCheck(createEnvelope(getTestResource(TestConstants.EMPTY_BODY_MESSAGE)), true); } public void testOMSE() throws Exception { SOAPEnvelope sourceEnv = createEnvelope(getTestResource(TestConstants.EMPTY_BODY_MESSAGE)); SOAPBody body = sourceEnv.getBody(); // Create a payload String text = "Hello World"; String encoding = "UTF-8"; ByteArrayDataSource bads = new ByteArrayDataSource(text.getBytes(encoding), encoding); OMNamespace ns = body.getOMFactory().createOMNamespace("urn://test", "tns"); OMSourcedElement omse =body.getOMFactory().createOMElement(bads, "payload", ns); body.addChild(omse); copyAndCheck(sourceEnv, true); } public void testOMSE2() throws Exception { SOAPEnvelope sourceEnv = createEnvelope(getTestResource(TestConstants.EMPTY_BODY_MESSAGE)); SOAPBody body = sourceEnv.getBody(); SOAPHeader header = sourceEnv.getHeader(); String encoding = "UTF-8"; // Create a header OMSE String hdrText = "Hello World"; ByteArrayDataSource badsHdr = new ByteArrayDataSource(hdrText.getBytes(encoding), encoding); OMNamespace hdrNS = header.getOMFactory().createOMNamespace("urn://test", "hdr"); SOAPFactory sf = (SOAPFactory) header.getOMFactory(); SOAPHeaderBlock shb = sf.createSOAPHeaderBlock("myheader", hdrNS, badsHdr); shb.setProcessed(); // test setting processing flag header.addChild(shb); // Create a payload String text = "Hello World"; ByteArrayDataSource bads = new ByteArrayDataSource(text.getBytes(encoding), encoding); OMNamespace ns = body.getOMFactory().createOMNamespace("urn://test", "tns"); OMSourcedElement omse =body.getOMFactory().createOMElement(bads, "payload", ns); body.addChild(omse); copyAndCheck(sourceEnv, true); // The source SOAPHeaderBlock should not be expanded in the process assertTrue(shb.isExpanded() == false); } /** * Create SOAPEnvelope from the test in the indicated file * @param in * @return * @throws Exception */ protected SOAPEnvelope createEnvelope(InputStream in) throws Exception { XMLStreamReader parser = XMLInputFactory.newInstance().createXMLStreamReader(in); OMXMLParserWrapper builder = new StAXSOAPModelBuilder(parser, null); SOAPEnvelope sourceEnv = (SOAPEnvelope) builder.getDocumentElement(); return sourceEnv; } /** * Make a copy of the source envelope and validate the target tree * @param sourceEnv * @param checkText (if true, check the serialization of the source and target tree) * @throws Exception */ protected void copyAndCheck(SOAPEnvelope sourceEnv, boolean checkText) throws Exception { SOAPEnvelope targetEnv = CopyUtils.copy(sourceEnv); identityCheck(sourceEnv, targetEnv, ""); String sourceText = sourceEnv.toString(); String targetText = targetEnv.toString(); // In some cases the serialization code or internal hashmaps cause // attributes or namespaces to be in a different order...accept this for now. if (checkText) { assertTrue("\nSource=" + sourceText + "\nTarget=" + targetText, sourceText.equals(targetText)); } } /** * Check the identity of each object in the tree * @param source * @param target * @param depth */ protected void identityCheck(OMNode source, OMNode target, String depth) { // System.out.println(depth + source.getClass().getName()); if (source instanceof OMElement) { if (source instanceof OMSourcedElement) { assertTrue("Source = " + source.getClass().getName() + "Target = " + target.getClass().getName(), target instanceof OMSourcedElement); assertTrue("Source Expansion = " +((OMSourcedElement)source).isExpanded() + "Target Expansion = " + ((OMSourcedElement)target).isExpanded(), ((OMSourcedElement)source).isExpanded() == ((OMSourcedElement)target).isExpanded()); if (((OMSourcedElement)source).isExpanded()) { Iterator i = ((OMElement) source).getChildren(); Iterator j = ((OMElement) target).getChildren(); while(i.hasNext() && j.hasNext()) { OMNode sourceChild = (OMNode) i.next(); OMNode targetChild = (OMNode) j.next(); identityCheck(sourceChild, targetChild, depth + " "); } assertTrue("Source and Target have different number of children", i.hasNext() == j.hasNext()); } } else { assertTrue("Source = " + source.getClass().getName() + "Target = " + target.getClass().getName(), source.getClass().getName().equals( target.getClass().getName())); Iterator i = ((OMElement) source).getChildren(); Iterator j = ((OMElement) target).getChildren(); while(i.hasNext() && j.hasNext()) { OMNode sourceChild = (OMNode) i.next(); OMNode targetChild = (OMNode) j.next(); identityCheck(sourceChild, targetChild, depth + " "); } assertTrue("Source and Target have different number of children", i.hasNext() == j.hasNext()); } } else { assertTrue("Source = " + source.getClass().getName() + "Target = " + target.getClass().getName(), source.getClass().getName().equals( target.getClass().getName())); } } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/util/OMAttributeHelperTest.java0000644000000000000000000000742711131637476031553 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.util; import junit.framework.TestCase; import org.apache.axiom.om.OMAbstractFactory; import org.apache.axiom.om.OMAttribute; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.impl.dom.DOOMAbstractFactory; import javax.xml.namespace.QName; public class OMAttributeHelperTest extends TestCase { public void testImportOMAttribute() { //Convert from OM to DOOM. OMFactory omf = OMAbstractFactory.getOMFactory(); OMNamespace ns1 = omf.createOMNamespace("http://nsurl", "prefix"); OMAttribute attr1 = omf.createOMAttribute("attr1", ns1, "attr1value"); OMFactory doomf = DOOMAbstractFactory.getOMFactory(); OMElement ome1 = doomf.createOMElement("element", ns1.getNamespaceURI(), ns1.getPrefix()); AttributeHelper.importOMAttribute(attr1, ome1); assertNotSame(attr1, ome1.getAttribute(attr1.getQName())); assertEquals(attr1.getAttributeValue(), ome1.getAttribute(attr1.getQName()).getAttributeValue()); //Convert from DOOM to OM. OMNamespace ns2 = doomf.createOMNamespace("http://nsurl", "prefix"); OMAttribute attr2 = doomf.createOMAttribute("attr2", ns2, "attr2value"); OMElement ome2 = omf.createOMElement("element", ns2.getNamespaceURI(), ns2.getPrefix()); AttributeHelper.importOMAttribute(attr2, ome2); assertNotSame(attr2, ome2.getAttribute(attr2.getQName())); assertEquals(attr2.getAttributeValue(), ome2.getAttribute(attr2.getQName()).getAttributeValue()); //OM only. OMNamespace ns3 = omf.createOMNamespace("http://nsurl", "prefix"); OMAttribute attr3 = omf.createOMAttribute("attr3", ns3, "attr3value"); OMElement ome3 = omf.createOMElement("element", ns3.getNamespaceURI(), ns3.getPrefix()); AttributeHelper.importOMAttribute(attr3, ome3); assertSame(attr3, ome3.getAttribute(attr3.getQName())); //DOOM only. OMNamespace ns4 = doomf.createOMNamespace("http://nsurl", "prefix"); OMAttribute attr4 = doomf.createOMAttribute("attr4", ns4, "attr4value"); OMElement ome4 = doomf.createOMElement("element", ns4.getNamespaceURI(), ns4.getPrefix()); AttributeHelper.importOMAttribute(attr4, ome4); assertSame(attr4, ome4.getAttribute(attr4.getQName())); } public void testDetachedElement() { OMNamespace top = DOOMAbstractFactory.getOMFactory().createOMNamespace("urn:test1", "t1"); OMElement ome = DOOMAbstractFactory.getOMFactory().createOMElement("test", top); OMElement child = DOOMAbstractFactory.getOMFactory().createOMElement(new QName("test"), ome); OMAttribute oma = child.addAttribute("attr", "value", top); OMElement target = OMAbstractFactory.getOMFactory().createOMElement("test2", "urn:test2", "t2"); AttributeHelper.importOMAttribute(oma, target); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/NamespaceTest.java0000644000000000000000000003664311131637476027135 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om; import org.apache.axiom.om.impl.builder.StAXOMBuilder; import org.apache.axiom.om.impl.llom.factory.OMXMLBuilderFactory; import org.apache.axiom.om.impl.llom.util.AXIOMUtil; import org.custommonkey.xmlunit.XMLTestCase; import org.xml.sax.SAXException; import javax.xml.namespace.QName; import javax.xml.parsers.ParserConfigurationException; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLOutputFactory; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import javax.xml.stream.XMLStreamWriter; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.Reader; import java.io.StringReader; import java.io.StringWriter; import java.util.Iterator; public class NamespaceTest extends XMLTestCase { public void testNoPrefixNamespaces() throws IOException, ParserConfigurationException, SAXException { String expectedXML = "" + ""; OMFactory omFactory = OMAbstractFactory.getOMFactory(); OMNamespace axis2NS = omFactory.createOMNamespace("http://ws.apache.org/axis2", "axis2"); OMElement docElement = omFactory.createOMElement("DocumentElement", axis2NS); OMNamespace firstOrphanNS = docElement.declareNamespace("http://undefined-ns-1.org", null); docElement.declareNamespace("http://undefined-ns-2.org", null); omFactory.createOMElement("FirstChild", axis2NS, docElement); OMElement secondChild = omFactory .createOMElement(new QName("http://undefined-ns-2.org", "SecondChild"), docElement); secondChild.addAttribute("testAttr", "testValue", firstOrphanNS); Iterator allDeclaredNamespaces = docElement.getAllDeclaredNamespaces(); int namespaceCount = 0; while (allDeclaredNamespaces.hasNext()) { OMNamespace omNamespace = (OMNamespace) allDeclaredNamespaces.next(); namespaceCount++; } assertTrue(namespaceCount == 3); assertTrue(secondChild.getNamespace().getPrefix().equals( docElement.findNamespace("http://undefined-ns-2.org", null).getPrefix())); } public void attributeNSTest() { OMFactory fac = OMAbstractFactory.getOMFactory(); OMNamespace ns1 = fac.createOMNamespace("http://test.org", ""); OMNamespace ns2 = fac.createOMNamespace("http://test2.org", null); OMElement elem = fac.createOMElement("test", ns1); elem.addAttribute(fac.createOMAttribute("testAttr", ns2, "attrValue")); OMNamespace namespace = elem.findNamespace("http://test.org", null); assertTrue(namespace != null && namespace.getPrefix() != null && "".equals(namespace.getPrefix())); OMNamespace namespace2 = elem.findNamespace("http://test2.org", null); assertTrue(namespace2 != null && namespace2.getPrefix() != null && "".equals(namespace2.getPrefix())); } /** * Here a namespace will be defined with a certain prefix in the root element. But later the * same ns is defined with the same uri in a child element, but this time with a different * prefix. */ public void testNamespaceProblem() throws XMLStreamException { /** * * * * */ OMFactory omFac = OMAbstractFactory.getOMFactory(); OMElement documentElement = omFac.createOMElement("RootElement", null); documentElement.declareNamespace("http://ws.apache.org/axis2", "ns1"); OMNamespace ns = omFac.createOMNamespace("http://ws.apache.org/axis2", "ns2"); omFac.createOMElement("ChildElement", ns, documentElement); assertTrue(documentElement.toStringWithConsume().indexOf("ns2:ChildElement") > -1); } public void testNamespaceProblem2() throws XMLStreamException { /** * * * * * */ OMFactory omFac = OMAbstractFactory.getOMFactory(); OMElement documentElement = omFac.createOMElement("RootElement", null); documentElement.declareDefaultNamespace("http://one.org"); OMNamespace ns = omFac.createOMNamespace("http://ws.apache.org/axis2", "ns2"); OMElement childOne = omFac.createOMElement("ChildElementOne", ns, documentElement); childOne.declareDefaultNamespace("http://two.org"); OMElement childTwo = omFac.createOMElement("ChildElementTwo", null, childOne); childTwo.declareDefaultNamespace("http://one.org"); assertEquals(2, getNumberOfOccurrences(documentElement.toStringWithConsume(), "xmlns=\"http://one.org\"")); } public void testNamespaceProblem3() throws XMLStreamException { /** * * * * * */ OMFactory omFac = OMAbstractFactory.getOMFactory(); OMElement documentElement = omFac.createOMElement("RootElement", null); OMNamespace ns1 = documentElement.declareNamespace("http://one.org", "ns1"); OMNamespace ns2 = documentElement.declareNamespace("http://one.org", "ns2"); OMElement childOne = omFac.createOMElement("ChildElementOne", ns2, documentElement); childOne.declareDefaultNamespace("http://one.org"); OMElement childTwo = omFac.createOMElement("ChildElementTwo", ns1, childOne); assertEquals(1, getNumberOfOccurrences(documentElement.toStringWithConsume(), "xmlns:ns2=\"http://one.org\"")); } public void testNamespaceProblem4() throws Exception { String xml = "750"; XMLStreamReader parser = XMLInputFactory.newInstance() .createXMLStreamReader(new ByteArrayInputStream(xml.getBytes())); OMXMLParserWrapper builder = OMXMLBuilderFactory.createStAXOMBuilder(OMAbstractFactory.getOMFactory(), parser); OMElement root = builder.getDocumentElement(); String actualXML = root.toString(); assertTrue(actualXML.indexOf("xmlns=\"\"") != -1); } public void testNamespaceProblem5() { String xml = "bob123456789passwd"; try { OMElement documentElement = new StAXOMBuilder(new ByteArrayInputStream(xml.getBytes())) .getDocumentElement(); String actualXML = documentElement.toString(); assertXMLEqual(xml, actualXML); } catch (Exception e) { e.printStackTrace(); fail(); } } private int getNumberOfOccurrences(String xml, String pattern) { int index = -1; int count = 0; while ((index = xml.indexOf(pattern, index + 1)) != -1) { count++; } return count; } public void testNamespaceProblem6() { OMFactory fac = OMAbstractFactory.getOMFactory(); //TODO: Find the constants for "Parameter" and "name" OMElement paramElement = fac.createOMElement("Parameter", null); OMNamespace ns = paramElement.declareDefaultNamespace(""); paramElement.addAttribute(fac.createOMAttribute("name", null, "someName")); for (int i = 0; i < 5; i++) { // Create the action element OMElement actionElem = fac.createOMElement( "Action", ns); for (int j = 0; j < 5; j++) { // Create an element with the name of the key OMElement elem = fac.createOMElement("someKey" + j, ns); // Set the text value of the element elem.setText("someValue" + j); // Add the element as a child of this action element actionElem.addChild(elem); } paramElement.addChild(actionElem); } } /** * This is re-producing and testing the bug mentioned in http://issues.apache.org/jira/browse/WSCOMMONS-74 */ public void testNamespaceProblem7() { String expectedString = "" + "John" + "34" + "50" + ""; OMFactory fac = OMAbstractFactory.getOMFactory(); OMNamespace ns = fac.createOMNamespace("http://ws.apache.org/axis2/apacheconasia/06", ""); OMElement personElem = fac.createOMElement("person", ns); OMElement nameElem = fac.createOMElement("name", ns); nameElem.setText("John"); OMElement ageElem = fac.createOMElement("age", ns); ageElem.setText("34"); OMElement weightElem = fac.createOMElement("weight", ns); weightElem.setText("50"); //Add children to the person element personElem.addChild(nameElem); personElem.addChild(ageElem); personElem.addChild(weightElem); String result = personElem.toString(); try { assertXMLEqual(expectedString, result); } catch (Exception e) { fail(e.getMessage()); } } /** * This is re-producing and testing the bug mentioned in http://issues.apache.org/jira/browse/WSCOMMONS-74 */ public void testNamespaceProblem8() { String expectedXML = "John3450"; OMFactory fac = OMAbstractFactory.getOMFactory(); OMNamespace ns = fac.createOMNamespace("http://ws.apache.org/axis2/apacheconasia/06", ""); OMElement personElem = fac.createOMElement("person", ns); //Create and add an unqualified element OMElement nameElem = fac.createOMElement("name", null); nameElem.setText("John"); personElem.addChild(nameElem); OMElement ageElem = fac.createOMElement("age", ns); ageElem.setText("34"); OMElement weightElem = fac.createOMElement("weight", ns); weightElem.setText("50"); personElem.addChild(ageElem); personElem.addChild(weightElem); try { assertXMLEqual(expectedXML, personElem.toString()); } catch (Exception e) { fail(e.getMessage()); } } public void testOMElementSerialize() throws Exception { String content = " \n" + " \n" + " baz \n" + " baz \n" + " baz \n" + ""; // read and build XML content Reader reader = new StringReader(content); XMLStreamReader parser = XMLInputFactory.newInstance().createXMLStreamReader(reader); StAXOMBuilder builder = new StAXOMBuilder(parser); OMElement element = builder.getDocumentElement(); int count = 0; Iterator iter = element.getChildElements(); while (iter.hasNext()) { OMElement child = (OMElement) iter.next(); assertTrue(child.getNamespace().getNamespaceURI().equals("urn:bar")); count++; } assertEquals(3, count); // serialize it back to a String StringWriter stringWriter = new StringWriter(); XMLOutputFactory xmlOutputFactory = XMLOutputFactory.newInstance(); xmlOutputFactory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, Boolean.FALSE); XMLStreamWriter xmlWriter = xmlOutputFactory.createXMLStreamWriter(stringWriter); element.serialize(xmlWriter); String output = stringWriter.toString(); content = output; // reread and rebuild XML content reader = new StringReader(output); parser = XMLInputFactory.newInstance().createXMLStreamReader(reader); builder = new StAXOMBuilder(parser); element = builder.getDocumentElement(); count = 0; iter = element.getChildElements(); while (iter.hasNext()) { OMElement child = (OMElement) iter.next(); assertTrue(child.getNamespace().getNamespaceURI().equals("urn:bar")); count++; } assertEquals(3, count); } public void testAxis2_3155() { try { String xmlString = "" + "" + "Hello" + "Hello" + "" + ""; OMElement elem = AXIOMUtil.stringToOM(xmlString); System.out.println("--- Calling toStringWithConsume() ---\n"); System.out.println(elem.toStringWithConsume()); xmlString = "" + "" + "Hello" + "Hello" + "" + ""; elem = AXIOMUtil.stringToOM(xmlString); System.out.println("\n--- Calling toString() ---\n"); System.out.println(elem.toString()); } catch (Exception e) { e.printStackTrace(); } } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/OMElementCloneTest.java0000644000000000000000000001046211131637476030036 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om; import org.apache.axiom.om.impl.builder.StAXOMBuilder; import org.apache.axiom.soap.SOAPBody; import org.apache.axiom.soap.SOAPEnvelope; import org.w3c.dom.Document; import org.xml.sax.SAXException; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import java.io.ByteArrayInputStream; import java.io.IOException; public class OMElementCloneTest extends AbstractTestCase { public void testElementCloningWithoutUsingOMElementMethod() throws Exception { SOAPEnvelope soapEnvelope = (SOAPEnvelope) OMTestUtils.getOMBuilder( getTestResource(TestConstants.SOAP_SOAPMESSAGE)) .getDocumentElement(); SOAPBody body = soapEnvelope.getBody(); OMElement firstClonedBodyElement = new StAXOMBuilder(body.getXMLStreamReader()).getDocumentElement(); OMElement secondClonedBodyElement = new StAXOMBuilder(body.getXMLStreamReader()).getDocumentElement(); // first check whether both have the same information String firstClonedBodyElementText = firstClonedBodyElement.toString(); String secondClonedBodyElementText = secondClonedBodyElement.toString(); String bodyText = body.toString(); assertXMLEqual(newDocument(bodyText), newDocument(firstClonedBodyElementText)); assertXMLEqual(newDocument(bodyText), newDocument(secondClonedBodyElementText)); assertXMLEqual(newDocument(firstClonedBodyElementText), newDocument(secondClonedBodyElementText)); // lets check some links. They must not be equal assertNotSame(body.getParent(), firstClonedBodyElement.getParent()); assertNotSame(body.getParent(), secondClonedBodyElement.getParent()); assertNotSame(firstClonedBodyElement.getParent(), secondClonedBodyElement.getParent()); } public void testElementCloningUsingOMElementMethod() throws Exception { SOAPEnvelope soapEnvelope = (SOAPEnvelope) OMTestUtils.getOMBuilder( getTestResource(TestConstants.SOAP_SOAPMESSAGE)) .getDocumentElement(); SOAPBody body = soapEnvelope.getBody(); OMElement firstClonedBodyElement = body.cloneOMElement(); OMElement secondClonedBodyElement = body.cloneOMElement(); // first check whether both have the same information assertXMLEqual(newDocument(body.toString()), newDocument(firstClonedBodyElement.toString())); assertXMLEqual(newDocument(body.toString()), newDocument(secondClonedBodyElement.toString())); assertXMLEqual(newDocument(firstClonedBodyElement.toString()), newDocument(secondClonedBodyElement.toString())); // lets check some links. They must not be equal assertNotSame(body.getParent(), firstClonedBodyElement.getParent()); assertNotSame(body.getParent(), secondClonedBodyElement.getParent()); assertNotSame(firstClonedBodyElement.getParent(), secondClonedBodyElement.getParent()); } public Document newDocument(String xml) throws ParserConfigurationException, SAXException, IOException { DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); dbf.setNamespaceAware(true); DocumentBuilder db = dbf.newDocumentBuilder(); return db.parse(new ByteArrayInputStream(xml.getBytes())); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/infoset/0000755000000000000000000000000011131637476025171 5ustar rootrootaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/infoset/XMLConformanceUnit.java0000644000000000000000000001015211131637476031506 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.infoset; import org.apache.axiom.om.OMAbstractFactory; import org.apache.axiom.om.OMDocument; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.impl.builder.StAXOMBuilder; import org.apache.axiom.om.impl.llom.factory.OMXMLBuilderFactory; import org.custommonkey.xmlunit.Diff; import org.custommonkey.xmlunit.XMLTestCase; import org.w3c.dom.Document; import org.xml.sax.EntityResolver; import org.xml.sax.InputSource; import org.xml.sax.SAXException; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import javax.xml.stream.XMLInputFactory; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileReader; import java.io.IOException; import java.io.InputStreamReader; public class XMLConformanceUnit extends XMLTestCase implements EntityResolver { private String filePath; private File directory; public XMLConformanceUnit(String filePath, String testName) { super(testName); this.filePath = filePath; this.directory = new File(filePath).getParentFile(); } public void testSingleFileConformance() throws Exception { OMElement rootElement; System.out.println("XML File:" + filePath); XMLInputFactory factory = XMLInputFactory.newInstance(); // factory.setProperty("report-cdata-event", Boolean.TRUE); StAXOMBuilder staxOMBuilder = OMXMLBuilderFactory. createStAXOMBuilder(OMAbstractFactory.getOMFactory(), factory.createXMLStreamReader( new FileInputStream(filePath))); rootElement = staxOMBuilder.getDocumentElement(); ByteArrayOutputStream baos = new ByteArrayOutputStream(); ((OMDocument) rootElement.getParent()).serialize(baos); InputSource resultXML = new InputSource(new InputStreamReader( new ByteArrayInputStream(baos.toByteArray()))); Document dom1 = newDocument(new InputSource(new FileReader(filePath))); Document dom2 = newDocument(resultXML); Diff diff = compareXML(dom1, dom2); assertXMLEqual(diff, true); } /** * Method newDocument * * @param in * @throws javax.xml.parsers.ParserConfigurationException * * @throws org.xml.sax.SAXException * @throws java.io.IOException */ public Document newDocument(InputSource in) throws ParserConfigurationException, SAXException, IOException { DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); dbf.setNamespaceAware(true); DocumentBuilder db = dbf.newDocumentBuilder(); db.setEntityResolver(this); return db.parse(in); } public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException { File f = new File(directory, systemId.substring(systemId.lastIndexOf('/'))); return new InputSource(new FileInputStream(f)); } public String getName() { String name = filePath; if (name.lastIndexOf("xmlconf") != -1) name = name.substring(name.lastIndexOf("xmlconf")); return name.replace('\\', '/'); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/infoset/XMLConformanceTest.java0000644000000000000000000000364511131637476031517 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.infoset; import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; import java.io.File; public class XMLConformanceTest extends TestCase { public static Test suite() throws Exception { TestSuite suite = new TestSuite(); File testSuiteDirectory = new File("test-resources/XMLSuite/xmlconf"); if (testSuiteDirectory.exists()) { ProcessDir(testSuiteDirectory, suite); } return suite; } private static void ProcessDir(File dir, TestSuite suite) throws Exception { if (dir.isDirectory()) { //process all children String[] children = dir.list(); for (int i = 0; i < children.length; i++) { File child = (new File(dir, children[i])); ProcessDir(child, suite); } } else { //check if it's xml file String absPath = dir.getAbsolutePath(); if (absPath.endsWith(".xml")) { suite.addTest(new XMLConformanceUnit(absPath, "testSingleFileConformance")); } } } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/SerializationTest.java0000644000000000000000000003167411131637476030055 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om; import junit.framework.TestCase; import org.apache.axiom.om.impl.OMNodeEx; import org.apache.axiom.om.impl.builder.StAXOMBuilder; import javax.xml.stream.XMLStreamException; import java.io.ByteArrayInputStream; /** * Each of the following tests have a parent "person" and children "name", "age", "weight". The * parent is defined as either: a) a qualified name (QParent) b) an unqualified name (UParent) c) a * qualified name using the default namespace (DParent) *

* Likewise the children are defined as either: a) qualified names (QChildren) b) unqualified * children (UChildren) c) qualified using the default namespace (DChildren) */ public class SerializationTest extends TestCase { private static final String NS = "http://ws.apache.org/axis2/apacheconasia/06"; private static final String PREFIX = "prefix"; public void testDParentDChildren() { OMFactory fac = OMAbstractFactory.getOMFactory(); OMNamespace nsParent = fac.createOMNamespace(NS, ""); OMNamespace nsChildren = fac.createOMNamespace(NS, ""); OMElement personElem = fac.createOMElement("person", nsParent); OMElement nameElem = fac.createOMElement("name", nsChildren); nameElem.setText("John"); OMElement ageElem = fac.createOMElement("age", nsChildren); ageElem.setText("34"); OMElement weightElem = fac.createOMElement("weight", nsChildren); weightElem.setText("50"); //Add children to the person element personElem.addChild(nameElem); personElem.addChild(ageElem); personElem.addChild(weightElem); String xml = personElem.toString(); assertEquals("Incorrect namespace serialization", 2, xml.split("http://ws.apache.org/axis2/apacheconasia/06").length); } public void testDParentUChildren() { OMFactory fac = OMAbstractFactory.getOMFactory(); OMNamespace nsParent = fac.createOMNamespace(NS, ""); OMNamespace nsChildren = fac.createOMNamespace("", ""); OMElement personElem = fac.createOMElement("person", nsParent); OMElement nameElem = fac.createOMElement("name", nsChildren); nameElem.setText("John"); OMElement ageElem = fac.createOMElement("age", nsChildren); ageElem.setText("34"); OMElement weightElem = fac.createOMElement("weight", nsChildren); weightElem.setText("50"); //Add children to the person element personElem.addChild(nameElem); personElem.addChild(ageElem); personElem.addChild(weightElem); String xml = personElem.toString(); assertEquals("Incorrect namespace serialization", 2, xml.split("http://ws.apache.org/axis2/apacheconasia/06").length); assertEquals("Incorrect namespace serialization", 4, xml.split("\"\"").length); } public void testDParentQChildren() { OMFactory fac = OMAbstractFactory.getOMFactory(); OMNamespace nsParent = fac.createOMNamespace(NS, ""); OMNamespace nsChildren = fac.createOMNamespace(NS, PREFIX); OMElement personElem = fac.createOMElement("person", nsParent); OMElement nameElem = fac.createOMElement("name", nsChildren); nameElem.setText("John"); OMElement ageElem = fac.createOMElement("age", nsChildren); ageElem.setText("34"); OMElement weightElem = fac.createOMElement("weight", nsChildren); weightElem.setText("50"); //Add children to the person element personElem.addChild(nameElem); personElem.addChild(ageElem); personElem.addChild(weightElem); String xml = personElem.toString(); assertEquals("Incorrect namespace serialization", 5, xml.split("http://ws.apache.org/axis2/apacheconasia/06").length); } public void testQParentQChildren() { OMFactory fac = OMAbstractFactory.getOMFactory(); OMNamespace nsParent = fac.createOMNamespace(NS, PREFIX); OMNamespace nsChildren = fac.createOMNamespace(NS, PREFIX); OMElement personElem = fac.createOMElement("person", nsParent); OMElement nameElem = fac.createOMElement("name", nsChildren); nameElem.setText("John"); OMElement ageElem = fac.createOMElement("age", nsChildren); ageElem.setText("34"); OMElement weightElem = fac.createOMElement("weight", nsChildren); weightElem.setText("50"); //Add children to the person element personElem.addChild(nameElem); personElem.addChild(ageElem); personElem.addChild(weightElem); String xml = personElem.toString(); assertEquals("Incorrect namespace serialization", 2, xml.split("http://ws.apache.org/axis2/apacheconasia/06").length); } public void testQParentUChildren() { OMFactory fac = OMAbstractFactory.getOMFactory(); OMNamespace nsParent = fac.createOMNamespace(NS, PREFIX); OMNamespace nsChildren = fac.createOMNamespace("", ""); OMElement personElem = fac.createOMElement("person", nsParent); OMElement nameElem = fac.createOMElement("name", nsChildren); nameElem.setText("John"); OMElement ageElem = fac.createOMElement("age", nsChildren); ageElem.setText("34"); OMElement weightElem = fac.createOMElement("weight", nsChildren); weightElem.setText("50"); //Add children to the person element personElem.addChild(nameElem); personElem.addChild(ageElem); personElem.addChild(weightElem); String xml = personElem.toString(); assertEquals("Incorrect default namespace serialization", 2, xml.split("http://ws.apache.org/axis2/apacheconasia/06").length); assertEquals("Incorrect namespace serialization", 1, xml.split("\"\"").length); } public void testQParentDChildren() { OMFactory fac = OMAbstractFactory.getOMFactory(); OMNamespace nsParent = fac.createOMNamespace(NS, PREFIX); OMNamespace nsChildren = fac.createOMNamespace(NS, ""); OMElement personElem = fac.createOMElement("person", nsParent); OMElement nameElem = fac.createOMElement("name", nsChildren); nameElem.setText("John"); OMElement ageElem = fac.createOMElement("age", nsChildren); ageElem.setText("34"); OMElement weightElem = fac.createOMElement("weight", nsChildren); weightElem.setText("50"); //Add children to the person element personElem.addChild(nameElem); personElem.addChild(ageElem); personElem.addChild(weightElem); String xml = personElem.toString(); assertEquals("Incorrect default namespace serialization", 5, xml.split("http://ws.apache.org/axis2/apacheconasia/06").length); } public void testUParentUChildren() { OMFactory fac = OMAbstractFactory.getOMFactory(); OMNamespace nsParent = fac.createOMNamespace("", ""); OMNamespace nsChildren = fac.createOMNamespace("", ""); OMElement personElem = fac.createOMElement("person", nsParent); OMElement nameElem = fac.createOMElement("name", nsChildren); nameElem.setText("John"); OMElement ageElem = fac.createOMElement("age", nsChildren); ageElem.setText("34"); OMElement weightElem = fac.createOMElement("weight", nsChildren); weightElem.setText("50"); //Add children to the person element personElem.addChild(nameElem); personElem.addChild(ageElem); personElem.addChild(weightElem); String xml = personElem.toString(); assertEquals("Incorrect default namespace serialization", 1, xml.split("http://ws.apache.org/axis2/apacheconasia/06").length); assertEquals("Incorrect namespace serialization", 1, xml.split("\"\"").length); } public void testUParentQChildren() { OMFactory fac = OMAbstractFactory.getOMFactory(); OMNamespace nsParent = fac.createOMNamespace("", ""); OMNamespace nsChildren = fac.createOMNamespace(NS, PREFIX); OMElement personElem = fac.createOMElement("person", nsParent); OMElement nameElem = fac.createOMElement("name", nsChildren); nameElem.setText("John"); OMElement ageElem = fac.createOMElement("age", nsChildren); ageElem.setText("34"); OMElement weightElem = fac.createOMElement("weight", nsChildren); weightElem.setText("50"); //Add children to the person element personElem.addChild(nameElem); personElem.addChild(ageElem); personElem.addChild(weightElem); String xml = personElem.toString(); assertEquals("Incorrect default namespace serialization", 4, xml.split("http://ws.apache.org/axis2/apacheconasia/06").length); assertEquals("Incorrect namespace serialization", 1, xml.split("\"\"").length); } public void testUParentDChildren() { OMFactory fac = OMAbstractFactory.getOMFactory(); OMNamespace nsParent = fac.createOMNamespace("", ""); OMNamespace nsChildren = fac.createOMNamespace(NS, PREFIX); OMElement personElem = fac.createOMElement("person", nsParent); OMElement nameElem = fac.createOMElement("name", nsChildren); nameElem.setText("John"); OMElement ageElem = fac.createOMElement("age", nsChildren); ageElem.setText("34"); OMElement weightElem = fac.createOMElement("weight", nsChildren); weightElem.setText("50"); //Add children to the person element personElem.addChild(nameElem); personElem.addChild(ageElem); personElem.addChild(weightElem); String xml = personElem.toString(); assertEquals("Incorrect namespace serialization", 4, xml.split("http://ws.apache.org/axis2/apacheconasia/06").length); assertEquals("Incorrect namespace serialization", 1, xml.split("\"\"").length); } /** * Special case when OMElement is created with a null OMNamespace. In this case, that element * must always belongs to the default, default namespace */ public void testNullOMNamespace() { OMFactory fac = OMAbstractFactory.getOMFactory(); OMNamespace ns = fac.createOMNamespace("http://ws.apache.org/axis2/apacheconasia/06", ""); OMElement personElem = fac.createOMElement("person", ns); //Create and add using null namespace...this should pick up default namespace from parent OMElement nameElem = fac.createOMElement("name", null); nameElem.setText("John"); personElem.addChild(nameElem); String xml = personElem.toString(); assertEquals("Incorrect namespace serialization", 2, xml.split("http://ws.apache.org/axis2/apacheconasia/06").length); assertEquals("Incorrect serialization", 2, xml.split("xmlns=\"\"").length); } public void testOMSerializationWithTwoNonBuiltOMElements() { try { String sampleXMLOne = "ChildName"; String sampleXMLTwo = "ChildName"; String expectedXML = "ChildNameChildName"; OMFactory omFactory = OMAbstractFactory.getOMFactory(); OMElement rootElement = omFactory.createOMElement("Root", null); OMElement childOne = new StAXOMBuilder(new ByteArrayInputStream(sampleXMLOne.getBytes())) .getDocumentElement(); ((OMNodeEx) childOne).setParent(null); rootElement.addChild(childOne); OMElement childTwo = new StAXOMBuilder(new ByteArrayInputStream(sampleXMLTwo.getBytes())) .getDocumentElement(); ((OMNodeEx) childTwo).setParent(null); rootElement.addChild(childTwo); assertTrue(expectedXML.equals(rootElement.toString())); } catch (XMLStreamException e) { e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates. } } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/IteratorTest.java0000644000000000000000000002116411131637476027022 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om; import org.apache.axiom.om.impl.builder.StAXOMBuilder; import org.apache.axiom.om.impl.llom.factory.OMLinkedListImplFactory; import org.apache.axiom.soap.SOAP11Constants; import javax.activation.DataHandler; import javax.activation.FileDataSource; import javax.xml.namespace.QName; import javax.xml.stream.XMLInputFactory; import java.io.File; import java.util.Iterator; public class IteratorTest extends AbstractTestCase { private OMElement envelope = null; public IteratorTest(String testName) { super(testName); } protected void setUp() throws Exception { //lets use a plain OM factory envelope = new StAXOMBuilder(new OMLinkedListImplFactory(), XMLInputFactory.newInstance().createXMLStreamReader( getTestResource( TestConstants.SOAP_SOAPMESSAGE1))) .getDocumentElement(); } protected void tearDown() throws Exception { envelope = null; } /** Test the plain iterator which includes all the children (including the texts) */ public void testIterator() { OMElement elt = envelope; Iterator iter = elt.getChildren(); int counter = 0; while (iter.hasNext()) { counter ++; assertNotNull("Must return not null objects!", iter.next()); } assertEquals("This element should contain only five children including the text ", 5, counter); } /** Test the element iterator */ public void testElementIterator() { OMElement elt = envelope; Iterator iter = elt.getChildElements(); int counter = 0; while (iter.hasNext()) { counter ++; Object o = iter.next(); assertNotNull("Must return not null objects!", o); assertTrue("All these should be elements!", ((OMNode) o).getType() == OMNode.ELEMENT_NODE); } assertEquals("This element should contain only two elements ", 2, counter); } /** Test the element iterator */ public void testElementQNameIterator() { OMElement elt = envelope; QName qname = new QName(SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI, SOAP11Constants.BODY_LOCAL_NAME); Iterator iter = elt.getChildrenWithName(qname); int counter = 0; while (iter.hasNext()) { counter ++; Object o = iter.next(); assertNotNull("Must return not null objects!", o); assertTrue("All these should be elements!", ((OMNode) o).getType() == OMNode.ELEMENT_NODE); } assertEquals("This element should contain only one element with the given QName ", 1, counter); } /** test the remove exception behavior */ public void testIteratorRemove1() { OMElement elt = envelope; Iterator iter = elt.getChildren(); //this is supposed to throw an illegal state exception try { iter.remove(); fail("remove should throw an exception"); } catch (IllegalStateException e) { //ok. this is what should happen } } /** test the remove exception behavior, consecutive remove calls */ public void testIteratorRemove2() { OMElement elt = envelope; Iterator iter = elt.getChildren(); if (iter.hasNext()) { iter.next(); } iter.remove(); //this call must generate an exception try { iter.remove(); fail("calling remove twice without a call to next is prohibited"); } catch (IllegalStateException e) { //ok if we come here :) } } /** Remove all! */ public void testIteratorRemove3() { OMElement elt = envelope; Iterator iter = elt.getChildren(); while (iter.hasNext()) { iter.next(); iter.remove(); } iter = elt.getChildren(); if (iter.hasNext()) { //we shouldn't reach here! fail("No children should remain after removing all!"); } } /** test whether the children count reduces. */ public void testIteratorRemove4() { OMElement elt = envelope; Iterator iter = elt.getChildren(); int firstChildrenCount = 0; int secondChildrenCount = 0; while (iter.hasNext()) { assertNotNull(iter.next()); firstChildrenCount++; } //remove the last node iter.remove(); //reloop and check the count //Note- here we should get a fresh iterator since there is no method to //reset the iterator iter = elt.getChildren(); //reset the iterator while (iter.hasNext()) { assertNotNull(iter.next()); secondChildrenCount++; } assertEquals("children count must reduce from 1", firstChildrenCount - 1, secondChildrenCount); } /** This will test the errrors mentioned in @link http://issues.apache.org/jira/browse/WSCOMMONS-12 */ public void testScenariosInJIRA() throws Exception { OMElement mtomSampleElement = createSampleXMLForTesting(); testScenarioOne(mtomSampleElement); testScenarioTwo(mtomSampleElement); } private OMElement createSampleXMLForTesting() throws Exception { File imageSource = new File("test-resources/mtom/img/test.jpg"); OMFactory fac = OMAbstractFactory.getOMFactory(); OMNamespace omNs = fac.createOMNamespace("http://localhost/my", "my"); OMElement data = fac.createOMElement("mtomSample", omNs); OMElement image = fac.createOMElement("image", omNs); FileDataSource dataSource = new FileDataSource(imageSource); DataHandler expectedDH = new DataHandler(dataSource); OMText textData = fac.createOMText(expectedDH, true); image.addChild(textData); OMElement imageName = fac.createOMElement("fileName", omNs); imageName.setText(imageSource.getAbsolutePath()); data.addChild(image); data.addChild(imageName); return data; } private void testScenarioOne(OMElement mtomSampleElement) { Iterator imageElementIter = mtomSampleElement.getChildrenWithName(new QName("image")); // do something with the iterator while (imageElementIter.hasNext()) { imageElementIter.next(); // do nothing } Iterator fileNameElementIter = mtomSampleElement.getChildrenWithName(new QName("fileName")); // do something with the iterator while (fileNameElementIter.hasNext()) { OMNode omNode = (OMNode) fileNameElementIter.next(); if (omNode instanceof OMElement) { OMElement fileNameElement = (OMElement) omNode; assertTrue("fileName".equalsIgnoreCase(fileNameElement.getLocalName())); } } } private void testScenarioTwo(OMElement mtomSampleElement) { Iterator childElementsIter = mtomSampleElement.getChildElements(); boolean imageElementFound = false; boolean fileNameElementFound = false; while (childElementsIter.hasNext()) { OMNode omNode = (OMNode) childElementsIter.next(); if (omNode instanceof OMElement) { OMElement omElement = (OMElement) omNode; if (omElement.getLocalName().equals("fileName")) { fileNameElementFound = true; } else if (omElement.getLocalName().equals("image")) { imageElementFound = true; } } } assertTrue(fileNameElementFound && imageElementFound); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/StaxParserTest.java0000644000000000000000000002046111131637476027324 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om; import org.apache.axiom.om.impl.llom.factory.OMXMLBuilderFactory; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLOutputFactory; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import javax.xml.stream.XMLStreamWriter; import java.io.ByteArrayInputStream; import java.util.Iterator; public class StaxParserTest extends AbstractTestCase { XMLStreamReader parser1; XMLStreamReader parser2; XMLStreamReader parser3; XMLStreamReader parser4; String xmlDocument = "" + "" + " Gladys Kravitz" + "

Anytown, PA
" + " " + " 2005-03-06T14:06:12.697+06:00" + ""; public StaxParserTest(String testName) { super(testName); } protected void setUp() throws Exception { //make the parsers //Parser 1 is a plain parser from the stax implementation parser1 = XMLInputFactory.newInstance().createXMLStreamReader( new ByteArrayInputStream(xmlDocument.getBytes())); //parser 2 is one of our parsers taken with cache. i.e. when the parser //proceeds the object model will be built OMXMLParserWrapper builder = OMXMLBuilderFactory.createStAXOMBuilder( OMAbstractFactory.getSOAP11Factory(), XMLInputFactory.newInstance().createXMLStreamReader( new ByteArrayInputStream(xmlDocument.getBytes()))); parser2 = builder.getDocumentElement().getXMLStreamReader(); //same as parser2 but this time the parser is not a caching parser. Once the //parser proceeds, it's gone forever. OMXMLParserWrapper builder2 = OMXMLBuilderFactory.createStAXOMBuilder( OMAbstractFactory.getSOAP11Factory(), XMLInputFactory.newInstance().createXMLStreamReader( new ByteArrayInputStream(xmlDocument.getBytes()))); parser3 = builder2.getDocumentElement().getXMLStreamReaderWithoutCaching(); //parser4 is another instance of our parser accessing the same stream as parser3. // Note - The implementation returns a *new* instance but with reference to //the same underlying stream! parser4 = builder2.getDocumentElement().getXMLStreamReaderWithoutCaching(); } public void testParserEventsWithCache() throws Exception { //check the initial event assertEquals(parser1.getEventType(), parser2.getEventType()); //check the other events while (parser1.hasNext()) { int parser1Event = parser1.next(); int parser2Event = parser2.next(); assertEquals(parser1Event, parser2Event); } } public void testParserEventsWithoutCache() throws Exception { assertEquals(parser1.getEventType(), parser3.getEventType()); while (parser1.hasNext()) { int parser1Event = parser1.next(); int parser2Event = parser3.next(); assertEquals(parser1Event, parser2Event); } } public void testParserEvents2WithCache() throws Exception { while (parser1.hasNext()) { int parser1Event = parser1.getEventType(); int parser2Event = parser2.getEventType(); parser1.next(); parser2.next(); assertEquals(parser1Event, parser2Event); } } public void testParserBehaviornonCaching() throws Exception { OMXMLParserWrapper builder2 = OMXMLBuilderFactory.createStAXOMBuilder( OMAbstractFactory.getOMFactory(), XMLInputFactory.newInstance().createXMLStreamReader( new ByteArrayInputStream(xmlDocument.getBytes()))); OMElement documentElement = builder2.getDocumentElement(); XMLStreamReader originalParser = documentElement.getXMLStreamReaderWithoutCaching(); //consume the parser. this should force the xml stream to be exhausted without //building the tree while (originalParser.hasNext()) { originalParser.next(); } //try to find the children of the document element. This should produce an //error since the underlying stream is fully consumed without building the object tree Iterator childElements = documentElement.getChildElements(); try { while (childElements.hasNext()) { childElements.next(); fail("The stream should've been consumed by now!"); } } catch (Exception e) { //if we are here without failing, then we are successful } } public void testParserBehaviorCaching() throws Exception { OMXMLParserWrapper builder2 = OMXMLBuilderFactory.createStAXOMBuilder( OMAbstractFactory.getSOAP11Factory(), XMLInputFactory.newInstance().createXMLStreamReader( new ByteArrayInputStream(xmlDocument.getBytes()))); OMElement documentElement = builder2.getDocumentElement(); XMLStreamReader originalParser = documentElement.getXMLStreamReader(); //consume the parser. this should force the xml stream to be exhausted but the //tree to be fully built while (originalParser.hasNext()) { originalParser.next(); } //try to find the children of the document element. This should *NOT* produce an //error even when the underlying stream is fully consumed , the object tree is already complete Iterator childElements = documentElement.getChildElements(); int count = 0; try { while (childElements.hasNext()) { childElements.next(); count++; } } catch (Exception e) { fail("The object tree needs to be built and traversing the children is to be a success!"); } assertEquals("Number of elements need to be 2", count, 2); } public void testParserBehaviorNonCaching2() throws Exception { OMXMLParserWrapper builder2 = OMXMLBuilderFactory.createStAXOMBuilder( OMAbstractFactory.getSOAP11Factory(), XMLInputFactory.newInstance().createXMLStreamReader( new ByteArrayInputStream(xmlDocument.getBytes()))); OMElement documentElement = builder2.getDocumentElement(); XMLStreamReader originalParser = documentElement.getXMLStreamReaderWithoutCaching(); //consume the parser. this should force the xml stream to be exhausted without //building the tree while (originalParser.hasNext()) { originalParser.next(); } //try to find the children of the document element. This should produce an //error since the underlying stream is fully consumed without building the object tree Iterator childElements = documentElement.getChildElements(); try { XMLStreamWriter writer = XMLOutputFactory.newInstance(). createXMLStreamWriter(System.out); documentElement.serializeAndConsume(writer); fail("Stream should be consumed by now"); } catch (XMLStreamException e) { //wea re cool } catch (Exception e) { fail("This should throw an XMLStreamException"); } } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/OMElementTestBase.java0000644000000000000000000001260411131637476027650 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om; import java.util.Iterator; import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamConstants; import org.apache.axiom.om.impl.llom.util.AXIOMUtil; public abstract class OMElementTestBase extends AbstractTestCase { protected abstract OMFactory getOMFactory(); public void testSetText() { OMFactory factory = getOMFactory(); String localName = "TestLocalName"; String namespace = "http://ws.apache.org/axis2/ns"; String prefix = "axis2"; OMElement elem = factory.createOMElement(localName, namespace, prefix); String text = "The quick brown fox jumps over the lazy dog"; elem.setText(text); assertEquals("Text value mismatch", text, elem.getText()); } public void testCDATA() throws Exception { OMFactory factory = getOMFactory(); OMElement omElement = factory.createOMElement("TestElement", null); final String text = "this is text in a CDATA"; factory.createOMText(omElement, text, XMLStreamConstants.CDATA); assertEquals(text, omElement.getText()); // OK, CDATA on its own worked - now confirm that a plain text + a CDATA works omElement = factory.createOMElement("element2", null); final String normalText = "regular text and "; factory.createOMText(omElement, normalText); factory.createOMText(omElement, text, XMLStreamConstants.CDATA); assertEquals(normalText + text, omElement.getText()); } public void testAddChild() { OMFactory factory = getOMFactory(); String localName = "TestLocalName"; String childLocalName = "TestChildLocalName"; String namespace = "http://ws.apache.org/axis2/ns"; String prefix = "axis2"; OMElement elem = factory.createOMElement(localName, namespace, prefix); OMElement childElem = factory.createOMElement(childLocalName, namespace, prefix); elem.addChild(childElem); Iterator it = elem.getChildrenWithName(new QName(namespace, childLocalName)); int count = 0; while (it.hasNext()) { OMElement child = (OMElement) it.next(); assertEquals("Child local name mismatch", childLocalName, child.getLocalName()); assertEquals("Child namespace mismatch", namespace, child.getNamespace().getNamespaceURI()); count ++; } assertEquals("In correct number of children", 1, count); } // Regression test for WSCOMMONS-337 public void testInsertSiblingAfterLastChild() throws Exception { OMFactory fac = getOMFactory(); OMNamespace ns = fac.createOMNamespace("http://www.testuri.com","ns"); OMElement parent = fac.createOMElement("parent", ns); // Create three OMElements OMElement c1 = fac.createOMElement("c1", ns); OMElement c2 = fac.createOMElement("c2", ns); OMElement c3 = fac.createOMElement("c3", ns); // Add c1 to parent using parent.addChild() parent.addChild(c1); // Add c2 to c1 as a sibling after c1.insertSiblingAfter(c2); // Now add c3 to parent using parent.addChild() parent.addChild(c3); assertXMLEqual("" + "", parent.toString()); } private void testDetach(boolean build) throws Exception { OMElement root = AXIOMUtil.stringToOM(getOMFactory(), ""); if (build) { root.build(); } else { assertFalse(root.isComplete()); } OMElement a = (OMElement)root.getFirstOMChild(); assertEquals("a", a.getLocalName()); OMElement b = (OMElement)a.getNextOMSibling(); assertEquals("b", b.getLocalName()); b.detach(); assertNull(b.getParent()); OMElement c = (OMElement)a.getNextOMSibling(); assertEquals("c", c.getLocalName()); assertSame(c, a.getNextOMSibling()); assertSame(a, c.getPreviousOMSibling()); } public void testDetachWithBuild() throws Exception { testDetach(true); } public void testDetachWithoutBuild() throws Exception { testDetach(false); } public void testFindNamespaceByPrefix() throws Exception { OMElement root = AXIOMUtil.stringToOM(getOMFactory(), ""); OMNamespace ns = root.getFirstElement().findNamespace(null, "a"); assertNotNull(ns); assertEquals("urn:a", ns.getNamespaceURI()); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/OMBodyTest.java0000644000000000000000000000645111131637476026364 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om; import org.apache.axiom.soap.SOAPBody; import org.apache.axiom.soap.SOAPProcessingException; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import javax.xml.namespace.QName; public class OMBodyTest extends OMTestCase implements OMConstants { SOAPBody soapBody; private static Log log = LogFactory.getLog(OMBodyTest.class); public OMBodyTest(String testName) { super(testName); } /* * @see TestCase#setUp() */ protected void setUp() throws Exception { super.setUp(); soapBody = soapEnvelope.getBody(); } /* * Class under test for SOAPFault addFault() */ public void testAddFault() { log.debug("Adding SOAP fault to body ...."); try { soapBody.addChild( soapFactory.createSOAPFault(soapBody, new Exception("Testing soap fault"))); } catch (SOAPProcessingException e) { log.info(e.getMessage()); fail(e.getMessage()); } log.debug("\t checking for SOAP Fault ..."); assertTrue("SOAP body has no SOAP fault", soapBody.hasFault()); log.debug("\t checking for not-nullity ..."); assertTrue("SOAP body has no SOAP fault", soapBody.getFault() != null); } /** * Ensure that invoking addChild twice on the same element only * adds the child one time. */ public void testAddChildTwice() { log.debug("Add Child Twice"); OMElement om1 = soapFactory.createOMElement("child1", "http://myChild", "pre"); OMElement om2 = soapFactory.createOMElement("child2", "http://myChild", "pre"); soapBody.addChild(om1); soapBody.addChild(om1); // NOOP..Expected behavior: child removed and then added soapBody.addChild(om2); OMElement node = (OMElement) soapBody. getFirstChildWithName(new QName("http://myChild", "child1")); node = (OMElement) node.detach(); assertTrue("Node is missing", node != null); assertTrue("Node has the wrong name " + node.getLocalName(), node.getLocalName().equals("child1")); node = (OMElement) soapBody. getFirstChildWithName(new QName("http://myChild", "child2")); assertTrue("Node is missing", node != null); assertTrue("Node has the wrong name " + node.getLocalName(), node.getLocalName().equals("child2")); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/0000755000000000000000000000000011131637476024463 5ustar rootrootaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/OMBlankElementTest.java0000644000000000000000000000566311131637476030775 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl; import junit.framework.TestCase; import org.apache.axiom.om.OMAbstractFactory; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMException; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMNamespace; import javax.xml.stream.XMLStreamException; import java.io.StringWriter; public class OMBlankElementTest extends TestCase { public OMBlankElementTest(String name) { super(name); } public void testBlankOMElem() throws XMLStreamException { try { //We should not get anything as the return value here: the output of the serialization String value = buildBlankOMElem(); assertNull( "There's a serialized output for a blank XML element that cannot exist", value); } catch (OMException e) { } } String buildBlankOMElem() throws XMLStreamException { OMFactory factory = OMAbstractFactory.getOMFactory(); OMNamespace namespace1 = factory.createOMNamespace("", ""); OMElement elem1 = factory.createOMElement("", namespace1); StringWriter writer = new StringWriter(); elem1.build(); elem1.serialize(writer); writer.flush(); return writer.toString(); } public void testOMElemWithWhiteSpace() throws XMLStreamException { try { //We should not get anything as the return value here: the output of the serialization String value = buildWithWhiteSpaceOMElem(); assertNull( "There's a serialized output for a blank XML element that cannot exist", value); } catch (OMException e) { } } String buildWithWhiteSpaceOMElem() throws XMLStreamException { OMFactory factory = OMAbstractFactory.getOMFactory(); OMNamespace namespace1 = factory.createOMNamespace(" ", ""); OMElement elem1 = factory.createOMElement(" ", namespace1); StringWriter writer = new StringWriter(); elem1.build(); elem1.serialize(writer); writer.flush(); return writer.toString(); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/streamwrapper/0000755000000000000000000000000011131637476027357 5ustar rootroot././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/streamwrapper/OmStAXBuilderTest.javaaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/streamwrapper/OmStAXBuilderTe0000644000000000000000000000447311131637476032225 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.streamwrapper; import org.apache.axiom.om.AbstractTestCase; import org.apache.axiom.om.OMAbstractFactory; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.om.TestConstants; import org.apache.axiom.om.impl.llom.factory.OMXMLBuilderFactory; import org.apache.axiom.soap.SOAPEnvelope; import org.apache.axiom.soap.SOAPFactory; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLStreamReader; import java.io.File; import java.io.FileOutputStream; public class OmStAXBuilderTest extends AbstractTestCase { private SOAPFactory factory = null; private OMXMLParserWrapper builder; private File tempFile; public OmStAXBuilderTest(String testName) { super(testName); } protected void setUp() throws Exception { factory = OMAbstractFactory.getSOAP11Factory(); XMLStreamReader reader = XMLInputFactory.newInstance(). createXMLStreamReader(getTestResource(TestConstants.SOAP_SOAPMESSAGE)); builder = OMXMLBuilderFactory.createStAXSOAPModelBuilder(factory, reader); tempFile = File.createTempFile("temp", "xml"); } public void testStaxBuilder() throws Exception { SOAPEnvelope envelope = (SOAPEnvelope) builder.getDocumentElement(); assertNotNull(envelope); envelope.serialize(new FileOutputStream(tempFile)); } protected void tearDown() throws Exception { tempFile.delete(); } } ././@LongLink0000000000000000000000000000016500000000000011567 Lustar rootrootaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/streamwrapper/OMStaxStreamingWrapperTest.javaaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/streamwrapper/OMStaxStreaming0000644000000000000000000000447011131637476032334 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.streamwrapper; import org.apache.axiom.om.AbstractTestCase; import org.apache.axiom.om.OMAbstractFactory; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.om.TestConstants; import org.apache.axiom.om.impl.llom.factory.OMXMLBuilderFactory; import org.apache.axiom.soap.SOAPEnvelope; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLStreamReader; import java.io.File; public class OMStaxStreamingWrapperTest extends AbstractTestCase { private SOAPEnvelope envelope = null; private File tempFile; private XMLStreamReader parser; public OMStaxStreamingWrapperTest(String testName) { super(testName); } protected void setUp() throws Exception { XMLStreamReader xmlStreamReader = XMLInputFactory.newInstance(). createXMLStreamReader(getTestResource(TestConstants.SOAP_SOAPMESSAGE1)); OMXMLParserWrapper builder = OMXMLBuilderFactory.createStAXSOAPModelBuilder( OMAbstractFactory.getSOAP11Factory(), xmlStreamReader); envelope = (SOAPEnvelope) builder.getDocumentElement(); tempFile = File.createTempFile("temp", "xml"); } public void testWrapperHalfOM() throws Exception { assertNotNull(envelope); parser = envelope.getXMLStreamReaderWithoutCaching(); while (parser.hasNext()) { int event = parser.next(); assertTrue(event > 0); } } protected void tearDown() throws Exception { tempFile.delete(); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/MIMEOutputUtilsTest.java0000644000000000000000000001170711131637476031165 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl; import junit.framework.TestCase; import org.apache.axiom.attachments.ByteArrayDataSource; import org.apache.axiom.om.OMAbstractFactory; import org.apache.axiom.om.OMOutputFormat; import org.apache.axiom.om.OMText; import org.apache.axiom.soap.SOAPFactory; import javax.activation.DataHandler; import javax.mail.MessagingException; import javax.mail.internet.MimeBodyPart; import javax.mail.internet.MimeMessage; import javax.mail.internet.MimeMultipart; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.util.Properties; public class MIMEOutputUtilsTest extends TestCase { byte[] buffer; byte[] byteArray = new byte[] { 13, 56, 65, 32, 12, 12, 7, -3, -2, -1, 98 }; protected void setUp() throws Exception { super.setUp(); SOAPFactory factory = OMAbstractFactory.getSOAP11Factory(); ByteArrayOutputStream outStream; String boundary; OMOutputFormat omOutput = new OMOutputFormat(); boundary = omOutput.getMimeBoundary(); omOutput.setSOAP11(false); String contentType = omOutput.getContentType(); DataHandler dataHandler; dataHandler = new DataHandler(new ByteArrayDataSource(byteArray)); OMText textData = factory.createOMText(dataHandler, true); assertNotNull(textData.getContentID()); DataHandler dataHandler2 = new DataHandler( "Apache Software Foundation", "text/plain"); OMText text = factory.createOMText(dataHandler2, true); assertNotNull(text.getContentID()); outStream = new ByteArrayOutputStream(); outStream.write(("Content-Type: " + contentType).getBytes()); outStream.write(new byte[] { 13, 10 }); outStream.write(new byte[] { 13, 10 }); MIMEOutputUtils.startWritingMime(outStream, boundary); MimeBodyPart part1 = MIMEOutputUtils.createMimeBodyPart(textData .getContentID(), (DataHandler) textData.getDataHandler()); MIMEOutputUtils.writeBodyPart(outStream, part1, boundary); MimeBodyPart part2 = MIMEOutputUtils.createMimeBodyPart(text .getContentID(), (DataHandler) text.getDataHandler()); MIMEOutputUtils.writeBodyPart(outStream, part2, boundary); MIMEOutputUtils.finishWritingMime(outStream); buffer = outStream.toByteArray(); } public void testMIMEWriting() throws IOException, MessagingException { ByteArrayInputStream inStream = new ByteArrayInputStream(buffer); Properties props = new Properties(); javax.mail.Session session = javax.mail.Session .getInstance(props, null); MimeMessage mimeMessage = new MimeMessage(session, inStream); DataHandler dh = mimeMessage.getDataHandler(); MimeMultipart multiPart = new MimeMultipart(dh.getDataSource()); MimeBodyPart mimeBodyPart0 = (MimeBodyPart) multiPart.getBodyPart(0); Object object0 = mimeBodyPart0.getContent(); assertNotNull(object0); MimeBodyPart mimeBodyPart1 = (MimeBodyPart) multiPart.getBodyPart(1); Object object1 = mimeBodyPart1.getContent(); assertNotNull(object1); assertEquals(multiPart.getCount(), 2); } public void testWriteSOAPWithAttachmentsMessage() throws IOException { // ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); // // OMOutputFormat omOutput = new OMOutputFormat(); // omOutput.setCharSetEncoding(OMConstants.DEFAULT_CHAR_SET_ENCODING); // omOutput.setSOAP11(false); // omOutput.setDoingSWA(true); // // StringWriter stringWriter = new StringWriter(); // stringWriter.write("Apache Axis2"); // DataHandler dataHandler = new DataHandler( // "Apache Software Foundation", "text/plain"); // HashMap map = new HashMap(); // map.put("uuid_dsjkjkda",dataHandler); // byteArrayOutputStream.write((omOutput.getContentType()+"\n").getBytes()); // MIMEOutputUtils.writeSOAPWithAttachmentsMessage(stringWriter,byteArrayOutputStream,map,omOutput); // System.out.println(byteArrayOutputStream.toString()); } }axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/dom/0000755000000000000000000000000011131637476025242 5ustar rootroot././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/dom/DOMImplementationTest.javaaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/dom/DOMImplementationTest.jav0000644000000000000000000000420111131637476032126 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.dom; import junit.framework.TestCase; import org.apache.axiom.om.impl.dom.jaxp.DocumentBuilderFactoryImpl; import org.apache.axiom.om.impl.dom.jaxp.DocumentBuilderImpl; import org.w3c.dom.Document; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; public class DOMImplementationTest extends TestCase { public void testDOMImpl() throws Exception { try { // System.setProperty("javax.xml.parsers.DocumentBuilderFactory",DocumentBuilderFactoryImpl.class.getName()); DocumentBuilderFactoryImpl.setDOOMRequired(true); DocumentBuilderFactory fac = DocumentBuilderFactory.newInstance(); DocumentBuilder builder = fac.newDocumentBuilder(); Document doc = builder.newDocument(); assertEquals("Incorrect DocumentBuilderFactory instance", DocumentBuilderFactoryImpl.class.getName(), fac.getClass().getName()); assertEquals("Incorrect DocumentBuilder instance", DocumentBuilderImpl.class.getName(), builder.getClass().getName()); assertEquals("Incorrect Document instance", DocumentImpl.class.getName(), doc.getClass().getName()); } finally { DocumentBuilderFactoryImpl.setDOOMRequired(false); } } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/dom/ElementImplTest.java0000644000000000000000000002364411131637476031171 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.dom; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMElementTestBase; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMText; import org.apache.axiom.om.impl.dom.factory.OMDOMFactory; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import org.w3c.dom.Text; import org.xml.sax.InputSource; import javax.xml.parsers.DocumentBuilderFactory; import java.io.ByteArrayOutputStream; import java.io.StringReader; public class ElementImplTest extends OMElementTestBase { protected OMFactory getOMFactory() { return new OMDOMFactory(); } public void testSerialize() throws Exception { OMDOMFactory factory = new OMDOMFactory(); String localName = "TestLocalName"; String namespace = "http://ws.apache.org/axis2/ns"; String prefix = "axis2"; String tempText = "The quick brown fox jumps over the lazy dog"; String textToAppend = " followed by another"; OMElement elem = factory.createOMElement(localName, namespace, prefix); OMText textNode = factory.createOMText(elem, tempText); ((Text) textNode).appendData(textToAppend); ByteArrayOutputStream baos = new ByteArrayOutputStream(); elem.serialize(baos); String xml = new String(baos.toByteArray()); assertEquals("Incorrect serialized xml", 0, xml.indexOf("123"))); assertEquals("123", doc.getDocumentElement().getTextContent()); } }); } public void testSetTextContent() throws Exception { DOMTestUtil.execute(new DOMTestUtil.Test() { public void execute(DocumentBuilderFactory dbf) throws Exception { Document doc = dbf.newDocumentBuilder().parse(new InputSource( new StringReader("123"))); Element element = doc.getDocumentElement(); element.setTextContent("test"); Node firstChild = element.getFirstChild(); assertTrue(firstChild instanceof Text); assertEquals("test", firstChild.getNodeValue()); assertNull(firstChild.getNextSibling()); } }); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/dom/MessagesTest.java0000644000000000000000000000451511131637476030521 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.dom; import org.apache.axiom.om.OMException; import org.apache.axiom.om.TestConstants; import org.apache.axiom.soap.SOAPEnvelope; public class MessagesTest extends OMDOMTestCase { SOAPEnvelope soapEnvelope; public void testMessageWithLotOfWhiteSpaces() throws OMException, Exception { soapEnvelope = (SOAPEnvelope) OMTestUtils.getOMBuilder( getTestResource(TestConstants.WHITESPACE_MESSAGE)) .getDocumentElement(); OMTestUtils.walkThrough(soapEnvelope); } public void testMinimalMessage() throws OMException, Exception { soapEnvelope = (SOAPEnvelope) OMTestUtils.getOMBuilder( getTestResource(TestConstants.MINIMAL_MESSAGE)) .getDocumentElement(); OMTestUtils.walkThrough(soapEnvelope); } public void testReallyBigMessage() throws OMException, Exception { soapEnvelope = (SOAPEnvelope) OMTestUtils.getOMBuilder( getTestResource(TestConstants.REALLY_BIG_MESSAGE)) .getDocumentElement(); OMTestUtils.walkThrough(soapEnvelope); } public void testEmptyBodiedMessage() throws OMException, Exception { soapEnvelope = (SOAPEnvelope) OMTestUtils.getOMBuilder( getTestResource(TestConstants.EMPTY_BODY_MESSAGE)) .getDocumentElement(); OMTestUtils.walkThrough(soapEnvelope); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/dom/OMDOMFactoryTest.java0000644000000000000000000000315611131637476031155 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.dom; import junit.framework.TestCase; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.impl.dom.factory.OMDOMFactory; import javax.xml.namespace.QName; public class OMDOMFactoryTest extends TestCase { public void testCreateElement() { OMDOMFactory factory = new OMDOMFactory(); String localName = "TestLocalName"; String namespace = "http://ws.apache.org/axis2/ns"; String prefix = "axis2"; OMElement elem = factory.createOMElement(localName, namespace, prefix); QName qname = elem.getQName(); assertEquals("Localname mismatch", localName, qname.getLocalPart()); assertEquals("Namespace mismatch", namespace, qname.getNamespaceURI()); assertEquals("namespace prefix mismatch", prefix, qname.getPrefix()); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/dom/OMTestUtils.java0000644000000000000000000001164111131637476030304 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.dom; import junit.framework.TestCase; import org.apache.axiom.om.OMAttribute; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMException; import org.apache.axiom.om.OMNode; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.om.impl.llom.factory.OMXMLBuilderFactory; import org.apache.axiom.soap.impl.dom.soap11.SOAP11Factory; import org.w3c.dom.Attr; import org.w3c.dom.Element; import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLStreamReader; import java.io.InputStream; import java.util.Iterator; // TODO: more or less a copy & paste of the other OMTestUtils class; clean this up public class OMTestUtils { public static OMXMLParserWrapper getOMBuilder(InputStream in) throws Exception { XMLStreamReader parser = XMLInputFactory.newInstance() .createXMLStreamReader(in); return OMXMLBuilderFactory.createStAXSOAPModelBuilder( new SOAP11Factory(), parser); } public static void walkThrough(OMElement omEle) { Iterator attibIt = omEle.getAllAttributes(); if (attibIt != null) { while (attibIt.hasNext()) { TestCase.assertNotNull("once the has next is not null, the " + "element should not be null", attibIt.next()); } } Iterator it = omEle.getChildren(); if (it != null) { while (it.hasNext()) { OMNode ele = (OMNode) it.next(); TestCase.assertNotNull("once the has next is not null, the " + "element should not be null", ele); if (ele instanceof OMElement) { walkThrough((OMElement) ele); } } } } public static void compare(Element ele, OMElement omele) throws Exception { if (ele == null && omele == null) { return; } else if (ele != null && omele != null) { TestCase.assertEquals("Element name not correct", ele.getLocalName(), omele.getLocalName()); if (omele.getNamespace() != null) { TestCase.assertEquals("Namespace URI not correct", ele.getNamespaceURI(), omele.getNamespace().getNamespaceURI()); } //go through the attributes NamedNodeMap map = ele.getAttributes(); Iterator attIterator = omele.getAllAttributes(); OMAttribute omattribute; while (attIterator != null && attIterator.hasNext() && map == null) { omattribute = (OMAttribute) attIterator.next(); Node node = map.getNamedItemNS( omattribute.getNamespace().getNamespaceURI(), omattribute.getLocalName()); if (node.getNodeType() == Node.ATTRIBUTE_NODE) { Attr attr = (Attr) node; TestCase.assertEquals(attr.getValue(), omattribute.getAttributeValue()); } else { throw new OMException("return type is not a Attribute"); } } Iterator it = omele.getChildren(); NodeList list = ele.getChildNodes(); for (int i = 0; i < list.getLength(); i++) { Node node = list.item(i); if (node.getNodeType() == Node.ELEMENT_NODE) { TestCase.assertTrue(it.hasNext()); OMNode tempOmNode = (OMNode) it.next(); while (tempOmNode.getType() != OMNode.ELEMENT_NODE) { TestCase.assertTrue(it.hasNext()); tempOmNode = (OMNode) it.next(); } compare((Element) node, (OMElement) tempOmNode); } } } else { throw new Exception("One is null"); } } } ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/dom/ConvertLLOMToDOOMTest.javaaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/dom/ConvertLLOMToDOOMTest.jav0000644000000000000000000002052311131637476031674 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.dom; import junit.framework.TestCase; import org.apache.axiom.om.OMAbstractFactory; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.impl.builder.StAXOMBuilder; import org.apache.axiom.soap.SOAP11Constants; import org.apache.axiom.soap.SOAPEnvelope; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder; import javax.xml.namespace.QName; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLStreamReader; import java.io.ByteArrayInputStream; /** This test will test the conversion of a LLOM soap envelope to DOOM */ public class ConvertLLOMToDOOMTest extends TestCase { public void testConvert() throws Exception { String origXML = "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " lDeZJk0/r6u4tOOhOKbN0IEvwi0=\n" + " \n" + " \n" + " KhUeWMoUxUFe5jeTlqLdIEIG2Z7Q2q2mh9HT3IAYwbCev+FzXcuLSiPSsb7/+PSDM2SD0gl9tMp+dHjfPxmq7WiduH9mbnP6gkrxxu0T5rR916WsboshJGJKiPlj71bwpMsrrZohx4evHPdQ2SZHthlNb6jZyjq+LS7qFydppHk=\n" + " \n" + " \n" + " \n" + " \n" + " CN=OASIS Interop Test CA,O=OASIS\n" + " 68652640310044618358965661752471103641\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " 2006-03-31T15:34:38.699Z\n" + " 2006-03-31T15:39:38.699Z\n" + " \n" + " \n" + " http://localhost:9080/axis2/services/Service\n" + " \n" + " http://www.w3.org/2005/08/addressing/anonymous\n" + " \n" + " urn:uuid:049875A6E153FCAAF011438192785862\n" + " http://schemas.xmlsoap.org/ws/2005/02/trust/RST/SCT\n" + " \n" + " \n" + " \n" + " http://schemas.xmlsoap.org/ws/2005/02/sc/sct\n" + " http://schemas.xmlsoap.org/ws/2005/02/trust/Issue\n" + " \n" + " \n" + " "; XMLStreamReader reader = XMLInputFactory.newInstance() .createXMLStreamReader(new ByteArrayInputStream(origXML.getBytes())); StAXSOAPModelBuilder builder = new StAXSOAPModelBuilder(reader, null); SOAPEnvelope env = builder.getSOAPEnvelope(); env.build(); StAXSOAPModelBuilder doomBuilder = new StAXSOAPModelBuilder(env.getXMLStreamReader(), DOOMAbstractFactory.getSOAP11Factory(), SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI); SOAPEnvelope doomEnv = doomBuilder.getSOAPEnvelope(); doomEnv.build(); OMElement payload = doomEnv.getBody().getFirstElement(); StAXOMBuilder llomBuilder = new StAXOMBuilder(payload.getXMLStreamReaderWithoutCaching()); OMElement llomPayload = llomBuilder.getDocumentElement(); llomPayload.build(); String xml = llomPayload.toString(); assertTrue("Conversion failed", xml.indexOf("") != -1); } public void testConvert1() { SOAPFactory fac = OMAbstractFactory.getSOAP11Factory(); SOAPEnvelope env = fac.getDefaultEnvelope(); fac.createOMElement(new QName("http://test.org", "Test"), env.getBody()); env.build(); StAXSOAPModelBuilder doomBuilder = new StAXSOAPModelBuilder(env.getXMLStreamReader(), DOOMAbstractFactory.getSOAP11Factory(), SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI); SOAPEnvelope doomEnv = doomBuilder.getSOAPEnvelope(); doomEnv.build(); } public void testAddChild() { SOAPFactory fac = DOOMAbstractFactory.getSOAP11Factory(); SOAPEnvelope env = fac.getDefaultEnvelope(); fac.createOMElement(new QName("http://test.org", "Test"), env.getBody()); env.build(); SOAPFactory llomFac = DOOMAbstractFactory.getSOAP11Factory(); OMElement elem = llomFac.createOMElement("newDomElement", null); OMElement firstElement = env.getBody().getFirstElement(); firstElement.addChild(elem); assertTrue("New DOM child missing", env.toString().indexOf("newDomElement") > 0); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/dom/OMDOMTestCase.java0000644000000000000000000000547611131637476030430 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.dom; import org.apache.axiom.om.AbstractTestCase; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.TestConstants; import org.apache.axiom.soap.SOAPEnvelope; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder; import org.apache.axiom.soap.impl.dom.factory.DOMSOAPFactory; import org.apache.axiom.soap.impl.dom.soap11.SOAP11Factory; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLOutputFactory; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import javax.xml.stream.XMLStreamWriter; import java.io.InputStream; import java.io.OutputStream; public abstract class OMDOMTestCase extends AbstractTestCase { protected static final String IN_FILE_NAME = TestConstants.SOAP_SOAPMESSAGE; protected StAXSOAPModelBuilder builder; protected OMFactory ombuilderFactory; protected SOAPFactory soapFactory; protected SOAPEnvelope soapEnvelope; protected void setUp() throws Exception { super.setUp(); soapEnvelope = (SOAPEnvelope) getOMBuilder("").getDocumentElement(); } protected StAXSOAPModelBuilder getOMBuilder(String fileName) throws Exception { if ("".equals(fileName) || fileName == null) { fileName = IN_FILE_NAME; } XMLStreamReader parser = XMLInputFactory.newInstance() .createXMLStreamReader(getTestResource(fileName)); builder = new StAXSOAPModelBuilder(parser, new SOAP11Factory(), null); return builder; } protected StAXSOAPModelBuilder getOMBuilder(InputStream in) throws Exception { XMLStreamReader parser = XMLInputFactory.newInstance() .createXMLStreamReader(in); builder = new StAXSOAPModelBuilder(parser, new DOMSOAPFactory(), null); return builder; } protected XMLStreamWriter getStAXStreamWriter(OutputStream out) throws XMLStreamException { return XMLOutputFactory.newInstance().createXMLStreamWriter(out); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/dom/TextImplTest.java0000644000000000000000000000701111131637476030512 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.dom; import javax.xml.parsers.DocumentBuilderFactory; import junit.framework.TestCase; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMText; import org.apache.axiom.om.impl.dom.factory.OMDOMFactory; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Text; public class TextImplTest extends TestCase { public void testSetText() { OMDOMFactory factory = new OMDOMFactory(); String localName = "TestLocalName"; String namespace = "http://ws.apache.org/axis2/ns"; String prefix = "axis2"; String tempText = "The quick brown fox jumps over the lazy dog"; OMElement elem = factory.createOMElement(localName, namespace, prefix); OMText textNode = factory.createOMText(elem, tempText); assertEquals("Text value mismatch", tempText, textNode.getText()); } public void testAppendText() { OMDOMFactory factory = new OMDOMFactory(); String localName = "TestLocalName"; String namespace = "http://ws.apache.org/axis2/ns"; String prefix = "axis2"; String tempText = "The quick brown fox jumps over the lazy dog"; String textToAppend = " followed by another fox"; OMElement elem = factory.createOMElement(localName, namespace, prefix); OMText textNode = factory.createOMText(elem, tempText); ((Text) textNode).appendData(textToAppend); assertEquals("Text value mismatch", tempText + textToAppend, textNode .getText()); } public void testSplitText() throws Exception { DOMTestUtil.execute(new DOMTestUtil.Test() { public void execute(DocumentBuilderFactory dbf) throws Exception { String textValue = "temp text value"; Document doc = dbf.newDocumentBuilder().newDocument(); Element element = doc.createElement("test"); Text txt = doc.createTextNode(textValue); element.appendChild(txt); txt.splitText(3); assertNotNull("Text value missing in the original Text node", txt .getNodeValue()); assertNotNull("Sibling missing after split", txt.getNextSibling()); assertNotNull("Text value missing in the new split Text node", txt .getNextSibling().getNodeValue()); assertEquals("Incorrect split point", textValue.substring(0, 3), txt .getNodeValue()); assertEquals("Incorrect split point", textValue.substring(3, textValue .length()), txt.getNextSibling().getNodeValue()); } }); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/dom/ElementImportTest.java0000644000000000000000000000326711131637476031541 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.dom; import junit.framework.TestCase; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMTestUtils; import org.apache.axiom.om.impl.dom.factory.OMDOMFactory; import org.w3c.dom.Document; import org.w3c.dom.Node; import javax.xml.parsers.DocumentBuilderFactory; import java.io.FileInputStream; /** @author Ruchith Fernando (ruchith.fernando@gmail.com) */ public class ElementImportTest extends TestCase { public void testImport() throws Exception { DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); dbf.setNamespaceAware(true); Document doc = dbf.newDocumentBuilder().parse( new FileInputStream("test-resources/xml/sigEncr.xml")); Node n = new OMDOMFactory().getDocument().importNode(doc.getDocumentElement(), true); OMTestUtils.compare(doc.getDocumentElement(), (OMElement) n); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/builder/0000755000000000000000000000000011131637476026111 5ustar rootroot././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/builder/StAXOMBuilderTest.javaaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/builder/StAXOMBuilderTest.jav0000644000000000000000000001066511131637476032045 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.builder; import org.apache.axiom.om.AbstractTestCase; import org.apache.axiom.om.OMAbstractFactory; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMNode; import org.apache.axiom.om.OMText; import org.apache.axiom.om.impl.llom.factory.OMXMLBuilderFactory; import javax.xml.stream.XMLInputFactory; import java.util.Iterator; public class StAXOMBuilderTest extends AbstractTestCase { StAXOMBuilder stAXOMBuilder; private OMElement rootElement; /** Constructor. */ public StAXOMBuilderTest(String testName) { super(testName); } protected void setUp() throws Exception { stAXOMBuilder = OMXMLBuilderFactory.createStAXOMBuilder( OMAbstractFactory.getSOAP11Factory(), XMLInputFactory.newInstance().createXMLStreamReader( getTestResource("non_soap.xml"))); } public void testGetRootElement() throws Exception { rootElement = stAXOMBuilder.getDocumentElement(); assertTrue("Root element can not be null", rootElement != null); assertTrue(" Name of the root element is wrong", rootElement.getLocalName().equalsIgnoreCase("Root")); // get the first OMElement child OMNode omnode = rootElement.getFirstOMChild(); while (omnode instanceof OMText) { omnode = omnode.getNextOMSibling(); } Iterator children = ((OMElement) omnode).getChildren(); int childrenCount = 0; while (children.hasNext()) { OMNode node = (OMNode) children.next(); if (node instanceof OMElement) childrenCount++; } assertTrue(childrenCount == 5); } public void testClose1() throws Exception { rootElement = stAXOMBuilder.getDocumentElement(); assertTrue("Root element can not be null", rootElement != null); assertTrue(" Name of the root element is wrong", rootElement.getLocalName().equalsIgnoreCase("Root")); // get the first OMElement child OMNode omnode = rootElement.getFirstOMChild(); while (omnode instanceof OMText) { omnode = omnode.getNextOMSibling(); } // Close the element immediately OMElement omElement = (OMElement) omnode; omElement.close(false); Iterator children = ((OMElement) omnode).getChildren(); int childrenCount = 0; while (children.hasNext()) { OMNode node = (OMNode) children.next(); if (node instanceof OMElement) childrenCount++; } assertTrue(childrenCount == 0); } public void testClose2() throws Exception { rootElement = stAXOMBuilder.getDocumentElement(); assertTrue("Root element can not be null", rootElement != null); assertTrue(" Name of the root element is wrong", rootElement.getLocalName().equalsIgnoreCase("Root")); // get the first OMElement child OMNode omnode = rootElement.getFirstOMChild(); while (omnode instanceof OMText) { omnode = omnode.getNextOMSibling(); } // Close the element after building the element OMElement omElement = (OMElement) omnode; omElement.close(true); Iterator children = ((OMElement) omnode).getChildren(); int childrenCount = 0; while (children.hasNext()) { OMNode node = (OMNode) children.next(); if (node instanceof OMElement) childrenCount++; } assertTrue(childrenCount == 5); } }././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/builder/CustomBuilderTest.javaaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/builder/CustomBuilderTest.jav0000644000000000000000000002575311131637476032250 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.builder; import org.apache.axiom.om.AbstractTestCase; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMNode; import org.apache.axiom.om.OMSourcedElement; import org.apache.axiom.om.TestConstants; import org.apache.axiom.om.ds.ByteArrayDataSource; import org.apache.axiom.om.ds.custombuilder.ByteArrayCustomBuilder; import org.apache.axiom.om.util.CopyUtils; import org.apache.axiom.soap.SOAPBody; import org.apache.axiom.soap.SOAPEnvelope; import org.apache.axiom.soap.SOAPFactory; import org.apache.axiom.soap.SOAPHeader; import org.apache.axiom.soap.SOAPHeaderBlock; import org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder; import javax.xml.namespace.QName; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLStreamReader; import java.io.InputStream; import java.util.ArrayList; import java.util.Iterator; /** * Validates CopyUtils utility */ /** * @author scheu * */ // TODO: This class seems to be a copy and paste of CopyUtilsTest. Clean this up. public class CustomBuilderTest extends AbstractTestCase { public CustomBuilderTest(String testName) { super(testName); } public void testSample1() throws Exception { copyAndCheck(createEnvelope(getTestResource(TestConstants.SAMPLE1), false), true); } public void testHeaderCustomBuilder() throws Exception{ XMLStreamReader parser = XMLInputFactory.newInstance().createXMLStreamReader(getTestResource(TestConstants.SOAP_SOAPMESSAGE)); StAXSOAPModelBuilder builder = new StAXSOAPModelBuilder(parser, null); builder.registerCustomBuilder(new QName("http://schemas.xmlsoap.org/ws/2004/03/addressing","To"), 3, new ByteArrayCustomBuilder("utf-8")); SOAPEnvelope sourceEnv = (SOAPEnvelope) builder.getDocumentElement(); SOAPHeader header = sourceEnv.getHeader(); ArrayList al = header.getHeaderBlocksWithNSURI("http://schemas.xmlsoap.org/ws/2004/03/addressing"); for(int i=0;iHello World"; String encoding = "UTF-8"; ByteArrayDataSource bads = new ByteArrayDataSource(text.getBytes(encoding), encoding); OMNamespace ns = body.getOMFactory().createOMNamespace("urn://test", "tns"); OMSourcedElement omse =body.getOMFactory().createOMElement(bads, "payload", ns); body.addChild(omse); copyAndCheck(sourceEnv, true); } public void testOMSE2() throws Exception { SOAPEnvelope sourceEnv = createEnvelope(getTestResource(TestConstants.EMPTY_BODY_MESSAGE), false); SOAPBody body = sourceEnv.getBody(); SOAPHeader header = sourceEnv.getHeader(); String encoding = "UTF-8"; // Create a header OMSE String hdrText = "Hello World"; ByteArrayDataSource badsHdr = new ByteArrayDataSource(hdrText.getBytes(encoding), encoding); OMNamespace hdrNS = header.getOMFactory().createOMNamespace("urn://test", "hdr"); SOAPFactory sf = (SOAPFactory) header.getOMFactory(); SOAPHeaderBlock shb = sf.createSOAPHeaderBlock("myheader", hdrNS, badsHdr); shb.setProcessed(); // test setting processing flag header.addChild(shb); // Create a payload String text = "Hello World"; ByteArrayDataSource bads = new ByteArrayDataSource(text.getBytes(encoding), encoding); OMNamespace ns = body.getOMFactory().createOMNamespace("urn://test", "tns"); OMSourcedElement omse =body.getOMFactory().createOMElement(bads, "payload", ns); body.addChild(omse); copyAndCheck(sourceEnv, true); // The source SOAPHeaderBlock should not be expanded in the process assertTrue(shb.isExpanded() == false); } /** * Create SOAPEnvelope from the test in the indicated file * @param file * @return * @throws Exception */ protected SOAPEnvelope createEnvelope(InputStream in, boolean doFaultCheck) throws Exception { XMLStreamReader parser = XMLInputFactory.newInstance().createXMLStreamReader(in); StAXSOAPModelBuilder builder = new StAXSOAPModelBuilder(parser, null); SOAPEnvelope sourceEnv = (SOAPEnvelope) builder.getDocumentElement(); // Do a fault check. This is normally done in the engine (Axiom) and should // not cause inteference with the custom builder processing if (doFaultCheck) { sourceEnv.getBody().hasFault(); } // Do the registration here...this simulates when it could occure in the engine // (After the fault check and during phase processing...probably dispatch phase) builder.registerCustomBuilderForPayload(new ByteArrayCustomBuilder("utf-8")); return sourceEnv; } /** * Make a copy of the source envelope and validate the target tree * @param sourceEnv * @param checkText (if true, check the serialization of the source and target tree) * @throws Exception */ protected void copyAndCheck(SOAPEnvelope sourceEnv, boolean checkText) throws Exception { SOAPEnvelope targetEnv = CopyUtils.copy(sourceEnv); identityCheck(sourceEnv, targetEnv, ""); String sourceText = sourceEnv.toString(); String targetText = targetEnv.toString(); // In some cases the serialization code or internal hashmaps cause // attributes or namespaces to be in a different order...accept this for now. if (checkText) { assertTrue("\nSource=" + sourceText + "\nTarget=" + targetText, sourceText.equals(targetText)); } SOAPBody body = sourceEnv.getBody(); OMElement payload = body.getFirstElement(); assertTrue("Expected OMSourcedElement payload", payload instanceof OMSourcedElement); assertTrue("Expected unexpanded payload", !((OMSourcedElement)payload).isExpanded()); } /** * Check the identity of each object in the tree * @param source * @param target * @param depth */ protected void identityCheck(OMNode source, OMNode target, String depth) { // System.out.println(depth + source.getClass().getName()); if (source instanceof OMElement) { if (source instanceof OMSourcedElement) { assertTrue("Source = " + source.getClass().getName() + "Target = " + target.getClass().getName(), target instanceof OMSourcedElement); assertTrue("Source Expansion = " +((OMSourcedElement)source).isExpanded() + "Target Expansion = " + ((OMSourcedElement)target).isExpanded(), ((OMSourcedElement)source).isExpanded() == ((OMSourcedElement)target).isExpanded()); if (((OMSourcedElement)source).isExpanded()) { Iterator i = ((OMElement) source).getChildren(); Iterator j = ((OMElement) target).getChildren(); while(i.hasNext() && j.hasNext()) { OMNode sourceChild = (OMNode) i.next(); OMNode targetChild = (OMNode) j.next(); identityCheck(sourceChild, targetChild, depth + " "); } assertTrue("Source and Target have different number of children", i.hasNext() == j.hasNext()); } } else { assertTrue("Source = " + source.getClass().getName() + "Target = " + target.getClass().getName(), source.getClass().getName().equals( target.getClass().getName())); Iterator i = ((OMElement) source).getChildren(); Iterator j = ((OMElement) target).getChildren(); while(i.hasNext() && j.hasNext()) { OMNode sourceChild = (OMNode) i.next(); OMNode targetChild = (OMNode) j.next(); identityCheck(sourceChild, targetChild, depth + " "); } assertTrue("Source and Target have different number of children", i.hasNext() == j.hasNext()); } } else { assertTrue("Source = " + source.getClass().getName() + "Target = " + target.getClass().getName(), source.getClass().getName().equals( target.getClass().getName())); } } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/util/0000755000000000000000000000000011131637476025440 5ustar rootrootaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/mtom/0000755000000000000000000000000011131637476025437 5ustar rootroot././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/mtom/MTOMStAXSOAPModelBuilderTest.javaaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/mtom/MTOMStAXSOAPModelBuilder0000644000000000000000000004017411131637476031657 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.mtom; import org.apache.axiom.attachments.Attachments; import org.apache.axiom.om.AbstractTestCase; import org.apache.axiom.om.OMAttachmentAccessor; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMOutputFormat; import org.apache.axiom.om.OMText; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.om.OMXMLStreamReader; import org.apache.axiom.soap.SOAP12Constants; import org.apache.axiom.soap.impl.builder.MTOMStAXSOAPModelBuilder; import javax.activation.DataHandler; import javax.xml.namespace.QName; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLStreamReader; import java.io.BufferedInputStream; import java.io.BufferedReader; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.InputStream; import java.io.InputStreamReader; import java.net.URLEncoder; import java.util.Iterator; public class MTOMStAXSOAPModelBuilderTest extends AbstractTestCase { private final static QName XOP_INCLUDE = new QName("http://www.w3.org/2004/08/xop/include", "Include"); /** @param testName */ public MTOMStAXSOAPModelBuilderTest(String testName) { super(testName); } protected void setUp() throws Exception { super.setUp(); } public void testCreateOMElement() throws Exception { String contentTypeString = "multipart/Related; charset=\"UTF-8\"; type=\"application/xop+xml\"; boundary=\"----=_AxIs2_Def_boundary_=42214532\"; start=\"SOAPPart\""; String inFileName = "mtom/MTOMBuilderTestIn.txt"; InputStream inStream = getTestResource(inFileName); Attachments attachments = new Attachments(inStream, contentTypeString); XMLStreamReader reader = XMLInputFactory.newInstance() .createXMLStreamReader(new BufferedReader(new InputStreamReader(attachments .getSOAPPartInputStream()))); OMXMLParserWrapper builder = new MTOMStAXSOAPModelBuilder(reader, attachments, SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI); OMElement root = builder.getDocumentElement(); OMElement body = (OMElement) root.getFirstOMChild(); OMElement data = (OMElement) body.getFirstOMChild(); Iterator childIt = data.getChildren(); OMElement child = (OMElement) childIt.next(); OMText blob = (OMText) child.getFirstOMChild(); /* * Following is the procedure the user has to follow to read objects in * OBBlob User has to know the object type & whether it is serializable. * If it is not he has to use a Custom Defined DataSource to get the * Object. */ byte[] expectedObject = new byte[] { 13, 56, 65, 32, 12, 12, 7, -3, -2, -1, 98 }; DataHandler actualDH; actualDH = (DataHandler) blob.getDataHandler(); //ByteArrayInputStream object = (ByteArrayInputStream) actualDH //.getContent(); //byte[] actualObject= null; // object.read(actualObject,0,10); // assertEquals("Object check", expectedObject[5],actualObject[5] ); } /** * Test reading a message containing XOP and ensuring that the * the XOP is preserved when it is serialized. * @throws Exception */ // TODO: because of the serializeAndConsume, this is actually NOT testing MTOMStAXSOAPModelBuilder, but StreamingOMSerializer!!! public void testCreateAndSerializeOptimized() throws Exception { String contentTypeString = "multipart/Related; charset=\"UTF-8\"; type=\"application/xop+xml\"; boundary=\"----=_AxIs2_Def_boundary_=42214532\"; start=\"SOAPPart\""; String inFileName = "mtom/MTOMBuilderTestIn.txt"; InputStream inStream = getTestResource(inFileName); Attachments attachments = new Attachments(inStream, contentTypeString); XMLStreamReader reader = XMLInputFactory.newInstance() .createXMLStreamReader(new BufferedReader(new InputStreamReader(attachments .getSOAPPartInputStream()))); OMXMLParserWrapper builder = new MTOMStAXSOAPModelBuilder(reader, attachments, SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI); OMElement root = builder.getDocumentElement(); OMOutputFormat format = new OMOutputFormat(); format.setDoOptimize(true); ByteArrayOutputStream baos = new ByteArrayOutputStream(); root.serializeAndConsume(baos, format); String msg = baos.toString(); // Make sure there is an xop:Include element and an optimized attachment assertTrue(msg.indexOf("xop:Include") > 0); assertTrue(msg.indexOf("Content-ID: <-1609420109260943731>") > 0); } /** * Test reading a message containing XOP. * Then make a copy of the message. * Then ensure that the XOP is preserved when it is serialized. * @throws Exception */ public void testCreateCloneAndSerializeOptimized() throws Exception { String contentTypeString = "multipart/Related; charset=\"UTF-8\"; type=\"application/xop+xml\"; boundary=\"----=_AxIs2_Def_boundary_=42214532\"; start=\"SOAPPart\""; String inFileName = "mtom/MTOMBuilderTestIn.txt"; InputStream inStream = getTestResource(inFileName); Attachments attachments = new Attachments(inStream, contentTypeString); XMLStreamReader reader = XMLInputFactory.newInstance() .createXMLStreamReader(new BufferedReader(new InputStreamReader(attachments .getSOAPPartInputStream()))); OMXMLParserWrapper builder = new MTOMStAXSOAPModelBuilder(reader, attachments, SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI); OMElement root = builder.getDocumentElement(); // Create a clone of root OMElement root2 = root.cloneOMElement(); // Write out the source OMOutputFormat format = new OMOutputFormat(); format.setDoOptimize(true); ByteArrayOutputStream baos = new ByteArrayOutputStream(); root.serializeAndConsume(baos, format); String msg = baos.toString(); // Make sure there is an xop:Include element and an optimized attachment assertTrue(msg.indexOf("xop:Include") > 0); assertTrue(msg.indexOf("Content-ID: <-1609420109260943731>") > 0); // Write out the clone format = new OMOutputFormat(); format.setDoOptimize(true); baos = new ByteArrayOutputStream(); root2.serializeAndConsume(baos, format); msg = baos.toString(); // Make sure there is an xop:Include element and an optimized attachment assertTrue(msg.indexOf("xop:Include") > 0); assertTrue(msg.indexOf("Content-ID: <-1609420109260943731>") > 0); } /** * Test reading a message containing XOP. * Fully build the tree. * Then make a copy of the message. * Then ensure that the XOP is preserved when it is serialized. * @throws Exception */ public void testCreateBuildCloneAndSerializeOptimized() throws Exception { String contentTypeString = "multipart/Related; charset=\"UTF-8\"; type=\"application/xop+xml\"; boundary=\"----=_AxIs2_Def_boundary_=42214532\"; start=\"SOAPPart\""; String inFileName = "mtom/MTOMBuilderTestIn.txt"; InputStream inStream = getTestResource(inFileName); Attachments attachments = new Attachments(inStream, contentTypeString); XMLStreamReader reader = XMLInputFactory.newInstance() .createXMLStreamReader(new BufferedReader(new InputStreamReader(attachments .getSOAPPartInputStream()))); OMXMLParserWrapper builder = new MTOMStAXSOAPModelBuilder(reader, attachments, SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI); OMElement root = builder.getDocumentElement(); // Fully build the root root.buildWithAttachments(); // Create a clone of root OMElement root2 = root.cloneOMElement(); // Write out the source OMOutputFormat format = new OMOutputFormat(); format.setDoOptimize(true); ByteArrayOutputStream baos = new ByteArrayOutputStream(); root.serializeAndConsume(baos, format); String msg = baos.toString(); // Make sure there is an xop:Include element and an optimized attachment assertTrue(msg.indexOf("xop:Include") > 0); assertTrue(msg.indexOf("Content-ID: <-1609420109260943731>") > 0); // Write out the clone format = new OMOutputFormat(); format.setDoOptimize(true); baos = new ByteArrayOutputStream(); root2.serializeAndConsume(baos, format); msg = baos.toString(); // Make sure there is an xop:Include element and an optimized attachment assertTrue(msg.indexOf("xop:Include") > 0); assertTrue(msg.indexOf("Content-ID: <-1609420109260943731>") > 0); } /** * Test reading a message containing XOP. * Enable inlining serialization * Then ensure that the data is inlined when written * @throws Exception */ public void testCreateAndSerializeInlined() throws Exception { String contentTypeString = "multipart/Related; charset=\"UTF-8\"; type=\"application/xop+xml\"; boundary=\"----=_AxIs2_Def_boundary_=42214532\"; start=\"SOAPPart\""; String inFileName = "mtom/MTOMBuilderTestIn.txt"; InputStream inStream = getTestResource(inFileName); Attachments attachments = new Attachments(inStream, contentTypeString); XMLStreamReader reader = XMLInputFactory.newInstance() .createXMLStreamReader(new BufferedReader(new InputStreamReader(attachments .getSOAPPartInputStream()))); OMXMLParserWrapper builder = new MTOMStAXSOAPModelBuilder(reader, attachments, SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI); OMElement root = builder.getDocumentElement(); OMOutputFormat format = new OMOutputFormat(); format.setDoOptimize(false); ByteArrayOutputStream baos = new ByteArrayOutputStream(); root.serializeAndConsume(baos, format); String msg = baos.toString(); // Make sure there is not an xop:Include // Make sure there is not an optimized attachment assertTrue(msg.indexOf("xop:Include") < 0); assertTrue(msg.indexOf("Content-ID: ") < 0); } public void testUTF16MTOMMessage() throws Exception { String contentTypeString = "multipart/Related; charset=\"UTF-8\"; type=\"application/xop+xml\"; boundary=\"----=_AxIs2_Def_boundary_=42214532\"; start=\"SOAPPart\""; String originalCID = "1.urn:uuid:A3ADBAEE51A1A87B2A11443668160994@apache.org"; String encodedCID = URLEncoder.encode(originalCID, "UTF-8"); // URIs are always encoded using UTF-8 (see WSCOMMONS-429) String xmlPlusMime1 = "------=_AxIs2_Def_boundary_=42214532\r\n" + "Content-Type: application/xop+xml; charset=UTF-16\r\n" + "Content-Transfer-Encoding: 8bit\r\n" + "Content-ID: SOAPPart\r\n" + "\r\n"; String xmlPlusMime2 = "\r\n"; String xmlPlusMime3 = "\r\n------=_AxIs2_Def_boundary_=42214532\r\n" + "Content-Transfer-Encoding: binary\r\n" + "Content-ID: " + originalCID + "\r\n" + "\r\n" + "Foo Bar\r\n" + "------=_AxIs2_Def_boundary_=42214532--\r\n"; byte[] bytes1 = xmlPlusMime1.getBytes(); byte[] bytes2 = xmlPlusMime2.getBytes("UTF-16"); byte[] bytes3 = xmlPlusMime3.getBytes(); byte[] full = append(bytes1, bytes2); full = append(full, bytes3); InputStream inStream = new BufferedInputStream(new ByteArrayInputStream(full)); Attachments attachments = new Attachments(inStream, contentTypeString); XMLStreamReader reader = XMLInputFactory.newInstance() .createXMLStreamReader(attachments .getSOAPPartInputStream(),"UTF-16"); MTOMStAXSOAPModelBuilder builder = new MTOMStAXSOAPModelBuilder(reader, attachments, SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI); OMElement root = builder.getDocumentElement(); root.build(); System.out.println(root.toString()); } public void testCreateAndXMLStreamReader() throws Exception { String contentTypeString = "multipart/Related; charset=\"UTF-8\"; type=\"application/xop+xml\"; boundary=\"----=_AxIs2_Def_boundary_=42214532\"; start=\"SOAPPart\""; String inFileName = "mtom/MTOMBuilderTestIn.txt"; InputStream inStream = getTestResource(inFileName); Attachments attachments = new Attachments(inStream, contentTypeString); XMLStreamReader reader = XMLInputFactory.newInstance() .createXMLStreamReader(new BufferedReader(new InputStreamReader(attachments .getSOAPPartInputStream()))); OMXMLParserWrapper builder = new MTOMStAXSOAPModelBuilder(reader, attachments, SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI); OMElement root = builder.getDocumentElement(); // Build tree root.build(); // Use tree as input to XMLStreamReader OMXMLStreamReader xmlStreamReader = (OMXMLStreamReader) root.getXMLStreamReader(); // Issue XOP:Include events for optimized MTOM text nodes xmlStreamReader.setInlineMTOM(false); DataHandler dh = null; while(xmlStreamReader.hasNext() && dh == null) { xmlStreamReader.next(); if (xmlStreamReader.isStartElement()) { QName qName =xmlStreamReader.getName(); if (XOP_INCLUDE.equals(qName)) { String hrefValue = xmlStreamReader.getAttributeValue("", "href"); if (hrefValue != null) { dh =((OMAttachmentAccessor)xmlStreamReader).getDataHandler(hrefValue); } } } } assertTrue(dh != null); // Make sure next event is an an XOP_Include END element xmlStreamReader.next(); assertTrue(xmlStreamReader.isEndElement()); assertTrue(XOP_INCLUDE.equals(xmlStreamReader.getName())); // Make sure the next event is the end tag of name xmlStreamReader.next(); assertTrue(xmlStreamReader.isEndElement()); assertTrue("name".equals(xmlStreamReader.getLocalName())); } private byte[] append(byte[] a, byte[] b) { byte[] z = new byte[a.length + b.length]; System.arraycopy(a, 0, z, 0, a.length); System.arraycopy(b, 0, z, a.length, b.length); return z; } }axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/traverse/0000755000000000000000000000000011131637476026316 5ustar rootroot././@LongLink0000000000000000000000000000016500000000000011567 Lustar rootrootaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/traverse/OMChildrenWithQNameIteratorTest.javaaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/traverse/OMChildrenWithQNameI0000644000000000000000000001273711131637476032126 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.traverse; import junit.framework.TestCase; import org.apache.axiom.om.OMAbstractFactory; import org.apache.axiom.om.OMText; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMNamespace; import javax.xml.namespace.QName; import java.util.Iterator; public class OMChildrenWithQNameIteratorTest extends TestCase { private final String NS_A = "urn://a"; private final String NS_B = "urn://b"; private final String NS_C = "urn://c"; public OMChildrenWithQNameIteratorTest(String testName) { super(testName); } public void testChildrenRetrievalWithQName() { OMFactory factory = OMAbstractFactory.getOMFactory(); OMNamespace testNamespace = factory.createOMNamespace("http://test.ws.org", "test"); OMElement documentElement = getSampleDocumentElement(testNamespace); Iterator childrenIter = documentElement.getChildrenWithName(new QName("http://test.ws.org", "Employee", "test")); int childCount = getChildrenCount(childrenIter); assertEquals("Iterator must return 1 child with the given qname", childCount, 1); } public void testChildrenRetrievalWithQName_286() { OMFactory factory = OMAbstractFactory.getOMFactory(); OMNamespace testNamespace = factory.createOMNamespace("http://test.ws.org", "test"); OMElement documentElement = getSampleDocumentElement(testNamespace); Iterator childrenIter = documentElement.getChildrenWithName(new QName("http://test.ws.org", "Employee", "test")); OMElement employee = (OMElement) childrenIter.next(); // should walk past OMText assertEquals("Employee test was incorrect", employee.getText(), "Apache Developer"); } private OMElement getSampleDocumentElement(OMNamespace testNamespace) { OMFactory factory = OMAbstractFactory.getOMFactory(); OMElement documentElement = factory.createOMElement("Employees", testNamespace); documentElement.declareNamespace(testNamespace); OMText txt = factory.createOMText(documentElement, " "); OMElement e = factory.createOMElement("Employee", testNamespace, documentElement); e.setText("Apache Developer"); return documentElement; } public void testGetChildrenWithQName() { // Create a document with 2 children, each named "sample" but // have different namespaces. OMFactory factory = OMAbstractFactory.getOMFactory(); OMNamespace a = factory.createOMNamespace(NS_A, "a"); OMNamespace b = factory.createOMNamespace(NS_B, "b"); OMElement documentElement = factory.createOMElement("Document", a); factory.createOMElement("sample", a, documentElement); factory.createOMElement("sample", b, documentElement); // Test for fully qualified names QName qName = new QName(NS_A, "sample"); assertTrue(getChildrenCount(documentElement.getChildrenWithName(qName)) == 1); qName = new QName(NS_B, "sample"); assertTrue(getChildrenCount(documentElement.getChildrenWithName(qName)) == 1); qName = new QName(NS_C, "sample"); assertTrue(getChildrenCount(documentElement.getChildrenWithName(qName)) == 0); // Test for QName with no namespace. // The original Axiom implementation interpretted this as a wildcard. // In order to not break existing code, this should return 2 qName = new QName("", "sample"); assertTrue(getChildrenCount(documentElement.getChildrenWithName(qName)) == 2); // Now add an unqualified sample element to the documentElement factory.createOMElement("sample", null, documentElement); // Repeat the tests qName = new QName(NS_A, "sample"); assertTrue(getChildrenCount(documentElement.getChildrenWithName(qName)) == 1); qName = new QName(NS_B, "sample"); assertTrue(getChildrenCount(documentElement.getChildrenWithName(qName)) == 1); qName = new QName(NS_C, "sample"); assertTrue(getChildrenCount(documentElement.getChildrenWithName(qName)) == 0); // Since there actually is an unqualified element child, the most accurate // interpretation of getChildrenWithName should be to return this one // child qName = new QName("", "sample"); assertTrue(getChildrenCount(documentElement.getChildrenWithName(qName)) == 1); } private int getChildrenCount(Iterator childrenIter) { int childCount = 0; while (childrenIter.hasNext()) { childrenIter.next(); childCount++; } return childCount; } } ././@LongLink0000000000000000000000000000020100000000000011556 Lustar rootrootaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/traverse/OMChildrenWithSpecificAttributeIteratorTest.javaaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/traverse/OMChildrenWithSpecif0000644000000000000000000001065711131637476032224 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.traverse; import junit.framework.TestCase; import org.apache.axiom.om.OMAbstractFactory; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMNamespace; import javax.xml.namespace.QName; import java.util.Iterator; public class OMChildrenWithSpecificAttributeIteratorTest extends TestCase { public OMChildrenWithSpecificAttributeIteratorTest(String testName) { super(testName); } public void testChildrenRetrievalWithDetaching() { OMFactory factory = OMAbstractFactory.getOMFactory(); OMNamespace testNamespace = factory.createOMNamespace("http://test.ws.org", "test"); OMElement documentElement = getSampleDocumentElement(testNamespace); Iterator childrenIter = new OMChildrenWithSpecificAttributeIterator( documentElement.getFirstOMChild(), new QName(testNamespace.getNamespaceURI(), "myAttr", testNamespace.getPrefix()), "Axis2", true); int childCount = getChidrenCount(childrenIter); assertEquals("Iterator must return 5 children with the given attribute", childCount, 5); Iterator children = documentElement.getChildren(); childCount = getChidrenCount(children); assertEquals("Iterator must return only one child, having detached the other children", childCount, 1); } public void testChildrenRetrievalWithNoDetaching() { OMFactory factory = OMAbstractFactory.getOMFactory(); OMNamespace testNamespace = factory.createOMNamespace("http://test.ws.org", "test"); OMElement documentElement = getSampleDocumentElement(testNamespace); Iterator childrenIter = new OMChildrenWithSpecificAttributeIterator( documentElement.getFirstOMChild(), new QName(testNamespace.getNamespaceURI(), "myAttr", testNamespace.getPrefix()), "Axis2", false); int childCount = getChidrenCount(childrenIter); assertEquals("Iterator must return 5 children with the given attribute", childCount, 5); Iterator children = documentElement.getChildren(); childCount = getChidrenCount(children); assertEquals("Iterator must return 6 children, having not detached the children", childCount, 6); } private OMElement getSampleDocumentElement(OMNamespace testNamespace) { OMFactory factory = OMAbstractFactory.getOMFactory(); OMElement documentElement = factory.createOMElement("Employees", testNamespace); documentElement.declareNamespace(testNamespace); OMElement employee; OMElement name; for (int i = 0; i < 5; i++) { employee = factory.createOMElement("Employee", testNamespace, documentElement); name = factory.createOMElement("Name" + i, testNamespace); employee.addAttribute("myAttr", "Axis2", testNamespace); name.setText("Apache Developer"); employee.addChild(name); } //adding one more child with the given attr employee = factory.createOMElement("Employee", testNamespace, documentElement); name = factory.createOMElement("Name", testNamespace); name.addAttribute("myAttr", "Un-Related Value", testNamespace); name.setText("Apache Developer"); employee.addChild(name); return documentElement; } private int getChidrenCount(Iterator childrenIter) { int childCount = 0; while (childrenIter.hasNext()) { childrenIter.next(); childCount++; } return childCount; } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/llom/0000755000000000000000000000000011131637476025426 5ustar rootroot././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/llom/OMDocumentSerilizationTest.javaaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/llom/OMDocumentSerilizationTe0000644000000000000000000001214611131637476032255 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.llom; import junit.framework.TestCase; import org.apache.axiom.om.OMAbstractFactory; import org.apache.axiom.om.OMDocument; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMOutputFormat; import javax.xml.stream.XMLStreamException; import java.io.ByteArrayOutputStream; import java.io.UnsupportedEncodingException; /** This tests the serializeAndConsume method */ public class OMDocumentSerilizationTest extends TestCase { private OMDocument document; private String xmlDeclStart = "" + "" + "Java ReferenceXML Reference" + "XSLT Quickly" + "DuCharme, BobManning" + "29.95"; // Same as testDocument except that an non-default prefix is used private static String testDocument2 = "" + "" + "Java ReferenceXML Reference" + "XSLT Quickly" + "DuCharme, BobManning" + "29.95"; // Same as testDocument exception that the elements are unqualified private static String testDocument3 = "" + "" + "Java ReferenceXML Reference" + "XSLT Quickly" + "DuCharme, BobManning" + "29.95"; private OMSourcedElementImpl element; private OMElement root; /** @param testName */ public OMSourcedElementTest(String testName) { super(testName); } protected void setUp() throws Exception { OMFactory f = new OMLinkedListImplFactory(); OMNamespace ns = new OMNamespaceImpl("http://www.sosnoski.com/uwjws/library", ""); OMNamespace rootNS = new OMNamespaceImpl("http://sampleroot", "rootPrefix"); element = new OMSourcedElementImpl("library", ns, f, new TestDataSource(testDocument)); root = f.createOMElement("root", rootNS); root.addChild(element); } /** * Make sure that the incomplete setting of an OMSE is not * propogated to the root **/ public void testComplete() { // Build a root element and child OMSE OMFactory f = new OMLinkedListImplFactory(); OMNamespace ns = new OMNamespaceImpl("http://www.sosnoski.com/uwjws/library", ""); OMNamespace rootNS = new OMNamespaceImpl("http://sampleroot", "rootPrefix"); OMElement child = new OMSourcedElementImpl("library", ns, f, new TestDataSource(testDocument)); OMElement root = f.createOMElement("root", rootNS); // Trigger expansion of the child OMSE // This will cause the child to be partially parsed (i.e. incomplete) child.getChildren(); // Add the child OMSE to the root. root.addChild(child); // Normally adding an incomplete child to a parent will // cause the parent to be marked as incomplete. // But OMSE's are self-contained...therefore the root // should still be complete assertTrue(!child.isComplete()); assertTrue(root.isComplete()); // Now repeat the test, but this time trigger the // partial parsing of the child after adding it to the root. child = new OMSourcedElementImpl("library", ns, f, new TestDataSource(testDocument)); root = f.createOMElement("root", rootNS); root.addChild(child); child.getChildren(); // causes partial parsing...i.e. incomplete child assertTrue(!child.isComplete()); assertTrue(root.isComplete()); } /** Ensure that each method of OMElementImpl is overridden in OMSourcedElementImpl */ public void testMethodOverrides() { Method[] submeths = OMSourcedElementImpl.class.getDeclaredMethods(); Method[] supmeths = OMElementImpl.class.getDeclaredMethods(); outer: for (int i = 0; i < supmeths.length; i++) { Method supmeth = supmeths[i]; Class[] params = supmeth.getParameterTypes(); if (!Modifier.isPrivate(supmeth.getModifiers())) { for (int j = 0; j < submeths.length; j++) { Method submeth = submeths[j]; if (supmeth.getName().equals(submeth.getName())) { if (Arrays.equals(params, submeth.getParameterTypes())) { continue outer; } } } fail("OMSourcedElementImpl must override method " + supmeth + "\nSee class JavaDocs for details"); } } } private int countItems(Iterator iter) { int count = 0; while (iter.hasNext()) { count++; iter.next(); } return count; } /** * Test serialization of OMSourcedElementImpl to a Stream * * @throws Exception */ public void testSerializeToStream() throws Exception { ByteArrayOutputStream bos = new ByteArrayOutputStream(); element.serialize(bos); String newText = new String(bos.toByteArray()); assertEquals("Serialized text error", testDocument, newText); assertTrue("Element not expanded when serializing", element.isExpanded()); bos = new ByteArrayOutputStream(); element.serialize(bos); assertEquals("Serialized text error", testDocument, new String(bos.toByteArray())); assertTrue("Element not expanded when serializing", element.isExpanded()); } /** * Test serialization of OMSourcedElementImpl to a Stream * * @throws Exception */ public void testSerializeAndConsumeToStream() throws Exception { ByteArrayOutputStream bos = new ByteArrayOutputStream(); element.serializeAndConsume(bos); assertEquals("Serialized text error", testDocument, new String(bos.toByteArray())); assertFalse("Element expansion when serializing", element.isExpanded()); } /** * Test serialization of OMSourcedElementImpl to a Writer * * @throws Exception */ public void testSerializeToWriter() throws Exception { StringWriter writer = new StringWriter(); element.serialize(writer); String result = writer.toString(); assertEquals("Serialized text error", testDocument, result); assertTrue("Element not expanded when serializing", element.isExpanded()); writer = new StringWriter(); element.serialize(writer); result = writer.toString(); assertEquals("Serialized text error", testDocument, result); assertTrue("Element not expanded when serializing", element.isExpanded()); } /** * Test serialization of OMSourcedElementImpl to a Writer * * @throws Exception */ public void testSerializeAndConsumeToWriter() throws Exception { StringWriter writer = new StringWriter(); element.serializeAndConsume(writer); String result = writer.toString(); assertEquals("Serialized text error", testDocument, result); assertFalse("Element expansion when serializing", element.isExpanded()); } /** * Test serialization of OMSourcedElementImpl to an XMLWriter * * @throws Exception */ public void testSerializeToXMLWriter() throws Exception { StringWriter writer = new StringWriter(); XMLStreamWriter xmlwriter = XMLOutputFactory.newInstance().createXMLStreamWriter(writer); element.serialize(writer); xmlwriter.flush(); assertEquals("Serialized text error", testDocument, writer.toString()); assertTrue("Element not expanded when serializing", element.isExpanded()); writer = new StringWriter(); xmlwriter = XMLOutputFactory.newInstance().createXMLStreamWriter(writer); element.serialize(writer); xmlwriter.flush(); assertEquals("Serialized text error", testDocument, writer.toString()); assertTrue("Element not expanded when serializing", element.isExpanded()); } /** * Test serialization of OMSourcedElementImpl to an XMLWriter * * @throws Exception */ public void testSerializeAndConsumeToXMLWriter() throws Exception { StringWriter writer = new StringWriter(); XMLStreamWriter xmlwriter = XMLOutputFactory.newInstance().createXMLStreamWriter(writer); element.serializeAndConsume(writer); xmlwriter.flush(); assertEquals("Serialized text error", testDocument, writer.toString()); assertFalse("Element expansion when serializing", element.isExpanded()); } /** * Tests OMSourcedElement serialization when the root (parent) is serialized. * * @throws Exception */ public void testSerializeToXMLWriterEmbedded() throws Exception { StringWriter writer = new StringWriter(); XMLStreamWriter xmlwriter = XMLOutputFactory.newInstance().createXMLStreamWriter(writer); root.serialize(writer); xmlwriter.flush(); String result = writer.toString(); // We can't test for equivalence because the underlying OMSourceElement is // streamed as it is serialized. So I am testing for an internal value. assertTrue("Serialized text error" + result, result.indexOf("1930110111") > 0); assertTrue("Element not expanded when serializing", element.isExpanded()); writer = new StringWriter(); xmlwriter = XMLOutputFactory.newInstance().createXMLStreamWriter(writer); root.serialize(writer); xmlwriter.flush(); result = writer.toString(); // We can't test for equivalence because the underlying OMSourceElement is // streamed as it is serialized. So I am testing for an internal value. assertTrue("Serialized text error" + result, result.indexOf("1930110111") > 0); assertTrue("Element not expanded when serializing", element.isExpanded()); } /** * Tests the OMSourcedElement localName, namespace and prefix settings before and after * serialization Document: testDocument (which uses the default namespace) Type of * Serialization: Serialize and cache Prefix test * * @throws Exception */ public void testName1DefaultPrefix() throws Exception { OMFactory f = new OMLinkedListImplFactory(); // Create OMSE with a DUMMYPREFIX prefix even though the underlying element uses the default prefix OMNamespace rootNS = new OMNamespaceImpl("http://sampleroot", "rootPrefix"); OMNamespace ns = new OMNamespaceImpl("http://www.sosnoski.com/uwjws/library", "DUMMYPREFIX"); OMElement element = new OMSourcedElementImpl("library", ns, f, new TestDataSource(testDocument)); OMElement root = f.createOMElement("root", rootNS); root.addChild(element); // Test getting the namespace, localpart and prefix. This should used not result in expansion assertTrue(element.getLocalName().equals("library")); assertTrue(element.getNamespace().getNamespaceURI().equals( "http://www.sosnoski.com/uwjws/library")); assertTrue(element.getNamespace().getPrefix().equals("DUMMYPREFIX")); // Serialize and cache. This should cause expansion. The prefix should be updated to match the testDocument string StringWriter writer = new StringWriter(); XMLStreamWriter xmlwriter = XMLOutputFactory.newInstance().createXMLStreamWriter(writer); root.serialize(writer); xmlwriter.flush(); String result = writer.toString(); assertTrue(element.getLocalName().equals("library")); assertTrue(element.getNamespace().getNamespaceURI().equals( "http://www.sosnoski.com/uwjws/library")); assertTrue(element.getNamespace().getPrefix().equals("")); assertTrue(element.getDefaultNamespace() != null); assertTrue(result.indexOf("DUMMYPREFIX") < 0); // Make sure that the serialized string does not contain DUMMYPREFIX assertTrue("Serialized text error" + result, result.indexOf("1930110111") > 0); // Serialize again writer = new StringWriter(); xmlwriter = XMLOutputFactory.newInstance().createXMLStreamWriter(writer); root.serialize(writer); xmlwriter.flush(); result = writer.toString(); assertTrue(element.getLocalName().equals("library")); assertTrue(element.getNamespace().getNamespaceURI().equals( "http://www.sosnoski.com/uwjws/library")); assertTrue(element.getNamespace().getPrefix().equals("")); assertTrue(element.getDefaultNamespace() != null); assertTrue(result.indexOf("DUMMYPREFIX") < 0); // Make sure that the serialized string does not contain DUMMYPREFIX assertTrue("Serialized text error" + result, result.indexOf("1930110111") > 0); } /** * Tests the OMSourcedElement localName, namespace and prefix settings before and after * serialization Document: testDocument (which uses the default namespace) Type of * Serialization: Serialize and consume Tests update of prefix * * @throws Exception */ public void testName2DefaultPrefix() throws Exception { OMFactory f = new OMLinkedListImplFactory(); // Create OMSE with a DUMMYPREFIX prefix even though the underlying element uses the default prefix OMNamespace rootNS = new OMNamespaceImpl("http://sampleroot", "rootPrefix"); OMNamespace ns = new OMNamespaceImpl("http://www.sosnoski.com/uwjws/library", "DUMMYPREFIX"); OMElement element = new OMSourcedElementImpl("library", ns, f, new TestDataSource(testDocument)); OMElement root = f.createOMElement("root", rootNS); root.addChild(element); // Test getting the namespace, localpart and prefix. This should used not result in expansion assertTrue(element.getLocalName().equals("library")); assertTrue(element.getNamespace().getNamespaceURI().equals( "http://www.sosnoski.com/uwjws/library")); assertTrue(element.getNamespace().getPrefix().equals("DUMMYPREFIX")); // Serialize and consume. This should not cause expansion and currently won't update // the name of the element. StringWriter writer = new StringWriter(); XMLStreamWriter xmlwriter = XMLOutputFactory.newInstance().createXMLStreamWriter(writer); root.serializeAndConsume(writer); xmlwriter.flush(); String result = writer.toString(); assertTrue(element.getLocalName().equals("library")); assertTrue(element.getNamespace().getNamespaceURI().equals( "http://www.sosnoski.com/uwjws/library")); assertTrue(element.getNamespace().getPrefix().equals("DUMMYPREFIX")); assertTrue(result.indexOf("DUMMYPREFIX") < 0); // Make sure that the serialized string does not contain DUMMYPREFIX assertTrue("Serialized text error" + result, result.indexOf("1930110111") > 0); } /** * Tests the OMSourcedElement localName, namespace and prefix settings before and after * serialization Document: testDocument (which uses the default namespace) Type of * Serialization: Serialize and cache Tests attempt to rename namespace and localpart, which is * not allowed * * @throws Exception */ public void testName3DefaultPrefix() throws Exception { OMFactory f = new OMLinkedListImplFactory(); // Create OMSE with a DUMMYPREFIX prefix even though the underlying element uses the default prefix OMNamespace rootNS = new OMNamespaceImpl("http://sampleroot", "rootPrefix"); OMNamespace ns = new OMNamespaceImpl("http://DUMMYNS", "DUMMYPREFIX"); OMElement element = new OMSourcedElementImpl("DUMMYNAME", ns, f, new TestDataSource(testDocument)); OMElement root = f.createOMElement("root", rootNS); root.addChild(element); // Test getting the namespace, localpart and prefix. This should used not result in expansion assertTrue(element.getLocalName().equals("DUMMYNAME")); assertTrue(element.getNamespace().getNamespaceURI().equals("http://DUMMYNS")); assertTrue(element.getNamespace().getPrefix().equals("DUMMYPREFIX")); // Serialize and cache. This should cause expansion and update the name to match the testDocument string StringWriter writer = new StringWriter(); XMLStreamWriter xmlwriter = XMLOutputFactory.newInstance().createXMLStreamWriter(writer); try { root.serialize(writer); } catch (Exception e) { // Current Behavior // The current OMSourceElementImpl ensures that the namespace and localName // are consistent with the original setting. return; } xmlwriter.flush(); String result = writer.toString(); assertTrue(element.getLocalName().equals("library")); assertTrue(element.getNamespace().getNamespaceURI().equals( "http://www.sosnoski.com/uwjws/library")); assertTrue(element.getNamespace().getPrefix().equals("")); assertTrue(result.indexOf("DUMMY") < 0); // Make sure that the serialized string does not contain the DUMMY values assertTrue("Serialized text error" + result, result.indexOf("1930110111") > 0); // Serialize again writer = new StringWriter(); xmlwriter = XMLOutputFactory.newInstance().createXMLStreamWriter(writer); root.serialize(writer); xmlwriter.flush(); result = writer.toString(); assertTrue(element.getLocalName().equals("library")); assertTrue(element.getNamespace().getNamespaceURI().equals( "http://www.sosnoski.com/uwjws/library")); assertTrue(element.getNamespace().getPrefix().equals("")); assertTrue(result.indexOf("DUMMY") < 0); // Make sure that the serialized string does not contain the DUMMY values assertTrue("Serialized text error" + result, result.indexOf("1930110111") > 0); } /** * Tests the OMSourcedElement localName, namespace and prefix settings before and after * serialization Document: testDocument (which uses the default namespace) Type of * Serialization: Serialize and consume Tests that the namespace and localName are not affected * by the serializeAndConsume * * @throws Exception */ public void testName4DefaultPrefix() throws Exception { OMFactory f = new OMLinkedListImplFactory(); // Create OMSE with a DUMMYPREFIX prefix even though the underlying element uses the default prefix OMNamespace rootNS = new OMNamespaceImpl("http://sampleroot", "rootPrefix"); OMNamespace ns = new OMNamespaceImpl("http://DUMMYNS", "DUMMYPREFIX"); OMElement element = new OMSourcedElementImpl("DUMMYNAME", ns, f, new TestDataSource(testDocument)); OMElement root = f.createOMElement("root", rootNS); root.addChild(element); // Test getting the namespace, localpart and prefix. This should used not result in expansion assertTrue(element.getLocalName().equals("DUMMYNAME")); assertTrue(element.getNamespace().getNamespaceURI().equals("http://DUMMYNS")); assertTrue(element.getNamespace().getPrefix().equals("DUMMYPREFIX")); // Serialize and consume. This should not cause expansion and currently won't update // the name of the element. StringWriter writer = new StringWriter(); XMLStreamWriter xmlwriter = XMLOutputFactory.newInstance().createXMLStreamWriter(writer); root.serializeAndConsume(writer); xmlwriter.flush(); String result = writer.toString(); assertTrue(element.getLocalName().equals("DUMMYNAME")); assertTrue(element.getNamespace().getNamespaceURI().equals("http://DUMMYNS")); assertTrue(element.getNamespace().getPrefix().equals("DUMMYPREFIX")); assertTrue(result.indexOf("DUMMY") < 0); // Make sure that the serialized string does not contain the DUMMY values assertTrue("Serialized text error" + result, result.indexOf("1930110111") > 0); } /** * Tests the OMSourcedElement localName, namespace and prefix settings before and after * serialization Document: testDocument2 (which uses a qualified prefix) Type of Serialization: * Serialize and cache Prefix test * * @throws Exception */ public void testName1QualifiedPrefix() throws Exception { OMFactory f = new OMLinkedListImplFactory(); // Create OMSE with a DUMMYPREFIX prefix even though the underlying element uses the default prefix OMNamespace rootNS = new OMNamespaceImpl("http://sampleroot", "rootPrefix"); OMNamespace ns = new OMNamespaceImpl("http://www.sosnoski.com/uwjws/library", ""); OMElement element = new OMSourcedElementImpl("library", ns, f, new TestDataSource(testDocument2)); OMElement root = f.createOMElement("root", rootNS); root.addChild(element); // Test getting the namespace, localpart and prefix. This should used not result in expansion assertTrue(element.getLocalName().equals("library")); assertTrue(element.getNamespace().getNamespaceURI().equals( "http://www.sosnoski.com/uwjws/library")); assertTrue(element.getNamespace().getPrefix().equals("")); // Serialize and cache. This should cause expansion and update the name to match the testDocument string StringWriter writer = new StringWriter(); XMLStreamWriter xmlwriter = XMLOutputFactory.newInstance().createXMLStreamWriter(writer); root.serialize(writer); xmlwriter.flush(); String result = writer.toString(); assertTrue(element.getLocalName().equals("library")); assertTrue(element.getNamespace().getNamespaceURI().equals( "http://www.sosnoski.com/uwjws/library")); assertTrue(element.getNamespace().getPrefix().equals("pre")); assertTrue(element.getDefaultNamespace() == null); assertTrue(result.indexOf("xmlns=") < 0);// Make sure that the serialized string does not contain default prefix declaration assertTrue("Serialized text error" + result, result.indexOf("1930110111") > 0); // Serialize again writer = new StringWriter(); xmlwriter = XMLOutputFactory.newInstance().createXMLStreamWriter(writer); root.serialize(writer); xmlwriter.flush(); result = writer.toString(); assertTrue(element.getLocalName().equals("library")); assertTrue(element.getNamespace().getNamespaceURI().equals( "http://www.sosnoski.com/uwjws/library")); assertTrue(element.getNamespace().getPrefix().equals("pre")); assertTrue(result.indexOf("xmlns=") < 0); // Make sure that the serialized string does not contain default prefix declaration assertTrue(element.getDefaultNamespace() == null); assertTrue("Serialized text error" + result, result.indexOf("1930110111") > 0); } /** * Tests the OMSourcedElement localName, namespace and prefix settings before and after * serialization Document: testDocument2 (which uses a qualified prefix) Type of Serialization: * Serialize and consume Tests update of prefix * * @throws Exception */ public void testName2QualifiedPrefix() throws Exception { OMFactory f = new OMLinkedListImplFactory(); // Create OMSE with a DUMMYPREFIX prefix even though the underlying element uses the default prefix OMNamespace rootNS = new OMNamespaceImpl("http://sampleroot", "rootPrefix"); OMNamespace ns = new OMNamespaceImpl("http://www.sosnoski.com/uwjws/library", ""); OMElement element = new OMSourcedElementImpl("library", ns, f, new TestDataSource(testDocument2)); OMElement root = f.createOMElement("root", rootNS); root.addChild(element); // Test getting the namespace, localpart and prefix. This should used not result in expansion assertTrue(element.getLocalName().equals("library")); assertTrue(element.getNamespace().getNamespaceURI().equals( "http://www.sosnoski.com/uwjws/library")); assertTrue(element.getNamespace().getPrefix().equals("")); // Serialize and consume. This should not cause expansion and currently won't update // the name of the element. StringWriter writer = new StringWriter(); XMLStreamWriter xmlwriter = XMLOutputFactory.newInstance().createXMLStreamWriter(writer); root.serializeAndConsume(writer); xmlwriter.flush(); String result = writer.toString(); assertTrue(element.getLocalName().equals("library")); assertTrue(element.getNamespace().getNamespaceURI().equals( "http://www.sosnoski.com/uwjws/library")); assertTrue(element.getNamespace().getPrefix().equals("")); assertTrue(result.indexOf("xmlns=") < 0); // Make sure that the serialized string does not contain default prefix declaration assertTrue("Serialized text error" + result, result.indexOf("1930110111") > 0); } /** * Tests the OMSourcedElement localName, namespace and prefix settings before and after * serialization Document: testDocument2 (which uses a qualified prefix) Type of Serialization: * Serialize and cache Tests attempt to rename namespace and localpart, which is not allowed * * @throws Exception */ public void testName3QualifiedPrefix() throws Exception { OMFactory f = new OMLinkedListImplFactory(); // Create OMSE with a DUMMYPREFIX prefix even though the underlying element uses the default prefix OMNamespace rootNS = new OMNamespaceImpl("http://sampleroot", "rootPrefix"); OMNamespace ns = new OMNamespaceImpl("http://DUMMYNS", "DUMMYPREFIX"); OMElement element = new OMSourcedElementImpl("DUMMYNAME", ns, f, new TestDataSource(testDocument2)); OMElement root = f.createOMElement("root", rootNS); root.addChild(element); // Test getting the namespace, localpart and prefix. This should used not result in expansion assertTrue(element.getLocalName().equals("DUMMYNAME")); assertTrue(element.getNamespace().getNamespaceURI().equals("http://DUMMYNS")); assertTrue(element.getNamespace().getPrefix().equals("DUMMYPREFIX")); // Serialize and cache. This should cause expansion and update the name to match the testDocument string StringWriter writer = new StringWriter(); XMLStreamWriter xmlwriter = XMLOutputFactory.newInstance().createXMLStreamWriter(writer); try { root.serialize(writer); } catch (Exception e) { // Current Behavior // The current OMSourceElementImpl ensures that the namespace and localName // are consistent with the original setting. return; } xmlwriter.flush(); String result = writer.toString(); assertTrue(element.getLocalName().equals("library")); assertTrue(element.getNamespace().getNamespaceURI().equals( "http://www.sosnoski.com/uwjws/library")); assertTrue(element.getNamespace().getPrefix().equals("")); assertTrue(result.indexOf("DUMMY") < 0);// Make sure that the serialized string does not contain the DUMMY values assertTrue("Serialized text error" + result, result.indexOf("1930110111") > 0); // Serialize again writer = new StringWriter(); xmlwriter = XMLOutputFactory.newInstance().createXMLStreamWriter(writer); root.serialize(writer); xmlwriter.flush(); result = writer.toString(); assertTrue(element.getLocalName().equals("library")); assertTrue(element.getNamespace().getNamespaceURI().equals( "http://www.sosnoski.com/uwjws/library")); assertTrue(element.getNamespace().getPrefix().equals("")); assertTrue(result.indexOf("DUMMY") < 0);// Make sure that the serialized string does not contain the DUMMY values assertTrue("Serialized text error" + result, result.indexOf("1930110111") > 0); } /** * Tests the OMSourcedElement localName, namespace and prefix settings before and after * serialization Document: testDocument2 (which uses a qualified prefix) Type of Serialization: * Serialize and cache Tests attempt to rename namespace and localpart, which is not allowed * * @throws Exception */ public void testName4QualifiedPrefix() throws Exception { OMFactory f = new OMLinkedListImplFactory(); // Create OMSE with a DUMMYPREFIX prefix even though the underlying element uses the default prefix OMNamespace rootNS = new OMNamespaceImpl("http://sampleroot", "rootPrefix"); OMNamespace ns = new OMNamespaceImpl("http://DUMMYNS", ""); OMElement element = new OMSourcedElementImpl("DUMMYNAME", ns, f, new TestDataSource(testDocument2)); OMElement root = f.createOMElement("root", rootNS); root.addChild(element); // Test getting the namespace, localpart and prefix. This should used not result in expansion assertTrue(element.getLocalName().equals("DUMMYNAME")); assertTrue(element.getNamespace().getNamespaceURI().equals("http://DUMMYNS")); assertTrue(element.getNamespace().getPrefix().equals("")); // Serialize and consume. This should not cause expansion and currently won't update // the name of the element. StringWriter writer = new StringWriter(); XMLStreamWriter xmlwriter = XMLOutputFactory.newInstance().createXMLStreamWriter(writer); root.serializeAndConsume(writer); xmlwriter.flush(); String result = writer.toString(); assertTrue(element.getLocalName().equals("DUMMYNAME")); assertTrue(element.getNamespace().getNamespaceURI().equals("http://DUMMYNS")); assertTrue(element.getNamespace().getPrefix().equals("")); assertTrue(result.indexOf("DUMMY") < 0); // Make sure that the serialized string does not contain the DUMMY values assertTrue(result.indexOf("xmlns=") < 0);// Make sure that the serialized string does not contain the default prefix declaration assertTrue("Serialized text error" + result, result.indexOf("1930110111") > 0); } /** * Tests the OMSourcedElement localName, namespace and prefix settings before and after * serialization Document: testDocument3 (which uses unqualified names) Type of Serialization: * Serialize and cache Prefix test * * @throws Exception */ public void testName1Unqualified() throws Exception { OMFactory f = new OMLinkedListImplFactory(); // Create OMSE with a DUMMYPREFIX prefix even though the underlying element uses the default prefix OMNamespace rootNS = new OMNamespaceImpl("http://sampleroot", "rootPrefix"); OMNamespace ns = new OMNamespaceImpl("", ""); OMElement element = new OMSourcedElementImpl("library", ns, f, new TestDataSource(testDocument3)); OMElement root = f.createOMElement("root", rootNS); root.addChild(element); // Test getting the namespace, localpart and prefix. This should used not result in expansion assertTrue(element.getLocalName().equals("library")); assertTrue(element.getNamespace().getNamespaceURI().equals("")); assertTrue(element.getNamespace().getPrefix().equals("")); // Serialize and cache. This should cause expansion and update the name to match the testDocument string StringWriter writer = new StringWriter(); XMLStreamWriter xmlwriter = XMLOutputFactory.newInstance().createXMLStreamWriter(writer); root.serialize(writer); xmlwriter.flush(); String result = writer.toString(); assertTrue(element.getLocalName().equals("library")); assertTrue(element.getNamespace().getNamespaceURI().equals("")); assertTrue(element.getNamespace().getPrefix().equals("")); assertTrue(element.getDefaultNamespace() == null || element.getDefaultNamespace().getNamespaceURI().length() == 0); assertTrue(result.indexOf("xmlns=") < 0); // Make sure that the serialized string does not contain default prefix declaration assertTrue("Serialized text error" + result, result.indexOf("1930110111") > 0); // Serialize again writer = new StringWriter(); xmlwriter = XMLOutputFactory.newInstance().createXMLStreamWriter(writer); root.serialize(writer); xmlwriter.flush(); result = writer.toString(); assertTrue(element.getLocalName().equals("library")); assertTrue(element.getNamespace().getNamespaceURI().equals("")); assertTrue(element.getNamespace().getPrefix().equals("")); assertTrue(result.indexOf("xmlns=") < 0);// Make sure that the serialized string does not contain default prefix declaration assertTrue(element.getDefaultNamespace() == null || element.getDefaultNamespace().getNamespaceURI().length() == 0); assertTrue("Serialized text error" + result, result.indexOf("1930110111") > 0); } /** * Tests the OMSourcedElement localName, namespace and prefix settings before and after * serialization Document: testDocument3 (which uses unqualified names) Type of Serialization: * Serialize and consume Tests update of prefix * * @throws Exception */ public void testName2Unqualified() throws Exception { OMFactory f = new OMLinkedListImplFactory(); // Create OMSE with a DUMMYPREFIX prefix even though the underlying element uses the default prefix OMNamespace rootNS = new OMNamespaceImpl("http://sampleroot", "rootPrefix"); OMNamespace ns = new OMNamespaceImpl("", ""); OMElement element = new OMSourcedElementImpl("library", ns, f, new TestDataSource(testDocument3)); OMElement root = f.createOMElement("root", rootNS); root.addChild(element); // Test getting the namespace, localpart and prefix. This should used not result in expansion assertTrue(element.getLocalName().equals("library")); assertTrue(element.getNamespace().getNamespaceURI().equals("")); assertTrue(element.getNamespace().getPrefix().equals("")); // Serialize and consume. This should not cause expansion and currently won't update // the name of the element. StringWriter writer = new StringWriter(); XMLStreamWriter xmlwriter = XMLOutputFactory.newInstance().createXMLStreamWriter(writer); root.serializeAndConsume(writer); xmlwriter.flush(); String result = writer.toString(); assertTrue(element.getLocalName().equals("library")); assertTrue(element.getNamespace().getNamespaceURI().equals("")); assertTrue(element.getNamespace().getPrefix().equals("")); assertTrue(result.indexOf("xmlns=") < 0);// Make sure that the serialized string does not contain default prefix declaration assertTrue("Serialized text error" + result, result.indexOf("1930110111") > 0); } /** * Tests the OMSourcedElement localName, namespace and prefix settings before and after * serialization Document: testDocument3 (which uses unqualified names) Type of Serialization: * Serialize and cache Tests attempt to rename namespace and localpart, which is not allowed * * @throws Exception */ public void testName3Unqualified() throws Exception { OMFactory f = new OMLinkedListImplFactory(); // Create OMSE with a DUMMYPREFIX prefix even though the underlying element uses the default prefix OMNamespace rootNS = new OMNamespaceImpl("http://sampleroot", "rootPrefix"); OMNamespace ns = new OMNamespaceImpl("http://DUMMYNS", "DUMMYPREFIX"); OMElement element = new OMSourcedElementImpl("DUMMYNAME", ns, f, new TestDataSource(testDocument3)); OMElement root = f.createOMElement("root", rootNS); root.addChild(element); // Test getting the namespace, localpart and prefix. This should used not result in expansion assertTrue(element.getLocalName().equals("DUMMYNAME")); assertTrue(element.getNamespace().getNamespaceURI().equals("http://DUMMYNS")); assertTrue(element.getNamespace().getPrefix().equals("DUMMYPREFIX")); // Serialize and cache. This should cause expansion and update the name to match the testDocument string StringWriter writer = new StringWriter(); XMLStreamWriter xmlwriter = XMLOutputFactory.newInstance().createXMLStreamWriter(writer); try { root.serialize(writer); } catch (Exception e) { // Current Behavior // The current OMSourceElementImpl ensures that the namespace and localName // are consistent with the original setting. return; } xmlwriter.flush(); String result = writer.toString(); assertTrue(element.getLocalName().equals("library")); assertTrue(element.getNamespace().getNamespaceURI().equals("")); assertTrue(element.getNamespace().getPrefix().equals("")); assertTrue(result.indexOf("DUMMY") < 0); // Make sure that the serialized string does not contain the DUMMY values assertTrue("Serialized text error" + result, result.indexOf("1930110111") > 0); // Serialize again writer = new StringWriter(); xmlwriter = XMLOutputFactory.newInstance().createXMLStreamWriter(writer); root.serialize(writer); xmlwriter.flush(); result = writer.toString(); assertTrue(element.getLocalName().equals("library")); assertTrue(element.getNamespace().getNamespaceURI().equals( "http://www.sosnoski.com/uwjws/library")); assertTrue(element.getNamespace().getPrefix().equals("")); assertTrue(result.indexOf("DUMMY") < 0); // Make sure that the serialized string does not contain the DUMMY values assertTrue("Serialized text error" + result, result.indexOf("1930110111") > 0); } /** * Tests the OMSourcedElement localName, namespace and prefix settings before and after * serialization Document: testDocument3 (which uses unqualified names) Type of Serialization: * Serialize and cache Tests attempt to rename namespace and localpart, which is not allowed * * @throws Exception */ public void testName4Unqualified() throws Exception { OMFactory f = new OMLinkedListImplFactory(); // Create OMSE with a DUMMYPREFIX prefix even though the underlying element uses the default prefix OMNamespace rootNS = new OMNamespaceImpl("http://sampleroot", "rootPrefix"); OMNamespace ns = new OMNamespaceImpl("http://DUMMYNS", ""); OMElement element = new OMSourcedElementImpl("DUMMYNAME", ns, f, new TestDataSource(testDocument3)); OMElement root = f.createOMElement("root", rootNS); root.addChild(element); // Test getting the namespace, localpart and prefix. This should used not result in expansion assertTrue(element.getLocalName().equals("DUMMYNAME")); assertTrue(element.getNamespace().getNamespaceURI().equals("http://DUMMYNS")); assertTrue(element.getNamespace().getPrefix().equals("")); // Serialize and consume. This should not cause expansion and currently won't update // the name of the element. StringWriter writer = new StringWriter(); XMLStreamWriter xmlwriter = XMLOutputFactory.newInstance().createXMLStreamWriter(writer); root.serializeAndConsume(writer); xmlwriter.flush(); String result = writer.toString(); assertTrue(element.getLocalName().equals("DUMMYNAME")); assertTrue(element.getNamespace().getNamespaceURI().equals("http://DUMMYNS")); assertTrue(element.getNamespace().getPrefix().equals("")); assertTrue(result.indexOf("DUMMY") < 0); // Make sure that the serialized string does not contain the DUMMY values assertTrue(result.indexOf("xmlns=") < 0); // Make sure that the serialized string does not contain the default prefix declaration assertTrue("Serialized text error" + result, result.indexOf("1930110111") > 0); } /** * Tests OMSourcedElement serialization when the root (parent) is serialized. * * @throws Exception */ public void testSerializeAndConsumeToXMLWriterEmbedded() throws Exception { StringWriter writer = new StringWriter(); XMLStreamWriter xmlwriter = XMLOutputFactory.newInstance().createXMLStreamWriter(writer); root.serializeAndConsume(writer); xmlwriter.flush(); String result = writer.toString(); // We can't test for equivalence because the underlying OMSourceElement is // streamed as it is serialized. So I am testing for an internal value. assertTrue("Serialized text error" + result, result.indexOf("1930110111") > 0); assertFalse("Element expansion when serializing", element.isExpanded()); } /** * Tests OMSourcedElement getReader support * * @throws Exception */ public void testSerializeToXMLWriterFromReader() throws Exception { StringWriter writer = new StringWriter(); XMLStreamWriter xmlwriter = XMLOutputFactory.newInstance().createXMLStreamWriter(writer); StAXOMBuilder builder = new StAXOMBuilder(element.getXMLStreamReader()); OMDocument omDocument = builder.getDocument(); Iterator it = omDocument.getChildren(); while (it.hasNext()) { OMNode omNode = (OMNode) it.next(); omNode.serializeAndConsume(xmlwriter); } xmlwriter.flush(); String result = writer.toString(); // We can't test for equivalence because the underlying OMSourceElement is // changed as it is serialized. So I am testing for an internal value. assertTrue("Serialized text error" + result, result.indexOf("1930110111") > 0); assertFalse("Element expansion when serializing", element.isExpanded()); } /** * Tests OMSourcedElement processing when the getReader() of the parent is accessed. * * @throws Exception */ public void testSerializeToXMLWriterFromReaderEmbedded() throws Exception { StringWriter writer = new StringWriter(); XMLStreamWriter xmlwriter = XMLOutputFactory.newInstance().createXMLStreamWriter(writer); StAXOMBuilder builder = new StAXOMBuilder(root.getXMLStreamReader()); OMDocument omDocument = builder.getDocument(); Iterator it = omDocument.getChildren(); while (it.hasNext()) { OMNode omNode = (OMNode) it.next(); omNode.serializeAndConsume(xmlwriter); } xmlwriter.flush(); String result = writer.toString(); // We can't test for equivalence because the underlying OMSourceElement is // changed as it is serialized. So I am testing for an internal value. assertTrue("Serialized text error" + result, result.indexOf("1930110111") > 0); // The implementation uses OMNavigator to walk the tree. Currently OMNavigator must // expand the OMSourcedElement to correctly walk the elements. (See OMNavigator._getFirstChild) //assertFalse("Element expansion when serializing", element.isExpanded()); } /** * Make sure the expanded OMSourcedElement behaves like a normal OMElement. * * @throws Exception */ public void testExpand() throws Exception { element.getAllDeclaredNamespaces(); assertEquals("Expanded namespace count error", 1, countItems(element.getAllDeclaredNamespaces())); assertEquals("Expanded attribute count error", 1, countItems(element.getAllAttributes())); assertEquals("Expanded attribute value error", "1", element.getAttributeValue(new QName("books"))); OMElement child = element.getFirstElement(); assertEquals("Child element name", "type", child.getLocalName()); assertEquals("Child element namespace", "http://www.sosnoski.com/uwjws/library", child.getNamespace().getNamespaceURI()); OMNode next = child.getNextOMSibling(); assertTrue("Expected child element", next instanceof OMElement); next = next.getNextOMSibling(); assertTrue("Expected child element", next instanceof OMElement); child = (OMElement) next; assertEquals("Child element name", "book", child.getLocalName()); assertEquals("Child element namespace", "http://www.sosnoski.com/uwjws/library", child.getNamespace().getNamespaceURI()); assertEquals("Attribute value error", "xml", child.getAttributeValue(new QName("type"))); } public void testSetDataSourceOnAlreadyExpandedElement() { // Make sure the OMSourcedElement is expanded element.getFirstOMChild(); assertTrue(element.isExpanded()); // Now set a new data source element.setDataSource(new TestDataSource(testDocument2)); assertFalse(element.isExpanded()); // getNextOMSibling should not expand the element assertNull(element.getNextOMSibling()); assertFalse(element.isExpanded()); } public void testSerializeModifiedOMSEWithNonDestructiveDataSource() throws Exception { OMDataSourceExt ds = new CharArrayDataSource("".toCharArray()); assertFalse(ds.isDestructiveWrite()); OMFactory f = new OMLinkedListImplFactory(); OMElement element = new OMSourcedElementImpl("element", null, f, ds); element.getFirstElement().setText("TEST"); StringWriter sw = new StringWriter(); element.serialize(sw); assertTrue(sw.toString().indexOf("TEST") != -1); ByteArrayOutputStream baos = new ByteArrayOutputStream(); element.serialize(baos); assertTrue(new String(baos.toByteArray(), "UTF-8").indexOf("TEST") != -1); assertTrue(element.toString().indexOf("TEST") != -1); } private static class TestDataSource implements OMDataSource { // The data source is a ByteArrayInputStream so that we can verify that the datasource // is only accessed once. Currently there is no way to identify a destructive vs. non-destructive OMDataSource. private final ByteArrayInputStream data; private TestDataSource(String data) { this.data = new ByteArrayInputStream(data.getBytes()); this.data.mark(0); } /* (non-Javadoc) * @see org.apache.axiom.om.OMDataSource#serialize(java.io.OutputStream, org.apache.axiom.om.OMOutputFormat) */ public void serialize(OutputStream output, OMOutputFormat format) throws XMLStreamException { try { output.write(getBytes()); } catch (IOException e) { throw new XMLStreamException(e); } } /* (non-Javadoc) * @see org.apache.axiom.om.OMDataSource#serialize(java.io.Writer, org.apache.axiom.om.OMOutputFormat) */ public void serialize(Writer writer, OMOutputFormat format) throws XMLStreamException { try { writer.write(getString()); } catch (IOException e) { throw new XMLStreamException(e); } } /* (non-Javadoc) * @see org.apache.axiom.om.OMDataSource#serialize(javax.xml.stream.XMLStreamWriter) */ public void serialize(XMLStreamWriter xmlWriter) throws XMLStreamException { StreamingOMSerializer serializer = new StreamingOMSerializer(); serializer.serialize(getReader(), xmlWriter); } /* (non-Javadoc) * @see org.apache.axiom.om.OMDataSource#getReader() */ public XMLStreamReader getReader() throws XMLStreamException { XMLInputFactory inputFactory = XMLInputFactory.newInstance(); return inputFactory.createXMLStreamReader(new StringReader(getString())); } private byte[] getBytes() throws XMLStreamException { try { // The data from the data source should only be accessed once //data.reset(); byte[] rc = new byte[data.available()]; data.read(rc); return rc; } catch (IOException io) { throw new XMLStreamException(io); } } private String getString() throws XMLStreamException { String text = new String(getBytes()); return text; } } }axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/llom/OMElementTest.java0000644000000000000000000000604311131637476030761 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.llom; import java.util.Iterator; import javax.xml.namespace.QName; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMElementTestBase; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.impl.llom.factory.OMLinkedListImplFactory; public class OMElementTest extends OMElementTestBase { private static final String AXIS2_NS_URI = "http://ws.apache.org/axis2"; private static final String AXIS2_NS_PREFIX = "axis2"; private static final String SOME_TEXT = "Some Text"; protected OMFactory getOMFactory() { return new OMLinkedListImplFactory(); } public void testTextQNames() { OMFactory factory = getOMFactory(); OMElement omElement = factory.createOMElement("TestElement", null); omElement.setText(new QName(AXIS2_NS_URI, SOME_TEXT, AXIS2_NS_PREFIX)); Iterator allDeclaredNamespaces = omElement.getAllDeclaredNamespaces(); boolean foundNamespace = false; while (allDeclaredNamespaces.hasNext()) { OMNamespace omNamespace = (OMNamespace) allDeclaredNamespaces.next(); if (AXIS2_NS_URI.equals(omNamespace.getNamespaceURI()) && AXIS2_NS_PREFIX.equals(omNamespace.getPrefix())) { foundNamespace = true; } } assertTrue("Namespace of the text is not defined in the parent element", foundNamespace); String elementString = omElement.toString(); assertTrue(elementString.indexOf(AXIS2_NS_PREFIX + ":" + SOME_TEXT) > -1); assertTrue((AXIS2_NS_PREFIX + ":" + SOME_TEXT).equals(omElement.getText())); QName textAsQName = omElement.getTextAsQName(); assertTrue(textAsQName.equals(new QName(AXIS2_NS_URI, SOME_TEXT, AXIS2_NS_PREFIX))); } public void testTextQNamesWithoutQNames() { OMFactory factory = getOMFactory(); OMElement omElement = factory.createOMElement("TestElement", null); omElement.setText(SOME_TEXT); String elementString = omElement.toString(); assertTrue(elementString.indexOf(":" + SOME_TEXT) == -1); QName textAsQName = omElement.getTextAsQName(); assertTrue(textAsQName.equals(new QName(SOME_TEXT))); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/llom/OMStAXWrapperTest.java0000644000000000000000000001220611131637476031546 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.llom; import java.io.ByteArrayInputStream; import java.io.InputStream; import java.util.Arrays; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLStreamReader; import junit.framework.TestCase; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMNode; import org.apache.axiom.om.OMText; import org.apache.axiom.om.impl.builder.StAXOMBuilder; import org.apache.axiom.om.impl.llom.factory.OMLinkedListImplFactory; import org.apache.axiom.om.impl.llom.util.AXIOMUtil; import org.apache.axiom.om.util.StAXUtils; public class OMStAXWrapperTest extends TestCase { // Regression test for WSCOMMONS-338 and WSCOMMONS-341 public void testCDATAEvent_FromParser() throws Exception { // Make sure that the parser is non coalescing (otherwise no CDATA events will be // reported). This is not the default for Woodstox (see WSTX-140). XMLInputFactory factory = XMLInputFactory.newInstance(); factory.setProperty(XMLInputFactory.IS_COALESCING, Boolean.FALSE); // Create an element with a CDATA section. InputStream is = new ByteArrayInputStream("".getBytes()); XMLStreamReader reader = factory.createXMLStreamReader(is); OMFactory omfactory = new OMLinkedListImplFactory(); OMElement element = new StAXOMBuilder(omfactory, reader).getDocumentElement(); // Build the element so we have a full StAX tree element.build(); // Get the XMLStreamReader for the element. This will return an OMStAXWrapper. XMLStreamReader reader2 = element.getXMLStreamReader(); // Check the sequence of events int event = reader2.next(); assertEquals(XMLStreamReader.START_ELEMENT, event); while (reader2.hasNext() && event != XMLStreamReader.CDATA) { event = reader2.next(); } // Only woodstox is guaranteed to generate CDATA events if javax.xml.stream.isCoalescing=false if (reader.toString().indexOf("wstx")!=-1) { assertEquals(XMLStreamReader.CDATA, event); assertEquals("hello world", reader2.getText()); // WSCOMMONS-341 assertTrue(Arrays.equals("hello world".toCharArray(), reader2.getTextCharacters())); // WSCOMMONS-338 assertEquals(XMLStreamReader.END_ELEMENT, reader2.next()); } } public void testCDATAEvent_FromElement() throws Exception { OMFactory omfactory = new OMLinkedListImplFactory(); OMElement element = omfactory.createOMElement("test", null); OMText cdata = omfactory.createOMText("hello world", OMNode.CDATA_SECTION_NODE); element.addChild(cdata); // Get the XMLStreamReader for the element. This will return an OMStAXWrapper. XMLStreamReader reader2 = element.getXMLStreamReader(); // Check the sequence of events int event = reader2.next(); assertEquals(XMLStreamReader.START_ELEMENT, event); while (reader2.hasNext() && event != XMLStreamReader.CDATA) { event = reader2.next(); } assertEquals(XMLStreamReader.CDATA, event); assertEquals("hello world", reader2.getText()); // WSCOMMONS-341 assertTrue(Arrays.equals("hello world".toCharArray(), reader2.getTextCharacters())); // WSCOMMONS-338 assertEquals(XMLStreamReader.END_ELEMENT, reader2.next()); } public void testCommentEvent() throws Exception { OMStAXWrapper reader = (OMStAXWrapper)AXIOMUtil.stringToOM("").getXMLStreamReader(); assertEquals(XMLStreamReader.START_ELEMENT, reader.next()); assertEquals(XMLStreamReader.COMMENT, reader.next()); assertEquals("comment text", reader.getText()); assertEquals("comment text", new String(reader.getTextCharacters(), reader.getTextStart(), reader.getTextLength())); StringBuffer text = new StringBuffer(); char[] buf = new char[5]; for (int sourceStart = 0; ; sourceStart += buf.length) { int nCopied = reader.getTextCharacters(sourceStart, buf, 0, buf.length); text.append(buf, 0, nCopied); if (nCopied < buf.length) { break; } } assertEquals("comment text", text.toString()); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/llom/OMAttributeTest.java0000644000000000000000000001055711131637476031340 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.llom; import junit.framework.TestCase; import org.apache.axiom.om.OMAbstractFactory; import org.apache.axiom.om.OMAttribute; import org.apache.axiom.om.OMConstants; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.impl.builder.StAXOMBuilder; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLStreamReader; import java.io.ByteArrayInputStream; public class OMAttributeTest extends TestCase { public void testNullLocalName() throws Exception { OMFactory factory = OMAbstractFactory.getOMFactory(); try { factory.createOMAttribute(null, null, null); } catch (IllegalArgumentException e) { return; } fail("Null localname was accepted!"); } public void testEmptyLocalName() throws Exception { OMFactory factory = OMAbstractFactory.getOMFactory(); try { factory.createOMAttribute("", null, null); } catch (IllegalArgumentException e) { return; } fail("Empty localname was accepted!"); } public void testWhitespaceLocalName() throws Exception { OMFactory factory = OMAbstractFactory.getOMFactory(); try { factory.createOMAttribute(" ", null, null); } catch (IllegalArgumentException e) { return; } fail("Whitespace localname was accepted!"); } public void testAddAttribute() throws Exception { String xmlString = "/home/saliya/DesktopTTTT "; assertEquals(addAttributeMethod1(xmlString), addAttributeMethod2(xmlString)); } public void testDefaultAttributeType() throws Exception { OMFactory factory = OMAbstractFactory.getOMFactory(); OMNamespace ns = factory.createOMNamespace("http://www.me.com", "axiom"); OMAttribute at = factory.createOMAttribute("id", ns, "value"); assertEquals(at.getAttributeType(), "CDATA"); } private String addAttributeMethod1(String xmlString) throws Exception { XMLStreamReader parser2; parser2 = XMLInputFactory.newInstance() .createXMLStreamReader(new ByteArrayInputStream(xmlString.getBytes())); StAXOMBuilder builder2 = new StAXOMBuilder(parser2); OMElement doc = builder2.getDocumentElement(); OMFactory factory = OMAbstractFactory.getOMFactory(); OMNamespace ns = factory.createOMNamespace("http://www.me.com", "axiom"); //code line to be tested OMAttribute at = factory.createOMAttribute("id", ns, "value"); doc.addAttribute(at); return doc.toString(); } private String addAttributeMethod2(String xmlString) throws Exception { XMLStreamReader parser2; parser2 = XMLInputFactory.newInstance() .createXMLStreamReader(new ByteArrayInputStream(xmlString.getBytes())); StAXOMBuilder builder2 = new StAXOMBuilder(parser2); OMElement doc = builder2.getDocumentElement(); OMFactory factory = OMAbstractFactory.getOMFactory(); OMNamespace ns = factory.createOMNamespace("http://www.me.com", "axiom"); //code line to be tested doc.addAttribute("id", "value", ns); return doc.toString(); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/llom/util/0000755000000000000000000000000011131637476026403 5ustar rootrootaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/llom/util/AXIOMUtilTest.java0000644000000000000000000000227311131637476031625 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.llom.util; import javax.xml.stream.XMLStreamException; import junit.framework.TestCase; public class AXIOMUtilTest extends TestCase { public void testStringToOM() throws XMLStreamException { String testString = "\u00e0 peine arriv\u00e9s nous entr\u00e2mes dans sa chambre"; assertEquals(testString, AXIOMUtil.stringToOM("" + testString + "").getText()); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/llom/OMOutputTest.java0000644000000000000000000000754511131637476030700 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.llom; import org.apache.axiom.attachments.ByteArrayDataSource; import org.apache.axiom.om.AbstractTestCase; import org.apache.axiom.om.OMAbstractFactory; import org.apache.axiom.om.OMAttribute; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMOutputFormat; import org.apache.axiom.om.impl.OMNamespaceImpl; import javax.activation.DataHandler; import java.io.File; import java.io.FileOutputStream; public class OMOutputTest extends AbstractTestCase { /** @param testName */ public OMOutputTest(String testName) { super(testName); } String outFileName; String outBase64FileName; OMElement envelope; File outMTOMFile; File outBase64File; /* * @see TestCase#setUp() */ protected void setUp() throws Exception { super.setUp(); DataHandler dataHandler; outFileName = "OMSerializeMTOMOut.txt"; outBase64FileName = "OMSerializeBase64Out.xml"; outMTOMFile = getTempOutputFile(outFileName); outBase64File = getTempOutputFile(outBase64FileName); OMFactory fac = OMAbstractFactory.getOMFactory(); OMNamespaceImpl soap = new OMNamespaceImpl( "http://schemas.xmlsoap.org/soap/envelope/", "soap"); envelope = new OMElementImpl("Envelope", soap, fac); OMElement body = new OMElementImpl("Body", soap, fac); OMNamespaceImpl dataName = new OMNamespaceImpl( "http://www.example.org/stuff", "m"); OMElement data = new OMElementImpl("data", dataName, fac); OMNamespaceImpl mime = new OMNamespaceImpl( "http://www.w3.org/2003/06/xmlmime", "mime"); OMElement text = new OMElementImpl("name", dataName, fac); OMAttribute cType1 = new OMAttributeImpl("contentType", mime, "text/plain", fac); text.addAttribute(cType1); byte[] byteArray = new byte[] { 13, 56, 65, 32, 12, 12, 7, -3, -2, -1, 98 }; dataHandler = new DataHandler(new ByteArrayDataSource(byteArray)); OMTextImpl textData = new OMTextImpl(dataHandler, false, fac); envelope.addChild(body); body.addChild(data); data.addChild(text); text.addChild(textData); } /* * @see TestCase#tearDown() */ protected void tearDown() throws Exception { super.tearDown(); if (this.outMTOMFile.exists()) { this.outMTOMFile.delete(); } if (this.outBase64File.exists()) { this.outBase64File.delete(); } } public void testComplete() throws Exception { OMOutputFormat mtomOutputFormat = new OMOutputFormat(); mtomOutputFormat.setDoOptimize(true); OMOutputFormat baseOutputFormat = new OMOutputFormat(); baseOutputFormat.setDoOptimize(false); envelope.serializeAndConsume(new FileOutputStream(outBase64File), baseOutputFormat); envelope.serializeAndConsume(new FileOutputStream(outMTOMFile), mtomOutputFormat); } }././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/llom/OMNamespaceImplTest.javaaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/llom/OMNamespaceImplTest.java0000644000000000000000000001141211131637476032102 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.llom; import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; import junit.textui.TestRunner; import org.apache.axiom.om.impl.OMNamespaceImpl; import java.lang.reflect.Field; /** This class will test the methods and fields of the OMNamespaceImpl class. */ public class OMNamespaceImplTest extends TestCase { /** * The main method. * * @param args The command line arguments */ public static void main(String[] args) { TestRunner.run(suite()); } /** * A one arg constructor to allow specifying a single test method to run. * * @param name The name of the test to run */ public OMNamespaceImplTest(String name) { super(name); } /** * This method returns a test suite of tests to run. * * @return A test suite to be run */ public static Test suite() { return new TestSuite(OMNamespaceImplTest.class); } public void testGetNamespaceURI() { OMNamespaceImpl omNsImpl = new OMNamespaceImpl("http://www.w3.org/XML/1998/namespace", "xml"); assertEquals("http://www.w3.org/XML/1998/namespace", omNsImpl.getNamespaceURI()); } public void testGetPrefix() { OMNamespaceImpl omNsImpl = new OMNamespaceImpl("http://www.w3.org/XML/1998/namespace", "xml"); assertEquals("xml", omNsImpl.getPrefix()); omNsImpl = new OMNamespaceImpl("", null); assertNull(omNsImpl.getPrefix()); } /** This method wil test the equals method. */ public void testEquals() { OMNamespaceImpl omNsImpl = new OMNamespaceImpl("http://www.w3.org/XML/1998/namespace", null); assertTrue(omNsImpl.equals("http://www.w3.org/XML/1998/namespace", null)); omNsImpl = new OMNamespaceImpl("http://www.w3.org/XML/1998/namespace", "xml"); assertTrue(omNsImpl.equals("http://www.w3.org/XML/1998/namespace", "xml")); assertTrue(!omNsImpl.equals("http://www.w3.org/XML/1998/namespace", "xml2")); assertTrue(!omNsImpl.equals("http://www.w3.org/XML/1998/namespace", null)); assertTrue(!omNsImpl.equals("http://www.w3.org/XML/2001/namespace", "xml")); assertTrue(!omNsImpl.equals(null, "xml")); } /** * This method will insure that the OMNamespaceImpl class remains immutable. * * @throws Exception Any kind of exception */ public void testImmutable() throws Exception { Field[] clsField = OMNamespaceImpl.class.getDeclaredFields(); for (int i = 0; i < clsField.length; i++) { String fieldData = clsField[i].toString(); if ((fieldData.indexOf("prefix") != -1) || (fieldData.indexOf("uri") != -1)) { assertTrue("The field should have been private, " + " but instead contained: " + fieldData + ".", fieldData.indexOf("private") != -1); } } String[] method = new String[] { "setPrefix", "setUri", "setName" }; for (int i = 0; i < method.length; i++) { try { OMNamespaceImpl.class.getMethod(method[i], new Class[] { String.class }); fail("A NoSuchMethodException should have been thrown" + " when trying to get method \"" + method[i] + "\"."); } catch (NoSuchMethodException e) { // These methods should not exist, so this is // expected. } } } } ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/llom/OMElementGetElementTextTest.javaaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/llom/OMElementGetElementTextT0000644000000000000000000000447711131637476032155 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.llom; import junit.framework.TestCase; import org.apache.axiom.om.OMAbstractFactory; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMNamespace; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; public class OMElementGetElementTextTest extends TestCase { protected OMElement documentElement; public void setUp() { OMFactory factory = OMAbstractFactory.getOMFactory(); OMNamespace namespace = factory.createOMNamespace("http://testuri.org", "test"); documentElement = factory.createOMElement("DocumentElement", namespace); factory.createOMText(documentElement, "this is a TEXT"); factory.createOMComment(documentElement, "this is a comment"); factory.createOMText(documentElement, "this is a TEXT block 2"); } /** * */ public void testGetElementTextProperly() { try { XMLStreamReader xmlStreamReader = documentElement.getXMLStreamReader(); //move to the Start_Element while (xmlStreamReader.getEventType() != XMLStreamReader.START_ELEMENT) { xmlStreamReader.next(); } String elementText = xmlStreamReader.getElementText(); assertEquals("this is a TEXTthis is a TEXT block 2", elementText); } catch (XMLStreamException e) { e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates. } } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/serializer/0000755000000000000000000000000011131637476026634 5ustar rootroot././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/serializer/PreserveEnvelopeTest.javaaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/serializer/PreserveEnvelopeTe0000644000000000000000000001753611131637476032355 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.serializer; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.impl.builder.StAXOMBuilder; import org.custommonkey.xmlunit.XMLTestCase; import javax.xml.stream.XMLStreamException; import java.io.ByteArrayInputStream; public class PreserveEnvelopeTest extends XMLTestCase { private String originalXML = "http://www.extreme.indiana.edu/lead/TestCMD_Simple_Tue_Jan_03_10_09_27_EST_2006_142825/C=US/O=Indiana University/OU=Computer Science/CN=Hemapani Srinath Pereraurn:oasis:names:tc:SAML:1.0:cm:bearerRun\n" + "\n" + "\n" + "\n" + "\n" + "\n" + "\n" + "\n" + "\n" + "\n" + "0bqebD+zkADcbXleyxpFUySp7cY=\n" + "\n" + "\n" + "\n" + "HVZDR4InypCICJxbCSrZJsikcpSACZRTt5Ly2gfLBUpdVeq6koHAKo8WGrGHbZVzNFAmxj3i52jQ\n" + "aYeO0J6LIA==\n" + "\n" + "\n" + "\n" + "\n" + "MIIClDCCAXygAwIBAwICBEkwDQYJKoZIhvcNAQEEBQAwaTELMAkGA1UEBhMCVVMxODA2BgNVBAoT\n" + "L05hdGlvbmFsIENlbnRlciBmb3IgU3VwZXJjb21wdXRpbmcgQXBwbGljYXRpb25zMSAwHgYDVQQD\n" + "ExdIZW1hcGFuaSBTcmluYXRoIFBlcmVyYTAeFw0wNjAxMDMxNDM2MTFaFw0wNjAxMDQwMjQxMTFa\n" + "MHkxCzAJBgNVBAYTAlVTMTgwNgYDVQQKEy9OYXRpb25hbCBDZW50ZXIgZm9yIFN1cGVyY29tcHV0\n" + "aW5nIEFwcGxpY2F0aW9uczEgMB4GA1UEAxMXSGVtYXBhbmkgU3JpbmF0aCBQZXJlcmExDjAMBgNV\n" + "BAMTBXByb3h5MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBALyBo53oJTrVjs/RCFLJaMKektAqeNCi\n" + "IAhEx+pE0BxL23WV8mhxUNDJevO7lkRuwuDWchbobq8S1WNRYrbOqRkCAwEAATANBgkqhkiG9w0B\n" + "AQQFAAOCAQEAEZRsxz1izBa8SNw7x1nCttjTDnRM102CTad/uq3vihKmOauBo8lFqklT2xoFv+Nx\n" + "WX1FXT5AAqedITtUn99zk3Sr5c/SgdO59NxSaWgqxTOd7koZUmz8Sta9IK7d1fDFhDie2W2EtUMk\n" + "QX0Rr7KHReF6a0knQ+kGlhDuA2YN27CpNg+gBTq0+p1yaVA79qf2BVDYBklPG2N5tWn2GekHoUMs\n" + "7nlU9WlUI0tRUKuGGdQ+2WLTW0w2UuqsJuHvDaquZRnTOjhdiRw5/Mg62LqkSwo99Dc3JiJusqoY\n" + "16Unq8wp5gVJbj36UoVvqnVOyBltseIaU5bLS5LIrv11hXA6fg==\n" + "\n" + "\n" + "MIIEVzCCAz+gAwIBAgICBEkwDQYJKoZIhvcNAQEEBQAwaTELMAkGA1UEBhMCVVMxODA2BgNVBAoT\n" + "L05hdGlvbmFsIENlbnRlciBmb3IgU3VwZXJjb21wdXRpbmcgQXBwbGljYXRpb25zMSAwHgYDVQQD\n" + "ExdDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wNTEwMjUxOTMxMzRaFw0wNzEwMjUxOTMxMzRa\n" + "MGkxCzAJBgNVBAYTAlVTMTgwNgYDVQQKEy9OYXRpb25hbCBDZW50ZXIgZm9yIFN1cGVyY29tcHV0\n" + "aW5nIEFwcGxpY2F0aW9uczEgMB4GA1UEAxMXSGVtYXBhbmkgU3JpbmF0aCBQZXJlcmEwggEiMA0G\n" + "CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC/pkVn4ZUEM5BjfocwiiQVF4ivFpJJ8u1m8vq0WNlc\n" + "bw4rjMOet1YArC46fZ1Gg652A1dF92+8hHNeBa6chll5HRZkx5FLN7XEGY4EcHhXA6lHmjklpf8N\n" + "Iy6/91ElOT1pVoLRpOeJ1TFT/nQxMBMJbMyhycrUV49M8oL3O/CYAm1YVQjCtdieK/ibFXzgP2iX\n" + "R8oOrAX/Ogp+FilUkdrZlhhhzV/NdGdQrPQxxpWbXsLOgiyEU4W1BWSHHI1E1cs0KUoYvaboAYaq\n" + "E+0WZlhqDxQy3SKOZVPYk9fJu9+qAb0gaDIgtN4FrZFYvTrlNMcrmyaC2ozr43nxwVMlq9dnAgMB\n" + "AAGjggEHMIIBAzAJBgNVHRMEAjAAMAsGA1UdDwQEAwIE8DAdBgNVHQ4EFgQU90FgTLg4k1yN3yJu\n" + "d4TZIbxUGigwgZMGA1UdIwSBizCBiIAU8r6NqmFJES25W3IkKhjSwoXGmIGhbaRrMGkxCzAJBgNV\n" + "BAYTAlVTMTgwNgYDVQQKEy9OYXRpb25hbCBDZW50ZXIgZm9yIFN1cGVyY29tcHV0aW5nIEFwcGxp\n" + "Y2F0aW9uczEgMB4GA1UEAxMXQ2VydGlmaWNhdGlvbiBBdXRob3JpdHmCAQAwNAYDVR0fBC0wKzAp\n" + "oCegJYYjaHR0cDovL2NhLm5jc2EudWl1Yy5lZHUvNGE2Y2Q4YjEucjAwDQYJKoZIhvcNAQEEBQAD\n" + "ggEBAHnFMFeZTHjuq/juH3qw1jDrr4IuKnljuLHWSi8GuMt1mxOs/vR7rMg0OAs16gMJP3X2uSK5\n" + "0miXqsbZ4AQuBJqo5Pm8UaSzeJlBle02SUvt2Fxhze9odLgoUXHp/1hKm9blHbp5cZqlbsmckk8y\n" + "4xOPgNYh1G3oxdv2OcadmJBMlYwcBK+TkO8GbemqXqdFt6itGkkhLGQdspw9c1r38bXd9lhLbVR8\n" + "7yif8ffqIgouVe/wj3NIjSbxgjff88Hz6CCuOWiafvfpgmrU906yOZqe6jBDBTKF5xmqyCNKKFAJ\n" + "UbmPCX2vMKCpWrLU+MotR2HSbljslSUhfKCjHvFb/AA=\n" + "\n" + "\n" + ""; public void testOMNS() { try { StAXOMBuilder builder = new StAXOMBuilder(new ByteArrayInputStream(originalXML.getBytes())); OMElement documentElement = builder.getDocumentElement(); //assertXMLEqual(originalXML, documentElement.toString()); documentElement.build(); String outstr = documentElement.toString(); assertTrue(outstr.indexOf("xmlns:saml=") > 0); assertTrue(outstr.indexOf("" + "" + "" + "" + "" + "" + "" + "0" + "" + "" + "jnp://192.168.111.66:1234" + "" + "" + ""; public OMSerializerTest2(String testName) { super(testName); } protected void setUp() throws Exception { reader = XMLInputFactory.newInstance(). createXMLStreamReader( new StringReader(xml)); } public void testRawSerializer() throws Exception { StreamingOMSerializer serializer = new StreamingOMSerializer(); ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); writer = XMLOutputFactory.newInstance(). createXMLStreamWriter(byteArrayOutputStream); serializer.serialize(reader, writer); writer.flush(); String outputString = new String(byteArrayOutputStream.toByteArray()); assertXMLEqual(xml, outputString); } public void testElementPullStream1() throws Exception { OMXMLParserWrapper builder = OMXMLBuilderFactory.createStAXSOAPModelBuilder( OMAbstractFactory.getSOAP11Factory(), reader); SOAPEnvelope env = (SOAPEnvelope) builder.getDocumentElement(); StreamingOMSerializer serializer = new StreamingOMSerializer(); ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); writer = XMLOutputFactory.newInstance(). createXMLStreamWriter(byteArrayOutputStream); serializer.serialize(env.getXMLStreamReaderWithoutCaching(), writer); writer.flush(); String outputString = new String(byteArrayOutputStream.toByteArray()); assertXMLEqual(xml, outputString); } public void testElementPullStream1WithCacheOff() throws Exception { StAXSOAPModelBuilder soapBuilder = new StAXSOAPModelBuilder(reader, null); ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); writer = XMLOutputFactory.newInstance(). createXMLStreamWriter(byteArrayOutputStream, OMConstants.DEFAULT_CHAR_SET_ENCODING); SOAPEnvelope env = (SOAPEnvelope) soapBuilder.getDocumentElement(); env.serializeAndConsume(writer); writer.flush(); String outputString = new String(byteArrayOutputStream.toByteArray()); assertTrue(outputString != null && !"".equals(outputString) && outputString.length() > 1); writer = XMLOutputFactory.newInstance(). createXMLStreamWriter(byteArrayOutputStream, OMConstants.DEFAULT_CHAR_SET_ENCODING); StringWriter stringWriter = new StringWriter(); //now we should not be able to serilaize anything ! this should throw //an error try { env.serializeAndConsume(writer); fail(); } catch (XMLStreamException e) { e.printStackTrace(new PrintWriter(stringWriter, true)); assertTrue(stringWriter.toString() .indexOf("problem accessing the parser. Parser already accessed!") > -1); } catch (Exception e) { fail("Expecting an XMLStreamException " + e.getMessage()); } } } ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/serializer/OMSerializerTest.javaaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/serializer/OMSerializerTest.j0000644000000000000000000001535011131637476032220 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.serializer; import org.apache.axiom.om.AbstractTestCase; import org.apache.axiom.om.OMAbstractFactory; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.om.OMConstants; import org.apache.axiom.om.TestConstants; import org.apache.axiom.om.impl.builder.StAXOMBuilder; import org.apache.axiom.om.impl.llom.factory.OMXMLBuilderFactory; import org.apache.axiom.om.impl.serialize.StreamingOMSerializer; import org.apache.axiom.soap.SOAPBody; import org.apache.axiom.soap.SOAPEnvelope; import org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLOutputFactory; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import javax.xml.stream.XMLStreamWriter; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.PrintWriter; import java.io.StringWriter; public class OMSerializerTest extends AbstractTestCase { private XMLStreamReader reader; private XMLStreamWriter writer; private File tempFile; public OMSerializerTest(String testName) { super(testName); } protected void setUp() throws Exception { reader = XMLInputFactory.newInstance(). createXMLStreamReader(getTestResource(TestConstants.SOAP_SOAPMESSAGE)); tempFile = File.createTempFile("temp", "xml"); // writer = // XMLOutputFactory.newInstance(). // createXMLStreamWriter(new FileOutputStream(tempFile)); } public void testRawSerializer() throws Exception { StreamingOMSerializer serializer = new StreamingOMSerializer(); ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); writer = XMLOutputFactory.newInstance(). createXMLStreamWriter(byteArrayOutputStream); //serializer.setNamespacePrefixStack(new Stack()); serializer.serialize(reader, writer); writer.flush(); String outputString = new String(byteArrayOutputStream.toByteArray()); assertTrue(outputString != null && !"".equals(outputString) && outputString.length() > 1); } public void testElementPullStream1() throws Exception { OMXMLParserWrapper builder = OMXMLBuilderFactory.createStAXSOAPModelBuilder( OMAbstractFactory.getSOAP11Factory(), reader); SOAPEnvelope env = (SOAPEnvelope) builder.getDocumentElement(); StreamingOMSerializer serializer = new StreamingOMSerializer(); ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); writer = XMLOutputFactory.newInstance(). createXMLStreamWriter(byteArrayOutputStream); serializer.serialize(env.getXMLStreamReaderWithoutCaching(), writer); writer.flush(); String outputString = new String(byteArrayOutputStream.toByteArray()); assertTrue(outputString != null && !"".equals(outputString) && outputString.length() > 1); } public void testElementPullStream1WithCacheOff() throws Exception { StAXSOAPModelBuilder soapBuilder = new StAXSOAPModelBuilder(reader, null); ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); writer = XMLOutputFactory.newInstance(). createXMLStreamWriter(byteArrayOutputStream, OMConstants.DEFAULT_CHAR_SET_ENCODING); SOAPEnvelope env = (SOAPEnvelope) soapBuilder.getDocumentElement(); env.serializeAndConsume(writer); writer.flush(); String outputString = new String(byteArrayOutputStream.toByteArray()); assertTrue(outputString != null && !"".equals(outputString) && outputString.length() > 1); writer = XMLOutputFactory.newInstance(). createXMLStreamWriter(byteArrayOutputStream, OMConstants.DEFAULT_CHAR_SET_ENCODING); StringWriter stringWriter = new StringWriter(); //now we should not be able to serilaize anything ! this should throw //an error try { env.serializeAndConsume(writer); fail(); } catch (XMLStreamException e) { e.printStackTrace(new PrintWriter(stringWriter, true)); assertTrue(stringWriter.toString() .indexOf("problem accessing the parser. Parser already accessed!") > -1); } catch (Exception e) { fail("Expecting an XMLStreamException " + e.getMessage()); } } public void testElementPullStream2() throws Exception { OMXMLParserWrapper builder = OMXMLBuilderFactory.createStAXSOAPModelBuilder( OMAbstractFactory.getSOAP11Factory(), reader); ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); writer = XMLOutputFactory.newInstance(). createXMLStreamWriter(byteArrayOutputStream); SOAPEnvelope env = (SOAPEnvelope) builder.getDocumentElement(); SOAPBody body = env.getBody(); StreamingOMSerializer serializer = new StreamingOMSerializer(); serializer.serialize(body.getXMLStreamReaderWithoutCaching(), writer); writer.flush(); String outputString = new String(byteArrayOutputStream.toByteArray()); assertTrue(outputString != null && !"".equals(outputString) && outputString.length() > 1); } public void testDefaultNsSerialization() { try { StAXOMBuilder builder = new StAXOMBuilder("test-resources/xml/original.xml"); String xml = builder.getDocumentElement().toString(); assertEquals("There shouldn't be any xmlns=\"\"", -1, xml.indexOf("xmlns=\"\"")); } catch (Exception e) { e.printStackTrace(); fail(e.getMessage()); } } protected void tearDown() throws Exception { tempFile.delete(); } } ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/serializer/OMFaultSerializerTest.javaaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/serializer/OMFaultSerializerT0000644000000000000000000000461211131637476032247 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.serializer; import org.apache.axiom.om.AbstractTestCase; import org.apache.axiom.om.OMElement; import org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLStreamReader; public class OMFaultSerializerTest extends AbstractTestCase { private XMLStreamReader reader1; private XMLStreamReader reader2; public OMFaultSerializerTest(String testName) { super(testName); } protected void setUp() throws Exception { reader1 = XMLInputFactory.newInstance(). createXMLStreamReader(getTestResource("soap/soap11/soapfault1.xml")); reader2 = XMLInputFactory.newInstance(). createXMLStreamReader(getTestResource("soap/soap11/soapfault2.xml")); } /** * Test SOAPFault that does not disable the default namespace (i.e. does not use xmlns="") * * @throws Exception */ public void test1() throws Exception { StAXSOAPModelBuilder builder = new StAXSOAPModelBuilder(reader1, null); OMElement ome = builder.getDocumentElement(); ome.toString(); // System.out.println(ome); } /** * Test SOAPFault that does disable the default namespace (i.e. does use xmlns="") * * @throws Exception */ public void test2() throws Exception { StAXSOAPModelBuilder builder = new StAXSOAPModelBuilder(reader2, null); OMElement ome = builder.getDocumentElement(); ome.toString(); // System.out.println(ome); } } ././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/serializer/NoNamespaceSerializerTest.javaaxiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/serializer/NoNamespaceSeriali0000644000000000000000000001531611131637476032267 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om.impl.serializer; import junit.framework.TestCase; import org.apache.axiom.om.OMAbstractFactory; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.axiom.om.OMConstants; import org.apache.axiom.om.impl.llom.factory.OMXMLBuilderFactory; import org.apache.axiom.soap.SOAPEnvelope; import org.apache.axiom.soap.SOAPFactory; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLOutputFactory; import javax.xml.stream.XMLStreamReader; import javax.xml.stream.XMLStreamWriter; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.InputStreamReader; public class NoNamespaceSerializerTest extends TestCase { private String xmlTextOne = "" + "\n" + " \n" + " \n" + " \n" + " "; private String xmlText2 = "\n" + " \n" + " Gladys Kravitz\n" + "
Anytown, PA
\n" + "
\n" + " 2005-03-06T14:06:12.697+06:00\n" + "
"; private String xmlTextTwo = "" + "\n" + " \n" + " \n" + " \n" + " "; private XMLStreamReader readerOne; private XMLStreamReader readerTwo; private XMLStreamWriter writer; // private OMXMLParserWrapper builder; // private File tempFile; private OMXMLParserWrapper builderOne; private OMXMLParserWrapper builderTwo; // private File tempFile; protected void setUp() throws Exception { readerOne = XMLInputFactory.newInstance(). createXMLStreamReader( new InputStreamReader( new ByteArrayInputStream(xmlTextOne.getBytes()))); readerTwo = XMLInputFactory.newInstance(). createXMLStreamReader( new InputStreamReader( new ByteArrayInputStream(xmlTextTwo.getBytes()))); writer = XMLOutputFactory.newInstance(). createXMLStreamWriter(new ByteArrayOutputStream(), OMConstants.DEFAULT_CHAR_SET_ENCODING); builderOne = OMXMLBuilderFactory.createStAXSOAPModelBuilder( OMAbstractFactory.getSOAP11Factory(), readerOne); builderTwo = OMXMLBuilderFactory.createStAXSOAPModelBuilder( OMAbstractFactory.getSOAP11Factory(), readerTwo); } public void testSerilizationWithDefaultNamespaces() throws Exception { SOAPEnvelope env = (SOAPEnvelope) builderTwo.getDocumentElement(); env.serialize(writer); OMElement balanceElement = env.getBody().getFirstElement(); assertEquals("Deafualt namespace has not been set properly", balanceElement.getNamespace().getNamespaceURI(), "http://localhost:8081/axis/services/BankPort/"); OMElement accountNo = balanceElement.getFirstElement(); assertEquals( "Deafualt namespace of children has not been set properly", accountNo.getNamespace().getNamespaceURI(), "http://localhost:8081/axis/services/BankPort/"); } public void submitPurchaseOrderTest() throws Exception { SOAPFactory omFactory = OMAbstractFactory.getSOAP11Factory(); SOAPEnvelope env = omFactory.getDefaultEnvelope(); OMXMLParserWrapper builder = OMXMLBuilderFactory.createStAXOMBuilder( omFactory, XMLInputFactory.newInstance(). createXMLStreamReader( new InputStreamReader( new ByteArrayInputStream(xmlText2.getBytes())))); env.getBody().addChild(builder.getDocumentElement()); // not sure why this test was created. Just checking whether serialization has worked or not. Someone // wanna check the correct thing later? String outputString = env.toString(); assertTrue(outputString != null && !"".equals(outputString) && outputString.length() > 1); } /** Will just do a probe test to check serialize with caching on works without any exception */ public void testSerilizationWithCacheOn() throws Exception { ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); writer = XMLOutputFactory.newInstance(). createXMLStreamWriter(byteArrayOutputStream, OMConstants.DEFAULT_CHAR_SET_ENCODING); SOAPEnvelope env = (SOAPEnvelope) builderOne.getDocumentElement(); env.serialize(writer); writer.flush(); assertTrue(new String(byteArrayOutputStream.toByteArray()).length() > 1); } /** Will just do a probe test to check serialize with caching off works without any exception */ public void testSerilizationWithCacheOff() throws Exception { writer = XMLOutputFactory.newInstance(). createXMLStreamWriter(new ByteArrayOutputStream(), OMConstants.DEFAULT_CHAR_SET_ENCODING); SOAPEnvelope env = (SOAPEnvelope) builderOne.getDocumentElement(); env.serializeAndConsume(writer); writer.flush(); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/AbstractTestCase.java0000644000000000000000000000602611131637476027570 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.InputStream; import javax.activation.DataSource; import javax.activation.FileDataSource; import org.custommonkey.xmlunit.XMLTestCase; /** Abstract base class for test cases. */ public abstract class AbstractTestCase extends XMLTestCase { protected String testDir = "test" + File.separator; protected String sampleDir = "samples" + File.separator; protected String outDir = "target" + File.separator + "generated" + File.separator + "samples" + File.separator; protected String tempDir = "target" + File.separator + "generated" + File.separator + "temp"; protected String testResourceDir = "test-resources"; /** Basedir for all file I/O. Important when running tests from the reactor. */ public String basedir = System.getProperty("basedir"); public AbstractTestCase() { this(null); } /** @param testName */ public AbstractTestCase(String testName) { super(testName); if (basedir == null) { basedir = new File(".").getAbsolutePath(); } testDir = new File(basedir, testDir).getAbsolutePath(); sampleDir = new File(basedir, sampleDir).getAbsolutePath(); outDir = new File(basedir, outDir).getAbsolutePath(); tempDir = new File(basedir, tempDir).getAbsolutePath(); } public File getTestResourceFile(String relativePath) { return new File(testResourceDir, relativePath); } public DataSource getTestResourceDataSource(String relativePath) { return new FileDataSource(getTestResourceFile(relativePath)); } public InputStream getTestResource(String relativePath) { try { return new FileInputStream(getTestResourceFile(relativePath)); } catch (FileNotFoundException ex) { fail("The test resource " + relativePath + " could not be found"); return null; } } public File getTempOutputFile(String filename) { File f = new File(tempDir); if (!f.exists()) { f.mkdirs(); } return new File(f, filename); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/OMTest.java0000644000000000000000000001250611131637476025544 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om; import org.apache.axiom.soap.SOAPEnvelope; import org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLStreamReader; import java.util.Iterator; /** This test case tests the basic expectations of the engine from the OM. */ public class OMTest extends AbstractTestCase { private SOAPEnvelope envelope; /** Constructor. */ public OMTest(String testName) { super(testName); } protected void setUp() throws Exception { XMLStreamReader parser = XMLInputFactory.newInstance() .createXMLStreamReader(getTestResource(TestConstants.SAMPLE1)); OMXMLParserWrapper builder = new StAXSOAPModelBuilder(parser, null); envelope = (SOAPEnvelope) builder.getDocumentElement(); } /** Sometime the hasNext() in the childeren iterator is true yet the next() is null */ public void testNullInChilderen() { isNullChildrenThere(envelope); } /** * the envelope is completly namesapce qulified so all the OMElements got to have namespace * values not null */ public void test4MissingNamespaces() { isNameSpacesMissing(envelope); } public void isNullChildrenThere(OMElement omeleent) { Iterator it = omeleent.getChildren(); while (it.hasNext()) { OMNode node = (OMNode) it.next(); assertNotNull(node); if (node.getType() == OMNode.ELEMENT_NODE) { isNullChildrenThere((OMElement) node); } } } public void isNameSpacesMissing(OMElement omeleent) { OMNamespace omns = omeleent.getNamespace(); assertNotNull(omns); assertNotNull(omns.getNamespaceURI()); Iterator it = omeleent.getChildren(); while (it.hasNext()) { OMNode node = (OMNode) it.next(); if (node != null && node.getType() == OMNode.ELEMENT_NODE) { isNameSpacesMissing((OMElement) node); } } } public void testRootNotCompleteInPartialBuild() throws Exception { assertFalse("Root should not be complete", envelope.isComplete()); } /** * Assumption - The fed XML has at least two children under the root element * * @throws Exception */ public void testFirstChildDetach() throws Exception { OMElement root = envelope; assertFalse("Root should not be complete", root.isComplete()); OMNode oldFirstChild = root.getFirstOMChild(); assertNotNull(oldFirstChild); oldFirstChild.detach(); OMNode newFirstChild = root.getFirstOMChild(); assertNotNull(newFirstChild); assertNotSame(oldFirstChild, newFirstChild); } //todo this is wrong correct this public void testAdditionOfaCompletelyNewElement() throws Exception { // OMElement root= envelope; // // OMNamespace soapenv= root.findNamespace("http://schemas.xmlsoap.org/soap/envelope/", "soapenv"); // OMNamespace wsa= root.findNamespace("http://schemas.xmlsoap.org/ws/2004/03/addressing", "wsa"); // if (wsa==null) // wsa= root.declareNamespace("http://schemas.xmlsoap.org/ws/2004/03/addressing", "wsa"); // // //Assumption - A RelatesTo Element does not exist in the input document // OMElement relatesTo= fac.createOMElement ("RelatesTo", wsa); // relatesTo.addAttribute(fac.createOMAttribute("RelationshipType", null, "wsa:Reply", relatesTo)); // relatesTo.addAttribute(fac.createOMAttribute("mustUnderstand", soapenv, "0", relatesTo)); // relatesTo.addChild(fac.createOMText(relatesTo, "uuid:3821F4F0-D020-11D8-A10A-E4EE6425FCB0")); // relatesTo.setComplete(true); // // root.addChild(relatesTo); // // QName name = new QName(wsa.getName(),"RelatesTo",wsa.getPrefix()); // // Iterator children = root.getChildrenWithName(name); // //this should contain only one child! // if (children.hasNext()){ // OMElement newlyAddedElement = (OMElement)children.next(); // // assertNotNull(newlyAddedElement); // // assertEquals(newlyAddedElement.getLocalName(),"RelatesTo"); // //todo put the other assert statements here // }else{ // assertFalse("New child not added",true); // } } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/DeclTest.java0000644000000000000000000000500111131637476026070 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om; import org.custommonkey.xmlunit.XMLTestCase; import javax.xml.stream.XMLStreamException; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.InputStreamReader; import java.io.OutputStream; public class DeclTest extends XMLTestCase { static OMFactory factory = OMAbstractFactory.getOMFactory(); static OMDocument model = factory.createOMDocument(); static { OMElement root = factory.createOMElement("root", null); model.addChild(root); } private OMElement getElement(String name) { OMNamespace ns1 = factory.createOMNamespace("axiom:declaration-test,2007:1", "test"); OMElement elem = factory.createOMElement(name, ns1); return elem; } private void writeModel(OutputStream os) throws XMLStreamException { model.serialize(os); } public void testDecl() throws Exception { ByteArrayOutputStream baos = new ByteArrayOutputStream(); DeclTest app = new DeclTest(); model.getOMDocumentElement().addChild(app.getElement("foo")); model.getOMDocumentElement().addChild(app.getElement("bar")); model.getOMDocumentElement().addChild(app.getElement("foo")); app.writeModel(baos); String xmlExpected = ""; this.assertXMLEqual(new InputStreamReader(new ByteArrayInputStream(xmlExpected.getBytes())), new InputStreamReader(new ByteArrayInputStream(baos.toByteArray()))); } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/SourcedOMElementTestCase.java0000644000000000000000000000751111131637476031177 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om; import java.io.OutputStream; import java.io.StringReader; import java.io.StringWriter; import java.io.Writer; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import javax.xml.stream.XMLStreamWriter; import junit.framework.TestCase; import org.apache.axiom.om.OMAbstractFactory; import org.apache.axiom.om.OMDataSource; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMOutputFormat; import org.apache.axiom.soap.SOAPBody; import org.apache.axiom.soap.SOAPEnvelope; import org.apache.axiom.soap.SOAPFactory; public class SourcedOMElementTestCase extends TestCase { public void testSerialization() throws Exception { SOAPFactory factory = OMAbstractFactory.getSOAP11Factory(); SOAPEnvelope envelope = factory.createSOAPEnvelope(); SOAPBody body = factory.createSOAPBody(); envelope.addChild(body); OMNamespace ns = factory.createOMNamespace("http://ns1", "d"); OMElement payload = factory.createOMElement(new DummySource(), "dummy", ns); payload.setNamespace(ns); // This line will cause NoSuchElementException body.addChild(payload); payload.getBuilder().setCache(false); // Or This line will cause NoSuchElementException StringWriter writer = new StringWriter(); envelope.serializeAndConsume(writer); System.out.println(writer); } private static class DummySource implements OMDataSource { private XMLInputFactory factory = XMLInputFactory.newInstance(); private XMLStreamReader reader; //private String xml = ""; private String xml = "helloworld"; /** * @see org.apache.axiom.om.OMDataSource#getReader() */ public XMLStreamReader getReader() throws XMLStreamException { // TODO Auto-generated method stub return factory.createXMLStreamReader(new StringReader(xml)); } /** * @see org.apache.axiom.om.OMDataSource#serialize(java.io.OutputStream, org.apache.axiom.om.OMOutputFormat) */ public void serialize(OutputStream output, OMOutputFormat format) throws XMLStreamException { // TODO Auto-generated method stub } /** * @see org.apache.axiom.om.OMDataSource#serialize(java.io.Writer, org.apache.axiom.om.OMOutputFormat) */ public void serialize(Writer writer, OMOutputFormat format) throws XMLStreamException { // TODO Auto-generated method stub } /** * @see org.apache.axiom.om.OMDataSource#serialize(javax.xml.stream.XMLStreamWriter) */ public void serialize(XMLStreamWriter xmlWriter) throws XMLStreamException { // TODO Auto-generated method stub } } } axiom-1.2.8/modules/axiom-tests/src/test/java/org/apache/axiom/om/OMDTDTest.java0000644000000000000000000001026211131637476026075 0ustar rootroot/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.apache.axiom.om; import junit.framework.TestCase; import org.apache.axiom.om.impl.builder.StAXOMBuilder; import org.apache.axiom.om.util.StAXUtils; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import java.io.ByteArrayOutputStream; import java.io.FileInputStream; import java.io.InputStream; import java.util.Iterator; public class OMDTDTest extends TestCase { private OMDocument document; protected void setUp() throws Exception { try { StAXOMBuilder stAXOMBuilder = new StAXOMBuilder("test-resources/xml/dtd.xml"); document = this.document = stAXOMBuilder.getDocument(); } catch (Exception e) { e.printStackTrace(); } } public void testDTDSerialization() { try { ByteArrayOutputStream baos = new ByteArrayOutputStream(); document.serialize(baos); String serializedString = new String(baos.toByteArray()); assertTrue(serializedString.indexOf("") > -1); assertTrue(serializedString.indexOf("") > -1); assertTrue( serializedString.indexOf("") > -1); } catch (XMLStreamException e) { fail("Bug in serializing OMDocuments which have DTDs, text and a document element"); } } public void testDTDInWebXML() throws Exception{ // The JSR 173 (StAX) Specification did not do a very good job // of defining how DOCTYPE entities are processed. According // to the reference implementation, the external entities of the DOCTYPE // are always followed. This is wrong for a number of reasons. // a) You cannot read the file unless you are network attached ...which // might not be the case. // b) You incur an expensive network access even though in many cases // the DOCTYPE contents are unimportant. // // StAX should have allowed the caller to process the DOCTYPE as information // only and allow the caller to request external information. Perhaps this // will be addressed in future versions of the specification. // // For now, we have a work-around. A "network detached" XMLStreamReader // can be obtained from StAXUtils and used to process configuration files // (like a web.xml) that may contain DTD information. // // The following test reads an XML file that has a DTD with a system ID // that intentionally points to a non existing URL. With a network // detached reader this should not produce errors. InputStream is = new FileInputStream("test-resources/xml/web_w_dtd2.xml"); XMLStreamReader reader = StAXUtils.createNetworkDetachedXMLStreamReader(is); StAXOMBuilder builder = new StAXOMBuilder(reader); OMElement root = builder.getDocumentElement(); assertTrue(root.getLocalName().equals("web-app")); OMDocument document = builder.getDocument(); Iterator i = document.getChildren(); OMDocType docType = null; while (docType == null && i.hasNext()) { Object obj = i.next(); if (obj instanceof OMDocType) { docType = (OMDocType) obj; } } assertTrue(docType != null); } } axiom-1.2.8/modules/axiom-tests/test-resources/0000755000000000000000000000000011131637500020246 5ustar rootrootaxiom-1.2.8/modules/axiom-tests/test-resources/xml/0000755000000000000000000000000011131637476021062 5ustar rootrootaxiom-1.2.8/modules/axiom-tests/test-resources/xml/numbers.xml0000644000000000000000000000040311131637476023254 0ustar rootroot 3 24 55 11 2 -3 axiom-1.2.8/modules/axiom-tests/test-resources/xml/basic.xml0000644000000000000000000000024011131637476022661 0ustar rootroot axiom-1.2.8/modules/axiom-tests/test-resources/xml/evaluate.xml0000644000000000000000000000117511131637476023416 0ustar rootroot brown moderate axiom-1.2.8/modules/axiom-tests/test-resources/xml/sigEncr.xml0000644000000000000000000001271711131637476023206 0ustar rootroot 2005-10-25T06:29:20.734Z 2005-10-25T06:34:20.734Z MIIDDDCCAfSgAwIBAgIQM6YEf7FVYx/tZyEXgVComTANBgkqhkiG9w0BAQUFADAwMQ4wDAYDVQQKDAVPQVNJUzEeMBwGA1UEAwwVT0FTSVMgSW50ZXJvcCBUZXN0IENBMB4XDTA1MDMxOTAwMDAwMFoXDTE4MDMxOTIzNTk1OVowQjEOMAwGA1UECgwFT0FTSVMxIDAeBgNVBAsMF09BU0lTIEludGVyb3AgVGVzdCBDZXJ0MQ4wDAYDVQQDDAVBbGljZTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAoqi99By1VYo0aHrkKCNT4DkIgPL/SgahbeKdGhrbu3K2XG7arfD9tqIBIKMfrX4Gp90NJa85AV1yiNsEyvq+mUnMpNcKnLXLOjkTmMCqDYbbkehJlXPnaWLzve+mW0pJdPxtf3rbD4PS/cBQIvtpjmrDAU8VsZKT8DN5Kyz+EZsCAwEAAaOBkzCBkDAJBgNVHRMEAjAAMDMGA1UdHwQsMCowKKImhiRodHRwOi8vaW50ZXJvcC5iYnRlc3QubmV0L2NybC9jYS5jcmwwDgYDVR0PAQH/BAQDAgSwMB0GA1UdDgQWBBQK4l0TUHZ1QV3V2QtlLNDm+PoxiDAfBgNVHSMEGDAWgBTAnSj8wes1oR3WqqqgHBpNwkkPDzANBgkqkiG9w0BAQUFAAOCAQEABTqpOpvW+6yrLXyUlP2xJbEkohXHI5OWwKWleOb9hlkhWntUalfcFOJAgUyH30TTpHldzx1+vK2LPzhoUFKYHE1IyQvokBN2JjFO64BQukCKnZhldLRPxGhfkTdxQgdf5rCK/wh3xVsZCNTfuMNmlAM6lOAg8QduDah3WFZpEA0s2nwQaCNQTNMjJC8tav1CBr6+E5FAmwPXP7pJxn9Fw9OXRyqbRA4v2y7YpbGkG2GI9UvOHw6SGvf4FRSthMMO35YbpikGsLix3vAsXWWi4rwfVOYzQK0OFPNi9RMCUdSH06m9uLWckiCxjos0FQODZE9l4ATGy9s9hNVwryOJTw== Xeg55vRyK3ZhAEhEf+YT0z986L0= DehTcxm9AOypz3ab5b69IAItCvPyV2Gi3PMHGZnWGx57d/jByRT4v9SIAjKWGycJLHzrZwyjR70A9EYsOx+WegP/g6vR8gIF5rB5ZvwDt4SFygr7/H+WD9LqYxry9pa56W+kjPxrKeezoGv5ypoVIYmK2ZgV7khnKaqkxt5CMkg= dTi3g3L9keG20RK45/u2YZAnweg= MzDBhmUoanHfvbzmwAZDnynYZ5Y= BVTlgwgGNYJ4Zi3j0rZmgfRPYCGKE5hO/5Jd7IcGgRToRT60eQbD+2iTccdnIpjNeSejPvWRz/VUsO9yKB/fPWTHTFXwt4wk38K6Yjl9iyD4nQl9q6begRcM/mvm2679FqPkHx09AjcdtRNfwOrv0KOp5q5AoEsH24X+HCmM/+4= k3lw5A1UYUrr+7SBvnh3HcbxUoPFGYP2QIsIv8//Z0P9drAbKi/rhrMFaecBdmUTYIBOKsm/jaijsIzTQ5DJ/A== axiom-1.2.8/modules/axiom-tests/test-resources/xml/spaces2.xml0000644000000000000000000000023011131637476023137 0ustar rootroot baz baz baz <foo> axiom-1.2.8/modules/axiom-tests/test-resources/xml/web2.xml0000644000000000000000000000013211131637476022437 0ustar rootroot axiom-1.2.8/modules/axiom-tests/test-resources/xml/web_w_dtd2.xml0000644000000000000000000000214311131637476023624 0ustar rootroot snoop SnoopServlet file ViewFile initial 1000 The initial value for the counter mv *.wm manager director president axiom-1.2.8/modules/axiom-tests/test-resources/xml/much_ado.xml0000644000000000000000000057515311131637476023403 0ustar rootroot Much Ado about Nothing

Text placed in the public domain by Moby Lexical Tools, 1992.

SGML markup by Jon Bosak, 1992-1994.

XML version by Jon Bosak, 1996-1998.

This work may be freely copied and distributed worldwide.

Dramatis Personae DON PEDRO, prince of Arragon. DON JOHN, his bastard brother. CLAUDIO, a young lord of Florence. BENEDICK, a young lord of Padua. LEONATO, governor of Messina. ANTONIO, his brother. BALTHASAR, attendant on Don Pedro. CONRADE BORACHIO followers of Don John. FRIAR FRANCIS DOGBERRY, a constable. VERGES, a headborough. A Sexton. A Boy. HERO, daughter to Leonato. BEATRICE, niece to Leonato. MARGARET URSULA gentlewomen attending on Hero. Messengers, Watch, Attendants, &c. SCENE Messina. MUCH ADO ABOUT NOTHING ACT I SCENE I. Before LEONATO'S house. Enter LEONATO, HERO, and BEATRICE, with a Messenger LEONATO I learn in this letter that Don Peter of Arragon comes this night to Messina. Messenger He is very near by this: he was not three leagues off when I left him. LEONATO How many gentlemen have you lost in this action? Messenger But few of any sort, and none of name. LEONATO A victory is twice itself when the achiever brings home full numbers. I find here that Don Peter hath bestowed much honour on a young Florentine called Claudio. Messenger Much deserved on his part and equally remembered by Don Pedro: he hath borne himself beyond the promise of his age, doing, in the figure of a lamb, the feats of a lion: he hath indeed better bettered expectation than you must expect of me to tell you how. LEONATO He hath an uncle here in Messina will be very much glad of it. Messenger I have already delivered him letters, and there appears much joy in him; even so much that joy could not show itself modest enough without a badge of bitterness. LEONATO Did he break out into tears? Messenger In great measure. LEONATO A kind overflow of kindness: there are no faces truer than those that are so washed. How much better is it to weep at joy than to joy at weeping! BEATRICE I pray you, is Signior Mountanto returned from the wars or no? Messenger I know none of that name, lady: there was none such in the army of any sort. LEONATO What is he that you ask for, niece? HERO My cousin means Signior Benedick of Padua. Messenger O, he's returned; and as pleasant as ever he was. BEATRICE He set up his bills here in Messina and challenged Cupid at the flight; and my uncle's fool, reading the challenge, subscribed for Cupid, and challenged him at the bird-bolt. I pray you, how many hath he killed and eaten in these wars? But how many hath he killed? for indeed I promised to eat all of his killing. LEONATO Faith, niece, you tax Signior Benedick too much; but he'll be meet with you, I doubt it not. Messenger He hath done good service, lady, in these wars. BEATRICE You had musty victual, and he hath holp to eat it: he is a very valiant trencherman; he hath an excellent stomach. Messenger And a good soldier too, lady. BEATRICE And a good soldier to a lady: but what is he to a lord? Messenger A lord to a lord, a man to a man; stuffed with all honourable virtues. BEATRICE It is so, indeed; he is no less than a stuffed man: but for the stuffing,--well, we are all mortal. LEONATO You must not, sir, mistake my niece. There is a kind of merry war betwixt Signior Benedick and her: they never meet but there's a skirmish of wit between them. BEATRICE Alas! he gets nothing by that. In our last conflict four of his five wits went halting off, and now is the whole man governed with one: so that if he have wit enough to keep himself warm, let him bear it for a difference between himself and his horse; for it is all the wealth that he hath left, to be known a reasonable creature. Who is his companion now? He hath every month a new sworn brother. Messenger Is't possible? BEATRICE Very easily possible: he wears his faith but as the fashion of his hat; it ever changes with the next block. Messenger I see, lady, the gentleman is not in your books. BEATRICE No; an he were, I would burn my study. But, I pray you, who is his companion? Is there no young squarer now that will make a voyage with him to the devil? Messenger He is most in the company of the right noble Claudio. BEATRICE O Lord, he will hang upon him like a disease: he is sooner caught than the pestilence, and the taker runs presently mad. God help the noble Claudio! if he have caught the Benedick, it will cost him a thousand pound ere a' be cured. Messenger I will hold friends with you, lady. BEATRICE Do, good friend. LEONATO You will never run mad, niece. BEATRICE No, not till a hot January. Messenger Don Pedro is approached. Enter DON PEDRO, DON JOHN, CLAUDIO, BENEDICK, and BALTHASAR DON PEDRO Good Signior Leonato, you are come to meet your trouble: the fashion of the world is to avoid cost, and you encounter it. LEONATO Never came trouble to my house in the likeness of your grace: for trouble being gone, comfort should remain; but when you depart from me, sorrow abides and happiness takes his leave. DON PEDRO You embrace your charge too willingly. I think this is your daughter. LEONATO Her mother hath many times told me so. BENEDICK Were you in doubt, sir, that you asked her? LEONATO Signior Benedick, no; for then were you a child. DON PEDRO You have it full, Benedick: we may guess by this what you are, being a man. Truly, the lady fathers herself. Be happy, lady; for you are like an honourable father. BENEDICK If Signior Leonato be her father, she would not have his head on her shoulders for all Messina, as like him as she is. BEATRICE I wonder that you will still be talking, Signior Benedick: nobody marks you. BENEDICK What, my dear Lady Disdain! are you yet living? BEATRICE Is it possible disdain should die while she hath such meet food to feed it as Signior Benedick? Courtesy itself must convert to disdain, if you come in her presence. BENEDICK Then is courtesy a turncoat. But it is certain I am loved of all ladies, only you excepted: and I would I could find in my heart that I had not a hard heart; for, truly, I love none. BEATRICE A dear happiness to women: they would else have been troubled with a pernicious suitor. I thank God and my cold blood, I am of your humour for that: I had rather hear my dog bark at a crow than a man swear he loves me. BENEDICK God keep your ladyship still in that mind! so some gentleman or other shall 'scape a predestinate scratched face. BEATRICE Scratching could not make it worse, an 'twere such a face as yours were. BENEDICK Well, you are a rare parrot-teacher. BEATRICE A bird of my tongue is better than a beast of yours. BENEDICK I would my horse had the speed of your tongue, and so good a continuer. But keep your way, i' God's name; I have done. BEATRICE You always end with a jade's trick: I know you of old. DON PEDRO That is the sum of all, Leonato. Signior Claudio and Signior Benedick, my dear friend Leonato hath invited you all. I tell him we shall stay here at the least a month; and he heartily prays some occasion may detain us longer. I dare swear he is no hypocrite, but prays from his heart. LEONATO If you swear, my lord, you shall not be forsworn. To DON JOHN Let me bid you welcome, my lord: being reconciled to the prince your brother, I owe you all duty. DON JOHN I thank you: I am not of many words, but I thank you. LEONATO Please it your grace lead on? DON PEDRO Your hand, Leonato; we will go together. Exeunt all except BENEDICK and CLAUDIO CLAUDIO Benedick, didst thou note the daughter of Signior Leonato? BENEDICK I noted her not; but I looked on her. CLAUDIO Is she not a modest young lady? BENEDICK Do you question me, as an honest man should do, for my simple true judgment; or would you have me speak after my custom, as being a professed tyrant to their sex? CLAUDIO No; I pray thee speak in sober judgment. BENEDICK Why, i' faith, methinks she's too low for a high praise, too brown for a fair praise and too little for a great praise: only this commendation I can afford her, that were she other than she is, she were unhandsome; and being no other but as she is, I do not like her. CLAUDIO Thou thinkest I am in sport: I pray thee tell me truly how thou likest her. BENEDICK Would you buy her, that you inquire after her? CLAUDIO Can the world buy such a jewel? BENEDICK Yea, and a case to put it into. But speak you this with a sad brow? or do you play the flouting Jack, to tell us Cupid is a good hare-finder and Vulcan a rare carpenter? Come, in what key shall a man take you, to go in the song? CLAUDIO In mine eye she is the sweetest lady that ever I looked on. BENEDICK I can see yet without spectacles and I see no such matter: there's her cousin, an she were not possessed with a fury, exceeds her as much in beauty as the first of May doth the last of December. But I hope you have no intent to turn husband, have you? CLAUDIO I would scarce trust myself, though I had sworn the contrary, if Hero would be my wife. BENEDICK Is't come to this? In faith, hath not the world one man but he will wear his cap with suspicion? Shall I never see a bachelor of three-score again? Go to, i' faith; an thou wilt needs thrust thy neck into a yoke, wear the print of it and sigh away Sundays. Look Don Pedro is returned to seek you. Re-enter DON PEDRO DON PEDRO What secret hath held you here, that you followed not to Leonato's? BENEDICK I would your grace would constrain me to tell. DON PEDRO I charge thee on thy allegiance. BENEDICK You hear, Count Claudio: I can be secret as a dumb man; I would have you think so; but, on my allegiance, mark you this, on my allegiance. He is in love. With who? now that is your grace's part. Mark how short his answer is;--With Hero, Leonato's short daughter. CLAUDIO If this were so, so were it uttered. BENEDICK Like the old tale, my lord: 'it is not so, nor 'twas not so, but, indeed, God forbid it should be so.' CLAUDIO If my passion change not shortly, God forbid it should be otherwise. DON PEDRO Amen, if you love her; for the lady is very well worthy. CLAUDIO You speak this to fetch me in, my lord. DON PEDRO By my troth, I speak my thought. CLAUDIO And, in faith, my lord, I spoke mine. BENEDICK And, by my two faiths and troths, my lord, I spoke mine. CLAUDIO That I love her, I feel. DON PEDRO That she is worthy, I know. BENEDICK That I neither feel how she should be loved nor know how she should be worthy, is the opinion that fire cannot melt out of me: I will die in it at the stake. DON PEDRO Thou wast ever an obstinate heretic in the despite of beauty. CLAUDIO And never could maintain his part but in the force of his will. BENEDICK That a woman conceived me, I thank her; that she brought me up, I likewise give her most humble thanks: but that I will have a recheat winded in my forehead, or hang my bugle in an invisible baldrick, all women shall pardon me. Because I will not do them the wrong to mistrust any, I will do myself the right to trust none; and the fine is, for the which I may go the finer, I will live a bachelor. DON PEDRO I shall see thee, ere I die, look pale with love. BENEDICK With anger, with sickness, or with hunger, my lord, not with love: prove that ever I lose more blood with love than I will get again with drinking, pick out mine eyes with a ballad-maker's pen and hang me up at the door of a brothel-house for the sign of blind Cupid. DON PEDRO Well, if ever thou dost fall from this faith, thou wilt prove a notable argument. BENEDICK If I do, hang me in a bottle like a cat and shoot at me; and he that hits me, let him be clapped on the shoulder, and called Adam. DON PEDRO Well, as time shall try: 'In time the savage bull doth bear the yoke.' BENEDICK The savage bull may; but if ever the sensible Benedick bear it, pluck off the bull's horns and set them in my forehead: and let me be vilely painted, and in such great letters as they write 'Here is good horse to hire,' let them signify under my sign 'Here you may see Benedick the married man.' CLAUDIO If this should ever happen, thou wouldst be horn-mad. DON PEDRO Nay, if Cupid have not spent all his quiver in Venice, thou wilt quake for this shortly. BENEDICK I look for an earthquake too, then. DON PEDRO Well, you temporize with the hours. In the meantime, good Signior Benedick, repair to Leonato's: commend me to him and tell him I will not fail him at supper; for indeed he hath made great preparation. BENEDICK I have almost matter enough in me for such an embassage; and so I commit you-- CLAUDIO To the tuition of God: From my house, if I had it,-- DON PEDRO The sixth of July: Your loving friend, Benedick. BENEDICK Nay, mock not, mock not. The body of your discourse is sometime guarded with fragments, and the guards are but slightly basted on neither: ere you flout old ends any further, examine your conscience: and so I leave you. Exit CLAUDIO My liege, your highness now may do me good. DON PEDRO My love is thine to teach: teach it but how, And thou shalt see how apt it is to learn Any hard lesson that may do thee good. CLAUDIO Hath Leonato any son, my lord? DON PEDRO No child but Hero; she's his only heir. Dost thou affect her, Claudio? CLAUDIO O, my lord, When you went onward on this ended action, I look'd upon her with a soldier's eye, That liked, but had a rougher task in hand Than to drive liking to the name of love: But now I am return'd and that war-thoughts Have left their places vacant, in their rooms Come thronging soft and delicate desires, All prompting me how fair young Hero is, Saying, I liked her ere I went to wars. DON PEDRO Thou wilt be like a lover presently And tire the hearer with a book of words. If thou dost love fair Hero, cherish it, And I will break with her and with her father, And thou shalt have her. Was't not to this end That thou began'st to twist so fine a story? CLAUDIO How sweetly you do minister to love, That know love's grief by his complexion! But lest my liking might too sudden seem, I would have salved it with a longer treatise. DON PEDRO What need the bridge much broader than the flood? The fairest grant is the necessity. Look, what will serve is fit: 'tis once, thou lovest, And I will fit thee with the remedy. I know we shall have revelling to-night: I will assume thy part in some disguise And tell fair Hero I am Claudio, And in her bosom I'll unclasp my heart And take her hearing prisoner with the force And strong encounter of my amorous tale: Then after to her father will I break; And the conclusion is, she shall be thine. In practise let us put it presently. Exeunt SCENE II. A room in LEONATO's house. Enter LEONATO and ANTONIO, meeting LEONATO How now, brother! Where is my cousin, your son? hath he provided this music? ANTONIO He is very busy about it. But, brother, I can tell you strange news that you yet dreamt not of. LEONATO Are they good? ANTONIO As the event stamps them: but they have a good cover; they show well outward. The prince and Count Claudio, walking in a thick-pleached alley in mine orchard, were thus much overheard by a man of mine: the prince discovered to Claudio that he loved my niece your daughter and meant to acknowledge it this night in a dance: and if he found her accordant, he meant to take the present time by the top and instantly break with you of it. LEONATO Hath the fellow any wit that told you this? ANTONIO A good sharp fellow: I will send for him; and question him yourself. LEONATO No, no; we will hold it as a dream till it appear itself: but I will acquaint my daughter withal, that she may be the better prepared for an answer, if peradventure this be true. Go you and tell her of it. Enter Attendants Cousins, you know what you have to do. O, I cry you mercy, friend; go you with me, and I will use your skill. Good cousin, have a care this busy time. Exeunt SCENE III. The same. Enter DON JOHN and CONRADE CONRADE What the good-year, my lord! why are you thus out of measure sad? DON JOHN There is no measure in the occasion that breeds; therefore the sadness is without limit. CONRADE You should hear reason. DON JOHN And when I have heard it, what blessing brings it? CONRADE If not a present remedy, at least a patient sufferance. DON JOHN I wonder that thou, being, as thou sayest thou art, born under Saturn, goest about to apply a moral medicine to a mortifying mischief. I cannot hide what I am: I must be sad when I have cause and smile at no man's jests, eat when I have stomach and wait for no man's leisure, sleep when I am drowsy and tend on no man's business, laugh when I am merry and claw no man in his humour. CONRADE Yea, but you must not make the full show of this till you may do it without controlment. You have of late stood out against your brother, and he hath ta'en you newly into his grace; where it is impossible you should take true root but by the fair weather that you make yourself: it is needful that you frame the season for your own harvest. DON JOHN I had rather be a canker in a hedge than a rose in his grace, and it better fits my blood to be disdained of all than to fashion a carriage to rob love from any: in this, though I cannot be said to be a flattering honest man, it must not be denied but I am a plain-dealing villain. I am trusted with a muzzle and enfranchised with a clog; therefore I have decreed not to sing in my cage. If I had my mouth, I would bite; if I had my liberty, I would do my liking: in the meantime let me be that I am and seek not to alter me. CONRADE Can you make no use of your discontent? DON JOHN I make all use of it, for I use it only. Who comes here? Enter BORACHIO What news, Borachio? BORACHIO I came yonder from a great supper: the prince your brother is royally entertained by Leonato: and I can give you intelligence of an intended marriage. DON JOHN Will it serve for any model to build mischief on? What is he for a fool that betroths himself to unquietness? BORACHIO Marry, it is your brother's right hand. DON JOHN Who? the most exquisite Claudio? BORACHIO Even he. DON JOHN A proper squire! And who, and who? which way looks he? BORACHIO Marry, on Hero, the daughter and heir of Leonato. DON JOHN A very forward March-chick! How came you to this? BORACHIO Being entertained for a perfumer, as I was smoking a musty room, comes me the prince and Claudio, hand in hand in sad conference: I whipt me behind the arras; and there heard it agreed upon that the prince should woo Hero for himself, and having obtained her, give her to Count Claudio. DON JOHN Come, come, let us thither: this may prove food to my displeasure. That young start-up hath all the glory of my overthrow: if I can cross him any way, I bless myself every way. You are both sure, and will assist me? CONRADE To the death, my lord. DON JOHN Let us to the great supper: their cheer is the greater that I am subdued. Would the cook were of my mind! Shall we go prove what's to be done? BORACHIO We'll wait upon your lordship. Exeunt ACT II SCENE I. A hall in LEONATO'S house. Enter LEONATO, ANTONIO, HERO, BEATRICE, and others LEONATO Was not Count John here at supper? ANTONIO I saw him not. BEATRICE How tartly that gentleman looks! I never can see him but I am heart-burned an hour after. HERO He is of a very melancholy disposition. BEATRICE He were an excellent man that were made just in the midway between him and Benedick: the one is too like an image and says nothing, and the other too like my lady's eldest son, evermore tattling. LEONATO Then half Signior Benedick's tongue in Count John's mouth, and half Count John's melancholy in Signior Benedick's face,-- BEATRICE With a good leg and a good foot, uncle, and money enough in his purse, such a man would win any woman in the world, if a' could get her good-will. LEONATO By my troth, niece, thou wilt never get thee a husband, if thou be so shrewd of thy tongue. ANTONIO In faith, she's too curst. BEATRICE Too curst is more than curst: I shall lessen God's sending that way; for it is said, 'God sends a curst cow short horns;' but to a cow too curst he sends none. LEONATO So, by being too curst, God will send you no horns. BEATRICE Just, if he send me no husband; for the which blessing I am at him upon my knees every morning and evening. Lord, I could not endure a husband with a beard on his face: I had rather lie in the woollen. LEONATO You may light on a husband that hath no beard. BEATRICE What should I do with him? dress him in my apparel and make him my waiting-gentlewoman? He that hath a beard is more than a youth, and he that hath no beard is less than a man: and he that is more than a youth is not for me, and he that is less than a man, I am not for him: therefore, I will even take sixpence in earnest of the bear-ward, and lead his apes into hell. LEONATO Well, then, go you into hell? BEATRICE No, but to the gate; and there will the devil meet me, like an old cuckold, with horns on his head, and say 'Get you to heaven, Beatrice, get you to heaven; here's no place for you maids:' so deliver I up my apes, and away to Saint Peter for the heavens; he shows me where the bachelors sit, and there live we as merry as the day is long. ANTONIO To HERO Well, niece, I trust you will be ruled by your father. BEATRICE Yes, faith; it is my cousin's duty to make curtsy and say 'Father, as it please you.' But yet for all that, cousin, let him be a handsome fellow, or else make another curtsy and say 'Father, as it please me.' LEONATO Well, niece, I hope to see you one day fitted with a husband. BEATRICE Not till God make men of some other metal than earth. Would it not grieve a woman to be overmastered with a pierce of valiant dust? to make an account of her life to a clod of wayward marl? No, uncle, I'll none: Adam's sons are my brethren; and, truly, I hold it a sin to match in my kindred. LEONATO Daughter, remember what I told you: if the prince do solicit you in that kind, you know your answer. BEATRICE The fault will be in the music, cousin, if you be not wooed in good time: if the prince be too important, tell him there is measure in every thing and so dance out the answer. For, hear me, Hero: wooing, wedding, and repenting, is as a Scotch jig, a measure, and a cinque pace: the first suit is hot and hasty, like a Scotch jig, and full as fantastical; the wedding, mannerly-modest, as a measure, full of state and ancientry; and then comes repentance and, with his bad legs, falls into the cinque pace faster and faster, till he sink into his grave. LEONATO Cousin, you apprehend passing shrewdly. BEATRICE I have a good eye, uncle; I can see a church by daylight. LEONATO The revellers are entering, brother: make good room. All put on their masks Enter DON PEDRO, CLAUDIO, BENEDICK, BALTHASAR, DON JOHN, BORACHIO, MARGARET, URSULA and others, masked DON PEDRO Lady, will you walk about with your friend? HERO So you walk softly and look sweetly and say nothing, I am yours for the walk; and especially when I walk away. DON PEDRO With me in your company? HERO I may say so, when I please. DON PEDRO And when please you to say so? HERO When I like your favour; for God defend the lute should be like the case! DON PEDRO My visor is Philemon's roof; within the house is Jove. HERO Why, then, your visor should be thatched. DON PEDRO Speak low, if you speak love. Drawing her aside BALTHASAR Well, I would you did like me. MARGARET So would not I, for your own sake; for I have many ill-qualities. BALTHASAR Which is one? MARGARET I say my prayers aloud. BALTHASAR I love you the better: the hearers may cry, Amen. MARGARET God match me with a good dancer! BALTHASAR Amen. MARGARET And God keep him out of my sight when the dance is done! Answer, clerk. BALTHASAR No more words: the clerk is answered. URSULA I know you well enough; you are Signior Antonio. ANTONIO At a word, I am not. URSULA I know you by the waggling of your head. ANTONIO To tell you true, I counterfeit him. URSULA You could never do him so ill-well, unless you were the very man. Here's his dry hand up and down: you are he, you are he. ANTONIO At a word, I am not. URSULA Come, come, do you think I do not know you by your excellent wit? can virtue hide itself? Go to, mum, you are he: graces will appear, and there's an end. BEATRICE Will you not tell me who told you so? BENEDICK No, you shall pardon me. BEATRICE Nor will you not tell me who you are? BENEDICK Not now. BEATRICE That I was disdainful, and that I had my good wit out of the 'Hundred Merry Tales:'--well this was Signior Benedick that said so. BENEDICK What's he? BEATRICE I am sure you know him well enough. BENEDICK Not I, believe me. BEATRICE Did he never make you laugh? BENEDICK I pray you, what is he? BEATRICE Why, he is the prince's jester: a very dull fool; only his gift is in devising impossible slanders: none but libertines delight in him; and the commendation is not in his wit, but in his villany; for he both pleases men and angers them, and then they laugh at him and beat him. I am sure he is in the fleet: I would he had boarded me. BENEDICK When I know the gentleman, I'll tell him what you say. BEATRICE Do, do: he'll but break a comparison or two on me; which, peradventure not marked or not laughed at, strikes him into melancholy; and then there's a partridge wing saved, for the fool will eat no supper that night. Music We must follow the leaders. BENEDICK In every good thing. BEATRICE Nay, if they lead to any ill, I will leave them at the next turning. Dance. Then exeunt all except DON JOHN, BORACHIO, and CLAUDIO DON JOHN Sure my brother is amorous on Hero and hath withdrawn her father to break with him about it. The ladies follow her and but one visor remains. BORACHIO And that is Claudio: I know him by his bearing. DON JOHN Are not you Signior Benedick? CLAUDIO You know me well; I am he. DON JOHN Signior, you are very near my brother in his love: he is enamoured on Hero; I pray you, dissuade him from her: she is no equal for his birth: you may do the part of an honest man in it. CLAUDIO How know you he loves her? DON JOHN I heard him swear his affection. BORACHIO So did I too; and he swore he would marry her to-night. DON JOHN Come, let us to the banquet. Exeunt DON JOHN and BORACHIO CLAUDIO Thus answer I in the name of Benedick, But hear these ill news with the ears of Claudio. 'Tis certain so; the prince wooes for himself. Friendship is constant in all other things Save in the office and affairs of love: Therefore, all hearts in love use their own tongues; Let every eye negotiate for itself And trust no agent; for beauty is a witch Against whose charms faith melteth into blood. This is an accident of hourly proof, Which I mistrusted not. Farewell, therefore, Hero! Re-enter BENEDICK BENEDICK Count Claudio? CLAUDIO Yea, the same. BENEDICK Come, will you go with me? CLAUDIO Whither? BENEDICK Even to the next willow, about your own business, county. What fashion will you wear the garland of? about your neck, like an usurer's chain? or under your arm, like a lieutenant's scarf? You must wear it one way, for the prince hath got your Hero. CLAUDIO I wish him joy of her. BENEDICK Why, that's spoken like an honest drovier: so they sell bullocks. But did you think the prince would have served you thus? CLAUDIO I pray you, leave me. BENEDICK Ho! now you strike like the blind man: 'twas the boy that stole your meat, and you'll beat the post. CLAUDIO If it will not be, I'll leave you. Exit BENEDICK Alas, poor hurt fowl! now will he creep into sedges. But that my Lady Beatrice should know me, and not know me! The prince's fool! Ha? It may be I go under that title because I am merry. Yea, but so I am apt to do myself wrong; I am not so reputed: it is the base, though bitter, disposition of Beatrice that puts the world into her person and so gives me out. Well, I'll be revenged as I may. Re-enter DON PEDRO DON PEDRO Now, signior, where's the count? did you see him? BENEDICK Troth, my lord, I have played the part of Lady Fame. I found him here as melancholy as a lodge in a warren: I told him, and I think I told him true, that your grace had got the good will of this young lady; and I offered him my company to a willow-tree, either to make him a garland, as being forsaken, or to bind him up a rod, as being worthy to be whipped. DON PEDRO To be whipped! What's his fault? BENEDICK The flat transgression of a schoolboy, who, being overjoyed with finding a birds' nest, shows it his companion, and he steals it. DON PEDRO Wilt thou make a trust a transgression? The transgression is in the stealer. BENEDICK Yet it had not been amiss the rod had been made, and the garland too; for the garland he might have worn himself, and the rod he might have bestowed on you, who, as I take it, have stolen his birds' nest. DON PEDRO I will but teach them to sing, and restore them to the owner. BENEDICK If their singing answer your saying, by my faith, you say honestly. DON PEDRO The Lady Beatrice hath a quarrel to you: the gentleman that danced with her told her she is much wronged by you. BENEDICK O, she misused me past the endurance of a block! an oak but with one green leaf on it would have answered her; my very visor began to assume life and scold with her. She told me, not thinking I had been myself, that I was the prince's jester, that I was duller than a great thaw; huddling jest upon jest with such impossible conveyance upon me that I stood like a man at a mark, with a whole army shooting at me. She speaks poniards, and every word stabs: if her breath were as terrible as her terminations, there were no living near her; she would infect to the north star. I would not marry her, though she were endowed with all that Adam bad left him before he transgressed: she would have made Hercules have turned spit, yea, and have cleft his club to make the fire too. Come, talk not of her: you shall find her the infernal Ate in good apparel. I would to God some scholar would conjure her; for certainly, while she is here, a man may live as quiet in hell as in a sanctuary; and people sin upon purpose, because they would go thither; so, indeed, all disquiet, horror and perturbation follows her. DON PEDRO Look, here she comes. Enter CLAUDIO, BEATRICE, HERO, and LEONATO BENEDICK Will your grace command me any service to the world's end? I will go on the slightest errand now to the Antipodes that you can devise to send me on; I will fetch you a tooth-picker now from the furthest inch of Asia, bring you the length of Prester John's foot, fetch you a hair off the great Cham's beard, do you any embassage to the Pigmies, rather than hold three words' conference with this harpy. You have no employment for me? DON PEDRO None, but to desire your good company. BENEDICK O God, sir, here's a dish I love not: I cannot endure my Lady Tongue. Exit DON PEDRO Come, lady, come; you have lost the heart of Signior Benedick. BEATRICE Indeed, my lord, he lent it me awhile; and I gave him use for it, a double heart for his single one: marry, once before he won it of me with false dice, therefore your grace may well say I have lost it. DON PEDRO You have put him down, lady, you have put him down. BEATRICE So I would not he should do me, my lord, lest I should prove the mother of fools. I have brought Count Claudio, whom you sent me to seek. DON PEDRO Why, how now, count! wherefore are you sad? CLAUDIO Not sad, my lord. DON PEDRO How then? sick? CLAUDIO Neither, my lord. BEATRICE The count is neither sad, nor sick, nor merry, nor well; but civil count, civil as an orange, and something of that jealous complexion. DON PEDRO I' faith, lady, I think your blazon to be true; though, I'll be sworn, if he be so, his conceit is false. Here, Claudio, I have wooed in thy name, and fair Hero is won: I have broke with her father, and his good will obtained: name the day of marriage, and God give thee joy! LEONATO Count, take of me my daughter, and with her my fortunes: his grace hath made the match, and an grace say Amen to it. BEATRICE Speak, count, 'tis your cue. CLAUDIO Silence is the perfectest herald of joy: I were but little happy, if I could say how much. Lady, as you are mine, I am yours: I give away myself for you and dote upon the exchange. BEATRICE Speak, cousin; or, if you cannot, stop his mouth with a kiss, and let not him speak neither. DON PEDRO In faith, lady, you have a merry heart. BEATRICE Yea, my lord; I thank it, poor fool, it keeps on the windy side of care. My cousin tells him in his ear that he is in her heart. CLAUDIO And so she doth, cousin. BEATRICE Good Lord, for alliance! Thus goes every one to the world but I, and I am sunburnt; I may sit in a corner and cry heigh-ho for a husband! DON PEDRO Lady Beatrice, I will get you one. BEATRICE I would rather have one of your father's getting. Hath your grace ne'er a brother like you? Your father got excellent husbands, if a maid could come by them. DON PEDRO Will you have me, lady? BEATRICE No, my lord, unless I might have another for working-days: your grace is too costly to wear every day. But, I beseech your grace, pardon me: I was born to speak all mirth and no matter. DON PEDRO Your silence most offends me, and to be merry best becomes you; for, out of question, you were born in a merry hour. BEATRICE No, sure, my lord, my mother cried; but then there was a star danced, and under that was I born. Cousins, God give you joy! LEONATO Niece, will you look to those things I told you of? BEATRICE I cry you mercy, uncle. By your grace's pardon. Exit DON PEDRO By my troth, a pleasant-spirited lady. LEONATO There's little of the melancholy element in her, my lord: she is never sad but when she sleeps, and not ever sad then; for I have heard my daughter say, she hath often dreamed of unhappiness and waked herself with laughing. DON PEDRO She cannot endure to hear tell of a husband. LEONATO O, by no means: she mocks all her wooers out of suit. DON PEDRO She were an excellent wife for Benedict. LEONATO O Lord, my lord, if they were but a week married, they would talk themselves mad. DON PEDRO County Claudio, when mean you to go to church? CLAUDIO To-morrow, my lord: time goes on crutches till love have all his rites. LEONATO Not till Monday, my dear son, which is hence a just seven-night; and a time too brief, too, to have all things answer my mind. DON PEDRO Come, you shake the head at so long a breathing: but, I warrant thee, Claudio, the time shall not go dully by us. I will in the interim undertake one of Hercules' labours; which is, to bring Signior Benedick and the Lady Beatrice into a mountain of affection the one with the other. I would fain have it a match, and I doubt not but to fashion it, if you three will but minister such assistance as I shall give you direction. LEONATO My lord, I am for you, though it cost me ten nights' watchings. CLAUDIO And I, my lord. DON PEDRO And you too, gentle Hero? HERO I will do any modest office, my lord, to help my cousin to a good husband. DON PEDRO And Benedick is not the unhopefullest husband that I know. Thus far can I praise him; he is of a noble strain, of approved valour and confirmed honesty. I will teach you how to humour your cousin, that she shall fall in love with Benedick; and I, with your two helps, will so practise on Benedick that, in despite of his quick wit and his queasy stomach, he shall fall in love with Beatrice. If we can do this, Cupid is no longer an archer: his glory shall be ours, for we are the only love-gods. Go in with me, and I will tell you my drift. Exeunt SCENE II. The same. Enter DON JOHN and BORACHIO DON JOHN It is so; the Count Claudio shall marry the daughter of Leonato. BORACHIO Yea, my lord; but I can cross it. DON JOHN Any bar, any cross, any impediment will be medicinable to me: I am sick in displeasure to him, and whatsoever comes athwart his affection ranges evenly with mine. How canst thou cross this marriage? BORACHIO Not honestly, my lord; but so covertly that no dishonesty shall appear in me. DON JOHN Show me briefly how. BORACHIO I think I told your lordship a year since, how much I am in the favour of Margaret, the waiting gentlewoman to Hero. DON JOHN I remember. BORACHIO I can, at any unseasonable instant of the night, appoint her to look out at her lady's chamber window. DON JOHN What life is in that, to be the death of this marriage? BORACHIO The poison of that lies in you to temper. Go you to the prince your brother; spare not to tell him that he hath wronged his honour in marrying the renowned Claudio--whose estimation do you mightily hold up--to a contaminated stale, such a one as Hero. DON JOHN What proof shall I make of that? BORACHIO Proof enough to misuse the prince, to vex Claudio, to undo Hero and kill Leonato. Look you for any other issue? DON JOHN Only to despite them, I will endeavour any thing. BORACHIO Go, then; find me a meet hour to draw Don Pedro and the Count Claudio alone: tell them that you know that Hero loves me; intend a kind of zeal both to the prince and Claudio, as,--in love of your brother's honour, who hath made this match, and his friend's reputation, who is thus like to be cozened with the semblance of a maid,--that you have discovered thus. They will scarcely believe this without trial: offer them instances; which shall bear no less likelihood than to see me at her chamber-window, hear me call Margaret Hero, hear Margaret term me Claudio; and bring them to see this the very night before the intended wedding,--for in the meantime I will so fashion the matter that Hero shall be absent,--and there shall appear such seeming truth of Hero's disloyalty that jealousy shall be called assurance and all the preparation overthrown. DON JOHN Grow this to what adverse issue it can, I will put it in practise. Be cunning in the working this, and thy fee is a thousand ducats. BORACHIO Be you constant in the accusation, and my cunning shall not shame me. DON JOHN I will presently go learn their day of marriage. Exeunt SCENE III. LEONATO'S orchard. Enter BENEDICK BENEDICK Boy! Enter Boy Boy Signior? BENEDICK In my chamber-window lies a book: bring it hither to me in the orchard. Boy I am here already, sir. BENEDICK I know that; but I would have thee hence, and here again. Exit Boy I do much wonder that one man, seeing how much another man is a fool when he dedicates his behaviors to love, will, after he hath laughed at such shallow follies in others, become the argument of his own scorn by failing in love: and such a man is Claudio. I have known when there was no music with him but the drum and the fife; and now had he rather hear the tabour and the pipe: I have known when he would have walked ten mile a-foot to see a good armour; and now will he lie ten nights awake, carving the fashion of a new doublet. He was wont to speak plain and to the purpose, like an honest man and a soldier; and now is he turned orthography; his words are a very fantastical banquet, just so many strange dishes. May I be so converted and see with these eyes? I cannot tell; I think not: I will not be sworn, but love may transform me to an oyster; but I'll take my oath on it, till he have made an oyster of me, he shall never make me such a fool. One woman is fair, yet I am well; another is wise, yet I am well; another virtuous, yet I am well; but till all graces be in one woman, one woman shall not come in my grace. Rich she shall be, that's certain; wise, or I'll none; virtuous, or I'll never cheapen her; fair, or I'll never look on her; mild, or come not near me; noble, or not I for an angel; of good discourse, an excellent musician, and her hair shall be of what colour it please God. Ha! the prince and Monsieur Love! I will hide me in the arbour. Withdraws Enter DON PEDRO, CLAUDIO, and LEONATO DON PEDRO Come, shall we hear this music? CLAUDIO Yea, my good lord. How still the evening is, As hush'd on purpose to grace harmony! DON PEDRO See you where Benedick hath hid himself? CLAUDIO O, very well, my lord: the music ended, We'll fit the kid-fox with a pennyworth. Enter BALTHASAR with Music DON PEDRO Come, Balthasar, we'll hear that song again. BALTHASAR O, good my lord, tax not so bad a voice To slander music any more than once. DON PEDRO It is the witness still of excellency To put a strange face on his own perfection. I pray thee, sing, and let me woo no more. BALTHASAR Because you talk of wooing, I will sing; Since many a wooer doth commence his suit To her he thinks not worthy, yet he wooes, Yet will he swear he loves. DON PEDRO Now, pray thee, come; Or, if thou wilt hold longer argument, Do it in notes. BALTHASAR Note this before my notes; There's not a note of mine that's worth the noting. DON PEDRO Why, these are very crotchets that he speaks; Note, notes, forsooth, and nothing. Air BENEDICK Now, divine air! now is his soul ravished! Is it not strange that sheeps' guts should hale souls out of men's bodies? Well, a horn for my money, when all's done. The Song BALTHASAR Sigh no more, ladies, sigh no more, Men were deceivers ever, One foot in sea and one on shore, To one thing constant never: Then sigh not so, but let them go, And be you blithe and bonny, Converting all your sounds of woe Into Hey nonny, nonny. Sing no more ditties, sing no moe, Of dumps so dull and heavy; The fraud of men was ever so, Since summer first was leafy: Then sigh not so, &c. DON PEDRO By my troth, a good song. BALTHASAR And an ill singer, my lord. DON PEDRO Ha, no, no, faith; thou singest well enough for a shift. BENEDICK An he had been a dog that should have howled thus, they would have hanged him: and I pray God his bad voice bode no mischief. I had as lief have heard the night-raven, come what plague could have come after it. DON PEDRO Yea, marry, dost thou hear, Balthasar? I pray thee, get us some excellent music; for to-morrow night we would have it at the Lady Hero's chamber-window. BALTHASAR The best I can, my lord. DON PEDRO Do so: farewell. Exit BALTHASAR Come hither, Leonato. What was it you told me of to-day, that your niece Beatrice was in love with Signior Benedick? CLAUDIO O, ay: stalk on. stalk on; the fowl sits. I did never think that lady would have loved any man. LEONATO No, nor I neither; but most wonderful that she should so dote on Signior Benedick, whom she hath in all outward behaviors seemed ever to abhor. BENEDICK Is't possible? Sits the wind in that corner? LEONATO By my troth, my lord, I cannot tell what to think of it but that she loves him with an enraged affection: it is past the infinite of thought. DON PEDRO May be she doth but counterfeit. CLAUDIO Faith, like enough. LEONATO O God, counterfeit! There was never counterfeit of passion came so near the life of passion as she discovers it. DON PEDRO Why, what effects of passion shows she? CLAUDIO Bait the hook well; this fish will bite. LEONATO What effects, my lord? She will sit you, you heard my daughter tell you how. CLAUDIO She did, indeed. DON PEDRO How, how, pray you? You amaze me: I would have I thought her spirit had been invincible against all assaults of affection. LEONATO I would have sworn it had, my lord; especially against Benedick. BENEDICK I should think this a gull, but that the white-bearded fellow speaks it: knavery cannot, sure, hide himself in such reverence. CLAUDIO He hath ta'en the infection: hold it up. DON PEDRO Hath she made her affection known to Benedick? LEONATO No; and swears she never will: that's her torment. CLAUDIO 'Tis true, indeed; so your daughter says: 'Shall I,' says she, 'that have so oft encountered him with scorn, write to him that I love him?' LEONATO This says she now when she is beginning to write to him; for she'll be up twenty times a night, and there will she sit in her smock till she have writ a sheet of paper: my daughter tells us all. CLAUDIO Now you talk of a sheet of paper, I remember a pretty jest your daughter told us of. LEONATO O, when she had writ it and was reading it over, she found Benedick and Beatrice between the sheet? CLAUDIO That. LEONATO O, she tore the letter into a thousand halfpence; railed at herself, that she should be so immodest to write to one that she knew would flout her; 'I measure him,' says she, 'by my own spirit; for I should flout him, if he writ to me; yea, though I love him, I should.' CLAUDIO Then down upon her knees she falls, weeps, sobs, beats her heart, tears her hair, prays, curses; 'O sweet Benedick! God give me patience!' LEONATO She doth indeed; my daughter says so: and the ecstasy hath so much overborne her that my daughter is sometime afeared she will do a desperate outrage to herself: it is very true. DON PEDRO It were good that Benedick knew of it by some other, if she will not discover it. CLAUDIO To what end? He would make but a sport of it and torment the poor lady worse. DON PEDRO An he should, it were an alms to hang him. She's an excellent sweet lady; and, out of all suspicion, she is virtuous. CLAUDIO And she is exceeding wise. DON PEDRO In every thing but in loving Benedick. LEONATO O, my lord, wisdom and blood combating in so tender a body, we have ten proofs to one that blood hath the victory. I am sorry for her, as I have just cause, being her uncle and her guardian. DON PEDRO I would she had bestowed this dotage on me: I would have daffed all other respects and made her half myself. I pray you, tell Benedick of it, and hear what a' will say. LEONATO Were it good, think you? CLAUDIO Hero thinks surely she will die; for she says she will die, if he love her not, and she will die, ere she make her love known, and she will die, if he woo her, rather than she will bate one breath of her accustomed crossness. DON PEDRO She doth well: if she should make tender of her love, 'tis very possible he'll scorn it; for the man, as you know all, hath a contemptible spirit. CLAUDIO He is a very proper man. DON PEDRO He hath indeed a good outward happiness. CLAUDIO Before God! and, in my mind, very wise. DON PEDRO He doth indeed show some sparks that are like wit. CLAUDIO And I take him to be valiant. DON PEDRO As Hector, I assure you: and in the managing of quarrels you may say he is wise; for either he avoids them with great discretion, or undertakes them with a most Christian-like fear. LEONATO If he do fear God, a' must necessarily keep peace: if he break the peace, he ought to enter into a quarrel with fear and trembling. DON PEDRO And so will he do; for the man doth fear God, howsoever it seems not in him by some large jests he will make. Well I am sorry for your niece. Shall we go seek Benedick, and tell him of her love? CLAUDIO Never tell him, my lord: let her wear it out with good counsel. LEONATO Nay, that's impossible: she may wear her heart out first. DON PEDRO Well, we will hear further of it by your daughter: let it cool the while. I love Benedick well; and I could wish he would modestly examine himself, to see how much he is unworthy so good a lady. LEONATO My lord, will you walk? dinner is ready. CLAUDIO If he do not dote on her upon this, I will never trust my expectation. DON PEDRO Let there be the same net spread for her; and that must your daughter and her gentlewomen carry. The sport will be, when they hold one an opinion of another's dotage, and no such matter: that's the scene that I would see, which will be merely a dumb-show. Let us send her to call him in to dinner. Exeunt DON PEDRO, CLAUDIO, and LEONATO BENEDICK Coming forward This can be no trick: the conference was sadly borne. They have the truth of this from Hero. They seem to pity the lady: it seems her affections have their full bent. Love me! why, it must be requited. I hear how I am censured: they say I will bear myself proudly, if I perceive the love come from her; they say too that she will rather die than give any sign of affection. I did never think to marry: I must not seem proud: happy are they that hear their detractions and can put them to mending. They say the lady is fair; 'tis a truth, I can bear them witness; and virtuous; 'tis so, I cannot reprove it; and wise, but for loving me; by my troth, it is no addition to her wit, nor no great argument of her folly, for I will be horribly in love with her. I may chance have some odd quirks and remnants of wit broken on me, because I have railed so long against marriage: but doth not the appetite alter? a man loves the meat in his youth that he cannot endure in his age. Shall quips and sentences and these paper bullets of the brain awe a man from the career of his humour? No, the world must be peopled. When I said I would die a bachelor, I did not think I should live till I were married. Here comes Beatrice. By this day! she's a fair lady: I do spy some marks of love in her. Enter BEATRICE BEATRICE Against my will I am sent to bid you come in to dinner. BENEDICK Fair Beatrice, I thank you for your pains. BEATRICE I took no more pains for those thanks than you take pains to thank me: if it had been painful, I would not have come. BENEDICK You take pleasure then in the message? BEATRICE Yea, just so much as you may take upon a knife's point and choke a daw withal. You have no stomach, signior: fare you well. Exit BENEDICK Ha! 'Against my will I am sent to bid you come in to dinner;' there's a double meaning in that 'I took no more pains for those thanks than you took pains to thank me.' that's as much as to say, Any pains that I take for you is as easy as thanks. If I do not take pity of her, I am a villain; if I do not love her, I am a Jew. I will go get her picture. Exit ACT III SCENE I. LEONATO'S garden. Enter HERO, MARGARET, and URSULA HERO Good Margaret, run thee to the parlor; There shalt thou find my cousin Beatrice Proposing with the prince and Claudio: Whisper her ear and tell her, I and Ursula Walk in the orchard and our whole discourse Is all of her; say that thou overheard'st us; And bid her steal into the pleached bower, Where honeysuckles, ripen'd by the sun, Forbid the sun to enter, like favourites, Made proud by princes, that advance their pride Against that power that bred it: there will she hide her, To listen our purpose. This is thy office; Bear thee well in it and leave us alone. MARGARET I'll make her come, I warrant you, presently. Exit HERO Now, Ursula, when Beatrice doth come, As we do trace this alley up and down, Our talk must only be of Benedick. When I do name him, let it be thy part To praise him more than ever man did merit: My talk to thee must be how Benedick Is sick in love with Beatrice. Of this matter Is little Cupid's crafty arrow made, That only wounds by hearsay. Enter BEATRICE, behind Now begin; For look where Beatrice, like a lapwing, runs Close by the ground, to hear our conference. URSULA The pleasant'st angling is to see the fish Cut with her golden oars the silver stream, And greedily devour the treacherous bait: So angle we for Beatrice; who even now Is couched in the woodbine coverture. Fear you not my part of the dialogue. HERO Then go we near her, that her ear lose nothing Of the false sweet bait that we lay for it. Approaching the bower No, truly, Ursula, she is too disdainful; I know her spirits are as coy and wild As haggerds of the rock. URSULA But are you sure That Benedick loves Beatrice so entirely? HERO So says the prince and my new-trothed lord. URSULA And did they bid you tell her of it, madam? HERO They did entreat me to acquaint her of it; But I persuaded them, if they loved Benedick, To wish him wrestle with affection, And never to let Beatrice know of it. URSULA Why did you so? Doth not the gentleman Deserve as full as fortunate a bed As ever Beatrice shall couch upon? HERO O god of love! I know he doth deserve As much as may be yielded to a man: But Nature never framed a woman's heart Of prouder stuff than that of Beatrice; Disdain and scorn ride sparkling in her eyes, Misprising what they look on, and her wit Values itself so highly that to her All matter else seems weak: she cannot love, Nor take no shape nor project of affection, She is so self-endeared. URSULA Sure, I think so; And therefore certainly it were not good She knew his love, lest she make sport at it. HERO Why, you speak truth. I never yet saw man, How wise, how noble, young, how rarely featured, But she would spell him backward: if fair-faced, She would swear the gentleman should be her sister; If black, why, Nature, drawing of an antique, Made a foul blot; if tall, a lance ill-headed; If low, an agate very vilely cut; If speaking, why, a vane blown with all winds; If silent, why, a block moved with none. So turns she every man the wrong side out And never gives to truth and virtue that Which simpleness and merit purchaseth. URSULA Sure, sure, such carping is not commendable. HERO No, not to be so odd and from all fashions As Beatrice is, cannot be commendable: But who dare tell her so? If I should speak, She would mock me into air; O, she would laugh me Out of myself, press me to death with wit. Therefore let Benedick, like cover'd fire, Consume away in sighs, waste inwardly: It were a better death than die with mocks, Which is as bad as die with tickling. URSULA Yet tell her of it: hear what she will say. HERO No; rather I will go to Benedick And counsel him to fight against his passion. And, truly, I'll devise some honest slanders To stain my cousin with: one doth not know How much an ill word may empoison liking. URSULA O, do not do your cousin such a wrong. She cannot be so much without true judgment-- Having so swift and excellent a wit As she is prized to have--as to refuse So rare a gentleman as Signior Benedick. HERO He is the only man of Italy. Always excepted my dear Claudio. URSULA I pray you, be not angry with me, madam, Speaking my fancy: Signior Benedick, For shape, for bearing, argument and valour, Goes foremost in report through Italy. HERO Indeed, he hath an excellent good name. URSULA His excellence did earn it, ere he had it. When are you married, madam? HERO Why, every day, to-morrow. Come, go in: I'll show thee some attires, and have thy counsel Which is the best to furnish me to-morrow. URSULA She's limed, I warrant you: we have caught her, madam. HERO If it proves so, then loving goes by haps: Some Cupid kills with arrows, some with traps. Exeunt HERO and URSULA BEATRICE Coming forward What fire is in mine ears? Can this be true? Stand I condemn'd for pride and scorn so much? Contempt, farewell! and maiden pride, adieu! No glory lives behind the back of such. And, Benedick, love on; I will requite thee, Taming my wild heart to thy loving hand: If thou dost love, my kindness shall incite thee To bind our loves up in a holy band; For others say thou dost deserve, and I Believe it better than reportingly. Exit SCENE II. A room in LEONATO'S house Enter DON PEDRO, CLAUDIO, BENEDICK, and LEONATO DON PEDRO I do but stay till your marriage be consummate, and then go I toward Arragon. CLAUDIO I'll bring you thither, my lord, if you'll vouchsafe me. DON PEDRO Nay, that would be as great a soil in the new gloss of your marriage as to show a child his new coat and forbid him to wear it. I will only be bold with Benedick for his company; for, from the crown of his head to the sole of his foot, he is all mirth: he hath twice or thrice cut Cupid's bow-string and the little hangman dare not shoot at him; he hath a heart as sound as a bell and his tongue is the clapper, for what his heart thinks his tongue speaks. BENEDICK Gallants, I am not as I have been. LEONATO So say I methinks you are sadder. CLAUDIO I hope he be in love. DON PEDRO Hang him, truant! there's no true drop of blood in him, to be truly touched with love: if he be sad, he wants money. BENEDICK I have the toothache. DON PEDRO Draw it. BENEDICK Hang it! CLAUDIO You must hang it first, and draw it afterwards. DON PEDRO What! sigh for the toothache? LEONATO Where is but a humour or a worm. BENEDICK Well, every one can master a grief but he that has it. CLAUDIO Yet say I, he is in love. DON PEDRO There is no appearance of fancy in him, unless it be a fancy that he hath to strange disguises; as, to be a Dutchman today, a Frenchman to-morrow, or in the shape of two countries at once, as, a German from the waist downward, all slops, and a Spaniard from the hip upward, no doublet. Unless he have a fancy to this foolery, as it appears he hath, he is no fool for fancy, as you would have it appear he is. CLAUDIO If he be not in love with some woman, there is no believing old signs: a' brushes his hat o' mornings; what should that bode? DON PEDRO Hath any man seen him at the barber's? CLAUDIO No, but the barber's man hath been seen with him, and the old ornament of his cheek hath already stuffed tennis-balls. LEONATO Indeed, he looks younger than he did, by the loss of a beard. DON PEDRO Nay, a' rubs himself with civet: can you smell him out by that? CLAUDIO That's as much as to say, the sweet youth's in love. DON PEDRO The greatest note of it is his melancholy. CLAUDIO And when was he wont to wash his face? DON PEDRO Yea, or to paint himself? for the which, I hear what they say of him. CLAUDIO Nay, but his jesting spirit; which is now crept into a lute-string and now governed by stops. DON PEDRO Indeed, that tells a heavy tale for him: conclude, conclude he is in love. CLAUDIO Nay, but I know who loves him. DON PEDRO That would I know too: I warrant, one that knows him not. CLAUDIO Yes, and his ill conditions; and, in despite of all, dies for him. DON PEDRO She shall be buried with her face upwards. BENEDICK Yet is this no charm for the toothache. Old signior, walk aside with me: I have studied eight or nine wise words to speak to you, which these hobby-horses must not hear. Exeunt BENEDICK and LEONATO DON PEDRO For my life, to break with him about Beatrice. CLAUDIO 'Tis even so. Hero and Margaret have by this played their parts with Beatrice; and then the two bears will not bite one another when they meet. Enter DON JOHN DON JOHN My lord and brother, God save you! DON PEDRO Good den, brother. DON JOHN If your leisure served, I would speak with you. DON PEDRO In private? DON JOHN If it please you: yet Count Claudio may hear; for what I would speak of concerns him. DON PEDRO What's the matter? DON JOHN To CLAUDIO Means your lordship to be married to-morrow? DON PEDRO You know he does. DON JOHN I know not that, when he knows what I know. CLAUDIO If there be any impediment, I pray you discover it. DON JOHN You may think I love you not: let that appear hereafter, and aim better at me by that I now will manifest. For my brother, I think he holds you well, and in dearness of heart hath holp to effect your ensuing marriage;--surely suit ill spent and labour ill bestowed. DON PEDRO Why, what's the matter? DON JOHN I came hither to tell you; and, circumstances shortened, for she has been too long a talking of, the lady is disloyal. CLAUDIO Who, Hero? DON PEDRO Even she; Leonato's Hero, your Hero, every man's Hero: CLAUDIO Disloyal? DON JOHN The word is too good to paint out her wickedness; I could say she were worse: think you of a worse title, and I will fit her to it. Wonder not till further warrant: go but with me to-night, you shall see her chamber-window entered, even the night before her wedding-day: if you love her then, to-morrow wed her; but it would better fit your honour to change your mind. CLAUDIO May this be so? DON PEDRO I will not think it. DON JOHN If you dare not trust that you see, confess not that you know: if you will follow me, I will show you enough; and when you have seen more and heard more, proceed accordingly. CLAUDIO If I see any thing to-night why I should not marry her to-morrow in the congregation, where I should wed, there will I shame her. DON PEDRO And, as I wooed for thee to obtain her, I will join with thee to disgrace her. DON JOHN I will disparage her no farther till you are my witnesses: bear it coldly but till midnight, and let the issue show itself. DON PEDRO O day untowardly turned! CLAUDIO O mischief strangely thwarting! DON JOHN O plague right well prevented! so will you say when you have seen the sequel. Exeunt SCENE III. A street. Enter DOGBERRY and VERGES with the Watch DOGBERRY Are you good men and true? VERGES Yea, or else it were pity but they should suffer salvation, body and soul. DOGBERRY Nay, that were a punishment too good for them, if they should have any allegiance in them, being chosen for the prince's watch. VERGES Well, give them their charge, neighbour Dogberry. DOGBERRY First, who think you the most desertless man to be constable? First Watchman Hugh Otecake, sir, or George Seacole; for they can write and read. DOGBERRY Come hither, neighbour Seacole. God hath blessed you with a good name: to be a well-favoured man is the gift of fortune; but to write and read comes by nature. Second Watchman Both which, master constable,-- DOGBERRY You have: I knew it would be your answer. Well, for your favour, sir, why, give God thanks, and make no boast of it; and for your writing and reading, let that appear when there is no need of such vanity. You are thought here to be the most senseless and fit man for the constable of the watch; therefore bear you the lantern. This is your charge: you shall comprehend all vagrom men; you are to bid any man stand, in the prince's name. Second Watchman How if a' will not stand? DOGBERRY Why, then, take no note of him, but let him go; and presently call the rest of the watch together and thank God you are rid of a knave. VERGES If he will not stand when he is bidden, he is none of the prince's subjects. DOGBERRY True, and they are to meddle with none but the prince's subjects. You shall also make no noise in the streets; for, for the watch to babble and to talk is most tolerable and not to be endured. Watchman We will rather sleep than talk: we know what belongs to a watch. DOGBERRY Why, you speak like an ancient and most quiet watchman; for I cannot see how sleeping should offend: only, have a care that your bills be not stolen. Well, you are to call at all the ale-houses, and bid those that are drunk get them to bed. Watchman How if they will not? DOGBERRY Why, then, let them alone till they are sober: if they make you not then the better answer, you may say they are not the men you took them for. Watchman Well, sir. DOGBERRY If you meet a thief, you may suspect him, by virtue of your office, to be no true man; and, for such kind of men, the less you meddle or make with them, why the more is for your honesty. Watchman If we know him to be a thief, shall we not lay hands on him? DOGBERRY Truly, by your office, you may; but I think they that touch pitch will be defiled: the most peaceable way for you, if you do take a thief, is to let him show himself what he is and steal out of your company. VERGES You have been always called a merciful man, partner. DOGBERRY Truly, I would not hang a dog by my will, much more a man who hath any honesty in him. VERGES If you hear a child cry in the night, you must call to the nurse and bid her still it. Watchman How if the nurse be asleep and will not hear us? DOGBERRY Why, then, depart in peace, and let the child wake her with crying; for the ewe that will not hear her lamb when it baes will never answer a calf when he bleats. VERGES 'Tis very true. DOGBERRY This is the end of the charge:--you, constable, are to present the prince's own person: if you meet the prince in the night, you may stay him. VERGES Nay, by'r our lady, that I think a' cannot. DOGBERRY Five shillings to one on't, with any man that knows the statutes, he may stay him: marry, not without the prince be willing; for, indeed, the watch ought to offend no man; and it is an offence to stay a man against his will. VERGES By'r lady, I think it be so. DOGBERRY Ha, ha, ha! Well, masters, good night: an there be any matter of weight chances, call up me: keep your fellows' counsels and your own; and good night. Come, neighbour. Watchman Well, masters, we hear our charge: let us go sit here upon the church-bench till two, and then all to bed. DOGBERRY One word more, honest neighbours. I pray you watch about Signior Leonato's door; for the wedding being there to-morrow, there is a great coil to-night. Adieu: be vigitant, I beseech you. Exeunt DOGBERRY and VERGES Enter BORACHIO and CONRADE BORACHIO What Conrade! Watchman Aside Peace! stir not. BORACHIO Conrade, I say! CONRADE Here, man; I am at thy elbow. BORACHIO Mass, and my elbow itched; I thought there would a scab follow. CONRADE I will owe thee an answer for that: and now forward with thy tale. BORACHIO Stand thee close, then, under this pent-house, for it drizzles rain; and I will, like a true drunkard, utter all to thee. Watchman Aside Some treason, masters: yet stand close. BORACHIO Therefore know I have earned of Don John a thousand ducats. CONRADE Is it possible that any villany should be so dear? BORACHIO Thou shouldst rather ask if it were possible any villany should be so rich; for when rich villains have need of poor ones, poor ones may make what price they will. CONRADE I wonder at it. BORACHIO That shows thou art unconfirmed. Thou knowest that the fashion of a doublet, or a hat, or a cloak, is nothing to a man. CONRADE Yes, it is apparel. BORACHIO I mean, the fashion. CONRADE Yes, the fashion is the fashion. BORACHIO Tush! I may as well say the fool's the fool. But seest thou not what a deformed thief this fashion is? Watchman Aside I know that Deformed; a' has been a vile thief this seven year; a' goes up and down like a gentleman: I remember his name. BORACHIO Didst thou not hear somebody? CONRADE No; 'twas the vane on the house. BORACHIO Seest thou not, I say, what a deformed thief this fashion is? how giddily a' turns about all the hot bloods between fourteen and five-and-thirty? sometimes fashioning them like Pharaoh's soldiers in the reeky painting, sometime like god Bel's priests in the old church-window, sometime like the shaven Hercules in the smirched worm-eaten tapestry, where his codpiece seems as massy as his club? CONRADE All this I see; and I see that the fashion wears out more apparel than the man. But art not thou thyself giddy with the fashion too, that thou hast shifted out of thy tale into telling me of the fashion? BORACHIO Not so, neither: but know that I have to-night wooed Margaret, the Lady Hero's gentlewoman, by the name of Hero: she leans me out at her mistress' chamber-window, bids me a thousand times good night,--I tell this tale vilely:--I should first tell thee how the prince, Claudio and my master, planted and placed and possessed by my master Don John, saw afar off in the orchard this amiable encounter. CONRADE And thought they Margaret was Hero? BORACHIO Two of them did, the prince and Claudio; but the devil my master knew she was Margaret; and partly by his oaths, which first possessed them, partly by the dark night, which did deceive them, but chiefly by my villany, which did confirm any slander that Don John had made, away went Claudio enraged; swore he would meet her, as he was appointed, next morning at the temple, and there, before the whole congregation, shame her with what he saw o'er night and send her home again without a husband. First Watchman We charge you, in the prince's name, stand! Second Watchman Call up the right master constable. We have here recovered the most dangerous piece of lechery that ever was known in the commonwealth. First Watchman And one Deformed is one of them: I know him; a' wears a lock. CONRADE Masters, masters,-- Second Watchman You'll be made bring Deformed forth, I warrant you. CONRADE Masters,-- First Watchman Never speak: we charge you let us obey you to go with us. BORACHIO We are like to prove a goodly commodity, being taken up of these men's bills. CONRADE A commodity in question, I warrant you. Come, we'll obey you. Exeunt SCENE IV. HERO's apartment. Enter HERO, MARGARET, and URSULA HERO Good Ursula, wake my cousin Beatrice, and desire her to rise. URSULA I will, lady. HERO And bid her come hither. URSULA Well. Exit MARGARET Troth, I think your other rabato were better. HERO No, pray thee, good Meg, I'll wear this. MARGARET By my troth, 's not so good; and I warrant your cousin will say so. HERO My cousin's a fool, and thou art another: I'll wear none but this. MARGARET I like the new tire within excellently, if the hair were a thought browner; and your gown's a most rare fashion, i' faith. I saw the Duchess of Milan's gown that they praise so. HERO O, that exceeds, they say. MARGARET By my troth, 's but a night-gown in respect of yours: cloth o' gold, and cuts, and laced with silver, set with pearls, down sleeves, side sleeves, and skirts, round underborne with a bluish tinsel: but for a fine, quaint, graceful and excellent fashion, yours is worth ten on 't. HERO God give me joy to wear it! for my heart is exceeding heavy. MARGARET 'Twill be heavier soon by the weight of a man. HERO Fie upon thee! art not ashamed? MARGARET Of what, lady? of speaking honourably? Is not marriage honourable in a beggar? Is not your lord honourable without marriage? I think you would have me say, 'saving your reverence, a husband:' and bad thinking do not wrest true speaking, I'll offend nobody: is there any harm in 'the heavier for a husband'? None, I think, and it be the right husband and the right wife; otherwise 'tis light, and not heavy: ask my Lady Beatrice else; here she comes. Enter BEATRICE HERO Good morrow, coz. BEATRICE Good morrow, sweet Hero. HERO Why how now? do you speak in the sick tune? BEATRICE I am out of all other tune, methinks. MARGARET Clap's into 'Light o' love;' that goes without a burden: do you sing it, and I'll dance it. BEATRICE Ye light o' love, with your heels! then, if your husband have stables enough, you'll see he shall lack no barns. MARGARET O illegitimate construction! I scorn that with my heels. BEATRICE 'Tis almost five o'clock, cousin; tis time you were ready. By my troth, I am exceeding ill: heigh-ho! MARGARET For a hawk, a horse, or a husband? BEATRICE For the letter that begins them all, H. MARGARET Well, and you be not turned Turk, there's no more sailing by the star. BEATRICE What means the fool, trow? MARGARET Nothing I; but God send every one their heart's desire! HERO These gloves the count sent me; they are an excellent perfume. BEATRICE I am stuffed, cousin; I cannot smell. MARGARET A maid, and stuffed! there's goodly catching of cold. BEATRICE O, God help me! God help me! how long have you professed apprehension? MARGARET Even since you left it. Doth not my wit become me rarely? BEATRICE It is not seen enough, you should wear it in your cap. By my troth, I am sick. MARGARET Get you some of this distilled Carduus Benedictus, and lay it to your heart: it is the only thing for a qualm. HERO There thou prickest her with a thistle. BEATRICE Benedictus! why Benedictus? you have some moral in this Benedictus. MARGARET Moral! no, by my troth, I have no moral meaning; I meant, plain holy-thistle. You may think perchance that I think you are in love: nay, by'r lady, I am not such a fool to think what I list, nor I list not to think what I can, nor indeed I cannot think, if I would think my heart out of thinking, that you are in love or that you will be in love or that you can be in love. Yet Benedick was such another, and now is he become a man: he swore he would never marry, and yet now, in despite of his heart, he eats his meat without grudging: and how you may be converted I know not, but methinks you look with your eyes as other women do. BEATRICE What pace is this that thy tongue keeps? MARGARET Not a false gallop. Re-enter URSULA URSULA Madam, withdraw: the prince, the count, Signior Benedick, Don John, and all the gallants of the town, are come to fetch you to church. HERO Help to dress me, good coz, good Meg, good Ursula. Exeunt SCENE V. Another room in LEONATO'S house. Enter LEONATO, with DOGBERRY and VERGES LEONATO What would you with me, honest neighbour? DOGBERRY Marry, sir, I would have some confidence with you that decerns you nearly. LEONATO Brief, I pray you; for you see it is a busy time with me. DOGBERRY Marry, this it is, sir. VERGES Yes, in truth it is, sir. LEONATO What is it, my good friends? DOGBERRY Goodman Verges, sir, speaks a little off the matter: an old man, sir, and his wits are not so blunt as, God help, I would desire they were; but, in faith, honest as the skin between his brows. VERGES Yes, I thank God I am as honest as any man living that is an old man and no honester than I. DOGBERRY Comparisons are odorous: palabras, neighbour Verges. LEONATO Neighbours, you are tedious. DOGBERRY It pleases your worship to say so, but we are the poor duke's officers; but truly, for mine own part, if I were as tedious as a king, I could find it in my heart to bestow it all of your worship. LEONATO All thy tediousness on me, ah? DOGBERRY Yea, an 'twere a thousand pound more than 'tis; for I hear as good exclamation on your worship as of any man in the city; and though I be but a poor man, I am glad to hear it. VERGES And so am I. LEONATO I would fain know what you have to say. VERGES Marry, sir, our watch to-night, excepting your worship's presence, ha' ta'en a couple of as arrant knaves as any in Messina. DOGBERRY A good old man, sir; he will be talking: as they say, when the age is in, the wit is out: God help us! it is a world to see. Well said, i' faith, neighbour Verges: well, God's a good man; an two men ride of a horse, one must ride behind. An honest soul, i' faith, sir; by my troth he is, as ever broke bread; but God is to be worshipped; all men are not alike; alas, good neighbour! LEONATO Indeed, neighbour, he comes too short of you. DOGBERRY Gifts that God gives. LEONATO I must leave you. DOGBERRY One word, sir: our watch, sir, have indeed comprehended two aspicious persons, and we would have them this morning examined before your worship. LEONATO Take their examination yourself and bring it me: I am now in great haste, as it may appear unto you. DOGBERRY It shall be suffigance. LEONATO Drink some wine ere you go: fare you well. Enter a Messenger Messenger My lord, they stay for you to give your daughter to her husband. LEONATO I'll wait upon them: I am ready. Exeunt LEONATO and Messenger DOGBERRY Go, good partner, go, get you to Francis Seacole; bid him bring his pen and inkhorn to the gaol: we are now to examination these men. VERGES And we must do it wisely. DOGBERRY We will spare for no wit, I warrant you; here's that shall drive some of them to a non-come: only get the learned writer to set down our excommunication and meet me at the gaol. Exeunt ACT IV SCENE I. A church. Enter DON PEDRO, DON JOHN, LEONATO, FRIAR FRANCIS, CLAUDIO, BENEDICK, HERO, BEATRICE, and Attendants LEONATO Come, Friar Francis, be brief; only to the plain form of marriage, and you shall recount their particular duties afterwards. FRIAR FRANCIS You come hither, my lord, to marry this lady. CLAUDIO No. LEONATO To be married to her: friar, you come to marry her. FRIAR FRANCIS Lady, you come hither to be married to this count. HERO I do. FRIAR FRANCIS If either of you know any inward impediment why you should not be conjoined, charge you, on your souls, to utter it. CLAUDIO Know you any, Hero? HERO None, my lord. FRIAR FRANCIS Know you any, count? LEONATO I dare make his answer, none. CLAUDIO O, what men dare do! what men may do! what men daily do, not knowing what they do! BENEDICK How now! interjections? Why, then, some be of laughing, as, ah, ha, he! CLAUDIO Stand thee by, friar. Father, by your leave: Will you with free and unconstrained soul Give me this maid, your daughter? LEONATO As freely, son, as God did give her me. CLAUDIO And what have I to give you back, whose worth May counterpoise this rich and precious gift? DON PEDRO Nothing, unless you render her again. CLAUDIO Sweet prince, you learn me noble thankfulness. There, Leonato, take her back again: Give not this rotten orange to your friend; She's but the sign and semblance of her honour. Behold how like a maid she blushes here! O, what authority and show of truth Can cunning sin cover itself withal! Comes not that blood as modest evidence To witness simple virtue? Would you not swear, All you that see her, that she were a maid, By these exterior shows? But she is none: She knows the heat of a luxurious bed; Her blush is guiltiness, not modesty. LEONATO What do you mean, my lord? CLAUDIO Not to be married, Not to knit my soul to an approved wanton. LEONATO Dear my lord, if you, in your own proof, Have vanquish'd the resistance of her youth, And made defeat of her virginity,-- CLAUDIO I know what you would say: if I have known her, You will say she did embrace me as a husband, And so extenuate the 'forehand sin: No, Leonato, I never tempted her with word too large; But, as a brother to his sister, show'd Bashful sincerity and comely love. HERO And seem'd I ever otherwise to you? CLAUDIO Out on thee! Seeming! I will write against it: You seem to me as Dian in her orb, As chaste as is the bud ere it be blown; But you are more intemperate in your blood Than Venus, or those pamper'd animals That rage in savage sensuality. HERO Is my lord well, that he doth speak so wide? LEONATO Sweet prince, why speak not you? DON PEDRO What should I speak? I stand dishonour'd, that have gone about To link my dear friend to a common stale. LEONATO Are these things spoken, or do I but dream? DON JOHN Sir, they are spoken, and these things are true. BENEDICK This looks not like a nuptial. HERO True! O God! CLAUDIO Leonato, stand I here? Is this the prince? is this the prince's brother? Is this face Hero's? are our eyes our own? LEONATO All this is so: but what of this, my lord? CLAUDIO Let me but move one question to your daughter; And, by that fatherly and kindly power That you have in her, bid her answer truly. LEONATO I charge thee do so, as thou art my child. HERO O, God defend me! how am I beset! What kind of catechising call you this? CLAUDIO To make you answer truly to your name. HERO Is it not Hero? Who can blot that name With any just reproach? CLAUDIO Marry, that can Hero; Hero itself can blot out Hero's virtue. What man was he talk'd with you yesternight Out at your window betwixt twelve and one? Now, if you are a maid, answer to this. HERO I talk'd with no man at that hour, my lord. DON PEDRO Why, then are you no maiden. Leonato, I am sorry you must hear: upon mine honour, Myself, my brother and this grieved count Did see her, hear her, at that hour last night Talk with a ruffian at her chamber-window Who hath indeed, most like a liberal villain, Confess'd the vile encounters they have had A thousand times in secret. DON JOHN Fie, fie! they are not to be named, my lord, Not to be spoke of; There is not chastity enough in language Without offence to utter them. Thus, pretty lady, I am sorry for thy much misgovernment. CLAUDIO O Hero, what a Hero hadst thou been, If half thy outward graces had been placed About thy thoughts and counsels of thy heart! But fare thee well, most foul, most fair! farewell, Thou pure impiety and impious purity! For thee I'll lock up all the gates of love, And on my eyelids shall conjecture hang, To turn all beauty into thoughts of harm, And never shall it more be gracious. LEONATO Hath no man's dagger here a point for me? HERO swoons BEATRICE Why, how now, cousin! wherefore sink you down? DON JOHN Come, let us go. These things, come thus to light, Smother her spirits up. Exeunt DON PEDRO, DON JOHN, and CLAUDIO BENEDICK How doth the lady? BEATRICE Dead, I think. Help, uncle! Hero! why, Hero! Uncle! Signior Benedick! Friar! LEONATO O Fate! take not away thy heavy hand. Death is the fairest cover for her shame That may be wish'd for. BEATRICE How now, cousin Hero! FRIAR FRANCIS Have comfort, lady. LEONATO Dost thou look up? FRIAR FRANCIS Yea, wherefore should she not? LEONATO Wherefore! Why, doth not every earthly thing Cry shame upon her? Could she here deny The story that is printed in her blood? Do not live, Hero; do not ope thine eyes: For, did I think thou wouldst not quickly die, Thought I thy spirits were stronger than thy shames, Myself would, on the rearward of reproaches, Strike at thy life. Grieved I, I had but one? Chid I for that at frugal nature's frame? O, one too much by thee! Why had I one? Why ever wast thou lovely in my eyes? Why had I not with charitable hand Took up a beggar's issue at my gates, Who smirch'd thus and mired with infamy, I might have said 'No part of it is mine; This shame derives itself from unknown loins'? But mine and mine I loved and mine I praised And mine that I was proud on, mine so much That I myself was to myself not mine, Valuing of her,--why, she, O, she is fallen Into a pit of ink, that the wide sea Hath drops too few to wash her clean again And salt too little which may season give To her foul-tainted flesh! BENEDICK Sir, sir, be patient. For my part, I am so attired in wonder, I know not what to say. BEATRICE O, on my soul, my cousin is belied! BENEDICK Lady, were you her bedfellow last night? BEATRICE No, truly not; although, until last night, I have this twelvemonth been her bedfellow. LEONATO Confirm'd, confirm'd! O, that is stronger made Which was before barr'd up with ribs of iron! Would the two princes lie, and Claudio lie, Who loved her so, that, speaking of her foulness, Wash'd it with tears? Hence from her! let her die. FRIAR FRANCIS Hear me a little; for I have only been Silent so long and given way unto This course of fortune By noting of the lady. I have mark'd A thousand blushing apparitions To start into her face, a thousand innocent shames In angel whiteness beat away those blushes; And in her eye there hath appear'd a fire, To burn the errors that these princes hold Against her maiden truth. Call me a fool; Trust not my reading nor my observations, Which with experimental seal doth warrant The tenor of my book; trust not my age, My reverence, calling, nor divinity, If this sweet lady lie not guiltless here Under some biting error. LEONATO Friar, it cannot be. Thou seest that all the grace that she hath left Is that she will not add to her damnation A sin of perjury; she not denies it: Why seek'st thou then to cover with excuse That which appears in proper nakedness? FRIAR FRANCIS Lady, what man is he you are accused of? HERO They know that do accuse me; I know none: If I know more of any man alive Than that which maiden modesty doth warrant, Let all my sins lack mercy! O my father, Prove you that any man with me conversed At hours unmeet, or that I yesternight Maintain'd the change of words with any creature, Refuse me, hate me, torture me to death! FRIAR FRANCIS There is some strange misprision in the princes. BENEDICK Two of them have the very bent of honour; And if their wisdoms be misled in this, The practise of it lives in John the bastard, Whose spirits toil in frame of villanies. LEONATO I know not. If they speak but truth of her, These hands shall tear her; if they wrong her honour, The proudest of them shall well hear of it. Time hath not yet so dried this blood of mine, Nor age so eat up my invention, Nor fortune made such havoc of my means, Nor my bad life reft me so much of friends, But they shall find, awaked in such a kind, Both strength of limb and policy of mind, Ability in means and choice of friends, To quit me of them throughly. FRIAR FRANCIS Pause awhile, And let my counsel sway you in this case. Your daughter here the princes left for dead: Let her awhile be secretly kept in, And publish it that she is dead indeed; Maintain a mourning ostentation And on your family's old monument Hang mournful epitaphs and do all rites That appertain unto a burial. LEONATO What shall become of this? what will this do? FRIAR FRANCIS Marry, this well carried shall on her behalf Change slander to remorse; that is some good: But not for that dream I on this strange course, But on this travail look for greater birth. She dying, as it must so be maintain'd, Upon the instant that she was accused, Shall be lamented, pitied and excused Of every hearer: for it so falls out That what we have we prize not to the worth Whiles we enjoy it, but being lack'd and lost, Why, then we rack the value, then we find The virtue that possession would not show us Whiles it was ours. So will it fare with Claudio: When he shall hear she died upon his words, The idea of her life shall sweetly creep Into his study of imagination, And every lovely organ of her life Shall come apparell'd in more precious habit, More moving-delicate and full of life, Into the eye and prospect of his soul, Than when she lived indeed; then shall he mourn, If ever love had interest in his liver, And wish he had not so accused her, No, though he thought his accusation true. Let this be so, and doubt not but success Will fashion the event in better shape Than I can lay it down in likelihood. But if all aim but this be levell'd false, The supposition of the lady's death Will quench the wonder of her infamy: And if it sort not well, you may conceal her, As best befits her wounded reputation, In some reclusive and religious life, Out of all eyes, tongues, minds and injuries. BENEDICK Signior Leonato, let the friar advise you: And though you know my inwardness and love Is very much unto the prince and Claudio, Yet, by mine honour, I will deal in this As secretly and justly as your soul Should with your body. LEONATO Being that I flow in grief, The smallest twine may lead me. FRIAR FRANCIS 'Tis well consented: presently away; For to strange sores strangely they strain the cure. Come, lady, die to live: this wedding-day Perhaps is but prolong'd: have patience and endure. Exeunt all but BENEDICK and BEATRICE BENEDICK Lady Beatrice, have you wept all this while? BEATRICE Yea, and I will weep a while longer. BENEDICK I will not desire that. BEATRICE You have no reason; I do it freely. BENEDICK Surely I do believe your fair cousin is wronged. BEATRICE Ah, how much might the man deserve of me that would right her! BENEDICK Is there any way to show such friendship? BEATRICE A very even way, but no such friend. BENEDICK May a man do it? BEATRICE It is a man's office, but not yours. BENEDICK I do love nothing in the world so well as you: is not that strange? BEATRICE As strange as the thing I know not. It were as possible for me to say I loved nothing so well as you: but believe me not; and yet I lie not; I confess nothing, nor I deny nothing. I am sorry for my cousin. BENEDICK By my sword, Beatrice, thou lovest me. BEATRICE Do not swear, and eat it. BENEDICK I will swear by it that you love me; and I will make him eat it that says I love not you. BEATRICE Will you not eat your word? BENEDICK With no sauce that can be devised to it. I protest I love thee. BEATRICE Why, then, God forgive me! BENEDICK What offence, sweet Beatrice? BEATRICE You have stayed me in a happy hour: I was about to protest I loved you. BENEDICK And do it with all thy heart. BEATRICE I love you with so much of my heart that none is left to protest. BENEDICK Come, bid me do any thing for thee. BEATRICE Kill Claudio. BENEDICK Ha! not for the wide world. BEATRICE You kill me to deny it. Farewell. BENEDICK Tarry, sweet Beatrice. BEATRICE I am gone, though I am here: there is no love in you: nay, I pray you, let me go. BENEDICK Beatrice,-- BEATRICE In faith, I will go. BENEDICK We'll be friends first. BEATRICE You dare easier be friends with me than fight with mine enemy. BENEDICK Is Claudio thine enemy? BEATRICE Is he not approved in the height a villain, that hath slandered, scorned, dishonoured my kinswoman? O that I were a man! What, bear her in hand until they come to take hands; and then, with public accusation, uncovered slander, unmitigated rancour, --O God, that I were a man! I would eat his heart in the market-place. BENEDICK Hear me, Beatrice,-- BEATRICE Talk with a man out at a window! A proper saying! BENEDICK Nay, but, Beatrice,-- BEATRICE Sweet Hero! She is wronged, she is slandered, she is undone. BENEDICK Beat-- BEATRICE Princes and counties! Surely, a princely testimony, a goodly count, Count Comfect; a sweet gallant, surely! O that I were a man for his sake! or that I had any friend would be a man for my sake! But manhood is melted into courtesies, valour into compliment, and men are only turned into tongue, and trim ones too: he is now as valiant as Hercules that only tells a lie and swears it. I cannot be a man with wishing, therefore I will die a woman with grieving. BENEDICK Tarry, good Beatrice. By this hand, I love thee. BEATRICE Use it for my love some other way than swearing by it. BENEDICK Think you in your soul the Count Claudio hath wronged Hero? BEATRICE Yea, as sure as I have a thought or a soul. BENEDICK Enough, I am engaged; I will challenge him. I will kiss your hand, and so I leave you. By this hand, Claudio shall render me a dear account. As you hear of me, so think of me. Go, comfort your cousin: I must say she is dead: and so, farewell. Exeunt SCENE II. A prison. Enter DOGBERRY, VERGES, and Sexton, in gowns; and the Watch, with CONRADE and BORACHIO DOGBERRY Is our whole dissembly appeared? VERGES O, a stool and a cushion for the sexton. Sexton Which be the malefactors? DOGBERRY Marry, that am I and my partner. VERGES Nay, that's certain; we have the exhibition to examine. Sexton But which are the offenders that are to be examined? let them come before master constable. DOGBERRY Yea, marry, let them come before me. What is your name, friend? BORACHIO Borachio. DOGBERRY Pray, write down, Borachio. Yours, sirrah? CONRADE I am a gentleman, sir, and my name is Conrade. DOGBERRY Write down, master gentleman Conrade. Masters, do you serve God? CONRADE BORACHIO Yea, sir, we hope. DOGBERRY Write down, that they hope they serve God: and write God first; for God defend but God should go before such villains! Masters, it is proved already that you are little better than false knaves; and it will go near to be thought so shortly. How answer you for yourselves? CONRADE Marry, sir, we say we are none. DOGBERRY A marvellous witty fellow, I assure you: but I will go about with him. Come you hither, sirrah; a word in your ear: sir, I say to you, it is thought you are false knaves. BORACHIO Sir, I say to you we are none. DOGBERRY Well, stand aside. 'Fore God, they are both in a tale. Have you writ down, that they are none? Sexton Master constable, you go not the way to examine: you must call forth the watch that are their accusers. DOGBERRY Yea, marry, that's the eftest way. Let the watch come forth. Masters, I charge you, in the prince's name, accuse these men. First Watchman This man said, sir, that Don John, the prince's brother, was a villain. DOGBERRY Write down Prince John a villain. Why, this is flat perjury, to call a prince's brother villain. BORACHIO Master constable,-- DOGBERRY Pray thee, fellow, peace: I do not like thy look, I promise thee. Sexton What heard you him say else? Second Watchman Marry, that he had received a thousand ducats of Don John for accusing the Lady Hero wrongfully. DOGBERRY Flat burglary as ever was committed. VERGES Yea, by mass, that it is. Sexton What else, fellow? First Watchman And that Count Claudio did mean, upon his words, to disgrace Hero before the whole assembly. and not marry her. DOGBERRY O villain! thou wilt be condemned into everlasting redemption for this. Sexton What else? Watchman This is all. Sexton And this is more, masters, than you can deny. Prince John is this morning secretly stolen away; Hero was in this manner accused, in this very manner refused, and upon the grief of this suddenly died. Master constable, let these men be bound, and brought to Leonato's: I will go before and show him their examination. Exit DOGBERRY Come, let them be opinioned. VERGES Let them be in the hands-- CONRADE Off, coxcomb! DOGBERRY God's my life, where's the sexton? let him write down the prince's officer coxcomb. Come, bind them. Thou naughty varlet! CONRADE Away! you are an ass, you are an ass. DOGBERRY Dost thou not suspect my place? dost thou not suspect my years? O that he were here to write me down an ass! But, masters, remember that I am an ass; though it be not written down, yet forget not that I am an ass. No, thou villain, thou art full of piety, as shall be proved upon thee by good witness. I am a wise fellow, and, which is more, an officer, and, which is more, a householder, and, which is more, as pretty a piece of flesh as any is in Messina, and one that knows the law, go to; and a rich fellow enough, go to; and a fellow that hath had losses, and one that hath two gowns and every thing handsome about him. Bring him away. O that I had been writ down an ass! Exeunt ACT V SCENE I. Before LEONATO'S house. Enter LEONATO and ANTONIO ANTONIO If you go on thus, you will kill yourself: And 'tis not wisdom thus to second grief Against yourself. LEONATO I pray thee, cease thy counsel, Which falls into mine ears as profitless As water in a sieve: give not me counsel; Nor let no comforter delight mine ear But such a one whose wrongs do suit with mine. Bring me a father that so loved his child, Whose joy of her is overwhelm'd like mine, And bid him speak of patience; Measure his woe the length and breadth of mine And let it answer every strain for strain, As thus for thus and such a grief for such, In every lineament, branch, shape, and form: If such a one will smile and stroke his beard, Bid sorrow wag, cry 'hem!' when he should groan, Patch grief with proverbs, make misfortune drunk With candle-wasters; bring him yet to me, And I of him will gather patience. But there is no such man: for, brother, men Can counsel and speak comfort to that grief Which they themselves not feel; but, tasting it, Their counsel turns to passion, which before Would give preceptial medicine to rage, Fetter strong madness in a silken thread, Charm ache with air and agony with words: No, no; 'tis all men's office to speak patience To those that wring under the load of sorrow, But no man's virtue nor sufficiency To be so moral when he shall endure The like himself. Therefore give me no counsel: My griefs cry louder than advertisement. ANTONIO Therein do men from children nothing differ. LEONATO I pray thee, peace. I will be flesh and blood; For there was never yet philosopher That could endure the toothache patiently, However they have writ the style of gods And made a push at chance and sufferance. ANTONIO Yet bend not all the harm upon yourself; Make those that do offend you suffer too. LEONATO There thou speak'st reason: nay, I will do so. My soul doth tell me Hero is belied; And that shall Claudio know; so shall the prince And all of them that thus dishonour her. ANTONIO Here comes the prince and Claudio hastily. Enter DON PEDRO and CLAUDIO DON PEDRO Good den, good den. CLAUDIO Good day to both of you. LEONATO Hear you. my lords,-- DON PEDRO We have some haste, Leonato. LEONATO Some haste, my lord! well, fare you well, my lord: Are you so hasty now? well, all is one. DON PEDRO Nay, do not quarrel with us, good old man. ANTONIO If he could right himself with quarreling, Some of us would lie low. CLAUDIO Who wrongs him? LEONATO Marry, thou dost wrong me; thou dissembler, thou:-- Nay, never lay thy hand upon thy sword; I fear thee not. CLAUDIO Marry, beshrew my hand, If it should give your age such cause of fear: In faith, my hand meant nothing to my sword. LEONATO Tush, tush, man; never fleer and jest at me: I speak not like a dotard nor a fool, As under privilege of age to brag What I have done being young, or what would do Were I not old. Know, Claudio, to thy head, Thou hast so wrong'd mine innocent child and me That I am forced to lay my reverence by And, with grey hairs and bruise of many days, Do challenge thee to trial of a man. I say thou hast belied mine innocent child; Thy slander hath gone through and through her heart, And she lies buried with her ancestors; O, in a tomb where never scandal slept, Save this of hers, framed by thy villany! CLAUDIO My villany? LEONATO Thine, Claudio; thine, I say. DON PEDRO You say not right, old man. LEONATO My lord, my lord, I'll prove it on his body, if he dare, Despite his nice fence and his active practise, His May of youth and bloom of lustihood. CLAUDIO Away! I will not have to do with you. LEONATO Canst thou so daff me? Thou hast kill'd my child: If thou kill'st me, boy, thou shalt kill a man. ANTONIO He shall kill two of us, and men indeed: But that's no matter; let him kill one first; Win me and wear me; let him answer me. Come, follow me, boy; come, sir boy, come, follow me: Sir boy, I'll whip you from your foining fence; Nay, as I am a gentleman, I will. LEONATO Brother,-- ANTONIO Content yourself. God knows I loved my niece; And she is dead, slander'd to death by villains, That dare as well answer a man indeed As I dare take a serpent by the tongue: Boys, apes, braggarts, Jacks, milksops! LEONATO Brother Antony,-- ANTONIO Hold you content. What, man! I know them, yea, And what they weigh, even to the utmost scruple,-- Scrambling, out-facing, fashion-monging boys, That lie and cog and flout, deprave and slander, Go anticly, show outward hideousness, And speak off half a dozen dangerous words, How they might hurt their enemies, if they durst; And this is all. LEONATO But, brother Antony,-- ANTONIO Come, 'tis no matter: Do not you meddle; let me deal in this. DON PEDRO Gentlemen both, we will not wake your patience. My heart is sorry for your daughter's death: But, on my honour, she was charged with nothing But what was true and very full of proof. LEONATO My lord, my lord,-- DON PEDRO I will not hear you. LEONATO No? Come, brother; away! I will be heard. ANTONIO And shall, or some of us will smart for it. Exeunt LEONATO and ANTONIO DON PEDRO See, see; here comes the man we went to seek. Enter BENEDICK CLAUDIO Now, signior, what news? BENEDICK Good day, my lord. DON PEDRO Welcome, signior: you are almost come to part almost a fray. CLAUDIO We had like to have had our two noses snapped off with two old men without teeth. DON PEDRO Leonato and his brother. What thinkest thou? Had we fought, I doubt we should have been too young for them. BENEDICK In a false quarrel there is no true valour. I came to seek you both. CLAUDIO We have been up and down to seek thee; for we are high-proof melancholy and would fain have it beaten away. Wilt thou use thy wit? BENEDICK It is in my scabbard: shall I draw it? DON PEDRO Dost thou wear thy wit by thy side? CLAUDIO Never any did so, though very many have been beside their wit. I will bid thee draw, as we do the minstrels; draw, to pleasure us. DON PEDRO As I am an honest man, he looks pale. Art thou sick, or angry? CLAUDIO What, courage, man! What though care killed a cat, thou hast mettle enough in thee to kill care. BENEDICK Sir, I shall meet your wit in the career, and you charge it against me. I pray you choose another subject. CLAUDIO Nay, then, give him another staff: this last was broke cross. DON PEDRO By this light, he changes more and more: I think he be angry indeed. CLAUDIO If he be, he knows how to turn his girdle. BENEDICK Shall I speak a word in your ear? CLAUDIO God bless me from a challenge! BENEDICK Aside to CLAUDIO You are a villain; I jest not: I will make it good how you dare, with what you dare, and when you dare. Do me right, or I will protest your cowardice. You have killed a sweet lady, and her death shall fall heavy on you. Let me hear from you. CLAUDIO Well, I will meet you, so I may have good cheer. DON PEDRO What, a feast, a feast? CLAUDIO I' faith, I thank him; he hath bid me to a calf's head and a capon; the which if I do not carve most curiously, say my knife's naught. Shall I not find a woodcock too? BENEDICK Sir, your wit ambles well; it goes easily. DON PEDRO I'll tell thee how Beatrice praised thy wit the other day. I said, thou hadst a fine wit: 'True,' said she, 'a fine little one.' 'No,' said I, 'a great wit:' 'Right,' says she, 'a great gross one.' 'Nay,' said I, 'a good wit:' 'Just,' said she, 'it hurts nobody.' 'Nay,' said I, 'the gentleman is wise:' 'Certain,' said she, 'a wise gentleman.' 'Nay,' said I, 'he hath the tongues:' 'That I believe,' said she, 'for he swore a thing to me on Monday night, which he forswore on Tuesday morning; there's a double tongue; there's two tongues.' Thus did she, an hour together, transshape thy particular virtues: yet at last she concluded with a sigh, thou wast the properest man in Italy. CLAUDIO For the which she wept heartily and said she cared not. DON PEDRO Yea, that she did: but yet, for all that, an if she did not hate him deadly, she would love him dearly: the old man's daughter told us all. CLAUDIO All, all; and, moreover, God saw him when he was hid in the garden. DON PEDRO But when shall we set the savage bull's horns on the sensible Benedick's head? CLAUDIO Yea, and text underneath, 'Here dwells Benedick the married man'? BENEDICK Fare you well, boy: you know my mind. I will leave you now to your gossip-like humour: you break jests as braggarts do their blades, which God be thanked, hurt not. My lord, for your many courtesies I thank you: I must discontinue your company: your brother the bastard is fled from Messina: you have among you killed a sweet and innocent lady. For my Lord Lackbeard there, he and I shall meet: and, till then, peace be with him. Exit DON PEDRO He is in earnest. CLAUDIO In most profound earnest; and, I'll warrant you, for the love of Beatrice. DON PEDRO And hath challenged thee. CLAUDIO Most sincerely. DON PEDRO What a pretty thing man is when he goes in his doublet and hose and leaves off his wit! CLAUDIO He is then a giant to an ape; but then is an ape a doctor to such a man. DON PEDRO But, soft you, let me be: pluck up, my heart, and be sad. Did he not say, my brother was fled? Enter DOGBERRY, VERGES, and the Watch, with CONRADE and BORACHIO DOGBERRY Come you, sir: if justice cannot tame you, she shall ne'er weigh more reasons in her balance: nay, an you be a cursing hypocrite once, you must be looked to. DON PEDRO How now? two of my brother's men bound! Borachio one! CLAUDIO Hearken after their offence, my lord. DON PEDRO Officers, what offence have these men done? DOGBERRY Marry, sir, they have committed false report; moreover, they have spoken untruths; secondarily, they are slanders; sixth and lastly, they have belied a lady; thirdly, they have verified unjust things; and, to conclude, they are lying knaves. DON PEDRO First, I ask thee what they have done; thirdly, I ask thee what's their offence; sixth and lastly, why they are committed; and, to conclude, what you lay to their charge. CLAUDIO Rightly reasoned, and in his own division: and, by my troth, there's one meaning well suited. DON PEDRO Who have you offended, masters, that you are thus bound to your answer? this learned constable is too cunning to be understood: what's your offence? BORACHIO Sweet prince, let me go no farther to mine answer: do you hear me, and let this count kill me. I have deceived even your very eyes: what your wisdoms could not discover, these shallow fools have brought to light: who in the night overheard me confessing to this man how Don John your brother incensed me to slander the Lady Hero, how you were brought into the orchard and saw me court Margaret in Hero's garments, how you disgraced her, when you should marry her: my villany they have upon record; which I had rather seal with my death than repeat over to my shame. The lady is dead upon mine and my master's false accusation; and, briefly, I desire nothing but the reward of a villain. DON PEDRO Runs not this speech like iron through your blood? CLAUDIO I have drunk poison whiles he utter'd it. DON PEDRO But did my brother set thee on to this? BORACHIO Yea, and paid me richly for the practise of it. DON PEDRO He is composed and framed of treachery: And fled he is upon this villany. CLAUDIO Sweet Hero! now thy image doth appear In the rare semblance that I loved it first. DOGBERRY Come, bring away the plaintiffs: by this time our sexton hath reformed Signior Leonato of the matter: and, masters, do not forget to specify, when time and place shall serve, that I am an ass. VERGES Here, here comes master Signior Leonato, and the Sexton too. Re-enter LEONATO and ANTONIO, with the Sexton LEONATO Which is the villain? let me see his eyes, That, when I note another man like him, I may avoid him: which of these is he? BORACHIO If you would know your wronger, look on me. LEONATO Art thou the slave that with thy breath hast kill'd Mine innocent child? BORACHIO Yea, even I alone. LEONATO No, not so, villain; thou beliest thyself: Here stand a pair of honourable men; A third is fled, that had a hand in it. I thank you, princes, for my daughter's death: Record it with your high and worthy deeds: 'Twas bravely done, if you bethink you of it. CLAUDIO I know not how to pray your patience; Yet I must speak. Choose your revenge yourself; Impose me to what penance your invention Can lay upon my sin: yet sinn'd I not But in mistaking. DON PEDRO By my soul, nor I: And yet, to satisfy this good old man, I would bend under any heavy weight That he'll enjoin me to. LEONATO I cannot bid you bid my daughter live; That were impossible: but, I pray you both, Possess the people in Messina here How innocent she died; and if your love Can labour ought in sad invention, Hang her an epitaph upon her tomb And sing it to her bones, sing it to-night: To-morrow morning come you to my house, And since you could not be my son-in-law, Be yet my nephew: my brother hath a daughter, Almost the copy of my child that's dead, And she alone is heir to both of us: Give her the right you should have given her cousin, And so dies my revenge. CLAUDIO O noble sir, Your over-kindness doth wring tears from me! I do embrace your offer; and dispose For henceforth of poor Claudio. LEONATO To-morrow then I will expect your coming; To-night I take my leave. This naughty man Shall face to face be brought to Margaret, Who I believe was pack'd in all this wrong, Hired to it by your brother. BORACHIO No, by my soul, she was not, Nor knew not what she did when she spoke to me, But always hath been just and virtuous In any thing that I do know by her. DOGBERRY Moreover, sir, which indeed is not under white and black, this plaintiff here, the offender, did call me ass: I beseech you, let it be remembered in his punishment. And also, the watch heard them talk of one Deformed: they say be wears a key in his ear and a lock hanging by it, and borrows money in God's name, the which he hath used so long and never paid that now men grow hard-hearted and will lend nothing for God's sake: pray you, examine him upon that point. LEONATO I thank thee for thy care and honest pains. DOGBERRY Your worship speaks like a most thankful and reverend youth; and I praise God for you. LEONATO There's for thy pains. DOGBERRY God save the foundation! LEONATO Go, I discharge thee of thy prisoner, and I thank thee. DOGBERRY I leave an arrant knave with your worship; which I beseech your worship to correct yourself, for the example of others. God keep your worship! I wish your worship well; God restore you to health! I humbly give you leave to depart; and if a merry meeting may be wished, God prohibit it! Come, neighbour. Exeunt DOGBERRY and VERGES LEONATO Until to-morrow morning, lords, farewell. ANTONIO Farewell, my lords: we look for you to-morrow. DON PEDRO We will not fail. CLAUDIO To-night I'll mourn with Hero. LEONATO To the Watch Bring you these fellows on. We'll talk with Margaret, How her acquaintance grew with this lewd fellow. Exeunt, severally SCENE II. LEONATO'S garden. Enter BENEDICK and MARGARET, meeting BENEDICK Pray thee, sweet Mistress Margaret, deserve well at my hands by helping me to the speech of Beatrice. MARGARET Will you then write me a sonnet in praise of my beauty? BENEDICK In so high a style, Margaret, that no man living shall come over it; for, in most comely truth, thou deservest it. MARGARET To have no man come over me! why, shall I always keep below stairs? BENEDICK Thy wit is as quick as the greyhound's mouth; it catches. MARGARET And yours as blunt as the fencer's foils, which hit, but hurt not. BENEDICK A most manly wit, Margaret; it will not hurt a woman: and so, I pray thee, call Beatrice: I give thee the bucklers. MARGARET Give us the swords; we have bucklers of our own. BENEDICK If you use them, Margaret, you must put in the pikes with a vice; and they are dangerous weapons for maids. MARGARET Well, I will call Beatrice to you, who I think hath legs. BENEDICK And therefore will come. Exit MARGARET Sings The god of love, That sits above, And knows me, and knows me, How pitiful I deserve,-- I mean in singing; but in loving, Leander the good swimmer, Troilus the first employer of panders, and a whole bookful of these quondam carpet-mangers, whose names yet run smoothly in the even road of a blank verse, why, they were never so truly turned over and over as my poor self in love. Marry, I cannot show it in rhyme; I have tried: I can find out no rhyme to 'lady' but 'baby,' an innocent rhyme; for 'scorn,' 'horn,' a hard rhyme; for, 'school,' 'fool,' a babbling rhyme; very ominous endings: no, I was not born under a rhyming planet, nor I cannot woo in festival terms. Enter BEATRICE Sweet Beatrice, wouldst thou come when I called thee? BEATRICE Yea, signior, and depart when you bid me. BENEDICK O, stay but till then! BEATRICE 'Then' is spoken; fare you well now: and yet, ere I go, let me go with that I came; which is, with knowing what hath passed between you and Claudio. BENEDICK Only foul words; and thereupon I will kiss thee. BEATRICE Foul words is but foul wind, and foul wind is but foul breath, and foul breath is noisome; therefore I will depart unkissed. BENEDICK Thou hast frighted the word out of his right sense, so forcible is thy wit. But I must tell thee plainly, Claudio undergoes my challenge; and either I must shortly hear from him, or I will subscribe him a coward. And, I pray thee now, tell me for which of my bad parts didst thou first fall in love with me? BEATRICE For them all together; which maintained so politic a state of evil that they will not admit any good part to intermingle with them. But for which of my good parts did you first suffer love for me? BENEDICK Suffer love! a good epithet! I do suffer love indeed, for I love thee against my will. BEATRICE In spite of your heart, I think; alas, poor heart! If you spite it for my sake, I will spite it for yours; for I will never love that which my friend hates. BENEDICK Thou and I are too wise to woo peaceably. BEATRICE It appears not in this confession: there's not one wise man among twenty that will praise himself. BENEDICK An old, an old instance, Beatrice, that lived in the lime of good neighbours. If a man do not erect in this age his own tomb ere he dies, he shall live no longer in monument than the bell rings and the widow weeps. BEATRICE And how long is that, think you? BENEDICK Question: why, an hour in clamour and a quarter in rheum: therefore is it most expedient for the wise, if Don Worm, his conscience, find no impediment to the contrary, to be the trumpet of his own virtues, as I am to myself. So much for praising myself, who, I myself will bear witness, is praiseworthy: and now tell me, how doth your cousin? BEATRICE Very ill. BENEDICK And how do you? BEATRICE Very ill too. BENEDICK Serve God, love me and mend. There will I leave you too, for here comes one in haste. Enter URSULA URSULA Madam, you must come to your uncle. Yonder's old coil at home: it is proved my Lady Hero hath been falsely accused, the prince and Claudio mightily abused; and Don John is the author of all, who is fed and gone. Will you come presently? BEATRICE Will you go hear this news, signior? BENEDICK I will live in thy heart, die in thy lap, and be buried in thy eyes; and moreover I will go with thee to thy uncle's. Exeunt SCENE III. A church. Enter DON PEDRO, CLAUDIO, and three or four with tapers CLAUDIO Is this the monument of Leonato? Lord It is, my lord. CLAUDIO Reading out of a scroll Done to death by slanderous tongues Was the Hero that here lies: Death, in guerdon of her wrongs, Gives her fame which never dies. So the life that died with shame Lives in death with glorious fame. Hang thou there upon the tomb, Praising her when I am dumb. Now, music, sound, and sing your solemn hymn. SONG. Pardon, goddess of the night, Those that slew thy virgin knight; For the which, with songs of woe, Round about her tomb they go. Midnight, assist our moan; Help us to sigh and groan, Heavily, heavily: Graves, yawn and yield your dead, Till death be uttered, Heavily, heavily. CLAUDIO Now, unto thy bones good night! Yearly will I do this rite. DON PEDRO Good morrow, masters; put your torches out: The wolves have prey'd; and look, the gentle day, Before the wheels of Phoebus, round about Dapples the drowsy east with spots of grey. Thanks to you all, and leave us: fare you well. CLAUDIO Good morrow, masters: each his several way. DON PEDRO Come, let us hence, and put on other weeds; And then to Leonato's we will go. CLAUDIO And Hymen now with luckier issue speed's Than this for whom we render'd up this woe. Exeunt SCENE IV. A room in LEONATO'S house. Enter LEONATO, ANTONIO, BENEDICK, BEATRICE, MARGARET, URSULA, FRIAR FRANCIS, and HERO FRIAR FRANCIS Did I not tell you she was innocent? LEONATO So are the prince and Claudio, who accused her Upon the error that you heard debated: But Margaret was in some fault for this, Although against her will, as it appears In the true course of all the question. ANTONIO Well, I am glad that all things sort so well. BENEDICK And so am I, being else by faith enforced To call young Claudio to a reckoning for it. LEONATO Well, daughter, and you gentle-women all, Withdraw into a chamber by yourselves, And when I send for you, come hither mask'd. Exeunt Ladies The prince and Claudio promised by this hour To visit me. You know your office, brother: You must be father to your brother's daughter And give her to young Claudio. ANTONIO Which I will do with confirm'd countenance. BENEDICK Friar, I must entreat your pains, I think. FRIAR FRANCIS To do what, signior? BENEDICK To bind me, or undo me; one of them. Signior Leonato, truth it is, good signior, Your niece regards me with an eye of favour. LEONATO That eye my daughter lent her: 'tis most true. BENEDICK And I do with an eye of love requite her. LEONATO The sight whereof I think you had from me, From Claudio and the prince: but what's your will? BENEDICK Your answer, sir, is enigmatical: But, for my will, my will is your good will May stand with ours, this day to be conjoin'd In the state of honourable marriage: In which, good friar, I shall desire your help. LEONATO My heart is with your liking. FRIAR FRANCIS And my help. Here comes the prince and Claudio. Enter DON PEDRO and CLAUDIO, and two or three others DON PEDRO Good morrow to this fair assembly. LEONATO Good morrow, prince; good morrow, Claudio: We here attend you. Are you yet determined To-day to marry with my brother's daughter? CLAUDIO I'll hold my mind, were she an Ethiope. LEONATO Call her forth, brother; here's the friar ready. Exit ANTONIO DON PEDRO Good morrow, Benedick. Why, what's the matter, That you have such a February face, So full of frost, of storm and cloudiness? CLAUDIO I think he thinks upon the savage bull. Tush, fear not, man; we'll tip thy horns with gold And all Europa shall rejoice at thee, As once Europa did at lusty Jove, When he would play the noble beast in love. BENEDICK Bull Jove, sir, had an amiable low; And some such strange bull leap'd your father's cow, And got a calf in that same noble feat Much like to you, for you have just his bleat. CLAUDIO For this I owe you: here comes other reckonings. Re-enter ANTONIO, with the Ladies masked Which is the lady I must seize upon? ANTONIO This same is she, and I do give you her. CLAUDIO Why, then she's mine. Sweet, let me see your face. LEONATO No, that you shall not, till you take her hand Before this friar and swear to marry her. CLAUDIO Give me your hand: before this holy friar, I am your husband, if you like of me. HERO And when I lived, I was your other wife: Unmasking And when you loved, you were my other husband. CLAUDIO Another Hero! HERO Nothing certainer: One Hero died defiled, but I do live, And surely as I live, I am a maid. DON PEDRO The former Hero! Hero that is dead! LEONATO She died, my lord, but whiles her slander lived. FRIAR FRANCIS All this amazement can I qualify: When after that the holy rites are ended, I'll tell you largely of fair Hero's death: Meantime let wonder seem familiar, And to the chapel let us presently. BENEDICK Soft and fair, friar. Which is Beatrice? BEATRICE Unmasking I answer to that name. What is your will? BENEDICK Do not you love me? BEATRICE Why, no; no more than reason. BENEDICK Why, then your uncle and the prince and Claudio Have been deceived; they swore you did. BEATRICE Do not you love me? BENEDICK Troth, no; no more than reason. BEATRICE Why, then my cousin Margaret and Ursula Are much deceived; for they did swear you did. BENEDICK They swore that you were almost sick for me. BEATRICE They swore that you were well-nigh dead for me. BENEDICK 'Tis no such matter. Then you do not love me? BEATRICE No, truly, but in friendly recompense. LEONATO Come, cousin, I am sure you love the gentleman. CLAUDIO And I'll be sworn upon't that he loves her; For here's a paper written in his hand, A halting sonnet of his own pure brain, Fashion'd to Beatrice. HERO And here's another Writ in my cousin's hand, stolen from her pocket, Containing her affection unto Benedick. BENEDICK A miracle! here's our own hands against our hearts. Come, I will have thee; but, by this light, I take thee for pity. BEATRICE I would not deny you; but, by this good day, I yield upon great persuasion; and partly to save your life, for I was told you were in a consumption. BENEDICK Peace! I will stop your mouth. Kissing her DON PEDRO How dost thou, Benedick, the married man? BENEDICK I'll tell thee what, prince; a college of wit-crackers cannot flout me out of my humour. Dost thou think I care for a satire or an epigram? No: if a man will be beaten with brains, a' shall wear nothing handsome about him. In brief, since I do purpose to marry, I will think nothing to any purpose that the world can say against it; and therefore never flout at me for what I have said against it; for man is a giddy thing, and this is my conclusion. For thy part, Claudio, I did think to have beaten thee, but in that thou art like to be my kinsman, live unbruised and love my cousin. CLAUDIO I had well hoped thou wouldst have denied Beatrice, that I might have cudgelled thee out of thy single life, to make thee a double-dealer; which, out of question, thou wilt be, if my cousin do not look exceedingly narrowly to thee. BENEDICK Come, come, we are friends: let's have a dance ere we are married, that we may lighten our own hearts and our wives' heels. LEONATO We'll have dancing afterward. BENEDICK First, of my word; therefore play, music. Prince, thou art sad; get thee a wife, get thee a wife: there is no staff more reverend than one tipped with horn. Enter a Messenger Messenger My lord, your brother John is ta'en in flight, And brought with armed men back to Messina. BENEDICK Think not on him till to-morrow: I'll devise thee brave punishments for him. Strike up, pipers. Dance Exeunt
axiom-1.2.8/modules/axiom-tests/test-resources/xml/defaultNamespace.xml0000644000000000000000000000013411131637476025043 0ustar rootroot Hello axiom-1.2.8/modules/axiom-tests/test-resources/xml/dtd.xml0000644000000000000000000000025511131637476022361 0ustar rootroot ]> axiom-1.2.8/modules/axiom-tests/test-resources/xml/original.xml0000644000000000000000000000373411131637476023417 0ustar rootroot tungsten tungsten_db 1.0 rar org.apache.derby derby 10.1.1.0 jar javax.sql.DataSource tungsten_db tungsten org.apache.derby.jdbc.EmbeddedDriver tungsten jdbc:derby:@tungsten_home@/database/TUNGSTEN_DB 50 1 axiom-1.2.8/modules/axiom-tests/test-resources/xml/moreover.xml0000644000000000000000000002706411131637476023453 0ustar rootroot
http://c.moreover.com/click/here.pl?x13563273 e-Commerce Operators Present Version 1.0 of the XML Standard StockAccess text moreover... http://www.stockaccess.com/index.html Dec 24 2000 6:28AM
http://c.moreover.com/click/here.pl?x13560995 W3C Publishes XML Protocol Requirements Document Xml text moreover... http://www.xml.com/ Dec 24 2000 12:22AM
http://c.moreover.com/click/here.pl?x13553521 Prowler: Open Source XML-Based Content Management Framework Xml text moreover... http://www.xml.com/ Dec 23 2000 2:05PM
http://c.moreover.com/click/here.pl?x13549013 The Middleware Company Debuts Public Training Courses in Ejb, J2ee And Xml Java Industry Connection text moreover... http://industry.java.sun.com/javanews/more/hotnews/ Dec 23 2000 12:15PM
http://c.moreover.com/click/here.pl?x13544467 Revised Working Draft for the W3C XML Information Set Xml text moreover... http://www.xml.com/ Dec 23 2000 5:50AM
http://c.moreover.com/click/here.pl?x13534836 XML: Its The Great Peacemaker ZDNet text moreover... http://www.zdnet.com/intweek/ Dec 22 2000 9:05PM
http://c.moreover.com/click/here.pl?x13533485 Project eL - The XML Leningrad Codex Markup Project Xml text moreover... http://www.xml.com/ Dec 22 2000 8:34PM
http://c.moreover.com/click/here.pl?x13533488 XML Linking Language (XLink) and XML Base Specifications Issued as W3C Proposed Recommenda Xml text moreover... http://www.xml.com/ Dec 22 2000 8:34PM
http://c.moreover.com/click/here.pl?x13533492 W3C Releases XHTML Basic Specification as a W3C Recommendation Xml text moreover... http://www.xml.com/ Dec 22 2000 8:34PM
http://c.moreover.com/click/here.pl?x13521827 Java, Xml And Oracle9i(TM) Make A Great Team Java Industry Connection text moreover... http://industry.java.sun.com/javanews/more/hotnews/ Dec 22 2000 3:21PM
http://c.moreover.com/click/here.pl?x13511233 Competing initiatives to vie for security standard ZDNet text moreover... http://www.zdnet.com/eweek/filters/news/ Dec 22 2000 10:54AM
http://c.moreover.com/click/here.pl?x13492397 Oracle Provides Developers with Great Xml Reading This Holiday Season Java Industry Connection text moreover... http://industry.java.sun.com/javanews/more/hotnews/ Dec 21 2000 8:08PM
http://c.moreover.com/click/here.pl?x13491292 XML as the great peacemaker - Extensible Markup Language Accomplished The Seemingly Impossible This Year: It B Hospitality Net text moreover... http://www.hospitalitynet.org/news/list.htm?c=2000 Dec 21 2000 7:45PM
http://c.moreover.com/click/here.pl?x13484758 XML as the great peacemaker CNET text moreover... http://news.cnet.com/news/0-1003.html?tag=st.ne.1002.dir.1003 Dec 21 2000 4:41PM
http://c.moreover.com/click/here.pl?x13480896 COOP Switzerland Selects Mercator as Integration Platform Stockhouse Canada text moreover... http://www.stockhouse.ca/news/ Dec 21 2000 1:55PM
http://c.moreover.com/click/here.pl?x13471023 Competing XML Specs Move Toward a Union Internet World text moreover... http://www.internetworld.com/ Dec 21 2000 11:14AM
http://c.moreover.com/click/here.pl?x13452280 Next-generation XHTML stripped down for handhelds CNET text moreover... http://news.cnet.com/news/0-1005.html?tag=st.ne.1002.dir.1005 Dec 20 2000 9:11PM
http://c.moreover.com/click/here.pl?x13451789 Xml Powers Oracle9i(TM) Dynamic Services Java Industry Connection text moreover... http://industry.java.sun.com/javanews/more/hotnews/ Dec 20 2000 9:05PM
http://c.moreover.com/click/here.pl?x13442097 XML DOM reference guide ASPWire text moreover... http://aspwire.com/ Dec 20 2000 6:26PM
http://c.moreover.com/click/here.pl?x13424117 Repeat/Xqsite And Bowstreet Team to Deliver Integrated Xml Solutions Java Industry Connection text moreover... http://industry.java.sun.com/javanews/more/hotnews/ Dec 20 2000 9:04AM
axiom-1.2.8/modules/axiom-tests/test-resources/xml/pi2.xml0000644000000000000000000000012011131637476022267 0ustar rootroot foo bar axiom-1.2.8/modules/axiom-tests/test-resources/xml/jaxen3.xml0000644000000000000000000000051211131637476022772 0ustar rootroot 2 CE-A 1 CE-B axiom-1.2.8/modules/axiom-tests/test-resources/xml/message.xml0000644000000000000000000000107111131637476023227 0ustar rootroot
lookupformservice 9 stammdaten new
iteminfo ELE parentinfo Pruefgebiete id 1
axiom-1.2.8/modules/axiom-tests/test-resources/xml/fibo.xml0000644000000000000000000000212111131637476022517 0ustar rootroot 0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 axiom-1.2.8/modules/axiom-tests/test-resources/xml/simple.xml0000644000000000000000000000010311131637476023067 0ustar rootroot abdaxiom-1.2.8/modules/axiom-tests/test-resources/xml/lang.xml0000644000000000000000000000024111131637476022522 0ustar rootroot axiom-1.2.8/modules/axiom-tests/test-resources/xml/spaces.xml0000644000000000000000000000023611131637476023063 0ustar rootroot baz baz baz ]]> axiom-1.2.8/modules/axiom-tests/test-resources/xml/underscore.xml0000644000000000000000000000011611131637476023753 0ustar rootroot 1 <_b>2 axiom-1.2.8/modules/axiom-tests/test-resources/xml/namespaces.xml0000644000000000000000000000047311131637476023727 0ustar rootroot Hello Hey Hey2 Hey3 axiom-1.2.8/modules/axiom-tests/test-resources/xml/defaultNamespace2.xml0000644000000000000000000000373411131637476025136 0ustar rootroot tungsten tungsten_db 1.0 rar org.apache.derby derby 10.1.1.0 jar javax.sql.DataSource tungsten_db tungsten org.apache.derby.jdbc.EmbeddedDriver tungsten jdbc:derby:@tungsten_home@/database/TUNGSTEN_DB 50 1 axiom-1.2.8/modules/axiom-tests/test-resources/xml/text.xml0000644000000000000000000000014311131637476022566 0ustar rootroot baz baz baz axiom-1.2.8/modules/axiom-tests/test-resources/xml/web_w_dtd.xml0000644000000000000000000000171411131637476023545 0ustar rootroot snoop SnoopServlet file ViewFile initial 1000 The initial value for the counter mv *.wm manager director president axiom-1.2.8/modules/axiom-tests/test-resources/xml/contents.xml0000644000000000000000000000500011131637476023434 0ustar rootroot Java and XML Introduction What Is It? How Do I Use It? Why Should I Use It? What's Next? Creating XML An XML Document The Header The Content What's Next? Parsing XML Getting Prepared SAX Readers Content Handlers Error Handlers A Better Way to Load a Parser "Gotcha!" What's Next? Web Publishing Frameworks Selecting a Framework Installation Using a Publishing Framework XSP Cocoon 2.0 and Beyond What's Next? axiom-1.2.8/modules/axiom-tests/test-resources/xml/nitf.xml0000644000000000000000000000575111131637476022554 0ustar rootroot Use of Napster Quadruples By PETER SVENSSON AP Business Writer The Associated Press NEW YORK

Despite the uncertain legality of the Napster online music-sharing service, the number of people using it more than quadrupled in just five months, Media Metrix said Monday.

That made Napster the fastest-growing software application ever recorded by the Internet research company.

From 1.1 million home users in the United States in February, the first month Media Metrix tracked the application, Napster use rocketed to 4.9 million users in July.

That represents 6 percent of U.S. home PC users who have modems, said Media Metrix, which pays people to install monitoring software on their computers.

It estimates total usage from a panel of about 50,000 people in the United States.

Napster was also used at work by 887,000 people in July, Media Metrix said.

Napster Inc. has been sued by the recording industry for allegedly enabling copyright infringement. The federal government weighed in on the case Friday, saying the service is not protected under a key copyright law, as the San Mateo, Calif., company claims.

Bruce Ryon, head of Media Metrix's New Media Group, said Napster was used by "the full spectrum of PC users, not just the youth with time on their hands and a passion for music."

The Napster program allows users to copy digital music files from the hard drives of other users over the Internet.

Napster Inc. said last week that 28 million people had downloaded its program. It does not reveal its own figures for how many people actually use the software.

Because the program connects to the company's computers over the Internet every time it is run, Napster Inc. can track usage exactly.

__

On the Net:

http://www.napster.com

http://www.mediametrix.com

axiom-1.2.8/modules/axiom-tests/test-resources/xml/test/0000755000000000000000000000000011131637476022041 5ustar rootrootaxiom-1.2.8/modules/axiom-tests/test-resources/xml/test/tests.xsl0000644000000000000000000003371111131637476023740 0ustar rootroot axiom-1.2.8/modules/axiom-tests/test-resources/xml/test/tests.xml0000644000000000000000000006503411131637476023735 0ustar rootroot span abd abd a d 1 2 1 2 true true true true true true true true true true true true 0 1 3 false false false false true true order-by="x" foo order-by="x" foobar is tasty true true false true true false a.2 a.1 a.4 a.5 snoop snoop file file snoop snoop web-app web-app web-app web-app web-app web-app web-app web-app web-app web-app web-app web-app web-app web-app web-app web-app web-app web-app web-app http://c.moreover.com/click/here.pl?x13563273 http://c.moreover.com/click/here.pl?x13563273 http://c.moreover.com/click/here.pl?x13563273 http://c.moreover.com/click/here.pl?x13563273 http://c.moreover.com/click/here.pl?x13563273 http://c.moreover.com/click/here.pl?x13563273 196417 325 1 75025 46368 2 2 Much Ado about Nothing 4 21 5 35 75 646 142 2 1 3 1 6 5 snoop snoop snoop 3foo3 3snoop3 Pruefgebiete Pruefgebiete ab ba ba db abcd abcd abcd dcba ab cd xy abcd abcd 234 12 12345 345 12345 abc a b c a b c SNOOPSERVLET snoopservlet SNOOPSERVLET SNOOPSERVLET SNOOPSERVLET true false Hello Hey Hey3 Hey3 Hey3 baz axiom-1.2.8/modules/axiom-tests/test-resources/xml/web.xml0000644000000000000000000000151711131637476022365 0ustar rootroot snoop SnoopServlet file ViewFile initial 1000 The initial value for the counter mv *.wm manager director president axiom-1.2.8/modules/axiom-tests/test-resources/xml/id.xml0000644000000000000000000000057511131637476022207 0ustar rootroot ]> baz gouda baz cheddar baz axiom-1.2.8/modules/axiom-tests/test-resources/xml/jaxen24.xml0000644000000000000000000000013211131637476023053 0ustar rootroot

axiom-1.2.8/modules/axiom-tests/test-resources/xml/pi.xml0000644000000000000000000000024411131637476022214 0ustar rootroot axiom-1.2.8/modules/axiom-tests/test-resources/xml/testNamespaces.xml0000644000000000000000000000103211131637476024557 0ustar rootroot axiom-1.2.8/modules/axiom-tests/test-resources/xml/axis.xml0000644000000000000000000000033511131637476022551 0ustar rootroot axiom-1.2.8/modules/axiom-tests/test-resources/xml/basicupdate.xml0000644000000000000000000000220211131637476024064 0ustar rootroot Goudse kaas Rond More cheese! Even more cheese! No sausages today axiom-1.2.8/modules/axiom-tests/test-resources/binary/0000755000000000000000000000000011131637476021546 5ustar rootrootaxiom-1.2.8/modules/axiom-tests/test-resources/badsoap/0000755000000000000000000000000011131637476021673 5ustar rootrootaxiom-1.2.8/modules/axiom-tests/test-resources/badsoap/bodyNotQualified.xml0000644000000000000000000000322211131637476025656 0ustar rootroot uuid:920C5190-0B8F-11D9-8CED-F22EDEEBF7E5 http://localhost:8081/axis/services/BankPort
http://schemas.xmlsoap.org/ws/2004/03/addressing/role/anonymous
axiom-1.2.8/modules/axiom-tests/test-resources/badsoap/twoBodymessage.xml0000644000000000000000000000352311131637476025414 0ustar rootroot uuid:920C5190-0B8F-11D9-8CED-F22EDEEBF7E5 http://localhost:8081/axis/services/BankPort
http://schemas.xmlsoap.org/ws/2004/03/addressing/role/anonymous
axiom-1.2.8/modules/axiom-tests/test-resources/badsoap/envelopeMissing.xml0000644000000000000000000000331011131637476025561 0ustar rootroot uuid:920C5190-0B8F-11D9-8CED-F22EDEEBF7E5 http://localhost:8081/axis/services/BankPort
http://schemas.xmlsoap.org/ws/2004/03/addressing/role/anonymous
axiom-1.2.8/modules/axiom-tests/test-resources/badsoap/wrongSoapNs.xml0000644000000000000000000000332311131637476024676 0ustar rootroot uuid:920C5190-0B8F-11D9-8CED-F22EDEEBF7E5 http://localhost:8081/axis/services/BankPort
http://schemas.xmlsoap.org/ws/2004/03/addressing/role/anonymous
axiom-1.2.8/modules/axiom-tests/test-resources/badsoap/notnamespaceQualified.xml0000644000000000000000000000240211131637476026714 0ustar rootroot
uuid:920C5190-0B8F-11D9-8CED-F22EDEEBF7E5 http://localhost:8081/axis/services/BankPort
http://schemas.xmlsoap.org/ws/2004/03/addressing/role/anonymous
axiom-1.2.8/modules/axiom-tests/test-resources/badsoap/twoheaders.xml0000644000000000000000000000417611131637476024572 0ustar rootroot uuid:920C5190-0B8F-11D9-8CED-F22EDEEBF7E5 http://localhost:8081/axis/services/BankPort
http://schemas.xmlsoap.org/ws/2004/03/addressing/role/anonymous
uuid:920C5190-0B8F-11D9-8CED-F22EDEEBF7E5 http://localhost:8081/axis/services/BankPort
http://schemas.xmlsoap.org/ws/2004/03/addressing/role/anonymous
axiom-1.2.8/modules/axiom-tests/test-resources/badsoap/haederBodyWrongOrder.xml0000644000000000000000000000332011131637476026472 0ustar rootroot uuid:920C5190-0B8F-11D9-8CED-F22EDEEBF7E5 http://localhost:8081/axis/services/BankPort
http://schemas.xmlsoap.org/ws/2004/03/addressing/role/anonymous
axiom-1.2.8/modules/axiom-tests/test-resources/mtom/0000755000000000000000000000000011131637500021222 5ustar rootrootaxiom-1.2.8/modules/axiom-tests/test-resources/mtom/MTOMBuilderTestIn.txt0000644000000000000000000000115611131637500025200 0ustar rootroot------=_AxIs2_Def_boundary_=42214532 Content-Type: application/xop+xml Content-Transfer-Encoding: 8bit Content-ID: SOAPPart ------=_AxIs2_Def_boundary_=42214532 Content-Transfer-Encoding: binary Content-ID: -1609420109260943731 8A ???b ------=_AxIs2_Def_boundary_=42214532--axiom-1.2.8/modules/axiom-tests/test-resources/mtom/ImageMTOMOut.bin0000644000000000000000000022775111131637500024141 0ustar rootroot------=_AxIs2_Def_boundary_=42214532 Content-Type: application/xop+xml Content-Transfer-Encoding: 8bit Content-ID: ------=_AxIs2_Def_boundary_=42214532 Content-Transfer-Encoding: binary Content-ID: -4737226364955758283 ÿØÿàJFIFÿÛC    $.' ",#(7),01444'9=82<.342ÿÛC  2!!22222222222222222222222222222222222222222222222222ÿÀX "ÿÄ ÿĵ}!1AQa"q2‘¡#B±ÁRÑð$3br‚ %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyzƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖרÙÚáâãäåæçèéêñòóôõö÷øùúÿÄ ÿĵw!1AQaq"2B‘¡±Á #3RðbrÑ $4á%ñ&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz‚ƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖרÙÚâãäåæçèéêòóôõö÷øùúÿÚ ?Ê×ïå‡JlÜíÈû»¹5ä·s¼Ì|ùO÷jøTšîñп˞•ƒ^v_†ö4îú¾„ŸhŸþ{Éÿ}>Ñ?ü÷“þú5ÞA'Ú'ÿžòßF´Oÿ=äÿ¾GEKö™ÿ缟÷ѤûDÿóÞOûèÔtP¿iŸþ{Éÿ}_´Oÿ=äÿ¾CEMö™ÿ缟÷Ñ­}#ÄlªûÙ‡»¢¦tãR.2@z]§ÒEÄŒËZVþ)‚å¶$ø?ïW’S¢¸x]]¼Ú™U'~]d{m½äÓßUn7•¹.ØôÜkÉ#ñeìQ,jý*õ§Ž/!eó~a^uLª®¶)êžc&píÿ}Tq+{|ÕÈÅã[y‘Dœõ¯m«Û\¨1ʦ¸e„«KãD´Í_5Ûq27ýõM£c{Ú¦@ë*çµ,˜ ¸æ°}„M¾WÇï[黚sÈá~ûßF¡‰÷sº¬8};T6îZ+I,…xvÿ¾©±<›xvÿ¾©²€>”Ø$ÜØý:Õë`'̧þZ0ã?z˜ï*ÿøYåx¬ÝCQ±²OßN¹‡ZºTå7d‰Ô².Û¡fF5OWÒ#ÔíŽéÚ6üWªxÓçd´\{÷®nã_Ô'nga^ž-¯u4ùKHv©gu¦Ü4få˜v!ÍT‚[·|G,Ÿ÷Ѧ &»Þ;5v&—ÀOZöjÖti®wv6ìcÃi©ÍŒÏ&;üÆ»ý8í¬•äó;üÆ™¢Æ¸ SGÍÇZñ1X§Z<»7sHÎw.°;n4 †-÷Û뺪Ü6_J0Y³·ŽÕçÛÌ ¼»A'?í|R³.77ýôi#;•QûT€ |›xéF«F"¯"V?ð#P‹™9]ì?àF¦–FVÁè:Tµ›Ž´&ÀkË>Üïlö©ðHí´onO÷©$ÎÞ9â›m&Ù°}kU+n4nù#æoûêªyìÍíÿ}Sç-·ï}>ZÍpû²úÎ.ô‹Ï+lÉ‘¿ï£YòO.î¸?Þ£d»ríùÓ,¼V²›c%Ì¥w—lö»SÝä–OûèÐ#˜tÅ)‹åÏO­EÀ.'doûèÑ,2,Üÿ´j_(ÿvœmùN´¹º”q÷þºººÌ2ÈçïÅÕü=©éIædhýCõ!òýÚIà–æ)c܊TƒWØ|çˆ}¢ùë'ýôi|ëùë'ýôk¤Ö4x´ÝE£e±â„Ó¢eÈ^+Ýúä\T–Å:–9Ñ%Ót–oûèÖÖ‘¡_êM“s$kþñ­H´øG!kVÜ”L'¹ªãšøQ¨í¡™'…Ú·’}æ«I¡°\Íÿ}è\±^y :§ðô®?®Un÷2RŸs–:Él%ÄŸ÷Ù¨dÐõ$û’ÈàFº×áqBHýUkUí&pSÛê0}ö›þú5TÏr½e˜ÀzCìvâ‘ïU§Ò¬n•¿uŠèŽ`¾Òªú£ÏþÓqÿ=äÿ¾MíÊ̇ϓƒýã]5ß„U×}»û\åî•s`ø‘½u½:ªÉšÆ¢}OTÐ5f{÷»ÇñWMîè>fõûÕãZˆ^ÂtI¹‹Þ½[HÕlo¡ÌR®»»šùœË :rr¶†­ßSC|Û²¿ïª• ãbÞ¥Bø¸¦9Ç!¿òd6Çeÿ¼ÃþIæ²/Þß1¨|ÍýiÇpxªdíÿ-¿ñPe“³°Ç_š„ÀàmÈø»ÅQi°½½³©™ºãµoBŒëÍB•Æø—ÄþK¥…¬¹‘ÌCUý0J-#/+#&¼«Mï5„’VË“šõÛhŽÅì1Ö½\m†„i¡ËbäÕ†]½¾cZËE÷ýõTÊa@/*˜éô¯£Ø„Dd`voûê‚í»(íø±¦H2¸ïLïBor¬Jó͸|ìûÔ»Ù—;Û?ïTy3¼cÇÌU‹kin_®jž‚ZÄ y\·áYTØ—sø§ùÚb\¢üÉé\†‰9žÚ½Å:¥ŒKÅ3eÜ|¢¸ &8ãBêsž•ía&ÞÍz¯.¦ qŠšŠÕs -OÈe)Ú³i´AuÐtFÿ'×¥Z€}¢&#ïúR üòu¬u[Šå"09ZhCÔÕ§‹{gµ! UÌ;•ùÍ(rœèB篽3øy¦ÒVfÆêt‘Å:âUSPäüÔí®cUðÒli­»vÏZ^\é· £²•=+¿KÍŠÀ®Aë\޹§“pÓD¿)¯O ]Í:uMiTw³:­3Ç#j¥Ç'Ö·!ñn7Êóù~ƼpV%}èëSW*£9]hthÑí°jvs.c¹Œ÷ª÷Ûm^gÚcÀêwWÏñÝÏÝ•‡ü Ÿý£tÊGŸ&ûUÍ,7¤ˆ²=#Äþ6†ÙÚÅ²Ç‚Õæ—RÝÌe•Ù˜õ&£$³d¶M6½l.ž6Šù”jhG¬'ÜWµD1 Óáö/öwI¶ýÓšô‹OiÿbO1˜8#é^nkFupW£°õ4®çnk><Óqó|~<Óƒ»á¼#~VG)ÔèÜR ßíé\Ôž6ÒŠ’»¸ýk6_ˆvÑ«‹8ªŽ-Xr³¹nΫÏ$V™yeXÇ»Wž\üH»õ1(÷®gQ×õ Mó4­Ïjí¡“Öo÷š!Øô½CÅÚu¶å‰¼Ù+ õK½V\ïeCÐ+˜ÑôçžU‘ùÛÙY¤hzÞ¥ 8m#«&R¶ˆ«žx“æúÕØ¬À^éWÒ «ÂÓþ]¿v¹eQ»jbÝÊ¢Ûo;qRùEpwdS‹çäçn|†ÿ¾jkMþõöCo#‘þÍK©àgâŒUÛ>æÊo*æ #u¦ý’]¹ÛÅë¸Ô[*b”]V‹á)u%Wš_*3é]…Ÿ‚´ =ÌžcvÞÕÏSN]M£…œ)òuÛOŽ1»ìZ¦a§¼‘E“Zò™Á{·hÓžEK«},i<:§mE¶YÆVµžÞ)B/5¸ó¢.áò³»5y®š‘›x5µmö7L˜KüŒÖPÔ!UÈëYšŽ¢÷?'aYòNm'±IÆ)É™w;~Ðå:À¦#”u4³fÌpªÆ½=Ôâo[šï‹›#¨¬WZ·¬4û¬lÙÁ©ÿᔾ_¥rF´)¶› T–§1Euçñ¢Wñ¨†nCri¬m.æ>Ñ­ÐÉáÆU%¥VD•_%~QZ,M7³-I3*(̲„MwDV¶ë¦CTbÒ!‚ÜÜ/rsÈÍrר«E¤ôC{·&EÄkƒLŽÐ»ÍšbÓ¥_€p yr|ªÈÉÉØ!U(¸õªw½AVÆ+HᶊϽ·Ü¹^•ß½©zšvR±…+D šÍÒ£a峎մ‘ ¼íæ°«~gdq·Ëš˜>Õæ“w¥4±»$p;›4¸ÇÐÒ' ü)q÷n)hôŽÚ¦çAR½;ö  «“´nR"’2W·‡Ù¿ô§É*žséB ÏzÞKqÜ©-ÁEùŸ÷jÖª3\¸©àùWsYšþ»dÙÿXÃJ)Ô—,V¥jôGã@Üê~@éE n0ky%Ô¯ŒKë4«6¶·Ã/&½êª4h*}K“ÒÄæ0yíB §Þ¬˜Á£ÊùkÏç2&´‘ã—#ñ­Èo¨¬¤v¥X·¸>d©k›KƒW-ˆA·Š†HØJ|úÄH˜+z€êbeû½{Ön”¢+44â¢tUj‘äÞ¾ýêŽêÐÆ:˜@ÛKÅæ¬w@ÝÍI,qÉnÑ•ç}i„|ÜTÑÆä¶1Ö©½Àó½B#Ó§¡¨þ\V–¹µ¯\†ÎMdƒ_AIóA6t 4”¦’´¥3b’¦·MòCvW(¸ñ„´úÖq&´oßjªzVmeKk±Ëp¢Šj@àHéM¥4”U‹dÞê*½j舒](<Õ5_,[°Ñ­6[ƒ·Ð@Šª¹oƪYª£ b¸¯•­SšM˜Iê?#šaùx¤‘±×î­ÍcÌA 5.G÷¿ »ëL([‘ÖìÀ_SL(ÍÈn)øÛz÷¦Èû5QÔ¢{wT`_й,¿t§¥sׂ¶ Ò²¼GµØVœá53Gvãä,ëÍBK7Ò­¸ûÝ•AåÇÜÖq•ÌY—òýj!¯À^{SJ.Ó].S%w`ñC¦îûÔůzÛïš›\§$޼©ƒü©/›Nj×(äÏð¯?¿_C€w¢áð¡h¦Ñ]Ã= 7”­h¬¬aEÄJièŸòWËʬÛÜåw}G„·^<¥Ç¥iYIolÛãE±ËzSÒP«ÕÒ}ÉkÌé§V©* Ø#`=Vªx“ÂÚ-å¢ 5)GM•“öƒ¶¥Šü£q[C;{Èj¥JkFdËáý~ÎÓnhÔ ®fóWÔ .åXë^±iâ3^\Ь*Õž•áïK'öŒQ’zº:ë£VœÚOszxê‹I3Ãä×î‚Ù•[ûHn'g&½#Åÿ à°ŠkÍ"û1(ÝåIα¯4ŽÓc°n¢½JqW±Óõ—%{d’s¼ð)è…8«(Üm©…¹oá¨u:J³or˜ŒÓ…¡v­´Ë ¿˜ ÷k)W±“›3`Ò–N«õ®“KÒ¡…2sß4¶ÖØuùkQ'Jóq™KK‰±¦ÜnáqIååqRùžœš‚µÇvMŠn?¿ÔSQ_éV¤æªØì+Dî€Ó媼|È{ÖC¶©É'5¬IØÏºù,\núU->mÕzòÑ2: †ÑÖ>©]±~ã±½®´5 Œ½jò /µR‚î&Lµi%ií\¾¦-â˜à·zÒùx<ÓKæ³W†ÄínûÓ§¥\ML†Áj¨~íTœ’:Ö‹]iôgIØlÙ«I â®RÎô«âFÁõ®†Ü‡Eùº×-ZnµböB¾ZŒ¹ãOT€¼TGïd×5Ä=UÞÿ…VžrÏC¹cÍGüYëT—V˜"Ûó·&­'<Š…>è¡Ô.þÅe$̸qŸZsvAfÙÌxÛ\ò¢[›ýï­`é'g%º÷¬«Ë‰uMMä<–zèÒ¶XÞp+è•(Ñ¢¡ÔÓm KJݰ¸1ÿcÛ íàô­(0«÷«Ê¬µ!šRÞJP n @’+pžôÂAN;w¨“åç§jÇW»`ÄzŠ@Y[ïcÒ‘w”¤çﯪd’½Ýié–oçUÁÚÜոƸ¤ÄLò-½¹’NŒ×“x—SmcVa*vÞ0Õ~ä˜÷|Ïǽyþql%c7Þ'­zÙmºÍzEY\ÙÑô¤·A,œµn}ï¥U‚â 8GSéVQþln¨­)JMÈÍÜ~;÷¥róÒ™‘º”¸Û÷«Eëô¨œüØ=(b¢–OššZ…ŹA5¾Ã×±¬¯ZÚá­åÿ€šèmà–òU†Ý#pR^øNqt>Ò»Hæ»(ZÍIh8Ë£(¥Û¹Îi“›§\ô­¸´ø¡N8¢KmÿÃô¬]H§¢uÐæ·Î4×¹¸àâ¯\Û˜æÇj«<)ÑŸB¹ˆÅäÉüY¤¼Öe­/Ì{Ô`|¿w& ’"kU]]ûœôŽÎä¿SL®’ &—ýçµbð„Éì u¼e(hÍ•Dq›^…ƒ4ýØ2µøÖNbŸZ…˜Ð½®K«Ïjöž›Ÿ¥m_ø*ú×&ÞéYÐBöˆâTeaØÖδ*BðfÔšoFS¼“|ƪSå;2·Š²Hì)E%™"šJSIB©­¥0Ìv¨h¡««0=/H»6Èá³Ç5·í¼u¯9ðö¨-fòäo”×m8t["¾kAÒ›ÓC*‘.Û¹oÎŒ6sùÒºžD7Zó̈Îr¾µ*9íÐÓdŒí¨üÃõBÇ­A"v+ô©£ÛÞš\;ãµ4‡r”–é·yª‘JÖÒ²=+FP뙼Ôök^YéÒ»(FSm"âÛº:¨.7¨¬ù¡W#ñ¬H¥û¤qš»…ëÒ±© = eï5YrzS^_—Ї¥3ÕÏaà5ð¿AJ„î5CÓµÙÝÑzw ëì)öp{Ôº¥®›i$’6\”V„¦ÔPÒ8Oj/s~c ò¡À¬sS\ÏçÜ<ŸÞ9¨kéèÓTà£c¥QZê;Î1V ~Æ« .õ6~mkåÊ>GU^:ÓeÏ-OlÉÍ!'nxì{R¿`! Àæ¢ÌÞ‚ž#Üܵ!ÂnªVA.?Š“ím»Ž*£Ê:T2ÜÇ#sØUÆúdÆkzåÀ‡ìés& 7æ¢òy&¤‘þÓp[wn†á^œw6Ð ¶Ýõ«IlGqV`ƒîš¾¿Î¹çT‹”b¶^Š/™S®jÌᚤ1á¸äöÅrʥ݂â¼®¼ûý*dØËŽõ-ÀuoÆ“îônk&;–J\Ð ml¯5~Ƥ#ª’øîj¾‚SsUi#ùêùD„l稨d‡vïZqvcÙ‘ˆÔ¯­V–®Dãm$ƒw)YT@<Ÿ»T$³ Øí[n›S¡òR{ÕÆ«EA´sÅ$J¯f †)Z“Ûnæ²®bxû¦ºãQTVfœ×ÜЊBzÕ”mfÁ:÷e¹«‰,_/ïWð¬g+2Ëÿ»øS+.JÐOVÍ<¸n7V$Ij².BóO·¹šÍ°êÌ¢¤ÞqK½JsÖª÷Vh.hG®[ÏËJuK`<õÞ±8݆QqI&—msÓåoPÕ—VÐhm½Ü~ö?ûê•.íÿç¼÷Ю{þÅØSí-“ÐÖz5ÊÞ˜d•†¶†ŒÓ´Çî¾§a}â{]6`¥–O÷9®[Äž*maD0«,^•bçÂnЉD¾i=«/ì‘Ù¿6ìÌ+¯C¥Z)[ í*Ú8¾×uÇ¢Õ¨µc©^íŽ/ÝŽ•J+­bëHÇjÒÓíÓHÔ ß½oUÇVÝäjnBÞÖ͹MFž!ÓÊãÍÅ-ÕœW‘í‘r*ðõ˜s5çÅÑzÎ÷"ëª/ŸX"ÿ¯ªÏâ«è٪ϠZûŒ*¹ðõ®ï»ZF8n·hö-Éã+Qþ­ªKã9wƒp:Ð4KTê”ñ¥Û¯ü²­’Ã.…sG±¡gâÛiS÷ªÊGZÉÕ•y£^Ys$MQ^­«­ õ-8ìŒú(¢ºÊ (¢€=kìä -8E³¥h˜Â'+†ô¦ |õjøôÛ99ŠRýêa-·Û°«3ÀW”ª¸<æ©Ȥp=ê«ûÕŽ[?-#Çòç×¥j€ªNÕákX-æ`ô®…ÆÚÄÖãùA®¼3÷ÑpÜζ75±¹!…kÀÿ*×URÚ4­Á5~?÷«>ÞMßáW£?.zW ÷2h´PŽE"VÎÚÌÛR¤…—5šQ¼É‰.¿:Ó<½®ß/Ó+P%elíÍK^b³î;Ê;³Ôv¦CsÈ«íq‚½i¢â-ܯJŽV+2-‡ø¤Iì?ï6ät4oÿ‹¬ûRM›y¯v¸ü©ˆ@à>EY‹Ò±•Ñ7!)•Í#ÇzÐòúsŽÕRâH¢Ýž½1P”žÈ¥wªEWŒ8¨È:dò3ÓéV†fMý3OUu­¡tõíÔǹÓ-æÁÊGÒ²¥ÑrùŽV•Öƒn­ó¦idþÏePiõ®¨TšûCUZêrÙ÷°ýÉóíMóoáûë‘]a²‚UÌRóUäÓæ^SkUûI=Òeª¦jŸ‚=jค¦K¨ÿQqh«Ä±m>µ—.›’C°Ôa-ô ¢äš°}¾j“L¥¼-Ì«Y2è(ïòKÍW—A‘:>ìVê•ö‹J,ë#Õív‚gçóª÷÷°Ë²h÷\-sp,7#šÝ³Õ4ɔюØ5œ°ê›æŠlNšNö5­.„І ÀúUŸ.7l²)&ª£¦ßÝíöÅOü¾õÃ5«h‚T‰î*¥qž-›ÉÔ#‘x"»dÉ_ñ¯=ñ|»õ¦“ÇòúÕr˜j·æ®Ü–Àë+P׬,÷|êÎ; â§ ÍÚ(„›,ùA¹¬SU·°‰‘Lž‚°uÝ^Hv¾ÕŸŸs|ù;Ž{šõ(àù}ê®ÆÊÜ­ss%ܬÌÙÍ6+Ifl"×KiáÅM¦Nk^=-î.1]2ÆB ÐQ-ŽbÛÃï/ßü«Oðä¸.¹"µ’/.§ˆýê⩌›êc*²&þσfÀ‹ôªï¥"66sR¤¥~o¥J÷ºþ‹«}ÌœåܨtÀ…晢£ò½*´Q;•æ¥Ô&ì›ìÖÒ°%޵ÓIa O¥"GÇp7¹®Z9*ô|Ê7`t¤ë5 s4L‡ ªóÙ:11ôÍÛÆêž"³+g½bº‚¨Ñ€ŽzÁ©>]¸îkn}Í‹x_ŸÖ¹½Aä°ÿX¹­?dÞÈÝ5-‰÷”û´†D‘W窑^$ɺ&Îià|»ÿ:\n CHÛ²sZiaaÞüÞ¢°€ó:ŠÓžrWgoJUjrÅE-Y] çµC"_¥Xÿ³Q’U}=k8V1út¥×¥IÓviÎ1À« Üt©R\qL;i„|à À¡¡XÒ‚÷Êlõ±þ$`Üh¶³ÛG·SÞ2GuïšÔŠ Ño šå|qhÿg†d^ZéÀT嬒{•IZG EWÑ$¥ÆÚŠŠ)¤UŠ(¤HQEQE ö«Övopßyªx÷½uZ}˜Hõë\øŠÞÍ'dCo¥`wVÊ#+r¸8À© EVç§­NG@["¼Š•ÜŒ\®T—M¶›ç–,ÉëUåÓ! Š% Ž1Zb6fÇðUÛÆ¶•bÝÉ~´éÊR’WݳœKŸ&TtVÎy­¸ܺ’˜sXÖQ†ÕžÚN~\úŠêmíÏ@µ¶)¨h*ÊÂ¥¼a@T^*A®>U§ùe>´‚6äŽq^w5ú˜ÜMŠ´˜ È¥ïÒ“Ú€NC Ô¦H¥LJªÀÔ;7Ò‚›vç¡§ÖèM§ˆ4dŠo6Õ>SØW9$Ãþ±q^œˆ­Ã®jžµ¥%æžæ8—ÌA‘Šô¨cšjFÑ©²gQS#È+‡b£¯Zæç¹Ëy ªÀwèj›’Wäl𢒄^8Å3íjÞ¾fSvÑmöCîdº†"á7cÒ²×S’c!6òŸy‚ð+AïÙÛÃzÞ[w|¹9c·½iOÙ¿ªô’(¦§ ýÆSS¥ÂIüUÌêUÅ«™­_zj”zÄѾÉ;uÍtýII^ וI^,í]®wV>±nïÇ5Zß[ ·æÅhÇ{ɵöóY*s¥$Úšf$ÏÇËW’6JžHÄm½9‘¸ð­¹Üµ,–ØüÕ­œÖ\Z°ýÑ\uw3‘.Àß…8ßáNÞŠnOjÄ‘<¯—&”>Ö‡ ˃Å9ļÐ0Çøq@¼‘éOrO ùÒl dÓ¸wp¹ã ÉÙ85 %¹©¸7ØfdåÖ”e¹íNGË`Rm¦$Ží‘þï5¸wÞôÉ~Y½©%v Svb—WÓÒše;~í5$ßÕy¦HX6hHC¼ÅïÁ¨Ünêß4:»|ýiÅ6®dÕ“a…ü¥ù)âdèíQºzuÒê«‹/re\H¹õ5w›“oÁüªÆýÃúP<÷ô«Rh¥ts7ê¯Ì»j“ê÷îÛgýší”Üóê ekº¥­¹Š8—Înûk¶hͨò]šÂWv±ÄÜÏ4¯ûÖɪôùÊåÏSL¯a++š6ºÅը؈µ­gâ¹Q×Í\Šæ)ÕL5*›¡4™éø¯O01-óc¥pš½çÛïžnÇ¥Vò÷.EEŠŒ>9Dl%Y³¾šÎ@Ѷ1Uªåµ“\t®Šœ¶÷¶,Ýë——‹³{íQÙéó_Mƒ¸úšÔ´ÑÇü´Zé-4ä‚ UÁS Qjš!Ét2¬ü?pËÉ­«m)c_–¬÷j–¼ª•ç=Ù“mõ"û1Vö¤(z ´„…ɨòÙÛŒVOÔ…8Å5Þî*Wù—=Wå[†¡\,…_JIjguL*¤~5Zâ=Ý:U-Åd4]ƒÀ§vo»Áªæ"»OÊzI§™eW½iËØ®T[‹›¸«q¹ü©Ð@Édlž´™Røâ°“»%¤8HzU¸®65PÿwéQy˜nzТdÕβËS|·^ Oªè ¨Ø™wdr+’Žà£pÜûVþŸ®µžï;s'÷kª•[YHŒòË´¸Ñ5i ‘dsÀ*Em[ê0q^š÷ƒfÃÚ².wÏjàŽg^Nì‡>Ç›âÂaætÏZèìДTÚÀ͹¨5^Ðf$õ#šéiU‡4…)]"ìq彪À¸üÍGàcuXùJýÞk³ˆ ÛÅsÚ‰c¨Lá²#Œpk¡%Es·/’Þù‰“¼*¾ìb·Ã|MšRÞæUê´7ÜÆÍ¸á>£µv]âÜÃÀÛµ‡#Þ¹_ìÑY[y ¸óúf“×ÇÍ’Ów ó'õ®êÐö”¹’غŠêçj]w1ëèiJÝMF²¾”ØîVEÇzñZ{£ òòÄÔÉ08+Nóiy4ÐÜÜp)®CRìÂýêa;¸üªÂäC!”ö©b¸uoQLÙè¿Z’ r´7Ô™Âx†8S“Ëêy¬c[þ,·Xu\†ê:Vq_G‡w¥uAèMŽ\qPΞ”Þù ÍÝÁ¯ŸJÎç-Èõ.ýà娑òµ{Š×†qNAê+WÓ„¬ÓF¸=À­ï3µ#¢·ZÞ•YSw_+¹ÁüÑ·¡ás2¶C°­ÝWK|ÈW¢¹×Bƒ^½)ƪ¹Õš¹n=Rî?ùjÇØÕ»mQšPŒõ¬Š\úSt`úÈîmäÞŠû«^ÒN›ëÓµwµm’nxÿQ]fŸ­ÙMµ m5åbpÓ‹ºFR‹èm¿ßúÐÞ½j!*¾Ò#Ú§Ny¯5¦·1j€¨ þ”Ç Ã¿ ~6(îOzWÒJ®7y-Çz~ÞhO—è(¨sÞšd%°x=8¦ÈàsëKÏÎWŽÔüÄMˆ£w^´ÀmÃqGñÒd«Œ~4€tŽ[Ôˆþj`¶H¦7gõ¦j{€¤25I‰`ëïC•+P±ò)è®›[…¦ †Îê_3 Í4Ê9Âþ4¤œ:ä­FáU³»šMåª'nzÓC°™½ÏZ^G=(XØÿi—7pYB^g_eïV““²CH[»¸¬¬ži[œ|¾æ¼òþñ¯.^SߥZÖ5wÔ¦nÑö•^Î ì—4·gE8X(¢Ší()A¤¢€%BPûT…‹”ëQŽW=¹ÙÎÜÖrÓR‘]"¸[šì´M-’ d^O5[L³.ÂB¼zWK*yV¼ìf&ñåF5D ´u¹I¿v;Vµ¥‘Žò74’»³J§YÞÉ›±ÊÐw¨\®ß»“RžqM1íP´d¾€ÓK¨f%Zž#ø³FkM;…ˆÁË:»O%·rÔâA\Çjf=wR&Ä¡þoj}Äkynñ¿qUI;ªxÉ;MEÚwAkjpòÛÍ¥j¼îòÉë]M´áö¸l‚*Mt[¦™,²¢—ǹ}XÃy2.sÒ½^½>t¶6~òLëKñH')ô¨¸e„e¸Zà±®wñùTDmë×µV¼¼ŽÉ7ÊÜöëžÔ¨ÓóÞV¹ëiad¿y"óHÉǦN3øUã©[ùL«œ£¤[É%­äѲˆÌƒÜæº)C•7/" ¬µ2Jo¶xݸÇ_pk6 ²]Ç4|95¦â¶åÍG!ר޵‹ ûÕêÓI¦™«=2ÞU’Ý$FÌn2+òõ´ËÐJþéûÑá[Ÿ´é¦ÙxŽ?VÕãð¬ëÝr %a»t€¬íC\iKCd™'øª æ>ñºóŠî…¥ÍWî4P[²„ÑÜj×i¸'¥V¸Ò'¾EÈ®Í,âÚ6mã¥Kä Ù œV«ã¤V…ûKtOÌE Á5B]RÛ´«ôªç\µ$óéŠæT&úò¾ÆèBã­E%»FûOçXéâØS#ÊÏ¥e\øŽêg%µ]<%fö°Õ6o\H–ÿ}±Y7:ÚÆØ‹“ëX·³Ü¶dlÕjô)`Òø%Ô½.©s!oŸJ¦î]²zÑIŠëQŒvF©$%¤RÓÚpr!¹¦Ñ@~·q ¬eø÷®’Ï\IË/Ípu$R4nuÏ[ ‰è' îzœR™zt©È'¼ìxŽíB61Ò§Oߨ²šòÞ[S¡—²gxF=…1ó»ŽsÖ¹¨"Ø.‹¨ ô×GæÇA'ÿ_­a[Ú<þ¼ño›{YÄ2.Þp@çð$V QI¤ˆte{$>ÊÊãRÔ!³…s,Ç éÀÍA$mŽŽ¬’)*Àö"½ÀZ:Æðj2.fxwÿ¸Aõõ¯4ø­-æ‹ã›È¢m°Ü¢ÜF}ˆçõ»]5·¹³ÃµÞäÁÔJ#,»ØáW¹&µc¾ñ=Ô툎Ĭyîf¹lÊìÔ]ÚËgw5´ë²h]‘×ÑÁ¨ëhQ…?…ÚÚXm¸¤Åh0¢Š($(¢Š|}k_NƒÎ›zVD`³q]N…_Ÿmsâ¥ËÇ'dÍËHA…À¡;rzÒD›Wš•ÛÏJùê’æg£†Ï­<9VÎßjƽñÓ‘wVt½DßÂÙLÚ”¨ÍG™­ p’Wf–óÞ”¸Û÷i;±Ú—'½`fFï½ñ·Ši÷PIÝ‚Ýj) /J¤0$m©c·gLîëÚ©¹n§ƒO¶Ÿv|ÉpGA[ÓŠê2ɶ}¬â¼¨Þcô’…ÚKsþõ^KôR›zŽ*ªÇ–7±-ItÜ¿ñqPì#ëNG+Zi˜â¹PX…Î84ÒUzÔÇõ¨I=:àÕ!‹Çÿ®”ì¿3¸+K¾-¹ïÛ5  FÜ¿J‹~Fyÿ wabLƒ»}iA=;úÔ´àðô©°X£âBÍ¥ätÍB ZGMÍÚ»=^&}*J󉽌¾*tœY½4œNŽJÊ|¤U&³¥ñôþ·JËD,Ø­m¡O:«ö5Õì¨RWh«F&t×SÜs#³T5Ó îûŠ#ð³бtRÑ‹ÚÄæiè…ÛØÁá‹m¿;RI£[ÀÃjçš‡Ž§²U7c7Oðôò”áÂÒäµ;’F~÷4øÏO›ŽôÃÿצd†öªQ¹I6XØw.ÊYcpÃåÍI°þ «CÉ;6@æ¢jQÖÃåeD·.Ÿ7>ÔM£ƒëV'¹G_’©ÈKqëý*,ï¨Ƀœõ¨JŠŸæ^vô¦9Ú¼­jˆ òÕ›…¦µº:h•”úÔáýšMåx«æcÔÂÔ´kTÓç˜&P‘ZϵŠâÏNx™ØÆÁC{gšÝÖ\ÿdÎGqÖ¹“$Ñ=¸ë,‰Éì¯W ç8k®¦Ñ»Fmã˜bI~l¹9>Õ’OQëZ·7ý̼ùr7Ò²¤`G~k×¥¶¨¶løjìYêʱ£ë]~¯slúTˆw‘À¯:I6¼2÷S]г†tI åXù×2œUHÔÕŒæ•Ó1¼72ÉŠßžÁ_æ+zŠšÞÚ _õiŒõ«;÷pzz× jîsæBr} Ï6kD;—v:UIlnu 3í¨ZÚx2ÙÛšQòŒ•*µµŠÔŽnÈ¥g§ÛÛ&ÕEÏ­Zv4óÛ•¨Ð¸ÿYÍL¦ç«dÜ.ß»ÍM”»·Z¯ó tô§ÞZ´„|øP9.Û6+ža¼Òg4”WÔaE?-2€ u6ž-@ KV>Á>Ï0.SÖ˜#ÛÃÔóÇ¡j-‰m'sRIfãµÅ¦øoJÞñFÌ{šãÄc µ“ä²YÏ/ïQÇi,€µÔ]ÜI©Ü4ޏ^ÀT–öŠ‹ÂÑõ¶£ªÔÎSKcÓB–g_1° uZ%¥²ƒ³qõ¥Ž>+Òµ#ˆ t/Þ¸+âjO©”¦ØÁ+ùdáEW!C·¥^16ÇòÛG‰Q½ÇZÙ¶K#›±Ü ÁÆ3Ÿ_¥váòÿoGÚBZ4ð¾Ö’œ^§)»>•wL“ÊÕlçré2‘ùÒ]XMcpñIÎ>ë„TúbnÔ-¾\þùqÂ2§YFZ4Ì#¤ÉµÝ'ûBiuˆ-á³H« ŽC×#ëÞºŸ8O]D8ýÎ?"+/O•lõ+›¿ãÚìmaèáüëCÃÓiþ*–Þ^ BJû‚+éSæqêzµ((Ý®§gâ2 [GšÚáT©Á®pá§Ûhö©á¯ì´Š1nèP®ÑŽiogß,Vc«|ïþè­-Ðz ŠtÒWîLaÊ“9·Ô/,äà¨éî s¿<(u©´«ôuÊÝ Äõ*NF=ú×S_cñ·%Ç<{ƒýj_Áçx}Ÿ¼s+~|VÓJRFõ"¥5ærþ ÿ@Ô-£·LEÁýÚô‘–mç¯a\—ƒ´ý¶ízëË|±ýZì:~ë5teZÊVGÊŸ-…¯ÄMv1ÐÝÿ¾€oë\­wßcTø—¨cÑÂÇêcWÂ߯u½6ë[¾-e¢ZÂò¼çïKµs„ùïÒ¹QË$ÜÚGÚ˜GæcgSÐT1£;" gfÀ $“Ú½ãá¯ÂÅÒÄZ߈b_µæAjý øŸý¯nÔ(ÜPÝÕô{­ðZݪ¬ÞZ»(þ ŒàûÖuu¾)Õ ÖüS©\îÈyÛc{\Ýű…ýAéY©®f‡V IòìV }êÜÑ<9.©0ó[Ê„u=ë¾²Ð4m1”ÛÛy²㓞k)âiÓø™Ï*‰{¥èz•ãæ+Y09É\ ï4Ï ÜAj†gPOnõ·öÂxù@‡ž',6WŸ[ ‡<«ßK™¡¤·CÌl¯|×Câ]WEð(ä¸tÛw$Ö7ÚþΛ÷`w5æ>%ÕŸRÕ^Bìѯ )Pjz$]äî̽æIK¤×k¢D ²»u®+©=oAâxÑe8xªSœR‚5­v¬ufLsÚ¿Én+žOÛÏf-nÖFÿX¼×šðµCšÌØ;vç®)„—â«%Ü ÖU#·ÍSù‰µHlúw¬ùèÃrWŠÌÔo ÓPýÓ!û£Ò¤Õ5t³‡†ýáè+›··›P¸óçÝŽ Wm 7÷ç±iuf–Žgº˜Ë3¶ÓÐWSÈž£¶k*Î4@½…jÅÂW>*|Ò¿Be+$²ïE÷¿úôžaGÿdö¤qòäW:DŽ.z½!Áä63Q,»~F\Ñ$›¶ç ôªHcÝÉÛóTþ´§'‘LÛÏ'¥4€pÛô£a-÷¸¦8ËqÚdU y1ÍH›—i+‘žGµ49_áâ£Ôu±éÒÈ>þZºiÊI ì§ãI¦G¿ŠÙqoè¨LñøW'i¤}¥Ïzîo}nìIÊHNõ=ò*œ6klÍ@½üT>¯Oš ×;q4ý–±Fm¾ŒWåÉÜø;ÂÑkÒÞE$ÁQ“HN>Õ†‰é]ïÃóö;ÔúÞFçì¡ÿÙ«ÎÃ)b*ZZ¤sЦêÊÌâ$·’ÖâHeLK•qèA­-'@mnîÚÔ³F“嘎¨ƒ¿ã[þ5Ò—þˆdyù=^ô®‡Àö¥º¿+€q ~Ê*á„å©'%¢.4y[o¡æÚÖ‘6ªÍbìÌüŽxÞ‡¡¬ézàõéì–)¬/Bãxh˜ý9á¿ cPˆÊ¸µs¶ô®wBR¬ãf©¹NÑDGG»±ðÕž«rªáöìÛÊ)û¤ýqU·çƒ^™ã{E“Á:„Hªq£ ¶°Åy Ù߽ܿ놳¯/¦¼¸idnIÎ*dÜé¸wþ•îPÂûê÷7VC¥ØrBäã'ëTå;›=*}…ò«9=jê¦S ü¸ükÒ´¿ŸIµsÔÆ+Í Ȩ:“^©cÛXÃ÷gò®Ñ¥®¦5vCö ܯß-·|ÅJBžzT;$ÝÇjñS1$gšqõX/+œS88Ç•‰`ÒÜ ¹´÷ô§“ò€:…ΜU Í •‰^ªÑFêýûQlDqnh¦É<¢Nìäx4W® éS&$¶PO¥bjüÆ/a*ÿºkÞ§™R›´´:½¢êpH{R8Åjj>¿Ò›ý"&Ôtª ó®;×Zškš,ÑjW¢žéµ©• #¼ž$ضúRÅNøÝÖ ©­dò¦Þ¦Jɸ¢“ÖÌ'·h[¡­ÍN?2Ý% Æ+ŠŠ3æØç1(ÛºŠÓÐ-"¹ÔãûCªÄ§$š¹ÍF.L„zG€ü<,ôáw2~òNYž(½7º¹· òGÅwVúšØ·ž3å¡ =+Ì™µ9Üó’y¯™¡ÏV¼êÏä.¢I66Õø ¨Š ÍW#ÓÒñ%¶ÑNÃ÷2n‡±éí]0µZŠ Úç-5Ï%ìC°w«örŸC*åIÀ>•o#Ã+Û]+G"¬PEhlnÜZ鯗V£ïZèÞ®¥=msQ6%ÓF>áÈϱ¬ìËawçEòȧzý~´è ‰s»ó«·ˆ³mrO½z95dù©üά¾W¼ H„ݦ `Œsݳ--%²Õ­á•9Y—žÄf¡°¹{ ¡" å{]MżWö±^¹t!Ô÷8<ŠéÇ`ÕFªE{Ëñ7­AKÞKTcj‘æéeþ÷5½¡Jnîa•ÿãâÜ`·r§ŠÍÖ#Ç’GBHýMG§Îm®A»Àq‘Þ»·‰ØÕΞKÆO<”„#Øu®¼}Êóýíý¡/Í‘!Þ>†»Û7ó,­ßÕý+ ªÑFÕ’35DÙ¬is»ö›Äñyš ð€¨"Q7Md}'oWÿmÏÓúÔ_á&úÄf‘n–ú}´h¿*Æ1WÞªé`®›zì«OQ'y3ž£÷ÙäׯuSRV:M›Ç^ž|äÏ ïùV÷Å µ±ð3é¶È±›×KhbpHvÀ®Ò)ãs—ov'$×ãWQñ pü¦;4Ú?ß<·øRŒ—*f”©º’v3þøÊÁ_W½‰fÔQñyXA¿Ú÷®£â^¼Úƒ.E·ü~^ uýæüjx}!Ó|?ö™›Ë³+1ôçÚ¤·Ä eîl`e±÷QI+aGó'Ú±¯7r äT÷å[ÿ ÀÖÖŸ¥LÌ Üã±®ßÄ~ƒÃ‚yo–æõÎâ±®ùÖ|+=»×›‰¯R›å’±ÅUÎÒ!¶º† D~SÚ¯Êe|ßÖ¡–Æ9Hz­I¿å;W™9)4ÑÌíК9Xqº§IÍRÎνéÑÈ9ö¬š3h¯âPÙé»~òN? óòå›&·¼Wp^õ#ìJçq^æ —-4ßS²”Tb‘!8Š«æ¥•ÿuPq]‘ZCóNö¦R÷ªš"Äë4ŸÞj³«sm÷%cíYæNÚw5›„^è=Ki3Þ\†™˜“]]´b8“ Ú¹· TªäŠë,¤y¡“mqbÕ’¶ÄO¡¡Æ*üOòàUÀã-VÒA·ñ¯&fA&>†•ÙŽôÌ—ÜZLíþ,ÔÛ@Ã7Þ⛜7ô¦’{Rs·îóëUØ]<u‰¬¥€.DLqŽyúÕ›Ë+‹;*tÚÇ{íTn";bºN2#|ã§úW¦oèž\Ëûär:£z­}°T±JjÌõe‡…jjpVgFÖþu'ðÕO\Ëá‹æ³¹‰šB7FÿÂëê+Æ]CÄ‘ÜÅa&ËËxšqüõ~ößö€çÅy‘ËêÉÙèpª2½š5ouXl‹²–ì+•“P¹Ö/•¾\ð¢²e’Wsæ³ïšÙð¼mNë"̊聾Í»4Œ‘Ýêi³Z¸ù{ŠmÌ`*H9ìjÞ°ƒûbb=Oó¦y~d,Èãê+ÖÅÐö´= M>h´VŠ&•–4\— îk½‚H¬¼{o *ùvè-¸ìvãù×7á+t¸×RâeÿG²Fº“Ó ÷GâqZ:a{ÍynßyÃ~f¼Ì¢•£9>¦X{²“;Z3éñ]Fª^Tžû[ùÖÞd,4¨!èØ¾¦¥’4‘99±©„‰ 4’¶ØÐeo[[ ¥ÚHç|sl—¶ÖÒ}Á1•±Ô€1õ5CÓ…®J¨‘±;Ð~RÜ>­©}¶eýØÿV§²Ž•ÑF+Of©+%«Ü¦•(ò­ú˜~0;<%©ÿ<@üØWŠö\ Bç⽋ââßÁ÷9ÿ–ųý+Šð^‰ýòÜܯî×-Ÿã#¿á^f.Œ«VŒ#ÛS‘ÂU&’6ü) =ÌIy}–+ô÷®êib±´šæO–+xÚV>Ê3ý)`ˆ"€Yž)‚â÷B¸Ó,ÙD÷cÊ%Û„C÷‰ü8®úT¡F´ÑЬ½Ø£ä+‰MÅÄ“?ß™ÙÏÔœÕ2Ûκ\¯×½ë Ñ|ðÓ^h`ŽK¹- Ëw"‚ä’ ýў¼«B³¶H–G–0z’k,Tý;õfSй¹§ÀȪàV¬`#sT¶t»X²n—#Œ Œx—N‘Ž5óu)Õž¼¬äåo¡ªïòã¥DÏâª'^ÒÝq稥UÓŸþ^£?ð,TýZ¢Z¡ò¾ÅòûñW"%•}=«(]Ú»~îxÈÿz¯Y\«J±ïR?Þ¬çE¥© 3LFW5Íëž)µÑÕ£eŸÓÒ´|E«Á¤é2I½LÄanõã3Î÷3¼²¶YŽI5×—`fç?…~&”©ßV_ÕuÛÍZV3>²Ž•—Eô”éÆšQб¸WA¢[¥ÔF7ëØ×?]‡§E•£-ƒYbSäv±%î4HÜGlVWئšá"UåŽ?:ôÈ`¢EÏŠÁ]„"ãç® 8©êšÕ¤Ú,i^‚ÂA=Ãy²¯AØÙ’@­ÊþU!!°GÊ·ð×›R¬ªËšlÂ÷Üz8¨äçøy'ò¤9†ìÈÈÝPÉ)N¼Ô„ÿµL 7J¸ùˆ€Þ*Z– gr*•ÄLÒã®)#ÔÕ°“[û+¯tÑS¾ÇG€"\.=h‹XÉ®<¸CãWá¹l.W9®YÑœw!Å­Ë¢Wfíš²—2|»8ª‘¼M?¯×¥fÒ{”ÉoöŒ- «¼>•ÈÞø à3ËjùÇ!k´ƒhÆxïš½Àþ÷µkKR‹÷^€¤ã±âwvSÛJÑ\DÊÃÖ¨U«Üµ *ËRµM™0vžõævövjím{}ü ö°¹‚©í±ºªš¹ÍG’¾ØÑ˜žÂº-/ÁZÆ ÊR-=^½/JÐôË5I"·8à•æº(¥H•p½+Ž®r›jÅ×¶Èäl¾\ͧ캾T=€Z[Ÿçìë%¶°¥gŠíßW!p)‰ªË·–ÅeÉD§ˆosË5ƒ"´µ7Ïovð#ÕÃ_隆“1†öÚkig\WÒ±k²#`·—â°kv¿g¼‚9œ¼Šì§šAÚãU£ÔùæÞòâýÜì3Áù«ªÑíÝÀwïÉ4ýgÀòÚ;MbÞdc½Å3H¿xq Ë´Ž0kLEHÔ‡51Ô|ËFtqDh=*C×Ò˜$÷:xL׌ï}N{ý¢ê±,ˆßéñŒ ÿËuû0ýj…¥ãEòIÈîZÑÁ#ƒšŽæÛí_½M¢ë¿a'ÿe_I—f*V£YëÑž®{Be˜ãI×1·?×éW¬ŽÉZÞUÎz)ïê+Êso1›t|íõÇnk¤Ì­¤W6ió/$'ÞB;ûŠï–*Š­-üNç„ÕU§£_‰JþÈÛ:ºsr¦´¼?z —ìò«ñžÍVŠ%ݯ–WÆ@ô#­dÚ7`x#Ò»eª5œz›ºÄ_è9+Ò±c=;ÖÃÈo¬rîÂEM²Ä†°Pìlã±U5°=“:YâÙe¦Ý/!ãØÇÑ5Üig:M©ÿ¦uÄ’ðè¿g¸Ú"Ì\¶{9ôÅ3þ_‡ôxm­f¹–YbB\Aõ*za‡®jµbÓWÙ™×MŵàÞ¶§þ›)§ê‡ýcêáZÌðîµmâ=L¿µó6´›X:à†ÍO$ŸhtŒç?AYª—±ŠZ¯#bÙ6±ÅÜ Í)ùš£·6[‰;°~ !˜Øàš/­ÎY|LŠîå,즺“îÄ…á^g§[Ï«ê¹Û—™÷È}9®¿Å=äVÚM›+Ktû› ÀAë횆@4HaÒ4Ͳj78Üç·ûF·¥¦§mrl»£.ªémrì,#@>Ο( v&—YÕ-¼=¦(‰cñ¶“€?ú­\\[x{Dón¥fŽùœ·Í#ÿ‰5äZ¾³u­ÜKs+`1àÉØW6# 1æ‘„êF š{-¼Ì}Jõ¯¯^âãæv?z£´“üý–DõªÞYVãð¯©QÖnRz³É©QÔ“”wBËý1ÓÊ\ÿ‘RYK¾ßžH⣸Ë6G^õȯ{k±[$œa“gÊ´Éä#ÅEÏÌÝJÝGK’cx‚ÍÞí$ õ€P¯á]­ÉpºzŒW6ºq<“|£‚ nŸeµ»H}{U«?iÐm!VSêy­»O!%ò­–?3¦ÑŒñS'g"¬º#¹Ön4í^(/bòídù%ìžÿæº}P›DÕVOàlŠ::ÿžEAâýûRÊ)‘Uddúÿ…géÑÝ 1#»‰–{|G»¨‘?„çÛ¥}.W.jJËGùž® Þ¶‡©xö2ðø†G\•ßkp:Æä#ÜWƒÂÚŸ¼[ “GåÞXίg_cÝXW±x/Yòåþθ|£óô>Ÿ]ñï‚ãñ^‘æ[ª®§l ¶ùè:ùmõíï]UiܪԵR[žâÿ Cx‘_YyyºÏ¶en$CÎÃî3Ö¸¯ ;[øŠÖ7VS碲ž;…z‡®'¼ðDpÜ+yÚmÃ[²¿1Èð8ÿ€×;â[ ž-rÝ0êêgDZoèjjSç‡2AR’”UHüΫUñ5˜Ÿïš-þT÷êM`ÔÙÓî6~4ÈÖúõ®¶ýÓz‹S\Dl4Ûĉp/fVÏý3v?ï£[žÓ÷Ü=˯É1þñ¬¹O›ebŸÝ„Ö»½*Ùm4È¢ ƒÁo©®kF>X¢&•((ÄÕ2Ö»yóÃd>áÃKî; èqúš틜óÏ•eJ7•Ìh$äÛèuш‘@éWmZ­h7Åõ@JµYMêsTzœWÄþ-2À6!iÚy½Jªàĵ'‡" ©Bˆ¼ÃLSüI(›XÙÔBÉ«š%“Ä­pû”°Àƺ#MF õg|i¨Ò¿szIÏú¸z÷nÃéLŽ œõ'©<š|qÂ¥8^¼zûV_ˆânÚ#Îþ-Ê'ðä:8}¯u •ÿÜNŸ™¯Ÿu +=öb‡¡ë~(ÕÆ±®ÏsÖòCþàéùõ®fîΓªÀ×,kö¯ùN)Ö÷ü8ÉïW,å‰üθâ¯ê:ÂZHy_JÅû™­wÆQ«tÑ4õB9,ìi¹?Þ¢ŠÖÀ™qþ޶R6g#ÔvÅhÇ)9ûW^›ŒÚg‡=Fù[q÷©E¿w­3¯Ojâo0z¦ŠP«Š¢+dµ<8j‰"M¹Ë`u®_Æ:^ÕMJÝpÀä‘[‰p¡ªK‰Å͔к©VCùÖ˜iºUè%tîQðö¯öÝ<ÜŽ l‹²«\…¡Tiã߀šé$ p;Tâ©EUj%¸¢çÚÛùÓþÐgwJ§³>¡¦É#`×?*Ø‹ý¥¥q†¦IpÝ7T9ùð)¥­_-µ óNî[5•yḵY¼Èÿs'\Ž•|ƒýï¥M¦.7sZB¤éë5u±Žú&£¦¨(ÞzޏäÒEz‚¸=þµÒéw¯i¨G/ÞŒ™qPxú=êZrùS9ýèNúZë§(ÕZ¿x¥®ŒÂ7º59[.Õ—êéù«K¶”¡ÊKMJ,¬¯ÒQÑÿÆ„¸¹Ñ.õ·ú–8ž/Cê=2'w犺ŽB8tY##O½{ ÑÓµ:¯Nç§‚Ì\=Ê›Âæ+ø¢¾±lÈ9dé¿=GÖª\¼Ê¦éÎŒ“¹6á’±—A½YamÖ’tÏò®Ž+˜nUn!|«ðã§ù"¾‰µ8Þ,öݤ´Ø³¦\Cs›îЃŽNESòἺ€Ã*ùR ô¬ë»–ðõ×ÛaÚÖRH ›3òŽÓP‹PÓÙÑVk“/’ÉÝKß>•åÖnú=u2JÉ£˜ñ^¯q{ªÿbXj×óÛ<û9$Ü›‰Œuoþk­?L»”^)ÔlròÆ>d* =þõléž¹ðôiª^ÝÛ‘ Ž(cÉ?xž„€jqzÞüï’drð†~rêÝïÁ¥Q„m/ørha½­ç3sá?UÓ×D¸‰b›O¦G 0ñóž;`šêlµ?µRO›j#n϶pk‡ø}àéá]Bøy–ÐßCä¦W¨~ö>¦º­V=7D±LJÀ¦Õ‘ÏÌΣµO°©¼–"•6¯nvÖ°éèç€s+~<×®x–}‘éºbr÷'¯ÐUm_Å.š ¢³I8ÈÏ'jåô‡šÛÇ6·¶X0¤qjìÃP|ŠREQÃjå#ºƒËðƘ.&“̼”l„?\uÏâNjÝŠÁ¡ØË«ê²ÿ¥Ì 1~ª§øEfÜÛ²ë¿Úš›,°F[ à;v펾õÄø—Äjš´–óOØÑî8ãÒ£Z4¢Û1¬ã·/ëȉ•êÞ³[[|¾N?\ç4d°ÔÅäIˆnòHœuüú×f/¨ÓŒ£ºÜ识äŠk~§ ¹íž•¡"’™_â¨-4»­cPK;%ÌÍȸ¨mî%6ópT‘Ϩ¯6t¤â§c•Óvæ± È~Á×½T•Øþí8´]6LïÜ÷­ Ã#Ô–ÚÛ÷pšiÿ¸¾ÞçµmF.mE"cMÉÙôª^³õyÒ%xÙpÇ‘]F¹¦Aáï^Ùîcolÿ+?Þp@"¸=_PmBñåõàjë£Nó6¢>k™Žw;SãBìäž‚´4í÷P90¿Þ5Øi>‚Ãl“~ò_ÐVõñt©+_Q9šW†ZeYnxSÐWC™kl¿$KÇzÙ1.ÜmÅW(þñjbçUîMÊè8ü€«6öÞkcrŒúÖmÌ¢?Ÿ­Y²Ô`W`ñHOf5ÎN<É”£}MsEÇLU7¹· ÃÍöªž±­Akhc‰·O'zWb‘˜’ÍÏ_š¯ƒs\Óv w;YõË[]Ù~‰Þ°nüPîÌ-¢ãÔÖWÙ‡×Þ—ÈÛO Jê!òëzŒßò×höªRÏs'úÉä?ð*³äd⇷ù€Û]1p[ æ)¥ÕÜ?êçÀ«¤Ñ乿Ftfût:á°dÓý¡úÖ+Ûíl ÖÓÃÙºHŒË"œƒÜ[Ó®©µ(¯Sjœ$¥Ðëlã>!ÓLvr´z„?3AÆ&£ÐúŠª7[Ü<u”à©\ìE2yZÝíüG¥mŒ«í¹ŒtŽOþ%«¶’ÚÇÆ:TZžØ¯vcwL°þÿ÷(:væ‚Üú¨r©ÁhÎV;tŸ÷–Íå\¯;G¥z/‡µí}õ5 ¹„“ÜÿZª±º&t®Ž£XР†-fúß÷fò4yt2!#Ôƒƒ\_’“BðʪѺ`zkÔdò¯´ùDl¬’Æpø"¼Ô 9¨àýj)=—ºÑZü&׎Äzð¦Fÿ-Oq—ä-·üj©F‰Œn¸*pÃÒ®úhL÷¹ÖiX¹¸´ml_ÀW{ù~¦¸=-m&FN&„Ü;¡ãô5ØéW‚òÉdyxo¨®zîé3GFk W-«ºÄÞà*“Ä~8Ñ|0é ôí%ѾÏ,¿¥fG¨¦¹·U¶VXgÉæp@< Ê„—3W&„»goeŤGýüªi$D]ø ?…24رGýÑý+?]¹)köhù–àíQY¥y‘=KþŸnu-BK‰1ï,sÜžß…u‘Çò¯ ªÚu’Ú[ˆ‡o¼}MhùV•*_c|Ek»!@¹ëÿÙzWØ¡|]]‚:¤}ÏãÒº‹‹”†Ýåù˜.xNI>‚¹«o Ey©I«kj·7r¬˜áQÑ}ñ\µTåXõ9ydÖ‡Ÿi¿×¾xQbƒø®$\/áëKâŸXø|[[Ãu4÷rÒoÀP¿Os^›®ëv^Óêé”cå†!ÆöôÕæÚv±ã JKÔ‰¶Êr×2|±eîqí\UpЧX«É‘: 0劻g2cÞ¸=jŧ½CÄ2¬Ñ/Ø¡n²N§ô^¦½BðV¦l•ÓíWCŸ6EàöGjéÜÛÙÛÉqq,qCÜòHØP­^é{Ò §ESÖNìñgá7†ü9áCT¿¼»y „”“x\È~è Žæ¼>½KâgÄ$ñ]ßöv¹´È÷`ËfÆ¥sZ7€µM[lŒžD'»×L«Æ óv*¤×]^ ynfBŒÒ€TrFÑ9—8"½7Xðu¯ƒâÓnmç’kÉ‹o v®jßO¶Ô¼GÌÑ%ÑÀqÆô¤±zô3M=™ËRWyðÚîo³N²ÐµÎjÕôÞfµb=SšTñ4§¤d §³1©h †Á\Jtq´²¬q®]Ž÷5¹Ci*I"h]£‘p㨦ð´oLù5(£ŠÞ×A$ ï\í£í½„ŸïŠéuÓ¾!…àµËY~ñ2ÖÌe‡‰vmŽãŒmA©ÚÌÛ’UÉí\Ê@$FÊ3 ʦ œÝÓ±‹¤ž§¤yƒ¨lƒQ™Cm®=Vö]’·gþÜåÙO½sÿgÍlÌý—™×¹ØþÇ¥lÛ^¥‚§”·7·L¿TL/ó¯?·ñÒÈ‘º/=를¸X¼9¦ØÞJ`$vËsøšÞE9K{XîÁÅÓŒ¦ûXÙðD/i’Á0»bCV‡ï ³H Çò¤ð¶Óâ«câ8 pqÈÈ_çÍsŸîÄ×QB6íL–ú׫B|¸{ž›©ÉE³³¸Ù­£Îì©ük§KYFÆÞ¸›GR…úbAλ½áÿ…kÇÆÅ&´è|õS|y;©…;ž(}Û¿•ÕÍxfCð(û«Šf6·Þ➃ä'u&ý*Ìh§wqƒU€s8µÓæ”öCúÑÛIåtiü½ræ1þ¬“];¸$½kžð½°—λnYߊéí¡fv“oº1{OCI=I#Äq}æÞ{Q¿=zÔž^ö8^M;`ý£Ú¼ûõ ­å|ÛÏÔàG9ÿõÕ—%Ôü¸ÏsP†Ü;w«Nú\ ’9ÜqøScE9l0íW ?‡ƒLǯOðªMr²NSTµ;Ï6·’5Ì¿*™8_ÏÖ´ЃNBÊ’C$ËpÊêVÔ¥ÉI«—‘È úwÇ.ßövœUȬ®£8+¸ûVôztñ®û9ö¯h'Ë&=Þr èmTG©Û}—=&+¾#ÿ?^ý*¸LE¢Ý™ÕeSFcF“"®ø$ðÔñÜm\2Éžÿ»5×[ÚA4+,^\±·ñÆÀƒøŠ°–qt+ùÖ+£-SfëMõ8G»€DÈêÆûÀ©A“iÓy¶ÍæByeö¯HþωÿH÷Zá¼[£Üè—K}mÅÃåñüõë» Oê듚ëò;hGØÅÅ»¡º„M©ØÍ%—ÌdBÑÿÀŠO $WRè;×l–Óµ¼ªWÃ,¿­TÒõX£™LåƒéÒ¶u[FTþÖÒ9&ŽD™Õ?å¦ÓüñÅV"›ºœz5s}¨é|Y(›z‚y¸ÿ]ÄÚµ•µÔ«´s=2ÀŽ~§¥â}A/4Ëk«vc ä0>Äwút®Hþö]ᔃ]Såi&\¤ãkëëðéÖíM|¡}þ•çZî¡-æÁ#aOÍõ¬;‰Úk„;™ˆêOZ»o¼ºHå—id<ôÏ5PWÑ %´MÍÔv7Hc¨<ý]ñ\qØj¶SÚ3µ]û'L⟥_Ùxn(EëÉbO™³+¸öÏn+›>(%Õ¯-R5Ž$BÐ/$ð¨¨öÉTTÄê¥5 ž¯o¶½¡y7 æC:už„{ŠñÉü#}áÞGtÞdd£Ïÿ=ž¿QßÞ½áýîûI¬ŸïFr£ý“]ˆô5×tƈqpŸ4-þ×§Ð×cIÊQÜó±”Ü“HñÏ/oñw­*${µ;s³æ?^‚©È†Z7FÞ§ ±³á蕜ô.ä ¯ O›ýO/ Oš´S= ñ2:üÌç4¾0Ó›PðìéîšKÈëùй¢G³M‡?_ΪÊÞR[G÷§àû(ë_G^ ³p{3Ôšö“q0ü¡®•ܦgÀ/þÕç,²[ê6ãp –1þøcó¯k°‹ÊµOÒ±n|=ouã4Ö%Uc±¯û`Ÿ›ðˉ©Æ4á¢Fui¦¹#Ðó-OA¾Ò§Ó`»Ú äfFóÏæÆÓï^Åá½ 'MH¢Ué¹›Ô‘\Ç‹ kv¯ú¸>¥««Ó/7éP¤|ÊÓíŠk P´á:IA(­Ïñ¾›ªkÞ6ÖEº±¶·rÌG@¡FI5ÎYèVxÎíÇŽµí?¼¶ð÷ƒnÄIsêsÝÙ¹b}xåš|eÖ$EÝ$ŽªrI¯7¥NÑ‹9kÂÖ6 Œ%º$k€Læ´/ôIt>Þ[Çòî&8[qÔ(îk+îô¯ µ)ÂVžç4£(Û™s»ØUiqZøÓL(|ÖãæÖ¹?köVÆ83?v§‡§*“QŠ!]»7zšÏª}š&ùïmÞªyVÜ·÷«—¶óYËî庚ص„cÞ½ÉP…;y4ø¢yeó$mƬ‘SÇË÷sVÂdíÈLn#œYûÓ»KaZR»KbˆN)Â/—Þ§0í_åRG­aÎgr çÍ)ˆî­niz$Ú•Ä1ÇÖWÄyé÷˜û ½â/¶‹w[·Ç"oFþbºeB¤i*­hnðóTÕF´9¯²ÛǨö­ëIáÔ×ɼU@pÝ7þ=P‹û‡ƒïN0epàðEgCéJÍ]>‚¡[Ù»5tÍD}ù̈ÓXN<«„=vŸQê;TÚeûø3Ä^[HÒiwXe~ÛOFã½\¶¹Kõó2­ÈÙǽgj°·ûÉû´%w>žÆ¾‡ ÉËÍî¿ÁŸA„åŒ}Çx¿ÀíuÝ)5[·Ùór©“³¤Ëþ5Îi ד76óüŒbzS<ⱕt«×ÄyýËŸýü+_ÄzZîþѶ\FÇ÷ª;ï~5Ú™×khkh’ˤ\}‚ff´‘ÿѤ?ÀOð¯jÉÖ4ùSX¹Ž™¸2àuÛÔþU§§Î5=1ÕIû²c®GëPjA#¹ù…õƒÿ¬ þº#ü_‡qX»¦ÚG=­&f\ÛEý™ ô.Í;%SÕü gj¥ÂÛÌŸëJyS{²ô?Š‘Zw:…¦ù¢‡o•ÿ,Ë9$W7ö…]bÞ)W1ÈT•õìA\®º²i„£¥ŽÛDt$3íPïæÛ¹õ]»‡äk"?‰V ê ÇP@<¹<ÄŒGVç8}ê-WQŸ@¶†ÂÕyä½h­ÖVÂå—¶+Ît­*ÿIJ_ê7×[`¶’»i:á¤ÆÕôÀɬ\åQ¸¦sV¾JìÕ]GÕo_P¿ñ4²±ÿI½&Øî)‘¸ŒŽ W«éÓXImdÖ3ÆöÎêFÙPˆ£ι=7ÃvŸ¯é“D·o&ÒAœº„¨™úãêkáÒ][Ú߯é +!Ú§ÕTîýh„'Oâw¸áÜ÷û MËÏq¹¼¶*z ¹þµHFo5‰¦+û¸?tŸïw5‚|WemÖšòâ8ü¸ƒ •‰úWUgÃj˜mÙ‹z“Îj•â¯mÎyÅÒmÛrÊ'@* Nïì°¨‰s+‘R{þ`8DÏsú ¡Û™šôóÕböQßñ¢:êÌ µæ‘,q¢DÝ£ëTubÛD´3\6d ùqŽ®j䳈ònÿSÒ¸-r[+v´“:sq‡ÈÇaõ­ã êΚ4Gyôï ®½4zÿˆ?Òfqº cþªíÇsßšèeÕl,×b7˜W€±ýÑ\ÅÆ«w©:Å0Œ}ÈbS€XƒG¾“™aOWëùQ=dÍæeOÅâÎÕî%xím׫u'Ø{דëž%¼ñѶ‘¦N"2ÜÉŽíþ? Š]lÛŨÉyä 8ÚFÞƒýkÒØÃ‚;õ¯7]E¸CCÌÄÕå—$UŽ“Ãšf¾jÛÆÒvcÍu‰p§OJåtë† ³v=kAçdä¶s_9]ÍÊòg™QI½L¯Þ‹nÓÍ}±C \Žy5Åø‚ßìílñ?Q•oB mÞ¸¹Ö$Ždùäl;ºPê–ÞRKe.ÙVüÐÝÆkÖûA6uEZë´MauM" ’ß¼ÆÙûC­k¤á×çÚG¡æ¼»Áwí ÔöÜ?ÌŸQÿÖ®äHQqùW—Œ¢éUvg<×,´ªøKHÖ÷;İ˾œW{á1áíB9 ÌsBcõâ»-NõãÒn‚3))µHë“\OÚÞX‘$vÆ0 ö¯k,£^tý¤å§cÔÂQœ¢¦Ë7Þž7ñ'ïáf~:”GåÍp•íž(ž„H¹ß¸=&±¼SàKK ÿiÛ‰öÛK(^2yÏÓ5ìû6ãtuÖ·ty•º9¡Õk ›TqÐÖ¹q/θãšïíôiu´¶Š-ß0ÔÿŸZà© Ni#’”®‘Âdár{Ô%ض+Ý5_Yxkáž²c‰Zé ä+Ï ¼W›øsÀ×ÚûyÅZ8;v'ëè+«Ø4ÒZ›<<œ”c©Ç“óPNêí¼{àÈ|+m§È’æK’á—·pôJ.Ìç­IÓ›‹dÐ}ç>ˆq^…§êI6•ˆ–PˆNÞ2HãŸl+ÎâûÇé]5…Õ¼sÛ—Ë€e÷¿úõLjW‹„¿wÊz…ra¾šêeXÄqÌ¥‡ªñœ}+Ì5ûùo¯žY;‰`GO¥tÚî¹+Kuyq—M¸Fìyãë\MÜ¥ð=9?iNw„`ºbjû‘‚!ïÈê9©PºN“µWÏÞ÷¤­SÝ=›ø©ÄÔóÊçu4’¾BèåÁät¦’øªP7¯©DC«ðR{R[–dö!êÆ±•rÄ+Y#W]J6lӊ܉WÌàÕèž)íRXwfÛŸ~µŽ ”åë¡Ïõ4¤ýt.hú$ú5ÃÍÛÌ|°ˆ •Ø£°ëMñN™y¯CkäÚÇ–û³—È ãØzVŽ•o|úU­Å¥×žŽ™6÷-žÙ~¿÷ÖjÚ^ÄÓi• ¹b“ƒøv#éWYMÅÓžÅUçiÂZ£Êî<1«Bù6m‘ÏÉÎj©¶ÛË1H²ŽÎ¸¯gù[­VÔ4Ë]RÆK;¤ÌoüIÃ!> ×ÀÓvÕœßWƒhñ[> ¥7G(9÷­ûMB-^Ñmî—(Àa×>µ&³e>‰v‘jPC,Lqsåæ9=ˆìÞÕwHÿ„bíÕ.-¾Å1þ8Üì?ÏÝC Rƒæ„¯¶)Ð|ÐwG3©élë•Êçåt®›Ãšøž!ezÊdÆI?úõ­ªx~kK6ûM¡8ê@õ÷õÇϧmf–Ïæ\ä¥zÉ©.hžÅ9Ƥt:kd:.­åŸøô¸áO¡ô«:ìNö_h…˜MHÇu#æê+ÃQK»V²¿ÜG@ç†Cïþ5·hîQíææhø-ÙÔôjWOB&¬îp7`ÿg¡ž)"œa¢cÔgú¡©Ëå]ÙÜt ŸÖº¯ØmÅÒ6Àa؃ڹ+Ì]*ÁGg½p×Âò§(ks:+:Å̳XÛ\üÒ\«¬Ãw—aÇç]‡|?6¥.‹x#šîi<û˜Ì õÉ=ð6þ5Êè–Wzžª–6Ì«$ŽÌd~DŽ­øv÷¯MÕ5{-H>BùÓ"–I9y©?©¬pTÜä´_¿Ïcï\´žõ-í· íoc7 p>î#ðªzfœÚh¼¸}ÑF÷Rˆ¡“,yúWì­¬Mzë˹,pk®žínlm\ÌCå']¨ó“ÏÒ»Ü!êIèy”£yt Ñ.a¹ñ›#GsäB aqƒœgÚ½g@¸}KI…£•d¶wmŽ9Œ_sÅx¹ª¤wêlàŽ(mÓlQȸtž½òkgá/ŠnlµWÑ&¾Éxã ” þŠâ•gYÙ-:¦!U—"G·Þ;]J¶I*ĘÝ;nä ýÑõ¢÷T²Óíñæ,q Æ}…q:ÏŠí´¥t…¼Û†É'wûך—Н‘d•¼§pÝ€çü+©QJ×e{¢:½Cųë5–ˆ’aŽÖœ.ïŸSZ·ÓmÒ]béaŸ+v\ŸRz“U¥¾Ó<köKŠ}Dñ,¡r±û ãõÜÜÌegf‘^§ð­Šíè_2K{#ÒÅN›K(ýãòǽrºïŽnµ5k=#÷c¤—G·®ÏzåRÞêóz챑†Á?Z¾-Ô&ÈÕT€WŒÍ)Ó¼)êûžullcu û”#´[tT ש<’OøÔ¾FÕûµi$òßçMÃÒŸ”™[ËàúW‰®m¶Ï7™·v:ÃÕ+EÑ6í‚ ý+'hf¹­ R]šLò;cä?7Öœýë!ËTŽk™®nžâ'exÉUaìjsªÍt».V0Å ´pH>½ª…²:]Í_—®ELñüÙîkép´iΕ¬z”éFt’kS"Âs¦ëpI»>\˜?C^ž÷¿CÈ5åÚµ±I>ÒŸpðÞÆ»­"ãíZM´§Ÿ“>¢¼¬Ï¬dý:µ6ž¡«ÜŸ°¸í¼ÿ!\ª›%±“ZzÆûUNìæ²ßåÀè+Ü¡J”`º#èi% qduVzœ6úQy¥ŽI£-“¨ÜOÞ?Jô›‹a>œºl¿¿Y òegàTZðÝäÊ>e Ý+¼ÕƒÒ¸ m ‡ÇVËûÉ'Œ†úà×°GÕ>¦°Žˆâ„}’·sÅû[Âבºä8U ôûãü+Á¬_jÏO”¯5µâˆ%ºÓá´·šIf{žit}M6ÔˆÝ|çåŸo#ØfºbÒÛMÅRwÝžYñÆÞé§ÒnŸjÚxcBß6üåÓäUèßu‡¼ñzQ¦OB }÷Á==yÆ+–¯Äxø‹{GbH1æ¨=¡À…£,«˜ÈÈÆÍeâ­Á"•ù¶ät¥sÔÌS%½¾7?ë9“9Ïz¡Ÿ^´²#+ò¬3ÈŽ 774â’VA&Û›ŠxŒžz RàpŸUÉ='¥H"CçÒ«ý¦ø’UÕÆ© )˜¥nÀWÇrIè‘ËfhOZˆ™°=ªL3>î(óYeåx=+&µL\Òèȯ~Ùioç[7šŠ9^õ‘ŠŸ f*z×H ×%âýùgS°]¤­Qüë§ éÔ~Îkæ8É=$lÁ®4­ïÒ´„°LŸ{$õæ^·ó,W ƒØ×Yo9+½9ïW_ìå¨J:?,–oÄt¥ù¢à63Um.”f&¬ðý_ÁR®Ælw™–ØýEMƒ·ÔwõªRn…³òŸqRGqòäî<½€´«f¦D³Ò« µp¿bxƒÅÖZm¤ÐÁ.ë²01Î ]<=J’QŠÙÈxïZ7ú‘µN"‡åæ¹8åÙMžg¸™å‘²ÌrM,vÒ¿;x¯¯£J4i(kD<Ê:šwÚôjCnû~ínx?Ö:ö¬ðj·ÿbµHËïã.Gaž*×/r¹ÌG»/ÅW.Z»¸ü£Å©°›QšK%=QpÄW[gáO†ÞDQ”»šwp3$1«Né&J¨¤ùSMsBL6óÉ=I÷¯3ö-SйÁ˜WTíži.u ìx?îÕlØï^°^-­•É#ûµÇÝèk é”ÿ«cŸ¥rÑÇFwº<¸ÕLÏÓ­ m;}ëÒõûW†´©NÓ$;¡?† s6v‘*®´þÖÑX›"ªc2 U»†¶ÁWæ®ÑÕ‚•ꎀ#`I»ËÎŽ£Þ¬ÜØKa7•&ÓÀdq÷]OFƪDw. jÜjŠ|5ö9­š[«y·60‡ï/Ò·Ç`ý´y ½ämŠÃs®e¹±¢FSXŠ€B«úüë¹1.8é\Vóø_§"»Œbáþ^p+º ’ >G¢—,T|ŒËM,Áâ[™"OÝÎTƒØdå¿QVµcN×,u%ÿGK¨xaøVoܺéÖ1«I+»8Dä“Ài^ ¶¶²{­U³s°|°q×ÜŠóêJ³Q^ê9äêr¥¡¿sim©ZIgusA Ã#ôÿëó/øJ÷ÃÌ÷VÍ%ΚO^{?¨÷«Ú‰u49•o"WÛ‰r Àùǯ½u:‹l®‹…šÑÇ ç®cçý±•Á÷­¨âv‹5„ÕýÖyæã GH`Ušßþy?+øwÑG}¢kíæZJºv Ýa•±‡ØôÍ?Ä?­ï÷ßøyá¶™¹kmß¹ŸîŸà?¥yÅÚ\i·oim5¥ÊõŽUÁúŽÄ{ŠìUc{ìΘU³¹Ü\[ýžãɽ£‘Ïp}+BØ<(’ó¡^Œ: î>•ÉXx–æ(EµÃ­Í¨éüìÿtõ…néú¤ .m¥hÁ<Ç'ùæ´rm]Н´EÍt,Ö.ÌŽ2¥yœ»÷¶Y¸8"½bá ¼²xÆØ÷tÏDoð5æºÅ£Ú]Ç´ä†â”j©¯4sÖwEïëÿÙp ^gÚ)aÃ…?Yñ7±…vùú×6$Ûѹª×*Œ¹nNxJI&êû¼­š–vÑ|×O¶ÝN1» 3ÿqO¿­Hú¨°ò.FÑ<©º#ÊòÄw죹ùcZ_Mqþl»`Œm îáϧ¯NµGSÔÝÏš¬ „Øàƒµyõê:’å[XŒE×,F^^5Û;ÈÛ¥w,ÍÜ’{Ñ£ÎÖú´¨Ød~¾•@¾_ªÍÙ{ Ú¿|c?Zˆ®U¡ÉIÚiÔVÞgúEãmŒò©ÝêñÖæŠÝ µU†6êQ~lÙì>•Žó½ÄÌò33±áR´m4àÿ¼¹n?ç˜oæ{Öõñ”è«Éž•lT)&Šñ‹‹ÆÄ];¹éÿ×­KKXmyýä½ä=JŸ(éÛ<üÊÕó˜¬Æ­}/hž=lDªúûßÅÇ¥/–BñúT>Ûª@ì«ÃcÚ¼ôsXl™î½}iˆ]_¡ÔŽîßœÓN ˆ»‚ñáuª$½òü.à7ïÂVˆ!~îEs^,œ}–G’Ewá¯R¢¹qWibñíœ;2‚P ¼:ät<Ʊ1w˜?Ö(çÞ´t¹D–Il•=³_M†µ7kîz´Ÿ)4±+ÄQ×*ÜWô6Ú=Õ³¶|’Jb+;Í q‰z”ý{x• ó¢ÿ–s&ð5X¼?µŠ^huis4Avûî„cøëU¥‘~aéΟ:7ü}LœxðªÈ>b?ŒîǦ §'Êõ:›4y7_S±IüFkFÚOô„Gþ4'õ¬˜¦ºw÷Çà+WD6óxšÞÞé¿rŽó8ÊŽßO¶W±*IÏ”ô? Y›n ûÆU¶˜Ë°Ê/§p+Õ¿‡&¼{Áö_ø…æ¿Vm0VÙ?0_aŽMzµÝí½š³ÜÏ€¼Ÿ_Ê’—<¬‹«Q6ÍîÏÔŽ1éTõ­RCº¿™°±F[ñÅPð¾¦5;kÝJFP—ÉØ*­qõ jk hÿ¾šä‰cqsé[-ÝúÓ¾Û_¡h÷^7ñÌÓOäÂK\Ý\7>Zgùž‚°õ!]VxlFd+y$ õ V+_ xy<5¦È²]MóÞܬßáØV‘§DŒ‰qÜÒtôWÜæ%džýL øQ×µ {ve¶ŽG³u׿i¿üàû/泉ÖÙ Ëyyó|à++ÂTR1½–+ QºY_…s^yñ3â)ñuïöfší‰ ðz—ÄÙ‡ã\•£ïY= ›ž%Ô­üQ­Þë[ù¼›b¦# øàW8m7¹~Ý«R0Å€õäÕ8çD‹Üç¥sFRMØÁ÷*¼ ®‰Û½G<¼†Á©g”».£ŽÚi›îµn®’m‰ž¥m¥[F¹Ùžäš¿º0?Ý¥ Æ8\štrí\w¯œä÷g>¬R.pOZ`,¬~\šq-»%›4ñ„FÏ~•š`$c:D,ØïëQ§ íR8]«†àÒ·Q”dÎÆÎ:ÓÉR¸šf>F;ªJ7{ˆµ±ù Õ€ŠÈceùXa‡Ö¨$þW;±š±û˜“É¢ÖÖâhòïhm£ê$Æ¿¹“æCõªZf¹=“€ûš.â½7ÄÚbëCá?{ܵãóFb•ðAÅ}6´q4¹g«GD2= ßÄz}ÖÝå:ZÖ¶ÕaÚK¾@î+É9Z¹g|ÐO“ÌhC‚è¨<ʦ¶Y ü,Nš=Ž+ø,–]µ ·ˆ<égUŒsƒÁ5æÞ yµšËt0gåÒ¢–ò÷PlÊìsÛµqÿd¸½e ½’]MßøÅçÁ¦þêÁnæ²´ÿ kÚÅ‘Ômì'’Ó$‚¿.G^{Ô1i .3ÆkÒ4ojV~‡F(´ˆmQ´gôÍw{J8z|°ZŽRåZ…‡†Òáy«W|h§n¼Šÿz§ <©üëÏx™ÎWlå¼›»9± f]£šÖ··‰îóI–&*S íV’7VÏAWR£z1NáÕ¾•¾À\·êloëÒ²u›‚‰öxú·ZTâå$¢®Î£@ñ®©»EÕÕZ&â_×ëØÔï„ÁþÕoÌäJ‹À?íŽÕÃÛ[‘(»ýÄ3['ÙoÛ̈»ßž=×ë^ý:Ôä•)ýç¯F¼*%N§ÞWÓµh¯§_n6Sþ;ûËî*ùÑåÜÞK¬»pAéz؃NÔôD–&šË÷Ÿ™ ”÷Z§§jfÁÒ7vòTüŒå™=û'ô5èÑ‹„y[º=zQq\·&‹(ø?,‹ëÖµtû”¹”G"°ãª{*¹6j۶ƼHm.ÃnÙÈdîµÕÚ›cÆø=^µÉj?fš4Õ´†ã8{rØÁ=±ïÚŸ§_ác½µoÝ·ÞSØ÷¸çQ6sJ=Kð8µMNÖI6ùû¥òÇ~ö=ˆªš}ȱi¢Þ¦U û{íÈ Ö>»z?¶Rý>ø %_á~yüÇOWsmã2Y‰F G …A´´}EaѪš‹:aE7ª=íŒú…¼.ß3g#·S]vìÛ^moâkgÔ´«†eòÁÁ÷P6‘øšô“²²m!äÀaÓj*µ òÜàÆQå”cn„ÐêDz“\þ¹â[K6·°OÞÝ^9^:"àäþUo_Õ`ÑtDzq–ÃsÏø×“iW’êÞ/’.6‘{Ç•tѧÍï2(ÑR|ìö 2Ø[Y Ûó?Ìäõ/öuÕÅ”—FU³µŒeîå_}?¼}…nøÂñÉ Õ5_ÝX ÝûÆÀp;ŸA\ω5óâÝ@ZÛ‹Dµ#jŽ<Â;ÿ‡¥y1¡½jÏäyþÇGV«1âÕK»˜Ùš,Œëµˆõ8â´"ž•Æî} R¼°ëmÓpT{UHßåÈ®˜á¨b)ÞžŒ^ÆhóGFjߣCi¾×†Ë;†¸´#r:ãÖ’ÚðmòæèxÍS¶5 á ò·+Šæ…9Ðä¶ëÜ• ©5±·¼ðEJï•ϨªHå¢Y^ÿZ˜I¿w¿júÉJÖ=¶”•ÑÒèš™µš)‚«“ŒçÚº üZþkH-£û˜qõ® +&rØ à»#üøü?:4{š+;]¯ jÚ6‘Jv™6n|v':…ó~úç÷ò×|£ò¯8ÖõÓ.ªò–ýüÇòÍGj´×BáJ-·Ñ—rhÖº®‘Íce›‹·µÄ |©ùšî|¸Óf¿’%‹íR|±º ŠñëM¾hy>ærØëŠën|quqn¶zj-œcfäl¶lú×>)ÂŒ9¶HÇhG²6<_ªZé÷ o¢í¶¼WÝ<ýÁþÉ_ºIïX7$‹Sµ¾ Ñíïá%‰¶È‡Ôg¡úÆy7· Ÿñ¨X¯!Ó„WÎ}z¯;’Øò¾µ4ô Ô<%Æé|9«-Ì}MãæBp¹‰noô[Y’KiS–¶ž3ŸÃ½u$Fã§Ùù©‹Ìöënûg€}Øç_1Gû¹å]´³;|Hè†1uС¢xÂ)ÿu2ãj›Hçñª¯ é×è¤;×=*ZÑ‚ÜôK·’ð«)=sÉ­HÆßáükœÑ$á±]$*q÷«ç1WSw9ê7vÙ8ç"Æß½@‹åÈ¥:u®;ŒØ>o¼¤ÀÛïS½±¡#.ÿv‹Œ¯‚Û¿{54ñm_‘°qÖ¹»›ÝJÖãnÅ`OÊk¢”M™p6Ì·wâ; IŒ^kHËÃ\€~µÌø‡P‹ThÞÛwËÔµÞŸ5¼¬òA´9Î>µJH0Øùô\;Ö7ÆrzSî|cq Ölåibÿ¦‹Îk)e:1{'Üï|Â?­8áùë^{/ïp"­fÝx›SºàÜ2Dâˆå5[դ͞Ÿ<öð¨ó%|°ªx‹I¶á¯ŸDæ¼¶K¹¦lÉ,õjŠ»!”BÞü†©ùž®|q¤F€iHÆÞÕæÚ¥ÌWš„ÓD›cg%GµQ¢»0Ø:tp-E-‚Šu$i–ÅtŒÐ°²šß·²¯Ý¨4Ërkf4Æ3^N"³rzœò•Ùpb´"|mqŽõÁºžôÙ‘\Rw"ãÌ‹ßð¦ï?ÝȤÈî¹ 88¨°®H.ëEÊÜ‹säýîÄóSG(Õ&w/k¾6z›$Ì;ÿ ØÜB¿bHìç_¸Ñ®û^q®hÃÇsÙ®ùg7¿ÿ^½-õª—öjVæÞê-ÉØ÷Cê vR«(èö;hW•=ǃÛÜÜéWEÂ7”§€y)þ"º Q/!FÙqéÞµõßËl•óm³òÊ”úú*åW:Ø“sZ9ë·îêUG¦ª)+¦X“Pš7D™˜ WÜõ½*Þ~¶—(ãýMÑ+' t?U¹Dž’t~Túþ½d£ËfÍ›ŒgøzŽ+ øwQ^R›º:}D¤vWsÌÊ¡|§¿‹wvºÊÃ}dŸ½Ž@é¶:ãò©ëwbep~à@vÉ™£\49MÜTQÁF:½{yFVFÞI›Q°ò°ñLn¡^ûˆ»/ j·Sifo•†Hä8¼ê?º ʳŽ+÷·˜íŽê€þªF ŸjK1káénn¥vû"#y ~RrzcùW5|$ÝD¯ußÈÚ£U!©{Åwû!/—nX'Š<¤yºÈ%~XÆ_ù×?¥ë0ë½Ô±yg<.ì€;Wmesá¹î¤‘ciòYÏðF?Äð+Ò”Ô!trÔk“Ý*øÓ_Y¥hâo“•_|W=á½*=KS[‹ÆQin Ó3ýÝ£×ñªGq©Þ˩ޯ“ ¹øØƒ»:ÆÖ|I>¥ Ñ4½Ñ[ºwõö•æJ1oÚTz-‘ÅR1^ýG¢Ù1ñ„¾(½m6ÇtZT};±üMíè+6 ¼"8øUéïY#Kº‰?uqŠŽH5DäJ¤W y{y_›Cɯ_ÚËW¡Ð}¡6ýß³nãRÍ,|ÕkK½N?¾™ÿ€ÔCW›Ÿ;r‘Óå§BŒéKš›&•àïkA(Fýâð{úU‘Še™9¸¬»IEÛ%ËÕj »´gúW¨ªÂ²äžç¢ªÆ¬ydhÅp«pцÊ?Ì¿^õ>>_½Ò©ÛF©¨[¿E$©PÉ\ÿ:çuËófÓM{/Úne‡d(Ÿ)ј{έiڕΧ¤Çö—ó$]«ÏP `~”½œ®’èt>^v“:?ßùÞ$Ó¢ɱ² ê§§wHÞæ¬ý¥¼eâvˆñe ñž‚×ñ5Ê™ü•›cc#kŸö}?ØŽøh: µ·\êwƒÌ˜öLžÕ¼¢“º3$Öåÿx¶/øô´u*Ÿw>¿á^o.æY[.ÞµªjŸiÔŵ¬«,*᤟oß#©‹Z6P}­ÕåVõ Ýþ¾ÕÇW 0n]?޶&8Úú"Ý®nvýå€ðÎ:Ÿ§øÖ«¢Äª‘ªˆ× ©Ÿ*¦®aÒ•$˜¾•“>Ÿso3E$  ­zóò‘Ò²5x[‘"¯Tçð¯JŽ2w呬$Û³9ChÜgåNI{'Ö¶.FÁ¬#÷«Ð¢ùµfNkf›El[á•ãšíb EŠò[{¹­œ"f¯¦¥V5"¤™ÖÕÑ'”›åµUÐÄ¢±¿»IƒýÚ MÁ£€ QKÍPQKŠJ T±.uÏJˆT™ûRdvžázÕ#–®oG¸ñ]q¶¼LDm6ŽI+2\o½M1¿Ò¿§ãRìU_ZæØZ‘ˆÛoÞ©cNy¥ÏÈ´‚O-ÍÖ“m…‰·G»nhyÓvýj˜rMVœ,Ü;6;⚥w¨ÂïV7F?xÇŒ Ŷœ‹¼mÀ'îÖÜvðÿªNG95 æóýªÎ>ò×e9Sâ‹‹[¡ˆèkkOñ¯¦ÿ¨ÔfàvÞ¿‘¬®eùz޹©ó¹p[ŠÎòƒÑØw”^Œô?âeÒ'úUšÏ≶“øs[šÄÿ]²¤÷Mi!íp¥Gçȯ*ŽP®;:×3¨ÇµÜmÆ+«‰›mHê¡UÉ5$}Km¨Ú_žÞxg»£~ÏxDŠ->êòÊ›deÞÐôp~_ð¯ðÍÙM?äiHÜ€Qˆ85Õ[x—[´léÈTE?ZÚXõ 8µb£‹9>…-#UÒõmñZÊÑOú<­ó õ_ï/ê)º‡–íŒÑ“÷Iõ®{Äš×7j¶±G9ß$q.ÜÕ”vªvž2Ô¡·[KÕŽöÀ_;‰þ5݇ÆFqºgu Â/â4/å›Î1ɸcP*;t"`Gù4éu­'U´Cæµ­Òœ—£÷ºU«Kcò8ÚpxÃg5×íâÝîw©ÂzÅ›ñêYÚ ?å¦8¹®SYÔçÔ§Øx\ð=Mt’Yç´cv=sɽëI+(DæZ·[“ˆ“vÔÑðä{&†ØmcÆxY šÒ¼×`×ïL’Käèvoò3ð'aÐýa\Üš´R‰¼Ã%É ñÇÁ1à€ž§ð¨c±¿×1{¶ÎÅNR\qì?©¯3‰Owh£Š¦%SެŸR×/üA7Ù4ôh,‡V=Ç«…Y´³·°·òã\±ûÎz¹«"ÍlÐG íQÛÖÜ7JòkâåWÐò+âeYÝìBvm÷¨]ëÅYòÕ±†ÿiø;úW2g9IÁè T–Ò¸h”Ö£ÂU2W§5ÏNkhT¶ÃF9Ó’Ýoà “í̾Tß»“µ_1ÕÌk.Ë~~\b»h·VV¾¦ôÛ5·˜u' ýÖ*ÊN³.É[÷ƒ£zŠç­/ßnÇV‘M\{¸PŒ3 ÿ³œW©J´—»5ó=*5ÞÒFÔŽßdáTrX“íE•Äv ×_™ â!Û'¿áT£¹2Ä?å¦:b§€‡•2»y⺽¢Ý3±M^é‘Î^k¦’ḟ%‰­ÿ]—g÷kiûzV å®$+Ðcõ«ÃU¶Ñü>RYo®NçþY 8ýO5›«Ê:sP—3f…Þ©ž$—içvÓÜŠçµoÝj­öx¸~`åÛý£ý+æò[‰L²>IêO?€­-!Eæíî+—ˆj7G/'~R柦¥°ß3+7§a[¶çÊl•¨mã¡öÕÀ‹»îàõö¯Ÿ­QÍûÌñg77©c!‘ˆèj6±=ºSÐexlS$·uëf¹RÜ„<8¡?J‚@êr*DÜË÷zŠ9 ã žµ†#ŸÎŸóãw©Žãw¥4€BŸ-5igž tó&uP9®+W×f¸˜¥»²Ä8u5ׇÃN³²4Œ[;#=´*ZK˜Ô{µeGªC¨_IM˜ã þ8®%ä‘ú»ÔðÛ…Õ‘OGFS^‡ÔU897voÙ—uwäú×8ÿ+·Ô×W«ÇµÜÅsNƒÎlô'­k…~é« ¢­‹LãæÆï»RK¤]GÎÌ÷⺹ãÕ“fP§¶¬¦›rëÂTRÛMoĈ…R-Ù2MˆkîÏ™ž•Òiþ%±¸Qæ?–Þ†¼ö\õðtën¬&®{½Ì7<ÆêÚ§ÍÇÍÍy%¾©sm,-·iÎGZèl£]=b¬Û#<íúUÛyvŽx5ÎEâ½%øíÏ­iZê6·œÅÓn2ß0ê+¢³¢ìé^c§je:¸å;Šî´ÍbÞèd:¡î Uã0ÒÚZÔTiê:m¦¥Gq’G· ‡Ø×˜_ÙÉa{5¼¿y3ê;ô-CÄú}„X/çKýÔ®3SÕÿ·.cŒôWïŠ×/U¡~eî…4ÑåÅ9ÉijG³š-Ī;Š€cw-ŠõOTjH%1>ñÔt¦‰™‰l“QŸšŒv@)4„ŽÕ/ûsV,ô‹»ÞbNsCi+¶]ÊU,˜›ÖºOÜLËæÊ±ƒWdð]¼L›/<ÞFÜqY:ÔÚÜW]ÌÛ;½„J“‚k£°Ó¡³‹)Ë­VF… ~a¹U#¤{x5F @Ú9Y¢m§½yµùå³ÐÎJûõôÚCv#¬xxªi'=LUµ‰eó#lÆzvæ¬èIÿ¨ýÉ?­)+aìÊš´4Ó2rW€(/ދŴ!®:Ò îWŒs\:åÝFÖ KOx¥ä¨%O½ysÈa™Ónvšîn|Ael­ûýßì¥p׳ÅqpïmBkÔÀSœSRZѺ¸ówê˜4†â#ü5TR^‡"7æeŸ5wRù‘ÕZ)ò æ. ýš £ S¢—/˜sy÷Å»îÒ!º­U£&Ÿ(\¸c€ò@·‰—ïÕ]æ”HÔ¹_qÝv-‹4fÀ•h6XnMTó •¼±KÙ¹A3ÅTäÜÓÓ´ëk ±Zb>iŠåœÕ—B©ÖE#¸¤KŸ;#ø—­xÓ”¦ù™ÀÛz²O7´œŠâXŽ”ŽKSü¹•BD‘`£R‚Q”†Ã”<…¾ï7ðÜc½kêY,®elȹªûî8©³å&ù;šÁÕ\R~,+²\nPkrå¾+˲d?í­jEg¬Yî/gç*€Ç ð®pë’íÂD£ëÍ$ZÔ҈̭ýÎ+šqZ¸³?i³.j7ìYÂE$E¹Á¬‡|üçœzõ&­ÎY¾w–F q–ÍfuniCU«3•W.£Ü–äÖö•p‘ GuÞ° ‚ìTÐt¢¥/iµ}D³Ômöy~l|tùªá‘]”†È¯.É^R%ÝÂ}Éäð*á–\žÌÅÑ]ÏTæ\TÄ€¼ué^[± e.$­+_DËæíÏ®+–Í|,‡E÷;I%ÚüÐnáæ5úµpZ‡ˆ.ïe`ŽÉ~UqYm,ŒÜ»øiµ¿‰QîÏQ¿Ô-ím’äËRp7R+¸ñe®×ÄűòŸS\‘Êl.ÅG nâ™[ÃN?¦ª’E»Ëùïe-#qÙ{ ©EÝ’²E^Ñßf±l}_˜ª5-«ùWPÉý×SúÒš¼Z)nuZÀ;€qYQ[,Öìˆg5«¨–‘r[ }k*ÝȉÀõ® 7åйYÆ…’§ŠÐŠ î2Íÿ}V4S¼s.:µ±¡0}j+)&Cz\¿Ž^õ[]´‰ìZDûÉGš_ø±î*¦¡q²Ê@[9(µ4îaï]»ýê)¸§W®j6ŠšÞÎæéöC’e®›Køw­êLÛÖ UZwÅ.dºÉÑ^µ¤|!±.çUÖã ?S]6ð»Áöl¦I滓ý·ý*h®¡uÜð*TžXcvSê+ßµ…Þ™”Ù/”Är:Šåu?†mlÜ'˜½ˆ¬eˆT.x÷9­.âo츺•˜±ÂçÒ¹;Ù7ÌO½z9ð†¡öO³Å»É¶ÖçîÑ™ö·k*5i©6ô)ÕƒI&qÕfÞÞyTùm€+Iü?,óîÇû¸§ˆm?v‘Úºd×»©-ö3~Á;7+øÕ¨,–܉$˜t¿i¹¹lF¬>•'ئ…|é›ð¥)»Y°»rçc ¢-Ù—!ŠÑ´KèЮG$ ­—@§p=+7[Ùh„ÎTFßÜjš+9äû‘5tè‰Ójæœ>ÿ Óµfñ¢ βÐK¯™pý?„WGf‰ˆÂá=ª¶ó!ìlÿ»^¡¦hšd;Âù’¬y«g„6B(Ï\(®YfP‹²ÔÍÖôGœYhšç+/¡~*Õ¼ºþƒv“[´ÐË ¥9¡®þL*½U–?3ƒÏÖ²þÒ»øD«¾Æ Ÿ|^í7!Œ81.1íÇWNñ8þІMJÛí6ã‡D\+r{H°QM,VVñí"%Ïûµ^‡TZÄ5Ðü½µ¼”¤6-d’»×'Eô‰Ê<¨Ê;…®þ * ›y®ãˆF3Íaȶ?Z_[z4´ W“IØÄ·¶»²´{‡ÚBœ2îù¹ö«˜žkQ!‹÷L,95~-*9eË·Êy"®ÝƉ§½´K„ë´w"¦ué7¢Ô9átÑÁ˘nAÔ×_áÓÌõ×1¨ÇµªK#©=¸xQ¤ˆqšÚ¥?kÓ*´.ΓÌËTþa=8ªö¶W/e4×-MnØ[’EmwØÃ®+†tZÔåpfŽðXg­Eq!@6sÍV—P´ƒýlê ªëÖkœ>iF„Ûº@¢û—¾Õ³øV.™9·Öìà©üjK]b+éÕØ[žàUŸì÷±Ê?…Áýkª'á%¹Ð£îXìD‹¸R»'¡5•.±iBC/ÒªÙ"ð¬Æ¹V£Ú&±¹½·Wñ¦‚6°5Î?‹Wœ[±ôËV|¾$»rv*¨­£‚ª÷V²g]$éfY@îZ±®üKoo¹-—Ì^ÕËOu=Ën–Fj†»i`bµ›¹¢¦‘zóVº½?¼vÛýÑÀª4Q]±Œb­i`¢Š1LŠ( T³'Ö¡§¯ß_¨¤ö(½!ùHª |µqþõV'jⳆÀDA§ Š)I­AzS~´êi ¢M¦HRâNÍ Å-&i($(¢Š(éÏ¥UÕN|Ûpþ£?bI)…¸îy­uI¦B{ìü+:;AywäîÆrGá\4íîm-®Gç¡ÚzÐŽ@è3Ú¬Zxd¡Ý³ŠØŽÂ#Õþù¬kW§ÐÁÔFT~dÜD¼RǤIsp í•Ã[ñ[…ÆÅÀï+cz×ĵ~R9»²xzÑÛ!qì*Tðý¤L§fk]»—ïR`îÆìzÔb|°ïÒ¹mT†•G~ÕÙÛIåD‘§ÞØoAŠîª—$Qшv² “EþÒ·xÙ0Æzâ¸{ý2}6öKi×lˆ1ë^Ù§]ØYi.·O&0=w®#âAµ•´û›vÌ R}:Ëšß îÇ–æT¥ÑŒè¸ÛÍ1Ó¹e§ì'“P¹¼´;‘¼jÝ)ž@éRÆE5ÏÞ­es p‰Â*çÖ³õ 3x™O¼+@ujÃ}ÜŠÖqw@Î6XÛ"â£Ç¥vwP^&$^{ç5KD²¸òãf#æ½8…SN¦Ñ¨¥¡Ca£Ëj»•ä–w Ð!ÚÎ=@Éü‡Z†=ÎØ [¶×Cn]®B"f¥îÝ+¢°Ñ øy¸ÏA[ £DŒ&­rTÆÆ.Ær”V‡'m£ÏpËòàé4ý #OÞ/ZØŠÌE€9«;ܯ:¶6rÑ3'Qô0î48ÈN Oi¥A ƒµ}ë\&8“ð  燽sàbTvíKî›… 9 ²‘Îêç×f"É“ š‹yÅŒÒGœc®)„ŸÆ’D‹y¦KËqÅ<ÇÐPàsž¦©úŽô¨ÿÎiØù”<&ŸZ¦À§påգܨî;TB?˜f¦pw|´øÆ2Kt­/dPñ˜×ŒÔn öÏŸ‚í’Ø½4íèœûÔ 9}T|¸?xqùUß Þ*[ÝBÝA £ëQë0ï•ïŸÎ³´ ¼T!é +ø×«ÏAS÷¡s¬˜}¦'Ë}êçÿá™å%n6©®‹#¥;Ì+ô®uçMZ'2m-SÄXZÃ"JÒKÑÉ®oè×vÿoO)×"²®|1o£ÈŒÆNË^… b²SܸÉY]œÖ“?“©ÀÇ€NÓøŒV¶¦Ÿ6{úV;[M øÛ”Œ~½¨ êÎWÁüëzÖçRFéã’ŒÃv}AVgOŸ>µ C]Pza”f—“˜¬QEQE¹¤¢€†£–•7Â.O¥ ¡*Hâyv®jý¦œeä\cµlAf~EÅsÔÄ(èŒåQ#áTGSÖ¬¥”;+œóTæÎHô­»dÌ01ç(+*’qŠVÒV*DL ‹L’Ê"ßvµ^"hÿ-sûg½Ì¹Ÿsô…~clz…ô+À¹Ú¥}wWI·ÍVœéÞüçÒ­Í;"ãUÜç,¼!«ßº¤P(ø‹+«³øY\ê:²©þìKŸçWì.ü•Âu펕|Ë0ÜîÙÏ5“Ì*^Æs¯.ˆÍᦄrßL ²Ÿô‹¦o+Zš/î‚ ÔßhmÛ÷ô« ~Q2ŒÀÒŽ>wÕ«Ìæuƒš½œ&k È/Pù[ü+‚¹Ó/lîŭͼÌÇ]q’kÚ“U¹E_Þ·Ð5^ßi¬Å½Õ´rKçEå1_˜ëÓð®ÊXÞgféVæ’‹G†ë.£ ß›NÕíî µû©èAèEgWÓÿ¼¾.ðË=²/ö¥˜2[î?Š?Ç·½|ÄÊUˆ+‚8 õWt]ÕΩFÚ¡%°*ݾ4ÍÏûK)üä 7+Ž þ"º¨-6 %ç¯_ÙèŒg+^CZÛ$27*œ}* &ÙªÀO|ƵuD éŽâ³o4Éí4ë-MöùWR:ƽþLsô9â²¥z‰³dœ©Üèg¾†É>fËú ŠÊîâò]á1¬k+9u+Ÿ¸Ï&º/2ßM‹Ë.«Ž¸®:”ãuk#BÞò«Ê;SÌÁçlçŒ×?.¹VŽ4ÝïY·½ÌªìÒ³ŽrÜ,u¯s_zUª²ê¶Ñó¿#Ò¸ó31Éf5$4îè{šÛêQZÉ•c£é¹Rã=Ml`€mÝ!èsTt!Q#\³tsÓ=‡ã[:3›§K”‰²¹À=tSËÜêÅrÚ,í¡ƒœ§%£:}Â0&8¹xÛS¹Œ»(a¹`=®6L Ù'nnEz>¤ N£+É%Î>`yàõ®g_ÐáM&ÿV ˜Ëùñ°ín‡ßšíÌ0.I{5±ÕŽÂ·g‡-æÜsœsI,ÿ6cÞ«ÙÜC;7—ÎÞ†'Þæ¾’ÎÍ)j';î¢3êØªßd òõèj6˜Õ<»“k²iäÛ.OËóséU'¿¶Fùt>õ[´ ÑË–?|® ì9m«B€—=kžñ,ŸéÑÇ»;#©®Žâxí¡ó$Ú½ÍqZ•ཻ–qÀl=…u`àܹ©G[”BŒ1Ö­ÛꌼIȪN58F+Óq‹Z¢ž¦í½à“kÆÜŽ¢´#¹ùÁíÓ5ʦè›(Õ½eæÍ ¾Ìƒ\Ué%©“Š6’t‘U7p=)þaÞ_võªÑû‹î*п‰WRŠàk±“‹èGå¯Y'Ò”¹l€ªì(7±¹‹¤7ØVäð(³ì+K°y`®_¯`*)OÈã°ŠG¼^…¢¸¸O³¾êMZNëB¡ts×2®P+ªû_•88®>áÌWfÞ‡#ð¦\êw7-—|AÅzN‹©k©ó4tãTa.Ï5zòÕ•¯ßý¦(ãÝ“œ×?¼·ñS²[­i:RR¸½šZÞòÏŽµ&ʕ۸÷¨¤}¦¼]ö0Ã.*ùZœ['Ú–B§5hˆÏí†Ï½0ýïÂï}X†õúW=¯# Ò á‡Qß"º g «XÁÕ¤™F=Ïô«gG‡PÕ´¹]~vº 7¡AóC^ŽÚö‡fƒ”yÎÁZbÅâ 'O•wGoIò º–õ8ü+7Åž à qlöœËoŸàÓð®‹Â¾ñ…´Ç«LÌk¹ñ¦5_ͱs5·ï£Ç^:ÄW¡Ž…éÚ=ìBºQ]€.ÞxúUÙ –žlL»ÆåÞ¸È=éÚuªÝ^ÛE·ýlȧèH¯OñÎŽ·^I¡LKgÈû‡¨ü:×·µ§)­ÑçFŸ2lóþïÞÁ§à‡ßÔgË“Å_Ó¬%¼ºXBçv2k’•)Uš„wfQƒ©%–´ï_½ñ»CYöòÑ}ÏéRø³G·Ñµv³´Y>Z²‚ÄŸ~Mzg‡ì-ôøEº2ù»7mÝóc×ó®Dz⢟.D(?zxÌ=:4TRÕu:«SŒ!Ê–ÇSj›8§ÄÂ@Ä2çÒœ`q7<©¨ŒXv%qžâ¼S“Ba¸-úõôíDrn[ƒÚŸ(UÇJޤÅ8ÜÓŸ¿qUÆ>Ò¦®KÂæ©èÐÊÍ’Ê?*|Àì »¥,òz´Ù yIUëGP!ØzI§¾èøÛ’zÔ‡÷+Ç2*ËšS¹ì*®P{–ü)Fvo ÖŸ±cëó7JŽIÞxô·Ø ½a•½½+”mïRAÕ\øì/ãym™öð9üë½M¯^®W+:©»ÂÇp$ zx÷d>•OI‘fÒà‘Û$ §ð«[ûú×HZM¯FHBŸ¼M(åª-çix5vÜFÞgÊ.‚&ÞKv%kžÔdY7IýìŒzMl&æ¬íRŠ˜èÙ&· í+6iGI…ÆSŸz€Êjåâ¸?Z¡^Ý;4t1ûÅÊ+KQ[z6˜5y¥µ°ùy ÔäÄwù@O©­]‹-BÞ`Ü,_èßýq]t#:Ê3WºgN EÔJJ÷¸ÍSB½Ò÷©û®ÒŸt#‘_èöwVMåLÐ+0?uÏ¥v2AñaÑdÏPyÈ4Û $¶·ƸHIT€×­¶Š›vÑþzÁÒM»hÏ2ŸL¿¶µši­¤H¡}Žzàÿ‡½I ~ó^°·ŸÈ^¢`Y’XdEhœaÁî¯>¸ÓÓž(³¹‘Xéï#,oÔ¡*x?Jä©—{ÆTÝÕÎiàÕ9ÆPØõÈò—â<©â;mCN‹ê¬sF…v`7®kÙìî"¹µIau’626E2öÞ+$È›ŒROf®Ø®†É}–ywÄÏÚé°éº¼^TƶL`£äý2+Ï¿µQ‚$õé_AëúRkš æšûz„!=œr§ó¯š'ãwŽEÚÈJ¸ô óQˆÃBRç‘ÏŠ‡¼¥m΋Ã<þ.ñ6r.È癇hÇõ=+¤øË§%¶•öxÖ;xÀDT\€¥v? ü9ýƒá¥¸¸\^ÞâY3Õ*þ\šÉøÙ|+i/u¹ó·£J4éÊËtuR-'ØñXõ ¡M‘6ߥC%ÃÌÙ•™5Ø´ìþæTã½9¥q”™­]O[½U$‘w[[ƒ4ÀôÚ:ÄñO×ÞTµÓ¢–(bÂ;€p\Ÿ˜÷&¯Ù»&l¨ËÙº†6+SNÓî®u(ìJI<°ÛÎÚ©¥Áö½VÚ¡œnúMz&&ÿGtslò‡ýôé[Q¡Î®ÎœÛ{ϹÑÉáa¦é–z”²¶ËW¢N‘ƒÆ}È8­-"ÊÎ÷[—ÉÌÎkviâšÓìr.bdÚ㱯>³yã]O@‘ðFáús¡½hj¬Ï¡§âÓ;M]ƒUîUŒù¸OR¸ÏçÅS?lð¶·¤•Ë!–^V¸Ý åãÖlÞ$fe•p£©¯QKT·žy"ûó?™&[¦1S=.ŒjÅ$×sÆD›Dskpвì ÃgƒUž'‘°œâ»Ç¾«²67ÁϹ k‘7ÔùK„¯ŽÅÇÙÖ’GÊW‡%YElC KxI•þï5¨Ë|<‹$`§‚ý+zGGVI6i¿ºEÄQGéÅM)¨jÕÙ ¤cÚhʈ ‹¾CÔ–«:®«u¤ÅVßëûÅsZqð0Wñ¤žÞ+—C*gfqOÛÞiÍ]>ºœg‘¨_³<²1-ÉÞÕ W•ÙͧÁkiusé#=+ŠsóþèЭí/e¡­9^䑨OqµÑx= ©SL¹fQòãÖºØl¢Ov~ðF¹>äVR^BªàµèRÃòÅÊ[›Ó‹®U™pjOvù•©ÍB˜®ˆ+E÷ô¸ôwNjÌP\·ËL3è´9¤C:¬IÞZ†@ç«V„¡G–ªºþ*ñ##žì€+íÿ[K±±þ¶žc°)B|Ø5WfDCöe4õŠåá‘ãEo/©Î¤ %ih±ùéßljÿ“ŠèÂÅU¨¢Íðñö•Y‰áu{Ïý¦EÿS ¯ƒØ„#ùšít(áþд7êƒò:pFßäj¥¥¼0]\Ü"0–X#Ž„äéSÚpد¢ÃÑ䃋=š¹#Êûž…má¨ô¿[]Z/ú!Ýò–ɱüoÛÜ 5»øO!#nsüê¶™rntËyw|ìŠ\½ýÝÃxºaÉ4о1S(9¶˜:nW4t¿ XÚß\K4K+ý ´?1Zƒ•®Â@$\«dê P³ÃõÉ'5}þír{(CÝŠ9e’`ó¹ü3Åqf“÷W©ÉŠ“p»êgG;.7òµ1Û*ez¾Ô‘D$ýÜK’O ÞºMÁwWŒ$•¼µ=}?úõæPÁÔ¬ýÔrR£*¯Ý9)cÚÇ-·(ÑžOjìµ\ùLFår{zÓ‰çùXxäó~vù{ l‘ŒOZÑ0¹Zà™íÜ ¸ ð:×~C¹cÒ»”ýÍß•rZ¼"9gßåúW~V•ŽŠtXð¼¡íg€õS¸} ng-¿Jä¼9?“«ˆÏIAS]›¼mÆiã-OS*ºIþõÍŠ®£ 73©+- -ì–.‹‘W9î)áÆÜn§+ÇoJðç6ÙÊÓ$Œªóùæ›&ÖaŽ=EG¼g= %¾zI±ÃjÃÐÿ¦†ºO }=DŒ+֭ο[Þ¸Ù¦Iéæä+ÖÄkA|Žª¿7Ý6ã+Lt ‰8§ »†Ïµ4*¤qÏJó‘ÊV¸v\V,­Ç\z桹>s“Ñ»úVµ¼_èÉì*jËB›Ð«Ë0HדƽZ‚Ú[gh¦FÍ úŽEF6Ç¿ Ïò®ò(Æ¡d$}§p%sƒŠôòª ¬¹Ó³‹G~_ET“•ìѧ j?kÓ!wo˜~íþ¢´bp·rF{€Â¹>?ì¹d¾Y?ƒ©¶çï­$Ý÷B}Å}<£©î{-Y»ívüꦧe£k-µÂ+Fãü‘èE$nlýELç|JÿÝ?¥dÕ™›…™çÐ]êÔͺ>càŒýÙÖ»› Uu[®Qw|¥zò:Öwˆôªi¯å.gˆy°Ÿ_UüEVðuÂͤ¤} y,>¦¥Å=l'µÍc©ŒåXúµá~3ðÿÙ>(‘1ovëxlþ<+ÝàVÏç\—ô¸ä»Óu<~ö0ðìØoéPÒ—ºÎ~URJ,éì®òÖˆø€ãÓÚ¸Œà™ÿŸ¤Çë]„¥2ÙMÿ–o‘ô?þªæþ4ÈÁÖÉ»î×ñš™{·C¨­&å«Z}…Þ«} •Œ 5Ìϵ:“þ¥´×wQ[[ÄÒÍ#…DEÉ$×Ñ^ð]·‚ô©/¯vÉ©¼e§“¨zì_ê{×4"æìŽQs‘Àê޷𦎚H•e¿Ÿk^Î#qè‹ì?ZåüZKêl’J³˜ÑÈ‹€p£?­t^$¼kÿÚ@_ÝOæ±ô§?ZÇñÝ‡ØØ¿Þnsø]Û…ß±Ó'éY¶ò4Øä* „z±¯n ù²ïŸAYÉêÙËYûÏÈóÿŠ·v¶Sé4[ÝÑÂú`\1¼+ m¼´¸ bÏp½kÑ|yd5]oG°Ø­#ÚO¡#?–+ñp†%µ¼j Óí;dŒŸç^.œ')NÛ~gƒ^’ns} õu“‹šytFû˜Í??>B.;Qû¹>òb¼‹ž`±È¥q·­<àuZHâDäT„©o»Y7®€fk×4iu…ýkX‰•#ë¼ùšè|O:ùТà—,Aöâ²ôˆüýnÍGüô k×Ã{”y½YÑOH6vW»`²™»"¾Â¼Ù‰,Çד]犮Z *QÐÈBŒW½ª°~Í˸ ´%ˆ"Ô‘Šë<ðýë–·»û<¡¼¥b=kfßU‚àáÿvÞõxšrvv¢j Üöäd™à"çéMŽT»¯÷U;Ý~T¥²înçµrFœ¤íB‹,^ÞçÂ7.d#åZæ.ï&¼—t­ô…E<ò\Hd‘²Ç½G^ š»ÜÝBÂÔ¶‘‹¨ã ·qÆvç tVZy²Óžæ^%‘ µ©QA »wÑLñ¿ßSƒŽj*Y~ù¦Ó[’26Q°jÈÕ.•p%ÅS§Ç•°?:RŒ^²AcÐŒJíò>3ëP¼ îæ”‚i¿2óº¼s˜"»šrDÌë–ÆxÉ«‰§Í*#ÇåÈùüj³ÆËòÙô<ÛÙÍ[™h9S”lÚ Û9ìåh§\JîìH÷«Þ•n.5hvà­°Ï¿ÏZ’5¤7¾dW11Or8?CÅRðæ—.›®ê^[y–×6…£nà‡_”û׳‡Â*SH»¦z˜|?%HÍlhEÖ\væ™ Ù(‘ƒÔ{ÕèÐy¸ôÎ BS.éë^º=x­«N¿k} ÊäËÊ;òjö£f²ëÚuôêäC“ô¥aék$þXWªÜÈä{*k¦ÓœM¢Á–ùÕÊ¥c7mQŒÕÍ»D Ø ²~íG ©Ý®&ýãΟÄbêöÂæ[pæçØãü+ZÎ! J@#ón7öÒ¯µ1U'¢‰UgšÍɶµW ‚7¶~ˆ­y8³i¥'ÌÍ]ÏÄ ß³i‘Bûë‚U@ëŽ3þ‰á}îáâ¹~!ƒäJó«áž"¼bÝ¢–¦R¡í\c{%¹£¥èvzÓ¤²¸]¥Ñ°}V®hž$Ò O&öÕc?ó×nêÒ¸ñ.˜d²¬ñ8–ݽƣ¡ˆ`Û‚[ ({ˆ“£dzT÷º…¦¥nñÄþO(=kš{óyºç¸ ‚ûR+ÙÆÛ$Q­Â8™›Ðú|¨Š^x"'œn桲‘,ôÁo ²os—ôȦ¾òù<æ„©ÇÌÁÙlCqgr‹”–=·UCØBžRã®|ÁWv:f ’2«ý*Ô¡Ø|ÞE.cÈaY:ÄOþ°ÆÃ#½o:H:‘Yº¸cj„ÿ ®š22²6¥Qs-=$6÷‘Ê?Áü«µŠß¼ÝÔd~5Å] ;WW§yZ<&X•°6Ÿ¨®ìLc(©HÖ²[²cÍ™W>íUßW·CÌ«ÿ}Tw±‘3ûèÉèCpk÷G‚Ѳ/2{)^k:Xj2ûFJ0fÜþ °Q÷·ØVEïˆ˶$e?JÊKrzÖ®‘¢ ùœÊͬ)¾gEÉœ=ÉàW]<%%$–¬Ú$ä”w ÿÞãrcË3.5ÔêÚ<Ö6w.Œ°Üî矻ñ¬½/ |#+Àãê*µ¥tÖÆõ¢éÞæRYÎýªhôéÙ€+Œ×Z-À^)¶AEr¼kìr:Ý‘Í(¬Nž^æ=¥WþĽêŠëDcÖžT¡cfˆöϱž—tÌ})WK½Ù‘k°òÔ¿=MXŽ_/€Ø5O.ÃuŸcŒŠ ­“#('ŒÕÛ'™_†mµsY¤¼—f 8ö¥²‹kbªuT¡Ì^êå¨ç—o;½óV£•ºiO—4˜í¶¸]ŸC2ÎK)%xMÕW#“QŒ÷ÿШçû½¹…cžÕ“}ìäòsÖ®øwþ<¦ôÓúU-P‘w0+ŽzUŸ> œ¶é^„•èýÇEOi#FùÝŸj´“‡MáyþµŸ$…W"¤ÓÆ£w ¨<½€î*:Ÿ\Vp³«~TD0ò«ð—J¿Ãê+U_m¸XÛ¯ X¢Þá['‘×ëWcÞe²ÔW># V&®¤>$Zýâyö­í#P6ûb‘¿vÃò¬D“jüì¾Þ§ð¨íµH$½{=² pYr¤:Žk³(s§[Þ^ëÐèÀ7š­ÚΛ™Š6ŽÚ£ "¢6Ö œž}ê•ÙžÜ#ÿ­Oä*ÈpÌqžt¯«>Ž,¿mª„—ʸ_-íëŠÞ²”J„zýk˜¿³óü¹-ö™ËØÏ§ãÚ§ðýëGv-ŸvŒÄVU-k «áttÑåPõ^õÌÛÅý“⧆>!Ÿ%}0Üþ†ºy0³duëŠÅ×ãò®ìï ô'5„g­ŽJní®çKµeøžÜM¢¹îެ?ÀW ãK1âˆÂ)u®›nŠÃ±s–Çê(©y¶‘¤Ó©Q¤TøAá_³]I«ÞEþcÄ ÿË0O_©è^-¼º?’ 9ÁõÚ:Ôþ´ú{¸þ7ëì*;‹U¿Ôþå¿qÄ*zqüGëZSŠŒ¬ºMF5dyu¯ƒ¥šøø“]ºk(g¶OõŽƒ¦}3×Å {M3VÙ€A…ÿ™¶ӨO!êd?•R®šöt”M²HZ)(­Ê½ºnlS(¢‚BŠZ|Q¥HÇV gëEìç…´c¨_,ò£xŽ[ÜŠÐׯ –ÎØÚ¹ÚØéþÂ4m Ê”ìzšá5‹ð¤c:Ÿzò¡QÖ­ÍÑle~gsÎ]6”a›šTvOJôÍPè¢27µ^ýÜ)€¼úÕApGJcÈ^¡ÅÉêZi‹,W¬‚HýwÆWùÔgz÷ëk‹Oé!Ã+G ïÉW;ªè.ù_QÒ£1ð%{UÙ$yþ.8aøW Ás'Èİ·¿+<ßH>nøw~ñ~túwÖ­ÉÜ£¤ë—uüë³ ìåhoô YŠ•®å#¸Èæ¹ÍSO–ÂúkyWk!Áë`âÝ?eUlzXóÓtæµE )Õ-ÊVÉGfFö=ªõ¸hf§_pk·mž¤bµ¬çÝÏ÷“ƒŸJìŒTŠèuF* %Л~ÉÛÃS"ˆ\jÇ'(ï°öäð?ZeÄëç(1ä~5ÄK­¬°²‚ÙϨu?àELªXÛk›-Â[^XYÍÁ3Ê“r6×I¥D±é–ÃøÄ΀ÿÀ¿úÕÃÞÈ^T»-‰eÛ6}Èçò"º=.÷ε¾MØÚRå=zþµË:×kÌšªêèìã?:~'òÈ.C4èíʾ@ö ëT$Õ-m$šxb nX$dÓ Â¶µHß#¦÷nÜ åöË™£Q¾èÓ²“ÌGÒB¤ý*ñ#¦îkC¹b“ÜJØ…ßžØ5­œÜ}ߺ7·Ôô€­_ÄcVŸ¾sšž‘ýµâ´’eÿD³…F=\œ‘ùbº(B›#MŠ(|øëž~´Ë»Ø,-ZâfùGÝ«šÕ-,ŠwvŠC5Q4*K©[æÆz±¯Ôïòõï.¥i$oöºÚµ|Yâyu›æMʶ𒨃õ>õ‚–‹2yÎùÏ}+ÄÇb—³OEø³‡Q/ݯ˜ÄÝ#åG¡«T@aÛ/Þ©bÌÝ}†|8û¼;gÖ­@7³I'A^tá(î¬r06‰µ²«žÕØ£ Ïz—~ùx©%#Í÷åµÅr“[$SY¶ž†Ÿ7;¹ôjµs—¶å'Ö™o‰-ü¢ß0èj¹›W á—+ÏÓŠà'ÊÌÜzzÕS#[?ÞêjpñL¿?{T¸dmuÞ%üê3Üvª®^=Ànæ•%tèÍô4(b[k}OPÔÒÞÎ8ÙLe™_Œc=ê FÑÒ)í®bh¦N¨ýr+©ð9êW™ÿX#]§¸9®ËWðý§‰,|¹?uu /~¨¯[êªTã8ntªI¤ÑóeòmjØðõÈ[)£-÷ïÀÓkK' ÀäSUBmE#ø«æf¥ ÏPqZ£?Ë(ùïN ¢yAþujXé‘EæBÊzŽ Žn¤”ÊmAÔš@7:ö«“À[<ñM³Œ ÿìŒ |Ú\ w_ÞmÀíPEÿvÌ=ºŠÐFrj>ˆí·ƒWŽÅ¦ÊßjUs©µ»ÔðxûÕ^x„˃ùÖc‹¨_íŠèŒújoƒÜ!Ï÷±õ¬//P“£H~” :ùþó0úµ?bºÈ,GªôÙ»ûõíFsq#c$b«\ÄÖ× í%z‘V´;(¯^a#0ÛŒc޺䢩»ìo/'S¶Vûÿ_–Ÿo¬ÀŽ…ZHÙOÊázõªA£ÛFüÆÍõ«ŸcŠýÜQ¯×=²Õ¢“Q’Ý0ŽŸ79Åvš~·*"GtÞd'…˜sc^ýѪ¹dµì{4+ªŠÌÍ»Ò"ó¼âòIŽÆC×Ú®ÛJeÚ70•GG\?Æ´çŒAÕü¶Õ‰?{¢3žwC’~µ‡¦Ý¥ýÔ#d[‡ˆ‘éŠÙ·¿‡öªL_‘¢u9f¢Îz´ÜZO¹î7cqù Ëù ú…ÍÀ_žâvsï“úWJ%ò4{Éwrß*ý?ɪ6ÐCad.¦\ËŒ¢žÕ¾\ÞòF´ô“f¤“Ã¥é±Å+ªá>cÞ¹{¿-þ"Û#G™Š)õP:ÖOŠuwDû8Ü×s˜qOA\7‰õÁ¦h©¥[¾nçB$#þY¡ëøµv(Æ’æf©BŒ]Iš–Z‚²êš³¬Ž²-¤L§—?ð*Μˆì^þ­£*>‡¥cxï3M¦–ÂÌë(úŽ+©Ôlª‡LÇ€°õByP“šr{›áªûZ|Ï©çöNÙƒõBr*H.£ŒÈ¤õ Šî¼Ss —[ØØZA@üñÄ ’k’k4‚M÷QyÑ7Fä05Áír&®:Éã´û]»2¼N aØŠëmï.cÒ¤¶Iv«8Ý÷Ô‘Çày®Zk8㲞KnT…;O%0{Rß^]G 7!¸#j¾ƒ9ýk&ùR:áfÎÓHÕoì™Å´­Œp@ç$ÍÖ#ÿB–iŸÌº’}ÎÛ³ÍXðË Nßι•b…|Ž‹‚_$UMr[vT†ÙXDrýI&ºi[•³:²¹¯\:èñÛ£¶ÙdÜê;ÓùÖ+êò$) ?(QŒÔÞ!¹Ý|±â(À#ÜóX‘ÊÔºä{W‰J¤õ[>|óK±½§^ªJi~féš§ª^›Ž: Ê–F’f‘xç zSЖ~zšçT—9ÁÉÔÔÒ§XnvÀ­›z5R!MÄrþlIÉlû h¹y˜òÆAQ<:œ¹š§v0œ±'© _Ï F(Ÿj“ŠJ€šºROth íÉ4¯DØu§#²£`Ô„+òY«½¦’¨ ¢Š(©ã!xÝ‚zš‚—>”š¹,Þ}rí¬…¨ž5gÚ±§¥<ö¦#üÜ÷¦¸Úج¡J1Ù !)i)p»[%!‰×ª°¡"y[ Jë¹'±økÄ“h—j¥·[¶7.êõ˜îmõ‹$šÞXËcänÇ?ÂÞÕómæ¿knJÂ|æöè+WÂn4­@Gu´[9OÇükŸí-i¯C\<žŠGª}¢çÃÜÚ£}‘Î'¶-ÂOð4x±­µ;8uËó!â¥þ(Éû¤ŽØéZ¦[mzÉ.mÙdr›H=tû×v·5Ôßgf6Óˆü‚Taí^ªZ©-ÏV*íMnfOo½×çÃ¥TŠí‘Ü:aÓ†Qéš·f^[¡f[!Iìqš­©Ú\£‰‚0?u˜{ÿžiÊöm#k]7&æÕe‰3"äí>£¨«VWp̱8Žå<ßÜ”r¿ŸJ磸hY¤FÇ;]jö—oúƒé—,­®¬8#ñ^UlFí0FÔ’™bû;·ï ãìçæ_íkh÷~U”÷|ÌF`ÙÓ$üËúƒ\H–öé±É-ͼá[…¶’}ŽEm 9Òk¨ÝÛ儨6Ê¿˜$W ªÉ®gýt-kÐì­ïcŽd•c’äÚ:#•ƧãT¤ÖíkóaÄlœº*…¥Ë¤Öw’#46HÂOmÌ«ja»¹sÀ7–Åxu+\ŵ;K»-[[£¶Ó§ÅgfÊÞ_’³ÊÞÀ–ÛøœVäwrEe ’2ù÷'y/ÐÓòÎ’\¸q#ÛÁ MÃ'ô­·ûf­ö‰ yVÀO\A^Ž«|ÎZ”ÓÕ›§ u'¹õîkÏ|_­<Žà?s`t :šè5]q"Šh£~TÏÙƼÊîäÞ]™Žì=€®¼f+ØR²ø™ÅZ§±¦ßÚe1n:ž§z–Y„Q9"‚ÞÜ ^¼½PÖdòôùHlgzæ¾~ ži3ÇZ´yÓÊæs.æg9ïšï´Yµ=9ª«GòÉß$¿p—±˜nδ<=}ö;ñª›ä>DZüëÝÅQUi]-Q´ÕÑÝÀ ¿˜:õ®K—ÝÞž¹Žßgñ1¤q³ï÷è+À[œä‘öïž‚«‰ J > ÷ˆxv¦ ½?5X$Lž`üª¤¡±ØhŽS 9 Oþ§žjùl·›Ù¢¶H©DŠù;*µ§ÙÅ>™©™ºŽ5–!»? oŸ\Ö”Jdr=Eu¬ISöÕ+)S玦ÿ….R×ÄVÎ[ 6a'ëÓõ¯MŠå~Õ2'ÀûeNãßñ¯ŠG‚PÁ¹\GP{W¤ÝÜ4öV$±}“N&WxÁö8¯C/jQtÞèß4áÔèèè*½ïˆlÓå‹t˜èJƸñÁÿSÇïÔ×m,=Yt)&lÉ^dmƒÞ¨\]Ú"òÇørkIï/æy$&¥H»—›G©®¸ÐŒ~9—™~=fÞ6ÀÝZÒ·Ôb›§Ì d&€væIVbÒà·mÁ¤Ï®êšŠ‹Ù•tPÖuY¿åW<4ûf¹ïÂÖn Óåù³Ò™e¨¾›+´h¬[Ž}«¥Ós£Ê»#W¬,wŽè«¼®®c]×D™¶µn ÃùVeî·yz»ü¸ÿ¸œ ÎÅFÈù¦gÙêLÐʲ#`Šë4½`•ʲ°þ8ß¡®B¤ƒ&Q†Ç½uÎ÷–Ý­QêŽÕßnÌcþ(ߪŸZ×CÓyÑþîQÆ¡®Î[„ØñK‚¼©î oÙjk5ÀŒªÃpÝ6}×>Þ‡Ú·Ãâ”ýÙnz˜\TjZ2ÜìÐ’ŠQX>e<š‘."RœçÖ³ôûöVw—'Lö5¡æþõ¥EÛ/WOáq]—ºÐôѳ£K±ü©;𠫺üð­ˆkß÷€rFGOÄV}¶ÙIOäi._þ'PÇ"å.ÑCgûÈOô5âcjòBNý’Šö—%¿Ô%›Â‘ùNË( ƒÓ8ù×h÷wIö‚ª&¶¹+þÚ‘–ü×?÷Íu3¯›ö}Œ©lK¸ÛÔÛñ¬È­§x 6¨ÆB|¥ú†ã?†k<1û(ó+6vÑŠ„/܇Âúªézè·gT±¿ùD§ø 9ÿëW¨ÜÅä$É0»©\vb1ú× ÿö“¥@¿nF¾”r¶#CžÀsÅcx“Ƕ—v–V/äÁßDëÆ1Ï^*ëà1jFIkÔóñ1U%ͼ¸"]I,fÚ Ë)í×Xúþ¶±}ϪP;Õµ•}<¶gšáòÄuq×ù×9®j餲™•nu)Rß*Wÿ õèAP§ïô/‘S÷¤gë:˜Ñâ{ë¯Þ^Ïþ¢#ןâ5æÓÏ%̯<ÎÒJç,ǹ®‚òÒëW®o'ß3õ;xü+SNøcªjvæâ)V(¿„̇'éíXJ¤«JÉ~)T®í¡Êh÷aªÛ\†Æ×>ƽnâAv‚PÊw¦zW•Þx{R³¸–'ƒyÊ·–ÙäWaá-e±_:Å/M²qœUÑ“§&™Y|¥MºsV4>ÈÒÚ²?2@ûsê;~•JçNwÙ¤·cZWzÅÙpFNOVÓÄš|Ó1A#:àué]>Ñ'¹é¹Fû•6Kac$1K4²?L.ÄùšŠ!Ñ(¸OŸ¦íÇ"¬Ýêv¬Í岜ú5f¤ÝlÎ}©Æ¦£§7}YÑèße{§¶Ô¾XPn-»h+ïŠÄÕ5;iõ‹Ø­•~É[&q€*íÛm î1ÓéX·jº|ÞR°ßò’}ë*µ’z¸œR½‘™y?u4§«œþÿ­U­4×ìðjKšM‹MsòÓª7ûµD-ÆÕ«týËÉêqUkA¥ SߟΦ£²5‰\Ôgæ§½2œv3“Ô1†©¾SCTt`SȨ¥#æ¤æ¨ Å¤¢‚‚—4”´÷盂ÜTÿg™W”ëRÚìWû­Rå•úsĶ žñ1_þµyݺÎeV·Üteê+°±ÕuDKßÞmþ.õÚ±4Õ£3Ö†&²¨Ž«ÃÍ?†ç mzóÚùc*òÔWo8°ñ-»yT]ã°_¿¡¯:·½†oöI­H£/ûÈøÇq]IF׋=F-'Û\Ù_"ˆ™nàpT¤ƒýjωõ[+4HÝY¦“ ѧðÜÓγ,›#¾_:HÿÕOÒDÇ¿ñ ÀÕôópæä6âGvjbí{dìTH ½o2Æñ‡Süþµ-¼’[› í¿½²”Ã(=-eG#ÛMƒ»©%غ·Pzœe‡È ô®N5"Ü7f[êÍ&ÛÈÓõ;«Uɸ‘²OeÚ©©"Óæ’]> 8þÑk“Ld|ƒ 8Ü¿PƨxwTý·M¹Ü¥£o³åNä¿@kª7ãMÑ#•ÝbÝo±d“¼Íøýkç]Zô*8I_üŽºråI#ÚIl<Åk›9Áǯ`ÿ´+SW\èðÛ~ä;ТóŽœzgøcWÒ¦Cq"Í=vÇòU±œ/4’£œqÎ8ºðxbäêËáOïaU§ª3u_ê-¨Ck G8ö.X€1ÔûzWDúÍàÓ¢´V`î~iÞÚ1…ÏÖ¼ÿHõYîdè8¶Mkø£\:41$;LìqóŒ§ó¯nhѧhE$Ž?h¹\™¡ªÜî geS‰«€¬¢»äšæÄú#÷VØô*jÀñ$îÃͳR£ŸÝ¹5àWÂ׫76®x5½¥Y¹I>O›ó¬O]¬V©ÜïÝ®:þµ2kV³q,­=<ÅÀëÒ³|HþyŒBÊÂ8™‹{ŠÇBQª”ÑŒbÔ•ÑË]– luëÍUûµjäe7ºÞ¿T5îÃcsд­@jzdr³~ñI¸ïøÕÙ ïÒ¸¯ êcÔD.؆•³Øö5Ü»uèpq^&.—²¨í³9¦¬ÈŸ(0½qÅ0!(3þ³½X!Á»Ôa1ïï\‰èHÔ%ŸyòŸ˜gµJ"8Ë2äzñC¡^µW@Ie{&wì<²˜ÏG†ê8©å‰-åY-÷IÆøIþéþî© íïW-§ ¶•¿rÇr·üó_¡ï^®]‹TåÉ7£;pX…J\²ÙšWš"¼1]Z¶èä¸=ÁúV—ƒ®L¶ú†qÁ•<ëp¾:Æ ðþª4»‰mouŒä^»÷…ZÕ,Ο©ÇsjÛdŒù°L¨¯jXTª*´ô™ë<:çU!¿æ:Þym.–â/–Tãê= vÐ]Ŭh³êñWѱ\÷bæg}ª¤Ø3íWô+ˈuXc‹æ2¥}kj‘¾¦µ©_ÞBxÊäÿh2ÿW dN+ž¹qsj“FÍÌ{±î4xŸPóõ¹äMÀáT‚¼œÒ³´©µ³;)…‘žÄr?Jå©]/t·ð¢å¼ƒìˆá¾a½O¿9Ü£5”A[æ‚)˜Ø3ú ᥼3Ù6Ðþp|ÿ³µ…tÚUüP­Ô²±&?Ùc?™®uˆŠ—*«Fé–v>ýÞ0;{S‰ÝÓô¬½:ãíPïêBügùÕûr :tóøÖ±µ¯s‚tìM$žL,ÿõ=ª¥íÂiºcÍ+.U îÇÿ¯O{ˆ¾Ó,ª–ÐçkÀ-ëøW|Lø‚ÇRM7M•H晇 Ëõî*&å6Œÿ‡&A;:JÒËò’wúÖ]þ»§[("]ÒáNk޾ÖïõýüÌÃÐqTÄNíòÄÕâÇ›ç¨õ<‡Û”™¹{⛉¾Ì‹=Ï&±¥ž{§ýãÉ!>¼×[¢|;Ôu+h®®¥ŽÒÚa˜ØüÅÿW/4ý?ÃWcTŽæP2õ­\©ÑV„nËäihŽNÓÃ÷—X%<¨ý^µàðŬJ ¬Ò?ä+b+˜K1žV j[¯¿J©q}omveoB‡½sN½i»-iŽK{x÷KúS]¦C/Iõ+mØósÿ4#»ÅçD’úo qR©Ïv¬˜(fÀ~)¸ûÙª±¹^ûr{À@}Óßµ>F‡ÊÎkUÀÔæÇJ4Ëdº3¬‹ úTz«ïÔ¦#Ö®øso›>}ó¯NMÆ×‘³øH¤Ð&?ê][ØÐ¾¼(Î˨ä’ÕÕ*€WjõªÚÔæßJޏüë–º­¨£»¤pò³ XÜ£äSh?v½Cs¦ðä¶ÓÜlºº8AÆúô {È#P¤pDP+ÆÁ(Ù Ò»"ö%wI¿Ï\K’£ }«“ €«J¬\ÚqWÿ€jäÜTJ:î©]˜ƒüê71€è+ÍŠK}©d+I#¿êk¨Ô4û‚ÎdVÞܳÐð~•mezo¯šÝ$Q˜„­€™èØêO ¯R¾!B79fïbÅ˧†4«xÝ<ËæM°ÅÔ“ýãì cØx:÷T˜Þê2yc¹Þu˸>ƒ·¶k¥Ô5ÍM»–â5ûUóõº—¾ˆ½W5ã;Û·o³§õíXÆ2ªÔê;y&¤ï6t–ÖÞðÚy±AÓõNÀュcêž4Ôõv{m6V†2.1ô÷®{Èžý·ÞÎÒwØ+cONjIÈ /óÍus$­RwÙíí6(Dç뜓þ5ÕhÞmSê1y6Ýpëó8ösMñ‰¦àÚèòyƒøä”3Vºxæ)vÿ ÉÏý4œùÚ²FUöŠ,Iðï³B‘ß 0e[ó‘yðƒÃ÷ ßg{»_@’†®kXøÒÝ{Áå ê^PSŸâ¯…ìò..¤gþíºùŸÊ¹e Dä“«›¸ø1,1±jË!ì'‹oòÍqZ®…}á}TZêŸgÉÍ7òçŽük¬Öþ5ÜÌ-N[e=..¾wüp?ל^ê²jws¨D·sÈw<²3?ˆ©Œª'¡¥:•¬eÅÄS+ØxãšÉ¼>s$IÂ/Þ«òYKEmÌrƒ’ áË5_Ê œ~~ô¥'{³“[[ʨ[”UcN.ç ÊîQH~íh5¸ûx¼ùÒ>›Ž3íWî\tÞ«Ø ;ÉéÀüiÓ¿_Nµ”õ’FÑØªç椠zÑZ£¸ê(¢Fõ28W58òuÜ´œ­ÐIØ¡EjǧÛHã7 uZUއ¡…Ú9$‘Hw~¼úTJ¼WBDŽã­[ý{[‰L²@ Û&î1Y¢3æìÛ“íV¤šºeÚ}°™í­Èí 2æ«i–û"_¥jù‘F£Ìuå…yuê·&‘Ï'©F]"ÞeÊ. fÏ¡Èû¶ÏµkɬXÇÑò}5BnÿU‚:E7_¢s*K;ˆ[÷‘0÷¨jä·w×탹½‚ñOƒF¼›ª£ý¶®¿ieï´_©ÒZiQÛaB~"¬½²:œ/ÍR™7§é¹+€5ã:’ní˜jõl öûçp5fÒæ{FÊ<{ãü*wÙ2 ÿ,‹Ðö4Í›Fßb+¢–.¥/…›ÒÄΗÂËé¨ÛËòLê§Ôü´Ë>8ZHz½}A…RGo“.УžzU;K-GP½?Ù¾e¤9ÎômµéPÇJ®ñùž¥ \ªî‹ñý›TýÚ|³à=úõö|ÖòýÞ•¡¤x²7h±Žïo̳ˆÀ|ù\øÕÍ3Ä÷VζÚîœÒÄ8ó¢ÿZŸPxjíŽ!}¦u*Ñ¿¼\ŠÑ`ýÏPØ5NâúæöÎ+§[¸à%D`CÎßsšé%‹LÖô§eüeðr…¶?>ªpk΢ߥ_42#)§CJ´(×JæÎºV±êv«=Ä2ùÑmx`M»p¸Èǵ`ø–âi•c¶¾æ›§ÞÍ*¨Ý”¼ÕmgT….Àu\AŒüؽU(B….Hl‚¥UÈÑfÎ[]#Mr“Ççt\àŽ¤×%©Ý¾«|n¦ç€¨eãÖ¡Õ5í+Ù^$òâcÐw¨¢ ßqÁ®iT•F‘æÕ­uŽÛŸ§¦HÿÉâ¬GÙ÷·~ YŽ=Ü>µÙJ6Fq+$ìÒÿfC*W†8­(à°UÅ[Žÿë®…M=ѵŽbãà *¯•.6ôîk"óCÔ-˜»À̾©ÍzLQŽëZútZc6o¾Ôqü1méõ52ÃÆ×F2¦»‚ƒ¸øô]P]CNŠbÙ•~YûC¿ã^œºw€ï#1O¡+d`Ë*noÌŠÎ 4vYåðΦЗ6×:?ñáúוÃJ¤6Õõ(Ýhr/":žÞ•mýEVñ‰ãO9–ïMY-Tó5¿ïêG"¹t×õ7œ5Pû‚mÈàôúW™¾¥·F.ƒ[‘ ~=)gpð× y­]ÜÜI1ŸirX¬|(Ï¥TMJî7g K§<ðkE–ɽX{ÜìçÔíí¿ÖÊ¢²o+–ўǬËlöw-Í‚>éNFjÚ$öwÈl¨C¯ÔþµCIÖìüGfeV•uÃcþ56«©­›@"I0ƒ;gx»Õ]£šœos Ä:‚j„Ú”1yCÏÜééœnýjµµ•Õî±gkg»ÌÉh ÎO·­%»ß_[ƬËuûÔnÃŽŸ\×ðþmáó%Â(¹‘üµèHLë^2ƒ«W•Þš¯Štù,%A#ù—o_ËáF3Óë[Z&Ÿ-Æ™å»~î"Œ³•À|'OÔS<^D÷o0çdr}1Í\ðž§o%»ÛIµfT2Ü>Gõ®LÚ/³ÛûÊŽ‰ wöú“&³tìÐ[À©C‚IÆ•âûG½Ï>âÙÞêv1l†êEOÊ»ÈÆ}ª¨S;™¤U‘óógœÕØÀ}뻨ëU¢&9_æÏµ/hÝÇÌMæL*ãÛ¥2O-Ûæäûõ©dˆ:^•NBQ²ë•©Ž»5í •}¤íV«þs$Kœ€ð¥1‰ËÇó¨Èq»8­c&¶`<Ü•^úÆÖðc½‹°ú`Ö]æis¼Ú´–dœ„Y9ýjûÎÝ×§JyQ&ÕØqÏÖºa^hjR[3†»‰¡¸x·2õÅB“Ë ~íÙs×büÿ¶kKÃúm¶ —?iLí*ôëšõeQFŸ4‘ÒåhÝ™cU½'jsê—3BðÊû£oé[:ž‹¤i±o–YŒ‡¤a¹5Í9 ä¢àvh¥ìæ¹¢¿‹OT6—ø))‚µ•¥¥ê"ØùRÿ«'ƒéY”´§%f \ï-¯mæåuoj¼L:HÊO9 ^nŽÑ6Q˜jÕ´×n!â_Þ¯ë\O R›æ¥!$âïcÒcÕ.m"YV0uËÔ/â •i$že+ÜÀpkÖGÕí¢²ÄI#µz¦ZêZbÚÝD¤‘ápsÚµ¦«¸§=OZƒ¬áy3éÈûdŠiûȇúÖä)¶¶¶’K]6îy:(áGëU ðœöó0{e1!ÉØúäÕ½wÆš… Ò´ËUÕn•e‡Ëz’Ýÿ +*Í[˜Ò¤æ—¼ÌK¯9Ws¤·–9,ÌJç'ñ>¡«ïx¬UrrHÏó¬­RòçP•ží—ƒÄiÂ&=ªæ!{-¿Ür?­cÏ(Bûœ51r_ q#3Í,aær+û~ ôcèÙ®v,ÿ¶9í¢“ë[F¯+ÔËëm=Ž˜kö0IZB?¸µ^_Á ÌGÐVÆo›ƒÒª\!ÞÕºÄ6ì–.m]²xÒëþY[C¹bßáT§ñN±7lòíX´ ·ROvsÔÄUoY6— k$‡íË5æ —Éñ5¹oðÓÄRºƒ§2û–T? 5ìï5”ˆî‡Ëþøÿ_CÁ‰_ÔTó#¢ 8©#Âíu™CÅ ôäÊ;Ö¶±áÍÁ^[íFÖ;½Q†Èbw%O\qÀêkÕnd‚ÎÞk«—X­àBò;ô +æx²ãÅ> šðü¶©òZÄõ=MWØU+rÇC(’îòŸ¼Ä’Gš;…TK·Oá^hû[nÈU®w kÔ–D5QÇÍR›—=Uy¨ÉËUE5¹H€ýê1OqóqMz¶¹e¨G—Êõäšl9ï£I—ù¿ÝjÞ£Ûxç‹î‘†•›ù‰=«8ûÉÈÑMY1óºÉq#Æ»P“µGaQSßïRV‹c6îî6EYŽÂæU"l†‡$·d -¡(Ú#ÏqNöã­Âÿß4ײš>$Ú¿ð!Q˜ñÆåü+-öt·^’³}™¿7SqF*–€Mö‡uîÅAÚÆ%éÁö©­4뫦_*&ÁîxÔiz6r¬—eqÎ; ­xR[݈í¼¬Ýh- ¬d\‘n[УßÚ¹´¶¹šSÉ / c^«©*¦ÄnéY—–QÞNÒÆþ\§ïï\‹=5%UOtq–ÚÓ2‰W=ºšÓƒF²·ÎõÜÃûõwR°}>É®ÓÌ•£ûǧ‹m©Ít3öy ö#¥ u*Çš/B÷WLÜÞ4v¯Òð;pÝx¬ßßíÈ‹£-wü+ŸQ¶°öWêNÍŽx%›ÔÓ#†Èäw{Pú«/ýõ@’Pü¢‘X’<:KµJã8=*؛˙rOÜ’O ª†Eù‘ûÆ8n¦ºÝÃo´K"áÏV>žÃÒºpøWYÝèèPuÞÆ]¦Œ÷. ©*0°ÿ]¶‘¤%¢)Û´™þ•bÞÎeÄk–öæ®'È»äù}ßå­{Q¥qQŽÇ±G–%ø-ÑÓ`]©ßÉô‹IUSìМsÌ`ÿŸ©¬kŸèyau¬Z+ùf’ooÉsX7ÿôF)iky ÿ`D¹ú·?¥e('¹”´z³f÷ÁZtëòYÂ_×Óê{×9«øÜ[¹Ùæ$c‰Km#è{þ5¨|aׯ7&gieþ"¦WŸ¥`ÿjê:ÝØ:ÅõÍâ“€²¿È ôQúW4’¦œ“1uàºÜ‚M^ݽ¸òn‚ððpGºÖ ßmÔK¯*WVs’ŠXé[¦Ÿ9Ú‘ø­í8‡Óí¼µUSà.iKh)%sž¶&V8Ëh†ì;moC‘Z¶ðv;Xê$A±WnsνCöDù¾EéÙk:y”V®&JºêŒø"Eãý]mi~¾Ô‘¤¶XÄcòHOçֲ͜AId_ûæž–ù;Ìœð2¼WGö¤RÒ?‰ºÄÅt7Ã÷Vÿë.tàG\ÞEÿÅP4Àoô¥úßD?­c` Ÿ*>;ËxªÌC|²…ÂÌ¿Á­¨fޤù9lZŧ§)é)mj­ûÍwFŒúå?Ê­ÆtHÿ×x³G_¤å«Ã_ «L®ï¬L¿n»AÇ«ø2ÛoY7´Q±þ•2xûáþŸ*È5«¹äSÇ•ÿ€¯¨œêÎ[³7SÈúŠO‰6/k=2æ`Ã*dt@AüÍxÏŽ¬®5mbMNËK¶´ÇÏ£ xôäû ÑÓäaajpÄ+ÏáV¾ÖŸtsÅ|ûÅÔ…KÛC•ÖžÖ<©ÑÐà®ìiµè:¥œwVr‰L¤|§o9®h$†FIQ•‡c^¦«.ÌÒ3æC1Hjky„’X–hÔåäùWQ¦êz, +Á ¬½‹D þuÔ•Ý®m§»±ÈÓÒ9ᘞÁI¯P!m¯ÆAçr(ÁüªÜVÿÜëþíkì|ΨaûG™ÙZêÖ÷I5¥½Üs'!‘^‹i¨]k:W•Cª[äd®ß1=G¿­oÚi×JÉlí5®žwEyT¯*xàÔ9:ZšF ŽÌ󤌷˜NOcþMu>ÕSÙ;~îI=‰¨5Ï N’´Ð²´ƒïþ:磞kI²êÁÇ^ÇŠÆñ•UR,ÖTާQÚÍx%ù°ç/Bk:]RË@Ó'™3}'îvùf¿ÅŒsšÂ¿×.ãºÞ“î’C•óòk™Ô5 ïL’îòð¼ó½‡z+N3i¥¨«b¬šA<Í{z ­’ï¹Ûõ©$®­ç¸ ˆcá©áUl-žö`£ÕÛÚºw‰E“œ Gjâ«WÙµyS¬Ö‹©ÆHäîÏZê¼%(þÍ:²Éǰ"¹k¨Ê;Ú·|%&$ºÔ§ˆJT¾¨ûìlš•þE9Ç&¡ çw½)-¿•ü+Ã9Äçí* Hþ¹§µÁî=jIwfäÓ"Ÿg^U‡OZ$eܽƒQéLG1£ýìçEº #lÆF8¥bß|sžµcå‘9ïQü¶?.Cvª¸®@dj,áò²§½Yt+_¡¨ÝÝQb Ö±}Š^G tÛ®$>¤ÿ:è|,â;[§ÛŸœ~‚¹¹]½]±ÖŸc$1Å™ó¸ôìÔƒ.DuI]X§¨\µÕôÒ³g$ãéU©]˱sÔœÓk¢ É!…(¤¥E KERRÐCe♬míâH!o,a·äçž>œV¨ø“©D›-â·ˆú„Éýk‰¢„ÚÙ Q+&nj,Õµ6ÿJ¹’Dþác·òéPG®MlX£¸â²¨¨”#/ˆÎS”¾&tqºßÚyȸ“8qïTþßq§!Û‡<åiúŸ,ðûnô¨oÓæonk•E*Ž hM´%·ÎÌ÷<š¶}µZÙþAW­eSv`÷çqÓúU"´]HÛÖ³§æ1št÷6¢ôh¦»ì#`®)èþUÂ7¡æ´åÃñ±k¢UZЉhÌË{™m¦Ia}²! ­èE{ƇñsD‡Ãöòßý Ý®h¢NG¸'ƒùׄÜD"uÇ^âš‘»ð‹’}*šÐ¸ÔiXô_üIŸÅP­ŒZi™ÜÊì ÎAãv:é^s'ß5hƒ´ãƒùÔ7-±1z“QèEEIöiðSÅœç¢UóG¹‰_4µ7Ù$ÿg>”¢ÒSü+š9£Ü Ç•Í'¥K$Z€ÓVh»šj1¥¼<[ÕÁ5”ƒnêuLcÿFIGrAü)(¨íÔ— 4b¤Ž6áW&®E¥]IüúÕ:‘†ìW(ŒƒŸJ˜ÜLý]«b/>ÍòÊ {UÈ4kHÆJî#Õ«–xª^¤ÝÀG~ŠÆ®A¥^L¹0¹âº»{d ò"ªŽûjyÞð®iã^ÑAÌsöþ,ßéaZ°i¶–‹Ä Íêy«'wvëL‹}ìzÖ¯9nÈ»$G*˜ ØUˆä¾}Ü÷¨q»§jp7ñ܎ƹ˜™8-¹qÈìjݰù†x÷ªèWnÕ'¿­J†ÏÍøt¬dˆf”‰Öï ª•qÎk“ë¦ß}’VÿFcû¢z{VôrÆ‹>;ÔÄ©»ÐV”«{?uìÒé¡àÍZ30 šËšæïKÖ"´LŽr+aÛŸZªp³oF 4÷0Ò5o-´zý*DŒüÄ*œw1>H«&wÛ·v3[I=)·Ê´D÷¹j)õhð‘ø‹TÀãhª@0\îÁ5fÛ‡2áè)ª³‚÷YJ¤’Ñ“É=ü¯åË­ê¯ë›¢?J‚[ &•MÄR\mëçÊïüÉ¢F ÛÇPsJòï™»w¤ëU{Ƀ«7Ô«ªÜG¥X?Ù`…|Ï•P5È$lí“ÎzÖ¦¹pÓ^%¾ì¬c§¹¨mà-Çë]Ô½Êw{±í`ƒ°^µ¥ooµ¹¤¶·#éZƒ mjç«T‹•µs¾ôhW,–X-•G ƒN¿O‘ÓÓš§ Éû˘Jç£ô¥z-TWή7IÓt|žãÒå|‡¶k5£np#ýªÓ¶Ôb™¼«Ž?ÚµçN k™«jНz«RËn#P¿(®ö„m+Èõ*)bÛœ~µŸµ½†¤eGn%™ÏJ«â ;ûKOh×oÝøVä>rW·0B®û àI­a]ÂjK Ôµ<‰Ñ—‡\Á­2½#_ðô:¯Ïj«ÒŽEµïï\Uöƒ§7*«p`¾‡Œ§Z+[>ÇL&™™W4ë/ï#†1Ôå`=i-ìü먢vÚ“é“^…e§ZéÐùP'ï1åŽ=ibqJ”l·aRVøU`ú ŒÅóã½Z mÈâ¡tn½MxJF±8N=)g‚Öëu¼rc¦V òûô=êx½þ”'Êî™,ómBÝ­î¤B›@sùfªW ø‹Nµ¸²{¹Ëx“ŒµyñÇjú -eV:¡%%rͦ£ybûín$ˆúãò®«Oø‘¨Ú®Ë›;kÜŒÆß§¥q”WR“[3hÕ”~z½§Å«P.4ëµõ(êßá[¶ß<<dŠõ~°ýkÃQWTY˜ö “]σ>\k—qõš+lŒÆœHãúR•Oæ.X©[Þ;Ëω¾»Œîžì d£u>뙽ñ ­ç6ª·qiÓ5ÍêñÜÚÊ×QJÂÃ(è ®jmÕ–¯So™êÌ}B<2žç­YðÃãQ‘=b?¡ªÓÈÝ~niš=Â[j©#¶ÕÁþé´Ý)D骯½#l_ÓÖ„”2[‘Ò³Rýfæ7VÍOûLK÷åUõË ñý”¶hâäfˆÇCÏÖš/U¬ÇÖl±ö¨é’kšz¦^áO|hXy¾Œ®GØÓ¨ç¥FUùy«Oé瀒ø Cÿ b„.èíÖµXJ¯ìÙ¾Ç@øe![òM9$,¸<â¹Câ–oùwQž¿5:OM³@ ‘Œš¿©UÚÁì™Ó¹WîsU/îí¡¶ùꀻ¹é\Äþ"½¹°²2Þ<Ô\IÈÆÜÿw½e+|–Éõ5ÓO㬙¢¤=ÍBiæ™^Š6 JZ*€(¤¥ ÒRÒPHRÒRÐE%-HQ@Z…ÔÑ `:ý*ΠƒÍ#ð¬ý8ãRƒÝñùÖž >`}yÍWJ‰–¶(ØJwlzÖO˜V;&ã±­‹y7¦j+Ǫ2¨º–@ùx¬ùÓÇ¡­r?UnGï£åXÓz…'©‹/ÞÍmG*ýu sY˜Õí?÷±"z騯ÇUnãáéÖÒ•qøR]Fc¹‘<õúÓíÇËš«®R÷'n{õýj{`%úžj ð*ݡ͠OsYKbê|#ˆû´{Tα–æ˜v±¹ÌDà7Ãô¯UÏê)î„uZj>ž”Ó €H¸î*ƒÇó0=GJÕ(‘Áª²ÆY¹_˜V´åb“­ tFÛ×­ijñaf%QåL3qÿÖªDÚzÙB§L½¶}§Ì„•ÿyy©”ššÔ¤›v3t{qò’¼“šèR.@µ™¥.B¹#µtFÃÃy®U_y™·©YãùvÜR¥¸êü ¾b]¹““ØS4ì@_þµq{M¹Lç•þAQÈIÝ«cµZ’Œ|ÿ3õúT.O8ùG «M O-p 7áMm1¶Ÿú®{ýÚ<–-÷[ñ¢ýØ B7·Šq$ñ»ëGÙßo¥(¹=éÝØÉ ÂûÕ¨ŸjüƒéØ„ü¼÷íJ…÷0ßǵ'¨‹¨èê=½*Üw=‡JÏGP¸ ÓšP3·<ŽÀV Õ÷®Ä—¶ùKÜýÂ+?I×àÔ?u·làGcŽõ­")L79Íyê»húÓü¿*¹z©¯C ^›‹Ýlh¢œlv©aeæ™<¥ {ŠçõMZÚ×Q1[¦àœ=j[Ä¡Óɰܣ¡õü+*Î{8]e¸FšN¤uÑÃÎÜÕuò5Qvw:;[Éï?xmöCê[“Zîª#T"_ø†_/IÒf˜F>vÜ{“ÅdO⣙ã16THaÚ³ž¤ž‘ОGØÛy0¸ïNó:ö#Ö°¿á!·|aY~«O“_´dûÌO ZŸ«Tì.Gا!ó¯æöñZ–öø¶ô¬í9|÷/ýâMtqDÑíÏáN¼ù}Л°Ø£ÏUÆ*ß–¼»ð©‚ªwgÔT¾^~`Ê=kÏ”ÌÌ­B<¸þU‹¥¸‡[Œ?Ý|©üEt:º%[¡Á?Zå'& ´”uGò5߆÷ ×s¦*ôìvÄBËüUR[u<{¿ ¶ Û‘X‚3ƒèj&•I8LA\)´ô9Ñ6¬5žFfЭnÆÐj´–ϓܵË9ÏXQÇÙœ•fVõTT §ïGF)$1yJá•yþ”áå&á» Ýýªµ•ä7H­‡=Çz_µÙý 5~›«Òš»hžW¹3ƬƒoÝ=OzÊÖ-„úTˆNߟ'¯¬eFÿVØ]ʱØëòÒ)8I1§gsËïG—2•㸮úÆán´è&ßè ú÷®VƒÈ¸’/î9_·¼'p%Óæ·fù¢}Ê={x¨sÑS] ê­7œ ^‘P»ß{ŸZ” ÛžÔÂW=ûW’ŒnEÆïSR bÀÝ0¸f$.9äSãr;{ôëTö7ŰËc÷€îs^|kÑ«Slÿih1!þ*.€fÅ=8¨eŒìõlGþ,ÒùJW¾”sX£0FQóWÒ/:Ùb¤x®zÒDò[2ãõéU)6´-;j_Òà>Hrß-o”}á·.Üt¬M>r÷Y‘¸ë·Þ·ÆõTF^œå{×›‰ææ"OQÊ»ÛúÐãåÀ|cÒ–0@!›?E¤v@¼#ö«“©›+¸‹ý¦÷¨Kãb^{š°ìˆ2bÏ®5]än|¯ü{µmFù¯Œ§µ#³ŸãÎ{S ëòƒE8Ë®|¬ÀªíäPÌ [‚)®·}iÄ¢àÿǨBÝaïÖ¨äอ;jµÏ&‰6ž|ÜŒõ4ÔÏðºàô  ¢Á—(­“ÁÍ^Œ&í½GlzÖw̲¨ ów=…\·L/ÎÙ÷¬ê-“HƒûÜv®/Æ1ª]@Bà°%vØ,¹w×mr55©ú×F^ÿ~‘¥&fÛøx¿3K´z ×´Ñ´ëfâó›ýº²‘Ùüêpã]15R\äúš–w’ÚØÜCgû ñ²íN"¼ªXÚZ7ê:פFç³v®wÄ1m×Q/»}+\%E¸Iî]k¦rôR†¤¯PÜé´)áHŠîË écpTw® N¥ØÇCøWcg(ãsr:w¯#JÒlÊqêk Á^¿!“ýš„>ïaNÇÍÏÖ¼ÛÞ£Ilãåã>•É껇Sü@ιKäÀÁ^ßwaŽŠ飦Үm2Ú@‹Ÿ/k1õTäÊI¿ˆ^++ÂÒ«éòFyhäà{[n\ô^ s×\µZ0’³e9ž_¯aU®#pØ;†z×§òÀr¼¿©éDq¯2IÎ=}k5RÚ•s>Ü<ü·>½jÌzu¼ò™e\‘×ÜÑ•k€vä÷©„† vöôª”åÐ.úx!#nŒvÃU Éî¬ÁrÍ,} G½igÍÔb |¾Ý1QNzûÊäsw9=jEüõlï'ÜU]óìZªgîÈ60úÖ¦«¥­-¿ú®­¡õÌH O‘Á½Ê*3¤à™Ô­(„d!†Ê<Ï—'­cÚÞ™í£“wQÏÖ¥›QHמ[²Šó{Xæåf• »*Ôž+2ãX–MÑÚ|£»ŸéT$–k¦V㲎‚§Ž 8­£F0ÖZ†Ä"6wÝ#4Œ{žjÒD6}îiȃvJœ ßò7✤Kc’4ÙéÒ¦A·§ w¨J Õ"œî¬^¤²Âe*™­VÄ™°OJÈe䪂0=ª,CEÈŠ¬Þ`忦G²?*¥mþ·£1ïL7ð[>É%U9èj–®È†‡#`¬ mÔ¤‘íç9üëI/ –%"U9=7U a>P{:uúµ5s£ ¤ìO£ÉçèöÏ»”&3ø?JMRílí$—w°¤Õ Ê›~…±åHg°#ÿ­\Ö¯¨5íÉÃ~éNZqùVo íï´Q2rO~µBDÙ.J¹š¯p zÔôfñÜŒ Óø¦ 3Z?#u0ýæôšš}hê"3IN4Ú²QE¿ÁF)â2jI¸‘¦öÆìRùg4ôMµ*!v®O ©r1\FjþŸ`neôAÔÕûM q%Ó¬cû¦®ËeØ®¸Ü®zµþÌÈm}.Õ¸ÙŸzDÒ-ÇÉšŒêbgÙoXÖœÌ@È¿7§¥rÊU"µb»]IbEq¢ªg¥s:ý¿—{æùdçñÒ‘¿Ê²õ¸ÖK,î]èrµzT¸Csž³Ì™}¹­kA²oJ«¦Gû×ö§5¾Zè¯=Zž¥ãnœæ•"éè§>£Ò¥ÙþÖ3Ú¼þ2ä®àŠ¢!fÞx"¦6rzR·QÏØÒÞ·ŠýÚÊÔ€Íîr?Ö׊ǽ]Ǧ1ôÅoEÞWlÚŽìϳҿ´¥¿ò‚¸v–žÿýj¯«Y%†¡%¼S´ñ® ÈSi ûsŠÕÐÎ.'ÀþFµÂÖywMÊHÆ_<~X®Ï¬û9Ú[•›LâRFFÊ5XûIuÅtz®…åÀ’Î-#S8ãë“\»ÄÐÊñ¿N o Ó«ª ¨µp "—ÕOWÂ.I¥w,ª=*KCþ=êÒåL¹3OO .Ò;zÖ‘’Ûåj‚{:Õ8ÈÛŠ™çpk‚z»³—šïTPž&p}ªþ›6YÇñµ¨7áŠO»Ãå÷œ}iɹCC¢ªÐºb ãåàSäˆ/ש¡&¤÷§ù›º­s]œäV€;mæ§HÞ‚œH ÂçÓ4¹€‰#,ßwŠxˆ'VÀ¦I!EÉm£ßŠ¡>©o Í)ï·¥Z„¥²‹fÂÇÝÎ}i~GAXo®\ô†(ÔzŸ˜Ó?¶o¶à¼xôØ+E†¨h©3fHÊ:ȬÁ‡Cï[z|¢ñ2v‰GWý³u·#?ðžÏ\{i–O)€ÈÎÆô©«„œ£æ'IÉ[„çwÒ™ö‰×ï*‘YñøNœ—MÖUþ½*â\ùÉ”xæ_T`kÍtg‰¸µºv’`Áö¦ù–îÄnaÿ ÉpSéŠö¸b®¹'¡¡$E‡ìW#®;fšbm¿_J‡Êp¾¤úSÈ!e®zÓ°ì5ã ¿ÄO­4»•à~´¯;3}åǧjatdÆ:š»0³ Ô»„’2„= â°5GyV(¬Ã¬¯Èϰö®væòâòC$óÉ!>­Çå]´°R’¼&÷;‰õ=6×cµÔ{»ª6ãS[øƒKžµ¬?ÞVÈ5çX¤ÅlòúmjÙ§±]ÏD—ź]¼%VInd®âM/Š4Ô½ÒÌðmÈAp=Ç?¥yÝoèÞ$6P+äk‹6B{¡>žÔÞ Rjt·Aìíg¤A·¯^‚šq¿&šîÒçý¾kÍ3±2?ÍÂÔÓ šÉ×o VðØ5yò°W#Ò³z4ÃcÌ®£1ÎêWI ik˜þÓ› žyµfWÑÓw‚gPàqÍ]´Ôe·”|Ù^â¨æŒÓ”T•š&Çog©‰ÜV¤lñs^{ovöï”n=+§Òõ?=T½ëÉÄá5‰”©õ:4úzW3©“Í`r¿CÍt‘ÈFk[B5»€Psë\øWï´:D—f§4?óÑ3øƒ]~0=ýk„Ó$Þ ·c÷L›OÐñ]ñÛ»•ÅÑ×üj'pÛ¿AUCe´QL,hIº²v#¯>¿€Áq$OÕ ÛEpSÛšÀñ<Ü%Ò.£ýá]Ø&ã>WÔÒ‹³å0 –Taå;.:ŠÒ‹'÷Ëõ•ì•Oç[°´ «^õÝ[BêhIÕddþ4Ï”·ÝÁþu$~üÒ¸¤bÉãçµP­è)¹nëϵ ß:ñê+1WaØúŠQò¯-ŸJ‹Ëîr)D…ÔwÍM»2—Ù[ÊìóQ÷ªªm¥9ö4±¹FÈéÜ{T2, ¸ÆÞW²|CdÏ3\"ôê+P-•Ãp{Õ¢‹3!~wŽ”F¯³š’"öw8 ò# 3 Ó°»–mñHÌÀ—=©ÚΔÖ×,k˜‰ªZyÙvƒÔ^£q«O™4šæLœ\KÜÁmIÀô©Ê€/½Mwò\fš™~MiE'ëi;”ÊÜÔ7äÇsWnÐ"ï¬É HÙÛô­TlžºÍÓ„NübݦìoîÖ†¤‘Ÿ›Ša?v„ ŸÒ¤VÔ %•CAJ(ôjn6Ç Å>’–³faSEtðªùIïÞ¡¢“Iî¯,²¶]ØÑ+7ÎÛE2Š-¥€ÖŠþÊÍ1LÍÝ2Mm÷æ$Æ}k2•6nËîǵgì¡»W&ÆŠ^_ê¬q³séÀ­ÓDsmò²“PXÞ”uŠÊ×±­Œë‰:‘Î:W5Y¸5ed=¬ÎcIOõ¾À ׉îy¬»Ý\ÜÃЃ‘ZÖƒs`óE}Û¾#B$>Zö§ùtü…]qǧ¤flØÇZó›ê@y|àté²N­ƒ×ê\Ç  ˜ëYw:¼ˆÊæSÔúS„e'd°P“Ü ÊÔÓt·n‰J+sÍbj€ý¦L®8¶ ýãj/Þ)èßñû(õŒÿ1[¿s‚Ø&°twÙ¨7¼m[Ä«®JãëZâ~1Tø‰ÔƒüYÄêѼz¬û¿ˆä}+°ÏAUu=1oíý%^K URŸ½³]™ÅšTrŽ®;T÷6W‰“±ìj­{ ¦´f†ôR¬ˆ ýÚ³Ìë•ã5ÏA;ÂùNÇjس»†f¶ûµÇV‹Ž¨ÉÓÕXµwþ«=°?•fa‰Cq’ ißíT;Ž:õéPÙ€mþuÈ$ÖpvÍë;"k`Î>~ŸÎ¥yᇙ'U>…ªDM£p\vnƪ}Š ›ŠsîÔ”bõlçº&Ÿ[‰8‰ZLt=R—X»“î2Ä÷:Õ;˜ûÙSÐÕzë§B“HÕ[¢,;³¶dvcîÙ¦ï %kÊYh:Ðd?…V¤£•Ùi~tüíªT¹?Þ¥ìÂìÑBòÙ©ay²0îœÌIVù±éSGrËס¬åMØ9» ¾³ul›lê:öa[\Áubu'ºôaøW%£rá¹cÉÝÚ¬#$ µ‡ñµÇW²°:P–Ú>öFãpÇçKö™ppïšÌ¶ÔD»RfXäìÝž´’uÏÊGr+’Tùt’9¥˜Ñp»²WÖ¹ÍkZ7#ì¶Í¶áØuÿ…Kâ èâÿD…•ŸþZ²vÿf¹Ýþ‹^†•¦Ñq‡P¤Í!%¨®Ó@Í¢ŒUÜÒÑE† nþ,ûÓ°;m#Ú¢8ê:S2[š¾rÇ-‹‘áº÷¨õ{ÕÓ´ç’?õÀúš…çXÌ••Tu&¹gW[üGíŠzžõ½ ;œÖš1w2]Ë»9l“É4ÊZ+Ú7 QŠ( ¬ÙÞ=œ»“ŸPz­E &¬Àè#ñMʺæ$ǶsRI«UÇË´ ý+›«zyÛv¾à×<°ôÒrŠÔqI4Y¹%%YQÎ}ÅvÑj‰,*Û¾ð¸ËµÜ»ª¢^KnGÔà†ô¬*aÕx¯!U…ÏEK•—oµ<¸ëé^{¹}GSÿ§Ÿê'5GÑEr¼¶wј{&w>`SËqH\+}êàdÖõëpÃéPBíúÜIÿ}V‹-—VW²ó;éäùyãÐUq»–ÅsšÍå”Í*2ÊZ6LJ»ÀÜ1qØÕ).&“ïJÇþZÇ/k¨Õ3¨ŸT·¶<º±ôÖeÞ°×ê¶ûGœ\Ö%(®ˆaa z– –¤² ­ZÚ|¾d;UþU”ü >´ë{ƒlû‚çÔUÔ‡4lWGD¯Ò¬!ØNõ—ov“.Csܲ’ ƒózà6´fÀJqÜv£*Û¾l„J…ñ¹±ýãNvýêÊÄÙ’züh2 À2ý "»³Sˆÿ{?AYŽ(S *À”?/´ÀQyÇÚ‡(WʳzŠÌ³Š«·vAíOŽFÉ è}*(«“"­0ßÚB?{rÇý”äÑ윶&×5œ£ÄD¬¥;湋¸"²Ôã1:²“ÓëQÝêÒË.mÕ”t\õ¦Yi——7 )TK?µuQ¥ì“sv5§;‹¨®Çÿ  '?Þ­D“×·ÖI®ª ¨Ö©“y¡º­8H?»U³Fk{³ ££oFÃŽ†•ÊÍŸ3h'ø…PÞiÂVÓ]DÓhˆþÆ«”Ý«iqØÐþS£ÁÇVìÇ5¹B÷©)è 3¡Žœ(—›flZZ§RSiÔœT€´˜©b·šfÄHÌ}ªúh—As2ùc¸ïQ*‘Žì DelQõ­‹}ÝUY§Y}“ššÛG²#,ì[Ðð*ò¬ü˜ŒõÅsU¯} Á²DŽÝ"†/õx9 .I¯ù[xÝÈk›Içvi£E`Ý lñô­« “ö@ò¶Ò½Ec(Z:½A¤£¹ÌLž_ˆçŒ?¨­»p!–"W }}Ebêñó[üØ•É?Þúô­Û½fyâòSå‹¡õ5‹ ý?•waã(Ç•›GkÕ›šúïUªî”›õ(Áè2![Oàe­Í«Òv> ËME ÝÅe5©}ÑþµÎOþ¹ë’„T•šE}ÍÖ7ã(ÜvÝLmL7H›þú¬ê+£ØÃ±Ÿ³E‰îÚeÆÕ«àÑR¡]¸5z%¢)$CKš“ËäQÌ‹åd9¤§”Å2™"ý)â [¢7ýóO·Œ–­XUÁ¬êUåØÎR¶Æ`³¸oùdÔñ§ÜÿuGü ·Á§„'Ž¢¹Þ*F^јbÊî6ûª}·TÒ,Ñ¡&¤6km#ÙïéJ-ÃsÐúVo}Ð{Fs/ð•o¡¦5Ô¿Âò(ÿx×M-Œs¯ï"\ŸâïY·4q«Ÿ?ËÇ@ý oNµ9nZ—s’¤‘6ŸqMºn]ôŠu&( ‰E.)Ø WŠ1OŒQp¹Þ›£Vn£¬Å`¦$Û$Þ‡Ö³µMw$ÃdØNçéX$–ä× Ú˜*}Ëw×¾gfô…W¢’½’VH¡h¤¢™BÑIKRHRRÑŠJ’1ÌŽ¡¦QC(Øœe+*QóVô›Ò9ѽ?½Þ±'5aEêÑR!¢Š+s0¢Š*€(¢Š )(ªX¹ÜŸˆ¦8ÚÔˆpÀúSä!ºTu(u¼Šóô´¿Ú‡´_øõRÊȹ_Ê–0«*ù«•=keÆ-¿µ\7ÜZS«ÜvòÇü¬¥¶Üí^jt†Õ9X”ŸSY9S_dZŸo»“£°ú-(ût¿óÔÖÆBðª£èµ,xCæ78áG½C¬–Ñ&þFRiwoƒ'ËŸï·5r- Ã4ùÏ8E«D±ù‹uæ¦~ÀYÊ´ú ã­ìí-_Ä»½_“V¤?>Ò¿ˆªÒHŃºFÖœ’‹k7ãÔW<®õl†bêcçuäg“Y’[È!…Ê7zÖÔSëK§ÞZ¦å\²ðçƒ×»¡6 šW:ê¿u3ÒU«×´wÿFVZ«]QwW±€ÚuÚ´MsµiI­DNi¢â„©cûµNŸvªF’Øx§SE(¬ÌƒìRRÔ€ÞièJ6v©úÒSF7sÒ€4"Õ. ÿVª¿J҃ijíÙ*yƒóª–Vz|ø pÛ½:VÜZ<0óKŸïkŠ´©-%ImuÔ1n04yïPÝG¾ÞEGCÖ­ç‹þ^ýÝìÏ=ë–.Òº¾‡>Œ`o‘˜N’îI“ÓÒ®jUgì+0dWdm/zÆêÏRO1>]ŠÊOÞ¥ÞÑ©Ü Ô “V`·iæ@y本·)¤kè^sÍ#–2=lƒpÍoö*ŠZÛùb ½ n*fpÐñ,kì+Í«.y^Ç,µw8ývc& à.Ð8²qVõøý“ §š«Šö)+A!¡FU²8­0½¨}ÝPgëXØ­xЭŒgwTâ•khmGvfùÍÞb6ž~´Âû›%²}è“ïÒV‰!Tø‚ŠLQŠbš@ju&) +ÈZ®èÈN¢=jŒ¸ßÅhècý5Ï¢có"ª£ýÛ5CBôü‡ë\ôßë_ë[·„ì¬)?ÖŸ­c…Z!(¤¢ºˆcRQA$‰&¬$€õéU(ɨqLµ&‹mÈïPl þÔø%Ã`Ò¸ÝÒ³WŅi- vñ/QÖ´+>×îWÑF=ë–®ç'BÝÕH=÷T¸ ä«b¢AØÔ¡xÜ@ô®v"dÎÞ9›jDÛ™}ÅB‡÷±RùŒz?þ=Y²GŒ@uqèx5SR¶0ü¿xv«rw.jBz74áŽJT(ÛjT$05«ªÙ”Ä»k*½Zuâ™wº,\\$±( Ž¤-T§âŒUE$¬€f)qNŪ …êmCE•fáEPE´”´QA!ET€QE¥fw£ӊ†ò0Ãd{S¬Èß\ŠKw6k¤Ù¯B•Q[™Q@Q@%´QE”RÑŠ¢€­‘ÅXIó÷úúÕsII¤ÀÙ´•6-Ò´U†Þ+™ŽBœv«ðËq³÷{˜zíÍqÕ£­îbÕ¡àš»7Vã°¬Csv«‚Ø•FgúËÿV~Á¾¢±¸®K›ó§Ë{bd•~•€ žFûÙÿRÿgÌ»ÿ}Qìa}Y.&«ëË77§ÖªË­»¶b‰WëÍ2-(žd•@ö«ivÝ÷3wÍ+Q‡˜´Etž[«]Ò6[$Ua²–êVH¶åzçÞµnaH¢Â¯–@;š§§Iåߺô ‡ô«Œ½Ö⎇­$ÐôÑv£%äv•"„Úºy"sí\¬Ì<Ö&žr›wg¿¥­‘KËdÄpè:!ÿëÕX\qÞºw"òÖKy— ãmq±£Û]Km' ÅkFn¤–蕪5D7-N8ÜCv nà÷5h ƒ2:ãߥfôåOö–”ü§o¯N[øƒ*¥1õ‹U^‡NŸ³›èÍà6:šbîwå¸í޵“qªÉ7úµX‡µ2 û¬îo÷kO«Ê׎“T¶§cåõ®0¬G¥o¾—¬jC3>)lqXóÙËo3DÿxV¸t¢¹y®Áz•¨¥?+`õµÔPQEÀ(¢Š­EV†áEPEPH´”QRÑEQEbÑö̓ЊµrV#ëÍV2øÑªØÍ#æ QEl@¸¤ÅPEPH”´Q@QE%-PIEE(vO¸Ì>Š( ’z¶h¢Špr½j+Ùcþ%aù(§*qkTK/Gª.ßqíW ¸W9 ÖŠ+Ï­N)hc$‰nrð“»Ü Éwû%ÊK·;zZ(¨¡ØÞšNž£.u™fCj±)à÷5™÷¨¢½*tâ–ˆQŠ (¢‚„Án”íýÚ(¥v‚ߊp€†Ï§­VNLÕEVA:ì~¾*ßö2Ÿ¹?>…h¢¸ªÔ”^ŒÂi'¡vÂÁ­_ý~}«P8_îš(®:²r–¦,üv¤qŽóEÏÔDCïTÛ »{àQES<ŠSd|×µUwÙ¿zŠ*¢Øû“åõªòOjFèÁ=Ij(­iÅKq—,5‹K}>o´ËÔåTrMd^kÓÜ¿•e ÷<±¢Šé§‡¦›•…Ô­&•¨ÎÙºf?óѹü«:îÜZKå‡ÜGSE­)¹=JE~­>8 ̀˚(­äÚZ |¶SÃ÷ѱíW•µÇ~?•VNMÚæ´º™òÒŠ(­»=À!þí( 9 ÀÑEb%IîW£IU¯.e—÷r3={QE8%qÄ«]œ¡4èvŸÅ¨¢ŒGÀkÊ7§çz­md÷+”¢Š˜I¨hL›74í(Fs±ŒµmEn¿ìƒïÅW™ˆœœµ0“eƒ Ëò¹{ãµW%Ù"Äy òhK`¯°QGÚ<‡+ÈëBG³ø¹=V€6[ˆ`\Ë* Ç~µÍkw¶×7i5¶âÀaØð¥W~ qÇr²_Ý>Mƒè&šÐ^Í÷¼Ãõ¢Šëi'¡BǦ]HØcëWbðüíþ²Xרrh¢¹êÕ”v~- Õ6—f“×võŽQêÜš(¨£&ª+ ©ÇJ2Ùh¢½õ± êmPH¹¥¢ŠÿÙ ------=_AxIs2_Def_boundary_=42214532--axiom-1.2.8/modules/axiom-tests/test-resources/mtom/img/0000755000000000000000000000000011131637500021776 5ustar rootrootaxiom-1.2.8/modules/axiom-tests/test-resources/mtom/img/test.jpg0000644000000000000000000013557711131637500023501 0ustar rootrootÿØÿàJFIFÿÛC    $.' ",#(7),01444'9=82<.342ÿÛC  2!!22222222222222222222222222222222222222222222222222ÿÀà€"ÿÄ ÿĵ}!1AQa"q2‘¡#B±ÁRÑð$3br‚ %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyzƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖרÙÚáâãäåæçèéêñòóôõö÷øùúÿÄ ÿĵw!1AQaq"2B‘¡±Á #3RðbrÑ $4á%ñ&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz‚ƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖרÙÚâãäåæçèéêòóôõö÷øùúÿÚ ?ç•pqO SRãŠzÂ3šª{sSÿ1ïNTô©TgŽÔÀSÒ¥Téá9 \š@2:TŠéËãR cc9âžPg ‘W8§€:ÔP>”í‹ÿÖ§ƒž1O+ž‚€ 0G(Ñ[깪ϣÚH¤ˆ¶ŸT8­¹ŠP½±@rx~6æ9qþòæ£þÌ¿µ¹|¨ìÇäk  Ž”¸¢às¨_Z³Æ9ào]¹«1kHÖBÃýÓšˆT}– {9þU£”Ax²ƒœ{Pxµ;I0<Фön*â:8ʰ#ØÕyt;Gé½>‡5Pè!&Àú‚¿Ê˜áEíX¾V¯j8Ý"£õéWX¸‹‰íÇáòŸÖ‹±ä¨éÇÒ”#÷³õF=jÙ¸}Ñÿ¼*ìW0L3¨ßF¢à/#ª~F—rt<}x¦½ÄiÆw7 äÓvK0ùŽÅþèë@ ó"£æoAH#yyíÝjEp1î ;cŸ¨¦0DD\§=)>qÕsô4yˆ8'^(ظqØÒâ KEW¸¾·´\Ë °êOáCv~=*9n"·BÒº¢Žäâ±gÖg¸,–‘=HÉÿëT)¦OrÞeÜ­ž¼ŸþµÕξ Ùkrˆð?.µWì·úƒn¹¢zåþ5©mg ²â4÷=IüjÀRzQa-´«k~voaݹý*øPÆ)TcÒLBÆ)À`PÏAJýi ÉЀ tÛÿÙN+C7=>ÿøÖÎ8Æh@F 4`ž”üqK´zP*gœT Æ)*wñ P1 ֔œ“œQ·;cîiÛxÍ(ª¥f€¼S½¿ M¸Ïœc€i@§ÀÁ '¥ÛíN=;S‚俀aÆ0)Á{c¥;Ž=©¯cþ]½O¸ñ „*‹ýç9®~ÿı®EÍþHþ?ÐWœMªk:žp’m=älÊ¢EÔÜÜÝ?º‚ŽF÷i=÷maÈ‚ O«Ÿè+ž¹ñn¡xJÿ´k´:Ú,/yõcš¼–ª£  aŠ¥…ÎŽ}¢ÔîŽ]„`úœšzhªNf‘ä?Z踩D#=*‰æ2bÓbîÄ£ð«+j;ŒV€ŒPSÚ™7) eâ”BéVÊg¨¦”¦&ÊÆ1è)6J²TzS ãµr±N:SY*ÉZ”ÐrµQVvšaOJC¹Õª÷íS*Ò"žõ2¯áY£p íR¢Ž¸¡@2¨úS枪p 9WÚ¥UÀëHb*÷©vŠàqÅHz`4(<ñùÓ‚ñÍ<-9Wœb“0¸N乤>0¿º%m†z×ú×ZÊfÐaiÑÆÍŸ\sXkl¨0ªAŠéJÿÄ–?÷†’µ;ž{Ÿö¥uö€Ì#¨àbµaÓ­àÇ— /¡™` êÚ€ô›úVÂÀÍÐU£9=J^HëJ"q­dA¹‘‚úãŠm2JþXÒìæ§)éI·Šr½é6ñSíÅ&Ð( ˜£eKÚ“ÄBVšV¦*sM+@•¦•©ŠÓ h‡e1€ëSµ …—н*fúÔl3Hg`«ŽÕ(^);ÔÈœZÌèÔÁpsBÆzTоÝiˆU\ñR*æ…QRã8ü) LÇ­=AÇZ0àu©é@€ Ôà3Ò”.8¥ QÆiGLRc´à˜>ƒšO­<sIøq@ #4€gÒŸ¶Œ`v¤'ˆÇú<Æ•mÀ1yÀ?•bøŒ~â ÿ|ÿ*܈~å?ÝÊšJúQ€x§ý)0I Rc½)Ã<ŠnE(§ãÞ¯µê){Òð­!À Ç<óFLqJ=騯)\ çò¬sb‡þšC[gkÄJ>ÁþZCHÂ?v˜ô#`ŠHaOeöè*„"óÈ'Úœ´Ñèià½)€¤cùÒ¨9“éýÿ­éJ£=ip8È¥š¡^‡4å<à @¼bœ) pu¤ÀõïN…'§é™¢–àc«ëZãéYK÷‡õ­€8ê) ÁÆ?Jpæ“úSÔÒ˜ŠrƒQË<.e•uäÖ|úý´y«È!Jè còÐÒGn‘ÕG©8È^ø¡ãtñÀ=&¹›ï[#¹¦WjWì=}nÎ,„f‘¿Ù~u—wâGQò˜à_V95æ²ø—Q¼;ma`§¸ýj±³ÔnÛuÅÀ@zɧf÷g_â»pI–áæ?\ À¹ñ|Ó6ËHO¶ÅɪÐè–¨A4­êæ´b‚8—Š£ý‘Š|¨—#)ÛY¿lÈ|µ=ݲ*|z ¹ uq$§Ó ­£)áEU‘.L«Ÿm8T{ãš´#TiÀsÍ"nFzT‰n‚­ÀcR2iF¶R ›÷æ\ÌKe. =«a 0é[ýåQž}èXæ •€ìÜžUoìÆ 0ÁyüéH¸\ãtTŒø’ýeC.HÎ?†º“¦£so(Ï÷[ük–ÒÅwÈìB—Rq×î×_öI- ÇaÐÐL·!ýý© *{ò 5¡´¹dòØ÷N•?Ú¦·;%R3Ô0¤2YÌ2ËåŸö)Ü“>]"Q̲¯·Z¡$/u*}­Yf’`Ù=äT2jFDÚè{Ó¸„{SJÔÎC9!Bû aÄ3›OÅ P ˆÓOZŠaÀŒŠa¦ Sôí@¦2ñSÍFÊDWµ"àqš`8sÅ*ã¥4Ò¯\RÝâ”c¸É¤›{éø†%¹Œ¾;¿°ï¼W·!îÕ÷b®YµkÓûÇòÔö-ŸÒ£],73Hò®>WÔ\ÈÚ»ñ|@‘ —cݹ5™.««ßd"²!õ;EI¼PýÈ•~‚§ùQ.Fjé³LsqrÇ=“Š·›k ùbú·&¬ƒOH–Å *@¦Í=Wñ BŒT€qHµH)*ç­HÚ…SÇ^´\BªñNN€ z9Ð=©ã¥&K—Ry­e7K-ê§ùÖ&+^ÔçIÇ #õ©—Bá¹ÈXá|Y}¸íS´“øWD×eùnHìqŠç!ãÅ—ƒÖ4?¥mL™îN÷Óº`°ÇNFj¶Iêiqí@SH‘„Rô§‘M4ÀaÓŠyÓô¦&2Ž)ÄLP1ïM f¤Æ4Ó@ž”Ìy çî SEʳ3‚Š~Z1OUõ&—c4¥º€G¸©B×?LQ´u<Jr¹´ºÆ´Ã§By—èjç—ÆsJúý)…ÊBÒHÏî®]jd¸Õ`û—[Ç¡59L šB¤i⦷ªEĤ˜ö«x¥ãÇ›hé©ŽqO š,ƒ˜Ú¶ñ¢/K›ˆþ§"µíük¿^BÞÎ1\q·þò)ü*&Ó­ßø1ô8¥Ê;ž“мÌnŽ'ôÍêì~"¶o¿©ïÖ¼Ÿû11Ë"Ÿ­="Ô!¹½¡&—(î{zÅ„˜ÅÀ_fU”¸‚AòM}WŽ.¡¬ÃÉx¤úÔ«â;´?¾±ÝsE˜\ôAoþùþU¶™1 Ïðå^ciªRÝ•L±mä|ÙÁéÅ>=cXµá/nvŽžd!‡èh×aÜôÜ|ÙÏ¥yä>3ÕcÀv³—ÞÌgõ¥Ž¥8ó´ÇaÜà oëEÀìèèx®f/iDâqqÿ¦‘‘Zx“H¹Ç• ö-ŠWkT½m;Kžé3F7`÷渫ˆ³-çúU¢µ±ë°á×ßÐ×Aâ˨ŸÂ—Ï ¨ß*•³üB¼Ø–$÷¦’z‰³Ü4Í^ÃX‡Í²¸Y0>dèËõs&¼ÞêkYÖky^)ü®‡Wo£|BtÛ®…×§Ÿçñÿ asÐø=)ÁȨm.­¯­Ö{IÒhFC‘ô«Ô†1¸Á÷¬¯cû=Oý4ÈÖ±÷¬ŸŒiêGüôÈÒÐãìèÙᎹ¨àÿxùþüªEf¨B¨4¼P !8$`zÓLät¡XdU õkHF »˜vNk&óÄñ¿.È€è]²*\Ȥ=3U§ÔímÉß(,?…y5ç·þ1GÈ2É1ôÎò¬™5JìbÞ#žøÇëKV¢]x"b*ïH¥s—þ0×ãÑNÑ\·Ø.§;®nO=—ŸÖ¬C¦ÛDsåî>¯É§ËÝ‹˜’_Ýܶž{…þ¦©˜µ ¹¸Ÿo9ÆrkH(ÚšïzÓ²DÜÝÖ8Ñ®¹ÿ–&°mÀXS”*ßÕÇüInë‹*À·¸Lÿt*Q‰zR擜*ˆ­(ëOšh^àÓ€#­(Å<  #¿Z•i¡sNUËb€ïRLT=H ÅH¢˜µ ö¤À枢š¹ïOÅ8zR \b˜ zV­Ÿ:cf¬ªÕ±çNaþõL‹†ç 0<_qï VÖ1X¯ÇŒzÀµ·Æj‰žâ~4w£ØR{S$CÅ4ÓŽjXìîf?$ø(^škM4[¶0TÿxÓ›F ÷å'è(¸Ìr}i¤Ö´–0Æ:õ5JQEÂ)3¨êqP=Ê/@Çð©ÝÎ*¶䓸S…y/_øP©ª’]\7ñô¥öhÁåsõ§•O ÐP;£Å<½C·Öa)ê~¦¶Šw¦”¢ÁÌegâ“òácŽA?SZi¬´X.Îw§¯©0¥Ç&‚îÇAÏ®iÛÀ9÷Í3ŽôÄ?#=sž¤ŠpÆqO­C@"“îÀÜN}ɦ—88zˆc¹§} ²yÍ=OÏÆž¢€3ëR(¦-H š@8 p\ô§*÷©Ð^PïQ<`0â­ɪò6$!ðøýÔÇÄ[´¶F·Wß $g*ÄwªšÅ´‡Üÿ:¿dqgö¥Ô¡ÆÙÈùn\û:†¨žÅŽNÛWú¡SúU¬Òäв̟v)ýr¸þ†¡–ÜdI?í­º¿ê+T7ã¾(žºŽ8íßcEÛ….§þù” n9§{ÑÞ—€98úÐqíO\Õ9¯–7Ûï#¸• SñE„ÙU,cQÉf©Ö$^ŠJæ6Æ•µiéŸñêãý£ü«?£¦ÜIþ÷ô©–ÅÓÜäuÅ"·ï 3|£xRÜiÆ8h˜ÈOÊÛyÐ1a• %‘˜ºôÆ6нo®Ûd…†:í9¬ƒk(æÊ·\`óM…ž9¶ÈÆ0F mäP+¼éQVmg’؉#à©íJĸ£¸QÆEL æ¬xDÕ|Cb.ì,Ùâ Q›z€ušèáø{®0Ë­´ïKþÒ3åg24ð+§“À:Ìk•û4ŸîÉæ+&ûDÔtÑ›»Yñã+ùŠ9XX¡Óšp4ÓH8¤Ñ$œv¤Í¤'š@?5¥¥sŸïJÇ2ªýçêkOD•%ŽmŒ 3ƒíJEÃsšÖ$ÓÛý—ªHÅeëcöœß¥ZkµèŸ­0šÔ±‘HO(»»Ü‘7‘ =üØ÷4Ó¹*-ÅÆ¡ij?qgûÍT×ÄSñ8õ¯82–$³}MFsž /Ù£Õ༷¸Éž7ÈÎTÅN+É#¸’ ŒT¯#Ðéž,žXdà“ÉÄàvçÓ5¶¦AqÌ+$N¡ò¼çћЌ¹#5 F[±üj×ÒÓ°\§öv>‚“ì¹êߥ\¦7Ò‚å_²§rM(·‹û€Ôçi´£j¼…OϽ4ÓŠÍ)¢¤ÔiÜzSϵ4ÐS7—63X«tg}¡‰ýkOP#€©ûÌ0k),e*¯žš ‰j;Xæc$²$)ת&ŠÙŸbNÓ1û¨«ýM>é ·@Ý­ïŠKXB˜£’'_3‚àõÍ$[K[ˆö@Û&^¡Ç_¡¥ŠOÙ˜ãh‰;•¾óW¥Óì-Ø$µÏGW9™ªS9yñ$†9‘pr zf‚ÓF-‰W^d‰Û‘õ¤ß•ä`2 åqøSe*Ø‚î ?úÕPJФ㯓À  Ÿ,¬s‘Т‚RˆpÀ0`Wj3ËCm9üéŸ à€:M&ýå‘ârJŽGû>Õvaóž{ÉÑ£Yd@|°@Ö¬§–?ìšž¤2Ά?âSÿ5ºâÚ>;TZ"ÿĨöE\Š'ºš‰nh–€§`VUÖ½§ÚÊPÊdppDc ~4YëöD.ó žÏþ4µªp§5ÒønW X°?¥r×>#´„b Ò°ôàUƶòÊ—K6qó~”¥±p½õ¯ kZqÿiÇéTuÍJ-2Û÷XiŸ¦OOz]Õíµ mg²—,Œù`®G¥r7)$Ó8Ý¿ñæ©ÕÙZâêk¹L’9v=Í5'šš;bä(ÈoJ¹šó°£ÊÃÐPÝŠI³?Ê8Ͻܰè}+NëH¸´Œ4èé¸ð櫪žNÞqJýŠåkq±ZÆHGÝž{zU[ˆBœíZ>`;Xœã9÷ª1b}¸Å ãv±«á­Uí.– 0¹Æc]ÖsŽkË B$Èõ¯BÒ.¾Õ§Æçï(Ú {3ž¢ê‹ù¤â–óVf4ÒbƒéIƒŽ´„!éLÅ8ŒRcé@Æ÷¤"—½0°îGçL ,PiØR,ŒÒyÆé ÆÔYMÒ‚s´dŠ…',{3€€ã?ýj~¨ºdsQÄ-«N²•Î(-l)žg"BJçî éZpOw [¾Ó“Œ‘:UQs·—d†0¿3ÈÇ’!½_2fHòpsîi”X—ȹ¶Ý)‰¦ rÑgóª{fʤðHàp„u¥‚ÄM Jyhqé“ì*o²Í ¤;²îÈ63Î)ZêE!@GV^åòER-œ†æµ-´ãus(å@FY±Ÿ|Ô³ønò(uŒ˜—¿øzÔ¹Å;6Z§&®‘†N@fÊßΜ¼{Ô†0#Pó&®iÖÒAXˆ«Ò‡-1mØÕÓí¾Î†03×=jy‡Ìùþé©"=2p7?û¦¦.äT\²±Ã̉i H7"”,1Ôgš¹ñ'^ÑÆ›mc£[ˆ¦œï–EB…Ptêzý*†ŽUtä,p¸\šç¼XRmJÞXdI#(Jœþtž²°XÇ·°–ãSƒÞ›sc%·&·ôé ƒ`‘Ž:d)/Ý&yvÄ0­·¯$ÑÎïc£ÙG–÷,øOW’rl§mÅyBzãÒºã ÕçZh’ÃXF …\×Xu;醤Cý•Éýjd®îŒ[åÑ“k°mÒ¦`qŒgßšá.>þ=«¨Ôe#I+¹ø›ŽµËÜñ úUÓÑÝÈ QZRcšZ(€sÍoèXò%ÿ®‘ÿèB°Enè_êfÿ~?ýR`=æ“í—‚‰>ôöóõ¨þB?õÐÿ:°~è¤K+O*B››ðµžó´Çæûž”jfóa8 *$Ï¡ÀëM !’)<£Ónàž*GlzTX¾y4Ê-A.åUbIÅOŠ£L‹ÍX71އ?AA-”àF*¡ºþê~f›ç»0>” ÅÆ•"›ö”ÇSϵRÃ’:‘"-Ðêh¹J7;«MjÆæÉ­ÒSæyDa—Ã\æÖŽÂÉ™OïT*c¹¬·W¡•…U}Qèad’±ÐÛ,¨7²Uul##¡Íg¶«©ÙIR[ˆ·àüŠ»l÷W2s<JË•­N®x·cÿLHòs×Ú­i¶Ætš77w‚®Ê’jP‹Jª2µ7&ÕˆTÔeÌIo’ÝÁÉi&U\õëþô2çg®}±^ᨅçŠ, "9 &½×ø±[SVG."\Ò$O¸ £š:œv©¡¾cŠÐç#fÈÀëUfŒž†®ªÝÈA$Ò°TK±=€ÓæŸÖ TÔC*NO–Põ¼Rîî[©ÚI¥,~µ±âŸ\øZžòF>Vq }‘{qô¬7…у§_zlV"< æšÒ„l(ÝëSÞ@¹Âýæ=€¢UŒebÀŒÔß[n¤POSÒ´t뼓{eJ‘’;ÕØ8+ŒŒg= lømY¼Á‚1QQµÑ¥©M&m[èV¤Œ—lñŽ•ÔÙéðÚ X£Uü+êp>µ³m,ŽrÀýMpsJOS×Táx¢ž»¦-ÌAˆËw'°ô®ïO ìEÁ9'ýz5ê´Ð•VÁê+™»¶hHßÈ'9šé§++•éÝÜãæ´t l8VKrs‘Öº»ˆ7B»\qÍð‹_K§›‚b¨LóùôÍkí"·g/±œ¾r!@lzœ×SáÉÑ,äWq€ýÍsÓ[•r¤TàÖö‰l²[o« Ç šÑœÓ]¸×¶ëÿ-ð¨ŸR€t,~‚žmÁŸEɤØþ >‹OS"Ô×øasL7òàí€õîjßÙÆ9v?Ž(û4}Á?SF¡¡œ÷·˜;cAõ¨bžþtËH‰ZâÏ)|°?„~TX.ŒŸ&åþõË~Ñöo½$¦µ€¤ÛNÀä`熔ÓO!¦ŸcN4Üö¤&­‘p¹Èâ‹[hæc¸”Dåú;cŒu©5VT\~#­E,’ÒBÍ'–•ä9çÐzÐŨc†É™f*€®ßîfúzU˜¼«¨dTŠ$eÛüX÷ª÷ ­cºKdpËì“ úv©mI‡/kEFì³ýh´›ˆjíBZ˜¬©w’¶¨+Ÿ\ÔM¢C(ENÈoÖµm´=zæ8JLj[ÎÀ3Ǿ)9(îT`å±köBîòYpV0£z‘‚Ooñ®ÂúÍDwxLÅ>RóüxÉâ›g§G¥ÙˆC^Oï7­NÌ&hK³6ð2ÀªüÀqßœœ×›V|òº=ŠTýœO6¸±Xnç<ô®–(,£TA8¨/lÕ57C–v‚NNzžâàÚÌÈ"/•à ÒRrI#(¨Âòf{ö‡±ÅCuüîš–(ÊÊÌOÌí¸ÔwcÿÝ?ʺ ­¡åU’”›E8ĜԠÇåY ¥ËwTÞî£ *æ¶tßùç‡ò®£áÀX”ñÿçùŠoq£ÎÜyR#nF²0~•,E¬H8eë]oÅvÓmµØ]ÒõàV‘,ƒ$)Ïb0JáT£Æ6†,?!QkîtÂkd4܈µHfÆk£„PG ÷®Fòf 2HëŠê´­òؤŒ…GÝ9ãšmhsUNíŽÔ4ù~ƒù×)u÷ÇÒºÍYÖ-.bN2ç5Æù†Iy;ˆéЏlDDÁëÒ‡R‡’9©¾âY½*±Ì–“𧲬q±'88™×¥(Åoè#÷ÿ¿þ†+ŸšßÐÔÏþüú¡€æ‰ßP¹ÚŒß¼n‚®}Šr£äÇûÇÛdŠîá(Û#r~µ,—sº‚d#éPÛ!˜ºƒ®¡±¼\çéWôÍŸ +¤ýÜsŠŽåZWI Èr =«cL¸·Ú“,;€qŠÎ¤¤–‡f0“÷‹2xvÌ´rZ™òOÖ±µ9v0G•>õ¿qªùQ­½­ªÈÍÉ•ÏUI"ši.D+»|g V1œ·g\éÁû©åµ¥ÅÅÊGa÷rj}Æö9¼§‘ÎkzÉu„p pWÖº½+Ãv²]ÇuLOË'*é‘õ­áQÊV9jPQ…úÜó ‹wŽ%>S*¿F+€«Â1?zW‹ì’_4Å1"Ì£'Ž:`Wm¦£8Þr£¨«”ÒÜÆe'dg$.ø!IÏJ›ÉxÓ;Xw>õÖXé*ɽ£ô¦ÝBž[ƒÓ—µÔêX]78í¥ŽX` t?$€š½-¿/Ii§Ëw+U,Þýj¤·9eMߕǎ½F+è?hèž¶ 7²ÎýËœ}kÃt]*{ÍvÛM*w¼[Øw?•}2¨`åÇÕW¹”bÓ³)Þé¶÷È›ò’„•G̾ÞãÚ¼³Yð£é^#û#8kIâib)Æß^:ŒÕëØýÛC¸V7ˆ|65ão*]y¢wíÜ ž£2M­ é4¥vxÖ§¶ûA*úÜÆ¦‚Khìs ì9vÿJ—NÕ.m5 èÙ bª¤Ÿ˜c Ž„{×3v¢9÷ÆÛQ» ÁÅìÎå$½ä[%Kn棒p3íU„ø\nÍ@í$¯òŒÓ4FÉ©Rú#»øun×õÄàe ‡i?í1ÿkÙHù˜ŽÇúW ð¿JK? yò'ï.%2{¨Wtc§B+x­»°SÀ½KÓŽõ \ÊÙþRŽO'òª$CX0G“ºEæÒ@09é]ªó u(@!†=é¡$Ú[Ï)%Is÷jÛxoT¸8G\àWm¬è–º?Š/m-”,I1(=ˆ†kNÁ;° mÅr×®á+#»…ŒãyM¿„ï#±tDGšQƒ¸ž+ãM»¶" £a6â1ŽMzå³í“ »¶óŒU-VÎ+в\Ä¡ÜÜ΢‡»4ž/DyUæ™yläUà ðsOÒîe²˜6GÍÆÓÆkªÔ´ô¼EPåTvï\ðÒŸûJ;XɘsíÞµXÍYœõ(Jœ“‰¬&Õ »ÏåºÄ9$õ­].òê;5¦gCÙ±ƒ[±ZZ6˜,_nЛJõÎZi¿e»Å¿+“jçç‹Gj§5mMûIÅÖ~LUMVÔy{€û£5¡k …rG=ê‡ :Qkr¥,Ì]*ÛͲ¹eŒ4›¸$ãWS2G$I‘º½E#b+ pX£ÊÉùzóVeMŠªß)-¹¹5GyQ¢pZݳ%ôÓŽÅ…t~Ð/®|;q©Â­ã”†ù¸'éSaÏâR>Ñy)ÆãÑucô¯m´Ð-4oC¤Z& Hü¾z¶z“îy5ßF\ÉF.šShñP§Ó4l=®‡VðÍî™#ð&ˆ67FrÝ;ŽÕ,Ä¡¤†TSкó½™ÀÓEmžôÔÓ¸aAÔHV´ PqÞŒÒ` ¹èjR§‘SJpF s”PG¥I Þj曥]ê×kke K)ç ¦ª$à õ߇š éV^Ý…ŠkŒW8!GøÕ.ìim©ü9ñsi¯<`ËírÏa%“½µÔR[̤¨W5õj2>6²·Ðæ©êz&Ÿ«Ãå_[G*ö,¼¯Ðö¤icæÝ/HÝ»,å ƒÈ9õª÷ö7VrBÃÌó‘¼cÚ½ƒSðÓËͦ“$'“ñíëY¶vë`®1Á¹çQÁêvÓ£ ‘ќΟ¡Ý_éªÞB¤ççRèpIíùbºÝ'HšÆÛ—-q0àmÈE€~u§b–I@Éí\uk6vS¡lV[dšGFzTWzÛ_Å.ΈIoýMm!óûKé‹©ç5ÎäŽFâÊiu?<ª_žsÇZ‹Rˆ}¡õŠÚÆ>õ‹¨¾ëœÐWU)9IX„£M•‘>lš©wÿ-?Ý?ʯ¨õª7ƒ‰?Ü?Ê»c¹ä–tð²ÇÐ*¹¢j7zl%™Ù+¦ÍØÉÛòªºxÙà×Ê®Û(Çgô©ž†ÐEKý-Véî®Ì’ÎFfcœÖd~¹ˆI"*zd‘]ŠF»rÜ(è´Õx¦ŸÊoÎ0+>g±¼"÷Hæíü:Þ`ó™[½ëdØâ5åTQ…EíWÖ-ƒ=Í&_^þ´® Üâ|`žE­´JNÖrXýÿ^¹í>š@Ãc9ïšíM9’9H,Àšê„ÓGJN,®+AÿSqþôú®|ßÐÔÜsÝ?ô1TÌгÈJëþºñ°sPÝ«Eys3)(e cš ²0;YÛþŠD5¨æ©ô÷¹‰%ŠÞR‰(ÚëØzª±_JÁVЂx˜rk¸ƒÁ“Å¢†R?´×çaŸ”ñŸýZ™¦Ö†Ô,®Ì«{PÖV²H¥°›[è kOö{[LB qXVWw'ýS~G;qOºšâbX°dazW„ºžÂšµÑAÉ—V “Áêöä&&Î7BÇ®yB|òŽŸ(çë^¿ ñ+‰= QÿŽ×UqWîrž-ýî/÷ƒy˜°5ÇÛ¨tOjô+Åi³DÃ;£+¨Åy¦wn©²V(ûŒRª´Ð(I)Y~‘y'Ù¸U(sÞ£ÔíHŒ>Þ3ŠÆ:ÄöcÊ´‹$Œ™ÏÔAuq¨Áæ+³2¶Ö,qƒô¬”[GD¦”´qh<¢ËœÕ‹`5Š;môëS^@ð›ØËŸ¥P´+€9! ؤ›µ¤¤¤Að ‚>±}rÁI·‡jz’3ùÖ½a>{xϰ5ã¾ Ö£´ñ C+‚æ3æ8ÁÎTŸåø×¬Z]Á卯Øà€à×E?„à­ñ»óƒô4±žôâ‡[#ëUn2G9\V†g1ãÏ Ë¯X¥ÕœJ÷vÎILàÈ„r3ê1‘ø×žÇà½~òAZ5Ä^¯>GâkÜsû–÷8©S ¤Ò{—¸«#Äõ‡Z†‘¥-úÊ—aFfH”/ßý¡\æ™dú–­k`œäO·sùf¾d³Ù«—µðE¥—‹ãÕ­¶¤ù p®xÈô'ŠJF•Ž‚ÂÕ-,ãhÇÐcúUÍØ‘×èi%Àt´Ó%;fýW™£äg$òÄR&ON¨ L§wÉŽjÒôÇA@… UK§(˜Nñš·ÅW¸EÚÎÌF_Jbd£ý‘Ûñ88]‚«ËÎïáÿ‡†›¥ý¾â<]ÝÇ=Q;ë]{ŒžÔøÓjç$/<ð®ØG•Y\ääÛeVµ·IþÑ$qùäcvì{ž´3)Ú¸÷\ÿ:xEäªdÿyŽh(}ò« ȾÐô½@³\éöîç«„Úß˜æ¹ _À@+K¥ÈÇù6Oà¡üëÐÊñÍFè 5&&“<"â m¥1Ê…N#5⽃ćW·gTiQÇmþÙõô5å:–.Ÿ.$)#Ž úéNÝŒ¥Šyæ€äsQ–£'Ö‘?“ëMi1¹²@íëQKp‘ð9j¬ò4½O•&©7"óK-µ½´XE@7÷bOSY¦òbÖÈ~¬j¸¥8 hѶË){qù'‘>ŽElXø·^ÓÛ0j—Gð»î‘¬$ ×½JÒ˜“£üU¸VXõ{U™:aùX{ã¡ý+zëPðî¶Ÿh±Ômã¹ÆJHÛ {׎*Š•TÓŸz™AIY•¸;£Óägäulqò¶j)§Ûœ×Ÿ&TðHúVÝŽ¾ÑÁö[ô70¸û±$CÜ{Ò¸åƒofzÇ.¨èc¸Ú £’ãrž{Õo,µ »·“ζ-·x\>Œ;çT®.Ö59<×3¢âìÑÓí£%tX¸˜G$ûÖeöŸskäÏp~Ð7(ÎN*¤ó½×_¹üéÊ$l“Ž™5ÕJ“ާ›ˆ¯{¨ j•ØÏ™þéþU|gÕ;®²¸•t#ˆ±`?ПOåSÙ±K‡9nž•^Ô•ÒÔà…È?ðU¬5söÈÖà),¸ j'¹Ñ¥Î­#%OjªY,EsÏçS%ÀdÎÇÅÊÅ_ Ô¸"²jV¹Ú¹.A¯3åGÏã\ƶíq©¼‹ÔU 9úÖî±ržY äšçù'=ë« K™]œ8Ùò¾TP½ ÿª¹ÿ€èB³Ú“¨ÃzŠÑÑÐD·(Ì2Uqïó é7qFI’Ëq*j7(€$=*G’B£21üj½Ö?µ.±Çï Lÿuk šÞ³7Z·˜A"Ý ŸA^•†HUÚ\猎:à<_í·m0!ç¾z:ícº@ÀÚ˜ùÔõõV6§±‹­xmïgûmºF%݉œ úÖ¡c¨Cm"˜#bP̨Ùb=Ez»y»PÿŽTxỌ>FõùX0j\"÷7I%cÊ ¸EUà“´ ö€ëŠŒŽo_jóýGÃ_b¾ŠäEºØHz àg8a[SÆJð¾Wyeeä ¬:Žéj\¸\Û¸þb˜Ps\.­höº¾£nFòIPFànë¹µ``R:çñâ³ï4VÔm®-ÔˆåŠMбèr:j©-43Vº¹ ÙZ’¬d-…àäô¤¶K1{Ã×vqUέy‹ !Xe…Žíߛr<èUÑú1Aúz×"„¯©ßí#dÑo\¼If ÊY,ûS5»9jc,‚5?Z¸ÆÆSÍ5“îŸj¥#4æ"S'#o« D°g“W r»Ô‡4nzoÿ]LãGÔ%3»­äsó u\÷ã¥w—w©³½w€£>µóÝäúmô–Ä  pëߑں­[âëÖ-§Egq0Ic•+žp;fº%lqÜö§r€!#+ÉúÔ–ó,ŠqÔé_?ÙøãY²1ƒ©É$i’E ‘é“[ÇãÛɾ›Œ4Ýï‘P žÕÁÒPrá7?õ©A-Œ#ýˆKùšË‰ž%½sêò¡`pLã@s#è‡`Å>†ªê2\Gh’[A纷1î Hö'Jò…þ-Ô.õ»‹ Nækp¡Ñæ±Fð3ê?•zùæ(w!IùNT®ååOU5“©xÓHÓ$hšf¸x1Áιè)es<5WËÜѤ²;D¡pýOÞ´PEÁCƒééX0H1þÑNz„\’iÞ\­™¤y~‡§å\S‚HôŸ7Qš³™Ëxk˜¹ÿZ¨=kSQ½ò÷)a“TRHžòq€ȧ©­iFËS Ò»±NÚ)ÞâaåFÒ>=ÿ®­E!d%¥Î=Mv^п³ôÙn¯‹•Ë+º½—ñ¨Oƒ-®f ³BÎx@ ×d šGªÓg$.@éOóB€;שéÿ ´ëtV¾¼¸š@2áUÔÝsá¼Ð¬ú(Ì‹††F$?¸'¡ý*U2•cÍ`˸8ãµzßÃ]+˲ŸPuù¦mˆÙ_å^]•ÏöšéþS%É“ÊØFlâ¾…Òl#Ó´Û{X†$ ? ˆÅóêUi¥‘qˆ Œã?Ê«…26öº¾Õ#ì{¯JãŽç­tƒHç¥4­< R8¦v¨›eÔbª¸Á ‘ùW/â= ÷Êê<›’R?‚NŠÿÐþÔg:†êÙ/-e·“…‘J’;{ÓAcÂoìå°»’Þa†S¯¸ªµèšÖŒÚ¾œ²à è3ñÕ—‚?¯ã^{"4r28*ÊpAíLÂQ±Äæž3LUǽJ«íHØU©Urr rjeAÜÐ0T AÒéRŽè qSÛÁ$ò$q£;±ÂªŒ’}¨ ª2M{g¼!‡cÝÔAµ—q-ÿ,ì=ýj’Òì{ß šh–ç[wˆE¼gæÿßA]í—†´]>*ÛN¶UÚ0Ì~¤ÖÆ1ÞŒT¹62“éÖRFñµ´!$pÃßçž.øxVÞKÍ1e6¤ç?îŸ_c^ TÒ£e:T4žãM­›£NŠFàƒÚ¬ªñ]ï|+åHúÝŒcË<Ü¢ö?ßÿθ@)½Ä5Fãï¿û¤~•|ÕGM÷}A¥ aPº#ÿ<Ïþ‚k?ÃVÚš¥È&ÞÂy“¿ÌÔÖ’ý€íØÆßÈÕo‡×qXßêÉp‘ìé‚—èÿ j^ìÞ/ݱ±i3Én“EÎGÌÁ«°Î’ñ­ÜÕ•e¯i63;ý®ÒMË‚ <^•UüE§¶wËnäÌ*•fà÷¨ÙÝTc ŸJÆ»˜,lî ¨äŸJµÝ1†ö;gq#ñÅP½Ô4븼£©ª¦s€„æœ!®£•Em ëFW˜Ý£\çå8<{Õvv¶eEâLçÜöüªÂ %%W:ˆp¤6<³ƒUæûJ]5mÇ$²æ»ù©ròØå÷ù®hY\´Ž‚&tŽÕÇ¿¡&·), xcÔ»sïOŠímâo:Hñä¼1ßüñYž_$‘œúšää‰ÖëÎÛ{éd$°ÓÚ£ÉþE/—ì?:_,çiòèŒdùµb&Û»pÓ½4K7 Œj@ž˜¤hLþ•\Ì›"3$Ò9f”–<’[­!i«;äóSÿÚ4«,Xð*l2þ‰«]hwñÏÌN˜‡£®zuÜÖá lÆÇƒÝsÓð¯1½»†ÛPŠ!‘mâþ=s]‚/¯'¼š×(èÉ‚>™ ¸>‡oku%„‚NèÝ9ÎÚ“S´wj´oœ›ï ©= vÜ·y?tÔÚ|ï Ÿc™¶îûžþÔ\‚ÒåÔæ\á½jKuƒc”#$  >´— Fv‘ÐñN³e ã¿æ€DÑÀ°«íbú)=*5WtÎÛcXËÈOðÖ£c¾ÁË'Íõª>,™´ß‚ß,Ú¤¢5ÄKó1üNÚ-pnÈäüK¯AªÞÅ-¥·”ðñç¼ãÐJ¡lï?Ï4àÐVa&º¿ ÜøjDKbÁìÄ-˹ÚÙìÜñü©U•ÐR¨ïf`ܺ³b N(´E=ûÖž·¢X{q¸Àßµ÷§w¢ác¿ø{{l̼Ãq‘?ÂXeOóôBŸ”×É6—2E6%µ`÷ë¹\×ÔZ«¯£Z_!OoÇÒ{§ÄLCao¥£|÷yŽ?Ø^Ÿ©ý+Îä“˃jŽO©ã‹×¼ñ¥àÜ6Á¶Áãdþ¦²Ê–Ló\õ_½cÑÃÆÐ¹I•ŠOZ4DY|Gd‹ó&Húin²±‘œT:üZoˆ ºÄE› Ôœ?T5ÐʵÏ[ÓÕbŠLýì‚i¾ ÒcÔôÝ™Úêw#ÿt× ¨xÎúâû6LÖЀ G€Å¿¥vúMÞ¥¨XfþÒ;dÆ'{{ã°®‡ nr)k¡Äµûhn!½µ1ÌA+òä0õuRçÄ3Þ¡[hˆ Ææà ëüS£›ý=. ÿ»pJ´U?Zó5žt”Æ–ì²1ÆÀ§9úV ›¼N¸â´÷™§PÄ|û–RG%›úUý 6×¼A#&ÆÐùžŽÃîÏŸ ¨´¯ꚣ‰¯ËYÛuùÇÎ~‹Ûñ¯AÓtû]:ÜAiŠ$÷$÷>§üjãEGW¹LC’劲1|su%ž‡A$±É<Ár‡ç5µðÛ@»tZÖ¡u<†lýšl…^›Ï¹ííVD·×qmuøw«œÿ_ë]ìQ$P¤q*¢Gòª¨À°ÅhÚjÇ=ˆæq#êïÆaÜý;TÎÑÃyUe‰<PYÆ^Y.X|Ò¶=‘x™Éük?ĺDº½—“É…‡ðç哨Ò*)7©Çèª5¯ˆO¨ÌAŽy#ÊüØ'j~™¯Kžp–ÎPì$dz ×—é³¥x¦ÑÈ Ò±GÈòÁù³úW¦“ºLuMgÛwFµ’OÝz fâKhdÎCF­ŸÀëNsf ·„YBð#ˆÌÿ çô4|;žkC`)i;é@°â«H*ÓUy4`pqÛÒ¡â›'p `bÜÅåk®>IãY‡ûÃåoý–¹ø{ÏV½¶_Þ¨ùÔ¼=~µÜjjå„÷¼\ÿ5¨¥‹ äQq5sæ\†¬*ö¦(© ãõ cÔ`sRÓ@dŠpÇJpô*)5ÊœõÚx ÂMâ Cθ , Ⱦ{(þµIÐü7ðp”®·(§6ѰûÇûÇØv¯Q?+æ•#HcHãUDP*ŒjùA©nã°þOJ;`Ч#9¥ëÚ¤aÖzÓš­, "2€á†Vû¬;æ¼cÅzö®R0E¬ùxsü>«ø"+ÛXÛ?βuý×_ÓµÊá‡Í |Ñ·¯ÿZ“%«£Â©–Ñùº¬)×sVuM;SÒµ9¬f°vx²(W^Ì3Ú«X=õ¦¯ow&™#EÙD©“Æ…¹™8„Ÿ Ûœa¥Š@>¼Šáá·žÚYRVh5 žüŒ`zç5è&\xnÒÕâhç¶I7’A ¸äb¹­Pï‰nZWÊñÏOþ½CzèmÓb±‘Ý/$t$ap£Ô“Uîš¹cnbíšKˆü«‰ш¨ëN„[Q†ã4ò);f€Ž)?Jq-´açþâüÍôe#d‰"¾ßSÿÖ§ˆÇBhŒ—,íÕŽjPâŒÆOåKäzš”~”õ€!è9É¥0'¿çRãÞŒ:æ€"òSÐþtÈfŠÞðHà”\í×µ>WÚ„Ž½+>fÀãé@ˆÌ²¼Œ~f$šØðîªÚF¯Ðå3²Aꦱ€â¤Œ€qž´ ß# JÒeHÎsŠã¼GªÈ&† w1„>gË×Ú—Ãz¬—ºpµ”³>SþïjÌ{½Jw»2Ô’ªA$ƒô¤ô-·m 8å.2±®Ð ÇsžƒÚ¹ëÛë½Jíe¸™ŽKÈÙ5É/™¶m*¾í‘ìzçÅÍÐ"é–òê#nWlÇ>äò*ñK¹¾×{=Ë"ÆÓHÒN‹’N·4›ry§çé]1ŒYŸ{¸íÁª‚µ¦‡ÌVQÜf²zg5Z€¢ƒH>´½ª(ëÖ–›J -YehIÿZ»GûÝGê?Zö_„º¹ºÐn4æcºÕò£<íoþ¾kÄÙ]X09Þ»?ë-£ø”L¤­½ÜxoNy®E åÝEÌž#ÔxûCÿ:ºŠ6 ÇI¾Ñ}q1É+7¯S[P¨( qÕw™ëÐ^á›ÉÚ:V>˦' àÖýîãéXÓ[˜Ä,ÊCM“>Äœ~‚·Ã«ÈåÅ;#©ð>–·úÓ]KÌVŠž›ÏÝþ§ð¯L¡É÷ÈxžuC™|óçÿìþ•Õ,‡$1Ñ7vq-‡ºƒG¦jÕv#O'Ö¦ó†ûT)c´çÛš”0’@ ü‹É÷>”¡6¢©Áv9jc~òåb_¸Ÿ3{ŸJÒÓíîç~10ã¯=(z¯¤Y›t,ãUzzVÔcÓB ÇŽµ"—ÜR;Qˆ"\cjãÖåÇ»f¥EØìàò*”JˆïlTÖà “ÜQ²üì½³Vcl³@ÚçÒ[8Á1«'ûC¡üŽ?:³ÈÜx-ÏÐTw$¯¹‰²¤õÿΟÌ¿JN£ŒšZw§v¦ W“†ÅX¨.˻Ҁ(ÊÛeQØœFݵÙýüèÌ*ÉNÔ—©ºÈž×+ú« •Ó5û†Ô,m2™OÑTÿR*áZ`|¬Š™@#­DzŠvßC@`íëNCÇÒ˜¯ØÒýÓœÐÿ}x¯ ¼f,<)§Å· Ñù¯ÇRÜÿ,WYÄfºŠ%ä»?úZ o²ÚÁË(Õ¾Oá.6 àSå1O\8àÓf1ËÓ¥< ô¨ýª@GBhÃë@Í §gÖ€ƒC4|¾Ô»Ž´ÏøƒÃVÚÜq»e'ˆ“~ ûW&Ú¤nÑËYá†ã^–PãYz–•ð•:ð¨>Æ¥¡XòoÙÃc.ÝѳIäW'ûF£n÷ ¸å¿æzWŽ-å·+˵„ î¸5äsÈ^ƒ‚=ªc£Ô[•5™Dú¤³€˜ã銠Ehjq¨1²ŽEPÅhõ¬4ô¤¥4†€V¢]°Ž>iÿ×þU®ç ;œUÈÆOuFÁt©GO¼)óÅHªàÐ1àgÓÂÞ‘WÖ¥/¦)¬qÓ4ì•Ï4ÓÇ$ûÐi<öüjŒÅZ@8œžõffà’}ê˜É$žô8SiãÒ€6t é,ïУ.%Â2“€}3ø×°iÖ1Ûéöñ4q3¢X/¼*&Ãc8ÏCï^Ëá Pjš$eïcùð©×c}!ˆË4ÿ¾k_C±IïãmƒdgqãŒö¬À0¥˜€$žÕÓxRöËPÒb¸³•dLØë»¸>‡úT«½F K'^rMpÉáæî6?ˆaýEzPÏA\§,þßà­R2Éš¿U ÿ jã¸ÞÇχËô¤È=é² 0ž•Ñr ðÛM+ƒMV*s̨֗"Æ=#i]QAfc€sO1²GYN#¡¦Au%µÔW$‰Ã¡# sÒ–[‡šY%p7;8ú :€Ã±¬›¤Ù;ÇšÓy>QÅWž<2Ì¿òÀaþÉ8þd~u3ØHÎ¥íëE+…ÑÞƒÁ <¹ Ïö5ÚÄ4/ëØò?P:¤Õ5›1ˆôü{~ P#ªÒO˜ªÝÛœ×[o-sÅqþa"²±šì¢‚âëe­ªìv× M%©ìPw¦™…ª© …囀=ÍOâ­;ì7¶‘+©U³?ï‘·úV¥×‡'ÒõH$½|¼ %1m8>œýj·‰R]Jh®vìòÓ`A“ß9ýk£R1z³› OX­ žÕ?³µcjÿê®ðœü'ú~5éPÊ>ÐÜ|§óäÚ]¾uË4‘ö2üÃØæ½Aä÷†l ÆOGãí[Ô”y¬rFœœocL€ ’qíU^o&&a÷ØíZ_>2Ÿ1 Õ‰¼Ë¨ÕOȼŠ,г¼½ˆ7JíÇIþ•ØéÖ"ÒÉbÎ[;‰õ5SEÓ P¬Ò¯ïpðŠÜTr1KpN#4ïGë@pHèjÇšjBØÀ= ‡ M ?z=ÅOúÂ?Ù¨üÑŸ­NŸëà4À®ò¨¸ Àr==?•K 9®Q½{_-¬P4‚éWÌpÕŽÍôϨss˜à_& 1æ?R}@¤BûM C÷“"ŸvÅ6+ëYÝR)ÕÙ†FÞôßìëG‘áV,rwr?/ƧKhc9ŽSê bQÈ7!Õ1Ô/B8/›,ÿ9ü©Ú…õ¶™c-ÝÔ‚8£“H„-Ó䀪Yä+˵óW…o—Oñ>-Ób$K7 Í}—L¡£ue<‚œ¶&_‘±Øþ”ö\Ô!ÿǤGÏÈOÐúŠÌ`½iÀ~´Þšx9s@\Niƒ§ZPr8¦ð èØjÒŠ@&Ñî) }ãOç4c#šÂ×´ ]rÁ­® »]z¡>Ÿá_;øÃ·¾Ö¦µ¹‰Ì`*m„,«Ž£ú×Ó7—ÖÖi™åU>Iü+×u½;R´’ÎçKk‹vÎC°{CYJq‹Ü¸Ò”µHùçQŒ}›x^Œ+&»Ïh–ÖÐÿĹæ’9r¢W÷ˆÝ†G cXRøvÒÊàÚjZí­¥âñ$"%î³(Æ}@Î*âîDâÓÔçÈ !f :šß›Âz‰®4æ¶Õm×–“O—Í*?Úï¯â+ ©!ä0;}ÆjˆŠ€„±nì~•mWjã €µZŠ"§iʸì)zw¥È¤¾¢”y¤ž3Lót¨§l.=jp¤ ô5Zl9 Å (ÜÄŒš‹qZ6z¼Úlò4ZI‘·÷öë(ü7ŠÐ#·¸8ÔP<X:’OVv*0kÝFSh¸ùISíU%ÐÝaÉçŠë!³˜¯ g4“ÆBÌĽI4–&iè ¹Èßh²Úºq,§™˜ÁaÓv ‚Ò¨´¨ùþÛ`»Ñ¬Ù*d˜©öÊÿ\Õ&µVèt,D–ç7ÕØã˜”ëY– ŸzîŽDh¤_UaÓƒøWM6–’P¡.›)g@y'ÐVŸXŒ´hÊXiGc“ÚsƒÖ—ªÕìB9ÃÆŒ±H2›‡Z­U{œïGa„SMKÔ}i1Æ(û¢AÇҟÐÓ¦I Ï·X@QnPXàF˜5ÞÛ]¼j}«’Ëå}þSøÿ*òËY`ß–ßî\{ÿõÇë]ÔwaE½äd“"ñS\˜ˆ]Üô0•=ÞS£žmNÿPO>_29ß`ð:c¥^šÍ¤„'Û Òj6qÄ÷2‰¸~(R?ýuvm.æ9Q¾ßrHˆ,þX®9_©Û#6êmÛ÷Ñ’ªÿ+Ž úÖ“êIgä]4Dee_¼¾†¢še‘ÞðHùXqùÕi 6©¶1òÞŸJ¥&÷cp] ;-MN ÷°$‹ÎáïïYú¶³5µÚÅe.Ùò¸pb\M$¹9ßÒ²MÕÃÌì]·“óÔšî§7ËcÍ«M)ß¡ížñ眉o¬(Gè.#÷‡o¨¯@ÒXÕѕцU”ä_.ÛêpÂV>Çšíü3ã»­0…r $üѱùOÓÐФ㾤J—Â{Y~•É´p3øÖn“â];[‡6³.2бÃñâ«kúõ¾‹fÓÈCHß,Qçï·§øÖ©§©+½‹ÏæÊÙ 9ÔÛƒúŠó¯ë† öa¼ ÆA_qÍW±ñÖ¡¬63K·–6µÔ€»¸Ï¿þuÚ;¯5¹êŒÀ4`:÷©Õ±2óü5æÒk±ÜF°ý»í·©–Ó€=ë¨oilËw©Âî±…fS»qdÓ„ù¶&¥.N·eýRض¯ar»‰=qŒÖµ"^q—ÿt Êi§elü‘Ÿë\6·ñ]Ôdhm”XZž‰²ì=Ûü1VÚêÉ9IžÍs¬é– ²êþÞÂÒ þUñ>ˆqNÛžŸ7ÿZ¼ å—çrK¤œÕ•fÙƒÀÏ*öz#®84Ö¬÷5×t™>î¥hí¨©„ñOødIÕúWƒù¤YßÚz…¥ô_Ù×2ÃpÎLMƒ’};Ókô"¦A]3ÞU7êN­Êɼגx¯M:N»qÓå±ßÿd׬éÞw™ÚX4 ®ØÆãÁÿç>$iÂ]*-E/ØÿîŸþ½UUuq`êrÎÝÏ%“h9)Ôô§Ë(u9­TópÛN:×.çªÌ1ǽ(Å àRƒê+Ñ>|và9#ëKOÑž½©A`9¦˜ 9º¿ xÖÿò¬2“ubxh˜ô÷†¹ÍŽEHŠéM+QƒWÓb¾´Þöòp7 GQW‡*<õ¾uÒÑoÓñZMv+FzXpÀ©ûãµ*ž:óYöz…¦¥n.lîb•âHÎGÐŽ£ñ« 0݃Œô5 \ZwlЉ[šx4ñõ§v¨ùéUu RÛL‡tÍó7ÜA÷›üúÒm%v 6ì‹­"Æ›‚ îkóW. [| ÿþq¬I{&鲎‚£7*HÁ®¸–Ý¢wRÃ[Y 2ff$±êIÉ5™sj V‘•OSL À®]õ;‡1u` gnäæ%ð½‚ê vmgÉo*VmŒÞ¬$g¶y¯H{q&r0jœ¶ Z´…YCbgJ578;k¿Ùɵ×Iš~X¾Æ©°²È/àhñ¶¥c'—e“J¡vÝD$’#ýä˜aÑÁÇ­uòéá[*³Œu­¾³#ƒ‰ä¯¢ÝÆ~xXQÍV–ÔÆ0ASïšõ©l”žTV}Æ™ä4jG¸ªX®èÎXÌòÿ,çÿZrÆäà1ü븹ðý©B?»ÅfÉᨷnBÃñ­£ˆƒ0–¢9á £œšvÉðy?J×oÖb>”‡A~@”Œ{ÕûX™û)ö1ËJ[¯z¯&ùj#31ÀU5»ÿüêre%Iì+ Ð´[[g€^R0Ì{ Rª’º(ÊNÇ'cá-Nñ˜Ö=­µ™Ï¥kÅðúë87KŽïåœ ô;{h@’qÛµjÃt`£=…r|Oj ò‘Õ¤þµ{«Üß°2±Xsü …jí‚¶×L”1*£Þž¶.œí;O?J\òe*p[#mn S ©xr oý—jîçZcÄ\š5‘‘ HÎ1SȘLVšÍ‰ÊöíQI —¹HÎg+dôâ­x#M][Å©,Ç0Z~ô¨,ßÂ?:¡~ÂSž§¥z_½ì~{é]¹<ÿtp+¢Š»8q’´lvvñ–s+§¢¯qõ÷¤Ô-PÓî,åI­NÊPäRoÁ®¶®¬pE´î|ï¨Y\ÙÞOm"ñ¹R>•AâvÆ1^£ñ#@ù—ZµRag Øöjó…ŠG<ú×Ó‹=ºsU ¤ŽdtÉ¥ÜZ\Ž¢œq]ç„H1Œæ— T9+ÈéO6y¦"Pà÷¡HÉ>ŸÎ¢É¯AG#åÀ¤2SƒÍ4‚9ЭIøÓ ,µ+»„¶×Âã¼lA®¿Hø‹ªZH‹zßk‡<ïáÀö5ÄSC»jŸþµséMZ´Õm{i–Daøcèk]<ç¥|Ñ ë:Ž‘¨Ätâï,Œˆ‰=AJ÷Ý7Wûn˜·DâFFã7¡¤×T4Ë·º“E/ÙmBÉtFã¼ü‘/÷Ÿú§õ¬Wâøý¦+ù>ÚWæ’S•ÃøGÓõ­»hbXÉØî‘yf>¿ç¥NsÈSô &¬ÊŒœ]Ñæ—y¦Iå_Dcɸ9Gúž+õ#†ë^ƒsµÅ¬‘\GÛ‘ó‰Ûø×‘x†çFÓµ0š5ëÝ!'ÌE’/£÷ús\u0ÿÊwRÅô™Ó­Ùã‘VèW'g¨,ÑåXWÒäŒ×+‹NÌîVjèèÖPÜgšl™Ç^µ“ ï©«itXÔUrÝ™.wðj&ˆw§‡ïD“§LóPÕŠ(Πqƪº1×½[ƒäƒU•OSRÑH§4;¸Çê¬`SÒµLløM hAäÒ½‹²f Cܯ¿N´‘Y³“k^Kp¥†9¢!É ÷@çžõ¢›3pL«–@HN•ÐÙèñ$ŠÛ@ܹj奛Ås¹?ÚQ¹û±[Ž?SÇ/ˆw%ÿ˜P-ÔùV¿WˆúÌ._…þÍ­Å0†7‘Á¢›­ß’xÞºHõ;[yA˜éV¿î\)?úr.÷Û„ ü€å1×ñª% ¦C»¾O5ÏS-öÎòÐÊ®"+Xôž Óeb‚óOlö3.1ÿ|Ö{>”—O¿cÿЪÖ}Œ¥Œ‚<æÚÞdj N Çhõ«±YXÏ:DÚ xu 7<ý=+µoØ©Á¹¿¥ªýš¢>Ó=u/¯•þ´}R GLç¤Ð’Öy¦´Ô"‹b9Û9R1ÝIõÇ*“¤bÞÌñ ŽˆÔùœ³dôñ®ªOé*xU|v!ýiËá!BŸ°j¡—¤sÇëOê“ò.¦:›Ö1±‹â6Ñ£¶Û>¤­.íËv‚3ÁÀÀöªšf›y«£Éê©#£0ãOãÇ­t7>Ò˜šêüÿ×[¨ÏëÍE‡t¸Ã}œK#’ðã÷EÖí}ä¬d[Ñ2+7¿ðÞ£$Jב.Sx\mäœõÕÛj–ºº°”Fò(`ƒóšâõ*i®g’8R0J"d™'Ö©&„\(ŠW'¯ðkƒ‡‡6Œôp¸©¨Ù«£Ólm£n‘‘¾öӟ¬J‘l8\÷® ÛFÖ×o“¨Ü( HF*qaâþÐlgþZ|ÇùW¥®ç¡õ>{.›qm-Œ—ÃÂ8Ú0¤py$g׹ߴë.Ê„Nå*xpzdÕ G­C¢8y-¥ÊØ.¬>\ —žµ•¯ÿh®³?‘äö¦F\sjép^ÏCš”Ò«©t¼Q8,ìjQ{®ÖPsòûŠå‹j¡\Rzj¡}`8*°œ>c\ê ìubv¢úÖ)Á }9©ŸUƒ1€s\0ŸWù‹Ã8þñõúS~Õ«lÉ ®ÿþµO,ŠS¦÷;ƒ¬GœªŒcµ@ÚÀe#cŽ+Œ[ÍL& ²Ÿø+j:ˆÁû&IëóQË1óÓ;}æc `Ô«ål ëÞ¸I5-GwäzóO]WRUȳZ|’µ§Üí$}£·J˸”3íïÞ±aÕoÞ<cG<¹çõÖjžÓìí¬îž6æÄ‚NG¯øÒRèÌßs´ÓµÍMcvû}ŒÍ+ï`¶øQôÃgó­Ôõ9~ýä?é¿õbkŽh’ªËf×–e€``¸ Àæ¹É_²½žÖËS¸ 3äçÏáVÒìJ›}OBÔ´Hõ‘‹½BöOöZ_—þùéXÒü>Çîo¾Ò¹èüGãKõ¶–wˆ;ÆÀúÕØ>&]AÅÿ‡îãÇV$*,ƒVXoêö¯ºÚhŸÛ8Í$–º†ž™¾µx×þzWó*ýŸÅ/NvÍ,ÖÍé,gúWCeâ½ übRÕ÷º\X΄ftRÄN–Û‚Ì8;¸=óWí.жÒÃZÝ»ðÞ›¨-¤¿gvä˜pÈà?áU­<Èÿ¾Ô· ÿžq`þ¦°öZ[ƒÕ•®/cE qéU£”ÉÉ Rkª>Ñ¥Uó!‘™z1æƒàÍ0ÿ«,§ý¯š¥á˜Ö6=ŽY®m|÷ûá³L:¥˜8Mî}”šêƒ#Qû©"üSxNí~è‰¾Š‡‡}‹XÄsO«1¤ÍøcùÕI¯u 8ŽÔ <åŸü+«oß ÿmßî°5^Mõ6S~ šŸco²SÄ]i#“DÔd¼ˆ¹ô©RÆiw(çfmËer™&ÚaõŒÕ-”ò¥N;ñV¡äfêß©t i ™KɃülMoéÚ]´1H€SíÅB1ÇçZ1HÐ=;PÓ±*J÷¹cûÉÆï,{¯Z]&8É)#`ÿµWÅʪàTLÂSÉ"¥s¡¾W¹œtà­Äòéš/,í÷¢’rr¹ŸÊ®0ýà©·i[²y˜'“ÉçÚ·¤ß:æzÍG•ò£•Õ/g‹©é²n+™‘õÜb¶¥+9]û‡8!éÅu7Ó$Î-mã 1˜Ç'ó5OÊêÁ'ŽµïÆ¦1øSgŒÕYKV-®’Ó\Çç[GörÃsyî[o|½k½Ó¬ôÛU-VEôМþ¢¹K}BHJi*s¹“'õ­[-nþk˜Ä²Gåç$`~µæTjODtAÛC¥v·‘ ;‚§‚9¬ùô½?Ê‘£·ŠŸ›ËfíZ)+ÈvÆ{Vgˆ.%‡K¬²)àd1šÉ5u¡«NÛœ&ƒ¥ÜêzÚA3…V Búb½ÛÂ6 iÝœþB¸].åì5¹Š@Xd`“žF+bãÄ7’¦<Ò>†µ¬ý¤î•‰¦ùU™®icu$!C<0íúV1M¿ÄO¹­‹·žøååÏ<j§ö6³:q^1Qµ“òvƒ]Èðô ËJíøÒÑú°ßRM5A‰ââpFÍ ” ‘tå#! }×lÖÐÄ>H}ª72E–r SÀ«X~ìÉâû#–{‰“P;·Ôx y/‘¤Ìöp °ÏP>½ë”Õõ‹iƒC ¡Øœ‡5×ø'LÕLÉ|¿g´„î†"¸iû šnš‰´§¹Þ‡iûïQã“NOVBqM Q±¼:6ŽÒZ1éI€rCÅ1œ¯SH^CÑ?Z|~|³ØÒ…ùXŠ‘c= üª@£¦âiˆE}£ç Š £p§€‘äç·©¥sÎH žô»FNA½À&—q=   à ¸Ç4ÞœÔD8ïšOÞxâ€& Ö™‚Çst4+“Œ€(xÉB7d|PMá`:”>hÜ3õ¯Fñ+hùÇ "µy‡"–k«u¶_œ7#¥z޶¬49 ñÔTõ%ì\Ó›v™j}c-¬ ò9†2ÅŽIA“MÒ±ý“kè™â8tÝBK3is< ÄJÁ»k©‚ÜÛXb^4Eœ8àt®sþ‹·‹Ã÷Ì1œ·ùU»-NöþÜÍ6± ÅpÌíü±I4öEË­'N½º±¶›=wÄ üëïáï‡.³¶Í­ÛÖ ý:T ñµ¥ÝÛ[[Ge+ÎŒÙd`sPxÓÄ÷oóÏgn™?rßq#ñ¥t5õFÄŸ å¶;´­~îØöÓô"‘tÿˆºYÿDÖc¼AÙß9ÿ¾‡õ¬Ù|A¯?MRaþäh¿Òª6©¬Hyª^°ÿ®åôR¹j2:!ãi_ñÿ  Ðutˆóø©5j×ãd¿—¨è·°ë±óÀ\\†yI2Ï3ÿ½q!þµZKI2^‰õ9Í.b¹O]²øÃákŒ f¸·?ôÒ#Ó5ÐÙx÷ÂפuË<žÏ&Óú×Ï¡Ù? >Æ  ‚?u9ú0Í˰rŸUÛêv7#0^[Ê÷$®«‚2+ä» ^ËwåEs¤†ät®Ž? øÒÎ$–ÇU}¬2wn§ò4ô%è}(zÒ•Fêª~£5òÃøïÆz=ä¶’ëWbh[c«°|ÄUë‹þ0‡¯â“þº@¦‹G¸õ>–k+GûÖПª ‰´}5þõ¿ýð+À-þ9xš#‰mì%¦2¿ÈÖ”_54Ç£Z?û²²Òå]ÂçµJ?òçúdRÂ;¦v€£šò¸þ<›¥ÐXŽþ]ÇøŠ·ǽ$‘æé«þìˆßáG%ÇÌz+x_Mc²¤† “Áºd^ãþþW!Ç/ 8ùíµÿ¶j‘«Ðügðœ§[Å>ö柳}ƒ˜Ù>҉ȒàÀþ”éûp'˜~UI>+øIúßÊŸï@ãúU¤ø›áé¬Ä>¨ÃúQÉ>Äû¢ŸÙ—Rø¥À°DÀ¥ãçýÁS/Ä? °È×-Õˆþ•*øïÂÍÓ]°ÿ¿¢—,û r“'‡ÝhºêŸýz‚ÿÂÏ”×J œð™þµ:øËÃoÓ\ÓÏý·*ø«@o»¬Øûx_ñ¥É%ÐwG:>x¿Sõ‹ÿ¯N>|qzŸ÷ëÿ¯]"ø‹Eo»«XŸ¥ÂÿJ5Ý(ôÔ¬Ïý·_ñ§ï –')ÿ úCœß!'þ™ãúÒ½qÿ/Ëÿ|ë¶´Ãÿ1Oûþ¿ãNþ×Óçþ×þÿ/øÑy,NCþìŸóü¿÷Á¤?$9ÿO^Ø?ã]ö¶ÿ?Ö¿÷ùÆêúwüÿÚÿßåÿ/ 副Ÿ‡2ÿ!ÿ¿_ýz!øu$2‚F?Õñ®ÇûcLó´ÿ¿Ëþ4‡[ÒÇ]JÌÛuÿ=祃–'ÿ šG,ÚÉô‹ÿ¯@øf;êgþýõë¯:þ޽u[!ÿo þ4ÃâMzêÖ#þÞüi.nÀãrŸð¬â'-©ÉøD?Æž>Úÿ£9ÿ€ éŠ´ë¬ØàBÿDÞ2ðâõÖì?ï𪴻 –øg`:ß\Ÿ Z|6Ó;Ý]ŸøéZm㯠§]rËð“5üEð”}uË_Ã'úR´û Aý2û’G¬Ÿýj¹‚ô¨Feüdª²|JðœjXêÉ´s‘ÿ…Q‹žNšŒþí»ÿ…>I¾€œVÆàð–’9òœŸ÷ÍIÿ¾•ÞÜŸ«šådøÍá$,·ô·?ãU$øááµû–º„ŸHÔZ=›ìW1Ü/‡t´éhŸ‰5 Ñtåégýó^o'ÇM ǥݟ÷GøÕþ<Û¨&-û×ü(öbæ=cû:Æ1‘kÿ€ zÛ@Vð^#7ǽAÎ-ô;qéºVoä*£üiñeÁŶ“j¹ô†Fþ´ù|ÅsÞö è ~Òô¯Ÿ¦ø•ñq”·òAî¶`:ªÞ%ø—|¥…ôè§û¦4þ”ÒB>ˆ5’E.ê½¾fÅ|êöþ;½ÿnqžÍvßÈUgð–§1&ûWb}˾iÙ Cè ­{E´É¸Ôì£Ç÷§_ñ¬K¿ˆÞµÎýf#´yoä+Ç!ð-£s-äÎÀrVÓÂ\*à–O÷œÿJ|¾Bº;›ßŒ>‡"u9ÿf= þusñ†k“·MÑ$rxÛ? J-L„” Ž3³?ή(TÄ©´t!x¦ ÄäŒÉ¼[ãMO>\Y¡îWõ¨¡Ð5X5mjgóÎ3×óÿ Ô<®~|çÿ¯V­Ä“¨¤ ’ޟ犧‰Rl­§iVD¡ì¢t•zI¸³þ}¿ èáÖ5%››’?ÚÿTŽÝ!\õ'½.ô$æ¥ÙìŠW/¾¥<£2Hç>¬jœ®yaôj¤eçúñNIìáO×µ!—’êá+<ƒŽÎE_µñ.£hØóZUCœñ¬Q0oºFáÛ¸¨É\œpOB:ð4· ØîÆ6Ÿf/q‹ MqóxûT[×x¤XW?,n€ŒzfªÈC¡Güë&âÜ.wÊGv¬ªRoágMñ‹´ÕÎ )výé?LP@Ò†M'’ ô§çåëK‘ÜÐaTtZvû})üRgޏ c<¿ö/Ѽ¤~t†TJŠ~0r9¨Üö¦›ˆÀûÔÕ•d•xÏ$ÐA ù¶ú¿•’Û†}ëÔuÂÍ »0ù¾Bï¡\Oíã¸ÔZBlzWo¯Èøþ„*äô%ÒH:M·=­f[ŒxòëíÖ†Œs¤Ûýó¬Ô$xòP[%þfµ©±”~#¡”~íÁþéü+žðùÙ‡þZä+ c˜È=q\ç‡üKŸž’JšET0‘ƒò¯øÕY±åþ4“¸4ÑÐxVêkŸ‡•Ë)ð; õûS›?Üþµã?ñPÇïÿ*ö[3ÿø}þu¬v0žç‹x©â¯ÕýîIýd4`!5³ã·Æ:¨ÿ¦ÙÿÇEb;“}+3E±|ò}+FÇOŠæò8¤'kzVR1dVÖŒÌu(rh×Úø>Õíƒ,î $`ŠŠçÀ°"#v“Tp ºu;«\$L pW5j8âhU‡û ã²9›=Æ;°“‡x›ŒÁ¯'„4øf™U˜äWè{UË›‹³æ¡x&C.U¿*Ò´™n-D2s·Žz‘ë]´-%fŽjíÅÝ^€±ÞX(•®a;ŠŒ±ìßuqXØÝA™¬m]׆Ýé\7„ÞK}eí”–"U½qÈý3^j6ÉŽÌ**Ç–V*›º0¹ÇŸ¨"»t±óäÃöNjUÐn%,RôªUcÔNœ»ž|Þ»ýd4ßøFo»Iç^—ƒ¯eÇî˜sW"ð-ÁÿY,këÞlº\9%ÜòøF5ïAø5_‹Áwò¨ÅÄ#?Zõ{o[ÂêÏpIð+VÙ |Ǧ©T^bq—sÇÀZÁc†ƒà-DËÔð5í«¦Z'HúœÔ«)÷"AôZ^Ð_sÓáî¯!ù6ÿ€š·ÂÝjSóÏu5íŽ ©s—r’<²ßá Æ©ƒþÄb´"øA`À‰5[žŸÃס޵*}ãô¥wÜ7?ìcÎ5‡ú€?¥K¦|1ÓâÖm ÂIíÑ™¦ŽW\àpêAü+Ðߥkû÷>‹ŠZ÷Š1ø3ÃIÓC±ücÍTÕ<=¡Æ‚4‹'–aäWR1X·ŽMpÿuAcô4Ð3Éõx­ô‹UK[;%Íı Ë9íø^‹áf”Ça¼»ú‚ ¯cÀ1=Ý„×l™y3\JýN àW£[ÛªF§&GoðÃÃP Áq;z´Ä*´¿|0˜Æ“=ZGoë]{¥U}ņCÍJ‰Læ®<%á{+w—ûÔíàeIÉô®û>Ç{2XZ§?tD0?Jê¼C6 ‚x®kÌ"BB8ô&µŒUŒ¤õ°Câ8‡ÑÅK¸ÆÓôÅUGr2«ÁçœÓÕŽÝë cè{SåÉ™‰9Èúæ ’<¨eUëÿצ9ËîCØŽ”ndûÿ?Ò…q¬eTÃa€î¿Ö…qåæFVq´Pe ©8úqùÕyLKó¬¡[?p äã=ÃI½‰^$ûñ0Î:T+)mË€®?„ô4Ã'˾5|“»åŸzk\‡ÀRºœäeÏéøRº+ܳ~ìl—¸= ïÇš¨v÷$t©$‘®p¨’.F0‘ƒŽ£ŸZ¿g¥|þmÖw`|…²8ïO˜V*ZYÉs‰LwïZðF‘ \*®8©\©ò㊮T¶I&¥»!'%× ëÐUƒW·/ Ô/´8$œžžÔ†VCžF}éüc‡åL16ìä`žÔ©°9ãóéM!\cîCœcõ©¢œK÷Æ[¿¿ÿ^¡•Ãÿ 8'¶;Q`¹zAæDpÅÉèk<“´«·Cв“°Ëç ù×=}ê½ñÔ¸`AÅ;Ï6ûHÏ Æ>Fé­¥‚ÍKAA’Æ>€ŸÆ¹N“†û±ã4á Óc Ík}ºÝ@ škj ¸€j@g‹+žìE=téO,Ƭ6¤O;Ô~<Õ‹[mORm¶V—7 zlŒ‘ùÐ)ÿeÁãŸZqÓY{w­áà¯Ëš4k‡¹Ç†jΙðëŤþ[@-Ô}é&Èô Q¬@b¹\z ÏËŒc­o^øRòÊõ­&¸D™« ¦ª7‡îðÍ«2/^«Ÿ¥+ ±_JÕ¯t Á=«¿Æ‡•aï^…'Š´­c@”Çr‘ÎÊ3·Ì§#zó¨6Ì¥ã·5F;WMZ$VÛ½öþtîè{^‡Ä~µâž8ñ%¶{†øé¯jÓÎl#ö'ùÖÑØÆ{ž5ã—Æš˜õu?øà®}˜ì?Jê|elfñ¾¢IÀýßO÷c\Z¬Vr²¨ázÖe­Œ¥Ë€s[–‘y ²)!ÇCX°¯ÅtH£hçµ,ý²vbÍ)cïVýÀ€"©Ž¸ñ§cŽÃ´Í8ï£<²Ínéóîe‰³¶¹ 2xí[^›<¾ðÜ3[áÝ¥cÊñ;ÿʱhG ±Û ñ^‰-y—‡s½hÊÐ×¢Û\‰o&‡˜¼Ÿ|Uâ4’&ŽÆƒMa?†4Ùn§Ÿìñy“Jd}ñ† Þ¦·[ï~ñú×;F×(Å¥ùypZ=­OåÜ âÝû®*à§ v<´àóg7àTÿZiy;Ú\ûgŸëZ‚@¬cù¤u‚àÛ¦™€ÿ–Sÿß—ÿ ÛƒÁ5"Èù¢ã±Ï†?ÕÍÿ~›ü)<ÐzG7ýúoð®äsÁ5&XÀËÌ홣lÍÒÚÅ1[ƘhÔ,a4wÙýÝ¡'ý·RŧóRþîÖ'ZÚ4Ã@ŒómtÃæ’%újkH &MÎ\’;b§¤«ýiØcÏÜcí\߈\ÅáÍMÇU´”ûä×Hßêßé\ˆfit-zÈìÛz•9¦…k”<iá[œ:ääc8ãúW_ÐU-*Ù-tËHc…@«mIŠ7cZ"+‘Tޤâ Án…3×½O>ZÝÇváqëÚ¡Œü¬¬0ÉÆíÚ©!3Ä`«Û³÷XÒ¹‰±¸¡ÈÝÐ^ÕÔxœ¶ç=CJæ$z°<+U±›"ó0«<_ëaÒ¦Sß¼ˆàuúUBæ)V¼HÃvϽWžCó­˜`s"ç¡==hnÄ¥sO#Ëc#•Ï\ ’=‡¥Ržf…ŠFV>8æ`~?ýuì¹ë“‡üjaD ŠV}Jºè#ÌÒ’6o_úhÄŽž‚š·_h=”*R@ç5˜1œðzši roq ¼gpO¿5,Q*.êd1Iu(ŠXóì+¢µ±ŽÑ ÷SCv#´´H#Éùž¥``äc‘ëS˜ÎN>õ0E¸õëÅgrÒ+:üÀ~uä•<¨@ÆNzªÃaÉ'Šg•¸œÔŽ*¡>ïÌ>µ!»cxÅ7pH5H›‘‘´O¯¥WuBÙ'>‡ «2Ã=TvëÓž9¦nÇd©!hŸq8ô"§çV1´àŸJˆÂ6*NJ?\õãéE€nKΘÂîêN@ü»ÒÍi*¡[‚ÐÆrSË€¦œ/LÇ8ôÏøS¼²`±*£‚z Àà•ŽñN0ʇ,\¹ÛŠõinthmR =Î'VMÎk"{{y|±ù‡ÜW#±ÕÊÎ (.ndÙm ²7¯a]Ÿ‡âM=â¼Dó¤%Aô÷­˜Afe…KŽHi%eºŒç³7sSr’(Yi¶–’ ±¶]ËÖIâkÑ4OO§ìŠäÆRFáÚ=±\­ªGm›) ¢eso}ª*]¼Ñ[-˜ÇÌÄtßZH¤{•©U€9pQ†G<zÃÖ¼ag§£GjÂyÀÀÇ*§ú× {®\Íj–‹'‘j£jG»’=û“XÌÛPßÞ=¾‚€²¨Ë>§ªÉq+±b¿¼õÉíùRHE±⤄Û¯Ö£).ÏÂ(É gr ër¤}ÜñS\Û“¨Ùà ùŠæ)tˆ›P×öü¹.IíVìÝø¤`e!bÿ—OÖ«¡šÜêÌaɤ.F]ÈXXÕT³žŸ¥g:Àê-Ôà_zƒB³º“r'^ø©#² îsZ¡ÀP0*¹V•¸èi…Šn¬05Q´èXÊj¹X†7T!Kòi ÆgöT-ü5]´ påðr{æº' “À÷¨Éá{Qp²9öÑ" ·Ó5iôÃÆº! 1éHñ„à‘š•¬š\‹ÊýG5>Ÿr #FÜž½«¼òwœí?SM{E# &ØœNgÃV>F·m#¸8úõí;þ¾õ›Ü¸ìŽz×þ>EtÊ„Ž‚¹«@ Ðí]NŒÇh¸1pxÇøS²1ÛÖ“9à1ÉÇ z¼UÍ:_"ú'<`àþÛ‡Þ(Ïô¦ÉñWÆÖÓˆežÔ>3†·Z9Wp»>ˆ'šmxU¯ÄÜîQ6œ¬  ¡« ãJÅEþ½ê•&ö!ÔKsÛ)§µâx·ÇLpÚŤgý‹qþ×sFòÿÀAùšÂe0= hCЊê¬\®Q†§¸¬û›DMŒ²ìÞñãšÖ|éŒsP$HÍ´®cf^ØÍ`Zpçh/ò·uíøÿ>I<Òi%·Kf\Nͼ…ç¡£ËYìdvÆGÓÒâjÄmpwê}i#a3íL–c€´Û}ZÔnž+HmX& g“föïøV¬>¿Ñ¦Y5¶;—÷bN9ç$Š—Q_••ÚæÞ‹c¥žàöê}kJ8†6Ïò¬û9q‚ ÔY—Æ9©w)XÐ*‘ßZFâGÝÖ,Áõ8ëô¨ÝÀOœÖ¤w HAãÖ¨8ã“×½[•ñÔõ=j¡ýà 7½ZD¶U|'\ÜT{‚œxæ¤YKä¼g~2þ*d–~DܳF~ay_J«¬×,Φ4Þ¥5ìŒSù²J¬ ãž3V·ù+µV"wm¬ë–r0Ç @^ee?yºU œ»s†#€{ ló,)½Ü(ý+óİDvÁJ}sI´·Mìmí~cÚ­C§ÜÜ å6V5Â·Šµ¦ß—ãJüêõ¿ŽõMè®!“F3ùVR«ØÒ4»B®Ì…ô“K× Ž=3×ëU„»ÌÜûõ§l’N¹U?™®s¤Y%f>L=O\Uë{5‰CHFEPiá¶Â ÷¡nå¹;#ÎÞîi—r4—ĹÌk÷S­ËÅ+M)w ŽqJ¡ZC ³Ÿ½!íS\FR :P2Kx÷Ëö†'ÑsÖ¤.d¸T^S¶ˆíñßJC‚ ¦ÉPí¸5™®Î,ôyŸ†ÌýúÙ­…R0rÖ¹/ÜšÚÉ1×{~ƒúÒ hƒC e¡]Þœ‡a´f¬xBÐùß>3+íR}ÿ_ùU=m¾Ç¡ZX¨ùŸæ#×Ò¶­ÈÓ´¨­Ôrˆú÷ª“"=Éo®|ÙE¬-Ë}ãWm!µféq‚ï4Ÿ1nõµÆ{“AòÄ$ã=*œÒ„ù#=Ë Fïz­Ä .ÀŸJC#ŽÝ¥lžæ¤“ʵB\ƒN–è(!G=±U ˆÍ1–r\ò®8Ä&»lBö«>BB£q©¿¥D鿏½ýÍ "giNȇSMx£€ff½*ÛHE¶!ƒŠ¤‘!;å}Ò^‚€‰&lµ})r°ü îj’Vcˆâ )êš±¬K“ßש ,FÈYr@梊9VpöîRTåXTã¹n=‚n‘:Ë{ kA5s›ÖïMö¿,²'—/“ºÿ´3ÿÖ¬OÙÓ€‡§ã[~/X⻳¼Œcz•lwãúÖ¥ìÙÛ¹QÎîekh`ÙÇÚ×U´Œò}«”²$^'ÖºÛ¿:`<ü½Æ1Þ”ƒ¸œíÇzŒœô=:óJŒÐ˜½éêÄq€sÒ 3šzJÝ(@vž ¸Úvð“†)ü3^·‘õ¯ðÉ‹ÄzytCø°¯}^£ë[s^(ÊÖl²ÿ|×ø¡–?Š—››ikp^Àÿz¼‡ÅQÅ'Åi–Qò>#×ýêª_5>XÑF%¸çi'¨®cRAmzU÷2.äÏ®yô®ŒÛ¬Šcƒ!I kÆ—Öödƒ+L6a÷¿0>µ¥TE&%AÏ+ïIö xÞ§ð5NÝÒu«od½}Ît‚ÜîÚ:d.+›Ô'Žm[1Q@\ú‘ÖºW¹fàwí\m¹ÿNnùsü踙ÐE~¶Z¤M!Än›úzκh˜ 7šá5ƒ†\8íÅt>wm‘÷Çn{ ð+¢„õ±…h«\ê6¬‹»÷ªž[$˜ä=i±Üõm”J¤©Á#€z ëz©:ôê'³T-•¼8ÇËë^àk“sáÄ,Ûš92sž‡?Ö¸Ëë4©¸‹çÿhMtß äY<5#©—<}pÕ½sª›Ðì¤?èíõí7þZýEG'ü{·ÔSôÞ|ߨ¬Ù¡ ~ãý+ž×ÿä_Ô¿ëÖ_ý×B~ã}+žÖÆt=@Ó´¿ú¦—ml-ŽzÄŸú§JT¿ß)·§ûǧä*+GN¶lýÊ`ü R¸ Û1ÊžO]ÞõhCA=[’}* ÷¹Î@©¤;Aõ®kÅzñÑtw–% y+­“ûÒŸ€ëøU"YÎj·ëyã«âŽ vÖËj¸þðùÜ~£ò§œì9<ç48ÞÞê¤%™‹$'$±$ýMn·ÊB–ëÒ´3¹3üÀcßéN@ dwwã­1œ!ù†3ëÚ§ÜŒ™ãæÆ1õ©e"”Ьx^¹-žsÞ©ÉhSc¡ÚåZ…]À »ïïÒ«`6B1D6÷.ø2÷í)»·ù³mkµ‰rÀŠê•@JÑ’`qò‘Ðÿ…N·I,cc‚Wœz}j­Ê™"ùŽÖþt’c¤‘vüà¨õ5Û#„€ü£ëíUžî[8²ñ–ˆñV¦-öhÒJ(Œð3UbwhþÀ‡hó“Ë»æüjËÏÞÏ,z’y?Zs<çz2„Þ6’[5ö“‹1J¢e_“#ä?ZoAOu ¾V rqX‘ÞÞë—‚ÓF·y\œy¬>D¤×M¤ü>{É߈n…Çu‚ù?Þ»Ûk[k(VhcŠ5à$k€+žUo¢6Œ#Køg¸›\¼{Ù8ÄQåS]XðþŒ#Tþʲڣü+K>ôÂ{ô¬›¹ªŠG1­øGÕmpA„ªÛ–h"úÜWšø‡Ã7¾Õ4Æ’îÞëΗ÷Rö²#¯ç^Ý#bà${q_4I¨Ü]ê~mį$‰&àÌÙç4/1ÛC¼TŠ/œŒ·©¦4ÒÜðŸ"xõü)ü>§ARhE¬ ²ä÷-Þ†•¤>\Cjô$RÈ…˜Ò¥‰ö¤‹H%ô4¥D—=>>•° ℽ°*ż#WŒg“VÖ@ª‡ÜH f¸çUñ+r¡ö¯Ðq]F­säXO6q±N>½«™ðò’{Æê€}éÄ™2yÈÔÓý+^Öò0ŽÆ„A"Õ|‰‚GX£Á¨.®Õ$ñRhȧҩ¼àp£&«™d»l&vúÕ¨­Žb"^WÜO ©„ 8¢8Âð*^|b¡›xÎ)¤è1L’ägË@]Ïe YK73¾û‹Óñ Ey.9XÁûtåŠW?6U†h-—hÚì*?2Yy6¯÷›H8ŽÁ9þtEá—ùGaB¢F<Ç`ÍÙÛ§à(ÿtÌî!‹»7SøP9ggÃp À5$q±$Ÿ»øfõxoÅMj}âWvÉJúj(2 ó?nõqvw"JêÆÖ£ªXi:[Ëzû"u€Ã;c (¯ÖµÉõÍR[©ÀPÃlqŽ‘¯ ª—Ú•ö±yç]LóJxè¾Àv±Ú¬29³'QžG×ÒŠ“æzr¢î—u5œžVóå ²Oj߆ïr0b çŒ×6 ˰ãzš©öÉøýóqúVf‡i\]ÁÇ@Aæ¹Kl‹²g#õ¨âÔ®Ô€$f”ûBMÀ'Ö’¸;t/k!OlWS¡Àmô{XÉÁ)¹¾§šå5sÂ}+¬Ò5¯-#d#8Ã&yR+¢‡ÄaZü¦˜‰vçùPŽêÜvÅ=1äòG¥Oœ—<ªí\à¹é]¤r$bø“Wû6‰4!±,ß»NyÇÒ»_„ÿò(Éÿ_rù-yg‰'·Ô¯Ùm·y6€ Ï;‰ûÍŸLŠõ„»Á„ž×rø®*“敎¸Ç–'y/ü{·ÔS´ßùj>”ÙOú3}E.™÷¦ü?­@Í/áo¥`ëò¾ôï'þ€k{±úV«Î•xüûÉÿ šh-Žá¤Z'>D|ŽÇh柞ry5[M;´›&Ú-ãç¶ÑR]J0½Z­ ä3Ê}«ƒñ½¾­¬ì÷†X"SÇ$v'×Òº ~ñ `äûÜã ßü+Îkk8æxíš{¦8RçåQD¶U÷9Øá¸³¾„LdIÖµnÉ‰óØšŽâñÊy{2Knlö§Ý£Måw¦MisjÌå]‰_æc O #+ªZêGB9ç±§HÍÕS-·?Jmtwg¸pI$3p{r=ª'È`=*ÝðÌàùŠI'vö5ZP|ÓÓÒ¦;-̦…O‰4Æf z»û¹ÅuÑþò:Ÿ¡ÅrzËy&Îàäì›±ÇU"²IÞ\Ìb¸q0Ÿ=âÍé5Êt”W-w.Û=Nx¬ø¦dˆzŸÊ˜ºËHŒžz°a‚7ãÿBÖ©¤¹Êpxéžµ¶Rk–FuҽѪ“9Ê8î*ÌZ˜Ã S w_ð¬t”;HqNó|³ÈÊ㯵uØÀÛI­¤™JOÁlìcš¼Ð›…UŒ¨f$püç­s*Á‡îÈažE>)%·‘Ù—qqÎÓØý(°îk½Š©ùðHäíïŽäš§qzŽþDDmHþT\Ëu4;¹+ò²çYÈ¥;÷äÒ¹ðΡö‹W¶vËÂx÷SÒ·22y¯7ÒµA¦ê‘Lù16Uñé]´zæŸ*àNýõ"¹*FÒ:i»£G#w“ßµV·¸ŠNVxÝeaV3ž¢ ²+†ýĸ#î7áÅ|¾§Íïúnmßg˜0R7ò5óâõÿÞ4Ðú­Ž´ð⣌‚9¥È'……ÁäÔˆ¿78ªÊqÞ§FÈëš´ÛéL,@&˜›‰ç$jœFJà ã#j“$žqQùd> <°@IãÔšç¼Ws¶Ú+e?ë'è*„ò}ƒÃÉðóŸZmÑmc]T%sµ~‚Ÿp¢ÿ_¶³^a„Øôj–Ä=Y»glÖú]¥¹»Ÿêy5§¬* À=©ŽÅ†@æ¡–B£æl~5%¢[‹ñÀå» ‚I¯Ì”å»Ú™ki%ÅÆö ç$u­“<6‘cp k¸Ô¶HWÆ=¨$¦«}¦[¦>Jy¸ñmÆf·°àR Ðݶ ]½©VÞYÀ3¶Õ?§úÓ„±¡Äkž:-#´¬>w¨ì¼šÔ”Ëoh¡P}SQ<·3ŽH‚.åÌi©„Ë}Xõüê1õ|ýñÂ2þ5± -b ßm_@H~jð´¾<ÒÑpì°ÿÎÙ?• KsÍâAkˆbFgÎãaêøÕ˜´MAØ›kÙIàºí­uIq¼KWB€2ŽŸNj).¡a–¼sÏ,ßÒ¢ÌÐÀÕ$\LöÑ?Ç*ƒúT‘øYsûÝFÝ?ÜRßÒ´ ÜíPþ ˆz|õû”X ]OMM=¢º2çƒòmÅfG9S»¸­mnu1&ÂÄÜcšÁ'  Ïw-ìª$+è+oH»ø7!d†XðL\•ô?ýjç`*³©<kSRÙæ‚<9âìîKWV;ø¼e Æ}–ç8‰üxúÕx„]èNÚtíË”*WçeÈãØb¼âAº\øæº_íµÐÌÏ*[)ÈÄ.}Øõ­fÈT¢Îp\ʨ ˜ùIM{—»ÁŽéò_äµâ7mmŸÜI+ŽìêOá^ÛðƒþD“ÿ_’ÿìµ’Ü©lwÓdz}E.˜y(ö_ëM˜ÿ£¨¥ÓÖKôÖ¬ƒPt?JÃÔyÓ®ÿë‹ÿè&¶×¿Ò±5lnGý2ýЀf”Á´+ž ´y?ðU¯§TË1ÀQº¤>|;§ÿ>±è"¸x­,5ˆ,Q¤P®²Êê¹é÷T~§ŸJÑl+]›•Ô÷ (\™TlQÉÇøÓm´‹ÈÔ°´yv=Ò¹='âåµ½µý»ÜZG‚''kàd ã§>†»ëØÁm™ãD—÷‹¶Tܽ õô#ëX¶ÙªŠFeÎpI=˜`3¸#`š¢§ƒœŒàÖûk"í$ŠÚÙdf]¾cäïZç9ƒÅkI3:–è2åNÊßw¨÷«epŒÄc“U.“ ²#:sV!—Ï„‘Æ}kW±™VD`îÙåÊ·oîŸþµ·È\†­Ý Àœ§>ªL@˃Îsž•1 #t]+Í9Â:±Ç×ÿ¯\›k–á¾Xä>¼âº_E+è²Ä˜,J€§Œr+Ï\g(Aö¬knkKcdëÑ‚q ˜#z¦¶ñ*C0 ùDò==ÇøW6XúóJ73aA'ÐVI´îMYž‘ ÚL¢xœRó®zl.sŬþa*pzr3\õé¹ÇMÍ)Ë•kZ?Ue?CŠ·¶çä’UÇ£V ê Ì8<Ž•Mµ/¦ï¡ ü«Ïj´N¥g±²úî¡2+Jm<:Jðôm×$úµzfµâãÑî·§ÎÈQxÁñÞ¼¾º\ôæµ§)5ï z#Ý#Ð-Êò3Þ¬¯‡ Ú‹9ý+gÌ‚Áic“¸â ¹×t«e ßB£=ŽMh;cðý°ÚìE[D‚9,=3ïYsxûBµ“p‘å8<(ïX÷ŸU›ý Èqбë@Xî“KE?•Lm¡UbûUGRq^IyãÝzð•„F>QX“_ê— ù÷²Ç\Ð-ízžƒi3Ý[:¨Ãt¯<ñ?Š-µ%û•n2pÒmù›Øz ãX ÿY9oÆ™ý«–Z7t zÑa\è–H|;¦Ë#º¶£:íQÿ<‡øÕëÚFi<÷vOy}1‚p¨£ßÞ¹c=ÅüÆO.Y˜ú*ì:ýÖ ì·Cêw7åEÁnüY¨êp¥¸KH™Â„‹žýó]I}ÆýÐLãz³ô½ ÓNq1&YÇñ¿o ­n>I-–¼ËƒV=.DÑÿº_ÌUëso*ïDi½Á®m§–¸6§v4F‰Ü…Ðçï)Ã1 w:ìÌü"ªÎÂ|îÎ};W#¨_ê~-ÀԦܣåC†žƒ‘X²ßø†æ!æê ŠÃ8Ê‹2[ž‡=ĉûéb…?Ú`*ºÂÑD†UÜàzó¨´YnçQ=Ë»±ë×ù× ZÚ›{[tN‹¯ä(²w&†;ÐÛæ’7ÏðíàU¢_UU'Ó¥5°84ò$l`P20Ãqó#lóÛ8ü)Çì…>I”ŸG4ÝË ïÑO¨<š­6«jÄíƒÌ>„µ6Ê:†>Š*e%”w¬©LsäY…ü*HáÔ.ùe'z¾÷K*â?qþ3¼)¦ˆ7fK‰ŸÃ“ùp?è°#)Þç…'ù×­Ì·Þ')Ý ¢ìú·SúÓ¶¢YCäC`rFiš c¦NHè;z¿…9 ÷ˆÇªz©ÿ‰\øÉzŸÂ¨ÈÂÒ@:´]äóÓ¥uT99Á?¥s>µãÛ׿µuA2ÿ2™É lj­’Cgž=$Î@xÎ:þ4¸òž8ð5ô–~cõ«ŽÄȶý@¯ø¾ øÏI?ôäô3^ÖýGÒ¼SâîO4Ÿúòoý ÐÄŽ?Œ`zBNby?¥?Ë$öÜ:‚i úzÔ7)Î=*5!ˆ gÒ¬vlm¨/sie$§9 õ=(S˜Kvʧ*œ~=ê²#;„E%˜àÞ¤–Öh64Ѳo—#¨õ­½Oàݺ‚OnæÛh.“¤­(;NqŒ ÖÇÙþP¤sVÀ;°£w~•¡m£_^¶!µcŸâÅ$&Ò8MYM¶£òR[ UG¼žr’I.:+±#ðë)ð¸ßÜ-Æ¡/—ò…ØÓé]F™àM LPRØHùªI’äxuŽ«jŒ©odF‰ÆÑ^ÝàQð÷‡>Å<+$†f˜à•ÆqÇ#ÚºHmà¶]°Â‘öWr.ðªJÄ96V–ú5¶e–9"l¼¼~b¦Ò¥I%”£G 繤œdtÍ&—q\ÌÑ¢©eÀëɪ°¿Ò±/yµœÓ6þF¶W­c]ó Ãý–þT!½ŽyuH4Y_\ɈÒÎ2}Oñ¯Öõ[Y®î'‡Qºžk‚^|.ؙʞqŒsÔbµüuâ>‰¢è±HH‚Ú9gñ¸¨Ú?Ïã\ ò{{S©+hTdËs{.ÑæHÍü* øRNnQÕ¥«·!äÈcŽù5ÑøGÅ7~†íà²Y`—` Œ:a°xõv—V¾×|7¥ëýÔâöîU ><³¼•O÷H®sÍf“{±Êx+Å:^¢†òc%eŽO1²SqàŒýk³ó£w2C"º1%YNAãô¯1´Ñ³35ÉÊ)ùTq»ž¿Jîôr¦Â8Ó¢ŸÔV”ž¶3ª´6× ;m°Ë$Y¢ˆ>Vê‚O¯"¼ì’kѵÄ-cpg÷gñÇ5ÉÍalý! ÇŸ”ãŠÊ±¥'¡†J·ÞPy¦y(NC5©&—å$‘}8¨Lœ‘‘ÿJÀÖè¦ñÌ$Y–dÆÖ‘]¾ªFØ~œH¾¾ÿqÄGç‰Æ=jK[ém'ÄØuïý ]9ò²'dw®¸MëÁ5òN4šf©o©ÛñòÈ>òg­½™ÎW'<ãÒ»SM]¶¶Œ¤éæd~V„…¶Ö'ŽqëUä·`;ûûT°äáXû~ý|T´4ʲȡÎ2i‘Èé"’8ë…un:ç¥,VÒ–ÜxõÍ!š[}²ÎXˆDd©=˜t®L±\ã Šì…À·„(\d`Zä.ˆSF~5…DmOb†­s+錆V*H%IÍ`Àß8­PfňäV,8Ü+S¢’óQŸ™n›ŸV¨J‚s-ÁoƲ$¸”9PÄ⟵Š2¦‹ŒÓY,ãêKzzê0'ú¸Å3û4ÑðpÃ#=éð[Æ€«a[4\DRjS¹ùãØTˆ8Rò6æè«Io·'h"®XYæ@€o$äÐ32êÍlÞ1ÈÒ»dû¤gš–-.9æó®]e#åT Ö×Üë IlëôÈùÔKh ç$þ4˜Ñb31íP€qR+‡?»~}»Ô 8ULúžiæ z 0=Å"‘#4½Óòjk;pˆ=Ù³IöbNBG֞˺g–cÐw4¸Xù’BÄð©âNŽøÝØ‹PEÌ“ÏéV{~‹¯IçÝZY•-æ¿Ðt§„Þ>a‚}j¬ö­Nêèä®|¸Ï°­+xL³öƒ“©#7«4t;vf”qÚº ´8^F¨ 1Š´„mÁ©zš%¡"íüi¬ À| MÀcJq@ÈÚÂw9.Þæ•aŒpˆ) brOzIn’Ë(°–(Ðe±T®®Ã·”l^[ ªm<÷äáŒpŽýÍIo9®"S“þÑô =î®E•Œ÷òŒmBÊaÛó®GIJ½Ü‹¹çbKžµ¹ã[ÒÐÛéÑŸšvË}ÿ^ªÄ‚;tŽ3÷ê‘$R§›¡äš§©çû*ásœ®0:ÕÂl’8õSTÚºUÏ…ëß­2 -ítÏM§ùWTÒr7··Ò¹}AÕF~èF'ÛŠêŒdäç 8é@Æ«q„=úš qÓžÝé|½ÈØäçœsJò7qϦ!wá:ŒÿZd¡$ŒÉô§ìŒã†SÇiQaÀǹ¤­?ãòßåÇï·ûB¾ƒÏÌ~µàvqsÌ3æ/O¨¯yš¸ìD·.Èz}+Æ~,!oé;{Ù7þ‡^Èç;~•ä_Áÿ„ÇD òm%qütÞÂ[œ¬P MàîúñAES {Ž¢­Åo$ÎDQ³äã Vµ„u;Ò ÄÊ£ø‹º[˜w¿¡îIÍRÕ,gº°Û£ÊÂA…QšõK/ÛG†»—yî5ÐÚhšu+dÈîÃ4ù[?cÅàð6³­­°hŒhˆ’rÀWu§ü ÚS¦xÖc7­c\clœö5®‡šÇŸ’ãëI ù¯Ä–é©@T=´.ÞìPg'Êvƒ÷z‘[k­~é­/ Šâ&fÚXaÓ¨5C&š·VÖÂÒÒX¥çÍ.ÿ)>Ùæ¢[š­‚Õ¾Õf¶ÖQȲß1wGÊTã¿?ÐV­¾ž°rÌòŽïÑF{StÝ)¬#mÌ ÔØíW×g#q:ÔÝ”ˆ±êH÷­]áb¢' ÀmúŠÊ$Æ ‘ëB–U\sž”âìî)+«·;·âãÚ¦ æD@nGlu®~Òþyãsæ:U帞Vak±5%trµgaVO-Þ&ÎÜïLz`óéS‚JäçéQα$éÁô÷¨¡˜ØFEçô¥°t"Ô!ómeüÁʹE\„.OAšìÜ“É<Ò¹MBou$c ;—èy¬ëGKšR} á1ЕÀÏ\Ð0M&â‹’O"Žzvë\æÂ HÚáMkX&Îø#nzô4æ¸9Î;ŠP‹€Y€úR°Ê?cû$¢âÚf…‡rw/Ð×Uä°lgÃ)\ƒØÖTZX¿¶o:FH1ƒƒÉö«ñAqílK <ÿUU:ñŒ¹n)Ñ”£ÍcY.!˜g 1íR¤?8㸬‹åÛI¹OðžTÑjF»v“]œÉœ®-ÏonØã¡É9äýj¬âWpäGŽç²F©3žÙ§ùdB Nô›°ì6þëËlä6Ñ‘õ®rYBÝ` ³.[ëV5kФw9äêkžº¸xˆpçÌc’k–£¼Ž˜$¢\Õ5‘ã#Zš[¹'·ØÄzÕxø5'+!v)õ¥–Q ã­W’Vc‚zTÐÃçà!½ Å,Á~ñ€É Àµ_‡PŠW©\ ÖðIáÆ*K)žÖá$^ ôõ ±§YÞÖÖ?Þ¿Rxü*ì±Ía""Æ?y"·žµ^/b"·¿œ*H«¸zô¬}WX}IZ8T¬yäòqÒ­¤‘šm»"²ï`ó#ÅØŸ~jxîÇI*¥¼Û~R*Ò€ß1™², ØÇÜVcô§yÒ¿8Ø=ê³ÜÇùzÔAå¸ûĪ{RËow\]ýK 9ýì‡.{vªÀ‰» |£§½[ïL x犫©Ü›k]~ùSÜžLÖ²ï\ê1Cü1þ½¨¢Õ ­²¸ükwG‹vé°G`Mfœƒ¸*÷8ä×GDˆ* ()²bº—7Í=O& VµHœ‘žÕ&„¹Í;h,p*9eŽ!’ÜÖuÅñ“å&˜‰®o’!„å½*ŠÅ%Äå9Ï!icˆ–Éå³Ve‘-¢ÏW=­ΰFq»©…]b°CµxU¬F˹crÞÞÕâ}HÙé’'Í—ä_ÆìŽpÍý«¯Ý^º8¾HÇÒ¯c“ÕsÐ1QéÖÍkf°„gsžsWwœí?CTdÆì±aŸAÞ©jù:]Ç ™&¯2·0P¼Ú¨êñlÓ.z§õæ€1¼>?âiÓ8Œõü+¨1»¥yè9Ås~RÚ«c´Dþ¢»%'hÉUaÓ=hC åÏbTdþ4(Cõ+Ö¬ÊE˜ûÒùŠÅòŒ‹Êá =¹éJ !ã®:Ò²eT®Þ>ni6r $cŸ|Qp&‚5ób8ùƒ÷9ç5áÖÿñðØ8ükÛRE pß·8™ÈÑc¿JæuùÇá×ô©kš%-$sP)9<NTÛ Í 'ÞÆx¦»c…`{`•ÇÔéៃ“ÓÖ”jˆËÊÃqS´ÐúÔz=›Þ^&9Ü{ÿõêíÚKm±’€ÏÓ°«'´YÑJý挛Wº·¸Û<­„ùpG =kX͸V}»Ts ½óÞªyf<ÉnØÐô®vùޤ¹Këw‘ ¨ SGØå†Ø:#Jãž¼U #.…[®3š73·ojÒ5g.e*4å­‹rL‘¼Žå, ƒ zVv¥ªy0…ùŒ8c¦Ý\%´eääÿ®bêøË;Jÿ3ŸÈWDjN{œó§l,³í%ä%‹Ψ»mÇšGrÇ$Ów³1ÀœàT­‘¨rAš€u«ŸÝžÔÿÙaxiom-1.2.8/modules/axiom-tests/test-resources/mtom/img/test2.jpg0000644000000000000000000003307711131637500023553 0ustar rootrootÿØÿàJFIFHHÿÛCÿÛCÿÀ`§"ÿÄ ÿĵ}!1AQa"q2‘¡#B±ÁRÑð$3br‚ %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyzƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖרÙÚáâãäåæçèéêñòóôõö÷øùúÿÄ ÿĵw!1AQaq"2B‘¡±Á #3RðbrÑ $4á%ñ&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz‚ƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖרÙÚâãäåæçèéêòóôõö÷øùúÿÚ ?þú(¢Š(¢Š(¢Š(¢Š(¤f <³u<ú`“íúüCûFÿÁEd¿Ùv ¨þ%üLŠï_Mþ-;¾ Ó/¼Uªk¯â '°ÛA«ÙÇ‚t{¶ñ¿¡X]·‹|YáÍ?D‡W°Ö•‹®x“Þ·Žóľ Ðü;i1u†ë^Õ´ýÚVŠ3,‹úÅ´RâI;Œl(&¿Íÿ[ÿ‚‹~Ð>%ŽÊm[ÆÞ%Öµç´K;©|IñSÆþ:ñL¶3É/‰5—ðÝç|yâËý8jJš•aö¯w¬ø_KÓu-Ã6±wªxïM»ùÆŸüOâùuýcž&·ŠõtW×µê6Ñ´·¤>›®êVÖL"Ó⸱Ԭ"Óì|K5µ¾Ÿá¯ OOŸÄ—÷ib×|>'7Å+ÒÈqq2JujFÖ|¼­û(UŠmÉ%/4ú]Gè£ÄT—q¿dçŒ%õœÍV²úϰ©5$éÓp‚R©§íjû°…å)Cý$õÛ—ö,Ò¼å½ý­¿fµ–Þ×X½šÚßãwÃkëÄ´ðôi×î~ÅcâK›¶‡BµÍÖ³"ÂWKµ s|`ZAÅê_ðQ¿Ø¯G·×î5?ŽšMšøcZ“@Ö “šþÛQ‹IþÞÛé±xAõKM:Ø×t»[Ý ô€u8õ&²ÌõþkÚ÷íU£èº\i­þÓ-­ÅÝÆŽòi–ÿíÌQË¢[Iqá›-LéWWÞ"—KÐu6Kj–Wš+ÝýžK1áx,´?ÝyMÇí‘áKíOOÒtˆ—·qCm}yd|/aã­[QÐN«y.§¨é6ú¾ƒá½{K½½¹ºdÔîµH|>a«ØÛÞh±,6övÚ~´èq"Ià ”á ®¤ñ˜þY6ÒåqOØÉZJJJPåk•óÆñSŒ_>åU~­ñÛ‡1¸ˆÖ•)Ç(ÁK q£IT«+ÃYÖö³nŽPŒcV¤V–›öéó¡ÿÁF¿bú_Çÿ ™^ÏC¾}?RÑ|g¡ë6–Þ(»k ¾£¡kžÓµ-¼Cv†ßD‡R°µ›V—jØG9xÃZ²ÿ‚ˆþÃ÷i Ï?í9ð§@Ó¼S 3øk_ñ¦¼þð¯ˆâÞ[¸ Ñ|[ã{oxcT¾kXŒßÙ¶Z´ú‚«Â^ÕMÄOó¶øÿñRˆ\οµûKÝFIn5-[á÷-4 U­¾Ã5ì·þ8Ö|¥¦ŠâÚúÛSÕ¯®,5}Äu·ˆ´mUÛi{j_‹¿µÙ5;=;Áÿôãªéšå߈õ_ü>³†_Øjzµ®z4ë÷z´PºÝf½Ô5 È5 ìÉ.‘iom¬o<.kFTý¶?†ÒRJº§‹ÅT·»¬a(R•¤Ýä—³©%¡(}µœ| à\m:ï"ã®*Ïeaño‡Yî/ WX*µ£RŒ%‡¥)J s­AÍAÕŸ°æýEî¿nØÆÒÒ-BOÚ³ö{—L–++£ªÙ|\ð6£¤ÛéúŒâÚËX¿ÕtýnçOÓt›Ðůê6Ú)’9”ß Á;_†´ÿìÝñ£S]áÇïƒu泸Ԇà?‰¾ ñV¿ý›k{¦Üê?Øš.³yª> GKÔì&½6fŽóN¿µyDöw)ùôþÆ/ñOÄú\ž"·ðoìõ®üZÔ¯´…²Ö~$~Ò>,›]³Ö¼Sâ›; riþ‘Ö|=÷ƒü3¤ønÏÁv>)ñ’ø¯ÄVž-Óthþ<]x΀z'Ôž<øSûIxöïCðß„×á¾·â_|UÖã~þÏŸ´'ÆŒ7þ"ѯ¡ÐþÙj¾3øéñBËÀ>xBÁ.~%xgÇàïŒ<3ojú§Å߆ßìP¸·øìGO ›¼®X:U ¥,EIT”¥eÍON…jÒ§)]S©RÝã*qå›_‹ñOa2 ~/C/¨9RÄK=É^EŠ•xJÓ_ÙØœ\ñxFéEWj¼’çNQ¦|ÔWæwü{ö{ý¥?gÙCMðwíKñ ÅÞ4ø‰¯x³Vñ…—‡ügâ•ñ¦«ð³ÃZ¦›¢ØéßGˆcÕ|A‘ÚO¥^k³éV>#ñ&Ÿ£êíí¬>"×.Z÷U¼+íá'(FN..QRq–Ž-«Ù¦“MlÓI÷Iè|Vm&šN×[iéu÷6»6Ó(¢¨AGùúŽ™údõ¾!ÿ‚„|FøÑð“ör¿ø‰ðoÄ–ž ¶ðߎþ·ÆŸEá½Å.øyû=k)±ðÿÅߊ?tï5Ï€bñOÂ_êßð´/¯¼}áïx^ÛÁ>ñy“Á>(ÕßHÒæùÙÅßu«/Š?²gÆOáçíub<5ñ[â—í gãÚ{Jý¢¼3suæËÿ ÿÃwß¾x—Å^#ð ôú‡‰~ jžøƒðþÓá-Íæ·ð÷Â:~“ðsÆ)ð øéçíñ£Ãß³¯ÁŠüQ¦júî‹ð·ÁZß‹çð燿³¿á"ñMÖ›hͤøOßÚ÷Úf’|Câ­]ì<;¡ SRÓ´Óªêv‚þþÎ×͸åVý¼ußøÏá7‡~,~ʾx_â×Å ü ±ø“­øÛöñG…¼/ã/Úêðø/ÙxâLj¼Ki¦ø»Å¶:O€4­BËE¾<[âÏ Ùݬ×’\Ûþx|Iñ_Â/‹ÿá_ÇÛ«öý­|GðûÄžñ7Žÿf¯ÙoáÍ߉þø?ÅÞ ñVãŸ/Å?‡_±_Áü[Ð4xüCáÍ&ößÀÿ´ÅŸi·–öŸf»‡TYî^º|7ñ/áŸÆ?øOÀ^<øûN`_xÛÀ¾#ѯ)M[Å­øÊ÷FÓÿ³í|=áÆ¹»±ŽúóOž5 ]CÄ ¥Xi­Ä:Uµ®…¡Âm4[+X|çâ%ÇüWö¡ðõÝ÷Ç߉ž ð _|S£~Κµ®žÖ¾.^Ú]EñKÆzqÖ~ iæë­¥xUü+ñÂïâm#Å:tÚ|ëyáØt)ô+4µ³á×Rm?U¶mSM‹PÔ-¯4ëÒŠ¼bM«â[/Q´¾ÊíÛÂú¾T¨å8:óÆã[¯ˆ,L<]Et¨â)V¡cJ—5kÓN5bãì¯VŒ[æmÊ_ÝÞ â8«=à:G…ÞåN#—QÂñ/fXŸiZ¶2¾aˆ–3BU±õéÇJqTb¢°x|¾³¥4”Ô¸ÛïÚÏÅL°øGøŸñu º³† ïx/Rº²†úî÷KÔ5ý2ëÄúˆ´´–+­KPÖc]E¤¾škûÐM´–“A4νÔk¯A½|;ðóÀVÓéºtS_x£ÆMã»Í2ßM¶¶ðíÕõ·ƒþÉï/¬ÛMÒõ{ ›=NòÞ :ÞÇcg{÷?Piþñ Ü>E¶q¯Ëg¥Ÿ¶ƒ¤Û[‹­*Â;i.t‰tëpšýœð[ÝÏm¨[¤V1<:íãØjék⫟¤<5û&|Kñþ™àíwÅÚïˆ..âÑM¥î¤ ¾Õ"ðžŸ5Žå®‹¤ÝÉz/¿¤ïðCÏÚûâLº}­ÇÂm3áï…oím5m/Æ?nmü'¤hŸk† NQ¬x&=;Køé‹­®,c‚;Hüáà“\i6Ú÷ŠÞêËVº²ý}øIÿê|#Ó4I"øçûAüCñ~«{ }/ᇴ/†°Žm+M´Ô¬m"ñœŸu·n,LZf»¢êžÃKÙk¦iZK\jFóÏYžqŽŸ40³§ÿ/1œÐæS÷´§]Σ”~Ót–î*JJñü+2âÏ¢—J*yñ5ÃN”jbññ™å d(8ÓÅMÕÌ1pxzøÉ:˜„©«9JQ£_ËN¬¿ˆß|9ø{áË /TÑ|ð÷Ãú…½³éNú/…´/T–ÃUyn4»ýfh,4û¹5™¢žÅ´¿yñx4Z]iš¿·OÔ¼_6©Öê–GM‡þMs§[ø‚[˜µ[”šB|Eu§\ÜZï±Ó®á´¸³ñ/†åžå-4{ÄÒ¿á!··ºÒô ã÷_ÿ¡W€¿àŠÿðN&âïàWü'ú–k-–¡ñÆ>/Ö ò縴º–k éšÆ‹àk‹ç¸±µ“ûN_ B?(¬W1¤÷ /ÛŸ¿eßÙ×öz†X¾üømðÆk„1]ê~ð¦—a¯ßÃåÅ Á¨øÛÉâ J ‚!‚ÿS¹Ša†8bŽ5¨á1r•IN½:q¯k jR\­ß’)¨G—™)-+KGd×O¥ÿðý8Òà? °X᫹à^:yfxh;Î<•°8•¹èÖŽXg9N¥(áé~õÔ£„©…ÿ>ƒßðL?Ûã㦧{uð÷öføƒiyu¤Yk·+×íSá÷†õ¸//~Å{ž+ø•yáOêRjúUîµoâG¾Õ¼D.¬´«Û k÷³ê?²²·üyã`ê“þÖ¿tßxmlÞ '¿ âÓá­"ß_þÀä“ë“××üôíAÿ=¿§é[G/¥~j³«YÙ]T›åvI-½eedä⬚WÔü—Š~–Þ/ñ. –áó ·†p¹S“§Ã˜)àq}›rp¡‹•zµiÑœ¥9¬<9pô*T\%=F¦¿þÁ¿`?‡—ë•§Æß‰¾%ƒVÓ5(¼Qã¿‹šžŸ¬‹]*;Co¡²ü/Ó~iRigQÓôýp\I¦6¿g­XÁy¥kšz½Ô7?¦¿f?Ù÷öp°Öl~ü ð'ÃGñ-ïöŸŠõohvÑxŸÆ˜2yZŒü_t.|Uã ëhåk[;¿k:­Å•ŠÅai$PÃoºÑ]P¡Bœ¹áF”&•”£©%ÙI+ÛÊö?Ÿ3®#Ïø“ _g9žuЧOÙSÄf˜ÜF:µ:Wº¥ ˜Š•%iê¡¢º$QEjxÁþ}+àŸÚKö·ø—ðëã…þ~Î<û@|GÓüß¾4øwÄ¿$øH¿~êì¾ð4zf¯ÃïˆVz‡Äß‹!Ó|q7Âÿ xžøG\Òþ|IoxûÂ"×H»½ûØÿœW䇯 kß?oO^ü/Õ.<_§þÝ7^5ñŸíðïÅ6Öó7Ãm/öqø5à¿Yüzøsã¸`:î› k\| ø;ₚâëþÔüIñ7Møà¯†š¥§Å%ø˜çÿ|[¬üq‹]øãûixOXýŸ?c¿€³éþ(ð§ìÕã}SÁÞ3ñ'ÄïèSh÷zwÅoÚLøC¬üJðÏ‹×Añ”Ðxwöpýœ<âÿˆv"ñ”zGÄ¿Ùø§âv«ðŸÁ_ úÉ~ê?¼â??ðQ?[þο²~™£I¯Áû.ëÿí~xvÏÁ6úšÞÁã?ۓⵞ¹¡Å¬Ýë:\zrkŸ³®›â[¾±Ôu|U¼øïsmwá½ÿhš/íCû^xŠãÄ“Úßü ý€u_ Þ]ižjÞñOí›âŸiß´­g\½Ôqsoû-|ñO¼gá˜cŽ}|Møç§ø®âm?Æÿ<3yaË| ð ?ðS¯i¶ÇÝ>_~ÇÞñdºüëös×­[þ?YxgR’ÛLý½~.øvê;uñ狾#Þ[\jŸ²ÿ…|_ayá„ÿ ΃ñGJÒ_âwÄ95 kø+ö×ñ§‹| ¡èßðL¯ø'/Ž~%|ÓÞßMð‡Äoˆ÷~ýeû aìÚ—Ã]'Æ~Õþ8x«Ã^FÇÒµ¿þÌÿð‚jöâÐü[y‹ïïÙëÄ?´§‰<¨êµÂß„?üzž#»ƒGðÇÁŒž*øßá¹ü&ºv—%Ž«ªx³Å¿> _Yx‚mV]fÒëC³ð¶£§ÛXYi·Ñk÷SêkiïÚcàÇìyð#âGí%ûAxÊËÀ¿ þø~oxŸ]»Ä×SæXìô­ BÓÕ–ã\ñO‰µ{›-à –ëÝo]ÔltÛeón/òÏÿîÿƒ­¼+ûN~Øãà‡íIðþÌ¿hÏ5¯ìCñS“Xê¶k×þÓt/‹º¦¢_ÃÚÇŒüi¡êÚ¯Žü$^ð_Žb¹øw¯Ç}o§ßøæÄõ÷öœý„jø)&³«ø7ö£øÿâOÙö%¶ñ6§eì£û2köÿÿh hú”k¢ë_´Ÿí4è-Ki®¯þ|&ðýÆ‘¤è×¶©¬üYñWŠ"³¼ð¯sã?ø%ßÀ/ƒ°÷įÙSö øðÓàCxê/èڽ߇eÖ¼1â?øj×â_„uÛ|Bø¦j¶¿~!Ýk^²ñ6€Úw޼_ªè¾&Ónâð‰Ößê3~®`ŽQùþ>‡Ôú«ùáÿ‚ÁX>>~Å?ðXÿø'/ì¨èß íÿc_ÛÃÚ7‡|Uã ož$»øiñwÄ:ñïÃë+/ø¶×Å–~Ót+-oWø6«o¨xKSšÆÇWÖ®®µ-õ It曋MnškÕ;¡5tÓÙ¦¾óçïÙWþ©wñáíáïŒé^´ñ7Æ[y>kVú^©wã'QýŸ¾/~ÕŸu!ãMU²ðóˤkö~6¶øðÏÅñ™su׃õ¥Ô/ü1b¾Õ}³Àßðo_ýIÇ‹~6ŬDÒÞ4W¾ø_¯:V]"ÚæòÿÆúÞ‡F¨¦]2ïJðÖ™âÃí/†4éË<º½Fuä?´Å­à'À_¼IwkcáÿƒŸ >!üQÖ®ïYVÒ 3À^ÕüQxóïšÝY [¯—çÄÒ³’EwS^~;,Áf5•|e^¢åWu«B-AûªP§8Âi-=äî’Né+}·xÇ)•Ôɸw‰³L£-«*Ò–YSñ* É.WRš¬éS•XÂqŒåÊIÉ\ø;Eÿ‚5þÂvöh¾1øâ_Š:´Ö–6Ú¯ˆø7Çþ ý¤üwð_Ãú7Â#ÅZ_†n´O ü!ø-ã­2ûR´ñ_Œ<_©Ï¬Üëßµ›{©mµk;&Ó-´Ëx좹‚êúól> …\¸l.’ŒR£JôŠQŠ÷b¶JËÉ#çó,÷;Îm›æy›‡2‡×ñø¬Z¦¥)NJš¯V¢‚”ç)5å)IêÝÿwúQ_ç·û-ÁÀ_ðr'í½§xó[ý’ÿbÙcãv‹ðÛÄVÞñ¥ç…þxÊÝü9¬j\]é¶Z•®»ûPh÷ˆ÷Ö–·2ÛͳÛÊm®£I ¶óFŸ°_ðN¿ÛcþBø±ûd|øûw~À¿þ ~Ê~ ŸÆËñWâW†<©é:熡Ӿø¿WðƒYj3þÑ>9ŠÛûWÇÖÑnKø[Tó-5áÑœ_ÚôžQýQQ_“ÿðR¿ðT¿„~9ýŽôïø'WìÍðÃãÿ‚<}ñbïÿµ.³ãýImîþx0ßø54+Ý1áaø]OÔ´‹¿Þê¾1wít;¿i·z43jZ}ž¿÷oí=â_þ ý~8x³ögð6…ñ7öƒðçÂïë_>øžõtíÆ_4íúëÂ^Õ®ŸVÐQlõ=^+[i!“_Ðcº.-$×tt™µ+`s¢¿õÚƒþ P?àú?íkûü5ƒþ ‡{â=: ?gÒ/µ·„.>+¾ŠÚÝ÷†Å»Ký V“áxÄw-ÏÄû›6ø‰níฒ_Øþ7ø(ïüøHðë_€c$ ·Ã}]Tÿ·ínG<–!}No4Wó‹ÿæÁTÿkÏø*ßÂ/Úoâ‡íKá_ƒ>´øUñCÁ¿<sðg¾'ðÞÏáGÄ>5T»ñÄ/E«ÜYEá ,¤Òç°‚ÞÚý¥ß-í³ÛGTQEâ?´oÆaû>üñ—ÅÁàý[Ç÷>´Ó¼¡êZFªx“Xñg‹thš]¶¯¯ÜZhºXŸWñ ‘¸Ô5;˜lí-Viæp¨kàj´GÆ?ÚkUøÙñ³àÖ—ð7ÁÞ ø¦ü(øIá5ø© üMñ5î¿ã¯ˆWž/øÓ¯kSx_J²ÐôM>úÇÀ?tí"ÖCU¹ººÐµ‰f–8b¶öÏíkð§Æ?g¯ˆ¿ ¾^xfÇÇZÜÔ¼#qã;­VÃÂmâxÏÞ4Òí|E¡ézÞ±a¤ßÝøz; Ëý3FÕ¯l¢¹k¨4ëLj@ÿ|.ø¡ûHÚ|eÕ~þÔŸ¾|0ñ[ü2Óþ,|?ñOÁ^3ø×àïˆZ%¯‹¯/±¿Óþ#ø}Æ£§]C-´àx¿ÆúÍÿüCÇ Ю#Ò¼Sÿø÷¯ü7°×t×6Ú–›á¿ø(¿íìß4MrÓPX$š]oáÏÀO‹šL>žëÌ0'‚t-,\GomnÑÿAð§†ü á_ xÁš.Ÿá¯x7Ãú7…<)áÝ&Ýmt­Ã~Ó­´EÓmSä·Óô­2ÎÖÆÎùb·‚4-=~5ð–¥á¿ø")‚1=÷üóö†Ó> ê–6FK‰®<ÿÞÿ‚‰Cã¯ÝZÚAÅåÍö¿ð#ྫ¯è)wz„ÚÆŽcRícß/üNð€~øÓã>«¬Y\øÁ_¼GñCR×ôë«KÍ:ãÁÞðÍç‹/5‹ èç67vSh–R^Ú]¥É´¸£™gò\I@Æ·üƒR×àº_ð[†ðH¿ëÚÕ‡ìEû Œ?¶.¥áRv‡Ç5Ñl´aâmâçOÔ--m5ãÄúÀ/ \î›^ð/мañ_Ä‘Ûj#Me¿êÇíåûÿÁ;à²_±GÆÿØ“öYñ_À Oâïì/çøàÍ¿ÂmCAÓ"ý–>3xoD¿Ó¼%ðÓT¶ÐlÞ?|.ñ»xZûáç‹´ëM?PðÕÌ:³w¥Ç7޾Y\x{ó¿þ îøw®øÃàoíéûzøöæçPøûWþÖ7ú&«©_ížóP‡ÀzK|F×5ä½h–IÓÄ8øéâ+kÖy}á“#Ûŵé_ö[ÿ‚{þÇ_±WŒþ=üAý˜~ hŸ <]ûMxÂßÇ_µm/]ñ†³ÿ _ˆ-/üEªZ}†ÇÅ"×4ïh¶z—‹¼M}gáÚxÃVsë×IŠl¡µüœÿƒk?à£Þ1ý·bíoà§ÇëëïøkØoÄ–_þ3Yë¶÷Vþ&Öü-e¡§|0ñ·ˆšá]n|GsmáŸøÆ½ÕƯwâχڷˆõ¸­ŸÅ-uôü;þ +¦ÁWÿeKø?ZÒ¼ ûP| ×/þ#~Íu¤†Oimˆ¾ëZ½™]SEð—Ę´­-CWÓZ[ø£Ãž ñkYjÖþŸEÔÿ¿f-`ÿø;¿ö¢ø á+;á_üá.»ñtC!K oø‡ÀZí­x¼‘ ò7Ä¿üfÑ´˜¡V·°³ñõÞž¶¤Z%Ô[ÿÁÍ¿·OÇ_xoöcÿ‚\þǺ­Þ…ûKÿÁG¼iiðûQñ=†©ýwáß…:ç‰4‡øv-V¤Ôt7ø±ã®‰âM<;é~ ðŸ,6µgqlù¥û(ÿÁÜ^0ý“´­GöUÿ‚¦þÏ4ø…ñÏàÝÿÃ?|gýžý”?f]jóOñ§í ã/Šßü+¨|Jñgï ëú~©¯©øRÂ÷L¿Ô<=áÍJ×JÕ?áWü3ÿ„ÇSÖü[‡fñ_Ž<;àåÔ/m?¥ïØþ Ùÿ‚gþÅ|1àþÍÿ?jϋϤÛ?ÄÏ´OÃüRÔ›¦ZxÞ }WÀÞ ð߉5 {Ã׺ô=áÙƒáoì[ÿëÔ?e‚ö7v? ~ þÌŸ<á×ÔšÒMgX–/ø“Q×üUâ¬-4ûŸøÏÄ·úÇ‹|Oweaciwâ oR¹¶²´†T·ùôÿƒ,?à–_Hê?oÿЇòýeJýOÿ‚zÁ@àÿ‚™Á&ý§õì‹_‰—Ÿ¾1ü=øë¡h±­µ–ƒñ›À>Ö´Ÿ}žÁ'º]+Oñm›è¿ü?¤›«™tß ø×C³¸™®¡œ/å‡üaÿ(²øõÿgÿñWÿY×öT ¿i_Ù/þ 'ÿÿ‚…|wÿ‚ŒÁ:~ 뵿ì7ûUëZŸŒ¿i¿Ù‹ÁÖ:¬úÿ/5^ø£Rƒþ¿ Å­x‚ßLð¶¿âø‡ágÅ? xC_Ò~x[]ñOƒ¼wáË_Fuo}ƒð þÿ‚eüA½²ð×íàŸÚCöMñr[Àêºßï S`»Õ~øy]%‚V† nÛú{økñoáOÆ}ïž&ü>ø¯á‹ wUðÅ÷‰>øÏÞ:Ðl¼M¡IZׇîõ êZ¦Ÿo®iM jZT× }bf‡í0F%wÅ´óÿÁ(¿h{}gáíu¯~ÁŸ.4 íOCÔü7ñ«ÅŸuox7[´k½/S¶´“ÄÚ·ü%ñ6™3ÞÙËq¦\húî•tncY­n<Ì}[û?þÑ¿?j¿†ÆÙÇâ¿‚~2ü/ñ"ì¿øZ¶Ö4ÑwpÉw¤jqFË ø‹Lóâ‹XðÖ½g¦kú-Ë]WM³¹ ûMÿüEð;þ[ÿÖøEðƒöEøÿáŠ?ðM¿ø)ÌÚ'ƒ5?‡^ø™áŸ‹kð?âÞµâk¿øJ»Ö4ßëš©²ð' ŸÆ~#ð)ñ6¡û™ÿ1ÁFü{ÿñÿ‚sj·?µ«¿ üvý¥|ikðáïŒt½FM;]øy£êZ³âˆ¼?5¾ÛÈõí+Âú;øgÃÚ…Í熼MãÅV—‚ïD·´¼öoÛKþÿ‚SþÃ+ñ7Ão‰ß´1øƒñoÂïü+øáS⟉4ÍIf¸·Ÿ@Õ|!·‚ãP‘¤PÅâÄŽ4DUDTUUUU|¯ÿqÿ‚hè?ðJoØ‹Á¿³·Šm¼wã»ÿk~3øãM¶žËCñ/ÅoYèÚ~°þ³¼Šø¼5áýþðŽ…>£¾£ªØx~-nþËL¼ÔçÒ¬S«Ë¾üpø)ñ‘µ„øAñ‡ágÅfðêéíâøkñ Â>:mucz4¦ÖWÂÚ¾ªtµÔΛ¨<ßéÓïE·›öIü¿Q Š( ¿'iOÁñöåý™ü=ð.MGÅ>9ýn~+h?µ¦¯f‘§ÃŸ†ÿ¾7|(‡Ä:Ãx’Y’ÞŽ>.ø¿à?ٳℾèúψ´‡>Ö¼Wã¨üáx+Pñoëÿ?ä×å§ÆO„?´ŸÂÚâÄ/Ùcá>•ñ—µ…§k¾7ðŠ~"øSá/€¾~Ò³ð·‚->.x§ÅW6%ñäÞøÉðŽßGÐüq§ü8øsñ/Ä'Œ>x?PÓ|ÇâÇ|] d|9›Ãÿ¿kˆß üs¥ÿi| ÿ‚…øH|?ˆ—NÕ¼gûPxGá¤> ø§ð—UÓõßeÓÿh€ð¯¼áácu êž%øEñîãV¼ƒ[ñ·‡´_Ä>xgBøUà/ˆßðD¿ÚûÄZþƒð{ã_Š¿ÿaŽö—péü_ý–|oàsÂ'öu5×à×ô{/ÚÏöhð>¯yàí3O×lnï¾*ü.ðÿ‚¾+iŠ5Ëo‰ö:Iñ?Üê‡öKÿ‚‚hžu &ïö|øóðnׯ^øsâïèRè~/Ѽ  êž$ñŠüKðOö´ø?ã=5|cð‹Qo½ßÄû i_~Ë£ø³Ã¾ü/Ðñ—Ä¿]|.Õ¿dŸø+w…¼-ñà׉cƒBÐ?kx~ÛJøñ2ÓHµ³Ô4 [㦥áÔÓlÿdÚ#GÔ-ä¹¶ñ«K௃¾#ñmŽâ‚<ãÙüðØ_ðOŸØà‡üSömÑe¯ÙöÿǺ¯Ã­Å>-ñ|Ä­kEñ‹®µê+¨ê©èðž›5¼/6Ö ‹ °ÙÁSMq"™OÛuùmá¯Ù§öèø%jó~Ê_·O†~5ü½Ó4Û¯|+ý»~kõ= I‘âÊÛÁÿµŸÂü8ø­«hSXOh¶:ׯ~Ñ>'»²¶‚KÞ\ÜMª=ý"_ø,爮äÓ|AcÿÁøC`ÒOèÚ¿í]ûG^Çáºçþþƒû,[É0BJY7Å…z¨kí¬Hâ¿i¿ø'ÿìC ~Ü¿à³þ.x³áÄ_ÙƒáÄ^ ‹]×¾"x#Áÿí¼2Ö¼3o7Œ¬µÿ K¬^ë:ŠüWÕ´«ì|i§I©êká½;NÓ§¼ k©zOÆ_ø%Ïìãñ÷þ û7ÿÁJüqâŠs|oý—ü ~øOJñ…“àõÞš·/­õ¿xf÷ÁZˆ¯üA çÅmVúßQÒ|g£[­ÎáI£.›|º§ ?ì•ðá¥áßÚËþ aû[ÍûHxÓá_‰â×þøËö€ºð/Á/Ù{ào‹õ ní4σ?³æ>ðîÃLj·‰¦xWÆÿuO‹ÿ ¼H£ð¿-.. ´šËûUüHø¹â}#ãMœÚ¿ì½ûü"·¿ø‹âücÑm~|Pý¢t½'DñºÔü@ð7į |Gý²Ç‰>xÃÃ>8ðñ½ø¯ðºk!®xOZ²×ô“y -gšØ_Ø[™ãŠæÞY" ‘ÏëúÿCÿ‚=~ËßðVí3à¾ûMø¯ão‡tÏwþ=Ôü%iðwÅÞð¬z•÷Ä;Úê×%ÿ„ŸÀ^8k÷Ó­üe‰ö¥‹UÔuµ‹ãqmö?Õª(ù.ÿˆ3¿à”?ôQ¿m_ü;Ÿ ¿ùÃQÿgÁ(è£~Ú¿øw>ó†¯ëFŠü‘ÿ‚]Á?dïø$}ÇÆûهğ<@ÿaøq—㋼'â”´_…ïã§ðéð÷ü#ðCX´çâ¸5o¶¶¦.„:oÙÅ™·œÝ~·QEQEQE~wÁRtŸø¯öCñ'ÃíᎽñ'Ãß<ð›Áÿ¯!øƒà hws|*¼øc¢kÞ<ð/ÅkïüMÒt¶´ðN¥ygäÞ6ý¯þ‡ÿ¼YðƒJÖk=KãÅÆ£aðwá—ìïuàøŸâ¶£Â×u÷Å-ðíÃô%¿¸ñæ³ñÆÞðîª/áíÞ¥ÿ žð–¿úÕè}9¯ð¯ìéðÀßøæÞy xûÂϪh¾øÛñrûü ñQðOļecâŸø}Ó÷£'9ÉÎs’I?žsôôãÒ¼£áOÀ‚_lüK§üøGðÛá%—uuid:ba50231c-04d3-44eb-b01f-c3dcc1f63408http://schemas.xmlsoap.org/ws/2004/03/addressing/role/anonymoushttp://www.eurobank.pl/serwisy/wydruki/1.0uuid:96144820-451d-11d9-834f-97eb4a63d5achttp://www.eurobank.pl/serwisy/wydruki/1.0/WydrukGenerujOdpowiedz ------=_Part_0_3437046.1188904239130 Content-ID: __WLS__1188904239162__SOAP__ %PDF-1.3 %???? 4 0 obj << /Type /Info /Producer (FOP 0.20.5) >> endobj 5 0 obj << /Length 4287 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gau`X4-(Yt%F4-G@tOmM^mTbu$jYTE4cUN7s$&36&g^G:C:+`$U+nf2UdU?pa+p\gO.RMDrqZ*Q%s@d47rUe`Gk3WsjUQ!Cef!GJ]dY+Cs*Du3\4*q"oD:nP?_8DQG[YjlVf$X9.'3*GW1X+$rV]Mi8dc^G+.-:Sn-M?5PJTU#Dm"j_t+Xp5dtS^Q+V!i#5Wf\*FqJ//PuVBPY+sko#u_-r)'q\qWT(kl&=eiD`teq?-Bo?Yg_0'>dW5F!m::GF0Hd?%8K4:Z(b6;iYJQo%Teoo@RUa`TCiW/pHc^7%$.4e*"kk7Z$&(4(tje$:9@Tgof0cku!g?4r:-+Ph&0:Km$(;S*feq)N2Rqan;a)mp7(B'nSHdPVBOI)<-Z%!dp2@&3=lGiIJi16YPXlYb$gW/MpL*@2W^W,K_]Imr-_!;pn-NJb#Tu!]cK0X8k<.`M]<#RZK%YYso6,SH(hurn?;(&BI#2OPT)05+P5\\A!$tYp.nm*k+R"I!%?N+>l_[%>CGLmTbMK.(YNJ?j\`6keC`Ij+kiS7pH0bgo>MBE9%1O>k_.>#oPGX`X,PE'UM'#u$r"V^'o8(Q/]GX]6n,g#s%G8&i5I[979bUL]J2!/:ZbX8SA37nj1U9lQAfI_/^d\A@YHj_Kr#<_O'G0J>td(:R0Ga-;/M05!\T&oF]s3Ii0Zcqh%_PJjidon91c+63!@V!nMF4qb][;H+)KqQTW3Ng`u'l?;i?`=gJfZd#O.GE4\-I*]8gPM"c"%N&V;HO?oeY2k\UF5(uWDao.2J#mFn]"$h]n#t+hpN`)-k2^XjOV`&(-UYkE)%lo?!]SLH.XUj]'nkG`b+5G7RjbBh(.,Pl\jkCK5:MUF:h@9?m2"&2@U]2=cFL+gWDj$J31]f'nmRph2!FV'`gBe#foubU7!:*DuNB4bfea:t_F=[/a)Ziq(r`lFS99^7tHIbni"uSDU"8O"um_VmHVY4[uf"bF*!-Z8iq$p2ZPh144Qr#qnMI-q@FG4pIjKkaHp>=QVoRa=joG6>%sA`i[\;Lg2op;]"-7H[kQD7:K$ZfZ%'P=s`7[#_>6Nn0(WA.aUUa"9*N[jIF'4?#R1W'X;OjdViA;tOUEe'q2T=:&-K[#YRC+gL.u2;"?M\iPAk==B/t/?@U^jKU*DDl#^Mk\:K/`k;dAcu<-9F(Z:V,bC0QJ.2(h7A_N$F^009nYsK9Qq2=pcN8T:BaK`jg^54]?%I7,F5^.!4Da\9GLY$@27fVBg;nZ)MTpBN]S[NF@(Up^0qHU<[acRi7/c)/Y:/qs#Qf]8Q@Eci@q-J(/V:2aL_=ek)D+J=S#Y^"9I?V'e#uNr=25<-6gUM^<*$A?gEUAa/\H9$sI+AQck_jd\i&_oD4[ZH?/5Bb3BhjsP7%oSV]93@AhFN5K7R3R\l7Qki;H\/n8\$U8]f#a.19H'Wg9C#6V/lGV9s2`sF^mZ$V^'<*J%)ntGs?b06Cg^W`J_Htp=Cs'CLB;er#a$0Cb9;d/a^P[S+ZQn^>oK`$e0MIJ]DXkQjB,RWJe\XfQEPWs8URE\c%LXoel\43\*ZKJeA3:fI"E.7_Y[#ZFIL=M'.rnD_(CNibp_RP`O8Br1/dm(N?kS*31@LP2\%cf`uc]BMGIWkU7[;;$!%;Z(?5;#t_oYr)EoL\dOi^.`ef^o9F=:2&k],5.73P'2sC2@NSe`>d%RH#/9^T6dkHa;[Q1*n5gXI#Q'S3nDRA))eMc"!*G.%$p/%=u-RfYId%\8mt#:gKbpBdo#u34#M$j31XOcVj7_7f*g=Y\-Y_UD3Ee*FZ5uU+9D:+i\n=NM(;q%P7\2FPZGu`NDZ>@>&I``JOXl9)>fr3X?*bCd,)^R28/\'pg/(MaMV-!^6i=XNTop.cAGn8.02mGS3lboW4`k;&d>JZ^_9nP5J(u0pAM:;+uE&L-:kLo?g'b:$_RrT@>a'6Nh9no'`l<_hK)n[Pol14RX\c$#;29@&qo#_?Q'h[*@+"lO\<^>/!aEDisOnXWM6X44g1!SC,FJ_LU=Y@T&<,*W+ce5n3Zpn!u)/C#jUVA>BUKga#_,GKj+\lJ]BhXGS\8,Go1:2[Y'iIl]lt'iH0;HE1>00,kPJ1n)>&9?8M(6C^&^/13fc,e1DlG)Vl":=7N$98]g@B>YMMUNe^>q*Cg/lU_4j'=>1Zd6ah5['PU2g8m@qQE"n%s/(][cJg30+g3l=!<=G@M(D5!fdkr9bL00HWO6M7dfS$5^.^`SOsqQ@[i;<7G(u.]br%>X%9='qa+n;ft?+_Kf2W`2Em!ij6jJMGXda298VaMY#((Lf9DL$HD&hK:-e?I1G;Vjp,''s!X#@qK%F2\NY@KN>e/8-Vdi4jGKDuM\gNlnkd+,,96V`RU;l-]>c8I+g%-X\B`,tk`r46ZunlQ`kf/X2p-N>hlUc/N79Y/apPd$HYAa%Z``&r8>9>D@b+b(db5Q$RVOPEOl8#(I/\u)ncB&\&e:^8_ZMiHf1C^>Co8!5pe.UKnX#7,R.C2OnaU@IEK.lB)I0FZ<5J`C2H,uW:L^jK3cs;m,[6i(G`^U?XS7(7ru/%f?Ku+LgKL8%$fMP(5u;:#NI6l+LX(nV29Q"9-sf"HWaS(.errD=JqBYX1#Jum;#Sp\:2j#i`>D-?Ie(ba8@`[j^$6S*h@L((,\l85oa\!VKjQ+Z$4>!m`u*Vi#,*8fhoesq4mF@kV16B]@1.2#G0N0R+N['=B5\=QfL4U!5l@k\NcG)0J2#5D#3`"Q8eb.,/B12o)0'$":D\d>X.\4r4\qU'QY.B@qr;"3T8'kRRbr)3NG1IgeT+iu:%-8"b3VU))RaMe!d9^lns-J?&5@OWf\'f_LI%op5T(Q!\tn^\+dQj8BddGs4"~> endstream endobj 6 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 595 842 ] /Resources 3 0 R /Contents 5 0 R >> endobj 7 0 obj << /Length 1857 /Filter [ /ASCII85Decode /FlateDecode ] >> stream Gat%%]<3)3&FK-*/=dtA+2\n&\1j!YklTWm80M8G\Or"^J!&]"aQ]&3_NLi"_'WJ&G]$PVO=Q=nPem/`-KJg5`O31HMLO&j?F9PpSB]*NsfgqsEeA0?X=)Ua1pX8pTBjQXI3$S"pKs=eTigs$"C"o&o,hgSCQ@718RLe=`'?paJmu-6:2i)l8JdX>ogM.m3BZ,%`mPo:RrFXWut%A+8r3H+^]WWhu9D6&&Xkm-Ir#Er.$9C!chlA$tG+Vi,b^VjYm1J+-ON@7&G-eMZL2*Dp]uP.-4%\X?N=<[AU#p:<4P)!`IF&WKUisK4a4;0^m'DNL46d4>N*,[C[UpJWFe,nVFI0"V?E<^\@kmFM7sXQ$fgB)>lpHQsMKGbldhsR`pA+sD?$_('"128WUXLTqIR]_#e&6_;kE)!kcQM%U4#&)"dD\tKEEan'Xm0WN.fJN7lH)fAUMi:NgHnKDHOuQ%?TU(<:%+KQRc@q*RZUp&Qe!oDG'Kml,(&h4md"K4%Bg-abYQ>5Fa4sO:j[#^C/OCXml-3,&k.:=%IZC6/c9"2Q@Z>RW0(Z7"gO<,J`Cs'8,;U.?X"#sRrA94IZ9W4N1Kh*"a[;"MO#9p/h1R3dMG/0K,B#khNQs:US7/j#W@DBI1F"U-d)?4&=J[b636th[PhJ2#)DgK@,R2`8%(FoY[9R$(4>Ff\qZet(`Vd[Pm4@BoC6USh8Pc,*T>]?-UVA3cP@:WB^]"1doeg&6c,lZ^,nX&MAmXWdKRWE!a+#ulde;=u!pJ:m:A0XX6esnD"lK,C,HfC%L.7NG[#p/eeo\V]RS]O/pWlO`1U:F)dYHBMQZ2JN7OXdk!jWh-Zc)I:4l$6P5^-=9,0+)DN876pcKH]nCXkBEg!rjD%R4@/nY*&Apq.(CO"25:Rb5+9^+(U(f=P53Ze=+\"n.Vo/]!89TB168a+;j2MogfLSgNt(@e3gOEDcc3Osig_Fe/rXs>k`mLd)`ma2UZ+p;A>_0M_?b@'oBjT36)8jF+9+?2L,B`'A*=+g/'*ojoGff5tIh!,f=*2CB%M:25sFRY6#ptJq/cAcCVe-mC"!pE+iZ*mr)niV86E"W9^jJe1jMa=SF2(G;O9/?<:A^ endstream endobj 8 0 obj << /Type /Page /Parent 1 0 R /MediaBox [ 0 0 595 842 ] /Resources 3 0 R /Contents 7 0 R >> endobj 9 0 obj << /Type /FontDescriptor /FontName /1Ef905Humnst777TL,Bold /FontBBox [-143 -235 1272 1005] /Flags 33 /CapHeight 693 /Ascent 1005 /Descent -235 /ItalicAngle 0 /StemV 0 /FontFile2 10 0 R /MissingWidth 500 >> endobj 10 0 obj << /Length 6763 /Filter [ /ASCII85Decode /FlateDecode ] /Length1 8696 >> stream Gatm>$Wn+pffj%\cKtMP0"WYW/1Vi/+L56/O>>Z-.5?Q*;,gA0?AM)#BN#SH>-/PtC=!eb9I-tU1"9I8-;D`R%44s%=A,_Me/2u.ejN4<60@P6SQW`3H2RR;cd-QRLY^WDn+eU)pO6a@(a5\@pEL^ocbshL?LD:-]4,N;hT2O?)-]q'/e76E$TOA5Ur74\*Dt8SUCna!4@TK^p!\1CZiF>7'bjf-YXSIci(I5\N/>iMQDUWC>@;/Z;/":n_VgEf`n#X0;cp&h]gqEX:2$)ceUC'MHn-)+LU2_A"g8WDF?C^_1B-+YC>b*kfea6HAn>$=W!a;8cZ1iRI_70>)M*/bMMg2Epf7e#j+%?;o=VMf7.[r+X`fA()EqU=\4)1at!9h7B#/kbuLr;.`o%:UR#0OkZM*4D6/6)I)oHR@d%KH2!8SdghmdIeI3rdFt#;*r/`_WuQO]n!H04cje=jlu_-YWj1]HRt'94T=_gGh+'mE`':QjZdDFs%")X\QpKW"X@T<-;m%Cr-@c9re"pNkKC'CpA!g]V3eo;PPXAG,KII*l)iEAekSfKH#i?>SDF(rIlqj)bSV)lpVSfYYKJSjG>oW4otKVPlpE)lqLlG@7uHK(b!5,=0"En.fNU_Xr5H0!^)m5X8*6,$3S>5Kq;ot+)>(8pD"XA%a-1-8_`iIOcdjkKi3ILCb99`$S1Rnu+EcLoh5-dO^Ik3^c:g-AAKO9Ztg59_B0%g0+8<=T,6;bqp`%&dVhA//XR[Qb1.$/KtG8S_+5i)kD16)'neZ(Gm'EO[5]VkM6\n#16cK.`L>-&BUcW)$HGF&PS]'N_\n^=NjsCkl[(.NZA`G;.=!D2lr*+=9GS-E!c,RhMqkVh-#a7HeL%s`TsgqUW'qOEG#3FiY+7-j';oLZ\2(Z6`eh)R()JkN<59dJpP(25@KiJ(L12IE@>V!<-prNE?L(6WR-:>*O8H0U%CiQ77T4`.pj!Nd)bN3))fPWi=j"=73SU#)Lu*G.9*>o[NP&fYlZsV8'.Ec(I1K/KOD<-N35F)XtGZF''omI"M+=r*07_Jf&0JsRPng!KuG+,B6SVNb4FjTCtjW\kQsMfR9n$V%ZW!4JKrb:Z(NL5Y:R7`Z)Qs)^J4*KB7WRtM#s&4s<=unY2PWY+.?0Ui:\+5=Q4=N5iLCTS@pL1aA12'c2E'T=X:5KJNS-XKkC8#[H6sX_,G<*5JPG8pB."QrBoUVY*/H)>u0:(MX''.MH;9'SQFcS\VEXB$c@D%I,-fgICjC'*J@s#9#pNPl`k`7iJl0rYp:BL(9PKsV4JD/=M4V6A&AMN@@*T^%@""&2G`(Y^J9[deLI4h%2n'-H'Apin&U2Co+HJXT12$eO-"\7[K%JM;c&ap*FbUu*q^kZ[ip-$gq*CbUSVeJrOl7a:H?@T][.nKJbD^6c"t+E6:`',A`Ih&;q:AR\DiLW]M)'spGJ@3FX5gg%BV(:cZPq0mc/g^7Ps9O`;LWut.@*hlSA9+bY,mS%ZV$.=0W$%Fd6g^ZVC=4>?7*N;)D4'-[5dgl#H)Tjk5b2g\)+DO)_#D9fRK*ae+:7R!GO8#TI_(a'&3d`;e>\cO(AjnqRo^+<*gbG9BZC9%V99I^YpAC^:1.4mfK[NJEL<9^dHc'>sU?a0dGB0h;F7"@-0c=H:eGEI8/^.$elRce>k[]ROm[&pnXa3uP(nXFtEPm(U$#\qhO6V$2rBn#ZQY1P_7n7R=%?f=e.LUAt[+-lRQSm?G\#BZRHg.>=&I"pFnC#koM^IZl]]'PYd%6/`J^m=A<6]JAp7Pu)U.rYR=g1lnQY8lqico_'&$(P#5B&u+hn?-^6+uW>eg$P*"9L`iMW?&VgWYL.Qq&kV:]gQ=;ZoX:1E+X<8El3s7=FK@EJ-7QS]JUVb%6Ik5f:tLD_&D*gME":01qV8$SLNRop!o;"k^s5$<4BrGE%_7%%)-[`fkes#SO6aA-5NoLrepIMG47G$FleF?l3)76"DJ",g#\_>s*#R*hu';T_29W(2U>)c.PA,\,BS\)9I:1cX!6npebU+BnpZGk$^q\^&nqr]lkN`A;lGN1aV2/DDV37d(8GV5S?Is"0Y7_ZZ@\N$I9dfK@^Kcpo("JV.6S_*+K=q+DA/6E?rPsOjL<5K$e!3M^UDY;.Bn=;Bk:D)A#Eo/u"=QVI1%m:D=%i<\'t^GB2L/=78JT71"MF&ek=t7B)*04U>8:,593&'jC-!2oWdpXfXlUmbtGhOhLj52(b=\lP],:-)LM$/QfAfhp[(7S^k17BQ<#)lXpQ>V[XZOZM5`IS+Z-cEu-rBXYAuMTQ'Ut!GIo9NT9#oqm^T>^EBQq(2/RK%\5#&MG[1XXd1BD5'>KRr2$2n#kZ1s22VcH@bdM#\t``H"G#6jW[o\:I0f*H"X=/c/+ea(XNOC^US<2m_c)sX"bBVbStb?m;Fn'Q\X#_pD5DQ]eXcLd.0OGc^cn,n,pSR3us=b'mhG1!)Yl5G>6.[ZHJ6uUduI?-$dA0^hViH$8%c>N'sC5'Q&ub`S[X/8TLHW#2C<1Sg\/5bS>TY`*g$NZug70p^_Y8,]lOr1Zkcb\n'C_BB3u`TA9;B$!c0UmOddAqAGddS+Q>riR4#\:Mm(;54@1ZR:h<&mpDcDRXh,V^mjZS/3j/kXh]FKBWdSu<&lZQKnk@A8Z3#c!NSX8&rkVB'=k>Dc4seC6Z7K"3"EP%]$[T#HX"0f"'8iPd-h9*?)tmb-ONu`8P=N6SQnEahjXG#TsSqaHYg=!pr3J$qtq*8^JK11T(hI?E_#j10KSMo[m9f@OVVM`mLeB!78Yib"\OR0#JpWh'e=Z::Xp*1p>&qMK:7P""UEHT&?M_1"B,*7m@0aSoB:gY(TL^K)PeduA5oVr)WplKna5gl0\CZJ'W9S$=a2H]^;pQ^Y7DcpPA&G2`(3Cc88K8]G&RH;6)OO#JVB)Y-eW2019\Y1lVDZ0gC%`2K&<%;N$J;[oH<;NY6h8DX=9[ZH%+pDlWt26]R@2U^-W?(rT2g/gj",5*tM)8Z4Tkj[H&@PreA.qDtq96QOWZ_ebjU,W:\U]^Fk2R)RLV3m9Yc0f6:`\;\e0$Y:el@bF`j4*W%k+Hp]TZOZ.]/OdcY:+s:dL"-.`sMK/Z7]4)@3llEcCYPAlnB[g_&66d90IX9ufPV(E'qPdke,EeX'l/jV@+eE7F(@K?4S%STKM$mQ/560CT^/hrJr81l7'8qm:@LPQT$JeL2J]UKE>r6mf1WJ"XQp!-cX=-+@E-*2h%s'cVMQYgVhtcb5[WO*m96&56.?2$pe?IJ&rBf>%reoC+NL[KIKB`=,,@dSupU;E/*'3MEc$r>KSm@j)+-nWjaQTqe:40-A]+pJ=W%+#!fe9\72)(s-:CZnjXMon?S$*[WoN`*p^m[;,9r;Zq:+6`qF>%>Y+q_Em#R?A*FfZ#KK&J2!1*?hnEXc[V\>NrQ7Xp3S`NT_bhM);"N]DIsl%_6&)Qa)!GhQgA)aTPb3O)ZA,@IY3&;T<"7I2#+;6amd?QtfMTuiLCM'l>:E'HRedl2cB/sQT)*f*j\Q^D<4P\btLM9TL((3B4OQ$`mgdq4MYZ#7Zr3BM%RiP/*Rj"#4l:jDuu)1mb/?/'M/\R&LN@Iak2*BJ(&jLpt"=b2ET*mmCeW\l^qFpo].*SpT*+RZoBjTj+l;d&$5]la.$f7X=7Y>(-FL.4Rp-B-N/LHQJA3Cq7j(:;"i,1r$fN&F2hj'`#Ea>7c_mFA'X^()d\_PN1N(ZFF)=Z3>4jk<-C^G;fR]gbEF-735u/tP"7L*L5Nt77'g#.S:%euQkfOgjZQ!bha^L51D3.@IT<;1!<3f@DWGDON5rKpG-@LHX202Bc-n2/D-;#H<&7:N5?]pYI`^-^Q1J>:GOf$oZ.=+t(]i"u$N4Kd%L\K;25)??e7=46aqLQoFr&Du(h/&68I6_R!7mr@[!2"_Hd%;_!YL31m0E-^r3KpmMG?@QBUroC%3<4k`$%b#XHs#GP"[\dEXboZc3j.jW4ZY0H<@.dVi+\KFWqs5dW.h2P!$8!nloV)N9CX`j>K!DEgjdDOdU[>G]Z,)G60uTK;f\QK[!4G6jcb=bu-@1j&8A^5jO^HQfgRYh^u4\WH_(q9s@bB4`_D)8GdWp_djUel#o]mh!$[%MWEiqam@IZNK=dkWgkETNo?6g@U?FdI"XH!TJS/F*-1X~> endstream endobj 11 0 obj << /Type /Font /Subtype /Type0 /Name /F17 /BaseFont /1Ef905Humnst777TL,Bold /Encoding /Identity-H /DescendantFonts [ 12 0 R ] >> endobj 12 0 obj << /Type /Font /BaseFont /1Ef905Humnst777TL,Bold /Subtype /CIDFontType2 /CIDSystemInfo << /Registry (Adobe)/Ordering (UCS)/Supplement 0 >> /FontDescriptor 9 0 R /DW 0 /W [ 0 [500 0 295 295 705 946 750 963 681 571 609 720 569 568 733 291 631 525 503 559 750 615 513 601 643 699 622 395 277 592 592 592 592 592 592 936 277 550 562 483 863 456 544 622 296 522 500 592 592 ] ] >> endobj 13 0 obj << /Type /Font /Subtype /Type1 /Name /F1 /BaseFont /Helvetica /Encoding /WinAnsiEncoding >> endobj 14 0 obj << /Type /FontDescriptor /FontName /2Ef953Humnst777TL /FontBBox [-134 -235 1229 995] /Flags 33 /CapHeight 693 /Ascent 995 /Descent -235 /ItalicAngle 0 /StemV 0 /FontFile2 15 0 R /MissingWidth 500 >> endobj 15 0 obj << /Length 9672 /Filter [ /ASCII85Decode /FlateDecode ] /Length1 12540 >> stream GatUW#sa_TfDiP12Z(W*_^Z'>+E",&P);#`Pma%T\WE9V$K=B)\=pI!TdcsT@,ccoKM$oH/uXT*.B+%2Tq=t1Dj_Og0;9ob4T*NRAq1K7YODK;QW]]$cL7?OmdL)!\PEJUKOh"`U=$K#c(45`hh!I)6qp(*?4\o&;VWX<+r2?q2LNY$Bj*hsZ+GAl6B^"-"aq((4auCiI7O]pgB+-C/A.[RiG&Ys$DV0Kh!Fj&H"\TgIt8/kQo=nMj14>d(da`7]H/%OIf9c2Sp[0q"/#+S0e7R)U*EQf]h3P*%M-,;ib(;(6BS)EaHZ7Ct0)u^f!+LI@qTctBZ'7kHc>u;lV#aq[Ld2o:r[:@LTEQilVN_gY##o1>p#G97ra&j/b0L?X->!eiL&Tf'4c$7,cKD**)7SECC#d6kR(p8GF00T?0S:l&/q>NSN2l'Lrn5?u`p&-kSp=nsmp^^5C-n'^=9c."g/]&<;;r#=bTSh4\L)P+Z]KJQ7dU)j8*cK@(17-:7adVi6p9j_.VDf#J1<&\[LLq:a1>mp9ECY*Ur^gN:/W5&Sk/7Amkim?.58If0%kMdDk35*etBX50WlHB0QSg7QoRO!k6>g?`0/V.\!0+3tF#ZtIU_MT'Y$V(&%FS]eeFrH?Mm0gRg`pM9G9h$+[\p7?ZcbEC;g:]?s?O4GSrZ-:NA-:VP$4umhUghlH,`I/QsI5bU3]+7fn(/F+,HmAB>a0G=Y19O_,VI"N@B[Bh!=T:HqqM:TXJM3b;V[Zo-8"VHW(Yf@eO]-,$p^[>k7JqlVVOLA5hO)3JZV(7&p2Oa0c=`%6/]1="7J3e\]k'-@2K!&SC?#1BE?>\$oHJ?f-a-`IB2(@\4B1Wib<>i-p4tLF(7eOkGD::NFCn.`o+ARG)nqbJm;NXd(lP*haog[MkrqTD1nrTDSJ-!&Pl.ISQ&h"CSmEkKD)cf_aPF2%pf$oN'hU'f>@N[6K&uju1?#e%1#N\aj9%d(8HH>P.]#lej=j2=9+jfQCQY.hBjRVsVqj2jY'OnE&[^(RE!S>GPficm,GO4T6)/1U!PLV]XD#Tt)\V/tO7';RV?3=egm:*SJ,N`/2FBS7a(1*Xs%\W-r]4E8]SQee78/pH%YO.Ya@poj(c[kEhg9G?4L@\M@^jM>8gcdm)7S8A!H,frFhUEmD(^nb_bY(Ok''W27D;9ujRF#Ch5GC>@[@>FqE9Ll4*=QEiZ\>=+hZ>h_A*-GAK'bVkXAOJ4XGE4S52>\MOLYTP/'k,:lM1@TVitc[C\d;$=oIDGUkF`3)1ir::?^g0Eo#8JhuB-AG3j&1`;SPd]?c0(]s]oVd#GAO?1*aF^X[hV;'`u5&@,`oG4&SK\[;B@QLV4tQIp2*g=[/K6dla'@Gg(?4C#MXXk5h_5PnQKr8p!6?,r=jRh!ZYp]\0K!K\sr(_-2+)8P+5pXr>NPQTBa%p\H%,8]!Z0FW2%Q4;'n)9*0m.H!80ShR;jUrn4-'HqU+(oIqnN.h;aeGP8eFuVfL\;i0T+[)4Ek98p7)THe72]t+H7P`aeaLD^'f=!BY,@p'Kit$gu^-fs^n9FRqa:ke'DM)p/#(4Du17]6>p[/)-#GDneNtsr(j9&Q-(QsI?Hl-fs1ORf%)'M6>N!6Fii#42B&FtV&pqu\'/I]]K!Qd$'IXuFT-pX^G4LQ.;"6L0EP%7:MF@bhnQdQ^kQ37Z+q-p>Q-DMgpM\4"81rV3iP&MD<0TBJ*hOYZ+lA!0nK#=rXq8'mUHl*a"@gCdBp'=o$g+RVsXt=\T)nOB@86YoH)l'JqZd.I01G>R:^Q_%dU2`op;@3M1K3r;C9nH%ZAb3f[3Jb/@lY;ue!R2B*q!jX^%bs*I1FAimE:?7(UF^CNTLdg*_C;4>>SlgIAl&uY&%!RF^`9eVDEH?ZF5A1J.--[5%p+]%JKJ&R?jr(i)dl-J7u(btRHcQg6#Ar-)(aQ7:f_WHj6h/+2OK7_LTaN^NU[902i8hc1%qP?$&_%0oXXR5?*d+oS@]BDV_MlWgMB`/%AciJ]fKXR7t]#n]om(LiZ;RKbLpR%%h[6cKGassPL9MMA8e2^-)?W62EHZUC4Xfe@MrC2eR)N>)h[DeO)tYa3o3-8?K7Nd(\O%Whp9k)@U1^@YI$7;"4B"t%ACfJ?bgY_?t<5S>E:9E\$c*hdM,o_RJ3C3nP(W`a"='NspZ;jGJ][-nl!:9)I>R4k4@Fdeu%'3^WWD";0U,Yg[H=a>9ac#*\0F?5_d?b%52%k(;)tQ!Dn]ea96@rLV=(';tt!PXN=M7ZFW%4K;c:0P0VJk*3t:W%aNJ'#$J=7M'CJlPO;KMQ!4RI`3V9c)KI%8#'T@"8Qm=gQ-9qA;BNR*!BP0u$\jb(>!ibT*7n[@EUoJYdn,+qMBj>L$?-7%OXjC1>57S%+[AJB5^c=/E1?-,[N3BpRiB5mC9@IqS\G/N_6Ae,j;&`Rp=A15M:6'-nq"Z@8E,]5q?R$1olK1!SU$$;87-^1UY^eo@rG&0hac>>JAgpM?HFEZB8/K8bc%UZn56[gNFb0l>KW<_k%bE'u;+.>.Hh1>0q/P]Ri1VqZ.mB!PEkk)E4@8?VPZ*idVXB`9["Z)*sO>AF)pl0SGC#N,l(#o^k+eV22Jb"_WY@!'0LonA6"LD5B?S:O_Rl`MFCdsk*okIO)jH,[[X9e,in"4p`TR*LQS?HiBS^L*5do$rG8uL4/I!&UK$nC8aMlI#C?<03'mUC,$`b#OXKOjke'$nTsn74XGR6SpY;15Bo0V\clR,q/"\Y;2Mp"R%(h/ok`TW'Q)Kpt&CNX51N72D2j3Q=$F>q1".Q$>5Z9a3<]`X=Yc1'(%Zt0UQ1:ZKkU8Z]b2`^7d\:@#(?$MK5>45=&U2rlg?8)GLjoeY(\2(ZQ8X6#!Pc%t2K%0_T'ZbW)):B>!tW7E7*UUX2T0fNdZobIJ3qO.iA.G0#bO9GGAsBdA;q+392]gW.8am1S5d?L)$i.GUuZV;!\]ri=C4G%]GC3Uk4Wa`kolds861kW7WSqG5`PG%olO9eMO>%g)QK0CV)Z2!obWH4*XMe^nre(gWF7c6kj[YnK6A8qaQS?\C7elui@2l/H\>g$/>-%=(1J?ZnZhn9(c2F5X[^IuFWN)3Eo%5flA]'u(Hnu,WqYh[H(5BQHe#qrcHpu-k]Yet,8?l8Xj]`blN2&Mj.6!Go"U,G1L18Z7hSU];hPjQs_2[N=>B=ZdZ/L^3q&uc!c2l3OU_A/>rW2Fo:q5HT'B>t9Ge8HScHP0qUV#D!,"5)O0n1i`8bLrK@EeN&U,4KBQ+$@T=`I>^'JPJ70@@t=JrLi)'u+Z0J$+C1)VbHB\-=-IZnUS7BA:mSR%u2YSD3gM;.u!Cr1pj6>WjA_\0TUeohJup]HWO#O%!/NJ@^,Wjes6O@U..0Q;VL4o's"$/5bn![:)J:EX@2Oma5s3K]Lrqld%FM0dV''6J4KU\p+t^.p4H4jU(G)H)>[_9OEsP#fZ#["Ka"7]hkq8?(MQ5DlEE3@d%DD*I_pj%U8b$`%M>dftK%MpCT\<]([h^bnGieb[/"Ab_fJCY9tAo\!Gr5#]9^`gVU^^`g*)C3rlX5XWns]1lp>-6PuQ[\b#7F0JbreL0IUWWX*UK!2??O/uit?>`4D&WmV:).H!QJ6%7+UT7i]01C[;$bh]fr[%A7Ts,sp.F_4r6n[M%aL65;;W8DO`!qaRE1i:8Kej')*=CLo>=andYFsTT=iHG.FcOT[rhS6ZKo+iC%EpE,dM6!#`XLc$Ia,^PUG:;gKf,DDoZV:nTV%^uhq=I@rXLXp$M5LEM#\6B2*_7Z;6N>hU[-=qG!KHii#gM:h.Vp#`*-Q8PVm/%qSWOe8ch$8Y@CEV&//3<8gT;T^uK*l;8@u%`R&=*b/6/?XjaOAhJVaFUSBh-$+B"qa?+El\`$acA[,E7PkZ#l+I8U-[$'t&Erk34,F5K[K";M9=M\T8*r#^g;l7/!'\>K$l+#;,R7XI'3B#'!U9i"H+6&fK2DX#IDD)P#9`Ca.lZK$EiX$NAV!W[%O%S!6igB$,tL./Z.A74j'Jk\8L)Xtgu_K)\E)62V9_qI%g9/b!W800BbWdd5]9s6I);/M&0Z&_X>r=uQbno-@/l8u56.,:l)g.A:9Q+d+UZ7QD$dKN#tlL)s]aNm@W&3Wi409hjdf\MV9tTtL.bW'N;%fVG^(*bg4!7NJWO^r;1Ha)O!D/TraK!f19QJ$O6fZYduBH"+1C$KW]pWS0Ma?Gj&<^qVA[.I%R"0:OoEgeGi3eJp>*C,l%Hl4Z2KEjk!S16=-j*G5!S%+&]U]+EH%(F)`KFHgsE93SEgi%/YR>M1>cCTH5S"b]E8J6S=S&(_rgrYW>l9&1flES;'g4+M6*^]6MRkP\,!)'t]n96?Ebj3$?Q_Zq5-M28u>mkM]$^[7?>1+`Ld`]CfCcBABNHRF*&+?FEn$!OeBL)CCqZn"fj.X1Fr&s4.(h#Ta_'^YQGkQu$J?>-2`M\&J!b'Q.EpO=kp:;t9`Tfr47$6AZi7$J0Ujmt_e=\*sC1&p!@kn6A/%:+E!%a_Z!P@Rq;>.Zk:6DX=V(QtgT*bSct1TVFq97#K0CGSOP7Q*3p%.6HJ'pGeEANKcEGh)9f$=%oMbD1U`2Ya=7-i`.9Z)PK=f+s2qqKdFZ8_-6GD,Nkf+L-+aMGDKe/[Q26FtI$j+d?%R:7f4_H8&P7Ec00k^)(S*c$tn&nq5=/b'o.02Kcq#Yt$=1mi"3!d?k?piQGVH4kMTYRi)[Aq-lQQRmk/%G7p/Jecu9*Mc38/f2lIG,d(_^LCX,?:Wfk)4t54B#pEl:(n]H[0OZs6N6b,a1\#[L57spA4VhdPDqoB8:c<[Lk5"U,Vm,]Z?%m(2j1K"P98(?1"@VSh]T%unq0^/Q]q;I^"1+?s=h#^GPk-GJ*-Ob3QLeQ#0FN)"mDDL)=A@EA7/q-?MIpH4:6Ma976GK2jf19J5MWf`k3eBAPPFf7)h06M*-:9a@jL+C2j1*T.k'u^a--]pf]X$Hm27[T]B.[iI'N@k.iJna8BR=cT6.0X-Bdk+9u>ME5/l?[FP-UKeJJSbHGM-"g8Xsb6[]WW3'GeW2DI]B3M@Dl(eZ?>i]/B`u;l-"XJ:gmjj+BhfYe.dQ6F>3jP!9'SuI[]!$"hM;PR26-d]P_KL[m$\\t5"28)I;cnWm5j+%G+*J=]BS0F_7G]3Q?W>Wn3P9,Ch]7m?W.S2jOoMe%W6Ii6#\gi.Q'*=^/)u^Xc:Q*&8sA=>mrTpsd7e+B4>,TE0I_MpI_a8A[(5CpYY`Ck9ZKaFa;4k9FqJa)+(`Tpo<9;A#oBlA&@'-B0u-ZMtF"k&+5@83L>);8drNW7F.colkZk[*GfL7_PG/,TSJC@(bK3R2D7NT0Q$H@8,2%P6gTD)HC1&,:nar$HKM97g/i)"qjJo%6YSK\;LYPRn8uLd`>h,kS8LfUfKO2,3Ak-kQe!ZWB'Pq(/rfE$S4^>WrW5?A$NGEY%]n/82aZ7:u]GT.?*$?$u\n9`s6S18Y(X/cne`/GBI!LJf".lR(Bjl1OuF`8TUfE=1t%oloO=*=*9fr\_e&r5)-h\?dLq#J)2e3@oDAb&Pr15e:CfAYCh.^?UrB!-hDBD&Ds,LdmP?a4CpAnIhW!m?U0,nOA\`67=pX-@am<4fn/"_BS@BkV):l4<`kASqsTK@MHUA;#P2$+eJX`p#?q:8N'-ob\X;*bs1V?TeU'F/KqLE?V.t8.DFPLR<2nF]c1u7R#=*(N9YWk=ubpi.ksfKJ[*mhMT>hZ@fG,KlaZ#>.>9"F&VlnqW$\I+7>%O"mj&:L_i#s"NsbKYZMV`^b1nf7c7sGeS:=*9L,dZb%N6Eko#0pQk?b4KiPXk@O'^1i!i&fn_N*QQ[cP5ol\glpYLf%_7AeW=(;Zepb:i#&"c8kYVq&3Dd3l'T?7l`4o/_pO!Z,-[tQg-\!ZIU<.eObkH=_+s_NOS)B`.]A2o*9*NZCl@i/@[`QKVu[BB"!?8*mJ7c2RYEZ-_Lc5)q,R'`E#nh*.HGJh_-7a/]J"Nf/&6=`LrGB^;>Z5>RR?``dGJ&BFq`D1m$Nb/$&=_L58Xe?"q'f+!VfI'$\&V2_!ZQD%2F&'38L_S/*R3,?).ASE+H_mM7s8m:5/ZNo`[?YQ7/E1<[u2iG8r6YAL,07;?m:P)Kh09cA0R0SP#cVkK:#8r^Kqa!D)o#cX@@C:F_T!\W@*lqe*ASneX*]KaZ?B!1=mi4W""`7!X]'*tf292"61NF!nWM<-arODIInZ_1tQM3jYFW6^[P!0T/ZJXEJ7EJ_c:=]?F'F7u.Ku*g&e7RmTWTjB!t#al&L`=^Q?a*\_l]9@K#XB9Sm#[k7_ endstream endobj 16 0 obj << /Type /Font /Subtype /Type0 /Name /F15 /BaseFont /2Ef953Humnst777TL /Encoding /Identity-H /DescendantFonts [ 17 0 R ] >> endobj 17 0 obj << /Type /Font /BaseFont /2Ef953Humnst777TL /Subtype /CIDFontType2 /CIDSystemInfo << /Registry (Adobe)/Ordering (UCS)/Supplement 0 >> /FontDescriptor 14 0 R /DW 0 /W [ 0 [500 0 287 287 287 537 527 811 360 366 596 586 250 574 574 287 574 574 574 524 469 464 514 596 586 883 514 476 287 529 277 527 660 419 501 250 574 574 337 269 535 464 732 705 609 576 250 574 574 574 570 586 469 419 686 586 596 299 287 575 283 945 287 524 915 589 591 477 631 710 353 586 323 323 586 464 480 503 689 469 ] ] >> endobj 1 0 obj << /Type /Pages /Count 2 /Kids [6 0 R 8 0 R ] >> endobj 2 0 obj << /Type /Catalog /Pages 1 0 R >> endobj 3 0 obj << /Font << /F17 11 0 R /F1 13 0 R /F15 16 0 R >> /ProcSet [ /PDF /ImageC /Text ] >> endobj xref 0 18 0000000000 65535 f 0000025008 00000 n 0000025072 00000 n 0000025122 00000 n 0000000015 00000 n 0000000071 00000 n 0000004450 00000 n 0000004556 00000 n 0000006505 00000 n 0000006611 00000 n 0000006836 00000 n 0000013706 00000 n 0000013852 00000 n 0000014246 00000 n 0000014354 00000 n 0000014573 00000 n 0000024353 00000 n 0000024494 00000 n trailer << /Size 18 /Root 2 0 R /Info 4 0 R >> startxref 25225 %%EOF ------=_Part_0_3437046.1188904239130-- axiom-1.2.8/modules/axiom-tests/test-resources/mtom/MTOMAttachmentStream.bin0000644000000000000000000015202311131637500025660 0ustar rootroot--MIMEBoundaryurn:uuid:A3ADBAEE51A1A87B2A11443668160701 content-type:application/xop+xml; charset=UTF-8; type="application/soap+xml"; content-transfer-encoding:binary content-id:<0.urn:uuid:A3ADBAEE51A1A87B2A11443668160702@apache.org> /tmp/sampleMTOMTransfer1.jpg/tmp/sampleMTOMTransfer2.jpg --MIMEBoundaryurn:uuid:A3ADBAEE51A1A87B2A11443668160701 content-id:<1.urn:uuid:A3ADBAEE51A1A87B2A11443668160943@apache.org> content-type:image/jpeg content-transfer-encoding:binary ÿØÿàJFIFÿÛC    $.' ",#(7),01444'9=82<.342ÿÛC  2!!22222222222222222222222222222222222222222222222222ÿÀà€"ÿÄ ÿĵ}!1AQa"q2‘¡#B±ÁRÑð$3br‚ %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyzƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖרÙÚáâãäåæçèéêñòóôõö÷øùúÿÄ ÿĵw!1AQaq"2B‘¡±Á #3RðbrÑ $4á%ñ&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz‚ƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖרÙÚâãäåæçèéêòóôõö÷øùúÿÚ ?ç•pqO SRãŠzÂ3šª{sSÿ1ïNTô©TgŽÔÀSÒ¥Téá9 \š@2:TŠéËãR cc9âžPg ‘W8§€:ÔP>”í‹ÿÖ§ƒž1O+ž‚€ 0G(Ñ[깪ϣÚH¤ˆ¶ŸT8­¹ŠP½±@rx~6æ9qþòæ£þÌ¿µ¹|¨ìÇäk  Ž”¸¢às¨_Z³Æ9ào]¹«1kHÖBÃýÓšˆT}– {9þU£”Ax²ƒœ{Pxµ;I0<Фön*â:8ʰ#ØÕyt;Gé½>‡5Pè!&Àú‚¿Ê˜áEíX¾V¯j8Ý"£õéWX¸‹‰íÇáòŸÖ‹±ä¨éÇÒ”#÷³õF=jÙ¸}Ñÿ¼*ìW0L3¨ßF¢à/#ª~F—rt<}x¦½ÄiÆw7 äÓvK0ùŽÅþèë@ ó"£æoAH#yyíÝjEp1î ;cŸ¨¦0DD\§=)>qÕsô4yˆ8'^(ظqØÒâ KEW¸¾·´\Ë °êOáCv~=*9n"·BÒº¢Žäâ±gÖg¸,–‘=HÉÿëT)¦OrÞeÜ­ž¼ŸþµÕξ Ùkrˆð?.µWì·úƒn¹¢zåþ5©mg ²â4÷=IüjÀRzQa-´«k~voaݹý*øPÆ)TcÒLBÆ)À`PÏAJýi ÉЀ tÛÿÙN+C7=>ÿøÖÎ8Æh@F 4`ž”üqK´zP*gœT Æ)*wñ P1 ֔œ“œQ·;cîiÛxÍ(ª¥f€¼S½¿ M¸Ïœc€i@§ÀÁ '¥ÛíN=;S‚俀aÆ0)Á{c¥;Ž=©¯cþ]½O¸ñ „*‹ýç9®~ÿı®EÍþHþ?ÐWœMªk:žp’m=älÊ¢EÔÜÜÝ?º‚ŽF÷i=÷maÈ‚ O«Ÿè+ž¹ñn¡xJÿ´k´:Ú,/yõcš¼–ª£  aŠ¥…ÎŽ}¢ÔîŽ]„`úœšzhªNf‘ä?Z踩D#=*‰æ2bÓbîÄ£ð«+j;ŒV€ŒPSÚ™7) eâ”BéVÊg¨¦”¦&ÊÆ1è)6J²TzS ãµr±N:SY*ÉZ”ÐrµQVvšaOJC¹Õª÷íS*Ò"žõ2¯áY£p íR¢Ž¸¡@2¨úS枪p 9WÚ¥UÀëHb*÷©vŠàqÅHz`4(<ñùÓ‚ñÍ<-9Wœb“0¸N乤>0¿º%m†z×ú×ZÊfÐaiÑÆÍŸ\sXkl¨0ªAŠéJÿÄ–?÷†’µ;ž{Ÿö¥uö€Ì#¨àbµaÓ­àÇ— /¡™` êÚ€ô›úVÂÀÍÐU£9=J^HëJ"q­dA¹‘‚úãŠm2JþXÒìæ§)éI·Šr½é6ñSíÅ&Ð( ˜£eKÚ“ÄBVšV¦*sM+@•¦•©ŠÓ h‡e1€ëSµ …—н*fúÔl3Hg`«ŽÕ(^);ÔÈœZÌèÔÁpsBÆzTоÝiˆU\ñR*æ…QRã8ü) LÇ­=AÇZ0àu©é@€ Ôà3Ò”.8¥ QÆiGLRc´à˜>ƒšO­<sIøq@ #4€gÒŸ¶Œ`v¤'ˆÇú<Æ•mÀ1yÀ?•bøŒ~â ÿ|ÿ*܈~å?ÝÊšJúQ€x§ý)0I Rc½)Ã<ŠnE(§ãÞ¯µê){Òð­!À Ç<óFLqJ=騯)\ çò¬sb‡þšC[gkÄJ>ÁþZCHÂ?v˜ô#`ŠHaOeöè*„"óÈ'Úœ´Ñèià½)€¤cùÒ¨9“éýÿ­éJ£=ip8È¥š¡^‡4å<à @¼bœ) pu¤ÀõïN…'§é™¢–àc«ëZãéYK÷‡õ­€8ê) ÁÆ?Jpæ“úSÔÒ˜ŠrƒQË<.e•uäÖ|úý´y«È!Jè còÐÒGn‘ÕG©8È^ø¡ãtñÀ=&¹›ï[#¹¦WjWì=}nÎ,„f‘¿Ù~u—wâGQò˜à_V95æ²ø—Q¼;ma`§¸ýj±³ÔnÛuÅÀ@zɧf÷g_â»pI–áæ?\ À¹ñ|Ó6ËHO¶ÅɪÐè–¨A4­êæ´b‚8—Š£ý‘Š|¨—#)ÛY¿lÈ|µ=ݲ*|z ¹ uq$§Ó ­£)áEU‘.L«Ÿm8T{ãš´#TiÀsÍ"nFzT‰n‚­ÀcR2iF¶R ›÷æ\ÌKe. =«a 0é[ýåQž}èXæ •€ìÜžUoìÆ 0ÁyüéH¸\ãtTŒø’ýeC.HÎ?†º“¦£so(Ï÷[ük–ÒÅwÈìB—Rq×î×_öI- ÇaÐÐL·!ýý© *{ò 5¡´¹dòØ÷N•?Ú¦·;%R3Ô0¤2YÌ2ËåŸö)Ü“>]"Q̲¯·Z¡$/u*}­Yf’`Ù=äT2jFDÚè{Ó¸„{SJÔÎC9!Bû aÄ3›OÅ P ˆÓOZŠaÀŒŠa¦ Sôí@¦2ñSÍFÊDWµ"àqš`8sÅ*ã¥4Ò¯\RÝâ”c¸É¤›{éø†%¹Œ¾;¿°ï¼W·!îÕ÷b®YµkÓûÇòÔö-ŸÒ£],73Hò®>WÔ\ÈÚ»ñ|@‘ —cݹ5™.««ßd"²!õ;EI¼PýÈ•~‚§ùQ.Fjé³LsqrÇ=“Š·›k ùbú·&¬ƒOH–Å *@¦Í=Wñ BŒT€qHµH)*ç­HÚ…SÇ^´\BªñNN€ z9Ð=©ã¥&K—Ry­e7K-ê§ùÖ&+^ÔçIÇ #õ©—Bá¹ÈXá|Y}¸íS´“øWD×eùnHìqŠç!ãÅ—ƒÖ4?¥mL™îN÷Óº`°ÇNFj¶Iêiqí@SH‘„Rô§‘M4ÀaÓŠyÓô¦&2Ž)ÄLP1ïM f¤Æ4Ó@ž”Ìy çî SEʳ3‚Š~Z1OUõ&—c4¥º€G¸©B×?LQ´u<Jr¹´ºÆ´Ã§By—èjç—ÆsJúý)…ÊBÒHÏî®]jd¸Õ`û—[Ç¡59L šB¤i⦷ªEĤ˜ö«x¥ãÇ›hé©ŽqO š,ƒ˜Ú¶ñ¢/K›ˆþ§"µíük¿^BÞÎ1\q·þò)ü*&Ó­ßø1ô8¥Ê;ž“мÌnŽ'ôÍêì~"¶o¿©ïÖ¼Ÿû11Ë"Ÿ­="Ô!¹½¡&—(î{zÅ„˜ÅÀ_fU”¸‚AòM}WŽ.¡¬ÃÉx¤úÔ«â;´?¾±ÝsE˜\ôAoþùþU¶™1 Ïðå^ciªRÝ•L±mä|ÙÁéÅ>=cXµá/nvŽžd!‡èh×aÜôÜ|ÙÏ¥yä>3ÕcÀv³—ÞÌgõ¥Ž¥8ó´ÇaÜà oëEÀìèèx®f/iDâqqÿ¦‘‘Zx“H¹Ç• ö-ŠWkT½m;Kžé3F7`÷渫ˆ³-çúU¢µ±ë°á×ßÐ×Aâ˨ŸÂ—Ï ¨ß*•³üB¼Ø–$÷¦’z‰³Ü4Í^ÃX‡Í²¸Y0>dèËõs&¼ÞêkYÖky^)ü®‡Wo£|BtÛ®…×§Ÿçñÿ asÐø=)ÁȨm.­¯­Ö{IÒhFC‘ô«Ô†1¸Á÷¬¯cû=Oý4ÈÖ±÷¬ŸŒiêGüôÈÒÐãìèÙᎹ¨àÿxùþüªEf¨B¨4¼P !8$`zÓLät¡XdU õkHF »˜vNk&óÄñ¿.È€è]²*\Ȥ=3U§ÔímÉß(,?…y5ç·þ1GÈ2É1ôÎò¬™5JìbÞ#žøÇëKV¢]x"b*ïH¥s—þ0×ãÑNÑ\·Ø.§;®nO=—ŸÖ¬C¦ÛDsåî>¯É§ËÝ‹˜’_Ýܶž{…þ¦©˜µ ¹¸Ÿo9ÆrkH(ÚšïzÓ²DÜÝÖ8Ñ®¹ÿ–&°mÀXS”*ßÕÇüInë‹*À·¸Lÿt*Q‰zR擜*ˆ­(ëOšh^àÓ€#­(Å<  #¿Z•i¡sNUËb€ïRLT=H ÅH¢˜µ ö¤À枢š¹ïOÅ8zR \b˜ zV­Ÿ:cf¬ªÕ±çNaþõL‹†ç 0<_qï VÖ1X¯ÇŒzÀµ·Æj‰žâ~4w£ØR{S$CÅ4ÓŽjXìîf?$ø(^škM4[¶0TÿxÓ›F ÷å'è(¸Ìr}i¤Ö´–0Æ:õ5JQEÂ)3¨êqP=Ê/@Çð©ÝÎ*¶䓸S…y/_øP©ª’]\7ñô¥öhÁåsõ§•O ÐP;£Å<½C·Öa)ê~¦¶Šw¦”¢ÁÌegâ“òácŽA?SZi¬´X.Îw§¯©0¥Ç&‚îÇAÏ®iÛÀ9÷Í3ŽôÄ?#=sž¤ŠpÆqO­C@"“îÀÜN}ɦ—88zˆc¹§} ²yÍ=OÏÆž¢€3ëR(¦-H š@8 p\ô§*÷©Ð^PïQ<`0â­ɪò6$!ðøýÔÇÄ[´¶F·Wß $g*ÄwªšÅ´‡Üÿ:¿dqgö¥Ô¡ÆÙÈùn\û:†¨žÅŽNÛWú¡SúU¬Òäв̟v)ýr¸þ†¡–ÜdI?í­º¿ê+T7ã¾(žºŽ8íßcEÛ….§þù” n9§{ÑÞ—€98úÐqíO\Õ9¯–7Ûï#¸• SñE„ÙU,cQÉf©Ö$^ŠJæ6Æ•µiéŸñêãý£ü«?£¦ÜIþ÷ô©–ÅÓÜäuÅ"·ï 3|£xRÜiÆ8h˜ÈOÊÛyÐ1a• %‘˜ºôÆ6нo®Ûd…†:í9¬ƒk(æÊ·\`óM…ž9¶ÈÆ0F mäP+¼éQVmg’؉#à©íJĸ£¸QÆEL æ¬xDÕ|Cb.ì,Ùâ Q›z€ušèáø{®0Ë­´ïKþÒ3åg24ð+§“À:Ìk•û4ŸîÉæ+&ûDÔtÑ›»Yñã+ùŠ9XX¡Óšp4ÓH8¤Ñ$œv¤Í¤'š@?5¥¥sŸïJÇ2ªýçêkOD•%ŽmŒ 3ƒíJEÃsšÖ$ÓÛý—ªHÅeëcöœß¥ZkµèŸ­0šÔ±‘HO(»»Ü‘7‘ =üØ÷4Ó¹*-ÅÆ¡ij?qgûÍT×ÄSñ8õ¯82–$³}MFsž /Ù£Õ༷¸Éž7ÈÎTÅN+É#¸’ ŒT¯#Ðéž,žXdà“ÉÄàvçÓ5¶¦AqÌ+$N¡ò¼çћЌ¹#5 F[±üj×ÒÓ°\§öv>‚“ì¹êߥ\¦7Ò‚å_²§rM(·‹û€Ôçi´£j¼…OϽ4ÓŠÍ)¢¤ÔiÜzSϵ4ÐS7—63X«tg}¡‰ýkOP#€©ûÌ0k),e*¯žš ‰j;Xæc$²$)ת&ŠÙŸbNÓ1û¨«ýM>é ·@Ý­ïŠKXB˜£’'_3‚àõÍ$[K[ˆö@Û&^¡Ç_¡¥ŠOÙ˜ãh‰;•¾óW¥Óì-Ø$µÏGW9™ªS9yñ$†9‘pr zf‚ÓF-‰W^d‰Û‘õ¤ß•ä`2 åqøSe*Ø‚î ?úÕPJФ㯓À  Ÿ,¬s‘Т‚RˆpÀ0`Wj3ËCm9üéŸ à€:M&ýå‘ârJŽGû>Õvaóž{ÉÑ£Yd@|°@Ö¬§–?ìšž¤2Ά?âSÿ5ºâÚ>;TZ"ÿĨöE\Š'ºš‰nh–€§`VUÖ½§ÚÊPÊdppDc ~4YëöD.ó žÏþ4µªp§5ÒønW X°?¥r×>#´„b Ò°ôàUƶòÊ—K6qó~”¥±p½õ¯ kZqÿiÇéTuÍJ-2Û÷XiŸ¦OOz]Õíµ mg²—,Œù`®G¥r7)$Ó8Ý¿ñæ©ÕÙZâêk¹L’9v=Í5'šš;bä(ÈoJ¹šó°£ÊÃÐPÝŠI³?Ê8Ͻܰè}+NëH¸´Œ4èé¸ð櫪žNÞqJýŠåkq±ZÆHGÝž{zU[ˆBœíZ>`;Xœã9÷ª1b}¸Å ãv±«á­Uí.– 0¹Æc]ÖsŽkË B$Èõ¯BÒ.¾Õ§Æçï(Ú {3ž¢ê‹ù¤â–óVf4ÒbƒéIƒŽ´„!éLÅ8ŒRcé@Æ÷¤"—½0°îGçL ,PiØR,ŒÒyÆé ÆÔYMÒ‚s´dŠ…',{3€€ã?ýj~¨ºdsQÄ-«N²•Î(-l)žg"BJçî éZpOw [¾Ó“Œ‘:UQs·—d†0¿3ÈÇ’!½_2fHòpsîi”X—ȹ¶Ý)‰¦ rÑgóª{fʤðHàp„u¥‚ÄM Jyhqé“ì*o²Í ¤;²îÈ63Î)ZêE!@GV^åòER-œ†æµ-´ãus(å@FY±Ÿ|Ô³ønò(uŒ˜—¿øzÔ¹Å;6Z§&®‘†N@fÊßΜ¼{Ô†0#Pó&®iÖÒAXˆ«Ò‡-1mØÕÓí¾Î†03×=jy‡Ìùþé©"=2p7?û¦¦.äT\²±Ã̉i H7"”,1Ôgš¹ñ'^ÑÆ›mc£[ˆ¦œï–EB…Ptêzý*†ŽUtä,p¸\šç¼XRmJÞXdI#(Jœþtž²°XÇ·°–ãSƒÞ›sc%·&·ôé ƒ`‘Ž:d)/Ý&yvÄ0­·¯$ÑÎïc£ÙG–÷,øOW’rl§mÅyBzãÒºã ÕçZh’ÃXF …\×Xu;醤Cý•Éýjd®îŒ[åÑ“k°mÒ¦`qŒgßšá.>þ=«¨Ôe#I+¹ø›ŽµËÜñ úUÓÑÝÈ QZRcšZ(€sÍoèXò%ÿ®‘ÿèB°Enè_êfÿ~?ýR`=æ“í—‚‰>ôöóõ¨þB?õÐÿ:°~è¤K+O*B››ðµžó´Çæûž”jfóa8 *$Ï¡ÀëM !’)<£Ónàž*GlzTX¾y4Ê-A.åUbIÅOŠ£L‹ÍX71އ?AA-”àF*¡ºþê~f›ç»0>” ÅÆ•"›ö”ÇSϵRÃ’:‘"-Ðêh¹J7;«MjÆæÉ­ÒSæyDa—Ã\æÖŽÂÉ™OïT*c¹¬·W¡•…U}Qèad’±ÐÛ,¨7²Uul##¡Íg¶«©ÙIR[ˆ·àüŠ»l÷W2s<JË•­N®x·cÿLHòs×Ú­i¶Ætš77w‚®Ê’jP‹Jª2µ7&ÕˆTÔeÌIo’ÝÁÉi&U\õëþô2çg®}±^ᨅçŠ, "9 &½×ø±[SVG."\Ò$O¸ £š:œv©¡¾cŠÐç#fÈÀëUfŒž†®ªÝÈA$Ò°TK±=€ÓæŸÖ TÔC*NO–Põ¼Rîî[©ÚI¥,~µ±âŸ\øZžòF>Vq }‘{qô¬7…у§_zlV"< æšÒ„l(ÝëSÞ@¹Âýæ=€¢UŒebÀŒÔß[n¤POSÒ´t뼓{eJ‘’;ÕØ8+ŒŒg= lømY¼Á‚1QQµÑ¥©M&m[èV¤Œ—lñŽ•ÔÙéðÚ X£Uü+êp>µ³m,ŽrÀýMpsJOS×Táx¢ž»¦-ÌAˆËw'°ô®ïO ìEÁ9'ýz5ê´Ð•VÁê+™»¶hHßÈ'9šé§++•éÝÜãæ´t l8VKrs‘Öº»ˆ7B»\qÍð‹_K§›‚b¨LóùôÍkí"·g/±œ¾r!@lzœ×SáÉÑ,äWq€ýÍsÓ[•r¤TàÖö‰l²[o« Ç šÑœÓ]¸×¶ëÿ-ð¨ŸR€t,~‚žmÁŸEɤØþ >‹OS"Ô×øasL7òàí€õîjßÙÆ9v?Ž(û4}Á?SF¡¡œ÷·˜;cAõ¨bžþtËH‰ZâÏ)|°?„~TX.ŒŸ&åþõË~Ñöo½$¦µ€¤ÛNÀä`熔ÓO!¦ŸcN4Üö¤&­‘p¹Èâ‹[hæc¸”Dåú;cŒu©5VT\~#­E,’ÒBÍ'–•ä9çÐzÐŨc†É™f*€®ßîfúzU˜¼«¨dTŠ$eÛüX÷ª÷ ­cºKdpËì“ úv©mI‡/kEFì³ýh´›ˆjíBZ˜¬©w’¶¨+Ÿ\ÔM¢C(ENÈoÖµm´=zæ8JLj[ÎÀ3Ǿ)9(îT`å±köBîòYpV0£z‘‚Ooñ®ÂúÍDwxLÅ>RóüxÉâ›g§G¥ÙˆC^Oï7­NÌ&hK³6ð2ÀªüÀqßœœ×›V|òº=ŠTýœO6¸±Xnç<ô®–(,£TA8¨/lÕ57C–v‚NNzžâàÚÌÈ"/•à ÒRrI#(¨Âòf{ö‡±ÅCuüîš–(ÊÊÌOÌí¸ÔwcÿÝ?ʺ ­¡åU’”›E8ĜԠÇåY ¥ËwTÞî£ *æ¶tßùç‡ò®£áÀX”ñÿçùŠoq£ÎÜyR#nF²0~•,E¬H8eë]oÅvÓmµØ]ÒõàV‘,ƒ$)Ïb0JáT£Æ6†,?!QkîtÂkd4܈µHfÆk£„PG ÷®Fòf 2HëŠê´­òؤŒ…GÝ9ãšmhsUNíŽÔ4ù~ƒù×)u÷ÇÒºÍYÖ-.bN2ç5Æù†Iy;ˆéЏlDDÁëÒ‡R‡’9©¾âY½*±Ì–“𧲬q±'88™×¥(Åoè#÷ÿ¿þ†+ŸšßÐÔÏþüú¡€æ‰ßP¹ÚŒß¼n‚®}Šr£äÇûÇÛdŠîá(Û#r~µ,—sº‚d#éPÛ!˜ºƒ®¡±¼\çéWôÍŸ +¤ýÜsŠŽåZWI Èr =«cL¸·Ú“,;€qŠÎ¤¤–‡f0“÷‹2xvÌ´rZ™òOÖ±µ9v0G•>õ¿qªùQ­½­ªÈÍÉ•ÏUI"ši.D+»|g V1œ·g\éÁû©åµ¥ÅÅÊGa÷rj}Æö9¼§‘ÎkzÉu„p pWÖº½+Ãv²]ÇuLOË'*é‘õ­áQÊV9jPQ…úÜó ‹wŽ%>S*¿F+€«Â1?zW‹ì’_4Å1"Ì£'Ž:`Wm¦£8Þr£¨«”ÒÜÆe'dg$.ø!IÏJ›ÉxÓ;Xw>õÖXé*ɽ£ô¦ÝBž[ƒÓ—µÔêX]78í¥ŽX` t?$€š½-¿/Ii§Ëw+U,Þýj¤·9eMߕǎ½F+è?hèž¶ 7²ÎýËœ}kÃt]*{ÍvÛM*w¼[Øw?•}2¨`åÇÕW¹”bÓ³)Þé¶÷È›ò’„•G̾ÞãÚ¼³Yð£é^#û#8kIâib)Æß^:ŒÕëØýÛC¸V7ˆ|65ão*]y¢wíÜ ž£2M­ é4¥vxÖ§¶ûA*úÜÆ¦‚Khìs ì9vÿJ—NÕ.m5 èÙ bª¤Ÿ˜c Ž„{×3v¢9÷ÆÛQ» ÁÅìÎå$½ä[%Kn棒p3íU„ø\nÍ@í$¯òŒÓ4FÉ©Rú#»øun×õÄàe ‡i?í1ÿkÙHù˜ŽÇúW ð¿JK? yò'ï.%2{¨Wtc§B+x­»°SÀ½KÓŽõ \ÊÙþRŽO'òª$CX0G“ºEæÒ@09é]ªó u(@!†=é¡$Ú[Ï)%Is÷jÛxoT¸8G\àWm¬è–º?Š/m-”,I1(=ˆ†kNÁ;° mÅr×®á+#»…ŒãyM¿„ï#±tDGšQƒ¸ž+ãM»¶" £a6â1ŽMzå³í“ »¶óŒU-VÎ+в\Ä¡ÜÜ΢‡»4ž/DyUæ™yläUà ðsOÒîe²˜6GÍÆÓÆkªÔ´ô¼EPåTvï\ðÒŸûJ;XɘsíÞµXÍYœõ(Jœ“‰¬&Õ »ÏåºÄ9$õ­].òê;5¦gCÙ±ƒ[±ZZ6˜,_nЛJõÎZi¿e»Å¿+“jçç‹Gj§5mMûIÅÖ~LUMVÔy{€û£5¡k …rG=ê‡ :Qkr¥,Ì]*ÛͲ¹eŒ4›¸$ãWS2G$I‘º½E#b+ pX£ÊÉùzóVeMŠªß)-¹¹5GyQ¢pZݳ%ôÓŽÅ…t~Ð/®|;q©Â­ã”†ù¸'éSaÏâR>Ñy)ÆãÑucô¯m´Ð-4oC¤Z& Hü¾z¶z“îy5ßF\ÉF.šShñP§Ó4l=®‡VðÍî™#ð&ˆ67FrÝ;ŽÕ,Ä¡¤†TSкó½™ÀÓEmžôÔÓ¸aAÔHV´ PqÞŒÒ` ¹èjR§‘SJpF s”PG¥I Þj曥]ê×kke K)ç ¦ª$à õ߇š éV^Ý…ŠkŒW8!GøÕ.ìim©ü9ñsi¯<`ËírÏa%“½µÔR[̤¨W5õj2>6²·Ðæ©êz&Ÿ«Ãå_[G*ö,¼¯Ðö¤icæÝ/HÝ»,å ƒÈ9õª÷ö7VrBÃÌó‘¼cÚ½ƒSðÓËͦ“$'“ñíëY¶vë`®1Á¹çQÁêvÓ£ ‘ќΟ¡Ý_éªÞB¤ççRèpIíùbºÝ'HšÆÛ—-q0àmÈE€~u§b–I@Éí\uk6vS¡lV[dšGFzTWzÛ_Å.ΈIoýMm!óûKé‹©ç5ÎäŽFâÊiu?<ª_žsÇZ‹Rˆ}¡õŠÚÆ>õ‹¨¾ëœÐWU)9IX„£M•‘>lš©wÿ-?Ý?ʯ¨õª7ƒ‰?Ü?Ê»c¹ä–tð²ÇÐ*¹¢j7zl%™Ù+¦ÍØÉÛòªºxÙà×Ê®Û(Çgô©ž†ÐEKý-Véî®Ì’ÎFfcœÖd~¹ˆI"*zd‘]ŠF»rÜ(è´Õx¦ŸÊoÎ0+>g±¼"÷Hæíü:Þ`ó™[½ëdØâ5åTQ…EíWÖ-ƒ=Í&_^þ´® Üâ|`žE­´JNÖrXýÿ^¹í>š@Ãc9ïšíM9’9H,Àšê„ÓGJN,®+AÿSqþôú®|ßÐÔÜsÝ?ô1TÌгÈJëþºñ°sPÝ«Eys3)(e cš ²0;YÛþŠD5¨æ©ô÷¹‰%ŠÞR‰(ÚëØzª±_JÁVЂx˜rk¸ƒÁ“Å¢†R?´×çaŸ”ñŸýZ™¦Ö†Ô,®Ì«{PÖV²H¥°›[è kOö{[LB qXVWw'ýS~G;qOºšâbX°dazW„ºžÂšµÑAÉ—V “Áêöä&&Î7BÇ®yB|òŽŸ(çë^¿ ñ+‰= QÿŽ×UqWîrž-ýî/÷ƒy˜°5ÇÛ¨tOjô+Åi³DÃ;£+¨Åy¦wn©²V(ûŒRª´Ð(I)Y~‘y'Ù¸U(sÞ£ÔíHŒ>Þ3ŠÆ:ÄöcÊ´‹$Œ™ÏÔAuq¨Áæ+³2¶Ö,qƒô¬”[GD¦”´qh<¢ËœÕ‹`5Š;môëS^@ð›ØËŸ¥P´+€9! ؤ›µ¤¤¤Að ‚>±}rÁI·‡jz’3ùÖ½a>{xϰ5ã¾ Ö£´ñ C+‚æ3æ8ÁÎTŸåø×¬Z]Á卯Øà€à×E?„à­ñ»óƒô4±žôâ‡[#ëUn2G9\V†g1ãÏ Ë¯X¥ÕœJ÷vÎILàÈ„r3ê1‘ø×žÇà½~òAZ5Ä^¯>GâkÜsû–÷8©S ¤Ò{—¸«#Äõ‡Z†‘¥-úÊ—aFfH”/ßý¡\æ™dú–­k`œäO·sùf¾d³Ù«—µðE¥—‹ãÕ­¶¤ù p®xÈô'ŠJF•Ž‚ÂÕ-,ãhÇÐcúUÍØ‘×èi%Àt´Ó%;fýW™£äg$òÄR&ON¨ L§wÉŽjÒôÇA@… UK§(˜Nñš·ÅW¸EÚÎÌF_Jbd£ý‘Ûñ88]‚«ËÎïáÿ‡†›¥ý¾â<]ÝÇ=Q;ë]{ŒžÔøÓjç$/<ð®ØG•Y\ääÛeVµ·IþÑ$qùäcvì{ž´3)Ú¸÷\ÿ:xEäªdÿyŽh(}ò« ȾÐô½@³\éöîç«„Úß˜æ¹ _À@+K¥ÈÇù6Oà¡üëÐÊñÍFè 5&&“<"â m¥1Ê…N#5⽃ćW·gTiQÇmþÙõô5å:–.Ÿ.$)#Ž úéNÝŒ¥Šyæ€äsQ–£'Ö‘?“ëMi1¹²@íëQKp‘ð9j¬ò4½O•&©7"óK-µ½´XE@7÷bOSY¦òbÖÈ~¬j¸¥8 hѶË){qù'‘>ŽElXø·^ÓÛ0j—Gð»î‘¬$ ×½JÒ˜“£üU¸VXõ{U™:aùX{ã¡ý+zëPðî¶Ÿh±Ômã¹ÆJHÛ {׎*Š•TÓŸz™AIY•¸;£Óägäulqò¶j)§Ûœ×Ÿ&TðHúVÝŽ¾ÑÁö[ô70¸û±$CÜ{Ò¸åƒofzÇ.¨èc¸Ú £’ãrž{Õo,µ »·“ζ-·x\>Œ;çT®.Ö59<×3¢âìÑÓí£%tX¸˜G$ûÖeöŸskäÏp~Ð7(ÎN*¤ó½×_¹üéÊ$l“Ž™5ÕJ“ާ›ˆ¯{¨ j•ØÏ™þéþU|gÕ;®²¸•t#ˆ±`?ПOåSÙ±K‡9nž•^Ô•ÒÔà…È?ðU¬5söÈÖà),¸ j'¹Ñ¥Î­#%OjªY,EsÏçS%ÀdÎÇÅÊÅ_ Ô¸"²jV¹Ú¹.A¯3åGÏã\ƶíq©¼‹ÔU 9úÖî±ržY äšçù'=ë« K™]œ8Ùò¾TP½ ÿª¹ÿ€èB³Ú“¨ÃzŠÑÑÐD·(Ì2Uqïó é7qFI’Ëq*j7(€$=*G’B£21üj½Ö?µ.±Çï Lÿuk šÞ³7Z·˜A"Ý ŸA^•†HUÚ\猎:à<_í·m0!ç¾z:ícº@ÀÚ˜ùÔõõV6§±‹­xmïgûmºF%݉œ úÖ¡c¨Cm"˜#bP̨Ùb=Ez»y»PÿŽTxỌ>FõùX0j\"÷7I%cÊ ¸EUà“´ ö€ëŠŒŽo_jóýGÃ_b¾ŠäEºØHz àg8a[SÆJð¾Wyeeä ¬:Žéj\¸\Û¸þb˜Ps\.­höº¾£nFòIPFànë¹µ``R:çñâ³ï4VÔm®-ÔˆåŠMбèr:j©-43Vº¹ ÙZ’¬d-…àäô¤¶K1{Ã×vqUέy‹ !Xe…Žíߛr<èUÑú1Aúz×"„¯©ßí#dÑo\¼If ÊY,ûS5»9jc,‚5?Z¸ÆÆSÍ5“îŸj¥#4æ"S'#o« D°g“W r»Ô‡4nzoÿ]LãGÔ%3»­äsó u\÷ã¥w—w©³½w€£>µóÝäúmô–Ä  pëߑں­[âëÖ-§Egq0Ic•+žp;fº%lqÜö§r€!#+ÉúÔ–ó,ŠqÔé_?ÙøãY²1ƒ©É$i’E ‘é“[ÇãÛɾ›Œ4Ýï‘P žÕÁÒPrá7?õ©A-Œ#ýˆKùšË‰ž%½sêò¡`pLã@s#è‡`Å>†ªê2\Gh’[A纷1î Hö'Jò…þ-Ô.õ»‹ Nækp¡Ñæ±Fð3ê?•zùæ(w!IùNT®ååOU5“©xÓHÓ$hšf¸x1Áιè)es<5WËÜѤ²;D¡pýOÞ´PEÁCƒééX0H1þÑNz„\’iÞ\­™¤y~‡§å\S‚HôŸ7Qš³™Ëxk˜¹ÿZ¨=kSQ½ò÷)a“TRHžòq€ȧ©­iFËS Ò»±NÚ)ÞâaåFÒ>=ÿ®­E!d%¥Î=Mv^п³ôÙn¯‹•Ë+º½—ñ¨Oƒ-®f ³BÎx@ ×d šGªÓg$.@éOóB€;שéÿ ´ëtV¾¼¸š@2áUÔÝsá¼Ð¬ú(Ì‹††F$?¸'¡ý*U2•cÍ`˸8ãµzßÃ]+˲ŸPuù¦mˆÙ_å^]•ÏöšéþS%É“ÊØFlâ¾…Òl#Ó´Û{X†$ ? ˆÅóêUi¥‘qˆ Œã?Ê«…26öº¾Õ#ì{¯JãŽç­tƒHç¥4­< R8¦v¨›eÔbª¸Á ‘ùW/â= ÷Êê<›’R?‚NŠÿÐþÔg:†êÙ/-e·“…‘J’;{ÓAcÂoìå°»’Þa†S¯¸ªµèšÖŒÚ¾œ²à è3ñÕ—‚?¯ã^{"4r28*ÊpAíLÂQ±Äæž3LUǽJ«íHØU©Urr rjeAÜÐ0T AÒéRŽè qSÛÁ$ò$q£;±ÂªŒ’}¨ ª2M{g¼!‡cÝÔAµ—q-ÿ,ì=ýj’Òì{ß šh–ç[wˆE¼gæÿßA]í—†´]>*ÛN¶UÚ0Ì~¤ÖÆ1ÞŒT¹62“éÖRFñµ´!$pÃßçž.øxVÞKÍ1e6¤ç?îŸ_c^ TÒ£e:T4žãM­›£NŠFàƒÚ¬ªñ]ï|+åHúÝŒcË<Ü¢ö?ßÿθ@)½Ä5Fãï¿û¤~•|ÕGM÷}A¥ aPº#ÿ<Ïþ‚k?ÃVÚš¥È&ÞÂy“¿ÌÔÖ’ý€íØÆßÈÕo‡×qXßêÉp‘ìé‚—èÿ j^ìÞ/ݱ±i3Én“EÎGÌÁ«°Î’ñ­ÜÕ•e¯i63;ý®ÒMË‚ <^•UüE§¶wËnäÌ*•fà÷¨ÙÝTc ŸJÆ»˜,lî ¨äŸJµÝ1†ö;gq#ñÅP½Ô4븼£©ª¦s€„æœ!®£•Em ëFW˜Ý£\çå8<{Õvv¶eEâLçÜöüªÂ %%W:ˆp¤6<³ƒUæûJ]5mÇ$²æ»ù©ròØå÷ù®hY\´Ž‚&tŽÕÇ¿¡&·), xcÔ»sïOŠímâo:Hñä¼1ßüñYž_$‘œúšää‰ÖëÎÛ{éd$°ÓÚ£ÉþE/—ì?:_,çiòèŒdùµb&Û»pÓ½4K7 Œj@ž˜¤hLþ•\Ì›"3$Ò9f”–<’[­!i«;äóSÿÚ4«,Xð*l2þ‰«]hwñÏÌN˜‡£®zuÜÖá lÆÇƒÝsÓð¯1½»†ÛPŠ!‘mâþ=s]‚/¯'¼š×(èÉ‚>™ ¸>‡oku%„‚NèÝ9ÎÚ“S´wj´oœ›ï ©= vÜ·y?tÔÚ|ï Ÿc™¶îûžþÔ\‚ÒåÔæ\á½jKuƒc”#$  >´— Fv‘ÐñN³e ã¿æ€DÑÀ°«íbú)=*5WtÎÛcXËÈOðÖ£c¾ÁË'Íõª>,™´ß‚ß,Ú¤¢5ÄKó1üNÚ-pnÈäüK¯AªÞÅ-¥·”ðñç¼ãÐJ¡lï?Ï4àÐVa&º¿ ÜøjDKbÁìÄ-˹ÚÙìÜñü©U•ÐR¨ïf`ܺ³b N(´E=ûÖž·¢X{q¸Àßµ÷§w¢ác¿ø{{l̼Ãq‘?ÂXeOóôBŸ”×É6—2E6%µ`÷ë¹\×ÔZ«¯£Z_!OoÇÒ{§ÄLCao¥£|÷yŽ?Ø^Ÿ©ý+Îä“˃jŽO©ã‹×¼ñ¥àÜ6Á¶Áãdþ¦²Ê–Ló\õ_½cÑÃÆÐ¹I•ŠOZ4DY|Gd‹ó&Húin²±‘œT:üZoˆ ºÄE› Ôœ?T5ÐʵÏ[ÓÕbŠLýì‚i¾ ÒcÔôÝ™Úêw#ÿt× ¨xÎúâû6LÖЀ G€Å¿¥vúMÞ¥¨XfþÒ;dÆ'{{ã°®‡ nr)k¡Äµûhn!½µ1ÌA+òä0õuRçÄ3Þ¡[hˆ Ææà ëüS£›ý=. ÿ»pJ´U?Zó5žt”Æ–ì²1ÆÀ§9úV ›¼N¸â´÷™§PÄ|û–RG%›úUý 6×¼A#&ÆÐùžŽÃîÏŸ ¨´¯ꚣ‰¯ËYÛuùÇÎ~‹Ûñ¯AÓtû]:ÜAiŠ$÷$÷>§üjãEGW¹LC’劲1|su%ž‡A$±É<Ár‡ç5µðÛ@»tZÖ¡u<†lýšl…^›Ï¹ííVD·×qmuøw«œÿ_ë]ìQ$P¤q*¢Gòª¨À°ÅhÚjÇ=ˆæq#êïÆaÜý;TÎÑÃyUe‰<PYÆ^Y.X|Ò¶=‘x™Éük?ĺDº½—“É…‡ðç哨Ò*)7©Çèª5¯ˆO¨ÌAŽy#ÊüØ'j~™¯Kžp–ÎPì$dz ×—é³¥x¦ÑÈ Ò±GÈòÁù³úW¦“ºLuMgÛwFµ’OÝz fâKhdÎCF­ŸÀëNsf ·„YBð#ˆÌÿ çô4|;žkC`)i;é@°â«H*ÓUy4`pqÛÒ¡â›'p `bÜÅåk®>IãY‡ûÃåoý–¹ø{ÏV½¶_Þ¨ùÔ¼=~µÜjjå„÷¼\ÿ5¨¥‹ äQq5sæ\†¬*ö¦(© ãõ cÔ`sRÓ@dŠpÇJpô*)5ÊœõÚx ÂMâ Cθ , Ⱦ{(þµIÐü7ðp”®·(§6ѰûÇûÇØv¯Q?+æ•#HcHãUDP*ŒjùA©nã°þOJ;`Ч#9¥ëÚ¤aÖzÓš­, "2€á†Vû¬;æ¼cÅzö®R0E¬ùxsü>«ø"+ÛXÛ?βuý×_ÓµÊá‡Í |Ñ·¯ÿZ“%«£Â©–Ñùº¬)×sVuM;SÒµ9¬f°vx²(W^Ì3Ú«X=õ¦¯ow&™#EÙD©“Æ…¹™8„Ÿ Ûœa¥Š@>¼Šáá·žÚYRVh5 žüŒ`zç5è&\xnÒÕâhç¶I7’A ¸äb¹­Pï‰nZWÊñÏOþ½CzèmÓb±‘Ý/$t$ap£Ô“Uîš¹cnbíšKˆü«‰ш¨ëN„[Q†ã4ò);f€Ž)?Jq-´açþâüÍôe#d‰"¾ßSÿÖ§ˆÇBhŒ—,íÕŽjPâŒÆOåKäzš”~”õ€!è9É¥0'¿çRãÞŒ:æ€"òSÐþtÈfŠÞðHà”\í×µ>WÚ„Ž½+>fÀãé@ˆÌ²¼Œ~f$šØðîªÚF¯Ðå3²Aꦱ€â¤Œ€qž´ ß# JÒeHÎsŠã¼GªÈ&† w1„>gË×Ú—Ãz¬—ºpµ”³>SþïjÌ{½Jw»2Ô’ªA$ƒô¤ô-·m 8å.2±®Ð ÇsžƒÚ¹ëÛë½Jíe¸™ŽKÈÙ5É/™¶m*¾í‘ìzçÅÍÐ"é–òê#nWlÇ>äò*ñK¹¾×{=Ë"ÆÓHÒN‹’N·4›ry§çé]1ŒYŸ{¸íÁª‚µ¦‡ÌVQÜf²zg5Z€¢ƒH>´½ª(ëÖ–›J -YehIÿZ»GûÝGê?Zö_„º¹ºÐn4æcºÕò£<íoþ¾kÄÙ]X09Þ»?ë-£ø”L¤­½ÜxoNy®E åÝEÌž#ÔxûCÿ:ºŠ6 ÇI¾Ñ}q1É+7¯S[P¨( qÕw™ëÐ^á›ÉÚ:V>˦' àÖýîãéXÓ[˜Ä,ÊCM“>Äœ~‚·Ã«ÈåÅ;#©ð>–·úÓ]KÌVŠž›ÏÝþ§ð¯L¡É÷ÈxžuC™|óçÿìþ•Õ,‡$1Ñ7vq-‡ºƒG¦jÕv#O'Ö¦ó†ûT)c´çÛš”0’@ ü‹É÷>”¡6¢©Áv9jc~òåb_¸Ÿ3{ŸJÒÓíîç~10ã¯=(z¯¤Y›t,ãUzzVÔcÓB ÇŽµ"—ÜR;Qˆ"\cjãÖåÇ»f¥EØìàò*”JˆïlTÖà “ÜQ²üì½³Vcl³@ÚçÒ[8Á1«'ûC¡üŽ?:³ÈÜx-ÏÐTw$¯¹‰²¤õÿΟÌ¿JN£ŒšZw§v¦ W“†ÅX¨.˻Ҁ(ÊÛeQØœFݵÙýüèÌ*ÉNÔ—©ºÈž×+ú« •Ó5û†Ô,m2™OÑTÿR*áZ`|¬Š™@#­DzŠvßC@`íëNCÇÒ˜¯ØÒýÓœÐÿ}x¯ ¼f,<)§Å· Ñù¯ÇRÜÿ,WYÄfºŠ%ä»?úZ o²ÚÁË(Õ¾Oá.6 àSå1O\8àÓf1ËÓ¥< ô¨ýª@GBhÃë@Í §gÖ€ƒC4|¾Ô»Ž´ÏøƒÃVÚÜq»e'ˆ“~ ûW&Ú¤nÑËYá†ã^–PãYz–•ð•:ð¨>Æ¥¡XòoÙÃc.ÝѳIäW'ûF£n÷ ¸å¿æzWŽ-å·+˵„ î¸5äsÈ^ƒ‚=ªc£Ô[•5™Dú¤³€˜ã銠Ehjq¨1²ŽEPÅhõ¬4ô¤¥4†€V¢]°Ž>iÿ×þU®ç ;œUÈÆOuFÁt©GO¼)óÅHªàÐ1àgÓÂÞ‘WÖ¥/¦)¬qÓ4ì•Ï4ÓÇ$ûÐi<öüjŒÅZ@8œžõffà’}ê˜É$žô8SiãÒ€6t é,ïУ.%Â2“€}3ø×°iÖ1Ûéöñ4q3¢X/¼*&Ãc8ÏCï^Ëá Pjš$eïcùð©×c}!ˆË4ÿ¾k_C±IïãmƒdgqãŒö¬À0¥˜€$žÕÓxRöËPÒb¸³•dLØë»¸>‡úT«½F K'^rMpÉáæî6?ˆaýEzPÏA\§,þßà­R2Éš¿U ÿ jã¸ÞÇχËô¤È=é² 0ž•Ñr ðÛM+ƒMV*s̨֗"Æ=#i]QAfc€sO1²GYN#¡¦Au%µÔW$‰Ã¡# sÒ–[‡šY%p7;8ú :€Ã±¬›¤Ù;ÇšÓy>QÅWž<2Ì¿òÀaþÉ8þd~u3ØHÎ¥íëE+…ÑÞƒÁ <¹ Ïö5ÚÄ4/ëØò?P:¤Õ5›1ˆôü{~ P#ªÒO˜ªÝÛœ×[o-sÅqþa"²±šì¢‚âëe­ªìv× M%©ìPw¦™…ª© …囀=ÍOâ­;ì7¶‘+©U³?ï‘·úV¥×‡'ÒõH$½|¼ %1m8>œýj·‰R]Jh®vìòÓ`A“ß9ýk£R1z³› OX­ žÕ?³µcjÿê®ðœü'ú~5éPÊ>ÐÜ|§óäÚ]¾uË4‘ö2üÃØæ½Aä÷†l ÆOGãí[Ô”y¬rFœœocL€ ’qíU^o&&a÷ØíZ_>2Ÿ1 Õ‰¼Ë¨ÕOȼŠ,г¼½ˆ7JíÇIþ•ØéÖ"ÒÉbÎ[;‰õ5SEÓ P¬Ò¯ïpðŠÜTr1KpN#4ïGë@pHèjÇšjBØÀ= ‡ M ?z=ÅOúÂ?Ù¨üÑŸ­NŸëà4À®ò¨¸ Àr==?•K 9®Q½{_-¬P4‚éWÌpÕŽÍôϨss˜à_& 1æ?R}@¤BûM C÷“"ŸvÅ6+ëYÝR)ÕÙ†FÞôßìëG‘áV,rwr?/ƧKhc9ŽSê bQÈ7!Õ1Ô/B8/›,ÿ9ü©Ú…õ¶™c-ÝÔ‚8£“H„-Ó䀪Yä+˵óW…o—Oñ>-Ób$K7 Í}—L¡£ue<‚œ¶&_‘±Øþ”ö\Ô!ÿǤGÏÈOÐúŠÌ`½iÀ~´Þšx9s@\Niƒ§ZPr8¦ð èØjÒŠ@&Ñî) }ãOç4c#šÂ×´ ]rÁ­® »]z¡>Ÿá_;øÃ·¾Ö¦µ¹‰Ì`*m„,«Ž£ú×Ó7—ÖÖi™åU>Iü+×u½;R´’ÎçKk‹vÎC°{CYJq‹Ü¸Ò”µHùçQŒ}›x^Œ+&»Ïh–ÖÐÿĹæ’9r¢W÷ˆÝ†G cXRøvÒÊàÚjZí­¥âñ$"%î³(Æ}@Î*âîDâÓÔçÈ !f :šß›Âz‰®4æ¶Õm×–“O—Í*?Úï¯â+ ©!ä0;}ÆjˆŠ€„±nì~•mWjã €µZŠ"§iʸì)zw¥È¤¾¢”y¤ž3Lót¨§l.=jp¤ ô5Zl9 Å (ÜÄŒš‹qZ6z¼Úlò4ZI‘·÷öë(ü7ŠÐ#·¸8ÔP<X:’OVv*0kÝFSh¸ùISíU%ÐÝaÉçŠë!³˜¯ g4“ÆBÌĽI4–&iè ¹Èßh²Úºq,§™˜ÁaÓv ‚Ò¨´¨ùþÛ`»Ñ¬Ù*d˜©öÊÿ\Õ&µVèt,D–ç7ÕØã˜”ëY– ŸzîŽDh¤_UaÓƒøWM6–’P¡.›)g@y'ÐVŸXŒ´hÊXiGc“ÚsƒÖ—ªÕìB9ÃÆŒ±H2›‡Z­U{œïGa„SMKÔ}i1Æ(û¢AÇҟÐÓ¦I Ï·X@QnPXàF˜5ÞÛ]¼j}«’Ëå}þSøÿ*òËY`ß–ßî\{ÿõÇë]ÔwaE½äd“"ñS\˜ˆ]Üô0•=ÞS£žmNÿPO>_29ß`ð:c¥^šÍ¤„'Û Òj6qÄ÷2‰¸~(R?ýuvm.æ9Q¾ßrHˆ,þX®9_©Û#6êmÛ÷Ñ’ªÿ+Ž úÖ“êIgä]4Dee_¼¾†¢še‘ÞðHùXqùÕi 6©¶1òÞŸJ¥&÷cp] ;-MN ÷°$‹ÎáïïYú¶³5µÚÅe.Ùò¸pb\M$¹9ßÒ²MÕÃÌì]·“óÔšî§7ËcÍ«M)ß¡ížñ眉o¬(Gè.#÷‡o¨¯@ÒXÕѕцU”ä_.ÛêpÂV>Çšíü3ã»­0…r $üѱùOÓÐФ㾤J—Â{Y~•É´p3øÖn“â];[‡6³.2бÃñâ«kúõ¾‹fÓÈCHß,Qçï·§øÖ©§©+½‹ÏæÊÙ 9ÔÛƒúŠó¯ë† öa¼ ÆA_qÍW±ñÖ¡¬63K·–6µÔ€»¸Ï¿þuÚ;¯5¹êŒÀ4`:÷©Õ±2óü5æÒk±ÜF°ý»í·©–Ó€=ë¨oilËw©Âî±…fS»qdÓ„ù¶&¥.N·eýRض¯ar»‰=qŒÖµ"^q—ÿt Êi§elü‘Ÿë\6·ñ]Ôdhm”XZž‰²ì=Ûü1VÚêÉ9IžÍs¬é– ²êþÞÂÒ þUñ>ˆqJÛžŸ7ÿZ¼ å—çrK¤œÕ•fÙƒÀÏ*öz#®84Ö¬÷5×t™>î¥hí¨©„ñOødIÕúWƒù¤YßÚz…¥ô_Ù×2ÃpÎLMƒ’};Ókô"¦A]3ÞU7êN­Êɼגx¯M:N»qÓå±ßÿd׬éÞw™ÚX4 ®ØÆãÁÿç>$iÂ]*-E/ØÿîŸþ½UUuq`êrÎÝÏ%“h9)Ôô§Ë(u9­TópÛN:×.çªÌ1ǽ(Å àRƒê+Ñ>|và9#ëKOÑž½©A`9¦˜ 9º¿ xÖÿò¬2“ubxh˜ô÷†¹ÍŽEHŠéM+QƒWÓb¾´Þöòp7 GQW‡*<õ¾uÒÑoÓñZMv+FzXpÀ©ûãµ*ž:óYöz…¦¥n.lîb•âHÎGÐŽ£ñ« 0݃Œô5 \ZwlЉ[šx4ñõ§v¨ùéUu RÛL‡tÍó7ÜA÷›üúÒm%v 6ì‹­"Æ›‚ îkóW. [| ÿþq¬I{&鲎‚£7*HÁ®¸–Ý¢wRÃ[Y 2ff$±êIÉ5™sj V‘•OSL À®]õ;‡1u` gnäæ%ð½‚ê vmgÉo*VmŒÞ¬$g¶y¯H{q&r0jœ¶ Z´…YCbgJ578;k¿Ùɵ×Iš~X¾Æ©°²È/àhñ¶¥c'—e“J¡vÝD$’#ýä˜aÑÁÇ­uòéá[*³Œu­¾³#ƒ‰ä¯¢ÝÆ~xXQÍV–ÔÆ0ASïšõ©l”žTV}Æ™ä4jG¸ªX®èÎXÌòÿ,çÿZrÆäà1ü븹ðý©B?»ÅfÉᨷnBÃñ­£ˆƒ0–¢9á £œšvÉðy?J×oÖb>”‡A~@”Œ{ÕûX™û)ö1ËJ[¯z¯&ùj#31ÀU5»ÿüêre%Iì+ Ð´[[g€^R0Ì{ Rª’º(ÊNÇ'cá-Nñ˜Ö=­µ™Ï¥kÅðúë87KŽïåœ ô;{h@’qÛµjÃt`£=…r|Oj ò‘Õ¤þµ{«Üß°2±Xsü …jí‚¶×L”1*£Þž¶.œí;O?J\òe*p[#mn S ©xr oý—jîçZcÄ\š5‘‘ HÎ1SȘLVšÍ‰ÊöíQI —¹HÎg+dôâ­x#M][Å©,Ç0Z~ô¨,ßÂ?:¡~ÂSž§¥z_½ì~{é]¹<ÿtp+¢Š»8q’´lvvñ–s+§¢¯qõ÷¤Ô-PÓî,åI­NÊPäRoÁ®¶®¬pE´î|ï¨Y\ÙÞOm"ñ¹R>•AâvÆ1^£ñ#@ù—ZµRag Øöjó…ŠG<ú×Ó‹=ºsU ¤ŽdtÉ¥ÜZ\Ž¢œq]ç„H1Œæ— T9+ÈéO6y¦"Pà÷¡HÉ>ŸÎ¢É¯AG#åÀ¤2SƒÍ4‚9ЭIøÓ ,µ+»„¶×Âã¼lA®¿Hø‹ªZH‹zßk‡<ïáÀö5ÄSC»jŸþµséMZ´Õm{i–Daøcèk]<ç¥|Ñ ë:Ž‘¨Ätâï,Œˆ‰=AJ÷Ý7Wûn˜·DâFFã7¡¤×T4Ë·º“E/ÙmBÉtFã¼ü‘/÷Ÿú§õ¬Wâøý¦+ù>ÚWæ’S•ÃøGÓõ­»hbXÉØî‘yf>¿ç¥NsÈSô &¬ÊŒœ]Ñæ—y¦Iå_Dcɸ9Gúž+õ#†ë^ƒsµÅ¬‘\GÛ‘ó‰Ûø×‘x†çFÓµ0š5ëÝ!'ÌE’/£÷ús\u0ÿÊwRÅô™Ó­Ùã‘VèW'g¨,ÑåXWÒäŒ×+‹NÌîVjèèÖPÜgšl™Ç^µ“ ï©«itXÔUrÝ™.wðj&ˆw§‡ïD“§LóPÕŠ(Πqƪº1×½[ƒäƒU•OSRÑH§4;¸Çê¬`SÒµLløM hAäÒ½‹²f Cܯ¿N´‘Y³“k^Kp¥†9¢!É ÷@çžõ¢›3pL«–@HN•ÐÙèñ$ŠÛ@ܹj奛Ås¹?ÚQ¹û±[Ž?SÇ/ˆw%ÿ˜P-ÔùV¿WˆúÌ._…þÍ­Å0†7‘Á¢›­ß’xÞºHõ;[yA˜éV¿î\)?úr.÷Û„ ü€å1×ñª% ¦C»¾O5ÏS.öÎòÐÊ®"+Xôž Óeb‚óOlö3.1ÿ|Ö{>”—O„`Ö Ë×,í¸c“WìíDKØ^èWp>ø5è*4›÷t9ùêÅk©KT¸ºEŠX®ÊHCòåÃ8'$×?K–) f$·ÎûÛ'߯jí;-À-¹ãæ‡ÿ¯Uå±ÓØåíl¿ï§Oäkxaaº’f3ÄÏíE£Œ´Ôåûm¼nŠŠ·Û tü+;V6ó:Múæy|å>»Îâé^ƒý¥3£‹ v%†H¼oê9ª³èÖˆÿ&‚%ùŽ|»¢1Íoõfº£­'öY曎š×Ñ,„×-æ#ù~VS‚ vgE°s†Ð5IãtS†þu4±aòN,ñóÛ+ø†©xiô)c`Ÿ¼™Ì½ª9c1ȼoé—B4‰hFÉ$cœWy‚RHЦ¥vƒ9æÐƒüê…ßðì]µi[ŒÚ1#õ¬þ¯=¾±©Æ¾5úÅ*IpíÆé{Ö<öƒs ÿp“Ò½x…“T¹ÀãÔÿL< eŒÝCëö1ý ­a§ØÊX¸£Îm­àfA& bá°¬vZ»•Œó¤Mª7—RsÏÓÒ»Vð=Šœ›÷úZ¨ÿÙª#à3×RúùQëGÕfÆ@ç¤Ð’Öy¦´Ô"‹b9Û9R1ÝIõÇ*“¤bÞÌñ ŽˆÔùœ³dôñ®ªOé*xU|v!ýiËá!BŸ°j¡—¤sÇëOê³ò.¦6XÆÆ/ˆlÛFŽÛlú’´»·-ÚÏÚªišmæ®$wª¤ŽŒÃŒu?µÐÜøOJ`k«óÿ]n£?¯5^Òã öq,ŒHkÃŽ?Ý<#[µ÷’±‰½"³{ÿ ê2A­yRå7…ÆÞIÁï]]¶©k©Û« Do"†ø8ÿ9®/QÒ¦šáVy#…#¢&@ù’}j’hEˆ¥rzðO¸18xshÏG Šššº=6ÆÚ1éïm9ü*Ä©a†Á…Ïzà­´mmvù:ÂÀÄ„b§!AíÆå§Ì•qªZîzXÓág²é·ÒØÁ9|1Œ#£ G’F}p+ñ A.²ì¨@TîR§×¦MQðÄzÔ:#‡’ÚY ­‚êÃåÀÈùyëYZÿöŠë3ù@jd`õÇ8ö®—ìô9©M*º—KÅ‚ÀÆ¥°*íe?/¸®X¶ªÁ'¡&ªÖ‚« Áãæ5ΠÎÇV'j/­b‘AŒÇÓš™õX035à õ˜¼1ï_¥7íZ¶Ì˜zïÿëTòÈ¥:os¸:ÄyʨÆ;T ¬R1Æ8â¸Å¼ÔÂ`Û)ÿR¶£¨Œ²dž¿5³=3°Þf2 J¾VÀÀ€~½ë„“RÔwqnG¯4õÕu%\ˆ8õ§É!{Z}ÎÒGÚ;t¬»‰C>ÞýëVýãÃÄ rê3´»RÒY¦ ?¥ ¾ÁíamÂxeÔõkkT’òÖ½öÆÌiö0ZÅ÷"@ƒð®À>ºŽñµ½NÙ¡“nÛx\|Ã=XŽÕèù t®ºQ²<Êõ9çq»Ž0E4¨#"¤Èô¤È­L “ÁÄ[Îâ‘J²žà׌ëú º­-±æ#óDÿÞZöò®Åú2꺥7àÉî}EcZÊèêÂÖä—+ÙŸ2ŒŒƒNV1Ã`Ó×fVç)>sÜRr‡84Á#te¤ Øàñ@o$ä~õ,:àÔJzÏ"€þTnÇ„#zÔlwŠcž÷kž2i+Ú‘ð³qŠÙðÅŽ®¬nîÁ؈Uùÿ[5èvž1¶loìÒã«sœ~\WšXÃæ4qƒËžqï]f©áM>ÎÚÎéànlH$äzÿ%.ŒÍ÷;M;\ÔÖ7o·ØÌÒ¾ö o…L6:Ñ]OS—ïÞ@ƒþ˜ÛÿV&¸çð‰*¬¶myfX ‚ükœ‘õû+Ùílµ1û‰ >NqÜþm.Ä©·Ôô-KDY»Ô/dÿe¥ùïž•/ÃèÜ~æûè+žÄ~4±ÿ[igxƒ¼l?­]ƒâeÔ_ø~î¯jû­¦‰ý³ŒÒIk¨ié›ëWç å1Ò¯ÙüRðäçlÒÍlÞ’Æ¥t6^+ЯÆ!Õ-_pû¥À'ð5ŒèFgE,Dém±È,ûƒß5~Òè«m,1õ­Û¿ 麀2ÚKöwnI‡ ‡þþZÓÁLûíKrùçêka%¡×õ¸=YZâö4R•Z9Lœ’õ&º£áU_2—£h> Óú²ÊÚùª^ccØåšæÑÏq¾4êYƒ„ÞçÙI® ø25º’/Å1Q·„î×îˆ›èØ¨xwصŒG4ú±ZL߆?Tš÷P“ˆíBÎYÿº¶ðíúøöÝþëUäѯPse7à™©ö6û%ÜT!Cœ~u£€mÓµ ;¤¯{–?±¬œnòÀ'ºñU¥ÒcŒ’’6ûU|\ª®DÌ%<’*W:å{™ÇN ÜO(™¢ñRÎßz)' w {9üªãÞ›v‘5»'™‚y<ž}«zMó®g¡œÔy_*9]Röx¸ž›&á’°ù™]ÀV+jR³•߸s‚þœWS}2LáRÖÞ0£Œr3Tü®¬²xë^üjaã…6xÍU”µbÚé-5Ì~u´g,77žå¶÷À Ö»Ý:ÏM±…RÕdQÿM Ïê+”·Ô$„ §;™2ZÕ²Öïæ¹ŒK$~^pBFë^eF¤ôGD´:Wky£¸*x#šÏŸKÓü©;p©ù¼¶nÕ¢’±\‡lgµfx‚âXt¹ Ë"žCy¬“WZ´í¹Âh:]Χ­¤8U`Ä/¦+Ñí¼#aÙÏä+…Òî^ÃQK˜¤†F 9äb¶.Œ>”ÝB#ý£rW XŒsZBÏ 2;óŠK‹e3»zœÖ‹MŒž¨ÇÌÁp$“ﵦÇ$—%YبRNMX6£gM„ †ãø(œ¥Ë¸B1æØ£|Ï䱞9ªBgq†'"µu$ (PÊ*‡’GJ˜JVÜ©¥} ²ä°#®1Á¦n—y¿ï£W~ÎðRý€àU©K¹›ŠfÏýãùÒÝrÙ­hÍ—ô¥-èGÒŽiwR‰¤ÜäÈã ç­[‰$!ˆ±ƒ·Sþ4áe—’MiØX©œ¸Ýò£ŠÎrink¤ìAöGºVGœ`c©¨VÁc‘·ÈÁz|½ëq,œÈ¹õ«réÑƹܤuÆœNn 3ωv)žç“Z¢Ý-cÄhZŠÌG)ÛÒ¤xFÒ2 g+·©¼ŠÐ¥ÁWkà‘úÔ¦Tc…?Ni¾G<‘Å:”L¬Iàýhö]AÖ²±Ýè’ØÅ¤Á€ï’Üq“É®[Ä‚×&(vÛHúmr;g “‚8¨¯´Û›•\DîÜdZ(˖ƨ£+˜4àœg­(´VÆ;æ¶bðåëø÷uúš²<1|x÷j^Éšýb=Nx؆n?NéïÒºTð¥×ñJ‹ùš|0ãî‚dÃë08ó§ãY?'h5Ü@¼´®ß)Ñí« õ$ÓTž.'lÐ@©NR2·ÑMvÍm Cä‰Ð £s$Q©g*õ< µ‡îÌž/²9g°™1…»q]GaŠ’ùLÈßgœ+ õëÞ¹M_X¶˜40ʉÀs]‚tÍTÁ —Ëö{HNèb+†àá°É¦é¨ëJ{èqÖŸ¸õ^94àõaT!çÒûÇó£hí'õ ”˜ ôr º7 p( N{zšW1œäŠp9ïK´dàTÐiwКœ0ÛŒsMéÍDCŽù¤ýáçŽ(`Øi˜,w7AÐSB¹8ȇŒ”#v@÷ÅtÞ–©CæÃ8Zôo"¶œp²+W—ør)fº·[eùÃr:W¨ëjÃ@`ãP0ÏEOR^ÅÍ9·i–§Ö1BÚÀÏ#˜c,Xä”4Ý+Ù6¾1Y—þ#‡MÔ$³6—3Ê|D Œ[¶º˜-͵†%ácAôP)ÃŽJç?á(»q˜¼?|ÃËp?•[²ÔïoíÌÑÃkÜW ÎßË“Oa´\ºÒtëÑ‹«i³×|@ŸÎ°nþørë;lÚݽ`Ó¥AâëZ]ݵµ´vR¼èÍ–Fqø×5¸À–k‹sÿM"8ý3] —|-z@‡\³Éìòm?­|ðú“òCìjðØ#÷SŸ£ ÑÌ»)õ]¾§cr3å¼ ÿr@jê¸#"¾K°ðÕì·~TW1¡ÚHnGJèãð¿,âIluWÚà Gvê#OB^‡Ò‡­)Tnª§ê3_,?Žüg£ÞKi.µv&…¶:»ÁüE^·ø¿ãqºþ)?ë¤ h´{Séf²´½m ú ¨›GÓ_ïXÛÿß¼ßã—‰¢8–ÞÂQêc+üiEñóSLyÚ5£ÿ»+-.UÜ.{QÐ4£ÿ.q¦E'ü#ºghú9¯+ãÀ º]ˆïå܈«q|{ÒIn‘z¿îÈþr\|Ç¢·…ôÖ9Û(úHj <¦IÕî?ïårürðÓžÛPOûf§ù½Æ Êpe¼Sïniû7Ø9“à-(œ‰.üéAðŸ·y‡åT“â¿„Ÿ­ü©þô?¥ZO‰¾~šÌCêŒ?¥³ìOº)ð ‘éu(ÿ€ŠXü L ^>Ü2üCð› rÐ}XéR¯Žü,Ý5Ûûú)rϰ×)2x}Ñv‹ ~©ÿר/ü,÷ðyMtª Ï ŸëS¯Œ¼6ý5Í<ÿÛqR¯Š´ûºÍÿ·…ÿ\’]ts£áé‹õ?X¿úôãàÇ©ÿ~¿úõÒ/ˆ´Vûºµ‰ú\/øÔ£]ÒMJÌÿÛuÿ~ð¹brŸð¯¤9Íòéž?­'ü+×òü¿÷Á®·ûkL?ó´ÿ¿ëþ4ïí}7þíïòÿrÄä?á^Éÿ?Ëÿ|CðòCŸôõçýƒþ5Øÿkißóýkÿ—üi¯§Ïý¯ýþ_ñ¢òXœiøs!òOûõÿ×¢‡RC!q¨!$cýQÿì¶4Áÿ1 Oûü¿ãHu½,uÔ¬Çý·_ñ£ÞzX9bq¯ðÙ¤rÍ© ŸH¿úô†c¾¦ï×ÿ^ºó¯èë×U²öðŸãL>$Ñ®­b?íáÆ’æì1g)ÿ Î"rÚœŸ„Cüiãá¯ñj3Ÿø®ø«@^ºÍ‡þ/øÔMã//]nÃþÿ «K°¹`a†v­õÉú©Ãm3½ÕÙÿ(þ•¦Þ:ðºu×,¿ 3P?Ä_ G×\µü2¥+O°Zü;Ñã ï¹$zÉÿÖ«‘x/J„aV_ÆJ«'į Æ¥Ž¬›G9¿øUø¹àäé¨ÈßîÛ¿øSä›è Åln i#Ÿ)Éÿ|ÔŸð‹é]íÉú¹®VOŒÞAòËxÿKsþ5ROŽ_¹k¨IôGõ£Ù¾ÅsÂøwKN–‰ø“R N^–pÿß5æò|tÑÀÌz]ÙÿyÔQŸãͺ‚bјÿ½p?Âf.cÖ?³¬c°ø§­´eaAÿâ3|{ÔâßC·›¥fþBª?ÆŸ\[i6«ŸHdoëO—ÌW=ïbŠáM Jùúo‰_çK$ëfóª­â_‰wÊX_NŠºcOéM$#èƒPI$Qòî«ÛælWίoã»ßøøÖçì×mü…V jsoµv'Ü»çñ&´>€º×´[L›NÊ<zuÿÄ»øáK\ïÖ`r;G–þB¼rÚ72ÞLì!@m0;|cªúmŸütV#¹1·Ò³4[§Ï Ò´ltø®o#ŠBv·¥e#&EmhÌÇR‡&}¯ƒí^Ø2Îà’F¨®| !’7i1ÕGð«§SºµÂDÀ¡çsV ñŽ&…X°qP®;#™³Ð,c» 8w‰¸ÁlZòxCO†` •QùŽE~‡µ\¹¸±»>j‚aÔ2å[ò­+I–âÔC';x穵ÛBÒVhæ®Ü]ÑÕè 傉Qæ±Ø¨ËÍø×WÔšÆÕÝxmÐ!þ•ÃxMä·Ö^ÑùIb%[×Ó5è£l˜ì¢¬yeb©»£ľÒõ/jA§ZGrб†HáUep20@õ­x]¿‡þÑH.‚îò¼ ×Ó]"¼2Þ(¬¯5 IdHÖÞòXAs÷Ž?J˜±µ©Î·…¥+ÅÜgð4Ãákœqq ú‚+·K1¾L0ÿdæ¥]âQòÅ!?J¥V=Dé˹çÍá‹°?ÖCMÿ„fû´~uéqø:ö\~é€÷5r/Üõ’ƾ½èö˥Ò]Ï(ÿ„cQþôƒUø¼*Œ\B3õ¯W¶ð5¼.¬÷‘ϵaðíœ*Ìqêj•Eæ'wÔGü½@^Úºe¢tˆ©ÍJ°BŸr$E¥íE÷<9>êò‘ãoø «pü-Ö¥?<ð ÷S^ÐxàR —9w)#Ë-þ1Üj˜?ìF+B/„ “U¹éü1­zëR§Þ?JW}ÀósðŽÆ<ãQ¸¨úTºgÃ>-fÐÌ$žÝšhåpUÀ^¤½ úQf¿¿s踥¯qØ£ƒ<44;Æ<ÕMSÃÚh ƒH±Byf.Eu#‹xáD×÷T?@3M<ŸQÑ ñŠßHµTµ³²\ÜK ³žß‡øÕè¾iLv˹¨*úñV<ÝØMvÀy—“5įÔàžz5½º¤`` raqÿ <5 ,·«LGò«Kð÷à Œi1ãÕ¤vþµ×°P:UWÜX`ô<Ô¨”ÎjãÂ^²·y±­NÞTœŸJçÿ³ìw³%…ªs÷DCô®«Ä3a!A¸'Šæ¼Â$ ô#BkXÅXÊOQË1ž#ˆ} T»Œ`m?LUTq g#*¼yÍ=XíÞ²>‡µ>Q\™˜“œ®j !CʆWõ^¿ýzasœ¾ä=ˆéFæO¿óý)ØWÆUL6ëýhW^de`GEPÁŠ“§W”Ä¿:ʳ÷ÎN3ÐPì4›Ø•âO¿ ã¥B²–ܸ ãøOCL2|»ãWÈ;¾Qù÷¦µÈ|å+©ÎF\þŸ…+¡ò±Ë7îÆÉ{ƒÐŠüyª‡orGJ’Iç ‰"äc 8ê9õ«özWÏæÝgvÈ[#Žôù…b¥¥œ—8‘ÁTÇ~õ¯iª㚑åÀ*Ÿ.8ªåKd’j[¸Òr]p¾½PpèØ5{rðÍBûC‚IÉéíHed9ä`çÞŸÆ1~TÃnÎF íJ›ž?>”ÒÆ>ä9Æ1ÏZš)Ä¿|e»ûÿõê\?ð“Žù¨0@à‚{cµ —¤dG \ž†³É;J»t8«); ¾zs×Þ«ßÝK†œS°\óo´Œð¬hóän‘šÚX,Ðd°8ô,cè ük”é1¸o»3NÝ6: Ö·Û­Ô‘)¦¶¢ûˆö¤x²¹îÄS×N”òÌjÃjDó½GãÍXµ¶Ôõ&ÛeispǦÈÉbŸöQ<9õ§1@å—·zÞ ñ|°y£F¸Ø{œqøf¬éŸ¼QªOå´ÝGÞ’l€?JåÄ+•È÷ Ù ü¸Æ:Öõï…/,¯ZÒk„I‘аÚj£x~ï ÑJ³"õê¹úRº ô­Z÷@¼Ú°+ühyVõèRx«JÖ4 Lw)ì£0;|Êr8÷¯:ƒlÊQŽ;sTcµtÕ¢Em»ßoçNán‡µèsÄú\!%˜g€Àžµ@x÷pSf\¦˜ÖÒ‡2tÛÐVâÍ!£r®TàŽ¡…9NèJ•ÍßkI£iÌà´8+ {úŸaT<8â_!ÿl*à.n/ïgyu ï?*Çü+²ðæ©h–Ž“Iå6AAŒñN›DT‹fWÄ&ãL?ìÊ?ôã„|òã]—fŠæ]= ‘d æî*sŒíÿ æ84=Çd1aÉ<ÔÈvô4Í¡št…rÙ$ýÐ:š %¹»HÏÌí÷P¦±g™žo2i”ÉÐxQè*wŽ)†û† 3g+´ü¸è2H-ÌL±DÅÎ@m¸Ÿð¬Û»)+"hf/ ç8Jc”ϽZŽj€ðS›!ëMÝͶõaoܸ*˜ë€?v8ì1ë@\ÓŽú3Ë!\ÖîŸ>èÖX›;k’'ŽÕµáù±3À[ï Ã5¾ÚV1¬¯¿ðì ë„r =²è‘q"×™xw1ëÖ€p  `ý z-µÈ–òhp‰€ëÉ÷Å^#I"hìh0äÖøcM–êyþÏ™4¦Gß`Íêku¾ñ¨×ï­s´mrŒZ_—¡ÑJÔþ]Â-Ðÿºâ® p§`3ËN6s~Oõ¦—“½¥Èÿ¶yþµ¨)Ô Æ?šGX.ý±ji˜ùe?ýùð­°H<R,Œ;š.;ñ˜cý\ß÷é¿Â“ͤsߦÿ èÞG<QhŒ ±é ÇþÙš6ÌÝ-§üS¼i†BÆG}ŸÝÚÛp,Pj1• _îíbqõ­£L4Ï6×L>i"_ &¦´€ÂdÜåÉ#¶*zHú¿Ö†<ýÆ>ÕÍø…Ì^ÔÜu[IHÿ¾Mtþ­þ•Èø†f—B×  lŽÍ°G©SšhV¹CÀ0Fž°1©Ã®NF3Ž?¥uýRÒ­’×L´†0XQ@ô ¶Ùx£v5¢"¸ùHêN* èS=p{Ôóå­Üwn½ªÏÊÊà œ`ŽÝª’0º+[í ¿wõ47a";KD‚<Ÿ™êV†F9µ9ŒäãïS[^¼Vw-"³¯ÌçQ‘žAéSÊ„ d硪¬6’x y[ˆÀ=Hâ¡*îüÃëR ¶7ŒSpƒT‰¹ÉAúúUwT-’sèz ³) 1ÓÐUG`޽9ãš`&ìpFAª’‰÷B*q¾u`ƒN ô¨Œ#b¤ä£õÏ^>”XÖä¼éŒ.î¤ä˽,Ö’ª¸- g%1Œ·ø a¹ÀpBôÀlsLÿ…1ËË& ª8' ¡\XáŸã ¨rÅÀ븯V–çF†Õ ³Ñìâp0edÜæ²'··‘÷˘}År;\¬à¢‚ææM–ÐË#zöÑÙø~$ÓÞ+ÄO:@ArTOzÙ„fXPD¸äÖ’VQû¨Î{3w57)"…–›ii* eܽdn&½Dñú~È®Le$` £ÛÊÚ¤vÑù²ª)ÖW6÷Ú¢¥ÛͰRÙŒ|ÌGAíõ¤ŠG¹Z•X—dsÀ÷¬=kÆzz4v¬'œ rª­p·ºåÌÖ©h²yª6¤{¹#ß¹5ŒÍ°eÝýãÛè( !ÚŒ³êz¬—»+ûÉ\žß•$€$[`*H@Xýºýj1"’ìü"Œšpw ®·*GÝÏ5͹:žÏ˜ þb—H‰µ qßoË’äžÕnÉ ßŠFR/ùtýjº­Î¬Æ` šBéeÜ€ùÕ…UK9éúVqC¨Ü¢ÝNõ÷¨4+1k©7"u;"ç5ª \«•i[ކ˜X¨ÖêÃUN…‰Ü V«•ˆ`cuB¿&¬feBßÃUÛ@·_'¾k òp¹<zŒNµ #Ÿm r }3Q6‘L8ük¢³”N  9QÊɥȼ¡ÏÔsXóé÷ ²4mÉëÚ»Ï'yÎÓõ4×´R:iÝ‰Äæ|5cäkvÒ1;#¡¯^Ó¿ãÅ?Þ5çéh¶×QÜ* Ñœã¥vÚ%ô7V[±"±-'M±®Ÿi Èæ8TÏ­ 8ü²ýEty¿Õ¿Ò¹¿ÿȱª׬Ÿú tÌoô®oÄC>ÔÇý:Éÿ š2ý«bÒŽ‘¨ý*Gl/­GhØáÏüó_ä)ò0T'©(õ'¥4¸®A}¸È^;÷ý?0¡•D€áÇB(ãnÑ&õ>ƒ¿sùÓCm%;uDœ÷‰‰e‹#nÝÕϲç’Mnx–æ?´[Úsç4o/ü?™¬)SóÐÖ„=®¡ ÅÊåa°z{ŠÏ¹´DØË.Íì0{0 ­gÀ˜Ç5DŒÛJæ6a•íŒÐö¡—v‚ÿ+q‡^ßøÓä‘á#Í!Á’[t¶eÄìѰ8ÛÈ^z<µ.ÆGldqM=.&¬F×pN§Ö’6>ÔÉf8 M·Ñu­Féâ´†Õ‚`–y6`nÿ…jÃáûýe“Q{c¹v $ãžrH©uùPù]®mè¶1ÚYîon§Ö´£ˆchÿ*ϳ—÷'ð­Ey|cš—r•ˆÝ©Ýõ¨Ôn$}Ð=iÒÌOSŽ¿JÜù ÁýjGr Ô€T=jƒŽ9={Õ¹_@?SÖªÞÃ{Õ¤KeWÂuÀíÅG¸)ÉŽjE‘D¾KÆwã â¦IgäHË4gæç‘õôª°ŠÍrÌêcMá¸úS^ÈÅ?›$ªÀž9ã5k’»QUb'vÑÐιg# r4eæVPQ@s÷›¥P™Ë·8b8°¦Ï2›ÝÂïÒ°/µ·5⌭fË/÷ÍxÿŠcø©y¹¶–±‡ð5ì÷«È|UR|V™e)Óâ=Þª¥ñSá%bPûŽv’zŠæ5$×¥Q?s"îLúç?JèͺȦ82¹±B͹£‘£'9èsýkŒ¾³A¡Ê›€(¾poö€ä×MðÞE“ÃR:A¹sÇÐW Xû×:©½ÊCþŽßQNÓå¯ÔTrÇ»}E?MçÍúŠÍšî?Ò¹íþEýKþ½eÿÐMt'î7Ò¹ílgCÔý;Kÿ hvÐfÂØç¬Iÿ Št¥Kýò›z¼z~B¢´p4ëfÁoܦïÀÅ+€Í³©äõÝïV„4Õ¹'Ò ‘ÿ{œä šC´Zæ¼W¯GybP×’°ŠÙ?½!éø¿…R%œæ«~·ž:¾(àÇml¶«ïÇê?*yÎÓÁ®sCíBY˜±’BrKrOÔÖë|¤)n½+C;“?Ì=ñŽ”äÆA'qÇ~:Ó˜c>½ª}ÈÉž>lcZ–R)M Ç…ë’Ùç=꜖…6: þU¡xUÜÛ±žþý*°f#a”#CaÏrïƒ/~Ñâ›»›6Ö»X‘×,®£ÄÛFš®FH”}2•q~½¶Óüi2Lë]Ùá èJ¾zý?•w÷1E©YËn]8• ãÐ×,ª]›E^6G'g:‡ œgŒf¶UÁú×547|í ÌedS‘Ï =EiZÝ/—¸·¯ÒºwWF;3VhƒDOF<éT­)&)øTët’Æ68%yǧ֪ܩ’/˜íoçI!¶:IoÎ SQ½±’0Qðq¸HÊ>¾ÕYî峋/hjbßf $¢˜Ï5V'pvìv90L»¾oÀv¬¼ýìòÇ©'“õ§3Îw£(Mãi%³QOi8±sª&Uù2>Cõ¦ô÷Q@›å` w'‰íî¹x-4kw•ÉÇšÃäAêMtÚOÃç¼]ø†è\wX!o“ñ=ë½¶µ¶²…a¶†8£^F¸¹åVú#hÀâ4¿†p+‰µËǽ“ŒEQõ5ÕèÂ5Oì«-ª0´³ïL'¿JÉ»š¨¤sß4}VÐGXJ­¹f‚!Ÿ¡Åy¯ˆ|3{ámSLi.íî¼éu!k!R:þuíÒ6!‘þG·óDšÅÞ§æÜJòH’n ÍžsBó´;ÅH¢ùÈËzšcM-Ï ò'÷_ŸÃàpt&„QÚÀ€».OrÝèiZCåÄ6¯BE,ˆY€=*X/j@X´b_CJTIq“ÐSãái[ž(HÛÛ¬[Â0ÕxÆy5md  P}ÄFk.u_±*jýÔj×>E„ógãëÚ¹Ÿ ‰'¼n¨ ÞœI“'œCÅ1§X ;Ñúõ©;›‰v)ùsɬÝÑ^_7YËSì9?Òµía/ qCìiØD íWÀ˜ TpŠ<‚êíPO&<Š}*›Î 2j¹–K¶Âgo­ZŠÐ(çñ¦"(Õå}ÄñZ ˜@£Š#Œ/¥àwÆ(·ŒâšHƒÉ.F|´ÜöZ”³s;ḽ?W’à3•Œ·ANX¥sóaXf‚Ùv £ó%—˜Ójÿy¸€sˆáLŸçDPî”v*$cÌv ݺ~‰ß÷LÎ⻳u?…S–xÖ|7œRGòIû¸ß†cÆÕôúšŽ6EÜÄSþš8ËŸ~~èúÕñŸc¹&$Žr}i‰Ç:;JFÖ.›ûª®Jí÷èï’wmç󮝯²‡Ó£PrdTV—Šô!àë‹Õ‹Ë¹Ž$§¹‘N*èÊr³<ªÌÿ§Gþð®¤á†@®sHµšóV†#2HNB¯S“]\–òC.Éc1·£®ÜS óóÇwÀçßÖ¤ò˜†njhN1ÐP`œ r^ õ§lÜ\K½`²â€5<=µ|C¦uâê,ßB¾„ùÓCOˆ4Üg?j‹é÷Å}>÷ãWˆ{–dûõäÞ)_âÁVÆ™çýæ¯X“ïW†üTÖ§Ð>!Ewl‘´¯¦¢ƒ È3öïWgr$®¬mj:¥†“¥¼·¯²!÷X 3¶2Šñík\Ÿ\Õ%ºœ 6Çéú ©}©_kžuÔÏ4§ž‹ìaKªÃ ó›2u©ä}}(©>g¡P‡*.éwSYÉåo>Y·û$ö­øn÷# ¾xÍsaÒ »1À©ªŸlŸß7¥fhv‘¥ÅÐ,Ütk”¶È» ör?ZŽ-JíHFaéO´$Ü}i+ƒ·Bö°röÅu:ßGµŒœ››êy®SW<'ÒºÍ#PŠòÒ6B3Œ2g•"º(|F¯Êiˆ—n•î­Á!GlSуO$zTñYÉsÊ®ÕÎ ž•ØÚG"F/‰5³h“BÍû´çœwý+µøOÿ"ŒŸõ÷!’×–x’{}Jý–Ûw“h 󸟼ÙôȯQøHÛ¼Iíw ?€Zâ©>iXëŒybw’ÿÇ»}E;Mÿ–£éM”ÿ£7ÔRéŸzoÃúÔ ÒþúV±ÿ káÿNòè·»¥`ê¼éW€ϼŸú ¦’ØîE¡RsäGÈìvŽiùç'“U´Ó»I²m bÞ0{m%Ô¡ ժЮC< çÚ¸?ÛÛê×ñJÎÏqe‚%9rGb}}+ ×ïð^O½Î0½ÿ±læ¶³ŽgŽÙ§ºc….~UIÛaÅ_sŽ‹;èDÉÖA´‘ýkV옟=‰¨î/§—³$¶æÏj}Ú4ÑnQ÷zdÖ‘—6¬ÎQ娕þhц9ÔñJ2°ðj¥¡Þ¤t#ž{tŒÝU2Ûsô¦×A!'v{‡’C7·#Ú¢|†ðÒ­ß Î˜¤’pocU¥Í8=*c±RÜÊhTø“Lf`§÷«¸ÿ»œWP-ï#©úW'¬·’lîNÉ»uR)Ðë t‘×ýåÈüÆ+‡ óÞ,Þ“\§A©ErÑrí³ÔçŠÏŠfH€©ü©‹¬´ˆÉç«#~?ô!ýjšKœ§Ž™ë[ae&¹dg]+Ý©1S˜Ü£Žâ¬Å©Œ0•2uÿ ÇI@c´Çï7Ë<Œ®:ûW]Œ ´šÚI”¤üÎÉ9«Í ¸UXʆbGÎz×2¬~ì†äSâ’[y‘w—í=Ò‹æ»ØªŸŸŽNÞøîIªw¨ïäDFÑÔåEÌ·SGó»’¿+.xœŠS¿~M ;Ÿ êhµ{gl¼'u=+s#'šó}+Tn©Ï“e_•ÛG®iò®áßR+’¤m#¦›º4r7pi=ûUk{ˆ¤ågØöVc9ê* "¸oÜK‚>ã~WËêq|Øþñ¯¦æÝöyƒ ##_1/_ýãM¡é ØëO*8È#š\‚qPhX\MH‹ósЬ§êtl޹  @¾”ÂÄi‰¸žrAö©Äd® .26©2Iç–CàÓËž=I {Åw;m¢¶Sþ±²~‚¨O'Ø<<‘/1Éõ¦ÝÖ5ÕHòW;Wè)÷ /õûk5æHÝAÖ©lCÕ›¶vÍo¥Ú[A ¹þ§“Zp* œÚ˜ìXdjd*>fÇãRZ%¸¿Œ[°¨!´šñüÉNWû½©–¶’\\o`BrGZÙ3Ãi7@Ö»Kd…qŒcÚ‚@êj·Úeºcä¡Ç÷›OÜfi { Ý ÛbÛÚ•måœ;mSü*­8KF¹ã¢Ò;JÃçqŽËÉ =IL¶öŠÐu5Ës8äˆ"îXüÆš˜@|°Õ_ΣÄÒ`ì;í$P¢GÊ)sÿ=$éÿש•åÜç e¿íDm¿–YT»óð¢MŠ˜òÕAêdlgëŽM12;t…È‰Îæ¦ }Ò .$/'mç}ZˆÜB§Ieÿb%Ø´¨÷S¶ð$ÿå¨CtɾNxÏR}…44·ƒ)üÚ’->8þyXË1䳜Ó5-A4ûec‚¨Xã° ÆwâMfÚÊ݆-°ÄŽ›jjþ(¹ºð­íÌÌð…óíÇ#¨ü+“ÓÖKÛ鯥ä³ä÷«ZeÓn$ÉǸ«NÈÉÙ²?Í/²’i8Ál³œ•5í/½ä_:GrÍûw?Ü9_ÈÖ ß„u(FmæŠu¾á¨íüU©[*Ü(8Ä‰Ïæ+ZÆÏ¶æÚXÏû0§h½‰´‘ÈÜX^Z.`’?wT žOjôG×ô§‡s\§ªl$þX¯=ÔgŠ n'Aˆ‹Ÿ-z‚¦Q±Qmî[Ò¤Hu­8“Ë]ÄÿŠúKø¿ù?Iºy¼K¦³ž—q`z|⾯ÏÎ~µQØ$Z“ïWÏß#/ã[ ’Ö*ýöÕô‡æ¯ø»KãÍ-žËðüí“ùPÄ·<Þ$¸†$f|áÞ1– Y‹DÔ‰¶±”ž ®Ñú×T—ÛıEq(#(éô梒êkÀç<òÍý*,Í á}REÄÏmSür¨?¥I…—?½ÔmÓýÅ-ý+@ÝÀ8ÞØõßá@¸‡ gÏ_¹E€ÅÔôÔÓÑ+£.x?&ÜVds•;»ŠÖÖçSl,A=Æ9¬2qš¼÷rÞÊ¢B¾‚¶ô‹±¡_ƒrHeÅÉ_CÿÖ®v«:“Àµ5-žh ƒÀ ƒ‘N.Îäµuc¿‹ÆZ awÜ)nsˆ˜Ç­Qñ'ˆEÞ„í§NÑ,¹B¥~v\Ž=†+Î$¥À?Žk¥þÑ»],Ìò¥²œŒAòçÝZÙÖl…J)Üç̪ٔ‘Ô×¹|!;¼çþŸ%þK^#vÖÙýÄ’¸îΠdþí¿?äI?õù/þËY-Ê–Ç}7ü{7ÔRé‡÷’eþ´Ùú1úŠ]7ýd¿AýjÈ5Cô¬=G:ïþ¸¿þ‚km{ý+PæÆäÓ'ÿÐMiLB°9àÛG“ÿZúuL³©ÚCçúqóëþ‚+ñ§ŠÒÃX‚ÅE ë,®«žŸuH÷êyô­µٱ©Ù]Op’…É•FÅœ6ÛH¼K G‘‡cØý+“Ò~ ^[XÛÛ_۽Ťx"rv¾@ ž0:sèk¾·ñ ŒÑ)ž4Ix°HÛeMËЯ_B>µ‹mš¨¤f\é×ēن;‚6 ª*x9ÁÈÎ o¶².ÒH­­–FeÛæ>@øõ®qCxTì­÷zz¶WÌF95Ré0«"1ã§5b|øIgÖµ{•dFíž\«vþéÿëQ;|…ÁèjÝÐÌ À*séÚ tÄ ¸<ç9éS‘â7EÒ¼Óœ#«}úõɶ¹nåŽCëÎ+¥ñ$R¾‹,I‚Ĩ xÇ"¼ñÕÆr„jƶ洶6N½'É‚1÷ªko¤3Ñ?”O#ÓÜ…se¯4£s6}d›NèѤՙéݤÊ'‰ÃÆÝÅ[6Ÿ˜uÁô®+×omzlç «8ÊÇÍÿ×®¸)Fù‰àð}«®œ¹•ÎiÆÌž9—øÈçµH×kbB…¸?J¬è…ÃÁô¦JÁ“#ÿ¯ZkY\ïŒ!gb§k:úéùU{‰DrdŸÊ¨ÃrήìÄ÷Px«÷¬Š[8R94†R’C'ÌMmé’Eulˉå ÿ:ç¦ÂáWÄU¸ôH#‘BÀ3Ó>õ—7´+Y7 SƒÂŽõyñEY¿Ð¬‡ ´Žé4´QùTÆÚV/µTu'ä—ž=ׯ XØ@„cå‰5þ©rŸ{! yÍÑÑw©è6‘“=Õ°#ªŒ7JóÏø¢ÛR_±iVá#' &ß™½‡ ®5‚õ“–üiŸÚ±Ye¡w@Ç­Ήd‡Ãºl²;«j3®ÕóÈWðþ½¤hö“Ïwd÷—Ó(' Š=ýë–3Ü_Ìdòå™ â®Ã¡ßÝ`¾Ët>§s~T\vïÅ—úާ [„´‰œ(H¹ïß5Ð$—ÑÜoÝÀ7©ü+?KЭ4çeœöú Ñ–á#ä‘RÙk̸5cÒäMû üÅ^·6ò®ôF›ÜŠæÚygûƒjwcDh‘È]~òœ3s®ÌÏÂ* üé !‡ÎìçÓµr:…þ¡§éÒÜ JmÊ>T8`Iè9‹-ÿˆnbn È¬3€qü¨°s%¹èsÜAhŸ¾–(Sý¦ K¡E˜_¤ŽBào–Qw  ït± n#ù×ã;šhƒvd¸)ü9?—ñ®‹0îxRpúÜË}âqÐÚ.Ï«u?­;j)”>D1Æ$f™ª:d䎃±÷«øS xŒqЧªŸø•ÏŒW©ü*ŒŒ-$«EÐŽO=:WQµC“œúW1£çû^=½p{ûWT/ó 霚Æ *Ù$6yàSÒLàtŒã¯ãK,)ãƒÇ<@Æ 8 @ …aŒ±÷éYºÔ.Ñ à~µ¤Øq´rIÏÆ@ÿ+.ñÝ   }êö¦UbË4e úï^¿­}XOÎ~µó]†lº•³bA •Aãï_Igæ?Z¸ìL‹oÔ ñ/‹êŒô“ÿNGÿC5íoÔ}+Å>.äøÓIÿ¯&ÿÐÍ HãøÆ ÷¤$à'“úSü²Omè& ß§­AcqÁœãÒ£R‚}*ÀGfÆÚ‚÷6–RJsp¿SÒ€0u9„·lªr©ÇãÞ«"3¸DRYŽêImfƒcM&ñ¹r:ZÛÐôþ Û¨$ñöîh ¶‚é:JÒƒ´çÀÍl}Ÿå @é×5l» 7wéZÚ5õëbV9þ,RBm#„Õ”Ûj? U!U²T{Éç I$’㢻?^²Ÿ ýÂÜjù(]½>•ÔižдÅ-„Œ;‘Ф™.G‡X趨ʖöDgøœmíÞÑõxsìS²HfiŽ \gr=«¤†Þ eÛ )ÿeqW"á¿ ¤¬C“eio£[fYc’&ÈûËÇæ*m*T’YJ0a´r{šIÆGLÒiqGÌÍ*–Qœ¼š¡ ý+÷›YÇý3oäkezÖ5ß0Ì?ÙoåBØç—TƒHð5•õ̘,ã'Ôð0?ñ}oUµšîâxu©æ¸%çÂ퉘¨çÇ=F+_Ç^ èš.‹„ˆ-£–pŠ£ðþ5À°AÏ'·µ:’¶…AL·7²ídŒß ±?…$æåZQ*»rL†8ï“]„|Swá¨nÞ %‘&vÈæQø×iuká½wÃz^±¯ÝN/náuP“ãË;ÈùTÿtzç<Öi7±{§‚¼Qs¥ê(o&2XXäó%7ÏÐæ»?:7s$2+£U”äž?JóM33\œ¢Ÿ•G¹ëô®ïG*l#:!)ýEiIëc:«CmpÑ㱦Û ²E‘ê(€ãåcÆx4Û¤ ¬¨GzßÈÀžíÿÑvƒ³ƒÎ8o^*$ÆXðéÖŸæ¬Ö€ ‡NŸãQLTõç¦%¾æ‰þm:@£î¨$úò+ÎÉ!‰½\BÖ7†vs\œÖÏÒ¬yùN8¬«Rzd«}åšg’„ä1SZ’iqžRIØóŠôÉÁùô¬ nŠoÂE9fLm`yÛèú¡Ôm'÷éÄ‹ëïø×Ð\D~xœcÐf¤µ¾–Òq,M‡^ÿÐÕÓŸ+"qæGzë„Þ¼Po äàI¦j–ú¿,ƒï&yü*ÛÙœårsÎ=+µ4ÕÑËkhÊNžfGáÅh@X[mbxçµ^Kv¿¿µKN·çÿ×ÅKCL«,Šã&™Ž’)#N¸WVã®zRÅm)mÇ\Ò¡·Û,刀FJ“Ù‡JäËÎ2®È\ xB…ÆFõ®Bèu0P0$`ãXTFÔö(j×2¾˜Èeb¤‚TœÖ óŠØÕlXŽEbñ5:)/5ù–é¹õj„¨'2Üük"K‰C• N)ûX s!Úh¸Í5’Î>¤±÷§®£«ŒS?³@ 23ÞŸ¼h ¶³EÄE&¥;Ÿ‘=…HˆÓ…/#nn€ ´–ûrv‚*å…‘ždò@QîM3.¬ÖÍáS+¶@ºFy©bÒãžo:åÖR>U@0­mqÍα! ´–αL€?D¶ŠrOãI#1CÐUè"¸sû·çÛ½@°s…TÏ©æž`— “Ð R)3KÝ?&¨ö³·ƒÝ›4Ÿf$á¤$}iì±[¦yf=s@ …™$,O ž$èïÝ€èµQá¼É0\þ•g·á@ºôž}Õ¥RÞkýJxMãæ'ÖªÀÿjÔJçËŒû Ò·„Ë0h98ü*’3z³GHÓ·fiG«¡@»@UàAj€p£«HFÜ—©¢Z.߯šÈò À¤Ü¦4§ ¬ s’íîiVÇ‚–'$÷¤–é L±‹ib[Jêì;yA†Åå°z ¦ÓÏ~NÇïÜÔ–ð#œ*â%9?íJÐŽêäYXÏ(ÆÔ, ö¿:á´t”«ÝÈ»žv$±éë[ž5½- ¾ù§l·Ðõê¬H#·Hã?p`Þ©"E*pYº@9ªzž²®9Êã­\ É cQU5M«¥\ñÈ^½úÓ ÂÑ€þ×LôÚ•uM'#q;{}+—ÐTTgî„b}¸®¨ÆNNp£Ž” j·Cß© ‘·9íÞ—ËÜŽNpyÇ4¡QO#qÇñšb~¨Ïõ FJHÁ<J~ÈÎ8ebôúŠ÷y«ŽÄKr쇧ҼgâÂñž“·½“èuìŽs·é^EñLøLtB&ÒQ×ÇMì%¹ÊÅ Þï¯U8Ú¸ê*ÜVòLäE>N2kXøGS½* Lª?ˆñYØ»¥¹€{úäœÕ-RÆ{«º<¬$U¯T²ð ´xk¹wžàs] ¦‰§Y"¶LŽì3O•±sö<^k:ÚۈƈI''üwZÃÅ\ÌT`"óŠï8SIªå'™³"ÏÃZU-•Øw~kLpŠ}Å)´ÏšüIn‘ê‘CÛBíîÅqXÒ|§h?w©¶º×îšÒò®"fm¥†:óT2i«uml--%Š^|Òïò“ížj%¹ªØ-[íVkme‹ mópT|¥N;óýjÛéëW,Ï(îýgµ7MÒšÂ6ÜÀÈý@íŽÕ}vr71Ó­MÙH‹¤zÕÑn)Ú"p¬ߨ¬¢@\`©´)eUÀ ç9éN.Îâ’º±Ûs»qþ!ž=ª`ÞdDävÇZçí/çž0‡>`àã¥^[‰áef»RWG+VvdòÝâlíÎôÀç¦ÿ>•8$®N~•àKNœOzŠ]„`t^J[B-B6ÖPÌ€ü«”UÈBäô®ÍÉ<“À=+”Ô!÷RF:¹~‡šÎ´t¹¥'Ю \ õÍ Òn(¹$ò(ç§nµÎl!`Ä ~Öµ‚lï‚6ç¯CNhû“œã¸¥¸˜¥+ £ö?²J.-¦hXw'rý uQÞKÆ|2•È=eE¥‹ûfó¤dƒ8<Ÿj¿®Öİ“ÀèØÿõUS¯Ë–âJ<Ö5’â†rÕ*AóŽ;ŠÁh¾Q-´›”ÿ á…M¡4k·i5ÙÌ™ÊâѼööíŽ:“žOÖªÉ%wDxàpk$j“1éíšq¿–D ôïI»Ãoî¼¶ÎCmZç%”-ÖË2å¾µcV½ @'sž@þ¦¹ë«‡ˆ‡|Æ9&¹j;Èé‚J%ÍQÃY1’1Xñu©¥»’{}ŒG­WƒP2xò²aòŸZYe*:Õy%f8'¥M >~МP2Ìïܼ{Uøu¥p —õÀÍaÏ‘>b¤²™ínEêOZëu‘íímcýëõ'®ËÖ 12,c÷’+pyàûUâö"+{ùÂ¤Š»‡¯JÇÕu‡Ô•£…JÇNO'*ÚI¦Û²+.ö21,]‰÷æ§Žìt0"ª[Í·å"­( óY›"À½Œ}Åf?Jw+óƒÞ«=Ìq—­D[¼J§µ l¶÷qÅÀ%ßÐT°£ŸÞÈrç·`*¬›²Ê:{Õ°þôÀ°§ŽxªºÉ¶±•×=ÉàTÁ½k.ñÅΣ?ÁóëÚ€z!-PÚÛ `p‹Æ·tx·n›vÖhùÈ;‚¯sŽMtpH‚ ÂÒ›&+©sp ÓÔñ‚j`{T‰ÉíRhKœÓ¶€2Ç£–Xâ-Íg\_>Xòiˆšæù"N[Ò¨¬R\HSœò–8‰lž[5fYÚ,õsÐzÐ `ìëgº‘ØUÖ+;W…QPZÄaŒ»‘æ7-ííXþ'Ôž™ B|Ù~EühÈç ßÚºýÕᣋäŒ}*ö9=W=ãlÖ¶kAæw9ç5q—yÎÓô5FLnÁËôê–¯“¥Ür ’jó+qó À=ªŽ¯Í2àçªqÏ^hÃãþ&3ˆÏ_ºƒ¹ÚWžƒœW7á¥-ª¶;DOê+²RvŒ•V3Ö„2Qlö%FOáCBˆ1?R½jÀ, „PùϽ/˜¬_ 8Á ¼®sÛž”ªN0:ã­+&UJíãæààæ“g ’F9÷Åh#_6#˜0çñ¯qSžs^oÿ݃ŸÆ½µ$PÁ7 ûsŽø«‰œ9 ô®cÄzz¦§ixÖ¢v·Œ¨çrq]3éQD›»cDØÄ´þ˲PŸf6Î?çªZÔI¢”f9Çû-š²0ჀÃ=ÆjÓ,däÚÆÕFÓúRù†“M&ýn?ÕÍsû²ŸëLmRMJqõE4s ")gŠÚIdHÐuflø×+ªüDÐ4ÍÈ—-u þq‘ÿ}t«÷Òöo6}^âf?óÛ,Ðt“sð~ÚåóöÔ÷ÇËK-ùNCRø©¨Ýî[$†Æ2q¸ƒ,Ÿá\V¥­\jR»º¸¸lä´Ï‘ø/A^¬ßsý¬1íð§/Á aĺ›7¸?ýjN£V»Ž‚²!¾¸³†(äˆH¹ Áy*=kB;„Ÿˆ±‘Áõº©T„•“9êRœ_¼‰V ŠÍ¸mî=ê³YÌÝ¡«)2Hu9#H9úsZHÍ-LÖfŒã Ž£¨úÖ>µ²co$`†©>½Çõ­Ö`ÎÀœò@?RÔ­–M>M£ç_œ~J–¹¢RÒG8‘ƒ“Á¤åAº СB}ìgŠk¶8V¶é\}N‘ø9=0 iA¦¨Œ¼¬7;@­G£Ù½åàÂcÇ¿ÿ^®Ý¤¶×û‰ 8 ý0k ²{E©ßÞhɵ{«{³ÊØO—pÃÖµŒÛ€u`WÛµG9@+ß=ê§–cÌ–íÝJço˜êK”¾·q‰Ê€•9qMŽXmƒ¢4 >9ëÅQ22èUºã9£s;vö­#VqÒæR£NZØ·$ÉÈá¾RÁ€Ø2¥gjZ§“PO˜Ã€F1šmÕÂ[F^NOðŠæ.¯Œ³´¯ó9ü…tF¤ç¹Ï:p†ÂË>Ò^BX±üꋱvÜy¤w,rM7q«3 ÎJÑI‡$y¨Z±)ýÐí@ÿÙ --MIMEBoundaryurn:uuid:A3ADBAEE51A1A87B2A11443668160701 content-id:<2.urn:uuid:A3ADBAEE51A1A87B2A11443668160994@apache.org> content-type:image/jpeg content-transfer-encoding:binary ÿØÿàJFIFÿÛC    $.' ",#(7),01444'9=82<.342ÿÛC  2!!22222222222222222222222222222222222222222222222222ÿÀ`§"ÿÄ ÿĵ}!1AQa"q2‘¡#B±ÁRÑð$3br‚ %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyzƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖרÙÚáâãäåæçèéêñòóôõö÷øùúÿÄ ÿĵw!1AQaq"2B‘¡±Á #3RðbrÑ $4á%ñ&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz‚ƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖרÙÚâãäåæçèéêòóôõö÷øùúÿÚ ?÷Ú(¢€ (¢€ (¢€ (¢€ (¬=cÅÚ.ˆ»»Ì›7ˆâRʝAÉHÆyâ‹Øj.NÈÜ¢¼£Rø¸åÀÓá·TË‚Ì ™u òn?\õßÅjo”O0‹Œì >ðÎ2?§¯ ˆç]Øe؉+ÚǼS%š(Wt²¤`÷vù×Íòx»R˜){‰L`ï±ÔãsvØÀïYw:¬×GšPnâì:ô$þc¯aÞšr} V[%ñI#é'ñ6‚™Ý­iùœ ”'¯~Õø¿Ad/¨(òÛk-ò3ÓŒsž•ódºâGU@I(›Ó¦qÎÿ#ƒUˆai#¹$HØ•Ï$d?J-&F::‡Óñx¿@˜š”yÀ8ee#=2ÈÍ*ø»Ãì#'V¶dåVØ­ôfÀ5óÕnXdýº@O,Ñ6Ò~¬@üýyÅ8ßêT†q¹H.Ò(ùsœpNúâšê…õ*oá“#ê&ñ>‚ªëNáp¤{“ž½Me­éZŒž]–¥iq&3²)•›Æp{ʾ}ðïÛ&ŒÊ °{¶# =ãn·?&Â8c'“Ÿ½£RêÇUºdг¼¯9ýͽ¤³JX -#m\È;Hþ Õ“«iXä«IAØ÷Ú+™ð&“ªèþX5‹™f¹y %}æ a3“éž§¯SEl`tÔQEV‹//ì46º±”B#•>Ó.ÀͰî ü¹Pwrž cϧʷš-ûA¨‘²yï\‹•ÿ¦£r’G%pFÞ@ùIÔjÚŒZF“u¨LŽéo¢cs‘ÑFxÉ8ëY_ð”I Õ¤Wº5ݬW3¬v’&TfÎÜíbpH Ó©ÎÞOe¨^ýPñ¡ªI«ËcaäFV 7¬X ñ­Øom5ˆm®tíGË2#©–Æe]êÁ”“·Œ2ƒ“ÅtÕËjÞ:Òôû‹›Xe†æâ+YfQ ƒ"yg ب Ñm–Mί+0ûó|çƒÈÏø óøQh§v{XG9ÓµÛ»!mTOź\]`Œã$g‚F~¤ÐÏ­L?ÕA*9y7‘Ž3òñè?kM-¥a€…È]»rlŸçñ­8t¹Dp<²9;RÌ¥±œãõëÒ“¨–Ç}L<Ú½jŸqÍ*òGÅÖ§;q–§o~ãùÔ‹¢iêÁ̘c™™ŽãÜÃ¥zN™ðÓ[¼* ’ÁË%ÁÚ¿+÷óøÜ×aaðŠÉ"#PÔç•U¶AŽG͸þ#<Ògªà©tægˆÛÚ[Dˆé ÀmùPƒÐŸ~œôõïRºìl¤¨¼½Aê=;ö¯¡m~x^Ûa:žÈ0 Ò1ý·¥niÚ&—¤‚,,-íÉêÑÆ©êiÙ’óJpþŸ4ÿøS‘¶“8b¡ŒŽ6+sêØ#9žœ`×e¡ü¸“qÖ®–±…Ž 3’{ää.8ìrzôçØ(£”婙ך²ÓÐ⬾xnу¸¼¹”0>d³xíòíàZé´ÝLÑÑ×O±‚ßÌ9‘‘~g>¬ÝOâjýìŽÔ”ÝäîQE2°5~îÓS‹OÒìa¾¹X¾Ñrqåyq“µpvœ³Øìl‘[õÈêÉ¥øÆ´s*êå仆Aþ¨E¯šÔ ùjPäe²6üÛ€+ê7jbMC^…ì4{2;)Y]¥qŒ<¡ ƒÂ ''äí 1ÓÛR³“Qñ<ÂÃIUÜ,o-Bgï\>Fr1”ÎÑ’îÒ[G·âi ¤5†ŒÊJ°ù^è¨`Nçš#ÞLõAP閣Ɨ‰¯jJdÑâ“:M“’@.?ˆ·T…\§€Ûx’{‹8ãðŸ…æ¸³^#šb¶6äz `\p˜÷®ƒI—UšÕ›W³µµ¸ÞBÇmpÓ.ÜK^sž1øÑ­k6Ñîu]Jq ¥ºnw=}€É<ÜšòÏüt‡ZñGö~¯§fØß>4Ë–Ï#;@rx9 ŒŽàúÐ_­x_WñŒ¯¯©I§hÈþϱoÞܨ<eì÷À‰é=Ï‚tÝ;ÂW:?‡4û{/;b±L«H»ÁmÎæÊäryèx®²¼ïÅ~;Ô¼7ñCÚ#Gn4mQ<2 K2à6pL}»šÏÐþ5Þ›¨E|V%ÇîX). rL§p8àîÜ>¸«Öß ­c'ο9å ÚÞßÄGÛ qšôj§ªßÇ¥h÷º„¬;Xf'¦Iþ•2Š{›SÄT§X»#?‡ž ûûi.\€å‚Þø\ û€?Jè,ôë-:?.ÎÒuî#@¹úã­q ¼e­x«ÀWºö­´sG,¢ l¨êˆy'?6á×µKð«Æº—޼'wªj[CqãÛ¢Û« FŒ É<åÍ4’؉T”¾&w”WÏZÅoŠ~%IäÑt 2ñ }’áo”ž€æA]„|IñNÿÅVÞ"ðÝ­¦”åüù㈂¸F+ϘˆÓ½2T¢¹?j^/°»Ñ×ÂúMµôNRù¦<Ä™\ó q»žqøïkSjúôÚMº\êÀím ‡ òòƒÈïî>´zŠàŸ[ñïü+$Ô†‡n8Öüu¦jwzÄ6‘‹yÖ´l œÙËõZôz(¢Š£¬j?Ù:T×¾CNcÚHÀ,Á@ÉàrkÕõ=G_{ûû²†+Q¼~x‘‹3îœ »äks^±ŸRÑ.mmZ5˜̤…ܬd€N8ô¬[+ÝUuGÓõ{ Ki|‘X9õXÜcýÑ^ƒZÛÅok1 HÑF¨~ç·0£m™á Êjzì‚# lŒ¸ÏmÄã>½hšÐ¾=Ï¡FÚ?Œ4ɧ¾³&.låG.W˜gúß…SÕ|m­|jÔÂ~·LÓ‰.帙LŽ€ç%}ÇÊ¹ÉÆHé~øGáOiQ[Ï¥Zjw›}uyÊ]»íV(ô·RO5Í|Jø[ck¦IâÀ4­_Lçe§È’*òp£€ÀF:ò9ôK}ÏÞmÁJÛZYä’O¹¯=ýœ¿äž_ÿØVOý u^ñXñŸÃ«¶Árm¥Šé¢ÊªCqÛ<0Œ+•ýœ¿äž_ÿØVOý gk:‰þøÖÿŰ}SCÔXÉ{c;£$äð2p b¬À$Ž»Wíá;·Xµ+}CK›?›ôÓ*K㢽BÎþÏQ„ÍcwÔJÅ Á u :ŒƒÔzV&´|««Úkrh—% VK©",‡¡êr§õ  m+XÓµÝ>;ý.ò»Y>ì‘6F}¡ö<Š»^¥M§ü1ø½gc¢jQÜøo_Äm s,¾D¤íQIáˆäÿ äŒ×uñ›Å÷>ð;› w÷ò}š)á£Î=ð0= Ú€.xâ׃¼1s-­Þ§çÝÅ÷ííÊÀú>P}‰ÍpZÇÅ/|BµŸBð/‡oUn”Ç-õÆ–„`ôùS#¹cì3Šè< àßø_Iµ{»­÷W*{›‰â«‘È@I LŽMwëâ=@ ­i€Âê?ñ  ¯‡¾ ÀÞ‡I çg3\Ê£¤l`é]UU³Ôì5ÿa¾¶ºÙþDªûsÓ8lŒçç#¯¥YÔ|¥ê¾5Ó|Wq-ɾÓâòá]|¢>~HÆsóž„tÐl´ù#Ö|W­BkwÝ·…a··cÓˈ|»½ noCOþܺ¿¸Kõ/¦èvÀÊò\¯—%ÈòC«Œuù€cáæêj9áK‹y e$RŒ=ˆÁªZ6£qªÚ=ä–mmo#æØH~wËü99 qŒà’sð.•àýëFÓ¥»’ÖåÚG3º³Êà€;ڥ🂴¯h—N˜nÖyšgóä Û™UO 0¢º*(ð‚´ŸéÓØéyŠyŒÎg“qÎÇAÆrz¯ÀŸ ë½æ§ssª‰îçyä : Ä“³¦MzuåvŸ<#e{Ü7Z¿›‹"ftÆTäµu>6ø}¤xö;(õi¯#[2æ1m"®Kc9ÊŸîþ¦ºº(Éáüÿ?ZÇþ'ÿGü3¿ƒçëXÿÀ„ÿâ+Ö¨ GÁ?´o5ñÒe¼“í¾X—í2+cfìc ?¼k®¢Š(¢Š(¢Šç|o³øf[híâ9åŽ9Ìq™·‚ò*˜°åÚ ƒÚª\ø‚ÓìVÓX£êxH·‚Ì«´À}â2B€£9$Ðu ¶©A¤iÖÚ”úŒPEyp¡e™py?ç8è(‡QáØe‚ÚÚîûÃ÷¸H`F–Ì3±Æ&6$ú)Éõ­ »»KI'¾ñޝ¬ctŒæÚ0»t>"ÒŸZÐ粊EŽbÑ˾p²Fë"ŽÛ”Vdú6¹~mâ¹›OŠÝ.ažO$;;äWÚ3ÉP>”„¥Ú´Wöš&±«K-öÙ¢’W‰?‰‘ç ž3òÇ’zSø†úÊþÒÊ9õá– ëkKqæý¡ÔäÀB2¶rwµRÇKÓôµ•l,­íVW2H!Œ&ö'$œu<к(¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€?ÿÙ --MIMEBoundaryurn:uuid:A3ADBAEE51A1A87B2A11443668160701-- axiom-1.2.8/modules/axiom-tests/test-resources/non_soap.xml0000644000000000000000000000407311131637500022610 0ustar rootroot Davanum Srinivas dims dims@apache.org Computer Associates Glen Daniels glen glen@thoughtcraft.com Sonic Software Sanjiva Weerawarana sanjiva sanjiva@opensource.lk IBM/LSF Eran Chinthaka chinthaka chinthaka@apache.org LSF/Eurocenter DDC Jaliya Ekanayake jaliya jaliya@opensource.lk Virtusa/LSF axiom-1.2.8/modules/axiom-tests/test-resources/soap/0000755000000000000000000000000011131637476021224 5ustar rootrootaxiom-1.2.8/modules/axiom-tests/test-resources/soap/security2-soap.xml0000644000000000000000000000631011131637476024637 0ustar rootroot http://fabrikam123.com/getQuote http://fabrikam123.com/stocks mailto:johnsmith@fabrikam123.com uuid:84b9f5d0-33fb-4a81-b02b-5b760641c1d6 MIIEZzCCA9CgAwIBAgIQEmtJZc0rqrKh5i... EULddytSo1... BL8jdfToEb1l/vXcMZNNjPOV... QQQ axiom-1.2.8/modules/axiom-tests/test-resources/soap/emtyBodymessage.xml0000644000000000000000000000316411131637476025113 0ustar rootroot uuid:920C5190-0B8F-11D9-8CED-F22EDEEBF7E5 http://localhost:8081/axis/services/BankPort
http://schemas.xmlsoap.org/ws/2004/03/addressing/role/anonymous
axiom-1.2.8/modules/axiom-tests/test-resources/soap/soapmessage.txt0000644000000000000000000000171211131637476024275 0ustar rootrootPOST /axis/services/EchoService HTTP/1.1 Host: 127.0.0.1 Content-Type: application/soap+xml; charset="utf-8" uuid:920C5190-0B8F-11D9-8CED-F22EDEEBF7E5 http://localhost:8081/axis/services/BankPort
http://schemas.xmlsoap.org/ws/2004/03/addressing/role/anonymous
axiom-1.2.8/modules/axiom-tests/test-resources/soap/wrongEnvelopeNamespace.xml0000644000000000000000000000216511131637476026421 0ustar rootroot IBM axiom-1.2.8/modules/axiom-tests/test-resources/soap/soap11/0000755000000000000000000000000011131637476022330 5ustar rootrootaxiom-1.2.8/modules/axiom-tests/test-resources/soap/soap11/soap11message.xml0000644000000000000000000000511111131637476025521 0ustar rootroot
http://schemas.xmlsoap.org/ws/2004/03/addressing/role/anonymous
uuid:920C5190-0B8F-11D9-8CED-F22EDEEBF7E5 http://localhost:8081/axis/services/BankPort
env:Sender Sender Timeout http://schemas.xmlsoap.org/soap/envelope/actor/ultimateReceiver Details of error P5M P3M
axiom-1.2.8/modules/axiom-tests/test-resources/soap/soap11/soapfault2.xml0000644000000000000000000000335611131637476025141 0ustar rootroot http://www.w3.org/2005/08/addressing/fault ReplyTo urn:uuid:C6E4970C03887FC5C31153324076046143 wsa:OnlyAnonymousAddressSupported A header representing a Message Addressing Property is not valid and the message cannot be processed axiom-1.2.8/modules/axiom-tests/test-resources/soap/soap11/soapfault1.xml0000644000000000000000000000334511131637476025136 0ustar rootroot http://www.w3.org/2005/08/addressing/fault ReplyTo urn:uuid:C6E4970C03887FC5C31153324076046143 wsa:OnlyAnonymousAddressSupported A header representing a Message Addressing Property is not valid and the message cannot be processed axiom-1.2.8/modules/axiom-tests/test-resources/soap/soap11/soap11RoleMessage.xml0000644000000000000000000000302511131637476026305 0ustar rootroot I'm so next. Going all the way baby! (empty actor) Going all the way baby! (no actor) I'm only going to special, customized places. This is a test, this is only a test... axiom-1.2.8/modules/axiom-tests/test-resources/soap/soap11/soap11fault.xml0000644000000000000000000000257011131637476025216 0ustar rootroot Test SOAP-ENV:MustUnderstand SOAP Must Understand Error Actor Detail text Some Element Text axiom-1.2.8/modules/axiom-tests/test-resources/soap/soapmessage.xml0000644000000000000000000000332011131637476024253 0ustar rootroot uuid:920C5190-0B8F-11D9-8CED-F22EDEEBF7E5 http://localhost:8081/axis/services/BankPort
http://schemas.xmlsoap.org/ws/2004/03/addressing/role/anonymous
axiom-1.2.8/modules/axiom-tests/test-resources/soap/OMElementTest.xml0000644000000000000000000000344611131637476024442 0ustar rootroot uuid:920C5190-0B8F-11D9-8CED-F22EDEEBF7E5 http://localhost:8081/axis/services/BankPort
http://schemas.xmlsoap.org/ws/2004/03/addressing/role/anonymous
This is some text 2 Some Other Text
axiom-1.2.8/modules/axiom-tests/test-resources/soap/sample1.txt0000644000000000000000000000053311131637476023330 0ustar rootrootPOST /axis/services/EchoService HTTP/1.1 Host: 127.0.0.1 Content-Type: application/soap+xml; charset="utf-8" axiom-1.2.8/modules/axiom-tests/test-resources/soap/minimalMessage.xml0000644000000000000000000000166211131637476024706 0ustar rootroot axiom-1.2.8/modules/axiom-tests/test-resources/soap/soap12RoleMessage.xml0000644000000000000000000000366011131637476025207 0ustar rootroot Going all the way baby! I'm so next. Please don't process me! I'm only going to special, customized places. Going all the way baby! (no role) Going all the way baby! (empty role) This is a test, this is only a test... axiom-1.2.8/modules/axiom-tests/test-resources/soap/sample1.xml0000644000000000000000000000210011131637476023301 0ustar rootroot axiom-1.2.8/modules/axiom-tests/test-resources/soap/invalidMustUnderstandSOAP12.xml0000644000000000000000000000242711131637476027130 0ustar rootroot foo axiom-1.2.8/modules/axiom-tests/test-resources/soap/soap12message.xml0000644000000000000000000000610011131637476024415 0ustar rootroot foo foo foo env:Sender m:MessageTimeout In First Subcode m:MessageTimeout In Second Subcode m:MessageTimeout In Third Subcode Sender Timeout http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver ultimateReceiver Details of error P5M\n P3M\n axiom-1.2.8/modules/axiom-tests/test-resources/soap/whitespacedMessage.xml0000644000000000000000000000313411131637476025554 0ustar rootroot uuid:920C5190-0B8F-11D9-8CED-F22EDEEBF7E5 http://localhost:8081/axis/services/BankPort
http://schemas.xmlsoap.org/ws/2004/03/addressing/role/anonymous
axiom-1.2.8/modules/axiom-tests/test-resources/soap/reallyReallyBigMessage.xml0000644000000000000000000033260511131637476026347 0ustar rootroot axiom-1.2.8/modules/axiom-tests/test-resources/soap/soapmessage1.xml0000644000000000000000000000413711131637476024343 0ustar rootroot uuid:920C5190-0B8F-11D9-8CED-F22EDEEBF7E5 http://localhost:8081/axis/services/BankPort
http://schemas.xmlsoap.org/ws/2004/03/addressing/role/anonymous
1001
axiom-1.2.8/modules/axiom-tests/pom.xml0000644000000000000000000001272511131637500016603 0ustar rootroot 4.0.0 org.apache.ws.commons.axiom axiom 1.2.8 axiom-tests Axiom Test Suite 1.2.8 The Axiom test suite. This ought to be split into several parts and be made a part of axiom-api, axiom-impl and axiom-dom. However, that's not as easy as it seems. The intention is to start with axiom-test and continuosly move parts to the actual projects. org.apache.ws.commons.axiom axiom-api ${version} org.apache.geronimo.specs geronimo-javamail_1.4_spec org.apache.ws.commons.axiom axiom-impl ${version} org.apache.geronimo.specs geronimo-javamail_1.4_spec org.apache.ws.commons.axiom axiom-dom ${version} org.apache.geronimo.specs geronimo-javamail_1.4_spec org.apache.geronimo.specs geronimo-activation_1.1_spec javax.mail mail 1.4 jaxen jaxen commons-logging commons-logging junit junit xmlunit xmlunit org.apache.geronimo.specs geronimo-stax-api_1.0_spec compile ${stax.impl.groupid} ${stax.impl.artifact} org.apache.ws.commons.axiom axiom-impl tests ${version} test org.apache.ws.commons.axiom axiom-dom tests ${version} test maven-surefire-plugin **/*Test.java **/*TestCase.java **/*AbstractOMSerializationTest.java java.awt.headless true axiom-1.2.8/pom.xml0000644000000000000000000005436511131637500012664 0ustar rootroot 4.0.0 org.apache.ws.commons.axiom axiom Axiom 1.2.8 pom AXIOM API http://ws.apache.org/commons/axiom/ JIRA http://issues.apache.org/jira/browse/WSCOMMONS Continuum unknown false false false false
commons-dev@ws.apache.org
WS Commons Developers commons-dev-subscribe@ws.apache.org commons-dev-unsubscribe@ws.apache.org commons-dev@ws.apache.org http://mail-archives.apache.org/mod_mbox/ws-commons-dev/ 2004 Saminda Abeyruwan saminda saminda AT wso2.com WSO2 Afkham Azeez azeez azeez AT wso2.com WSO2 Eran Chinthaka chinthaka chinthaka AT wso2.com WSO2 http://www.apache.org/~chinthaka Glen Daniels gdaniels gdaniels AT apache.org Sonic Software Jaliya Ekanayake jaliya jaliya AT opensource.lk Virtusa / Lanka Software Foundation http://www.apache.org/~jaliya Nandana Mihindukulasooriya nandana nandana AT wso2.com WSO2 Ruchith Fernando ruchith ruchith AT wso2.com WSO2 thilina Thilina Gunarathne thilina AT wso2.com http://www.apache.org/~thilina WSO2 Chathura Herath chathura chathura AT opensource.lk LSF/MIT www.apache.org/~chathura Deepal Jayasinghe deepal deepal AT wso2.com WSO2 http://www.apache.org/~deepal Chatra Nakkawita chatra chatra AT WSO2.com WSO2 Srinath Perera hemapani hemapani AT apache.org Lanka Software Foundation http://www.apache.org/~hemapani Ajith Ranabahu ajith ajith AT wso2.com WSO2 http://www.apache.org/~ajith Venkat Reddy venkat vreddyp AT gmail.com Computer Associates Rich Scheuerle scheu scheu AT us.ibm.com IBM Ashutosh Shahi ashu Ashutosh.Shahi AT ca.com Computer Associates Aleksander Slominski alek aslom AT cs.indiana.edu Indiana University Extreme! Computing Lab Davanum Srinivas dims dims AT wso2.com WSO2 Jayachandra Sekhara Rao Sunkara jaya jayachandra AT gmail.com Computer Associates Andreas Veithen veithen veithen AT apache.org http://www.linkedin.com/in/aveithen Dasarath Weerathunga dasarath dasarath AT opensource.lk Lanka Software Foundation Sanjiva Weerawarana sanjiva sanjiva AT wso2.com WSO2 Dharshana Dias Lanka Software Foundation / University of Moratuwa Anushka Kumara anushkakumar AT gmail.com Lanka Software Foundation / University of Moratuwa Chinthaka Thilakarathne Lanka Software Foundation / University of Moratuwa Jochen Wiedmann jochen.wiedmann AT gmail.com The Apache Software License, Version 2.0 http://www.apache.org/licenses/LICENSE-2.0.txt repo scm:svn:http://svn.apache.org/repos/asf/webservices/commons/tags/axiom/1.2.8 scm:svn:https://svn.apache.org/repos/asf/webservices/commons/tags/axiom/1.2.8 http://svn.apache.org/viewcvs.cgi/webservices/commons/tags/axiom/1.2.8 The Apache Software Foundation http://www.apache.org/ jdk15 1.5 modules/axiom-integration jdk16 1.6 modules/axiom-integration release release org.apache.maven.plugins maven-release-plugin https://svn.apache.org/repos/asf/webservices/commons/tags/axiom false deploy -Prelease clean install true org.apache.maven.plugins maven-deploy-plugin ${deploy.altRepository} true true org.apache.maven.plugins maven-source-plugin jar true org.apache.maven.plugins maven-gpg-plugin sign rc rc org.apache.maven.plugins maven-release-plugin 2.0-beta-8 org.apache.maven.plugins maven-assembly-plugin src/main/assembly/jar.xml src/main/assembly/bin.xml src/main/assembly/src.xml gnu maven-compiler-plugin true 1.3 1.3 org.apache.maven.plugins maven-assembly-plugin maven-source-plugin jar true snapshot Snapshot repository http://snapshots.maven.codehaus.org/maven2/ true false snapshot-apache Apache Snapshot repository http://people.apache.org/repo/m2-snapshot-repository true false xml-apis xml-apis 1.3.04 org.apache.geronimo.specs geronimo-stax-api_1.0_spec 1.0.1 org.apache.geronimo.specs geronimo-activation_1.1_spec 1.0.1 org.apache.geronimo.specs geronimo-javamail_1.4_spec 1.2 commons-logging commons-logging 1.1.1 avalon-framework avalon-framework logkit logkit log4j log4j ${stax.impl.groupid} ${stax.impl.artifact} ${stax.impl.version} stax stax-api jaxen jaxen 1.1.1 dom4j dom4j xom xom jdom jdom xerces xmlParserAPIs junit junit 3.8.2 test xmlunit xmlunit 1.1 test maven-project-info-reports-plugin org.codehaus.mojo jdepend-maven-plugin 2.0-beta-1 org.apache.maven.plugins maven-javadoc-plugin true javadoc maven-site-plugin false apache-repo Maven Central Repository scpexe://people.apache.org//www/people.apache.org/repo/m2-ibiblio-rsync-repository apache-snapshots Apache Development Repository scpexe://people.apache.org//www/people.apache.org/repo/m2-snapshot-repository false website scpexe://people.apache.org/www/ws.apache.org/commons/axiom modules/axiom-api modules/axiom-impl modules/axiom-dom modules/axiom-c14n modules/axiom-tests ${pom.version} ${pom.version} org.codehaus.woodstox wstx-asl 3.2.4 1.4.0 false
axiom-1.2.8/NOTICE.txt0000644000000000000000000000122511131637500013054 0ustar rootroot ========================================================================= == NOTICE file corresponding to the section 4 d of == == the Apache License, Version 2.0, == == in this case for the Apache AXIOM distribution. == ========================================================================= This product includes software developed by The Apache Software Foundation (http://www.apache.org/). Portions Copyright 2006 International Business Machines Corp. Please read the different LICENSE files present in the licenses directory of this distribution.