Full Code of ngageoint/elasticgeo for AI

master 91c2a99ccea6 cached
99 files
707.0 KB
161.7k tokens
908 symbols
1 requests
Download .txt
Showing preview only (751K chars total). Download the full file or copy to clipboard to get everything.
Repository: ngageoint/elasticgeo
Branch: master
Commit: 91c2a99ccea6
Files: 99
Total size: 707.0 KB

Directory structure:
gitextract_d1ek5of1/

├── .gitignore
├── .travis.yml
├── LICENSE
├── README.md
├── gs-web-elasticsearch/
│   ├── LICENSE
│   ├── doc/
│   │   └── index.rst
│   ├── pom.xml
│   └── src/
│       ├── assembly/
│       │   └── dist.xml
│       └── main/
│           ├── java/
│           │   ├── applicationContext.xml
│           │   └── mil/
│           │       └── nga/
│           │           └── giat/
│           │               └── elasticsearch/
│           │                   ├── ElasticAttributeProvider.java
│           │                   ├── ElasticConfigurationPage.html
│           │                   ├── ElasticConfigurationPage.java
│           │                   ├── ElasticConfigurationPanel.html
│           │                   ├── ElasticConfigurationPanel.java
│           │                   ├── ElasticConfigurationPanelInfo.java
│           │                   ├── ElasticFeatureTypeCallback.java
│           │                   ├── ElasticXStreamInitializer.java
│           │                   └── ElasticXStreamPersisterInitializer.java
│           └── resources/
│               └── GeoServerApplication.properties
├── gt-elasticsearch/
│   ├── LGPL
│   ├── LICENSE
│   ├── pom.xml
│   └── src/
│       ├── main/
│       │   ├── java/
│       │   │   └── mil/
│       │   │       └── nga/
│       │   │           └── giat/
│       │   │               └── data/
│       │   │                   └── elasticsearch/
│       │   │                       ├── ElasticAggregation.java
│       │   │                       ├── ElasticAttribute.java
│       │   │                       ├── ElasticCapabilities.java
│       │   │                       ├── ElasticClient.java
│       │   │                       ├── ElasticConstants.java
│       │   │                       ├── ElasticDataStore.java
│       │   │                       ├── ElasticDataStoreFactory.java
│       │   │                       ├── ElasticFeatureReader.java
│       │   │                       ├── ElasticFeatureReaderScroll.java
│       │   │                       ├── ElasticFeatureSource.java
│       │   │                       ├── ElasticFeatureTypeBuilder.java
│       │   │                       ├── ElasticHit.java
│       │   │                       ├── ElasticLayerConfiguration.java
│       │   │                       ├── ElasticMappings.java
│       │   │                       ├── ElasticParserUtil.java
│       │   │                       ├── ElasticRequest.java
│       │   │                       ├── ElasticResponse.java
│       │   │                       ├── ElasticResults.java
│       │   │                       ├── FilterToElastic.java
│       │   │                       ├── FilterToElasticException.java
│       │   │                       ├── FilterToElasticHelper.java
│       │   │                       ├── GeohashUtil.java
│       │   │                       ├── RestElasticClient.java
│       │   │                       └── TotalDeserializer.java
│       │   └── resources/
│       │       └── META-INF/
│       │           └── services/
│       │               └── org.geotools.data.DataStoreFactorySpi
│       └── test/
│           ├── java/
│           │   └── mil/
│           │       └── nga/
│           │           └── giat/
│           │               └── data/
│           │                   └── elasticsearch/
│           │                       ├── ElasticAggregationReaderTest.java
│           │                       ├── ElasticAttributeTest.java
│           │                       ├── ElasticDataStoreFinderIT.java
│           │                       ├── ElasticDataStoreIT.java
│           │                       ├── ElasticDatastoreFactoryTest.java
│           │                       ├── ElasticFeatureFilterIT.java
│           │                       ├── ElasticFilterTest.java
│           │                       ├── ElasticGeometryFilterIT.java
│           │                       ├── ElasticParserUtilTest.java
│           │                       ├── ElasticResponseTest.java
│           │                       ├── ElasticTemporalFilterIT.java
│           │                       ├── ElasticTestSupport.java
│           │                       ├── ElasticViewParametersFilterIT.java
│           │                       ├── GeohashUtilTest.java
│           │                       ├── RandomGeometryBuilder.java
│           │                       └── RestElasticClientTest.java
│           └── resources/
│               ├── README.md
│               ├── active_mappings.json
│               ├── active_mappings_legacy.json
│               ├── active_mappings_ng.json
│               ├── log4j.properties
│               ├── logging.properties
│               ├── mockito-extensions/
│               │   └── org.mockito.plugins.MockMaker
│               ├── requirements.txt
│               ├── test_index.py
│               └── wifiAccessPoint.json
├── gt-elasticsearch-process/
│   ├── LGPL
│   ├── LICENSE
│   ├── pom.xml
│   └── src/
│       ├── main/
│       │   ├── java/
│       │   │   └── mil/
│       │   │       └── nga/
│       │   │           └── giat/
│       │   │               └── process/
│       │   │                   └── elasticsearch/
│       │   │                       ├── BBOXRemovingFilterVisitor.java
│       │   │                       ├── BasicGeoHashGrid.java
│       │   │                       ├── GeoHashGrid.java
│       │   │                       ├── GeoHashGridProcess.java
│       │   │                       ├── GridCell.java
│       │   │                       ├── GridCoverageUtil.java
│       │   │                       ├── MetricGeoHashGrid.java
│       │   │                       ├── NestedAggGeoHashGrid.java
│       │   │                       └── RasterScale.java
│       │   └── resources/
│       │       └── META-INF/
│       │           └── services/
│       │               ├── org.geotools.process.ProcessFactory
│       │               └── org.geotools.process.vector.VectorProcess
│       └── test/
│           └── java/
│               └── mil/
│                   └── nga/
│                       └── giat/
│                           └── process/
│                               └── elasticsearch/
│                                   ├── GeoHashGridProcessTest.java
│                                   ├── GeoHashGridTest.java
│                                   ├── GridCoverageUtilTest.java
│                                   ├── MetricGeoHashGridTest.java
│                                   ├── NestedAggGeoHashGridTest.java
│                                   ├── RasterScaleTest.java
│                                   └── TestUtil.java
├── joda-shaded/
│   ├── LICENSE.txt
│   ├── NOTICE.txt
│   ├── pom.xml
│   └── src/
│       └── main/
│           └── java/
│               └── org/
│                   └── elasticsearch/
│                       └── common/
│                           └── Strings.java
└── pom.xml

================================================
FILE CONTENTS
================================================

================================================
FILE: .gitignore
================================================
**target/
**.settings/
**.project
**.classpath
*.prefs
*.log
*.iml
**idea/


================================================
FILE: .travis.yml
================================================
sudo: true
services:
- docker
language: java
jdk:
- openjdk8
env:
  matrix:
  - GEOTOOLS_VERSION='22.0' GEOSERVER_VERSION='2.16.0' ES_VERSION='7.4.0'
  - GEOTOOLS_VERSION='22.0' GEOSERVER_VERSION='2.16.0' ES_VERSION='6.8.3'
  - GEOTOOLS_VERSION='22.0' GEOSERVER_VERSION='2.16.0' ES_VERSION='5.6.16'
  - GEOTOOLS_VERSION='22.0' GEOSERVER_VERSION='2.16.0' ES_VERSION='2.4.5' ARGS='-Ddocker.image=elasticsearch'
  - GEOTOOLS_VERSION='21.3' GEOSERVER_VERSION='2.15.3' ES_VERSION='7.4.0'
  - GEOTOOLS_VERSION='21.3' GEOSERVER_VERSION='2.15.3' ES_VERSION='6.8.3'
  - GEOTOOLS_VERSION='21.3' GEOSERVER_VERSION='2.15.3' ES_VERSION='5.6.16'
  - GEOTOOLS_VERSION='21.3' GEOSERVER_VERSION='2.15.3' ES_VERSION='2.4.5' ARGS='-Ddocker.image=elasticsearch'
cache:
  directories:
  - "$HOME/.m2"
install:
- mvn --version
- travis_retry mvn install -DskipTests=true -Dskip.integration.tests=true -B -Dgeotools.version=${GEOTOOLS_VERSION} -Dgeoserver.version=${GEOSERVER_VERSION} -Des.test.version=${ES_VERSION} ${ARGS}
script:
- sudo sysctl -w vm.max_map_count=262144
- travis_retry mvn verify -Dgeotools.version=${GEOTOOLS_VERSION} -Dgeoserver.version=${GEOSERVER_VERSION} -Des.test.version=${ES_VERSION} ${ARGS}
after_success:
- mvn coveralls:report
before_deploy:
  - mvn assembly:assembly -pl gs-web-elasticsearch
  - export PLUGIN_FILE="$(ls gs-web-elasticsearch/target/elasticgeo*.zip)";
  - echo "Deploying $PLUGIN_FILE to GitHub releases"
deploy:
  provider: releases
  api_key:
    secure: UiMZusRpTSbs3BQWZxououT1VPj8LzUN4UYH8H+PcPdEEZfx/lDNCxlaj1YG8eVCflJL1TItPdU8jIEU435weP4v3cnSyUjq/3Oc4ey9CK/iuphoqvkqfCgRxpVsj9wuZkJqLobi9+9JFLz6NziCnX9ME5WxRgMPlfRU2jot/GM=
  file_glob: true
  skip_cleanup: true
  file: "$PLUGIN_FILE"
  on:
    tags: true


================================================
FILE: LICENSE
================================================
GNU GENERAL PUBLIC LICENSE
                       Version 3, 29 June 2007

 Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.

                            Preamble

  The GNU General Public License is a free, copyleft license for
software and other kinds of works.

  The licenses for most software and other practical works are designed
to take away your freedom to share and change the works.  By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.  We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors.  You can apply it to
your programs, too.

  When we speak of free software, we are referring to freedom, not
price.  Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.

  To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights.  Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.

  For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received.  You must make sure that they, too, receive
or can get the source code.  And you must show them these terms so they
know their rights.

  Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.

  For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software.  For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.

  Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so.  This is fundamentally incompatible with the aim of
protecting users' freedom to change the software.  The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable.  Therefore, we
have designed this version of the GPL to prohibit the practice for those
products.  If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.

  Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary.  To prevent this, the GPL assures that
patents cannot be used to render the program non-free.

  The precise terms and conditions for copying, distribution and
modification follow.

                       TERMS AND CONDITIONS

  0. Definitions.

  "This License" refers to version 3 of the GNU General Public License.

  "Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.

  "The Program" refers to any copyrightable work licensed under this
License.  Each licensee is addressed as "you".  "Licensees" and
"recipients" may be individuals or organizations.

  To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy.  The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.

  A "covered work" means either the unmodified Program or a work based
on the Program.

  To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy.  Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.

  To "convey" a work means any kind of propagation that enables other
parties to make or receive copies.  Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.

  An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License.  If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.

  1. Source Code.

  The "source code" for a work means the preferred form of the work
for making modifications to it.  "Object code" means any non-source
form of a work.

  A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.

  The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form.  A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.

  The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities.  However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work.  For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.

  The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.

  The Corresponding Source for a work in source code form is that
same work.

  2. Basic Permissions.

  All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met.  This License explicitly affirms your unlimited
permission to run the unmodified Program.  The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work.  This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.

  You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force.  You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright.  Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.

  Conveying under any other circumstances is permitted solely under
the conditions stated below.  Sublicensing is not allowed; section 10
makes it unnecessary.

  3. Protecting Users' Legal Rights From Anti-Circumvention Law.

  No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.

  When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.

  4. Conveying Verbatim Copies.

  You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.

  You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.

  5. Conveying Modified Source Versions.

  You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:

    a) The work must carry prominent notices stating that you modified
    it, and giving a relevant date.

    b) The work must carry prominent notices stating that it is
    released under this License and any conditions added under section
    7.  This requirement modifies the requirement in section 4 to
    "keep intact all notices".

    c) You must license the entire work, as a whole, under this
    License to anyone who comes into possession of a copy.  This
    License will therefore apply, along with any applicable section 7
    additional terms, to the whole of the work, and all its parts,
    regardless of how they are packaged.  This License gives no
    permission to license the work in any other way, but it does not
    invalidate such permission if you have separately received it.

    d) If the work has interactive user interfaces, each must display
    Appropriate Legal Notices; however, if the Program has interactive
    interfaces that do not display Appropriate Legal Notices, your
    work need not make them do so.

  A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit.  Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.

  6. Conveying Non-Source Forms.

  You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:

    a) Convey the object code in, or embodied in, a physical product
    (including a physical distribution medium), accompanied by the
    Corresponding Source fixed on a durable physical medium
    customarily used for software interchange.

    b) Convey the object code in, or embodied in, a physical product
    (including a physical distribution medium), accompanied by a
    written offer, valid for at least three years and valid for as
    long as you offer spare parts or customer support for that product
    model, to give anyone who possesses the object code either (1) a
    copy of the Corresponding Source for all the software in the
    product that is covered by this License, on a durable physical
    medium customarily used for software interchange, for a price no
    more than your reasonable cost of physically performing this
    conveying of source, or (2) access to copy the
    Corresponding Source from a network server at no charge.

    c) Convey individual copies of the object code with a copy of the
    written offer to provide the Corresponding Source.  This
    alternative is allowed only occasionally and noncommercially, and
    only if you received the object code with such an offer, in accord
    with subsection 6b.

    d) Convey the object code by offering access from a designated
    place (gratis or for a charge), and offer equivalent access to the
    Corresponding Source in the same way through the same place at no
    further charge.  You need not require recipients to copy the
    Corresponding Source along with the object code.  If the place to
    copy the object code is a network server, the Corresponding Source
    may be on a different server (operated by you or a third party)
    that supports equivalent copying facilities, provided you maintain
    clear directions next to the object code saying where to find the
    Corresponding Source.  Regardless of what server hosts the
    Corresponding Source, you remain obligated to ensure that it is
    available for as long as needed to satisfy these requirements.

    e) Convey the object code using peer-to-peer transmission, provided
    you inform other peers where the object code and Corresponding
    Source of the work are being offered to the general public at no
    charge under subsection 6d.

  A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.

  A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling.  In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage.  For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product.  A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.

  "Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source.  The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.

  If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information.  But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).

  The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed.  Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.

  Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.

  7. Additional Terms.

  "Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law.  If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.

  When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it.  (Additional permissions may be written to require their own
removal in certain cases when you modify the work.)  You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.

  Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:

    a) Disclaiming warranty or limiting liability differently from the
    terms of sections 15 and 16 of this License; or

    b) Requiring preservation of specified reasonable legal notices or
    author attributions in that material or in the Appropriate Legal
    Notices displayed by works containing it; or

    c) Prohibiting misrepresentation of the origin of that material, or
    requiring that modified versions of such material be marked in
    reasonable ways as different from the original version; or

    d) Limiting the use for publicity purposes of names of licensors or
    authors of the material; or

    e) Declining to grant rights under trademark law for use of some
    trade names, trademarks, or service marks; or

    f) Requiring indemnification of licensors and authors of that
    material by anyone who conveys the material (or modified versions of
    it) with contractual assumptions of liability to the recipient, for
    any liability that these contractual assumptions directly impose on
    those licensors and authors.

  All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10.  If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term.  If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.

  If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.

  Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.

  8. Termination.

  You may not propagate or modify a covered work except as expressly
provided under this License.  Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).

  However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.

  Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.

  Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License.  If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.

  9. Acceptance Not Required for Having Copies.

  You are not required to accept this License in order to receive or
run a copy of the Program.  Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance.  However,
nothing other than this License grants you permission to propagate or
modify any covered work.  These actions infringe copyright if you do
not accept this License.  Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.

  10. Automatic Licensing of Downstream Recipients.

  Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License.  You are not responsible
for enforcing compliance by third parties with this License.

  An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations.  If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.

  You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License.  For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.

  11. Patents.

  A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based.  The
work thus licensed is called the contributor's "contributor version".

  A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version.  For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.

  Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.

  In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement).  To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.

  If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients.  "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.

  If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.

  A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License.  You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.

  Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.

  12. No Surrender of Others' Freedom.

  If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License.  If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all.  For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.

  13. Use with the GNU Affero General Public License.

  Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work.  The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.

  14. Revised Versions of this License.

  The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time.  Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.

  Each version is given a distinguishing version number.  If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation.  If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.

  If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.

  Later license versions may give you additional or different
