geohydra 0.3.1 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (194) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +2 -1
  3. data/.travis.yml +1 -2
  4. data/Gemfile +1 -8
  5. data/Gemfile.lock +87 -102
  6. data/README.md +2 -2
  7. data/VERSION +1 -1
  8. data/bin/accession.rb +99 -89
  9. data/bin/assemble.rb +288 -247
  10. data/bin/assemble_data.rb +54 -51
  11. data/bin/assemble_placenames.rb +85 -85
  12. data/bin/build_stage_options.rb +24 -18
  13. data/bin/derive_wgs84.rb +65 -66
  14. data/bin/extract_thumbnail.rb +38 -37
  15. data/bin/geo2mods.rb +78 -0
  16. data/bin/geohydra +14 -5
  17. data/bin/ingest_arcgis.rb +80 -60
  18. data/bin/iso2geo.rb +64 -0
  19. data/bin/loader_postgis.rb +121 -227
  20. data/bin/run_task.rb +23 -0
  21. data/bin/sync_geoserver_metadata.rb +132 -127
  22. data/bin/xsltproc-saxon +6 -0
  23. data/geohydra.gemspec +6 -4
  24. data/lib/geohydra.rb +5 -0
  25. data/lib/geohydra/accession.rb +24 -13
  26. data/lib/geohydra/{arcgis_to_iso19139_fc.xsl → arcgis_to_iso19110.xsl} +0 -0
  27. data/lib/geohydra/gazetteer.csv +842 -36
  28. data/lib/geohydra/gazetteer.rb +48 -24
  29. data/lib/geohydra/mods2geoblacklight.xsl +248 -0
  30. data/lib/geohydra/mods2ogp.xsl +5 -8
  31. data/lib/geohydra/transform.rb +8 -2
  32. data/lib/geohydra/utils.rb +6 -0
  33. data/lib/geohydra/workflow/gisAssemblyWF.rb +109 -0
  34. data/lib/geohydra/workflow/gisAssemblyWF.xml +85 -0
  35. data/lib/geohydra/workflow/gisDeliveryWF.rb +33 -0
  36. data/lib/geohydra/workflow/gisDeliveryWF.xml +36 -0
  37. data/lib/geohydra/workflow/gisDiscoveryWF.rb +55 -0
  38. data/lib/geohydra/workflow/gisDiscoveryWF.xml +28 -0
  39. data/lib/geohydra/workflow/task.rb +82 -0
  40. data/ogp/README.md +350 -0
  41. data/ogp/download.rb +92 -0
  42. data/ogp/fgdc2mods.sh +9 -0
  43. data/ogp/fgdc2mods.xsl +884 -0
  44. data/ogp/ingest.rb +48 -0
  45. data/ogp/select.rb +20 -0
  46. data/ogp/transform.rb +354 -0
  47. data/ogp/validate.rb +182 -0
  48. data/{bin → scripts}/ingest_tufts.rb +0 -0
  49. data/scripts/iso2html/doit.sh +15 -0
  50. data/scripts/iso2html/main.css +66 -0
  51. data/scripts/iso2html/pacioos-iso-html.xsl +1749 -0
  52. data/scripts/iso2html/utils/replace-newlines.xsl +97 -0
  53. data/scripts/iso2html/utils/replace-string.xsl +80 -0
  54. data/scripts/iso2html/utils/strip-digits.xsl +60 -0
  55. data/{bin → scripts}/loader.rb +0 -0
  56. data/scripts/rename_shapefiles.rb +5 -0
  57. data/scripts/render_gazetteer.rb +36 -0
  58. data/{bin → scripts}/seed.rb +0 -0
  59. data/{bin → scripts}/solr_indexer.rb +0 -0
  60. data/scripts/status.csv +253 -0
  61. data/scripts/status.rb +32 -0
  62. data/{bin → scripts}/validate_data.rb +1 -1
  63. data/solr/kurma-app-dev/conf/lang/stopwords_en.txt +34 -0
  64. data/solr/kurma-app-dev/conf/protwords.txt +21 -0
  65. data/solr/kurma-app-dev/conf/schema.xml +156 -0
  66. data/solr/kurma-app-dev/conf/solrconfig.xml +161 -0
  67. data/solr/kurma-app-dev/conf/synonyms.txt +29 -0
  68. data/solr/kurma-app-dev/purge.sh +8 -0
  69. data/solr/kurma-app-test/conf/lang/stopwords_en.txt +34 -0
  70. data/solr/kurma-app-test/conf/protwords.txt +21 -0
  71. data/solr/kurma-app-test/conf/schema.xml +158 -0
  72. data/solr/kurma-app-test/conf/solrconfig.xml +161 -0
  73. data/solr/kurma-app-test/conf/synonyms.txt +29 -0
  74. data/solr/kurma-app-test/deploy.sh +15 -0
  75. data/solr/kurma-app-test/purge.sh +8 -0
  76. data/solr/ogp-dev/purge.sh +1 -2
  77. data/spec/fixtures/bw938nk9584/temp/{TRIPURA-iso19139-fc.xml → TRIPURA-iso19110.xml} +0 -0
  78. data/spec/fixtures/cc142xj8436/temp/{HARYANA-iso19139-fc.xml → HARYANA-iso19110.xml} +0 -0
  79. data/spec/fixtures/cg716wc7949/temp/{metadata.iso19139-fc.xml → metadata.iso19110.xml} +0 -0
  80. data/spec/fixtures/cm007pv9601/temp/{MEGHALAYA-iso19139-fc.xml → MEGHALAYA-iso19110.xml} +0 -0
  81. data/spec/fixtures/cp055nb0189/temp/{metadata.iso19139-fc.xml → metadata.iso19110.xml} +0 -0
  82. data/spec/fixtures/cs838pw3418/temp/{OIL_GAS_FIELDS-iso19139-fc.xml → OIL_GAS_FIELDS-iso19110.xml} +0 -0
  83. data/spec/fixtures/dd308sy5843/temp/{ORISSA-iso19139-fc.xml → ORISSA-iso19110.xml} +0 -0
  84. data/spec/fixtures/dd452vk1873/temp/{metadata.iso19139-fc.xml → metadata.iso19110.xml} +0 -0
  85. data/spec/fixtures/dg850pt1796/temp/{STATE1951-iso19139-fc.xml → STATE1951-iso19110.xml} +0 -0
  86. data/spec/fixtures/dn744tf5427/temp/{DISTRICT1991-iso19139-fc.xml → DISTRICT1991-iso19110.xml} +0 -0
  87. data/spec/fixtures/dq603nz8402/temp/{STATE2001-iso19139-fc.xml → STATE2001-iso19110.xml} +0 -0
  88. data/spec/fixtures/dv609zt4699/temp/{ASSAM-iso19139-fc.xml → ASSAM-iso19110.xml} +0 -0
  89. data/spec/fixtures/dz222hw0585/temp/{PUNJAB-iso19139-fc.xml → PUNJAB-iso19110.xml} +0 -0
  90. data/spec/fixtures/fd673qb9705/temp/{STATE1971-iso19139-fc.xml → STATE1971-iso19110.xml} +0 -0
  91. data/spec/fixtures/fg451wp8917/temp/{SIKKIM-iso19139-fc.xml → SIKKIM-iso19110.xml} +0 -0
  92. data/spec/fixtures/fh247yz0156/temp/{RAJASTHAN-iso19139-fc.xml → RAJASTHAN-iso19110.xml} +0 -0
  93. data/spec/fixtures/fs487vd1465/temp/{CHHATTISGARH-iso19139-fc.xml → CHHATTISGARH-iso19110.xml} +0 -0
  94. data/spec/fixtures/fs591bn3317/temp/{HIMACHAL_PRADESH-iso19139-fc.xml → HIMACHAL_PRADESH-iso19110.xml} +0 -0
  95. data/spec/fixtures/fw920bc5473/temp/{PLSS_TWN-iso19139-fc.xml → PLSS_TWN-iso19110.xml} +0 -0
  96. data/spec/fixtures/gj831wj3625/temp/{metadata.iso19139-fc.xml → metadata.iso19110.xml} +0 -0
  97. data/spec/fixtures/gp075nv3265/temp/{PONDICHERRY-iso19139-fc.xml → PONDICHERRY-iso19110.xml} +0 -0
  98. data/spec/fixtures/gv800hj8141/temp/{BIHAR-iso19139-fc.xml → BIHAR-iso19110.xml} +0 -0
  99. data/spec/fixtures/gw520gz6339/temp/{DADRA_NAGAR_HAVELI_PT-iso19139-fc.xml → DADRA_NAGAR_HAVELI_PT-iso19110.xml} +0 -0
  100. data/spec/fixtures/gy054hz1045/temp/{HARYANA-iso19139-fc.xml → HARYANA-iso19110.xml} +0 -0
  101. data/spec/fixtures/gz352mw6982/temp/{metadata.iso19139-fc.xml → metadata.iso19110.xml} +0 -0
  102. data/spec/fixtures/hb489vm9892/temp/{DISTRICT1981-iso19139-fc.xml → DISTRICT1981-iso19110.xml} +0 -0
  103. data/spec/fixtures/hw125dq0418/temp/{DELHI-iso19139-fc.xml → DELHI-iso19110.xml} +0 -0
  104. data/spec/fixtures/hw892mn4587/temp/{KERALA-iso19139-fc.xml → KERALA-iso19110.xml} +0 -0
  105. data/spec/fixtures/jb371hz3868/temp/{INCOME-iso19139-fc.xml → INCOME-iso19110.xml} +0 -0
  106. data/spec/fixtures/jc017yk9928/temp/{KARNATAKA-iso19139-fc.xml → KARNATAKA-iso19110.xml} +0 -0
  107. data/spec/fixtures/jf841ys4828/temp/{ANDHRA_PRADESH-iso19139-fc.xml → ANDHRA_PRADESH-iso19110.xml} +0 -0
  108. data/spec/fixtures/jh802mp2160/temp/{DELHI_PT-iso19139-fc.xml → DELHI_PT-iso19110.xml} +0 -0
  109. data/spec/fixtures/jj806fc3801/temp/{metadata.iso19139-fc.xml → metadata.iso19110.xml} +0 -0
  110. data/spec/fixtures/jq835yn7161/temp/{HIMACHAL_PRADESH-iso19139-fc.xml → HIMACHAL_PRADESH-iso19110.xml} +0 -0
  111. data/spec/fixtures/jr455pt6676/temp/{TAMILNADU-iso19139-fc.xml → TAMILNADU-iso19110.xml} +0 -0
  112. data/spec/fixtures/js637zp2537/temp/{BIHAR-iso19139-fc.xml → BIHAR-iso19110.xml} +0 -0
  113. data/spec/fixtures/jv502wg9611/temp/{GOA-iso19139-fc.xml → GOA-iso19110.xml} +0 -0
  114. data/spec/fixtures/jw462ck6560/temp/{JAMMU_KASHMIR-iso19139-fc.xml → JAMMU_KASHMIR-iso19110.xml} +0 -0
  115. data/spec/fixtures/kj800fb6273/temp/{STATE2011-iso19139-fc.xml → STATE2011-iso19110.xml} +0 -0
  116. data/spec/fixtures/km504zq3948/temp/{HIMACHAL_PRADESH-iso19139-fc.xml → HIMACHAL_PRADESH-iso19110.xml} +0 -0
  117. data/spec/fixtures/ks297fy1411/temp/{OFFSH_BLOCKS-iso19139-fc.xml → OFFSH_BLOCKS-iso19110.xml} +0 -0
  118. data/spec/fixtures/md358hy5049/temp/{MIZORAM-iso19139-fc.xml → MIZORAM-iso19110.xml} +0 -0
  119. data/spec/fixtures/mg745bq0193/temp/{MADHYA_PRADESH-iso19139-fc.xml → MADHYA_PRADESH-iso19110.xml} +0 -0
  120. data/spec/fixtures/mh187yx3536/temp/{WEST_BENGAL-iso19139-fc.xml → WEST_BENGAL-iso19110.xml} +0 -0
  121. data/spec/fixtures/mk488yn6694/temp/{GUJARAT-iso19139-fc.xml → GUJARAT-iso19110.xml} +0 -0
  122. data/spec/fixtures/my216kp3008/temp/{DELHI-iso19139-fc.xml → DELHI-iso19110.xml} +0 -0
  123. data/spec/fixtures/my504nz9827/temp/{JAMMU_KASHMIR-iso19139-fc.xml → JAMMU_KASHMIR-iso19110.xml} +0 -0
  124. data/spec/fixtures/ng819jm8700/temp/{MANIPUR-iso19139-fc.xml → MANIPUR-iso19110.xml} +0 -0
  125. data/spec/fixtures/np020jq2139/temp/{metadata.iso19139-fc.xml → metadata.iso19110.xml} +0 -0
  126. data/spec/fixtures/ns377mt1608/temp/{STATE1991-iso19139-fc.xml → STATE1991-iso19110.xml} +0 -0
  127. data/spec/fixtures/nw926np8508/temp/{metadata.iso19139-fc.xml → metadata.iso19110.xml} +0 -0
  128. data/spec/fixtures/ny358rm8559/temp/{TRIPURA-iso19139-fc.xml → TRIPURA-iso19110.xml} +0 -0
  129. data/spec/fixtures/nz176rm8192/temp/{DISTRICT2011-iso19139-fc.xml → DISTRICT2011-iso19110.xml} +0 -0
  130. data/spec/fixtures/nz252rq2252/temp/{UTTAR_PRADESH-iso19139-fc.xml → UTTAR_PRADESH-iso19110.xml} +0 -0
  131. data/spec/fixtures/pd902kb3348/temp/{MADHYA_PRADESH-iso19139-fc.xml → MADHYA_PRADESH-iso19110.xml} +0 -0
  132. data/spec/fixtures/pz792fz1776/temp/{MAHARASHTRA-iso19139-fc.xml → MAHARASHTRA-iso19110.xml} +0 -0
  133. data/spec/fixtures/qb767ss4042/temp/{UTTAR_PRADESH-iso19139-fc.xml → UTTAR_PRADESH-iso19110.xml} +0 -0
  134. data/spec/fixtures/qc091qw0570/temp/{GUJARAT-iso19139-fc.xml → GUJARAT-iso19110.xml} +0 -0
  135. data/spec/fixtures/qc652vr7204/temp/{ANDHRA_PRADESH_PT-iso19139-fc.xml → ANDHRA_PRADESH_PT-iso19110.xml} +0 -0
  136. data/spec/fixtures/qk786js7484/temp/{DISTRICT1961-iso19139-fc.xml → DISTRICT1961-iso19110.xml} +0 -0
  137. data/spec/fixtures/qn676pg6767/temp/{GOA-iso19139-fc.xml → GOA-iso19110.xml} +0 -0
  138. data/spec/fixtures/qr255jh4074/temp/{LOKSABHA_14-iso19139-fc.xml → LOKSABHA_14-iso19110.xml} +0 -0
  139. data/spec/fixtures/qr374kj4827/temp/{ASSAM-iso19139-fc.xml → ASSAM-iso19110.xml} +0 -0
  140. data/spec/fixtures/qy162js1748/temp/{CHHATTISGARH-iso19139-fc.xml → CHHATTISGARH-iso19110.xml} +0 -0
  141. data/spec/fixtures/rd446vf2633/temp/{NAGALAND-iso19139-fc.xml → NAGALAND-iso19110.xml} +0 -0
  142. data/spec/fixtures/rf389hf2983/temp/{CHHATTISGARH_PT-iso19139-fc.xml → CHHATTISGARH_PT-iso19110.xml} +0 -0
  143. data/spec/fixtures/rf859ff4582/temp/{JHARKHAND-iso19139-fc.xml → JHARKHAND-iso19110.xml} +0 -0
  144. data/spec/fixtures/rh343ds8931/temp/{BIHAR-iso19139-fc.xml → BIHAR-iso19110.xml} +0 -0
  145. data/spec/fixtures/rn815xk8157/temp/{SIKKIM-iso19139-fc.xml → SIKKIM-iso19110.xml} +0 -0
  146. data/spec/fixtures/rq653sz4470/temp/{CHHATTISGARH-iso19139-fc.xml → CHHATTISGARH-iso19110.xml} +0 -0
  147. data/spec/fixtures/rt625ws6022/temp/{GULF_FAIRWAYS-iso19139-fc.xml → GULF_FAIRWAYS-iso19110.xml} +0 -0
  148. data/spec/fixtures/sc330vf4259/temp/{JHARKHAND-iso19139-fc.xml → JHARKHAND-iso19110.xml} +0 -0
  149. data/spec/fixtures/sq479mx3086/temp/{OFFSH_PLATF-iso19139-fc.xml → OFFSH_PLATF-iso19110.xml} +0 -0
  150. data/spec/fixtures/sr686bm4098/temp/{DAMAN_DIU_PT-iso19139-fc.xml → DAMAN_DIU_PT-iso19110.xml} +0 -0
  151. data/spec/fixtures/sv303sh5583/temp/{ARUNACHAL_PRADESH-iso19139-fc.xml → ARUNACHAL_PRADESH-iso19110.xml} +0 -0
  152. data/spec/fixtures/sy319nh8520/temp/{GUJARAT-iso19139-fc.xml → GUJARAT-iso19110.xml} +0 -0
  153. data/spec/fixtures/td363vx2792/temp/{HIMACHAL_PRADESH_PT-iso19139-fc.xml → HIMACHAL_PRADESH_PT-iso19110.xml} +0 -0
  154. data/spec/fixtures/tf374bd2484/temp/{DISTRICT1951-iso19139-fc.xml → DISTRICT1951-iso19110.xml} +0 -0
  155. data/spec/fixtures/tj797mj7877/temp/{LOKSABHA_15-iso19139-fc.xml → LOKSABHA_15-iso19110.xml} +0 -0
  156. data/spec/fixtures/tv060wq5179/temp/{ASSAM-iso19139-fc.xml → ASSAM-iso19110.xml} +0 -0
  157. data/spec/fixtures/tv536bn1915/temp/{ARUNACHAL_PRADESH-iso19139-fc.xml → ARUNACHAL_PRADESH-iso19110.xml} +0 -0
  158. data/spec/fixtures/tz359cc2977/temp/{MANIPUR-iso19139-fc.xml → MANIPUR-iso19110.xml} +0 -0
  159. data/spec/fixtures/vb525my6511/temp/{UTTARAKHAND-iso19139-fc.xml → UTTARAKHAND-iso19110.xml} +0 -0
  160. data/spec/fixtures/vh802fs4240/temp/{PONDICHERRY-iso19139-fc.xml → PONDICHERRY-iso19110.xml} +0 -0
  161. data/spec/fixtures/vk120xn2474/temp/{PLSS_SEC-iso19139-fc.xml → PLSS_SEC-iso19110.xml} +0 -0
  162. data/spec/fixtures/vn439bc7316/temp/{KERALA-iso19139-fc.xml → KERALA-iso19110.xml} +0 -0
  163. data/spec/fixtures/vq745jk0695/temp/{MEGHALAYA-iso19139-fc.xml → MEGHALAYA-iso19110.xml} +0 -0
  164. data/spec/fixtures/vr593vj7147/temp/{ANDHRA_PRADESH-iso19139-fc.xml → ANDHRA_PRADESH-iso19110.xml} +0 -0
  165. data/spec/fixtures/vw911qb5271/temp/{DISTRICT2001-iso19139-fc.xml → DISTRICT2001-iso19110.xml} +0 -0
  166. data/spec/fixtures/wg680pz0365/temp/{ANDHRA_PRADESH-iso19139-fc.xml → ANDHRA_PRADESH-iso19110.xml} +0 -0
  167. data/spec/fixtures/wg761xn1926/temp/{HARYANA-iso19139-fc.xml → HARYANA-iso19110.xml} +0 -0
  168. data/spec/fixtures/wh870qw1934/temp/{PUNJAB-iso19139-fc.xml → PUNJAB-iso19110.xml} +0 -0
  169. data/spec/fixtures/wk775mm4673/temp/{MAHARASHTRA-iso19139-fc.xml → MAHARASHTRA-iso19110.xml} +0 -0
  170. data/spec/fixtures/ws171yz2165/temp/{ARUNACHAL_PRADESH_PT-iso19139-fc.xml → ARUNACHAL_PRADESH_PT-iso19110.xml} +0 -0
  171. data/spec/fixtures/wt473hz7153/temp/{CHANDIGARH_PT-iso19139-fc.xml → CHANDIGARH_PT-iso19110.xml} +0 -0
  172. data/spec/fixtures/ww217dj0457/temp/{CO2_PIPE-iso19139-fc.xml → CO2_PIPE-iso19110.xml} +0 -0
  173. data/spec/fixtures/wy875pk9849/temp/{STATE1961-iso19139-fc.xml → STATE1961-iso19110.xml} +0 -0
  174. data/spec/fixtures/xb018tk2042/temp/{STATE1981-iso19139-fc.xml → STATE1981-iso19110.xml} +0 -0
  175. data/spec/fixtures/xg539vw8586/temp/{ORISSA-iso19139-fc.xml → ORISSA-iso19110.xml} +0 -0
  176. data/spec/fixtures/xv475kp4644/temp/{ASSAM_PT-iso19139-fc.xml → ASSAM_PT-iso19110.xml} +0 -0
  177. data/spec/fixtures/xy096gc2959/temp/{GOA-iso19139-fc.xml → GOA-iso19110.xml} +0 -0
  178. data/spec/fixtures/xz518gz3362/temp/{UTTARAKHAND-iso19139-fc.xml → UTTARAKHAND-iso19110.xml} +0 -0
  179. data/spec/fixtures/yh986wy4737/temp/{NAGALAND-iso19139-fc.xml → NAGALAND-iso19110.xml} +0 -0
  180. data/spec/fixtures/yn187fq4474/temp/{KARNATAKA-iso19139-fc.xml → KARNATAKA-iso19110.xml} +0 -0
  181. data/spec/fixtures/yn236mw3250/temp/{TAMILNADU-iso19139-fc.xml → TAMILNADU-iso19110.xml} +0 -0
  182. data/spec/fixtures/yz596nz0112/temp/{WEST_BENGAL-iso19139-fc.xml → WEST_BENGAL-iso19110.xml} +0 -0
  183. data/spec/fixtures/zk596gy7380/temp/{DISTRICT1971-iso19139-fc.xml → DISTRICT1971-iso19110.xml} +0 -0
  184. data/spec/fixtures/zn452hh7431/temp/{RAJASTHAN-iso19139-fc.xml → RAJASTHAN-iso19110.xml} +0 -0
  185. data/spec/fixtures/zt093fw6519/temp/{MIZORAM-iso19139-fc.xml → MIZORAM-iso19110.xml} +0 -0
  186. data/spec/fixtures/zv925hd6723/temp/{OGWELLS-iso19139-fc.xml → OGWELLS-iso19110.xml} +0 -0
  187. data/spec/fixtures/zy658cr1728/temp/{ANDAMAAN_NICOBAR_PT-iso19139-fc.xml → ANDAMAAN_NICOBAR_PT-iso19110.xml} +0 -0
  188. data/spec/fixtures/zz943vx1492/temp/{BASINS-iso19139-fc.xml → BASINS-iso19110.xml} +0 -0
  189. data/spec/unit/gazetteer_spec.rb +100 -35
  190. data/spec/unit/task_spec.rb +68 -0
  191. data/spec/unit/transform_spec.rb +1 -1
  192. data/spec/unit/utils_spec.rb +17 -3
  193. data/workflow.rb +35 -0
  194. metadata +323 -316
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 791c5435960dcfb0c1b45f7bd32233394e4f4c6e
4
+ data.tar.gz: 98a8dec448332e6490a0994c6abc1f22d15f14dc
5
+ SHA512:
6
+ metadata.gz: 5f53913b4b7737e32657e5bd344ebc92a03ecc963f94b321084e260ce1bce2411e36c32ff1334ebbfff057cc953c02946e175562eb285b8f429f4e2ef7da278f
7
+ data.tar.gz: 6d507f147a45895a0d152ffd16c2c62afb5afc7bbe2c52b73abc5a93c3bc987f466cf53d48b090b42ca05b2d8373d8c46c9dc3e67e91c625e9a1b9dea950459e
data/.gitignore CHANGED
@@ -20,4 +20,5 @@ test/tmp
20
20
  test/version_tmp
