cul_scv_hydra 0.22.4 → 0.22.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0456606d41eceb5a2834e43fc5c24a2ee0b03992
|
4
|
+
data.tar.gz: 6885595ffe4cbad3e6b3220f9c8044e5d026a1f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bbecbed565f8eba222635461e0d95c29c8d9574d7f6253357d8983794a85001884c76b20fdf2ee278f75ce7ca3441a8da0f8c4da0864a71d3811865ce6c96916
|
7
|
+
data.tar.gz: a410c15c58a474dea420c940c9e5e5d1235f76f0ef5ec5107d2c12bf4462eee379a9b20202f651153fadb8a011867eb0a56f1a1a58c1f7a6c6142de62ab93aaf
|
@@ -277,6 +277,17 @@ module Cul::Scv::Hydra::Solrizer
|
|
277
277
|
return (places_without_uri.length > 0 ? places_without_uri : places_with_uri)
|
278
278
|
end
|
279
279
|
|
280
|
+
def coordinates(node=mods)
|
281
|
+
coordinate_values = []
|
282
|
+
node.xpath("./mods:subject/mods:cartographics/mods:coordinates", MODS_NS).collect do |n|
|
283
|
+
n = ScvModsFieldable.normalize(n.text, true)
|
284
|
+
if n.match(/-*\d+\.\d+\s*,\s*-*\d+\.\d+\s*/) # Expected coordinate format: 40.123456,-73.5678
|
285
|
+
coordinate_values << n
|
286
|
+
end
|
287
|
+
end
|
288
|
+
coordinate_values
|
289
|
+
end
|
290
|
+
|
280
291
|
def to_solr(solr_doc={})
|
281
292
|
solr_doc = (defined? super) ? super : solr_doc
|
282
293
|
|
@@ -375,6 +386,9 @@ module Cul::Scv::Hydra::Solrizer
|
|
375
386
|
end
|
376
387
|
end
|
377
388
|
|
389
|
+
# Geo data
|
390
|
+
solr_doc["geo"] = coordinates
|
391
|
+
|
378
392
|
solr_doc.each do |k, v|
|
379
393
|
if self.class.maps_field? k
|
380
394
|
solr_doc[k] = self.class.map_value(k, v)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cul_scv_hydra
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.22.
|
4
|
+
version: 0.22.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Benjamin Armintor
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-03-
|
12
|
+
date: 2015-03-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: blacklight
|