permissions.  However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.

  15. Disclaimer of Warranty.

  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

  16. Limitation of Liability.

  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.

  17. Interpretation of Sections 15 and 16.

  If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.

                     END OF TERMS AND CONDITIONS

            How to Apply These Terms to Your New Programs

  If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.

  To do so, attach the following notices to the program.  It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

    {one line to give the program's name and a brief idea of what it does.}
    Copyright (C) {year}  {name of author}

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.

Also add information on how to contact you by electronic and paper mail.

  If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:

    {project}  Copyright (C) {year}  {fullname}
    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
    This is free software, and you are welcome to redistribute it
    under certain conditions; type `show c' for details.

The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License.  Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".

  You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.

  The GNU General Public License does not permit incorporating your program
into proprietary programs.  If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library.  If this is what you want to do, use the GNU Lesser General
Public License instead of this License.  But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.



================================================
FILE: README.md
================================================
# ElasticGeo

<a href="https://travis-ci.org/ngageoint/elasticgeo">
	<img alt="Travis-CI test status" 
	     src="https://travis-ci.org/ngageoint/elasticgeo.svg?branch=master"/>
</a>
<br/>
<a href='https://coveralls.io/r/ngageoint/?branch=master'>
  <img src='https://coveralls.io/repos/ngageoint/elasticgeo/badge.png?branch=master'
       alt='Coverage Status' />
</a>

ElasticGeo provides a GeoTools data store that allows geospatial features from an Elasticsearch index to be published via OGC services using GeoServer.  

### Pull Request

If you'd like to contribute to this project, please make a pull request. We'll review the pull request and discuss the changes. All pull request contributions to this project will be released under the appropriate license conditions discussed below. 

Software source code previously released under an open source license and then modified by NGA staff is considered a "joint work" (see 17 USC 101); it is partially copyrighted, partially public domain, and as a whole is protected by the copyrights of the non-government authors and must be released according to the terms of the original open source license.

### Project relies upon:

GeoTools under [LGPL v 2.1](http://geotools.org/about.html)

GeoServer under [GPL v 2 with later option](http://geoserver.org/license/) 

ElasticGeo under [LGPL v 2.1](https://github.com/matsjg/elasticgeo)

Elasticsearch under [Apache License v 2.0](https://github.com/elastic/elasticsearch/blob/master/LICENSE.txt) 

### Documentation

[Read more](gs-web-elasticsearch/doc/index.rst)




================================================
FILE: gs-web-elasticsearch/LICENSE
================================================
GNU GENERAL PUBLIC LICENSE
                       Version 3, 29 June 2007

 Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.

                            Preamble

  The GNU General Public License is a free, copyleft license for
software and other kinds of works.

  The licenses for most software and other practical works are designed
to take away your freedom to share and change the works.  By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.  We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors.  You can apply it to
your programs, too.

  When we speak of free software, we are referring to freedom, not
price.  Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.

  To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights.  Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.

  For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received.  You must make sure that they, too, receive
or can get the source code.  And you must show them these terms so they
know their rights.

  Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.

  For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software.  For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.

  Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so.  This is fundamentally incompatible with the aim of
protecting users' freedom to change the software.  The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable.  Therefore, we
have designed this version of the GPL to prohibit the practice for those
products.  If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.

  Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary.  To prevent this, the GPL assures that
patents cannot be used to render the program non-free.

  The precise terms and conditions for copying, distribution and
modification follow.

                       TERMS AND CONDITIONS

  0. Definitions.

  "This License" refers to version 3 of the GNU General Public License.

  "Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.

  "The Program" refers to any copyrightable work licensed under this
License.  Each licensee is addressed as "you".  "Licensees" and
"recipients" may be individuals or organizations.

  To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy.  The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.

  A "covered work" means either the unmodified Program or a work based
on the Program.

  To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy.  Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.

  To "convey" a work means any kind of propagation that enables other
parties to make or receive copies.  Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.

  An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License.  If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.

  1. Source Code.

  The "source code" for a work means the preferred form of the work
for making modifications to it.  "Object code" means any non-source
form of a work.

  A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.

  The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form.  A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.

  The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities.  However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work.  For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.

  The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.

  The Corresponding Source for a work in source code form is that
same work.

  2. Basic Permissions.

  All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met.  This License explicitly affirms your unlimited
permission to run the unmodified Program.  The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work.  This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.

  You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force.  You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright.  Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.

  Conveying under any other circumstances is permitted solely under
the conditions stated below.  Sublicensing is not allowed; section 10
makes it unnecessary.

  3. Protecting Users' Legal Rights From Anti-Circumvention Law.

  No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.

  When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.

  4. Conveying Verbatim Copies.

  You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.

  You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.

  5. Conveying Modified Source Versions.

  You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:

    a) The work must carry prominent notices stating that you modified
    it, and giving a relevant date.

    b) The work must carry prominent notices stating that it is
    released under this License and any conditions added under section
    7.  This requirement modifies the requirement in section 4 to
    "keep intact all notices".

    c) You must license the entire work, as a whole, under this
    License to anyone who comes into possession of a copy.  This
    License will therefore apply, along with any applicable section 7
    additional terms, to the whole of the work, and all its parts,
    regardless of how they are packaged.  This License gives no
    permission to license the work in any other way, but it does not
    invalidate such permission if you have separately received it.

    d) If the work has interactive user interfaces, each must display
    Appropriate Legal Notices; however, if the Program has interactive
    interfaces that do not display Appropriate Legal Notices, your
    work need not make them do so.

  A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit.  Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.

  6. Conveying Non-Source Forms.

  You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:

    a) Convey the object code in, or embodied in, a physical product
    (including a physical distribution medium), accompanied by the
    Corresponding Source fixed on a durable physical medium
    customarily used for software interchange.

    b) Convey the object code in, or embodied in, a physical product
    (including a physical distribution medium), accompanied by a
    written offer, valid for at least three years and valid for as
    long as you offer spare parts or customer support for that product
    model, to give anyone who possesses the object code either (1) a
    copy of the Corresponding Source for all the software in the
    product that is covered by this License, on a durable physical
    medium customarily used for software interchange, for a price no
    more than your reasonable cost of physically performing this
    conveying of source, or (2) access to copy the
    Corresponding Source from a network server at no charge.

    c) Convey individual copies of the object code with a copy of the
    written offer to provide the Corresponding Source.  This
    alternative is allowed only occasionally and noncommercially, and
    only if you received the object code with such an offer, in accord
    with subsection 6b.

    d) Convey the object code by offering access from a designated
    place (gratis or for a charge), and offer equivalent access to the
    Corresponding Source in the same way through the same place at no
    further charge.  You need not require recipients to copy the
    Corresponding Source along with the object code.  If the place to
    copy the object code is a network server, the Corresponding Source
    may be on a different server (operated by you or a third party)
    that supports equivalent copying facilities, provided you maintain
    clear directions next to the object code saying where to find the
    Corresponding Source.  Regardless of what server hosts the
    Corresponding Source, you remain obligated to ensure that it is
    available for as long as needed to satisfy these requirements.

    e) Convey the object code using peer-to-peer transmission, provided
    you inform other peers where the object code and Corresponding
    Source of the work are being offered to the general public at no
    charge under subsection 6d.

  A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.

  A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling.  In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage.  For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product.  A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.

  "Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source.  The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.

  If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information.  But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).

  The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed.  Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.

  Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.

  7. Additional Terms.

  "Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law.  If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.

  When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it.  (Additional permissions may be written to require their own
removal in certain cases when you modify the work.)  You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.

  Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:

    a) Disclaiming warranty or limiting liability differently from the
    terms of sections 15 and 16 of this License; or

    b) Requiring preservation of specified reasonable legal notices or
    author attributions in that material or in the Appropriate Legal
    Notices displayed by works containing it; or

    c) Prohibiting misrepresentation of the origin of that material, or
    requiring that modified versions of such material be marked in
    reasonable ways as different from the original version; or

    d) Limiting the use for publicity purposes of names of licensors or
    authors of the material; or

    e) Declining to grant rights under trademark law for use of some
    trade names, trademarks, or service marks; or

    f) Requiring indemnification of licensors and authors of that
    material by anyone who conveys the material (or modified versions of
    it) with contractual assumptions of liability to the recipient, for
    any liability that these contractual assumptions directly impose on
    those licensors and authors.

  All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10.  If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term.  If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.

  If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.

  Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.

  8. Termination.

  You may not propagate or modify a covered work except as expressly
provided under this License.  Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).

  However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.

  Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.

  Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License.  If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.

  9. Acceptance Not Required for Having Copies.

  You are not required to accept this License in order to receive or
run a copy of the Program.  Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance.  However,
nothing other than this License grants you permission to propagate or
modify any covered work.  These actions infringe copyright if you do
not accept this License.  Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.

  10. Automatic Licensing of Downstream Recipients.

  Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License.  You are not responsible
for enforcing compliance by third parties with this License.

  An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations.  If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.

  You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License.  For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.

  11. Patents.

  A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based.  The
work thus licensed is called the contributor's "contributor version".

  A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version.  For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.

  Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.

  In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement).  To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.

  If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients.  "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.

  If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.

  A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License.  You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.

  Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.

  12. No Surrender of Others' Freedom.

  If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License.  If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all.  For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.

  13. Use with the GNU Affero General Public License.

  Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work.  The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.

  14. Revised Versions of this License.

  The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time.  Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.

  Each version is given a distinguishing version number.  If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation.  If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.

  If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.

  Later license versions may give you additional or different
permissions.  However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.

  15. Disclaimer of Warranty.

  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

  16. Limitation of Liability.

  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.

  17. Interpretation of Sections 15 and 16.

  If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.

                     END OF TERMS AND CONDITIONS

            How to Apply These Terms to Your New Programs

  If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.

  To do so, attach the following notices to the program.  It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

    {one line to give the program's name and a brief idea of what it does.}
    Copyright (C) {year}  {name of author}

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.

Also add information on how to contact you by electronic and paper mail.

  If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:

    {project}  Copyright (C) {year}  {fullname}
    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
    This is free software, and you are welcome to redistribute it
    under certain conditions; type `show c' for details.

The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License.  Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".

  You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.

  The GNU General Public License does not permit incorporating your program
into proprietary programs.  If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library.  If this is what you want to do, use the GNU Lesser General
Public License instead of this License.  But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.



================================================
FILE: gs-web-elasticsearch/doc/index.rst
================================================
Elasticsearch GeoServer Data Store
==================================

Elasticsearch is a popular distributed search and analytics engine that enables complex search features in near real-time. Default field type mappings support string, numeric, boolean and date types and allow complex, hierarchical documents. Custom field type mappings can be defined for geospatial document fields. The ``geo_point`` type supports point geometries that can be specified through a coordinate string, geohash or coordinate array. The ``geo_shape`` type supports Point, LineString,  Polygon, MultiPoint, MultiLineString, MultiPolygon and GeometryCollection GeoJSON types as well as envelope and circle types. Custom options allow configuration of the type and precision of the spatial index.

This data store allows features from an Elasticsearch index to be published through GeoServer. Both ``geo_point`` and ``geo_shape`` type mappings are supported. OGC filters are converted to Elasticsearch queries and can be combined with native Elasticsearch queries in WMS and WFS requests. 

.. contents:: Contents:

Compatibility
-------------

* Java: 1.8
* GeoServer: 2.16.x
* Elasticsearch: 2.4.x, 5.x, 6.x, 7.x

Downloads
---------

Pre-compiled binaries can be found on the `GitHub releases page <https://github.com/ngageoint/elasticgeo/releases>`_.

Installation
------------

Pre-compiled binaries
^^^^^^^^^^^^^^^^^^^^^

Unpack zipfile and copy plugin file to the ``WEB_INF/lib`` directory of your GeoServer installation and then restart GeoServer.

Building
^^^^^^^^

Clone project::

    $ git clone git@github.com:ngageoint/elasticgeo.git

Build and install plugin (requires GeoServer restart)::

    $ mvn clean install -DskipTests=true -Dskip.integration.tests=true
    $ cp gs-web-elasticsearch/target/elasticgeo*.jar GEOSERVER_HOME/WEB_INF/lib

Run default tests::

    $ mvn verify -Dskip.integration.tests=true

Run default and integration tests (requires `Docker <https://docs.docker.com/engine/installation/>`_)::

    $ mvn verify

Note running integration tests in an IDE development environment requires that a local Elasticsearch instance is running and accepting HTTP connections over port 9200 (see `Elasticsearch documentation <https://www.elastic.co/guide/en/elasticsearch/reference/current/install-elasticsearch.html>`_).

Configuration
-------------

Configuring data store
^^^^^^^^^^^^^^^^^^^^^^

Once the Elasticsearch GeoServer extension is installed, ``Elasticsearch index`` will be an available vector data source format when creating a new data store.

.. |new_store| image:: images/elasticsearch_store.png
   :scale: 100%
   :align: middle

+-------------+
| |new_store| |
+-------------+

.. _config_elasticsearch:

The Elasticsearch data store configuration panel includes connection parameters and search settings.

.. |store_config| raw:: html

    <img src="images/elasticsearch_configuration.png" align="left" height="800px">

+----------------+
| |store_config| |
+----------------+

Available data store configuration parameters are summarized in the following table:

.. list-table::
   :widths: 20 80

   * - Parameter
     - Description
   * - elasticsearch_host
     - Host (IP) for connecting to Elasticsearch. HTTP scheme and port can optionally be included to override the defaults. Multiple hosts can be provided. Examples::

         localhost
         localhost:9200
         http://localhost
         http://localhost:9200
         https://localhost:9200
         https://somehost.somedomain:9200,https://anotherhost.somedomain:9200
   * - elasticsearch_port
     - Default HTTP port for connecting to Elasticsearch. Ignored if the hostname includes the port.
   * - user
     - Elasticsearch user. Must have superuser privilege on index.
   * - passwd
     - Elasticsearch user password
   * - runas_geoserver_user
     - Whether to submit requests on behalf of the authenticated GeoServer user
   * - proxy_user
     - Elasticsearch user for document queries. If not provided then admin user credentials are used for all requests.
   * - proxy_passwd
     - Elasticsearch proxy user password
   * - index_name
     - Index name or alias (wildcards supported)
   * - reject_unauthorized
     - Whether to validate the server certificate during the SSL handshake for https connections
   * - default_max_features
     - Default used when maxFeatures is unlimited
   * - source_filtering_enabled
     - Whether to enable filtering of the _source field
   * - scroll_enabled
     - Enable the Elasticsearch scan and scroll API
   * - scroll_size
     - Number of documents per shard when using the scroll API
   * - scroll_time
     - Search context timeout when using the scroll API
   * - array_encoding
     - Array encoding strategy. Allowed values are ``JSON`` (keep arrays) and ``CSV`` (keep first array element).
   * - grid_size 
     - Hint for Geohash grid size (numRows*numCols)
   * - grid_threshold
     - Geohash grid aggregation precision will be the minimum necessary so that actual_grid_size/grid_size > grid_threshold

Configuring authentication
~~~~~~~~~~~~~~~~~~~~~~~~~~

Basic authentication is supported through the ``user`` and ``passwd`` credential parameters. The provided user must have
superuser privilege on the index to enable the mapping and alias requests performed during store initialization. Optional
``proxy_user`` and ``proxy_passwd`` parameters can be used to specify an alternate user for document search (OGC service)
requests. The proxy user can have restricted privileges on the index through document level security. If not provided
the default user is used for all requests.

The ``runas_geoserver_user`` flag can be used to enable Elasticsearch requests to be submitted on behalf of the
authenticated GeoServer user. When the run-as mechanism is configured the plugin will add the ``es-security-runas-user``
header with the authenticated GeoServer username. See `X-Pack run-as documentation
<https://www.elastic.co/guide/en/x-pack/current/run-as-privilege.html>`_ for more information. Note the run-as mechanism
is applied only to document search requests.

For added security it is recommended to define ``proxy_user`` and ``proxy_passwd`` when using the run-as mechanism. The
proxy user will be used when submitting requests on behalf of the GeoServer user and can have restricted privileges
enabling access only to documents that all users can have access to. The plugin can optionally be deployed to
require user credentials and proxy credentials and to force the use of ``runas_geoserver_user`` by setting the
environment variable ``org.geoserver.elasticsearch.xpack.force-runas``::

    $ export JAVA_OPTS="-Dorg.geoserver.elasticsearch.xpack.force-runas $JAVA_OPTS"


Configuring HTTPS/SSL
~~~~~~~~~~~~~~~~~~~~~

System properties are supported for SSL/TLS configuration::

    javax.net.ssl.trustStore
    javax.net.ssl.trustStorePassword
    javax.net.ssl.keyStore
    javax.net.ssl.keyStorePassword

See `HttpClientBuilder <https://hc.apache.org/httpcomponents-userClient-ga/httpclient/apidocs/org/apache/http/impl/userClient/HttpClientBuilder.html>`_  documentation for available properties.

For example use ``javax.net.ssl.trustStore[Password]`` to validate server certificate::

    $ export JAVA_OPTS="-Djavax.net.ssl.trustStore=/path/to/truststore.jks -Djavax.net.ssl.trustStorePassword=changeme $JAVA_OPTS "


Configuring layer
^^^^^^^^^^^^^^^^^

The initial layer configuration panel for an Elasticsearch layer will include an additional pop-up showing a table of available fields.

.. |field_list| image:: images/elasticsearch_fieldlist.png
   :scale: 100%
   :align: middle

+--------------+
| |field_list| |
+--------------+

.. list-table::
   :widths: 20 80

   * - Item
     - Description
   * - ``Use All``
     - Use all fields in the layer feature type
   * - ``Short Names``
     - For hierarchical documents with inner fields (e.g. ``parent.child.field_name``), only use the base name 
       (``field_name``) in the schema. Note, full path will always be included when the base name is duplicated across fields.
   * - ``Use``
     - Used to select the fields that will make up the layer feature type
   * - ``Name``
     - Name of the field
   * - ``Type``
     - Type of the field, as derived from the Elasticsearch schema. For geometry types, you have the option to provide a more specific data type.
   * - ``Order``
     - Integer order values are used to sort fields, where fields with smaller order are returned first
   * - ``Custom Name``
     - Provides the option to give the field a custom name
   * - ``Default Geometry``
     - Indicates if the geometry field is the default one. Useful if the documents contain more than one geometry field, as SLDs and spatial filters will hit the default geometry field unless otherwise specified
   * - ``Stored``
     - Indicates whether the field is stored in the index
   * - ``Analyzed``
     - Indicates whether the field is analyzed
   * - ``SRID``
     - Native spatial reference ID of the geometries. Currently only EPSG:4326 is supported.
   * - ``Date Format``
     - Date format used for parsing field values and printing filter elements

To return to the field table after it has been closed, click the "Configure Elasticsearch fields" button below the "Feature Type Details" panel on the layer configuration page.

.. |field_list_edit| image:: images/elasticsearch_fieldlist_edit.png
   :scale: 100%
   :align: middle

+-------------------+
| |field_list_edit| |
+-------------------+

Configuring logging
^^^^^^^^^^^^^^^^^^^

Logging is configurable through Log4j. The data store includes logging such as the query object being sent to Elasticsearch, which is logged at a lower level than may be enabled by default. To enable these logs, add the following lines to the GeoServer logging configuration file (see GeoServer Global Settings)::

    log4j.category.mil.nga.giat.data.elasticsearch=DEBUG 
    log4j.category.mil.nga.giat.process.elasticsearch=DEBUG 

The logging configuration file will be in the ``logs`` subdirectory in the GeoServer data directory. Check GeoServer global settings for which file is being used (e.g. ``DEFAULT_LOGGING.properties``, etc.).

.. |logging| image:: images/elasticsearch_logging.png
   :scale: 100%
   :align: middle

+-----------+
| |logging| |
+-----------+

Filtering
---------

Filtering capabilities include OpenGIS simple comparisons, temporal comparisons, as well as other common filter comparisons. Elasticsearch natively supports numerous spatial filter operators, depending on the type:

- ``geo_shape`` types natively support BBOX/Intersects, Within and Disjoint binary spatial operators
- ``geo_point`` types natively support BBOX and Within binary spatial operators, as well as the DWithin and Beyond distance buffer operators

Requests involving spatial filter operators not natively supported by Elasticsearch will include an additional filtering operation on the results returned from the query, which may impact performance.


Native queries
^^^^^^^^^^^^^^

Native Elasticsearch queries can be applied in WFS/WMS feature requests by including the ``q:{query_body}`` key:value pair in the ``viewparams`` parameter (see GeoServer SQL Views documentation for more information). If supplied, the query is combined with the query derived from the request bbox, CQL or OGC filter using the AND logical binary operator.

Examples
^^^^^^^^

BBOX and CQL filter::

    http://localhost:8080/geoserver/test/wms?service=WMS&version=1.1.0&request=GetMap
         &layers=test:active&styles=&bbox=-1,-1,10,10&width=279&height=512
         &srs=EPSG:4326&format=application/openlayers&maxFeatures=1000
         &cql_filter=standard_ss='IEEE 802.11b'

BBOX and native query::

    http://localhost:8080/geoserver/test/wms?service=WMS&version=1.1.0&request=GetMap
         &layers=test:active&styles=&bbox=-1,-1,10,10&width=279&height=512
         &srs=EPSG:4326&format=application/openlayers&maxFeatures=1000
         &viewparams=q:{"term":{"standard_ss":"IEEE 802.11b"}}

Native query with BBOX filter::

    http://localhost:8080/geoserver/test/wms?service=WMS&version=1.1.0&request=GetMap
         &layers=test:active&styles=&bbox=-1,-1,10,10&width=279&height=512
         &srs=EPSG:4326&format=application/openlayers&maxFeatures=1000
         &viewparams=q:{"term":{"standard_ss":"IEEE 802.11b"}}

Note that commas in native queries must be escaped with a backslash.

Aggregations
------------

Elasticsearch aggregations are supported through WFS/WMS requests by including the ``a:{aggregation_body}`` key:value pair in the ``viewparams`` parameter (see GeoServer SQL Views documentation for more information)::

    http://localhost:8080/geoserver/test/ows?service=WFS&version=1.0.0&request=GetFeature
         &typeName=test:active&bbox=0.0,0.0,24.0,44.0
         &viewparams=a:{"agg": {"geohash_grid": {"field": "geo"\, "precision": 3}}}

Aggregation WFS features will include a single attribute, ``_aggregation``, containing the raw aggregation content. Note that size is set to zero when an aggregation is supplied so only aggregation features are returned (e.g. maxFeatures is ignored and there will be no search hit results). See FAQ_ for common issues using aggregations.

Geohash grid aggregations
^^^^^^^^^^^^^^^^^^^^^^^^^

Geohash grid aggregation support includes dynamic precision updating and a custom rendering transformation for visualization. Geohash grid aggregation precision is updated dynamically to approximate the specified ``grid_size`` based on current bbox extent and the additional ``grid_threshold`` parameter as described above. If a ``precision`` value is present in the aggregation defined in ``viewparams``, however, that value will be used instead of the dynamic value.

Geohash grid aggregation visualization is supported in WMS requests through a custom rendering transformation, ``vec:GeoHashGrid``, which translates aggregation response data into a raster for display. By default raster values correspond to the aggregation bucket ``doc_count``. The following shows an example GeoServer style that uses the GeoHashGrid rendering transformation::

   <StyledLayerDescriptor version="1.0.0"
       xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd"
       xmlns="http://www.opengis.net/sld"
       xmlns:ogc="http://www.opengis.net/ogc"
       xmlns:xlink="http://www.w3.org/1999/xlink"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
     <NamedLayer>
       <Name>GeoHashGrid</Name>
       <UserStyle>
         <Title>GeoHashGrid</Title>
         <Abstract>GeoHashGrid aggregation</Abstract>
         <FeatureTypeStyle>
           <Transformation>
             <ogc:Function name="vec:GeoHashGrid">
               <ogc:Function name="parameter">
                 <ogc:Literal>data</ogc:Literal>
               </ogc:Function>
               <ogc:Function name="parameter">
                 <ogc:Literal>gridStrategy</ogc:Literal>
                 <ogc:Literal>Basic</ogc:Literal>
               </ogc:Function>
               <ogc:Function name="parameter">
                 <ogc:Literal>pixelsPerCell</ogc:Literal>
                 <ogc:Literal>1</ogc:Literal>
               </ogc:Function>
               <ogc:Function name="parameter">
                 <ogc:Literal>outputBBOX</ogc:Literal>
                 <ogc:Function name="env">
                   <ogc:Literal>wms_bbox</ogc:Literal>
                 </ogc:Function>
               </ogc:Function>
               <ogc:Function name="parameter">
                 <ogc:Literal>outputWidth</ogc:Literal>
                 <ogc:Function name="env">
                   <ogc:Literal>wms_width</ogc:Literal>
                 </ogc:Function>
               </ogc:Function>
               <ogc:Function name="parameter">
                 <ogc:Literal>outputHeight</ogc:Literal>
                 <ogc:Function name="env">
                   <ogc:Literal>wms_height</ogc:Literal>
                 </ogc:Function>
               </ogc:Function>
             </ogc:Function>
           </Transformation>
           <Rule>
            <RasterSymbolizer>
              <Geometry>
                <!-- Actual geometry property name in feature source -->
                <ogc:PropertyName>geo</ogc:PropertyName></Geometry>
              <Opacity>0.6</Opacity>
              <ColorMap type="ramp" >
                <ColorMapEntry color="#FFFFFF" quantity="0" label="nodata" opacity="0"/>
                <ColorMapEntry color="#2851CC" quantity="1" label="values"/>
                <ColorMapEntry color="#211F1F" quantity="2" label="label"/>
                <ColorMapEntry color="#EE0F0F" quantity="3" label="label"/>
                <ColorMapEntry color="#AAAAAA" quantity="4" label="label"/>
                <ColorMapEntry color="#6FEE4F" quantity="5" label="label"/>
                <ColorMapEntry color="#DDB02C" quantity="10" label="label"/>
              </ColorMap>
            </RasterSymbolizer>
           </Rule>
         </FeatureTypeStyle>
       </UserStyle>
     </NamedLayer>
    </StyledLayerDescriptor>

Example WMS request including Geohash grid aggregation with the above custom style::

    http://localhost:8080/geoserver/test/wms?service=WMS&version=1.1.0&request=GetMap
         &layers=test:active&styles=geohashgrid&bbox=0.0,0.0,24.0,44.0&srs=EPSG:4326
         &width=418&height=768&format=application/openlayers
         &viewparams=a:{"agg": {"geohash_grid": {"field": "geo"\, "precision": 3}}}

Grid Strategy
^^^^^^^^^^^^^
``gridStrategy``: Parameter to identify the ``mil.nga.giat.process.elasticsearch.GeoHashGrid`` implementation that will be used to convert each geohashgrid bucket into a raster value (number).

.. list-table::
   :widths: 20 20 20 40

   * - Name
     - gridStrategy
     - gridStrategyArgs
     - Description
   * - Basic
     - ``basic``
     - no
     - Raster value is geohashgrid bucket ``doc_count``.
   * - Metric
     - ``metric``
     - yes
     - Raster value is geohashgrid bucket metric value.
   * - Nested
     - ``nested_agg``
     - yes
     - Extract raster value from nested aggregation results.

``gridStrategyArgs``: (Optional) Parameter used to specify an optional argument list for the grid strategy.

``emptyCellValue``: (Optional) Parameter used to specify the value for empty grid cells. By default, empty grid cells are set to ``0``.

``scaleMin``, ``scaleMax``: (Optional) Parameters used to specify a scale applied to all raster values. Each tile request is scaled according to the min and max values for that tile. It is best to use a non-tiled layer with this parameter to avoid confusing results.

``useLog``: (Optional) Flag indicating whether to apply logarithm to raster values (applied prior to scaling, if applicable)

Basic
~~~~~
Raster value is geohashgrid bucket ``doc_count``.

Example Aggregation::

  {
    "agg": {
      "geohash_grid": {
        "field": "geo"
      }
    }
  }
    
Example bucket::

 {
   "key" : "xv",
   "doc_count" : 1
 }

Extracted raster value: ``1``

Metric
~~~~~~
Raster value is geohashgrid bucket metric value.

.. list-table::
   :widths: 20 20 60

   * - Argument Index
     - Default Value
     - Description
   * - 0
     - ``metric``
     - Key used to pluck metric object from top level bucket. Empty string results in plucking doc_count.
   * - 1
     - ``value``
     - Key used to pluck the value from the metric object.

Example Aggregation::

  {
    "agg": {
      "geohash_grid": {
        "field": "geo"
      },
      "aggs": {
        "metric": {
          "max": {
            "field": "magnitude"
          }
        }
      }
    }
  }

Example bucket::

  {
    "key" : "xv",
    "doc_count" : 1,
    "metric" : {
      "value" : 4.9
    }
  }
    
Extracted raster value: ``4.9``

Nested
~~~~~~~~~~
Extract raster value from nested aggregation results.

.. list-table::
   :widths: 20 20 60

   * - Argument Index
     - Default Value
     - Description
   * - 0
     - ``nested``
     - Key used to pluck nested aggregation results from the geogrid bucket.
   * - 1
     - empty string
     - Key used to pluck metric object from each nested aggregation bucket. Empty string results in plucking doc_count.
   * - 2
     - ``value``
     - Key used to pluck the value from the metric object.
   * - 3
     - ``largest``
     - ``largest`` | ``smallest``. Strategy used to select a bucket from the nested aggregation buckets. The grid cell raster value is extracted from the selected bucket.
   * - 4
     - ``value``
     - ``key`` | ``value``. Strategy used to extract the raster value from the selected bucket. ``value``: Raster value is the selected bucket's metric value. ``key``: Raster value is the selected bucket's key.
   * - 5
     - null
     - (Optional) Map used to convert String keys into numeric values. Use the format ``key1:1;key2:2``. Only utilized when raster strategy is ``key``.


Example Aggregation::

  {
    "agg": {
      "geohash_grid": {
        "field": "geo"
      },
      "aggs": {
        "nested": {
          "histogram": {
            "field": "magnitude",
            "interval": 1,
            "min_doc_count": 1
          }
        }
      }
    }
  }

Example Parameters::

  <ogc:Function name="parameter">
    <ogc:Literal>gridStrategyArgs</ogc:Literal>
    <ogc:Literal>nested</ogc:Literal>
    <ogc:Literal></ogc:Literal>
    <ogc:Literal></ogc:Literal>
    <ogc:Literal>largest</ogc:Literal>
    <ogc:Literal>key</ogc:Literal>
  </ogc:Function>

Example bucket::

  {
    "key" : "xv",
    "doc_count" : 1729,
    "nested" : {
      "buckets" : [
        {
          "key" : 2.0,
          "doc_count" : 5
        },
        {
          "key" : 3.0,
          "doc_count" : 107
        },
        {
          "key" : 4.0,
          "doc_count" : 1506
        },
        {
          "key" : 5.0,
          "doc_count" : 100
        },
        {
          "key" : 6.0,
          "doc_count" : 11
        }
      ]
    }
  }

Extracted raster value: ``4.0``

Implementing a custom Grid Strategy
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

By default the raster values computed in the geohash grid aggregation rendering transformation correspond to the top level ``doc_count``. Adding an additional strategy for computing the raster values from bucket data currently requires source code updates to the ``gt-elasticsearch-process`` module as described below.

First create a custom implementation of ``mil.nga.giat.process.elasticsearch.GeoHashGrid`` and provide an implementation of the ``computeCellValue`` method, which takes the raw bucket data and returns the raster value. For example the default basic implementation simply returns the doc_count::

    public class BasicGeoHashGrid extends GeoHashGrid {
        @Override
        public Number computeCellValue(Map<String,Object> bucket) {
            return (Number) bucket.get("doc_count");
        }
    }

Then update ``mil.nga.giat.process.elasticsearch.GeoHashGridProcess`` and add a new entry to the Strategy enum to point to the custom implementation. 

After deploying the customized plugin the new geohash grid computer can be used by updating the ``gridStrategy`` parameter in the GeoServer style::

   <StyledLayerDescriptor version="1.0.0"
       ...
           <Transformation>
             <ogc:Function name="vec:GeoHashGrid">
               ...
               <ogc:Function name="parameter">
                 <ogc:Literal>gridStrategy</ogc:Literal>
                 <ogc:Literal>NewName</ogc:Literal>
               </ogc:Function>

.. _FAQ:

FAQ
---

- By default arrays are returned directly, which is suitable for many output formats including GeoJSON. When using CSV output format with layers containing arrays it's necessary to set the ``array_encoding`` store parameter to ``CSV``. Note however when using the ``CSV`` array encoding that only the first value will be returned.
- When updating from pre-2.11.0 versions of the plugin it may be necessary to reload older layers to enable full aggregation and time support. Missing aggregation data or errors of the form ``IllegalArgumentException: Illegal pattern component`` indicate a layer reload is necessary. In this case the layer must be removed and re-added to GeoServer (e.g. a feature type reload will not be sufficient).
- Commas in the native query and aggregation body must be escaped with a backslash. Additionally body may need to be URL encoded.
- Geometry property name in the aggregation SLD RasterSymbolizer must be a valid geometry property in the layer
- ``PropertyIsEqualTo`` maps to an Elasticsearch term query, which will return documents that contain the supplied term. When searching on an analyzed string field, ensure that the search values are consistent with the analyzer used in the index. For example, values may need to be lowercase when querying fields analyzed with the default analyzer. See the Elasticsearch term query documentation for more information.
- ``PropertyIsLike`` maps to either a query string query or a regexp query, depending on whether the field is analyzed or not. Reserved characters should be escaped as applicable. Note case sensitive and insensitive searches may not be supported for analyzed and not analyzed fields, respectively. See Elasticsearch query string and regexp query documentation for more information.
- Date conversions are handled using the date format from the associated type mapping, or ``date_optional_time`` if not found. Note that UTC timezone is used for both parsing and printing of dates.
- Filtering on Elasticsearch ``object`` types is supported. By default, field names will include the full path to the field (e.g. "parent.child.field_name"), but this can be changed in the GeoServer layer configuration.

  - When referencing fields with path elements using ``cql_filter``, it may be necessary to quote the name (e.g. ``cql_filter="parent.child.field_name"='value'``)

- Filtering on Elasticsearch ``nested`` types is supported only for non-geospatial fields.
- Circle geometries are approximate and may not be fully consistent with the implementation in Elasticsearch, especially at extreme latitudes (see `#86 <https://github.com/ngageoint/elasticgeo/issues/86>`_).
- The ``joda-shaded`` module may need to be excluded when importing the project into Eclipse. Otherwise modules may have build errors of the form ``DateTimeFormatter cannot be resolved to a type``.


================================================
FILE: gs-web-elasticsearch/pom.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright (c) 2001 - 2013 OpenPlans - www.openplans.org. All rights reserved. 
  This code is licensed under the GPL 2.0 license, available at the root application 
  directory. -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <artifactId>elasticgeo</artifactId>
    <groupId>mil.nga.giat</groupId>
    <version>2.16-SNAPSHOT</version>
  </parent>
  <artifactId>gs-web-elasticsearch</artifactId>
  <version>2.16-SNAPSHOT</version>
  <packaging>jar</packaging>
  <name>GeoServer Elasticsearch Module</name>
  <dependencies>
    <dependency>
      <groupId>mil.nga.giat</groupId>
      <artifactId>gt-elasticsearch</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>mil.nga.giat</groupId>
      <artifactId>gt-elasticsearch-process</artifactId>
      <version>${project.version}</version>
    </dependency>

    <dependency>
      <groupId>org.geoserver</groupId>
      <artifactId>gs-main</artifactId>
      <version>${geoserver.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.geoserver.web</groupId>
      <artifactId>gs-web-core</artifactId>
      <version>${geoserver.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.geotools</groupId>
      <artifactId>gt-main</artifactId>
      <version>${geotools.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.geoserver.web</groupId>
      <artifactId>gs-web-core</artifactId>
      <version>${geoserver.version}</version>
      <type>test-jar</type>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.geoserver</groupId>
      <artifactId>gs-main</artifactId>
      <version>${geoserver.version}</version>
      <type>test-jar</type>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.mockrunner</groupId>
      <artifactId>mockrunner</artifactId>
      <version>0.3.6</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.11</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <build>
    <resources>
      <resource>
        <directory>${basedir}/src/main/java</directory>
        <includes>
          <include>applicationContext.xml</include>
          <include>**/*.html</include>
        </includes>
      </resource>
      <resource>
        <directory>${basedir}/src/main/resources</directory>
        <includes>
          <include>**/*</include>
        </includes>
      </resource>
    </resources>
    <plugins>
      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <version>2.4</version>
        <configuration>
          <descriptor>src/assembly/dist.xml</descriptor>
          <appendAssemblyId>false</appendAssemblyId>
          <finalName>elasticgeo-${project.version}</finalName>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-shade-plugin</artifactId>
        <version>2.2</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <artifactSet>
                <excludes>
                  <exclude>*:pom:*</exclude>
                  <exclude>*:maven*:*</exclude>
                  <exclude>commons-codec</exclude>
                  <exclude>commons-collections</exclude>
                  <exclude>commons-httpclient</exclude>
                  <exclude>commons-logging</exclude>
                  <exclude>*:guava:*</exclude>
                  <exclude>javax.media:jai*:*</exclude>
                  <exclude>*:jts:*</exclude>
                  <exclude>*:*:jsr305</exclude>
                  <exclude>log4j:log4j</exclude>
                </excludes>
              </artifactSet>
              <filters>
                <filter>
                  <artifact>*:*</artifact>
                  <excludes>
                    <exclude>META-INF/maven/**</exclude>
                    <exclude>META-INF/*.SF</exclude>
                    <exclude>META-INF/*.DSA</exclude>
                    <exclude>META-INF/*.RSA</exclude>
                    <exclude>META-INF/DEPENDENCIES</exclude>
                  </excludes>
                </filter>
              </filters>
              <transformers>
                <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
                <transformer implementation="org.apache.maven.plugins.shade.resource.ApacheLicenseResourceTransformer" />
                <transformer implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
                  <resource>META-INF/LICENSE</resource>
                  <file>LICENSE</file>
                </transformer>
                <transformer implementation="org.apache.maven.plugins.shade.resource.ApacheNoticeResourceTransformer">
                  <addHeader>false</addHeader>
                </transformer>
              </transformers>
              <createDependencyReducedPom>false</createDependencyReducedPom>
              <minimizeJar>false</minimizeJar>
              <finalName>elasticgeo-${project.version}</finalName>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>


================================================
FILE: gs-web-elasticsearch/src/assembly/dist.xml
================================================
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
  <id>bin</id>
  <formats>
    <format>zip</format>
  </formats>
  <includeBaseDirectory>false</includeBaseDirectory>
  <fileSets>
    <fileSet>
      <directory>${project.build.directory}</directory>
      <outputDirectory>/</outputDirectory>
      <includes>
        <include>elasticgeo*.jar</include>
      </includes>
    </fileSet>
    <fileSet>
      <directory>.</directory>
      <outputDirectory>/</outputDirectory>
      <includes>
        <include>LICENSE</include>
      </includes>
    </fileSet>
  </fileSets>
</assembly>


================================================
FILE: gs-web-elasticsearch/src/main/java/applicationContext.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright (c) 2014 OpenPlans - www.openplans.org. All rights reserved.
This code is licensed under the GPL 2.0 license, available at the root application directory.
 -->
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">

<beans>

	<bean id="esXStreamInitializer" class="mil.nga.giat.elasticsearch.ElasticXStreamInitializer" />
	
	<bean id="esFeatureTypeCallback" class="mil.nga.giat.elasticsearch.ElasticFeatureTypeCallback" />

	<bean id="esConfigPanel" class="mil.nga.giat.elasticsearch.ElasticConfigurationPanelInfo">
		<property name="id" value="elastic" />
		<property name="titleKey" value="data.resource.config.elasticsearch" />
		<property name="componentClass" value="mil.nga.giat.elasticsearch.ElasticConfigurationPanel" />
		<property name="supportedTypes">
			<list>
				<value>Elasticsearch</value>
			</list>
		</property>
	</bean>

	<bean id="ElasticXStreamPersisterInitializer" class="mil.nga.giat.elasticsearch.ElasticXStreamPersisterInitializer"/>

</beans>


================================================
FILE: gs-web-elasticsearch/src/main/java/mil/nga/giat/elasticsearch/ElasticAttributeProvider.java
================================================
/* (c) 2014 Open Source Geospatial Foundation - all rights reserved
 * This code is licensed under the GPL 2.0 license, available at the root
 * application directory.
 */

package mil.nga.giat.elasticsearch;

import java.util.Arrays;
import java.util.List;

import mil.nga.giat.data.elasticsearch.ElasticAttribute;

import org.geoserver.web.wicket.GeoServerDataProvider;

/**
 * 
 * Provide attributes from Elasticsearch fields.
 * 
 */
class ElasticAttributeProvider extends GeoServerDataProvider<ElasticAttribute> {

    private static final long serialVersionUID = -1021780286733349153L;

    private final List<ElasticAttribute> attributes;

    /**
     * Name of field
     */
    static final Property<ElasticAttribute> NAME = new BeanProperty<>("name",
            "displayName");

    /**
     * Class type of field
     */
    static final Property<ElasticAttribute> TYPE = new AbstractProperty<ElasticAttribute>(
            "type") {

        private static final long serialVersionUID = 4454312983828267130L;

        @Override
        public Object getPropertyValue(ElasticAttribute item) {
            if (item.getType() != null) {
                return item.getType().getSimpleName();
            }
            return null;
        }

    };

    /**
     * Mark as the default geometry
     */
    static final Property<ElasticAttribute> DEFAULT_GEOMETRY = new BeanProperty<>(
            "defaultGeometry", "defaultGeometry");

    /**
     * SRID of geometric field
     */
    static final Property<ElasticAttribute> SRID = new BeanProperty<>("srid", "srid");

    /**
     * Use field in datastore
     */
    static final Property<ElasticAttribute> USE = new BeanProperty<>("use", "use");

    /**
     * Store if the field is in use in datastore
     */
    static final Property<ElasticAttribute> DATE_FORMAT = new BeanProperty<>("dateFormat", "dateFormat");

    /**
     * If field is analyzed
     */
    static final Property<ElasticAttribute> ANALYZED = new BeanProperty<>("analyzed", "analyzed");

    /**
     * If field is stored
     */
    static final Property<ElasticAttribute> STORED = new BeanProperty<>("stored", "stored");

    /**
     * Order of the field
     */
    static final Property<ElasticAttribute> ORDER = new BeanProperty<>("order", "order");

    /**
     * Custom name of the field
     */
    static final Property<ElasticAttribute> CUSTOM_NAME = new BeanProperty<>("customName", "customName");
 
    /**
     * Build attribute provider
     * 
     * @param attributes list to use as source for provider
     */
    public ElasticAttributeProvider(List<ElasticAttribute> attributes) {
        this.attributes = attributes;
    }

    @Override
    protected List<org.geoserver.web.wicket.GeoServerDataProvider.Property<ElasticAttribute>> getProperties() {
        return Arrays.asList(USE, NAME, TYPE, ORDER, CUSTOM_NAME, DEFAULT_GEOMETRY, STORED, ANALYZED, SRID, DATE_FORMAT);
    }

    @Override
    protected List<ElasticAttribute> getItems() {
        return attributes;
    }

}


================================================
FILE: gs-web-elasticsearch/src/main/java/mil/nga/giat/elasticsearch/ElasticConfigurationPage.html
================================================
<!--suppress ALL -->
<html xmlns:wicket="http://wicket.apache.org/">
<head>
<title><wicket:message key="title">Elasticsearch fields configuration</wicket:message></title>
</head>
<body>
	<wicket:panel>
		<form wicket:id="es_form">
            <input type="checkbox" wicket:id="useAll"/>
            <wicket:message key="useAll">Use All</wicket:message>
            <input type="checkbox" wicket:id="useShortName"/>
		    <wicket:message key="useShortName">Short Names</wicket:message>
			<div>
				<div wicket:id="esAttributes"></div>
				<div wicket:id="es_feedback">[Feedback Panel]</div>
				<div class="button-group selfclear" style="height: 50px">
					<a href="#" wicket:id="es_save">
						<wicket:message key="es_save">Save</wicket:message>
					</a>
				</div>
			</div>
		</form>
	</wicket:panel>
    
    <wicket:fragment wicket:id="checkboxDefaultGeometry">
        <input type="checkbox" wicket:id="defaultGeometry"/>
    </wicket:fragment>
    
	<wicket:fragment wicket:id="checkboxUse">
		<input type="checkbox" wicket:id="use"/>
	</wicket:fragment>
    
	<wicket:fragment wicket:id="empty"></wicket:fragment>

	<wicket:fragment wicket:id="geometry">
		<select wicket:id="geometry"></select>
	</wicket:fragment>
    
	<wicket:fragment wicket:id="label">
		<span wicket:id="label"></span>
	</wicket:fragment>
	
	<wicket:fragment wicket:id="textOrderValue">
		<input type="text" wicket:id="order" size="2"/>
	</wicket:fragment>
	
	<wicket:fragment wicket:id="textCustomNameValue">
		<input type="text" wicket:id="customName" size="25"/>
	</wicket:fragment>
</body>
</html>


================================================
FILE: gs-web-elasticsearch/src/main/java/mil/nga/giat/elasticsearch/ElasticConfigurationPage.java
================================================
/* (c) 2014 Open Source Geospatial Foundation - all rights reserved
 * This code is licensed under the GPL 2.0 license, available at the root
 * application directory.
 */

package mil.nga.giat.elasticsearch;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;

import mil.nga.giat.data.elasticsearch.ElasticAttribute;
import mil.nga.giat.data.elasticsearch.ElasticDataStore;
import mil.nga.giat.data.elasticsearch.ElasticLayerConfiguration;

import org.apache.wicket.AttributeModifier;
import org.apache.wicket.Component;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.markup.html.form.AjaxButton;
import org.apache.wicket.ajax.markup.html.form.AjaxCheckBox;
import org.apache.wicket.behavior.AttributeAppender;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.form.CheckBox;
import org.apache.wicket.markup.html.form.DropDownChoice;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.form.IChoiceRenderer;
import org.apache.wicket.markup.html.form.TextField;
import org.apache.wicket.markup.html.list.ListItem;
import org.apache.wicket.markup.html.panel.FeedbackPanel;
import org.apache.wicket.markup.html.panel.Fragment;
import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.model.CompoundPropertyModel;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.Model;
import org.apache.wicket.model.PropertyModel;
import org.geoserver.catalog.Catalog;
import org.geoserver.catalog.CatalogBuilder;
import org.geoserver.catalog.DataStoreInfo;
import org.geoserver.catalog.FeatureTypeInfo;
import org.geoserver.catalog.LayerInfo;
import org.geoserver.catalog.ResourceInfo;
import org.geoserver.web.GeoServerApplication;
import org.geoserver.web.wicket.GeoServerDataProvider.Property;
import org.geoserver.web.wicket.GeoServerTablePanel;
import org.geoserver.web.wicket.ParamResourceModel;
import org.geotools.data.util.NullProgressListener;
import org.geotools.feature.NameImpl;
import org.geotools.util.logging.Logging;
import org.locationtech.jts.geom.Geometry;
import org.locationtech.jts.geom.GeometryCollection;
import org.locationtech.jts.geom.LineString;
import org.locationtech.jts.geom.MultiLineString;
import org.locationtech.jts.geom.MultiPoint;
import org.locationtech.jts.geom.MultiPolygon;
import org.locationtech.jts.geom.Point;
import org.locationtech.jts.geom.Polygon;
import org.opengis.feature.type.Name;

/**
 * Class to render and manage the Elasticsearch modal dialog This dialog allow 
 * the user to choice which Elasticsearch attributes include in layers, selects 
 * attribute to use as GEOMETRY.
 */
abstract class ElasticConfigurationPage extends Panel {

    private static final long serialVersionUID = 5615867383881988931L;

    private static final Logger LOGGER = Logging.getLogger(ElasticConfigurationPage.class);

    private final String useAllMarkupId;

    private static final List<Class<? extends Geometry>> GEOMETRY_TYPES = Arrays.asList(Geometry.class,
            GeometryCollection.class, Point.class, MultiPoint.class, LineString.class,
            MultiLineString.class, Polygon.class, MultiPolygon.class);

    /**
     * Constructs the dialog to set Elasticsearch attributes and configuration 
     * options.
     * 
     * @see ElasticAttributeProvider
     * @see ElasticAttribute
     * 
     */
    public ElasticConfigurationPage(String panelId, final IModel<?> model) {
        super(panelId, model);

        ResourceInfo ri = (ResourceInfo) model.getObject();

        @SuppressWarnings("unchecked")
        final Form<?> elastic_form = new Form("es_form", new CompoundPropertyModel(this));
        add(elastic_form);

        List<ElasticAttribute> attributes;
        attributes = fillElasticAttributes(ri).getAttributes();
        final ElasticAttributeProvider attProvider = new ElasticAttributeProvider(attributes);

        final GeoServerTablePanel<ElasticAttribute> elasticAttributePanel;
        elasticAttributePanel = getElasticAttributePanel(attProvider);
        elastic_form.add(elasticAttributePanel);

        // select all check box
        boolean selectAll = true;
        for (final ElasticAttribute attribute : attributes) {
            if (attribute.isUse() == null || !attribute.isUse()) {
                selectAll = false;
            }
        }
        AjaxCheckBox useAllCheckBox = new AjaxCheckBox("useAll", Model.of(selectAll)) {
            @Override
            protected void onUpdate(AjaxRequestTarget target) {
                final boolean use = (Boolean) this.getDefaultModelObject();
                for (final ElasticAttribute attribute : attProvider.getItems()) {
                    attribute.setUse(use);
                }
                target.add(elasticAttributePanel);
            }
        };
        useAllCheckBox.setOutputMarkupId(true);
        elastic_form.add(useAllCheckBox);
        useAllMarkupId = useAllCheckBox.getMarkupId();

        // use short name check box
        final Boolean useShortName;
        if (!attributes.isEmpty() && attributes.get(0).getUseShortName() != null) {
            useShortName = attributes.get(0).getUseShortName();
        } else {
            useShortName = false;
        }
        AjaxCheckBox checkBox = new AjaxCheckBox("useShortName", Model.of(useShortName)) {
            @Override
            protected void onUpdate(AjaxRequestTarget target) {
                final boolean useShortName = (Boolean) this.getDefaultModelObject();
                for (final ElasticAttribute attribute : attProvider.getItems()) {
                    attribute.setUseShortName(useShortName);
                }
                target.add(elasticAttributePanel);
            }
        };
        checkBox.setOutputMarkupId(true);
        elastic_form.add(checkBox);

        elastic_form.add(new AjaxButton("es_save") {
            protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
                onSave(target);
            }
        });

        FeedbackPanel feedbackPanel = new FeedbackPanel("es_feedback");
        feedbackPanel.setOutputMarkupId(true);
        elastic_form.add(feedbackPanel);
    }

    /**
     * Do nothing
     */
    @SuppressWarnings("unused")
    protected void onCancel(AjaxRequestTarget target) {
        done(target, null, null);
    }

    /**
     * Validates Elasticsearch attributes configuration and stores the 
     * Elasticsearch layer configuration into feature type metadata as 
     * {@link ElasticLayerConfiguration#KEY} <br>
     * Validation include the follow rules <li>One attribute must be a GEOMETRY.
     * 
     * @see ElasticLayerConfiguration
     * @see FeatureTypeInfo#getMetadata
     */
    private void onSave(AjaxRequestTarget target) {
        try {
            ResourceInfo ri = (ResourceInfo) getDefaultModel().getObject();
            ElasticLayerConfiguration layerConfig = fillElasticAttributes(ri);
            boolean geomSet = false;
            // Validate configuration
            for (ElasticAttribute att : layerConfig.getAttributes()) {
                if (Geometry.class.isAssignableFrom(att.getType()) && att.isUse()) {
                    geomSet = true;
                }
            }
            if (!geomSet) {
                error(new ParamResourceModel("geomEmptyFailure", ElasticConfigurationPage.this)
                        .getString());
            }

            Catalog catalog = ((GeoServerApplication) this.getPage().getApplication()).getCatalog();
            FeatureTypeInfo typeInfo;
            DataStoreInfo dsInfo = catalog.getStore(ri.getStore().getId(), DataStoreInfo.class);
            ElasticDataStore ds = (ElasticDataStore) dsInfo.getDataStore(null);
            CatalogBuilder builder = new CatalogBuilder(catalog);
            builder.setStore(dsInfo);
            typeInfo = builder.buildFeatureType(ds.getFeatureSource(ri.getQualifiedName()));
            typeInfo.setName(ri.getName());
            typeInfo.getMetadata().put(ElasticLayerConfiguration.KEY, layerConfig);
            LayerInfo layerInfo = builder.buildLayer(typeInfo);
            layerInfo.setName(ri.getName());

            done(target, layerInfo, layerConfig);
        } catch (Exception e) {
            LOGGER.log(Level.SEVERE, e.getMessage(), e);
            error(new ParamResourceModel("creationFailure", this, e).getString());
        }
    }

    /*
     * Load ElasticLayerConfiguration configuration before shows on table Reloads 
     * Elasticsearch attributes from datastore and merge it with user attributes 
     * configurations
     */
    private ElasticLayerConfiguration fillElasticAttributes(ResourceInfo ri) {

        ElasticLayerConfiguration layerConfig = (ElasticLayerConfiguration) ri.getMetadata()
                .get(ElasticLayerConfiguration.KEY);

        if (layerConfig == null) {
            layerConfig = new ElasticLayerConfiguration(ri.getName());
            ri.getMetadata().put(ElasticLayerConfiguration.KEY, layerConfig);
        }

        try {
            ElasticDataStore dataStore = (ElasticDataStore) ((DataStoreInfo) ri.getStore())
                    .getDataStore(new NullProgressListener());

            ArrayList<ElasticAttribute> result = new ArrayList<>();
            Map<String, ElasticAttribute> tempMap = new HashMap<>();
            final List<ElasticAttribute> attributes = layerConfig.getAttributes();
            for (ElasticAttribute att : attributes) {
                tempMap.put(att.getName(), att);
            }

            final String docType = layerConfig.getDocType();
            final Name layerName = new NameImpl(layerConfig.getLayerName());
            dataStore.getDocTypes().put(layerName, docType);
            for (ElasticAttribute at : dataStore.getElasticAttributes(layerName)) {
                if (tempMap.containsKey(at.getName())) {
                    at = tempMap.get(at.getName());
                }
                result.add(at);
            }
            layerConfig.getAttributes().clear();
            layerConfig.getAttributes().addAll(result);
        } catch (Exception e) {
            LOGGER.log(Level.SEVERE, e.getMessage(), e);
        }
        Collections.sort(layerConfig.getAttributes());
        return layerConfig;
    }

    /*
     * Builds attribute table
     */
    private GeoServerTablePanel<ElasticAttribute> getElasticAttributePanel(
            ElasticAttributeProvider attProvider) {
        GeoServerTablePanel<ElasticAttribute> atts = new GeoServerTablePanel<ElasticAttribute>(
                "esAttributes", attProvider) {
            @Override
            protected Component getComponentForProperty(String id, IModel<ElasticAttribute> itemModel,
                    Property<ElasticAttribute> property) {
                ElasticAttribute att = itemModel.getObject();
                boolean isGeometry = att.getType() != null
                        && Geometry.class.isAssignableFrom(att.getType());
                if (property == ElasticAttributeProvider.NAME && isGeometry) {
                    Fragment f = new Fragment(id, "label", ElasticConfigurationPage.this);
                    f.add(new Label("label", att.getDisplayName() + "*"));
                    return f;
                } else if (property == ElasticAttributeProvider.TYPE && isGeometry) {
                    Fragment f = new Fragment(id, "geometry", ElasticConfigurationPage.this);
                    //noinspection unchecked
                    f.add(new DropDownChoice("geometry", new PropertyModel(itemModel, "type"),
                            GEOMETRY_TYPES, new GeometryTypeRenderer()));
                    return f;
                } else if (property == ElasticAttributeProvider.USE) {
                    CheckBox checkBox = new CheckBox("use", new PropertyModel<>(itemModel, "use"));
                    final String onclick = "document.getElementById(\"" + useAllMarkupId + "\").checked = false;";
                    checkBox.add(new AttributeAppender("onclick", new Model<>(onclick), ";"));
                    Fragment f = new Fragment(id, "checkboxUse", ElasticConfigurationPage.this);
                    f.add(checkBox);
                    return f;
                } else if (property == ElasticAttributeProvider.DEFAULT_GEOMETRY) {
                    if (isGeometry) {
                        Fragment f = new Fragment(id, "checkboxDefaultGeometry",
                                ElasticConfigurationPage.this);
                        f.add(new CheckBox("defaultGeometry", new PropertyModel<>(itemModel,
                                "defaultGeometry")));
                        return f;
                    } else {
                        return new Fragment(id, "empty", ElasticConfigurationPage.this);
                    }
                } else if (property == ElasticAttributeProvider.SRID) {
                    if (isGeometry) {
                        Fragment f = new Fragment(id, "label", ElasticConfigurationPage.this);
                        f.add(new Label("label", String.valueOf(att.getSrid())));
                        return f;
                    } else {
                        return new Fragment(id, "empty", ElasticConfigurationPage.this);
                    }
                } else if (property == ElasticAttributeProvider.DATE_FORMAT) {
                    if (att.getDateFormat() != null) {
                        Fragment f = new Fragment(id, "label", ElasticConfigurationPage.this);
                        f.add(new Label("label", String.valueOf(att.getDateFormat())));
                        return f;
                    } else {
                        return new Fragment(id, "empty", ElasticConfigurationPage.this);
                    }
                } else if (property == ElasticAttributeProvider.ANALYZED) {
                    if (att.getAnalyzed() != null && att.getAnalyzed()) {
                        Fragment f = new Fragment(id, "label", ElasticConfigurationPage.this);
                        f.add(new Label("label", "x"));
                        return f;
                    } else {
                        return new Fragment(id, "empty", ElasticConfigurationPage.this);
                    }
                } else if (property == ElasticAttributeProvider.STORED) {
                    if (att.isStored()) {
                        Fragment f = new Fragment(id, "label", ElasticConfigurationPage.this);
                        f.add(new Label("label", "x"));
                        return f;
                    } else {
                        return new Fragment(id, "empty", ElasticConfigurationPage.this);
                    } 
                } else if (property == ElasticAttributeProvider.ORDER) {
                    TextField<Integer> order = new TextField<>("order", new PropertyModel<>(itemModel, "order"));
                    Fragment f = new Fragment(id, "textOrderValue", ElasticConfigurationPage.this);
                    f.add(order);
                    return f;
                } else if (property == ElasticAttributeProvider.CUSTOM_NAME) {
                    TextField<String> customName = new TextField<>("customName", new PropertyModel<>(itemModel, "customName"));
                    Fragment f = new Fragment(id, "textCustomNameValue", ElasticConfigurationPage.this);
                    f.add(customName);
                    return f;
                }
                return null;
            }

            @Override
            protected void onPopulateItem(Property<ElasticAttribute> property, ListItem<Property<ElasticAttribute>> item) {
                if (property == ElasticAttributeProvider.STORED) {
                    item.add(new AttributeModifier("style",Model.of("text-align:center")));
                } else if (property == ElasticAttributeProvider.ANALYZED) {
                    item.add(new AttributeModifier("style",Model.of("text-align:center")));
                }
            }
        };
        atts.setOutputMarkupId(true);
        atts.setFilterVisible(false);
        atts.setSortable(false);
        atts.setPageable(false);
        atts.setOutputMarkupId(true);
        return atts;
    }

    /*
     * Render geometry type select
     */
    private static class GeometryTypeRenderer implements IChoiceRenderer<Object> {

        public Object getDisplayValue(Object object) {
            return ((Class<?>) object).getSimpleName();
        }

        public String getIdValue(Object object, int index) {
            return (String) getDisplayValue(object);
        }

        @Override
        public Object getObject(String id, IModel<? extends List<?>> choices) {
            for (Class<? extends Geometry> c : GEOMETRY_TYPES) {
                if (id.equals(getDisplayValue(c))) {
                    return c;
                }
            }
            return null;
        }
    }

    /**
     * Abstract method to implements in panel that opens the dialog to close the dialog itself <br>
     * This method is called after modal executes its operation
     * 
     * @param target ajax response target
     * @param layerInfo GeoServer layer configuration
     * @param layerConfig Elasticsearch layer configuration
     * 
     * @see #onSave
     * @see #onCancel
     * 
     */
    abstract void done(AjaxRequestTarget target, LayerInfo layerInfo, 
            ElasticLayerConfiguration layerConfig);

}


================================================
FILE: gs-web-elasticsearch/src/main/java/mil/nga/giat/elasticsearch/ElasticConfigurationPanel.html
================================================
<!--suppress ALL -->
<html xmlns:wicket="http://wicket.apache.org/">
<head></head>
<body>
	<wicket:panel>
		<div wicket:id="modal"></div>
		<div wicket:id="esPanel"></div>

		<wicket:fragment wicket:id="esPanelFragment">
			<div style="height: 50px">
				<a href="#" wicket:id="edit"> <wicket:message key="edit">Configure Elasticsearch fields</wicket:message>
				</a>
			</div>
		</wicket:fragment>
		
	</wicket:panel>
</body>
</html>


================================================
FILE: gs-web-elasticsearch/src/main/java/mil/nga/giat/elasticsearch/ElasticConfigurationPanel.java
================================================
/* (c) 2014 Open Source Geospatial Foundation - all rights reserved
 * This code is licensed under the GPL 2.0 license, available at the root
 * application directory.
 */

package mil.nga.giat.elasticsearch;

import java.io.IOException;
import java.util.List;
import java.util.logging.Level;

import mil.nga.giat.data.elasticsearch.ElasticAttribute;
import mil.nga.giat.data.elasticsearch.ElasticDataStore;
import mil.nga.giat.data.elasticsearch.ElasticLayerConfiguration;

import org.apache.wicket.Component;
import org.apache.wicket.MarkupContainer;
import org.apache.wicket.ajax.AbstractDefaultAjaxBehavior;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.markup.html.AjaxLink;
import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
import org.apache.wicket.markup.head.IHeaderResponse;
import org.apache.wicket.markup.head.OnLoadHeaderItem;
import org.apache.wicket.markup.html.panel.Fragment;
import org.apache.wicket.model.IModel;
import org.geoserver.catalog.Catalog;
import org.geoserver.catalog.CatalogBuilder;
import org.geoserver.catalog.DataStoreInfo;
import org.geoserver.catalog.FeatureTypeInfo;
import org.geoserver.catalog.LayerInfo;
import org.geoserver.catalog.ResourceInfo;
import org.geoserver.web.GeoServerApplication;
import org.geoserver.web.data.resource.ResourceConfigurationPage;
import org.geoserver.web.data.resource.ResourceConfigurationPanel;
import org.geoserver.web.wicket.ParamResourceModel;
import org.geotools.feature.NameImpl;
import org.opengis.feature.type.Name;

/**
 * Resource configuration panel to show a link to open Elasticsearch attribute 
 * modal dialog <br> If the Elasticsearch attribute are not configured for 
 * current layer, the modal dialog will be open at first resource configuration 
 * window opening <br> After modal dialog is closed the resource page is 
 * reloaded and feature configuration table updated
 * 
 */
@SuppressWarnings("WeakerAccess")
public class ElasticConfigurationPanel extends ResourceConfigurationPanel {

    private static final long serialVersionUID = 3382530429105288433L;

    private LayerInfo _layerInfo;

    private ElasticLayerConfiguration _layerConfig;

    /**
     * Adds Elasticsearch configuration panel link, configure modal dialog and 
     * implements modal callback.
     * 
     * @see ElasticConfigurationPage#done
     */

    public ElasticConfigurationPanel(final String panelId, final IModel<?> model) {
        super(panelId, model);
        final FeatureTypeInfo fti = (FeatureTypeInfo) model.getObject();

        final ModalWindow modal = new ModalWindow("modal");
        modal.setInitialWidth(800);
        modal.setTitle(new ParamResourceModel("modalTitle", ElasticConfigurationPanel.this));

        if (fti.getMetadata().get(ElasticLayerConfiguration.KEY) == null) {
            modal.add(new OpenWindowOnLoadBehavior());
        }

        modal.setContent(new ElasticConfigurationPage(panelId, model) {
            @Override
            void done(AjaxRequestTarget target, LayerInfo layerInfo, 
                    ElasticLayerConfiguration layerConfig) {
                _layerInfo = layerInfo;
                _layerConfig = layerConfig;

                try {
                    saveLayer((FeatureTypeInfo) getResourceInfo());
                } catch (IOException e) {
                    LOGGER.log(Level.SEVERE, e.getMessage(), e);
                    error(new ParamResourceModel("creationFailure", this, e).getString());
                }

                MarkupContainer parent = ElasticConfigurationPanel.this.getParent();
                while (!(parent == null || parent instanceof ResourceConfigurationPage)) {
                    parent = parent.getParent();
                }

                if (parent != null) {
                    ResourceInfo ri = ElasticConfigurationPanel.this.getResourceInfo();
                    ((ResourceConfigurationPage) parent).updateResource(ri, target);
                }

                modal.close(target);
            }
        });
        add(modal);

        AjaxLink<?> findLink = new AjaxLink("edit") {
            @Override
            public void onClick(AjaxRequestTarget target) {
                modal.show(target);
            }
        };
        final Fragment attributePanel = new Fragment("esPanel", "esPanelFragment", this);
        attributePanel.setOutputMarkupId(true);
        add(attributePanel);
        attributePanel.add(findLink);
    }

    /*
     * Open modal dialog on window load
     */
    private class OpenWindowOnLoadBehavior extends AbstractDefaultAjaxBehavior {
        @Override
        protected void respond(AjaxRequestTarget target) {
            ModalWindow window = (ModalWindow) getComponent();
            window.show(target);
        }

        @Override
        public void renderHead(Component component, IHeaderResponse response) {
            response.render(OnLoadHeaderItem.forScript(getCallbackScript().toString()));
        }
    }

    private void saveLayer(FeatureTypeInfo ft) throws IOException {
        GeoServerApplication app = (GeoServerApplication) getApplication();
        Catalog catalog = app.getCatalog();

        String namespace = ft.getNamespace().getURI();
        Name qualifiedName = new NameImpl(namespace, _layerInfo.getName());
        LayerInfo layerInfo = catalog.getLayerByName(qualifiedName);

        boolean isNew = ft.getId() == null || app.getCatalog().getResource(ft.getId(),ResourceInfo.class) == null;

        FeatureTypeInfo typeInfo;
        if (layerInfo == null || isNew) {
            // New
            DataStoreInfo dsInfo;
            dsInfo = catalog.getStore(ft.getStore().getId(), DataStoreInfo.class);
            ElasticDataStore ds = (ElasticDataStore) dsInfo.getDataStore(null);
            CatalogBuilder builder = new CatalogBuilder(catalog);
            builder.setStore(dsInfo);
            ElasticLayerConfiguration layerConfig;
            layerConfig = new ElasticLayerConfiguration(_layerConfig);
            layerConfig.setLayerName(_layerInfo.getName());
            layerConfig.getAttributes().clear();
            List<ElasticAttribute> attributes = _layerConfig.getAttributes();
            layerConfig.getAttributes().addAll(attributes);
            ds.setLayerConfiguration(layerConfig);

            FeatureTypeInfo _typeInfo = (FeatureTypeInfo) _layerInfo.getResource();
            typeInfo = builder.buildFeatureType(ds.getFeatureSource(qualifiedName));
            typeInfo.setName(_layerInfo.getName());
            typeInfo.getMetadata().put(ElasticLayerConfiguration.KEY, layerConfig);
            typeInfo.setEnabled(_typeInfo.isEnabled());
            typeInfo.setAdvertised(_typeInfo.isAdvertised());
            typeInfo.setTitle(_typeInfo.getTitle());
            typeInfo.setDescription(_typeInfo.getDescription());
            typeInfo.setAbstract(_typeInfo.getAbstract());
            typeInfo.getKeywords().addAll(_typeInfo.getKeywords());
            typeInfo.getMetadataLinks().addAll(_typeInfo.getMetadataLinks());
            typeInfo.getDataLinks().addAll(_typeInfo.getDataLinks());
            typeInfo.setSRS(_typeInfo.getSRS());
            typeInfo.setProjectionPolicy(_typeInfo.getProjectionPolicy());
            typeInfo.setNativeBoundingBox(_typeInfo.getNativeBoundingBox());
            typeInfo.setLatLonBoundingBox(_typeInfo.getLatLonBoundingBox());
            typeInfo.setCircularArcPresent(_typeInfo.isCircularArcPresent());
            typeInfo.setLinearizationTolerance(_typeInfo.getLinearizationTolerance());

            layerInfo = builder.buildLayer(typeInfo);
            builder.updateLayer(layerInfo, _layerInfo);
            layerInfo.setName(_layerInfo.getName());
            layerInfo.setResource(typeInfo);
        } else {
            // Update
            typeInfo = (FeatureTypeInfo) layerInfo.getResource();
            typeInfo.getMetadata().put(ElasticLayerConfiguration.KEY, _layerConfig);
        }
    }

}


================================================
FILE: gs-web-elasticsearch/src/main/java/mil/nga/giat/elasticsearch/ElasticConfigurationPanelInfo.java
================================================
/* (c) 2014 Open Source Geospatial Foundation - all rights reserved
 * This code is licensed under the GPL 2.0 license, available at the root
 * application directory.
 */

package mil.nga.giat.elasticsearch;

import org.geoserver.catalog.FeatureTypeInfo;
import org.geoserver.platform.ExtensionPriority;
import org.geoserver.web.data.resource.ResourceConfigurationPanelInfo;

/**
 * 
 * Implements ResourceConfigurationPanelInfo extension point to add Elasticsearch 
 * attribute configuration link on resource page. <br>
 * Priority is reduced under standard {@link ExtensionPriority#LOWEST} to shows
 * the Elasticsearch link after other panels.
 * 
 */
class ElasticConfigurationPanelInfo extends ResourceConfigurationPanelInfo implements ExtensionPriority {

    private static final long serialVersionUID = 1485404586629946126L;

    @Override
    public boolean canHandle(Object obj) {
        boolean canHandle = false;
        if (obj instanceof FeatureTypeInfo) {
            FeatureTypeInfo fti = (FeatureTypeInfo) obj;
            for (String st : getSupportedTypes()) {
                if (fti.getStore().getType().equals(st)) {
                    canHandle = true;
                    break;
                }
            }
        }
        return canHandle;
    }

    @Override
    public int getPriority() {
        return ExtensionPriority.LOWEST + 1;
    }

}


================================================
FILE: gs-web-elasticsearch/src/main/java/mil/nga/giat/elasticsearch/ElasticFeatureTypeCallback.java
================================================
/* (c) 2014 Open Source Geospatial Foundation - all rights reserved
 * This code is licensed under the GPL 2.0 license, available at the root
 * application directory.
 */
package mil.nga.giat.elasticsearch;

import mil.nga.giat.data.elasticsearch.ElasticDataStore;
import mil.nga.giat.data.elasticsearch.ElasticLayerConfiguration;
import static mil.nga.giat.data.elasticsearch.ElasticLayerConfiguration.KEY;

import org.geoserver.catalog.FeatureTypeInfo;
import org.geoserver.catalog.FeatureTypeCallback;
import org.geotools.data.DataAccess;
import org.opengis.feature.Feature;
import org.opengis.feature.type.FeatureType;
import org.opengis.feature.type.Name;

/**
 * 
 * Implementation of FeatureTypeInitializer extension point to initialize 
 * Elasticsearch datastore.
 * 
 * @see FeatureTypeCallback
 * 
 */
class ElasticFeatureTypeCallback implements FeatureTypeCallback {

    @Override
    public boolean canHandle(FeatureTypeInfo info,
            DataAccess<? extends FeatureType, ? extends Feature> dataAccess) {
        return dataAccess instanceof ElasticDataStore;
    }

    @Override
    public boolean initialize(FeatureTypeInfo info,
            DataAccess<? extends FeatureType, ? extends Feature> dataAccess, Name temporaryName) {

        ElasticLayerConfiguration layerConfig;
        layerConfig = (ElasticLayerConfiguration) info.getMetadata().get(KEY);
        if (layerConfig == null) {
            layerConfig = new ElasticLayerConfiguration(info.getName());
        }

        ((ElasticDataStore) dataAccess).setLayerConfiguration(layerConfig);

        return false;
    }

    @Override
    public void dispose(FeatureTypeInfo info,
            DataAccess<? extends FeatureType, ? extends Feature> dataAccess, Name temporaryName) {
        final ElasticLayerConfiguration layerConfig = (ElasticLayerConfiguration) info.getMetadata().get(KEY);
        if (layerConfig != null) {
            layerConfig.getAttributes().stream()
                    .filter(attr -> attr.getName().equals(info.getName()))
                    .findFirst()
                    .ifPresent(attribute -> layerConfig.getAttributes().remove(attribute));
            ((ElasticDataStore) dataAccess).getDocTypes().remove(info.getQualifiedName());
        }
    }

    @Override
    public void flush(FeatureTypeInfo info,
            DataAccess<? extends FeatureType, ? extends Feature> dataAccess) {
        // nothing to do
    }

}


================================================
FILE: gs-web-elasticsearch/src/main/java/mil/nga/giat/elasticsearch/ElasticXStreamInitializer.java
================================================
/* (c) 2014 Open Source Geospatial Foundation - all rights reserved
 * (c) 2014 OpenPlans
 * This code is licensed under the GPL 2.0 license, available at the root
 * application directory.
 */

package mil.nga.giat.elasticsearch;

import mil.nga.giat.data.elasticsearch.ElasticAttribute;
import mil.nga.giat.data.elasticsearch.ElasticLayerConfiguration;

import org.geoserver.config.util.XStreamPersister;
import org.geoserver.config.util.XStreamPersisterInitializer;

import com.thoughtworks.xstream.XStream;

/**
 * 
 * Implementation of XStreamPersisterInitializer extension point to serialize ElasticLayerConfiguration
 *
 */
class ElasticXStreamInitializer implements XStreamPersisterInitializer {

    @Override
    public void init(XStreamPersister persister) {
        persister.registerBreifMapComplexType("elasticLayerConfiguration",ElasticLayerConfiguration.class);
        XStream xs = persister.getXStream();
        xs.alias("esAttribute", ElasticAttribute.class);
    }

}


================================================
FILE: gs-web-elasticsearch/src/main/java/mil/nga/giat/elasticsearch/ElasticXStreamPersisterInitializer.java
================================================
package mil.nga.giat.elasticsearch;

import org.geoserver.config.util.XStreamPersister;
import org.geoserver.config.util.XStreamPersisterInitializer;

class ElasticXStreamPersisterInitializer implements XStreamPersisterInitializer {

    @Override
    public void init(XStreamPersister persister) {
        persister.getXStream().allowTypes(new String[] {
                "mil.nga.giat.data.elasticsearch.ElasticAttribute"
        });
    }

}


================================================
FILE: gs-web-elasticsearch/src/main/resources/GeoServerApplication.properties
================================================
# suppress inspection "UnusedProperty" for whole file
data.resource.config.elasticsearch = Elasticsearch
ElasticConfigurationPanel.modalTitle = Elasticsearch fields configuration
ElasticConfigurationPanel.edit = Configure Elasticsearch fields
ElasticConfigurationPage.attributes = Attributes
ElasticConfigurationPage.th.name = Name
ElasticConfigurationPage.th.type = Type
ElasticConfigurationPage.th.use = Use
ElasticConfigurationPage.th.geometry = Geometry
ElasticConfigurationPage.th.srid = SRID
ElasticConfigurationPage.th.defaultGeometry = Default Geometry
ElasticConfigurationPage.th.dateFormat = Date Format
ElasticConfigurationPage.th.analyzed = Analyzed
ElasticConfigurationPage.th.stored = Stored
ElasticConfigurationPage.th.order = Order
ElasticConfigurationPage.th.customName = Custom Name
ElasticConfigurationPage.useAll = Use all
ElasticConfigurationPage.useShortName = Short names
ElasticConfigurationPage.es_save = Apply
ElasticConfigurationPage.es_cancel = Cancel
ElasticConfigurationPage.creationFailure = Creation failure
ElasticConfigurationPage.geomEmptyFailure = Select field for geometry


================================================
FILE: gt-elasticsearch/LGPL
================================================
		  GNU LESSER GENERAL PUBLIC LICENSE
		       Version 2.1, February 1999

 Copyright (C) 1991, 1999 Free Software Foundation, Inc.
 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.

[This is the first released version of the Lesser GPL.  It also counts
 as the successor of the GNU Library Public License, version 2, hence
 the version number 2.1.]

			    Preamble

  The licenses for most software are designed to take away your
freedom to share and change it.  By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.

  This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it.  You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations below.

  When we speak of free software, we are referring to freedom of use,
not price.  Our General Public Licenses are designed to make sure that
you have the freedom to distribute copies of free software (and charge
for this service if you wish); that you receive source code or can get
it if you want it; that you can change the software and use pieces of
it in new free programs; and that you are informed that you can do
these things.

  To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights.  These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.

  For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you.  You must make sure that they, too, receive or can get the source
code.  If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it.  And you must show them these terms so they know their rights.

  We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.

  To protect each distributor, we want to make it very clear that
there is no warranty for the free library.  Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.

  Finally, software patents pose a constant threat to the existence of
any free program.  We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder.  Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.

  Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License.  This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License.  We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.

  When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library.  The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom.  The Lesser General
Public License permits more lax criteria for linking other code with
the library.

  We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License.  It also provides other free software developers Less
of an advantage over competing non-free programs.  These disadvantages
are the reason we use the ordinary General Public License for many
libraries.  However, the Lesser license provides advantages in certain
special circumstances.

  For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it becomes
a de-facto standard.  To achieve this, non-free programs must be
allowed to use the library.  A more frequent case is that a free
library does the same job as widely used non-free libraries.  In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.

  In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software.  For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.

  Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.

  The precise terms and conditions for copying, distribution and
modification follow.  Pay close attention to the difference between a
"work based on the library" and a "work that uses the library".  The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.

		  GNU LESSER GENERAL PUBLIC LICENSE
   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

  0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".

  A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.

  The "Library", below, refers to any such software library or work
which has been distributed under these terms.  A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language.  (Hereinafter, translation is
included without limitation in the term "modification".)

  "Source code" for a work means the preferred form of the work for
making modifications to it.  For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.

  Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope.  The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it).  Whether that is true depends on what the Library does
and what the program that uses the Library does.
  
  1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.

  You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.

  2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:

    a) The modified work must itself be a software library.

    b) You must cause the files modified to carry prominent notices
    stating that you changed the files and the date of any change.

    c) You must cause the whole of the work to be licensed at no
    charge to all third parties under the terms of this License.

    d) If a facility in the modified Library refers to a function or a
    table of data to be supplied by an application program that uses
    the facility, other than as an argument passed when the facility
    is invoked, then you must make a good faith effort to ensure that,
    in the event an application does not supply such function or
    table, the facility still operates, and performs whatever part of
    its purpose remains meaningful.

    (For example, a function in a library to compute square roots has
    a purpose that is entirely well-defined independent of the
    application.  Therefore, Subsection 2d requires that any
    application-supplied function or table used by this function must
    be optional: if the application does not supply it, the square
    root function must still compute square roots.)