21
21
  tmp
22
22
  _yardoc
23
- lib/ArcGIS2ISO19139.xsl
23
+ lib/ArcGIS*.xsl
24
+ lib/saxon*.jar
@@ -2,6 +2,5 @@ notifications:
2
2
  email: false
3
3
 
4
4
  rvm:
5
- - 1.8.7
6
5
  - 1.9.3
7
- - 2.0.0
6
+ - 2.0.0
data/Gemfile CHANGED
@@ -2,14 +2,7 @@ source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
4
 
5
- # Hosted on github
6
- group :github do
7
- gem 'dor-services', :git => 'https://github.com/sul-dlss/dor-services.git', :branch => 'develop'
8
- gem 'rgeoserver', :git => 'https://github.com/sul-dlss/rgeoserver.git'
9
- gem 'version_bumper', :git => 'https://github.com/jondot/version_bumper.git'
10
- end
11
-
12
5
  # Stanford only
13
6
  group :stanford do
14
- gem 'lyber-utils', :git => 'corn.stanford.edu:/afs/ir/dev/dlss/git/lyberteam/lyber-utils.git', :branch => 'master'
7
+ gem 'lyber-utils', :git => 'corn.stanford.edu:/afs/ir/dev/dlss/git/lyberteam/lyber-utils.git'
15
8
  end
