cul_scv_hydra 0.16.5 → 0.16.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NGZlYjQ5NDJmY2M2Y2E0MTI2MzdkMzNhYTZlZTU0ZGFjYjM2ZTZiNA==
4
+ MjRhY2IxYTI1MWVkMjY2MzZlY2JlMDRiZjQ4Y2RlZmUxM2EwOTk5Yg==
5
5
  data.tar.gz: !binary |-
6
- OWUxYjU1YjA5OWZiMDRkZWYyNzZiOGRkMGFjMTFiNWZjNTFiYTE1Mw==
6
+ Nzc2MTRmZDczZmFkYmIyNDM2NzhjZmI3OTc0NDdhMjIxZmRmYWNkNg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZWVhMzEzYjU0ZmRjZGQ0MGU5ZTZhYjc1ZTE4ZDBlMmE2YWQ5NDdhZWVlZTc2
10
- Y2Y4MjJmZjkxZjBkNjJlMGIzMDdkYWU5MzczZjMzNTcyMzlkZjE1YTM0ZDUx
11
- MWEzZDg4MDU1NTQxNzlhMzJkNzI0ZjgyMmJlZTE0NzNkZmQ5MzQ=
9
+ NTliNTMwMjVmZGY0MTU0ZTBkZGNiYjhiMThhNTNkOTUzZTVmYjUwMzljYmYw
10
+ MTM1YzA5NTA1MWU0ZjVmY2RiNjVhYTAwOTczNmUxNzdmYWIyMjhjN2E0NTc3
11
+ ZDBlMmJjZjVjYjE5ZjFiYmE4NDU5NmI2ZmVkZGNmYTUyZjJiYTM=
12
12
  data.tar.gz: !binary |-
13
- MmUxNjQyNDA3YzJlNDZmMTI4NDNlZDUwMTEwODE1ODAzMDM0Y2E5NDQzNzcz
14
- ZWRmNWYwYWI1M2UxY2E1ZTE5ODYzZTBhYzY1NzZkZWVmM2UxOWQ5YmQwYTk0
15
- MGQxNzNhNTcwOTBmODU3MTFhYzM4NDk2MDQ3Y2UwMDVlMWEzMjU=
13
+ YmMxMmUxZThlMDE5MDc4MDkyZjEyNGY1NjE4NDQ4YzA1OTRlM2UyZWE5ZDIy
14
+ ODA3OTlkODhhNmE3MjgzNjUyNTM2MmRmMDBhMzU4MWIzMzEyZDEwNGMwZjJl
15
+ NzNmNTg2MjcyNjcyZWM1ZDIzYWM3NDc2ZGZkZDk5ZTE2NGMwOTQ=
@@ -29,6 +29,10 @@ module Cul::Scv::Hydra::Models::Aggregator
29
29
  member.save
30
30
  end
31
31
 
32
+ def has_struct_metadata?
33
+ return (!datastreams['structMetadata'].nil?) && datastreams['structMetadata'].has_content?
34
+ end
35
+
32
36
  def solr_members(opts={})
33
37
  opts = {:rows=>25,:response_format=>:solr}.merge(opts)
34
38
  r = self.parts(opts)
@@ -21,8 +21,8 @@ class StructMetadata < ::ActiveFedora::Datastream
21
21
  super
22
22
  end
23
23
 
24
- # Indicates that this datastream has metadata content.
25
- # @return true
24
+ # Indicates that this datastream has metadata content.
25
+ # @return true
26
26
  def metadata?
27
27
  true
28
28
  end
@@ -71,7 +71,7 @@ class StructMetadata < ::ActiveFedora::Datastream
71
71
  [:label, :order, :contentids]. each do |key|
72
72
  divNode[key.to_s.upcase] = atts[key].to_s if atts.has_key? key
73
73
  end
74
- ng_xml_will_change! if (divNode.document == ng_xml.document)
74
+ ng_xml_will_change! if (divNode.document == ng_xml.document)
75
75
  divNode
76
76
  end
77
77
 
@@ -88,6 +88,14 @@ class StructMetadata < ::ActiveFedora::Datastream
88
88
  ng_xml.xpath(xpath, ng_xml.namespaces)
89
89
  end
90
90
 
91
+ def first_ordered_content_div
92
+ divs_with_contentids_attr = self.divs_with_attribute(true, 'CONTENTIDS')
93
+ sorted_divs_with_contentids_attr = divs_with_contentids_attr.sort_by{ |node|
94
+ node.attr("ORDER").to_i
95
+ }
96
+ return sorted_divs_with_contentids_attr.first
97
+ end
98
+
91
99
  # a convenience method for setting attributes and creating divs (if necessary) for R/V structure
92
100
  # returns the mets:structMap node
93
101
  def recto_verso!
@@ -6,11 +6,11 @@ module Cul
6
6
  begin
7
7
  self.risearch(query, {:lang => 'itql'}.merge(options))
8
8
  rescue Exception => e
9
- logger.error e
9
+ logger.error e if defined?(logger)
10
10
  "{\"results\":[]}"
11
11
  end
12
12
  end
13
13
  end
14
14
  end
15
15
  end
16
- end
16
+ end
@@ -1,7 +1,7 @@
1
1
  module Cul
2
2
  module Scv
3
3
  module Hydra
4
- VERSION = '0.16.5'
4
+ VERSION = '0.16.6'
5
5
  def self.version
6
6
  VERSION
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cul_scv_hydra
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.5
4
+ version: 0.16.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Benjamin Armintor
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-30 00:00:00.000000000 Z
11
+ date: 2014-08-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: blacklight
@@ -56,14 +56,14 @@ dependencies:
56
56
  name: active-fedora
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ! '>='
59
+ - - ~>
60
60
  - !ruby/object:Gem::Version
61
61
  version: 7.0.2
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ! '>='
66
+ - - ~>
67
67
  - !ruby/object:Gem::Version
68
68
  version: 7.0.2
69
69
  - !ruby/object:Gem::Dependency
@@ -321,3 +321,4 @@ signing_key:
321
321
  specification_version: 4
322
322
  summary: ActiveFedora, OM, and Solrizer implementations for CUL Staff Collection Viewer
323
323
  test_files: []
324
+ has_rdoc: