├── .gitignore
├── CONTRIBUTING.md
├── LICENSE.txt
├── README.md
├── build.gradle
├── dev-tools
├── email_template.html
├── email_template.txt
├── release.py
├── tests.policy
└── upload-s3.py
├── licenses
├── bcmail-jdk15on-1.52.jar.sha1
├── bcmail-jdk15on-LICENSE.txt
├── bcmail-jdk15on-NOTICE.txt
├── bcpkix-jdk15on-1.52.jar.sha1
├── bcpkix-jdk15on-LICENSE.txt
├── bcpkix-jdk15on-NOTICE.txt
├── bcprov-jdk15on-1.52.jar.sha1
├── bcprov-jdk15on-LICENSE.txt
├── bcprov-jdk15on-NOTICE.txt
├── commons-codec-1.9.jar.sha1
├── commons-codec-LICENSE.txt
├── commons-codec-NOTICE.txt
├── commons-compress-1.10.jar.sha1
├── commons-compress-LICENSE.txt
├── commons-compress-NOTICE.txt
├── commons-io-2.4.jar.sha1
├── commons-io-LICENSE.txt
├── commons-io-NOTICE.txt
├── commons-logging-1.1.1.jar.sha1
├── commons-logging-LICENSE.txt
├── commons-logging-NOTICE.txt
├── fontbox-1.8.10.jar.sha1
├── fontbox-LICENSE.txt
├── fontbox-NOTICE.txt
├── jempbox-1.8.10.jar.sha1
├── jempbox-LICENSE.txt
├── jempbox-NOTICE.txt
├── juniversalchardet-1.0.3.jar.sha1
├── juniversalchardet-LICENSE.txt
├── juniversalchardet-NOTICE.txt
├── pdfbox-1.8.10.jar.sha1
├── pdfbox-LICENSE.txt
├── pdfbox-NOTICE.txt
├── poi-3.13.jar.sha1
├── poi-LICENSE.txt
├── poi-NOTICE.txt
├── poi-ooxml-3.13.jar.sha1
├── poi-ooxml-LICENSE.txt
├── poi-ooxml-NOTICE.txt
├── poi-ooxml-schemas-3.13.jar.sha1
├── poi-ooxml-schemas-LICENSE.txt
├── poi-ooxml-schemas-NOTICE.txt
├── poi-scratchpad-3.13.jar.sha1
├── poi-scratchpad-LICENSE.txt
├── poi-scratchpad-NOTICE.txt
├── stax-api-1.0.1.jar.sha1
├── stax-api-LICENSE.txt
├── stax-api-NOTICE.txt
├── tagsoup-1.2.1.jar.sha1
├── tagsoup-LICENSE.txt
├── tagsoup-NOTICE.txt
├── tika-core-1.11.jar.sha1
├── tika-core-LICENSE.txt
├── tika-core-NOTICE.txt
├── tika-parsers-1.11.jar.sha1
├── tika-parsers-LICENSE.txt
├── tika-parsers-NOTICE.txt
├── xmlbeans-2.6.0.jar.sha1
├── xmlbeans-LICENSE.txt
└── xmlbeans-NOTICE.txt
└── src
├── main
├── java
│ └── org
│ │ └── elasticsearch
│ │ └── mapper
│ │ └── attachments
│ │ ├── AttachmentMapper.java
│ │ ├── MapperAttachmentsPlugin.java
│ │ └── TikaImpl.java
└── plugin-metadata
│ └── plugin-security.policy
└── test
├── java
└── org
│ └── elasticsearch
│ └── mapper
│ └── attachments
│ ├── AttachmentUnitTestCase.java
│ ├── DateAttachmentMapperTests.java
│ ├── EncryptedDocMapperTests.java
│ ├── LanguageDetectionAttachmentMapperTests.java
│ ├── MapperAttachmentsRestIT.java
│ ├── MapperTestUtils.java
│ ├── MetadataMapperTests.java
│ ├── MultifieldAttachmentMapperTests.java
│ ├── SimpleAttachmentMapperTests.java
│ ├── StandaloneRunner.java
│ ├── TikaDocTests.java
│ ├── TikaImplTests.java
│ └── VariousDocTests.java
└── resources
├── org
└── elasticsearch
│ └── index
│ └── mapper
│ └── attachment
│ └── test
│ ├── sample-files
│ ├── asciidoc.asciidoc
│ ├── encrypted.pdf
│ ├── htmlWithEmptyDateMeta.html
│ ├── htmlWithValidDateMeta.html
│ ├── htmlWithoutDateMeta.html
│ ├── issue-104.docx
│ ├── testContentLength.txt
│ ├── testXHTML.html
│ ├── text-in-english.txt
│ ├── text-in-french.txt
│ └── text-in-nolang.txt
│ ├── standalone
│ └── standalone-mapping.json
│ ├── tika-files.zip
│ └── unit
│ ├── date
│ └── date-mapping.json
│ ├── encrypted
│ └── test-mapping.json
│ ├── language
│ └── language-mapping.json
│ ├── metadata
│ └── test-mapping.json
│ ├── multifield
│ └── multifield-mapping.json
│ ├── simple
│ ├── test-mapping-all-fields.json
│ └── test-mapping.json
│ └── various-doc
│ └── test-mapping.json
└── rest-api-spec
└── test
└── mapper_attachments
├── 00_basic.yaml
├── 10_index.yaml
├── 20_search.yaml
├── 30_mapping.yaml
└── 40_highlight.yaml
/.gitignore:
--------------------------------------------------------------------------------
1 | /data
2 | /work
3 | /logs
4 | /.idea
5 | /target
6 | .DS_Store
7 | *.iml
8 | /.project
9 | /.settings
10 | /.classpath
11 | /plugin_tools
12 | /.local-execution-hints.log
13 | /.local-*-execution-hints.log
14 | /eclipse-build/
15 | build/
16 | **/.local*
17 | generated-resources/
18 | .gradle/
19 | /bin/
20 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | Contributing to elasticsearch
2 | =============================
3 |
4 | Elasticsearch 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.
5 |
6 | Bug reports
7 | -----------
8 |
9 | If 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.
10 |
11 | It 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:
12 |
13 | ```sh
14 | # delete the index
15 | curl -XDELETE localhost:9200/test
16 |
17 | # insert a document
18 | curl -XPUT localhost:9200/test/test/1 -d '{
19 | "title": "test document"
20 | }'
21 |
22 | # this should return XXXX but instead returns YYY
23 | curl ....
24 | ```
25 |
26 | Provide 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.
27 |
28 | Feature requests
29 | ----------------
30 |
31 | If 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.
32 | Open 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.
33 |
34 | Contributing code and documentation changes
35 | -------------------------------------------
36 |
37 | If 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.
38 |
39 | We 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.
40 |
41 | The process for contributing to any of the [Elasticsearch repositories](https://github.com/elasticsearch/) is similar. Details for individual projects can be found below.
42 |
43 | ### Fork and clone the repository
44 |
45 | You will need to fork the main Elasticsearch code or documentation repository and clone it to your local machine. See
46 | [github help page](https://help.github.com/articles/fork-a-repo) for help.
47 |
48 | Further instructions for specific projects are given below.
49 |
50 | ### Submitting your changes
51 |
52 | Once your changes and tests are ready to submit for review:
53 |
54 | 1. Test your changes
55 | Run the test suite to make sure that nothing is broken.
56 |
57 | 2. Sign the Contributor License Agreement
58 | Please 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.
59 |
60 | 3. Rebase your changes
61 | Update 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.
62 |
63 | 4. Submit a pull request
64 | Push 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".
65 |
66 | Then 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.
67 |
68 |
69 | Contributing to the Elasticsearch plugin
70 | ----------------------------------------
71 |
72 | **Repository:** [https://github.com/elasticsearch/elasticsearch-mapper-attachments](https://github.com/elasticsearch/elasticsearch-mapper-attachments)
73 |
74 | Make 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`.
75 |
76 | Please follow these formatting guidelines:
77 |
78 | * Java indent is 4 spaces
79 | * Line width is 140 characters
80 | * The rest is left to Java coding standards
81 | * 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.
82 |
83 | To create a distribution from the source, simply run:
84 |
85 | ```sh
86 | cd elasticsearch-mapper-attachments/
87 | mvn clean package -DskipTests
88 | ```
89 |
90 | You will find the newly built packages under: `./target/releases/`.
91 |
92 | Before submitting your changes, run the test suite to make sure that nothing is broken, with:
93 |
94 | ```sh
95 | mvn clean test
96 | ```
97 |
98 | Source: [Contributing to elasticsearch](http://www.elasticsearch.org/contributing-to-elasticsearch/)
99 |
--------------------------------------------------------------------------------
/LICENSE.txt:
--------------------------------------------------------------------------------
1 |
2 | Apache License
3 | Version 2.0, January 2004
4 | http://www.apache.org/licenses/
5 |
6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7 |
8 | 1. Definitions.
9 |
10 | "License" shall mean the terms and conditions for use, reproduction,
11 | and distribution as defined by Sections 1 through 9 of this document.
12 |
13 | "Licensor" shall mean the copyright owner or entity authorized by
14 | the copyright owner that is granting the License.
15 |
16 | "Legal Entity" shall mean the union of the acting entity and all
17 | other entities that control, are controlled by, or are under common
18 | control with that entity. For the purposes of this definition,
19 | "control" means (i) the power, direct or indirect, to cause the
20 | direction or management of such entity, whether by contract or
21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
22 | outstanding shares, or (iii) beneficial ownership of such entity.
23 |
24 | "You" (or "Your") shall mean an individual or Legal Entity
25 | exercising permissions granted by this License.
26 |
27 | "Source" form shall mean the preferred form for making modifications,
28 | including but not limited to software source code, documentation
29 | source, and configuration files.
30 |
31 | "Object" form shall mean any form resulting from mechanical
32 | transformation or translation of a Source form, including but
33 | not limited to compiled object code, generated documentation,
34 | and conversions to other media types.
35 |
36 | "Work" shall mean the work of authorship, whether in Source or
37 | Object form, made available under the License, as indicated by a
38 | copyright notice that is included in or attached to the work
39 | (an example is provided in the Appendix below).
40 |
41 | "Derivative Works" shall mean any work, whether in Source or Object
42 | form, that is based on (or derived from) the Work and for which the
43 | editorial revisions, annotations, elaborations, or other modifications
44 | represent, as a whole, an original work of authorship. For the purposes
45 | of this License, Derivative Works shall not include works that remain
46 | separable from, or merely link (or bind by name) to the interfaces of,
47 | the Work and Derivative Works thereof.
48 |
49 | "Contribution" shall mean any work of authorship, including
50 | the original version of the Work and any modifications or additions
51 | to that Work or Derivative Works thereof, that is intentionally
52 | submitted to Licensor for inclusion in the Work by the copyright owner
53 | or by an individual or Legal Entity authorized to submit on behalf of
54 | the copyright owner. For the purposes of this definition, "submitted"
55 | means any form of electronic, verbal, or written communication sent
56 | to the Licensor or its representatives, including but not limited to
57 | communication on electronic mailing lists, source code control systems,
58 | and issue tracking systems that are managed by, or on behalf of, the
59 | Licensor for the purpose of discussing and improving the Work, but
60 | excluding communication that is conspicuously marked or otherwise
61 | designated in writing by the copyright owner as "Not a Contribution."
62 |
63 | "Contributor" shall mean Licensor and any individual or Legal Entity
64 | on behalf of whom a Contribution has been received by Licensor and
65 | subsequently incorporated within the Work.
66 |
67 | 2. Grant of Copyright License. Subject to the terms and conditions of
68 | this License, each Contributor hereby grants to You a perpetual,
69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70 | copyright license to reproduce, prepare Derivative Works of,
71 | publicly display, publicly perform, sublicense, and distribute the
72 | Work and such Derivative Works in Source or Object form.
73 |
74 | 3. Grant of Patent License. Subject to the terms and conditions of
75 | this License, each Contributor hereby grants to You a perpetual,
76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77 | (except as stated in this section) patent license to make, have made,
78 | use, offer to sell, sell, import, and otherwise transfer the Work,
79 | where such license applies only to those patent claims licensable
80 | by such Contributor that are necessarily infringed by their
81 | Contribution(s) alone or by combination of their Contribution(s)
82 | with the Work to which such Contribution(s) was submitted. If You
83 | institute patent litigation against any entity (including a
84 | cross-claim or counterclaim in a lawsuit) alleging that the Work
85 | or a Contribution incorporated within the Work constitutes direct
86 | or contributory patent infringement, then any patent licenses
87 | granted to You under this License for that Work shall terminate
88 | as of the date such litigation is filed.
89 |
90 | 4. Redistribution. You may reproduce and distribute copies of the
91 | Work or Derivative Works thereof in any medium, with or without
92 | modifications, and in Source or Object form, provided that You
93 | meet the following conditions:
94 |
95 | (a) You must give any other recipients of the Work or
96 | Derivative Works a copy of this License; and
97 |
98 | (b) You must cause any modified files to carry prominent notices
99 | stating that You changed the files; and
100 |
101 | (c) You must retain, in the Source form of any Derivative Works
102 | that You distribute, all copyright, patent, trademark, and
103 | attribution notices from the Source form of the Work,
104 | excluding those notices that do not pertain to any part of
105 | the Derivative Works; and
106 |
107 | (d) If the Work includes a "NOTICE" text file as part of its
108 | distribution, then any Derivative Works that You distribute must
109 | include a readable copy of the attribution notices contained
110 | within such NOTICE file, excluding those notices that do not
111 | pertain to any part of the Derivative Works, in at least one
112 | of the following places: within a NOTICE text file distributed
113 | as part of the Derivative Works; within the Source form or
114 | documentation, if provided along with the Derivative Works; or,
115 | within a display generated by the Derivative Works, if and
116 | wherever such third-party notices normally appear. The contents
117 | of the NOTICE file are for informational purposes only and
118 | do not modify the License. You may add Your own attribution
119 | notices within Derivative Works that You distribute, alongside
120 | or as an addendum to the NOTICE text from the Work, provided
121 | that such additional attribution notices cannot be construed
122 | as modifying the License.
123 |
124 | You may add Your own copyright statement to Your modifications and
125 | may provide additional or different license terms and conditions
126 | for use, reproduction, or distribution of Your modifications, or
127 | for any such Derivative Works as a whole, provided Your use,
128 | reproduction, and distribution of the Work otherwise complies with
129 | the conditions stated in this License.
130 |
131 | 5. Submission of Contributions. Unless You explicitly state otherwise,
132 | any Contribution intentionally submitted for inclusion in the Work
133 | by You to the Licensor shall be under the terms and conditions of
134 | this License, without any additional terms or conditions.
135 | Notwithstanding the above, nothing herein shall supersede or modify
136 | the terms of any separate license agreement you may have executed
137 | with Licensor regarding such Contributions.
138 |
139 | 6. Trademarks. This License does not grant permission to use the trade
140 | names, trademarks, service marks, or product names of the Licensor,
141 | except as required for reasonable and customary use in describing the
142 | origin of the Work and reproducing the content of the NOTICE file.
143 |
144 | 7. Disclaimer of Warranty. Unless required by applicable law or
145 | agreed to in writing, Licensor provides the Work (and each
146 | Contributor provides its Contributions) on an "AS IS" BASIS,
147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148 | implied, including, without limitation, any warranties or conditions
149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150 | PARTICULAR PURPOSE. You are solely responsible for determining the
151 | appropriateness of using or redistributing the Work and assume any
152 | risks associated with Your exercise of permissions under this License.
153 |
154 | 8. Limitation of Liability. In no event and under no legal theory,
155 | whether in tort (including negligence), contract, or otherwise,
156 | unless required by applicable law (such as deliberate and grossly
157 | negligent acts) or agreed to in writing, shall any Contributor be
158 | liable to You for damages, including any direct, indirect, special,
159 | incidental, or consequential damages of any character arising as a
160 | result of this License or out of the use or inability to use the
161 | Work (including but not limited to damages for loss of goodwill,
162 | work stoppage, computer failure or malfunction, or any and all
163 | other commercial damages or losses), even if such Contributor
164 | has been advised of the possibility of such damages.
165 |
166 | 9. Accepting Warranty or Additional Liability. While redistributing
167 | the Work or Derivative Works thereof, You may choose to offer,
168 | and charge a fee for, acceptance of support, warranty, indemnity,
169 | or other liability obligations and/or rights consistent with this
170 | License. However, in accepting such obligations, You may act only
171 | on Your own behalf and on Your sole responsibility, not on behalf
172 | of any other Contributor, and only if You agree to indemnify,
173 | defend, and hold each Contributor harmless for any liability
174 | incurred by, or claims asserted against, such Contributor by reason
175 | of your accepting any such warranty or additional liability.
176 |
177 | END OF TERMS AND CONDITIONS
178 |
179 | APPENDIX: How to apply the Apache License to your work.
180 |
181 | To apply the Apache License to your work, attach the following
182 | boilerplate notice, with the fields enclosed by brackets "[]"
183 | replaced with your own identifying information. (Don't include
184 | the brackets!) The text should be enclosed in the appropriate
185 | comment syntax for the file format. We also recommend that a
186 | file or class name and description of purpose be included on the
187 | same "printed page" as the copyright notice for easier
188 | identification within third-party archives.
189 |
190 | Copyright [yyyy] [name of copyright owner]
191 |
192 | Licensed under the Apache License, Version 2.0 (the "License");
193 | you may not use this file except in compliance with the License.
194 | You may obtain a copy of the License at
195 |
196 | http://www.apache.org/licenses/LICENSE-2.0
197 |
198 | Unless required by applicable law or agreed to in writing, software
199 | distributed under the License is distributed on an "AS IS" BASIS,
200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201 | See the License for the specific language governing permissions and
202 | limitations under the License.
203 |
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to Elasticsearch under one or more contributor
3 | * license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright
5 | * ownership. Elasticsearch licenses this file to you under
6 | * the Apache License, Version 2.0 (the "License"); you may
7 | * not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | import org.elasticsearch.gradle.ElasticsearchProperties
21 | import org.elasticsearch.gradle.precommit.DependencyLicensesTask
22 |
23 | buildscript {
24 | repositories {
25 | mavenCentral()
26 | maven {
27 | name 'sonatype-snapshots'
28 | url 'https://oss.sonatype.org/content/repositories/snapshots/'
29 | }
30 | jcenter()
31 | }
32 | dependencies {
33 | classpath 'org.elasticsearch.gradle:build-tools:3.0.0-SNAPSHOT'
34 | }
35 | }
36 | apply plugin: 'idea'
37 | apply plugin: 'eclipse'
38 | apply plugin: 'elasticsearch.esplugin'
39 |
40 | esplugin {
41 | name 'mapper-attachments'
42 | description 'The mapper attachments plugin adds the attachment type to Elasticsearch using Apache Tika.'
43 | classname 'org.elasticsearch.mapper.attachments.MapperAttachmentsPlugin'
44 | }
45 |
46 | group = 'org.elasticsearch.plugin'
47 | version = ElasticsearchProperties.version
48 | ext.luceneVersion = ElasticsearchProperties.luceneVersion
49 | repositories {
50 | mavenCentral()
51 | maven {
52 | name 'sonatype-snapshots'
53 | url 'https://oss.sonatype.org/content/repositories/snapshots/'
54 | }
55 | if (luceneVersion.contains('-snapshot')) {
56 | String revision = (luceneVersion =~ /\d\.\d\.\d-snapshot-(\d+)/)[0][1]
57 | maven {
58 | name 'lucene-snapshots'
59 | url "https://s3.amazonaws.com/download.elasticsearch.org/lucenesnapshots/${revision}"
60 | }
61 | }
62 | }
63 |
64 | dependencies {
65 | // mandatory for tika
66 | compile('org.apache.tika:tika-core:1.11')
67 | compile('org.apache.tika:tika-parsers:1.11') {
68 | transitive = false
69 | }
70 | compile('commons-io:commons-io:2.4')
71 |
72 | // character set detection
73 | compile('com.googlecode.juniversalchardet:juniversalchardet:1.0.3')
74 |
75 | // external parser libraries
76 | // HTML
77 | compile('org.ccil.cowan.tagsoup:tagsoup:1.2.1')
78 | // Adobe PDF
79 | compile('org.apache.pdfbox:pdfbox:1.8.10')
80 | compile('org.bouncycastle:bcmail-jdk15on:1.52')
81 | // OpenOffice
82 | compile('org.apache.poi:poi-ooxml:3.13')
83 | // MS Office
84 | compile('org.apache.poi:poi-scratchpad:3.13')
85 | // Apple iWork
86 | compile('org.apache.commons:commons-compress:1.10')
87 | }
88 |
89 | compileJava.options.compilerArgs << '-Xlint:-cast,-deprecation,-rawtypes'
90 |
91 | forbiddenPatterns {
92 | exclude '**/*.docx'
93 | exclude '**/*.pdf'
94 | }
95 |
96 | // fix ES build so this is not needed
97 | Task dependencyLicensesTask = DependencyLicensesTask.configure(project) {
98 | dependencies = project.configurations.runtime - project.configurations.provided
99 | }
100 | project.precommit.dependsOn(dependencyLicensesTask)
101 |
--------------------------------------------------------------------------------
/dev-tools/email_template.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
Heya,
4 |
5 |
We are pleased to announce the release of the %(artifact_name)s, version %(release_version)s
21 |
22 |
23 |
--------------------------------------------------------------------------------
/dev-tools/email_template.txt:
--------------------------------------------------------------------------------
1 | Heya,
2 |
3 |
4 | We are pleased to announce the release of the %(artifact_name)s, version %(release_version)s.
5 |
6 | %(artifact_description)s.
7 |
8 | %(project_url)s
9 |
10 | Release Notes - %(artifact_id)s - Version %(release_version)s
11 |
12 | %(empty_message)s
13 | %(issues_bug)s
14 | %(issues_update)s
15 | %(issues_new)s
16 | %(issues_doc)s
17 |
18 | For questions or comments around this plugin, feel free to use elasticsearch mailing list: https://discuss.elastic.co/c/elasticsearch
19 |
20 | Enjoy,
21 |
22 | -The Elasticsearch team
23 |
--------------------------------------------------------------------------------
/dev-tools/tests.policy:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to Elasticsearch under one or more contributor
3 | * license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright
5 | * ownership. Elasticsearch licenses this file to you under
6 | * the Apache License, Version 2.0 (the "License"); you may
7 | * not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | // Policy file to prevent tests from writing outside the test sandbox directory
21 | // PLEASE NOTE: You may need to enable other permissions when new tests are added,
22 | // everything not allowed here is forbidden!
23 |
24 | grant {
25 | // permissions for file access, write access only to sandbox:
26 | permission java.io.FilePermission "<>", "read,execute";
27 | permission java.io.FilePermission "${junit4.childvm.cwd}", "read,execute,write";
28 | permission java.io.FilePermission "${junit4.childvm.cwd}${/}-", "read,execute,write,delete";
29 | permission java.io.FilePermission "${junit4.tempDir}${/}*", "read,execute,write,delete";
30 | permission groovy.security.GroovyCodeSourcePermission "/groovy/script";
31 |
32 | // Allow connecting to the internet anywhere
33 | permission java.net.SocketPermission "*", "accept,listen,connect,resolve";
34 |
35 | // Basic permissions needed for Lucene / Elasticsearch to work:
36 | permission java.util.PropertyPermission "*", "read,write";
37 | permission java.lang.reflect.ReflectPermission "*";
38 | permission java.lang.RuntimePermission "*";
39 |
40 | // These two *have* to be spelled out a separate
41 | permission java.lang.management.ManagementPermission "control";
42 | permission java.lang.management.ManagementPermission "monitor";
43 |
44 | permission java.net.NetPermission "*";
45 | permission java.util.logging.LoggingPermission "control";
46 | permission javax.management.MBeanPermission "*", "*";
47 | permission javax.management.MBeanServerPermission "*";
48 | permission javax.management.MBeanTrustPermission "*";
49 |
50 | // Needed for some things in DNS caching in the JVM
51 | permission java.security.SecurityPermission "getProperty.networkaddress.cache.ttl";
52 | permission java.security.SecurityPermission "getProperty.networkaddress.cache.negative.ttl";
53 |
54 | };
55 |
--------------------------------------------------------------------------------
/dev-tools/upload-s3.py:
--------------------------------------------------------------------------------
1 | # Licensed to Elasticsearch under one or more contributor
2 | # license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright
4 | # ownership. Elasticsearch licenses this file to you under
5 | # the Apache License, Version 2.0 (the "License"); you may
6 | # not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on
13 | # an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
14 | # either express or implied. See the License for the specific
15 | # language governing permissions and limitations under the License.
16 |
17 | import os
18 | import sys
19 | import argparse
20 | try:
21 | import boto.s3
22 | except:
23 | raise RuntimeError("""
24 | S3 upload requires boto to be installed
25 | Use one of:
26 | 'pip install -U boto'
27 | 'apt-get install python-boto'
28 | 'easy_install boto'
29 | """)
30 |
31 |
32 | def list_buckets(conn):
33 | return conn.get_all_buckets()
34 |
35 |
36 | def upload_s3(conn, path, key, file, bucket):
37 | print('Uploading %s to Amazon S3 bucket %s/%s') % \
38 | (file, bucket, os.path.join(path, key))
39 | def percent_cb(complete, total):
40 | sys.stdout.write('.')
41 | sys.stdout.flush()
42 | bucket = conn.create_bucket(bucket)
43 | k = bucket.new_key(os.path.join(path, key))
44 | k.set_contents_from_filename(file, cb=percent_cb, num_cb=100)
45 |
46 |
47 | if __name__ == '__main__':
48 | parser = argparse.ArgumentParser(description='Uploads files to Amazon S3')
49 | parser.add_argument('--file', '-f', metavar='path to file',
50 | help='the branch to release from', required=True)
51 | parser.add_argument('--bucket', '-b', metavar='B42', default='download.elasticsearch.org',
52 | help='The S3 Bucket to upload to')
53 | parser.add_argument('--path', '-p', metavar='elasticsearch/elasticsearch', default='elasticsearch/elasticsearch',
54 | help='The key path to use')
55 | parser.add_argument('--key', '-k', metavar='key', default=None,
56 | help='The key - uses the file name as default key')
57 | args = parser.parse_args()
58 | if args.key:
59 | key = args.key
60 | else:
61 | key = os.path.basename(args.file)
62 |
63 | connection = boto.connect_s3()
64 | upload_s3(connection, args.path, key, args.file, args.bucket);
65 |
66 |
--------------------------------------------------------------------------------
/licenses/bcmail-jdk15on-1.52.jar.sha1:
--------------------------------------------------------------------------------
1 | 4995a870400e1554d1c7ed2afcb5d198fae12db9
2 |
--------------------------------------------------------------------------------
/licenses/bcmail-jdk15on-LICENSE.txt:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2000 - 2013 The Legion of the Bouncy Castle Inc.
4 | (http://www.bouncycastle.org)
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in
14 | all copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | THE SOFTWARE.
23 |
24 |
--------------------------------------------------------------------------------
/licenses/bcmail-jdk15on-NOTICE.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/elastic/elasticsearch-mapper-attachments/339bb68249fc2c25777c12ed4d56f2eca58a3ea7/licenses/bcmail-jdk15on-NOTICE.txt
--------------------------------------------------------------------------------
/licenses/bcpkix-jdk15on-1.52.jar.sha1:
--------------------------------------------------------------------------------
1 | b8ffac2bbc6626f86909589c8cc63637cc936504
2 |
--------------------------------------------------------------------------------
/licenses/bcpkix-jdk15on-LICENSE.txt:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2000 - 2013 The Legion of the Bouncy Castle Inc.
4 | (http://www.bouncycastle.org)
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in
14 | all copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | THE SOFTWARE.
23 |
24 |
--------------------------------------------------------------------------------
/licenses/bcpkix-jdk15on-NOTICE.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/elastic/elasticsearch-mapper-attachments/339bb68249fc2c25777c12ed4d56f2eca58a3ea7/licenses/bcpkix-jdk15on-NOTICE.txt
--------------------------------------------------------------------------------
/licenses/bcprov-jdk15on-1.52.jar.sha1:
--------------------------------------------------------------------------------
1 | 88a941faf9819d371e3174b5ed56a3f3f7d73269
2 |
--------------------------------------------------------------------------------
/licenses/bcprov-jdk15on-LICENSE.txt:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2000 - 2013 The Legion of the Bouncy Castle Inc.
4 | (http://www.bouncycastle.org)
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in
14 | all copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | THE SOFTWARE.
23 |
24 |
--------------------------------------------------------------------------------
/licenses/bcprov-jdk15on-NOTICE.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/elastic/elasticsearch-mapper-attachments/339bb68249fc2c25777c12ed4d56f2eca58a3ea7/licenses/bcprov-jdk15on-NOTICE.txt
--------------------------------------------------------------------------------
/licenses/commons-codec-1.9.jar.sha1:
--------------------------------------------------------------------------------
1 | 9ce04e34240f674bc72680f8b843b1457383161a
2 |
--------------------------------------------------------------------------------
/licenses/commons-codec-LICENSE.txt:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "[]"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright [yyyy] [name of copyright owner]
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
203 |
--------------------------------------------------------------------------------
/licenses/commons-codec-NOTICE.txt:
--------------------------------------------------------------------------------
1 | Apache Commons CLI
2 | Copyright 2001-2009 The Apache Software Foundation
3 |
4 | This product includes software developed by
5 | The Apache Software Foundation (http://www.apache.org/).
6 |
--------------------------------------------------------------------------------
/licenses/commons-compress-1.10.jar.sha1:
--------------------------------------------------------------------------------
1 | 5eeb27c57eece1faf2d837868aeccc94d84dcc9a
--------------------------------------------------------------------------------
/licenses/commons-compress-LICENSE.txt:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "[]"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright [yyyy] [name of copyright owner]
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
--------------------------------------------------------------------------------
/licenses/commons-compress-NOTICE.txt:
--------------------------------------------------------------------------------
1 | Apache Commons Compress
2 | Copyright 2002-2015 The Apache Software Foundation
3 |
4 | This product includes software developed at
5 | The Apache Software Foundation (http://www.apache.org/).
6 |
7 | The files in the package org.apache.commons.compress.archivers.sevenz
8 | were derived from the LZMA SDK, version 9.20 (C/ and CPP/7zip/),
9 | which has been placed in the public domain:
10 |
11 | "LZMA SDK is placed in the public domain." (http://www.7-zip.org/sdk.html)
12 |
--------------------------------------------------------------------------------
/licenses/commons-io-2.4.jar.sha1:
--------------------------------------------------------------------------------
1 | b1b6ea3b7e4aa4f492509a4952029cd8e48019ad
2 |
--------------------------------------------------------------------------------
/licenses/commons-io-LICENSE.txt:
--------------------------------------------------------------------------------
1 |
2 | Apache License
3 | Version 2.0, January 2004
4 | http://www.apache.org/licenses/
5 |
6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7 |
8 | 1. Definitions.
9 |
10 | "License" shall mean the terms and conditions for use, reproduction,
11 | and distribution as defined by Sections 1 through 9 of this document.
12 |
13 | "Licensor" shall mean the copyright owner or entity authorized by
14 | the copyright owner that is granting the License.
15 |
16 | "Legal Entity" shall mean the union of the acting entity and all
17 | other entities that control, are controlled by, or are under common
18 | control with that entity. For the purposes of this definition,
19 | "control" means (i) the power, direct or indirect, to cause the
20 | direction or management of such entity, whether by contract or
21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
22 | outstanding shares, or (iii) beneficial ownership of such entity.
23 |
24 | "You" (or "Your") shall mean an individual or Legal Entity
25 | exercising permissions granted by this License.
26 |
27 | "Source" form shall mean the preferred form for making modifications,
28 | including but not limited to software source code, documentation
29 | source, and configuration files.
30 |
31 | "Object" form shall mean any form resulting from mechanical
32 | transformation or translation of a Source form, including but
33 | not limited to compiled object code, generated documentation,
34 | and conversions to other media types.
35 |
36 | "Work" shall mean the work of authorship, whether in Source or
37 | Object form, made available under the License, as indicated by a
38 | copyright notice that is included in or attached to the work
39 | (an example is provided in the Appendix below).
40 |
41 | "Derivative Works" shall mean any work, whether in Source or Object
42 | form, that is based on (or derived from) the Work and for which the
43 | editorial revisions, annotations, elaborations, or other modifications
44 | represent, as a whole, an original work of authorship. For the purposes
45 | of this License, Derivative Works shall not include works that remain
46 | separable from, or merely link (or bind by name) to the interfaces of,
47 | the Work and Derivative Works thereof.
48 |
49 | "Contribution" shall mean any work of authorship, including
50 | the original version of the Work and any modifications or additions
51 | to that Work or Derivative Works thereof, that is intentionally
52 | submitted to Licensor for inclusion in the Work by the copyright owner
53 | or by an individual or Legal Entity authorized to submit on behalf of
54 | the copyright owner. For the purposes of this definition, "submitted"
55 | means any form of electronic, verbal, or written communication sent
56 | to the Licensor or its representatives, including but not limited to
57 | communication on electronic mailing lists, source code control systems,
58 | and issue tracking systems that are managed by, or on behalf of, the
59 | Licensor for the purpose of discussing and improving the Work, but
60 | excluding communication that is conspicuously marked or otherwise
61 | designated in writing by the copyright owner as "Not a Contribution."
62 |
63 | "Contributor" shall mean Licensor and any individual or Legal Entity
64 | on behalf of whom a Contribution has been received by Licensor and
65 | subsequently incorporated within the Work.
66 |
67 | 2. Grant of Copyright License. Subject to the terms and conditions of
68 | this License, each Contributor hereby grants to You a perpetual,
69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70 | copyright license to reproduce, prepare Derivative Works of,
71 | publicly display, publicly perform, sublicense, and distribute the
72 | Work and such Derivative Works in Source or Object form.
73 |
74 | 3. Grant of Patent License. Subject to the terms and conditions of
75 | this License, each Contributor hereby grants to You a perpetual,
76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77 | (except as stated in this section) patent license to make, have made,
78 | use, offer to sell, sell, import, and otherwise transfer the Work,
79 | where such license applies only to those patent claims licensable
80 | by such Contributor that are necessarily infringed by their
81 | Contribution(s) alone or by combination of their Contribution(s)
82 | with the Work to which such Contribution(s) was submitted. If You
83 | institute patent litigation against any entity (including a
84 | cross-claim or counterclaim in a lawsuit) alleging that the Work
85 | or a Contribution incorporated within the Work constitutes direct
86 | or contributory patent infringement, then any patent licenses
87 | granted to You under this License for that Work shall terminate
88 | as of the date such litigation is filed.
89 |
90 | 4. Redistribution. You may reproduce and distribute copies of the
91 | Work or Derivative Works thereof in any medium, with or without
92 | modifications, and in Source or Object form, provided that You
93 | meet the following conditions:
94 |
95 | (a) You must give any other recipients of the Work or
96 | Derivative Works a copy of this License; and
97 |
98 | (b) You must cause any modified files to carry prominent notices
99 | stating that You changed the files; and
100 |
101 | (c) You must retain, in the Source form of any Derivative Works
102 | that You distribute, all copyright, patent, trademark, and
103 | attribution notices from the Source form of the Work,
104 | excluding those notices that do not pertain to any part of
105 | the Derivative Works; and
106 |
107 | (d) If the Work includes a "NOTICE" text file as part of its
108 | distribution, then any Derivative Works that You distribute must
109 | include a readable copy of the attribution notices contained
110 | within such NOTICE file, excluding those notices that do not
111 | pertain to any part of the Derivative Works, in at least one
112 | of the following places: within a NOTICE text file distributed
113 | as part of the Derivative Works; within the Source form or
114 | documentation, if provided along with the Derivative Works; or,
115 | within a display generated by the Derivative Works, if and
116 | wherever such third-party notices normally appear. The contents
117 | of the NOTICE file are for informational purposes only and
118 | do not modify the License. You may add Your own attribution
119 | notices within Derivative Works that You distribute, alongside
120 | or as an addendum to the NOTICE text from the Work, provided
121 | that such additional attribution notices cannot be construed
122 | as modifying the License.
123 |
124 | You may add Your own copyright statement to Your modifications and
125 | may provide additional or different license terms and conditions
126 | for use, reproduction, or distribution of Your modifications, or
127 | for any such Derivative Works as a whole, provided Your use,
128 | reproduction, and distribution of the Work otherwise complies with
129 | the conditions stated in this License.
130 |
131 | 5. Submission of Contributions. Unless You explicitly state otherwise,
132 | any Contribution intentionally submitted for inclusion in the Work
133 | by You to the Licensor shall be under the terms and conditions of
134 | this License, without any additional terms or conditions.
135 | Notwithstanding the above, nothing herein shall supersede or modify
136 | the terms of any separate license agreement you may have executed
137 | with Licensor regarding such Contributions.
138 |
139 | 6. Trademarks. This License does not grant permission to use the trade
140 | names, trademarks, service marks, or product names of the Licensor,
141 | except as required for reasonable and customary use in describing the
142 | origin of the Work and reproducing the content of the NOTICE file.
143 |
144 | 7. Disclaimer of Warranty. Unless required by applicable law or
145 | agreed to in writing, Licensor provides the Work (and each
146 | Contributor provides its Contributions) on an "AS IS" BASIS,
147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148 | implied, including, without limitation, any warranties or conditions
149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150 | PARTICULAR PURPOSE. You are solely responsible for determining the
151 | appropriateness of using or redistributing the Work and assume any
152 | risks associated with Your exercise of permissions under this License.
153 |
154 | 8. Limitation of Liability. In no event and under no legal theory,
155 | whether in tort (including negligence), contract, or otherwise,
156 | unless required by applicable law (such as deliberate and grossly
157 | negligent acts) or agreed to in writing, shall any Contributor be
158 | liable to You for damages, including any direct, indirect, special,
159 | incidental, or consequential damages of any character arising as a
160 | result of this License or out of the use or inability to use the
161 | Work (including but not limited to damages for loss of goodwill,
162 | work stoppage, computer failure or malfunction, or any and all
163 | other commercial damages or losses), even if such Contributor
164 | has been advised of the possibility of such damages.
165 |
166 | 9. Accepting Warranty or Additional Liability. While redistributing
167 | the Work or Derivative Works thereof, You may choose to offer,
168 | and charge a fee for, acceptance of support, warranty, indemnity,
169 | or other liability obligations and/or rights consistent with this
170 | License. However, in accepting such obligations, You may act only
171 | on Your own behalf and on Your sole responsibility, not on behalf
172 | of any other Contributor, and only if You agree to indemnify,
173 | defend, and hold each Contributor harmless for any liability
174 | incurred by, or claims asserted against, such Contributor by reason
175 | of your accepting any such warranty or additional liability.
176 |
177 | END OF TERMS AND CONDITIONS
178 |
179 | APPENDIX: How to apply the Apache License to your work.
180 |
181 | To apply the Apache License to your work, attach the following
182 | boilerplate notice, with the fields enclosed by brackets "[]"
183 | replaced with your own identifying information. (Don't include
184 | the brackets!) The text should be enclosed in the appropriate
185 | comment syntax for the file format. We also recommend that a
186 | file or class name and description of purpose be included on the
187 | same "printed page" as the copyright notice for easier
188 | identification within third-party archives.
189 |
190 | Copyright [yyyy] [name of copyright owner]
191 |
192 | Licensed under the Apache License, Version 2.0 (the "License");
193 | you may not use this file except in compliance with the License.
194 | You may obtain a copy of the License at
195 |
196 | http://www.apache.org/licenses/LICENSE-2.0
197 |
198 | Unless required by applicable law or agreed to in writing, software
199 | distributed under the License is distributed on an "AS IS" BASIS,
200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201 | See the License for the specific language governing permissions and
202 | limitations under the License.
203 |
--------------------------------------------------------------------------------
/licenses/commons-io-NOTICE.txt:
--------------------------------------------------------------------------------
1 | Apache Commons IO
2 | Copyright 2002-2014 The Apache Software Foundation
3 |
4 | This product includes software developed at
5 | The Apache Software Foundation (http://www.apache.org/).
6 |
--------------------------------------------------------------------------------
/licenses/commons-logging-1.1.1.jar.sha1:
--------------------------------------------------------------------------------
1 | 5043bfebc3db072ed80fbd362e7caf00e885d8ae
--------------------------------------------------------------------------------
/licenses/commons-logging-LICENSE.txt:
--------------------------------------------------------------------------------
1 |
2 | Apache License
3 | Version 2.0, January 2004
4 | http://www.apache.org/licenses/
5 |
6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7 |
8 | 1. Definitions.
9 |
10 | "License" shall mean the terms and conditions for use, reproduction,
11 | and distribution as defined by Sections 1 through 9 of this document.
12 |
13 | "Licensor" shall mean the copyright owner or entity authorized by
14 | the copyright owner that is granting the License.
15 |
16 | "Legal Entity" shall mean the union of the acting entity and all
17 | other entities that control, are controlled by, or are under common
18 | control with that entity. For the purposes of this definition,
19 | "control" means (i) the power, direct or indirect, to cause the
20 | direction or management of such entity, whether by contract or
21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
22 | outstanding shares, or (iii) beneficial ownership of such entity.
23 |
24 | "You" (or "Your") shall mean an individual or Legal Entity
25 | exercising permissions granted by this License.
26 |
27 | "Source" form shall mean the preferred form for making modifications,
28 | including but not limited to software source code, documentation
29 | source, and configuration files.
30 |
31 | "Object" form shall mean any form resulting from mechanical
32 | transformation or translation of a Source form, including but
33 | not limited to compiled object code, generated documentation,
34 | and conversions to other media types.
35 |
36 | "Work" shall mean the work of authorship, whether in Source or
37 | Object form, made available under the License, as indicated by a
38 | copyright notice that is included in or attached to the work
39 | (an example is provided in the Appendix below).
40 |
41 | "Derivative Works" shall mean any work, whether in Source or Object
42 | form, that is based on (or derived from) the Work and for which the
43 | editorial revisions, annotations, elaborations, or other modifications
44 | represent, as a whole, an original work of authorship. For the purposes
45 | of this License, Derivative Works shall not include works that remain
46 | separable from, or merely link (or bind by name) to the interfaces of,
47 | the Work and Derivative Works thereof.
48 |
49 | "Contribution" shall mean any work of authorship, including
50 | the original version of the Work and any modifications or additions
51 | to that Work or Derivative Works thereof, that is intentionally
52 | submitted to Licensor for inclusion in the Work by the copyright owner
53 | or by an individual or Legal Entity authorized to submit on behalf of
54 | the copyright owner. For the purposes of this definition, "submitted"
55 | means any form of electronic, verbal, or written communication sent
56 | to the Licensor or its representatives, including but not limited to
57 | communication on electronic mailing lists, source code control systems,
58 | and issue tracking systems that are managed by, or on behalf of, the
59 | Licensor for the purpose of discussing and improving the Work, but
60 | excluding communication that is conspicuously marked or otherwise
61 | designated in writing by the copyright owner as "Not a Contribution."
62 |
63 | "Contributor" shall mean Licensor and any individual or Legal Entity
64 | on behalf of whom a Contribution has been received by Licensor and
65 | subsequently incorporated within the Work.
66 |
67 | 2. Grant of Copyright License. Subject to the terms and conditions of
68 | this License, each Contributor hereby grants to You a perpetual,
69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70 | copyright license to reproduce, prepare Derivative Works of,
71 | publicly display, publicly perform, sublicense, and distribute the
72 | Work and such Derivative Works in Source or Object form.
73 |
74 | 3. Grant of Patent License. Subject to the terms and conditions of
75 | this License, each Contributor hereby grants to You a perpetual,
76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77 | (except as stated in this section) patent license to make, have made,
78 | use, offer to sell, sell, import, and otherwise transfer the Work,
79 | where such license applies only to those patent claims licensable
80 | by such Contributor that are necessarily infringed by their
81 | Contribution(s) alone or by combination of their Contribution(s)
82 | with the Work to which such Contribution(s) was submitted. If You
83 | institute patent litigation against any entity (including a
84 | cross-claim or counterclaim in a lawsuit) alleging that the Work
85 | or a Contribution incorporated within the Work constitutes direct
86 | or contributory patent infringement, then any patent licenses
87 | granted to You under this License for that Work shall terminate
88 | as of the date such litigation is filed.
89 |
90 | 4. Redistribution. You may reproduce and distribute copies of the
91 | Work or Derivative Works thereof in any medium, with or without
92 | modifications, and in Source or Object form, provided that You
93 | meet the following conditions:
94 |
95 | (a) You must give any other recipients of the Work or
96 | Derivative Works a copy of this License; and
97 |
98 | (b) You must cause any modified files to carry prominent notices
99 | stating that You changed the files; and
100 |
101 | (c) You must retain, in the Source form of any Derivative Works
102 | that You distribute, all copyright, patent, trademark, and
103 | attribution notices from the Source form of the Work,
104 | excluding those notices that do not pertain to any part of
105 | the Derivative Works; and
106 |
107 | (d) If the Work includes a "NOTICE" text file as part of its
108 | distribution, then any Derivative Works that You distribute must
109 | include a readable copy of the attribution notices contained
110 | within such NOTICE file, excluding those notices that do not
111 | pertain to any part of the Derivative Works, in at least one
112 | of the following places: within a NOTICE text file distributed
113 | as part of the Derivative Works; within the Source form or
114 | documentation, if provided along with the Derivative Works; or,
115 | within a display generated by the Derivative Works, if and
116 | wherever such third-party notices normally appear. The contents
117 | of the NOTICE file are for informational purposes only and
118 | do not modify the License. You may add Your own attribution
119 | notices within Derivative Works that You distribute, alongside
120 | or as an addendum to the NOTICE text from the Work, provided
121 | that such additional attribution notices cannot be construed
122 | as modifying the License.
123 |
124 | You may add Your own copyright statement to Your modifications and
125 | may provide additional or different license terms and conditions
126 | for use, reproduction, or distribution of Your modifications, or
127 | for any such Derivative Works as a whole, provided Your use,
128 | reproduction, and distribution of the Work otherwise complies with
129 | the conditions stated in this License.
130 |
131 | 5. Submission of Contributions. Unless You explicitly state otherwise,
132 | any Contribution intentionally submitted for inclusion in the Work
133 | by You to the Licensor shall be under the terms and conditions of
134 | this License, without any additional terms or conditions.
135 | Notwithstanding the above, nothing herein shall supersede or modify
136 | the terms of any separate license agreement you may have executed
137 | with Licensor regarding such Contributions.
138 |
139 | 6. Trademarks. This License does not grant permission to use the trade
140 | names, trademarks, service marks, or product names of the Licensor,
141 | except as required for reasonable and customary use in describing the
142 | origin of the Work and reproducing the content of the NOTICE file.
143 |
144 | 7. Disclaimer of Warranty. Unless required by applicable law or
145 | agreed to in writing, Licensor provides the Work (and each
146 | Contributor provides its Contributions) on an "AS IS" BASIS,
147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148 | implied, including, without limitation, any warranties or conditions
149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150 | PARTICULAR PURPOSE. You are solely responsible for determining the
151 | appropriateness of using or redistributing the Work and assume any
152 | risks associated with Your exercise of permissions under this License.
153 |
154 | 8. Limitation of Liability. In no event and under no legal theory,
155 | whether in tort (including negligence), contract, or otherwise,
156 | unless required by applicable law (such as deliberate and grossly
157 | negligent acts) or agreed to in writing, shall any Contributor be
158 | liable to You for damages, including any direct, indirect, special,
159 | incidental, or consequential damages of any character arising as a
160 | result of this License or out of the use or inability to use the
161 | Work (including but not limited to damages for loss of goodwill,
162 | work stoppage, computer failure or malfunction, or any and all
163 | other commercial damages or losses), even if such Contributor
164 | has been advised of the possibility of such damages.
165 |
166 | 9. Accepting Warranty or Additional Liability. While redistributing
167 | the Work or Derivative Works thereof, You may choose to offer,
168 | and charge a fee for, acceptance of support, warranty, indemnity,
169 | or other liability obligations and/or rights consistent with this
170 | License. However, in accepting such obligations, You may act only
171 | on Your own behalf and on Your sole responsibility, not on behalf
172 | of any other Contributor, and only if You agree to indemnify,
173 | defend, and hold each Contributor harmless for any liability
174 | incurred by, or claims asserted against, such Contributor by reason
175 | of your accepting any such warranty or additional liability.
176 |
177 | END OF TERMS AND CONDITIONS
178 |
179 | APPENDIX: How to apply the Apache License to your work.
180 |
181 | To apply the Apache License to your work, attach the following
182 | boilerplate notice, with the fields enclosed by brackets "[]"
183 | replaced with your own identifying information. (Don't include
184 | the brackets!) The text should be enclosed in the appropriate
185 | comment syntax for the file format. We also recommend that a
186 | file or class name and description of purpose be included on the
187 | same "printed page" as the copyright notice for easier
188 | identification within third-party archives.
189 |
190 | Copyright [yyyy] [name of copyright owner]
191 |
192 | Licensed under the Apache License, Version 2.0 (the "License");
193 | you may not use this file except in compliance with the License.
194 | You may obtain a copy of the License at
195 |
196 | http://www.apache.org/licenses/LICENSE-2.0
197 |
198 | Unless required by applicable law or agreed to in writing, software
199 | distributed under the License is distributed on an "AS IS" BASIS,
200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201 | See the License for the specific language governing permissions and
202 | limitations under the License.
203 |
--------------------------------------------------------------------------------
/licenses/commons-logging-NOTICE.txt:
--------------------------------------------------------------------------------
1 | Apache Commons Logging
2 | Copyright 2003-2014 The Apache Software Foundation
3 |
4 | This product includes software developed at
5 | The Apache Software Foundation (http://www.apache.org/).
6 |
--------------------------------------------------------------------------------
/licenses/fontbox-1.8.10.jar.sha1:
--------------------------------------------------------------------------------
1 | 41776c7713e3f3a1ce688bd96459fc597298c340
2 |
--------------------------------------------------------------------------------
/licenses/fontbox-NOTICE.txt:
--------------------------------------------------------------------------------
1 | Apache PDFBox
2 | Copyright 2014 The Apache Software Foundation
3 |
4 | This product includes software developed at
5 | The Apache Software Foundation (http://www.apache.org/).
6 |
7 | Based on source code originally developed in the PDFBox and
8 | FontBox projects.
9 |
10 | Copyright (c) 2002-2007, www.pdfbox.org
11 |
12 | Based on source code originally developed in the PaDaF project.
13 | Copyright (c) 2010 Atos Worldline SAS
14 |
15 | Includes the Adobe Glyph List
16 | Copyright 1997, 1998, 2002, 2007, 2010 Adobe Systems Incorporated.
17 |
18 | Includes the Zapf Dingbats Glyph List
19 | Copyright 2002, 2010 Adobe Systems Incorporated.
20 |
21 | Includes OSXAdapter
22 | Copyright (C) 2003-2007 Apple, Inc., All Rights Reserved
23 |
--------------------------------------------------------------------------------
/licenses/jempbox-1.8.10.jar.sha1:
--------------------------------------------------------------------------------
1 | 40df4e4ca884aadc20b82d5abd0a3679774c55a6
2 |
--------------------------------------------------------------------------------
/licenses/jempbox-LICENSE.txt:
--------------------------------------------------------------------------------
1 | Copyright (c) 2006-2007, www.jempbox.org
2 | All rights reserved.
3 |
4 | Redistribution and use in source and binary forms, with or without
5 | modification, are permitted provided that the following conditions are met:
6 |
7 | 1. Redistributions of source code must retain the above copyright notice,
8 | this list of conditions and the following disclaimer.
9 | 2. Redistributions in binary form must reproduce the above copyright notice,
10 | this list of conditions and the following disclaimer in the documentation
11 | and/or other materials provided with the distribution.
12 | 3. Neither the name of fontbox; nor the names of its
13 | contributors may be used to endorse or promote products derived from this
14 | software without specific prior written permission.
15 |
16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
17 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 | DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
20 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
23 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 |
--------------------------------------------------------------------------------
/licenses/jempbox-NOTICE.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/elastic/elasticsearch-mapper-attachments/339bb68249fc2c25777c12ed4d56f2eca58a3ea7/licenses/jempbox-NOTICE.txt
--------------------------------------------------------------------------------
/licenses/juniversalchardet-1.0.3.jar.sha1:
--------------------------------------------------------------------------------
1 | cd49678784c46aa8789c060538e0154013bb421b
2 |
--------------------------------------------------------------------------------
/licenses/juniversalchardet-NOTICE.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/elastic/elasticsearch-mapper-attachments/339bb68249fc2c25777c12ed4d56f2eca58a3ea7/licenses/juniversalchardet-NOTICE.txt
--------------------------------------------------------------------------------
/licenses/pdfbox-1.8.10.jar.sha1:
--------------------------------------------------------------------------------
1 | bc5d1254495be36d0a3b3d6c35f88d05200b9311
2 |
--------------------------------------------------------------------------------
/licenses/pdfbox-NOTICE.txt:
--------------------------------------------------------------------------------
1 | Apache PDFBox
2 | Copyright 2014 The Apache Software Foundation
3 |
4 | This product includes software developed at
5 | The Apache Software Foundation (http://www.apache.org/).
6 |
7 | Based on source code originally developed in the PDFBox and
8 | FontBox projects.
9 |
10 | Copyright (c) 2002-2007, www.pdfbox.org
11 |
12 | Based on source code originally developed in the PaDaF project.
13 | Copyright (c) 2010 Atos Worldline SAS
14 |
15 | Includes the Adobe Glyph List
16 | Copyright 1997, 1998, 2002, 2007, 2010 Adobe Systems Incorporated.
17 |
18 | Includes the Zapf Dingbats Glyph List
19 | Copyright 2002, 2010 Adobe Systems Incorporated.
20 |
21 | Includes OSXAdapter
22 | Copyright (C) 2003-2007 Apple, Inc., All Rights Reserved
23 |
--------------------------------------------------------------------------------
/licenses/poi-3.13.jar.sha1:
--------------------------------------------------------------------------------
1 | 0f59f504ba8c521e61e25f417ec652fd485010f3
--------------------------------------------------------------------------------
/licenses/poi-NOTICE.txt:
--------------------------------------------------------------------------------
1 | Apache POI
2 | Copyright 2003-2015 The Apache Software Foundation
3 |
4 | This product includes software developed by
5 | The Apache Software Foundation (http://www.apache.org/).
6 |
7 | This product contains parts that were originally based on software from BEA.
8 | Copyright (c) 2000-2003, BEA Systems, .
9 |
10 | This product contains W3C XML Schema documents. Copyright 2001-2003 (c)
11 | World Wide Web Consortium (Massachusetts Institute of Technology, European
12 | Research Consortium for Informatics and Mathematics, Keio University)
13 |
14 | This product contains the Piccolo XML Parser for Java
15 | (http://piccolo.sourceforge.net/). Copyright 2002 Yuval Oren.
16 |
17 | This product contains the chunks_parse_cmds.tbl file from the vsdump program.
18 | Copyright (C) 2006-2007 Valek Filippov (frob@df.ru)
19 |
20 | This product contains parts of the eID Applet project
21 | (http://eid-applet.googlecode.com). Copyright (c) 2009-2014
22 | FedICT (federal ICT department of Belgium), e-Contract.be BVBA (https://www.e-contract.be),
23 | Bart Hanssens from FedICT
24 |
--------------------------------------------------------------------------------
/licenses/poi-ooxml-3.13.jar.sha1:
--------------------------------------------------------------------------------
1 | c364a8f5422d613e3a56db3b4b889f2989d7ee73
--------------------------------------------------------------------------------
/licenses/poi-ooxml-NOTICE.txt:
--------------------------------------------------------------------------------
1 | Apache POI
2 | Copyright 2003-2015 The Apache Software Foundation
3 |
4 | This product includes software developed by
5 | The Apache Software Foundation (http://www.apache.org/).
6 |
7 | This product contains parts that were originally based on software from BEA.
8 | Copyright (c) 2000-2003, BEA Systems, .
9 |
10 | This product contains W3C XML Schema documents. Copyright 2001-2003 (c)
11 | World Wide Web Consortium (Massachusetts Institute of Technology, European
12 | Research Consortium for Informatics and Mathematics, Keio University)
13 |
14 | This product contains the Piccolo XML Parser for Java
15 | (http://piccolo.sourceforge.net/). Copyright 2002 Yuval Oren.
16 |
17 | This product contains the chunks_parse_cmds.tbl file from the vsdump program.
18 | Copyright (C) 2006-2007 Valek Filippov (frob@df.ru)
19 |
20 | This product contains parts of the eID Applet project
21 | (http://eid-applet.googlecode.com). Copyright (c) 2009-2014
22 | FedICT (federal ICT department of Belgium), e-Contract.be BVBA (https://www.e-contract.be),
23 | Bart Hanssens from FedICT
24 |
--------------------------------------------------------------------------------
/licenses/poi-ooxml-schemas-3.13.jar.sha1:
--------------------------------------------------------------------------------
1 | 56fb0b9f3ffc3d7f7fc9b59e17b5fa2c3ab921e7
--------------------------------------------------------------------------------
/licenses/poi-ooxml-schemas-NOTICE.txt:
--------------------------------------------------------------------------------
1 | Apache POI
2 | Copyright 2003-2015 The Apache Software Foundation
3 |
4 | This product includes software developed by
5 | The Apache Software Foundation (http://www.apache.org/).
6 |
7 | This product contains parts that were originally based on software from BEA.
8 | Copyright (c) 2000-2003, BEA Systems, .
9 |
10 | This product contains W3C XML Schema documents. Copyright 2001-2003 (c)
11 | World Wide Web Consortium (Massachusetts Institute of Technology, European
12 | Research Consortium for Informatics and Mathematics, Keio University)
13 |
14 | This product contains the Piccolo XML Parser for Java
15 | (http://piccolo.sourceforge.net/). Copyright 2002 Yuval Oren.
16 |
17 | This product contains the chunks_parse_cmds.tbl file from the vsdump program.
18 | Copyright (C) 2006-2007 Valek Filippov (frob@df.ru)
19 |
20 | This product contains parts of the eID Applet project
21 | (http://eid-applet.googlecode.com). Copyright (c) 2009-2014
22 | FedICT (federal ICT department of Belgium), e-Contract.be BVBA (https://www.e-contract.be),
23 | Bart Hanssens from FedICT
24 |
--------------------------------------------------------------------------------
/licenses/poi-scratchpad-3.13.jar.sha1:
--------------------------------------------------------------------------------
1 | 09d763275e6c7fa05d47e2581606748669e88c55
--------------------------------------------------------------------------------
/licenses/poi-scratchpad-NOTICE.txt:
--------------------------------------------------------------------------------
1 | Apache POI
2 | Copyright 2003-2015 The Apache Software Foundation
3 |
4 | This product includes software developed by
5 | The Apache Software Foundation (http://www.apache.org/).
6 |
7 | This product contains parts that were originally based on software from BEA.
8 | Copyright (c) 2000-2003, BEA Systems, .
9 |
10 | This product contains W3C XML Schema documents. Copyright 2001-2003 (c)
11 | World Wide Web Consortium (Massachusetts Institute of Technology, European
12 | Research Consortium for Informatics and Mathematics, Keio University)
13 |
14 | This product contains the Piccolo XML Parser for Java
15 | (http://piccolo.sourceforge.net/). Copyright 2002 Yuval Oren.
16 |
17 | This product contains the chunks_parse_cmds.tbl file from the vsdump program.
18 | Copyright (C) 2006-2007 Valek Filippov (frob@df.ru)
19 |
20 | This product contains parts of the eID Applet project
21 | (http://eid-applet.googlecode.com). Copyright (c) 2009-2014
22 | FedICT (federal ICT department of Belgium), e-Contract.be BVBA (https://www.e-contract.be),
23 | Bart Hanssens from FedICT
24 |
--------------------------------------------------------------------------------
/licenses/stax-api-1.0.1.jar.sha1:
--------------------------------------------------------------------------------
1 | 49c100caf72d658aca8e58bd74a4ba90fa2b0d70
--------------------------------------------------------------------------------
/licenses/stax-api-LICENSE.txt:
--------------------------------------------------------------------------------
1 |
2 | Apache License
3 | Version 2.0, January 2004
4 | http://www.apache.org/licenses/
5 |
6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7 |
8 | 1. Definitions.
9 |
10 | "License" shall mean the terms and conditions for use, reproduction,
11 | and distribution as defined by Sections 1 through 9 of this document.
12 |
13 | "Licensor" shall mean the copyright owner or entity authorized by
14 | the copyright owner that is granting the License.
15 |
16 | "Legal Entity" shall mean the union of the acting entity and all
17 | other entities that control, are controlled by, or are under common
18 | control with that entity. For the purposes of this definition,
19 | "control" means (i) the power, direct or indirect, to cause the
20 | direction or management of such entity, whether by contract or
21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
22 | outstanding shares, or (iii) beneficial ownership of such entity.
23 |
24 | "You" (or "Your") shall mean an individual or Legal Entity
25 | exercising permissions granted by this License.
26 |
27 | "Source" form shall mean the preferred form for making modifications,
28 | including but not limited to software source code, documentation
29 | source, and configuration files.
30 |
31 | "Object" form shall mean any form resulting from mechanical
32 | transformation or translation of a Source form, including but
33 | not limited to compiled object code, generated documentation,
34 | and conversions to other media types.
35 |
36 | "Work" shall mean the work of authorship, whether in Source or
37 | Object form, made available under the License, as indicated by a
38 | copyright notice that is included in or attached to the work
39 | (an example is provided in the Appendix below).
40 |
41 | "Derivative Works" shall mean any work, whether in Source or Object
42 | form, that is based on (or derived from) the Work and for which the
43 | editorial revisions, annotations, elaborations, or other modifications
44 | represent, as a whole, an original work of authorship. For the purposes
45 | of this License, Derivative Works shall not include works that remain
46 | separable from, or merely link (or bind by name) to the interfaces of,
47 | the Work and Derivative Works thereof.
48 |
49 | "Contribution" shall mean any work of authorship, including
50 | the original version of the Work and any modifications or additions
51 | to that Work or Derivative Works thereof, that is intentionally
52 | submitted to Licensor for inclusion in the Work by the copyright owner
53 | or by an individual or Legal Entity authorized to submit on behalf of
54 | the copyright owner. For the purposes of this definition, "submitted"
55 | means any form of electronic, verbal, or written communication sent
56 | to the Licensor or its representatives, including but not limited to
57 | communication on electronic mailing lists, source code control systems,
58 | and issue tracking systems that are managed by, or on behalf of, the
59 | Licensor for the purpose of discussing and improving the Work, but
60 | excluding communication that is conspicuously marked or otherwise
61 | designated in writing by the copyright owner as "Not a Contribution."
62 |
63 | "Contributor" shall mean Licensor and any individual or Legal Entity
64 | on behalf of whom a Contribution has been received by Licensor and
65 | subsequently incorporated within the Work.
66 |
67 | 2. Grant of Copyright License. Subject to the terms and conditions of
68 | this License, each Contributor hereby grants to You a perpetual,
69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70 | copyright license to reproduce, prepare Derivative Works of,
71 | publicly display, publicly perform, sublicense, and distribute the
72 | Work and such Derivative Works in Source or Object form.
73 |
74 | 3. Grant of Patent License. Subject to the terms and conditions of
75 | this License, each Contributor hereby grants to You a perpetual,
76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77 | (except as stated in this section) patent license to make, have made,
78 | use, offer to sell, sell, import, and otherwise transfer the Work,
79 | where such license applies only to those patent claims licensable
80 | by such Contributor that are necessarily infringed by their
81 | Contribution(s) alone or by combination of their Contribution(s)
82 | with the Work to which such Contribution(s) was submitted. If You
83 | institute patent litigation against any entity (including a
84 | cross-claim or counterclaim in a lawsuit) alleging that the Work
85 | or a Contribution incorporated within the Work constitutes direct
86 | or contributory patent infringement, then any patent licenses
87 | granted to You under this License for that Work shall terminate
88 | as of the date such litigation is filed.
89 |
90 | 4. Redistribution. You may reproduce and distribute copies of the
91 | Work or Derivative Works thereof in any medium, with or without
92 | modifications, and in Source or Object form, provided that You
93 | meet the following conditions:
94 |
95 | (a) You must give any other recipients of the Work or
96 | Derivative Works a copy of this License; and
97 |
98 | (b) You must cause any modified files to carry prominent notices
99 | stating that You changed the files; and
100 |
101 | (c) You must retain, in the Source form of any Derivative Works
102 | that You distribute, all copyright, patent, trademark, and
103 | attribution notices from the Source form of the Work,
104 | excluding those notices that do not pertain to any part of
105 | the Derivative Works; and
106 |
107 | (d) If the Work includes a "NOTICE" text file as part of its
108 | distribution, then any Derivative Works that You distribute must
109 | include a readable copy of the attribution notices contained
110 | within such NOTICE file, excluding those notices that do not
111 | pertain to any part of the Derivative Works, in at least one
112 | of the following places: within a NOTICE text file distributed
113 | as part of the Derivative Works; within the Source form or
114 | documentation, if provided along with the Derivative Works; or,
115 | within a display generated by the Derivative Works, if and
116 | wherever such third-party notices normally appear. The contents
117 | of the NOTICE file are for informational purposes only and
118 | do not modify the License. You may add Your own attribution
119 | notices within Derivative Works that You distribute, alongside
120 | or as an addendum to the NOTICE text from the Work, provided
121 | that such additional attribution notices cannot be construed
122 | as modifying the License.
123 |
124 | You may add Your own copyright statement to Your modifications and
125 | may provide additional or different license terms and conditions
126 | for use, reproduction, or distribution of Your modifications, or
127 | for any such Derivative Works as a whole, provided Your use,
128 | reproduction, and distribution of the Work otherwise complies with
129 | the conditions stated in this License.
130 |
131 | 5. Submission of Contributions. Unless You explicitly state otherwise,
132 | any Contribution intentionally submitted for inclusion in the Work
133 | by You to the Licensor shall be under the terms and conditions of
134 | this License, without any additional terms or conditions.
135 | Notwithstanding the above, nothing herein shall supersede or modify
136 | the terms of any separate license agreement you may have executed
137 | with Licensor regarding such Contributions.
138 |
139 | 6. Trademarks. This License does not grant permission to use the trade
140 | names, trademarks, service marks, or product names of the Licensor,
141 | except as required for reasonable and customary use in describing the
142 | origin of the Work and reproducing the content of the NOTICE file.
143 |
144 | 7. Disclaimer of Warranty. Unless required by applicable law or
145 | agreed to in writing, Licensor provides the Work (and each
146 | Contributor provides its Contributions) on an "AS IS" BASIS,
147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148 | implied, including, without limitation, any warranties or conditions
149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150 | PARTICULAR PURPOSE. You are solely responsible for determining the
151 | appropriateness of using or redistributing the Work and assume any
152 | risks associated with Your exercise of permissions under this License.
153 |
154 | 8. Limitation of Liability. In no event and under no legal theory,
155 | whether in tort (including negligence), contract, or otherwise,
156 | unless required by applicable law (such as deliberate and grossly
157 | negligent acts) or agreed to in writing, shall any Contributor be
158 | liable to You for damages, including any direct, indirect, special,
159 | incidental, or consequential damages of any character arising as a
160 | result of this License or out of the use or inability to use the
161 | Work (including but not limited to damages for loss of goodwill,
162 | work stoppage, computer failure or malfunction, or any and all
163 | other commercial damages or losses), even if such Contributor
164 | has been advised of the possibility of such damages.
165 |
166 | 9. Accepting Warranty or Additional Liability. While redistributing
167 | the Work or Derivative Works thereof, You may choose to offer,
168 | and charge a fee for, acceptance of support, warranty, indemnity,
169 | or other liability obligations and/or rights consistent with this
170 | License. However, in accepting such obligations, You may act only
171 | on Your own behalf and on Your sole responsibility, not on behalf
172 | of any other Contributor, and only if You agree to indemnify,
173 | defend, and hold each Contributor harmless for any liability
174 | incurred by, or claims asserted against, such Contributor by reason
175 | of your accepting any such warranty or additional liability.
176 |
177 | END OF TERMS AND CONDITIONS
178 |
179 | APPENDIX: How to apply the Apache License to your work.
180 |
181 | To apply the Apache License to your work, attach the following
182 | boilerplate notice, with the fields enclosed by brackets "[]"
183 | replaced with your own identifying information. (Don't include
184 | the brackets!) The text should be enclosed in the appropriate
185 | comment syntax for the file format. We also recommend that a
186 | file or class name and description of purpose be included on the
187 | same "printed page" as the copyright notice for easier
188 | identification within third-party archives.
189 |
190 | Copyright [yyyy] [name of copyright owner]
191 |
192 | Licensed under the Apache License, Version 2.0 (the "License");
193 | you may not use this file except in compliance with the License.
194 | You may obtain a copy of the License at
195 |
196 | http://www.apache.org/licenses/LICENSE-2.0
197 |
198 | Unless required by applicable law or agreed to in writing, software
199 | distributed under the License is distributed on an "AS IS" BASIS,
200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201 | See the License for the specific language governing permissions and
202 | limitations under the License.
203 |
--------------------------------------------------------------------------------
/licenses/stax-api-NOTICE.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/elastic/elasticsearch-mapper-attachments/339bb68249fc2c25777c12ed4d56f2eca58a3ea7/licenses/stax-api-NOTICE.txt
--------------------------------------------------------------------------------
/licenses/tagsoup-1.2.1.jar.sha1:
--------------------------------------------------------------------------------
1 | 5584627487e984c03456266d3f8802eb85a9ce97
2 |
--------------------------------------------------------------------------------
/licenses/tagsoup-LICENSE.txt:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "[]"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright [yyyy] [name of copyright owner]
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
--------------------------------------------------------------------------------
/licenses/tagsoup-NOTICE.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/elastic/elasticsearch-mapper-attachments/339bb68249fc2c25777c12ed4d56f2eca58a3ea7/licenses/tagsoup-NOTICE.txt
--------------------------------------------------------------------------------
/licenses/tika-core-1.11.jar.sha1:
--------------------------------------------------------------------------------
1 | d37a6b9080c8361e47b2050f69833fd61501ede9
--------------------------------------------------------------------------------
/licenses/tika-core-NOTICE.txt:
--------------------------------------------------------------------------------
1 | Apache Tika
2 | Copyright 2015 The Apache Software Foundation
3 |
4 | This product includes software developed at
5 | The Apache Software Foundation (http://www.apache.org/).
6 |
7 | Copyright 1993-2010 University Corporation for Atmospheric Research/Unidata
8 | This software contains code derived from UCAR/Unidata's NetCDF library.
9 |
10 | Tika-server component uses CDDL-licensed dependencies: jersey (http://jersey.java.net/) and
11 | Grizzly (http://grizzly.java.net/)
12 |
13 | Tika-parsers component uses CDDL/LGPL dual-licensed dependency: jhighlight (https://github.com/codelibs/jhighlight)
14 |
15 | OpenCSV: Copyright 2005 Bytecode Pty Ltd. Licensed under the Apache License, Version 2.0
16 |
17 | IPTC Photo Metadata descriptions Copyright 2010 International Press Telecommunications Council.
18 |
--------------------------------------------------------------------------------
/licenses/tika-parsers-1.11.jar.sha1:
--------------------------------------------------------------------------------
1 | 355dc05d842ed223fc682da472229473ba706d68
--------------------------------------------------------------------------------
/licenses/tika-parsers-NOTICE.txt:
--------------------------------------------------------------------------------
1 | Apache Tika
2 | Copyright 2015 The Apache Software Foundation
3 |
4 | This product includes software developed at
5 | The Apache Software Foundation (http://www.apache.org/).
6 |
7 | Copyright 1993-2010 University Corporation for Atmospheric Research/Unidata
8 | This software contains code derived from UCAR/Unidata's NetCDF library.
9 |
10 | Tika-server component uses CDDL-licensed dependencies: jersey (http://jersey.java.net/) and
11 | Grizzly (http://grizzly.java.net/)
12 |
13 | Tika-parsers component uses CDDL/LGPL dual-licensed dependency: jhighlight (https://github.com/codelibs/jhighlight)
14 |
15 | OpenCSV: Copyright 2005 Bytecode Pty Ltd. Licensed under the Apache License, Version 2.0
16 |
17 | IPTC Photo Metadata descriptions Copyright 2010 International Press Telecommunications Council.
18 |
--------------------------------------------------------------------------------
/licenses/xmlbeans-2.6.0.jar.sha1:
--------------------------------------------------------------------------------
1 | 29e80d2dd51f9dcdef8f9ffaee0d4dc1c9bbfc87
2 |
--------------------------------------------------------------------------------
/licenses/xmlbeans-LICENSE.txt:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "[]"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright [yyyy] [name of copyright owner]
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
--------------------------------------------------------------------------------
/licenses/xmlbeans-NOTICE.txt:
--------------------------------------------------------------------------------
1 | =========================================================================
2 | == NOTICE file corresponding to section 4(d) of the Apache License, ==
3 | == Version 2.0, in this case for the Apache XmlBeans distribution. ==
4 | =========================================================================
5 |
6 | This product includes software developed by
7 | The Apache Software Foundation (http://www.apache.org/).
8 |
9 | Portions of this software were originally based on the following:
10 | - software copyright (c) 2000-2003, BEA Systems, .
11 |
12 | Aside from contributions to the Apache XMLBeans project, this
13 | software also includes:
14 |
15 | - one or more source files from the Apache Xerces-J and Apache Axis
16 | products, Copyright (c) 1999-2003 Apache Software Foundation
17 |
18 | - W3C XML Schema documents Copyright 2001-2003 (c) World Wide Web
19 | Consortium (Massachusetts Institute of Technology, European Research
20 | Consortium for Informatics and Mathematics, Keio University)
21 |
22 | - resolver.jar from Apache Xml Commons project,
23 | Copyright (c) 2001-2003 Apache Software Foundation
24 |
25 | - Piccolo XML Parser for Java from http://piccolo.sourceforge.net/,
26 | Copyright 2002 Yuval Oren under the terms of the Apache Software License 2.0
27 |
28 | - JSR-173 Streaming API for XML from http://sourceforge.net/projects/xmlpullparser/,
29 | Copyright 2005 BEA under the terms of the Apache Software License 2.0
30 |
--------------------------------------------------------------------------------
/src/main/java/org/elasticsearch/mapper/attachments/MapperAttachmentsPlugin.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to Elasticsearch under one or more contributor
3 | * license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright
5 | * ownership. Elasticsearch licenses this file to you under
6 | * the Apache License, Version 2.0 (the "License"); you may
7 | * not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | package org.elasticsearch.mapper.attachments;
21 |
22 | import org.elasticsearch.index.IndexService;
23 | import org.elasticsearch.plugins.Plugin;
24 |
25 | public class MapperAttachmentsPlugin extends Plugin {
26 |
27 | @Override
28 | public String name() {
29 | return "mapper-attachments";
30 | }
31 |
32 | @Override
33 | public String description() {
34 | return "Adds the attachment type allowing to parse difference attachment formats";
35 | }
36 |
37 | @Override
38 | public void onIndexService(IndexService indexService) {
39 | indexService.mapperService().documentMapperParser().putTypeParser("attachment", new AttachmentMapper.TypeParser());
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/src/main/java/org/elasticsearch/mapper/attachments/TikaImpl.java:
--------------------------------------------------------------------------------
1 | package org.elasticsearch.mapper.attachments;
2 |
3 | import java.io.IOException;
4 | import java.security.AccessController;
5 | import java.security.PrivilegedActionException;
6 | import java.security.PrivilegedExceptionAction;
7 |
8 | import org.apache.tika.Tika;
9 | import org.apache.tika.exception.TikaException;
10 | import org.apache.tika.metadata.Metadata;
11 | import org.apache.tika.parser.AutoDetectParser;
12 | import org.apache.tika.parser.Parser;
13 | import org.elasticsearch.SpecialPermission;
14 | import org.elasticsearch.common.io.stream.StreamInput;
15 |
16 | /** do NOT make public */
17 | final class TikaImpl {
18 |
19 | /** subset of parsers for types we support */
20 | private static final Parser PARSERS[] = new Parser[] {
21 | // documents
22 | new org.apache.tika.parser.html.HtmlParser(),
23 | new org.apache.tika.parser.rtf.RTFParser(),
24 | new org.apache.tika.parser.pdf.PDFParser(),
25 | new org.apache.tika.parser.txt.TXTParser(),
26 | new org.apache.tika.parser.microsoft.OfficeParser(),
27 | new org.apache.tika.parser.microsoft.OldExcelParser(),
28 | new org.apache.tika.parser.microsoft.ooxml.OOXMLParser(),
29 | new org.apache.tika.parser.odf.OpenDocumentParser(),
30 | new org.apache.tika.parser.iwork.IWorkPackageParser(),
31 | new org.apache.tika.parser.xml.DcXMLParser(),
32 | };
33 |
34 | /** autodetector based on this subset */
35 | private static final AutoDetectParser PARSER_INSTANCE = new AutoDetectParser(PARSERS);
36 |
37 | /** singleton tika instance */
38 | private static final Tika TIKA_INSTANCE = new Tika(PARSER_INSTANCE.getDetector(), PARSER_INSTANCE);
39 |
40 | /**
41 | * parses with tika, throwing any exception hit while parsing the document
42 | */
43 | // only package private for testing!
44 | static String parse(final byte content[], final Metadata metadata, final int limit) throws TikaException, IOException {
45 | // check that its not unprivileged code like a script
46 | SecurityManager sm = System.getSecurityManager();
47 | if (sm != null) {
48 | sm.checkPermission(new SpecialPermission());
49 | }
50 |
51 | try {
52 | return AccessController.doPrivileged(new PrivilegedExceptionAction() {
53 | @Override
54 | public String run() throws TikaException, IOException {
55 | return TIKA_INSTANCE.parseToString(StreamInput.wrap(content), metadata, limit);
56 | }
57 | });
58 | } catch (PrivilegedActionException e) {
59 | // checked exception from tika: unbox it
60 | Throwable cause = e.getCause();
61 | if (cause instanceof TikaException) {
62 | throw (TikaException) cause;
63 | } else if (cause instanceof IOException) {
64 | throw (IOException) cause;
65 | } else {
66 | throw new AssertionError(cause);
67 | }
68 | }
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/src/main/plugin-metadata/plugin-security.policy:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to Elasticsearch under one or more contributor
3 | * license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright
5 | * ownership. Elasticsearch licenses this file to you under
6 | * the Apache License, Version 2.0 (the "License"); you may
7 | * not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | grant {
21 | // TODO: fix tika not to actually install bouncy castle like this
22 | permission java.security.SecurityPermission "putProviderProperty.BC";
23 | permission java.security.SecurityPermission "insertProvider";
24 | // TODO: fix POI XWPF to not do this: https://bz.apache.org/bugzilla/show_bug.cgi?id=58597
25 | permission java.lang.reflect.ReflectPermission "suppressAccessChecks";
26 | };
27 |
--------------------------------------------------------------------------------
/src/test/java/org/elasticsearch/mapper/attachments/AttachmentUnitTestCase.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to Elasticsearch under one or more contributor
3 | * license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright
5 | * ownership. Elasticsearch licenses this file to you under
6 | * the Apache License, Version 2.0 (the "License"); you may
7 | * not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | package org.elasticsearch.mapper.attachments;
21 |
22 | import org.elasticsearch.Version;
23 | import org.elasticsearch.cluster.metadata.IndexMetaData;
24 | import org.elasticsearch.common.settings.Settings;
25 | import org.elasticsearch.test.ESTestCase;
26 | import org.junit.Before;
27 |
28 | public class AttachmentUnitTestCase extends ESTestCase {
29 |
30 | protected Settings testSettings;
31 |
32 | @Before
33 | public void createSettings() throws Exception {
34 | testSettings = Settings.builder()
35 | .put("path.home", createTempDir())
36 | .put(IndexMetaData.SETTING_VERSION_CREATED, Version.CURRENT.id)
37 | .build();
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/src/test/java/org/elasticsearch/mapper/attachments/DateAttachmentMapperTests.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to Elasticsearch under one or more contributor
3 | * license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright
5 | * ownership. Elasticsearch licenses this file to you under
6 | * the Apache License, Version 2.0 (the "License"); you may
7 | * not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | package org.elasticsearch.mapper.attachments;
21 |
22 | import org.elasticsearch.common.settings.Settings;
23 | import org.elasticsearch.index.mapper.DocumentMapper;
24 | import org.elasticsearch.index.mapper.DocumentMapperParser;
25 | import org.elasticsearch.index.mapper.core.StringFieldMapper;
26 | import org.elasticsearch.mapper.attachments.AttachmentMapper;
27 | import org.junit.Before;
28 |
29 | import static org.elasticsearch.test.StreamsUtils.copyToStringFromClasspath;
30 | import static org.hamcrest.Matchers.instanceOf;
31 |
32 | /**
33 | *
34 | */
35 | public class DateAttachmentMapperTests extends AttachmentUnitTestCase {
36 |
37 | private DocumentMapperParser mapperParser;
38 |
39 | @Before
40 | public void setupMapperParser() throws Exception {
41 | mapperParser = MapperTestUtils.newMapperService(createTempDir(), Settings.EMPTY).documentMapperParser();
42 | mapperParser.putTypeParser(AttachmentMapper.CONTENT_TYPE, new AttachmentMapper.TypeParser());
43 | }
44 |
45 | public void testSimpleMappings() throws Exception {
46 | String mapping = copyToStringFromClasspath("/org/elasticsearch/index/mapper/attachment/test/unit/date/date-mapping.json");
47 | DocumentMapper docMapper = mapperParser.parse(mapping);
48 |
49 | // Our mapping should be kept as a String
50 | assertThat(docMapper.mappers().getMapper("file.date"), instanceOf(StringFieldMapper.class));
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/src/test/java/org/elasticsearch/mapper/attachments/EncryptedDocMapperTests.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to Elasticsearch under one or more contributor
3 | * license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright
5 | * ownership. Elasticsearch licenses this file to you under
6 | * the Apache License, Version 2.0 (the "License"); you may
7 | * not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | package org.elasticsearch.mapper.attachments;
21 |
22 | import org.elasticsearch.common.bytes.BytesReference;
23 | import org.elasticsearch.common.settings.Settings;
24 | import org.elasticsearch.index.mapper.DocumentMapper;
25 | import org.elasticsearch.index.mapper.DocumentMapperParser;
26 | import org.elasticsearch.index.mapper.MapperParsingException;
27 | import org.elasticsearch.index.mapper.ParseContext;
28 | import org.elasticsearch.mapper.attachments.AttachmentMapper;
29 |
30 | import java.io.IOException;
31 |
32 | import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
33 | import static org.elasticsearch.test.StreamsUtils.copyToBytesFromClasspath;
34 | import static org.elasticsearch.test.StreamsUtils.copyToStringFromClasspath;
35 | import static org.hamcrest.Matchers.*;
36 |
37 | /**
38 | * Test for https://github.com/elasticsearch/elasticsearch-mapper-attachments/issues/18
39 | * Note that we have converted /org/elasticsearch/index/mapper/xcontent/testContentLength.txt
40 | * to a /org/elasticsearch/index/mapper/xcontent/encrypted.pdf with password `12345678`.
41 | */
42 | public class EncryptedDocMapperTests extends AttachmentUnitTestCase {
43 |
44 | public void testMultipleDocsEncryptedLast() throws IOException {
45 | DocumentMapperParser mapperParser = MapperTestUtils.newMapperService(createTempDir(), Settings.EMPTY).documentMapperParser();
46 | mapperParser.putTypeParser(AttachmentMapper.CONTENT_TYPE, new AttachmentMapper.TypeParser());
47 |
48 | String mapping = copyToStringFromClasspath("/org/elasticsearch/index/mapper/attachment/test/unit/encrypted/test-mapping.json");
49 | DocumentMapper docMapper = mapperParser.parse(mapping);
50 | byte[] html = copyToBytesFromClasspath("/org/elasticsearch/index/mapper/attachment/test/sample-files/htmlWithValidDateMeta.html");
51 | byte[] pdf = copyToBytesFromClasspath("/org/elasticsearch/index/mapper/attachment/test/sample-files/encrypted.pdf");
52 |
53 | BytesReference json = jsonBuilder()
54 | .startObject()
55 | .field("file1", html)
56 | .field("file2", pdf)
57 | .endObject().bytes();
58 |
59 | ParseContext.Document doc = docMapper.parse("person", "person", "1", json).rootDoc();
60 | assertThat(doc.get(docMapper.mappers().getMapper("file1.content").fieldType().names().indexName()), containsString("World"));
61 | assertThat(doc.get(docMapper.mappers().getMapper("file1.title").fieldType().names().indexName()), equalTo("Hello"));
62 | assertThat(doc.get(docMapper.mappers().getMapper("file1.author").fieldType().names().indexName()), equalTo("kimchy"));
63 | assertThat(doc.get(docMapper.mappers().getMapper("file1.keywords").fieldType().names().indexName()), equalTo("elasticsearch,cool,bonsai"));
64 | assertThat(doc.get(docMapper.mappers().getMapper("file1.content_type").fieldType().names().indexName()), equalTo("text/html; charset=ISO-8859-1"));
65 | assertThat(doc.getField(docMapper.mappers().getMapper("file1.content_length").fieldType().names().indexName()).numericValue().longValue(), is(344L));
66 |
67 | assertThat(doc.get(docMapper.mappers().getMapper("file2").fieldType().names().indexName()), nullValue());
68 | assertThat(doc.get(docMapper.mappers().getMapper("file2.title").fieldType().names().indexName()), nullValue());
69 | assertThat(doc.get(docMapper.mappers().getMapper("file2.author").fieldType().names().indexName()), nullValue());
70 | assertThat(doc.get(docMapper.mappers().getMapper("file2.keywords").fieldType().names().indexName()), nullValue());
71 | assertThat(doc.get(docMapper.mappers().getMapper("file2.content_type").fieldType().names().indexName()), nullValue());
72 | assertThat(doc.getField(docMapper.mappers().getMapper("file2.content_length").fieldType().names().indexName()), nullValue());
73 | }
74 |
75 | public void testMultipleDocsEncryptedFirst() throws IOException {
76 | DocumentMapperParser mapperParser = MapperTestUtils.newMapperService(createTempDir(), Settings.EMPTY).documentMapperParser();
77 | mapperParser.putTypeParser(AttachmentMapper.CONTENT_TYPE, new AttachmentMapper.TypeParser());
78 |
79 | String mapping = copyToStringFromClasspath("/org/elasticsearch/index/mapper/attachment/test/unit/encrypted/test-mapping.json");
80 | DocumentMapper docMapper = mapperParser.parse(mapping);
81 | byte[] html = copyToBytesFromClasspath("/org/elasticsearch/index/mapper/attachment/test/sample-files/htmlWithValidDateMeta.html");
82 | byte[] pdf = copyToBytesFromClasspath("/org/elasticsearch/index/mapper/attachment/test/sample-files/encrypted.pdf");
83 |
84 | BytesReference json = jsonBuilder()
85 | .startObject()
86 | .field("file1", pdf)
87 | .field("file2", html)
88 | .endObject().bytes();
89 |
90 | ParseContext.Document doc = docMapper.parse("person", "person", "1", json).rootDoc();
91 | assertThat(doc.get(docMapper.mappers().getMapper("file1").fieldType().names().indexName()), nullValue());
92 | assertThat(doc.get(docMapper.mappers().getMapper("file1.title").fieldType().names().indexName()), nullValue());
93 | assertThat(doc.get(docMapper.mappers().getMapper("file1.author").fieldType().names().indexName()), nullValue());
94 | assertThat(doc.get(docMapper.mappers().getMapper("file1.keywords").fieldType().names().indexName()), nullValue());
95 | assertThat(doc.get(docMapper.mappers().getMapper("file1.content_type").fieldType().names().indexName()), nullValue());
96 | assertThat(doc.getField(docMapper.mappers().getMapper("file1.content_length").fieldType().names().indexName()), nullValue());
97 |
98 | assertThat(doc.get(docMapper.mappers().getMapper("file2.content").fieldType().names().indexName()), containsString("World"));
99 | assertThat(doc.get(docMapper.mappers().getMapper("file2.title").fieldType().names().indexName()), equalTo("Hello"));
100 | assertThat(doc.get(docMapper.mappers().getMapper("file2.author").fieldType().names().indexName()), equalTo("kimchy"));
101 | assertThat(doc.get(docMapper.mappers().getMapper("file2.keywords").fieldType().names().indexName()), equalTo("elasticsearch,cool,bonsai"));
102 | assertThat(doc.get(docMapper.mappers().getMapper("file2.content_type").fieldType().names().indexName()), equalTo("text/html; charset=ISO-8859-1"));
103 | assertThat(doc.getField(docMapper.mappers().getMapper("file2.content_length").fieldType().names().indexName()).numericValue().longValue(), is(344L));
104 | }
105 |
106 | public void testMultipleDocsEncryptedNotIgnoringErrors() throws IOException {
107 | try {
108 | DocumentMapperParser mapperParser = MapperTestUtils.newMapperService(createTempDir(),
109 | Settings.builder()
110 | .put("index.mapping.attachment.ignore_errors", false)
111 | .build()).documentMapperParser();
112 | mapperParser.putTypeParser(AttachmentMapper.CONTENT_TYPE, new AttachmentMapper.TypeParser());
113 |
114 | String mapping = copyToStringFromClasspath("/org/elasticsearch/index/mapper/attachment/test/unit/encrypted/test-mapping.json");
115 | DocumentMapper docMapper = mapperParser.parse(mapping);
116 | byte[] html = copyToBytesFromClasspath("/org/elasticsearch/index/mapper/attachment/test/sample-files/htmlWithValidDateMeta.html");
117 | byte[] pdf = copyToBytesFromClasspath("/org/elasticsearch/index/mapper/attachment/test/sample-files/encrypted.pdf");
118 |
119 | BytesReference json = jsonBuilder()
120 | .startObject()
121 | .field("file1", pdf)
122 | .field("file2", html)
123 | .endObject().bytes();
124 |
125 | docMapper.parse("person", "person", "1", json);
126 | fail("Expected doc parsing exception");
127 | } catch (MapperParsingException e) {
128 | if (e.getMessage() == null || e.getMessage().contains("is encrypted") == false) {
129 | // wrong exception
130 | throw e;
131 | }
132 | }
133 | }
134 |
135 | }
136 |
--------------------------------------------------------------------------------
/src/test/java/org/elasticsearch/mapper/attachments/LanguageDetectionAttachmentMapperTests.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to Elasticsearch under one or more contributor
3 | * license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright
5 | * ownership. Elasticsearch licenses this file to you under
6 | * the Apache License, Version 2.0 (the "License"); you may
7 | * not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | package org.elasticsearch.mapper.attachments;
21 |
22 | import org.elasticsearch.common.settings.Settings;
23 | import org.elasticsearch.common.xcontent.XContentBuilder;
24 | import org.elasticsearch.index.mapper.DocumentMapper;
25 | import org.elasticsearch.index.mapper.DocumentMapperParser;
26 | import org.elasticsearch.index.mapper.ParseContext;
27 | import org.elasticsearch.index.mapper.core.StringFieldMapper;
28 | import org.elasticsearch.mapper.attachments.AttachmentMapper;
29 | import org.junit.Before;
30 |
31 | import java.io.IOException;
32 |
33 | import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
34 | import static org.elasticsearch.test.StreamsUtils.copyToBytesFromClasspath;
35 | import static org.elasticsearch.test.StreamsUtils.copyToStringFromClasspath;
36 | import static org.hamcrest.Matchers.equalTo;
37 | import static org.hamcrest.Matchers.instanceOf;
38 |
39 | /**
40 | *
41 | */
42 | public class LanguageDetectionAttachmentMapperTests extends AttachmentUnitTestCase {
43 |
44 | private DocumentMapper docMapper;
45 |
46 | @Before
47 | public void setupMapperParser() throws IOException {
48 | setupMapperParser(true);
49 | }
50 |
51 | public void setupMapperParser(boolean langDetect) throws IOException {
52 | DocumentMapperParser mapperParser = MapperTestUtils.newMapperService(createTempDir(),
53 | Settings.settingsBuilder()
54 | .put("index.mapping.attachment.detect_language", langDetect)
55 | .build()).documentMapperParser();
56 | mapperParser.putTypeParser(AttachmentMapper.CONTENT_TYPE, new AttachmentMapper.TypeParser());
57 | String mapping = copyToStringFromClasspath("/org/elasticsearch/index/mapper/attachment/test/unit/language/language-mapping.json");
58 | docMapper = mapperParser.parse(mapping);
59 |
60 | assertThat(docMapper.mappers().getMapper("file.language"), instanceOf(StringFieldMapper.class));
61 | }
62 |
63 | private void testLanguage(String filename, String expected, String... forcedLanguage) throws IOException {
64 | byte[] html = copyToBytesFromClasspath("/org/elasticsearch/index/mapper/attachment/test/sample-files/" + filename);
65 |
66 | XContentBuilder xcb = jsonBuilder()
67 | .startObject()
68 | .startObject("file")
69 | .field("_name", filename)
70 | .field("_content", html);
71 |
72 | if (forcedLanguage.length > 0) {
73 | xcb.field("_language", forcedLanguage[0]);
74 | }
75 |
76 | xcb.endObject().endObject();
77 |
78 | ParseContext.Document doc = docMapper.parse("person", "person", "1", xcb.bytes()).rootDoc();
79 |
80 | // Our mapping should be kept as a String
81 | assertThat(doc.get(docMapper.mappers().getMapper("file.language").fieldType().names().indexName()), equalTo(expected));
82 | }
83 |
84 | public void testFrDetection() throws Exception {
85 | testLanguage("text-in-french.txt", "fr");
86 | }
87 |
88 | public void testEnDetection() throws Exception {
89 | testLanguage("text-in-english.txt", "en");
90 | }
91 |
92 | public void testFrForced() throws Exception {
93 | testLanguage("text-in-english.txt", "fr", "fr");
94 | }
95 |
96 | /**
97 | * This test gives strange results! detection of ":-)" gives "lt" as a result
98 | */
99 | public void testNoLanguage() throws Exception {
100 | testLanguage("text-in-nolang.txt", "lt");
101 | }
102 |
103 | public void testLangDetectDisabled() throws Exception {
104 | // We replace the mapper with another one which have index.mapping.attachment.detect_language = false
105 | setupMapperParser(false);
106 | testLanguage("text-in-english.txt", null);
107 | }
108 |
109 | public void testLangDetectDocumentEnabled() throws Exception {
110 | // We replace the mapper with another one which have index.mapping.attachment.detect_language = false
111 | setupMapperParser(false);
112 |
113 | byte[] html = copyToBytesFromClasspath("/org/elasticsearch/index/mapper/attachment/test/sample-files/text-in-english.txt");
114 |
115 | XContentBuilder xcb = jsonBuilder()
116 | .startObject()
117 | .startObject("file")
118 | .field("_name", "text-in-english.txt")
119 | .field("_content", html)
120 | .field("_detect_language", true)
121 | .endObject().endObject();
122 |
123 | ParseContext.Document doc = docMapper.parse("person", "person", "1", xcb.bytes()).rootDoc();
124 |
125 | // Our mapping should be kept as a String
126 | assertThat(doc.get(docMapper.mappers().getMapper("file.language").fieldType().names().indexName()), equalTo("en"));
127 | }
128 | }
129 |
--------------------------------------------------------------------------------
/src/test/java/org/elasticsearch/mapper/attachments/MapperAttachmentsRestIT.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to Elasticsearch under one or more contributor
3 | * license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright
5 | * ownership. Elasticsearch licenses this file to you under
6 | * the Apache License, Version 2.0 (the "License"); you may
7 | * not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | package org.elasticsearch.mapper.attachments;
21 |
22 | import com.carrotsearch.randomizedtesting.annotations.Name;
23 | import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
24 | import org.elasticsearch.common.settings.Settings;
25 | import org.elasticsearch.mapper.attachments.MapperAttachmentsPlugin;
26 | import org.elasticsearch.test.rest.ESRestTestCase;
27 | import org.elasticsearch.test.rest.RestTestCandidate;
28 | import org.elasticsearch.test.rest.parser.RestTestParseException;
29 |
30 | import java.io.IOException;
31 |
32 | public class MapperAttachmentsRestIT extends ESRestTestCase {
33 |
34 | @Override
35 | protected Settings nodeSettings(int nodeOrdinal) {
36 | return Settings.builder()
37 | .put(super.nodeSettings(nodeOrdinal))
38 | .put("plugin.types", MapperAttachmentsPlugin.class.getName())
39 | .build();
40 | }
41 |
42 | public MapperAttachmentsRestIT(@Name("yaml") RestTestCandidate testCandidate) {
43 | super(testCandidate);
44 | }
45 |
46 | @ParametersFactory
47 | public static Iterable