@@ -1,7 +1,6 @@
1
1
  GIT
2
2
  remote: corn.stanford.edu:/afs/ir/dev/dlss/git/lyberteam/lyber-utils.git
3
3
  revision: fcc3bcbe56a6b3cee14321464b4cc8e5b3b18903
4
- branch: master
5
4
  specs:
6
5
  lyber-utils (0.1.2)
7
6
  bagit (>= 0.1.0)
@@ -9,78 +8,27 @@ GIT
9
8
  systemu (>= 1.2.0)
10
9
  validatable
11
10
 
12
- GIT
13
- remote: https://github.com/jondot/version_bumper.git
14
- revision: 250977316e3bf2079f1a660e03e28ee98256ddc0
15
- specs:
16
- version_bumper (0.4.1.pre1)
17
-
18
- GIT
19
- remote: https://github.com/sul-dlss/dor-services.git
20
- revision: 44054bc8523141d324ab06cc1475a20c2bba33df
21
- branch: develop
22
- specs:
23
- dor-services (4.4.13)
24
- active-fedora (~> 5.6, >= 5.6.3)
25
- activesupport
26
- confstruct (>= 0.2.2)
27
- dor-workflow-service (~> 1.4)
28
- druid-tools (>= 0.3.0)
29
- equivalent-xml (>= 0.2.2)
30
- json
31
- lyber-utils
32
- moab-versioning (= 1.3.1)
33
- net-sftp
34
- net-ssh
35
- nokogiri (>= 1.6.0)
36
- om
37
- progressbar
38
- rdf (= 1.0.10.2)
39
- rest-client
40
- rsolr-ext
41
- ruby-cache
42
- ruby-graphviz
43
- solrizer (~> 2.0)
44
- stanford-mods (>= 0.0.14)
45
- systemu
46
- uuidtools
47
- validatable
48
-
49
- GIT
50
- remote: https://github.com/sul-dlss/rgeoserver.git
51
- revision: 487f866115a213c4b10f3c133c48d1d9e4a0b585
52
- specs:
53
- rgeoserver (0.7)
54
- activemodel (~> 3.2.0)
55
- activesupport (~> 3.2.0)
56
- confstruct (~> 0.2.0)
57
- mime-types (~> 2.0)
58
- nokogiri (~> 1.6.0)
59
- rest-client (~> 1.6.0)
60
- rgeo (~> 0.3.0)
61
- rgeo-shapefile (~> 0.2.0)
62
- rubyzip (~> 0.9.0)
63
-
64
11
  PATH
