cul_hydra 1.4.5 → 1.4.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dcda7a0da76912ed7cb8076e50676d89227bf760
4
- data.tar.gz: bab55b31de7128a4f10611cdda2d1504c8a6e298
3
+ metadata.gz: 225212af7188371eed6558cde38b9aaf9fa04058
4
+ data.tar.gz: 7c3130062263f2cc12afab038555ccbb3d2b0d99
5
5
  SHA512:
6
- metadata.gz: 401b8f79ba092a3fa0d4b835af8a3cf77a7dc794e7b16f5cd1dce4ec10f6357d2577d4e985214cfb4d6c537b62a15784871303fca891eec5a43c8bf646d02415
7
- data.tar.gz: 34c5ac78e8e86dd4aa390a7665098c024b6a8d739cfb4915f8ccdee91cad3e317cc068f59f183c1655eed9f18081bfba5f4119c7670988bcbad7b92bfe28765e
6
+ metadata.gz: acbf773cdc59337476c1bf734ef5343f36a32706c54f554c6e1f51576056908317253af48abb1fe811ee09e0eeef8e24f20ca59609e197e735b9799e38f922d9
7
+ data.tar.gz: f1685bc15bae2cfb25512039a68914e4f3485cfd8bac8b13d42455f5ba99442906c079bd98159546a624164194e861033785dcaf9d29c8068a1d9a679ea7b6ea
@@ -94,6 +94,7 @@
94
94
  :pcdm_related_object_of: relatedObjectOf
95
95
  http://purl.org/ontology/bibo/:
96
96
  :short_title: shortTitle
97
+ :ezid_doi: doi
97
98
  http://www.bbc.co.uk/ontologies/coreconcepts/:
98
99
  :slug: slug
99
100
  https://schema.org/:
@@ -0,0 +1,14 @@
1
+
2
+ <mods:mods xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mods="http://www.loc.gov/mods/v3" version="3.6" xsi:schemaLocation="http://www.loc.gov/mods/v3 http://www.loc.gov/standards/mods/v3/mods-3-6.xsd">
3
+ <mods:titleInfo>
4
+ <mods:title>Esempio Lingua documento</mods:title>
5
+ </mods:titleInfo>
6
+ <mods:language>
7
+ <mods:languageTerm type="text" valueURI="http://id.loc.gov/vocabulary/iso639-2/ita" authority="iso639-2">Italian</mods:languageTerm>
8
+ <mods:languageTerm type="code" valueURI="http://id.loc.gov/vocabulary/iso639-2/ita" authority="iso639-2">ita</mods:languageTerm>
9
+ </mods:language>
10
+ <mods:language>
11
+ <mods:languageTerm type="text" valueURI="http://id.loc.gov/vocabulary/iso639-2/eng" authority="iso639-2b">English</mods:languageTerm>
12
+ <mods:languageTerm type="code" valueURI="http://id.loc.gov/vocabulary/iso639-2/eng" authority="iso639-2b">eng</mods:languageTerm>
13
+ </mods:language>
14
+ </mods:mods>
@@ -64,6 +64,18 @@ module Cul::Hydra::Solrizer
64
64
  ModsFieldable.normalize(main_title(p_node), true)
65
65
  end
66
66
  end
67
+
68
+ def languages_iso639_2_text
69
+ mods.xpath("./mods:language/mods:languageTerm[@type='text' and @authority='iso639-2']", MODS_NS).collect do |n|
70
+ ModsFieldable.normalize(n.text, true)
71
+ end
72
+ end
73
+
74
+ def languages_iso639_2_code
75
+ mods.xpath("./mods:language/mods:languageTerm[@type='code' and @authority='iso639-2']", MODS_NS).collect do |n|
76
+ ModsFieldable.normalize(n.text, true)
77
+ end
78
+ end
67
79
 
68
80
  def sort_title(node=mods)
69
81
  # include only the untyped [!@type] titleInfo, exclude noSort
@@ -471,6 +483,14 @@ module Cul::Hydra::Solrizer
471
483
 
472
484
  # Geo data
473
485
  solr_doc["geo"] = coordinates
486
+
487
+ ## Handle alternate form of language authority for language_language_term_text_ssim
488
+ ## We already capture elements when authority="iso639-2b", but we want to additionally
489
+ ## capture language elements when authority="iso639-2".
490
+ solr_doc['language_language_term_text_ssim'] ||= []
491
+ solr_doc['language_language_term_text_ssim'] += languages_iso639_2_text
492
+ solr_doc['language_language_term_code_ssim'] ||= []
493
+ solr_doc['language_language_term_code_ssim'] +=languages_iso639_2_code
474
494
 
475
495
  solr_doc.each do |k, v|
476
496
  if self.class.maps_field? k
@@ -1,6 +1,6 @@
1
1
  module Cul
2
2
  module Hydra
3
- VERSION = '1.4.5'
3
+ VERSION = '1.4.7'
4
4
  def self.version
5
5
  VERSION
6
6
  end
@@ -1,6 +1,6 @@
1
1
  module Cul
2
2
  module Hydra
3
- VERSION = '1.4.4'
3
+ VERSION = '1.4.6'
4
4
  def self.version
5
5
  VERSION
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cul_hydra
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.5
4
+ version: 1.4.7
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: 2016-12-06 00:00:00.000000000 Z
12
+ date: 2016-12-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: blacklight
@@ -193,6 +193,20 @@ dependencies:
193
193
  - - ">="
194
194
  - !ruby/object:Gem::Version
195
195
  version: 1.8.3
196
+ - !ruby/object:Gem::Dependency
197
+ name: rake
198
+ requirement: !ruby/object:Gem::Requirement
199
+ requirements:
200
+ - - "<="
201
+ - !ruby/object:Gem::Version
202
+ version: '11.3'
203
+ type: :runtime
204
+ prerelease: false
205
+ version_requirements: !ruby/object:Gem::Requirement
206
+ requirements:
207
+ - - "<="
208
+ - !ruby/object:Gem::Version
209
+ version: '11.3'
196
210
  - !ruby/object:Gem::Dependency
197
211
  name: cancancan
198
212
  requirement: !ruby/object:Gem::Requirement
@@ -468,6 +482,7 @@ files:
468
482
  - fixtures/spec/CUL_MODS/mods-dates-with-all-u-characters.xml
469
483
  - fixtures/spec/CUL_MODS/mods-dates-with-some-u-characters.xml
470
484
  - fixtures/spec/CUL_MODS/mods-item.xml
485
+ - fixtures/spec/CUL_MODS/mods-languages.xml
471
486
  - fixtures/spec/CUL_MODS/mods-names.xml
472
487
  - fixtures/spec/CUL_MODS/mods-notes.xml
473
488
  - fixtures/spec/CUL_MODS/mods-ns.xml