geohydra 0.3.1 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +2 -1
- data/.travis.yml +1 -2
- data/Gemfile +1 -8
- data/Gemfile.lock +87 -102
- data/README.md +2 -2
- data/VERSION +1 -1
- data/bin/accession.rb +99 -89
- data/bin/assemble.rb +288 -247
- data/bin/assemble_data.rb +54 -51
- data/bin/assemble_placenames.rb +85 -85
- data/bin/build_stage_options.rb +24 -18
- data/bin/derive_wgs84.rb +65 -66
- data/bin/extract_thumbnail.rb +38 -37
- data/bin/geo2mods.rb +78 -0
- data/bin/geohydra +14 -5
- data/bin/ingest_arcgis.rb +80 -60
- data/bin/iso2geo.rb +64 -0
- data/bin/loader_postgis.rb +121 -227
- data/bin/run_task.rb +23 -0
- data/bin/sync_geoserver_metadata.rb +132 -127
- data/bin/xsltproc-saxon +6 -0
- data/geohydra.gemspec +6 -4
- data/lib/geohydra.rb +5 -0
- data/lib/geohydra/accession.rb +24 -13
- data/lib/geohydra/{arcgis_to_iso19139_fc.xsl → arcgis_to_iso19110.xsl} +0 -0
- data/lib/geohydra/gazetteer.csv +842 -36
- data/lib/geohydra/gazetteer.rb +48 -24
- data/lib/geohydra/mods2geoblacklight.xsl +248 -0
- data/lib/geohydra/mods2ogp.xsl +5 -8
- data/lib/geohydra/transform.rb +8 -2
- data/lib/geohydra/utils.rb +6 -0
- data/lib/geohydra/workflow/gisAssemblyWF.rb +109 -0
- data/lib/geohydra/workflow/gisAssemblyWF.xml +85 -0
- data/lib/geohydra/workflow/gisDeliveryWF.rb +33 -0
- data/lib/geohydra/workflow/gisDeliveryWF.xml +36 -0
- data/lib/geohydra/workflow/gisDiscoveryWF.rb +55 -0
- data/lib/geohydra/workflow/gisDiscoveryWF.xml +28 -0
- data/lib/geohydra/workflow/task.rb +82 -0
- data/ogp/README.md +350 -0
- data/ogp/download.rb +92 -0
- data/ogp/fgdc2mods.sh +9 -0
- data/ogp/fgdc2mods.xsl +884 -0
- data/ogp/ingest.rb +48 -0
- data/ogp/select.rb +20 -0
- data/ogp/transform.rb +354 -0
- data/ogp/validate.rb +182 -0
- data/{bin → scripts}/ingest_tufts.rb +0 -0
- data/scripts/iso2html/doit.sh +15 -0
- data/scripts/iso2html/main.css +66 -0
- data/scripts/iso2html/pacioos-iso-html.xsl +1749 -0
- data/scripts/iso2html/utils/replace-newlines.xsl +97 -0
- data/scripts/iso2html/utils/replace-string.xsl +80 -0
- data/scripts/iso2html/utils/strip-digits.xsl +60 -0
- data/{bin → scripts}/loader.rb +0 -0
- data/scripts/rename_shapefiles.rb +5 -0
- data/scripts/render_gazetteer.rb +36 -0
- data/{bin → scripts}/seed.rb +0 -0
- data/{bin → scripts}/solr_indexer.rb +0 -0
- data/scripts/status.csv +253 -0
- data/scripts/status.rb +32 -0
- data/{bin → scripts}/validate_data.rb +1 -1
- data/solr/kurma-app-dev/conf/lang/stopwords_en.txt +34 -0
- data/solr/kurma-app-dev/conf/protwords.txt +21 -0
- data/solr/kurma-app-dev/conf/schema.xml +156 -0
- data/solr/kurma-app-dev/conf/solrconfig.xml +161 -0
- data/solr/kurma-app-dev/conf/synonyms.txt +29 -0
- data/solr/kurma-app-dev/purge.sh +8 -0
- data/solr/kurma-app-test/conf/lang/stopwords_en.txt +34 -0
- data/solr/kurma-app-test/conf/protwords.txt +21 -0
- data/solr/kurma-app-test/conf/schema.xml +158 -0
- data/solr/kurma-app-test/conf/solrconfig.xml +161 -0
- data/solr/kurma-app-test/conf/synonyms.txt +29 -0
- data/solr/kurma-app-test/deploy.sh +15 -0
- data/solr/kurma-app-test/purge.sh +8 -0
- data/solr/ogp-dev/purge.sh +1 -2
- data/spec/fixtures/bw938nk9584/temp/{TRIPURA-iso19139-fc.xml → TRIPURA-iso19110.xml} +0 -0
- data/spec/fixtures/cc142xj8436/temp/{HARYANA-iso19139-fc.xml → HARYANA-iso19110.xml} +0 -0
- data/spec/fixtures/cg716wc7949/temp/{metadata.iso19139-fc.xml → metadata.iso19110.xml} +0 -0
- data/spec/fixtures/cm007pv9601/temp/{MEGHALAYA-iso19139-fc.xml → MEGHALAYA-iso19110.xml} +0 -0
- data/spec/fixtures/cp055nb0189/temp/{metadata.iso19139-fc.xml → metadata.iso19110.xml} +0 -0
- data/spec/fixtures/cs838pw3418/temp/{OIL_GAS_FIELDS-iso19139-fc.xml → OIL_GAS_FIELDS-iso19110.xml} +0 -0
- data/spec/fixtures/dd308sy5843/temp/{ORISSA-iso19139-fc.xml → ORISSA-iso19110.xml} +0 -0
- data/spec/fixtures/dd452vk1873/temp/{metadata.iso19139-fc.xml → metadata.iso19110.xml} +0 -0
- data/spec/fixtures/dg850pt1796/temp/{STATE1951-iso19139-fc.xml → STATE1951-iso19110.xml} +0 -0
- data/spec/fixtures/dn744tf5427/temp/{DISTRICT1991-iso19139-fc.xml → DISTRICT1991-iso19110.xml} +0 -0
- data/spec/fixtures/dq603nz8402/temp/{STATE2001-iso19139-fc.xml → STATE2001-iso19110.xml} +0 -0
- data/spec/fixtures/dv609zt4699/temp/{ASSAM-iso19139-fc.xml → ASSAM-iso19110.xml} +0 -0
- data/spec/fixtures/dz222hw0585/temp/{PUNJAB-iso19139-fc.xml → PUNJAB-iso19110.xml} +0 -0
- data/spec/fixtures/fd673qb9705/temp/{STATE1971-iso19139-fc.xml → STATE1971-iso19110.xml} +0 -0
- data/spec/fixtures/fg451wp8917/temp/{SIKKIM-iso19139-fc.xml → SIKKIM-iso19110.xml} +0 -0
- data/spec/fixtures/fh247yz0156/temp/{RAJASTHAN-iso19139-fc.xml → RAJASTHAN-iso19110.xml} +0 -0
- data/spec/fixtures/fs487vd1465/temp/{CHHATTISGARH-iso19139-fc.xml → CHHATTISGARH-iso19110.xml} +0 -0
- data/spec/fixtures/fs591bn3317/temp/{HIMACHAL_PRADESH-iso19139-fc.xml → HIMACHAL_PRADESH-iso19110.xml} +0 -0
- data/spec/fixtures/fw920bc5473/temp/{PLSS_TWN-iso19139-fc.xml → PLSS_TWN-iso19110.xml} +0 -0
- data/spec/fixtures/gj831wj3625/temp/{metadata.iso19139-fc.xml → metadata.iso19110.xml} +0 -0
- data/spec/fixtures/gp075nv3265/temp/{PONDICHERRY-iso19139-fc.xml → PONDICHERRY-iso19110.xml} +0 -0
- data/spec/fixtures/gv800hj8141/temp/{BIHAR-iso19139-fc.xml → BIHAR-iso19110.xml} +0 -0
- data/spec/fixtures/gw520gz6339/temp/{DADRA_NAGAR_HAVELI_PT-iso19139-fc.xml → DADRA_NAGAR_HAVELI_PT-iso19110.xml} +0 -0
- data/spec/fixtures/gy054hz1045/temp/{HARYANA-iso19139-fc.xml → HARYANA-iso19110.xml} +0 -0
- data/spec/fixtures/gz352mw6982/temp/{metadata.iso19139-fc.xml → metadata.iso19110.xml} +0 -0
- data/spec/fixtures/hb489vm9892/temp/{DISTRICT1981-iso19139-fc.xml → DISTRICT1981-iso19110.xml} +0 -0
- data/spec/fixtures/hw125dq0418/temp/{DELHI-iso19139-fc.xml → DELHI-iso19110.xml} +0 -0
- data/spec/fixtures/hw892mn4587/temp/{KERALA-iso19139-fc.xml → KERALA-iso19110.xml} +0 -0
- data/spec/fixtures/jb371hz3868/temp/{INCOME-iso19139-fc.xml → INCOME-iso19110.xml} +0 -0
- data/spec/fixtures/jc017yk9928/temp/{KARNATAKA-iso19139-fc.xml → KARNATAKA-iso19110.xml} +0 -0
- data/spec/fixtures/jf841ys4828/temp/{ANDHRA_PRADESH-iso19139-fc.xml → ANDHRA_PRADESH-iso19110.xml} +0 -0
- data/spec/fixtures/jh802mp2160/temp/{DELHI_PT-iso19139-fc.xml → DELHI_PT-iso19110.xml} +0 -0
- data/spec/fixtures/jj806fc3801/temp/{metadata.iso19139-fc.xml → metadata.iso19110.xml} +0 -0
- data/spec/fixtures/jq835yn7161/temp/{HIMACHAL_PRADESH-iso19139-fc.xml → HIMACHAL_PRADESH-iso19110.xml} +0 -0
- data/spec/fixtures/jr455pt6676/temp/{TAMILNADU-iso19139-fc.xml → TAMILNADU-iso19110.xml} +0 -0
- data/spec/fixtures/js637zp2537/temp/{BIHAR-iso19139-fc.xml → BIHAR-iso19110.xml} +0 -0
- data/spec/fixtures/jv502wg9611/temp/{GOA-iso19139-fc.xml → GOA-iso19110.xml} +0 -0
- data/spec/fixtures/jw462ck6560/temp/{JAMMU_KASHMIR-iso19139-fc.xml → JAMMU_KASHMIR-iso19110.xml} +0 -0
- data/spec/fixtures/kj800fb6273/temp/{STATE2011-iso19139-fc.xml → STATE2011-iso19110.xml} +0 -0
- data/spec/fixtures/km504zq3948/temp/{HIMACHAL_PRADESH-iso19139-fc.xml → HIMACHAL_PRADESH-iso19110.xml} +0 -0
- data/spec/fixtures/ks297fy1411/temp/{OFFSH_BLOCKS-iso19139-fc.xml → OFFSH_BLOCKS-iso19110.xml} +0 -0
- data/spec/fixtures/md358hy5049/temp/{MIZORAM-iso19139-fc.xml → MIZORAM-iso19110.xml} +0 -0
- data/spec/fixtures/mg745bq0193/temp/{MADHYA_PRADESH-iso19139-fc.xml → MADHYA_PRADESH-iso19110.xml} +0 -0
- data/spec/fixtures/mh187yx3536/temp/{WEST_BENGAL-iso19139-fc.xml → WEST_BENGAL-iso19110.xml} +0 -0
- data/spec/fixtures/mk488yn6694/temp/{GUJARAT-iso19139-fc.xml → GUJARAT-iso19110.xml} +0 -0
- data/spec/fixtures/my216kp3008/temp/{DELHI-iso19139-fc.xml → DELHI-iso19110.xml} +0 -0
- data/spec/fixtures/my504nz9827/temp/{JAMMU_KASHMIR-iso19139-fc.xml → JAMMU_KASHMIR-iso19110.xml} +0 -0
- data/spec/fixtures/ng819jm8700/temp/{MANIPUR-iso19139-fc.xml → MANIPUR-iso19110.xml} +0 -0
- data/spec/fixtures/np020jq2139/temp/{metadata.iso19139-fc.xml → metadata.iso19110.xml} +0 -0
- data/spec/fixtures/ns377mt1608/temp/{STATE1991-iso19139-fc.xml → STATE1991-iso19110.xml} +0 -0
- data/spec/fixtures/nw926np8508/temp/{metadata.iso19139-fc.xml → metadata.iso19110.xml} +0 -0
- data/spec/fixtures/ny358rm8559/temp/{TRIPURA-iso19139-fc.xml → TRIPURA-iso19110.xml} +0 -0
- data/spec/fixtures/nz176rm8192/temp/{DISTRICT2011-iso19139-fc.xml → DISTRICT2011-iso19110.xml} +0 -0
- data/spec/fixtures/nz252rq2252/temp/{UTTAR_PRADESH-iso19139-fc.xml → UTTAR_PRADESH-iso19110.xml} +0 -0
- data/spec/fixtures/pd902kb3348/temp/{MADHYA_PRADESH-iso19139-fc.xml → MADHYA_PRADESH-iso19110.xml} +0 -0
- data/spec/fixtures/pz792fz1776/temp/{MAHARASHTRA-iso19139-fc.xml → MAHARASHTRA-iso19110.xml} +0 -0
- data/spec/fixtures/qb767ss4042/temp/{UTTAR_PRADESH-iso19139-fc.xml → UTTAR_PRADESH-iso19110.xml} +0 -0
- data/spec/fixtures/qc091qw0570/temp/{GUJARAT-iso19139-fc.xml → GUJARAT-iso19110.xml} +0 -0
- data/spec/fixtures/qc652vr7204/temp/{ANDHRA_PRADESH_PT-iso19139-fc.xml → ANDHRA_PRADESH_PT-iso19110.xml} +0 -0
- data/spec/fixtures/qk786js7484/temp/{DISTRICT1961-iso19139-fc.xml → DISTRICT1961-iso19110.xml} +0 -0
- data/spec/fixtures/qn676pg6767/temp/{GOA-iso19139-fc.xml → GOA-iso19110.xml} +0 -0
- data/spec/fixtures/qr255jh4074/temp/{LOKSABHA_14-iso19139-fc.xml → LOKSABHA_14-iso19110.xml} +0 -0
- data/spec/fixtures/qr374kj4827/temp/{ASSAM-iso19139-fc.xml → ASSAM-iso19110.xml} +0 -0
- data/spec/fixtures/qy162js1748/temp/{CHHATTISGARH-iso19139-fc.xml → CHHATTISGARH-iso19110.xml} +0 -0
- data/spec/fixtures/rd446vf2633/temp/{NAGALAND-iso19139-fc.xml → NAGALAND-iso19110.xml} +0 -0
- data/spec/fixtures/rf389hf2983/temp/{CHHATTISGARH_PT-iso19139-fc.xml → CHHATTISGARH_PT-iso19110.xml} +0 -0
- data/spec/fixtures/rf859ff4582/temp/{JHARKHAND-iso19139-fc.xml → JHARKHAND-iso19110.xml} +0 -0
- data/spec/fixtures/rh343ds8931/temp/{BIHAR-iso19139-fc.xml → BIHAR-iso19110.xml} +0 -0
- data/spec/fixtures/rn815xk8157/temp/{SIKKIM-iso19139-fc.xml → SIKKIM-iso19110.xml} +0 -0
- data/spec/fixtures/rq653sz4470/temp/{CHHATTISGARH-iso19139-fc.xml → CHHATTISGARH-iso19110.xml} +0 -0
- data/spec/fixtures/rt625ws6022/temp/{GULF_FAIRWAYS-iso19139-fc.xml → GULF_FAIRWAYS-iso19110.xml} +0 -0
- data/spec/fixtures/sc330vf4259/temp/{JHARKHAND-iso19139-fc.xml → JHARKHAND-iso19110.xml} +0 -0
- data/spec/fixtures/sq479mx3086/temp/{OFFSH_PLATF-iso19139-fc.xml → OFFSH_PLATF-iso19110.xml} +0 -0
- data/spec/fixtures/sr686bm4098/temp/{DAMAN_DIU_PT-iso19139-fc.xml → DAMAN_DIU_PT-iso19110.xml} +0 -0
- data/spec/fixtures/sv303sh5583/temp/{ARUNACHAL_PRADESH-iso19139-fc.xml → ARUNACHAL_PRADESH-iso19110.xml} +0 -0
- data/spec/fixtures/sy319nh8520/temp/{GUJARAT-iso19139-fc.xml → GUJARAT-iso19110.xml} +0 -0
- data/spec/fixtures/td363vx2792/temp/{HIMACHAL_PRADESH_PT-iso19139-fc.xml → HIMACHAL_PRADESH_PT-iso19110.xml} +0 -0
- data/spec/fixtures/tf374bd2484/temp/{DISTRICT1951-iso19139-fc.xml → DISTRICT1951-iso19110.xml} +0 -0
- data/spec/fixtures/tj797mj7877/temp/{LOKSABHA_15-iso19139-fc.xml → LOKSABHA_15-iso19110.xml} +0 -0
- data/spec/fixtures/tv060wq5179/temp/{ASSAM-iso19139-fc.xml → ASSAM-iso19110.xml} +0 -0
- data/spec/fixtures/tv536bn1915/temp/{ARUNACHAL_PRADESH-iso19139-fc.xml → ARUNACHAL_PRADESH-iso19110.xml} +0 -0
- data/spec/fixtures/tz359cc2977/temp/{MANIPUR-iso19139-fc.xml → MANIPUR-iso19110.xml} +0 -0
- data/spec/fixtures/vb525my6511/temp/{UTTARAKHAND-iso19139-fc.xml → UTTARAKHAND-iso19110.xml} +0 -0
- data/spec/fixtures/vh802fs4240/temp/{PONDICHERRY-iso19139-fc.xml → PONDICHERRY-iso19110.xml} +0 -0
- data/spec/fixtures/vk120xn2474/temp/{PLSS_SEC-iso19139-fc.xml → PLSS_SEC-iso19110.xml} +0 -0
- data/spec/fixtures/vn439bc7316/temp/{KERALA-iso19139-fc.xml → KERALA-iso19110.xml} +0 -0
- data/spec/fixtures/vq745jk0695/temp/{MEGHALAYA-iso19139-fc.xml → MEGHALAYA-iso19110.xml} +0 -0
- data/spec/fixtures/vr593vj7147/temp/{ANDHRA_PRADESH-iso19139-fc.xml → ANDHRA_PRADESH-iso19110.xml} +0 -0
- data/spec/fixtures/vw911qb5271/temp/{DISTRICT2001-iso19139-fc.xml → DISTRICT2001-iso19110.xml} +0 -0
- data/spec/fixtures/wg680pz0365/temp/{ANDHRA_PRADESH-iso19139-fc.xml → ANDHRA_PRADESH-iso19110.xml} +0 -0
- data/spec/fixtures/wg761xn1926/temp/{HARYANA-iso19139-fc.xml → HARYANA-iso19110.xml} +0 -0
- data/spec/fixtures/wh870qw1934/temp/{PUNJAB-iso19139-fc.xml → PUNJAB-iso19110.xml} +0 -0
- data/spec/fixtures/wk775mm4673/temp/{MAHARASHTRA-iso19139-fc.xml → MAHARASHTRA-iso19110.xml} +0 -0
- data/spec/fixtures/ws171yz2165/temp/{ARUNACHAL_PRADESH_PT-iso19139-fc.xml → ARUNACHAL_PRADESH_PT-iso19110.xml} +0 -0
- data/spec/fixtures/wt473hz7153/temp/{CHANDIGARH_PT-iso19139-fc.xml → CHANDIGARH_PT-iso19110.xml} +0 -0
- data/spec/fixtures/ww217dj0457/temp/{CO2_PIPE-iso19139-fc.xml → CO2_PIPE-iso19110.xml} +0 -0
- data/spec/fixtures/wy875pk9849/temp/{STATE1961-iso19139-fc.xml → STATE1961-iso19110.xml} +0 -0
- data/spec/fixtures/xb018tk2042/temp/{STATE1981-iso19139-fc.xml → STATE1981-iso19110.xml} +0 -0
- data/spec/fixtures/xg539vw8586/temp/{ORISSA-iso19139-fc.xml → ORISSA-iso19110.xml} +0 -0
- data/spec/fixtures/xv475kp4644/temp/{ASSAM_PT-iso19139-fc.xml → ASSAM_PT-iso19110.xml} +0 -0
- data/spec/fixtures/xy096gc2959/temp/{GOA-iso19139-fc.xml → GOA-iso19110.xml} +0 -0
- data/spec/fixtures/xz518gz3362/temp/{UTTARAKHAND-iso19139-fc.xml → UTTARAKHAND-iso19110.xml} +0 -0
- data/spec/fixtures/yh986wy4737/temp/{NAGALAND-iso19139-fc.xml → NAGALAND-iso19110.xml} +0 -0
- data/spec/fixtures/yn187fq4474/temp/{KARNATAKA-iso19139-fc.xml → KARNATAKA-iso19110.xml} +0 -0
- data/spec/fixtures/yn236mw3250/temp/{TAMILNADU-iso19139-fc.xml → TAMILNADU-iso19110.xml} +0 -0
- data/spec/fixtures/yz596nz0112/temp/{WEST_BENGAL-iso19139-fc.xml → WEST_BENGAL-iso19110.xml} +0 -0
- data/spec/fixtures/zk596gy7380/temp/{DISTRICT1971-iso19139-fc.xml → DISTRICT1971-iso19110.xml} +0 -0
- data/spec/fixtures/zn452hh7431/temp/{RAJASTHAN-iso19139-fc.xml → RAJASTHAN-iso19110.xml} +0 -0
- data/spec/fixtures/zt093fw6519/temp/{MIZORAM-iso19139-fc.xml → MIZORAM-iso19110.xml} +0 -0
- data/spec/fixtures/zv925hd6723/temp/{OGWELLS-iso19139-fc.xml → OGWELLS-iso19110.xml} +0 -0
- data/spec/fixtures/zy658cr1728/temp/{ANDAMAAN_NICOBAR_PT-iso19139-fc.xml → ANDAMAAN_NICOBAR_PT-iso19110.xml} +0 -0
- data/spec/fixtures/zz943vx1492/temp/{BASINS-iso19139-fc.xml → BASINS-iso19110.xml} +0 -0
- data/spec/unit/gazetteer_spec.rb +100 -35
- data/spec/unit/task_spec.rb +68 -0
- data/spec/unit/transform_spec.rb +1 -1
- data/spec/unit/utils_spec.rb +17 -3
- data/workflow.rb +35 -0
- metadata +323 -316
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/spec/fixtures/cs838pw3418/temp/{OIL_GAS_FIELDS-iso19139-fc.xml → OIL_GAS_FIELDS-iso19110.xml}
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/spec/fixtures/dn744tf5427/temp/{DISTRICT1991-iso19139-fc.xml → DISTRICT1991-iso19110.xml}
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/spec/fixtures/fs487vd1465/temp/{CHHATTISGARH-iso19139-fc.xml → CHHATTISGARH-iso19110.xml}
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/spec/fixtures/gp075nv3265/temp/{PONDICHERRY-iso19139-fc.xml → PONDICHERRY-iso19110.xml}
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/spec/fixtures/hb489vm9892/temp/{DISTRICT1981-iso19139-fc.xml → DISTRICT1981-iso19110.xml}
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/spec/fixtures/jf841ys4828/temp/{ANDHRA_PRADESH-iso19139-fc.xml → ANDHRA_PRADESH-iso19110.xml}
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/spec/fixtures/jw462ck6560/temp/{JAMMU_KASHMIR-iso19139-fc.xml → JAMMU_KASHMIR-iso19110.xml}
RENAMED
File without changes
|
File without changes
|
File without changes
|
data/spec/fixtures/ks297fy1411/temp/{OFFSH_BLOCKS-iso19139-fc.xml → OFFSH_BLOCKS-iso19110.xml}
RENAMED
File without changes
|
File without changes
|
data/spec/fixtures/mg745bq0193/temp/{MADHYA_PRADESH-iso19139-fc.xml → MADHYA_PRADESH-iso19110.xml}
RENAMED
File without changes
|
data/spec/fixtures/mh187yx3536/temp/{WEST_BENGAL-iso19139-fc.xml → WEST_BENGAL-iso19110.xml}
RENAMED
File without changes
|
File without changes
|
File without changes
|
data/spec/fixtures/my504nz9827/temp/{JAMMU_KASHMIR-iso19139-fc.xml → JAMMU_KASHMIR-iso19110.xml}
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/spec/fixtures/nz176rm8192/temp/{DISTRICT2011-iso19139-fc.xml → DISTRICT2011-iso19110.xml}
RENAMED
File without changes
|
data/spec/fixtures/nz252rq2252/temp/{UTTAR_PRADESH-iso19139-fc.xml → UTTAR_PRADESH-iso19110.xml}
RENAMED
File without changes
|
data/spec/fixtures/pd902kb3348/temp/{MADHYA_PRADESH-iso19139-fc.xml → MADHYA_PRADESH-iso19110.xml}
RENAMED
File without changes
|
data/spec/fixtures/pz792fz1776/temp/{MAHARASHTRA-iso19139-fc.xml → MAHARASHTRA-iso19110.xml}
RENAMED
File without changes
|
data/spec/fixtures/qb767ss4042/temp/{UTTAR_PRADESH-iso19139-fc.xml → UTTAR_PRADESH-iso19110.xml}
RENAMED
File without changes
|
File without changes
|
File without changes
|
data/spec/fixtures/qk786js7484/temp/{DISTRICT1961-iso19139-fc.xml → DISTRICT1961-iso19110.xml}
RENAMED
File without changes
|
File without changes
|
data/spec/fixtures/qr255jh4074/temp/{LOKSABHA_14-iso19139-fc.xml → LOKSABHA_14-iso19110.xml}
RENAMED
File without changes
|
File without changes
|
data/spec/fixtures/qy162js1748/temp/{CHHATTISGARH-iso19139-fc.xml → CHHATTISGARH-iso19110.xml}
RENAMED
File without changes
|
File without changes
|
data/spec/fixtures/rf389hf2983/temp/{CHHATTISGARH_PT-iso19139-fc.xml → CHHATTISGARH_PT-iso19110.xml}
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/spec/fixtures/rq653sz4470/temp/{CHHATTISGARH-iso19139-fc.xml → CHHATTISGARH-iso19110.xml}
RENAMED
File without changes
|
data/spec/fixtures/rt625ws6022/temp/{GULF_FAIRWAYS-iso19139-fc.xml → GULF_FAIRWAYS-iso19110.xml}
RENAMED
File without changes
|
File without changes
|
data/spec/fixtures/sq479mx3086/temp/{OFFSH_PLATF-iso19139-fc.xml → OFFSH_PLATF-iso19110.xml}
RENAMED
File without changes
|
data/spec/fixtures/sr686bm4098/temp/{DAMAN_DIU_PT-iso19139-fc.xml → DAMAN_DIU_PT-iso19110.xml}
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/spec/fixtures/tf374bd2484/temp/{DISTRICT1951-iso19139-fc.xml → DISTRICT1951-iso19110.xml}
RENAMED
File without changes
|
data/spec/fixtures/tj797mj7877/temp/{LOKSABHA_15-iso19139-fc.xml → LOKSABHA_15-iso19110.xml}
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/spec/fixtures/vb525my6511/temp/{UTTARAKHAND-iso19139-fc.xml → UTTARAKHAND-iso19110.xml}
RENAMED
File without changes
|
data/spec/fixtures/vh802fs4240/temp/{PONDICHERRY-iso19139-fc.xml → PONDICHERRY-iso19110.xml}
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/spec/fixtures/vr593vj7147/temp/{ANDHRA_PRADESH-iso19139-fc.xml → ANDHRA_PRADESH-iso19110.xml}
RENAMED
File without changes
|
data/spec/fixtures/vw911qb5271/temp/{DISTRICT2001-iso19139-fc.xml → DISTRICT2001-iso19110.xml}
RENAMED
File without changes
|
data/spec/fixtures/wg680pz0365/temp/{ANDHRA_PRADESH-iso19139-fc.xml → ANDHRA_PRADESH-iso19110.xml}
RENAMED
File without changes
|
File without changes
|
File without changes
|
data/spec/fixtures/wk775mm4673/temp/{MAHARASHTRA-iso19139-fc.xml → MAHARASHTRA-iso19110.xml}
RENAMED
File without changes
|
File without changes
|
data/spec/fixtures/wt473hz7153/temp/{CHANDIGARH_PT-iso19139-fc.xml → CHANDIGARH_PT-iso19110.xml}
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/spec/fixtures/xz518gz3362/temp/{UTTARAKHAND-iso19139-fc.xml → UTTARAKHAND-iso19110.xml}
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/spec/fixtures/yz596nz0112/temp/{WEST_BENGAL-iso19139-fc.xml → WEST_BENGAL-iso19110.xml}
RENAMED
File without changes
|
data/spec/fixtures/zk596gy7380/temp/{DISTRICT1971-iso19139-fc.xml → DISTRICT1971-iso19110.xml}
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/spec/unit/gazetteer_spec.rb
CHANGED
@@ -11,74 +11,140 @@ require 'geohydra'
|
|
11
11
|
g = GeoHydra::Gazetteer.new
|
12
12
|
# ap({:g => g})
|
13
13
|
|
14
|
-
|
15
|
-
|
16
|
-
'
|
17
|
-
'
|
14
|
+
|
15
|
+
K2GEONAMESID = {
|
16
|
+
'United States' => 6252001, # simple
|
17
|
+
'Chandīgarh (India : Union Territory)' => 1274744, # with UTF8
|
18
|
+
'Maharashtra (India)' => 1264418, # without UTF8
|
19
|
+
'Chandni Chowk (Delhi, India)' => 6619404, # same as placename
|
20
|
+
'Jāt (India)' => 1269155, # no LC with UTF8
|
21
|
+
'Bhīlwāra (India : District)' => 1275961, # with UTF8 and qualifier
|
22
|
+
'Anand (India : District)' => 7627221, # UTF8 in qualifier
|
23
|
+
'Ratnāgiri (India : District)' => 1258340, # with qualifier and UTF8 in LCNAF
|
24
|
+
'Monterey Harbor (Calif.)' => 5374395 # no LC
|
18
25
|
}
|
19
26
|
|
20
|
-
|
27
|
+
K2PLACENAME = {
|
28
|
+
'United States' => 'United States',
|
29
|
+
'Chandīgarh (India : Union Territory)' => 'Chandīgarh',
|
30
|
+
'Maharashtra (India)' => 'Mahārāshtra',
|
31
|
+
'Chandni Chowk (Delhi, India)' => 'Chandni Chowk',
|
32
|
+
'Jāt (India)' => 'Jāt',
|
33
|
+
'Bhīlwāra (India : District)' => 'Bhīlwāra',
|
34
|
+
'Anand (India : District)' => 'Anand',
|
35
|
+
'Ratnāgiri (India : District)' => 'Ratnagiri District',
|
36
|
+
'Monterey Harbor (Calif.)' => 'Monterey Harbor'
|
37
|
+
}
|
38
|
+
|
39
|
+
K2LCSH = {
|
21
40
|
'Earth' => 'Earth (Planet)',
|
22
41
|
'United States' => 'United States',
|
23
|
-
'Union Territory
|
24
|
-
'
|
42
|
+
'Chandīgarh (India : Union Territory)' => 'Chandīgarh (India : Union Territory)',
|
43
|
+
'Maharashtra (India)' => 'Maharashtra (India)',
|
44
|
+
'Chandni Chowk (Delhi, India)' => 'Chandni Chowk (Delhi, India)',
|
45
|
+
'Jāt (India)' => nil,
|
46
|
+
'Bhīlwāra (India : District)' => 'Bhīlwāra (India : District)',
|
47
|
+
'Anand (India : District)' => 'Anand (India : District)',
|
48
|
+
'Ratnāgiri (India : District)' => 'Ratnāgiri (India : District)',
|
49
|
+
'Monterey Harbor (Calif.)' => nil
|
25
50
|
}
|
26
51
|
|
27
52
|
K2LCURI = {
|
28
|
-
'Earth' => 'http://id.loc.gov/authorities/subjects/sh85040427'
|
53
|
+
'Earth' => 'http://id.loc.gov/authorities/subjects/sh85040427',
|
54
|
+
'United States' => 'http://id.loc.gov/authorities/names/n78095330',
|
55
|
+
'Chandīgarh (India : Union Territory)' => 'http://id.loc.gov/authorities/names/n81109268',
|
56
|
+
'Maharashtra (India)' => 'http://id.loc.gov/authorities/names/n50000932',
|
57
|
+
'Chandni Chowk (Delhi, India)' => 'http://id.loc.gov/authorities/names/no2004006256',
|
58
|
+
'Bhīlwāra (India : District)' => 'http://id.loc.gov/authorities/names/n89284170',
|
59
|
+
'Jāt (India)' => nil,
|
60
|
+
'Anand (India : District)' => 'http://id.loc.gov/authorities/names/n2008050108',
|
61
|
+
'Ratnāgiri (India : District)' => 'http://id.loc.gov/authorities/names/n83150618',
|
62
|
+
'Monterey Harbor (Calif.)' => nil
|
29
63
|
}
|
30
64
|
|
65
|
+
|
31
66
|
describe GeoHydra::Gazetteer do
|
32
67
|
|
33
|
-
describe '#
|
68
|
+
describe '#find_id' do
|
34
69
|
it "nil case" do
|
35
|
-
g.
|
36
|
-
g.
|
70
|
+
g.find_id(nil).should == nil
|
71
|
+
g.find_id('adsfadsfasdf').should == nil
|
37
72
|
end
|
38
|
-
|
73
|
+
K2GEONAMESID.each do |k,geonamesid|
|
39
74
|
it k do
|
40
|
-
|
41
|
-
r.should == id
|
75
|
+
g.find_id(k).should == geonamesid
|
42
76
|
end
|
43
77
|
end
|
44
78
|
end
|
45
79
|
|
46
|
-
describe '#
|
80
|
+
describe '#find_loc_keyword' do
|
47
81
|
it "nil case" do
|
48
|
-
g.
|
49
|
-
g.
|
82
|
+
g.find_loc_keyword(nil).should == nil
|
83
|
+
g.find_loc_keyword('asdfasdfasdf').should == nil
|
50
84
|
end
|
51
|
-
|
85
|
+
K2LCSH.each do |k,lcsh|
|
52
86
|
it k do
|
53
|
-
|
54
|
-
r.should == lcsh
|
87
|
+
g.find_loc_keyword(k).should == lcsh
|
55
88
|
end
|
56
89
|
end
|
57
90
|
end
|
58
91
|
|
59
|
-
describe '#
|
92
|
+
describe '#find_loc_uri' do
|
93
|
+
it "nil case" do
|
94
|
+
g.find_loc_uri(nil).should == nil
|
95
|
+
g.find_loc_uri('asdfasdfasdf').should == nil
|
96
|
+
end
|
97
|
+
K2LCURI.each do |k,lcuri|
|
98
|
+
it k do
|
99
|
+
g.find_loc_uri(k).should == lcuri
|
100
|
+
end
|
101
|
+
end
|
102
|
+
end
|
103
|
+
|
104
|
+
|
105
|
+
describe '#find_loc_authority' do
|
60
106
|
it "nil case" do
|
61
|
-
g.
|
62
|
-
g.
|
107
|
+
g.find_loc_authority(nil).should == nil
|
108
|
+
g.find_loc_authority('asdfasdfasdf').should == nil
|
63
109
|
end
|
64
110
|
K2LCURI.each do |k,lcuri|
|
65
111
|
it k do
|
66
|
-
r = g.
|
67
|
-
|
112
|
+
r = g.find_loc_authority(k)
|
113
|
+
if lcuri.nil?
|
114
|
+
r.should == nil
|
115
|
+
else
|
116
|
+
if lcuri.start_with?('http://id.loc.gov/authorities/subjects/sh')
|
117
|
+
r.should == 'lcsh'
|
118
|
+
elsif lcuri.start_with?('http://id.loc.gov/authorities/names/n')
|
119
|
+
r.should == 'lcnaf'
|
120
|
+
else
|
121
|
+
r.should == nil
|
122
|
+
end
|
123
|
+
end
|
68
124
|
end
|
69
125
|
end
|
70
126
|
end
|
71
127
|
|
128
|
+
describe '#find_placename' do
|
129
|
+
it "nil case" do
|
130
|
+
g.find_placename(nil).should == nil
|
131
|
+
g.find_placename('asdfasdfasdf').should == nil
|
132
|
+
end
|
133
|
+
K2PLACENAME.each do |k,placename|
|
134
|
+
it k do
|
135
|
+
g.find_placename(k).should == placename
|
136
|
+
end
|
137
|
+
end
|
138
|
+
end
|
72
139
|
|
73
|
-
describe '#
|
140
|
+
describe '#find_placename_uri' do
|
74
141
|
it "nil case" do
|
75
|
-
g.
|
76
|
-
g.
|
142
|
+
g.find_placename_uri(nil).should == nil
|
143
|
+
g.find_placename_uri('asdfasdfasdf').should == nil
|
77
144
|
end
|
78
|
-
|
145
|
+
K2GEONAMESID.each do |k,geonamesid|
|
79
146
|
it k do
|
80
|
-
|
81
|
-
r.should == "http://sws.geonames.org/#{id}/"
|
147
|
+
g.find_placename_uri(k).should == "http://sws.geonames.org/#{geonamesid}/"
|
82
148
|
end
|
83
149
|
end
|
84
150
|
end
|
@@ -88,10 +154,9 @@ describe GeoHydra::Gazetteer do
|
|
88
154
|
g.find_keyword_by_id(nil).should == nil
|
89
155
|
g.find_keyword_by_id(-1).should == nil
|
90
156
|
end
|
91
|
-
|
92
|
-
it
|
93
|
-
|
94
|
-
r.should == k
|
157
|
+
K2GEONAMESID.each do |k,geonamesid|
|
158
|
+
it geonamesid do
|
159
|
+
g.find_keyword_by_id(geonamesid).should == k
|
95
160
|
end
|
96
161
|
end
|
97
162
|
end
|
@@ -0,0 +1,68 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
|
3
|
+
require File.expand_path(File.dirname(__FILE__) + '/../../config/boot')
|
4
|
+
require 'rspec'
|
5
|
+
|
6
|
+
DRUIDS = %w{aa111bb2222 cc333dd4444 ee555ff6666 gg777hh8888 ii999jj0000}
|
7
|
+
DRUID = DRUIDS[0]
|
8
|
+
|
9
|
+
INVALID_DRUIDS = %w{NotADruid!!! AA111bb2222 aa11bb22222}
|
10
|
+
INVALID_DRUID = INVALID_DRUIDS[0]
|
11
|
+
|
12
|
+
describe GeoHydra::Task do
|
13
|
+
before(:each) do
|
14
|
+
@t = GeoHydra::Task.new :druid => DRUID
|
15
|
+
# ap({:t => @t})
|
16
|
+
end
|
17
|
+
|
18
|
+
describe '#init' do
|
19
|
+
it 'valid' do
|
20
|
+
@t.class.should == GeoHydra::Task
|
21
|
+
t = GeoHydra::Task.new :notanarg => 'nonsense'
|
22
|
+
t.class.should == GeoHydra::Task
|
23
|
+
end
|
24
|
+
|
25
|
+
it 'invalid' do
|
26
|
+
expect { GeoHydra::Task.new :druid => INVALID_DRUID }.to raise_error ArgumentError
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
describe '#perform' do
|
31
|
+
it 'invalid' do
|
32
|
+
expect { @t.perform }.to raise_error NotImplementedError
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
describe '#valid_status?' do
|
37
|
+
it 'valid' do
|
38
|
+
@t.valid_status?('HOLD').should == true
|
39
|
+
@t.valid_status?('hold').should == true
|
40
|
+
@t.valid_status?('HolD').should == true
|
41
|
+
@t.valid_status?('READY').should == true
|
42
|
+
@t.valid_status?('RUNNING').should == true
|
43
|
+
@t.valid_status?('DEFERRED').should == true
|
44
|
+
@t.valid_status?('ERROR').should == true
|
45
|
+
@t.valid_status?('COMPLETED').should == true
|
46
|
+
end
|
47
|
+
|
48
|
+
it 'invalid' do
|
49
|
+
@t.valid_status?('foobar').should == false
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
describe '#druid=' do
|
54
|
+
it 'valid' do
|
55
|
+
DRUIDS.each do |druid|
|
56
|
+
t = GeoHydra::Task.new :druid => druid
|
57
|
+
t.druid.id.should == druid
|
58
|
+
t.druid.druid.should == "druid:#{druid}"
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
it 'invalid' do
|
63
|
+
INVALID_DRUIDS.each do |druid|
|
64
|
+
expect { GeoHydra::Task.new :druid =>druid }.to raise_error ArgumentError
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|