65
12
  remote: .
66
13
  specs:
67
- geohydra (0.3.1)
14
+ geohydra (0.3.3)
68
15
  activerecord (~> 3.2.0)
69
16
  activerecord-postgresql-adapter (~> 0.0.1)
70
17
  activesupport (~> 3.2.0)
18
+ addressable (= 2.3.5)
71
19
  assembly-objectfile (~> 1.6.2)
72
20
  awesome_print (~> 1.2.0)
73
21
  confstruct (~> 0.2.5)
74
- dor-services (~> 4.4.5)
22
+ dor-services (~> 4.5)
75
23
  druid-tools (~> 0.2)
76
24
  fastimage (~> 1.5.4)
77
25
  json (~> 1.8.1)
78
- mods (~> 0.0.22)
26
+ mods (~> 0.0.23)
79
27
  nokogiri (~> 1.6.0)
80
28
  rest-client (~> 1.6.7)
81
29
  rgeo (~> 0.3.20)
82
30
  rgeo-shapefile (~> 0.2.3)
83
- rgeoserver (~> 0.7.0)
31
+ rgeoserver (~> 0.7)
84
32
  rsolr (~> 1.0.9)
85
33
 
86
34
  GEM
@@ -99,25 +47,25 @@ GEM
99
47
  rsolr
