[
  {
    "path": ".gitignore",
    "content": "/data\n/work\n/logs\n/.idea\n/target\n.DS_Store\n*.iml\n/.project\n/.settings\n/.classpath\n/plugin_tools\n/.local-execution-hints.log\n/.local-*-execution-hints.log\n/eclipse-build/\nbuild/\n**/.local*\ngenerated-resources/\n.gradle/\n/bin/\n"
  },
  {
    "path": "CONTRIBUTING.md",
    "content": "Contributing to elasticsearch\n=============================\n\nElasticsearch is an open source project and we love to receive contributions from our community — you! There are many ways to contribute, from writing tutorials or blog posts, improving the documentation, submitting bug reports and feature requests or writing code which can be incorporated into Elasticsearch itself.\n\nBug reports\n-----------\n\nIf you think you have found a bug in Elasticsearch, first make sure that you are testing against the [latest version of Elasticsearch](http://www.elasticsearch.org/download/) - your issue may already have been fixed. If not, search our [issues list](https://github.com/elasticsearch/elasticsearch/issues) on GitHub in case a similar issue has already been opened.\n\nIt is very helpful if you can prepare a reproduction of the bug. In other words, provide a small test case which we can run to confirm your bug. It makes it easier to find the problem and to fix it. Test cases should be provided as `curl` commands which we can copy and paste into a terminal to run it locally, for example:\n\n```sh\n# delete the index\ncurl -XDELETE localhost:9200/test\n\n# insert a document\ncurl -XPUT localhost:9200/test/test/1 -d '{\n \"title\": \"test document\"\n}'\n\n# this should return XXXX but instead returns YYY\ncurl ....\n```\n\nProvide as much information as you can. You may think that the problem lies with your query, when actually it depends on how your data is indexed. The easier it is for us to recreate your problem, the faster it is likely to be fixed.\n\nFeature requests\n----------------\n\nIf you find yourself wishing for a feature that doesn't exist in Elasticsearch, you are probably not alone. There are bound to be others out there with similar needs. Many of the features that Elasticsearch has today have been added because our users saw the need.\nOpen an issue on our [issues list](https://github.com/elasticsearch/elasticsearch/issues) on GitHub which describes the feature you would like to see, why you need it, and how it should work.\n\nContributing code and documentation changes\n-------------------------------------------\n\nIf you have a bugfix or new feature that you would like to contribute to Elasticsearch, please find or open an issue about it first. Talk about what you would like to do. It may be that somebody is already working on it, or that there are particular issues that you should know about before implementing the change.\n\nWe enjoy working with contributors to get their code accepted. There are many approaches to fixing a problem and it is important to find the best approach before writing too much code.\n\nThe process for contributing to any of the [Elasticsearch repositories](https://github.com/elasticsearch/) is similar. Details for individual projects can be found below.\n\n### Fork and clone the repository\n\nYou will need to fork the main Elasticsearch code or documentation repository and clone it to your local machine. See \n[github help page](https://help.github.com/articles/fork-a-repo) for help.\n\nFurther instructions for specific projects are given below.\n\n### Submitting your changes\n\nOnce your changes and tests are ready to submit for review:\n\n1. Test your changes\nRun the test suite to make sure that nothing is broken.\n\n2. Sign the Contributor License Agreement\nPlease make sure you have signed our [Contributor License Agreement](http://www.elasticsearch.org/contributor-agreement/). We are not asking you to assign copyright to us, but to give us the right to distribute your code without restriction. We ask this of all contributors in order to assure our users of the origin and continuing existence of the code. You only need to sign the CLA once.\n\n3. Rebase your changes\nUpdate your local repository with the most recent code from the main Elasticsearch repository, and rebase your branch on top of the latest master branch. We prefer your changes to be squashed into a single commit.\n\n4. Submit a pull request\nPush your local changes to your forked copy of the repository and [submit a pull request](https://help.github.com/articles/using-pull-requests). In the pull request, describe what your changes do and mention the number of the issue where discussion has taken place, eg \"Closes #123\".\n\nThen sit back and wait. There will probably be discussion about the pull request and, if any changes are needed, we would love to work with you to get your pull request merged into Elasticsearch.\n\n\nContributing to the Elasticsearch plugin\n----------------------------------------\n\n**Repository:** [https://github.com/elasticsearch/elasticsearch-mapper-attachments](https://github.com/elasticsearch/elasticsearch-mapper-attachments)\n\nMake sure you have [Maven](http://maven.apache.org) installed, as Elasticsearch uses it as its build system. Integration with IntelliJ and Eclipse should work out of the box. Eclipse users can automatically configure their IDE by running `mvn eclipse:eclipse` and then importing the project into their workspace: `File > Import > Existing project into workspace`.\n\nPlease follow these formatting guidelines:\n\n* Java indent is 4 spaces\n* Line width is 140 characters\n* The rest is left to Java coding standards\n* Disable “auto-format on save” to prevent unnecessary format changes. This makes reviews much harder as it generates unnecessary formatting changes. If your IDE supports formatting only modified chunks that is fine to do.\n\nTo create a distribution from the source, simply run:\n\n```sh\ncd elasticsearch-mapper-attachments/\nmvn clean package -DskipTests\n```\n\nYou will find the newly built packages under: `./target/releases/`.\n\nBefore submitting your changes, run the test suite to make sure that nothing is broken, with:\n\n```sh\nmvn clean test\n```\n\nSource: [Contributing to elasticsearch](http://www.elasticsearch.org/contributing-to-elasticsearch/)\n"
  },
  {
    "path": "LICENSE.txt",
    "content": "\n                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright [yyyy] [name of copyright owner]\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n"
  },
  {
    "path": "README.md",
    "content": "**IMPORTANT**: this project now Read-Only and moved to elasticsearch repository (from elasticsearch 2.2.0): \n\n* [mapper-attachments](https://github.com/elastic/elasticsearch/tree/5.6/plugins/mapper-attachments) ([documentation](https://www.elastic.co/guide/en/elasticsearch/plugins/5.6/mapper-attachments.html))\n\nIf you have a question about the plugin, please use [discuss.elastic.co](https://discuss.elastic.co/c/elasticsearch). \nIf you want to report a bug, please use [elasticsearch repository](https://github.com/elastic/elasticsearch/issues/new).\n\n---\n\nMapper Attachments Type for Elasticsearch\n=========================================\n\nThe mapper attachments plugin lets Elasticsearch index file attachments in over a thousand formats (such as PPT, XLS, PDF) using the Apache text extraction library [Tika](http://lucene.apache.org/tika/).\n\nIn practice, the plugin adds the `attachment` type when mapping properties so that documents can be populated with file attachment contents (encoded as `base64`).\n\nInstallation\n------------\n\nIn order to install the plugin, run:\n\n```sh\nbin/plugin install elasticsearch/elasticsearch-mapper-attachments/3.1.2\n```\n\nYou need to install a version matching your Elasticsearch version:\n\n|       Elasticsearch    | Attachments Plugin|                                                             Docs                                                                   |\n|------------------------|-------------------|------------------------------------------------------------------------------------------------------------------------------------|\n|    > 2.1 < 6.0         | elasticsearch repository | [github](https://github.com/elastic/elasticsearch/tree/5.x/plugins/mapper-attachments)                  |\n|    es-2.1              | Build from source | [es-2.1](https://github.com/elastic/elasticsearch-mapper-attachments/tree/es-2.1/)                  |\n|    2.1.2               |     3.1.2         | [3.1.2](https://github.com/elastic/elasticsearch-mapper-attachments/tree/v3.1.2/#version-312-for-elasticsearch-21)                  |\n|    2.1.1               |     3.1.1         | [3.1.1](https://github.com/elastic/elasticsearch-mapper-attachments/tree/v3.1.1/#version-311-for-elasticsearch-21)                  |\n|    2.1.0               |     3.1.0         | [3.1.0](https://github.com/elastic/elasticsearch-mapper-attachments/tree/v3.1.0/#version-310-for-elasticsearch-21)                  |\n|    es-2.0              | Build from source | [es-2.0](https://github.com/elastic/elasticsearch-mapper-attachments/tree/es-2.0/)                  |\n|    2.0.2               |     3.0.4         | [3.0.4](https://github.com/elastic/elasticsearch-mapper-attachments/tree/v3.0.4/#version-304-for-elasticsearch-20)                  |\n|    2.0.1               |     3.0.3         | [3.0.3](https://github.com/elastic/elasticsearch-mapper-attachments/tree/v3.0.3/#version-303-for-elasticsearch-20)                  |\n|    2.0.0               |     3.0.2         | [3.0.2](https://github.com/elastic/elasticsearch-mapper-attachments/tree/v3.0.2/#version-302-for-elasticsearch-20)                  |\n|    2.0.0-beta2         |     3.0.1         | [3.0.1](https://github.com/elastic/elasticsearch-mapper-attachments/tree/v3.0.1/#version-301-for-elasticsearch-20)                  |\n|    2.0.0-beta1         |     3.0.0         | [3.0.0](https://github.com/elastic/elasticsearch-mapper-attachments/tree/v3.0.0/#version-300-for-elasticsearch-20)                  |\n|    es-1.7              |     2.7.1         | [2.7.1](https://github.com/elastic/elasticsearch-mapper-attachments/tree/v2.7.1/#version-271-for-elasticsearch-17)                  |\n|    es-1.6              |     2.6.0         | [2.6.0](https://github.com/elastic/elasticsearch-mapper-attachments/tree/v2.6.0/#version-260-for-elasticsearch-16)                  |\n|    es-1.5              |     2.5.0         | [2.5.0](https://github.com/elastic/elasticsearch-mapper-attachments/tree/v2.5.0/#version-250-for-elasticsearch-15)                  |\n|    es-1.4              |     2.4.3         | [2.4.3](https://github.com/elasticsearch/elasticsearch-mapper-attachments/tree/v2.4.3/#version-243-for-elasticsearch-14)                  |\n|    es-1.3              |     2.3.2         | [2.3.2](https://github.com/elasticsearch/elasticsearch-mapper-attachments/tree/v2.3.2/#version-232-for-elasticsearch-13)                  |\n|    es-1.2              |     2.2.1         | [2.2.1](https://github.com/elasticsearch/elasticsearch-mapper-attachments/tree/v2.2.1/#version-221-for-elasticsearch-12)                  |\n|    es-1.1              |     2.0.0         | [2.0.0](https://github.com/elasticsearch/elasticsearch-mapper-attachments/tree/v2.0.0/#mapper-attachments-type-for-elasticsearch)  |\n|    es-1.0              |     2.0.0         | [2.0.0](https://github.com/elasticsearch/elasticsearch-mapper-attachments/tree/v2.0.0/#mapper-attachments-type-for-elasticsearch)  |\n|    es-0.90             |     1.9.0         | [1.9.0](https://github.com/elasticsearch/elasticsearch-mapper-attachments/tree/v1.9.0/#mapper-attachments-type-for-elasticsearch)  |\n\nTo build a `SNAPSHOT` version, you need to build it with Maven:\n\n```bash\ngradle clean assemble\nplugin --install mapper-attachments \\\n       --url file:target/releases/elasticsearch-mapper-attachments-X.X.X-SNAPSHOT.zip\n```\n\nHello, world\n------------\n\nCreate a property mapping using the new type `attachment`:\n\n```javascript\nPOST /trying-out-mapper-attachments\n{\n  \"mappings\": {\n    \"person\": {\n      \"properties\": {\n        \"cv\": { \"type\": \"attachment\" }\n}}}}\n```\n\nIndex a new document populated with a `base64`-encoded attachment:\n\n```javascript\nPOST /trying-out-mapper-attachments/person/1\n{\n  \"cv\": \"e1xydGYxXGFuc2kNCkxvcmVtIGlwc3VtIGRvbG9yIHNpdCBhbWV0DQpccGFyIH0=\"\n}\n```\n\nSearch for the document using words in the attachment:\n\n```javascript\nPOST /trying-out-mapper-attachments/person/_search\n{\n  \"query\": {\n    \"query_string\": {\n      \"query\": \"ipsum\"\n}}}\n```\n\nIf you get a hit for your indexed document, the plugin should be installed and working.\n\nUsage\n------------------------\n\nUsing the attachment type is simple, in your mapping JSON, simply set a certain JSON element as attachment, for example:\n\n```javascript\nPUT /test\nPUT /test/person/_mapping\n{\n    \"person\" : {\n        \"properties\" : {\n            \"my_attachment\" : { \"type\" : \"attachment\" }\n        }\n    }\n}\n```\n\nIn this case, the JSON to index can be:\n\n```javascript\nPUT /test/person/1\n{\n    \"my_attachment\" : \"... base64 encoded attachment ...\"\n}\n```\n\nOr it is possible to use more elaborated JSON if content type, resource name or language need to be set explicitly:\n\n```\nPUT /test/person/1\n{\n    \"my_attachment\" : {\n        \"_content_type\" : \"application/pdf\",\n        \"_name\" : \"resource/name/of/my.pdf\",\n        \"_language\" : \"en\",\n        \"_content\" : \"... base64 encoded attachment ...\"\n    }\n}\n```\n\nThe `attachment` type not only indexes the content of the doc in `content` sub field, but also automatically adds meta \ndata on the attachment as well (when available).\n\nThe metadata supported are:\n\n* `date`\n* `title`\n* `name` only available if you set `_name` see above\n* `author`\n* `keywords`\n* `content_type`\n* `content_length` is the original content_length before text extraction (aka file size)\n* `language`\n\nThey can be queried using the \"dot notation\", for example: `my_attachment.author`.\n\nBoth the meta data and the actual content are simple core type mappers (string, date, ...), thus, they can be controlled\nin the mappings. For example:\n\n```javascript\nPUT /test/person/_mapping\n{\n    \"person\" : {\n        \"properties\" : {\n            \"file\" : {\n                \"type\" : \"attachment\",\n                \"fields\" : {\n                    \"content\" : {\"index\" : \"no\"},\n                    \"title\" : {\"store\" : \"yes\"},\n                    \"date\" : {\"store\" : \"yes\"},\n                    \"author\" : {\"analyzer\" : \"myAnalyzer\"},\n                    \"keywords\" : {\"store\" : \"yes\"},\n                    \"content_type\" : {\"store\" : \"yes\"},\n                    \"content_length\" : {\"store\" : \"yes\"},\n                    \"language\" : {\"store\" : \"yes\"}\n                }\n            }\n        }\n    }\n}\n```\n\nIn the above example, the actual content indexed is mapped under `fields` name `content`, and we decide not to index it, so\nit will only be available in the `_all` field. The other fields map to their respective metadata names, but there is no\nneed to specify the `type` (like `string` or `date`) since it is already known.\n\nCopy To feature\n---------------\n\nIf you want to use [copy_to](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping-core-types.html#copy-to)\nfeature, you need to define it on each sub-field you want to copy to another field:\n\n```javascript\nPUT /test/person/_mapping\n{\n  \"person\": {\n    \"properties\": {\n      \"file\": {\n        \"type\": \"attachment\",\n        \"fields\": {\n          \"content\": {\n            \"type\": \"string\",\n            \"copy_to\": \"copy\"\n          }\n        }\n      },\n      \"copy\": {\n        \"type\": \"string\"\n      }\n    }\n  }\n}\n```\n\nIn this example, the extracted content will be copy as well to `copy` field.\n\nQuerying or accessing metadata\n------------------------------\n\nIf you need to query on metadata fields, use the attachment field name dot the metadata field. For example:\n\n```\nDELETE /test\nPUT /test\nPUT /test/person/_mapping\n{\n  \"person\": {\n    \"properties\": {\n      \"file\": {\n        \"type\": \"attachment\",\n        \"fields\": {\n          \"content_type\": {\n            \"type\": \"string\",\n            \"store\": true\n          }\n        }\n      }\n    }\n  }\n}\nPUT /test/person/1?refresh=true\n{\n  \"file\": \"IkdvZCBTYXZlIHRoZSBRdWVlbiIgKGFsdGVybmF0aXZlbHkgIkdvZCBTYXZlIHRoZSBLaW5nIg==\"\n}\nGET /test/person/_search\n{\n  \"fields\": [ \"file.content_type\" ],\n  \"query\": {\n    \"match\": {\n      \"file.content_type\": \"text plain\"\n    }\n  }\n}\n```\n\nWill give you:\n\n```\n{\n   \"took\": 2,\n   \"timed_out\": false,\n   \"_shards\": {\n      \"total\": 5,\n      \"successful\": 5,\n      \"failed\": 0\n   },\n   \"hits\": {\n      \"total\": 1,\n      \"max_score\": 0.16273327,\n      \"hits\": [\n         {\n            \"_index\": \"test\",\n            \"_type\": \"person\",\n            \"_id\": \"1\",\n            \"_score\": 0.16273327,\n            \"fields\": {\n               \"file.content_type\": [\n                  \"text/plain; charset=ISO-8859-1\"\n               ]\n            }\n         }\n      ]\n   }\n}\n```\n\nIndexed Characters\n------------------\n\nBy default, `100000` characters are extracted when indexing the content. This default value can be changed by setting\nthe `index.mapping.attachment.indexed_chars` setting. It can also be provided on a per document indexed using the\n`_indexed_chars` parameter. `-1` can be set to extract all text, but note that all the text needs to be allowed to be\nrepresented in memory:\n\n```\nPUT /test/person/1\n{\n    \"my_attachment\" : {\n        \"_indexed_chars\" : -1,\n        \"_content\" : \"... base64 encoded attachment ...\"\n    }\n}\n```\n\nMetadata parsing error handling\n-------------------------------\n\nWhile extracting metadata content, errors could happen for example when parsing dates.\nParsing errors are ignored so your document is indexed.\n\nYou can disable this feature by setting the `index.mapping.attachment.ignore_errors` setting to `false`.\n\nLanguage Detection\n------------------\n\nBy default, language detection is disabled (`false`) as it could come with a cost.\nThis default value can be changed by setting the `index.mapping.attachment.detect_language` setting.\nIt can also be provided on a per document indexed using the `_detect_language` parameter.\n\nNote that you can force language using `_language` field when sending your actual document:\n\n```javascript\n{\n    \"my_attachment\" : {\n        \"_language\" : \"en\",\n        \"_content\" : \"... base64 encoded attachment ...\"\n    }\n}\n```\n\nHighlighting attachments\n------------------------\n\nIf you want to highlight your attachment content, you will need to set `\"store\": true` and `\"term_vector\":\"with_positions_offsets\"`\nfor your attachment field. Here is a full script which does it:\n\n```\nDELETE /test\nPUT /test\nPUT /test/person/_mapping\n{\n  \"person\": {\n    \"properties\": {\n      \"file\": {\n        \"type\": \"attachment\",\n        \"fields\": {\n          \"content\": {\n            \"type\": \"string\",\n            \"term_vector\":\"with_positions_offsets\",\n            \"store\": true\n          }\n        }\n      }\n    }\n  }\n}\nPUT /test/person/1?refresh=true\n{\n  \"file\": \"IkdvZCBTYXZlIHRoZSBRdWVlbiIgKGFsdGVybmF0aXZlbHkgIkdvZCBTYXZlIHRoZSBLaW5nIg==\"\n}\nGET /test/person/_search\n{\n  \"fields\": [],\n  \"query\": {\n    \"match\": {\n      \"file.content\": \"king queen\"\n    }\n  },\n  \"highlight\": {\n    \"fields\": {\n      \"file.content\": {\n      }\n    }\n  }\n}\n```\n\nIt gives back:\n\n```js\n{\n   \"took\": 9,\n   \"timed_out\": false,\n   \"_shards\": {\n      \"total\": 1,\n      \"successful\": 1,\n      \"failed\": 0\n   },\n   \"hits\": {\n      \"total\": 1,\n      \"max_score\": 0.13561106,\n      \"hits\": [\n         {\n            \"_index\": \"test\",\n            \"_type\": \"person\",\n            \"_id\": \"1\",\n            \"_score\": 0.13561106,\n            \"highlight\": {\n               \"file.content\": [\n                  \"\\\"God Save the <em>Queen</em>\\\" (alternatively \\\"God Save the <em>King</em>\\\"\\n\"\n               ]\n            }\n         }\n      ]\n   }\n}\n```\n\nStand alone runner\n------------------\n\nIf you want to run some tests within your IDE, you can use `StandaloneRunner` class.\nIt accepts arguments:\n\n*  `-u file://URL/TO/YOUR/DOC`\n*  `--size` set extracted size (default to mapper attachment size)\n*  `BASE64` encoded binary\n\nExample:\n\n```sh\nStandaloneRunner BASE64Text\nStandaloneRunner -u /tmp/mydoc.pdf\nStandaloneRunner -u /tmp/mydoc.pdf --size 1000000\n```\n\nIt produces something like:\n\n```\n## Extracted text\n--------------------- BEGIN -----------------------\nThis is the extracted text\n---------------------- END ------------------------\n## Metadata\n- author: null\n- content_length: null\n- content_type: application/pdf\n- date: null\n- keywords: null\n- language: null\n- name: null\n- title: null\n```\n\nLicense\n-------\n\n    This software is licensed under the Apache 2 license, quoted below.\n\n    Copyright 2009-2014 Elasticsearch <http://www.elasticsearch.org>\n\n    Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\n    use this file except in compliance with the License. You may obtain a copy of\n    the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n    License for the specific language governing permissions and limitations under\n    the License.\n"
  },
  {
    "path": "build.gradle",
    "content": "/*\n * Licensed to Elasticsearch under one or more contributor\n * license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright\n * ownership. Elasticsearch licenses this file to you under\n * the Apache License, Version 2.0 (the \"License\"); you may\n * not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport org.elasticsearch.gradle.ElasticsearchProperties\nimport org.elasticsearch.gradle.precommit.DependencyLicensesTask\n\nbuildscript {\n  repositories {\n    mavenCentral()\n    maven {\n      name 'sonatype-snapshots'\n      url 'https://oss.sonatype.org/content/repositories/snapshots/'\n    }\n    jcenter()\n  }\n  dependencies {\n    classpath 'org.elasticsearch.gradle:build-tools:3.0.0-SNAPSHOT'\n  }\n}\napply plugin: 'idea'\napply plugin: 'eclipse'\napply plugin: 'elasticsearch.esplugin'\n\nesplugin {\n  name 'mapper-attachments'\n  description 'The mapper attachments plugin adds the attachment type to Elasticsearch using Apache Tika.'\n  classname 'org.elasticsearch.mapper.attachments.MapperAttachmentsPlugin'\n}\n\ngroup = 'org.elasticsearch.plugin'\nversion = ElasticsearchProperties.version\next.luceneVersion = ElasticsearchProperties.luceneVersion\nrepositories {\n  mavenCentral()\n  maven {\n    name 'sonatype-snapshots'\n    url 'https://oss.sonatype.org/content/repositories/snapshots/'\n  }\n  if (luceneVersion.contains('-snapshot')) {\n    String revision = (luceneVersion =~ /\\d\\.\\d\\.\\d-snapshot-(\\d+)/)[0][1]\n    maven {\n      name 'lucene-snapshots'\n      url \"https://s3.amazonaws.com/download.elasticsearch.org/lucenesnapshots/${revision}\"\n    }\n  }\n}\n\ndependencies {\n  // mandatory for tika\n  compile('org.apache.tika:tika-core:1.11')\n  compile('org.apache.tika:tika-parsers:1.11') { \n    transitive = false\n  }\n  compile('commons-io:commons-io:2.4')\n  \n  // character set detection\n  compile('com.googlecode.juniversalchardet:juniversalchardet:1.0.3')\n\n  // external parser libraries\n  // HTML\n  compile('org.ccil.cowan.tagsoup:tagsoup:1.2.1')\n  // Adobe PDF\n  compile('org.apache.pdfbox:pdfbox:1.8.10')\n  compile('org.bouncycastle:bcmail-jdk15on:1.52')\n  // OpenOffice\n  compile('org.apache.poi:poi-ooxml:3.13')\n  // MS Office\n  compile('org.apache.poi:poi-scratchpad:3.13')\n  // Apple iWork\n  compile('org.apache.commons:commons-compress:1.10')\n}\n\ncompileJava.options.compilerArgs << '-Xlint:-cast,-deprecation,-rawtypes'\n\nforbiddenPatterns {\n  exclude '**/*.docx'\n  exclude '**/*.pdf'\n}\n\n// fix ES build so this is not needed\nTask dependencyLicensesTask = DependencyLicensesTask.configure(project) {\n  dependencies = project.configurations.runtime - project.configurations.provided\n}\nproject.precommit.dependsOn(dependencyLicensesTask)\n"
  },
  {
    "path": "dev-tools/email_template.html",
    "content": "<html>\n<body>\n<p>Heya,</p>\n\n<p>We are pleased to announce the release of the <b>%(artifact_name)s</b>, <b>version %(release_version)s</b></p>\n\n<blockquote>%(artifact_description)s.</blockquote>\n\n<h1>Release Notes - Version %(release_version)s</h1>\n%(empty_message)s\n%(issues_bug)s\n%(issues_update)s\n%(issues_new)s\n%(issues_doc)s\n\n<p>For questions or comments around this plugin, feel free to use elasticsearch\n    <a href='https://discuss.elastic.co/c/elasticsearch'>mailing list</a>!</p>\n\n<p>Enjoy,</p>\n<p>- The <a href=\"http://www.elastic.co/\">Elastic team</a></p>\n</body>\n</html>\n"
  },
  {
    "path": "dev-tools/email_template.txt",
    "content": "Heya,\n\n\nWe are pleased to announce the release of the %(artifact_name)s, version %(release_version)s.\n\n%(artifact_description)s.\n\n%(project_url)s\n\nRelease Notes - %(artifact_id)s - Version %(release_version)s\n\n%(empty_message)s\n%(issues_bug)s\n%(issues_update)s\n%(issues_new)s\n%(issues_doc)s\n\nFor questions or comments around this plugin, feel free to use elasticsearch mailing list: https://discuss.elastic.co/c/elasticsearch\n\nEnjoy,\n\n-The Elasticsearch team\n"
  },
  {
    "path": "dev-tools/release.py",
    "content": "# Licensed to Elasticsearch under one or more contributor\n# license agreements. See the NOTICE file distributed with\n# this work for additional information regarding copyright\n# ownership. Elasticsearch licenses this file to you under\n# the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance  with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on\n# an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,\n# either express or implied. See the License for the specific\n# language governing permissions and limitations under the License.\n\nimport re\nimport tempfile\nimport shutil\nimport os\nimport datetime\nimport argparse\nimport github3\nimport smtplib\nimport subprocess\nimport sys\n\nfrom functools import partial\n\nfrom email.mime.multipart import MIMEMultipart\nfrom email.mime.text import MIMEText\n\nfrom os.path import dirname, abspath\n\n\"\"\"\n This tool builds a release from the a given elasticsearch plugin branch.\n In order to execute it go in the top level directory and run:\n   $ python3 dev_tools/build_release.py --branch master --publish --remote origin\n\n By default this script runs in 'dry' mode which essentially simulates a release. If the\n '--publish' option is set the actual release is done.\n If not in 'dry' mode, a mail will be automatically sent to the mailing list.\n You can disable it with the option  '--disable_mail'\n\n   $ python3 dev_tools/build_release.py --publish --remote origin --disable_mail\n\n The script takes over almost all\n steps necessary for a release from a high level point of view it does the following things:\n\n  - run prerequisite checks ie. check for S3 credentials available as env variables\n  - detect the version to release from the specified branch (--branch) or the current branch\n  - check that github issues related to the version are closed\n  - creates a version release branch & updates pom.xml to point to a release version rather than a snapshot\n  - creates a master release branch & updates README.md to point to the latest release version for the given elasticsearch branch\n  - builds the artifacts\n  - commits the new version and merges the version release branch into the source branch\n  - merges the master release branch into the master branch\n  - creates a tag and pushes branch and master to the specified origin (--remote)\n  - publishes the releases to sonatype\n  - publishes the releases to S3 using s3cmd\n  - send a mail based on github issues fixed by this version\n\nOnce it's done it will print all the remaining steps.\n\n Prerequisites:\n    - s3cmd needs to be installed (this should work: s3cmd ls s3://download.elasticsearch.org/elasticsearch)\n    - Python 3k for script execution\n    - github3 module (pip-3.3 install github3.py)\n    - GITHUB (login/password) or key exported via ENV Variables (GITHUB_LOGIN,  GITHUB_PASSWORD or GITHUB_KEY)\n    (see https://github.com/settings/applications#personal-access-tokens) - Optional: default to no authentication\n    - SMTP_HOST - Optional: default to localhost\n    - MAIL_SENDER - Optional: default to 'david@pilato.fr': must be authorized to send emails to elasticsearch mailing list\n    - MAIL_TO - Optional: default to 'discuss+announcements@elastic.co'\n\"\"\"\nenv = os.environ\n\nLOG = env.get('ES_RELEASE_LOG', '/tmp/elasticsearch_release.log')\nROOT_DIR = abspath(os.path.join(abspath(dirname(__file__)), '../'))\nREADME_FILE = ROOT_DIR + '/README.md'\nPOM_FILE = ROOT_DIR + '/pom.xml'\nDEV_TOOLS_DIR = ROOT_DIR + '/dev-tools'\n\n# console colors\nOKGREEN = '\\033[92m'\nENDC = '\\033[0m'\nFAIL = '\\033[91m'\n\n##########################################################\n#\n# Utility methods (log and run)\n#\n##########################################################\n# Log a message\ndef log(msg):\n    log_plain('\\n%s' % msg)\n\n\n# Purge the log file\ndef purge_log():\n    try:\n        os.remove(LOG)\n    except FileNotFoundError:\n        pass\n\n\n# Log a message to the LOG file\ndef log_plain(msg):\n    f = open(LOG, mode='ab')\n    f.write(msg.encode('utf-8'))\n    f.close()\n\n\n# Run a command and log it\ndef run(command, quiet=False):\n    log('%s: RUN: %s\\n' % (datetime.datetime.now(), command))\n    if os.system('%s >> %s 2>&1' % (command, LOG)):\n        msg = '    FAILED: %s [see log %s]' % (command, LOG)\n        if not quiet:\n            print(msg)\n        raise RuntimeError(msg)\n\n##########################################################\n#\n# Clean logs and check JAVA and Maven\n#\n##########################################################\ntry:\n    purge_log()\n    JAVA_HOME = env['JAVA_HOME']\nexcept KeyError:\n    raise RuntimeError(\"\"\"\n  Please set JAVA_HOME in the env before running release tool\n  On OSX use: export JAVA_HOME=`/usr/libexec/java_home -v '1.7*'`\"\"\")\n\ntry:\n    MVN = 'mvn'\n    # make sure mvn3 is used if mvn3 is available\n    # some systems use maven 2 as default\n    run('mvn3 --version', quiet=True)\n    MVN = 'mvn3'\nexcept RuntimeError:\n    pass\n\n\ndef java_exe():\n    path = JAVA_HOME\n    return 'export JAVA_HOME=\"%s\" PATH=\"%s/bin:$PATH\" JAVACMD=\"%s/bin/java\"' % (path, path, path)\n\n\ndef verify_java_version(version):\n    s = os.popen('%s; java -version 2>&1' % java_exe()).read()\n    if ' version \"%s.' % version not in s:\n        raise RuntimeError('got wrong version for java %s:\\n%s' % (version, s))\n\n\ndef verify_mvn_java_version(version, mvn):\n    s = os.popen('%s; %s --version 2>&1' % (java_exe(), mvn)).read()\n    if 'Java version: %s' % version not in s:\n        raise RuntimeError('got wrong java version for %s %s:\\n%s' % (mvn, version, s))\n\n\n##########################################################\n#\n# String and file manipulation utils\n#\n##########################################################\n# Utility that returns the name of the release branch for a given version\ndef release_branch(branchsource, version):\n    return 'release_branch_%s_%s' % (branchsource, version)\n\n\n# Reads the given file and applies the\n# callback to it. If the callback changed\n# a line the given file is replaced with\n# the modified input.\ndef process_file(file_path, line_callback):\n    fh, abs_path = tempfile.mkstemp()\n    modified = False\n    with open(abs_path, 'w', encoding='utf-8') as new_file:\n        with open(file_path, encoding='utf-8') as old_file:\n            for line in old_file:\n                new_line = line_callback(line)\n                modified = modified or (new_line != line)\n                new_file.write(new_line)\n    os.close(fh)\n    if modified:\n        #Remove original file\n        os.remove(file_path)\n        #Move new file\n        shutil.move(abs_path, file_path)\n        return True\n    else:\n        # nothing to do - just remove the tmp file\n        os.remove(abs_path)\n        return False\n\n\n# Split a version x.y.z as an array of digits [x,y,z]\ndef split_version_to_digits(version):\n    return list(map(int, re.findall(r'\\d+', version)))\n\n\n# Guess the next snapshot version number (increment last digit)\ndef guess_snapshot(version):\n    digits = split_version_to_digits(version)\n    source = '%s.%s.%s' % (digits[0], digits[1], digits[2])\n    destination = '%s.%s.%s' % (digits[0], digits[1], digits[2] + 1)\n    return version.replace(source, destination)\n\n\n# Guess the anchor in generated documentation\n# Looks like this \"#version-230-for-elasticsearch-13\"\ndef get_doc_anchor(release, esversion):\n    plugin_digits = split_version_to_digits(release)\n    es_digits = split_version_to_digits(esversion)\n    return '#version-%s%s%s-for-elasticsearch-%s%s' % (\n        plugin_digits[0], plugin_digits[1], plugin_digits[2], es_digits[0], es_digits[1])\n\n\n# Moves the pom.xml file from a snapshot to a release\ndef remove_maven_snapshot(pom, release):\n    pattern = '<version>%s-SNAPSHOT</version>' % release\n    replacement = '<version>%s</version>' % release\n\n    def callback(line):\n        return line.replace(pattern, replacement)\n\n    process_file(pom, callback)\n\n\n# Moves the pom.xml file to the next snapshot\ndef add_maven_snapshot(pom, release, snapshot):\n    pattern = '<version>%s</version>' % release\n    replacement = '<version>%s-SNAPSHOT</version>' % snapshot\n\n    def callback(line):\n        return line.replace(pattern, replacement)\n\n    process_file(pom, callback)\n\n\n# Moves the README.md file from a snapshot to a release version. Doc looks like:\n# ## Version 2.5.0-SNAPSHOT for Elasticsearch: 1.x\n# It needs to be updated to\n# ## Version 2.5.0 for Elasticsearch: 1.x\ndef update_documentation_in_released_branch(readme_file, release, esversion):\n    pattern = '## Version (.)+ for Elasticsearch: (.)+'\n    es_digits = split_version_to_digits(esversion)\n    replacement = '## Version %s for Elasticsearch: %s.%s\\n' % (\n        release, es_digits[0], es_digits[1])\n\n    def callback(line):\n        # If we find pattern, we replace its content\n        if re.search(pattern, line) is not None:\n            return replacement\n        else:\n            return line\n\n    process_file(readme_file, callback)\n\n\n# Moves the README.md file from a snapshot to a release (documentation link)\n# We need to find the right branch we are on and update the line\n#        |    es-1.3              | Build from source | [2.4.0-SNAPSHOT](https://github.com/elasticsearch/elasticsearch-cloud-azure/tree/es-1.3/#version-240-snapshot-for-elasticsearch-13)     |\n#        |    es-1.2              |     2.3.0         | [2.3.0](https://github.com/elasticsearch/elasticsearch-cloud-azure/tree/v2.3.0/#version-230-snapshot-for-elasticsearch-13)              |\ndef update_documentation_to_released_version(readme_file, repo_url, release, branch, esversion):\n    pattern = '%s' % branch\n    replacement = '|    %s              |     %s         | [%s](%stree/v%s/%s)                  |\\n' % (\n        branch, release, release, repo_url, release, get_doc_anchor(release, esversion))\n\n    def callback(line):\n        # If we find pattern, we replace its content\n        if line.find(pattern) >= 0:\n            return replacement\n        else:\n            return line\n\n    process_file(readme_file, callback)\n\n\n# Update installation instructions in README.md file\ndef set_install_instructions(readme_file, artifact_name, release):\n    pattern = 'bin/plugin -?install elasticsearch/%s/.+' % artifact_name\n    replacement = 'bin/plugin install elasticsearch/%s/%s' % (artifact_name, release)\n\n    def callback(line):\n        return re.sub(pattern, replacement, line)\n\n    process_file(readme_file, callback)\n\n\n# Checks the pom.xml for the release version. <version>2.0.0-SNAPSHOT</version>\n# This method fails if the pom file has no SNAPSHOT version set ie.\n# if the version is already on a release version we fail.\n# Returns the next version string ie. 0.90.7\ndef find_release_version(src_branch):\n    git_checkout(src_branch)\n    with open(POM_FILE, encoding='utf-8') as file:\n        for line in file:\n            match = re.search(r'<version>(.+)-SNAPSHOT</version>', line)\n            if match:\n                return match.group(1)\n        raise RuntimeError('Could not find release version in branch %s' % src_branch)\n\n\n# extract a value from pom.xml after a given line\ndef find_from_pom(tag, first_line=None):\n    with open(POM_FILE, encoding='utf-8') as file:\n        previous_line_matched = False\n        if first_line is None:\n            previous_line_matched = True\n        for line in file:\n            if previous_line_matched:\n                match = re.search(r'<%s>(.+)</%s>' % (tag, tag), line)\n                if match:\n                    return match.group(1)\n\n            if first_line is not None:\n                match = re.search(r'%s' % first_line, line)\n                if match:\n                    previous_line_matched = True\n\n        if first_line is not None:\n            raise RuntimeError('Could not find %s in pom.xml file after %s' % (tag, first_line))\n        else:\n            raise RuntimeError('Could not find %s in pom.xml file' % tag)\n\n\n# Get artifacts which have been generated in target/releases\ndef get_artifacts(artifact_id, release):\n    artifact_path = ROOT_DIR + '/target/releases/%s-%s.zip' % (artifact_id, release)\n    print('  Path %s' % artifact_path)\n    if not os.path.isfile(artifact_path):\n        raise RuntimeError('Could not find required artifact at %s' % artifact_path)\n    return artifact_path\n\n\n# Read sha1 / md5 files from local maven repository\n# and returns the checksum files as well\n# as the given files in a list\ndef read_checksums(release_file, artifact_id, version):\n    res = []\n    dirname = os.path.normpath(os.path.expanduser('~/.m2/repository/org/elasticsearch/%s/%s/' % (artifact_id, version)))\n    directory = os.path.abspath(release_file)\n    file = os.path.basename(release_file)\n    checksum_file_sha1 = '%s/%s.sha1' % (dirname, file)\n    checksum_file_md5 = '%s/%s.md5' % (dirname, file)\n\n    if not os.path.exists(dirname):\n        raise RuntimeError('Failed to read checksums from %s' % dirname)\n    if not os.path.isfile(checksum_file_sha1):\n        raise RuntimeError('Failed to read checksum file %s' % checksum_file_sha1)\n    if not os.path.isfile(checksum_file_md5):\n        raise RuntimeError('Failed to read checksum file %s' % checksum_file_md5)\n\n    res += [os.path.join(directory, checksum_file_md5), os.path.join(directory, checksum_file_sha1), release_file]\n    return res\n\n\n# Format a GitHub issue as plain text\ndef format_issues_plain(issues, title='Fix'):\n    response = \"\"\n\n    if len(issues) > 0:\n        response += '%s:\\n\\n' % title\n        for issue in issues:\n            response += ' * [%s] - %s ( %s )\\n' % (issue.number, issue.title, issue.html_url)\n\n    return response\n\n\n# Format a GitHub issue as html text\ndef format_issues_html(issues, title='Fix'):\n    response = \"\"\n\n    if len(issues) > 0:\n        response += '<h2>%s</h2>\\n<ul>\\n' % title\n        for issue in issues:\n            response += '<li>[<a href=\"%s\">%s</a>] - %s\\n' % (issue.html_url, issue.number, issue.title)\n        response += '</ul>\\n'\n\n    return response\n\n\n##########################################################\n#\n# GIT commands\n#\n##########################################################\n# Returns the hash of the current git HEAD revision\ndef get_head_hash():\n    return os.popen('git rev-parse --verify HEAD 2>&1').read().strip()\n\n\n# Returns the name of the current branch\ndef get_current_branch():\n    return os.popen('git rev-parse --abbrev-ref HEAD  2>&1').read().strip()\n\n\n# runs get fetch on the given remote\ndef fetch(remote):\n    run('git fetch %s' % remote)\n\n\n# Creates a new release branch from the given source branch\n# and rebases the source branch from the remote before creating\n# the release branch. Note: This fails if the source branch\n# doesn't exist on the provided remote.\ndef create_release_branch(remote, src_branch, release):\n    git_checkout(src_branch)\n    run('git pull --rebase %s %s' % (remote, src_branch))\n    run('git checkout -b %s' % (release_branch(src_branch, release)))\n\n\n# Stages the given files for the next git commit\ndef add_pending_files(*files):\n    for file in files:\n        run('git add %s' % file)\n\n\n# Executes a git commit with 'release [version]' as the commit message\ndef commit_release(artifact_id, release):\n    run('git commit -m \"prepare release %s-%s\"' % (artifact_id, release))\n\n\n# Commit documentation changes on the master branch\ndef commit_master(release):\n    run('git commit -m \"update documentation with release %s\"' % release)\n\n\n# Commit next snapshot files\ndef commit_snapshot():\n    run('git commit -m \"prepare for next development iteration\"')\n\n\n# Put the version tag on on the current commit\ndef tag_release(release):\n    run('git tag -a v%s -m \"Tag release version %s\"' % (release, release))\n\n\n# Checkout a given branch\ndef git_checkout(branch):\n    run('git checkout %s' % branch)\n\n\n# Merge the release branch with the actual branch\ndef git_merge(src_branch, release_version):\n    git_checkout(src_branch)\n    run('git merge %s' % release_branch(src_branch, release_version))\n\n\n# Push the actual branch and master branch\ndef git_push(remote, src_branch, release_version, dry_run):\n    if not dry_run:\n        run('git push %s %s master' % (remote, src_branch))  # push the commit and the master\n        run('git push %s v%s' % (remote, release_version))  # push the tag\n    else:\n        print('  dryrun [True] -- skipping push to remote %s %s master' % (remote, src_branch))\n\n\n##########################################################\n#\n# Maven commands\n#\n##########################################################\n# Run a given maven command\ndef run_mvn(*cmd):\n    for c in cmd:\n        run('%s; %s -f %s %s' % (java_exe(), MVN, POM_FILE, c))\n\n\n# Run deploy or package depending on dry_run\n# Default to run mvn package\n# When run_tests=True a first mvn clean test is run\ndef build_release(run_tests=False, dry_run=True):\n    target = 'deploy'\n    tests = '-DskipTests'\n    if run_tests:\n        tests = ''\n    if dry_run:\n        target = 'install'\n    run_mvn('clean %s %s' % (target, tests))\n\n\n##########################################################\n#\n# Amazon S3 publish commands\n#\n##########################################################\n# Upload files to S3\ndef publish_artifacts(artifacts, base='elasticsearch/elasticsearch', dry_run=True):\n    for artifact in artifacts:\n        if dry_run:\n            print('Skip Uploading %s to Amazon S3 in %s' % (artifact, base))\n        else:\n            print('Uploading %s to Amazon S3' % artifact)\n            run('s3cmd put %s s3://download.elasticsearch.org/%s/'  % (os.path.abspath(artifact), base))\n\n\n##########################################################\n#\n# Email and Github Management\n#\n##########################################################\n# Create a Github repository instance to access issues\ndef get_github_repository(reponame,\n                          login=env.get('GITHUB_LOGIN', None),\n                          password=env.get('GITHUB_PASSWORD', None),\n                          key=env.get('GITHUB_KEY', None)):\n    if login:\n        g = github3.login(login, password)\n    elif key:\n        g = github3.login(token=key)\n    else:\n        g = github3.GitHub()\n\n    return g.repository(\"elastic\", reponame)\n\n\n# Check if there are some remaining open issues and fails\ndef check_opened_issues(version, repository, reponame):\n    opened_issues = [i for i in repository.iter_issues(state='open', labels='%s' % version)]\n    if len(opened_issues) > 0:\n        raise NameError(\n            'Some issues [%s] are still opened. Check https://github.com/elasticsearch/%s/issues?labels=%s&state=open'\n            % (len(opened_issues), reponame, version))\n\n\n# List issues from github: can be done anonymously if you don't\n# exceed a given number of github API calls per day\ndef list_issues(version,\n                repository,\n                severity='bug'):\n    issues = [i for i in repository.iter_issues(state='closed', labels='%s,%s' % (severity, version))]\n    return issues\n\n\ndef read_email_template(format='html'):\n    file_name = '%s/email_template.%s' % (DEV_TOOLS_DIR, format)\n    log('open email template %s' % file_name)\n    with open(file_name, encoding='utf-8') as template_file:\n        data = template_file.read()\n    return data\n\n\n# Read template messages\ntemplate_email_html = read_email_template('html')\ntemplate_email_txt = read_email_template('txt')\n\n\n# Get issues from github and generates a Plain/HTML Multipart email\ndef prepare_email(artifact_id, release_version, repository,\n                  artifact_name, artifact_description, project_url,\n                  severity_labels_bug='bug',\n                  severity_labels_update='update',\n                  severity_labels_new='new',\n                  severity_labels_doc='doc'):\n    ## Get bugs from github\n    issues_bug = list_issues(release_version, repository, severity=severity_labels_bug)\n    issues_update = list_issues(release_version, repository, severity=severity_labels_update)\n    issues_new = list_issues(release_version, repository, severity=severity_labels_new)\n    issues_doc = list_issues(release_version, repository, severity=severity_labels_doc)\n\n    ## Format content to plain text\n    plain_issues_bug = format_issues_plain(issues_bug, 'Fix')\n    plain_issues_update = format_issues_plain(issues_update, 'Update')\n    plain_issues_new = format_issues_plain(issues_new, 'New')\n    plain_issues_doc = format_issues_plain(issues_doc, 'Doc')\n\n    ## Format content to html\n    html_issues_bug = format_issues_html(issues_bug, 'Fix')\n    html_issues_update = format_issues_html(issues_update, 'Update')\n    html_issues_new = format_issues_html(issues_new, 'New')\n    html_issues_doc = format_issues_html(issues_doc, 'Doc')\n\n    if len(issues_bug) + len(issues_update) + len(issues_new) + len(issues_doc) > 0:\n        plain_empty_message = \"\"\n        html_empty_message = \"\"\n\n    else:\n        plain_empty_message = \"No issue listed for this release\"\n        html_empty_message = \"<p>No issue listed for this release</p>\"\n\n    msg = MIMEMultipart('alternative')\n    msg['Subject'] = '[ANN] %s %s released' % (artifact_name, release_version)\n    text = template_email_txt % {'release_version': release_version,\n                                 'artifact_id': artifact_id,\n                                 'artifact_name': artifact_name,\n                                 'artifact_description': artifact_description,\n                                 'project_url': project_url,\n                                 'empty_message': plain_empty_message,\n                                 'issues_bug': plain_issues_bug,\n                                 'issues_update': plain_issues_update,\n                                 'issues_new': plain_issues_new,\n                                 'issues_doc': plain_issues_doc}\n\n    html = template_email_html % {'release_version': release_version,\n                                  'artifact_id': artifact_id,\n                                  'artifact_name': artifact_name,\n                                  'artifact_description': artifact_description,\n                                  'project_url': project_url,\n                                  'empty_message': html_empty_message,\n                                  'issues_bug': html_issues_bug,\n                                  'issues_update': html_issues_update,\n                                  'issues_new': html_issues_new,\n                                  'issues_doc': html_issues_doc}\n\n    # Record the MIME types of both parts - text/plain and text/html.\n    part1 = MIMEText(text, 'plain')\n    part2 = MIMEText(html, 'html')\n\n    # Attach parts into message container.\n    # According to RFC 2046, the last part of a multipart message, in this case\n    # the HTML message, is best and preferred.\n    msg.attach(part1)\n    msg.attach(part2)\n\n    return msg\n\n\ndef send_email(msg,\n               dry_run=True,\n               mail=True,\n               sender=env.get('MAIL_SENDER'),\n               to=env.get('MAIL_TO', 'discuss+announcements@elastic.co'),\n               smtp_server=env.get('SMTP_SERVER', 'localhost')):\n    msg['From'] = 'Elasticsearch Team <%s>' % sender\n    msg['To'] = 'Elasticsearch Announcement List <%s>' % to\n    # save mail on disk\n    with open(ROOT_DIR + '/target/email.txt', 'w') as email_file:\n        email_file.write(msg.as_string())\n    if mail and not dry_run:\n        s = smtplib.SMTP(smtp_server, 25)\n        s.sendmail(sender, to, msg.as_string())\n        s.quit()\n    else:\n        print('generated email: open %s/target/email.txt' % ROOT_DIR)\n        print(msg.as_string())\n\n\ndef print_sonatype_notice():\n    settings = os.path.join(os.path.expanduser('~'), '.m2/settings.xml')\n    if os.path.isfile(settings):\n        with open(settings, encoding='utf-8') as settings_file:\n            for line in settings_file:\n                if line.strip() == '<id>sonatype-nexus-snapshots</id>':\n                    # moving out - we found the indicator no need to print the warning\n                    return\n    print(\"\"\"\n    NOTE: No sonatype settings detected, make sure you have configured\n    your sonatype credentials in '~/.m2/settings.xml':\n\n    <settings>\n    ...\n    <servers>\n      <server>\n        <id>sonatype-nexus-snapshots</id>\n        <username>your-jira-id</username>\n        <password>your-jira-pwd</password>\n      </server>\n      <server>\n        <id>sonatype-nexus-staging</id>\n        <username>your-jira-id</username>\n        <password>your-jira-pwd</password>\n      </server>\n    </servers>\n    ...\n  </settings>\n  \"\"\")\n\n\ndef check_s3_credentials():\n    if not env.get('AWS_ACCESS_KEY_ID', None) or not env.get('AWS_SECRET_ACCESS_KEY', None):\n        raise RuntimeError(\n            'Could not find \"AWS_ACCESS_KEY_ID\" / \"AWS_SECRET_ACCESS_KEY\" in the env variables please export in order to upload to S3')\n\n\ndef check_github_credentials():\n    if not env.get('GITHUB_KEY', None) and not env.get('GITHUB_LOGIN', None):\n        log(\n            'WARN: Could not find \"GITHUB_LOGIN\" / \"GITHUB_PASSWORD\" or \"GITHUB_KEY\" in the env variables. You could need it.')\n\n\ndef check_email_settings():\n    if not env.get('MAIL_SENDER', None):\n        raise RuntimeError('Could not find \"MAIL_SENDER\"')\n\n\ndef check_command_exists(name, cmd):\n    try:\n        print('%s' % cmd)\n        subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT)\n    except subprocess.CalledProcessError:\n        raise RuntimeError('Could not run command %s - please make sure it is installed' % (name))\n\n\ndef run_and_print(text, run_function):\n    try:\n        print(text, end='')\n        run_function()\n        print(OKGREEN + 'OK' + ENDC)\n    except RuntimeError:\n        print(FAIL + 'NOT OK' + ENDC)\n\ndef check_env_var(text, env_var):\n    try:\n        print(text, end='')\n        env[env_var]\n        print(OKGREEN + 'OK' + ENDC)\n    except KeyError:\n        print(FAIL + 'NOT OK' + ENDC)\n\n\ndef check_environment_and_commandline_tools():\n    #check_env_var('Checking for AWS env configuration AWS_SECRET_ACCESS_KEY_ID...     ', 'AWS_SECRET_ACCESS_KEY')\n    #check_env_var('Checking for AWS env configuration AWS_ACCESS_KEY_ID...            ', 'AWS_ACCESS_KEY_ID')\n    # check_env_var('Checking for SONATYPE env configuration SONATYPE_USERNAME...       ', 'SONATYPE_USERNAME')\n    # check_env_var('Checking for SONATYPE env configuration SONATYPE_PASSWORD...       ', 'SONATYPE_PASSWORD')\n    # check_env_var('Checking for GPG env configuration GPG_KEY_ID...                   ', 'GPG_KEY_ID')\n    # check_env_var('Checking for GPG env configuration GPG_PASSPHRASE...               ', 'GPG_PASSPHRASE')\n    # check_env_var('Checking for S3 repo upload env configuration S3_BUCKET_SYNC_TO... ', 'S3_BUCKET_SYNC_TO')\n    # check_env_var('Checking for git env configuration GIT_AUTHOR_NAME...              ', 'GIT_AUTHOR_NAME')\n    # check_env_var('Checking for git env configuration GIT_AUTHOR_EMAIL...             ', 'GIT_AUTHOR_EMAIL')\n\n    run_and_print('Checking command: gpg...            ', partial(check_command_exists, 'gpg', 'gpg --version'))\n    run_and_print('Checking command: expect...         ', partial(check_command_exists, 'expect', 'expect -v'))\n    run_and_print('Checking command: s3cmd...          ', partial(check_command_exists, 's3cmd', 's3cmd --version'))\n\n    run_and_print('Checking java version...            ', partial(verify_java_version, '1.7'))\n    run_and_print('Checking java mvn version...        ', partial(verify_mvn_java_version, '1.7', MVN))\n\n\nif __name__ == '__main__':\n    parser = argparse.ArgumentParser(description='Builds and publishes a Elasticsearch Plugin Release')\n    parser.add_argument('--branch', '-b', metavar='master', default=get_current_branch(),\n                        help='The branch to release from. Defaults to the current branch.')\n    parser.add_argument('--skiptests', '-t', dest='tests', action='store_false',\n                        help='Skips tests before release. Tests are run by default.')\n    parser.set_defaults(tests=True)\n    parser.add_argument('--remote', '-r', metavar='origin', default='origin',\n                        help='The remote to push the release commit and tag to. Default is [origin]')\n    parser.add_argument('--publish', '-p', dest='dryrun', action='store_false',\n                        help='Publishes the release. Disable by default.')\n    parser.add_argument('--disable_mail', '-dm', dest='mail', action='store_false',\n                        help='Do not send a release email. Email is sent by default.')\n    parser.add_argument('--check', dest='check', action='store_true',\n                        help='Checks and reports for all requirements and then exits')\n\n    parser.set_defaults(dryrun=True)\n    parser.set_defaults(mail=True)\n    parser.set_defaults(check=False)\n    args = parser.parse_args()\n\n    src_branch = args.branch\n    remote = args.remote\n    run_tests = args.tests\n    dry_run = args.dryrun\n    mail = args.mail\n\n    if args.check:\n        check_environment_and_commandline_tools()\n        sys.exit(0)\n\n    if src_branch == 'master':\n        raise RuntimeError('Can not release the master branch. You need to create another branch before a release')\n\n    # we print a notice if we can not find the relevant infos in the ~/.m2/settings.xml\n    print_sonatype_notice()\n\n    if not dry_run:\n        check_s3_credentials()\n        print('WARNING: dryrun is set to \"false\" - this will push and publish the release')\n        if mail:\n            check_email_settings()\n            print('An email to %s will be sent after the release'\n                  % env.get('MAIL_TO', 'discuss+announcements@elastic.co'))\n        input('Press Enter to continue...')\n\n    check_github_credentials()\n\n    print(''.join(['-' for _ in range(80)]))\n    print('Preparing Release from branch [%s] running tests: [%s] dryrun: [%s]' % (src_branch, run_tests, dry_run))\n    print('  JAVA_HOME is [%s]' % JAVA_HOME)\n    print('  Running with maven command: [%s] ' % (MVN))\n\n    release_version = find_release_version(src_branch)\n    artifact_id = find_from_pom('artifactId')\n    artifact_name = find_from_pom('name')\n    artifact_description = find_from_pom('description')\n    project_url = find_from_pom('url')\n\n    try:\n        elasticsearch_version = find_from_pom('elasticsearch.version')\n    except RuntimeError:\n        # With projects using elasticsearch-parent project, we need to consider elasticsearch version\n        # to be after <artifactId>elasticsearch-parent</artifactId>\n        elasticsearch_version = find_from_pom('version', '<artifactId>elasticsearch-parent</artifactId>')\n\n    print('  Artifact Id: [%s]' % artifact_id)\n    print('  Release version: [%s]' % release_version)\n    print('  Elasticsearch: [%s]' % elasticsearch_version)\n    if elasticsearch_version.find('-SNAPSHOT') != -1:\n        raise RuntimeError('Can not release with a SNAPSHOT elasticsearch dependency: %s' % elasticsearch_version)\n\n    # extract snapshot\n    default_snapshot_version = guess_snapshot(release_version)\n    snapshot_version = input('Enter next snapshot version [%s]:' % default_snapshot_version)\n    snapshot_version = snapshot_version or default_snapshot_version\n\n    print('  Next version: [%s-SNAPSHOT]' % snapshot_version)\n    print('  Artifact Name: [%s]' % artifact_name)\n    print('  Artifact Description: [%s]' % artifact_description)\n    print('  Project URL: [%s]' % project_url)\n\n    if not dry_run:\n        smoke_test_version = release_version\n\n    try:\n        git_checkout('master')\n        master_hash = get_head_hash()\n        git_checkout(src_branch)\n        version_hash = get_head_hash()\n        run_mvn('clean')  # clean the env!\n        create_release_branch(remote, 'master', release_version)\n        print('  Created release branch [%s]' % (release_branch('master', release_version)))\n        create_release_branch(remote, src_branch, release_version)\n        print('  Created release branch [%s]' % (release_branch(src_branch, release_version)))\n    except RuntimeError:\n        print('Logs:')\n        with open(LOG, 'r') as log_file:\n            print(log_file.read())\n        sys.exit(-1)\n\n    success = False\n    try:\n        ########################################\n        # Start update process in version branch\n        ########################################\n        pending_files = [POM_FILE, README_FILE]\n        remove_maven_snapshot(POM_FILE, release_version)\n        update_documentation_in_released_branch(README_FILE, release_version, elasticsearch_version)\n        print('  Done removing snapshot version')\n        add_pending_files(*pending_files)  # expects var args use * to expand\n        commit_release(artifact_id, release_version)\n        print('  Committed release version [%s]' % release_version)\n        print(''.join(['-' for _ in range(80)]))\n        print('Building Release candidate')\n        input('Press Enter to continue...')\n        print('  Checking github issues')\n        repository = get_github_repository(artifact_id)\n        check_opened_issues(release_version, repository, artifact_id)\n        if not dry_run:\n            print('  Running maven builds now and publish to sonatype - run-tests [%s]' % run_tests)\n        else:\n            print('  Running maven builds now run-tests [%s]' % run_tests)\n        build_release(run_tests=run_tests, dry_run=dry_run)\n        artifact = get_artifacts(artifact_id, release_version)\n        artifact_and_checksums = read_checksums(artifact, artifact_id, release_version)\n        print(''.join(['-' for _ in range(80)]))\n\n        ########################################\n        # Start update process in master branch\n        ########################################\n        git_checkout(release_branch('master', release_version))\n        update_documentation_to_released_version(README_FILE, project_url, release_version, src_branch,\n                                                 elasticsearch_version)\n        set_install_instructions(README_FILE, artifact_id, release_version)\n        add_pending_files(*pending_files)  # expects var args use * to expand\n        commit_master(release_version)\n\n        print('Finish Release -- dry_run: %s' % dry_run)\n        input('Press Enter to continue...')\n\n        print('  merge release branch')\n        git_merge(src_branch, release_version)\n        print('  tag')\n        tag_release(release_version)\n\n        add_maven_snapshot(POM_FILE, release_version, snapshot_version)\n        update_documentation_in_released_branch(README_FILE, '%s-SNAPSHOT' % snapshot_version, elasticsearch_version)\n        add_pending_files(*pending_files)\n        commit_snapshot()\n\n        print('  merge master branch')\n        git_merge('master', release_version)\n\n        print('  push to %s %s -- dry_run: %s' % (remote, src_branch, dry_run))\n        git_push(remote, src_branch, release_version, dry_run)\n        print('  publish artifacts to S3 -- dry_run: %s' % dry_run)\n        publish_artifacts(artifact_and_checksums, base='elasticsearch/%s' % (artifact_id) , dry_run=dry_run)\n        print('  preparing email (from github issues)')\n        msg = prepare_email(artifact_id, release_version, repository, artifact_name, artifact_description, project_url)\n        input('Press Enter to send email...')\n        print('  sending email -- dry_run: %s, mail: %s' % (dry_run, mail))\n        send_email(msg, dry_run=dry_run, mail=mail)\n\n        pending_msg = \"\"\"\nRelease successful pending steps:\n    * close and release sonatype repo: https://oss.sonatype.org/\n    * check if the release is there https://oss.sonatype.org/content/repositories/releases/org/elasticsearch/%(artifact_id)s/%(version)s\n    * tweet about the release\n\"\"\"\n        print(pending_msg % {'version': release_version,\n                             'artifact_id': artifact_id,\n                             'project_url': project_url})\n        success = True\n    finally:\n        if not success:\n            print('Logs:')\n            with open(LOG, 'r') as log_file:\n                print(log_file.read())\n            git_checkout('master')\n            run('git reset --hard %s' % master_hash)\n            git_checkout(src_branch)\n            run('git reset --hard %s' % version_hash)\n            try:\n                run('git tag -d v%s' % release_version)\n            except RuntimeError:\n                pass\n        elif dry_run:\n            print('End of dry_run')\n            input('Press Enter to reset changes...')\n            git_checkout('master')\n            run('git reset --hard %s' % master_hash)\n            git_checkout(src_branch)\n            run('git reset --hard %s' % version_hash)\n            run('git tag -d v%s' % release_version)\n\n        # we delete this one anyways\n        run('git branch -D %s' % (release_branch('master', release_version)))\n        run('git branch -D %s' % (release_branch(src_branch, release_version)))\n\n        # Checkout the branch we started from\n        git_checkout(src_branch)\n"
  },
  {
    "path": "dev-tools/tests.policy",
    "content": "/*\n * Licensed to Elasticsearch under one or more contributor\n * license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright\n * ownership. Elasticsearch licenses this file to you under\n * the Apache License, Version 2.0 (the \"License\"); you may\n * not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n// Policy file to prevent tests from writing outside the test sandbox directory\n// PLEASE NOTE: You may need to enable other permissions when new tests are added,\n// everything not allowed here is forbidden!\n\ngrant {\n  // permissions for file access, write access only to sandbox:\n  permission java.io.FilePermission \"<<ALL FILES>>\", \"read,execute\";\n  permission java.io.FilePermission \"${junit4.childvm.cwd}\", \"read,execute,write\";\n  permission java.io.FilePermission \"${junit4.childvm.cwd}${/}-\", \"read,execute,write,delete\";\n  permission java.io.FilePermission \"${junit4.tempDir}${/}*\", \"read,execute,write,delete\";\n  permission groovy.security.GroovyCodeSourcePermission \"/groovy/script\";\n\n  // Allow connecting to the internet anywhere\n  permission java.net.SocketPermission \"*\", \"accept,listen,connect,resolve\";\n\n  // Basic permissions needed for Lucene / Elasticsearch to work:\n  permission java.util.PropertyPermission \"*\", \"read,write\";\n  permission java.lang.reflect.ReflectPermission \"*\";\n  permission java.lang.RuntimePermission \"*\";\n\n  // These two *have* to be spelled out a separate\n  permission java.lang.management.ManagementPermission \"control\";\n  permission java.lang.management.ManagementPermission \"monitor\";\n\n  permission java.net.NetPermission \"*\";\n  permission java.util.logging.LoggingPermission \"control\";\n  permission javax.management.MBeanPermission \"*\", \"*\";\n  permission javax.management.MBeanServerPermission \"*\";\n  permission javax.management.MBeanTrustPermission \"*\";\n\n  // Needed for some things in DNS caching in the JVM\n  permission java.security.SecurityPermission \"getProperty.networkaddress.cache.ttl\";\n  permission java.security.SecurityPermission \"getProperty.networkaddress.cache.negative.ttl\";\n\n};\n"
  },
  {
    "path": "dev-tools/upload-s3.py",
    "content": "# Licensed to Elasticsearch under one or more contributor\n# license agreements. See the NOTICE file distributed with\n# this work for additional information regarding copyright\n# ownership. Elasticsearch licenses this file to you under\n# the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance  with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on \n# an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,\n# either express or implied. See the License for the specific\n# language governing permissions and limitations under the License.\n\nimport os\nimport sys\nimport argparse\ntry:\n  import boto.s3\nexcept:\n  raise RuntimeError(\"\"\"\n  S3 upload requires boto to be installed\n    Use one of:\n      'pip install -U boto'\n      'apt-get install python-boto'\n      'easy_install boto'\n  \"\"\")\n\n\ndef list_buckets(conn):\n  return conn.get_all_buckets()\n\n\ndef upload_s3(conn, path, key, file, bucket):\n  print('Uploading %s to Amazon S3 bucket %s/%s') % \\\n        (file, bucket,  os.path.join(path, key))\n  def percent_cb(complete, total):\n    sys.stdout.write('.')\n    sys.stdout.flush()\n  bucket = conn.create_bucket(bucket)\n  k = bucket.new_key(os.path.join(path, key))\n  k.set_contents_from_filename(file, cb=percent_cb, num_cb=100)\n\n\nif __name__ == '__main__':\n  parser = argparse.ArgumentParser(description='Uploads files to Amazon S3')\n  parser.add_argument('--file', '-f', metavar='path to file',\n                      help='the branch to release from', required=True)\n  parser.add_argument('--bucket', '-b', metavar='B42', default='download.elasticsearch.org',\n                      help='The S3 Bucket to upload to')\n  parser.add_argument('--path', '-p', metavar='elasticsearch/elasticsearch', default='elasticsearch/elasticsearch',\n                      help='The key path to use')\n  parser.add_argument('--key', '-k', metavar='key', default=None,\n                      help='The key - uses the file name as default key')\n  args = parser.parse_args()\n  if args.key:\n    key = args.key\n  else:\n    key = os.path.basename(args.file)\n\n  connection = boto.connect_s3()\n  upload_s3(connection, args.path, key, args.file, args.bucket);\n\n"
  },
  {
    "path": "licenses/bcmail-jdk15on-1.52.jar.sha1",
    "content": "4995a870400e1554d1c7ed2afcb5d198fae12db9\n"
  },
  {
    "path": "licenses/bcmail-jdk15on-LICENSE.txt",
    "content": "The MIT License (MIT)\n\nCopyright (c) 2000 - 2013 The Legion of the Bouncy Castle Inc.\n                          (http://www.bouncycastle.org) \n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n"
  },
  {
    "path": "licenses/bcmail-jdk15on-NOTICE.txt",
    "content": ""
  },
  {
    "path": "licenses/bcpkix-jdk15on-1.52.jar.sha1",
    "content": "b8ffac2bbc6626f86909589c8cc63637cc936504\n"
  },
  {
    "path": "licenses/bcpkix-jdk15on-LICENSE.txt",
    "content": "The MIT License (MIT)\n\nCopyright (c) 2000 - 2013 The Legion of the Bouncy Castle Inc.\n                          (http://www.bouncycastle.org)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n"
  },
  {
    "path": "licenses/bcpkix-jdk15on-NOTICE.txt",
    "content": ""
  },
  {
    "path": "licenses/bcprov-jdk15on-1.52.jar.sha1",
    "content": "88a941faf9819d371e3174b5ed56a3f3f7d73269\n"
  },
  {
    "path": "licenses/bcprov-jdk15on-LICENSE.txt",
    "content": "The MIT License (MIT)\n\nCopyright (c) 2000 - 2013 The Legion of the Bouncy Castle Inc.\n                          (http://www.bouncycastle.org)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n"
  },
  {
    "path": "licenses/bcprov-jdk15on-NOTICE.txt",
    "content": ""
  },
  {
    "path": "licenses/commons-codec-1.9.jar.sha1",
    "content": "9ce04e34240f674bc72680f8b843b1457383161a\n"
  },
  {
    "path": "licenses/commons-codec-LICENSE.txt",
    "content": "                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright [yyyy] [name of copyright owner]\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n"
  },
  {
    "path": "licenses/commons-codec-NOTICE.txt",
    "content": "Apache Commons CLI\nCopyright 2001-2009 The Apache Software Foundation\n\nThis product includes software developed by\nThe Apache Software Foundation (http://www.apache.org/).\n"
  },
  {
    "path": "licenses/commons-compress-1.10.jar.sha1",
    "content": "5eeb27c57eece1faf2d837868aeccc94d84dcc9a"
  },
  {
    "path": "licenses/commons-compress-LICENSE.txt",
    "content": "                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright [yyyy] [name of copyright owner]\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n"
  },
  {
    "path": "licenses/commons-compress-NOTICE.txt",
    "content": "Apache Commons Compress\nCopyright 2002-2015 The Apache Software Foundation\n\nThis product includes software developed at\nThe Apache Software Foundation (http://www.apache.org/).\n\nThe files in the package org.apache.commons.compress.archivers.sevenz\nwere derived from the LZMA SDK, version 9.20 (C/ and CPP/7zip/),\nwhich has been placed in the public domain:\n\n\"LZMA SDK is placed in the public domain.\" (http://www.7-zip.org/sdk.html)\n"
  },
  {
    "path": "licenses/commons-io-2.4.jar.sha1",
    "content": "b1b6ea3b7e4aa4f492509a4952029cd8e48019ad\n"
  },
  {
    "path": "licenses/commons-io-LICENSE.txt",
    "content": "\n                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright [yyyy] [name of copyright owner]\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n"
  },
  {
    "path": "licenses/commons-io-NOTICE.txt",
    "content": "Apache Commons IO\nCopyright 2002-2014 The Apache Software Foundation\n\nThis product includes software developed at\nThe Apache Software Foundation (http://www.apache.org/).\n"
  },
  {
    "path": "licenses/commons-logging-1.1.1.jar.sha1",
    "content": "5043bfebc3db072ed80fbd362e7caf00e885d8ae"
  },
  {
    "path": "licenses/commons-logging-LICENSE.txt",
    "content": "\n                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright [yyyy] [name of copyright owner]\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n"
  },
  {
    "path": "licenses/commons-logging-NOTICE.txt",
    "content": "Apache Commons Logging\nCopyright 2003-2014 The Apache Software Foundation\n\nThis product includes software developed at\nThe Apache Software Foundation (http://www.apache.org/).\n"
  },
  {
    "path": "licenses/fontbox-1.8.10.jar.sha1",
    "content": "41776c7713e3f3a1ce688bd96459fc597298c340\n"
  },
  {
    "path": "licenses/fontbox-LICENSE.txt",
    "content": "\n                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright [yyyy] [name of copyright owner]\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\nEXTERNAL COMPONENTS\n\nApache PDFBox includes a number of components with separate copyright notices\nand license terms. Your use of these components is subject to the terms and\nconditions of the following licenses.\n\nContributions made to the original PDFBox and FontBox projects:\n\n   Copyright (c) 2002-2007, www.pdfbox.org\n   All rights reserved.\n\n   Redistribution and use in source and binary forms, with or without\n   modification, are permitted provided that the following conditions are met:\n\n   1. Redistributions of source code must retain the above copyright notice,\n      this list of conditions and the following disclaimer.\n\n   2. Redistributions in binary form must reproduce the above copyright\n      notice, this list of conditions and the following disclaimer in the\n      documentation and/or other materials provided with the distribution.\n\n   3. Neither the name of pdfbox; nor the names of its contributors may be\n      used to endorse or promote products derived from this software without\n      specific prior written permission.\n\n   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n   ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n   FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n   DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n   SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n   CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n   LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n   OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n   SUCH DAMAGE.\n\nAdobe Font Metrics (AFM) for PDF Core 14 Fonts\n\n   This file and the 14 PostScript(R) AFM files it accompanies may be used,\n   copied, and distributed for any purpose and without charge, with or without\n   modification, provided that all copyright notices are retained; that the\n   AFM files are not distributed without this file; that all modifications\n   to this file or any of the AFM files are prominently noted in the modified\n   file(s); and that this paragraph is not modified. Adobe Systems has no\n   responsibility or obligation to support the use of the AFM files.\n\nCMaps for PDF Fonts (http://opensource.adobe.com/wiki/display/cmap/Downloads)\n\n   Copyright 1990-2009 Adobe Systems Incorporated.\n   All rights reserved.\n\n   Redistribution and use in source and binary forms, with or without\n   modification, are permitted provided that the following conditions\n   are met:\n\n   Redistributions of source code must retain the above copyright notice,\n   this list of conditions and the following disclaimer.\n\n   Redistributions in binary form must reproduce the above copyright notice,\n   this list of conditions and the following disclaimer in the documentation\n   and/or other materials provided with the distribution.\n\n   Neither the name of Adobe Systems Incorporated nor the names of its\n   contributors may be used to endorse or promote products derived from this\n   software without specific prior written permission.\n\n   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n   ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\n   LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n   CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n   SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF\n   THE POSSIBILITY OF SUCH DAMAGE.\n\nPaDaF PDF/A preflight (http://sourceforge.net/projects/padaf)\n\n  Copyright 2010 Atos Worldline SAS\n\n  Licensed by Atos Worldline SAS under one or more\n  contributor license agreements.  See the NOTICE file distributed with\n  this work for additional information regarding copyright ownership.\n  Atos Worldline SAS licenses this file to You under the Apache License, Version 2.0\n  (the \"License\"); you may not use this file except in compliance with\n  the License.  You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n  Unless required by applicable law or agreed to in writing, software\n  distributed under the License is distributed on an \"AS IS\" BASIS,\n  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  See the License for the specific language governing permissions and\n  limitations under the License.\n\nOSXAdapter\n\n  Version: 2.0\n\n  Disclaimer: IMPORTANT:  This Apple software is supplied to you by\n  Apple Inc. (\"Apple\") in consideration of your agreement to the\n  following terms, and your use, installation, modification or\n  redistribution of this Apple software constitutes acceptance of these\n  terms.  If you do not agree with these terms, please do not use,\n  install, modify or redistribute this Apple software.\n\n  In consideration of your agreement to abide by the following terms, and\n  subject to these terms, Apple grants you a personal, non-exclusive\n  license, under Apple's copyrights in this original Apple software (the\n  \"Apple Software\"), to use, reproduce, modify and redistribute the Apple\n  Software, with or without modifications, in source and/or binary forms;\n  provided that if you redistribute the Apple Software in its entirety and\n  without modifications, you must retain this notice and the following\n  text and disclaimers in all such redistributions of the Apple Software.\n  Neither the name, trademarks, service marks or logos of Apple Inc.\n  may be used to endorse or promote products derived from the Apple\n  Software without specific prior written permission from Apple.  Except\n  as expressly stated in this notice, no other rights or licenses, express\n  or implied, are granted by Apple herein, including but not limited to\n  any patent rights that may be infringed by your derivative works or by\n  other works in which the Apple Software may be incorporated.\n\n  The Apple Software is provided by Apple on an \"AS IS\" basis.  APPLE\n  MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION\n  THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS\n  FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND\n  OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.\n\n  IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL\n  OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n  INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION,\n  MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED\n  AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE),\n  STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE\n  POSSIBILITY OF SUCH DAMAGE.\n\n  Copyright (C) 2003-2007 Apple, Inc., All Rights Reserved\n"
  },
  {
    "path": "licenses/fontbox-NOTICE.txt",
    "content": "Apache PDFBox\nCopyright 2014 The Apache Software Foundation\n\nThis product includes software developed at\nThe Apache Software Foundation (http://www.apache.org/).\n\nBased on source code originally developed in the PDFBox and\nFontBox projects.\n\nCopyright (c) 2002-2007, www.pdfbox.org\n\nBased on source code originally developed in the PaDaF project.\nCopyright (c) 2010 Atos Worldline SAS\n\nIncludes the Adobe Glyph List\nCopyright 1997, 1998, 2002, 2007, 2010 Adobe Systems Incorporated.\n\nIncludes the Zapf Dingbats Glyph List\nCopyright 2002, 2010 Adobe Systems Incorporated.\n\nIncludes OSXAdapter\nCopyright (C) 2003-2007 Apple, Inc., All Rights Reserved\n"
  },
  {
    "path": "licenses/jempbox-1.8.10.jar.sha1",
    "content": "40df4e4ca884aadc20b82d5abd0a3679774c55a6\n"
  },
  {
    "path": "licenses/jempbox-LICENSE.txt",
    "content": "Copyright (c) 2006-2007, www.jempbox.org\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n1. Redistributions of source code must retain the above copyright notice,\n   this list of conditions and the following disclaimer.\n2. Redistributions in binary form must reproduce the above copyright notice,\n   this list of conditions and the following disclaimer in the documentation\n   and/or other materials provided with the distribution.\n3. Neither the name of fontbox; nor the names of its\n   contributors may be used to endorse or promote products derived from this\n   software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY\nDIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n"
  },
  {
    "path": "licenses/jempbox-NOTICE.txt",
    "content": ""
  },
  {
    "path": "licenses/juniversalchardet-1.0.3.jar.sha1",
    "content": "cd49678784c46aa8789c060538e0154013bb421b\n"
  },
  {
    "path": "licenses/juniversalchardet-LICENSE.txt",
    "content": "                          MOZILLA PUBLIC LICENSE\n                                Version 1.1\n\n                              ---------------\n\n1. Definitions.\n\n     1.0.1. \"Commercial Use\" means distribution or otherwise making the\n     Covered Code available to a third party.\n\n     1.1. \"Contributor\" means each entity that creates or contributes to\n     the creation of Modifications.\n\n     1.2. \"Contributor Version\" means the combination of the Original\n     Code, prior Modifications used by a Contributor, and the Modifications\n     made by that particular Contributor.\n\n     1.3. \"Covered Code\" means the Original Code or Modifications or the\n     combination of the Original Code and Modifications, in each case\n     including portions thereof.\n\n     1.4. \"Electronic Distribution Mechanism\" means a mechanism generally\n     accepted in the software development community for the electronic\n     transfer of data.\n\n     1.5. \"Executable\" means Covered Code in any form other than Source\n     Code.\n\n     1.6. \"Initial Developer\" means the individual or entity identified\n     as the Initial Developer in the Source Code notice required by Exhibit\n     A.\n\n     1.7. \"Larger Work\" means a work which combines Covered Code or\n     portions thereof with code not governed by the terms of this License.\n\n     1.8. \"License\" means this document.\n\n     1.8.1. \"Licensable\" means having the right to grant, to the maximum\n     extent possible, whether at the time of the initial grant or\n     subsequently acquired, any and all of the rights conveyed herein.\n\n     1.9. \"Modifications\" means any addition to or deletion from the\n     substance or structure of either the Original Code or any previous\n     Modifications. When Covered Code is released as a series of files, a\n     Modification is:\n          A. Any addition to or deletion from the contents of a file\n          containing Original Code or previous Modifications.\n\n          B. Any new file that contains any part of the Original Code or\n          previous Modifications.\n\n     1.10. \"Original Code\" means Source Code of computer software code\n     which is described in the Source Code notice required by Exhibit A as\n     Original Code, and which, at the time of its release under this\n     License is not already Covered Code governed by this License.\n\n     1.10.1. \"Patent Claims\" means any patent claim(s), now owned or\n     hereafter acquired, including without limitation,  method, process,\n     and apparatus claims, in any patent Licensable by grantor.\n\n     1.11. \"Source Code\" means the preferred form of the Covered Code for\n     making modifications to it, including all modules it contains, plus\n     any associated interface definition files, scripts used to control\n     compilation and installation of an Executable, or source code\n     differential comparisons against either the Original Code or another\n     well known, available Covered Code of the Contributor's choice. The\n     Source Code can be in a compressed or archival form, provided the\n     appropriate decompression or de-archiving software is widely available\n     for no charge.\n\n     1.12. \"You\" (or \"Your\")  means an individual or a legal entity\n     exercising rights under, and complying with all of the terms of, this\n     License or a future version of this License issued under Section 6.1.\n     For legal entities, \"You\" includes any entity which controls, is\n     controlled by, or is under common control with You. For purposes of\n     this definition, \"control\" means (a) the power, direct or indirect,\n     to cause the direction or management of such entity, whether by\n     contract or otherwise, or (b) ownership of more than fifty percent\n     (50%) of the outstanding shares or beneficial ownership of such\n     entity.\n\n2. Source Code License.\n\n     2.1. The Initial Developer Grant.\n     The Initial Developer hereby grants You a world-wide, royalty-free,\n     non-exclusive license, subject to third party intellectual property\n     claims:\n          (a)  under intellectual property rights (other than patent or\n          trademark) Licensable by Initial Developer to use, reproduce,\n          modify, display, perform, sublicense and distribute the Original\n          Code (or portions thereof) with or without Modifications, and/or\n          as part of a Larger Work; and\n\n          (b) under Patents Claims infringed by the making, using or\n          selling of Original Code, to make, have made, use, practice,\n          sell, and offer for sale, and/or otherwise dispose of the\n          Original Code (or portions thereof).\n\n          (c) the licenses granted in this Section 2.1(a) and (b) are\n          effective on the date Initial Developer first distributes\n          Original Code under the terms of this License.\n\n          (d) Notwithstanding Section 2.1(b) above, no patent license is\n          granted: 1) for code that You delete from the Original Code; 2)\n          separate from the Original Code;  or 3) for infringements caused\n          by: i) the modification of the Original Code or ii) the\n          combination of the Original Code with other software or devices.\n\n     2.2. Contributor Grant.\n     Subject to third party intellectual property claims, each Contributor\n     hereby grants You a world-wide, royalty-free, non-exclusive license\n\n          (a)  under intellectual property rights (other than patent or\n          trademark) Licensable by Contributor, to use, reproduce, modify,\n          display, perform, sublicense and distribute the Modifications\n          created by such Contributor (or portions thereof) either on an\n          unmodified basis, with other Modifications, as Covered Code\n          and/or as part of a Larger Work; and\n\n          (b) under Patent Claims infringed by the making, using, or\n          selling of  Modifications made by that Contributor either alone\n          and/or in combination with its Contributor Version (or portions\n          of such combination), to make, use, sell, offer for sale, have\n          made, and/or otherwise dispose of: 1) Modifications made by that\n          Contributor (or portions thereof); and 2) the combination of\n          Modifications made by that Contributor with its Contributor\n          Version (or portions of such combination).\n\n          (c) the licenses granted in Sections 2.2(a) and 2.2(b) are\n          effective on the date Contributor first makes Commercial Use of\n          the Covered Code.\n\n          (d)    Notwithstanding Section 2.2(b) above, no patent license is\n          granted: 1) for any code that Contributor has deleted from the\n          Contributor Version; 2)  separate from the Contributor Version;\n          3)  for infringements caused by: i) third party modifications of\n          Contributor Version or ii)  the combination of Modifications made\n          by that Contributor with other software  (except as part of the\n          Contributor Version) or other devices; or 4) under Patent Claims\n          infringed by Covered Code in the absence of Modifications made by\n          that Contributor.\n\n3. Distribution Obligations.\n\n     3.1. Application of License.\n     The Modifications which You create or to which You contribute are\n     governed by the terms of this License, including without limitation\n     Section 2.2. The Source Code version of Covered Code may be\n     distributed only under the terms of this License or a future version\n     of this License released under Section 6.1, and You must include a\n     copy of this License with every copy of the Source Code You\n     distribute. You may not offer or impose any terms on any Source Code\n     version that alters or restricts the applicable version of this\n     License or the recipients' rights hereunder. However, You may include\n     an additional document offering the additional rights described in\n     Section 3.5.\n\n     3.2. Availability of Source Code.\n     Any Modification which You create or to which You contribute must be\n     made available in Source Code form under the terms of this License\n     either on the same media as an Executable version or via an accepted\n     Electronic Distribution Mechanism to anyone to whom you made an\n     Executable version available; and if made available via Electronic\n     Distribution Mechanism, must remain available for at least twelve (12)\n     months after the date it initially became available, or at least six\n     (6) months after a subsequent version of that particular Modification\n     has been made available to such recipients. You are responsible for\n     ensuring that the Source Code version remains available even if the\n     Electronic Distribution Mechanism is maintained by a third party.\n\n     3.3. Description of Modifications.\n     You must cause all Covered Code to which You contribute to contain a\n     file documenting the changes You made to create that Covered Code and\n     the date of any change. You must include a prominent statement that\n     the Modification is derived, directly or indirectly, from Original\n     Code provided by the Initial Developer and including the name of the\n     Initial Developer in (a) the Source Code, and (b) in any notice in an\n     Executable version or related documentation in which You describe the\n     origin or ownership of the Covered Code.\n\n     3.4. Intellectual Property Matters\n          (a) Third Party Claims.\n          If Contributor has knowledge that a license under a third party's\n          intellectual property rights is required to exercise the rights\n          granted by such Contributor under Sections 2.1 or 2.2,\n          Contributor must include a text file with the Source Code\n          distribution titled \"LEGAL\" which describes the claim and the\n          party making the claim in sufficient detail that a recipient will\n          know whom to contact. If Contributor obtains such knowledge after\n          the Modification is made available as described in Section 3.2,\n          Contributor shall promptly modify the LEGAL file in all copies\n          Contributor makes available thereafter and shall take other steps\n          (such as notifying appropriate mailing lists or newsgroups)\n          reasonably calculated to inform those who received the Covered\n          Code that new knowledge has been obtained.\n\n          (b) Contributor APIs.\n          If Contributor's Modifications include an application programming\n          interface and Contributor has knowledge of patent licenses which\n          are reasonably necessary to implement that API, Contributor must\n          also include this information in the LEGAL file.\n\n               (c)    Representations.\n          Contributor represents that, except as disclosed pursuant to\n          Section 3.4(a) above, Contributor believes that Contributor's\n          Modifications are Contributor's original creation(s) and/or\n          Contributor has sufficient rights to grant the rights conveyed by\n          this License.\n\n     3.5. Required Notices.\n     You must duplicate the notice in Exhibit A in each file of the Source\n     Code.  If it is not possible to put such notice in a particular Source\n     Code file due to its structure, then You must include such notice in a\n     location (such as a relevant directory) where a user would be likely\n     to look for such a notice.  If You created one or more Modification(s)\n     You may add your name as a Contributor to the notice described in\n     Exhibit A.  You must also duplicate this License in any documentation\n     for the Source Code where You describe recipients' rights or ownership\n     rights relating to Covered Code.  You may choose to offer, and to\n     charge a fee for, warranty, support, indemnity or liability\n     obligations to one or more recipients of Covered Code. However, You\n     may do so only on Your own behalf, and not on behalf of the Initial\n     Developer or any Contributor. You must make it absolutely clear than\n     any such warranty, support, indemnity or liability obligation is\n     offered by You alone, and You hereby agree to indemnify the Initial\n     Developer and every Contributor for any liability incurred by the\n     Initial Developer or such Contributor as a result of warranty,\n     support, indemnity or liability terms You offer.\n\n     3.6. Distribution of Executable Versions.\n     You may distribute Covered Code in Executable form only if the\n     requirements of Section 3.1-3.5 have been met for that Covered Code,\n     and if You include a notice stating that the Source Code version of\n     the Covered Code is available under the terms of this License,\n     including a description of how and where You have fulfilled the\n     obligations of Section 3.2. The notice must be conspicuously included\n     in any notice in an Executable version, related documentation or\n     collateral in which You describe recipients' rights relating to the\n     Covered Code. You may distribute the Executable version of Covered\n     Code or ownership rights under a license of Your choice, which may\n     contain terms different from this License, provided that You are in\n     compliance with the terms of this License and that the license for the\n     Executable version does not attempt to limit or alter the recipient's\n     rights in the Source Code version from the rights set forth in this\n     License. If You distribute the Executable version under a different\n     license You must make it absolutely clear that any terms which differ\n     from this License are offered by You alone, not by the Initial\n     Developer or any Contributor. You hereby agree to indemnify the\n     Initial Developer and every Contributor for any liability incurred by\n     the Initial Developer or such Contributor as a result of any such\n     terms You offer.\n\n     3.7. Larger Works.\n     You may create a Larger Work by combining Covered Code with other code\n     not governed by the terms of this License and distribute the Larger\n     Work as a single product. In such a case, You must make sure the\n     requirements of this License are fulfilled for the Covered Code.\n\n4. Inability to Comply Due to Statute or Regulation.\n\n     If it is impossible for You to comply with any of the terms of this\n     License with respect to some or all of the Covered Code due to\n     statute, judicial order, or regulation then You must: (a) comply with\n     the terms of this License to the maximum extent possible; and (b)\n     describe the limitations and the code they affect. Such description\n     must be included in the LEGAL file described in Section 3.4 and must\n     be included with all distributions of the Source Code. Except to the\n     extent prohibited by statute or regulation, such description must be\n     sufficiently detailed for a recipient of ordinary skill to be able to\n     understand it.\n\n5. Application of this License.\n\n     This License applies to code to which the Initial Developer has\n     attached the notice in Exhibit A and to related Covered Code.\n\n6. Versions of the License.\n\n     6.1. New Versions.\n     Netscape Communications Corporation (\"Netscape\") may publish revised\n     and/or new versions of the License from time to time. Each version\n     will be given a distinguishing version number.\n\n     6.2. Effect of New Versions.\n     Once Covered Code has been published under a particular version of the\n     License, You may always continue to use it under the terms of that\n     version. You may also choose to use such Covered Code under the terms\n     of any subsequent version of the License published by Netscape. No one\n     other than Netscape has the right to modify the terms applicable to\n     Covered Code created under this License.\n\n     6.3. Derivative Works.\n     If You create or use a modified version of this License (which you may\n     only do in order to apply it to code which is not already Covered Code\n     governed by this License), You must (a) rename Your license so that\n     the phrases \"Mozilla\", \"MOZILLAPL\", \"MOZPL\", \"Netscape\",\n     \"MPL\", \"NPL\" or any confusingly similar phrase do not appear in your\n     license (except to note that your license differs from this License)\n     and (b) otherwise make it clear that Your version of the license\n     contains terms which differ from the Mozilla Public License and\n     Netscape Public License. (Filling in the name of the Initial\n     Developer, Original Code or Contributor in the notice described in\n     Exhibit A shall not of themselves be deemed to be modifications of\n     this License.)\n\n7. DISCLAIMER OF WARRANTY.\n\n     COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN \"AS IS\" BASIS,\n     WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,\n     WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF\n     DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING.\n     THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE\n     IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT,\n     YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE\n     COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER\n     OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF\n     ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.\n\n8. TERMINATION.\n\n     8.1.  This License and the rights granted hereunder will terminate\n     automatically if You fail to comply with terms herein and fail to cure\n     such breach within 30 days of becoming aware of the breach. All\n     sublicenses to the Covered Code which are properly granted shall\n     survive any termination of this License. Provisions which, by their\n     nature, must remain in effect beyond the termination of this License\n     shall survive.\n\n     8.2.  If You initiate litigation by asserting a patent infringement\n     claim (excluding declatory judgment actions) against Initial Developer\n     or a Contributor (the Initial Developer or Contributor against whom\n     You file such action is referred to as \"Participant\")  alleging that:\n\n     (a)  such Participant's Contributor Version directly or indirectly\n     infringes any patent, then any and all rights granted by such\n     Participant to You under Sections 2.1 and/or 2.2 of this License\n     shall, upon 60 days notice from Participant terminate prospectively,\n     unless if within 60 days after receipt of notice You either: (i)\n     agree in writing to pay Participant a mutually agreeable reasonable\n     royalty for Your past and future use of Modifications made by such\n     Participant, or (ii) withdraw Your litigation claim with respect to\n     the Contributor Version against such Participant.  If within 60 days\n     of notice, a reasonable royalty and payment arrangement are not\n     mutually agreed upon in writing by the parties or the litigation claim\n     is not withdrawn, the rights granted by Participant to You under\n     Sections 2.1 and/or 2.2 automatically terminate at the expiration of\n     the 60 day notice period specified above.\n\n     (b)  any software, hardware, or device, other than such Participant's\n     Contributor Version, directly or indirectly infringes any patent, then\n     any rights granted to You by such Participant under Sections 2.1(b)\n     and 2.2(b) are revoked effective as of the date You first made, used,\n     sold, distributed, or had made, Modifications made by that\n     Participant.\n\n     8.3.  If You assert a patent infringement claim against Participant\n     alleging that such Participant's Contributor Version directly or\n     indirectly infringes any patent where such claim is resolved (such as\n     by license or settlement) prior to the initiation of patent\n     infringement litigation, then the reasonable value of the licenses\n     granted by such Participant under Sections 2.1 or 2.2 shall be taken\n     into account in determining the amount or value of any payment or\n     license.\n\n     8.4.  In the event of termination under Sections 8.1 or 8.2 above,\n     all end user license agreements (excluding distributors and resellers)\n     which have been validly granted by You or any distributor hereunder\n     prior to termination shall survive termination.\n\n9. LIMITATION OF LIABILITY.\n\n     UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT\n     (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL\n     DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE,\n     OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR\n     ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY\n     CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL,\n     WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER\n     COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN\n     INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF\n     LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY\n     RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW\n     PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE\n     EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO\n     THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.\n\n10. U.S. GOVERNMENT END USERS.\n\n     The Covered Code is a \"commercial item,\" as that term is defined in\n     48 C.F.R. 2.101 (Oct. 1995), consisting of \"commercial computer\n     software\" and \"commercial computer software documentation,\" as such\n     terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48\n     C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995),\n     all U.S. Government End Users acquire Covered Code with only those\n     rights set forth herein.\n\n11. MISCELLANEOUS.\n\n     This License represents the complete agreement concerning subject\n     matter hereof. If any provision of this License is held to be\n     unenforceable, such provision shall be reformed only to the extent\n     necessary to make it enforceable. This License shall be governed by\n     California law provisions (except to the extent applicable law, if\n     any, provides otherwise), excluding its conflict-of-law provisions.\n     With respect to disputes in which at least one party is a citizen of,\n     or an entity chartered or registered to do business in the United\n     States of America, any litigation relating to this License shall be\n     subject to the jurisdiction of the Federal Courts of the Northern\n     District of California, with venue lying in Santa Clara County,\n     California, with the losing party responsible for costs, including\n     without limitation, court costs and reasonable attorneys' fees and\n     expenses. The application of the United Nations Convention on\n     Contracts for the International Sale of Goods is expressly excluded.\n     Any law or regulation which provides that the language of a contract\n     shall be construed against the drafter shall not apply to this\n     License.\n\n12. RESPONSIBILITY FOR CLAIMS.\n\n     As between Initial Developer and the Contributors, each party is\n     responsible for claims and damages arising, directly or indirectly,\n     out of its utilization of rights under this License and You agree to\n     work with Initial Developer and Contributors to distribute such\n     responsibility on an equitable basis. Nothing herein is intended or\n     shall be deemed to constitute any admission of liability.\n\n13. MULTIPLE-LICENSED CODE.\n\n     Initial Developer may designate portions of the Covered Code as\n     \"Multiple-Licensed\".  \"Multiple-Licensed\" means that the Initial\n     Developer permits you to utilize portions of the Covered Code under\n     Your choice of the NPL or the alternative licenses, if any, specified\n     by the Initial Developer in the file described in Exhibit A.\n\nEXHIBIT A -Mozilla Public License.\n\n     ``The contents of this file are subject to the Mozilla Public License\n     Version 1.1 (the \"License\"); you may not use this file except in\n     compliance with the License. You may obtain a copy of the License at\n     http://www.mozilla.org/MPL/\n\n     Software distributed under the License is distributed on an \"AS IS\"\n     basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the\n     License for the specific language governing rights and limitations\n     under the License.\n\n     The Original Code is ______________________________________.\n\n     The Initial Developer of the Original Code is ________________________.\n     Portions created by ______________________ are Copyright (C) ______\n     _______________________. All Rights Reserved.\n\n     Contributor(s): ______________________________________.\n\n     Alternatively, the contents of this file may be used under the terms\n     of the _____ license (the  \"[___] License\"), in which case the\n     provisions of [______] License are applicable instead of those\n     above.  If you wish to allow use of your version of this file only\n     under the terms of the [____] License and not to allow others to use\n     your version of this file under the MPL, indicate your decision by\n     deleting  the provisions above and replace  them with the notice and\n     other provisions required by the [___] License.  If you do not delete\n     the provisions above, a recipient may use your version of this file\n     under either the MPL or the [___] License.\"\n\n     [NOTE: The text of this Exhibit A may differ slightly from the text of\n     the notices in the Source Code files of the Original Code. You should\n     use the text of this Exhibit A rather than the text found in the\n     Original Code Source Code for Your Modifications.]\n"
  },
  {
    "path": "licenses/juniversalchardet-NOTICE.txt",
    "content": ""
  },
  {
    "path": "licenses/pdfbox-1.8.10.jar.sha1",
    "content": "bc5d1254495be36d0a3b3d6c35f88d05200b9311\n"
  },
  {
    "path": "licenses/pdfbox-LICENSE.txt",
    "content": "\n                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright [yyyy] [name of copyright owner]\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\nEXTERNAL COMPONENTS\n\nApache PDFBox includes a number of components with separate copyright notices\nand license terms. Your use of these components is subject to the terms and\nconditions of the following licenses.\n\nContributions made to the original PDFBox and FontBox projects:\n\n   Copyright (c) 2002-2007, www.pdfbox.org\n   All rights reserved.\n\n   Redistribution and use in source and binary forms, with or without\n   modification, are permitted provided that the following conditions are met:\n\n   1. Redistributions of source code must retain the above copyright notice,\n      this list of conditions and the following disclaimer.\n\n   2. Redistributions in binary form must reproduce the above copyright\n      notice, this list of conditions and the following disclaimer in the\n      documentation and/or other materials provided with the distribution.\n\n   3. Neither the name of pdfbox; nor the names of its contributors may be\n      used to endorse or promote products derived from this software without\n      specific prior written permission.\n\n   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n   ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n   FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n   DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n   SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n   CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n   LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n   OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n   SUCH DAMAGE.\n\nAdobe Font Metrics (AFM) for PDF Core 14 Fonts\n\n   This file and the 14 PostScript(R) AFM files it accompanies may be used,\n   copied, and distributed for any purpose and without charge, with or without\n   modification, provided that all copyright notices are retained; that the\n   AFM files are not distributed without this file; that all modifications\n   to this file or any of the AFM files are prominently noted in the modified\n   file(s); and that this paragraph is not modified. Adobe Systems has no\n   responsibility or obligation to support the use of the AFM files.\n\nCMaps for PDF Fonts (http://opensource.adobe.com/wiki/display/cmap/Downloads)\n\n   Copyright 1990-2009 Adobe Systems Incorporated.\n   All rights reserved.\n\n   Redistribution and use in source and binary forms, with or without\n   modification, are permitted provided that the following conditions\n   are met:\n\n   Redistributions of source code must retain the above copyright notice,\n   this list of conditions and the following disclaimer.\n\n   Redistributions in binary form must reproduce the above copyright notice,\n   this list of conditions and the following disclaimer in the documentation\n   and/or other materials provided with the distribution.\n\n   Neither the name of Adobe Systems Incorporated nor the names of its\n   contributors may be used to endorse or promote products derived from this\n   software without specific prior written permission.\n\n   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n   ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\n   LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n   CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n   SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF\n   THE POSSIBILITY OF SUCH DAMAGE.\n\nPaDaF PDF/A preflight (http://sourceforge.net/projects/padaf)\n\n  Copyright 2010 Atos Worldline SAS\n\n  Licensed by Atos Worldline SAS under one or more\n  contributor license agreements.  See the NOTICE file distributed with\n  this work for additional information regarding copyright ownership.\n  Atos Worldline SAS licenses this file to You under the Apache License, Version 2.0\n  (the \"License\"); you may not use this file except in compliance with\n  the License.  You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n  Unless required by applicable law or agreed to in writing, software\n  distributed under the License is distributed on an \"AS IS\" BASIS,\n  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  See the License for the specific language governing permissions and\n  limitations under the License.\n\nOSXAdapter\n\n  Version: 2.0\n\n  Disclaimer: IMPORTANT:  This Apple software is supplied to you by\n  Apple Inc. (\"Apple\") in consideration of your agreement to the\n  following terms, and your use, installation, modification or\n  redistribution of this Apple software constitutes acceptance of these\n  terms.  If you do not agree with these terms, please do not use,\n  install, modify or redistribute this Apple software.\n\n  In consideration of your agreement to abide by the following terms, and\n  subject to these terms, Apple grants you a personal, non-exclusive\n  license, under Apple's copyrights in this original Apple software (the\n  \"Apple Software\"), to use, reproduce, modify and redistribute the Apple\n  Software, with or without modifications, in source and/or binary forms;\n  provided that if you redistribute the Apple Software in its entirety and\n  without modifications, you must retain this notice and the following\n  text and disclaimers in all such redistributions of the Apple Software.\n  Neither the name, trademarks, service marks or logos of Apple Inc.\n  may be used to endorse or promote products derived from the Apple\n  Software without specific prior written permission from Apple.  Except\n  as expressly stated in this notice, no other rights or licenses, express\n  or implied, are granted by Apple herein, including but not limited to\n  any patent rights that may be infringed by your derivative works or by\n  other works in which the Apple Software may be incorporated.\n\n  The Apple Software is provided by Apple on an \"AS IS\" basis.  APPLE\n  MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION\n  THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS\n  FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND\n  OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.\n\n  IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL\n  OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n  INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION,\n  MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED\n  AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE),\n  STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE\n  POSSIBILITY OF SUCH DAMAGE.\n\n  Copyright (C) 2003-2007 Apple, Inc., All Rights Reserved\n"
  },
  {
    "path": "licenses/pdfbox-NOTICE.txt",
    "content": "Apache PDFBox\nCopyright 2014 The Apache Software Foundation\n\nThis product includes software developed at\nThe Apache Software Foundation (http://www.apache.org/).\n\nBased on source code originally developed in the PDFBox and\nFontBox projects.\n\nCopyright (c) 2002-2007, www.pdfbox.org\n\nBased on source code originally developed in the PaDaF project.\nCopyright (c) 2010 Atos Worldline SAS\n\nIncludes the Adobe Glyph List\nCopyright 1997, 1998, 2002, 2007, 2010 Adobe Systems Incorporated.\n\nIncludes the Zapf Dingbats Glyph List\nCopyright 2002, 2010 Adobe Systems Incorporated.\n\nIncludes OSXAdapter\nCopyright (C) 2003-2007 Apple, Inc., All Rights Reserved\n"
  },
  {
    "path": "licenses/poi-3.13.jar.sha1",
    "content": "0f59f504ba8c521e61e25f417ec652fd485010f3"
  },
  {
    "path": "licenses/poi-LICENSE.txt",
    "content": "\n                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright [yyyy] [name of copyright owner]\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n\nAPACHE POI SUBCOMPONENTS:\n\nApache POI includes subcomponents with separate copyright notices and\nlicense terms. Your use of these subcomponents is subject to the terms\nand conditions of the following licenses:\n\n\nOffice Open XML schemas (ooxml-schemas-1.1.jar)\n\n    The Office Open XML schema definitions used by Apache POI are\n    a part of the Office Open XML ECMA Specification (ECMA-376, [1]).\n    As defined in section 9.4 of the ECMA bylaws [2], this specification\n    is available to all interested parties without restriction:\n\n        9.4 All documents when approved shall be made available to\n            all interested parties without restriction.\n\n    Furthermore, both Microsoft and Adobe have granted patent licenses\n    to this work [3,4,5].\n\n    [1] http://www.ecma-international.org/publications/standards/Ecma-376.htm\n    [2] http://www.ecma-international.org/memento/Ecmabylaws.htm\n    [3] http://www.microsoft.com/openspecifications/en/us/programs/osp/default.aspx\n    [4] http://www.ecma-international.org/publications/files/ECMA-ST/Ecma%20PATENT/Patent%20statements%20ok/ECMA-376%20Edition%202%20Microsoft%20Patent%20Declaration.pdf\n    [5] http://www.ecma-international.org/publications/files/ECMA-ST/Ecma%20PATENT/Patent%20statements%20ok/ECMA-376%20Adobe%20Patent%20Declaration.pdf\n\n\nJUnit test library (junit-4.11.jar)\n\n    Common Public License - v 1.0\n\n    THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON\n    PUBLIC LICENSE (\"AGREEMENT\"). ANY USE, REPRODUCTION OR DISTRIBUTION\n    OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.\n\n    1. DEFINITIONS\n\n    \"Contribution\" means:\n\n    a) in the case of the initial Contributor, the initial code and\n       documentation distributed under this Agreement, and\n\n    b) in the case of each subsequent Contributor:\n\n       i)  changes to the Program, and\n\n       ii) additions to the Program;\n\n       where such changes and/or additions to the Program originate from\n       and are distributed by that particular Contributor. A Contribution\n       'originates' from a Contributor if it was added to the Program by\n       such Contributor itself or anyone acting on such Contributor's behalf.\n       Contributions do not include additions to the Program which: (i) are\n       separate modules of software distributed in conjunction with the\n       Program under their own license agreement, and (ii) are not derivative\n       works of the Program.\n\n    \"Contributor\" means any person or entity that distributes the Program.\n\n    \"Licensed Patents \" mean patent claims licensable by a Contributor which\n    are necessarily infringed by the use or sale of its Contribution alone\n    or when combined with the Program.\n\n    \"Program\" means the Contributions distributed in accordance with this\n    Agreement.\n\n    \"Recipient\" means anyone who receives the Program under this Agreement,\n    including all Contributors.\n\n    2. GRANT OF RIGHTS\n\n    a) Subject to the terms of this Agreement, each Contributor hereby grants\n       Recipient a non-exclusive, worldwide, royalty-free copyright license\n       to reproduce, prepare derivative works of, publicly display, publicly\n       perform, distribute and sublicense the Contribution of such\n       Contributor, if any, and such derivative works, in source code and\n       object code form.\n\n    b) Subject to the terms of this Agreement, each Contributor hereby grants\n       Recipient a non-exclusive, worldwide, royalty-free patent license under\n       Licensed Patents to make, use, sell, offer to sell, import and\n       otherwise transfer the Contribution of such Contributor, if any, in\n       source code and object code form. This patent license shall apply to\n       the combination of the Contribution and the Program if, at the time\n       the Contribution is added by the Contributor, such addition of the\n       Contribution causes such combination to be covered by the Licensed\n       Patents. The patent license shall not apply to any other combinations\n       which include the Contribution. No hardware per se is licensed\n       hereunder.\n\n    c) Recipient understands that although each Contributor grants the\n       licenses to its Contributions set forth herein, no assurances are\n       provided by any Contributor that the Program does not infringe the\n       patent or other intellectual property rights of any other entity.\n       Each Contributor disclaims any liability to Recipient for claims\n       brought by any other entity based on infringement of intellectual\n       property rights or otherwise. As a condition to exercising the rights\n       and licenses granted hereunder, each Recipient hereby assumes sole\n       responsibility to secure any other intellectual property rights\n       needed, if any. For example, if a third party patent license is\n       required to allow Recipient to distribute the Program, it is\n       Recipient's responsibility to acquire that license before\n       distributing the Program.\n\n    d) Each Contributor represents that to its knowledge it has sufficient\n       copyright rights in its Contribution, if any, to grant the copyright\n       license set forth in this Agreement.\n\n    3. REQUIREMENTS\n\n    A Contributor may choose to distribute the Program in object code form\n    under its own license agreement, provided that:\n\n    a) it complies with the terms and conditions of this Agreement; and\n\n    b) its license agreement:\n\n       i)   effectively disclaims on behalf of all Contributors all warranties\n            and conditions, express and implied, including warranties or\n            conditions of title and non-infringement, and implied warranties\n            or conditions of merchantability and fitness for a particular\n            purpose;\n\n       ii)  effectively excludes on behalf of all Contributors all liability\n            for damages, including direct, indirect, special, incidental and\n            consequential damages, such as lost profits;\n\n       iii) states that any provisions which differ from this Agreement are\n            offered by that Contributor alone and not by any other party; and\n\n       iv)  states that source code for the Program is available from such\n            Contributor, and informs licensees how to obtain it in a\n            reasonable manner on or through a medium customarily used for\n            software exchange.\n\n    When the Program is made available in source code form:\n\n    a) it must be made available under this Agreement; and\n\n    b) a copy of this Agreement must be included with each copy of\n       the Program.\n\n    Contributors may not remove or alter any copyright notices contained\n    within the Program.\n\n    Each Contributor must identify itself as the originator of its\n    Contribution, if any, in a manner that reasonably allows subsequent\n    Recipients to identify the originator of the Contribution.\n\n    4. COMMERCIAL DISTRIBUTION\n\n    Commercial distributors of software may accept certain responsibilities\n    with respect to end users, business partners and the like. While this\n    license is intended to facilitate the commercial use of the Program,\n    the Contributor who includes the Program in a commercial product offering\n    should do so in a manner which does not create potential liability for\n    other Contributors. Therefore, if a Contributor includes the Program\n    in a commercial product offering, such Contributor (\"Commercial\n    Contributor\") hereby agrees to defend and indemnify every other\n    Contributor (\"Indemnified Contributor\") against any losses, damages\n    and costs (collectively \"Losses\") arising from claims, lawsuits and\n    other legal actions brought by a third party against the Indemnified\n    Contributor to the extent caused by the acts or omissions of such\n    Commercial Contributor in connection with its distribution of the\n    Program in a commercial product offering. The obligations in this\n    section do not apply to any claims or Losses relating to any actual\n    or alleged intellectual property infringement. In order to qualify,\n    an Indemnified Contributor must: a) promptly notify the Commercial\n    Contributor in writing of such claim, and b) allow the Commercial\n    Contributor to control, and cooperate with the Commercial Contributor\n    in, the defense and any related settlement negotiations. The Indemnified\n    Contributor may participate in any such claim at its own expense.\n\n    For example, a Contributor might include the Program in a commercial\n    product offering, Product X. That Contributor is then a Commercial\n    Contributor. If that Commercial Contributor then makes performance\n    claims, or offers warranties related to Product X, those performance\n    claims and warranties are such Commercial Contributor's responsibility\n    alone. Under this section, the Commercial Contributor would have to\n    defend claims against the other Contributors related to those\n    performance claims and warranties, and if a court requires any other\n    Contributor to pay any damages as a result, the Commercial Contributor\n    must pay those damages.\n\n    5. NO WARRANTY\n\n    EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED\n    ON AN \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER\n    EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR\n    CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR\n    A PARTICULAR PURPOSE. Each Recipient is solely responsible for\n    determining the appropriateness of using and distributing the Program\n    and assumes all risks associated with its exercise of rights under this\n    Agreement, including but not limited to the risks and costs of program\n    errors, compliance with applicable laws, damage to or loss of data,\n    programs or equipment, and unavailability or interruption of operations.\n\n    6. DISCLAIMER OF LIABILITY\n\n    EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR\n    ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,\n    INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING\n    WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF\n    LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n    NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR\n    DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED\n    HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.\n\n    7. GENERAL\n\n    If any provision of this Agreement is invalid or unenforceable under\n    applicable law, it shall not affect the validity or enforceability of\n    the remainder of the terms of this Agreement, and without further\n    action by the parties hereto, such provision shall be reformed to the\n    minimum extent necessary to make such provision valid and enforceable.\n\n    If Recipient institutes patent litigation against a Contributor with\n    respect to a patent applicable to software (including a cross-claim or\n    counterclaim in a lawsuit), then any patent licenses granted by that\n    Contributor to such Recipient under this Agreement shall terminate as of\n    the date such litigation is filed. In addition, if Recipient institutes\n    patent litigation against any entity (including a cross-claim or\n    counterclaim in a lawsuit) alleging that the Program itself (excluding\n    combinations of the Program with other software or hardware) infringes\n    such Recipient's patent(s), then such Recipient's rights granted under\n    Section 2(b) shall terminate as of the date such litigation is filed.\n\n    All Recipient's rights under this Agreement shall terminate if it fails\n    to comply with any of the material terms or conditions of this Agreement\n    and does not cure such failure in a reasonable period of time after\n    becoming aware of such noncompliance. If all Recipient's rights under\n    this Agreement terminate, Recipient agrees to cease use and distribution\n    of the Program as soon as reasonably practicable. However, Recipient's\n    obligations under this Agreement and any licenses granted by Recipient\n    relating to the Program shall continue and survive.\n\n    Everyone is permitted to copy and distribute copies of this Agreement,\n    but in order to avoid inconsistency the Agreement is copyrighted and may\n    only be modified in the following manner. The Agreement Steward reserves\n    the right to publish new versions (including revisions) of this Agreement\n    from time to time. No one other than the Agreement Steward has the right\n    to modify this Agreement. IBM is the initial Agreement Steward. IBM may\n    assign the responsibility to serve as the Agreement Steward to a suitable\n    separate entity. Each new version of the Agreement will be given a\n    distinguishing version number. The Program (including Contributions) may\n    always be distributed subject to the version of the Agreement under which\n    it was received. In addition, after a new version of the Agreement is\n    published, Contributor may elect to distribute the Program (including\n    its Contributions) under the new version. Except as expressly stated in\n    Sections 2(a) and 2(b) above, Recipient receives no rights or licenses\n    to the intellectual property of any Contributor under this Agreement,\n    whether expressly, by implication, estoppel or otherwise. All rights in\n    the Program not expressly granted under this Agreement are reserved.\n\n    This Agreement is governed by the laws of the State of New York and the\n    intellectual property laws of the United States of America. No party to\n    this Agreement will bring a legal action under this Agreement more than\n    one year after the cause of action arose. Each party waives its rights\n    to a jury trial in any resulting litigation.\n"
  },
  {
    "path": "licenses/poi-NOTICE.txt",
    "content": "Apache POI\nCopyright 2003-2015 The Apache Software Foundation\n\nThis product includes software developed by\nThe Apache Software Foundation (http://www.apache.org/).\n\nThis product contains parts that were originally based on software from BEA.\nCopyright (c) 2000-2003, BEA Systems, <http://www.bea.com/>.\n\nThis product contains W3C XML Schema documents. Copyright 2001-2003 (c)\nWorld Wide Web Consortium (Massachusetts Institute of Technology, European\nResearch Consortium for Informatics and Mathematics, Keio University)\n\nThis product contains the Piccolo XML Parser for Java\n(http://piccolo.sourceforge.net/). Copyright 2002 Yuval Oren.\n\nThis product contains the chunks_parse_cmds.tbl file from the vsdump program.\nCopyright (C) 2006-2007 Valek Filippov (frob@df.ru)\n\nThis product contains parts of the eID Applet project\n(http://eid-applet.googlecode.com). Copyright (c) 2009-2014\nFedICT (federal ICT department of Belgium), e-Contract.be BVBA (https://www.e-contract.be),\nBart Hanssens from FedICT\n"
  },
  {
    "path": "licenses/poi-ooxml-3.13.jar.sha1",
    "content": "c364a8f5422d613e3a56db3b4b889f2989d7ee73"
  },
  {
    "path": "licenses/poi-ooxml-LICENSE.txt",
    "content": "\n                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright [yyyy] [name of copyright owner]\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n\nAPACHE POI SUBCOMPONENTS:\n\nApache POI includes subcomponents with separate copyright notices and\nlicense terms. Your use of these subcomponents is subject to the terms\nand conditions of the following licenses:\n\n\nOffice Open XML schemas (ooxml-schemas-1.1.jar)\n\n    The Office Open XML schema definitions used by Apache POI are\n    a part of the Office Open XML ECMA Specification (ECMA-376, [1]).\n    As defined in section 9.4 of the ECMA bylaws [2], this specification\n    is available to all interested parties without restriction:\n\n        9.4 All documents when approved shall be made available to\n            all interested parties without restriction.\n\n    Furthermore, both Microsoft and Adobe have granted patent licenses\n    to this work [3,4,5].\n\n    [1] http://www.ecma-international.org/publications/standards/Ecma-376.htm\n    [2] http://www.ecma-international.org/memento/Ecmabylaws.htm\n    [3] http://www.microsoft.com/openspecifications/en/us/programs/osp/default.aspx\n    [4] http://www.ecma-international.org/publications/files/ECMA-ST/Ecma%20PATENT/Patent%20statements%20ok/ECMA-376%20Edition%202%20Microsoft%20Patent%20Declaration.pdf\n    [5] http://www.ecma-international.org/publications/files/ECMA-ST/Ecma%20PATENT/Patent%20statements%20ok/ECMA-376%20Adobe%20Patent%20Declaration.pdf\n\n\nJUnit test library (junit-4.11.jar)\n\n    Common Public License - v 1.0\n\n    THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON\n    PUBLIC LICENSE (\"AGREEMENT\"). ANY USE, REPRODUCTION OR DISTRIBUTION\n    OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.\n\n    1. DEFINITIONS\n\n    \"Contribution\" means:\n\n    a) in the case of the initial Contributor, the initial code and\n       documentation distributed under this Agreement, and\n\n    b) in the case of each subsequent Contributor:\n\n       i)  changes to the Program, and\n\n       ii) additions to the Program;\n\n       where such changes and/or additions to the Program originate from\n       and are distributed by that particular Contributor. A Contribution\n       'originates' from a Contributor if it was added to the Program by\n       such Contributor itself or anyone acting on such Contributor's behalf.\n       Contributions do not include additions to the Program which: (i) are\n       separate modules of software distributed in conjunction with the\n       Program under their own license agreement, and (ii) are not derivative\n       works of the Program.\n\n    \"Contributor\" means any person or entity that distributes the Program.\n\n    \"Licensed Patents \" mean patent claims licensable by a Contributor which\n    are necessarily infringed by the use or sale of its Contribution alone\n    or when combined with the Program.\n\n    \"Program\" means the Contributions distributed in accordance with this\n    Agreement.\n\n    \"Recipient\" means anyone who receives the Program under this Agreement,\n    including all Contributors.\n\n    2. GRANT OF RIGHTS\n\n    a) Subject to the terms of this Agreement, each Contributor hereby grants\n       Recipient a non-exclusive, worldwide, royalty-free copyright license\n       to reproduce, prepare derivative works of, publicly display, publicly\n       perform, distribute and sublicense the Contribution of such\n       Contributor, if any, and such derivative works, in source code and\n       object code form.\n\n    b) Subject to the terms of this Agreement, each Contributor hereby grants\n       Recipient a non-exclusive, worldwide, royalty-free patent license under\n       Licensed Patents to make, use, sell, offer to sell, import and\n       otherwise transfer the Contribution of such Contributor, if any, in\n       source code and object code form. This patent license shall apply to\n       the combination of the Contribution and the Program if, at the time\n       the Contribution is added by the Contributor, such addition of the\n       Contribution causes such combination to be covered by the Licensed\n       Patents. The patent license shall not apply to any other combinations\n       which include the Contribution. No hardware per se is licensed\n       hereunder.\n\n    c) Recipient understands that although each Contributor grants the\n       licenses to its Contributions set forth herein, no assurances are\n       provided by any Contributor that the Program does not infringe the\n       patent or other intellectual property rights of any other entity.\n       Each Contributor disclaims any liability to Recipient for claims\n       brought by any other entity based on infringement of intellectual\n       property rights or otherwise. As a condition to exercising the rights\n       and licenses granted hereunder, each Recipient hereby assumes sole\n       responsibility to secure any other intellectual property rights\n       needed, if any. For example, if a third party patent license is\n       required to allow Recipient to distribute the Program, it is\n       Recipient's responsibility to acquire that license before\n       distributing the Program.\n\n    d) Each Contributor represents that to its knowledge it has sufficient\n       copyright rights in its Contribution, if any, to grant the copyright\n       license set forth in this Agreement.\n\n    3. REQUIREMENTS\n\n    A Contributor may choose to distribute the Program in object code form\n    under its own license agreement, provided that:\n\n    a) it complies with the terms and conditions of this Agreement; and\n\n    b) its license agreement:\n\n       i)   effectively disclaims on behalf of all Contributors all warranties\n            and conditions, express and implied, including warranties or\n            conditions of title and non-infringement, and implied warranties\n            or conditions of merchantability and fitness for a particular\n            purpose;\n\n       ii)  effectively excludes on behalf of all Contributors all liability\n            for damages, including direct, indirect, special, incidental and\n            consequential damages, such as lost profits;\n\n       iii) states that any provisions which differ from this Agreement are\n            offered by that Contributor alone and not by any other party; and\n\n       iv)  states that source code for the Program is available from such\n            Contributor, and informs licensees how to obtain it in a\n            reasonable manner on or through a medium customarily used for\n            software exchange.\n\n    When the Program is made available in source code form:\n\n    a) it must be made available under this Agreement; and\n\n    b) a copy of this Agreement must be included with each copy of\n       the Program.\n\n    Contributors may not remove or alter any copyright notices contained\n    within the Program.\n\n    Each Contributor must identify itself as the originator of its\n    Contribution, if any, in a manner that reasonably allows subsequent\n    Recipients to identify the originator of the Contribution.\n\n    4. COMMERCIAL DISTRIBUTION\n\n    Commercial distributors of software may accept certain responsibilities\n    with respect to end users, business partners and the like. While this\n    license is intended to facilitate the commercial use of the Program,\n    the Contributor who includes the Program in a commercial product offering\n    should do so in a manner which does not create potential liability for\n    other Contributors. Therefore, if a Contributor includes the Program\n    in a commercial product offering, such Contributor (\"Commercial\n    Contributor\") hereby agrees to defend and indemnify every other\n    Contributor (\"Indemnified Contributor\") against any losses, damages\n    and costs (collectively \"Losses\") arising from claims, lawsuits and\n    other legal actions brought by a third party against the Indemnified\n    Contributor to the extent caused by the acts or omissions of such\n    Commercial Contributor in connection with its distribution of the\n    Program in a commercial product offering. The obligations in this\n    section do not apply to any claims or Losses relating to any actual\n    or alleged intellectual property infringement. In order to qualify,\n    an Indemnified Contributor must: a) promptly notify the Commercial\n    Contributor in writing of such claim, and b) allow the Commercial\n    Contributor to control, and cooperate with the Commercial Contributor\n    in, the defense and any related settlement negotiations. The Indemnified\n    Contributor may participate in any such claim at its own expense.\n\n    For example, a Contributor might include the Program in a commercial\n    product offering, Product X. That Contributor is then a Commercial\n    Contributor. If that Commercial Contributor then makes performance\n    claims, or offers warranties related to Product X, those performance\n    claims and warranties are such Commercial Contributor's responsibility\n    alone. Under this section, the Commercial Contributor would have to\n    defend claims against the other Contributors related to those\n    performance claims and warranties, and if a court requires any other\n    Contributor to pay any damages as a result, the Commercial Contributor\n    must pay those damages.\n\n    5. NO WARRANTY\n\n    EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED\n    ON AN \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER\n    EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR\n    CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR\n    A PARTICULAR PURPOSE. Each Recipient is solely responsible for\n    determining the appropriateness of using and distributing the Program\n    and assumes all risks associated with its exercise of rights under this\n    Agreement, including but not limited to the risks and costs of program\n    errors, compliance with applicable laws, damage to or loss of data,\n    programs or equipment, and unavailability or interruption of operations.\n\n    6. DISCLAIMER OF LIABILITY\n\n    EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR\n    ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,\n    INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING\n    WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF\n    LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n    NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR\n    DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED\n    HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.\n\n    7. GENERAL\n\n    If any provision of this Agreement is invalid or unenforceable under\n    applicable law, it shall not affect the validity or enforceability of\n    the remainder of the terms of this Agreement, and without further\n    action by the parties hereto, such provision shall be reformed to the\n    minimum extent necessary to make such provision valid and enforceable.\n\n    If Recipient institutes patent litigation against a Contributor with\n    respect to a patent applicable to software (including a cross-claim or\n    counterclaim in a lawsuit), then any patent licenses granted by that\n    Contributor to such Recipient under this Agreement shall terminate as of\n    the date such litigation is filed. In addition, if Recipient institutes\n    patent litigation against any entity (including a cross-claim or\n    counterclaim in a lawsuit) alleging that the Program itself (excluding\n    combinations of the Program with other software or hardware) infringes\n    such Recipient's patent(s), then such Recipient's rights granted under\n    Section 2(b) shall terminate as of the date such litigation is filed.\n\n    All Recipient's rights under this Agreement shall terminate if it fails\n    to comply with any of the material terms or conditions of this Agreement\n    and does not cure such failure in a reasonable period of time after\n    becoming aware of such noncompliance. If all Recipient's rights under\n    this Agreement terminate, Recipient agrees to cease use and distribution\n    of the Program as soon as reasonably practicable. However, Recipient's\n    obligations under this Agreement and any licenses granted by Recipient\n    relating to the Program shall continue and survive.\n\n    Everyone is permitted to copy and distribute copies of this Agreement,\n    but in order to avoid inconsistency the Agreement is copyrighted and may\n    only be modified in the following manner. The Agreement Steward reserves\n    the right to publish new versions (including revisions) of this Agreement\n    from time to time. No one other than the Agreement Steward has the right\n    to modify this Agreement. IBM is the initial Agreement Steward. IBM may\n    assign the responsibility to serve as the Agreement Steward to a suitable\n    separate entity. Each new version of the Agreement will be given a\n    distinguishing version number. The Program (including Contributions) may\n    always be distributed subject to the version of the Agreement under which\n    it was received. In addition, after a new version of the Agreement is\n    published, Contributor may elect to distribute the Program (including\n    its Contributions) under the new version. Except as expressly stated in\n    Sections 2(a) and 2(b) above, Recipient receives no rights or licenses\n    to the intellectual property of any Contributor under this Agreement,\n    whether expressly, by implication, estoppel or otherwise. All rights in\n    the Program not expressly granted under this Agreement are reserved.\n\n    This Agreement is governed by the laws of the State of New York and the\n    intellectual property laws of the United States of America. No party to\n    this Agreement will bring a legal action under this Agreement more than\n    one year after the cause of action arose. Each party waives its rights\n    to a jury trial in any resulting litigation.\n"
  },
  {
    "path": "licenses/poi-ooxml-NOTICE.txt",
    "content": "Apache POI\nCopyright 2003-2015 The Apache Software Foundation\n\nThis product includes software developed by\nThe Apache Software Foundation (http://www.apache.org/).\n\nThis product contains parts that were originally based on software from BEA.\nCopyright (c) 2000-2003, BEA Systems, <http://www.bea.com/>.\n\nThis product contains W3C XML Schema documents. Copyright 2001-2003 (c)\nWorld Wide Web Consortium (Massachusetts Institute of Technology, European\nResearch Consortium for Informatics and Mathematics, Keio University)\n\nThis product contains the Piccolo XML Parser for Java\n(http://piccolo.sourceforge.net/). Copyright 2002 Yuval Oren.\n\nThis product contains the chunks_parse_cmds.tbl file from the vsdump program.\nCopyright (C) 2006-2007 Valek Filippov (frob@df.ru)\n\nThis product contains parts of the eID Applet project\n(http://eid-applet.googlecode.com). Copyright (c) 2009-2014\nFedICT (federal ICT department of Belgium), e-Contract.be BVBA (https://www.e-contract.be),\nBart Hanssens from FedICT\n"
  },
  {
    "path": "licenses/poi-ooxml-schemas-3.13.jar.sha1",
    "content": "56fb0b9f3ffc3d7f7fc9b59e17b5fa2c3ab921e7"
  },
  {
    "path": "licenses/poi-ooxml-schemas-LICENSE.txt",
    "content": "\n                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright [yyyy] [name of copyright owner]\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n\nAPACHE POI SUBCOMPONENTS:\n\nApache POI includes subcomponents with separate copyright notices and\nlicense terms. Your use of these subcomponents is subject to the terms\nand conditions of the following licenses:\n\n\nOffice Open XML schemas (ooxml-schemas-1.1.jar)\n\n    The Office Open XML schema definitions used by Apache POI are\n    a part of the Office Open XML ECMA Specification (ECMA-376, [1]).\n    As defined in section 9.4 of the ECMA bylaws [2], this specification\n    is available to all interested parties without restriction:\n\n        9.4 All documents when approved shall be made available to\n            all interested parties without restriction.\n\n    Furthermore, both Microsoft and Adobe have granted patent licenses\n    to this work [3,4,5].\n\n    [1] http://www.ecma-international.org/publications/standards/Ecma-376.htm\n    [2] http://www.ecma-international.org/memento/Ecmabylaws.htm\n    [3] http://www.microsoft.com/openspecifications/en/us/programs/osp/default.aspx\n    [4] http://www.ecma-international.org/publications/files/ECMA-ST/Ecma%20PATENT/Patent%20statements%20ok/ECMA-376%20Edition%202%20Microsoft%20Patent%20Declaration.pdf\n    [5] http://www.ecma-international.org/publications/files/ECMA-ST/Ecma%20PATENT/Patent%20statements%20ok/ECMA-376%20Adobe%20Patent%20Declaration.pdf\n\n\nJUnit test library (junit-4.11.jar)\n\n    Common Public License - v 1.0\n\n    THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON\n    PUBLIC LICENSE (\"AGREEMENT\"). ANY USE, REPRODUCTION OR DISTRIBUTION\n    OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.\n\n    1. DEFINITIONS\n\n    \"Contribution\" means:\n\n    a) in the case of the initial Contributor, the initial code and\n       documentation distributed under this Agreement, and\n\n    b) in the case of each subsequent Contributor:\n\n       i)  changes to the Program, and\n\n       ii) additions to the Program;\n\n       where such changes and/or additions to the Program originate from\n       and are distributed by that particular Contributor. A Contribution\n       'originates' from a Contributor if it was added to the Program by\n       such Contributor itself or anyone acting on such Contributor's behalf.\n       Contributions do not include additions to the Program which: (i) are\n       separate modules of software distributed in conjunction with the\n       Program under their own license agreement, and (ii) are not derivative\n       works of the Program.\n\n    \"Contributor\" means any person or entity that distributes the Program.\n\n    \"Licensed Patents \" mean patent claims licensable by a Contributor which\n    are necessarily infringed by the use or sale of its Contribution alone\n    or when combined with the Program.\n\n    \"Program\" means the Contributions distributed in accordance with this\n    Agreement.\n\n    \"Recipient\" means anyone who receives the Program under this Agreement,\n    including all Contributors.\n\n    2. GRANT OF RIGHTS\n\n    a) Subject to the terms of this Agreement, each Contributor hereby grants\n       Recipient a non-exclusive, worldwide, royalty-free copyright license\n       to reproduce, prepare derivative works of, publicly display, publicly\n       perform, distribute and sublicense the Contribution of such\n       Contributor, if any, and such derivative works, in source code and\n       object code form.\n\n    b) Subject to the terms of this Agreement, each Contributor hereby grants\n       Recipient a non-exclusive, worldwide, royalty-free patent license under\n       Licensed Patents to make, use, sell, offer to sell, import and\n       otherwise transfer the Contribution of such Contributor, if any, in\n       source code and object code form. This patent license shall apply to\n       the combination of the Contribution and the Program if, at the time\n       the Contribution is added by the Contributor, such addition of the\n       Contribution causes such combination to be covered by the Licensed\n       Patents. The patent license shall not apply to any other combinations\n       which include the Contribution. No hardware per se is licensed\n       hereunder.\n\n    c) Recipient understands that although each Contributor grants the\n       licenses to its Contributions set forth herein, no assurances are\n       provided by any Contributor that the Program does not infringe the\n       patent or other intellectual property rights of any other entity.\n       Each Contributor disclaims any liability to Recipient for claims\n       brought by any other entity based on infringement of intellectual\n       property rights or otherwise. As a condition to exercising the rights\n       and licenses granted hereunder, each Recipient hereby assumes sole\n       responsibility to secure any other intellectual property rights\n       needed, if any. For example, if a third party patent license is\n       required to allow Recipient to distribute the Program, it is\n       Recipient's responsibility to acquire that license before\n       distributing the Program.\n\n    d) Each Contributor represents that to its knowledge it has sufficient\n       copyright rights in its Contribution, if any, to grant the copyright\n       license set forth in this Agreement.\n\n    3. REQUIREMENTS\n\n    A Contributor may choose to distribute the Program in object code form\n    under its own license agreement, provided that:\n\n    a) it complies with the terms and conditions of this Agreement; and\n\n    b) its license agreement:\n\n       i)   effectively disclaims on behalf of all Contributors all warranties\n            and conditions, express and implied, including warranties or\n            conditions of title and non-infringement, and implied warranties\n            or conditions of merchantability and fitness for a particular\n            purpose;\n\n       ii)  effectively excludes on behalf of all Contributors all liability\n            for damages, including direct, indirect, special, incidental and\n            consequential damages, such as lost profits;\n\n       iii) states that any provisions which differ from this Agreement are\n            offered by that Contributor alone and not by any other party; and\n\n       iv)  states that source code for the Program is available from such\n            Contributor, and informs licensees how to obtain it in a\n            reasonable manner on or through a medium customarily used for\n            software exchange.\n\n    When the Program is made available in source code form:\n\n    a) it must be made available under this Agreement; and\n\n    b) a copy of this Agreement must be included with each copy of\n       the Program.\n\n    Contributors may not remove or alter any copyright notices contained\n    within the Program.\n\n    Each Contributor must identify itself as the originator of its\n    Contribution, if any, in a manner that reasonably allows subsequent\n    Recipients to identify the originator of the Contribution.\n\n    4. COMMERCIAL DISTRIBUTION\n\n    Commercial distributors of software may accept certain responsibilities\n    with respect to end users, business partners and the like. While this\n    license is intended to facilitate the commercial use of the Program,\n    the Contributor who includes the Program in a commercial product offering\n    should do so in a manner which does not create potential liability for\n    other Contributors. Therefore, if a Contributor includes the Program\n    in a commercial product offering, such Contributor (\"Commercial\n    Contributor\") hereby agrees to defend and indemnify every other\n    Contributor (\"Indemnified Contributor\") against any losses, damages\n    and costs (collectively \"Losses\") arising from claims, lawsuits and\n    other legal actions brought by a third party against the Indemnified\n    Contributor to the extent caused by the acts or omissions of such\n    Commercial Contributor in connection with its distribution of the\n    Program in a commercial product offering. The obligations in this\n    section do not apply to any claims or Losses relating to any actual\n    or alleged intellectual property infringement. In order to qualify,\n    an Indemnified Contributor must: a) promptly notify the Commercial\n    Contributor in writing of such claim, and b) allow the Commercial\n    Contributor to control, and cooperate with the Commercial Contributor\n    in, the defense and any related settlement negotiations. The Indemnified\n    Contributor may participate in any such claim at its own expense.\n\n    For example, a Contributor might include the Program in a commercial\n    product offering, Product X. That Contributor is then a Commercial\n    Contributor. If that Commercial Contributor then makes performance\n    claims, or offers warranties related to Product X, those performance\n    claims and warranties are such Commercial Contributor's responsibility\n    alone. Under this section, the Commercial Contributor would have to\n    defend claims against the other Contributors related to those\n    performance claims and warranties, and if a court requires any other\n    Contributor to pay any damages as a result, the Commercial Contributor\n    must pay those damages.\n\n    5. NO WARRANTY\n\n    EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED\n    ON AN \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER\n    EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR\n    CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR\n    A PARTICULAR PURPOSE. Each Recipient is solely responsible for\n    determining the appropriateness of using and distributing the Program\n    and assumes all risks associated with its exercise of rights under this\n    Agreement, including but not limited to the risks and costs of program\n    errors, compliance with applicable laws, damage to or loss of data,\n    programs or equipment, and unavailability or interruption of operations.\n\n    6. DISCLAIMER OF LIABILITY\n\n    EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR\n    ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,\n    INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING\n    WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF\n    LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n    NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR\n    DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED\n    HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.\n\n    7. GENERAL\n\n    If any provision of this Agreement is invalid or unenforceable under\n    applicable law, it shall not affect the validity or enforceability of\n    the remainder of the terms of this Agreement, and without further\n    action by the parties hereto, such provision shall be reformed to the\n    minimum extent necessary to make such provision valid and enforceable.\n\n    If Recipient institutes patent litigation against a Contributor with\n    respect to a patent applicable to software (including a cross-claim or\n    counterclaim in a lawsuit), then any patent licenses granted by that\n    Contributor to such Recipient under this Agreement shall terminate as of\n    the date such litigation is filed. In addition, if Recipient institutes\n    patent litigation against any entity (including a cross-claim or\n    counterclaim in a lawsuit) alleging that the Program itself (excluding\n    combinations of the Program with other software or hardware) infringes\n    such Recipient's patent(s), then such Recipient's rights granted under\n    Section 2(b) shall terminate as of the date such litigation is filed.\n\n    All Recipient's rights under this Agreement shall terminate if it fails\n    to comply with any of the material terms or conditions of this Agreement\n    and does not cure such failure in a reasonable period of time after\n    becoming aware of such noncompliance. If all Recipient's rights under\n    this Agreement terminate, Recipient agrees to cease use and distribution\n    of the Program as soon as reasonably practicable. However, Recipient's\n    obligations under this Agreement and any licenses granted by Recipient\n    relating to the Program shall continue and survive.\n\n    Everyone is permitted to copy and distribute copies of this Agreement,\n    but in order to avoid inconsistency the Agreement is copyrighted and may\n    only be modified in the following manner. The Agreement Steward reserves\n    the right to publish new versions (including revisions) of this Agreement\n    from time to time. No one other than the Agreement Steward has the right\n    to modify this Agreement. IBM is the initial Agreement Steward. IBM may\n    assign the responsibility to serve as the Agreement Steward to a suitable\n    separate entity. Each new version of the Agreement will be given a\n    distinguishing version number. The Program (including Contributions) may\n    always be distributed subject to the version of the Agreement under which\n    it was received. In addition, after a new version of the Agreement is\n    published, Contributor may elect to distribute the Program (including\n    its Contributions) under the new version. Except as expressly stated in\n    Sections 2(a) and 2(b) above, Recipient receives no rights or licenses\n    to the intellectual property of any Contributor under this Agreement,\n    whether expressly, by implication, estoppel or otherwise. All rights in\n    the Program not expressly granted under this Agreement are reserved.\n\n    This Agreement is governed by the laws of the State of New York and the\n    intellectual property laws of the United States of America. No party to\n    this Agreement will bring a legal action under this Agreement more than\n    one year after the cause of action arose. Each party waives its rights\n    to a jury trial in any resulting litigation.\n"
  },
  {
    "path": "licenses/poi-ooxml-schemas-NOTICE.txt",
    "content": "Apache POI\nCopyright 2003-2015 The Apache Software Foundation\n\nThis product includes software developed by\nThe Apache Software Foundation (http://www.apache.org/).\n\nThis product contains parts that were originally based on software from BEA.\nCopyright (c) 2000-2003, BEA Systems, <http://www.bea.com/>.\n\nThis product contains W3C XML Schema documents. Copyright 2001-2003 (c)\nWorld Wide Web Consortium (Massachusetts Institute of Technology, European\nResearch Consortium for Informatics and Mathematics, Keio University)\n\nThis product contains the Piccolo XML Parser for Java\n(http://piccolo.sourceforge.net/). Copyright 2002 Yuval Oren.\n\nThis product contains the chunks_parse_cmds.tbl file from the vsdump program.\nCopyright (C) 2006-2007 Valek Filippov (frob@df.ru)\n\nThis product contains parts of the eID Applet project\n(http://eid-applet.googlecode.com). Copyright (c) 2009-2014\nFedICT (federal ICT department of Belgium), e-Contract.be BVBA (https://www.e-contract.be),\nBart Hanssens from FedICT\n"
  },
  {
    "path": "licenses/poi-scratchpad-3.13.jar.sha1",
    "content": "09d763275e6c7fa05d47e2581606748669e88c55"
  },
  {
    "path": "licenses/poi-scratchpad-LICENSE.txt",
    "content": "\n                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright [yyyy] [name of copyright owner]\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n\nAPACHE POI SUBCOMPONENTS:\n\nApache POI includes subcomponents with separate copyright notices and\nlicense terms. Your use of these subcomponents is subject to the terms\nand conditions of the following licenses:\n\n\nOffice Open XML schemas (ooxml-schemas-1.1.jar)\n\n    The Office Open XML schema definitions used by Apache POI are\n    a part of the Office Open XML ECMA Specification (ECMA-376, [1]).\n    As defined in section 9.4 of the ECMA bylaws [2], this specification\n    is available to all interested parties without restriction:\n\n        9.4 All documents when approved shall be made available to\n            all interested parties without restriction.\n\n    Furthermore, both Microsoft and Adobe have granted patent licenses\n    to this work [3,4,5].\n\n    [1] http://www.ecma-international.org/publications/standards/Ecma-376.htm\n    [2] http://www.ecma-international.org/memento/Ecmabylaws.htm\n    [3] http://www.microsoft.com/openspecifications/en/us/programs/osp/default.aspx\n    [4] http://www.ecma-international.org/publications/files/ECMA-ST/Ecma%20PATENT/Patent%20statements%20ok/ECMA-376%20Edition%202%20Microsoft%20Patent%20Declaration.pdf\n    [5] http://www.ecma-international.org/publications/files/ECMA-ST/Ecma%20PATENT/Patent%20statements%20ok/ECMA-376%20Adobe%20Patent%20Declaration.pdf\n\n\nJUnit test library (junit-4.11.jar)\n\n    Common Public License - v 1.0\n\n    THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON\n    PUBLIC LICENSE (\"AGREEMENT\"). ANY USE, REPRODUCTION OR DISTRIBUTION\n    OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.\n\n    1. DEFINITIONS\n\n    \"Contribution\" means:\n\n    a) in the case of the initial Contributor, the initial code and\n       documentation distributed under this Agreement, and\n\n    b) in the case of each subsequent Contributor:\n\n       i)  changes to the Program, and\n\n       ii) additions to the Program;\n\n       where such changes and/or additions to the Program originate from\n       and are distributed by that particular Contributor. A Contribution\n       'originates' from a Contributor if it was added to the Program by\n       such Contributor itself or anyone acting on such Contributor's behalf.\n       Contributions do not include additions to the Program which: (i) are\n       separate modules of software distributed in conjunction with the\n       Program under their own license agreement, and (ii) are not derivative\n       works of the Program.\n\n    \"Contributor\" means any person or entity that distributes the Program.\n\n    \"Licensed Patents \" mean patent claims licensable by a Contributor which\n    are necessarily infringed by the use or sale of its Contribution alone\n    or when combined with the Program.\n\n    \"Program\" means the Contributions distributed in accordance with this\n    Agreement.\n\n    \"Recipient\" means anyone who receives the Program under this Agreement,\n    including all Contributors.\n\n    2. GRANT OF RIGHTS\n\n    a) Subject to the terms of this Agreement, each Contributor hereby grants\n       Recipient a non-exclusive, worldwide, royalty-free copyright license\n       to reproduce, prepare derivative works of, publicly display, publicly\n       perform, distribute and sublicense the Contribution of such\n       Contributor, if any, and such derivative works, in source code and\n       object code form.\n\n    b) Subject to the terms of this Agreement, each Contributor hereby grants\n       Recipient a non-exclusive, worldwide, royalty-free patent license under\n       Licensed Patents to make, use, sell, offer to sell, import and\n       otherwise transfer the Contribution of such Contributor, if any, in\n       source code and object code form. This patent license shall apply to\n       the combination of the Contribution and the Program if, at the time\n       the Contribution is added by the Contributor, such addition of the\n       Contribution causes such combination to be covered by the Licensed\n       Patents. The patent license shall not apply to any other combinations\n       which include the Contribution. No hardware per se is licensed\n       hereunder.\n\n    c) Recipient understands that although each Contributor grants the\n       licenses to its Contributions set forth herein, no assurances are\n       provided by any Contributor that the Program does not infringe the\n       patent or other intellectual property rights of any other entity.\n       Each Contributor disclaims any liability to Recipient for claims\n       brought by any other entity based on infringement of intellectual\n       property rights or otherwise. As a condition to exercising the rights\n       and licenses granted hereunder, each Recipient hereby assumes sole\n       responsibility to secure any other intellectual property rights\n       needed, if any. For example, if a third party patent license is\n       required to allow Recipient to distribute the Program, it is\n       Recipient's responsibility to acquire that license before\n       distributing the Program.\n\n    d) Each Contributor represents that to its knowledge it has sufficient\n       copyright rights in its Contribution, if any, to grant the copyright\n       license set forth in this Agreement.\n\n    3. REQUIREMENTS\n\n    A Contributor may choose to distribute the Program in object code form\n    under its own license agreement, provided that:\n\n    a) it complies with the terms and conditions of this Agreement; and\n\n    b) its license agreement:\n\n       i)   effectively disclaims on behalf of all Contributors all warranties\n            and conditions, express and implied, including warranties or\n            conditions of title and non-infringement, and implied warranties\n            or conditions of merchantability and fitness for a particular\n            purpose;\n\n       ii)  effectively excludes on behalf of all Contributors all liability\n            for damages, including direct, indirect, special, incidental and\n            consequential damages, such as lost profits;\n\n       iii) states that any provisions which differ from this Agreement are\n            offered by that Contributor alone and not by any other party; and\n\n       iv)  states that source code for the Program is available from such\n            Contributor, and informs licensees how to obtain it in a\n            reasonable manner on or through a medium customarily used for\n            software exchange.\n\n    When the Program is made available in source code form:\n\n    a) it must be made available under this Agreement; and\n\n    b) a copy of this Agreement must be included with each copy of\n       the Program.\n\n    Contributors may not remove or alter any copyright notices contained\n    within the Program.\n\n    Each Contributor must identify itself as the originator of its\n    Contribution, if any, in a manner that reasonably allows subsequent\n    Recipients to identify the originator of the Contribution.\n\n    4. COMMERCIAL DISTRIBUTION\n\n    Commercial distributors of software may accept certain responsibilities\n    with respect to end users, business partners and the like. While this\n    license is intended to facilitate the commercial use of the Program,\n    the Contributor who includes the Program in a commercial product offering\n    should do so in a manner which does not create potential liability for\n    other Contributors. Therefore, if a Contributor includes the Program\n    in a commercial product offering, such Contributor (\"Commercial\n    Contributor\") hereby agrees to defend and indemnify every other\n    Contributor (\"Indemnified Contributor\") against any losses, damages\n    and costs (collectively \"Losses\") arising from claims, lawsuits and\n    other legal actions brought by a third party against the Indemnified\n    Contributor to the extent caused by the acts or omissions of such\n    Commercial Contributor in connection with its distribution of the\n    Program in a commercial product offering. The obligations in this\n    section do not apply to any claims or Losses relating to any actual\n    or alleged intellectual property infringement. In order to qualify,\n    an Indemnified Contributor must: a) promptly notify the Commercial\n    Contributor in writing of such claim, and b) allow the Commercial\n    Contributor to control, and cooperate with the Commercial Contributor\n    in, the defense and any related settlement negotiations. The Indemnified\n    Contributor may participate in any such claim at its own expense.\n\n    For example, a Contributor might include the Program in a commercial\n    product offering, Product X. That Contributor is then a Commercial\n    Contributor. If that Commercial Contributor then makes performance\n    claims, or offers warranties related to Product X, those performance\n    claims and warranties are such Commercial Contributor's responsibility\n    alone. Under this section, the Commercial Contributor would have to\n    defend claims against the other Contributors related to those\n    performance claims and warranties, and if a court requires any other\n    Contributor to pay any damages as a result, the Commercial Contributor\n    must pay those damages.\n\n    5. NO WARRANTY\n\n    EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED\n    ON AN \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER\n    EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR\n    CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR\n    A PARTICULAR PURPOSE. Each Recipient is solely responsible for\n    determining the appropriateness of using and distributing the Program\n    and assumes all risks associated with its exercise of rights under this\n    Agreement, including but not limited to the risks and costs of program\n    errors, compliance with applicable laws, damage to or loss of data,\n    programs or equipment, and unavailability or interruption of operations.\n\n    6. DISCLAIMER OF LIABILITY\n\n    EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR\n    ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,\n    INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING\n    WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF\n    LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n    NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR\n    DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED\n    HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.\n\n    7. GENERAL\n\n    If any provision of this Agreement is invalid or unenforceable under\n    applicable law, it shall not affect the validity or enforceability of\n    the remainder of the terms of this Agreement, and without further\n    action by the parties hereto, such provision shall be reformed to the\n    minimum extent necessary to make such provision valid and enforceable.\n\n    If Recipient institutes patent litigation against a Contributor with\n    respect to a patent applicable to software (including a cross-claim or\n    counterclaim in a lawsuit), then any patent licenses granted by that\n    Contributor to such Recipient under this Agreement shall terminate as of\n    the date such litigation is filed. In addition, if Recipient institutes\n    patent litigation against any entity (including a cross-claim or\n    counterclaim in a lawsuit) alleging that the Program itself (excluding\n    combinations of the Program with other software or hardware) infringes\n    such Recipient's patent(s), then such Recipient's rights granted under\n    Section 2(b) shall terminate as of the date such litigation is filed.\n\n    All Recipient's rights under this Agreement shall terminate if it fails\n    to comply with any of the material terms or conditions of this Agreement\n    and does not cure such failure in a reasonable period of time after\n    becoming aware of such noncompliance. If all Recipient's rights under\n    this Agreement terminate, Recipient agrees to cease use and distribution\n    of the Program as soon as reasonably practicable. However, Recipient's\n    obligations under this Agreement and any licenses granted by Recipient\n    relating to the Program shall continue and survive.\n\n    Everyone is permitted to copy and distribute copies of this Agreement,\n    but in order to avoid inconsistency the Agreement is copyrighted and may\n    only be modified in the following manner. The Agreement Steward reserves\n    the right to publish new versions (including revisions) of this Agreement\n    from time to time. No one other than the Agreement Steward has the right\n    to modify this Agreement. IBM is the initial Agreement Steward. IBM may\n    assign the responsibility to serve as the Agreement Steward to a suitable\n    separate entity. Each new version of the Agreement will be given a\n    distinguishing version number. The Program (including Contributions) may\n    always be distributed subject to the version of the Agreement under which\n    it was received. In addition, after a new version of the Agreement is\n    published, Contributor may elect to distribute the Program (including\n    its Contributions) under the new version. Except as expressly stated in\n    Sections 2(a) and 2(b) above, Recipient receives no rights or licenses\n    to the intellectual property of any Contributor under this Agreement,\n    whether expressly, by implication, estoppel or otherwise. All rights in\n    the Program not expressly granted under this Agreement are reserved.\n\n    This Agreement is governed by the laws of the State of New York and the\n    intellectual property laws of the United States of America. No party to\n    this Agreement will bring a legal action under this Agreement more than\n    one year after the cause of action arose. Each party waives its rights\n    to a jury trial in any resulting litigation.\n"
  },
  {
    "path": "licenses/poi-scratchpad-NOTICE.txt",
    "content": "Apache POI\nCopyright 2003-2015 The Apache Software Foundation\n\nThis product includes software developed by\nThe Apache Software Foundation (http://www.apache.org/).\n\nThis product contains parts that were originally based on software from BEA.\nCopyright (c) 2000-2003, BEA Systems, <http://www.bea.com/>.\n\nThis product contains W3C XML Schema documents. Copyright 2001-2003 (c)\nWorld Wide Web Consortium (Massachusetts Institute of Technology, European\nResearch Consortium for Informatics and Mathematics, Keio University)\n\nThis product contains the Piccolo XML Parser for Java\n(http://piccolo.sourceforge.net/). Copyright 2002 Yuval Oren.\n\nThis product contains the chunks_parse_cmds.tbl file from the vsdump program.\nCopyright (C) 2006-2007 Valek Filippov (frob@df.ru)\n\nThis product contains parts of the eID Applet project\n(http://eid-applet.googlecode.com). Copyright (c) 2009-2014\nFedICT (federal ICT department of Belgium), e-Contract.be BVBA (https://www.e-contract.be),\nBart Hanssens from FedICT\n"
  },
  {
    "path": "licenses/stax-api-1.0.1.jar.sha1",
    "content": "49c100caf72d658aca8e58bd74a4ba90fa2b0d70"
  },
  {
    "path": "licenses/stax-api-LICENSE.txt",
    "content": "\n                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright [yyyy] [name of copyright owner]\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n"
  },
  {
    "path": "licenses/stax-api-NOTICE.txt",
    "content": ""
  },
  {
    "path": "licenses/tagsoup-1.2.1.jar.sha1",
    "content": "5584627487e984c03456266d3f8802eb85a9ce97\n"
  },
  {
    "path": "licenses/tagsoup-LICENSE.txt",
    "content": "                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright [yyyy] [name of copyright owner]\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n"
  },
  {
    "path": "licenses/tagsoup-NOTICE.txt",
    "content": ""
  },
  {
    "path": "licenses/tika-core-1.11.jar.sha1",
    "content": "d37a6b9080c8361e47b2050f69833fd61501ede9"
  },
  {
    "path": "licenses/tika-core-LICENSE.txt",
    "content": "\n                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright [yyyy] [name of copyright owner]\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n\n\nAPACHE TIKA SUBCOMPONENTS\n\nApache Tika includes a number of subcomponents with separate copyright notices\nand license terms. Your use of these subcomponents is subject to the terms and\nconditions of the following licenses.\n\nMIME type information from file-4.26.tar.gz (http://www.darwinsys.com/file/)\n\n    Copyright (c) Ian F. Darwin 1986, 1987, 1989, 1990, 1991, 1992, 1994, 1995.\n    Software written by Ian F. Darwin and others;\n    maintained 1994- Christos Zoulas.\n\n    This software is not subject to any export provision of the United States\n    Department of Commerce, and may be exported to any country or planet.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice immediately at the beginning of the file, without modification,\n       this list of conditions, and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND\n    ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR\n    ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n\nCharset detection code from ICU4J (http://site.icu-project.org/)\n\n    Copyright (c) 1995-2009 International Business Machines Corporation\n    and others\n\n    All rights reserved.\n\n    Permission is hereby granted, free of charge, to any person obtaining\n    a copy of this software and associated documentation files (the\n    \"Software\"), to deal in the Software without restriction, including\n    without limitation the rights to use, copy, modify, merge, publish,\n    distribute, and/or sell copies of the Software, and to permit persons\n    to whom the Software is furnished to do so, provided that the above\n    copyright notice(s) and this permission notice appear in all copies\n    of the Software and that both the above copyright notice(s) and this\n    permission notice appear in supporting documentation.\n\n    THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n    OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS.\n    IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE\n    BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES,\n    OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,\n    WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,\n    ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS\n    SOFTWARE.\n\n    Except as contained in this notice, the name of a copyright holder shall\n    not be used in advertising or otherwise to promote the sale, use or other\n    dealings in this Software without prior written authorization of the\n    copyright holder.\n\n\nParsing functionality provided by the NetCDF Java Library (http://www.unidata.ucar.edu/software/netcdf-java/)\n\n    Copyright 1993-2010 University Corporation for Atmospheric Research/Unidata\n\n    Portions of this software were developed by the Unidata Program at the University\n    Corporation for Atmospheric Research.\n\n    Access and use of this software shall impose the following obligations and understandings\n    on the user. The user is granted the right, without any fee or cost, to use, copy, modify,\n    alter, enhance and distribute this software, and any derivative works thereof, and its\n    supporting documentation for any purpose whatsoever, provided that this entire notice\n    appears in all copies of the software, derivative works and supporting documentation. Further,\n    UCAR requests that the user credit UCAR/Unidata in any publications that result from the use\n    of this software or in any product that includes this software, although this is not an obligation.\n    The names UCAR and/or Unidata, however, may not be used in any advertising or publicity to endorse\n    or promote any products or commercial entity unless specific written permission is obtained from\n    UCAR/Unidata. The user also understands that UCAR/Unidata is not obligated to provide the user with\n    any support, consulting, training or assistance of any kind with regard to the use, operation and\n    performance of this software nor to provide the user with any updates, revisions, new versions or\n    \"bug fixes.\"\n\n    THIS SOFTWARE IS PROVIDED BY UCAR/UNIDATA \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,\n    BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED. IN NO EVENT SHALL UCAR/UNIDATA BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL\n    DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION\n    OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE ACCESS,\n    USE OR PERFORMANCE OF THIS SOFTWARE.\n\n\nIPTC Photo Metadata descriptions are taken from the IPTC Photo Metadata\nStandard, July 2010, Copyright 2010 International Press Telecommunications\nCouncil.\n\n  1. The Specifications and Materials are licensed for use only on the condition that you agree to be bound by the terms of this license. Subject to this and other licensing requirements contained herein, you may, on a non-exclusive basis, use the Specifications and Materials.\n  2. The IPTC openly provides the Specifications and Materials for voluntary use by individuals, partnerships, companies, corporations, organizations and any other entity for use at the entity's own risk. This disclaimer, license and release is intended to apply to the IPTC, its officers, directors, agents, representatives, members, contributors, affiliates, contractors, or co-venturers acting jointly or severally.\n  3. The Document and translations thereof may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the copyright and license notices and references to the IPTC appearing in the Document and the terms of this Specifications License Agreement are included on all such copies and derivative works. Further, upon the receipt of written permission from the IPTC, the Document may be modified for the purpose of developing applications that use IPTC Specifications or as required to translate the Document into languages other than English.\n  4. Any use, duplication, distribution, or exploitation of the Document and Specifications and Materials in any manner is at your own risk.\n  5. NO WARRANTY, EXPRESSED OR IMPLIED, IS MADE REGARDING THE ACCURACY, ADEQUACY, COMPLETENESS, LEGALITY, RELIABILITY OR USEFULNESS OF ANY INFORMATION CONTAINED IN THE DOCUMENT OR IN ANY SPECIFICATION OR OTHER PRODUCT OR SERVICE PRODUCED OR SPONSORED BY THE IPTC. THE DOCUMENT AND THE INFORMATION CONTAINED HEREIN AND INCLUDED IN ANY SPECIFICATION OR OTHER PRODUCT OR SERVICE OF THE IPTC IS PROVIDED ON AN \"AS IS\" BASIS. THE IPTC DISCLAIMS ALL WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, ANY ACTUAL OR ASSERTED WARRANTY OF NON-INFRINGEMENT OF PROPRIETARY RIGHTS, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. NEITHER THE IPTC NOR ITS CONTRIBUTORS SHALL BE HELD LIABLE FOR ANY IMPROPER OR INCORRECT USE OF INFORMATION. NEITHER THE IPTC NOR ITS CONTRIBUTORS ASSUME ANY RESPONSIBILITY FOR ANYONE'S USE OF INFORMATION PROVIDED BY THE IPTC. IN NO EVENT SHALL THE IPTC OR ITS CONTRIBUTORS BE LIABLE TO ANYONE FOR DAMAGES OF ANY KIND, INCLUDING BUT NOT LIMITED TO, COMPENSATORY DAMAGES, LOST PROFITS, LOST DATA OR ANY FORM OF SPECIAL, INCIDENTAL, INDIRECT, CONSEQUENTIAL OR PUNITIVE DAMAGES OF ANY KIND WHETHER BASED ON BREACH OF CONTRACT OR WARRANTY, TORT, PRODUCT LIABILITY OR OTHERWISE.\n  6. The IPTC takes no position regarding the validity or scope of any Intellectual Property or other rights that might be claimed to pertain to the implementation or use of the technology described in the Document or the extent to which any license under such rights might or might not be available. The IPTC does not represent that it has made any effort to identify any such rights. Copies of claims of rights made available for publication, assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users of the Specifications and Materials, can be obtained from the Managing Director of the IPTC.\n  7. By using the Specifications and Materials including the Document in any manner or for any purpose, you release the IPTC from all liabilities, claims, causes of action, allegations, losses, injuries, damages, or detriments of any nature arising from or relating to the use of the Specifications, Materials or any portion thereof. You further agree not to file a lawsuit, make a claim, or take any other formal or informal legal action against the IPTC, resulting from your acquisition, use, duplication, distribution, or exploitation of the Specifications, Materials or any portion thereof. Finally, you hereby agree that the IPTC is not liable for any direct, indirect, special or consequential damages arising from or relating to your acquisition, use, duplication, distribution, or exploitation of the Specifications, Materials or any portion thereof.\n  8. Specifications and Materials may be downloaded or copied provided that ALL copies retain the ownership, copyright and license notices.\n  9. Materials may not be edited, modified, or presented in a context that creates a misleading or false impression or statement as to the positions, actions, or statements of the IPTC.\n  10. The name and trademarks of the IPTC may not be used in advertising, publicity, or in relation to products or services and their names without the specific, written prior permission of the IPTC. Any permitted use of the trademarks of the IPTC, whether registered or not, shall be accompanied by an appropriate mark and attribution, as agreed with the IPTC.\n  11. Specifications may be extended by both members and non-members to provide additional functionality (Extension Specifications) provided that there is a clear recognition of the IPTC IP and its ownership in the Extension Specifications and the related documentation and provided that the extensions are clearly identified and provided that a perpetual license is granted by the creator of the Extension Specifications for other members and non-members to use the Extension Specifications and to continue extensions of the Extension Specifications. The IPTC does not waive any of its rights in the Specifications and Materials in this context. The Extension Specifications may be considered the intellectual property of their creator. The IPTC expressly disclaims any responsibility for damage caused by an extension to the Specifications.\n  12. Specifications and Materials may be included in derivative work of both members and non-members provided that there is a clear recognition of the IPTC IP and its ownership in the derivative work and its related documentation. The IPTC does not waive any of its rights in the Specifications and Materials in this context. Derivative work in its entirety may be considered the intellectual property of the creator of the work .The IPTC expressly disclaims any responsibility for damage caused when its IP is used in a derivative context.\n  13. This Specifications License Agreement is perpetual subject to your conformance to the terms of this Agreement. The IPTC may terminate this Specifications License Agreement immediately upon your breach of this Agreement and, upon such termination you will cease all use, duplication, distribution, and/or exploitation in any manner of the Specifications and Materials.\n  14. This Specifications License Agreement reflects the entire agreement of the parties regarding the subject matter hereof and supersedes all prior agreements or representations regarding such matters, whether written or oral. To the extent any portion or provision of this Specifications License Agreement is found to be illegal or unenforceable, then the remaining provisions of this Specifications License Agreement will remain in full force and effect and the illegal or unenforceable provision will be construed to give it such effect as it may properly have that is consistent with the intentions of the parties.\n  15. This Specifications License Agreement may only be modified in writing signed by an authorized representative of the IPTC.\n  16. This Specifications License Agreement is governed by the law of United Kingdom, as such law is applied to contracts made and fully performed in the United Kingdom. Any disputes arising from or relating to this Specifications License Agreement will be resolved in the courts of the United Kingdom. You consent to the jurisdiction of such courts over you and covenant not to assert before such courts any objection to proceeding in such forums.\n\n\nJUnRAR (https://github.com/edmund-wagner/junrar/)\n\n      JUnRAR is based on the UnRAR tool, and covered by the same license\n      It was formerly available from http://java-unrar.svn.sourceforge.net/\n\n ******    *****   ******   UnRAR - free utility for RAR archives\n **   **  **   **  **   **  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n ******   *******  ******    License for use and distribution of\n **   **  **   **  **   **   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n **   **  **   **  **   **         FREE portable version\n                                   ~~~~~~~~~~~~~~~~~~~~~\n\n      The source code of UnRAR utility is freeware. This means:\n\n   1. All copyrights to RAR and the utility UnRAR are exclusively\n      owned by the author - Alexander Roshal.\n\n   2. The UnRAR sources may be used in any software to handle RAR\n      archives without limitations free of charge, but cannot be used\n      to re-create the RAR compression algorithm, which is proprietary.\n      Distribution of modified UnRAR sources in separate form or as a\n      part of other software is permitted, provided that it is clearly\n      stated in the documentation and source comments that the code may\n      not be used to develop a RAR (WinRAR) compatible archiver.\n\n   3. The UnRAR utility may be freely distributed. It is allowed\n      to distribute UnRAR inside of other software packages.\n\n   4. THE RAR ARCHIVER AND THE UnRAR UTILITY ARE DISTRIBUTED \"AS IS\".\n      NO WARRANTY OF ANY KIND IS EXPRESSED OR IMPLIED.  YOU USE AT\n      YOUR OWN RISK. THE AUTHOR WILL NOT BE LIABLE FOR DATA LOSS,\n      DAMAGES, LOSS OF PROFITS OR ANY OTHER KIND OF LOSS WHILE USING\n      OR MISUSING THIS SOFTWARE.\n\n   5. Installing and using the UnRAR utility signifies acceptance of\n      these terms and conditions of the license.\n\n   6. If you don't agree with terms of the license you must remove\n      UnRAR files from your storage devices and cease to use the\n      utility.\n\n      Thank you for your interest in RAR and UnRAR.  Alexander L. Roshal\n\nSqlite (bundled in org.xerial's sqlite-jdbc)\n    This product bundles Sqlite, which is in the Public Domain.  For details\n    see: https://www.sqlite.org/copyright.html\n"
  },
  {
    "path": "licenses/tika-core-NOTICE.txt",
    "content": "Apache Tika\nCopyright 2015 The Apache Software Foundation\n\nThis product includes software developed at\nThe Apache Software Foundation (http://www.apache.org/).\n\nCopyright 1993-2010 University Corporation for Atmospheric Research/Unidata\nThis software contains code derived from UCAR/Unidata's NetCDF library.\n\nTika-server component uses CDDL-licensed dependencies: jersey (http://jersey.java.net/) and\nGrizzly (http://grizzly.java.net/)\n\nTika-parsers component uses CDDL/LGPL dual-licensed dependency: jhighlight (https://github.com/codelibs/jhighlight)\n\nOpenCSV: Copyright 2005 Bytecode Pty Ltd. Licensed under the Apache License, Version 2.0\n\nIPTC Photo Metadata descriptions Copyright 2010 International Press Telecommunications Council.\n"
  },
  {
    "path": "licenses/tika-parsers-1.11.jar.sha1",
    "content": "355dc05d842ed223fc682da472229473ba706d68"
  },
  {
    "path": "licenses/tika-parsers-LICENSE.txt",
    "content": "\n                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright [yyyy] [name of copyright owner]\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n\n\nAPACHE TIKA SUBCOMPONENTS\n\nApache Tika includes a number of subcomponents with separate copyright notices\nand license terms. Your use of these subcomponents is subject to the terms and\nconditions of the following licenses.\n\nMIME type information from file-4.26.tar.gz (http://www.darwinsys.com/file/)\n\n    Copyright (c) Ian F. Darwin 1986, 1987, 1989, 1990, 1991, 1992, 1994, 1995.\n    Software written by Ian F. Darwin and others;\n    maintained 1994- Christos Zoulas.\n\n    This software is not subject to any export provision of the United States\n    Department of Commerce, and may be exported to any country or planet.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions\n    are met:\n    1. Redistributions of source code must retain the above copyright\n       notice immediately at the beginning of the file, without modification,\n       this list of conditions, and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n\n    THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND\n    ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR\n    ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n    SUCH DAMAGE.\n\nCharset detection code from ICU4J (http://site.icu-project.org/)\n\n    Copyright (c) 1995-2009 International Business Machines Corporation\n    and others\n\n    All rights reserved.\n\n    Permission is hereby granted, free of charge, to any person obtaining\n    a copy of this software and associated documentation files (the\n    \"Software\"), to deal in the Software without restriction, including\n    without limitation the rights to use, copy, modify, merge, publish,\n    distribute, and/or sell copies of the Software, and to permit persons\n    to whom the Software is furnished to do so, provided that the above\n    copyright notice(s) and this permission notice appear in all copies\n    of the Software and that both the above copyright notice(s) and this\n    permission notice appear in supporting documentation.\n\n    THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n    OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS.\n    IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE\n    BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES,\n    OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,\n    WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,\n    ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS\n    SOFTWARE.\n\n    Except as contained in this notice, the name of a copyright holder shall\n    not be used in advertising or otherwise to promote the sale, use or other\n    dealings in this Software without prior written authorization of the\n    copyright holder.\n\n\nParsing functionality provided by the NetCDF Java Library (http://www.unidata.ucar.edu/software/netcdf-java/)\n\n    Copyright 1993-2010 University Corporation for Atmospheric Research/Unidata\n\n    Portions of this software were developed by the Unidata Program at the University\n    Corporation for Atmospheric Research.\n\n    Access and use of this software shall impose the following obligations and understandings\n    on the user. The user is granted the right, without any fee or cost, to use, copy, modify,\n    alter, enhance and distribute this software, and any derivative works thereof, and its\n    supporting documentation for any purpose whatsoever, provided that this entire notice\n    appears in all copies of the software, derivative works and supporting documentation. Further,\n    UCAR requests that the user credit UCAR/Unidata in any publications that result from the use\n    of this software or in any product that includes this software, although this is not an obligation.\n    The names UCAR and/or Unidata, however, may not be used in any advertising or publicity to endorse\n    or promote any products or commercial entity unless specific written permission is obtained from\n    UCAR/Unidata. The user also understands that UCAR/Unidata is not obligated to provide the user with\n    any support, consulting, training or assistance of any kind with regard to the use, operation and\n    performance of this software nor to provide the user with any updates, revisions, new versions or\n    \"bug fixes.\"\n\n    THIS SOFTWARE IS PROVIDED BY UCAR/UNIDATA \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,\n    BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n    ARE DISCLAIMED. IN NO EVENT SHALL UCAR/UNIDATA BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL\n    DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION\n    OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE ACCESS,\n    USE OR PERFORMANCE OF THIS SOFTWARE.\n\n\nIPTC Photo Metadata descriptions are taken from the IPTC Photo Metadata\nStandard, July 2010, Copyright 2010 International Press Telecommunications\nCouncil.\n\n  1. The Specifications and Materials are licensed for use only on the condition that you agree to be bound by the terms of this license. Subject to this and other licensing requirements contained herein, you may, on a non-exclusive basis, use the Specifications and Materials.\n  2. The IPTC openly provides the Specifications and Materials for voluntary use by individuals, partnerships, companies, corporations, organizations and any other entity for use at the entity's own risk. This disclaimer, license and release is intended to apply to the IPTC, its officers, directors, agents, representatives, members, contributors, affiliates, contractors, or co-venturers acting jointly or severally.\n  3. The Document and translations thereof may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the copyright and license notices and references to the IPTC appearing in the Document and the terms of this Specifications License Agreement are included on all such copies and derivative works. Further, upon the receipt of written permission from the IPTC, the Document may be modified for the purpose of developing applications that use IPTC Specifications or as required to translate the Document into languages other than English.\n  4. Any use, duplication, distribution, or exploitation of the Document and Specifications and Materials in any manner is at your own risk.\n  5. NO WARRANTY, EXPRESSED OR IMPLIED, IS MADE REGARDING THE ACCURACY, ADEQUACY, COMPLETENESS, LEGALITY, RELIABILITY OR USEFULNESS OF ANY INFORMATION CONTAINED IN THE DOCUMENT OR IN ANY SPECIFICATION OR OTHER PRODUCT OR SERVICE PRODUCED OR SPONSORED BY THE IPTC. THE DOCUMENT AND THE INFORMATION CONTAINED HEREIN AND INCLUDED IN ANY SPECIFICATION OR OTHER PRODUCT OR SERVICE OF THE IPTC IS PROVIDED ON AN \"AS IS\" BASIS. THE IPTC DISCLAIMS ALL WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, ANY ACTUAL OR ASSERTED WARRANTY OF NON-INFRINGEMENT OF PROPRIETARY RIGHTS, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. NEITHER THE IPTC NOR ITS CONTRIBUTORS SHALL BE HELD LIABLE FOR ANY IMPROPER OR INCORRECT USE OF INFORMATION. NEITHER THE IPTC NOR ITS CONTRIBUTORS ASSUME ANY RESPONSIBILITY FOR ANYONE'S USE OF INFORMATION PROVIDED BY THE IPTC. IN NO EVENT SHALL THE IPTC OR ITS CONTRIBUTORS BE LIABLE TO ANYONE FOR DAMAGES OF ANY KIND, INCLUDING BUT NOT LIMITED TO, COMPENSATORY DAMAGES, LOST PROFITS, LOST DATA OR ANY FORM OF SPECIAL, INCIDENTAL, INDIRECT, CONSEQUENTIAL OR PUNITIVE DAMAGES OF ANY KIND WHETHER BASED ON BREACH OF CONTRACT OR WARRANTY, TORT, PRODUCT LIABILITY OR OTHERWISE.\n  6. The IPTC takes no position regarding the validity or scope of any Intellectual Property or other rights that might be claimed to pertain to the implementation or use of the technology described in the Document or the extent to which any license under such rights might or might not be available. The IPTC does not represent that it has made any effort to identify any such rights. Copies of claims of rights made available for publication, assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users of the Specifications and Materials, can be obtained from the Managing Director of the IPTC.\n  7. By using the Specifications and Materials including the Document in any manner or for any purpose, you release the IPTC from all liabilities, claims, causes of action, allegations, losses, injuries, damages, or detriments of any nature arising from or relating to the use of the Specifications, Materials or any portion thereof. You further agree not to file a lawsuit, make a claim, or take any other formal or informal legal action against the IPTC, resulting from your acquisition, use, duplication, distribution, or exploitation of the Specifications, Materials or any portion thereof. Finally, you hereby agree that the IPTC is not liable for any direct, indirect, special or consequential damages arising from or relating to your acquisition, use, duplication, distribution, or exploitation of the Specifications, Materials or any portion thereof.\n  8. Specifications and Materials may be downloaded or copied provided that ALL copies retain the ownership, copyright and license notices.\n  9. Materials may not be edited, modified, or presented in a context that creates a misleading or false impression or statement as to the positions, actions, or statements of the IPTC.\n  10. The name and trademarks of the IPTC may not be used in advertising, publicity, or in relation to products or services and their names without the specific, written prior permission of the IPTC. Any permitted use of the trademarks of the IPTC, whether registered or not, shall be accompanied by an appropriate mark and attribution, as agreed with the IPTC.\n  11. Specifications may be extended by both members and non-members to provide additional functionality (Extension Specifications) provided that there is a clear recognition of the IPTC IP and its ownership in the Extension Specifications and the related documentation and provided that the extensions are clearly identified and provided that a perpetual license is granted by the creator of the Extension Specifications for other members and non-members to use the Extension Specifications and to continue extensions of the Extension Specifications. The IPTC does not waive any of its rights in the Specifications and Materials in this context. The Extension Specifications may be considered the intellectual property of their creator. The IPTC expressly disclaims any responsibility for damage caused by an extension to the Specifications.\n  12. Specifications and Materials may be included in derivative work of both members and non-members provided that there is a clear recognition of the IPTC IP and its ownership in the derivative work and its related documentation. The IPTC does not waive any of its rights in the Specifications and Materials in this context. Derivative work in its entirety may be considered the intellectual property of the creator of the work .The IPTC expressly disclaims any responsibility for damage caused when its IP is used in a derivative context.\n  13. This Specifications License Agreement is perpetual subject to your conformance to the terms of this Agreement. The IPTC may terminate this Specifications License Agreement immediately upon your breach of this Agreement and, upon such termination you will cease all use, duplication, distribution, and/or exploitation in any manner of the Specifications and Materials.\n  14. This Specifications License Agreement reflects the entire agreement of the parties regarding the subject matter hereof and supersedes all prior agreements or representations regarding such matters, whether written or oral. To the extent any portion or provision of this Specifications License Agreement is found to be illegal or unenforceable, then the remaining provisions of this Specifications License Agreement will remain in full force and effect and the illegal or unenforceable provision will be construed to give it such effect as it may properly have that is consistent with the intentions of the parties.\n  15. This Specifications License Agreement may only be modified in writing signed by an authorized representative of the IPTC.\n  16. This Specifications License Agreement is governed by the law of United Kingdom, as such law is applied to contracts made and fully performed in the United Kingdom. Any disputes arising from or relating to this Specifications License Agreement will be resolved in the courts of the United Kingdom. You consent to the jurisdiction of such courts over you and covenant not to assert before such courts any objection to proceeding in such forums.\n\n\nJUnRAR (https://github.com/edmund-wagner/junrar/)\n\n      JUnRAR is based on the UnRAR tool, and covered by the same license\n      It was formerly available from http://java-unrar.svn.sourceforge.net/\n\n ******    *****   ******   UnRAR - free utility for RAR archives\n **   **  **   **  **   **  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n ******   *******  ******    License for use and distribution of\n **   **  **   **  **   **   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n **   **  **   **  **   **         FREE portable version\n                                   ~~~~~~~~~~~~~~~~~~~~~\n\n      The source code of UnRAR utility is freeware. This means:\n\n   1. All copyrights to RAR and the utility UnRAR are exclusively\n      owned by the author - Alexander Roshal.\n\n   2. The UnRAR sources may be used in any software to handle RAR\n      archives without limitations free of charge, but cannot be used\n      to re-create the RAR compression algorithm, which is proprietary.\n      Distribution of modified UnRAR sources in separate form or as a\n      part of other software is permitted, provided that it is clearly\n      stated in the documentation and source comments that the code may\n      not be used to develop a RAR (WinRAR) compatible archiver.\n\n   3. The UnRAR utility may be freely distributed. It is allowed\n      to distribute UnRAR inside of other software packages.\n\n   4. THE RAR ARCHIVER AND THE UnRAR UTILITY ARE DISTRIBUTED \"AS IS\".\n      NO WARRANTY OF ANY KIND IS EXPRESSED OR IMPLIED.  YOU USE AT\n      YOUR OWN RISK. THE AUTHOR WILL NOT BE LIABLE FOR DATA LOSS,\n      DAMAGES, LOSS OF PROFITS OR ANY OTHER KIND OF LOSS WHILE USING\n      OR MISUSING THIS SOFTWARE.\n\n   5. Installing and using the UnRAR utility signifies acceptance of\n      these terms and conditions of the license.\n\n   6. If you don't agree with terms of the license you must remove\n      UnRAR files from your storage devices and cease to use the\n      utility.\n\n      Thank you for your interest in RAR and UnRAR.  Alexander L. Roshal\n\nSqlite (bundled in org.xerial's sqlite-jdbc)\n    This product bundles Sqlite, which is in the Public Domain.  For details\n    see: https://www.sqlite.org/copyright.html\n"
  },
  {
    "path": "licenses/tika-parsers-NOTICE.txt",
    "content": "Apache Tika\nCopyright 2015 The Apache Software Foundation\n\nThis product includes software developed at\nThe Apache Software Foundation (http://www.apache.org/).\n\nCopyright 1993-2010 University Corporation for Atmospheric Research/Unidata\nThis software contains code derived from UCAR/Unidata's NetCDF library.\n\nTika-server component uses CDDL-licensed dependencies: jersey (http://jersey.java.net/) and\nGrizzly (http://grizzly.java.net/)\n\nTika-parsers component uses CDDL/LGPL dual-licensed dependency: jhighlight (https://github.com/codelibs/jhighlight)\n\nOpenCSV: Copyright 2005 Bytecode Pty Ltd. Licensed under the Apache License, Version 2.0\n\nIPTC Photo Metadata descriptions Copyright 2010 International Press Telecommunications Council.\n"
  },
  {
    "path": "licenses/xmlbeans-2.6.0.jar.sha1",
    "content": "29e80d2dd51f9dcdef8f9ffaee0d4dc1c9bbfc87\n"
  },
  {
    "path": "licenses/xmlbeans-LICENSE.txt",
    "content": "                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright [yyyy] [name of copyright owner]\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n"
  },
  {
    "path": "licenses/xmlbeans-NOTICE.txt",
    "content": "   =========================================================================\n   ==  NOTICE file corresponding to section 4(d) of the Apache License,   ==\n   ==  Version 2.0, in this case for the Apache XmlBeans distribution.    ==\n   =========================================================================\n\n   This product includes software developed by\n   The Apache Software Foundation (http://www.apache.org/).\n\n   Portions of this software were originally based on the following:\n     - software copyright (c) 2000-2003, BEA Systems, <http://www.bea.com/>.\n\n   Aside from contributions to the Apache XMLBeans project, this\n   software also includes:\n\n    - one or more source files from the Apache Xerces-J and Apache Axis\n      products, Copyright (c) 1999-2003 Apache Software Foundation\n\n    - W3C XML Schema documents Copyright 2001-2003 (c) World Wide Web\n      Consortium (Massachusetts Institute of Technology, European Research\n      Consortium for Informatics and Mathematics, Keio University)\n\n    - resolver.jar from Apache Xml Commons project,\n      Copyright (c) 2001-2003 Apache Software Foundation\n\n    - Piccolo XML Parser for Java from http://piccolo.sourceforge.net/,\n      Copyright 2002 Yuval Oren under the terms of the Apache Software License 2.0\n\n    - JSR-173 Streaming API for XML from http://sourceforge.net/projects/xmlpullparser/,\n      Copyright 2005 BEA under the terms of the Apache Software License 2.0\n"
  },
  {
    "path": "src/main/java/org/elasticsearch/mapper/attachments/AttachmentMapper.java",
    "content": "/*\n * Licensed to Elasticsearch under one or more contributor\n * license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright\n * ownership. Elasticsearch licenses this file to you under\n * the Apache License, Version 2.0 (the \"License\"); you may\n * not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\npackage org.elasticsearch.mapper.attachments;\n\nimport org.apache.lucene.document.Field;\nimport org.apache.lucene.index.IndexOptions;\nimport org.apache.tika.language.LanguageIdentifier;\nimport org.apache.tika.metadata.Metadata;\nimport org.elasticsearch.Version;\nimport org.elasticsearch.common.collect.Iterators;\nimport org.elasticsearch.common.logging.ESLogger;\nimport org.elasticsearch.common.logging.ESLoggerFactory;\nimport org.elasticsearch.common.settings.Settings;\nimport org.elasticsearch.common.xcontent.XContentBuilder;\nimport org.elasticsearch.common.xcontent.XContentParser;\nimport org.elasticsearch.index.mapper.*;\n\nimport java.io.IOException;\nimport java.util.*;\n\nimport static org.elasticsearch.index.mapper.MapperBuilders.*;\nimport static org.elasticsearch.index.mapper.core.TypeParsers.parseMultiField;\nimport static org.elasticsearch.index.mapper.core.TypeParsers.parsePathType;\n\n/**\n * <pre>\n *      \"field1\" : \"...\"\n * </pre>\n * <p>Or:\n * <pre>\n * {\n *      \"file1\" : {\n *          \"_content_type\" : \"application/pdf\",\n *          \"_content_length\" : \"500000000\",\n *          \"_name\" : \"..../something.pdf\",\n *          \"_content\" : \"\"\n *      }\n * }\n * </pre>\n * <p>\n * _content_length = Specify the maximum amount of characters to extract from the attachment. If not specified, then the default for\n * tika is 100,000 characters. Caution is required when setting large values as this can cause memory issues.\n */\npublic class AttachmentMapper extends FieldMapper {\n\n    private static ESLogger logger = ESLoggerFactory.getLogger(\"mapper.attachment\");\n\n    public static final String CONTENT_TYPE = \"attachment\";\n\n    public static class Defaults {\n        public static final ContentPath.Type PATH_TYPE = ContentPath.Type.FULL;\n\n        public static final AttachmentFieldType FIELD_TYPE = new AttachmentFieldType();\n        static {\n            FIELD_TYPE.freeze();\n        }\n    }\n\n    public static class FieldNames {\n        public static final String CONTENT = \"content\";\n        public static final String TITLE = \"title\";\n        public static final String NAME = \"name\";\n        public static final String AUTHOR = \"author\";\n        public static final String KEYWORDS = \"keywords\";\n        public static final String DATE = \"date\";\n        public static final String CONTENT_TYPE = \"content_type\";\n        public static final String CONTENT_LENGTH = \"content_length\";\n        public static final String LANGUAGE = \"language\";\n    }\n\n    static final class AttachmentFieldType extends MappedFieldType {\n        public AttachmentFieldType() {}\n\n        protected AttachmentFieldType(AttachmentMapper.AttachmentFieldType ref) {\n            super(ref);\n        }\n\n        public AttachmentMapper.AttachmentFieldType clone() {\n            return new AttachmentMapper.AttachmentFieldType(this);\n        }\n\n        @Override\n        public String typeName() {\n            return CONTENT_TYPE;\n        }\n\n        public String value(Object value) {\n            return value == null?null:value.toString();\n        }\n    }\n\n    public static class Builder extends FieldMapper.Builder<Builder, AttachmentMapper> {\n\n        private ContentPath.Type pathType = Defaults.PATH_TYPE;\n\n        private Boolean ignoreErrors = null;\n\n        private Integer defaultIndexedChars = null;\n\n        private Boolean langDetect = null;\n\n        private Mapper.Builder contentBuilder;\n\n        private Mapper.Builder titleBuilder = stringField(FieldNames.TITLE);\n\n        private Mapper.Builder nameBuilder = stringField(FieldNames.NAME);\n\n        private Mapper.Builder authorBuilder = stringField(FieldNames.AUTHOR);\n\n        private Mapper.Builder keywordsBuilder = stringField(FieldNames.KEYWORDS);\n\n        private Mapper.Builder dateBuilder = dateField(FieldNames.DATE);\n\n        private Mapper.Builder contentTypeBuilder = stringField(FieldNames.CONTENT_TYPE);\n\n        private Mapper.Builder contentLengthBuilder = integerField(FieldNames.CONTENT_LENGTH);\n\n        private Mapper.Builder languageBuilder = stringField(FieldNames.LANGUAGE);\n\n        public Builder(String name) {\n            super(name, new AttachmentFieldType());\n            this.builder = this;\n            this.contentBuilder = stringField(FieldNames.CONTENT);\n        }\n\n        public Builder pathType(ContentPath.Type pathType) {\n            this.pathType = pathType;\n            return this;\n        }\n\n        public Builder content(Mapper.Builder content) {\n            this.contentBuilder = content;\n            return this;\n        }\n\n        public Builder date(Mapper.Builder date) {\n            this.dateBuilder = date;\n            return this;\n        }\n\n        public Builder author(Mapper.Builder author) {\n            this.authorBuilder = author;\n            return this;\n        }\n\n        public Builder title(Mapper.Builder title) {\n            this.titleBuilder = title;\n            return this;\n        }\n\n        public Builder name(Mapper.Builder name) {\n            this.nameBuilder = name;\n            return this;\n        }\n\n        public Builder keywords(Mapper.Builder keywords) {\n            this.keywordsBuilder = keywords;\n            return this;\n        }\n\n        public Builder contentType(Mapper.Builder contentType) {\n            this.contentTypeBuilder = contentType;\n            return this;\n        }\n\n        public Builder contentLength(Mapper.Builder contentType) {\n            this.contentLengthBuilder = contentType;\n            return this;\n        }\n\n        public Builder language(Mapper.Builder language) {\n            this.languageBuilder = language;\n            return this;\n        }\n\n        @Override\n        public AttachmentMapper build(BuilderContext context) {\n            ContentPath.Type origPathType = context.path().pathType();\n            context.path().pathType(pathType);\n\n            FieldMapper contentMapper;\n            if (context.indexCreatedVersion().before(Version.V_2_0_0_beta1)) {\n                // old behavior, we need the content to be indexed under the attachment field name\n                if (contentBuilder instanceof FieldMapper.Builder == false) {\n                    throw new IllegalStateException(\"content field for attachment must be a field mapper\");\n                }\n                ((FieldMapper.Builder)contentBuilder).indexName(name);\n                contentBuilder.name = name + \".\" + FieldNames.CONTENT;\n                contentMapper = (FieldMapper) contentBuilder.build(context);\n                context.path().add(name);\n            } else {\n                context.path().add(name);\n                contentMapper = (FieldMapper) contentBuilder.build(context);\n            }\n\n            FieldMapper dateMapper = (FieldMapper) dateBuilder.build(context);\n            FieldMapper authorMapper = (FieldMapper) authorBuilder.build(context);\n            FieldMapper titleMapper = (FieldMapper) titleBuilder.build(context);\n            FieldMapper nameMapper = (FieldMapper) nameBuilder.build(context);\n            FieldMapper keywordsMapper = (FieldMapper) keywordsBuilder.build(context);\n            FieldMapper contentTypeMapper = (FieldMapper) contentTypeBuilder.build(context);\n            FieldMapper contentLength = (FieldMapper) contentLengthBuilder.build(context);\n            FieldMapper language = (FieldMapper) languageBuilder.build(context);\n            context.path().remove();\n\n            context.path().pathType(origPathType);\n\n            if (defaultIndexedChars == null && context.indexSettings() != null) {\n                defaultIndexedChars = context.indexSettings().getAsInt(\"index.mapping.attachment.indexed_chars\", 100000);\n            }\n            if (defaultIndexedChars == null) {\n                defaultIndexedChars = 100000;\n            }\n\n            if (ignoreErrors == null && context.indexSettings() != null) {\n                ignoreErrors = context.indexSettings().getAsBoolean(\"index.mapping.attachment.ignore_errors\", Boolean.TRUE);\n            }\n            if (ignoreErrors == null) {\n                ignoreErrors = Boolean.TRUE;\n            }\n\n            if (langDetect == null && context.indexSettings() != null) {\n                langDetect = context.indexSettings().getAsBoolean(\"index.mapping.attachment.detect_language\", Boolean.FALSE);\n            }\n            if (langDetect == null) {\n                langDetect = Boolean.FALSE;\n            }\n            MappedFieldType defaultFieldType = Defaults.FIELD_TYPE.clone();\n            if(this.fieldType.indexOptions() != IndexOptions.NONE && !this.fieldType.tokenized()) {\n                defaultFieldType.setOmitNorms(true);\n                defaultFieldType.setIndexOptions(IndexOptions.DOCS);\n                if(!this.omitNormsSet && this.fieldType.boost() == 1.0F) {\n                    this.fieldType.setOmitNorms(true);\n                }\n\n                if(!this.indexOptionsSet) {\n                    this.fieldType.setIndexOptions(IndexOptions.DOCS);\n                }\n            }\n\n            defaultFieldType.freeze();\n            this.setupFieldType(context);\n            return new AttachmentMapper(name, fieldType, defaultFieldType, pathType, defaultIndexedChars, ignoreErrors, langDetect, contentMapper,\n                    dateMapper, titleMapper, nameMapper, authorMapper, keywordsMapper, contentTypeMapper, contentLength,\n                    language, context.indexSettings(), multiFieldsBuilder.build(this, context), copyTo);\n        }\n    }\n\n    /**\n     * <pre>\n     *  field1 : { type : \"attachment\" }\n     * </pre>\n     * Or:\n     * <pre>\n     *  field1 : {\n     *      type : \"attachment\",\n     *      fields : {\n     *          content : {type : \"binary\"},\n     *          title : {store : \"yes\"},\n     *          date : {store : \"yes\"},\n     *          name : {store : \"yes\"},\n     *          author : {store : \"yes\"},\n     *          keywords : {store : \"yes\"},\n     *          content_type : {store : \"yes\"},\n     *          content_length : {store : \"yes\"}\n     *      }\n     * }\n     * </pre>\n     */\n    public static class TypeParser implements Mapper.TypeParser {\n\n        private Mapper.Builder<?, ?> findMapperBuilder(Map<String, Object> propNode, String propName, ParserContext parserContext) {\n            String type;\n            Object typeNode = propNode.get(\"type\");\n            if (typeNode != null) {\n                type = typeNode.toString();\n            } else {\n                type = \"string\";\n            }\n            Mapper.TypeParser typeParser = parserContext.typeParser(type);\n            Mapper.Builder<?, ?> mapperBuilder = typeParser.parse(propName, (Map<String, Object>) propNode, parserContext);\n\n            return mapperBuilder;\n        }\n\n        @SuppressWarnings({\"unchecked\"})\n        @Override\n        public Mapper.Builder parse(String name, Map<String, Object> node, ParserContext parserContext) throws MapperParsingException {\n            AttachmentMapper.Builder builder = new AttachmentMapper.Builder(name);\n\n            for (Iterator<Map.Entry<String, Object>> iterator = node.entrySet().iterator(); iterator.hasNext();) {\n                Map.Entry<String, Object> entry = iterator.next();\n                String fieldName = entry.getKey();\n                Object fieldNode = entry.getValue();\n                if (fieldName.equals(\"path\") && parserContext.indexVersionCreated().before(Version.V_2_0_0_beta1)) {\n                    builder.pathType(parsePathType(name, fieldNode.toString()));\n                    iterator.remove();\n                } else if (fieldName.equals(\"fields\")) {\n                    Map<String, Object> fieldsNode = (Map<String, Object>) fieldNode;\n                    for (Iterator<Map.Entry<String, Object>> fieldsIterator = fieldsNode.entrySet().iterator(); fieldsIterator.hasNext();) {\n                        Map.Entry<String, Object> entry1 = fieldsIterator.next();\n                        String propName = entry1.getKey();\n                        Map<String, Object> propNode = (Map<String, Object>) entry1.getValue();\n\n                        Mapper.Builder<?, ?> mapperBuilder = findMapperBuilder(propNode, propName, parserContext);\n                        if (parseMultiField((FieldMapper.Builder) mapperBuilder, fieldName, parserContext, propName, propNode)) {\n                            fieldsIterator.remove();\n                        } else if (propName.equals(name) && parserContext.indexVersionCreated().before(Version.V_2_0_0_beta1)) {\n                            builder.content(mapperBuilder);\n                            fieldsIterator.remove();\n                        } else {\n                            switch (propName) {\n                                case FieldNames.CONTENT:\n                                    builder.content(mapperBuilder);\n                                    fieldsIterator.remove();\n                                    break;\n                                case FieldNames.DATE:\n                                    builder.date(mapperBuilder);\n                                fieldsIterator.remove();\n                                    break;\n                                case FieldNames.AUTHOR:\n                                    builder.author(mapperBuilder);\n                                fieldsIterator.remove();\n                                    break;\n                                case FieldNames.CONTENT_LENGTH:\n                                    builder.contentLength(mapperBuilder);\n                                fieldsIterator.remove();\n                                    break;\n                                case FieldNames.CONTENT_TYPE:\n                                    builder.contentType(mapperBuilder);\n                                fieldsIterator.remove();\n                                    break;\n                                case FieldNames.KEYWORDS:\n                                    builder.keywords(mapperBuilder);\n                                fieldsIterator.remove();\n                                    break;\n                                case FieldNames.LANGUAGE:\n                                    builder.language(mapperBuilder);\n                                fieldsIterator.remove();\n                                    break;\n                                case FieldNames.TITLE:\n                                    builder.title(mapperBuilder);\n                                fieldsIterator.remove();\n                                    break;\n                                case FieldNames.NAME:\n                                    builder.name(mapperBuilder);\n                                fieldsIterator.remove();\n                                    break;\n                            }\n                        }\n                    }\n                    DocumentMapperParser.checkNoRemainingFields(fieldName, fieldsNode, parserContext.indexVersionCreated());\n                    iterator.remove();\n                }\n            }\n\n            return builder;\n        }\n    }\n\n    private final ContentPath.Type pathType;\n\n    private final int defaultIndexedChars;\n\n    private final boolean ignoreErrors;\n\n    private final boolean defaultLangDetect;\n\n    private final FieldMapper contentMapper;\n\n    private final FieldMapper dateMapper;\n\n    private final FieldMapper authorMapper;\n\n    private final FieldMapper titleMapper;\n\n    private final FieldMapper nameMapper;\n\n    private final FieldMapper keywordsMapper;\n\n    private final FieldMapper contentTypeMapper;\n\n    private final FieldMapper contentLengthMapper;\n\n    private final FieldMapper languageMapper;\n\n    public AttachmentMapper(String simpleName, MappedFieldType type, MappedFieldType defaultFieldType, ContentPath.Type pathType, int defaultIndexedChars, Boolean ignoreErrors,\n                            Boolean defaultLangDetect, FieldMapper contentMapper,\n                            FieldMapper dateMapper, FieldMapper titleMapper, FieldMapper nameMapper, FieldMapper authorMapper,\n                            FieldMapper keywordsMapper, FieldMapper contentTypeMapper, FieldMapper contentLengthMapper,\n                            FieldMapper languageMapper, Settings indexSettings, MultiFields multiFields, CopyTo copyTo) {\n        super(simpleName, type, defaultFieldType, indexSettings, multiFields, copyTo);\n        this.pathType = pathType;\n        this.defaultIndexedChars = defaultIndexedChars;\n        this.ignoreErrors = ignoreErrors;\n        this.defaultLangDetect = defaultLangDetect;\n        this.contentMapper = contentMapper;\n        this.dateMapper = dateMapper;\n        this.titleMapper = titleMapper;\n        this.nameMapper = nameMapper;\n        this.authorMapper = authorMapper;\n        this.keywordsMapper = keywordsMapper;\n        this.contentTypeMapper = contentTypeMapper;\n        this.contentLengthMapper = contentLengthMapper;\n        this.languageMapper = languageMapper;\n    }\n\n    @Override\n    public Mapper parse(ParseContext context) throws IOException {\n        byte[] content = null;\n        String contentType = null;\n        int indexedChars = defaultIndexedChars;\n        boolean langDetect = defaultLangDetect;\n        String name = null;\n        String language = null;\n\n        XContentParser parser = context.parser();\n        XContentParser.Token token = parser.currentToken();\n        if (token == XContentParser.Token.VALUE_STRING) {\n            content = parser.binaryValue();\n        } else {\n            String currentFieldName = null;\n            while ((token = parser.nextToken()) != XContentParser.Token.END_OBJECT) {\n                if (token == XContentParser.Token.FIELD_NAME) {\n                    currentFieldName = parser.currentName();\n                } else if (token == XContentParser.Token.VALUE_STRING) {\n                    if (\"_content\".equals(currentFieldName)) {\n                        content = parser.binaryValue();\n                    } else if (\"_content_type\".equals(currentFieldName)) {\n                        contentType = parser.text();\n                    } else if (\"_name\".equals(currentFieldName)) {\n                        name = parser.text();\n                    } else if (\"_language\".equals(currentFieldName)) {\n                        language = parser.text();\n                    }\n                } else if (token == XContentParser.Token.VALUE_NUMBER) {\n                    if (\"_indexed_chars\".equals(currentFieldName) || \"_indexedChars\".equals(currentFieldName)) {\n                        indexedChars = parser.intValue();\n                    }\n                } else if (token == XContentParser.Token.VALUE_BOOLEAN) {\n                    if (\"_detect_language\".equals(currentFieldName) || \"_detectLanguage\".equals(currentFieldName)) {\n                        langDetect = parser.booleanValue();\n                    }\n                }\n            }\n        }\n\n        // Throw clean exception when no content is provided Fix #23\n        if (content == null) {\n            throw new MapperParsingException(\"No content is provided.\");\n        }\n\n        Metadata metadata = new Metadata();\n        if (contentType != null) {\n            metadata.add(Metadata.CONTENT_TYPE, contentType);\n        }\n        if (name != null) {\n            metadata.add(Metadata.RESOURCE_NAME_KEY, name);\n        }\n\n        String parsedContent;\n        try {\n            parsedContent = TikaImpl.parse(content, metadata, indexedChars);\n        } catch (Throwable e) {\n            // #18: we could ignore errors when Tika does not parse data\n            if (!ignoreErrors) {\n                logger.trace(\"exception caught\", e);\n                throw new MapperParsingException(\"Failed to extract [\" + indexedChars + \"] characters of text for [\" + name + \"] : \"\n                        + e.getMessage(), e);\n            } else {\n                logger.debug(\"Failed to extract [{}] characters of text for [{}]: [{}]\", indexedChars, name, e.getMessage());\n                logger.trace(\"exception caught\", e);\n            }\n            return null;\n        }\n\n        context = context.createExternalValueContext(parsedContent);\n        contentMapper.parse(context);\n\n        if (langDetect) {\n            try {\n                if (language != null) {\n                    metadata.add(Metadata.CONTENT_LANGUAGE, language);\n                } else {\n                    LanguageIdentifier identifier = new LanguageIdentifier(parsedContent);\n                    language = identifier.getLanguage();\n                }\n                context = context.createExternalValueContext(language);\n                languageMapper.parse(context);\n            } catch(Throwable t) {\n                logger.debug(\"Cannot detect language: [{}]\", t.getMessage());\n            }\n        }\n\n        if (name != null) {\n            try {\n                context = context.createExternalValueContext(name);\n                nameMapper.parse(context);\n            } catch(MapperParsingException e){\n                if (!ignoreErrors) throw e;\n                if (logger.isDebugEnabled()) logger.debug(\"Ignoring MapperParsingException catch while parsing name: [{}]\",\n                        e.getMessage());\n            }\n        }\n\n        if (metadata.get(Metadata.DATE) != null) {\n            try {\n                context = context.createExternalValueContext(metadata.get(Metadata.DATE));\n                dateMapper.parse(context);\n            } catch(MapperParsingException e){\n                if (!ignoreErrors) throw e;\n                if (logger.isDebugEnabled()) logger.debug(\"Ignoring MapperParsingException catch while parsing date: [{}]: [{}]\",\n                        e.getMessage(), context.externalValue());\n            }\n        }\n\n        if (metadata.get(Metadata.TITLE) != null) {\n            try {\n                context = context.createExternalValueContext(metadata.get(Metadata.TITLE));\n                titleMapper.parse(context);\n            } catch(MapperParsingException e){\n                if (!ignoreErrors) throw e;\n                if (logger.isDebugEnabled()) logger.debug(\"Ignoring MapperParsingException catch while parsing title: [{}]: [{}]\",\n                        e.getMessage(), context.externalValue());\n            }\n        }\n\n        if (metadata.get(Metadata.AUTHOR) != null) {\n            try {\n                context = context.createExternalValueContext(metadata.get(Metadata.AUTHOR));\n                authorMapper.parse(context);\n            } catch(MapperParsingException e){\n                if (!ignoreErrors) throw e;\n                if (logger.isDebugEnabled()) logger.debug(\"Ignoring MapperParsingException catch while parsing author: [{}]: [{}]\",\n                        e.getMessage(), context.externalValue());\n            }\n        }\n\n        if (metadata.get(Metadata.KEYWORDS) != null) {\n            try {\n                context = context.createExternalValueContext(metadata.get(Metadata.KEYWORDS));\n                keywordsMapper.parse(context);\n            } catch(MapperParsingException e){\n                if (!ignoreErrors) throw e;\n                if (logger.isDebugEnabled()) logger.debug(\"Ignoring MapperParsingException catch while parsing keywords: [{}]: [{}]\",\n                        e.getMessage(), context.externalValue());\n            }\n        }\n\n        if (contentType == null) {\n            contentType = metadata.get(Metadata.CONTENT_TYPE);\n        }\n        if (contentType != null) {\n            try {\n                context = context.createExternalValueContext(contentType);\n                contentTypeMapper.parse(context);\n            } catch(MapperParsingException e){\n                if (!ignoreErrors) throw e;\n                if (logger.isDebugEnabled()) logger.debug(\"Ignoring MapperParsingException catch while parsing content_type: [{}]: [{}]\", e.getMessage(), context.externalValue());\n            }\n        }\n\n        int length = content.length;\n        // If we have CONTENT_LENGTH from Tika we use it\n        if (metadata.get(Metadata.CONTENT_LENGTH) != null) {\n            length = Integer.parseInt(metadata.get(Metadata.CONTENT_LENGTH));\n        }\n\n        try {\n            context = context.createExternalValueContext(length);\n            contentLengthMapper.parse(context);\n        } catch(MapperParsingException e){\n            if (!ignoreErrors) throw e;\n            if (logger.isDebugEnabled()) logger.debug(\"Ignoring MapperParsingException catch while parsing content_length: [{}]: [{}]\", e.getMessage(), context.externalValue());\n        }\n\n//        multiFields.parse(this, context);\n\n        return null;\n    }\n\n    @Override\n    protected void parseCreateField(ParseContext parseContext, List<Field> fields) throws IOException {\n\n    }\n\n    @Override\n    public void merge(Mapper mergeWith, MergeResult mergeResult) throws MergeMappingException {\n        // ignore this for now\n    }\n\n    @Override\n    @SuppressWarnings(\"unchecked\")\n    public Iterator<Mapper> iterator() {\n        List<Mapper> extras = Arrays.asList(\n                contentMapper,\n                dateMapper,\n                titleMapper,\n                nameMapper,\n                authorMapper,\n                keywordsMapper,\n                contentTypeMapper,\n                contentLengthMapper,\n                languageMapper);\n        return Iterators.concat(super.iterator(), extras.iterator());\n    }\n\n    @Override\n    public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {\n        builder.startObject(name());\n        builder.field(\"type\", CONTENT_TYPE);\n        if (indexCreatedBefore2x) {\n            builder.field(\"path\", pathType.name().toLowerCase(Locale.ROOT));\n        }\n\n        builder.startObject(\"fields\");\n        contentMapper.toXContent(builder, params);\n        authorMapper.toXContent(builder, params);\n        titleMapper.toXContent(builder, params);\n        nameMapper.toXContent(builder, params);\n        dateMapper.toXContent(builder, params);\n        keywordsMapper.toXContent(builder, params);\n        contentTypeMapper.toXContent(builder, params);\n        contentLengthMapper.toXContent(builder, params);\n        languageMapper.toXContent(builder, params);\n        multiFields.toXContent(builder, params);\n        builder.endObject();\n\n        multiFields.toXContent(builder, params);\n        builder.endObject();\n        return builder;\n    }\n\n    @Override\n    protected String contentType() {\n        return CONTENT_TYPE;\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/elasticsearch/mapper/attachments/MapperAttachmentsPlugin.java",
    "content": "/*\n * Licensed to Elasticsearch under one or more contributor\n * license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright\n * ownership. Elasticsearch licenses this file to you under\n * the Apache License, Version 2.0 (the \"License\"); you may\n * not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\npackage org.elasticsearch.mapper.attachments;\n\nimport org.elasticsearch.index.IndexService;\nimport org.elasticsearch.plugins.Plugin;\n\npublic class MapperAttachmentsPlugin extends Plugin {\n\n    @Override\n    public String name() {\n        return \"mapper-attachments\";\n    }\n\n    @Override\n    public String description() {\n        return \"Adds the attachment type allowing to parse difference attachment formats\";\n    }\n\n    @Override\n    public void onIndexService(IndexService indexService) {\n        indexService.mapperService().documentMapperParser().putTypeParser(\"attachment\", new AttachmentMapper.TypeParser());\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/elasticsearch/mapper/attachments/TikaImpl.java",
    "content": "package org.elasticsearch.mapper.attachments;\n\nimport java.io.IOException;\nimport java.security.AccessController;\nimport java.security.PrivilegedActionException;\nimport java.security.PrivilegedExceptionAction;\n\nimport org.apache.tika.Tika;\nimport org.apache.tika.exception.TikaException;\nimport org.apache.tika.metadata.Metadata;\nimport org.apache.tika.parser.AutoDetectParser;\nimport org.apache.tika.parser.Parser;\nimport org.elasticsearch.SpecialPermission;\nimport org.elasticsearch.common.io.stream.StreamInput;\n\n/** do NOT make public */\nfinal class TikaImpl {\n   \n    /** subset of parsers for types we support */\n    private static final Parser PARSERS[] = new Parser[] {\n        // documents\n        new org.apache.tika.parser.html.HtmlParser(),\n        new org.apache.tika.parser.rtf.RTFParser(),\n        new org.apache.tika.parser.pdf.PDFParser(),\n        new org.apache.tika.parser.txt.TXTParser(),\n        new org.apache.tika.parser.microsoft.OfficeParser(),\n        new org.apache.tika.parser.microsoft.OldExcelParser(),\n        new org.apache.tika.parser.microsoft.ooxml.OOXMLParser(),\n        new org.apache.tika.parser.odf.OpenDocumentParser(),\n        new org.apache.tika.parser.iwork.IWorkPackageParser(),\n        new org.apache.tika.parser.xml.DcXMLParser(),\n    };\n    \n    /** autodetector based on this subset */\n    private static final AutoDetectParser PARSER_INSTANCE = new AutoDetectParser(PARSERS);\n    \n    /** singleton tika instance */\n    private static final Tika TIKA_INSTANCE = new Tika(PARSER_INSTANCE.getDetector(), PARSER_INSTANCE);\n    \n    /**\n     * parses with tika, throwing any exception hit while parsing the document\n     */\n    // only package private for testing!\n    static String parse(final byte content[], final Metadata metadata, final int limit) throws TikaException, IOException {\n        // check that its not unprivileged code like a script\n        SecurityManager sm = System.getSecurityManager();\n        if (sm != null) {\n            sm.checkPermission(new SpecialPermission());\n        }\n\n        try {\n            return AccessController.doPrivileged(new PrivilegedExceptionAction<String>() {\n                @Override\n                public String run() throws TikaException, IOException {\n                    return TIKA_INSTANCE.parseToString(StreamInput.wrap(content), metadata, limit);\n                }\n            });\n        } catch (PrivilegedActionException e) {\n            // checked exception from tika: unbox it\n            Throwable cause = e.getCause();\n            if (cause instanceof TikaException) {\n                throw (TikaException) cause;\n            } else if (cause instanceof IOException) {\n                throw (IOException) cause;\n            } else {\n                throw new AssertionError(cause);\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "src/main/plugin-metadata/plugin-security.policy",
    "content": "/*\n * Licensed to Elasticsearch under one or more contributor\n * license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright\n * ownership. Elasticsearch licenses this file to you under\n * the Apache License, Version 2.0 (the \"License\"); you may\n * not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\ngrant {\n  // TODO: fix tika not to actually install bouncy castle like this\n  permission java.security.SecurityPermission \"putProviderProperty.BC\";\n  permission java.security.SecurityPermission \"insertProvider\";\n  // TODO: fix POI XWPF to not do this: https://bz.apache.org/bugzilla/show_bug.cgi?id=58597\n  permission java.lang.reflect.ReflectPermission \"suppressAccessChecks\";\n};\n"
  },
  {
    "path": "src/test/java/org/elasticsearch/mapper/attachments/AttachmentUnitTestCase.java",
    "content": "/*\n * Licensed to Elasticsearch under one or more contributor\n * license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright\n * ownership. Elasticsearch licenses this file to you under\n * the Apache License, Version 2.0 (the \"License\"); you may\n * not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\npackage org.elasticsearch.mapper.attachments;\n\nimport org.elasticsearch.Version;\nimport org.elasticsearch.cluster.metadata.IndexMetaData;\nimport org.elasticsearch.common.settings.Settings;\nimport org.elasticsearch.test.ESTestCase;\nimport org.junit.Before;\n\npublic class AttachmentUnitTestCase extends ESTestCase {\n\n    protected Settings testSettings;\n    \n    @Before\n    public void createSettings() throws Exception {\n      testSettings = Settings.builder()\n                             .put(\"path.home\", createTempDir())\n                             .put(IndexMetaData.SETTING_VERSION_CREATED, Version.CURRENT.id)\n                             .build();\n    }\n}\n"
  },
  {
    "path": "src/test/java/org/elasticsearch/mapper/attachments/DateAttachmentMapperTests.java",
    "content": "/*\n * Licensed to Elasticsearch under one or more contributor\n * license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright\n * ownership. Elasticsearch licenses this file to you under\n * the Apache License, Version 2.0 (the \"License\"); you may\n * not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\npackage org.elasticsearch.mapper.attachments;\n\nimport org.elasticsearch.common.settings.Settings;\nimport org.elasticsearch.index.mapper.DocumentMapper;\nimport org.elasticsearch.index.mapper.DocumentMapperParser;\nimport org.elasticsearch.index.mapper.core.StringFieldMapper;\nimport org.elasticsearch.mapper.attachments.AttachmentMapper;\nimport org.junit.Before;\n\nimport static org.elasticsearch.test.StreamsUtils.copyToStringFromClasspath;\nimport static org.hamcrest.Matchers.instanceOf;\n\n/**\n *\n */\npublic class DateAttachmentMapperTests extends AttachmentUnitTestCase {\n\n    private DocumentMapperParser mapperParser;\n\n    @Before\n    public void setupMapperParser() throws Exception {\n        mapperParser = MapperTestUtils.newMapperService(createTempDir(), Settings.EMPTY).documentMapperParser();\n        mapperParser.putTypeParser(AttachmentMapper.CONTENT_TYPE, new AttachmentMapper.TypeParser());\n    }\n\n    public void testSimpleMappings() throws Exception {\n        String mapping = copyToStringFromClasspath(\"/org/elasticsearch/index/mapper/attachment/test/unit/date/date-mapping.json\");\n        DocumentMapper docMapper = mapperParser.parse(mapping);\n\n        // Our mapping should be kept as a String\n        assertThat(docMapper.mappers().getMapper(\"file.date\"), instanceOf(StringFieldMapper.class));\n    }\n}\n"
  },
  {
    "path": "src/test/java/org/elasticsearch/mapper/attachments/EncryptedDocMapperTests.java",
    "content": "/*\n * Licensed to Elasticsearch under one or more contributor\n * license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright\n * ownership. Elasticsearch licenses this file to you under\n * the Apache License, Version 2.0 (the \"License\"); you may\n * not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\npackage org.elasticsearch.mapper.attachments;\n\nimport org.elasticsearch.common.bytes.BytesReference;\nimport org.elasticsearch.common.settings.Settings;\nimport org.elasticsearch.index.mapper.DocumentMapper;\nimport org.elasticsearch.index.mapper.DocumentMapperParser;\nimport org.elasticsearch.index.mapper.MapperParsingException;\nimport org.elasticsearch.index.mapper.ParseContext;\nimport org.elasticsearch.mapper.attachments.AttachmentMapper;\n\nimport java.io.IOException;\n\nimport static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;\nimport static org.elasticsearch.test.StreamsUtils.copyToBytesFromClasspath;\nimport static org.elasticsearch.test.StreamsUtils.copyToStringFromClasspath;\nimport static org.hamcrest.Matchers.*;\n\n/**\n * Test for https://github.com/elasticsearch/elasticsearch-mapper-attachments/issues/18\n * Note that we have converted /org/elasticsearch/index/mapper/xcontent/testContentLength.txt\n * to a /org/elasticsearch/index/mapper/xcontent/encrypted.pdf with password `12345678`.\n */\npublic class EncryptedDocMapperTests extends AttachmentUnitTestCase {\n\n    public void testMultipleDocsEncryptedLast() throws IOException {\n        DocumentMapperParser mapperParser = MapperTestUtils.newMapperService(createTempDir(), Settings.EMPTY).documentMapperParser();\n        mapperParser.putTypeParser(AttachmentMapper.CONTENT_TYPE, new AttachmentMapper.TypeParser());\n\n        String mapping = copyToStringFromClasspath(\"/org/elasticsearch/index/mapper/attachment/test/unit/encrypted/test-mapping.json\");\n        DocumentMapper docMapper = mapperParser.parse(mapping);\n        byte[] html = copyToBytesFromClasspath(\"/org/elasticsearch/index/mapper/attachment/test/sample-files/htmlWithValidDateMeta.html\");\n        byte[] pdf = copyToBytesFromClasspath(\"/org/elasticsearch/index/mapper/attachment/test/sample-files/encrypted.pdf\");\n\n        BytesReference json = jsonBuilder()\n                .startObject()\n                    .field(\"file1\", html)\n                    .field(\"file2\", pdf)\n                .endObject().bytes();\n\n        ParseContext.Document doc =  docMapper.parse(\"person\", \"person\", \"1\", json).rootDoc();\n        assertThat(doc.get(docMapper.mappers().getMapper(\"file1.content\").fieldType().names().indexName()), containsString(\"World\"));\n        assertThat(doc.get(docMapper.mappers().getMapper(\"file1.title\").fieldType().names().indexName()), equalTo(\"Hello\"));\n        assertThat(doc.get(docMapper.mappers().getMapper(\"file1.author\").fieldType().names().indexName()), equalTo(\"kimchy\"));\n        assertThat(doc.get(docMapper.mappers().getMapper(\"file1.keywords\").fieldType().names().indexName()), equalTo(\"elasticsearch,cool,bonsai\"));\n        assertThat(doc.get(docMapper.mappers().getMapper(\"file1.content_type\").fieldType().names().indexName()), equalTo(\"text/html; charset=ISO-8859-1\"));\n        assertThat(doc.getField(docMapper.mappers().getMapper(\"file1.content_length\").fieldType().names().indexName()).numericValue().longValue(), is(344L));\n\n        assertThat(doc.get(docMapper.mappers().getMapper(\"file2\").fieldType().names().indexName()), nullValue());\n        assertThat(doc.get(docMapper.mappers().getMapper(\"file2.title\").fieldType().names().indexName()), nullValue());\n        assertThat(doc.get(docMapper.mappers().getMapper(\"file2.author\").fieldType().names().indexName()), nullValue());\n        assertThat(doc.get(docMapper.mappers().getMapper(\"file2.keywords\").fieldType().names().indexName()), nullValue());\n        assertThat(doc.get(docMapper.mappers().getMapper(\"file2.content_type\").fieldType().names().indexName()), nullValue());\n        assertThat(doc.getField(docMapper.mappers().getMapper(\"file2.content_length\").fieldType().names().indexName()), nullValue());\n    }\n\n    public void testMultipleDocsEncryptedFirst() throws IOException {\n        DocumentMapperParser mapperParser = MapperTestUtils.newMapperService(createTempDir(), Settings.EMPTY).documentMapperParser();\n        mapperParser.putTypeParser(AttachmentMapper.CONTENT_TYPE, new AttachmentMapper.TypeParser());\n\n        String mapping = copyToStringFromClasspath(\"/org/elasticsearch/index/mapper/attachment/test/unit/encrypted/test-mapping.json\");\n        DocumentMapper docMapper = mapperParser.parse(mapping);\n        byte[] html = copyToBytesFromClasspath(\"/org/elasticsearch/index/mapper/attachment/test/sample-files/htmlWithValidDateMeta.html\");\n        byte[] pdf = copyToBytesFromClasspath(\"/org/elasticsearch/index/mapper/attachment/test/sample-files/encrypted.pdf\");\n\n        BytesReference json = jsonBuilder()\n                .startObject()\n                .field(\"file1\", pdf)\n                .field(\"file2\", html)\n                .endObject().bytes();\n\n        ParseContext.Document doc =  docMapper.parse(\"person\", \"person\", \"1\", json).rootDoc();\n        assertThat(doc.get(docMapper.mappers().getMapper(\"file1\").fieldType().names().indexName()), nullValue());\n        assertThat(doc.get(docMapper.mappers().getMapper(\"file1.title\").fieldType().names().indexName()), nullValue());\n        assertThat(doc.get(docMapper.mappers().getMapper(\"file1.author\").fieldType().names().indexName()), nullValue());\n        assertThat(doc.get(docMapper.mappers().getMapper(\"file1.keywords\").fieldType().names().indexName()), nullValue());\n        assertThat(doc.get(docMapper.mappers().getMapper(\"file1.content_type\").fieldType().names().indexName()), nullValue());\n        assertThat(doc.getField(docMapper.mappers().getMapper(\"file1.content_length\").fieldType().names().indexName()), nullValue());\n\n        assertThat(doc.get(docMapper.mappers().getMapper(\"file2.content\").fieldType().names().indexName()), containsString(\"World\"));\n        assertThat(doc.get(docMapper.mappers().getMapper(\"file2.title\").fieldType().names().indexName()), equalTo(\"Hello\"));\n        assertThat(doc.get(docMapper.mappers().getMapper(\"file2.author\").fieldType().names().indexName()), equalTo(\"kimchy\"));\n        assertThat(doc.get(docMapper.mappers().getMapper(\"file2.keywords\").fieldType().names().indexName()), equalTo(\"elasticsearch,cool,bonsai\"));\n        assertThat(doc.get(docMapper.mappers().getMapper(\"file2.content_type\").fieldType().names().indexName()), equalTo(\"text/html; charset=ISO-8859-1\"));\n        assertThat(doc.getField(docMapper.mappers().getMapper(\"file2.content_length\").fieldType().names().indexName()).numericValue().longValue(), is(344L));\n    }\n\n    public void testMultipleDocsEncryptedNotIgnoringErrors() throws IOException {\n        try {\n            DocumentMapperParser mapperParser = MapperTestUtils.newMapperService(createTempDir(),\n                Settings.builder()\n                    .put(\"index.mapping.attachment.ignore_errors\", false)\n                    .build()).documentMapperParser();\n            mapperParser.putTypeParser(AttachmentMapper.CONTENT_TYPE, new AttachmentMapper.TypeParser());\n\n            String mapping = copyToStringFromClasspath(\"/org/elasticsearch/index/mapper/attachment/test/unit/encrypted/test-mapping.json\");\n            DocumentMapper docMapper = mapperParser.parse(mapping);\n            byte[] html = copyToBytesFromClasspath(\"/org/elasticsearch/index/mapper/attachment/test/sample-files/htmlWithValidDateMeta.html\");\n            byte[] pdf = copyToBytesFromClasspath(\"/org/elasticsearch/index/mapper/attachment/test/sample-files/encrypted.pdf\");\n\n            BytesReference json = jsonBuilder()\n                .startObject()\n                .field(\"file1\", pdf)\n                .field(\"file2\", html)\n                .endObject().bytes();\n\n            docMapper.parse(\"person\", \"person\", \"1\", json);\n            fail(\"Expected doc parsing exception\");\n        } catch (MapperParsingException e) {\n            if (e.getMessage() == null || e.getMessage().contains(\"is encrypted\") == false) {\n                // wrong exception\n                throw e;\n            }\n        }\n    }\n\n}\n"
  },
  {
    "path": "src/test/java/org/elasticsearch/mapper/attachments/LanguageDetectionAttachmentMapperTests.java",
    "content": "/*\n * Licensed to Elasticsearch under one or more contributor\n * license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright\n * ownership. Elasticsearch licenses this file to you under\n * the Apache License, Version 2.0 (the \"License\"); you may\n * not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\npackage org.elasticsearch.mapper.attachments;\n\nimport org.elasticsearch.common.settings.Settings;\nimport org.elasticsearch.common.xcontent.XContentBuilder;\nimport org.elasticsearch.index.mapper.DocumentMapper;\nimport org.elasticsearch.index.mapper.DocumentMapperParser;\nimport org.elasticsearch.index.mapper.ParseContext;\nimport org.elasticsearch.index.mapper.core.StringFieldMapper;\nimport org.elasticsearch.mapper.attachments.AttachmentMapper;\nimport org.junit.Before;\n\nimport java.io.IOException;\n\nimport static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;\nimport static org.elasticsearch.test.StreamsUtils.copyToBytesFromClasspath;\nimport static org.elasticsearch.test.StreamsUtils.copyToStringFromClasspath;\nimport static org.hamcrest.Matchers.equalTo;\nimport static org.hamcrest.Matchers.instanceOf;\n\n/**\n *\n */\npublic class LanguageDetectionAttachmentMapperTests extends AttachmentUnitTestCase {\n\n    private DocumentMapper docMapper;\n\n    @Before\n    public void setupMapperParser() throws IOException {\n        setupMapperParser(true);\n    }\n\n    public void setupMapperParser(boolean langDetect) throws IOException {\n        DocumentMapperParser mapperParser = MapperTestUtils.newMapperService(createTempDir(),\n            Settings.settingsBuilder()\n                .put(\"index.mapping.attachment.detect_language\", langDetect)\n            .build()).documentMapperParser();\n        mapperParser.putTypeParser(AttachmentMapper.CONTENT_TYPE, new AttachmentMapper.TypeParser());\n        String mapping = copyToStringFromClasspath(\"/org/elasticsearch/index/mapper/attachment/test/unit/language/language-mapping.json\");\n        docMapper = mapperParser.parse(mapping);\n\n        assertThat(docMapper.mappers().getMapper(\"file.language\"), instanceOf(StringFieldMapper.class));\n    }\n\n    private void testLanguage(String filename, String expected, String... forcedLanguage) throws IOException {\n        byte[] html = copyToBytesFromClasspath(\"/org/elasticsearch/index/mapper/attachment/test/sample-files/\" + filename);\n\n        XContentBuilder xcb = jsonBuilder()\n                .startObject()\n                    .startObject(\"file\")\n                        .field(\"_name\", filename)\n                        .field(\"_content\", html);\n\n        if (forcedLanguage.length > 0) {\n            xcb.field(\"_language\", forcedLanguage[0]);\n        }\n\n        xcb.endObject().endObject();\n\n        ParseContext.Document doc =  docMapper.parse(\"person\", \"person\", \"1\", xcb.bytes()).rootDoc();\n\n        // Our mapping should be kept as a String\n        assertThat(doc.get(docMapper.mappers().getMapper(\"file.language\").fieldType().names().indexName()), equalTo(expected));\n    }\n\n    public void testFrDetection() throws Exception {\n        testLanguage(\"text-in-french.txt\", \"fr\");\n    }\n\n    public void testEnDetection() throws Exception {\n        testLanguage(\"text-in-english.txt\", \"en\");\n    }\n\n    public void testFrForced() throws Exception {\n        testLanguage(\"text-in-english.txt\", \"fr\", \"fr\");\n    }\n\n    /**\n     * This test gives strange results! detection of \":-)\" gives \"lt\" as a result\n     */\n    public void testNoLanguage() throws Exception {\n        testLanguage(\"text-in-nolang.txt\", \"lt\");\n    }\n\n    public void testLangDetectDisabled() throws Exception {\n        // We replace the mapper with another one which have index.mapping.attachment.detect_language = false\n        setupMapperParser(false);\n        testLanguage(\"text-in-english.txt\", null);\n    }\n\n    public void testLangDetectDocumentEnabled() throws Exception {\n        // We replace the mapper with another one which have index.mapping.attachment.detect_language = false\n        setupMapperParser(false);\n\n        byte[] html = copyToBytesFromClasspath(\"/org/elasticsearch/index/mapper/attachment/test/sample-files/text-in-english.txt\");\n\n        XContentBuilder xcb = jsonBuilder()\n                .startObject()\n                .startObject(\"file\")\n                    .field(\"_name\", \"text-in-english.txt\")\n                    .field(\"_content\", html)\n                    .field(\"_detect_language\", true)\n                .endObject().endObject();\n\n        ParseContext.Document doc =  docMapper.parse(\"person\", \"person\", \"1\", xcb.bytes()).rootDoc();\n\n        // Our mapping should be kept as a String\n        assertThat(doc.get(docMapper.mappers().getMapper(\"file.language\").fieldType().names().indexName()), equalTo(\"en\"));\n    }\n}\n"
  },
  {
    "path": "src/test/java/org/elasticsearch/mapper/attachments/MapperAttachmentsRestIT.java",
    "content": "/*\n * Licensed to Elasticsearch under one or more contributor\n * license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright\n * ownership. Elasticsearch licenses this file to you under\n * the Apache License, Version 2.0 (the \"License\"); you may\n * not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\npackage org.elasticsearch.mapper.attachments;\n\nimport com.carrotsearch.randomizedtesting.annotations.Name;\nimport com.carrotsearch.randomizedtesting.annotations.ParametersFactory;\nimport org.elasticsearch.common.settings.Settings;\nimport org.elasticsearch.mapper.attachments.MapperAttachmentsPlugin;\nimport org.elasticsearch.test.rest.ESRestTestCase;\nimport org.elasticsearch.test.rest.RestTestCandidate;\nimport org.elasticsearch.test.rest.parser.RestTestParseException;\n\nimport java.io.IOException;\n\npublic class MapperAttachmentsRestIT extends ESRestTestCase {\n\n    @Override\n    protected Settings nodeSettings(int nodeOrdinal) {\n        return Settings.builder()\n                .put(super.nodeSettings(nodeOrdinal))\n                .put(\"plugin.types\", MapperAttachmentsPlugin.class.getName())\n                .build();\n    }\n\n    public MapperAttachmentsRestIT(@Name(\"yaml\") RestTestCandidate testCandidate) {\n        super(testCandidate);\n    }\n\n    @ParametersFactory\n    public static Iterable<Object[]> parameters() throws IOException, RestTestParseException {\n        return createParameters(0, 1);\n    }\n}\n\n"
  },
  {
    "path": "src/test/java/org/elasticsearch/mapper/attachments/MapperTestUtils.java",
    "content": "/*\n * Licensed to Elasticsearch under one or more contributor\n * license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright\n * ownership. Elasticsearch licenses this file to you under\n * the Apache License, Version 2.0 (the \"License\"); you may\n * not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\npackage org.elasticsearch.mapper.attachments;\n\nimport org.elasticsearch.Version;\nimport org.elasticsearch.cluster.metadata.IndexMetaData;\nimport org.elasticsearch.common.settings.Settings;\nimport org.elasticsearch.env.Environment;\nimport org.elasticsearch.index.Index;\nimport org.elasticsearch.index.IndexSettings;\nimport org.elasticsearch.index.analysis.AnalysisRegistry;\nimport org.elasticsearch.index.analysis.AnalysisService;\nimport org.elasticsearch.index.mapper.MapperService;\nimport org.elasticsearch.index.similarity.SimilarityService;\nimport org.elasticsearch.test.IndexSettingsModule;\n\nimport java.io.IOException;\nimport java.nio.file.Path;\nimport java.util.Collections;\n\nclass MapperTestUtils {\n\n    public static MapperService newMapperService(Path tempDir, Settings indexSettings) throws IOException {\n        Settings nodeSettings = Settings.builder()\n            .put(\"path.home\", tempDir)\n            .build();\n        indexSettings = Settings.builder()\n            .put(IndexMetaData.SETTING_VERSION_CREATED, Version.CURRENT)\n            .put(indexSettings)\n            .build();\n        IndexSettings idxSettings = IndexSettingsModule.newIndexSettings(new Index(\"test\"), indexSettings, Collections.emptyList());\n        AnalysisService analysisService = new AnalysisRegistry(null, new Environment(nodeSettings)).build(idxSettings);\n        SimilarityService similarityService = new SimilarityService(idxSettings, Collections.emptyMap());\n        return new MapperService(idxSettings, analysisService, similarityService);\n    }\n}\n"
  },
  {
    "path": "src/test/java/org/elasticsearch/mapper/attachments/MetadataMapperTests.java",
    "content": "/*\n * Licensed to Elasticsearch under one or more contributor\n * license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright\n * ownership. Elasticsearch licenses this file to you under\n * the Apache License, Version 2.0 (the \"License\"); you may\n * not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\npackage org.elasticsearch.mapper.attachments;\n\nimport org.elasticsearch.common.bytes.BytesReference;\nimport org.elasticsearch.common.settings.Settings;\nimport org.elasticsearch.index.mapper.DocumentMapper;\nimport org.elasticsearch.index.mapper.DocumentMapperParser;\nimport org.elasticsearch.index.mapper.MapperParsingException;\nimport org.elasticsearch.index.mapper.ParseContext;\nimport org.elasticsearch.mapper.attachments.AttachmentMapper;\n\nimport java.io.IOException;\n\nimport static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;\nimport static org.elasticsearch.test.StreamsUtils.copyToBytesFromClasspath;\nimport static org.elasticsearch.test.StreamsUtils.copyToStringFromClasspath;\nimport static org.hamcrest.Matchers.*;\n\n/**\n * Test for https://github.com/elasticsearch/elasticsearch-mapper-attachments/issues/38\n */\npublic class MetadataMapperTests extends AttachmentUnitTestCase {\n\n    protected void checkMeta(String filename, Settings otherSettings, Long expectedDate, Long expectedLength) throws IOException {\n        Settings settings = Settings.builder()\n                                             .put(this.testSettings)\n                                             .put(otherSettings)\n                                             .build();\n        DocumentMapperParser mapperParser = MapperTestUtils.newMapperService(createTempDir(), settings).documentMapperParser();\n        mapperParser.putTypeParser(AttachmentMapper.CONTENT_TYPE, new AttachmentMapper.TypeParser());\n\n        String mapping = copyToStringFromClasspath(\"/org/elasticsearch/index/mapper/attachment/test/unit/metadata/test-mapping.json\");\n        DocumentMapper docMapper = mapperParser.parse(mapping);\n        byte[] html = copyToBytesFromClasspath(\"/org/elasticsearch/index/mapper/attachment/test/sample-files/\" + filename);\n\n        BytesReference json = jsonBuilder()\n                .startObject()\n                    .startObject(\"file\")\n                        .field(\"_name\", filename)\n                        .field(\"_content\", html)\n                    .endObject()\n                .endObject().bytes();\n\n        ParseContext.Document doc =  docMapper.parse(\"person\", \"person\", \"1\", json).rootDoc();\n        assertThat(doc.get(docMapper.mappers().getMapper(\"file.content\").fieldType().names().indexName()), containsString(\"World\"));\n        assertThat(doc.get(docMapper.mappers().getMapper(\"file.name\").fieldType().names().indexName()), equalTo(filename));\n        if (expectedDate == null) {\n            assertThat(doc.getField(docMapper.mappers().getMapper(\"file.date\").fieldType().names().indexName()), nullValue());\n        } else {\n            assertThat(doc.getField(docMapper.mappers().getMapper(\"file.date\").fieldType().names().indexName()).numericValue().longValue(), is(expectedDate));\n        }\n        assertThat(doc.get(docMapper.mappers().getMapper(\"file.title\").fieldType().names().indexName()), equalTo(\"Hello\"));\n        assertThat(doc.get(docMapper.mappers().getMapper(\"file.author\").fieldType().names().indexName()), equalTo(\"kimchy\"));\n        assertThat(doc.get(docMapper.mappers().getMapper(\"file.keywords\").fieldType().names().indexName()), equalTo(\"elasticsearch,cool,bonsai\"));\n        assertThat(doc.get(docMapper.mappers().getMapper(\"file.content_type\").fieldType().names().indexName()), equalTo(\"text/html; charset=ISO-8859-1\"));\n        assertThat(doc.getField(docMapper.mappers().getMapper(\"file.content_length\").fieldType().names().indexName()).numericValue().longValue(), is(expectedLength));\n    }\n\n    public void testIgnoreWithoutDate() throws Exception {\n        checkMeta(\"htmlWithoutDateMeta.html\", Settings.builder().build(), null, 300L);\n    }\n\n    public void testIgnoreWithEmptyDate() throws Exception {\n        checkMeta(\"htmlWithEmptyDateMeta.html\", Settings.builder().build(), null, 334L);\n    }\n\n    public void testIgnoreWithCorrectDate() throws Exception {\n        checkMeta(\"htmlWithValidDateMeta.html\", Settings.builder().build(), 1354233600000L, 344L);\n    }\n\n    public void testWithoutDate() throws Exception {\n        checkMeta(\"htmlWithoutDateMeta.html\", Settings.builder().put(\"index.mapping.attachment.ignore_errors\", false).build(), null, 300L);\n    }\n\n    public void testWithEmptyDate() throws Exception {\n        try {\n            checkMeta(\"htmlWithEmptyDateMeta.html\", Settings.builder().put(\"index.mapping.attachment.ignore_errors\", false).build(), null, null);\n        } catch (MapperParsingException expected) {\n            assertTrue(expected.getMessage().contains(\"failed to parse\"));\n        }\n    }\n\n    public void testWithCorrectDate() throws Exception {\n        checkMeta(\"htmlWithValidDateMeta.html\", Settings.builder().put(\"index.mapping.attachment.ignore_errors\", false).build(), 1354233600000L, 344L);\n    }\n}\n"
  },
  {
    "path": "src/test/java/org/elasticsearch/mapper/attachments/MultifieldAttachmentMapperTests.java",
    "content": "/*\n * Licensed to Elasticsearch under one or more contributor\n * license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright\n * ownership. Elasticsearch licenses this file to you under\n * the Apache License, Version 2.0 (the \"License\"); you may\n * not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\npackage org.elasticsearch.mapper.attachments;\n\nimport org.elasticsearch.common.Base64;\nimport org.elasticsearch.common.settings.Settings;\nimport org.elasticsearch.common.xcontent.XContentFactory;\nimport org.elasticsearch.index.mapper.DocumentMapper;\nimport org.elasticsearch.index.mapper.DocumentMapperParser;\nimport org.elasticsearch.index.mapper.MapperService;\nimport org.elasticsearch.index.mapper.ParsedDocument;\nimport org.elasticsearch.index.mapper.core.DateFieldMapper;\nimport org.elasticsearch.index.mapper.core.StringFieldMapper;\nimport org.elasticsearch.mapper.attachments.AttachmentMapper;\nimport org.elasticsearch.threadpool.ThreadPool;\nimport org.junit.After;\nimport org.junit.Before;\n\nimport java.nio.charset.StandardCharsets;\n\nimport static org.elasticsearch.test.StreamsUtils.copyToStringFromClasspath;\nimport static org.hamcrest.Matchers.*;\n\n/**\n *\n */\npublic class MultifieldAttachmentMapperTests extends AttachmentUnitTestCase {\n\n    private DocumentMapperParser mapperParser;\n    private ThreadPool threadPool;\n\n    @Before\n    public void setupMapperParser() throws Exception {\n        mapperParser = MapperTestUtils.newMapperService(createTempDir(), Settings.EMPTY).documentMapperParser();\n        mapperParser.putTypeParser(AttachmentMapper.CONTENT_TYPE, new AttachmentMapper.TypeParser());\n\n    }\n\n    @After\n    public void cleanup() throws InterruptedException {\n        terminate(threadPool);\n    }\n\n    public void testSimpleMappings() throws Exception {\n        String mapping = copyToStringFromClasspath(\"/org/elasticsearch/index/mapper/attachment/test/unit/multifield/multifield-mapping.json\");\n        DocumentMapper docMapper = mapperParser.parse(mapping);\n\n\n        assertThat(docMapper.mappers().getMapper(\"file.content\"), instanceOf(StringFieldMapper.class));\n        assertThat(docMapper.mappers().getMapper(\"file.content.suggest\"), instanceOf(StringFieldMapper.class));\n\n        assertThat(docMapper.mappers().getMapper(\"file.date\"), instanceOf(DateFieldMapper.class));\n        assertThat(docMapper.mappers().getMapper(\"file.date.string\"), instanceOf(StringFieldMapper.class));\n\n        assertThat(docMapper.mappers().getMapper(\"file.title\"), instanceOf(StringFieldMapper.class));\n        assertThat(docMapper.mappers().getMapper(\"file.title.suggest\"), instanceOf(StringFieldMapper.class));\n\n        assertThat(docMapper.mappers().getMapper(\"file.name\"), instanceOf(StringFieldMapper.class));\n        assertThat(docMapper.mappers().getMapper(\"file.name.suggest\"), instanceOf(StringFieldMapper.class));\n\n        assertThat(docMapper.mappers().getMapper(\"file.author\"), instanceOf(StringFieldMapper.class));\n        assertThat(docMapper.mappers().getMapper(\"file.author.suggest\"), instanceOf(StringFieldMapper.class));\n\n        assertThat(docMapper.mappers().getMapper(\"file.keywords\"), instanceOf(StringFieldMapper.class));\n        assertThat(docMapper.mappers().getMapper(\"file.keywords.suggest\"), instanceOf(StringFieldMapper.class));\n\n        assertThat(docMapper.mappers().getMapper(\"file.content_type\"), instanceOf(StringFieldMapper.class));\n        assertThat(docMapper.mappers().getMapper(\"file.content_type.suggest\"), instanceOf(StringFieldMapper.class));\n    }\n\n    public void testExternalValues() throws Exception {\n        String originalText = \"This is an elasticsearch mapper attachment test.\";\n        String contentType = \"text/plain; charset=ISO-8859-1\";\n        String forcedName = \"dummyname.txt\";\n\n        String bytes = Base64.encodeBytes(originalText.getBytes(StandardCharsets.ISO_8859_1));\n        threadPool = new ThreadPool(\"testing-only\");\n\n        MapperService mapperService = MapperTestUtils.newMapperService(createTempDir(), Settings.EMPTY);\n        mapperService.documentMapperParser().putTypeParser(AttachmentMapper.CONTENT_TYPE, new AttachmentMapper.TypeParser());\n\n        String mapping = copyToStringFromClasspath(\"/org/elasticsearch/index/mapper/attachment/test/unit/multifield/multifield-mapping.json\");\n\n        DocumentMapper documentMapper = mapperService.documentMapperParser().parse(mapping);\n\n        ParsedDocument doc = documentMapper.parse(\"person\", \"person\", \"1\", XContentFactory.jsonBuilder()\n                .startObject()\n                    .field(\"file\", bytes)\n                .endObject()\n                .bytes());\n\n        assertThat(doc.rootDoc().getField(\"file.content\"), notNullValue());\n        assertThat(doc.rootDoc().getField(\"file.content\").stringValue(), is(originalText + \"\\n\"));\n\n        assertThat(doc.rootDoc().getField(\"file.content_type\"), notNullValue());\n        assertThat(doc.rootDoc().getField(\"file.content_type\").stringValue(), is(contentType));\n        assertThat(doc.rootDoc().getField(\"file.content_type.suggest\"), notNullValue());\n        assertThat(doc.rootDoc().getField(\"file.content_type.suggest\").stringValue(), is(contentType));\n        assertThat(doc.rootDoc().getField(\"file.content_length\"), notNullValue());\n        assertThat(doc.rootDoc().getField(\"file.content_length\").numericValue().intValue(), is(originalText.length()));\n\n        assertThat(doc.rootDoc().getField(\"file.content.suggest\"), notNullValue());\n        assertThat(doc.rootDoc().getField(\"file.content.suggest\").stringValue(), is(originalText + \"\\n\"));\n\n        // Let's force some values\n        doc = documentMapper.parse(\"person\", \"person\", \"1\", XContentFactory.jsonBuilder()\n                .startObject()\n                    .startObject(\"file\")\n                        .field(\"_content\", bytes)\n                        .field(\"_name\", forcedName)\n                    .endObject()\n                .endObject()\n                .bytes());\n\n        assertThat(doc.rootDoc().getField(\"file.content\"), notNullValue());\n        assertThat(doc.rootDoc().getField(\"file.content\").stringValue(), is(originalText + \"\\n\"));\n\n        assertThat(doc.rootDoc().getField(\"file.content_type\"), notNullValue());\n        assertThat(doc.rootDoc().getField(\"file.content_type\").stringValue(), is(contentType));\n        assertThat(doc.rootDoc().getField(\"file.content_type.suggest\"), notNullValue());\n        assertThat(doc.rootDoc().getField(\"file.content_type.suggest\").stringValue(), is(contentType));\n        assertThat(doc.rootDoc().getField(\"file.content_length\"), notNullValue());\n        assertThat(doc.rootDoc().getField(\"file.content_length\").numericValue().intValue(), is(originalText.length()));\n\n        assertThat(doc.rootDoc().getField(\"file.content.suggest\"), notNullValue());\n        assertThat(doc.rootDoc().getField(\"file.content.suggest\").stringValue(), is(originalText + \"\\n\"));\n\n        assertThat(doc.rootDoc().getField(\"file.name\"), notNullValue());\n        assertThat(doc.rootDoc().getField(\"file.name\").stringValue(), is(forcedName));\n        // In mapping we have default store:false\n        assertThat(doc.rootDoc().getField(\"file.name\").fieldType().stored(), is(false));\n        assertThat(doc.rootDoc().getField(\"file.name.suggest\"), notNullValue());\n        assertThat(doc.rootDoc().getField(\"file.name.suggest\").stringValue(), is(forcedName));\n        // In mapping we set store:true for suggest subfield\n        assertThat(doc.rootDoc().getField(\"file.name.suggest\").fieldType().stored(), is(true));\n    }\n}\n"
  },
  {
    "path": "src/test/java/org/elasticsearch/mapper/attachments/SimpleAttachmentMapperTests.java",
    "content": "/*\n * Licensed to Elasticsearch under one or more contributor\n * license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright\n * ownership. Elasticsearch licenses this file to you under\n * the Apache License, Version 2.0 (the \"License\"); you may\n * not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\npackage org.elasticsearch.mapper.attachments;\n\nimport org.elasticsearch.Version;\nimport org.elasticsearch.cluster.metadata.IndexMetaData;\nimport org.elasticsearch.common.bytes.BytesReference;\nimport org.elasticsearch.common.settings.Settings;\nimport org.elasticsearch.index.mapper.DocumentMapper;\nimport org.elasticsearch.index.mapper.DocumentMapperParser;\nimport org.elasticsearch.index.mapper.ParseContext;\nimport org.elasticsearch.mapper.attachments.AttachmentMapper;\n\nimport static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;\nimport static org.elasticsearch.test.StreamsUtils.copyToBytesFromClasspath;\nimport static org.elasticsearch.test.StreamsUtils.copyToStringFromClasspath;\nimport static org.hamcrest.Matchers.*;\n\n/**\n *\n */\npublic class SimpleAttachmentMapperTests extends AttachmentUnitTestCase {\n\n    public void testSimpleMappings() throws Exception {\n        DocumentMapperParser mapperParser = MapperTestUtils.newMapperService(createTempDir(), Settings.EMPTY).documentMapperParser();\n        mapperParser.putTypeParser(AttachmentMapper.CONTENT_TYPE, new AttachmentMapper.TypeParser());\n        String mapping = copyToStringFromClasspath(\"/org/elasticsearch/index/mapper/attachment/test/unit/simple/test-mapping.json\");\n        DocumentMapper docMapper = mapperParser.parse(mapping);\n        byte[] html = copyToBytesFromClasspath(\"/org/elasticsearch/index/mapper/attachment/test/sample-files/testXHTML.html\");\n\n        BytesReference json = jsonBuilder().startObject().field(\"file\", html).endObject().bytes();\n        ParseContext.Document doc = docMapper.parse(\"person\", \"person\", \"1\", json).rootDoc();\n\n        assertThat(doc.get(docMapper.mappers().getMapper(\"file.content_type\").fieldType().names().indexName()), startsWith(\"application/xhtml+xml\"));\n        assertThat(doc.get(docMapper.mappers().getMapper(\"file.title\").fieldType().names().indexName()), equalTo(\"XHTML test document\"));\n        assertThat(doc.get(docMapper.mappers().getMapper(\"file.content\").fieldType().names().indexName()), containsString(\"This document tests the ability of Apache Tika to extract content\"));\n\n        // re-parse it\n        String builtMapping = docMapper.mappingSource().string();\n        docMapper = mapperParser.parse(builtMapping);\n\n        json = jsonBuilder().startObject().field(\"file\", html).endObject().bytes();\n\n        doc = docMapper.parse(\"person\", \"person\", \"1\", json).rootDoc();\n\n        assertThat(doc.get(docMapper.mappers().getMapper(\"file.content_type\").fieldType().names().indexName()), startsWith(\"application/xhtml+xml\"));\n        assertThat(doc.get(docMapper.mappers().getMapper(\"file.title\").fieldType().names().indexName()), equalTo(\"XHTML test document\"));\n        assertThat(doc.get(docMapper.mappers().getMapper(\"file.content\").fieldType().names().indexName()), containsString(\"This document tests the ability of Apache Tika to extract content\"));\n    }\n\n    public void testContentBackcompat() throws Exception {\n        DocumentMapperParser mapperParser = MapperTestUtils.newMapperService(createTempDir(),\n            Settings.builder()\n                .put(IndexMetaData.SETTING_VERSION_CREATED, Version.V_1_4_2.id)\n            .build()).documentMapperParser();\n        mapperParser.putTypeParser(AttachmentMapper.CONTENT_TYPE, new AttachmentMapper.TypeParser());\n        String mapping = copyToStringFromClasspath(\"/org/elasticsearch/index/mapper/attachment/test/unit/simple/test-mapping.json\");\n        DocumentMapper docMapper = mapperParser.parse(mapping);\n        byte[] html = copyToBytesFromClasspath(\"/org/elasticsearch/index/mapper/attachment/test/sample-files/testXHTML.html\");\n\n        BytesReference json = jsonBuilder().startObject().field(\"file\", html).endObject().bytes();\n\n        ParseContext.Document doc = docMapper.parse(\"person\", \"person\", \"1\", json).rootDoc();\n        assertThat(doc.get(\"file\"), containsString(\"This document tests the ability of Apache Tika to extract content\"));\n    }\n\n    /**\n     * test for https://github.com/elastic/elasticsearch-mapper-attachments/issues/179\n     */\n    public void testSimpleMappingsWithAllFields() throws Exception {\n        DocumentMapperParser mapperParser = MapperTestUtils.newMapperService(createTempDir(), Settings.EMPTY).documentMapperParser();\n        mapperParser.putTypeParser(AttachmentMapper.CONTENT_TYPE, new AttachmentMapper.TypeParser());\n        String mapping = copyToStringFromClasspath(\"/org/elasticsearch/index/mapper/attachment/test/unit/simple/test-mapping-all-fields.json\");\n        DocumentMapper docMapper = mapperParser.parse(mapping);\n        byte[] html = copyToBytesFromClasspath(\"/org/elasticsearch/index/mapper/attachment/test/sample-files/testXHTML.html\");\n\n        BytesReference json = jsonBuilder().startObject().field(\"file\", html).endObject().bytes();\n        ParseContext.Document doc = docMapper.parse(\"person\", \"person\", \"1\", json).rootDoc();\n\n        assertThat(doc.get(docMapper.mappers().getMapper(\"file.content_type\").fieldType().names().indexName()), startsWith(\"application/xhtml+xml\"));\n        assertThat(doc.get(docMapper.mappers().getMapper(\"file.title\").fieldType().names().indexName()), equalTo(\"XHTML test document\"));\n        assertThat(doc.get(docMapper.mappers().getMapper(\"file.content\").fieldType().names().indexName()), containsString(\"This document tests the ability of Apache Tika to extract content\"));\n\n        // re-parse it\n        String builtMapping = docMapper.mappingSource().string();\n        docMapper = mapperParser.parse(builtMapping);\n\n        json = jsonBuilder().startObject().field(\"file\", html).endObject().bytes();\n\n        doc = docMapper.parse(\"person\", \"person\", \"1\", json).rootDoc();\n\n        assertThat(doc.get(docMapper.mappers().getMapper(\"file.content_type\").fieldType().names().indexName()), startsWith(\"application/xhtml+xml\"));\n        assertThat(doc.get(docMapper.mappers().getMapper(\"file.title\").fieldType().names().indexName()), equalTo(\"XHTML test document\"));\n        assertThat(doc.get(docMapper.mappers().getMapper(\"file.content\").fieldType().names().indexName()), containsString(\"This document tests the ability of Apache Tika to extract content\"));\n    }\n\n}\n"
  },
  {
    "path": "src/test/java/org/elasticsearch/mapper/attachments/StandaloneRunner.java",
    "content": "/*\n * Licensed to Elasticsearch under one or more contributor\n * license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright\n * ownership. Elasticsearch licenses this file to you under\n * the Apache License, Version 2.0 (the \"License\"); you may\n * not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\npackage org.elasticsearch.mapper.attachments;\n\nimport org.apache.commons.cli.CommandLine;\nimport org.elasticsearch.common.bytes.BytesReference;\nimport org.elasticsearch.common.cli.CliTool;\nimport org.elasticsearch.common.cli.CliToolConfig;\nimport org.elasticsearch.common.cli.Terminal;\nimport org.elasticsearch.common.io.PathUtils;\nimport org.elasticsearch.common.io.stream.BytesStreamOutput;\nimport org.elasticsearch.common.settings.Settings;\nimport org.elasticsearch.common.xcontent.XContentBuilder;\nimport org.elasticsearch.env.Environment;\nimport org.elasticsearch.index.mapper.DocumentMapper;\nimport org.elasticsearch.index.mapper.DocumentMapperParser;\nimport org.elasticsearch.index.mapper.ParseContext;\nimport org.elasticsearch.mapper.attachments.AttachmentMapper;\n\nimport java.io.FileNotFoundException;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.nio.file.Files;\nimport java.nio.file.Path;\nimport java.util.Locale;\n\nimport static org.elasticsearch.common.cli.CliToolConfig.Builder.cmd;\nimport static org.elasticsearch.common.cli.CliToolConfig.Builder.option;\nimport static org.elasticsearch.common.io.Streams.copy;\nimport static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;\nimport static org.elasticsearch.test.StreamsUtils.copyToStringFromClasspath;\n\n/**\n * This class provides a simple main class which can be used to test what is extracted from a given binary file.\n * You can run it using\n *  -u file://URL/TO/YOUR/DOC\n *  --size set extracted size (default to mapper attachment size)\n *  BASE64 encoded binary\n *\n * Example:\n *  StandaloneRunner BASE64Text\n *  StandaloneRunner -u /tmp/mydoc.pdf\n *  StandaloneRunner -u /tmp/mydoc.pdf --size 1000000\n */\npublic class StandaloneRunner extends CliTool {\n\n    private static final CliToolConfig CONFIG = CliToolConfig.config(\"tika\", StandaloneRunner.class)\n                        .cmds(TikaRunner.CMD)\n                .build();\n\n    static {\n        System.setProperty(\"es.path.home\", \"/tmp\");\n    }\n\n    static class TikaRunner extends Command {\n        private static final String NAME = \"tika\";\n        private final String url;\n        private final Integer size;\n        private final String base64text;\n        private final DocumentMapper docMapper;\n\n        private static final CliToolConfig.Cmd CMD = cmd(NAME, TikaRunner.class)\n                .options(option(\"u\", \"url\").required(false).hasArg(false))\n                .options(option(\"t\", \"size\").required(false).hasArg(false))\n                .build();\n\n        protected TikaRunner(Terminal terminal, String url, Integer size, String base64text) throws IOException {\n            super(terminal);\n            this.size = size;\n            this.url = url;\n            this.base64text = base64text;\n            DocumentMapperParser mapperParser = MapperTestUtils.newMapperService(PathUtils.get(\".\"), Settings.EMPTY).documentMapperParser(); // use CWD b/c it won't be used\n            mapperParser.putTypeParser(AttachmentMapper.CONTENT_TYPE, new AttachmentMapper.TypeParser());\n\n            String mapping = copyToStringFromClasspath(\"/org/elasticsearch/index/mapper/attachment/test/standalone/standalone-mapping.json\");\n            docMapper = mapperParser.parse(mapping);\n        }\n\n        @Override\n        public ExitStatus execute(Settings settings, Environment env) throws Exception {\n            XContentBuilder builder = jsonBuilder().startObject().field(\"file\").startObject();\n\n            if (base64text != null) {\n                // If base64 is provided\n                builder.field(\"_content\", base64text);\n            } else {\n                // A file is provided\n                byte[] bytes = copyToBytes(PathUtils.get(url));\n                builder.field(\"_content\", bytes);\n            }\n\n            if (size >= 0) {\n                builder.field(\"_indexed_chars\", size);\n            }\n\n            BytesReference json = builder.endObject().endObject().bytes();\n\n            ParseContext.Document doc = docMapper.parse(\"person\", \"person\", \"1\", json).rootDoc();\n\n            terminal.println(\"## Extracted text\");\n            terminal.println(\"--------------------- BEGIN -----------------------\");\n            terminal.println(\"%s\", doc.get(\"file.content\"));\n            terminal.println(\"---------------------- END ------------------------\");\n            terminal.println(\"## Metadata\");\n            printMetadataContent(doc, AttachmentMapper.FieldNames.AUTHOR);\n            printMetadataContent(doc, AttachmentMapper.FieldNames.CONTENT_LENGTH);\n            printMetadataContent(doc, AttachmentMapper.FieldNames.CONTENT_TYPE);\n            printMetadataContent(doc, AttachmentMapper.FieldNames.DATE);\n            printMetadataContent(doc, AttachmentMapper.FieldNames.KEYWORDS);\n            printMetadataContent(doc, AttachmentMapper.FieldNames.LANGUAGE);\n            printMetadataContent(doc, AttachmentMapper.FieldNames.NAME);\n            printMetadataContent(doc, AttachmentMapper.FieldNames.TITLE);\n\n            return ExitStatus.OK;\n        }\n\n        private void printMetadataContent(ParseContext.Document doc, String field) {\n            terminal.println(\"- %s: %s\", field, doc.get(docMapper.mappers().getMapper(\"file.\" + field).fieldType().names().indexName()));\n        }\n\n        public static byte[] copyToBytes(Path path) throws IOException {\n            try (InputStream is = Files.newInputStream(path)) {\n                if (is == null) {\n                    throw new FileNotFoundException(\"Resource [\" + path + \"] not found in classpath\");\n                }\n                try (BytesStreamOutput out = new BytesStreamOutput()) {\n                    copy(is, out);\n                    return out.bytes().toBytes();\n                }\n            }\n        }\n\n        public static Command parse(Terminal terminal, CommandLine cli) throws IOException {\n            String url = cli.getOptionValue(\"u\");\n            String base64text = null;\n            String sSize = cli.getOptionValue(\"size\");\n            Integer size = sSize != null ? Integer.parseInt(sSize) : -1;\n            if (url == null && cli.getArgs().length == 0) {\n                    return exitCmd(ExitStatus.USAGE, terminal, \"url or BASE64 content should be provided (type -h for help)\");\n            }\n            if (url == null) {\n                if (cli.getArgs().length == 0) {\n                    return exitCmd(ExitStatus.USAGE, terminal, \"url or BASE64 content should be provided (type -h for help)\");\n                }\n                base64text = cli.getArgs()[0];\n            } else {\n                if (cli.getArgs().length == 1) {\n                    return exitCmd(ExitStatus.USAGE, terminal, \"url or BASE64 content should be provided. Not both. (type -h for help)\");\n                }\n            }\n            return new TikaRunner(terminal, url, size, base64text);\n        }\n    }\n\n    public StandaloneRunner() {\n        super(CONFIG);\n    }\n\n\n    public static void main(String[] args) {\n        StandaloneRunner pluginManager = new StandaloneRunner();\n        pluginManager.execute(args);\n    }\n\n    @Override\n    protected Command parse(String cmdName, CommandLine cli) throws Exception {\n        switch (cmdName.toLowerCase(Locale.ROOT)) {\n            case TikaRunner.NAME: return TikaRunner.parse(terminal, cli);\n            default:\n                    assert false : \"can't get here as cmd name is validated before this method is called\";\n                    return exitCmd(ExitStatus.CODE_ERROR);\n        }\n    }\n}\n"
  },
  {
    "path": "src/test/java/org/elasticsearch/mapper/attachments/TikaDocTests.java",
    "content": "package org.elasticsearch.mapper.attachments;\n\n/*\n * Licensed to Elasticsearch under one or more contributor\n * license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright\n * ownership. Elasticsearch licenses this file to you under\n * the Apache License, Version 2.0 (the \"License\"); you may\n * not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport java.nio.file.DirectoryStream;\nimport java.nio.file.Files;\nimport java.nio.file.Path;\n\nimport org.apache.lucene.util.LuceneTestCase.SuppressFileSystems;\nimport org.apache.lucene.util.TestUtil;\nimport org.apache.tika.metadata.Metadata;\n\nimport org.elasticsearch.test.ESTestCase;\n\n/** \n * Evil test-coverage cheat, we parse a bunch of docs from tika\n * so that we have a nice grab-bag variety, and assert some content\n * comes back and no exception.\n */\n@SuppressFileSystems(\"ExtrasFS\") // don't try to parse extraN\npublic class TikaDocTests extends ESTestCase {\n\n    /** some test files from tika test suite, zipped up */\n    static final String TIKA_FILES = \"/org/elasticsearch/index/mapper/attachment/test/tika-files.zip\";\n\n    public void testFiles() throws Exception {\n        Path tmp = createTempDir();\n        TestUtil.unzip(getClass().getResourceAsStream(TIKA_FILES), tmp);\n        \n        try (DirectoryStream<Path> stream = Files.newDirectoryStream(tmp)) {\n            for (Path doc : stream) {\n              logger.debug(\"parsing: {}\", doc);\n              assertParseable(doc);\n            }\n        }\n    }\n    \n    void assertParseable(Path fileName) throws Exception {\n        try {\n            byte bytes[] = Files.readAllBytes(fileName);\n            String parsedContent = TikaImpl.parse(bytes, new Metadata(), -1);\n            assertNotNull(parsedContent);\n            assertFalse(parsedContent.isEmpty());\n            logger.debug(\"extracted content: {}\", parsedContent);\n        } catch (Throwable e) {\n            throw new RuntimeException(\"parsing of filename: \" + fileName.getFileName() + \" failed\", e);  \n        }\n    }\n}\n"
  },
  {
    "path": "src/test/java/org/elasticsearch/mapper/attachments/TikaImplTests.java",
    "content": "package org.elasticsearch.mapper.attachments;\n\nimport org.elasticsearch.test.ESTestCase;\n\npublic class TikaImplTests extends ESTestCase {\n  \n  public void testTikaLoads() throws Exception {\n    Class.forName(\"org.elasticsearch.mapper.attachments.TikaImpl\");\n  }\n\n}\n"
  },
  {
    "path": "src/test/java/org/elasticsearch/mapper/attachments/VariousDocTests.java",
    "content": "/*\n * Licensed to Elasticsearch under one or more contributor\n * license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright\n * ownership. Elasticsearch licenses this file to you under\n * the Apache License, Version 2.0 (the \"License\"); you may\n * not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\npackage org.elasticsearch.mapper.attachments;\n\nimport org.apache.tika.io.IOUtils;\nimport org.apache.tika.metadata.Metadata;\nimport org.elasticsearch.common.bytes.BytesReference;\nimport org.elasticsearch.common.settings.Settings;\nimport org.elasticsearch.index.mapper.DocumentMapper;\nimport org.elasticsearch.index.mapper.DocumentMapperParser;\nimport org.elasticsearch.index.mapper.ParseContext;\nimport org.elasticsearch.mapper.attachments.AttachmentMapper;\nimport org.junit.Before;\n\nimport java.io.IOException;\nimport java.io.InputStream;\n\nimport static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;\nimport static org.elasticsearch.mapper.attachments.AttachmentMapper.FieldNames.*;\nimport static org.elasticsearch.test.StreamsUtils.copyToBytesFromClasspath;\nimport static org.elasticsearch.test.StreamsUtils.copyToStringFromClasspath;\nimport static org.hamcrest.Matchers.isEmptyOrNullString;\nimport static org.hamcrest.Matchers.not;\n\n/**\n * Test for different documents\n */\npublic class VariousDocTests extends AttachmentUnitTestCase {\n\n    protected DocumentMapper docMapper;\n\n    @Before\n    public void createMapper() throws IOException {\n        DocumentMapperParser mapperParser = MapperTestUtils.newMapperService(createTempDir(), Settings.EMPTY).documentMapperParser();\n        mapperParser.putTypeParser(AttachmentMapper.CONTENT_TYPE, new AttachmentMapper.TypeParser());\n\n        String mapping = copyToStringFromClasspath(\"/org/elasticsearch/index/mapper/attachment/test/unit/various-doc/test-mapping.json\");\n        docMapper = mapperParser.parse(mapping);\n    }\n\n    /**\n     * Test for https://github.com/elasticsearch/elasticsearch-mapper-attachments/issues/104\n     */\n    public void testWordDocxDocument104() throws Exception {\n        assertParseable(\"issue-104.docx\");\n        testMapper(\"issue-104.docx\", false);\n    }\n\n    /**\n     * Test for encrypted PDF\n     */\n    public void testEncryptedPDFDocument() throws Exception {\n        assertException(\"encrypted.pdf\", \"is encrypted\");\n        // TODO Remove when this will be fixed in Tika. See https://issues.apache.org/jira/browse/TIKA-1548\n        System.clearProperty(\"sun.font.fontmanager\");\n        testMapper(\"encrypted.pdf\", true);\n    }\n\n    /**\n     * Test for HTML\n     */\n    public void testHtmlDocument() throws Exception {\n        assertParseable(\"htmlWithEmptyDateMeta.html\");\n        testMapper(\"htmlWithEmptyDateMeta.html\", false);\n    }\n\n    /**\n     * Test for XHTML\n     */\n    public void testXHtmlDocument() throws Exception {\n        assertParseable(\"testXHTML.html\");\n        testMapper(\"testXHTML.html\", false);\n    }\n\n    /**\n     * Test for TXT\n     */\n    public void testTxtDocument() throws Exception {\n        assertParseable(\"text-in-english.txt\");\n        testMapper(\"text-in-english.txt\", false);\n    }\n\n    /**\n     * Test for ASCIIDOC\n     * Not yet supported by Tika: https://github.com/elasticsearch/elasticsearch-mapper-attachments/issues/29\n     */\n    public void testAsciidocDocument() throws Exception {\n        assertParseable(\"asciidoc.asciidoc\");\n        testMapper(\"asciidoc.asciidoc\", false);\n    }\n\n    void assertException(String filename, String expectedMessage) throws Exception {\n        try (InputStream is = VariousDocTests.class.getResourceAsStream(\"/org/elasticsearch/index/mapper/attachment/test/sample-files/\" + filename)) {\n            byte bytes[] = IOUtils.toByteArray(is);\n            TikaImpl.parse(bytes, new Metadata(), -1);\n            fail(\"expected exception\");\n        } catch (Exception e) {\n            if (e.getMessage() != null && e.getMessage().contains(expectedMessage)) {\n              // ok\n            } else {\n              // unexpected\n              throw e;\n            }\n        }\n    }\n\n    protected void assertParseable(String filename) throws Exception {\n        try (InputStream is = VariousDocTests.class.getResourceAsStream(\"/org/elasticsearch/index/mapper/attachment/test/sample-files/\" + filename)) {\n            byte bytes[] = IOUtils.toByteArray(is);\n            String parsedContent = TikaImpl.parse(bytes, new Metadata(), -1);  \n            assertThat(parsedContent, not(isEmptyOrNullString()));\n            logger.debug(\"extracted content: {}\", parsedContent);\n        }\n    }\n\n    protected void testMapper(String filename, boolean errorExpected) throws IOException {\n        byte[] html = copyToBytesFromClasspath(\"/org/elasticsearch/index/mapper/attachment/test/sample-files/\" + filename);\n\n        BytesReference json = jsonBuilder()\n                .startObject()\n                    .startObject(\"file\")\n                        .field(\"_name\", filename)\n                        .field(\"_content\", html)\n                    .endObject()\n                .endObject().bytes();\n\n        ParseContext.Document doc =  docMapper.parse(\"person\", \"person\", \"1\", json).rootDoc();\n        if (!errorExpected) {\n            assertThat(doc.get(docMapper.mappers().getMapper(\"file.content\").fieldType().names().indexName()), not(isEmptyOrNullString()));\n            logger.debug(\"-> extracted content: {}\", doc.get(docMapper.mappers().getMapper(\"file\").fieldType().names().indexName()));\n            logger.debug(\"-> extracted metadata:\");\n            printMetadataContent(doc, AUTHOR);\n            printMetadataContent(doc, CONTENT_LENGTH);\n            printMetadataContent(doc, CONTENT_TYPE);\n            printMetadataContent(doc, DATE);\n            printMetadataContent(doc, KEYWORDS);\n            printMetadataContent(doc, LANGUAGE);\n            printMetadataContent(doc, NAME);\n            printMetadataContent(doc, TITLE);\n        }\n    }\n\n    private void printMetadataContent(ParseContext.Document doc, String field) {\n        logger.debug(\"- [{}]: [{}]\", field, doc.get(docMapper.mappers().getMapper(\"file.\" + field).fieldType().names().indexName()));\n    }\n}\n"
  },
  {
    "path": "src/test/resources/org/elasticsearch/index/mapper/attachment/test/sample-files/asciidoc.asciidoc",
    "content": "[[tika-asciidoc]]\n= AsciiDoc test\n\nHere is a test of the asciidoc format.\n\n"
  },
  {
    "path": "src/test/resources/org/elasticsearch/index/mapper/attachment/test/sample-files/htmlWithEmptyDateMeta.html",
    "content": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n        \"http://www.w3.org/TR/html4/loose.dtd\">\n<html lang=\"fr\">\n<head>\n    <title>Hello</title>\n    <meta name=\"date\" content=\"\">\n    <meta name=\"Author\" content=\"kimchy\">\n    <meta name=\"Keywords\" content=\"elasticsearch,cool,bonsai\">\n</head>\n<body>World</body>\n</html>\n"
  },
  {
    "path": "src/test/resources/org/elasticsearch/index/mapper/attachment/test/sample-files/htmlWithValidDateMeta.html",
    "content": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n        \"http://www.w3.org/TR/html4/loose.dtd\">\n<html lang=\"fr\">\n<head>\n    <title>Hello</title>\n    <meta name=\"date\" content=\"2012-11-30\">\n    <meta name=\"Author\" content=\"kimchy\">\n    <meta name=\"Keywords\" content=\"elasticsearch,cool,bonsai\">\n</head>\n<body>World</body>\n</html>\n"
  },
  {
    "path": "src/test/resources/org/elasticsearch/index/mapper/attachment/test/sample-files/htmlWithoutDateMeta.html",
    "content": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n        \"http://www.w3.org/TR/html4/loose.dtd\">\n<html lang=\"fr\">\n<head>\n    <title>Hello</title>\n    <meta name=\"Author\" content=\"kimchy\">\n    <meta name=\"Keywords\" content=\"elasticsearch,cool,bonsai\">\n</head>\n<body>World</body>\n</html>\n"
  },
  {
    "path": "src/test/resources/org/elasticsearch/index/mapper/attachment/test/sample-files/testContentLength.txt",
    "content": "Begin\n\nBeforeLimit AfterLimit\n\nBroadway\n\nNearing the end\n\nEnd"
  },
  {
    "path": "src/test/resources/org/elasticsearch/index/mapper/attachment/test/sample-files/testXHTML.html",
    "content": "<!--\n Licensed to the Apache Software Foundation (ASF) under one or more\n contributor license agreements.  See the NOTICE file distributed with\n this work for additional information regarding copyright ownership.\n The ASF licenses this file to You under the Apache License, Version 2.0\n (the \"License\"); you may not use this file except in compliance with\n the License.  You may obtain a copy of the License at\n\n     http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n-->\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n    <title>XHTML test document</title>\n    <meta name=\"Author\" content=\"Tika Developers\"/>\n    <meta http-equiv=\"refresh\" content=\"5\"/>\n</head>\n<body>\n<p>\n    This document tests the ability of Apache Tika to extract content\n    from an <a href=\"http://www.w3.org/TR/xhtml1/\">XHTML document</a>.\n</p>\n</body>\n</html>\n"
  },
  {
    "path": "src/test/resources/org/elasticsearch/index/mapper/attachment/test/sample-files/text-in-english.txt",
    "content": "\"God Save the Queen\" (alternatively \"God Save the King\""
  },
  {
    "path": "src/test/resources/org/elasticsearch/index/mapper/attachment/test/sample-files/text-in-french.txt",
    "content": "Allons enfants de la Patrie Le jour de gloire est arrivé. Contre nous de la tyrannie"
  },
  {
    "path": "src/test/resources/org/elasticsearch/index/mapper/attachment/test/sample-files/text-in-nolang.txt",
    "content": ""
  },
  {
    "path": "src/test/resources/org/elasticsearch/index/mapper/attachment/test/standalone/standalone-mapping.json",
    "content": "{\n    \"person\":{\n        \"properties\":{\n            \"file\":{\n                \"type\":\"attachment\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "src/test/resources/org/elasticsearch/index/mapper/attachment/test/unit/date/date-mapping.json",
    "content": "{\n    \"person\": {\n        \"properties\": {\n            \"file\": {\n                \"type\": \"attachment\",\n                \"fields\": {\n                    \"date\": { \"type\": \"string\" }\n                }\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "src/test/resources/org/elasticsearch/index/mapper/attachment/test/unit/encrypted/test-mapping.json",
    "content": "{\n    \"person\":{\n        \"properties\":{\n            \"file1\":{\n                \"type\":\"attachment\"\n            },\n            \"file2\":{\n                \"type\":\"attachment\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "src/test/resources/org/elasticsearch/index/mapper/attachment/test/unit/language/language-mapping.json",
    "content": "{\n    \"person\": {\n        \"properties\": {\n            \"file\": {\n                \"type\": \"attachment\",\n                \"fields\": {\n                    \"language\": { \"type\": \"string\" }\n                }\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "src/test/resources/org/elasticsearch/index/mapper/attachment/test/unit/metadata/test-mapping.json",
    "content": "{\n    \"person\":{\n        \"properties\":{\n            \"file\":{\n                \"type\":\"attachment\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "src/test/resources/org/elasticsearch/index/mapper/attachment/test/unit/multifield/multifield-mapping.json",
    "content": "{\n    \"person\": {\n        \"properties\": {\n            \"file\": {\n                \"type\": \"attachment\",\n                \"fields\": {\n                    \"content\": {\n                        \"type\": \"string\",\n                        \"fields\": {\n                            \"suggest\": { \"type\": \"string\" }\n                        }\n                    },\n                    \"date\": {\n                        \"type\": \"date\",\n                        \"fields\": {\n                            \"string\": { \"type\": \"string\" }\n                        }\n                    },\n                    \"title\": {\n                        \"type\": \"string\",\n                        \"fields\": {\n                            \"suggest\": { \"type\": \"string\" }\n                        }\n                    },\n                    \"name\": {\n                        \"type\": \"string\",\n                        \"fields\": {\n                            \"suggest\": {\n                                \"type\": \"string\",\n                                \"store\": true\n                            }\n                        }\n                    },\n                    \"author\": {\n                        \"type\": \"string\",\n                        \"fields\": {\n                            \"suggest\": { \"type\": \"string\" }\n                        }\n                    },\n                    \"keywords\": {\n                        \"type\": \"string\",\n                        \"fields\": {\n                            \"suggest\": { \"type\": \"string\" }\n                        }\n                    },\n                    \"content_type\": {\n                        \"type\": \"string\",\n                        \"fields\": {\n                            \"suggest\": { \"type\": \"string\" }\n                        }\n                    }\n                }\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "src/test/resources/org/elasticsearch/index/mapper/attachment/test/unit/simple/test-mapping-all-fields.json",
    "content": "{\n    \"person\":{\n        \"properties\":{\n            \"file\":{\n                \"type\":\"attachment\",\n                \"fields\" : {\n                    \"content\" : {\"store\" : \"yes\"},\n                    \"title\" : {\"store\" : \"yes\"},\n                    \"date\" : {\"store\" : \"yes\"},\n                    \"author\" : {\"analyzer\" : \"standard\"},\n                    \"keywords\" : {\"store\" : \"yes\"},\n                    \"content_type\" : {\"store\" : \"yes\"},\n                    \"content_length\" : {\"store\" : \"yes\"},\n                    \"language\" : {\"store\" : \"yes\"}\n                }\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "src/test/resources/org/elasticsearch/index/mapper/attachment/test/unit/simple/test-mapping.json",
    "content": "{\n    \"person\":{\n        \"properties\":{\n            \"file\":{\n                \"type\":\"attachment\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "src/test/resources/org/elasticsearch/index/mapper/attachment/test/unit/various-doc/test-mapping.json",
    "content": "{\n    \"person\":{\n        \"properties\":{\n            \"file\":{\n                \"type\":\"attachment\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "src/test/resources/rest-api-spec/test/mapper_attachments/00_basic.yaml",
    "content": "# Integration tests for plugin: check name is correct\n#\n\"Mapper attachments loaded\":\n    - do:\n        cluster.state: {}\n\n    # Get master node id\n    - set: { master_node: master }\n\n    - do:\n        nodes.info: {}\n\n    - match:  { nodes.$master.plugins.0.name: mapper-attachments  }\n    - match:  { nodes.$master.plugins.0.jvm: true  }\n"
  },
  {
    "path": "src/test/resources/rest-api-spec/test/mapper_attachments/10_index.yaml",
    "content": "# Integration tests for Mapper Attachments plugin\n#\n\n---\n# https://github.com/elasticsearch/elasticsearch-mapper-attachments/issues/23\n\"Index empty attachment\":\n\n    - do:\n        indices.create:\n            index: test\n            body:\n              mappings:\n                doc:\n                  properties:\n                    file:\n                      type: attachment\n    - do:\n        cluster.health:\n          wait_for_status: yellow\n\n    - do:\n        catch: /(.)*mapper_parsing_exception.+No content is provided\\.(.)*/\n        index:\n            index: test\n            type: doc\n            id: 1\n            body:\n              file: { }\n\n---\n# https://github.com/elasticsearch/elasticsearch-mapper-attachments/issues/18\n# Encoded content with https://www.base64encode.org/\n# File1\n#<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n#        \"http://www.w3.org/TR/html4/loose.dtd\">\n#<html lang=\"fr\">\n#<head>\n#    <title>Hello</title>\n#    <meta name=\"date\" content=\"2012-11-30\">\n#    <meta name=\"Author\" content=\"kimchy\">\n#    <meta name=\"Keywords\" content=\"elasticsearch,cool,bonsai\">\n#</head>\n#<body>World</body>\n#</html>\n# File2 is an encrypted PDF with a password\n\n\"Multiple Attachments With Encrypted Doc Ignore Failures\":\n\n    - do:\n        indices.create:\n            index: test\n            body:\n              settings:\n                index.mapping.attachment.ignore_errors: true\n              mappings:\n                doc:\n                  properties:\n                    file1:\n                      type: attachment\n                    file2:\n                      type: attachment\n    - do:\n        cluster.health:\n          wait_for_status: yellow\n\n    - do:\n        index:\n            index: test\n            type: doc\n            id: 1\n            body:\n              file1: \"PCFET0NUWVBFIEhUTUwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMDEgVHJhbnNpdGlvbmFsLy9FTiINCiAgICAgICAgImh0dHA6Ly93d3cudzMub3JnL1RSL2h0bWw0L2xvb3NlLmR0ZCI+DQo8aHRtbCBsYW5nPSJmciI+DQo8aGVhZD4NCiAgICA8dGl0bGU+SGVsbG88L3RpdGxlPg0KICAgIDxtZXRhIG5hbWU9ImRhdGUiIGNvbnRlbnQ9IjIwMTItMTEtMzAiPg0KICAgIDxtZXRhIG5hbWU9IkF1dGhvciIgY29udGVudD0ia2ltY2h5Ij4NCiAgICA8bWV0YSBuYW1lPSJLZXl3b3JkcyIgY29udGVudD0iZWxhc3RpY3NlYXJjaCxjb29sLGJvbnNhaSI+DQo8L2hlYWQ+DQo8Ym9keT5Xb3JsZDwvYm9keT4NCjwvaHRtbD4NCg==\"\n              file2: \"JVBERi0xLjQNCiXDpMO8w7bDnw0KMiAwIG9iag0KPDwvTGVuZ3RoIDMgMCBSL0ZpbHRlci9GbGF0ZURlY29kZT4+DQpzdHJlYW0NCjB+az8/Pz8/bDU/Nyw+Pz/Ln1hqZT8uTD9LMS0/Jj9bRDM/SFY/Pz92P2B2P1dxRE5BP2k8Wk0/P01RP3c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DAwMDAgbiANCjAwMDAwMTM2MTMgMDAwMDAgbiANCjAwMDAwMDA1MTMgMDAwMDAgbiANCjAwMDAwMTI0NzAgMDAwMDAgbiANCjAwMDAwMTI0OTIgMDAwMDAgbiANCjAwMDAwMTI2ODcgMDAwMDAgbiANCjAwMDAwMTMwNzEgMDAwMDAgbiANCjAwMDAwMTMzMTIgMDAwMDAgbiANCjAwMDAwMTMzNDUgMDAwMDAgbiANCjAwMDAwMTM3MTIgMDAwMDAgbiANCjAwMDAwMTM4MDkgMDAwMDAgbiANCjAwMDAwMTM5ODQgMDAwMDAgbiANCnRyYWlsZXINCjw8L1NpemUgMTcvUm9vdCAxNCAwIFINCi9FbmNyeXB0IDE2IDAgUg0KL0luZm8gMTUgMCBSDQovSUQgWyA8NTJBOUE5NEE2MzExODQ3QTk2NkI1NjIxRDc3QTRERDM+DQo8NTJBOUE5NEE2MzExODQ3QTk2NkI1NjIxRDc3QTRERDM+IF0NCi9Eb2NDaGVja3N1bSAvNEE4NTkwMDE4QURDRjVCQjRCQTQ1NDFDQUFDQjFBNEUNCj4+DQpzdGFydHhyZWYNCjE0MTIyDQolJUVPRg==\"\n              hello: \"world\"\n\n    - do:\n        indices.refresh: {}\n\n    - do:\n        search:\n            index: test\n            body:\n                query:\n                    match:\n                        hello: \"world\"\n\n    - match: { hits.total: 1 }\n\n    - do:\n        search:\n            index: test\n            body:\n                query:\n                    match:\n                        file1.author: \"kimchy\"\n\n    - match: { hits.total: 1 }\n\n#---\n# This test has been disabled as it tries to decode an encoded PDF using BouncyCastle lib\n# Elasticsearch security manager does not allow permission java.security.SecurityPermission \"insertProvider.BC\";\n# See https://github.com/elastic/elasticsearch/pull/13077\n# See https://github.com/elastic/elasticsearch-mapper-attachments/pull/150#issuecomment-134247110\n#\n# https://github.com/elasticsearch/elasticsearch-mapper-attachments/issues/18\n# Encoded content with https://www.base64encode.org/\n# File1\n#<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n#        \"http://www.w3.org/TR/html4/loose.dtd\">\n#<html lang=\"fr\">\n#<head>\n#    <title>Hello</title>\n#    <meta name=\"date\" content=\"2012-11-30\">\n#    <meta name=\"Author\" content=\"kimchy\">\n#    <meta name=\"Keywords\" content=\"elasticsearch,cool,bonsai\">\n#</head>\n#<body>World</body>\n#</html>\n# File2 is an encrypted PDF with a password\n\n#\"Multiple Attachments With Encrypted Doc Should Fail\":\n#\n#    - do:\n#        indices.create:\n#            index: test\n#            body:\n#              settings:\n#                index.mapping.attachment.ignore_errors: false\n#              mappings:\n#                doc:\n#                  properties:\n#                    file1:\n#                      type: attachment\n#                    file2:\n#                      type: attachment\n#    - do:\n#        cluster.health:\n#          wait_for_status: yellow\n#\n#    - do:\n#        catch: /(.)*mapper_parsing_exception(.)*The supplied password does not match either the owner or user password in the document\\.(.)*/\n#        index:\n#            index: test\n#            type: doc\n#            id: 1\n#            body:\n#              file1: \"PCFET0NUWVBFIEhUTUwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMDEgVHJhbnNpdGlvbmFsLy9FTiINCiAgICAgICAgImh0dHA6Ly93d3cudzMub3JnL1RSL2h0bWw0L2xvb3NlLmR0ZCI+DQo8aHRtbCBsYW5nPSJmciI+DQo8aGVhZD4NCiAgICA8dGl0bGU+SGVsbG88L3RpdGxlPg0KICAgIDxtZXRhIG5hbWU9ImRhdGUiIGNvbnRlbnQ9IjIwMTItMTEtMzAiPg0KICAgIDxtZXRhIG5hbWU9IkF1dGhvciIgY29udGVudD0ia2ltY2h5Ij4NCiAgICA8bWV0YSBuYW1lPSJLZXl3b3JkcyIgY29udGVudD0iZWxhc3RpY3NlYXJjaCxjb29sLGJvbnNhaSI+DQo8L2hlYWQ+DQo8Ym9keT5Xb3JsZDwvYm9keT4NCjwvaHRtbD4NCg==\"\n#              file2: \"JVBERi0xLjQNCiXDpMO8w7bDnw0KMiAwIG9iag0KPDwvTGVuZ3RoIDMgMCBSL0ZpbHRlci9GbGF0ZURlY29kZT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biANCjAwMDAwMDAwMTkgMDAwMDAgbiANCjAwMDAwMDAyNzYgMDAwMDAgbiANCjAwMDAwMDAyOTYgMDAwMDAgbiANCjAwMDAwMDA0NzMgMDAwMDAgbiANCjAwMDAwMTM2MTMgMDAwMDAgbiANCjAwMDAwMDA1MTMgMDAwMDAgbiANCjAwMDAwMTI0NzAgMDAwMDAgbiANCjAwMDAwMTI0OTIgMDAwMDAgbiANCjAwMDAwMTI2ODcgMDAwMDAgbiANCjAwMDAwMTMwNzEgMDAwMDAgbiANCjAwMDAwMTMzMTIgMDAwMDAgbiANCjAwMDAwMTMzNDUgMDAwMDAgbiANCjAwMDAwMTM3MTIgMDAwMDAgbiANCjAwMDAwMTM4MDkgMDAwMDAgbiANCjAwMDAwMTM5ODQgMDAwMDAgbiANCnRyYWlsZXINCjw8L1NpemUgMTcvUm9vdCAxNCAwIFINCi9FbmNyeXB0IDE2IDAgUg0KL0luZm8gMTUgMCBSDQovSUQgWyA8NTJBOUE5NEE2MzExODQ3QTk2NkI1NjIxRDc3QTRERDM+DQo8NTJBOUE5NEE2MzExODQ3QTk2NkI1NjIxRDc3QTRERDM+IF0NCi9Eb2NDaGVja3N1bSAvNEE4NTkwMDE4QURDRjVCQjRCQTQ1NDFDQUFDQjFBNEUNCj4+DQpzdGFydHhyZWYNCjE0MTIyDQolJUVPRg==\"\n#              hello: \"world\"\n#\n#    - do:\n#        indices.refresh: {}\n#\n#    - do:\n#        search:\n#            index: test\n#\n#    - match: { hits.total: 0 }\n"
  },
  {
    "path": "src/test/resources/rest-api-spec/test/mapper_attachments/20_search.yaml",
    "content": "# Integration tests for Mapper Attachments plugin\n#\n\nsetup:\n    - do:\n        indices.create:\n            index: test\n            body:\n              mappings:\n                doc:\n                  properties:\n                    file:\n                      type: attachment\n    - do:\n        cluster.health:\n          wait_for_status: yellow\n\n---\n# Encoded content with https://www.base64encode.org/\n#<html xmlns=\"http://www.w3.org/1999/xhtml\">\n#<head>\n#    <title>XHTML test document</title>\n#    <meta name=\"Author\" content=\"Tika Developers\"/>\n#    <meta http-equiv=\"refresh\" content=\"5\"/>\n#</head>\n#<body>\n#<p>\n#    This document tests the ability of Apache Tika to extract content\n#    from an <a href=\"http://www.w3.org/TR/xhtml1/\">XHTML document</a>.\n#</p>\n#</body>\n#</html>\n\n\"Mapper Attachment Simple\":\n\n    - do:\n        index:\n            index: test\n            type: doc\n            id: 1\n            body:\n              file: \"PGh0bWwgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGh0bWwiPg0KPGhlYWQ+DQogICAgPHRpdGxlPlhIVE1MIHRlc3QgZG9jdW1lbnQ8L3RpdGxlPg0KICAgIDxtZXRhIG5hbWU9IkF1dGhvciIgY29udGVudD0iVGlrYSBEZXZlbG9wZXJzIi8+DQogICAgPG1ldGEgaHR0cC1lcXVpdj0icmVmcmVzaCIgY29udGVudD0iNSIvPg0KPC9oZWFkPg0KPGJvZHk+DQo8cD4NCiAgICBUaGlzIGRvY3VtZW50IHRlc3RzIHRoZSBhYmlsaXR5IG9mIEFwYWNoZSBUaWthIHRvIGV4dHJhY3QgY29udGVudA0KICAgIGZyb20gYW4gPGEgaHJlZj0iaHR0cDovL3d3dy53My5vcmcvVFIveGh0bWwxLyI+WEhUTUwgZG9jdW1lbnQ8L2E+Lg0KPC9wPg0KPC9ib2R5Pg0KPC9odG1sPg==\"\n\n    - do:\n        indices.refresh: {}\n\n    - do:\n        search:\n            index: test\n            body:\n                query:\n                    match:\n                        file.title: \"test document\"\n\n    - match: { hits.total: 1 }\n\n---\n# Encoded content with https://www.base64encode.org/\n#Begin\n#\n#BeforeLimit AfterLimit\n#\n#Broadway\n#\n#Nearing the end\n#\n#End\n\n\"Mapper Attachment ContentLength Limit\":\n\n    - do:\n        index:\n            index: test\n            type: doc\n            id: \"withlimit\"\n            body:\n              file:\n                _indexed_chars: 20\n                _content: \"QmVnaW4NCg0KQmVmb3JlTGltaXQgQWZ0ZXJMaW1pdA0KDQpCcm9hZHdheQ0KDQpOZWFyaW5nIHRoZSBlbmQNCg0KRW5k\"\n\n    - do:\n        index:\n            index: test\n            type: doc\n            id: \"nolimit\"\n            body:\n              file:\n                _indexed_chars: -1\n                _content: \"QmVnaW4NCg0KQmVmb3JlTGltaXQgQWZ0ZXJMaW1pdA0KDQpCcm9hZHdheQ0KDQpOZWFyaW5nIHRoZSBlbmQNCg0KRW5k\"\n\n    - do:\n        indices.refresh: {}\n\n    - do:\n        search:\n            index: test\n            body:\n                query:\n                    match:\n                        file.content: \"BeforeLimit\"\n\n    - match: { hits.total: 2 }\n\n    - do:\n        search:\n            index: test\n            body:\n                query:\n                    match:\n                        file.content: \"AfterLimit\"\n\n    - match: { hits.total: 1 }\n    - match: { hits.hits.0._id: \"nolimit\" }\n\n"
  },
  {
    "path": "src/test/resources/rest-api-spec/test/mapper_attachments/30_mapping.yaml",
    "content": "# Integration tests for Mapper Attachments plugin\n#\n\n---\n# Encoded content with https://www.base64encode.org/\n#<html xmlns=\"http://www.w3.org/1999/xhtml\">\n#<head>\n#    <title>XHTML test document</title>\n#    <meta name=\"Author\" content=\"Tika Developers\"/>\n#    <meta http-equiv=\"refresh\" content=\"5\"/>\n#</head>\n#<body>\n#<p>\n#    This document tests the ability of Apache Tika to extract content\n#    from an <a href=\"http://www.w3.org/TR/xhtml1/\">XHTML document</a>.\n#</p>\n#</body>\n#</html>\n\"ContentType and Name\":\n\n    - do:\n        indices.create:\n            index: test\n            body:\n              mappings:\n                doc:\n                  properties:\n                    \"file\":\n                      \"type\": \"attachment\"\n                      \"fields\":\n                        \"content_type\":\n                          \"store\": \"yes\"\n                        \"name\":\n                          \"store\": \"yes\"\n    - do:\n        cluster.health:\n          wait_for_status: yellow\n\n    - do:\n        index:\n            index: test\n            type: doc\n            id: 1\n            body:\n              file:\n                _content: \"QmVnaW4NCg0KQmVmb3JlTGltaXQgQWZ0ZXJMaW1pdA0KDQpCcm9hZHdheQ0KDQpOZWFyaW5nIHRoZSBlbmQNCg0KRW5k\"\n                _content_type: \"text/my-dummy-content-type\"\n                _name: \"my-dummy-name-txt\"\n\n    - do:\n        indices.refresh: {}\n\n    - do:\n        search:\n            index: test\n            body:\n                fields: [file.content_type,file.name]\n\n    - match: { hits.total: 1 }\n    - match: { hits.hits.0.fields: { file.content_type: [\"text/my-dummy-content-type\"],  file.name: [\"my-dummy-name-txt\"] }}\n\n"
  },
  {
    "path": "src/test/resources/rest-api-spec/test/mapper_attachments/40_highlight.yaml",
    "content": "# Integration tests for Mapper Attachments plugin\n#\n\nsetup:\n    - do:\n        indices.create:\n            index: test\n            body:\n              mappings:\n                doc:\n                  properties:\n                    \"file\":\n                      \"type\": \"attachment\"\n                      \"fields\":\n                        \"content\" :\n                          \"type\": \"string\"\n                          \"store\" : \"yes\"\n                          \"term_vector\": \"with_positions_offsets\"\n\n    - do:\n        cluster.health:\n          wait_for_status: yellow\n\n---\n# Encoded content with https://www.base64encode.org/\n#<html xmlns=\"http://www.w3.org/1999/xhtml\">\n#<head>\n#    <title>XHTML test document</title>\n#    <meta name=\"Author\" content=\"Tika Developers\"/>\n#    <meta http-equiv=\"refresh\" content=\"5\"/>\n#</head>\n#<body>\n#<p>\n#    This document tests the ability of Apache Tika to extract content\n#    from an <a href=\"http://www.w3.org/TR/xhtml1/\">XHTML document</a>.\n#</p>\n#</body>\n#</html>\n\n\"Highlight content\":\n\n    - do:\n        index:\n            index: test\n            type: doc\n            id: 1\n            body:\n              file: \"PGh0bWwgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGh0bWwiPg0KPGhlYWQ+DQogICAgPHRpdGxlPlhIVE1MIHRlc3QgZG9jdW1lbnQ8L3RpdGxlPg0KICAgIDxtZXRhIG5hbWU9IkF1dGhvciIgY29udGVudD0iVGlrYSBEZXZlbG9wZXJzIi8+DQogICAgPG1ldGEgaHR0cC1lcXVpdj0icmVmcmVzaCIgY29udGVudD0iNSIvPg0KPC9oZWFkPg0KPGJvZHk+DQo8cD4NCiAgICBUaGlzIGRvY3VtZW50IHRlc3RzIHRoZSBhYmlsaXR5IG9mIEFwYWNoZSBUaWthIHRvIGV4dHJhY3QgY29udGVudA0KICAgIGZyb20gYW4gPGEgaHJlZj0iaHR0cDovL3d3dy53My5vcmcvVFIveGh0bWwxLyI+WEhUTUwgZG9jdW1lbnQ8L2E+Lg0KPC9wPg0KPC9ib2R5Pg0KPC9odG1sPg==\"\n\n    - do:\n        indices.refresh: {}\n\n    - do:\n        search:\n            index: test\n            body:\n                query:\n                    match:\n                        file.content: \"apache tika\"\n                fields: []\n                highlight:\n                  fields:\n                    file.content: {}\n\n    - match: { hits.total: 1 }\n    - match: { hits.hits.0.highlight: { file.content : [ \"\\n\\n    This document tests the ability of <em>Apache</em> <em>Tika</em> to extract content\\n    from an XHTML document.\\n\" ] }}\n\n"
  }
]