These requirements apply to the modified work as a whole.  If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works.  But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.

Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.

In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.

  3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library.  To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License.  (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.)  Do not make any other change in
these notices.

  Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.

  This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.

  4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.

  If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.

  5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library".  Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.

  However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library".  The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.

  When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library.  The
threshold for this to be true is not precisely defined by law.

  If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work.  (Executables containing this object code plus portions of the
Library will still fall under Section 6.)

  Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.

  6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.

  You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License.  You must supply a copy of this License.  If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License.  Also, you must do one
of these things:

    a) Accompany the work with the complete corresponding
    machine-readable source code for the Library including whatever
    changes were used in the work (which must be distributed under
    Sections 1 and 2 above); and, if the work is an executable linked
    with the Library, with the complete machine-readable "work that
    uses the Library", as object code and/or source code, so that the
    user can modify the Library and then relink to produce a modified
    executable containing the modified Library.  (It is understood
    that the user who changes the contents of definitions files in the
    Library will not necessarily be able to recompile the application
    to use the modified definitions.)

    b) Use a suitable shared library mechanism for linking with the
    Library.  A suitable mechanism is one that (1) uses at run time a
    copy of the library already present on the user's computer system,
    rather than copying library functions into the executable, and (2)
    will operate properly with a modified version of the library, if
    the user installs one, as long as the modified version is
    interface-compatible with the version that the work was made with.

    c) Accompany the work with a written offer, valid for at
    least three years, to give the same user the materials
    specified in Subsection 6a, above, for a charge no more
    than the cost of performing this distribution.

    d) If distribution of the work is made by offering access to copy
    from a designated place, offer equivalent access to copy the above
    specified materials from the same place.

    e) Verify that the user has already received a copy of these
    materials or that you have already sent this user a copy.

  For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it.  However, as a special exception,