100
48
  rubydora (~> 1.6)
101
49
  solrizer (~> 2.1)
102
- activemodel (3.2.16)
103
- activesupport (= 3.2.16)
50
+ activemodel (3.2.17)
51
+ activesupport (= 3.2.17)
104
52
  builder (~> 3.0.0)
105
- activerecord (3.2.16)
106
- activemodel (= 3.2.16)
107
- activesupport (= 3.2.16)
53
+ activerecord (3.2.17)
54
+ activemodel (= 3.2.17)
55
+ activesupport (= 3.2.17)
108
56
  arel (~> 3.0.2)
109
57
  tzinfo (~> 0.3.29)
110
58
  activerecord-postgresql-adapter (0.0.1)
111
59
  pg
112
- activeresource (3.2.16)
113
- activemodel (= 3.2.16)
114
- activesupport (= 3.2.16)
115
- activesupport (3.2.16)
60
+ activeresource (3.2.17)
61
+ activemodel (= 3.2.17)
62
+ activesupport (= 3.2.17)
63
+ activesupport (3.2.17)
116
64
  i18n (~> 0.6, >= 0.6.4)
117
65
  multi_json (~> 1.0)
118
66
  addressable (2.3.5)
119
67
  arel (3.0.3)
120
- assembly-objectfile (1.6.2)
68
+ assembly-objectfile (1.6.4)
121
69
  mime-types
