geohydra 0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +23 -0
- data/.gitmodules +3 -0
- data/.travis.yml +7 -0
- data/Gemfile +15 -0
- data/Gemfile.lock +281 -0
- data/LICENSE +14 -0
- data/README.md +187 -0
- data/Rakefile +34 -0
- data/VERSION +1 -0
- data/bin/accession.rb +109 -0
- data/bin/assemble.rb +307 -0
- data/bin/assemble_data.rb +66 -0
- data/bin/assemble_placenames.rb +110 -0
- data/bin/build_stage_options.rb +27 -0
- data/bin/derive_wgs84.rb +85 -0
- data/bin/extract_thumbnail.rb +49 -0
- data/bin/geohydra +11 -0
- data/bin/ingest_arcgis.rb +77 -0
- data/bin/ingest_tufts.rb +71 -0
- data/bin/loader.rb +296 -0
- data/bin/loader_postgis.rb +259 -0
- data/bin/seed.rb +78 -0
- data/bin/solr_indexer.rb +41 -0
- data/bin/sync_geoserver_metadata.rb +168 -0
- data/bin/validate_data.rb +59 -0
- data/config/.gitignore +1 -0
- data/config/boot.rb +17 -0
- data/config/database.yml +29 -0
- data/config/environments/.gitignore +8 -0
- data/config/environments/.gitkeep +0 -0
- data/config/environments/example.rb +85 -0
- data/config/environments/example_rgeoserver.yml +16 -0
- data/config/migrate.rb +11 -0
- data/geohydra.gemspec +49 -0
- data/lib/geohydra.rb +11 -0
- data/lib/geohydra/accession.rb +291 -0
- data/lib/geohydra/arcgis_to_iso19139_fc.xsl +364 -0
- data/lib/geohydra/gazetteer.csv +36 -0
- data/lib/geohydra/gazetteer.rb +73 -0
- data/lib/geohydra/geonetwork.rb +156 -0
- data/lib/geohydra/mods2ogp.xsl +198 -0
- data/lib/geohydra/ogpcleanup.xsl +28 -0
- data/lib/geohydra/solr.rb +49 -0
- data/lib/geohydra/transform.rb +175 -0
- data/lib/geohydra/utils.rb +19 -0
- data/lib/geohydra/version.rb +3 -0
- data/scripts/correct_collections.rb +93 -0
- data/scripts/dbfdump.rb +13 -0
- data/scripts/extract.xsl +35 -0
- data/scripts/geoserver_createdb.sh +6 -0
- data/scripts/geoserver_createdb.sql +29 -0
- data/scripts/geowebcache_tops.rb +22 -0
- data/scripts/ingest_mods.rb +23 -0
- data/scripts/iso2html/displayElement.xsl +52 -0
- data/scripts/iso2html/elements-ISO.xml +665 -0
- data/scripts/iso2html/headers-ISO.xml +16 -0
- data/scripts/iso2html/printFormatted.xsl +227 -0
- data/scripts/iso2html/printtextlines.xsl +171 -0
- data/scripts/iso2html/xml-to-html-ISO.xsl +273 -0
- data/scripts/iso2html/xml-to-text-ISO.xsl +148 -0
- data/scripts/load_stage_data.rb +13 -0
- data/scripts/nextgis_iso19115.xsl +553 -0
- data/scripts/replicate_db.sh +7 -0
- data/scripts/report_stage.rb +5 -0
- data/solr/dev.html +19 -0
- data/solr/dlss-dev-drh-geo/conf/schema.xml +54 -0
- data/solr/dlss-dev-drh-geo/conf/solrconfig.xml +156 -0
- data/solr/dlss-dev-drh-geo/deploy.sh +15 -0
- data/solr/dlss-dev-drh-geo/example_doc.xml +25 -0
- data/solr/dlss-dev-drh-geo/test.sh +14 -0
- data/solr/ogp-dev/conf/admin-extra.html +24 -0
- data/solr/ogp-dev/conf/admin-extra.menu-bottom.html +25 -0
- data/solr/ogp-dev/conf/admin-extra.menu-top.html +25 -0
- data/solr/ogp-dev/conf/currency.xml +67 -0
- data/solr/ogp-dev/conf/elevate.xml +38 -0
- data/solr/ogp-dev/conf/lang/contractions_ca.txt +8 -0
- data/solr/ogp-dev/conf/lang/contractions_fr.txt +15 -0
- data/solr/ogp-dev/conf/lang/contractions_ga.txt +5 -0
- data/solr/ogp-dev/conf/lang/contractions_it.txt +23 -0
- data/solr/ogp-dev/conf/lang/hyphenations_ga.txt +5 -0
- data/solr/ogp-dev/conf/lang/stemdict_nl.txt +6 -0
- data/solr/ogp-dev/conf/lang/stoptags_ja.txt +420 -0
- data/solr/ogp-dev/conf/lang/stopwords_ar.txt +125 -0
- data/solr/ogp-dev/conf/lang/stopwords_bg.txt +193 -0
- data/solr/ogp-dev/conf/lang/stopwords_ca.txt +220 -0
- data/solr/ogp-dev/conf/lang/stopwords_cz.txt +172 -0
- data/solr/ogp-dev/conf/lang/stopwords_da.txt +108 -0
- data/solr/ogp-dev/conf/lang/stopwords_de.txt +292 -0
- data/solr/ogp-dev/conf/lang/stopwords_el.txt +78 -0
- data/solr/ogp-dev/conf/lang/stopwords_en.txt +54 -0
- data/solr/ogp-dev/conf/lang/stopwords_es.txt +354 -0
- data/solr/ogp-dev/conf/lang/stopwords_eu.txt +99 -0
- data/solr/ogp-dev/conf/lang/stopwords_fa.txt +313 -0
- data/solr/ogp-dev/conf/lang/stopwords_fi.txt +95 -0
- data/solr/ogp-dev/conf/lang/stopwords_fr.txt +184 -0
- data/solr/ogp-dev/conf/lang/stopwords_ga.txt +110 -0
- data/solr/ogp-dev/conf/lang/stopwords_gl.txt +161 -0
- data/solr/ogp-dev/conf/lang/stopwords_hi.txt +235 -0
- data/solr/ogp-dev/conf/lang/stopwords_hu.txt +209 -0
- data/solr/ogp-dev/conf/lang/stopwords_hy.txt +46 -0
- data/solr/ogp-dev/conf/lang/stopwords_id.txt +359 -0
- data/solr/ogp-dev/conf/lang/stopwords_it.txt +301 -0
- data/solr/ogp-dev/conf/lang/stopwords_ja.txt +127 -0
- data/solr/ogp-dev/conf/lang/stopwords_lv.txt +172 -0
- data/solr/ogp-dev/conf/lang/stopwords_nl.txt +117 -0
- data/solr/ogp-dev/conf/lang/stopwords_no.txt +192 -0
- data/solr/ogp-dev/conf/lang/stopwords_pt.txt +251 -0
- data/solr/ogp-dev/conf/lang/stopwords_ro.txt +233 -0
- data/solr/ogp-dev/conf/lang/stopwords_ru.txt +241 -0
- data/solr/ogp-dev/conf/lang/stopwords_sv.txt +131 -0
- data/solr/ogp-dev/conf/lang/stopwords_th.txt +119 -0
- data/solr/ogp-dev/conf/lang/stopwords_tr.txt +212 -0
- data/solr/ogp-dev/conf/lang/userdict_ja.txt +29 -0
- data/solr/ogp-dev/conf/mapping-FoldToASCII.txt +3813 -0
- data/solr/ogp-dev/conf/mapping-ISOLatin1Accent.txt +246 -0
- data/solr/ogp-dev/conf/protwords.txt +21 -0
- data/solr/ogp-dev/conf/schema.xml +1362 -0
- data/solr/ogp-dev/conf/scripts.conf +24 -0
- data/solr/ogp-dev/conf/solrconfig.xml +1816 -0
- data/solr/ogp-dev/conf/spellings.txt +2 -0
- data/solr/ogp-dev/conf/stopwords.txt +14 -0
- data/solr/ogp-dev/conf/synonyms.txt +29 -0
- data/solr/ogp-dev/conf/synonymsIso.txt +158 -0
- data/solr/ogp-dev/conf/synonymsLcsh.txt +120 -0
- data/solr/ogp-dev/conf/synonymsState.txt +105 -0
- data/solr/ogp-dev/conf/update-script.js +53 -0
- data/solr/ogp-dev/conf/velocity/VM_global_library.vm +170 -0
- data/solr/ogp-dev/conf/velocity/browse.vm +50 -0
- data/solr/ogp-dev/conf/velocity/cluster.vm +9 -0
- data/solr/ogp-dev/conf/velocity/clusterResults.vm +12 -0
- data/solr/ogp-dev/conf/velocity/debug.vm +17 -0
- data/solr/ogp-dev/conf/velocity/did_you_mean.vm +4 -0
- data/solr/ogp-dev/conf/velocity/facet_fields.vm +15 -0
- data/solr/ogp-dev/conf/velocity/facet_pivot.vm +3 -0
- data/solr/ogp-dev/conf/velocity/facet_queries.vm +3 -0
- data/solr/ogp-dev/conf/velocity/facet_ranges.vm +15 -0
- data/solr/ogp-dev/conf/velocity/facets.vm +5 -0
- data/solr/ogp-dev/conf/velocity/footer.vm +17 -0
- data/solr/ogp-dev/conf/velocity/head.vm +32 -0
- data/solr/ogp-dev/conf/velocity/header.vm +3 -0
- data/solr/ogp-dev/conf/velocity/hit.vm +11 -0
- data/solr/ogp-dev/conf/velocity/hitGrouped.vm +24 -0
- data/solr/ogp-dev/conf/velocity/join-doc.vm +4 -0
- data/solr/ogp-dev/conf/velocity/jquery.autocomplete.css +48 -0
- data/solr/ogp-dev/conf/velocity/jquery.autocomplete.js +763 -0
- data/solr/ogp-dev/conf/velocity/layout.vm +20 -0
- data/solr/ogp-dev/conf/velocity/main.css +208 -0
- data/solr/ogp-dev/conf/velocity/product-doc.vm +27 -0
- data/solr/ogp-dev/conf/velocity/query.vm +42 -0
- data/solr/ogp-dev/conf/velocity/queryGroup.vm +19 -0
- data/solr/ogp-dev/conf/velocity/querySpatial.vm +40 -0
- data/solr/ogp-dev/conf/velocity/richtext-doc.vm +114 -0
- data/solr/ogp-dev/conf/velocity/suggest.vm +3 -0
- data/solr/ogp-dev/conf/velocity/tabs.vm +6 -0
- data/solr/ogp-dev/conf/xslt/example.xsl +132 -0
- data/solr/ogp-dev/conf/xslt/example_atom.xsl +67 -0
- data/solr/ogp-dev/conf/xslt/example_rss.xsl +66 -0
- data/solr/ogp-dev/conf/xslt/luke.xsl +337 -0
- data/solr/ogp-dev/conf/xslt/updateXml.xsl +70 -0
- data/solr/ogp-dev/deploy.sh +15 -0
- data/solr/ogp-dev/purge.sh +9 -0
- data/solr/ogp-dev/upload.sh +17 -0
- data/solr/ogp-test/conf/admin-extra.html +24 -0
- data/solr/ogp-test/conf/admin-extra.menu-bottom.html +25 -0
- data/solr/ogp-test/conf/admin-extra.menu-top.html +25 -0
- data/solr/ogp-test/conf/currency.xml +67 -0
- data/solr/ogp-test/conf/elevate.xml +38 -0
- data/solr/ogp-test/conf/lang/contractions_ca.txt +8 -0
- data/solr/ogp-test/conf/lang/contractions_fr.txt +15 -0
- data/solr/ogp-test/conf/lang/contractions_ga.txt +5 -0
- data/solr/ogp-test/conf/lang/contractions_it.txt +23 -0
- data/solr/ogp-test/conf/lang/hyphenations_ga.txt +5 -0
- data/solr/ogp-test/conf/lang/stemdict_nl.txt +6 -0
- data/solr/ogp-test/conf/lang/stoptags_ja.txt +420 -0
- data/solr/ogp-test/conf/lang/stopwords_ar.txt +125 -0
- data/solr/ogp-test/conf/lang/stopwords_bg.txt +193 -0
- data/solr/ogp-test/conf/lang/stopwords_ca.txt +220 -0
- data/solr/ogp-test/conf/lang/stopwords_cz.txt +172 -0
- data/solr/ogp-test/conf/lang/stopwords_da.txt +108 -0
- data/solr/ogp-test/conf/lang/stopwords_de.txt +292 -0
- data/solr/ogp-test/conf/lang/stopwords_el.txt +78 -0
- data/solr/ogp-test/conf/lang/stopwords_en.txt +54 -0
- data/solr/ogp-test/conf/lang/stopwords_es.txt +354 -0
- data/solr/ogp-test/conf/lang/stopwords_eu.txt +99 -0
- data/solr/ogp-test/conf/lang/stopwords_fa.txt +313 -0
- data/solr/ogp-test/conf/lang/stopwords_fi.txt +95 -0
- data/solr/ogp-test/conf/lang/stopwords_fr.txt +184 -0
- data/solr/ogp-test/conf/lang/stopwords_ga.txt +110 -0
- data/solr/ogp-test/conf/lang/stopwords_gl.txt +161 -0
- data/solr/ogp-test/conf/lang/stopwords_hi.txt +235 -0
- data/solr/ogp-test/conf/lang/stopwords_hu.txt +209 -0
- data/solr/ogp-test/conf/lang/stopwords_hy.txt +46 -0
- data/solr/ogp-test/conf/lang/stopwords_id.txt +359 -0
- data/solr/ogp-test/conf/lang/stopwords_it.txt +301 -0
- data/solr/ogp-test/conf/lang/stopwords_ja.txt +127 -0
- data/solr/ogp-test/conf/lang/stopwords_lv.txt +172 -0
- data/solr/ogp-test/conf/lang/stopwords_nl.txt +117 -0
- data/solr/ogp-test/conf/lang/stopwords_no.txt +192 -0
- data/solr/ogp-test/conf/lang/stopwords_pt.txt +251 -0
- data/solr/ogp-test/conf/lang/stopwords_ro.txt +233 -0
- data/solr/ogp-test/conf/lang/stopwords_ru.txt +241 -0
- data/solr/ogp-test/conf/lang/stopwords_sv.txt +131 -0
- data/solr/ogp-test/conf/lang/stopwords_th.txt +119 -0
- data/solr/ogp-test/conf/lang/stopwords_tr.txt +212 -0
- data/solr/ogp-test/conf/lang/userdict_ja.txt +29 -0
- data/solr/ogp-test/conf/mapping-FoldToASCII.txt +3813 -0
- data/solr/ogp-test/conf/mapping-ISOLatin1Accent.txt +246 -0
- data/solr/ogp-test/conf/protwords.txt +21 -0
- data/solr/ogp-test/conf/schema.xml +1362 -0
- data/solr/ogp-test/conf/scripts.conf +24 -0
- data/solr/ogp-test/conf/solrconfig.xml +1816 -0
- data/solr/ogp-test/conf/spellings.txt +2 -0
- data/solr/ogp-test/conf/stopwords.txt +14 -0
- data/solr/ogp-test/conf/synonyms.txt +29 -0
- data/solr/ogp-test/conf/synonymsIso.txt +158 -0
- data/solr/ogp-test/conf/synonymsLcsh.txt +120 -0
- data/solr/ogp-test/conf/synonymsState.txt +105 -0
- data/solr/ogp-test/conf/update-script.js +53 -0
- data/solr/ogp-test/conf/velocity/VM_global_library.vm +170 -0
- data/solr/ogp-test/conf/velocity/browse.vm +50 -0
- data/solr/ogp-test/conf/velocity/cluster.vm +9 -0
- data/solr/ogp-test/conf/velocity/clusterResults.vm +12 -0
- data/solr/ogp-test/conf/velocity/debug.vm +17 -0
- data/solr/ogp-test/conf/velocity/did_you_mean.vm +4 -0
- data/solr/ogp-test/conf/velocity/facet_fields.vm +15 -0
- data/solr/ogp-test/conf/velocity/facet_pivot.vm +3 -0
- data/solr/ogp-test/conf/velocity/facet_queries.vm +3 -0
- data/solr/ogp-test/conf/velocity/facet_ranges.vm +15 -0
- data/solr/ogp-test/conf/velocity/facets.vm +5 -0
- data/solr/ogp-test/conf/velocity/footer.vm +17 -0
- data/solr/ogp-test/conf/velocity/head.vm +32 -0
- data/solr/ogp-test/conf/velocity/header.vm +3 -0
- data/solr/ogp-test/conf/velocity/hit.vm +11 -0
- data/solr/ogp-test/conf/velocity/hitGrouped.vm +24 -0
- data/solr/ogp-test/conf/velocity/join-doc.vm +4 -0
- data/solr/ogp-test/conf/velocity/jquery.autocomplete.css +48 -0
- data/solr/ogp-test/conf/velocity/jquery.autocomplete.js +763 -0
- data/solr/ogp-test/conf/velocity/layout.vm +20 -0
- data/solr/ogp-test/conf/velocity/main.css +208 -0
- data/solr/ogp-test/conf/velocity/product-doc.vm +27 -0
- data/solr/ogp-test/conf/velocity/query.vm +42 -0
- data/solr/ogp-test/conf/velocity/queryGroup.vm +19 -0
- data/solr/ogp-test/conf/velocity/querySpatial.vm +40 -0
- data/solr/ogp-test/conf/velocity/richtext-doc.vm +114 -0
- data/solr/ogp-test/conf/velocity/suggest.vm +3 -0
- data/solr/ogp-test/conf/velocity/tabs.vm +6 -0
- data/solr/ogp-test/conf/xslt/example.xsl +132 -0
- data/solr/ogp-test/conf/xslt/example_atom.xsl +67 -0
- data/solr/ogp-test/conf/xslt/example_rss.xsl +66 -0
- data/solr/ogp-test/conf/xslt/luke.xsl +337 -0
- data/solr/ogp-test/conf/xslt/updateXml.xsl +70 -0
- data/solr/ogp-test/deploy.sh +15 -0
- data/solr/ogp-test/purge.sh +9 -0
- data/solr/ogp-test/upload.sh +17 -0
- data/solr/ogp/conf/admin-extra.html +24 -0
- data/solr/ogp/conf/admin-extra.menu-bottom.html +25 -0
- data/solr/ogp/conf/admin-extra.menu-top.html +25 -0
- data/solr/ogp/conf/currency.xml +67 -0
- data/solr/ogp/conf/elevate.xml +38 -0
- data/solr/ogp/conf/lang/contractions_ca.txt +8 -0
- data/solr/ogp/conf/lang/contractions_fr.txt +15 -0
- data/solr/ogp/conf/lang/contractions_ga.txt +5 -0
- data/solr/ogp/conf/lang/contractions_it.txt +23 -0
- data/solr/ogp/conf/lang/hyphenations_ga.txt +5 -0
- data/solr/ogp/conf/lang/stemdict_nl.txt +6 -0
- data/solr/ogp/conf/lang/stoptags_ja.txt +420 -0
- data/solr/ogp/conf/lang/stopwords_ar.txt +125 -0
- data/solr/ogp/conf/lang/stopwords_bg.txt +193 -0
- data/solr/ogp/conf/lang/stopwords_ca.txt +220 -0
- data/solr/ogp/conf/lang/stopwords_cz.txt +172 -0
- data/solr/ogp/conf/lang/stopwords_da.txt +108 -0
- data/solr/ogp/conf/lang/stopwords_de.txt +292 -0
- data/solr/ogp/conf/lang/stopwords_el.txt +78 -0
- data/solr/ogp/conf/lang/stopwords_en.txt +54 -0
- data/solr/ogp/conf/lang/stopwords_es.txt +354 -0
- data/solr/ogp/conf/lang/stopwords_eu.txt +99 -0
- data/solr/ogp/conf/lang/stopwords_fa.txt +313 -0
- data/solr/ogp/conf/lang/stopwords_fi.txt +95 -0
- data/solr/ogp/conf/lang/stopwords_fr.txt +184 -0
- data/solr/ogp/conf/lang/stopwords_ga.txt +110 -0
- data/solr/ogp/conf/lang/stopwords_gl.txt +161 -0
- data/solr/ogp/conf/lang/stopwords_hi.txt +235 -0
- data/solr/ogp/conf/lang/stopwords_hu.txt +209 -0
- data/solr/ogp/conf/lang/stopwords_hy.txt +46 -0
- data/solr/ogp/conf/lang/stopwords_id.txt +359 -0
- data/solr/ogp/conf/lang/stopwords_it.txt +301 -0
- data/solr/ogp/conf/lang/stopwords_ja.txt +127 -0
- data/solr/ogp/conf/lang/stopwords_lv.txt +172 -0
- data/solr/ogp/conf/lang/stopwords_nl.txt +117 -0
- data/solr/ogp/conf/lang/stopwords_no.txt +192 -0
- data/solr/ogp/conf/lang/stopwords_pt.txt +251 -0
- data/solr/ogp/conf/lang/stopwords_ro.txt +233 -0
- data/solr/ogp/conf/lang/stopwords_ru.txt +241 -0
- data/solr/ogp/conf/lang/stopwords_sv.txt +131 -0
- data/solr/ogp/conf/lang/stopwords_th.txt +119 -0
- data/solr/ogp/conf/lang/stopwords_tr.txt +212 -0
- data/solr/ogp/conf/lang/userdict_ja.txt +29 -0
- data/solr/ogp/conf/mapping-FoldToASCII.txt +3813 -0
- data/solr/ogp/conf/mapping-ISOLatin1Accent.txt +246 -0
- data/solr/ogp/conf/protwords.txt +21 -0
- data/solr/ogp/conf/schema.xml +1362 -0
- data/solr/ogp/conf/scripts.conf +24 -0
- data/solr/ogp/conf/solrconfig.xml +1816 -0
- data/solr/ogp/conf/spellings.txt +2 -0
- data/solr/ogp/conf/stopwords.txt +14 -0
- data/solr/ogp/conf/synonyms.txt +29 -0
- data/solr/ogp/conf/synonymsIso.txt +158 -0
- data/solr/ogp/conf/synonymsLcsh.txt +120 -0
- data/solr/ogp/conf/synonymsState.txt +105 -0
- data/solr/ogp/conf/update-script.js +53 -0
- data/solr/ogp/conf/velocity/VM_global_library.vm +170 -0
- data/solr/ogp/conf/velocity/browse.vm +50 -0
- data/solr/ogp/conf/velocity/cluster.vm +9 -0
- data/solr/ogp/conf/velocity/clusterResults.vm +12 -0
- data/solr/ogp/conf/velocity/debug.vm +17 -0
- data/solr/ogp/conf/velocity/did_you_mean.vm +4 -0
- data/solr/ogp/conf/velocity/facet_fields.vm +15 -0
- data/solr/ogp/conf/velocity/facet_pivot.vm +3 -0
- data/solr/ogp/conf/velocity/facet_queries.vm +3 -0
- data/solr/ogp/conf/velocity/facet_ranges.vm +15 -0
- data/solr/ogp/conf/velocity/facets.vm +5 -0
- data/solr/ogp/conf/velocity/footer.vm +17 -0
- data/solr/ogp/conf/velocity/head.vm +32 -0
- data/solr/ogp/conf/velocity/header.vm +3 -0
- data/solr/ogp/conf/velocity/hit.vm +11 -0
- data/solr/ogp/conf/velocity/hitGrouped.vm +24 -0
- data/solr/ogp/conf/velocity/join-doc.vm +4 -0
- data/solr/ogp/conf/velocity/jquery.autocomplete.css +48 -0
- data/solr/ogp/conf/velocity/jquery.autocomplete.js +763 -0
- data/solr/ogp/conf/velocity/layout.vm +20 -0
- data/solr/ogp/conf/velocity/main.css +208 -0
- data/solr/ogp/conf/velocity/product-doc.vm +27 -0
- data/solr/ogp/conf/velocity/query.vm +42 -0
- data/solr/ogp/conf/velocity/queryGroup.vm +19 -0
- data/solr/ogp/conf/velocity/querySpatial.vm +40 -0
- data/solr/ogp/conf/velocity/richtext-doc.vm +114 -0
- data/solr/ogp/conf/velocity/suggest.vm +3 -0
- data/solr/ogp/conf/velocity/tabs.vm +6 -0
- data/solr/ogp/conf/xslt/example.xsl +132 -0
- data/solr/ogp/conf/xslt/example_atom.xsl +67 -0
- data/solr/ogp/conf/xslt/example_rss.xsl +66 -0
- data/solr/ogp/conf/xslt/luke.xsl +337 -0
- data/solr/ogp/conf/xslt/updateXml.xsl +70 -0
- data/solr/ogp/deploy.sh +15 -0
- data/solr/ogp/upload.sh +16 -0
- data/spec/fixtures/bw938nk9584/metadata/geoMetadata.xml +2438 -0
- data/spec/fixtures/bw938nk9584/temp/TRIPURA-iso19139-fc.xml +1643 -0
- data/spec/fixtures/bw938nk9584/temp/TRIPURA-iso19139.xml +790 -0
- data/spec/fixtures/cc142xj8436/metadata/geoMetadata.xml +2029 -0
- data/spec/fixtures/cc142xj8436/temp/HARYANA-iso19139-fc.xml +1174 -0
- data/spec/fixtures/cc142xj8436/temp/HARYANA-iso19139.xml +850 -0
- data/spec/fixtures/cg716wc7949/metadata/geoMetadata.xml +1815 -0
- data/spec/fixtures/cg716wc7949/temp/metadata.iso19139-fc.xml +958 -0
- data/spec/fixtures/cg716wc7949/temp/metadata.iso19139.xml +852 -0
- data/spec/fixtures/cm007pv9601/metadata/geoMetadata.xml +1092 -0
- data/spec/fixtures/cm007pv9601/temp/MEGHALAYA-iso19139-fc.xml +379 -0
- data/spec/fixtures/cm007pv9601/temp/MEGHALAYA-iso19139.xml +708 -0
- data/spec/fixtures/cp055nb0189/metadata/geoMetadata.xml +1820 -0
- data/spec/fixtures/cp055nb0189/temp/metadata.iso19139-fc.xml +955 -0
- data/spec/fixtures/cp055nb0189/temp/metadata.iso19139.xml +860 -0
- data/spec/fixtures/cs838pw3418/metadata/geoMetadata.xml +912 -0
- data/spec/fixtures/cs838pw3418/temp/OIL_GAS_FIELDS-iso19139-fc.xml +177 -0
- data/spec/fixtures/cs838pw3418/temp/OIL_GAS_FIELDS-iso19139.xml +730 -0
- data/spec/fixtures/dd308sy5843/metadata/geoMetadata.xml +2438 -0
- data/spec/fixtures/dd308sy5843/temp/ORISSA-iso19139-fc.xml +1643 -0
- data/spec/fixtures/dd308sy5843/temp/ORISSA-iso19139.xml +790 -0
- data/spec/fixtures/dd452vk1873/metadata/geoMetadata.xml +1168 -0
- data/spec/fixtures/dd452vk1873/temp/metadata.iso19139-fc.xml +175 -0
- data/spec/fixtures/dd452vk1873/temp/metadata.iso19139.xml +988 -0
- data/spec/fixtures/dg850pt1796/metadata/geoMetadata.xml +1411 -0
- data/spec/fixtures/dg850pt1796/temp/STATE1951-iso19139-fc.xml +519 -0
- data/spec/fixtures/dg850pt1796/temp/STATE1951-iso19139.xml +887 -0
- data/spec/fixtures/dn744tf5427/metadata/geoMetadata.xml +7403 -0
- data/spec/fixtures/dn744tf5427/temp/DISTRICT1991-iso19139-fc.xml +6539 -0
- data/spec/fixtures/dn744tf5427/temp/DISTRICT1991-iso19139.xml +859 -0
- data/spec/fixtures/dq603nz8402/metadata/geoMetadata.xml +8485 -0
- data/spec/fixtures/dq603nz8402/temp/STATE2001-iso19139-fc.xml +7595 -0
- data/spec/fixtures/dq603nz8402/temp/STATE2001-iso19139.xml +885 -0
- data/spec/fixtures/dv609zt4699/metadata/geoMetadata.xml +3865 -0
- data/spec/fixtures/dv609zt4699/temp/ASSAM-iso19139-fc.xml +3075 -0
- data/spec/fixtures/dv609zt4699/temp/ASSAM-iso19139.xml +785 -0
- data/spec/fixtures/dz222hw0585/metadata/geoMetadata.xml +2057 -0
- data/spec/fixtures/dz222hw0585/temp/PUNJAB-iso19139-fc.xml +1203 -0
- data/spec/fixtures/dz222hw0585/temp/PUNJAB-iso19139.xml +849 -0
- data/spec/fixtures/fd673qb9705/metadata/geoMetadata.xml +4059 -0
- data/spec/fixtures/fd673qb9705/temp/STATE1971-iso19139-fc.xml +3159 -0
- data/spec/fixtures/fd673qb9705/temp/STATE1971-iso19139.xml +895 -0
- data/spec/fixtures/fg451wp8917/metadata/geoMetadata.xml +2435 -0
- data/spec/fixtures/fg451wp8917/temp/SIKKIM-iso19139-fc.xml +1643 -0
- data/spec/fixtures/fg451wp8917/temp/SIKKIM-iso19139.xml +787 -0
- data/spec/fixtures/fh247yz0156/metadata/geoMetadata.xml +2437 -0
- data/spec/fixtures/fh247yz0156/temp/RAJASTHAN-iso19139-fc.xml +1643 -0
- data/spec/fixtures/fh247yz0156/temp/RAJASTHAN-iso19139.xml +789 -0
- data/spec/fixtures/fs487vd1465/metadata/geoMetadata.xml +3896 -0
- data/spec/fixtures/fs487vd1465/temp/CHHATTISGARH-iso19139-fc.xml +3075 -0
- data/spec/fixtures/fs487vd1465/temp/CHHATTISGARH-iso19139.xml +816 -0
- data/spec/fixtures/fs591bn3317/metadata/geoMetadata.xml +2435 -0
- data/spec/fixtures/fs591bn3317/temp/HIMACHAL_PRADESH-iso19139-fc.xml +1643 -0
- data/spec/fixtures/fs591bn3317/temp/HIMACHAL_PRADESH-iso19139.xml +787 -0
- data/spec/fixtures/fw920bc5473/metadata/geoMetadata.xml +1056 -0
- data/spec/fixtures/fw920bc5473/temp/PLSS_TWN-iso19139-fc.xml +327 -0
- data/spec/fixtures/fw920bc5473/temp/PLSS_TWN-iso19139.xml +724 -0
- data/spec/fixtures/gj831wj3625/metadata/geoMetadata.xml +1735 -0
- data/spec/fixtures/gj831wj3625/temp/metadata.iso19139-fc.xml +940 -0
- data/spec/fixtures/gj831wj3625/temp/metadata.iso19139.xml +790 -0
- data/spec/fixtures/gp075nv3265/metadata/geoMetadata.xml +2432 -0
- data/spec/fixtures/gp075nv3265/temp/PONDICHERRY-iso19139-fc.xml +1643 -0
- data/spec/fixtures/gp075nv3265/temp/PONDICHERRY-iso19139.xml +784 -0
- data/spec/fixtures/gv800hj8141/metadata/geoMetadata.xml +2392 -0
- data/spec/fixtures/gv800hj8141/temp/BIHAR-iso19139-fc.xml +1643 -0
- data/spec/fixtures/gv800hj8141/temp/BIHAR-iso19139.xml +744 -0
- data/spec/fixtures/gw520gz6339/metadata/geoMetadata.xml +3899 -0
- data/spec/fixtures/gw520gz6339/temp/DADRA_NAGAR_HAVELI_PT-iso19139-fc.xml +3075 -0
- data/spec/fixtures/gw520gz6339/temp/DADRA_NAGAR_HAVELI_PT-iso19139.xml +819 -0
- data/spec/fixtures/gy054hz1045/metadata/geoMetadata.xml +2418 -0
- data/spec/fixtures/gy054hz1045/temp/HARYANA-iso19139-fc.xml +1633 -0
- data/spec/fixtures/gy054hz1045/temp/HARYANA-iso19139.xml +780 -0
- data/spec/fixtures/gz352mw6982/metadata/geoMetadata.xml +1772 -0
- data/spec/fixtures/gz352mw6982/temp/metadata.iso19139-fc.xml +940 -0
- data/spec/fixtures/gz352mw6982/temp/metadata.iso19139.xml +827 -0
- data/spec/fixtures/hb489vm9892/metadata/geoMetadata.xml +3663 -0
- data/spec/fixtures/hb489vm9892/temp/DISTRICT1981-iso19139-fc.xml +2799 -0
- data/spec/fixtures/hb489vm9892/temp/DISTRICT1981-iso19139.xml +859 -0
- data/spec/fixtures/hw125dq0418/metadata/geoMetadata.xml +2448 -0
- data/spec/fixtures/hw125dq0418/temp/DELHI-iso19139-fc.xml +1599 -0
- data/spec/fixtures/hw125dq0418/temp/DELHI-iso19139.xml +844 -0
- data/spec/fixtures/hw892mn4587/metadata/geoMetadata.xml +2561 -0
- data/spec/fixtures/hw892mn4587/temp/KERALA-iso19139-fc.xml +1763 -0
- data/spec/fixtures/hw892mn4587/temp/KERALA-iso19139.xml +793 -0
- data/spec/fixtures/jb371hz3868/metadata/geoMetadata.xml +3129 -0
- data/spec/fixtures/jb371hz3868/temp/INCOME-iso19139-fc.xml +2263 -0
- data/spec/fixtures/jb371hz3868/temp/INCOME-iso19139.xml +861 -0
- data/spec/fixtures/jc017yk9928/metadata/geoMetadata.xml +2433 -0
- data/spec/fixtures/jc017yk9928/temp/KARNATAKA-iso19139-fc.xml +1599 -0
- data/spec/fixtures/jc017yk9928/temp/KARNATAKA-iso19139.xml +829 -0
- data/spec/fixtures/jf841ys4828/metadata/geoMetadata.xml +2156 -0
- data/spec/fixtures/jf841ys4828/temp/ANDHRA_PRADESH-iso19139-fc.xml +1247 -0
- data/spec/fixtures/jf841ys4828/temp/ANDHRA_PRADESH-iso19139.xml +904 -0
- data/spec/fixtures/jh802mp2160/metadata/geoMetadata.xml +3917 -0
- data/spec/fixtures/jh802mp2160/temp/DELHI_PT-iso19139-fc.xml +3075 -0
- data/spec/fixtures/jh802mp2160/temp/DELHI_PT-iso19139.xml +837 -0
- data/spec/fixtures/jj806fc3801/metadata/geoMetadata.xml +1235 -0
- data/spec/fixtures/jj806fc3801/temp/metadata.iso19139-fc.xml +173 -0
- data/spec/fixtures/jj806fc3801/temp/metadata.iso19139.xml +1057 -0
- data/spec/fixtures/jq835yn7161/metadata/geoMetadata.xml +2060 -0
- data/spec/fixtures/jq835yn7161/temp/HIMACHAL_PRADESH-iso19139-fc.xml +1203 -0
- data/spec/fixtures/jq835yn7161/temp/HIMACHAL_PRADESH-iso19139.xml +852 -0
- data/spec/fixtures/jr455pt6676/metadata/geoMetadata.xml +2045 -0
- data/spec/fixtures/jr455pt6676/temp/TAMILNADU-iso19139-fc.xml +1203 -0
- data/spec/fixtures/jr455pt6676/temp/TAMILNADU-iso19139.xml +837 -0
- data/spec/fixtures/js637zp2537/metadata/geoMetadata.xml +3894 -0
- data/spec/fixtures/js637zp2537/temp/BIHAR-iso19139-fc.xml +3075 -0
- data/spec/fixtures/js637zp2537/temp/BIHAR-iso19139.xml +814 -0
- data/spec/fixtures/jv502wg9611/metadata/geoMetadata.xml +2052 -0
- data/spec/fixtures/jv502wg9611/temp/GOA-iso19139-fc.xml +1203 -0
- data/spec/fixtures/jv502wg9611/temp/GOA-iso19139.xml +844 -0
- data/spec/fixtures/jw462ck6560/metadata/geoMetadata.xml +2442 -0
- data/spec/fixtures/jw462ck6560/temp/JAMMU_KASHMIR-iso19139-fc.xml +1643 -0
- data/spec/fixtures/jw462ck6560/temp/JAMMU_KASHMIR-iso19139.xml +794 -0
- data/spec/fixtures/kj800fb6273/metadata/geoMetadata.xml +3300 -0
- data/spec/fixtures/kj800fb6273/temp/STATE2011-iso19139-fc.xml +2403 -0
- data/spec/fixtures/kj800fb6273/temp/STATE2011-iso19139.xml +892 -0
- data/spec/fixtures/km504zq3948/metadata/geoMetadata.xml +3862 -0
- data/spec/fixtures/km504zq3948/temp/HIMACHAL_PRADESH-iso19139-fc.xml +3075 -0
- data/spec/fixtures/km504zq3948/temp/HIMACHAL_PRADESH-iso19139.xml +782 -0
- data/spec/fixtures/ks297fy1411/metadata/geoMetadata.xml +1043 -0
- data/spec/fixtures/ks297fy1411/temp/OFFSH_BLOCKS-iso19139-fc.xml +350 -0
- data/spec/fixtures/ks297fy1411/temp/OFFSH_BLOCKS-iso19139.xml +688 -0
- data/spec/fixtures/md358hy5049/metadata/geoMetadata.xml +2424 -0
- data/spec/fixtures/md358hy5049/temp/MIZORAM-iso19139-fc.xml +1570 -0
- data/spec/fixtures/md358hy5049/temp/MIZORAM-iso19139.xml +849 -0
- data/spec/fixtures/mg745bq0193/metadata/geoMetadata.xml +2183 -0
- data/spec/fixtures/mg745bq0193/temp/MADHYA_PRADESH-iso19139-fc.xml +1383 -0
- data/spec/fixtures/mg745bq0193/temp/MADHYA_PRADESH-iso19139.xml +795 -0
- data/spec/fixtures/mh187yx3536/metadata/geoMetadata.xml +2447 -0
- data/spec/fixtures/mh187yx3536/temp/WEST_BENGAL-iso19139-fc.xml +1643 -0
- data/spec/fixtures/mh187yx3536/temp/WEST_BENGAL-iso19139.xml +799 -0
- data/spec/fixtures/mk488yn6694/metadata/geoMetadata.xml +2042 -0
- data/spec/fixtures/mk488yn6694/temp/GUJARAT-iso19139-fc.xml +1203 -0
- data/spec/fixtures/mk488yn6694/temp/GUJARAT-iso19139.xml +834 -0
- data/spec/fixtures/my216kp3008/metadata/geoMetadata.xml +2366 -0
- data/spec/fixtures/my216kp3008/temp/DELHI-iso19139-fc.xml +1643 -0
- data/spec/fixtures/my216kp3008/temp/DELHI-iso19139.xml +718 -0
- data/spec/fixtures/my504nz9827/metadata/geoMetadata.xml +2367 -0
- data/spec/fixtures/my504nz9827/temp/JAMMU_KASHMIR-iso19139-fc.xml +1519 -0
- data/spec/fixtures/my504nz9827/temp/JAMMU_KASHMIR-iso19139.xml +843 -0
- data/spec/fixtures/ng819jm8700/metadata/geoMetadata.xml +2496 -0
- data/spec/fixtures/ng819jm8700/temp/MANIPUR-iso19139-fc.xml +1643 -0
- data/spec/fixtures/ng819jm8700/temp/MANIPUR-iso19139.xml +848 -0
- data/spec/fixtures/np020jq2139/metadata/geoMetadata.xml +1153 -0
- data/spec/fixtures/np020jq2139/temp/metadata.iso19139-fc.xml +160 -0
- data/spec/fixtures/np020jq2139/temp/metadata.iso19139.xml +988 -0
- data/spec/fixtures/ns377mt1608/metadata/geoMetadata.xml +7125 -0
- data/spec/fixtures/ns377mt1608/temp/STATE1991-iso19139-fc.xml +6283 -0
- data/spec/fixtures/ns377mt1608/temp/STATE1991-iso19139.xml +837 -0
- data/spec/fixtures/nw926np8508/metadata/geoMetadata.xml +1143 -0
- data/spec/fixtures/nw926np8508/temp/metadata.iso19139-fc.xml +160 -0
- data/spec/fixtures/nw926np8508/temp/metadata.iso19139.xml +978 -0
- data/spec/fixtures/ny358rm8559/metadata/geoMetadata.xml +2459 -0
- data/spec/fixtures/ny358rm8559/temp/TRIPURA-iso19139-fc.xml +1599 -0
- data/spec/fixtures/ny358rm8559/temp/TRIPURA-iso19139.xml +855 -0
- data/spec/fixtures/nz176rm8192/metadata/geoMetadata.xml +2618 -0
- data/spec/fixtures/nz176rm8192/temp/DISTRICT2011-iso19139-fc.xml +1813 -0
- data/spec/fixtures/nz176rm8192/temp/DISTRICT2011-iso19139.xml +800 -0
- data/spec/fixtures/nz252rq2252/metadata/geoMetadata.xml +2387 -0
- data/spec/fixtures/nz252rq2252/temp/UTTAR_PRADESH-iso19139-fc.xml +1599 -0
- data/spec/fixtures/nz252rq2252/temp/UTTAR_PRADESH-iso19139.xml +783 -0
- data/spec/fixtures/pd902kb3348/metadata/geoMetadata.xml +2414 -0
- data/spec/fixtures/pd902kb3348/temp/MADHYA_PRADESH-iso19139-fc.xml +1633 -0
- data/spec/fixtures/pd902kb3348/temp/MADHYA_PRADESH-iso19139.xml +776 -0
- data/spec/fixtures/pz792fz1776/metadata/geoMetadata.xml +2437 -0
- data/spec/fixtures/pz792fz1776/temp/MAHARASHTRA-iso19139-fc.xml +1643 -0
- data/spec/fixtures/pz792fz1776/temp/MAHARASHTRA-iso19139.xml +789 -0
- data/spec/fixtures/qb767ss4042/metadata/geoMetadata.xml +2045 -0
- data/spec/fixtures/qb767ss4042/temp/UTTAR_PRADESH-iso19139-fc.xml +1200 -0
- data/spec/fixtures/qb767ss4042/temp/UTTAR_PRADESH-iso19139.xml +840 -0
- data/spec/fixtures/qc091qw0570/metadata/geoMetadata.xml +2428 -0
- data/spec/fixtures/qc091qw0570/temp/GUJARAT-iso19139-fc.xml +1643 -0
- data/spec/fixtures/qc091qw0570/temp/GUJARAT-iso19139.xml +780 -0
- data/spec/fixtures/qc652vr7204/metadata/geoMetadata.xml +3877 -0
- data/spec/fixtures/qc652vr7204/temp/ANDHRA_PRADESH_PT-iso19139-fc.xml +3075 -0
- data/spec/fixtures/qc652vr7204/temp/ANDHRA_PRADESH_PT-iso19139.xml +797 -0
- data/spec/fixtures/qk786js7484/metadata/geoMetadata.xml +3267 -0
- data/spec/fixtures/qk786js7484/temp/DISTRICT1961-iso19139-fc.xml +2403 -0
- data/spec/fixtures/qk786js7484/temp/DISTRICT1961-iso19139.xml +859 -0
- data/spec/fixtures/qn676pg6767/metadata/geoMetadata.xml +3861 -0
- data/spec/fixtures/qn676pg6767/temp/GOA-iso19139-fc.xml +3075 -0
- data/spec/fixtures/qn676pg6767/temp/GOA-iso19139.xml +781 -0
- data/spec/fixtures/qr255jh4074/metadata/geoMetadata.xml +3226 -0
- data/spec/fixtures/qr255jh4074/temp/LOKSABHA_14-iso19139-fc.xml +2366 -0
- data/spec/fixtures/qr255jh4074/temp/LOKSABHA_14-iso19139.xml +855 -0
- data/spec/fixtures/qr374kj4827/metadata/geoMetadata.xml +2428 -0
- data/spec/fixtures/qr374kj4827/temp/ASSAM-iso19139-fc.xml +1643 -0
- data/spec/fixtures/qr374kj4827/temp/ASSAM-iso19139.xml +780 -0
- data/spec/fixtures/qy162js1748/metadata/geoMetadata.xml +2440 -0
- data/spec/fixtures/qy162js1748/temp/CHHATTISGARH-iso19139-fc.xml +1643 -0
- data/spec/fixtures/qy162js1748/temp/CHHATTISGARH-iso19139.xml +792 -0
- data/spec/fixtures/rd446vf2633/metadata/geoMetadata.xml +1109 -0
- data/spec/fixtures/rd446vf2633/temp/NAGALAND-iso19139-fc.xml +379 -0
- data/spec/fixtures/rd446vf2633/temp/NAGALAND-iso19139.xml +725 -0
- data/spec/fixtures/rf389hf2983/metadata/geoMetadata.xml +3929 -0
- data/spec/fixtures/rf389hf2983/temp/CHHATTISGARH_PT-iso19139-fc.xml +3075 -0
- data/spec/fixtures/rf389hf2983/temp/CHHATTISGARH_PT-iso19139.xml +849 -0
- data/spec/fixtures/rf859ff4582/metadata/geoMetadata.xml +1251 -0
- data/spec/fixtures/rf859ff4582/temp/JHARKHAND-iso19139-fc.xml +459 -0
- data/spec/fixtures/rf859ff4582/temp/JHARKHAND-iso19139.xml +787 -0
- data/spec/fixtures/rh343ds8931/metadata/geoMetadata.xml +2032 -0
- data/spec/fixtures/rh343ds8931/temp/BIHAR-iso19139-fc.xml +1174 -0
- data/spec/fixtures/rh343ds8931/temp/BIHAR-iso19139.xml +853 -0
- data/spec/fixtures/rn815xk8157/metadata/geoMetadata.xml +2417 -0
- data/spec/fixtures/rn815xk8157/temp/SIKKIM-iso19139-fc.xml +1563 -0
- data/spec/fixtures/rn815xk8157/temp/SIKKIM-iso19139.xml +849 -0
- data/spec/fixtures/rq653sz4470/metadata/geoMetadata.xml +2394 -0
- data/spec/fixtures/rq653sz4470/temp/CHHATTISGARH-iso19139-fc.xml +1599 -0
- data/spec/fixtures/rq653sz4470/temp/CHHATTISGARH-iso19139.xml +790 -0
- data/spec/fixtures/rt625ws6022/metadata/geoMetadata.xml +833 -0
- data/spec/fixtures/rt625ws6022/temp/GULF_FAIRWAYS-iso19139-fc.xml +144 -0
- data/spec/fixtures/rt625ws6022/temp/GULF_FAIRWAYS-iso19139.xml +684 -0
- data/spec/fixtures/sc330vf4259/metadata/geoMetadata.xml +1836 -0
- data/spec/fixtures/sc330vf4259/temp/JHARKHAND-iso19139-fc.xml +987 -0
- data/spec/fixtures/sc330vf4259/temp/JHARKHAND-iso19139.xml +844 -0
- data/spec/fixtures/sq479mx3086/metadata/geoMetadata.xml +1043 -0
- data/spec/fixtures/sq479mx3086/temp/OFFSH_PLATF-iso19139-fc.xml +365 -0
- data/spec/fixtures/sq479mx3086/temp/OFFSH_PLATF-iso19139.xml +673 -0
- data/spec/fixtures/sr686bm4098/metadata/geoMetadata.xml +3896 -0
- data/spec/fixtures/sr686bm4098/temp/DAMAN_DIU_PT-iso19139-fc.xml +3075 -0
- data/spec/fixtures/sr686bm4098/temp/DAMAN_DIU_PT-iso19139.xml +816 -0
- data/spec/fixtures/sv303sh5583/metadata/geoMetadata.xml +2395 -0
- data/spec/fixtures/sv303sh5583/temp/ARUNACHAL_PRADESH-iso19139-fc.xml +1555 -0
- data/spec/fixtures/sv303sh5583/temp/ARUNACHAL_PRADESH-iso19139.xml +835 -0
- data/spec/fixtures/sy319nh8520/metadata/geoMetadata.xml +3925 -0
- data/spec/fixtures/sy319nh8520/temp/GUJARAT-iso19139-fc.xml +3075 -0
- data/spec/fixtures/sy319nh8520/temp/GUJARAT-iso19139.xml +845 -0
- data/spec/fixtures/td363vx2792/metadata/geoMetadata.xml +3964 -0
- data/spec/fixtures/td363vx2792/temp/HIMACHAL_PRADESH_PT-iso19139-fc.xml +3075 -0
- data/spec/fixtures/td363vx2792/temp/HIMACHAL_PRADESH_PT-iso19139.xml +884 -0
- data/spec/fixtures/tf374bd2484/metadata/geoMetadata.xml +1464 -0
- data/spec/fixtures/tf374bd2484/temp/DISTRICT1951-iso19139-fc.xml +599 -0
- data/spec/fixtures/tf374bd2484/temp/DISTRICT1951-iso19139.xml +860 -0
- data/spec/fixtures/tj797mj7877/metadata/geoMetadata.xml +2359 -0
- data/spec/fixtures/tj797mj7877/temp/LOKSABHA_15-iso19139-fc.xml +1511 -0
- data/spec/fixtures/tj797mj7877/temp/LOKSABHA_15-iso19139.xml +843 -0
- data/spec/fixtures/tv060wq5179/metadata/geoMetadata.xml +2046 -0
- data/spec/fixtures/tv060wq5179/temp/ASSAM-iso19139-fc.xml +1203 -0
- data/spec/fixtures/tv060wq5179/temp/ASSAM-iso19139.xml +838 -0
- data/spec/fixtures/tv536bn1915/metadata/geoMetadata.xml +2296 -0
- data/spec/fixtures/tv536bn1915/temp/ARUNACHAL_PRADESH-iso19139-fc.xml +1687 -0
- data/spec/fixtures/tv536bn1915/temp/ARUNACHAL_PRADESH-iso19139.xml +604 -0
- data/spec/fixtures/tz359cc2977/metadata/geoMetadata.xml +1842 -0
- data/spec/fixtures/tz359cc2977/temp/MANIPUR-iso19139-fc.xml +987 -0
- data/spec/fixtures/tz359cc2977/temp/MANIPUR-iso19139.xml +850 -0
- data/spec/fixtures/vb525my6511/metadata/geoMetadata.xml +2026 -0
- data/spec/fixtures/vb525my6511/temp/UTTARAKHAND-iso19139-fc.xml +1167 -0
- data/spec/fixtures/vb525my6511/temp/UTTARAKHAND-iso19139.xml +854 -0
- data/spec/fixtures/vh802fs4240/metadata/geoMetadata.xml +2189 -0
- data/spec/fixtures/vh802fs4240/temp/PONDICHERRY-iso19139-fc.xml +1343 -0
- data/spec/fixtures/vh802fs4240/temp/PONDICHERRY-iso19139.xml +841 -0
- data/spec/fixtures/vk120xn2474/metadata/geoMetadata.xml +1125 -0
- data/spec/fixtures/vk120xn2474/temp/PLSS_SEC-iso19139-fc.xml +435 -0
- data/spec/fixtures/vk120xn2474/temp/PLSS_SEC-iso19139.xml +685 -0
- data/spec/fixtures/vn439bc7316/metadata/geoMetadata.xml +1979 -0
- data/spec/fixtures/vn439bc7316/temp/KERALA-iso19139-fc.xml +1131 -0
- data/spec/fixtures/vn439bc7316/temp/KERALA-iso19139.xml +843 -0
- data/spec/fixtures/vq745jk0695/metadata/geoMetadata.xml +1787 -0
- data/spec/fixtures/vq745jk0695/temp/MEGHALAYA-iso19139-fc.xml +987 -0
- data/spec/fixtures/vq745jk0695/temp/MEGHALAYA-iso19139.xml +795 -0
- data/spec/fixtures/vr593vj7147/metadata/geoMetadata.xml +3895 -0
- data/spec/fixtures/vr593vj7147/temp/ANDHRA_PRADESH-iso19139-fc.xml +3075 -0
- data/spec/fixtures/vr593vj7147/temp/ANDHRA_PRADESH-iso19139.xml +815 -0
- data/spec/fixtures/vw911qb5271/metadata/geoMetadata.xml +8557 -0
- data/spec/fixtures/vw911qb5271/temp/DISTRICT2001-iso19139-fc.xml +7683 -0
- data/spec/fixtures/vw911qb5271/temp/DISTRICT2001-iso19139.xml +869 -0
- data/spec/fixtures/wg680pz0365/metadata/geoMetadata.xml +2475 -0
- data/spec/fixtures/wg680pz0365/temp/ANDHRA_PRADESH-iso19139-fc.xml +1599 -0
- data/spec/fixtures/wg680pz0365/temp/ANDHRA_PRADESH-iso19139.xml +871 -0
- data/spec/fixtures/wg761xn1926/metadata/geoMetadata.xml +3941 -0
- data/spec/fixtures/wg761xn1926/temp/HARYANA-iso19139-fc.xml +3075 -0
- data/spec/fixtures/wg761xn1926/temp/HARYANA-iso19139.xml +861 -0
- data/spec/fixtures/wh870qw1934/metadata/geoMetadata.xml +2428 -0
- data/spec/fixtures/wh870qw1934/temp/PUNJAB-iso19139-fc.xml +1643 -0
- data/spec/fixtures/wh870qw1934/temp/PUNJAB-iso19139.xml +780 -0
- data/spec/fixtures/wk775mm4673/metadata/geoMetadata.xml +2458 -0
- data/spec/fixtures/wk775mm4673/temp/MAHARASHTRA-iso19139-fc.xml +1599 -0
- data/spec/fixtures/wk775mm4673/temp/MAHARASHTRA-iso19139.xml +854 -0
- data/spec/fixtures/ws171yz2165/metadata/geoMetadata.xml +3868 -0
- data/spec/fixtures/ws171yz2165/temp/ARUNACHAL_PRADESH_PT-iso19139-fc.xml +3075 -0
- data/spec/fixtures/ws171yz2165/temp/ARUNACHAL_PRADESH_PT-iso19139.xml +788 -0
- data/spec/fixtures/wt473hz7153/metadata/geoMetadata.xml +3898 -0
- data/spec/fixtures/wt473hz7153/temp/CHANDIGARH_PT-iso19139-fc.xml +3075 -0
- data/spec/fixtures/wt473hz7153/temp/CHANDIGARH_PT-iso19139.xml +818 -0
- data/spec/fixtures/ww217dj0457/metadata/geoMetadata.xml +1205 -0
- data/spec/fixtures/ww217dj0457/temp/CO2_PIPE-iso19139-fc.xml +471 -0
- data/spec/fixtures/ww217dj0457/temp/CO2_PIPE-iso19139.xml +729 -0
- data/spec/fixtures/wy875pk9849/metadata/geoMetadata.xml +3173 -0
- data/spec/fixtures/wy875pk9849/temp/STATE1961-iso19139-fc.xml +2279 -0
- data/spec/fixtures/wy875pk9849/temp/STATE1961-iso19139.xml +889 -0
- data/spec/fixtures/xb018tk2042/metadata/geoMetadata.xml +2335 -0
- data/spec/fixtures/xb018tk2042/temp/STATE1981-iso19139-fc.xml +1443 -0
- data/spec/fixtures/xb018tk2042/temp/STATE1981-iso19139.xml +887 -0
- data/spec/fixtures/xg539vw8586/metadata/geoMetadata.xml +2405 -0
- data/spec/fixtures/xg539vw8586/temp/ORISSA-iso19139-fc.xml +1599 -0
- data/spec/fixtures/xg539vw8586/temp/ORISSA-iso19139.xml +801 -0
- data/spec/fixtures/xv475kp4644/metadata/geoMetadata.xml +3871 -0
- data/spec/fixtures/xv475kp4644/temp/ASSAM_PT-iso19139-fc.xml +3075 -0
- data/spec/fixtures/xv475kp4644/temp/ASSAM_PT-iso19139.xml +791 -0
- data/spec/fixtures/xy096gc2959/metadata/geoMetadata.xml +2432 -0
- data/spec/fixtures/xy096gc2959/temp/GOA-iso19139-fc.xml +1643 -0
- data/spec/fixtures/xy096gc2959/temp/GOA-iso19139.xml +784 -0
- data/spec/fixtures/xz518gz3362/metadata/geoMetadata.xml +2434 -0
- data/spec/fixtures/xz518gz3362/temp/UTTARAKHAND-iso19139-fc.xml +1643 -0
- data/spec/fixtures/xz518gz3362/temp/UTTARAKHAND-iso19139.xml +786 -0
- data/spec/fixtures/yh986wy4737/metadata/geoMetadata.xml +1160 -0
- data/spec/fixtures/yh986wy4737/temp/NAGALAND-iso19139-fc.xml +384 -0
- data/spec/fixtures/yh986wy4737/temp/NAGALAND-iso19139.xml +771 -0
- data/spec/fixtures/yn187fq4474/metadata/geoMetadata.xml +2168 -0
- data/spec/fixtures/yn187fq4474/temp/KARNATAKA-iso19139-fc.xml +1379 -0
- data/spec/fixtures/yn187fq4474/temp/KARNATAKA-iso19139.xml +784 -0
- data/spec/fixtures/yn236mw3250/metadata/geoMetadata.xml +2428 -0
- data/spec/fixtures/yn236mw3250/temp/TAMILNADU-iso19139-fc.xml +1643 -0
- data/spec/fixtures/yn236mw3250/temp/TAMILNADU-iso19139.xml +780 -0
- data/spec/fixtures/yz596nz0112/metadata/geoMetadata.xml +2012 -0
- data/spec/fixtures/yz596nz0112/temp/WEST_BENGAL-iso19139-fc.xml +1203 -0
- data/spec/fixtures/yz596nz0112/temp/WEST_BENGAL-iso19139.xml +804 -0
- data/spec/fixtures/zk596gy7380/metadata/geoMetadata.xml +4147 -0
- data/spec/fixtures/zk596gy7380/temp/DISTRICT1971-iso19139-fc.xml +3283 -0
- data/spec/fixtures/zk596gy7380/temp/DISTRICT1971-iso19139.xml +859 -0
- data/spec/fixtures/zn452hh7431/metadata/geoMetadata.xml +2337 -0
- data/spec/fixtures/zn452hh7431/temp/RAJASTHAN-iso19139-fc.xml +1505 -0
- data/spec/fixtures/zn452hh7431/temp/RAJASTHAN-iso19139.xml +827 -0
- data/spec/fixtures/zt093fw6519/metadata/geoMetadata.xml +2380 -0
- data/spec/fixtures/zt093fw6519/temp/MIZORAM-iso19139-fc.xml +1643 -0
- data/spec/fixtures/zt093fw6519/temp/MIZORAM-iso19139.xml +732 -0
- data/spec/fixtures/zv925hd6723/metadata/geoMetadata.xml +1473 -0
- data/spec/fixtures/zv925hd6723/temp/OGWELLS-iso19139-fc.xml +759 -0
- data/spec/fixtures/zv925hd6723/temp/OGWELLS-iso19139.xml +709 -0
- data/spec/fixtures/zy658cr1728/metadata/geoMetadata.xml +3814 -0
- data/spec/fixtures/zy658cr1728/temp/ANDAMAAN_NICOBAR_PT-iso19139-fc.xml +3075 -0
- data/spec/fixtures/zy658cr1728/temp/ANDAMAAN_NICOBAR_PT-iso19139.xml +734 -0
- data/spec/fixtures/zz943vx1492/metadata/geoMetadata.xml +861 -0
- data/spec/fixtures/zz943vx1492/temp/BASINS-iso19139-fc.xml +164 -0
- data/spec/fixtures/zz943vx1492/temp/BASINS-iso19139.xml +692 -0
- data/spec/integration/solr_spec_notready.rb +51 -0
- data/spec/test_net_ssh_krb.rb +21 -0
- data/spec/unit/gazetteer_spec.rb +100 -0
- data/spec/unit/transform_spec.rb +40 -0
- data/spec/unit/utils_spec.rb +32 -0
- metadata +1491 -0
@@ -0,0 +1,763 @@
|
|
1
|
+
/*
|
2
|
+
* Autocomplete - jQuery plugin 1.1pre
|
3
|
+
*
|
4
|
+
* Copyright (c) 2007 Dylan Verheul, Dan G. Switzer, Anjesh Tuladhar, Jörn Zaefferer
|
5
|
+
*
|
6
|
+
* Dual licensed under the MIT and GPL licenses:
|
7
|
+
* http://www.opensource.org/licenses/mit-license.php
|
8
|
+
* http://www.gnu.org/licenses/gpl.html
|
9
|
+
*
|
10
|
+
* Revision: $Id: jquery.autocomplete.js 5785 2008-07-12 10:37:33Z joern.zaefferer $
|
11
|
+
*
|
12
|
+
*/
|
13
|
+
|
14
|
+
;(function($) {
|
15
|
+
|
16
|
+
$.fn.extend({
|
17
|
+
autocomplete: function(urlOrData, options) {
|
18
|
+
var isUrl = typeof urlOrData == "string";
|
19
|
+
options = $.extend({}, $.Autocompleter.defaults, {
|
20
|
+
url: isUrl ? urlOrData : null,
|
21
|
+
data: isUrl ? null : urlOrData,
|
22
|
+
delay: isUrl ? $.Autocompleter.defaults.delay : 10,
|
23
|
+
max: options && !options.scroll ? 10 : 150
|
24
|
+
}, options);
|
25
|
+
|
26
|
+
// if highlight is set to false, replace it with a do-nothing function
|
27
|
+
options.highlight = options.highlight || function(value) { return value; };
|
28
|
+
|
29
|
+
// if the formatMatch option is not specified, then use formatItem for backwards compatibility
|
30
|
+
options.formatMatch = options.formatMatch || options.formatItem;
|
31
|
+
|
32
|
+
return this.each(function() {
|
33
|
+
new $.Autocompleter(this, options);
|
34
|
+
});
|
35
|
+
},
|
36
|
+
result: function(handler) {
|
37
|
+
return this.bind("result", handler);
|
38
|
+
},
|
39
|
+
search: function(handler) {
|
40
|
+
return this.trigger("search", [handler]);
|
41
|
+
},
|
42
|
+
flushCache: function() {
|
43
|
+
return this.trigger("flushCache");
|
44
|
+
},
|
45
|
+
setOptions: function(options){
|
46
|
+
return this.trigger("setOptions", [options]);
|
47
|
+
},
|
48
|
+
unautocomplete: function() {
|
49
|
+
return this.trigger("unautocomplete");
|
50
|
+
}
|
51
|
+
});
|
52
|
+
|
53
|
+
$.Autocompleter = function(input, options) {
|
54
|
+
|
55
|
+
var KEY = {
|
56
|
+
UP: 38,
|
57
|
+
DOWN: 40,
|
58
|
+
DEL: 46,
|
59
|
+
TAB: 9,
|
60
|
+
RETURN: 13,
|
61
|
+
ESC: 27,
|
62
|
+
COMMA: 188,
|
63
|
+
PAGEUP: 33,
|
64
|
+
PAGEDOWN: 34,
|
65
|
+
BACKSPACE: 8
|
66
|
+
};
|
67
|
+
|
68
|
+
// Create $ object for input element
|
69
|
+
var $input = $(input).attr("autocomplete", "off").addClass(options.inputClass);
|
70
|
+
|
71
|
+
var timeout;
|
72
|
+
var previousValue = "";
|
73
|
+
var cache = $.Autocompleter.Cache(options);
|
74
|
+
var hasFocus = 0;
|
75
|
+
var lastKeyPressCode;
|
76
|
+
var config = {
|
77
|
+
mouseDownOnSelect: false
|
78
|
+
};
|
79
|
+
var select = $.Autocompleter.Select(options, input, selectCurrent, config);
|
80
|
+
|
81
|
+
var blockSubmit;
|
82
|
+
|
83
|
+
// prevent form submit in opera when selecting with return key
|
84
|
+
$.browser.opera && $(input.form).bind("submit.autocomplete", function() {
|
85
|
+
if (blockSubmit) {
|
86
|
+
blockSubmit = false;
|
87
|
+
return false;
|
88
|
+
}
|
89
|
+
});
|
90
|
+
|
91
|
+
// only opera doesn't trigger keydown multiple times while pressed, others don't work with keypress at all
|
92
|
+
$input.bind(($.browser.opera ? "keypress" : "keydown") + ".autocomplete", function(event) {
|
93
|
+
// track last key pressed
|
94
|
+
lastKeyPressCode = event.keyCode;
|
95
|
+
switch(event.keyCode) {
|
96
|
+
|
97
|
+
case KEY.UP:
|
98
|
+
event.preventDefault();
|
99
|
+
if ( select.visible() ) {
|
100
|
+
select.prev();
|
101
|
+
} else {
|
102
|
+
onChange(0, true);
|
103
|
+
}
|
104
|
+
break;
|
105
|
+
|
106
|
+
case KEY.DOWN:
|
107
|
+
event.preventDefault();
|
108
|
+
if ( select.visible() ) {
|
109
|
+
select.next();
|
110
|
+
} else {
|
111
|
+
onChange(0, true);
|
112
|
+
}
|
113
|
+
break;
|
114
|
+
|
115
|
+
case KEY.PAGEUP:
|
116
|
+
event.preventDefault();
|
117
|
+
if ( select.visible() ) {
|
118
|
+
select.pageUp();
|
119
|
+
} else {
|
120
|
+
onChange(0, true);
|
121
|
+
}
|
122
|
+
break;
|
123
|
+
|
124
|
+
case KEY.PAGEDOWN:
|
125
|
+
event.preventDefault();
|
126
|
+
if ( select.visible() ) {
|
127
|
+
select.pageDown();
|
128
|
+
} else {
|
129
|
+
onChange(0, true);
|
130
|
+
}
|
131
|
+
break;
|
132
|
+
|
133
|
+
// matches also semicolon
|
134
|
+
case options.multiple && $.trim(options.multipleSeparator) == "," && KEY.COMMA:
|
135
|
+
case KEY.TAB:
|
136
|
+
case KEY.RETURN:
|
137
|
+
if( selectCurrent() ) {
|
138
|
+
// stop default to prevent a form submit, Opera needs special handling
|
139
|
+
event.preventDefault();
|
140
|
+
blockSubmit = true;
|
141
|
+
return false;
|
142
|
+
}
|
143
|
+
break;
|
144
|
+
|
145
|
+
case KEY.ESC:
|
146
|
+
select.hide();
|
147
|
+
break;
|
148
|
+
|
149
|
+
default:
|
150
|
+
clearTimeout(timeout);
|
151
|
+
timeout = setTimeout(onChange, options.delay);
|
152
|
+
break;
|
153
|
+
}
|
154
|
+
}).focus(function(){
|
155
|
+
// track whether the field has focus, we shouldn't process any
|
156
|
+
// results if the field no longer has focus
|
157
|
+
hasFocus++;
|
158
|
+
}).blur(function() {
|
159
|
+
hasFocus = 0;
|
160
|
+
if (!config.mouseDownOnSelect) {
|
161
|
+
hideResults();
|
162
|
+
}
|
163
|
+
}).click(function() {
|
164
|
+
// show select when clicking in a focused field
|
165
|
+
if ( hasFocus++ > 1 && !select.visible() ) {
|
166
|
+
onChange(0, true);
|
167
|
+
}
|
168
|
+
}).bind("search", function() {
|
169
|
+
// TODO why not just specifying both arguments?
|
170
|
+
var fn = (arguments.length > 1) ? arguments[1] : null;
|
171
|
+
function findValueCallback(q, data) {
|
172
|
+
var result;
|
173
|
+
if( data && data.length ) {
|
174
|
+
for (var i=0; i < data.length; i++) {
|
175
|
+
if( data[i].result.toLowerCase() == q.toLowerCase() ) {
|
176
|
+
result = data[i];
|
177
|
+
break;
|
178
|
+
}
|
179
|
+
}
|
180
|
+
}
|
181
|
+
if( typeof fn == "function" ) fn(result);
|
182
|
+
else $input.trigger("result", result && [result.data, result.value]);
|
183
|
+
}
|
184
|
+
$.each(trimWords($input.val()), function(i, value) {
|
185
|
+
request(value, findValueCallback, findValueCallback);
|
186
|
+
});
|
187
|
+
}).bind("flushCache", function() {
|
188
|
+
cache.flush();
|
189
|
+
}).bind("setOptions", function() {
|
190
|
+
$.extend(options, arguments[1]);
|
191
|
+
// if we've updated the data, repopulate
|
192
|
+
if ( "data" in arguments[1] )
|
193
|
+
cache.populate();
|
194
|
+
}).bind("unautocomplete", function() {
|
195
|
+
select.unbind();
|
196
|
+
$input.unbind();
|
197
|
+
$(input.form).unbind(".autocomplete");
|
198
|
+
});
|
199
|
+
|
200
|
+
|
201
|
+
function selectCurrent() {
|
202
|
+
var selected = select.selected();
|
203
|
+
if( !selected )
|
204
|
+
return false;
|
205
|
+
|
206
|
+
var v = selected.result;
|
207
|
+
previousValue = v;
|
208
|
+
|
209
|
+
if ( options.multiple ) {
|
210
|
+
var words = trimWords($input.val());
|
211
|
+
if ( words.length > 1 ) {
|
212
|
+
v = words.slice(0, words.length - 1).join( options.multipleSeparator ) + options.multipleSeparator + v;
|
213
|
+
}
|
214
|
+
v += options.multipleSeparator;
|
215
|
+
}
|
216
|
+
|
217
|
+
$input.val(v);
|
218
|
+
hideResultsNow();
|
219
|
+
$input.trigger("result", [selected.data, selected.value]);
|
220
|
+
return true;
|
221
|
+
}
|
222
|
+
|
223
|
+
function onChange(crap, skipPrevCheck) {
|
224
|
+
if( lastKeyPressCode == KEY.DEL ) {
|
225
|
+
select.hide();
|
226
|
+
return;
|
227
|
+
}
|
228
|
+
|
229
|
+
var currentValue = $input.val();
|
230
|
+
|
231
|
+
if ( !skipPrevCheck && currentValue == previousValue )
|
232
|
+
return;
|
233
|
+
|
234
|
+
previousValue = currentValue;
|
235
|
+
|
236
|
+
currentValue = lastWord(currentValue);
|
237
|
+
if ( currentValue.length >= options.minChars) {
|
238
|
+
$input.addClass(options.loadingClass);
|
239
|
+
if (!options.matchCase)
|
240
|
+
currentValue = currentValue.toLowerCase();
|
241
|
+
request(currentValue, receiveData, hideResultsNow);
|
242
|
+
} else {
|
243
|
+
stopLoading();
|
244
|
+
select.hide();
|
245
|
+
}
|
246
|
+
};
|
247
|
+
|
248
|
+
function trimWords(value) {
|
249
|
+
if ( !value ) {
|
250
|
+
return [""];
|
251
|
+
}
|
252
|
+
var words = value.split( options.multipleSeparator );
|
253
|
+
var result = [];
|
254
|
+
$.each(words, function(i, value) {
|
255
|
+
if ( $.trim(value) )
|
256
|
+
result[i] = $.trim(value);
|
257
|
+
});
|
258
|
+
return result;
|
259
|
+
}
|
260
|
+
|
261
|
+
function lastWord(value) {
|
262
|
+
if ( !options.multiple )
|
263
|
+
return value;
|
264
|
+
var words = trimWords(value);
|
265
|
+
return words[words.length - 1];
|
266
|
+
}
|
267
|
+
|
268
|
+
// fills in the input box w/the first match (assumed to be the best match)
|
269
|
+
// q: the term entered
|
270
|
+
// sValue: the first matching result
|
271
|
+
function autoFill(q, sValue){
|
272
|
+
// autofill in the complete box w/the first match as long as the user hasn't entered in more data
|
273
|
+
// if the last user key pressed was backspace, don't autofill
|
274
|
+
if( options.autoFill && (lastWord($input.val()).toLowerCase() == q.toLowerCase()) && lastKeyPressCode != KEY.BACKSPACE ) {
|
275
|
+
// fill in the value (keep the case the user has typed)
|
276
|
+
$input.val($input.val() + sValue.substring(lastWord(previousValue).length));
|
277
|
+
// select the portion of the value not typed by the user (so the next character will erase)
|
278
|
+
$.Autocompleter.Selection(input, previousValue.length, previousValue.length + sValue.length);
|
279
|
+
}
|
280
|
+
};
|
281
|
+
|
282
|
+
function hideResults() {
|
283
|
+
clearTimeout(timeout);
|
284
|
+
timeout = setTimeout(hideResultsNow, 200);
|
285
|
+
};
|
286
|
+
|
287
|
+
function hideResultsNow() {
|
288
|
+
var wasVisible = select.visible();
|
289
|
+
select.hide();
|
290
|
+
clearTimeout(timeout);
|
291
|
+
stopLoading();
|
292
|
+
if (options.mustMatch) {
|
293
|
+
// call search and run callback
|
294
|
+
$input.search(
|
295
|
+
function (result){
|
296
|
+
// if no value found, clear the input box
|
297
|
+
if( !result ) {
|
298
|
+
if (options.multiple) {
|
299
|
+
var words = trimWords($input.val()).slice(0, -1);
|
300
|
+
$input.val( words.join(options.multipleSeparator) + (words.length ? options.multipleSeparator : "") );
|
301
|
+
}
|
302
|
+
else
|
303
|
+
$input.val( "" );
|
304
|
+
}
|
305
|
+
}
|
306
|
+
);
|
307
|
+
}
|
308
|
+
if (wasVisible)
|
309
|
+
// position cursor at end of input field
|
310
|
+
$.Autocompleter.Selection(input, input.value.length, input.value.length);
|
311
|
+
};
|
312
|
+
|
313
|
+
function receiveData(q, data) {
|
314
|
+
if ( data && data.length && hasFocus ) {
|
315
|
+
stopLoading();
|
316
|
+
select.display(data, q);
|
317
|
+
autoFill(q, data[0].value);
|
318
|
+
select.show();
|
319
|
+
} else {
|
320
|
+
hideResultsNow();
|
321
|
+
}
|
322
|
+
};
|
323
|
+
|
324
|
+
function request(term, success, failure) {
|
325
|
+
if (!options.matchCase)
|
326
|
+
term = term.toLowerCase();
|
327
|
+
var data = cache.load(term);
|
328
|
+
data = null; // Avoid buggy cache and go to Solr every time
|
329
|
+
// recieve the cached data
|
330
|
+
if (data && data.length) {
|
331
|
+
success(term, data);
|
332
|
+
// if an AJAX url has been supplied, try loading the data now
|
333
|
+
} else if( (typeof options.url == "string") && (options.url.length > 0) ){
|
334
|
+
|
335
|
+
var extraParams = {
|
336
|
+
timestamp: +new Date()
|
337
|
+
};
|
338
|
+
$.each(options.extraParams, function(key, param) {
|
339
|
+
extraParams[key] = typeof param == "function" ? param() : param;
|
340
|
+
});
|
341
|
+
|
342
|
+
$.ajax({
|
343
|
+
// try to leverage ajaxQueue plugin to abort previous requests
|
344
|
+
mode: "abort",
|
345
|
+
// limit abortion to this input
|
346
|
+
port: "autocomplete" + input.name,
|
347
|
+
dataType: options.dataType,
|
348
|
+
url: options.url,
|
349
|
+
data: $.extend({
|
350
|
+
q: lastWord(term),
|
351
|
+
limit: options.max
|
352
|
+
}, extraParams),
|
353
|
+
success: function(data) {
|
354
|
+
var parsed = options.parse && options.parse(data) || parse(data);
|
355
|
+
cache.add(term, parsed);
|
356
|
+
success(term, parsed);
|
357
|
+
}
|
358
|
+
});
|
359
|
+
} else {
|
360
|
+
// if we have a failure, we need to empty the list -- this prevents the the [TAB] key from selecting the last successful match
|
361
|
+
select.emptyList();
|
362
|
+
failure(term);
|
363
|
+
}
|
364
|
+
};
|
365
|
+
|
366
|
+
function parse(data) {
|
367
|
+
var parsed = [];
|
368
|
+
var rows = data.split("\n");
|
369
|
+
for (var i=0; i < rows.length; i++) {
|
370
|
+
var row = $.trim(rows[i]);
|
371
|
+
if (row) {
|
372
|
+
row = row.split("|");
|
373
|
+
parsed[parsed.length] = {
|
374
|
+
data: row,
|
375
|
+
value: row[0],
|
376
|
+
result: options.formatResult && options.formatResult(row, row[0]) || row[0]
|
377
|
+
};
|
378
|
+
}
|
379
|
+
}
|
380
|
+
return parsed;
|
381
|
+
};
|
382
|
+
|
383
|
+
function stopLoading() {
|
384
|
+
$input.removeClass(options.loadingClass);
|
385
|
+
};
|
386
|
+
|
387
|
+
};
|
388
|
+
|
389
|
+
$.Autocompleter.defaults = {
|
390
|
+
inputClass: "ac_input",
|
391
|
+
resultsClass: "ac_results",
|
392
|
+
loadingClass: "ac_loading",
|
393
|
+
minChars: 1,
|
394
|
+
delay: 400,
|
395
|
+
matchCase: false,
|
396
|
+
matchSubset: true,
|
397
|
+
matchContains: false,
|
398
|
+
cacheLength: 10,
|
399
|
+
max: 100,
|
400
|
+
mustMatch: false,
|
401
|
+
extraParams: {},
|
402
|
+
selectFirst: false,
|
403
|
+
formatItem: function(row) { return row[0]; },
|
404
|
+
formatMatch: null,
|
405
|
+
autoFill: false,
|
406
|
+
width: 0,
|
407
|
+
multiple: false,
|
408
|
+
multipleSeparator: ", ",
|
409
|
+
highlight: function(value, term) {
|
410
|
+
return value.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)(" + term.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi, "\\$1") + ")(?![^<>]*>)(?![^&;]+;)", "gi"), "<strong>$1</strong>");
|
411
|
+
},
|
412
|
+
scroll: true,
|
413
|
+
scrollHeight: 180
|
414
|
+
};
|
415
|
+
|
416
|
+
$.Autocompleter.Cache = function(options) {
|
417
|
+
|
418
|
+
var data = {};
|
419
|
+
var length = 0;
|
420
|
+
|
421
|
+
function matchSubset(s, sub) {
|
422
|
+
if (!options.matchCase)
|
423
|
+
s = s.toLowerCase();
|
424
|
+
var i = s.indexOf(sub);
|
425
|
+
if (options.matchContains == "word"){
|
426
|
+
i = s.toLowerCase().search("\\b" + sub.toLowerCase());
|
427
|
+
}
|
428
|
+
if (i == -1) return false;
|
429
|
+
return i == 0 || options.matchContains;
|
430
|
+
};
|
431
|
+
|
432
|
+
function add(q, value) {
|
433
|
+
if (length > options.cacheLength){
|
434
|
+
flush();
|
435
|
+
}
|
436
|
+
if (!data[q]){
|
437
|
+
length++;
|
438
|
+
}
|
439
|
+
data[q] = value;
|
440
|
+
}
|
441
|
+
|
442
|
+
function populate(){
|
443
|
+
if( !options.data ) return false;
|
444
|
+
// track the matches
|
445
|
+
var stMatchSets = {},
|
446
|
+
nullData = 0;
|
447
|
+
|
448
|
+
// no url was specified, we need to adjust the cache length to make sure it fits the local data store
|
449
|
+
if( !options.url ) options.cacheLength = 1;
|
450
|
+
|
451
|
+
// track all options for minChars = 0
|
452
|
+
stMatchSets[""] = [];
|
453
|
+
|
454
|
+
// loop through the array and create a lookup structure
|
455
|
+
for ( var i = 0, ol = options.data.length; i < ol; i++ ) {
|
456
|
+
var rawValue = options.data[i];
|
457
|
+
// if rawValue is a string, make an array otherwise just reference the array
|
458
|
+
rawValue = (typeof rawValue == "string") ? [rawValue] : rawValue;
|
459
|
+
|
460
|
+
var value = options.formatMatch(rawValue, i+1, options.data.length);
|
461
|
+
if ( value === false )
|
462
|
+
continue;
|
463
|
+
|
464
|
+
var firstChar = value.charAt(0).toLowerCase();
|
465
|
+
// if no lookup array for this character exists, look it up now
|
466
|
+
if( !stMatchSets[firstChar] )
|
467
|
+
stMatchSets[firstChar] = [];
|
468
|
+
|
469
|
+
// if the match is a string
|
470
|
+
var row = {
|
471
|
+
value: value,
|
472
|
+
data: rawValue,
|
473
|
+
result: options.formatResult && options.formatResult(rawValue) || value
|
474
|
+
};
|
475
|
+
|
476
|
+
// push the current match into the set list
|
477
|
+
stMatchSets[firstChar].push(row);
|
478
|
+
|
479
|
+
// keep track of minChars zero items
|
480
|
+
if ( nullData++ < options.max ) {
|
481
|
+
stMatchSets[""].push(row);
|
482
|
+
}
|
483
|
+
};
|
484
|
+
|
485
|
+
// add the data items to the cache
|
486
|
+
$.each(stMatchSets, function(i, value) {
|
487
|
+
// increase the cache size
|
488
|
+
options.cacheLength++;
|
489
|
+
// add to the cache
|
490
|
+
add(i, value);
|
491
|
+
});
|
492
|
+
}
|
493
|
+
|
494
|
+
// populate any existing data
|
495
|
+
setTimeout(populate, 25);
|
496
|
+
|
497
|
+
function flush(){
|
498
|
+
data = {};
|
499
|
+
length = 0;
|
500
|
+
}
|
501
|
+
|
502
|
+
return {
|
503
|
+
flush: flush,
|
504
|
+
add: add,
|
505
|
+
populate: populate,
|
506
|
+
load: function(q) {
|
507
|
+
if (!options.cacheLength || !length)
|
508
|
+
return null;
|
509
|
+
/*
|
510
|
+
* if dealing w/local data and matchContains than we must make sure
|
511
|
+
* to loop through all the data collections looking for matches
|
512
|
+
*/
|
513
|
+
if( !options.url && options.matchContains ){
|
514
|
+
// track all matches
|
515
|
+
var csub = [];
|
516
|
+
// loop through all the data grids for matches
|
517
|
+
for( var k in data ){
|
518
|
+
// don't search through the stMatchSets[""] (minChars: 0) cache
|
519
|
+
// this prevents duplicates
|
520
|
+
if( k.length > 0 ){
|
521
|
+
var c = data[k];
|
522
|
+
$.each(c, function(i, x) {
|
523
|
+
// if we've got a match, add it to the array
|
524
|
+
if (matchSubset(x.value, q)) {
|
525
|
+
csub.push(x);
|
526
|
+
}
|
527
|
+
});
|
528
|
+
}
|
529
|
+
}
|
530
|
+
return csub;
|
531
|
+
} else
|
532
|
+
// if the exact item exists, use it
|
533
|
+
if (data[q]){
|
534
|
+
return data[q];
|
535
|
+
} else
|
536
|
+
if (options.matchSubset) {
|
537
|
+
for (var i = q.length - 1; i >= options.minChars; i--) {
|
538
|
+
var c = data[q.substr(0, i)];
|
539
|
+
if (c) {
|
540
|
+
var csub = [];
|
541
|
+
$.each(c, function(i, x) {
|
542
|
+
if (matchSubset(x.value, q)) {
|
543
|
+
csub[csub.length] = x;
|
544
|
+
}
|
545
|
+
});
|
546
|
+
return csub;
|
547
|
+
}
|
548
|
+
}
|
549
|
+
}
|
550
|
+
return null;
|
551
|
+
}
|
552
|
+
};
|
553
|
+
};
|
554
|
+
|
555
|
+
$.Autocompleter.Select = function (options, input, select, config) {
|
556
|
+
var CLASSES = {
|
557
|
+
ACTIVE: "ac_over"
|
558
|
+
};
|
559
|
+
|
560
|
+
var listItems,
|
561
|
+
active = -1,
|
562
|
+
data,
|
563
|
+
term = "",
|
564
|
+
needsInit = true,
|
565
|
+
element,
|
566
|
+
list;
|
567
|
+
|
568
|
+
// Create results
|
569
|
+
function init() {
|
570
|
+
if (!needsInit)
|
571
|
+
return;
|
572
|
+
element = $("<div/>")
|
573
|
+
.hide()
|
574
|
+
.addClass(options.resultsClass)
|
575
|
+
.css("position", "absolute")
|
576
|
+
.appendTo(document.body);
|
577
|
+
|
578
|
+
list = $("<ul/>").appendTo(element).mouseover( function(event) {
|
579
|
+
if(target(event).nodeName && target(event).nodeName.toUpperCase() == 'LI') {
|
580
|
+
active = $("li", list).removeClass(CLASSES.ACTIVE).index(target(event));
|
581
|
+
$(target(event)).addClass(CLASSES.ACTIVE);
|
582
|
+
}
|
583
|
+
}).click(function(event) {
|
584
|
+
$(target(event)).addClass(CLASSES.ACTIVE);
|
585
|
+
select();
|
586
|
+
// TODO provide option to avoid setting focus again after selection? useful for cleanup-on-focus
|
587
|
+
input.focus();
|
588
|
+
return false;
|
589
|
+
}).mousedown(function() {
|
590
|
+
config.mouseDownOnSelect = true;
|
591
|
+
}).mouseup(function() {
|
592
|
+
config.mouseDownOnSelect = false;
|
593
|
+
});
|
594
|
+
|
595
|
+
if( options.width > 0 )
|
596
|
+
element.css("width", options.width);
|
597
|
+
|
598
|
+
needsInit = false;
|
599
|
+
}
|
600
|
+
|
601
|
+
function target(event) {
|
602
|
+
var element = event.target;
|
603
|
+
while(element && element.tagName != "LI")
|
604
|
+
element = element.parentNode;
|
605
|
+
// more fun with IE, sometimes event.target is empty, just ignore it then
|
606
|
+
if(!element)
|
607
|
+
return [];
|
608
|
+
return element;
|
609
|
+
}
|
610
|
+
|
611
|
+
function moveSelect(step) {
|
612
|
+
listItems.slice(active, active + 1).removeClass(CLASSES.ACTIVE);
|
613
|
+
movePosition(step);
|
614
|
+
var activeItem = listItems.slice(active, active + 1).addClass(CLASSES.ACTIVE);
|
615
|
+
if(options.scroll) {
|
616
|
+
var offset = 0;
|
617
|
+
listItems.slice(0, active).each(function() {
|
618
|
+
offset += this.offsetHeight;
|
619
|
+
});
|
620
|
+
if((offset + activeItem[0].offsetHeight - list.scrollTop()) > list[0].clientHeight) {
|
621
|
+
list.scrollTop(offset + activeItem[0].offsetHeight - list.innerHeight());
|
622
|
+
} else if(offset < list.scrollTop()) {
|
623
|
+
list.scrollTop(offset);
|
624
|
+
}
|
625
|
+
}
|
626
|
+
};
|
627
|
+
|
628
|
+
function movePosition(step) {
|
629
|
+
active += step;
|
630
|
+
if (active < 0) {
|
631
|
+
active = listItems.size() - 1;
|
632
|
+
} else if (active >= listItems.size()) {
|
633
|
+
active = 0;
|
634
|
+
}
|
635
|
+
}
|
636
|
+
|
637
|
+
function limitNumberOfItems(available) {
|
638
|
+
return options.max && options.max < available
|
639
|
+
? options.max
|
640
|
+
: available;
|
641
|
+
}
|
642
|
+
|
643
|
+
function fillList() {
|
644
|
+
list.empty();
|
645
|
+
var max = limitNumberOfItems(data.length);
|
646
|
+
for (var i=0; i < max; i++) {
|
647
|
+
if (!data[i])
|
648
|
+
continue;
|
649
|
+
var formatted = options.formatItem(data[i].data, i+1, max, data[i].value, term);
|
650
|
+
if ( formatted === false )
|
651
|
+
continue;
|
652
|
+
var li = $("<li/>").html( options.highlight(formatted, term) ).addClass(i%2 == 0 ? "ac_even" : "ac_odd").appendTo(list)[0];
|
653
|
+
$.data(li, "ac_data", data[i]);
|
654
|
+
}
|
655
|
+
listItems = list.find("li");
|
656
|
+
if ( options.selectFirst ) {
|
657
|
+
listItems.slice(0, 1).addClass(CLASSES.ACTIVE);
|
658
|
+
active = 0;
|
659
|
+
}
|
660
|
+
// apply bgiframe if available
|
661
|
+
if ( $.fn.bgiframe )
|
662
|
+
list.bgiframe();
|
663
|
+
}
|
664
|
+
|
665
|
+
return {
|
666
|
+
display: function(d, q) {
|
667
|
+
init();
|
668
|
+
data = d;
|
669
|
+
term = q;
|
670
|
+
fillList();
|
671
|
+
},
|
672
|
+
next: function() {
|
673
|
+
moveSelect(1);
|
674
|
+
},
|
675
|
+
prev: function() {
|
676
|
+
moveSelect(-1);
|
677
|
+
},
|
678
|
+
pageUp: function() {
|
679
|
+
if (active != 0 && active - 8 < 0) {
|
680
|
+
moveSelect( -active );
|
681
|
+
} else {
|
682
|
+
moveSelect(-8);
|
683
|
+
}
|
684
|
+
},
|
685
|
+
pageDown: function() {
|
686
|
+
if (active != listItems.size() - 1 && active + 8 > listItems.size()) {
|
687
|
+
moveSelect( listItems.size() - 1 - active );
|
688
|
+
} else {
|
689
|
+
moveSelect(8);
|
690
|
+
}
|
691
|
+
},
|
692
|
+
hide: function() {
|
693
|
+
element && element.hide();
|
694
|
+
listItems && listItems.removeClass(CLASSES.ACTIVE);
|
695
|
+
active = -1;
|
696
|
+
},
|
697
|
+
visible : function() {
|
698
|
+
return element && element.is(":visible");
|
699
|
+
},
|
700
|
+
current: function() {
|
701
|
+
return this.visible() && (listItems.filter("." + CLASSES.ACTIVE)[0] || options.selectFirst && listItems[0]);
|
702
|
+
},
|
703
|
+
show: function() {
|
704
|
+
var offset = $(input).offset();
|
705
|
+
element.css({
|
706
|
+
width: typeof options.width == "string" || options.width > 0 ? options.width : $(input).width(),
|
707
|
+
top: offset.top + input.offsetHeight,
|
708
|
+
left: offset.left
|
709
|
+
}).show();
|
710
|
+
if(options.scroll) {
|
711
|
+
list.scrollTop(0);
|
712
|
+
list.css({
|
713
|
+
maxHeight: options.scrollHeight,
|
714
|
+
overflow: 'auto'
|
715
|
+
});
|
716
|
+
|
717
|
+
if($.browser.msie && typeof document.body.style.maxHeight === "undefined") {
|
718
|
+
var listHeight = 0;
|
719
|
+
listItems.each(function() {
|
720
|
+
listHeight += this.offsetHeight;
|
721
|
+
});
|
722
|
+
var scrollbarsVisible = listHeight > options.scrollHeight;
|
723
|
+
list.css('height', scrollbarsVisible ? options.scrollHeight : listHeight );
|
724
|
+
if (!scrollbarsVisible) {
|
725
|
+
// IE doesn't recalculate width when scrollbar disappears
|
726
|
+
listItems.width( list.width() - parseInt(listItems.css("padding-left")) - parseInt(listItems.css("padding-right")) );
|
727
|
+
}
|
728
|
+
}
|
729
|
+
|
730
|
+
}
|
731
|
+
},
|
732
|
+
selected: function() {
|
733
|
+
var selected = listItems && listItems.filter("." + CLASSES.ACTIVE).removeClass(CLASSES.ACTIVE);
|
734
|
+
return selected && selected.length && $.data(selected[0], "ac_data");
|
735
|
+
},
|
736
|
+
emptyList: function (){
|
737
|
+
list && list.empty();
|
738
|
+
},
|
739
|
+
unbind: function() {
|
740
|
+
element && element.remove();
|
741
|
+
}
|
742
|
+
};
|
743
|
+
};
|
744
|
+
|
745
|
+
$.Autocompleter.Selection = function(field, start, end) {
|
746
|
+
if( field.createTextRange ){
|
747
|
+
var selRange = field.createTextRange();
|
748
|
+
selRange.collapse(true);
|
749
|
+
selRange.moveStart("character", start);
|
750
|
+
selRange.moveEnd("character", end);
|
751
|
+
selRange.select();
|
752
|
+
} else if( field.setSelectionRange ){
|
753
|
+
field.setSelectionRange(start, end);
|
754
|
+
} else {
|
755
|
+
if( field.selectionStart ){
|
756
|
+
field.selectionStart = start;
|
757
|
+
field.selectionEnd = end;
|
758
|
+
}
|
759
|
+
}
|
760
|
+
field.focus();
|
761
|
+
};
|
762
|
+
|
763
|
+
})(jQuery);
|