the materials to be distributed need not include anything that is
normally distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.

  It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system.  Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.

  7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:

    a) Accompany the combined library with a copy of the same work
    based on the Library, uncombined with any other library
    facilities.  This must be distributed under the terms of the
    Sections above.

    b) Give prominent notice with the combined library of the fact
    that part of it is a work based on the Library, and explaining
    where to find the accompanying uncombined form of the same work.

  8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License.  Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License.  However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.

  9. You are not required to accept this License, since you have not
signed it.  However, nothing else grants you permission to modify or
distribute the Library or its derivative works.  These actions are
prohibited by law if you do not accept this License.  Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.

  10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions.  You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.

  11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License.  If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all.  For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.

If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.

It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices.  Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.

This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.

  12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded.  In such case, this License incorporates the limitation as if
written in the body of this License.

  13. The Free Software Foundation may publish revised and/or new
versions of the Lesser General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.

Each version is given a distinguishing version number.  If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation.  If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.

  14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission.  For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this.  Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.

			    NO WARRANTY

  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.

		     END OF TERMS AND CONDITIONS

           How to Apply These Terms to Your New Libraries

  If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change.  You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).

  To apply these terms, attach the following notices to the library.  It is
safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.

    <one line to give the library's name and a brief idea of what it does.>
    Copyright (C) <year>  <name of author>

    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.

    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public
    License along with this library; if not, write to the Free Software
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA

Also add information on how to contact you by electronic and paper mail.