122
70
  mini_exiftool
123
71
  nokogiri
@@ -127,38 +75,65 @@ GEM
127
75
  validatable (~> 1.6)
128
76
  builder (3.0.4)
129
77
  coderay (1.1.0)
130
- confstruct (0.2.5)
78
+ confstruct (0.2.7)
131
79
  daemons (1.1.9)
132
80
  dbf (2.0.7)
133
81
  fastercsv (~> 1.5.4)
134
- deprecation (0.0.5)
82
+ deprecation (0.1.0)
135
83
  activesupport
136
84
  diff-lcs (1.2.5)
137
85
  docopt (0.5.0)
138
- dor-workflow-service (1.4.1)
139
- activesupport
140
- confstruct
141
- nokogiri
142
- rest-client
86
+ dor-services (4.6.5)
87
+ active-fedora (~> 5.7.1)
88
+ activesupport (~> 3.2.16)
89
+ confstruct (~> 0.2.2)
90
+ dor-workflow-service (~> 1.5)
91
+ druid-tools (~> 0.3.0)
92
+ equivalent-xml (~> 0.2.2)
93
+ json (~> 1.8.1)
94
+ lyber-utils (~> 0.1.2)
95
+ moab-versioning (= 1.3.1)
96
+ net-sftp (~> 2.1.2)
97
+ net-ssh (~> 2.7.0)
98
+ nokogiri (= 1.6.0)
99
+ om (~> 1.8.0)
100
+ progressbar (~> 0.21.0)
101
+ rdf (~> 1.0.9.0)
102
+ rest-client (~> 1.6.7)
103
+ rsolr-ext (~> 1.0.3)
104
+ ruby-cache (~> 0.3.0)
105
+ ruby-graphviz (~> 1.0.9)
106
+ rubydora (~> 1.6.5)
107
+ solrizer (~> 2.0)
108
+ stanford-mods (~> 0.0.14)
109
+ systemu (~> 2.6.0)
110
+ uuidtools (~> 2.1.4)
111
+ validatable (~> 1.6.7)
112
+ dor-workflow-service (1.6.2)
113
+ activesupport (~> 3.2)
114
+ confstruct (~> 0.2.7)
115
+ nokogiri (~> 1.6.0)
116
+ rest-client (~> 1.6.7)
143
117
  druid-tools (0.3.0)
144
- equivalent-xml (0.4.0)
118
+ equivalent-xml (0.2.9)
145
119
  nokogiri (>= 1.4.3)
146
120
  fastercsv (1.5.5)
147
- fastimage (1.5.4)
121
+ fastimage (1.5.5)
148
122
  addressable (~> 2.3, >= 2.3.5)
149
123
  happymapper (0.4.1)
150
124
  libxml-ruby (~> 2.0)
151
125
  hashery (2.1.1)
152
- hooks (0.3.3)
126
+ hooks (0.3.6)
127
+ uber (~> 0.0.4)
153
128
  i18n (0.6.9)
154
129
  iso-639 (0.2.4)
155
130
  json (1.8.1)
156
131
  libxml-ruby (2.7.0)
157
132
  mediashelf-loggable (0.4.9)
158
133
  method_source (0.8.2)
159
- mime-types (2.0)
160
- mini_exiftool (2.3.0)
161
- mini_portile (0.5.2)
134
+ mime-types (2.2)
135
+ mini_exiftool (2.4.1)
136
+ mini_portile (0.5.3)
162
137
  moab-versioning (1.3.1)
163
138
  confstruct
164
139
  happymapper
@@ -166,15 +141,15 @@ GEM
166
141
  json
167
142
  nokogiri
168
143
  systemu
169
- mods (0.0.22)
144
+ mods (0.0.23)
170
145
  iso-639
171
146
  nokogiri
172
147
  nom-xml
173
- multi_json (1.8.2)
148
+ multi_json (1.9.3)
174
149
  net-sftp (2.1.2)
175
150
  net-ssh (>= 2.6.5)
176
151
  net-ssh (2.7.0)
177
- nokogiri (1.6.1)
152
+ nokogiri (1.6.0)
178
153
  mini_portile (~> 0.5.0)
179
154
  nom-xml (0.5.1)
180
155
  activesupport
@@ -186,14 +161,14 @@ GEM
186
161
  deprecation
187
162
  mediashelf-loggable
188
163
  nokogiri (>= 1.4.2)
189
- pg (0.17.0)
164
+ pg (0.17.1)
190
165
  progressbar (0.21.0)
191
- pry (0.9.12.4)
166
+ pry (0.9.12.6)
192
167
  coderay (~> 1.0)
193
168
  method_source (~> 0.8)
194
169
  slop (~> 3.4)
195
- rake (10.1.0)
196
- rdf (1.0.10.2)
170
+ rake (10.3.1)
171
+ rdf (1.0.9)
197
172
  addressable (>= 2.3)
198
173
  rdf-rdfxml (0.3.9)
199
174
  rdf (>= 0.3.11)
@@ -201,16 +176,26 @@ GEM
201
176
  rdf-xsd (1.0.2.1)
202
177
  nokogiri (>= 1.5.0)
203
178
  rdf (>= 0.3.4)
204
- rdoc (4.0.1)
179
+ rdoc (4.1.1)
205
180
  json (~> 1.4)
206
- redcarpet (3.0.0)
181
+ redcarpet (3.1.1)
207
182
  rest-client (1.6.7)
208
183
  mime-types (>= 1.16)
209
184
  rgeo (0.3.20)
210
185
  rgeo-shapefile (0.2.3)
211
186
  dbf (>= 1.7.0)
212
187
  rgeo (>= 0.3.3)
213
- rsolr (1.0.9)
188
+ rgeoserver (0.7.1)
189
+ activemodel (~> 3.2.0)
190
+ activesupport (~> 3.2.0)
191
+ confstruct (~> 0.2.0)
192
+ mime-types (~> 2.0)
193
+ nokogiri (~> 1.6.0)
194
+ rest-client (~> 1.6.0)
195
+ rgeo (~> 0.3.0)
196
+ rgeo-shapefile (~> 0.2.0)
197
+ rubyzip (~> 0.9.0)
198
+ rsolr (1.0.10)
214
199
  builder (>= 2.1.2)
215
200
  rsolr-ext (1.0.3)
216
201
  rsolr (>= 1.0.2)
@@ -218,10 +203,10 @@ GEM
218
203
  rspec-core (~> 2.14.0)
219
204
  rspec-expectations (~> 2.14.0)
220
205
  rspec-mocks (~> 2.14.0)
221
- rspec-core (2.14.7)
222
- rspec-expectations (2.14.4)
206
+ rspec-core (2.14.8)
207
+ rspec-expectations (2.14.5)
223
208
  diff-lcs (>= 1.1.3, < 2.0)
224
- rspec-mocks (2.14.4)
209
+ rspec-mocks (2.14.6)
225
210
  ruby-cache (0.3.0)
226
211
  ruby-graphviz (1.0.9)
227
212
  rubydora (1.6.5)
@@ -235,7 +220,7 @@ GEM
235
220
  nokogiri
236
221
  rest-client
237
222
  rubyzip (0.9.9)
238
- slop (3.4.7)
223
+ slop (3.5.0)
239
224
  solrizer (2.2.0)
240
225
  activesupport
241
226
  daemons
@@ -244,21 +229,22 @@ GEM
244
229
  om (>= 1.5.0)
245
230
  stomp
246
231
  xml-simple
247
- stanford-mods (0.0.22)
232
+ stanford-mods (0.0.24)
248
233
  mods
249
234
  stomp (1.3.2)
250
- systemu (2.6.0)
251
- tzinfo (0.3.38)
235
+ systemu (2.6.4)
236
+ tzinfo (0.3.39)
237
+ uber (0.0.4)
252
238
  uuidtools (2.1.4)
253
239
  validatable (1.6.7)
254
- xml-simple (1.1.2)
255
- yard (0.8.7.3)
240
+ version_bumper (0.3.0)
241
+ xml-simple (1.1.3)
242
+ yard (0.8.7.4)
256
243
 
257
244
  PLATFORMS
258
245
  ruby
259
246
 
260
247
  DEPENDENCIES
261
- dor-services!
262
248
  equivalent-xml
263
249
  geohydra!
264
250
  lyber-utils!
@@ -266,7 +252,6 @@ DEPENDENCIES
266
252
  rake
267
253
  rdoc
268
254
  redcarpet
269
- rgeoserver!
270
255
  rspec
271
- version_bumper!
256
+ version_bumper
272
257
  yard
data/README.md CHANGED
@@ -135,7 +135,7 @@ is *pre-stage*:
135
135
 
136
136
  The `geoOptions.json` contain meta-metadata about the package, including the
137
137
  druid, geometry type, and filename. These files can be generated using
138
- bin/build_stage_options.rb but it requires manual supervision.
138
+ `bin/build_stage_options.rb` but it requires manual supervision.
139
139
 
