dor-services 5.17.2 → 5.17.3

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: 2234a9ff5b7764c9e97c23c8152b78bf88db5ff3
4
- data.tar.gz: 6845778c33f43081a8bbe3472553789a53d6691a
3
+ metadata.gz: 909b3c0e3cd70327c8c654a683fcff6104e65ccf
4
+ data.tar.gz: 16aec03de432570223cf31f8f70e24ae37323517
5
5
  SHA512:
6
- metadata.gz: c1eb99ae9d310d37b6f6c7997eb0715f08821b2d507c99a9ac0876f5be7e4f09457f884837261acd03ec5bd706bd50fdb2f1cad6c0140cb2843da57f54db95f5
7
- data.tar.gz: 664d9cc741815a78c6bbc8190c82e5a45e607c965c839914856f2f79b58a2a4f0fe7f9795f2b303df303fe1eed996b78668e198c75ff83e98d48f43e83f7f2ba
6
+ metadata.gz: 3ffec7bd43758242bd733c224e8da84cabd1ef97d5ace802602405cf89d11208d150ea206eb2767f637769bd4ebd780118d0d2301cd690ad0c3c3587543b7d54
7
+ data.tar.gz: 5e8ef10484c3df919d0a2a30d542697c1e0849ec9a8e4b9f68bb015b4bdaddac84e11a9c6ae54d3dbf85ddcd0fd0c7044d3b76f56db9f2d291a7d207be555924
@@ -67,8 +67,6 @@ module Dor
67
67
  if identityMetadata.otherId('catkey').first ||
68
68
  identityMetadata.otherId('barcode').first
69
69
  'Symphony'
70
- elsif identityMetadata.otherId('mdtoolkit').first
71
- 'Metadata Toolkit'
72
70
  else
73
71
  'DOR'
74
72
  end
@@ -8,7 +8,7 @@ module Dor
8
8
  # Compute the thumbnail for this object following the rules at https://consul.stanford.edu/display/chimera/The+Rules+of+Thumb
9
9
  # @return [String] the computed thumb filename, with the druid prefix and a slash in front of it, e.g. oo000oo0001/filenamewith space.jp2
10
10
  def thumb
11
- return if contentMetadata.nil?
11
+ return unless respond_to?(:contentMetadata) && !contentMetadata.nil?
12
12
  cm = contentMetadata.ng_xml
13
13
  mime_type_finder = "@mimetype='image/jp2' or @mimeType='image/jp2'" # allow the mimetype attribute to be lower or camelcase when searching to make it more robust
14
14
  thumb_image=nil
@@ -1,3 +1,3 @@
1
1
  module Dor
2
- VERSION = '5.17.2'.freeze
2
+ VERSION = '5.17.3'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dor-services
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.17.2
4
+ version: 5.17.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Klein
@@ -14,7 +14,7 @@ authors:
14
14
  autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
- date: 2016-11-18 00:00:00.000000000 Z
17
+ date: 2016-11-22 00:00:00.000000000 Z
18
18
  dependencies:
19
19
  - !ruby/object:Gem::Dependency
20
20
  name: active-fedora
@@ -642,7 +642,6 @@ files:
642
642
  - lib/dor/services/indexing_service.rb
643
643
  - lib/dor/services/merge_service.rb
644
644
  - lib/dor/services/metadata_handlers/catalog_handler.rb
645
- - lib/dor/services/metadata_handlers/mdtoolkit_handler.rb
646
645
  - lib/dor/services/metadata_service.rb
647
646
  - lib/dor/services/registration_service.rb
648
647
  - lib/dor/services/reset_workspace_service.rb
@@ -1,38 +0,0 @@
1
- require 'nokogiri'
2
- require 'rest-client'
3
-
4
- handler = Class.new do
5
- def fetch(prefix, identifier)
6
- query = <<-QUERY
7
- <?xml version="1.0" encoding="UTF-8"?>
8
- <query xmlns="http://exist.sourceforge.net/NS/exist">
9
- <text>
10
- collection('orbeon/fr')[contains(base-uri(), "#{identifier}")]
11
- </text>
12
- </query>
13
- QUERY
14
- client = RestClient::Resource.new(Dor::Config.metadata.exist.url)
15
- response = client['db'].post(query, :content_type => 'application/xquery')
16
- doc = Nokogiri::XML(response)
17
- doc.root.add_namespace_definition('exist', 'http://exist.sourceforge.net/NS/exist')
18
- result = doc.xpath('/exist:result/*[1]').first
19
- result.nil? ? nil : result.to_s
20
- end
21
-
22
- def label(metadata)
23
- xml = Nokogiri::XML(metadata)
24
- return '' if xml.root.nil?
25
- case xml.root.name
26
- when 'msDesc' then xml.xpath('/msDesc/msIdentifier/collection').text
27
- when 'mods' then
28
- xml.root.add_namespace_definition('mods', 'http://www.loc.gov/mods/v3')
29
- xml.xpath('/mods:mods/mods:titleInfo[1]').xpath('mods:title|mods:nonSort').collect { |n| n.text }.join(' ').strip
30
- end
31
- end
32
-
33
- def prefixes
34
- %w(mdtoolkit druid)
35
- end
36
- end
37
-
38
- Dor::MetadataService.register(handler)