You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary.  Here is a sample; alter the names:

  Yoyodyne, Inc., hereby disclaims all copyright interest in the
  library `Frob' (a library for tweaking knobs) written by James Random Hacker.

  <signature of Ty Coon>, 1 April 1990
  Ty Coon, President of Vice

That's all there is to it!



================================================
FILE: gt-elasticsearch/LICENSE
================================================
This module is licensed under the terms of the GNU Lesser General Public 
License (LGPL), version 2 or later. The directory containing this file should 
also contain a copy of the LGPL, as a file named LGPL.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Lesser General Public License for more details.


================================================
FILE: gt-elasticsearch/pom.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <artifactId>elasticgeo</artifactId>
    <groupId>mil.nga.giat</groupId>
    <version>2.16-SNAPSHOT</version>
  </parent>
  <artifactId>gt-elasticsearch</artifactId>
  <version>2.16-SNAPSHOT</version>
  <packaging>jar</packaging>
  <name>GeoTools Elasticsearch DataStore</name>
  <properties>
    <docker.image>docker.elastic.co/elasticsearch/elasticsearch</docker.image>
  </properties>
  <dependencies>
    <dependency>
      <groupId>org.springframework.security</groupId>
      <artifactId>spring-security-core</artifactId>
      <version>5.1.5.RELEASE</version>
      <exclusions>
        <exclusion>
          <groupId>aopalliance</groupId>
          <artifactId>aopalliance</artifactId>
        </exclusion>
      </exclusions>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>mil.nga.giat</groupId>
      <artifactId>joda-shaded</artifactId>
      <version>${project.version}</version>
      <exclusions>
        <exclusion>
          <groupId>joda-time</groupId>
          <artifactId>joda-time</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.elasticsearch.client</groupId>
      <artifactId>elasticsearch-rest-client</artifactId>
      <version>${es.version}</version>
    </dependency>
    <dependency>
      <groupId>org.locationtech.spatial4j</groupId>
      <artifactId>spatial4j</artifactId>
      <version>0.6</version>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-core</artifactId>
      <version>${jackson.version}</version>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-databind</artifactId>
      <version>${jackson.version}</version>
    </dependency>
    <dependency>
      <groupId>com.github.davidmoten</groupId>
      <artifactId>geo</artifactId>
      <version>0.7.4</version>
    </dependency>
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
      <version>${guava.version}</version>
    </dependency>
    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
      <version>${log4j.version}</version>
    </dependency>

    <dependency>
      <groupId>org.geotools</groupId>
      <artifactId>gt-main</artifactId>
      <version>${geotools.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.geotools</groupId>
      <artifactId>gt-epsg-hsql</artifactId>
      <version>${geotools.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.geotools</groupId>
      <artifactId>gt-geojson</artifactId>
      <version>${geotools.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.geotools</groupId>
      <artifactId>gt-cql</artifactId>
      <version>${geotools.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <version>2.7.5</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.11</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.hamcrest</groupId>
      <artifactId>hamcrest-all</artifactId>
      <version>1.3</version>
      <scope>test</scope>
    </dependency>
 </dependencies>
  <build>
    <resources>
      <resource>
        <filtering>true</filtering>
        <directory>src/main/resources</directory>
      </resource>
    </resources>
    <plugins>
      <plugin>
        <artifactId>maven-failsafe-plugin</artifactId>
        <version>2.19.1</version>
        <configuration>
          <argLine>${failsafeArgLine} -Djava.util.logging.config.file=${project.build.directory}/test-classes/test-classes/logging.properties</argLine>
          <skipTests>${skip.integration.tests}</skipTests>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>integration-test</goal>
              <goal>verify</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>docker</id>
      <activation>
        <property>
          <name>!skip.integration.tests</name>
        </property>
      </activation>
      <properties>
        <docker.removeAll>true</docker.removeAll>
      </properties>
      <build>
        <plugins>
          <plugin>
            <groupId>io.fabric8</groupId>
            <artifactId>docker-maven-plugin</artifactId>
            <version>0.18.1</version>
            <configuration>
              <images>
                <image>
                  <alias>elasticsearch</alias>
                  <name>${docker.image}:${es.test.version}</name>
                  <run>
                    <env>
                        <ES_JAVA_OPTS>-Xmx512m -Xms512m</ES_JAVA_OPTS>
                        <discovery.type>single-node</discovery.type>
                        <xpack.security.enabled>false</xpack.security.enabled>
                    </env>
                    <ports>
                      <port>9200:9200</port>
                    </ports>
                    <wait>
                      <time>60000</time>
                      <http>
                        <url>http://localhost:9200/_cluster/health?wait_for_status=yellow&amp;timeout=60s</url>
                        <method>GET</method>
                        <status>200</status>
                      </http>
                    </wait>
                  </run>
                </image>
              </images>
            </configuration>
            <executions>
              <execution>
                <id>docker-start</id>
                <phase>pre-integration-test</phase>
                <goals>
                  <goal>start</goal>
                </goals>
              </execution>
               <execution>
                <id>docker-stop</id>
                <phase>post-integration-test</phase>
                <goals>
                  <goal>stop</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>


================================================
FILE: gt-elasticsearch/src/main/java/mil/nga/giat/data/elasticsearch/ElasticAggregation.java
================================================
/*
 * This file is hereby placed into the Public Domain. This means anyone is
 * free to do whatever they wish with this file.
 */
package mil.nga.giat.data.elasticsearch;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

import java.util.List;
import java.util.Map;

@JsonIgnoreProperties(ignoreUnknown = true)
class ElasticAggregation {

    private List<Map<String,Object>> buckets;

    public List<Map<String, Object>> getBuckets() {
        return buckets;
    }

    public void setBuckets(List<Map<String, Object>> buckets) {
        this.buckets = buckets;
    }

    @Override
    public String toString() {
        return "ElasticAggregation[numBuckets=" +
                (buckets != null ? buckets.size() : 0) +
                "]";
    }

}


================================================
FILE: gt-elasticsearch/src/main/java/mil/nga/giat/data/elasticsearch/ElasticAttribute.java
================================================
/*
 * This file is hereby placed into the Public Domain. This means anyone is
 * free to do whatever they wish with this file.
 */
package mil.nga.giat.data.elasticsearch;

import java.io.Serializable;
import java.util.Objects;
import java.util.regex.Pattern;

/**
 * Class describing and Elasticsearch attribute including name, type and
 * optional information on geometry and date types. Also includes an alternative
 * short name, if applicable, that can be used instead of the full path both in
 * the feature type and backend Elasticsearch queries.
 *
 */
public class ElasticAttribute implements Serializable, Comparable<ElasticAttribute> {

    public enum ElasticGeometryType {
        GEO_POINT,
        GEO_SHAPE
    }

    private static final Pattern beginLetters = Pattern.compile("^[A-Za-z_].*");

    private static final long serialVersionUID = 8839579461838862328L;

    private final String name;

    private String shortName;

    private Boolean useShortName;

    private Class<?> type;

    private ElasticGeometryType geometryType;

    private Boolean use;

    private Boolean defaultGeometry;

    private Integer srid;

    private String dateFormat;

    private Boolean analyzed;

    private boolean stored;

    private boolean nested;

    private Integer order;

    private String customName;

    public ElasticAttribute(String name) {
        super();
        this.name = name;
        this.use = true;
        this.defaultGeometry = false;
        this.useShortName = false;
        this.stored = false;
        this.nested = false;
    }

    public ElasticAttribute(ElasticAttribute other) {
        this.name = other.name;
        this.shortName = other.shortName;
        this.type = other.type;
        this.use = other.use;
        this.defaultGeometry = other.defaultGeometry;
        this.srid = other.srid;
        this.dateFormat = other.dateFormat;
        this.useShortName = other.useShortName;
        this.geometryType = other.geometryType;
        this.analyzed = other.analyzed;
        this.stored = other.stored;
        this.nested = other.nested;
        this.order = other.order;
        this.customName = other.customName;
    }

    public String getName() {
        return name;
    }

    public String getShortName() {
        return shortName;
    }

    public void setShortName(String shortName) {
        this.shortName = shortName;
    }

    public Boolean getUseShortName() {
        return useShortName;
    }

    public void setUseShortName(Boolean useShortName) {
        this.useShortName = useShortName;
    }

    public Class<?> getType() {
        return type;
    }

    public void setType(Class<?> type) {
        this.type = type;
    }

    public ElasticGeometryType getGeometryType() {
        return geometryType;
    }

    public void setGeometryType(ElasticGeometryType geometryType) {
        this.geometryType = geometryType;
    }

    public Boolean isUse() {
        return use;
    }

    public void setUse(Boolean use) {
        this.use = use;
    }

    public Boolean isDefaultGeometry() {
        return defaultGeometry;
    }

    public void setDefaultGeometry(Boolean defaultGeometry) {
        this.defaultGeometry = defaultGeometry;
    }

    public Integer getSrid() {
        return srid;
    }

    public void setSrid(Integer srid) {
        this.srid = srid;
    }

    public String getDateFormat() {
        return dateFormat;
    }

    public void setDateFormat(String dateFormat) {
        this.dateFormat = dateFormat;
    }

    public Boolean getAnalyzed() {
        return analyzed;
    }

    public void setAnalyzed(Boolean analyzed) {
        this.analyzed = analyzed;
    }

    public boolean isStored() {
        return stored;
    }

    public void setStored(boolean stored) {
        this.stored = stored;
    }

    public boolean isNested() {
        return nested;
    }

    public void setNested(boolean nested) {
        this.nested = nested;
    }

    public void setOrder(Integer order) {
        this.order = order;
    }

    public Integer getOrder() {
        return this.order;
    }

    public void setCustomName(String name) {
        this.customName = normalizeName(name);
    }

    public String getCustomName() {
        return this.customName;
    }

    public String getDisplayName() {
        final String displayName;
        if (useShortName) {
            displayName = shortName;
        } else {
            displayName = name;
        }
        return displayName;
    }

    @Override
    public int hashCode() {
        return Objects.hash(name, type, use, defaultGeometry, srid, dateFormat,
                useShortName, geometryType, analyzed, stored, nested, order, customName);
    }

    @Override
    public boolean equals(Object obj) {
        boolean equal;
        if (obj == null || getClass() != obj.getClass()) {
            equal = false;
        } else {
            ElasticAttribute other = (ElasticAttribute) obj;
            equal = Objects.equals(name, other.name);
            equal &= Objects.equals(type, other.type);
            equal &= Objects.equals(use, other.use);
            equal &= Objects.equals(defaultGeometry, other.defaultGeometry);
            equal &= Objects.equals(srid, other.srid);
            equal &= Objects.equals(dateFormat, other.dateFormat);
            equal &= Objects.equals(useShortName, other.useShortName);
            equal &= Objects.equals(geometryType, other.geometryType);
            equal &= Objects.equals(analyzed, other.analyzed);
            equal &= Objects.equals(stored, other.stored);
            equal &= Objects.equals(nested, other.nested);
            equal &= Objects.equals(order, other.order);
            equal &= Objects.equals(customName, other.customName);
        }
        return equal;
    }

    /**
     * Implement comparison logic
     * @param o is a non-null ElasticAttribute
     * @return negative for before, zero for same, positive after
     */
    @Override
    public int compareTo(@SuppressWarnings("NullableProblems") ElasticAttribute o) {
        if (this.order == null) {
            return o.order == null ? this.name.compareTo(o.name) : 1;
        }
        if (o.order == null) {
            return -1;
        }
        int i = this.order.compareTo(o.order);
        return i == 0 ? this.name.compareTo(o.name) : i;
    }

    /**
     * Perform basic update to the given name to make it XML namespace
     * compliant.
     *
     * @param name Raw name
     * @return Name that is XML safe
     */
    private static String normalizeName (String name) {

        String normalName = name;

        /* XML element naming rules:
         * 1. Element names must start with a letter or underscore
         * 2. Element names cannot start with the letters xml
         * 3. Element names cannot contain spaces
         */
        if (normalName.toLowerCase().startsWith("xml")) {
            normalName = "_".concat(normalName);
        } else if (! beginLetters.matcher(normalName).matches()) {
            normalName = "_".concat(normalName);
        }
        /* Simply replace all spaces in the name with "_". */
        return normalName.replaceAll(" ", "_");
    }
}


================================================
FILE: gt-elasticsearch/src/main/java/mil/nga/giat/data/elasticsearch/ElasticCapabilities.java
================================================
/*
 * This file is hereby placed into the Public Domain. This means anyone is
 * free to do whatever they wish with this file.
 */
package mil.nga.giat.data.elasticsearch;

import java.util.HashMap;
import java.util.Map;

import org.geotools.filter.Capabilities;
import org.geotools.filter.capability.FilterCapabilitiesImpl;
import org.geotools.filter.capability.TemporalCapabilitiesImpl;
import org.geotools.filter.capability.TemporalOperatorImpl;
import org.geotools.filter.visitor.IsFullySupportedFilterVisitor;
import org.opengis.filter.ExcludeFilter;
import org.opengis.filter.Filter;
import org.opengis.filter.Id;
import org.opengis.filter.IncludeFilter;
import org.opengis.filter.PropertyIsBetween;
import org.opengis.filter.PropertyIsLike;
import org.opengis.filter.PropertyIsNull;
import org.opengis.filter.capability.TemporalCapabilities;
import org.opengis.filter.capability.TemporalOperators;
import org.opengis.filter.spatial.BBOX;
import org.opengis.filter.spatial.Beyond;
import org.opengis.filter.spatial.Contains;
import org.opengis.filter.spatial.DWithin;
import org.opengis.filter.spatial.Disjoint;
import org.opengis.filter.spatial.Intersects;
import org.opengis.filter.spatial.Within;
import org.opengis.filter.temporal.After;
import org.opengis.filter.temporal.AnyInteracts;
import org.opengis.filter.temporal.Before;
import org.opengis.filter.temporal.Begins;
import org.opengis.filter.temporal.BegunBy;
import org.opengis.filter.temporal.BinaryTemporalOperator;
import org.opengis.filter.temporal.During;
import org.opengis.filter.temporal.EndedBy;
import org.opengis.filter.temporal.Ends;
import org.opengis.filter.temporal.Meets;
import org.opengis.filter.temporal.MetBy;
import org.opengis.filter.temporal.OverlappedBy;
import org.opengis.filter.temporal.TContains;
import org.opengis.filter.temporal.TEquals;
import org.opengis.filter.temporal.TOverlaps;

/**
 * Custom {@link Capabilities} supporting temporal capabilities and operators. Uses a custom {@link IsFullySupportedFilterVisitor}
 * to enable support for {@link IncludeFilter}, {@link ExcludeFilter} and {@link BegunBy}.
 *
 */
class ElasticCapabilities extends Capabilities {
    private static final Map<Class<?>,String> temporalNames;
    static {
        temporalNames = new HashMap<>();
        temporalNames.put(After.class, After.NAME );
        temporalNames.put(AnyInteracts.class, AnyInteracts.NAME );
        temporalNames.put(Before.class, Before.NAME );
        temporalNames.put(Begins.class, Begins.NAME );
        temporalNames.put(BegunBy.class, BegunBy.NAME );
        temporalNames.put(During.class, During.NAME );
        temporalNames.put(EndedBy.class, EndedBy.NAME );
        temporalNames.put(Ends.class, Ends.NAME );
        temporalNames.put(Meets.class, Meets.NAME );
        temporalNames.put(MetBy.class, MetBy.NAME );
        temporalNames.put(OverlappedBy.class, OverlappedBy.NAME );
        temporalNames.put(TContains.class, TContains.NAME );
        temporalNames.put(TEquals.class, TEquals.NAME );
        temporalNames.put(TOverlaps.class, TOverlaps.NAME );
    }

    private IsFullySupportedFilterVisitor fullySupportedVisitor;

    public ElasticCapabilities() {
        super(new ElasticFilterCapabilities());

        addAll(LOGICAL_OPENGIS);
        addAll(SIMPLE_COMPARISONS_OPENGIS);
        addType(PropertyIsNull.class);
        addType(PropertyIsBetween.class);
        addType(Id.class);
        addType(IncludeFilter.class);
        addType(ExcludeFilter.class);
        addType(PropertyIsLike.class);

        // spatial filters
        addType(BBOX.class);
        addType(Contains.class);
        //addType(Crosses.class);
        addType(Disjoint.class);
        //addType(Equals.class);
        addType(Intersects.class);
        //addType(Overlaps.class);
        //addType(Touches.class);
        addType(Within.class);
        addType(DWithin.class);
        addType(Beyond.class);

        //temporal filters
        addType(After.class);
        addType(Before.class);
        addType(Begins.class);
        addType(BegunBy.class);
        addType(During.class);
        addType(Ends.class);
        addType(EndedBy.class);
        addType(TContains.class);
        addType(TEquals.class);
    }

    @Override
    public boolean fullySupports(Filter filter) {
        if( fullySupportedVisitor == null ){
            fullySupportedVisitor = new ElasticIsFullySupportedFilterVisitor();
        }
        return filter != null ? (Boolean) filter.accept( fullySupportedVisitor, null ) : false;
    }

    @Override
    public String toOperationName( @SuppressWarnings("rawtypes") Class filterType ) {
        if (filterType != null && temporalNames.containsKey(filterType)) {
            return temporalNames.get(filterType);
        }
        return super.toOperationName(filterType);
    }

    @Override
    public void addName( String name ) {
        if (name != null && temporalNames.containsValue(name)) {
            final TemporalOperators operators = getContents().getTemporalCapabilities().getTemporalOperators();
            operators.getOperators().add(new TemporalOperatorImpl(name));
        } else {
            super.addName(name);
        }
    }

    private static class ElasticFilterCapabilities extends FilterCapabilitiesImpl {

        TemporalCapabilitiesImpl temporal;

        @Override
        public TemporalCapabilities getTemporalCapabilities() {
            if( temporal == null ){
                temporal = new TemporalCapabilitiesImpl();
                super.setTemporal(temporal);
            }
            return temporal;
        }

    }

    private class ElasticIsFullySupportedFilterVisitor extends IsFullySupportedFilterVisitor {

        ElasticIsFullySupportedFilterVisitor() {
            super(getContents());
        }

        public Object visit( ExcludeFilter filter, Object extraData ) {
            return true;
        }

        public Object visit( IncludeFilter filter, Object extraData ) {
            return true;
        }

        public Object visit(BegunBy begunBy, Object extraData) {
            return visit((BinaryTemporalOperator)begunBy, BegunBy.NAME);
        }
    }

}


================================================
FILE: gt-elasticsearch/src/main/java/mil/nga/giat/data/elasticsearch/ElasticClient.java
================================================
/*
 * This file is hereby placed into the Public Domain. This means anyone is
 * free to do whatever they wish with this file.
 */
package mil.nga.giat.data.elasticsearch;

import java.io.Closeable;
import java.io.IOException;
import java.util.List;
import java.util.Map;
import java.util.Set;

interface ElasticClient extends Closeable {

    String RUN_AS = "es-security-runas-user";

    double getVersion();

    List<String> getTypes(String indexName) throws IOException;

    Map<String,Object> getMapping(String indexName, String type) throws IOException;

    ElasticResponse search(String searchIndices, String type, ElasticRequest request) throws IOException;

    ElasticResponse scroll(String scrollId, Integer scrollTime) throws IOException;

    @Override
    void close() throws IOException;

    void clearScroll(Set<String> scrollIds) throws IOException;

}


================================================
FILE: gt-elasticsearch/src/main/java/mil/nga/giat/data/elasticsearch/ElasticConstants.java
================================================
/*
 * This file is hereby placed into the Public Domain. This means anyone is
 * free to do whatever they wish with this file.
 */
package mil.nga.giat.data.elasticsearch;

import java.util.Collections;
import java.util.Map;

import com.google.common.collect.ImmutableMap;

import mil.nga.giat.data.elasticsearch.ElasticAttribute.ElasticGeometryType;

final class ElasticConstants {

    public static final Map<String,Object> MATCH_ALL = ImmutableMap.of("m
Download .txt
gitextract_d1ek5of1/

├── .gitignore
├── .travis.yml
├── LICENSE
├── README.md
├── gs-web-elasticsearch/
│   ├── LICENSE
│   ├── doc/
│   │   └── index.rst
│   ├── pom.xml
│   └── src/
│       ├── assembly/
│       │   └── dist.xml
│       └── main/
│           ├── java/
│           │   ├── applicationContext.xml
│           │   └── mil/
│           │       └── nga/
│           │           └── giat/
│           │               └── elasticsearch/
│           │                   ├── ElasticAttributeProvider.java
│           │                   ├── ElasticConfigurationPage.html
│           │                   ├── ElasticConfigurationPage.java
│           │                   ├── ElasticConfigurationPanel.html
│           │                   ├── ElasticConfigurationPanel.java
│           │                   ├── ElasticConfigurationPanelInfo.java
│           │                   ├── ElasticFeatureTypeCallback.java
│           │                   ├── ElasticXStreamInitializer.java
│           │                   └── ElasticXStreamPersisterInitializer.java
│           └── resources/
│               └── GeoServerApplication.properties
├── gt-elasticsearch/
│   ├── LGPL
│   ├── LICENSE
│   ├── pom.xml
│   └── src/
│       ├── main/
│       │   ├── java/
│       │   │   └── mil/
│       │   │       └── nga/
│       │   │           └── giat/
│       │   │               └── data/
│       │   │                   └── elasticsearch/
│       │   │                       ├── ElasticAggregation.java
│       │   │                       ├── ElasticAttribute.java
│       │   │                       ├── ElasticCapabilities.java
│       │   │                       ├── ElasticClient.java
│       │   │                       ├── ElasticConstants.java
│       │   │                       ├── ElasticDataStore.java
│       │   │                       ├── ElasticDataStoreFactory.java
│       │   │                       ├── ElasticFeatureReader.java
│       │   │                       ├── ElasticFeatureReaderScroll.java
│       │   │                       ├── ElasticFeatureSource.java
│       │   │                       ├── ElasticFeatureTypeBuilder.java
│       │   │                       ├── ElasticHit.java
│       │   │                       ├── ElasticLayerConfiguration.java
│       │   │                       ├── ElasticMappings.java
│       │   │                       ├── ElasticParserUtil.java
│       │   │                       ├── ElasticRequest.java
│       │   │                       ├── ElasticResponse.java
│       │   │                       ├── ElasticResults.java
│       │   │                       ├── FilterToElastic.java
│       │   │                       ├── FilterToElasticException.java
│       │   │                       ├── FilterToElasticHelper.java
│       │   │                       ├── GeohashUtil.java
│       │   │                       ├── RestElasticClient.java
│       │   │                       └── TotalDeserializer.java
│       │   └── resources/
│       │       └── META-INF/
│       │           └── services/
│       │               └── org.geotools.data.DataStoreFactorySpi
│       └── test/
│           ├── java/
│           │   └── mil/
│           │       └── nga/
│           │           └── giat/
│           │               └── data/
│           │                   └── elasticsearch/
│           │                       ├── ElasticAggregationReaderTest.java
│           │                       ├── ElasticAttributeTest.java
│           │                       ├── ElasticDataStoreFinderIT.java
│           │                       ├── ElasticDataStoreIT.java
│           │                       ├── ElasticDatastoreFactoryTest.java
│           │                       ├── ElasticFeatureFilterIT.java
│           │                       ├── ElasticFilterTest.java
│           │                       ├── ElasticGeometryFilterIT.java
│           │                       ├── ElasticParserUtilTest.java
│           │                       ├── ElasticResponseTest.java
│           │                       ├── ElasticTemporalFilterIT.java
│           │                       ├── ElasticTestSupport.java
│           │                       ├── ElasticViewParametersFilterIT.java
│           │                       ├── GeohashUtilTest.java
│           │                       ├── RandomGeometryBuilder.java
│           │                       └── RestElasticClientTest.java
│           └── resources/
│               ├── README.md
│               ├── active_mappings.json
│               ├── active_mappings_legacy.json
│               ├── active_mappings_ng.json
│               ├── log4j.properties
│               ├── logging.properties
│               ├── mockito-extensions/
│               │   └── org.mockito.plugins.MockMaker
│               ├── requirements.txt
│               ├── test_index.py
│               └── wifiAccessPoint.json
├── gt-elasticsearch-process/
│   ├── LGPL
│   ├── LICENSE
│   ├── pom.xml
│   └── src/
│       ├── main/
│       │   ├── java/
│       │   │   └── mil/
│       │   │       └── nga/
│       │   │           └── giat/
│       │   │               └── process/
│       │   │                   └── elasticsearch/
│       │   │                       ├── BBOXRemovingFilterVisitor.java
│       │   │                       ├── BasicGeoHashGrid.java
│       │   │                       ├── GeoHashGrid.java
│       │   │                       ├── GeoHashGridProcess.java
│       │   │                       ├── GridCell.java
│       │   │                       ├── GridCoverageUtil.java
│       │   │                       ├── MetricGeoHashGrid.java
│       │   │                       ├── NestedAggGeoHashGrid.java
│       │   │                       └── RasterScale.java
│       │   └── resources/
│       │       └── META-INF/
│       │           └── services/
│       │               ├── org.geotools.process.ProcessFactory
│       │               └── org.geotools.process.vector.VectorProcess
│       └── test/
│           └── java/
│               └── mil/
│                   └── nga/
│                       └── giat/
│                           └── process/
│                               └── elasticsearch/
│                                   ├── GeoHashGridProcessTest.java
│                                   ├── GeoHashGridTest.java
│                                   ├── GridCoverageUtilTest.java
│                                   ├── MetricGeoHashGridTest.java
│                                   ├── NestedAggGeoHashGridTest.java
│                                   ├── RasterScaleTest.java
│                                   └── TestUtil.java
├── joda-shaded/
│   ├── LICENSE.txt
│   ├── NOTICE.txt
│   ├── pom.xml
│   └── src/
│       └── main/
│           └── java/
│               └── org/
│                   └── elasticsearch/
│                       └── common/
│                           └── Strings.java
└── pom.xml
Download .txt
SYMBOL INDEX (908 symbols across 64 files)

FILE: gs-web-elasticsearch/src/main/java/mil/nga/giat/elasticsearch/ElasticAttributeProvider.java
  class ElasticAttributeProvider (line 20) | class ElasticAttributeProvider extends GeoServerDataProvider<ElasticAttr...
    method getPropertyValue (line 40) | @Override
    method ElasticAttributeProvider (line 96) | public ElasticAttributeProvider(List<ElasticAttribute> attributes) {
    method getProperties (line 100) | @Override
    method getItems (line 105) | @Override

FILE: gs-web-elasticsearch/src/main/java/mil/nga/giat/elasticsearch/ElasticConfigurationPage.java
  class ElasticConfigurationPage (line 69) | abstract class ElasticConfigurationPage extends Panel {
    method ElasticConfigurationPage (line 89) | public ElasticConfigurationPage(String panelId, final IModel<?> model) {
    method onCancel (line 161) | @SuppressWarnings("unused")
    method onSave (line 175) | private void onSave(AjaxRequestTarget target) {
    method fillElasticAttributes (line 215) | private ElasticLayerConfiguration fillElasticAttributes(ResourceInfo r...
    method getElasticAttributePanel (line 257) | private GeoServerTablePanel<ElasticAttribute> getElasticAttributePanel(
    class GeometryTypeRenderer (line 360) | private static class GeometryTypeRenderer implements IChoiceRenderer<O...
      method getDisplayValue (line 362) | public Object getDisplayValue(Object object) {
      method getIdValue (line 366) | public String getIdValue(Object object, int index) {
      method getObject (line 370) | @Override
    method done (line 393) | abstract void done(AjaxRequestTarget target, LayerInfo layerInfo,

FILE: gs-web-elasticsearch/src/main/java/mil/nga/giat/elasticsearch/ElasticConfigurationPanel.java
  class ElasticConfigurationPanel (line 47) | @SuppressWarnings("WeakerAccess")
    method ElasticConfigurationPanel (line 63) | public ElasticConfigurationPanel(final String panelId, final IModel<?>...
    class OpenWindowOnLoadBehavior (line 119) | private class OpenWindowOnLoadBehavior extends AbstractDefaultAjaxBeha...
      method respond (line 120) | @Override
      method renderHead (line 126) | @Override
    method saveLayer (line 132) | private void saveLayer(FeatureTypeInfo ft) throws IOException {

FILE: gs-web-elasticsearch/src/main/java/mil/nga/giat/elasticsearch/ElasticConfigurationPanelInfo.java
  class ElasticConfigurationPanelInfo (line 20) | class ElasticConfigurationPanelInfo extends ResourceConfigurationPanelIn...
    method canHandle (line 24) | @Override
    method getPriority (line 39) | @Override

FILE: gs-web-elasticsearch/src/main/java/mil/nga/giat/elasticsearch/ElasticFeatureTypeCallback.java
  class ElasticFeatureTypeCallback (line 26) | class ElasticFeatureTypeCallback implements FeatureTypeCallback {
    method canHandle (line 28) | @Override
    method initialize (line 34) | @Override
    method dispose (line 49) | @Override
    method flush (line 62) | @Override

FILE: gs-web-elasticsearch/src/main/java/mil/nga/giat/elasticsearch/ElasticXStreamInitializer.java
  class ElasticXStreamInitializer (line 22) | class ElasticXStreamInitializer implements XStreamPersisterInitializer {
    method init (line 24) | @Override

FILE: gs-web-elasticsearch/src/main/java/mil/nga/giat/elasticsearch/ElasticXStreamPersisterInitializer.java
  class ElasticXStreamPersisterInitializer (line 6) | class ElasticXStreamPersisterInitializer implements XStreamPersisterInit...
    method init (line 8) | @Override

FILE: gt-elasticsearch-process/src/main/java/mil/nga/giat/process/elasticsearch/BBOXRemovingFilterVisitor.java
  class BBOXRemovingFilterVisitor (line 11) | class BBOXRemovingFilterVisitor extends DuplicatingFilterVisitor {
    method visit (line 15) | @Override
    method getGeometryPropertyName (line 21) | public String getGeometryPropertyName() {

FILE: gt-elasticsearch-process/src/main/java/mil/nga/giat/process/elasticsearch/BasicGeoHashGrid.java
  class BasicGeoHashGrid (line 9) | public class BasicGeoHashGrid extends GeoHashGrid {
    method computeCellValue (line 11) | @Override

FILE: gt-elasticsearch-process/src/main/java/mil/nga/giat/process/elasticsearch/GeoHashGrid.java
  class GeoHashGrid (line 33) | abstract class GeoHashGrid {
    method GeoHashGrid (line 63) | GeoHashGrid() {
    method initalize (line 68) | public void initalize(ReferencedEnvelope srcEnvelope, SimpleFeatureCol...
    method computeCellValue (line 111) | protected abstract Number computeCellValue(Map<String, Object> bucket);
    method updateGrid (line 113) | private void updateGrid(String geohash, Number value) {
    method updateGrid (line 126) | private void updateGrid(double lat, double lon, Number value) {
    method toGridCoverage2D (line 132) | public GridCoverage2D toGridCoverage2D() {
    method readFeatures (line 137) | private List<Map<String, Object>> readFeatures(SimpleFeatureCollection...
    method computeEnvelope (line 158) | private Envelope computeEnvelope(ReferencedEnvelope outEnvelope, int p...
    method computeMinLonOffset (line 171) | private void computeMinLonOffset(ReferencedEnvelope env) {
    method isValid (line 186) | private boolean isValid(final double lat, final double lon) {
    method isValid (line 190) | private boolean isValid(String geohash) {
    method pluckBucketName (line 194) | String pluckBucketName(Map<String, Object> bucket) {
    method pluckDocCount (line 202) | Number pluckDocCount(Map<String, Object> bucket) {
    method pluckMetricValue (line 210) | Number pluckMetricValue(Map<String, Object> bucket, String metricKey, ...
    method pluckAggBuckets (line 230) | @SuppressWarnings("unchecked")
    method setParams (line 244) | public void setParams(List<String> params) {
    method setEmptyCellValue (line 248) | public void setEmptyCellValue(Float value) {
    method getCellWidth (line 254) | public double getCellWidth() {
    method getCellHeight (line 258) | public double getCellHeight() {
    method getEnvelope (line 262) | public Envelope getEnvelope() {
    method getBoundingBox (line 266) | public ReferencedEnvelope getBoundingBox() {
    method getGrid (line 270) | public float[][] getGrid() {
    method setScale (line 274) | public void setScale(RasterScale scale) {

FILE: gt-elasticsearch-process/src/main/java/mil/nga/giat/process/elasticsearch/GeoHashGridProcess.java
  class GeoHashGridProcess (line 30) | @SuppressWarnings("unused")
    type Strategy (line 36) | public enum Strategy {
      method Strategy (line 44) | Strategy(Class<? extends GeoHashGrid> clazz) {
      method createNewInstance (line 48) | GeoHashGrid createNewInstance() throws ReflectiveOperationException {
    method execute (line 54) | @DescribeResult(description = "Output raster")
    method invertQuery (line 98) | public Query invertQuery(

FILE: gt-elasticsearch-process/src/main/java/mil/nga/giat/process/elasticsearch/GridCell.java
  class GridCell (line 7) | class GridCell {
    method GridCell (line 13) | public GridCell(String geohash, Number value) {
    method getGeohash (line 18) | public String getGeohash() {
    method getValue (line 22) | public Number getValue() {

FILE: gt-elasticsearch-process/src/main/java/mil/nga/giat/process/elasticsearch/GridCoverageUtil.java
  class GridCoverageUtil (line 17) | class GridCoverageUtil {
    method scale (line 19) | public static GridCoverage2D scale(GridCoverage2D coverage, float widt...
    method crop (line 29) | public static GridCoverage2D crop(GridCoverage2D coverage, Envelope en...

FILE: gt-elasticsearch-process/src/main/java/mil/nga/giat/process/elasticsearch/MetricGeoHashGrid.java
  class MetricGeoHashGrid (line 10) | public class MetricGeoHashGrid extends GeoHashGrid {
    method setParams (line 22) | @Override
    method computeCellValue (line 34) | @Override
    method getMetricKey (line 39) | public String getMetricKey() {
    method getValueKey (line 43) | public String getValueKey() {

FILE: gt-elasticsearch-process/src/main/java/mil/nga/giat/process/elasticsearch/NestedAggGeoHashGrid.java
  class NestedAggGeoHashGrid (line 14) | public class NestedAggGeoHashGrid extends GeoHashGrid {
    method setParams (line 54) | @Override
    method computeCellValue (line 99) | @Override
    method selectLargest (line 114) | Number selectLargest(List<Map<String, Object>> buckets) {
    method selectSmallest (line 127) | Number selectSmallest(List<Map<String, Object>> buckets) {
    method bucketToRaster (line 140) | Number bucketToRaster(String key, Number value) {
    method getNestedAggKey (line 162) | public String getNestedAggKey() {
    method getMetricKey (line 166) | public String getMetricKey() {
    method getValueKey (line 170) | public String getValueKey() {
    method getSelectionStrategy (line 174) | public String getSelectionStrategy() {
    method getRasterStrategy (line 178) | public String getRasterStrategy() {
    method getTermsMap (line 182) | public Map<String, Integer> getTermsMap() {

FILE: gt-elasticsearch-process/src/main/java/mil/nga/giat/process/elasticsearch/RasterScale.java
  class RasterScale (line 7) | class RasterScale {
    method RasterScale (line 21) | public RasterScale() {
    method RasterScale (line 25) | public RasterScale(boolean useLog) {
    method RasterScale (line 29) | public RasterScale(Float scaleMax) {
    method RasterScale (line 33) | public RasterScale(Float scaleMin, Float scaleMax) {
    method RasterScale (line 37) | public RasterScale(Float scaleMin, Float scaleMax, boolean scaleLog) {
    method scaleValue (line 46) | public float scaleValue(float value) {
    method prepareScale (line 59) | public void prepareScale(float value) {
    method isScaleSet (line 76) | public boolean isScaleSet() {
    method getScaleMin (line 80) | public Float getScaleMin() {
    method getScaleMax (line 84) | public Float getScaleMax() {

FILE: gt-elasticsearch-process/src/test/java/mil/nga/giat/process/elasticsearch/GeoHashGridProcessTest.java
  class GeoHashGridProcessTest (line 33) | public class GeoHashGridProcessTest {
    method setup (line 43) | @Before
    method testBasic (line 56) | @Test
    method testScaled (line 70) | @Test
    method testSubCellCrop (line 84) | @Test
    method testSubCellCropWithSheer (line 98) | @Test
    method testInvertQuery (line 111) | @Test
    method testInvertQueryAcrossDateline (line 121) | @Test
    method testInvertQueryNorthEastAxisOrder (line 131) | @Test
    method testInvertQueryWithOtherFilterElement (line 143) | @Test
    method checkInternal (line 153) | private void checkInternal(GridCoverage2D coverage, double delta) {
    method checkEdge (line 166) | private void checkEdge(GridCoverage2D coverage, Envelope env, double d...

FILE: gt-elasticsearch-process/src/test/java/mil/nga/giat/process/elasticsearch/GeoHashGridTest.java
  class GeoHashGridTest (line 30) | public class GeoHashGridTest {
    method setup (line 49) | @Before
    method testGeoHashGridLowLonRange (line 55) | @Test
    method testGeoHashGridHighLonRange (line 71) | @Test
    method testGeoHashGrid (line 87) | @Test
    method testGeoHashGrid_scaled (line 106) | @Test
    method testGeoHashGridWithProjectedEnvelope (line 128) | @Test
    method testGeoHashGridWithNoFeatures (line 139) | @Test
    method testGeoHashGrid_emptyCellValue (line 147) | @Test
    method testGeoHashGrid_nullEmptyCellValue (line 157) | @Test
    method testGeoHashGridWithNoAggregations (line 166) | @Test
    method testGeoHashGridWithNoDocCount (line 176) | @Test(expected=IllegalArgumentException.class)
    method testGeoHashGridWithInvalidGeohash (line 186) | @Test
    method testPluckBucketName (line 196) | @Test
    method testPluckBucketName_doubleKey (line 202) | @Test
    method testPluckBucketName_invalidKey (line 211) | @Test(expected=IllegalArgumentException.class)
    method testPluckDocCount (line 218) | @Test
    method testPluckMetricValue (line 224) | @Test
    method testPluckMetricValue_docCount (line 230) | @Test
    method testPluckMetricValue_canNotFindMetricKey (line 239) | @Test(expected=IllegalArgumentException.class)
    method testPluckMetricValue_canNotFindValueKey (line 244) | @Test(expected=IllegalArgumentException.class)
    method testPluckAggBuckets (line 249) | @Test
    method testPluckAggBuckets_canNotFindAggKey (line 255) | @Test(expected=IllegalArgumentException.class)

FILE: gt-elasticsearch-process/src/test/java/mil/nga/giat/process/elasticsearch/GridCoverageUtilTest.java
  class GridCoverageUtilTest (line 22) | public class GridCoverageUtilTest {
    method testExactUpScale (line 24) | @Test
    method testExactDownScale (line 40) | @Test
    method testInexactScale (line 56) | @Test
    method testSmallScale (line 67) | @Test
    method testLargeScale (line 78) | @Test
    method testCrop (line 89) | @Test

FILE: gt-elasticsearch-process/src/test/java/mil/nga/giat/process/elasticsearch/MetricGeoHashGridTest.java
  class MetricGeoHashGridTest (line 16) | public class MetricGeoHashGridTest {
    method setup (line 20) | @Before
    method testSetParams_defaults (line 25) | @Test
    method testSetParams (line 32) | @Test
    method testSetParams_justMetric (line 44) | @Test
    method testComputeCellValue (line 54) | @Test

FILE: gt-elasticsearch-process/src/test/java/mil/nga/giat/process/elasticsearch/NestedAggGeoHashGridTest.java
  class NestedAggGeoHashGridTest (line 16) | public class NestedAggGeoHashGridTest {
    method setup (line 22) | @Before
    method testSetParams_defaults (line 27) | @Test
    method testSetParams (line 38) | @Test
    method testSetParams_ignoreInvalidParams (line 62) | @Test
    method testSetParams_notEnoughParameters (line 82) | @Test(expected=IllegalArgumentException.class)
    method testComputeCellValue (line 87) | @Test
    method testSelectLargest (line 93) | @Test
    method testSelectSmallest (line 99) | @Test
    method testBucketToRaster_rasterFromValue (line 105) | @Test
    method testBucketToRaster_rasterFromNumericKey (line 112) | @Test
    method testBucketToRaster_rasterFromNumericKey_keyIsString (line 125) | @Test(expected=IllegalArgumentException.class)
    method testBucketToRaster_rasterFromStringKey (line 137) | @Test
    method testBucketToRaster_rasterFromStringKey_keyNotInMap (line 151) | @Test(expected=IllegalArgumentException.class)

FILE: gt-elasticsearch-process/src/test/java/mil/nga/giat/process/elasticsearch/RasterScaleTest.java
  class RasterScaleTest (line 11) | public class RasterScaleTest {
    method testRasterScale_noScale (line 13) | @Test
    method testRasterScale_maxProvided (line 19) | @Test
    method testRasterScale_minMaxProvided (line 28) | @Test
    method testRasterScale_minMaxSame (line 38) | @Test(expected=IllegalArgumentException.class)
    method testRasterScale_scaleValue (line 44) | @Test
    method testRasterScale_scaleValue_emptyScale (line 58) | @Test
    method testRasterScale_scaleValue_dataMinAndDataMaxAreTheSame (line 69) | @Test
    method testRasterScale_log (line 78) | @Test
    method testRasterScale_logAndScale (line 85) | @Test

FILE: gt-elasticsearch-process/src/test/java/mil/nga/giat/process/elasticsearch/TestUtil.java
  class TestUtil (line 18) | class TestUtil {
    method createAggregationFeatures (line 20) | public static SimpleFeatureCollection createAggregationFeatures(List<M...
    method createDocCountBucket (line 35) | public static Map<String,Object> createDocCountBucket(String bucketNam...
    method createMetricBucket (line 42) | public static Map<String,Object> createMetricBucket(int docCount, Stri...
    method createBuckets (line 52) | public static List<Map<String,Object>> createBuckets(int[] values) {
    method createAggBucket (line 60) | public static Map<String,Object> createAggBucket(String aggName, int[]...

FILE: gt-elasticsearch/src/main/java/mil/nga/giat/data/elasticsearch/ElasticAggregation.java
  class ElasticAggregation (line 12) | @JsonIgnoreProperties(ignoreUnknown = true)
    method getBuckets (line 17) | public List<Map<String, Object>> getBuckets() {
    method setBuckets (line 21) | public void setBuckets(List<Map<String, Object>> buckets) {
    method toString (line 25) | @Override

FILE: gt-elasticsearch/src/main/java/mil/nga/giat/data/elasticsearch/ElasticAttribute.java
  class ElasticAttribute (line 18) | public class ElasticAttribute implements Serializable, Comparable<Elasti...
    type ElasticGeometryType (line 20) | public enum ElasticGeometryType {
    method ElasticAttribute (line 57) | public ElasticAttribute(String name) {
    method ElasticAttribute (line 67) | public ElasticAttribute(ElasticAttribute other) {
    method getName (line 84) | public String getName() {
    method getShortName (line 88) | public String getShortName() {
    method setShortName (line 92) | public void setShortName(String shortName) {
    method getUseShortName (line 96) | public Boolean getUseShortName() {
    method setUseShortName (line 100) | public void setUseShortName(Boolean useShortName) {
    method getType (line 104) | public Class<?> getType() {
    method setType (line 108) | public void setType(Class<?> type) {
    method getGeometryType (line 112) | public ElasticGeometryType getGeometryType() {
    method setGeometryType (line 116) | public void setGeometryType(ElasticGeometryType geometryType) {
    method isUse (line 120) | public Boolean isUse() {
    method setUse (line 124) | public void setUse(Boolean use) {
    method isDefaultGeometry (line 128) | public Boolean isDefaultGeometry() {
    method setDefaultGeometry (line 132) | public void setDefaultGeometry(Boolean defaultGeometry) {
    method getSrid (line 136) | public Integer getSrid() {
    method setSrid (line 140) | public void setSrid(Integer srid) {
    method getDateFormat (line 144) | public String getDateFormat() {
    method setDateFormat (line 148) | public void setDateFormat(String dateFormat) {
    method getAnalyzed (line 152) | public Boolean getAnalyzed() {
    method setAnalyzed (line 156) | public void setAnalyzed(Boolean analyzed) {
    method isStored (line 160) | public boolean isStored() {
    method setStored (line 164) | public void setStored(boolean stored) {
    method isNested (line 168) | public boolean isNested() {
    method setNested (line 172) | public void setNested(boolean nested) {
    method setOrder (line 176) | public void setOrder(Integer order) {
    method getOrder (line 180) | public Integer getOrder() {
    method setCustomName (line 184) | public void setCustomName(String name) {
    method getCustomName (line 188) | public String getCustomName() {
    method getDisplayName (line 192) | public String getDisplayName() {
    method hashCode (line 202) | @Override
    method equals (line 208) | @Override
    method compareTo (line 237) | @Override
    method normalizeName (line 256) | private static String normalizeName (String name) {

FILE: gt-elasticsearch/src/main/java/mil/nga/giat/data/elasticsearch/ElasticCapabilities.java
  class ElasticCapabilities (line 52) | class ElasticCapabilities extends Capabilities {
    method ElasticCapabilities (line 74) | public ElasticCapabilities() {
    method fullySupports (line 111) | @Override
    method toOperationName (line 119) | @Override
    method addName (line 127) | @Override
    class ElasticFilterCapabilities (line 137) | private static class ElasticFilterCapabilities extends FilterCapabilit...
      method getTemporalCapabilities (line 141) | @Override
    class ElasticIsFullySupportedFilterVisitor (line 152) | private class ElasticIsFullySupportedFilterVisitor extends IsFullySupp...
      method ElasticIsFullySupportedFilterVisitor (line 154) | ElasticIsFullySupportedFilterVisitor() {
      method visit (line 158) | public Object visit( ExcludeFilter filter, Object extraData ) {
      method visit (line 162) | public Object visit( IncludeFilter filter, Object extraData ) {
      method visit (line 166) | public Object visit(BegunBy begunBy, Object extraData) {

FILE: gt-elasticsearch/src/main/java/mil/nga/giat/data/elasticsearch/ElasticClient.java
  type ElasticClient (line 13) | interface ElasticClient extends Closeable {
    method getVersion (line 17) | double getVersion();
    method getTypes (line 19) | List<String> getTypes(String indexName) throws IOException;
    method getMapping (line 21) | Map<String,Object> getMapping(String indexName, String type) throws IO...
    method search (line 23) | ElasticResponse search(String searchIndices, String type, ElasticReque...
    method scroll (line 25) | ElasticResponse scroll(String scrollId, Integer scrollTime) throws IOE...
    method close (line 27) | @Override
    method clearScroll (line 30) | void clearScroll(Set<String> scrollIds) throws IOException;

FILE: gt-elasticsearch/src/main/java/mil/nga/giat/data/elasticsearch/ElasticConstants.java
  class ElasticConstants (line 14) | final class ElasticConstants {

FILE: gt-elasticsearch/src/main/java/mil/nga/giat/data/elasticsearch/ElasticDataStore.java
  class ElasticDataStore (line 40) | public class ElasticDataStore extends ContentDataStore {
    type ArrayEncoding (line 70) | public enum ArrayEncoding {
    method ElasticDataStore (line 83) | public ElasticDataStore(String searchHost, Integer hostPort, String in...
    method ElasticDataStore (line 87) | public ElasticDataStore(RestClient restClient, String indexName) throw...
    method ElasticDataStore (line 91) | public ElasticDataStore(RestClient restClient, RestClient proxyRestCli...
    method createTypeNames (line 120) | @Override
    method createFeatureSource (line 128) | @Override
    method getFeatureSource (line 133) | @Override
    method getElasticAttributes (line 147) | public List<ElasticAttribute> getElasticAttributes(Name layerName) thr...
    method getIndexName (line 196) | String getIndexName() {
    method getClient (line 200) | ElasticClient getClient() {
    method isSourceFilteringEnabled (line 204) | boolean isSourceFilteringEnabled() {
    method setSourceFilteringEnabled (line 208) | public void setSourceFilteringEnabled(boolean sourceFilteringEnabled) {
    method getDefaultMaxFeatures (line 212) | public Integer getDefaultMaxFeatures() {
    method setDefaultMaxFeatures (line 216) | public void setDefaultMaxFeatures(Integer defaultMaxFeatures) {
    method getScrollSize (line 220) | public Long getScrollSize() {
    method getScrollEnabled (line 224) | public Boolean getScrollEnabled() {
    method getScrollTime (line 228) | public Integer getScrollTime() {
    method setScrollSize (line 232) | public void setScrollSize(Long scrollSize) {
    method setScrollEnabled (line 236) | public void setScrollEnabled(Boolean scrollEnabled) {
    method setScrollTime (line 240) | public void setScrollTime(Integer scrollTime) {
    method getArrayEncoding (line 244) | public ArrayEncoding getArrayEncoding() {
    method setArrayEncoding (line 248) | public void setArrayEncoding(ArrayEncoding arrayEncoding) {
    method getGridSize (line 252) | public Long getGridSize() {
    method setGridSize (line 256) | public void setGridSize(Long gridSize) {
    method getGridThreshold (line 260) | public Double getGridThreshold() {
    method setGridThreshold (line 264) | public void setGridThreshold(Double gridThreshold) {
    method getLayerConfigurations (line 268) | public Map<String, ElasticLayerConfiguration> getLayerConfigurations() {
    method setLayerConfiguration (line 272) | public void setLayerConfiguration(ElasticLayerConfiguration layerConfi...
    method getDocTypes (line 277) | public Map<Name, String> getDocTypes() {
    method getDocType (line 281) | public String getDocType(Name typeName) {
    method walk (line 291) | @SuppressWarnings({ "rawtypes", "unchecked" })
    method add (line 325) | private void add(List<ElasticAttribute> elasticAttributes, String prop...
    method checkRestClient (line 400) | private static void checkRestClient(RestClient client) throws IOExcept...
    method isAnalyzed (line 409) | static boolean isAnalyzed(Map<String, Object> map) {

FILE: gt-elasticsearch/src/main/java/mil/nga/giat/data/elasticsearch/ElasticDataStoreFactory.java
  class ElasticDataStoreFactory (line 40) | @SuppressWarnings("WeakerAccess")
    method getDisplayName (line 139) | @Override
    method getDescription (line 144) | @Override
    method getParametersInfo (line 149) | @Override
    method canProcess (line 154) | @Override
    method isAvailable (line 171) | @Override
    method getImplementationHints (line 176) | @Override
    method createDataStore (line 181) | @Override
    method createDataStore (line 193) | public DataStore createDataStore(RestClient client, RestClient proxyCl...
    method createRestClient (line 214) | public RestClient createRestClient(Map<String, Serializable> params) t...
    method createRestClient (line 218) | private RestClient createRestClient(Map<String, Serializable> params, ...
    method createNewDataStore (line 289) | @Override
    method createClientBuilder (line 294) | public RestClientBuilder createClientBuilder(HttpHost[] hosts) {
    method isForceRunas (line 298) | private static boolean isForceRunas() {
    method getValue (line 302) | @SuppressWarnings({"unchecked" })

FILE: gt-elasticsearch/src/main/java/mil/nga/giat/data/elasticsearch/ElasticFeatureReader.java
  class ElasticFeatureReader (line 36) | class ElasticFeatureReader implements FeatureReader<SimpleFeatureType, S...
    method ElasticFeatureReader (line 58) | public ElasticFeatureReader(ContentState contentState, ElasticResponse...
    method ElasticFeatureReader (line 62) | public ElasticFeatureReader(ContentState contentState, List<ElasticHit...
    method getFeatureType (line 92) | @Override
    method next (line 97) | @Override
    method nextHit (line 109) | private String nextHit() {
    method nextAggregation (line 182) | private void nextAggregation() {
    method hasNext (line 192) | @Override
    method close (line 197) | @Override

FILE: gt-elasticsearch/src/main/java/mil/nga/giat/data/elasticsearch/ElasticFeatureReaderScroll.java
  class ElasticFeatureReaderScroll (line 20) | class ElasticFeatureReaderScroll implements FeatureReader<SimpleFeatureT...
    method ElasticFeatureReaderScroll (line 38) | public ElasticFeatureReaderScroll(ContentState contentState, ElasticRe...
    method advanceScroll (line 46) | private void advanceScroll() throws IOException {
    method processResponse (line 52) | private void processResponse(ElasticResponse searchResponse) {
    method getFeatureType (line 68) | @Override
    method next (line 73) | @Override
    method hasNext (line 85) | @Override
    method close (line 93) | @Override

FILE: gt-elasticsearch/src/main/java/mil/nga/giat/data/elasticsearch/ElasticFeatureSource.java
  class ElasticFeatureSource (line 34) | class ElasticFeatureSource extends ContentFeatureSource {
    method ElasticFeatureSource (line 40) | public ElasticFeatureSource(ContentEntry entry, Query query) throws IO...
    method getDataStore (line 55) | public ElasticDataStore getDataStore() {
    method getBoundsInternal (line 62) | @Override
    method getCountInternal (line 77) | @Override
    method getReaderInternal (line 108) | @Override
    method prepareSearchRequest (line 136) | private ElasticRequest prepareSearchRequest(Query query, boolean scrol...
    method setSourceIncludes (line 224) | private void setSourceIncludes(final ElasticRequest searchRequest) thr...
    method isSort (line 236) | private boolean isSort(Query query) {
    method useSortOrPagination (line 240) | private boolean useSortOrPagination(Query query) {
    method getSize (line 245) | private int getSize(Query query) {
    method getStartIndex (line 256) | private int getStartIndex(Query query) {
    method buildFeatureType (line 266) | @Override
    method canLimit (line 283) | @Override
    method canOffset (line 288) | @Override
    method canFilter (line 293) | @Override
    method canSort (line 298) | @Override

FILE: gt-elasticsearch/src/main/java/mil/nga/giat/data/elasticsearch/ElasticFeatureTypeBuilder.java
  class ElasticFeatureTypeBuilder (line 31) | class ElasticFeatureTypeBuilder extends SimpleFeatureTypeBuilder {
    method ElasticFeatureTypeBuilder (line 37) | public ElasticFeatureTypeBuilder(List<ElasticAttribute> attributes, Na...
    method buildFeatureType (line 42) | @Override

FILE: gt-elasticsearch/src/main/java/mil/nga/giat/data/elasticsearch/ElasticHit.java
  class ElasticHit (line 13) | @SuppressWarnings("unused")
    method getIndex (line 35) | public String getIndex() {
    method getType (line 39) | public String getType() {
    method getId (line 43) | public String getId() {
    method getScore (line 47) | public Float getScore() {
    method getSource (line 51) | public Map<String, Object> getSource() {
    method getFields (line 55) | public Map<String, List<Object>> getFields() {
    method field (line 59) | public List<Object> field(String name) {

FILE: gt-elasticsearch/src/main/java/mil/nga/giat/data/elasticsearch/ElasticLayerConfiguration.java
  class ElasticLayerConfiguration (line 14) | public class ElasticLayerConfiguration implements Serializable {
    method ElasticLayerConfiguration (line 29) | public ElasticLayerConfiguration(String docType) {
    method ElasticLayerConfiguration (line 35) | public ElasticLayerConfiguration(ElasticLayerConfiguration other) {
    method getDocType (line 43) | public String getDocType() {
    method getLayerName (line 47) | public String getLayerName() {
    method setLayerName (line 51) | public void setLayerName(String layerName) {
    method getAttributes (line 55) | public List<ElasticAttribute> getAttributes() {

FILE: gt-elasticsearch/src/main/java/mil/nga/giat/data/elasticsearch/ElasticMappings.java
  class ElasticMappings (line 11) | @SuppressWarnings("unused")
    method getMappings (line 16) | public Map<String, Mapping> getMappings() {
    method setMappings (line 20) | public void setMappings(Map<String, Mapping> mappings) {
    class Mapping (line 24) | @JsonIgnoreProperties(ignoreUnknown=true)
      method getProperties (line 29) | public Map<String, Object> getProperties() {
    class Untyped (line 34) | public static class Untyped {
      method getMappings (line 38) | public Mapping getMappings() {

FILE: gt-elasticsearch/src/main/java/mil/nga/giat/data/elasticsearch/ElasticParserUtil.java
  class ElasticParserUtil (line 37) | class ElasticParserUtil {
    method ElasticParserUtil (line 75) | public ElasticParserUtil() {
    method createGeometry (line 89) | @SuppressWarnings("unchecked")
    method createGeometry (line 149) | @SuppressWarnings({"rawtypes", "unchecked"})
    method createPolygon (line 263) | private Polygon createPolygon(final List<List<List<Object>>> posList) {
    method createCoordinates (line 274) | private Coordinate[] createCoordinates(final List<List<Object>> posLis...
    method createCoordinate (line 282) | private Coordinate createCoordinate(final List<Object> posList) {
    method readField (line 306) | public List<Object> readField(Map<String, Object> source, String name) {
    method readField (line 329) | private void readField(Object entry, List<String> keys, List<Object> v...
    method isGeoPointFeature (line 343) | @SuppressWarnings("rawtypes")
    method urlDecode (line 355) | public static String urlDecode(String value) {
    method createCircle (line 372) | private Geometry createCircle(Coordinate centreCoord, String radius) {
    method convertToMeters (line 423) | static double convertToMeters(String distanceWithUnit) throws IllegalA...

FILE: gt-elasticsearch/src/main/java/mil/nga/giat/data/elasticsearch/ElasticRequest.java
  class ElasticRequest (line 12) | class ElasticRequest {
    method ElasticRequest (line 30) | public ElasticRequest() {
    method getQuery (line 36) | public Map<String,Object> getQuery() {
    method setQuery (line 40) | public void setQuery(Map<String,Object> query) {
    method getAggregations (line 44) | public Map<String,Map<String,Map<String,Object>>> getAggregations() {
    method setAggregations (line 48) | public void setAggregations(Map<String,Map<String,Map<String,Object>>>...
    method getSize (line 52) | public Integer getSize() {
    method setSize (line 56) | public void setSize(Integer size) {
    method getFrom (line 60) | public Integer getFrom() {
    method setFrom (line 64) | public void setFrom(Integer from) {
    method getScroll (line 68) | public Integer getScroll() {
    method setScroll (line 72) | public void setScroll(Integer scroll) {
    method getSorts (line 76) | public List<Map<String, Object>> getSorts() {
    method addSort (line 80) | public void addSort(String key, String order) {
    method getSourceIncludes (line 84) | public List<String> getSourceIncludes() {
    method addSourceInclude (line 88) | public void addSourceInclude(String sourceInclude) {
    method getFields (line 92) | public List<String> getFields() {
    method addField (line 96) | public void addField(String field) {

FILE: gt-elasticsearch/src/main/java/mil/nga/giat/data/elasticsearch/ElasticResponse.java
  class ElasticResponse (line 15) | @SuppressWarnings("unused")
    method getResults (line 28) | public ElasticResults getResults() {
    method getAggregations (line 32) | public Map<String,ElasticAggregation> getAggregations() {
    method getScrollId (line 36) | public String getScrollId() {
    method getHits (line 40) | @JsonIgnore
    method getNumHits (line 51) | public int getNumHits() {
    method getTotalNumHits (line 61) | public long getTotalNumHits() {
    method getMaxScore (line 71) | public float getMaxScore() {
    method toString (line 81) | @Override

FILE: gt-elasticsearch/src/main/java/mil/nga/giat/data/elasticsearch/ElasticResults.java
  class ElasticResults (line 13) | @SuppressWarnings("unused")
    method getTotal (line 25) | public Long getTotal() {
    method getMaxScore (line 29) | public Float getMaxScore() {
    method getHits (line 33) | public List<ElasticHit> getHits() {

FILE: gt-elasticsearch/src/main/java/mil/nga/giat/data/elasticsearch/FilterToElastic.java
  class FilterToElastic (line 125) | class FilterToElastic implements FilterVisitor, ExpressionVisitor {
    method FilterToElastic (line 177) | public FilterToElastic() {
    method encode (line 190) | public void encode(Filter filter) throws FilterToElasticException {
    method encode (line 204) | public void encode(Query query) throws FilterToElasticException {
    method setFeatureType (line 217) | public void setFeatureType(SimpleFeatureType featureType) {
    method createCapabilities (line 226) | Capabilities createCapabilities() {
    method getCapabilities (line 242) | private synchronized Capabilities getCapabilities() {
    method visit (line 258) | public Object visit(ExcludeFilter filter, Object extraData) {
    method visit (line 269) | public Object visit(IncludeFilter filter, Object extraData) {
    method visit (line 280) | public Object visit(PropertyIsBetween filter, Object extraData) {
    method visit (line 329) | public Object visit(PropertyIsLike filter, Object extraData) {
    method visit (line 391) | public Object visit(And filter, Object extraData) {
    method visit (line 402) | public Object visit(Not filter, Object extraData) {
    method visit (line 425) | public Object visit(Or filter, Object extraData) {
    method visit (line 436) | private Object visit(BinaryLogicOperator filter, Object extraData) {
    method visit (line 461) | public Object visit(PropertyIsEqualTo filter, Object extraData) {
    method visit (line 473) | public Object visit(PropertyIsGreaterThanOrEqualTo filter, Object extr...
    method visit (line 485) | public Object visit(PropertyIsGreaterThan filter, Object extraData) {
    method visit (line 497) | public Object visit(PropertyIsLessThan filter, Object extraData) {
    method visit (line 509) | public Object visit(PropertyIsLessThanOrEqualTo filter, Object extraDa...
    method visit (line 521) | public Object visit(PropertyIsNotEqualTo filter, Object extraData) {
    method visitBinaryComparisonOperator (line 532) | private void visitBinaryComparisonOperator(BinaryComparisonOperator fi...
    method isBinaryExpression (line 629) | private boolean isBinaryExpression(Expression e) {
    method visit (line 639) | public Object visit(PropertyIsNull filter, Object extraData) {
    method visit (line 652) | public Object visit(PropertyIsNil filter, Object extraData) {
    method visit (line 662) | public Object visit(Id filter, Object extraData) {
    method visit (line 673) | public Object visit(BBOX filter, Object extraData) {
    method visit (line 676) | public Object visit(Beyond filter, Object extraData) {
    method visit (line 679) | public Object visit(Contains filter, Object extraData) {
    method visit (line 682) | public Object visit(Crosses filter, Object extraData) {
    method visit (line 685) | public Object visit(Disjoint filter, Object extraData) {
    method visit (line 688) | public Object visit(DWithin filter, Object extraData) {
    method visit (line 691) | public Object visit(Equals filter, Object extraData) {
    method visit (line 694) | public Object visit(Intersects filter, Object extraData) {
    method visit (line 697) | public Object visit(Overlaps filter, Object extraData) {
    method visit (line 700) | public Object visit(Touches filter, Object extraData) {
    method visit (line 703) | public Object visit(Within filter, Object extraData) {
    method visitBinarySpatialOperator (line 707) | private Object visitBinarySpatialOperator(BinarySpatialOperator filter,
    method visitBinaryTemporalOperator (line 735) | private Object visitBinaryTemporalOperator(BinaryTemporalOperator filter,
    method visitBinaryTemporalOperator (line 767) | private Object visitBinaryTemporalOperator(BinaryTemporalOperator filt...
    method visitBegin (line 893) | private void visitBegin(Period p, Object extraData) {
    method visitEnd (line 897) | private void visitEnd(Period p, Object extraData) {
    method visitBinaryTemporalOperator (line 908) | Object visitBinaryTemporalOperator() {
    method visitNullFilter (line 918) | public Object visitNullFilter(Object extraData) {
    method visit (line 933) | @Override
    method visit (line 980) | @Override
    method evaluateLiteral (line 1011) | private Object evaluateLiteral(Literal expression, Class<?> target) {
    method writeLiteral (line 1062) | private void writeLiteral(Object literal) {
    method visitLiteralTimePeriod (line 1070) | void visitLiteralTimePeriod() {
    method visit (line 1075) | public Object visit(Add expression, Object extraData) {
    method visit (line 1078) | public Object visit(Divide expression, Object extraData) {
    method visit (line 1081) | public Object visit(Multiply expression, Object extraData) {
    method visit (line 1084) | public Object visit(Subtract expression, Object extraData) {
    method visit (line 1088) | public Object visit(NilExpression expression, Object extraData) {
    method visit (line 1094) | public Object visit(After after, Object extraData) {
    method visit (line 1097) | public Object visit(AnyInteracts anyInteracts, Object extraData) {
    method visit (line 1100) | public Object visit(Before before, Object extraData) {
    method visit (line 1103) | public Object visit(Begins begins, Object extraData) {
    method visit (line 1106) | public Object visit(BegunBy begunBy, Object extraData) {
    method visit (line 1109) | public Object visit(During during, Object extraData) {
    method visit (line 1112) | public Object visit(EndedBy endedBy, Object extraData) {
    method visit (line 1115) | public Object visit(Ends ends, Object extraData) {
    method visit (line 1118) | public Object visit(Meets meets, Object extraData) {
    method visit (line 1121) | public Object visit(MetBy metBy, Object extraData) {
    method visit (line 1124) | public Object visit(OverlappedBy overlappedBy, Object extraData) {
    method visit (line 1127) | public Object visit(TContains contains, Object extraData) {
    method visit (line 1130) | public Object visit(TEquals equals, Object extraData) {
    method visit (line 1133) | public Object visit(TOverlaps contains, Object extraData) {
    method visitLiteralGeometry (line 1137) | private void visitLiteralGeometry(Literal expression) throws IOExcepti...
    method visitBinarySpatialOperator (line 1154) | private Object visitBinarySpatialOperator(BinarySpatialOperator filter,
    method visitBinarySpatialOperator (line 1161) | private Object visitBinarySpatialOperator(BinarySpatialOperator filter...
    method visit (line 1166) | @Override
    method updateDateFormatter (line 1173) | private void updateDateFormatter(AttributeDescriptor attType) {
    method safeConvertToNumber (line 1186) | private Number safeConvertToNumber(Expression expression, Class<?> tar...
    method addViewParams (line 1191) | void addViewParams(Query query) {
    method convertToQueryString (line 1240) | public static String convertToQueryString(char escape, char multi, cha...
    method convertToRegex (line 1265) | public static String convertToRegex(char escape, char multi, char single,
    method extractNestedPath (line 1290) | private static String extractNestedPath(String field) {
    method getFullySupported (line 1296) | public Boolean getFullySupported() {
    method getNativeQueryBuilder (line 1300) | public Map<String,Object> getNativeQueryBuilder() {
    method getQueryBuilder (line 1304) | public Map<String,Object> getQueryBuilder() {
    method getAggregations (line 1317) | public Map<String,Map<String,Map<String,Object>>> getAggregations() {

FILE: gt-elasticsearch/src/main/java/mil/nga/giat/data/elasticsearch/FilterToElasticException.java
  class FilterToElasticException (line 7) | class FilterToElasticException extends RuntimeException {
    method FilterToElasticException (line 11) | public FilterToElasticException(String msg, Throwable exp) {

FILE: gt-elasticsearch/src/main/java/mil/nga/giat/data/elasticsearch/FilterToElasticHelper.java
  class FilterToElasticHelper (line 56) | class FilterToElasticHelper {
    method FilterToElasticHelper (line 94) | public FilterToElasticHelper(FilterToElastic delegate) {
    method visitBinarySpatialOperator (line 98) | Object visitBinarySpatialOperator(BinarySpatialOperator filter,
    method visitBinarySpatialOperator (line 112) | Object visitBinarySpatialOperator(BinarySpatialOperator filter, Expres...
    method visitDistanceSpatialOperator (line 119) | private void visitDistanceSpatialOperator(DistanceBufferOperator filter,
    method toMeters (line 143) | private String toMeters(double distance, String unit) {
    method visitComparisonSpatialOperator (line 154) | private void visitComparisonSpatialOperator(BinarySpatialOperator filt...
    method visitBinarySpatialOperator (line 181) | private void visitBinarySpatialOperator(BinarySpatialOperator filter, ...
    method visitGeoShapeBinarySpatialOperator (line 196) | private void visitGeoShapeBinarySpatialOperator(BinarySpatialOperator ...
    method visitGeoPointBinarySpatialOperator (line 229) | private void visitGeoPointBinarySpatialOperator(BinarySpatialOperator ...
    method clipToWorld (line 274) | private Literal clipToWorld(Literal geometry) {
    method clipLon (line 289) | private double clipLon(double lon) {
    method clipLat (line 294) | private double clipLat(double lat) {
    method isWorld (line 303) | private boolean isWorld(Literal geometry) {
    method isEmpty (line 319) | private boolean isEmpty(Literal geometry) {

FILE: gt-elasticsearch/src/main/java/mil/nga/giat/data/elasticsearch/GeohashUtil.java
  class GeohashUtil (line 13) | class GeohashUtil {
    method computePrecision (line 15) | public static int computePrecision(Envelope envelope, long size, doubl...
    method computePrecision (line 19) | private static int computePrecision(Envelope envelope, long size, doub...
    method computeSize (line 23) | private static double computeSize(Envelope envelope, int n) {
    method updateGridAggregationPrecision (line 28) | public static void updateGridAggregationPrecision(Map<String,Map<Strin...

FILE: gt-elasticsearch/src/main/java/mil/nga/giat/data/elasticsearch/RestElasticClient.java
  class RestElasticClient (line 44) | public class RestElasticClient implements ElasticClient {
    method RestElasticClient (line 62) | public RestElasticClient(RestClient client) {
    method RestElasticClient (line 66) | public RestElasticClient(RestClient client, RestClient proxyClient, bo...
    method getVersion (line 74) | @Override
    method getTypes (line 102) | @Override
    method getMapping (line 107) | @Override
    method getMappings (line 122) | private Map<String, Mapping> getMappings(String indexName, String type...
    method search (line 178) | @Override
    method performRequest (line 227) | private Response performRequest(String method, String path, Map<String...
    method performRequest (line 270) | Response performRequest(String method, String path, Map<String,Object>...
    method parseResponse (line 274) | private ElasticResponse parseResponse(final Response response) throws ...
    method scroll (line 280) | @Override
    method clearScroll (line 290) | @Override
    method close (line 300) | @Override
    method removeMapping (line 313) | @SuppressWarnings("unchecked")
    method getIndices (line 330) | private Set<String> getIndices(String alias) {

FILE: gt-elasticsearch/src/main/java/mil/nga/giat/data/elasticsearch/TotalDeserializer.java
  class TotalDeserializer (line 11) | public class TotalDeserializer extends StdDeserializer<Long> {
    method TotalDeserializer (line 13) | public TotalDeserializer() {
    method TotalDeserializer (line 17) | public TotalDeserializer(Class<?> vc) {
    method deserialize (line 21) | @Override

FILE: gt-elasticsearch/src/test/java/mil/nga/giat/data/elasticsearch/ElasticAggregationReaderTest.java
  class ElasticAggregationReaderTest (line 25) | public class ElasticAggregationReaderTest {
    method setup (line 39) | @Before
    method testNoAggregations (line 49) | @Test
    method testBuckets (line 54) | @Test
    method testMultipleAggregations (line 74) | @Test
    method byteArrayToMap (line 91) | private Map<String,Object> byteArrayToMap(Object bytes) throws IOExcep...

FILE: gt-elasticsearch/src/test/java/mil/nga/giat/data/elasticsearch/ElasticAttributeTest.java
  class ElasticAttributeTest (line 16) | public class ElasticAttributeTest {
    method setup (line 50) | @Before
    method testAttributes (line 70) | @Test
    method testDisplayName (line 101) | @Test
    method testHashCode (line 109) | @Test
    method testEquals (line 115) | @Test
    method testClone (line 121) | @Test
    method testCompare (line 126) | @Test

FILE: gt-elasticsearch/src/test/java/mil/nga/giat/data/elasticsearch/ElasticDataStoreFinderIT.java
  class ElasticDataStoreFinderIT (line 37) | public class ElasticDataStoreFinderIT extends ElasticTestSupport {
    method testFactoryDefaults (line 42) | @Test
    method testFactory (line 56) | @Test
    method testFactoryWithMissingRequired (line 72) | @Test
    method testCreateRestClient (line 88) | @Test
    method getHosts (line 131) | private List<HttpHost> getHosts(String hosts) throws IOException {

FILE: gt-elasticsearch/src/test/java/mil/nga/giat/data/elasticsearch/ElasticDataStoreIT.java
  class ElasticDataStoreIT (line 45) | public class ElasticDataStoreIT extends ElasticTestSupport {
    method testConstructionWithHostAndPortAndIndex (line 47) | @Test
    method testConstructionWithClientAndIndex (line 59) | @Test
    method testConstructionWithProxyClientAndIndex (line 74) | @Test
    method testConstructionWithBadClient (line 89) | @Test(expected=IOException.class)
    method testConstructionWithBadProxyClient (line 106) | @Test(expected=IOException.class)
    method testGetNames (line 126) | @Test
    method testGetNamesByAlias (line 136) | @Test
    method testLayerConfigClone (line 147) | @Test
    method testSchema (line 159) | @Test
    method testSchemaWithValidCustomName (line 170) | @Test
    method testIsAnalyzed (line 185) | @Test

FILE: gt-elasticsearch/src/test/java/mil/nga/giat/data/elasticsearch/ElasticDatastoreFactoryTest.java
  class ElasticDatastoreFactoryTest (line 41) | @RunWith(MockitoJUnitRunner.class)
    method setUp (line 64) | @Before
    method getParams (line 90) | private Map<String, Serializable> getParams(String hosts, int port, St...
    method testBuildClient (line 106) | @Test
    method testBuildClientWithoutProxy (line 137) | @Test
    method testBuildClientWithoutAuth (line 161) | @Test
    method testBuildClientWithMultipleHosts (line 180) | @Test
    method testCreateClientbuilder (line 195) | @Test
    method testBuildClientWithSslRejectUnauthorizedDisabled (line 202) | @Test
    method testBuildClientWithSslRejectUnauthorizedDisabledAndInvalidSSLContext (line 211) | @Test(expected=UncheckedIOException.class)
    method testBuildClientWithInvalidHost (line 220) | @Test(expected=IOException.class)

FILE: gt-elasticsearch/src/test/java/mil/nga/giat/data/elasticsearch/ElasticFeatureFilterIT.java
  class ElasticFeatureFilterIT (line 61) | public class ElasticFeatureFilterIT extends ElasticTestSupport {
    method testSchema (line 63) | @Test
    method testSchemaWithoutLayerConfig (line 76) | @Test @Ignore
    method testSchemaWithShortName (line 85) | @Test
    method testSchemaWithInvalidSrid (line 97) | @Test @Ignore
    method testCount (line 110) | @Test
    method testBounds (line 116) | @Test
    method testCountWithIsEqualFilter (line 126) | @Test
    method testCountWithIsNotEqualFilter (line 136) | @Test
    method testCountWithOffsetLimit (line 146) | @Test
    method testGetFeaturesWithAndLogicFilter (line 156) | @Test
    method testGetFeaturesWithORLogicFilter (line 168) | @Test
    method testGetFeaturesWithNOTLogicFilter (line 185) | @Test
    method testGetFeaturesWithIdFilter (line 200) | @Test
    method testGetFeaturesWithBetweenFilter (line 210) | @Test
    method testGetFeaturesWithQuery (line 259) | @Test
    method testReadStringArrayWithCsvStrategy (line 282) | @Test
    method testReadNumericArrayWithCsvStrategy (line 301) | @Test
    method testGetFeaturesWithSort (line 316) | @Test
    method testGetFeaturesWithOffsetLimit (line 362) | @Test
    method testNaturalSortingAsc (line 383) | @Test
    method testNaturalSortingDesc (line 399) | @Test
    method testGetFeaturesWithIsGreaterThanFilter (line 415) | @Test
    method testGetFeaturesWithIsGreaterThanOrEqualToFilter (line 424) | @Test
    method testGetFeaturesWithIsLessThanFilter (line 434) | @Test
    method testGetFeaturesWithLessThanOrEqualToFilter (line 443) | @Test
    method testGetFeaturesWithIsLikeFilter (line 452) | @Test
    method testGetFeaturesWithIsNullFilter (line 461) | @Test
    method testBBOXFilterWithBBOXType (line 470) | @Test
    method testOnlyStoredFields (line 480) | @Test
    method testOnlySourceFields (line 497) | @Test
    method testOnlyStoredFieldsWithSourceFiltering (line 517) | @Test
    method testOnlySourceFieldsWithSourceFiltering (line 535) | @Test
    method testFieldsWithSourceFiltering (line 560) | @Test
    method testGetFeaturesWithIsGreaterThanFilterOnObjectType (line 609) | @Test
    method testGetFeaturesWithIsGreaterThanFilterOnNestedType (line 618) | @Test
    method testGetFeaturesWithIsBetweenFilterOnObjectType (line 627) | @Test
    method testGetFeaturesWithIsBetweenFilterOnNestedType (line 636) | @Test
    method testGetFeaturesWithIsGreaterThanFilterOnNestedChildType (line 645) | @Test
    method testScrollSizesDoesntChangesOutputSize (line 654) | @Test
    method testScrollTimeDoesntChangesOutputSize (line 664) | @Test
    method testScrollEnabledDoesntChangesOutputSize (line 675) | @Test
    method testScrollHonorsMaxFeatures (line 685) | @Test
    method testScrollNoSuchElement (line 695) | @Test(expected=NoSuchElementException.class)
    method testDefaultMaxFeatures (line 708) | @Test
    method assertCovered (line 717) | private void assertCovered(SimpleFeatureCollection features, Integer.....

FILE: gt-elasticsearch/src/test/java/mil/nga/giat/data/elasticsearch/ElasticFilterTest.java
  class ElasticFilterTest (line 80) | public class ElasticFilterTest {
    method setUp (line 96) | @Before
    method setFilterBuilder (line 166) | private void setFilterBuilder() {
    method addDateWithFormatToFeatureType (line 171) | private void addDateWithFormatToFeatureType(String format) {
    method testEncodeQuery (line 187) | @Test
    method testId (line 198) | @Test
    method testAnd (line 208) | @Test
    method testOr (line 220) | @Test
    method testNot (line 232) | @Test
    method testPropertyIsNull (line 243) | @Test
    method testPropertyIsNotNull (line 254) | @Test
    method testPropertyIsEqualToString (line 264) | @Test
    method testNestedPropertyIsEqualToString (line 274) | @Test
    method testNestedStringIsEqualToProperty (line 284) | @Test
    method testPropertyIsNotEqualToString (line 294) | @Test
    method testPropertyIsEqualToDouble (line 304) | @Test
    method testDoubleIsEqualtoProperty (line 314) | @Test
    method testPropertyIsNotEqualToDouble (line 324) | @Test
    method testPropertyIsEqualToFloat (line 334) | @Test
    method testPropertyIsEqualToInteger (line 344) | @Test
    method testPropertyIsEqualToBoolean (line 354) | @Test
    method testPropertyIsGreaterThan (line 364) | @Test
    method testPropertyIsLessThan (line 375) | @Test
    method testPropertyIsGreaterThanOrEqualTo (line 386) | @Test
    method testPropertyIsLessThanOrEqualTo (line 397) | @Test
    method testPropertyIsBetween (line 408) | @Test
    method testUnknownPropertyIsBetween (line 419) | @Test
    method testIncludeFilter (line 430) | @Test
    method testExcludeFilter (line 439) | @Test
    method testNullFilter (line 449) | @Test
    method testNilFilter (line 454) | @Test
    method testNullBinarySpatialOperatorFilter (line 461) | @Test
    method testPropertyIsLike (line 472) | @Test
    method testCaseSensitivePropertyIsLike (line 483) | @Test
    method testNestedPropertyIsLike (line 494) | @Test
    method testConvertToRegex (line 507) | @Test
    method testConvertToQueryString (line 526) | @Test
    method testGeoShapeBboxFilter (line 545) | @Test
    method testGeoShapeIntersectsFilter (line 570) | @Test
    method testEmptyGeoShape (line 588) | @Test
    method testEmptyDisjointGeoShape (line 600) | @Test
    method testGeoShapeIntersectsFilterReversed (line 610) | @Test
    method testAndWithBbox (line 627) | @Test
    method testGeoPointBboxFilter (line 653) | @Test
    method testGeoPolygonFilter (line 666) | @Test
    method testDWithinFilter (line 684) | @Test
    method testDWithinPolygonFilter (line 697) | @Test
    method testDBeyondFilter (line 710) | @Test
    method testLinearRingVisit (line 722) | @Test
    method testCompoundFilter (line 735) | @Test
    method testCql (line 754) | @Test
    method testViewParamWithNullHints (line 764) | @Test
    method testQueryViewParam (line 773) | @Test
    method testAggregationViewParam (line 782) | @Test
    method testUrlEncodedAggregationViewParam (line 791) | @Test
    method testUrlEncodedAggregationViewParamWithParseError (line 800) | @Test(expected=FilterToElasticException.class)
    method testAndQueryViewParam (line 807) | @Test
    method testNativeOnlyQueryViewParam (line 817) | @Test
    method testNativeQueryViewParamWithError (line 828) | @Test(expected=FilterToElasticException.class)
    method testTemporalStringLiteral (line 837) | @Test
    method testNestedTemporalStringLiteral (line 848) | @Test
    method testTemporalInstantLiteralDefaultFormat (line 861) | @Test
    method testTemporalInstanceLiteralExplicitFormat (line 876) | @Test
    method testTemporalInstanceLiteralBasicDateTimeFormat (line 892) | @Test
    method testAfterFilter (line 908) | @Test
    method testAfterFilterSwapped (line 923) | @Test
    method testAfterFilterPeriod (line 938) | @Test
    method testAfterFilterPeriodSwapped (line 954) | @Test
    method testBeforeFilter (line 970) | @Test
    method testBeforeFilterPeriod (line 983) | @Test
    method testBeforeFilterPeriodSwapped (line 1000) | @Test
    method testBegins (line 1017) | @Test
    method testBeginsWithMissingPeriod (line 1034) | @Test(expected=IllegalArgumentException.class)
    method testBeginsWithSwap (line 1041) | @Test(expected=IllegalArgumentException.class)
    method testBegunBy (line 1054) | @Test
    method testDuring (line 1071) | @Test
    method testEnds (line 1088) | @Test
    method testEndedBy (line 1105) | @Test
    method testEndedByWithoutSwap (line 1122) | @Test(expected=IllegalArgumentException.class)
    method testTContains (line 1139) | @Test
    method testTEqualsFilter (line 1156) | @Test
    method testTEqualsWithPeriod (line 1169) | @Test(expected=IllegalArgumentException.class)
    method testPropertyNameWithExtraData (line 1182) | @Test
    method testUnsupportedBinaryExpression (line 1188) | @Test(expected=UnsupportedOperationException.class)
    method testUnsupportedPropertyIsNill (line 1193) | @Test(expected=UnsupportedOperationException.class)
    method testUnsupportedBinaryComparisonOperatorWithBinaryExpression (line 1198) | @Test(expected=UnsupportedOperationException.class)
    method testUnsupportedBinaryTemporalOperator (line 1203) | @Test(expected=UnsupportedOperationException.class)
    method testUnsupportedAdd (line 1208) | @Test(expected=UnsupportedOperationException.class)
    method testUnsupportedSubtract (line 1213) | @Test(expected=UnsupportedOperationException.class)
    method testUnsupportedMult (line 1218) | @Test(expected=UnsupportedOperationException.class)
    method testUnsupportedDivide (line 1223) | @Test(expected=UnsupportedOperationException.class)
    method testUnsupportedFunction (line 1228) | @Test(expected=UnsupportedOperationException.class)
    method testUnsupportedLiteralTimePeriod (line 1233) | @Test(expected=UnsupportedOperationException.class)

FILE: gt-elasticsearch/src/test/java/mil/nga/giat/data/elasticsearch/ElasticGeometryFilterIT.java
  class ElasticGeometryFilterIT (line 50) | public class ElasticGeometryFilterIT extends ElasticTestSupport {
    method testBBOXFilter (line 52) | @Test
    method testWithinPolygonFilter (line 61) | @Test
    method testBBOXAndEqualsFilter (line 73) | @Test
    method testCrossesFilter (line 85) | @Test
    method testNotCrossesFilter (line 100) | @Test
    method testEqualFilter (line 112) | @Test
    method testDisjointFilter (line 127) | @Test
    method testTouchesFilter (line 144) | @Test
    method testWithinFilter (line 159) | @Test
    method testOverlapsFilter (line 174) | @Test
    method testIntersectsFilter (line 190) | @Test
    method testContainsFilter (line 205) | @Test
    method testDWithinFilter (line 220) | @Test
    method testBeyondFilter (line 237) | @Test
    method testAlternateGeometry (line 249) | @Test
    method testOgrStyleGeoPoint (line 266) | @Test
    method testGeoPointAsArray (line 283) | @Test
    method testBBOXCoveringDateline (line 304) | @Test
    method testBBOXBeyondDateline (line 313) | @Test
    method testGeoShapeAsWkt (line 322) | @Test

FILE: gt-elasticsearch/src/test/java/mil/nga/giat/data/elasticsearch/ElasticParserUtilTest.java
  class ElasticParserUtilTest (line 35) | @SuppressWarnings({"rawtypes", "unchecked"})
    method setUp (line 48) | @Before
    method testParseGeoPointPatternForNegatives (line 57) | @Test
    method testGeoPointPatternForFractions (line 66) | @Test
    method testGeoPointPatternForWholeValues (line 75) | @Test
    method testGeoPointPatternWithSpace (line 81) | @Test
    method testGeoPointAsDoubleProperties (line 87) | @Test
    method testGeoPointAsIntegerProperties (line 97) | @Test
    method testGeoPointAsStringProperties (line 107) | @Test
    method testGeoPointAsInvalidProperties (line 117) | @Test
    method testGeoPointAsUnrecognizedProperties (line 125) | @Test
    method testGeoPointAsStringArray (line 135) | @Test
    method testGeoPointAsInvalidArray (line 143) | @Test
    method testGeoPointAsDoubleArray (line 149) | @Test
    method testGeoHash (line 157) | @Test
    method testInvalidStringGeometry (line 167) | @Test
    method testGeoShapePoint (line 176) | @Test
    method testGeoShapePointString (line 182) | @Test
    method testGeoShapePointWkt (line 194) | @Test
    method testGeoShapeLineString (line 200) | @Test
    method testGeoShapeLineStringWkt (line 206) | @Test
    method testGeoShapePolygon (line 212) | @Test
    method testGeoShapeCircle (line 218) | @Test
    method testGeoShapeCircleWithMissingCenter (line 232) | @Test
    method testGeoShapeCircleWithInvalidRadii (line 242) | @Test
    method testGeoShapeCircleWithSmallRadii (line 256) | @Test
    method testGeoShapeCircleWithMissingRadii (line 270) | @Test
    method testGeoShapePolygonWkt (line 283) | @Test
    method testGeoShapeMultiPoint (line 289) | @Test
    method testGeoShapeMultiPointWkt (line 295) | @Test
    method testGeoShapeMultiLineString (line 301) | @Test
    method testGeoShapeMultiLineStringWkt (line 307) | @Test
    method testGeoShapeMultiPolygon (line 313) | @Test
    method testGeoShapeMultiPolygonWkt (line 319) | @Test
    method testGeoShapeGeometryCollection (line 325) | @Test
    method testGeoShapeGeometryCollectionWkt (line 332) | @Test
    method testGeoShapeEnvelope (line 339) | @Test
    method testUnrecognizedGeometry (line 346) | @Test
    method testReadStringField (line 352) | @Test
    method testReadNumericField (line 360) | @Test
    method testReadStringFieldWithConfuser (line 368) | @Test
    method testReadInnerString (line 380) | @Test
    method testReadInnerStringArray (line 389) | @Test
    method testReadStringFromObjectArray (line 399) | @Test
    method testReadStringFromObjectArrayOnceRemoved (line 412) | @Test
    method testReadMapField (line 427) | @Test
    method testConvertToMeters (line 438) | @Test
    method testAttributesContainingDots (line 481) | @Test
    method testGeoJSONAttributesContainingDots (line 492) | @Test

FILE: gt-elasticsearch/src/test/java/mil/nga/giat/data/elasticsearch/ElasticResponseTest.java
  class ElasticResponseTest (line 18) | public class ElasticResponseTest {
    method setup (line 22) | @Before
    method testDefaults (line 27) | @Test
    method testTotalHits (line 35) | @Test
    method testNullMaxScore (line 41) | @Test
    method testMaxScore (line 47) | @Test
    method testScroll (line 53) | @Test
    method getNumHits (line 59) | @Test
    method testHitId (line 65) | @Test
    method testHitIndex (line 73) | @Test
    method testHitType (line 80) | @Test
    method testHitScore (line 87) | @Test
    method testHitFields (line 94) | @Test
    method testHitSource (line 106) | @Test
    method testAggregations (line 115) | @Test
    method testMissingAggregation (line 127) | @Test
    method testToString (line 133) | @Test

FILE: gt-elasticsearch/src/test/java/mil/nga/giat/data/elasticsearch/ElasticTemporalFilterIT.java
  class ElasticTemporalFilterIT (line 31) | public class ElasticTemporalFilterIT extends ElasticTestSupport {
    method testLessDateFilterLong (line 33) | @Test
    method testGreaterDateFilterLong (line 52) | @Test
    method testCompareDateFilter (line 70) | @Test
    method testAfterFilter (line 97) | @Test
    method testAfterInterval (line 107) | @Test
    method testBeforeFilter (line 117) | @Test
    method testBeforeInterval (line 127) | @Test
    method testBegins (line 137) | @Test
    method testBegunBy (line 147) | @Test
    method testEnds (line 157) | @Test
    method testEndedBy (line 167) | @Test
    method testDuring (line 177) | @Test
    method testTContains (line 187) | @Test
    method testTEquals (line 197) | @Test

FILE: gt-elasticsearch/src/test/java/mil/nga/giat/data/elasticsearch/ElasticTestSupport.java
  class ElasticTestSupport (line 52) | class ElasticTestSupport {
    method beforeTest (line 92) | @Before
    method afterTest (line 102) | @After
    method createIndices (line 109) | private void createIndices() throws IOException {
    method indexDocuments (line 143) | private void indexDocuments(String status) throws IOException {
    method createConnectionParams (line 173) | Map<String,Serializable> createConnectionParams() {
    method init (line 183) | void init() throws Exception {
    method init (line 188) | void init(String layerName) throws Exception {
    method init (line 192) | void init(String status, String geometryField) throws Exception {
    method performRequest (line 213) | private void performRequest(String method, String endpoint, Map<String...
    method date (line 217) | private Date date(String date) throws ParseException {
    method instant (line 221) | private Instant instant(String d) throws ParseException {
    method period (line 225) | Period period(String d1, String d2) throws ParseException {
    method readFeatures (line 229) | List<SimpleFeature> readFeatures(SimpleFeatureIterator iterator) {

FILE: gt-elasticsearch/src/test/java/mil/nga/giat/data/elasticsearch/ElasticViewParametersFilterIT.java
  class ElasticViewParametersFilterIT (line 37) | public class ElasticViewParametersFilterIT extends ElasticTestSupport {
    method testNativeTermQuery (line 41) | @Test
    method testEncodedNativeTermQuery (line 60) | @Test
    method testNativeBooleanQuery (line 79) | @Test
    method testNativeAggregation (line 102) | @Test

FILE: gt-elasticsearch/src/test/java/mil/nga/giat/data/elasticsearch/GeohashUtilTest.java
  class GeohashUtilTest (line 14) | public class GeohashUtilTest {
    method testComputePrecision (line 16) | @Test
    method doNotUpdatePrecisionIfAlreadyDefined (line 33) | @Test
    method updatePrecisionIfNotDefined (line 44) | @Test

FILE: gt-elasticsearch/src/test/java/mil/nga/giat/data/elasticsearch/RandomGeometryBuilder.java
  class RandomGeometryBuilder (line 32) | class RandomGeometryBuilder {
    method RandomGeometryBuilder (line 48) | public RandomGeometryBuilder() {
    method createRandomPoint (line 58) | public Point createRandomPoint() {
    method createRandomLineString (line 62) | public LineString createRandomLineString() {
    method createRandomPolygon (line 70) | public Polygon createRandomPolygon() {
    method createRandomMultiPoint (line 79) | public MultiPoint createRandomMultiPoint() {
    method createRandomMultiLineString (line 87) | public MultiLineString createRandomMultiLineString() {
    method createRandomMultiPolygon (line 95) | public MultiPolygon createRandomMultiPolygon() {
    method createRandomGeometryCollection (line 103) | public GeometryCollection createRandomGeometryCollection() {
    method createRandomEnvelope (line 120) | public Envelope createRandomEnvelope() {
    method createRandomCoord (line 129) | private Coordinate createRandomCoord() {
    method createRandomCoord (line 133) | private Coordinate createRandomCoord(int minx, int miny) {
    method toMap (line 142) | public Map<String,Object> toMap(Geometry geometry) throws IOException {
    method toWkt (line 147) | public String toWkt(Geometry geometry) {
    method toMap (line 151) | public Map<String,Object> toMap(Envelope envelope) {
    method setNumGeometries (line 161) | public void setNumGeometries(int numGeometries) {

FILE: gt-elasticsearch/src/test/java/mil/nga/giat/data/elasticsearch/RestElasticClientTest.java
  class RestElasticClientTest (line 42) | public class RestElasticClientTest {
    method setup (line 62) | @Before
    method testVersion (line 94) | @Test
    method testVersionWithInvalidFormat (line 101) | @Test
    method testVersionWithError (line 108) | @Test
    method testGetTypes (line 120) | @Test
    method testLegacyGetTypes (line 132) | @Test
    method testGetMapping (line 146) | @Test
    method testLegacyGetMapping (line 158) | @Test
    method testGetMappingWithMissingIndexAndNoAlias (line 171) | @Test
    method testGetMappingMissing (line 184) | @Test
    method testGetMappingWithExtra (line 195) | @Test
    method testGetMappingNotFound (line 207) | @Test
    method testGetMappingWithError (line 217) | @Test(expected=ResponseException.class)
    method testSearchSize (line 227) | @Test
    method testLegacySearch (line 237) | @Test
    method testSearchSizeWithProxyClient (line 248) | @Test
    method testSearchFrom (line 259) | @Test
    method testSearchFromWithProxyClient (line 269) | @Test
    method testSearchScroll (line 280) | @Test
    method testSearchScrollWithProxyClient (line 290) | @Test
    method testSearchSourceFiltering (line 301) | @Test
    method testSearchSourceFilteringWithProxyClient (line 311) | @Test
    method testSearchSourceFiltering2 (line 322) | @Test
    method testSearchSourceFilteringWithProxyClient2 (line 334) | @Test
    method testSearchStoredFields (line 346) | @Test
    method testSearchStoredFieldsWithProxyClient (line 358) | @Test
    method testSearchSort (line 371) | @Test
    method testSearchSortWithProxyClient (line 382) | @Test
    method testSearchSort2 (line 393) | @Test
    method testSearchSortWithProxyClient2 (line 405) | @Test
    method testSearchResponse (line 417) | @Test
    method testSearchResponseWithProxyClient (line 431) | @Test
    method testQuery (line 446) | @Test
    method testLegacyQuery (line 458) | @Test
    method testQueryWithProxyClient (line 471) | @Test
    method testLegacyQueryWithProxyClient (line 483) | @Test
    method testAggregation (line 496) | @Test
    method testLegacyAggregation (line 508) | @Test
    method testAggregationWithProxyClient (line 521) | @Test
    method testBadStatus (line 534) | @Test(expected=IOException.class)
    method testNextScroll (line 542) | @Test
    method testNextScrollWithProxyClient (line 551) | @Test
    method testClearScroll (line 560) | @Test
    method testClearScrollWithProxyClient (line 569) | @Test
    method testClose (line 578) | @Test
    method testCloseWithProxyClient (line 584) | @Test
    method testRemoveMapping (line 591) | @Test
    method testMissingAuth (line 620) | @Test(expected=IllegalStateException.class)
    method testUnauthenticated (line 626) | @Test(expected=IllegalStateException.class)
    method mockVersion (line 632) | private void mockVersion(String version) throws IOException {
    method createMap (line 648) | private Map<String,Object> createMap(Object... params) {
    class RunAsHeaderMatcher (line 656) | class RunAsHeaderMatcher implements ArgumentMatcher<BasicHeader> {
      method RunAsHeaderMatcher (line 662) | RunAsHeaderMatcher(String runAsUser) {
      method matches (line 666) | @Override
    class JsonByteArrayEntityMatcher (line 673) | class JsonByteArrayEntityMatcher implements ArgumentMatcher<ByteArrayE...
      method JsonByteArrayEntityMatcher (line 677) | JsonByteArrayEntityMatcher(byte[] data) throws IOException {
      method matches (line 682) | @Override
    class RequestMatcher (line 695) | class RequestMatcher implements ArgumentMatcher<Request> {
      method RequestMatcher (line 705) | RequestMatcher(String endpoint, String data) throws IOException {
      method RequestMatcher (line 709) | RequestMatcher(String method, String endpoint, String data, String u...
      method matches (line 716) | @Override

FILE: joda-shaded/src/main/java/org/elasticsearch/common/Strings.java
  class Strings (line 25) | public class Strings {
    method hasLength (line 27) | public static boolean hasLength(String input) {
    method delimitedListToStringArray (line 31) | public static String[] delimitedListToStringArray(String input, String...
Condensed preview — 99 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (761K chars).
[
  {
    "path": ".gitignore",
    "chars": 75,
    "preview": "**target/\n**.settings/\n**.project\n**.classpath\n*.prefs\n*.log\n*.iml\n**idea/\n"
  },
  {
    "path": ".travis.yml",
    "chars": 1738,
    "preview": "sudo: true\nservices:\n- docker\nlanguage: java\njdk:\n- openjdk8\nenv:\n  matrix:\n  - GEOTOOLS_VERSION='22.0' GEOSERVER_VERSIO"
  },
  {
    "path": "LICENSE",
    "chars": 35122,
    "preview": "GNU GENERAL PUBLIC LICENSE\n                       Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation,"
  },
  {
    "path": "README.md",
    "chars": 1569,
    "preview": "# ElasticGeo\n\n<a href=\"https://travis-ci.org/ngageoint/elasticgeo\">\n\t<img alt=\"Travis-CI test status\" \n\t     src=\"https:"
  },
  {
    "path": "gs-web-elasticsearch/LICENSE",
    "chars": 35122,
    "preview": "GNU GENERAL PUBLIC LICENSE\n                       Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation,"
  },
  {
    "path": "gs-web-elasticsearch/doc/index.rst",
    "chars": 27110,
    "preview": "Elasticsearch GeoServer Data Store\r\n==================================\r\n\r\nElasticsearch is a popular distributed search "
  },
  {
    "path": "gs-web-elasticsearch/pom.xml",
    "chars": 5790,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!-- Copyright (c) 2001 - 2013 OpenPlans - www.openplans.org. All rights reserved"
  },
  {
    "path": "gs-web-elasticsearch/src/assembly/dist.xml",
    "chars": 820,
    "preview": "<assembly xmlns=\"http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2\" \n  xmlns:xsi=\"http://www.w3.org/2"
  },
  {
    "path": "gs-web-elasticsearch/src/main/java/applicationContext.xml",
    "chars": 1100,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<!-- Copyright (c) 2014 OpenPlans - www.openplans.org. All rights reserved.\r\nThi"
  },
  {
    "path": "gs-web-elasticsearch/src/main/java/mil/nga/giat/elasticsearch/ElasticAttributeProvider.java",
    "chars": 3154,
    "preview": "/* (c) 2014 Open Source Geospatial Foundation - all rights reserved\r\n * This code is licensed under the GPL 2.0 license,"
  },
  {
    "path": "gs-web-elasticsearch/src/main/java/mil/nga/giat/elasticsearch/ElasticConfigurationPage.html",
    "chars": 1586,
    "preview": "<!--suppress ALL -->\n<html xmlns:wicket=\"http://wicket.apache.org/\">\n<head>\n<title><wicket:message key=\"title\">Elasticse"
  },
  {
    "path": "gs-web-elasticsearch/src/main/java/mil/nga/giat/elasticsearch/ElasticConfigurationPage.java",
    "chars": 18016,
    "preview": "/* (c) 2014 Open Source Geospatial Foundation - all rights reserved\r\n * This code is licensed under the GPL 2.0 license,"
  },
  {
    "path": "gs-web-elasticsearch/src/main/java/mil/nga/giat/elasticsearch/ElasticConfigurationPanel.html",
    "chars": 436,
    "preview": "<!--suppress ALL -->\n<html xmlns:wicket=\"http://wicket.apache.org/\">\n<head></head>\n<body>\n\t<wicket:panel>\n\t\t<div wicket:"
  },
  {
    "path": "gs-web-elasticsearch/src/main/java/mil/nga/giat/elasticsearch/ElasticConfigurationPanel.java",
    "chars": 8196,
    "preview": "/* (c) 2014 Open Source Geospatial Foundation - all rights reserved\r\n * This code is licensed under the GPL 2.0 license,"
  },
  {
    "path": "gs-web-elasticsearch/src/main/java/mil/nga/giat/elasticsearch/ElasticConfigurationPanelInfo.java",
    "chars": 1425,
    "preview": "/* (c) 2014 Open Source Geospatial Foundation - all rights reserved\r\n * This code is licensed under the GPL 2.0 license,"
  },
  {
    "path": "gs-web-elasticsearch/src/main/java/mil/nga/giat/elasticsearch/ElasticFeatureTypeCallback.java",
    "chars": 2505,
    "preview": "/* (c) 2014 Open Source Geospatial Foundation - all rights reserved\r\n * This code is licensed under the GPL 2.0 license,"
  },
  {
    "path": "gs-web-elasticsearch/src/main/java/mil/nga/giat/elasticsearch/ElasticXStreamInitializer.java",
    "chars": 1020,
    "preview": "/* (c) 2014 Open Source Geospatial Foundation - all rights reserved\r\n * (c) 2014 OpenPlans\r\n * This code is licensed und"
  },
  {
    "path": "gs-web-elasticsearch/src/main/java/mil/nga/giat/elasticsearch/ElasticXStreamPersisterInitializer.java",
    "chars": 444,
    "preview": "package mil.nga.giat.elasticsearch;\n\nimport org.geoserver.config.util.XStreamPersister;\nimport org.geoserver.config.util"
  },
  {
    "path": "gs-web-elasticsearch/src/main/resources/GeoServerApplication.properties",
    "chars": 1132,
    "preview": "# suppress inspection \"UnusedProperty\" for whole file\r\ndata.resource.config.elasticsearch = Elasticsearch\r\nElasticConfig"
  },
  {
    "path": "gt-elasticsearch/LGPL",
    "chars": 26435,
    "preview": "\t\t  GNU LESSER GENERAL PUBLIC LICENSE\n\t\t       Version 2.1, February 1999\n\n Copyright (C) 1991, 1999 Free Software Found"
  },
  {
    "path": "gt-elasticsearch/LICENSE",
    "chars": 450,
    "preview": "This module is licensed under the terms of the GNU Lesser General Public \nLicense (LGPL), version 2 or later. The direct"
  },
  {
    "path": "gt-elasticsearch/pom.xml",
    "chars": 6711,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2"
  },
  {
    "path": "gt-elasticsearch/src/main/java/mil/nga/giat/data/elasticsearch/ElasticAggregation.java",
    "chars": 769,
    "preview": "/*\n * This file is hereby placed into the Public Domain. This means anyone is\n * free to do whatever they wish with this"
  },
  {
    "path": "gt-elasticsearch/src/main/java/mil/nga/giat/data/elasticsearch/ElasticAttribute.java",
    "chars": 7242,
    "preview": "/*\n * This file is hereby placed into the Public Domain. This means anyone is\n * free to do whatever they wish with this"
  },
  {
    "path": "gt-elasticsearch/src/main/java/mil/nga/giat/data/elasticsearch/ElasticCapabilities.java",
    "chars": 6187,
    "preview": "/*\n * This file is hereby placed into the Public Domain. This means anyone is\n * free to do whatever they wish with this"
  },
  {
    "path": "gt-elasticsearch/src/main/java/mil/nga/giat/data/elasticsearch/ElasticClient.java",
    "chars": 875,
    "preview": "/*\n * This file is hereby placed into the Public Domain. This means anyone is\n * free to do whatever they wish with this"
  },
  {
    "path": "gt-elasticsearch/src/main/java/mil/nga/giat/data/elasticsearch/ElasticConstants.java",
    "chars": 1349,
    "preview": "/*\n * This file is hereby placed into the Public Domain. This means anyone is\n * free to do whatever they wish with this"
  },
  {
    "path": "gt-elasticsearch/src/main/java/mil/nga/giat/data/elasticsearch/ElasticDataStore.java",
    "chars": 14595,
    "preview": "/*\n * This file is hereby placed into the Public Domain. This means anyone is\n * free to do whatever they wish with this"
  },
  {
    "path": "gt-elasticsearch/src/main/java/mil/nga/giat/data/elasticsearch/ElasticDataStoreFactory.java",
    "chars": 13421,
    "preview": "/*\n * This file is hereby placed into the Public Domain. This means anyone is\n * free to do whatever they wish with this"
  },
  {
    "path": "gt-elasticsearch/src/main/java/mil/nga/giat/data/elasticsearch/ElasticFeatureReader.java",
    "chars": 7936,
    "preview": "/*\n * This file is hereby placed into the Public Domain. This means anyone is\n * free to do whatever they wish with this"
  },
  {
    "path": "gt-elasticsearch/src/main/java/mil/nga/giat/data/elasticsearch/ElasticFeatureReaderScroll.java",
    "chars": 3390,
    "preview": "/*\n * This file is hereby placed into the Public Domain. This means anyone is\n * free to do whatever they wish with this"
  },
  {
    "path": "gt-elasticsearch/src/main/java/mil/nga/giat/data/elasticsearch/ElasticFeatureSource.java",
    "chars": 11936,
    "preview": "/*\n * This file is hereby placed into the Public Domain. This means anyone is\n * free to do whatever they wish with this"
  },
  {
    "path": "gt-elasticsearch/src/main/java/mil/nga/giat/data/elasticsearch/ElasticFeatureTypeBuilder.java",
    "chars": 4638,
    "preview": "/*\n * This file is hereby placed into the Public Domain. This means anyone is\n * free to do whatever they wish with this"
  },
  {
    "path": "gt-elasticsearch/src/main/java/mil/nga/giat/data/elasticsearch/ElasticHit.java",
    "chars": 1288,
    "preview": "/*\n * This file is hereby placed into the Public Domain. This means anyone is\n * free to do whatever they wish with this"
  },
  {
    "path": "gt-elasticsearch/src/main/java/mil/nga/giat/data/elasticsearch/ElasticLayerConfiguration.java",
    "chars": 1521,
    "preview": "/*\n * This file is hereby placed into the Public Domain. This means anyone is\n * free to do whatever they wish with this"
  },
  {
    "path": "gt-elasticsearch/src/main/java/mil/nga/giat/data/elasticsearch/ElasticMappings.java",
    "chars": 924,
    "preview": "/*\n * This file is hereby placed into the Public Domain. This means anyone is\n * free to do whatever they wish with this"
  },
  {
    "path": "gt-elasticsearch/src/main/java/mil/nga/giat/data/elasticsearch/ElasticParserUtil.java",
    "chars": 17527,
    "preview": "/*\n * This file is hereby placed into the Public Domain. This means anyone is\n * free to do whatever they wish with this"
  },
  {
    "path": "gt-elasticsearch/src/main/java/mil/nga/giat/data/elasticsearch/ElasticRequest.java",
    "chars": 2199,
    "preview": "/*\n * This file is hereby placed into the Public Domain. This means anyone is\n * free to do whatever they wish with this"
  },
  {
    "path": "gt-elasticsearch/src/main/java/mil/nga/giat/data/elasticsearch/ElasticResponse.java",
    "chars": 2285,
    "preview": "/*\n * This file is hereby placed into the Public Domain. This means anyone is\n * free to do whatever they wish with this"
  },
  {
    "path": "gt-elasticsearch/src/main/java/mil/nga/giat/data/elasticsearch/ElasticResults.java",
    "chars": 849,
    "preview": "/*\n * This file is hereby placed into the Public Domain. This means anyone is\n * free to do whatever they wish with this"
  },
  {
    "path": "gt-elasticsearch/src/main/java/mil/nga/giat/data/elasticsearch/FilterToElastic.java",
    "chars": 47706,
    "preview": "/*\n *    GeoTools - The Open Source Java GIS Toolkit\n *    http://geotools.org\n * \n *    (C) 2002-2008, Open Source Geos"
  },
  {
    "path": "gt-elasticsearch/src/main/java/mil/nga/giat/data/elasticsearch/FilterToElasticException.java",
    "chars": 403,
    "preview": "/*\n * This file is hereby placed into the Public Domain. This means anyone is\n * free to do whatever they wish with this"
  },
  {
    "path": "gt-elasticsearch/src/main/java/mil/nga/giat/data/elasticsearch/FilterToElasticHelper.java",
    "chars": 13068,
    "preview": "/*\n *    GeoTools - The Open Source Java GIS Toolkit\n *    http://geotools.org\n *\n *    (C) 2002-2009, Open Source Geosp"
  },
  {
    "path": "gt-elasticsearch/src/main/java/mil/nga/giat/data/elasticsearch/GeohashUtil.java",
    "chars": 1335,
    "preview": "/*\n * This file is hereby placed into the Public Domain. This means anyone is\n * free to do whatever they wish with this"
  },
  {
    "path": "gt-elasticsearch/src/main/java/mil/nga/giat/data/elasticsearch/RestElasticClient.java",
    "chars": 13834,
    "preview": "/*\n * This file is hereby placed into the Public Domain. This means anyone is\n * free to do whatever they wish with this"
  },
  {
    "path": "gt-elasticsearch/src/main/java/mil/nga/giat/data/elasticsearch/TotalDeserializer.java",
    "chars": 1029,
    "preview": "package mil.nga.giat.data.elasticsearch;\n\nimport com.fasterxml.jackson.core.JsonParser;\nimport com.fasterxml.jackson.cor"
  },
  {
    "path": "gt-elasticsearch/src/main/resources/META-INF/services/org.geotools.data.DataStoreFactorySpi",
    "chars": 56,
    "preview": "mil.nga.giat.data.elasticsearch.ElasticDataStoreFactory\n"
  },
  {
    "path": "gt-elasticsearch/src/test/java/mil/nga/giat/data/elasticsearch/ElasticAggregationReaderTest.java",
    "chars": 3591,
    "preview": "package mil.nga.giat.data.elasticsearch;\n\nimport org.geotools.data.DataUtilities;\nimport org.geotools.data.store.Content"
  },
  {
    "path": "gt-elasticsearch/src/test/java/mil/nga/giat/data/elasticsearch/ElasticAttributeTest.java",
    "chars": 4199,
    "preview": "/*\n * This file is hereby placed into the Public Domain. This means anyone is\n * free to do whatever they wish with this"
  },
  {
    "path": "gt-elasticsearch/src/test/java/mil/nga/giat/data/elasticsearch/ElasticDataStoreFinderIT.java",
    "chars": 6540,
    "preview": "/*\n *    GeoTools - The Open Source Java GIS Toolkit\n *    http://geotools.org\n * \n *    (C) 2014, Open Source Geospatia"
  },
  {
    "path": "gt-elasticsearch/src/test/java/mil/nga/giat/data/elasticsearch/ElasticDataStoreIT.java",
    "chars": 8807,
    "preview": "/*\n *    GeoTools - The Open Source Java GIS Toolkit\n *    http://geotools.org\n * \n *    (C) 2014, Open Source Geospatia"
  },
  {
    "path": "gt-elasticsearch/src/test/java/mil/nga/giat/data/elasticsearch/ElasticDatastoreFactoryTest.java",
    "chars": 11326,
    "preview": "/*\n * This file is hereby placed into the Public Domain. This means anyone is\n * free to do whatever they wish with this"
  },
  {
    "path": "gt-elasticsearch/src/test/java/mil/nga/giat/data/elasticsearch/ElasticFeatureFilterIT.java",
    "chars": 28240,
    "preview": "/*\n *    GeoTools - The Open Source Java GIS Toolkit\n *    http://geotools.org\n * \n *    (C) 2014, Open Source Geospatia"
  },
  {
    "path": "gt-elasticsearch/src/test/java/mil/nga/giat/data/elasticsearch/ElasticFilterTest.java",
    "chars": 57560,
    "preview": "/*\n * This file is hereby placed into the Public Domain. This means anyone is\n * free to do whatever they wish with this"
  },
  {
    "path": "gt-elasticsearch/src/test/java/mil/nga/giat/data/elasticsearch/ElasticGeometryFilterIT.java",
    "chars": 15818,
    "preview": "/*\n *    GeoTools - The Open Source Java GIS Toolkit\n *    http://geotools.org\n * \n *    (C) 2014, Open Source Geospatia"
  },
  {
    "path": "gt-elasticsearch/src/test/java/mil/nga/giat/data/elasticsearch/ElasticParserUtilTest.java",
    "chars": 18780,
    "preview": "/*\n * This file is hereby placed into the Public Domain. This means anyone is\n * free to do whatever they wish with this"
  },
  {
    "path": "gt-elasticsearch/src/test/java/mil/nga/giat/data/elasticsearch/ElasticResponseTest.java",
    "chars": 5884,
    "preview": "/*\n * This file is hereby placed into the Public Domain. This means anyone is\n * free to do whatever they wish with this"
  },
  {
    "path": "gt-elasticsearch/src/test/java/mil/nga/giat/data/elasticsearch/ElasticTemporalFilterIT.java",
    "chars": 8152,
    "preview": "/*\n *    GeoTools - The Open Source Java GIS Toolkit\n *    http://geotools.org\n * \n *    (C) 2014, Open Source Geospatia"
  },
  {
    "path": "gt-elasticsearch/src/test/java/mil/nga/giat/data/elasticsearch/ElasticTestSupport.java",
    "chars": 9187,
    "preview": "/*\n *    GeoTools - The Open Source Java GIS Toolkit\n *    http://geotools.org\n * \n *    (C) 2014, Open Source Geospatia"
  },
  {
    "path": "gt-elasticsearch/src/test/java/mil/nga/giat/data/elasticsearch/ElasticViewParametersFilterIT.java",
    "chars": 5203,
    "preview": "/*\n *    GeoTools - The Open Source Java GIS Toolkit\n *    http://geotools.org\n * \n *    (C) 2014, Open Source Geospatia"
  },
  {
    "path": "gt-elasticsearch/src/test/java/mil/nga/giat/data/elasticsearch/GeohashUtilTest.java",
    "chars": 2843,
    "preview": "package mil.nga.giat.data.elasticsearch;\n\nimport org.geotools.geometry.jts.ReferencedEnvelope;\nimport static org.geotool"
  },
  {
    "path": "gt-elasticsearch/src/test/java/mil/nga/giat/data/elasticsearch/RandomGeometryBuilder.java",
    "chars": 5523,
    "preview": "/*\n * This file is hereby placed into the Public Domain. This means anyone is\n * free to do whatever they wish with this"
  },
  {
    "path": "gt-elasticsearch/src/test/java/mil/nga/giat/data/elasticsearch/RestElasticClientTest.java",
    "chars": 32280,
    "preview": "/*\n * This file is hereby placed into the Public Domain. This means anyone is\n * free to do whatever they wish with this"
  },
  {
    "path": "gt-elasticsearch/src/test/resources/README.md",
    "chars": 707,
    "preview": "JSON data files are based on src/test/resources/wifiAccessPoint.xml from the GeoTools SOLR module:\n\n    GeoTools - The O"
  },
  {
    "path": "gt-elasticsearch/src/test/resources/active_mappings.json",
    "chars": 1376,
    "preview": "{\n  \"properties\": {\n    \"geo\": {\n      \"type\": \"geo_point\"\n    },\n    \"geo2\": {\n      \"type\": \"geo_shape\",\n      \"tree\":"
  },
  {
    "path": "gt-elasticsearch/src/test/resources/active_mappings_legacy.json",
    "chars": 1564,
    "preview": "{\n  \"properties\": {\n    \"geo\": {\n      \"type\": \"geo_point\"\n    },\n    \"geo2\": {\n      \"type\": \"geo_shape\",\n      \"tree\":"
  },
  {
    "path": "gt-elasticsearch/src/test/resources/active_mappings_ng.json",
    "chars": 1449,
    "preview": "{\n  \"properties\": {\n    \"geo\": {\n      \"type\": \"geo_point\"\n    },\n    \"geo2\": {\n      \"type\": \"geo_shape\",\n      \"tree\":"
  },
  {
    "path": "gt-elasticsearch/src/test/resources/log4j.properties",
    "chars": 285,
    "preview": "log4j.rootLogger=OFF,A1\n\nlog4j.appender.A1=org.apache.log4j.ConsoleAppender\nlog4j.appender.A1.layout=org.apache.log4j.Pa"
  },
  {
    "path": "gt-elasticsearch/src/test/resources/logging.properties",
    "chars": 1666,
    "preview": "############################################################\n#  \tGlobal properties\n#####################################"
  },
  {
    "path": "gt-elasticsearch/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker",
    "chars": 17,
    "preview": "mock-maker-inline"
  },
  {
    "path": "gt-elasticsearch/src/test/resources/requirements.txt",
    "chars": 10,
    "preview": "requests\n\n"
  },
  {
    "path": "gt-elasticsearch/src/test/resources/test_index.py",
    "chars": 1698,
    "preview": "\"\"\"\nScript creates status_s index for testing.\n\"\"\"\nimport argparse\nimport json\nimport os\n\nimport requests\n\nscript_dir = "
  },
  {
    "path": "gt-elasticsearch/src/test/resources/wifiAccessPoint.json",
    "chars": 8999,
    "preview": "{\n  \"features\": [\n    {\n      \"geo\": \"0,0\",\n      \"geo2\": {\n        \"coordinates\": [[0,0],[0,1]],\n        \"type\": \"lines"
  },
  {
    "path": "gt-elasticsearch-process/LGPL",
    "chars": 26435,
    "preview": "\t\t  GNU LESSER GENERAL PUBLIC LICENSE\n\t\t       Version 2.1, February 1999\n\n Copyright (C) 1991, 1999 Free Software Found"
  },
  {
    "path": "gt-elasticsearch-process/LICENSE",
    "chars": 450,
    "preview": "This module is licensed under the terms of the GNU Lesser General Public \nLicense (LGPL), version 2 or later. The direct"
  },
  {
    "path": "gt-elasticsearch-process/pom.xml",
    "chars": 2632,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2"
  },
  {
    "path": "gt-elasticsearch-process/src/main/java/mil/nga/giat/process/elasticsearch/BBOXRemovingFilterVisitor.java",
    "chars": 690,
    "preview": "/*\n * This file is hereby placed into the Public Domain. This means anyone is\n * free to do whatever they wish with this"
  },
  {
    "path": "gt-elasticsearch-process/src/main/java/mil/nga/giat/process/elasticsearch/BasicGeoHashGrid.java",
    "chars": 383,
    "preview": "/*\n * This file is hereby placed into the Public Domain. This means anyone is\n * free to do whatever they wish with this"
  },
  {
    "path": "gt-elasticsearch-process/src/main/java/mil/nga/giat/process/elasticsearch/GeoHashGrid.java",
    "chars": 10803,
    "preview": "/*\n * This file is hereby placed into the Public Domain. This means anyone is\n * free to do whatever they wish with this"
  },
  {
    "path": "gt-elasticsearch-process/src/main/java/mil/nga/giat/process/elasticsearch/GeoHashGridProcess.java",
    "chars": 6462,
    "preview": "/*\n * This file is hereby placed into the Public Domain. This means anyone is\n * free to do whatever they wish with this"
  },
  {
    "path": "gt-elasticsearch-process/src/main/java/mil/nga/giat/process/elasticsearch/GridCell.java",
    "chars": 507,
    "preview": "/*\n * This file is hereby placed into the Public Domain. This means anyone is\n * free to do whatever they wish with this"
  },
  {
    "path": "gt-elasticsearch-process/src/main/java/mil/nga/giat/process/elasticsearch/GridCoverageUtil.java",
    "chars": 1542,
    "preview": "/*\n * This file is hereby placed into the Public Domain. This means anyone is\n * free to do whatever they wish with this"
  },
  {
    "path": "gt-elasticsearch-process/src/main/java/mil/nga/giat/process/elasticsearch/MetricGeoHashGrid.java",
    "chars": 1165,
    "preview": "/*\n * This file is hereby placed into the Public Domain. This means anyone is\n * free to do whatever they wish with this"
  },
  {
    "path": "gt-elasticsearch-process/src/main/java/mil/nga/giat/process/elasticsearch/NestedAggGeoHashGrid.java",
    "chars": 6825,
    "preview": "/*\n * This file is hereby placed into the Public Domain. This means anyone is\n * free to do whatever they wish with this"
  },
  {
    "path": "gt-elasticsearch-process/src/main/java/mil/nga/giat/process/elasticsearch/RasterScale.java",
    "chars": 2185,
    "preview": "/*\n * This file is hereby placed into the Public Domain. This means anyone is\n * free to do whatever they wish with this"
  },
  {
    "path": "gt-elasticsearch-process/src/main/resources/META-INF/services/org.geotools.process.ProcessFactory",
    "chars": 49,
    "preview": "org.geotools.process.vector.VectorProcessFactory\n"
  },
  {
    "path": "gt-elasticsearch-process/src/main/resources/META-INF/services/org.geotools.process.vector.VectorProcess",
    "chars": 54,
    "preview": "mil.nga.giat.process.elasticsearch.GeoHashGridProcess\n"
  },
  {
    "path": "gt-elasticsearch-process/src/test/java/mil/nga/giat/process/elasticsearch/GeoHashGridProcessTest.java",
    "chars": 7690,
    "preview": "/*\n * This file is hereby placed into the Public Domain. This means anyone is\n * free to do whatever they wish with this"
  },
  {
    "path": "gt-elasticsearch-process/src/test/java/mil/nga/giat/process/elasticsearch/GeoHashGridTest.java",
    "chars": 13289,
    "preview": "/*\n * This file is hereby placed into the Public Domain. This means anyone is\n * free to do whatever they wish with this"
  },
  {
    "path": "gt-elasticsearch-process/src/test/java/mil/nga/giat/process/elasticsearch/GridCoverageUtilTest.java",
    "chars": 5269,
    "preview": "/*\n * This file is hereby placed into the Public Domain. This means anyone is\n * free to do whatever they wish with this"
  },
  {
    "path": "gt-elasticsearch-process/src/test/java/mil/nga/giat/process/elasticsearch/MetricGeoHashGridTest.java",
    "chars": 1859,
    "preview": "/*\n * This file is hereby placed into the Public Domain. This means anyone is\n * free to do whatever they wish with this"
  },
  {
    "path": "gt-elasticsearch-process/src/test/java/mil/nga/giat/process/elasticsearch/NestedAggGeoHashGridTest.java",
    "chars": 6130,
    "preview": "/*\n * This file is hereby placed into the Public Domain. This means anyone is\n * free to do whatever they wish with this"
  },
  {
    "path": "gt-elasticsearch-process/src/test/java/mil/nga/giat/process/elasticsearch/RasterScaleTest.java",
    "chars": 2989,
    "preview": "/*\n * This file is hereby placed into the Public Domain. This means anyone is\n * free to do whatever they wish with this"
  },
  {
    "path": "gt-elasticsearch-process/src/test/java/mil/nga/giat/process/elasticsearch/TestUtil.java",
    "chars": 2968,
    "preview": "/*\n * This file is hereby placed into the Public Domain. This means anyone is\n * free to do whatever they wish with this"
  },
  {
    "path": "joda-shaded/LICENSE.txt",
    "chars": 11358,
    "preview": "\n                                 Apache License\n                           Version 2.0, January 2004\n                  "
  },
  {
    "path": "joda-shaded/NOTICE.txt",
    "chars": 150,
    "preview": "Elasticsearch\nCopyright 2009-2017 Elasticsearch\n\nThis product includes software developed by The Apache Software Foundat"
  },
  {
    "path": "joda-shaded/pom.xml",
    "chars": 3974,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2"
  },
  {
    "path": "joda-shaded/src/main/java/org/elasticsearch/common/Strings.java",
    "chars": 1209,
    "preview": "/*\n * Licensed to Elasticsearch under one or more contributor\n * license agreements. See the NOTICE file distributed wit"
  },
  {
    "path": "pom.xml",
    "chars": 8917,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2"
  }
]

About this extraction

This page contains the full source code of the ngageoint/elasticgeo GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 99 files (707.0 KB), approximately 161.7k tokens, and a symbol index with 908 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!