1*d353a188SXin LiApache License 2*d353a188SXin Li-------------- 3*d353a188SXin Li 4*d353a188SXin Li Version 2.0, January 2004 5*d353a188SXin Li http://www.apache.org/licenses/ 6*d353a188SXin Li 7*d353a188SXin Li TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 8*d353a188SXin Li 9*d353a188SXin Li 1. Definitions. 10*d353a188SXin Li 11*d353a188SXin Li "License" shall mean the terms and conditions for use, reproduction, 12*d353a188SXin Li and distribution as defined by Sections 1 through 9 of this document. 13*d353a188SXin Li 14*d353a188SXin Li "Licensor" shall mean the copyright owner or entity authorized by 15*d353a188SXin Li the copyright owner that is granting the License. 16*d353a188SXin Li 17*d353a188SXin Li "Legal Entity" shall mean the union of the acting entity and all 18*d353a188SXin Li other entities that control, are controlled by, or are under common 19*d353a188SXin Li control with that entity. For the purposes of this definition, 20*d353a188SXin Li "control" means (i) the power, direct or indirect, to cause the 21*d353a188SXin Li direction or management of such entity, whether by contract or 22*d353a188SXin Li otherwise, or (ii) ownership of fifty percent (50%) or more of the 23*d353a188SXin Li outstanding shares, or (iii) beneficial ownership of such entity. 24*d353a188SXin Li 25*d353a188SXin Li "You" (or "Your") shall mean an individual or Legal Entity 26*d353a188SXin Li exercising permissions granted by this License. 27*d353a188SXin Li 28*d353a188SXin Li "Source" form shall mean the preferred form for making modifications, 29*d353a188SXin Li including but not limited to software source code, documentation 30*d353a188SXin Li source, and configuration files. 31*d353a188SXin Li 32*d353a188SXin Li "Object" form shall mean any form resulting from mechanical 33*d353a188SXin Li transformation or translation of a Source form, including but 34*d353a188SXin Li not limited to compiled object code, generated documentation, 35*d353a188SXin Li and conversions to other media types. 36*d353a188SXin Li 37*d353a188SXin Li "Work" shall mean the work of authorship, whether in Source or 38*d353a188SXin Li Object form, made available under the License, as indicated by a 39*d353a188SXin Li copyright notice that is included in or attached to the work 40*d353a188SXin Li (an example is provided in the Appendix below). 41*d353a188SXin Li 42*d353a188SXin Li "Derivative Works" shall mean any work, whether in Source or Object 43*d353a188SXin Li form, that is based on (or derived from) the Work and for which the 44*d353a188SXin Li editorial revisions, annotations, elaborations, or other modifications 45*d353a188SXin Li represent, as a whole, an original work of authorship. For the purposes 46*d353a188SXin Li of this License, Derivative Works shall not include works that remain 47*d353a188SXin Li separable from, or merely link (or bind by name) to the interfaces of, 48*d353a188SXin Li the Work and Derivative Works thereof. 49*d353a188SXin Li 50*d353a188SXin Li "Contribution" shall mean any work of authorship, including 51*d353a188SXin Li the original version of the Work and any modifications or additions 52*d353a188SXin Li to that Work or Derivative Works thereof, that is intentionally 53*d353a188SXin Li submitted to Licensor for inclusion in the Work by the copyright owner 54*d353a188SXin Li or by an individual or Legal Entity authorized to submit on behalf of 55*d353a188SXin Li the copyright owner. For the purposes of this definition, "submitted" 56*d353a188SXin Li means any form of electronic, verbal, or written communication sent 57*d353a188SXin Li to the Licensor or its representatives, including but not limited to 58*d353a188SXin Li communication on electronic mailing lists, source code control systems, 59*d353a188SXin Li and issue tracking systems that are managed by, or on behalf of, the 60*d353a188SXin Li Licensor for the purpose of discussing and improving the Work, but 61*d353a188SXin Li excluding communication that is conspicuously marked or otherwise 62*d353a188SXin Li designated in writing by the copyright owner as "Not a Contribution." 63*d353a188SXin Li 64*d353a188SXin Li "Contributor" shall mean Licensor and any individual or Legal Entity 65*d353a188SXin Li on behalf of whom a Contribution has been received by Licensor and 66*d353a188SXin Li subsequently incorporated within the Work. 67*d353a188SXin Li 68*d353a188SXin Li 2. Grant of Copyright License. Subject to the terms and conditions of 69*d353a188SXin Li this License, each Contributor hereby grants to You a perpetual, 70*d353a188SXin Li worldwide, non-exclusive, no-charge, royalty-free, irrevocable 71*d353a188SXin Li copyright license to reproduce, prepare Derivative Works of, 72*d353a188SXin Li publicly display, publicly perform, sublicense, and distribute the 73*d353a188SXin Li Work and such Derivative Works in Source or Object form. 74*d353a188SXin Li 75*d353a188SXin Li 3. Grant of Patent License. Subject to the terms and conditions of 76*d353a188SXin Li this License, each Contributor hereby grants to You a perpetual, 77*d353a188SXin Li worldwide, non-exclusive, no-charge, royalty-free, irrevocable 78*d353a188SXin Li (except as stated in this section) patent license to make, have made, 79*d353a188SXin Li use, offer to sell, sell, import, and otherwise transfer the Work, 80*d353a188SXin Li where such license applies only to those patent claims licensable 81*d353a188SXin Li by such Contributor that are necessarily infringed by their 82*d353a188SXin Li Contribution(s) alone or by combination of their Contribution(s) 83*d353a188SXin Li with the Work to which such Contribution(s) was submitted. If You 84*d353a188SXin Li institute patent litigation against any entity (including a 85*d353a188SXin Li cross-claim or counterclaim in a lawsuit) alleging that the Work 86*d353a188SXin Li or a Contribution incorporated within the Work constitutes direct 87*d353a188SXin Li or contributory patent infringement, then any patent licenses 88*d353a188SXin Li granted to You under this License for that Work shall terminate 89*d353a188SXin Li as of the date such litigation is filed. 90*d353a188SXin Li 91*d353a188SXin Li 4. Redistribution. You may reproduce and distribute copies of the 92*d353a188SXin Li Work or Derivative Works thereof in any medium, with or without 93*d353a188SXin Li modifications, and in Source or Object form, provided that You 94*d353a188SXin Li meet the following conditions: 95*d353a188SXin Li 96*d353a188SXin Li (a) You must give any other recipients of the Work or 97*d353a188SXin Li Derivative Works a copy of this License; and 98*d353a188SXin Li 99*d353a188SXin Li (b) You must cause any modified files to carry prominent notices 100*d353a188SXin Li stating that You changed the files; and 101*d353a188SXin Li 102*d353a188SXin Li (c) You must retain, in the Source form of any Derivative Works 103*d353a188SXin Li that You distribute, all copyright, patent, trademark, and 104*d353a188SXin Li attribution notices from the Source form of the Work, 105*d353a188SXin Li excluding those notices that do not pertain to any part of 106*d353a188SXin Li the Derivative Works; and 107*d353a188SXin Li 108*d353a188SXin Li (d) If the Work includes a "NOTICE" text file as part of its 109*d353a188SXin Li distribution, then any Derivative Works that You distribute must 110*d353a188SXin Li include a readable copy of the attribution notices contained 111*d353a188SXin Li within such NOTICE file, excluding those notices that do not 112*d353a188SXin Li pertain to any part of the Derivative Works, in at least one 113*d353a188SXin Li of the following places: within a NOTICE text file distributed 114*d353a188SXin Li as part of the Derivative Works; within the Source form or 115*d353a188SXin Li documentation, if provided along with the Derivative Works; or, 116*d353a188SXin Li within a display generated by the Derivative Works, if and 117*d353a188SXin Li wherever such third-party notices normally appear. The contents 118*d353a188SXin Li of the NOTICE file are for informational purposes only and 119*d353a188SXin Li do not modify the License. You may add Your own attribution 120*d353a188SXin Li notices within Derivative Works that You distribute, alongside 121*d353a188SXin Li or as an addendum to the NOTICE text from the Work, provided 122*d353a188SXin Li that such additional attribution notices cannot be construed 123*d353a188SXin Li as modifying the License. 124*d353a188SXin Li 125*d353a188SXin Li You may add Your own copyright statement to Your modifications and 126*d353a188SXin Li may provide additional or different license terms and conditions 127*d353a188SXin Li for use, reproduction, or distribution of Your modifications, or 128*d353a188SXin Li for any such Derivative Works as a whole, provided Your use, 129*d353a188SXin Li reproduction, and distribution of the Work otherwise complies with 130*d353a188SXin Li the conditions stated in this License. 131*d353a188SXin Li 132*d353a188SXin Li 5. Submission of Contributions. Unless You explicitly state otherwise, 133*d353a188SXin Li any Contribution intentionally submitted for inclusion in the Work 134*d353a188SXin Li by You to the Licensor shall be under the terms and conditions of 135*d353a188SXin Li this License, without any additional terms or conditions. 136*d353a188SXin Li Notwithstanding the above, nothing herein shall supersede or modify 137*d353a188SXin Li the terms of any separate license agreement you may have executed 138*d353a188SXin Li with Licensor regarding such Contributions. 139*d353a188SXin Li 140*d353a188SXin Li 6. Trademarks. This License does not grant permission to use the trade 141*d353a188SXin Li names, trademarks, service marks, or product names of the Licensor, 142*d353a188SXin Li except as required for reasonable and customary use in describing the 143*d353a188SXin Li origin of the Work and reproducing the content of the NOTICE file. 144*d353a188SXin Li 145*d353a188SXin Li 7. Disclaimer of Warranty. Unless required by applicable law or 146*d353a188SXin Li agreed to in writing, Licensor provides the Work (and each 147*d353a188SXin Li Contributor provides its Contributions) on an "AS IS" BASIS, 148*d353a188SXin Li WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 149*d353a188SXin Li implied, including, without limitation, any warranties or conditions 150*d353a188SXin Li of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 151*d353a188SXin Li PARTICULAR PURPOSE. You are solely responsible for determining the 152*d353a188SXin Li appropriateness of using or redistributing the Work and assume any 153*d353a188SXin Li risks associated with Your exercise of permissions under this License. 154*d353a188SXin Li 155*d353a188SXin Li 8. Limitation of Liability. In no event and under no legal theory, 156*d353a188SXin Li whether in tort (including negligence), contract, or otherwise, 157*d353a188SXin Li unless required by applicable law (such as deliberate and grossly 158*d353a188SXin Li negligent acts) or agreed to in writing, shall any Contributor be 159*d353a188SXin Li liable to You for damages, including any direct, indirect, special, 160*d353a188SXin Li incidental, or consequential damages of any character arising as a 161*d353a188SXin Li result of this License or out of the use or inability to use the 162*d353a188SXin Li Work (including but not limited to damages for loss of goodwill, 163*d353a188SXin Li work stoppage, computer failure or malfunction, or any and all 164*d353a188SXin Li other commercial damages or losses), even if such Contributor 165*d353a188SXin Li has been advised of the possibility of such damages. 166*d353a188SXin Li 167*d353a188SXin Li 9. Accepting Warranty or Additional Liability. While redistributing 168*d353a188SXin Li the Work or Derivative Works thereof, You may choose to offer, 169*d353a188SXin Li and charge a fee for, acceptance of support, warranty, indemnity, 170*d353a188SXin Li or other liability obligations and/or rights consistent with this 171*d353a188SXin Li License. However, in accepting such obligations, You may act only 172*d353a188SXin Li on Your own behalf and on Your sole responsibility, not on behalf 173*d353a188SXin Li of any other Contributor, and only if You agree to indemnify, 174*d353a188SXin Li defend, and hold each Contributor harmless for any liability 175*d353a188SXin Li incurred by, or claims asserted against, such Contributor by reason 176*d353a188SXin Li of your accepting any such warranty or additional liability. 177*d353a188SXin Li 178*d353a188SXin Li END OF TERMS AND CONDITIONS 179*d353a188SXin Li 180*d353a188SXin Li APPENDIX: How to apply the Apache License to your work. 181*d353a188SXin Li 182*d353a188SXin Li To apply the Apache License to your work, attach the following 183*d353a188SXin Li boilerplate notice, with the fields enclosed by brackets "{}" 184*d353a188SXin Li replaced with your own identifying information. (Don't include 185*d353a188SXin Li the brackets!) The text should be enclosed in the appropriate 186*d353a188SXin Li comment syntax for the file format. We also recommend that a 187*d353a188SXin Li file or class name and description of purpose be included on the 188*d353a188SXin Li same "printed page" as the copyright notice for easier 189*d353a188SXin Li identification within third-party archives. 190*d353a188SXin Li 191*d353a188SXin Li Copyright {yyyy} {name of copyright owner} 192*d353a188SXin Li 193*d353a188SXin Li Licensed under the Apache License, Version 2.0 (the "License"); 194*d353a188SXin Li you may not use this file except in compliance with the License. 195*d353a188SXin Li You may obtain a copy of the License at 196*d353a188SXin Li 197*d353a188SXin Li http://www.apache.org/licenses/LICENSE-2.0 198*d353a188SXin Li 199*d353a188SXin Li Unless required by applicable law or agreed to in writing, software 200*d353a188SXin Li distributed under the License is distributed on an "AS IS" BASIS, 201*d353a188SXin Li WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 202*d353a188SXin Li See the License for the specific language governing permissions and 203*d353a188SXin Li limitations under the License. 204