140
140
  { "druid":"cg716wc7949",
141
141
  "geometryType":"Raster",
@@ -152,7 +152,7 @@ Once staged, the data look like this:
152
152
  preview.jpg
153
153
  temp/
154
154
  geoOptions.json
155
- OGWELLS-iso19139-fc.xml
155
+ OGWELLS-iso19110.xml
156
156
  OGWELLS-iso19139.xml
157
157
 
158
158
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.1
1
+ 0.3.3
@@ -7,103 +7,113 @@ require 'druid-tools'
7
7
 
8
8
  VERSION = '0.3'
9
9
 
10
- # __MAIN__
11
- begin
12
- File.umask(002)
13
- flags = {
14
- :admin_policy => 'druid:gz830zp4734',
15
- :rights => 'stanford',
16
- :tags => [
17
- "Registered By : #{%x{whoami}.strip} (GeoHydra)"
18
- ],
19
- :tmpdir => GeoHydra::Config.geohydra.tmpdir || 'tmp',
20
- :verbose => false,
21
- :configtest => false,
22
- :purge => false,
23
- :accessionWF => false,
24
- :contentMetadata => true,
25
- :debug => false,
26
- :shelve => false,
27
- :workspacedir => GeoHydra::Config.geohydra.workspace || 'workspace'
28
- }
10
+ class Accession < GeoHydra::Process
11
+ def run(args)
12
+ begin
13
+ File.umask(002)
14
+ flags = {
15
+ :admin_policy => 'druid:gz830zp4734',
16
+ :rights => 'stanford',
17
+ :tags => [
18
+ "Registered By : #{%x{whoami}.strip} (GeoHydra)"
19
+ ],
20
+ :tmpdir => GeoHydra::Config.geohydra.tmpdir || 'tmp',
21
+ :verbose => false,
22
+ :configtest => false,
23
+ :purge => false,
24
+ :accessionWF => false,
25
+ :contentMetadata => true,
26
+ :debug => false,
27
+ :shelve => false,
28
+ :dryrun => false,
29
+ :workspacedir => GeoHydra::Config.geohydra.workspace || 'workspace'
30
+ }
29
31
 
30
- OptionParser.new do |opts|
31
- opts.version = VERSION
32
- opts.banner = <<EOM
33
- Usage: #{File.basename(__FILE__)} [options] [druid [druid...]]
34
- #{File.basename(__FILE__)} [options] < druids
32
+ OptionParser.new do |opts|
33
+ opts.version = VERSION
34
+ opts.banner = <<EOM
35
+ Usage: #{File.basename(__FILE__)} [options] [druid [druid...]]
36
+ #{File.basename(__FILE__)} [options] < druids
35
37
  EOM
36
- opts.on('--apo DRUID', 'APO for collection to accession' + (flags[:admin_policy] ? " (default: #{flags[:admin_policy]})" : '')) do |druid|
37
- flags[:admin_policy] = DruidTools::Druid.new(druid).druid
38
- end
39
- opts.on('--collection DRUID', 'Collection for accession' + (flags[:collection] ? " (default: #{flags[:collection]})" : '')) do |druid|
40
- flags[:collection] = DruidTools::Druid.new(druid).druid
41
- end
42
- opts.on('--purge', 'Purge items before accessioning') do |b|
43
- flags[:purge] = true
44
- end
45
- opts.on('--accessionWF', 'Kick off the accessionWF workflow') do |b|
46
- flags[:accessionWF] = true
47
- end
48
- opts.on('--rights KEYWORD', "Rights keyword (default: #{flags[:rights]})") do |keyword|
49
- flags[:rights] = keyword
50
- end
51
- opts.on('--tag TAG', 'Tag for each object - multiple tags allowed') do |tag|
52
- flags[:tags] << tag
53
- end
54
- opts.on('--test', 'Verify configuration then exit') do
55
- flags[:configtest] = true
56
- end
57
- opts.on('--tmpdir DIR', "Temporary directory for assembly (default: #{flags[:tmpdir]})") do |d|
58
- flags[:tmpdir] = d
59
- end
60
- opts.on('-v', '--verbose', 'Run verbosely, use multiple times for debug level output') do
61
- flags[:debug] = true if flags[:verbose] # -vv
62
- flags[:verbose] = true
63
- end
64
- opts.on('--workspace DIR', "Workspace directory for assembly (default: #{flags[:workspacedir]})") do |d|
65
- flags[:workspacedir] = d
66
- end
67
- end.parse!
38
+ opts.on('--apo DRUID', 'APO for collection to accession' + (flags[:admin_policy] ? " (default: #{flags[:admin_policy]})" : '')) do |druid|
39
+ flags[:admin_policy] = DruidTools::Druid.new(druid).druid
40
+ end
41
+ opts.on('--collection DRUID', 'Collection for accession' + (flags[:collection] ? " (default: #{flags[:collection]})" : '')) do |druid|
42
+ flags[:collection] = DruidTools::Druid.new(druid).druid
43
+ end
44
+ opts.on('--purge', 'Purge items before accessioning') do |b|
45
+ flags[:purge] = true
46
+ end
47
+ opts.on('--accessionWF', 'Kick off the accessionWF workflow') do |b|
48
+ flags[:accessionWF] = true
49
+ end
50
+ opts.on('--rights KEYWORD', "Rights keyword (default: #{flags[:rights]})") do |keyword|
51
+ flags[:rights] = keyword
52
+ end
53
+ opts.on('--tag TAG', 'Tag for each object - multiple tags allowed') do |tag|
54
+ flags[:tags] << tag
55
+ end
56
+ opts.on('--test', 'Verify configuration then exit') do
57
+ flags[:configtest] = true
58
+ end
59
+ opts.on('--dryrun', 'Do not save objects') do
60
+ flags[:dryrun] = true
61
+ end
62
+ opts.on('--tmpdir DIR', "Temporary directory for assembly (default: #{flags[:tmpdir]})") do |d|
63
+ flags[:tmpdir] = d
64
+ end
65
+ opts.on('-v', '--verbose', 'Run verbosely, use multiple times for debug level output') do
66
+ flags[:debug] = true if flags[:verbose] # -vv
67
+ flags[:verbose] = true
68
+ end
69
+ opts.on('--workspace DIR', "Workspace directory for assembly (default: #{flags[:workspacedir]})") do |d|
70
+ flags[:workspacedir] = d
71
+ end
72
+ end.parse!(args)
68
73
 
69
- [flags[:tmpdir], flags[:workspacedir]].each do |d|
70
- raise ArgumentError, "Missing directory #{d}" unless File.directory? d
71
- end
74
+ [flags[:tmpdir], flags[:workspacedir]].each do |d|
75
+ raise ArgumentError, "Missing directory #{d}" unless File.directory? d
76
+ end
72
77
 
73
- ap({:flags => flags}) if flags[:debug]
78
+ ap({:flags => flags}) if flags[:debug]
74
79
 
75
- # Verify configuation
76
- if flags[:configtest]
77
- errs = 0
78
- %w{workflow.url fedora.safeurl solrizer.url ssl.cert_file ssl.key_pass dor.service_root}.each do |k|
79
- begin
80
- k = "Dor::Config.#{k}"
81
- if eval(k).nil?
82
- $stderr.puts "ERROR: Configuration requires #{k}"
83
- errs += 1
80
+ # Verify configuation
81
+ if flags[:configtest]
82
+ errs = 0
83
+ %w{workflow.url fedora.safeurl solrizer.url ssl.cert_file ssl.key_pass dor.service_root}.each do |k|
84
+ begin
85
+ k = "Dor::Config.#{k}"
86
+ if eval(k).nil?
87
+ $stderr.puts "ERROR: Configuration requires #{k}"
88
+ errs += 1
89
+ end
90
+ rescue Exception => e
91
+ $stderr.puts e, e.backtrace
92
+ end
84
93
  end
85
- rescue Exception => e
86
- $stderr.puts e, e.backtrace
94
+ puts "Configuration OK" if errs == 0
95
+ exit errs
87
96
  end
88
- end
89
- puts "Configuration OK" if errs == 0
90
- exit errs
91
- end
92
97
 
93
- if ARGV.empty?
94
- STDIN.each do |line|
95
- pid = line.strip
96
- druid = DruidTools::Druid.new(pid, flags[:workspacedir])
97
- GeoHydra::Accession.run(druid, flags)
98
- end
99
- else
100
- ARGV.each do |pid|
101
- druid = DruidTools::Druid.new(pid, flags[:workspacedir])
102
- GeoHydra::Accession.run(druid, flags)
98
+ if args.empty?
99
+ STDIN.each do |line|
100
+ pid = line.strip
101
+ druid = DruidTools::Druid.new(pid, flags[:workspacedir])
102
+ GeoHydra::Accession.run(druid, flags)
103
+ end
104
+ else
105
+ args.each do |pid|
106
+ druid = DruidTools::Druid.new(pid, flags[:workspacedir])
107
+ GeoHydra::Accession.run(druid, flags)
108
+ end
109
+ end
110
+ rescue SystemCallError => e
111
+ $stderr.puts "ERROR: #{e.message}"
112
+ $stderr.puts e.backtrace
113
+ exit(-1)
103
114
  end
104
115
  end
105
- rescue SystemCallError => e
106
- $stderr.puts "ERROR: #{e.message}"
107
- $stderr.puts e.backtrace
108
- exit(-1)
109
116
  end
117
+
118
+ # __MAIN__
119
+ Accession.new.run(ARGV)