discovery-indexer 2.0.0 → 3.0.0.pre1

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: 6cda10dff64c547a94d5623b8d4eb99adc38fe55
4
- data.tar.gz: 03f8ab54ee1cb990d54260f1d883b92869cc5d82
3
+ metadata.gz: 6e2e123f1f3def94b95e416eb2fe305240685a75
4
+ data.tar.gz: aa4d1a84a9448d6c4b1248d68232b241c5977c35
5
5
  SHA512:
6
- metadata.gz: d0ad8a756ae0904c5a9d61426a93895cbf1af6d46d4f61b36ff1ba94cf4beae0b671dcbe7e2c6ff419a811c3e71462f09db20e504e4949ee1da1075f8a16c1e4
7
- data.tar.gz: b1c95061edb64ce7d585f583a3c932d0fc4fd220c591152decdb908ce8b1e40e9d0915cfb13ab0eaa9ab26061038b177f355fb37242700628d4e098b9ea6edf1
6
+ metadata.gz: efde021502c47e4ffef5f719552dd6629fe0486f2a25205a95396376c17c1bdc8af77575d6fda350a29a13c6aac3a4a2a9d298ddec9fdb50fb2aec9b93f90bae
7
+ data.tar.gz: 39b8352ef4fd38f95ff7f5e63bd426ca282d6a1b0a0cbf6123c47e5ed514cc2964e1d4dddaa3c78b2410df0194a07c6a218af25b1f3488f0c5331fdce3f14e78
@@ -45,43 +45,34 @@ module DiscoveryIndexer
45
45
 
46
46
  # extracts the identityMetadata for this fedora object, from the purl xml
47
47
  # @return [Nokogiri::XML::Document] the identityMetadata for the fedora object
48
- # @raise [DiscoveryIndexer::Errors::MissingIdentityMetadata] if there is no identity_metadata
49
48
  def parse_identity_metadata
50
49
  @idmd_ng_doc ||= Nokogiri::XML(@purlxml_ng_doc.root.xpath('/publicObject/identityMetadata').to_xml)
51
- fail DiscoveryIndexer::Errors::MissingIdentityMetadata.new(@purlxml_ng_doc.inspect) if !@idmd_ng_doc || @idmd_ng_doc.children.empty?
50
+ @idmd_ng_doc = nil if !@idmd_ng_doc || @idmd_ng_doc.children.empty?
52
51
  @idmd_ng_doc
53
- rescue
54
- raise DiscoveryIndexer::Errors::MissingIdentityMetadata.new(@purlxml_ng_doc.inspect)
55
52
  end
56
53
 
54
+ # extracts the rightsMetadata for this fedora object, from the purl xml
55
+ # @return [Nokogiri::XML::Document] the rightsMetadata for the fedora object or nil
57
56
  def parse_rights_metadata
58
57
  @rmd_ng_doc ||= Nokogiri::XML(@purlxml_ng_doc.root.xpath('/publicObject/rightsMetadata').to_xml)
59
- fail DiscoveryIndexer::Errors::MissingRightsMetadata.new(@purlxml_ng_doc.inspect) if !@rmd_ng_doc || @rmd_ng_doc.children.empty?
58
+ @rmd_ng_doc = nil if !@rmd_ng_doc || @rmd_ng_doc.children.empty?
60
59
  @rmd_ng_doc
61
- rescue
62
- raise DiscoveryIndexer::Errors::MissingRightsMetadata.new(@purlxml_ng_doc.inspect)
63
60
  end
64
61
 
65
62
  # extracts the dc field for this fedora object, from the purl xml
66
- # @return [Nokogiri::XML::Document] the dc for the fedora object
67
- # @raise [DiscoveryIndexer::Errors::MissingDC] if there is no dc element
63
+ # @return [Nokogiri::XML::Document] the dc for the fedora object or nil
68
64
  def parse_dc
69
65
  @dc_ng_doc ||= Nokogiri::XML(@purlxml_ng_doc.root.xpath('/publicObject/dc:dc', 'dc' => OAI_DC_NAMESPACE).to_xml(encoding: 'utf-8'))
70
- fail DiscoveryIndexer::Errors::MissingDC.new(@purlxml_ng_doc.inspect) if !@dc_ng_doc || @dc_ng_doc.children.empty?
66
+ @dc_ng_doc = nil if !@dc_ng_doc || @dc_ng_doc.children.empty?
71
67
  @dc_ng_doc
72
- rescue
73
- raise DiscoveryIndexer::Errors::MissingDC.new(@purlxml_ng_doc.inspect)
74
68
  end
75
69
 
76
70
  # extracts the rdf field for this fedora object, from the purl xml
77
- # @return [Nokogiri::XML::Document] the rdf for the fedora object
78
- # @raise [DiscoveryIndexer::Errors::MissingRDF] if there is no rdf element
71
+ # @return [Nokogiri::XML::Document] the rdf for the fedora object or nil
79
72
  def parse_rdf
80
73
  @rdf_ng_doc ||= Nokogiri::XML(@purlxml_ng_doc.root.xpath('/publicObject/rdf:RDF', 'rdf' => RDF_NAMESPACE).to_xml)
81
- fail DiscoveryIndexer::Errors::MissingRDF.new(@purlxml_ng_doc.inspect) if !@rdf_ng_doc || @rdf_ng_doc.children.empty?
74
+ @rdf_ng_doc = nil if !@rdf_ng_doc || @rdf_ng_doc.children.empty?
82
75
  @rdf_ng_doc
83
- rescue
84
- raise DiscoveryIndexer::Errors::MissingRDF.new(@purlxml_ng_doc.inspect)
85
76
  end
86
77
 
87
78
  # extracts the release tag element for this fedora object, from the the ReleaseData element in purl xml
@@ -1,3 +1,3 @@
1
1
  module DiscoveryIndexer
2
- VERSION = '2.0.0'
2
+ VERSION = '3.0.0.pre1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: discovery-indexer
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 3.0.0.pre1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ahmed AlSum
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-02-29 00:00:00.000000000 Z
12
+ date: 2016-09-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri
@@ -227,14 +227,13 @@ required_ruby_version: !ruby/object:Gem::Requirement
227
227
  version: '0'
228
228
  required_rubygems_version: !ruby/object:Gem::Requirement
229
229
  requirements:
230
- - - ">="
230
+ - - ">"
231
231
  - !ruby/object:Gem::Version
232
- version: '0'
232
+ version: 1.3.1
233
233
  requirements: []
234
234
  rubyforge_project:
235
- rubygems_version: 2.4.8
235
+ rubygems_version: 2.5.1
236
236
  signing_key:
237
237
  specification_version: 4
238
238
  summary: Shared library for the basic discovery indexing operation for Stanford DLSS.
239
239
  test_files: []
240
- has_rdoc: