cul_scv_hydra 0.8.0 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
data/config/fedora.yml CHANGED
@@ -1,10 +1,10 @@
1
1
  development:
2
- :url: http://127.0.0.1:8983/fedora
3
- :user: fedoraAdmin
4
- :password: fedoraAdmin
5
- # :url: http://sayers.cul.columbia.edu:8080/fedora
2
+ # :url: http://127.0.0.1:8983/fedora
6
3
  # :user: fedoraAdmin
7
- # :password: f+BULUS*^
4
+ # :password: fedoraAdmin
5
+ :url: http://sayers.cul.columbia.edu:8080/fedora
6
+ :user: fedoraAdmin
7
+ :password: f+BULUS*^
8
8
  test:
9
9
  :url: http://127.0.0.1:8983/fedora
10
10
  :user: fedoraAdmin
@@ -1,4 +1,5 @@
1
1
  :marc_to_facet :
2
+ 'NNC' : 'General Collections'
2
3
  'NNC-A' : 'Avery'
3
4
  'NNC-ART' : 'Office of Art Properties'
4
5
  'NNBa' : 'Barnard College Library'
@@ -10,6 +11,7 @@
10
11
  'NyNyCBL' : 'Burke Library'
11
12
  'NyNyCOH' : 'CCOH'
12
13
  :marc_to_display :
14
+ 'NNC' : 'General Collections'
13
15
  'NNC-A' : 'Avery Architectural & Fine Arts Library'
14
16
  'NNC-ART' : 'Office of Art Properties'
15
17
  'NNBa' : 'Barnard College Library'
@@ -21,9 +23,11 @@
21
23
  'NyNyCBL' : 'Burke Library at Union Theological Seminary'
22
24
  'NyNyCOH' : 'Columbia Center for Oral History Collections'
23
25
  :project_to_facet :
24
- 'Customer Order Collection' : 'PRD Orders'
26
+ 'Customer Order Collection' : 'Pres Orders'
25
27
  "Children's Drawings of the Spanish Civil War (online exhibition)" : 'Spanish Civil War'
26
28
  "Jewels in her crown: treasures of Columbia University Libraries special collections" : 'Jewels in her Crown'
27
29
  "Russian Imperial Corps of Pages" : 'Russian Corps of Pages'
28
- "Osama bin Laden posters" : 'Osama bin Laden posters'
29
- "Chinese paper gods" : 'Chinese paper gods'
30
+ "Preserving Historic Audio Content" : 'Audio Preservation'
31
+ 'Papers of John Jay' : 'John Jay Papers'
32
+ 'Project Facet Mapping Test' : 'Successful Project Mapping'
33
+ 'G.E.E. Lindquist Native American Photographs' : 'Lindquist Photographs'
@@ -5,3 +5,5 @@ end
5
5
  require 'cul_scv_hydra/active_fedora/model/aggregator'
6
6
  require 'cul_scv_hydra/active_fedora/model/common'
7
7
  require 'cul_scv_hydra/active_fedora/model/resource'
8
+ require 'cul_scv_hydra/active_fedora/model/nokogiri_datastreams'
9
+ require 'cul_scv_hydra/active_fedora/model/struct_metadata'
@@ -3,6 +3,7 @@ module Aggregator
3
3
  extend ActiveSupport::Concern
4
4
 
5
5
  included do
6
+ has_metadata :name => "structMetadata", :type=>Cul::Scv::Hydra::ActiveFedora::Model::StructMetadata, :versionable => true, :controlGroup => 'M'
6
7
  has_many :parts, :property => :cul_member_of, :class_name=>'ActiveFedora::Base'
7
8
  after_create :aggregator!
8
9
  end
@@ -138,14 +138,15 @@ module Common
138
138
  solr_doc["descriptor_ssi"] = ["dublin core"]
139
139
  end
140
140
  # if no mods, pull some values from DC
141
- if (solr_doc["title_ssm"].nil? or solr_doc["title_ssm"].length == 0)
142
- if self.dc.term_values(:dc_title).first
143
- solr_doc["title_ssm"] = [self.dc.term_values(:dc_title).first]
141
+ if (solr_doc["title_display_ssm"].nil? or solr_doc["title_display_ssm"].length == 0)
142
+ if self.datastreams["DC"].term_values(:dc_title).first
143
+ solr_doc["title_display_ssm"] = self.datastreams["DC"].term_values(:dc_title)
144
144
  else
145
- solr_doc["title_ssm"] = [self.dc.term_values(:dc_identifier).first]
145
+ solr_doc["title_display_ssm"] = self.datastreams["DC"].term_values(:dc_identifier).reject {|dcid| dcid.eql? self.id}
146
146
  end
147
- if self.dc.term_values(:dc_relation).first
148
- self.dc.term_values(:dc_relation).each {|val|
147
+ solr_doc["title_si"] = self.datastreams["DC"].term_values(:dc_title).first
148
+ if self.datastreams["DC"].term_values(:dc_relation).first
149
+ self.datastreams["DC"].term_values(:dc_relation).each {|val|
149
150
  if val =~ /clio:/
150
151
  solr_doc["clio_ssim"] ||= []
151
152
  solr_doc["clio_ssim"] << val.split(':')[-1]
@@ -153,8 +154,11 @@ module Common
153
154
  }
154
155
  end
155
156
  end
156
- if (solr_doc["title_ssm"].length > 1)
157
- solr_doc["title_ssm"].uniq!
157
+ if (solr_doc["identifier_ssim"].nil? or solr_doc["identifier_ssim"].length == 0)
158
+ solr_doc["identifier_ssim"] = self.datastreams["DC"].term_values(:dc_identifier).reject {|dcid| dcid.eql? self.id}
159
+ end
160
+ if (solr_doc["title_display_ssm"].length > 1)
161
+ solr_doc["title_display_ssm"].uniq!
158
162
  end
159
163
  solr_doc["format_ssi"] = [self.route_as]
160
164
  solr_doc["index_type_label_ssi"] = [self.index_type_label]
@@ -166,6 +170,7 @@ module Common
166
170
  value.strip!
167
171
  end
168
172
  }
173
+ solr_doc[:structured_bsi] = 'false' unless solr_doc.has_key? :structured_bsi
169
174
  solr_doc
170
175
  end
171
176
 
@@ -0,0 +1,142 @@
1
+ module Cul::Scv::Hydra::ActiveFedora::Model::NokogiriDatastreams
2
+ extend ActiveSupport::Concern
3
+
4
+ included do
5
+ self.extend ClassMethods
6
+ end
7
+
8
+ module ClassMethods
9
+ # Create an instance of this class based on xml content
10
+ # @param [String, File, Nokogiri::XML::Node] xml the xml content to build from
11
+ # @param [ActiveFedora::OmDatastream] tmpl the Datastream object that you are building @default a new instance of this class
12
+ # Careful! If you call this from a constructor, be sure to provide something 'ie. self' as the @tmpl. Otherwise, you will get an infinite loop!
13
+ def from_xml(xml, tmpl=nil)
14
+ tmpl = self.new if tmpl.nil? ## This path is used only for unit testing (e.g. MarpaDCDatastream.from_xml(fixture("data.xml")) )
15
+
16
+ if !xml.present?
17
+ tmpl.ng_xml = self.xml_template
18
+ elsif xml.kind_of? Nokogiri::XML::Node || xml.kind_of?(Nokogiri::XML::Document)
19
+ tmpl.ng_xml = xml
20
+ else
21
+ tmpl.ng_xml = Nokogiri::XML::Document.parse(xml)
22
+ end
23
+
24
+ tmpl.ng_xml_doesnt_change!
25
+
26
+ return tmpl
27
+ end
28
+ end
29
+
30
+ def local_or_remote_content(ensure_fetch = true)
31
+ @content = to_xml if ng_xml_changed? || autocreate?
32
+ super
33
+ end
34
+
35
+ def datastream_content
36
+ @datastream_content ||= Nokogiri::XML(super).to_xml {|config| config.no_declaration}.strip
37
+ end
38
+
39
+ def ng_xml
40
+ @ng_xml ||= begin
41
+ if new?
42
+ ## Load up the template
43
+ self.class.xml_template
44
+ else
45
+ Nokogiri::XML::Document.parse(datastream_content)
46
+ end
47
+ end
48
+ end
49
+
50
+ def ng_xml=(new_xml)
51
+ # before we set ng_xml, we load the datastream so we know if the new value differs.
52
+ local_or_remote_content(true)
53
+
54
+ case new_xml
55
+ when Nokogiri::XML::Document
56
+ self.content=new_xml.to_xml
57
+ when Nokogiri::XML::Node
58
+ ## Cast a fragment to a document
59
+ self.content=new_xml.to_s
60
+ when String
61
+ self.content=new_xml
62
+ else
63
+ raise TypeError, "You passed a #{new_xml.class} into the ng_xml of the #{self.dsid} datastream. OmDatastream.ng_xml= only accepts Nokogiri::XML::Document, Nokogiri::XML::Element, Nokogiri::XML::Node, or raw XML (String) as inputs."
64
+ end
65
+ end
66
+
67
+ # don't want content eagerly loaded by proxy, so implementing methods that would be implemented by define_attribute_methods
68
+ def ng_xml_will_change!
69
+ changed_attributes['ng_xml'] = nil
70
+ end
71
+
72
+ def ng_xml_doesnt_change!
73
+ changed_attributes.delete('ng_xml')
74
+ end
75
+
76
+ # don't want content eagerly loaded by proxy, so implementing methods that would be implemented by define_attribute_methods
77
+ def ng_xml_changed?
78
+ changed_attributes.has_key? 'ng_xml'
79
+ end
80
+
81
+ def datastream_content
82
+ @datastream_content ||= Nokogiri::XML(super).to_xml {|config| config.no_declaration}.strip
83
+ end
84
+
85
+ def content=(new_content)
86
+ if inline?
87
+ # inline datastreams may be transformed by fedora 3, so we test for equivalence instead of equality
88
+ if !EquivalentXml.equivalent?(datastream_content, new_content)
89
+ ng_xml_will_change!
90
+ @ng_xml = Nokogiri::XML::Document.parse(new_content)
91
+ super(@ng_xml.to_s)
92
+ end
93
+ else
94
+ if datastream_content != new_content
95
+ ng_xml_will_change!
96
+ @ng_xml = Nokogiri::XML::Document.parse(new_content)
97
+ super(@ng_xml.to_s)
98
+ end
99
+ end
100
+ end
101
+
102
+ def content_changed?
103
+ return false if !xml_loaded
104
+ super
105
+ end
106
+
107
+ def xml_loaded
108
+ instance_variable_defined? :@ng_xml
109
+ end
110
+
111
+ def to_xml(xml = nil)
112
+ xml = self.ng_xml if xml.nil?
113
+ ng_xml = self.ng_xml
114
+ if ng_xml.respond_to?(:root) && ng_xml.root.nil? && self.class.respond_to?(:root_property_ref) && !self.class.root_property_ref.nil?
115
+ ng_xml = self.class.generate(self.class.root_property_ref, "")
116
+ if xml.root.nil?
117
+ xml = ng_xml
118
+ end
119
+ end
120
+
121
+ unless xml == ng_xml || ng_xml.root.nil?
122
+ if xml.kind_of?(Nokogiri::XML::Document)
123
+ xml.root.add_child(ng_xml.root)
124
+ elsif xml.kind_of?(Nokogiri::XML::Node)
125
+ xml.add_child(ng_xml.root)
126
+ else
127
+ raise "You can only pass instances of Nokogiri::XML::Node into this method. You passed in #{xml}"
128
+ end
129
+ end
130
+
131
+ return xml.to_xml {|config| config.no_declaration}.strip
132
+ end
133
+
134
+ def method_missing method, *args, &block
135
+ if ng_xml.respond_to? method
136
+ ng_xml.send(method, *args, &block)
137
+ else
138
+ super
139
+ end
140
+ end
141
+
142
+ end
@@ -51,7 +51,6 @@ module Resource
51
51
  image_properties = Cul::Image::Properties.identify(blob)
52
52
  if image_properties
53
53
  image_prop_nodes = image_properties.nodeset
54
- puts image_properties.instance_variable_get(:@ng_xml).to_xml
55
54
  relsext = datastreams['RELS-EXT']
56
55
  image_prop_nodes.each { |node|
57
56
  if node["resource"]
@@ -63,7 +62,6 @@ module Resource
63
62
  end
64
63
  subject = RDF::URI(internal_uri)
65
64
  predicate = RDF::URI("#{node.namespace.href}#{node.name}")
66
- puts "Adding a resource predicate : #{predicate}"
67
65
  query = RDF::Query.new({ :subject => {predicate => :object}})
68
66
  relationships(predicate).dup.each { |stmt|
69
67
  relationships.delete(stmt)
@@ -0,0 +1,118 @@
1
+ module Cul::Scv::Hydra::ActiveFedora::Model
2
+ class StructMetadata < ::ActiveFedora::Datastream
3
+ include NokogiriDatastreams
4
+
5
+ def self.default_attributes
6
+ super.merge(:controlGroup => 'M', :mimeType => 'text/xml')
7
+ end
8
+
9
+ def self.xml_template
10
+ Nokogiri::XML::Document.parse("<mets:structMap xmlns:mets=\"http://www.loc.gov/METS/\">")
11
+ end
12
+
13
+ def self.div_template(prefix="mets")
14
+ prefix.nil? ? '<div/>' : "<#{prefix}:div/>"
15
+ end
16
+
17
+ def initialize(digital_object=nil, dsid=nil, options={})
18
+ super
19
+ end
20
+
21
+ # Indicates that this datastream has metadata content.
22
+ # @return true
23
+ def metadata?
24
+ true
25
+ end
26
+
27
+ def autocreate?
28
+ changed_attributes.has_key? :profile
29
+ end
30
+
31
+ def label=(value)
32
+ struct_map["LABEL"] = value
33
+ ng_xml_will_change!
34
+ end
35
+
36
+ def label
37
+ struct_map["LABEL"]
38
+ end
39
+
40
+ def type=(value)
41
+ struct_map["TYPE"] = value
42
+ ng_xml_will_change!
43
+ end
44
+
45
+ def type
46
+ struct_map["TYPE"]
47
+ end
48
+
49
+ def prefix
50
+ prefix = nil
51
+ ng_xml.namespaces.each do |p, href|
52
+ prefix = p.sub(/xmlns:/,'') if href == "http://www.loc.gov/METS/"
53
+ end
54
+ prefix
55
+ end
56
+
57
+ def struct_map
58
+ prefix = self.prefix
59
+ path = prefix.nil? ? 'xmlns:structMap' : "#{prefix}:structMap"
60
+ ng_xml.xpath(path, ng_xml.namespaces).first
61
+ end
62
+
63
+ def create_div_node(parent=nil, atts={})
64
+ if parent.nil?
65
+ parent = struct_map
66
+ end
67
+ divNode = parent.add_child(StructMetadata.div_template(parent.namespace.prefix)).first
68
+ [:label, :order, :contentids]. each do |key|
69
+ divNode[key.to_s.upcase] = atts[key].to_s if atts.has_key? key
70
+ end
71
+ ng_xml_will_change! if (divNode.document == ng_xml.document)
72
+ divNode
73
+ end
74
+
75
+ def divs_with_attribute(descend=true, name=nil, value=nil)
76
+ prefix = self.prefix || 'xmlns'
77
+ xpath = descend ? "//#{prefix}:div" : "/#{prefix}:structMap/#{prefix}:div"
78
+ if !name.nil?
79
+ xpath << "[@#{name}"
80
+ if !value.nil?
81
+ xpath << "='#{value}'"
82
+ end
83
+ xpath << ']'
84
+ end
85
+ ng_xml.xpath(xpath, ng_xml.namespaces)
86
+ end
87
+
88
+ # a convenience method for setting attributes and creating divs (if necessary) for R/V structure
89
+ # returns the mets:structMap node
90
+ def recto_verso!
91
+ self.type= 'physical' unless self.type == 'physical'
92
+ self.label= 'Sides' unless self.label == 'Sides'
93
+ create_div_node struct_map, {:order=>'1'} unless divs_with_attribute(false,'ORDER','1').first
94
+ create_div_node struct_map, {:order=>'2'} unless divs_with_attribute(false,'ORDER','2').first
95
+ if (div = divs_with_attribute(false,'ORDER','1').first)
96
+ div['LABEL'] = 'Recto' unless div['LABEL'] == 'Recto'
97
+ end
98
+ if (div = divs_with_attribute(false,'ORDER','2').first)
99
+ div['LABEL'] = 'Verso' unless div['LABEL'] == 'Verso'
100
+ end
101
+ struct_map
102
+ end
103
+
104
+ def recto
105
+ divs_with_attribute(false, 'LABEL', 'Recto').first
106
+ end
107
+
108
+ def verso
109
+ divs_with_attribute(false, 'LABEL', 'Verso').first
110
+ end
111
+
112
+ def to_solr(doc={})
113
+ doc[:structured_bsi] = (has_content? ? 'true' : 'false')
114
+ doc
115
+ end
116
+
117
+ end
118
+ end
@@ -31,7 +31,8 @@ module Om
31
31
  :index_as=>[:displayable, :searchable])
32
32
  t.dc_identifier(:path=>"identifier",
33
33
  :namespace_prefix=>"dc",
34
- :index_as=>[:displayable, :searchable])
34
+ :type=>:string,
35
+ :index_as=>[:symbol])
35
36
  t.dc_language(:path=>"language",
36
37
  :namespace_prefix=>"dc",
37
38
  :index_as=>[:displayable, :searchable])
@@ -8,6 +8,11 @@ module Om
8
8
  class ModsDocument < ::ActiveFedora::OmDatastream
9
9
  include ::OM::XML::TerminologyBasedSolrizer
10
10
  include Cul::Scv::Hydra::Solrizer::TerminologyBasedSolrizer
11
+ include Cul::Scv::Hydra::Solrizer::ScvModsFieldable
12
+
13
+ map_field("lib_repo_sim", :marc_to_facet)
14
+ map_field("lib_repo_ssm", :marc_to_display)
15
+ map_field("lib_project_sim", :project_to_facet)
11
16
 
12
17
  set_terminology do |t|
13
18
  t.root(:path=>"mods",
@@ -16,11 +21,14 @@ module Om
16
21
  }
17
22
 
18
23
  t.main_title_info(:path=>'titleInfo', :index_as=>[], :attributes=>{:type=>:none}){
24
+ t.non_sort(:path=>"nonSort", :index_as=>[])
19
25
  t.main_title(:path=>"title", :index_as=>[])
20
26
  }
21
27
 
22
- t.title(:proxy=>[:mods, :main_title_info, :main_title],
23
- :index_as=>[:displayable, :searchable, :sortable, :textable])
28
+ t.title(:proxy=>[:mods, :main_title_info, :main_title], :type=>:string,
29
+ :index_as=>[:searchable, :sortable, :textable])
30
+ t.title_display(:proxy=>[:mods, :main_title_info], :type=>:string,
31
+ :index_as=>[:displayable])
24
32
 
25
33
  t.search_title_info(:path=>'titleInfo', :index_as=>[]){
26
34
  t.search_title(:path=>'title', :index_as=>[:searchable])
@@ -31,16 +39,16 @@ module Om
31
39
  }
32
40
  }
33
41
  t.collection(:path=>"relatedItem", :attributes=>{:type=>"host", :displayLabel=>"Collection"}, :index_as=>[]){
34
- t.collection_title_info(:path=>'titleInfo', :index_as=>[]){
35
- t.lib_collection(:path=>'title', :index_as=>[:facetable, :displayable])
42
+ t.collection_title_info(:path=>'titleInfo', :index_as=>[:facetable, :displayable]){
43
+ t.lib_collection(:path=>'title', :index_as=>[])
36
44
  }
37
45
  }
38
- t.lib_project(:proxy=>[:project,:project_title_info, :lib_project],
46
+ t.lib_project(:proxy=>[:project,:project_title_info],
39
47
  :index_as=>[:displayable, :searchable, :project_facetable, :textable])
40
- t.lib_collection(:proxy=>[:collection,:collection_title_info, :lib_collection])
48
+ t.lib_collection(:proxy=>[:collection,:collection_title_info])
41
49
  # pattern matches
42
- t.identifier(:path=>"identifier", :attributes=>{:type=>"local"}, :index_as=>[:symbol, :textable])
43
- t.clio(:path=>"identifier", :attributes=>{:type=>"CLIO"}, :data_type=>:symbol, :index_as=>[:searchable, :displayable])
50
+ t.identifier(:path=>"identifier", :attributes=>{:type=>"local"}, :type=>:string, :index_as=>[:symbol, :textable])
51
+ t.clio(:path=>"identifier", :attributes=>{:type=>"CLIO"}, :data_type=>:symbol, :index_as=>[:symbol, :textable])
44
52
  t.abstract
45
53
  t.subject {
46
54
  t.topic
@@ -64,9 +72,8 @@ module Om
64
72
  :index_as=>[])
65
73
  t.shelf_locator(:path=>"shelfLocator", :index_as=>[:textable])
66
74
  }
67
- t.lib_repo(:proxy=>[:location, :lib_repo],
68
- :index_as=>[:marc_code_facetable, :marc_code_displayable,
69
- :marc_code_textable])
75
+ t.lib_repo(:proxy=>[:location, :lib_repo], :type=>:text,
76
+ :index_as=>[:marc_code_facetable, :marc_code_displayable, :marc_code_textable])
70
77
  t.lib_name(
71
78
  :path=>'name',:attributes=>{:type=>'personal'},
72
79
  :index_as=>[:facetable, :displayable, :searchable, :textable]){
@@ -98,7 +105,8 @@ module Om
98
105
 
99
106
  t.origin_info(:path=>"originInfo", :index_as=>[]){
100
107
  t.date(:path=>"dateIssued", :attributes=>{:encoding=>'w3cdtf'}, :index_as=>[])
101
- t.key_date(:path=>"dateIssued", :attributes=>{:encoding=>'w3cdtf',:keyDate=>'yes'}, :index_as=>[])
108
+ t.lib_date(:path=>"dateIssued", :attributes=>{:encoding=>'w3cdtf',:keyDate=>'yes'},
109
+ :index_as=>[:date_sortable])
102
110
  t.start_date(:path=>"dateIssued", :attributes=>{:encoding=>'w3cdtf',:keyDate=>'yes',:point=>'start'}, :index_as=>[])
103
111
  t.end_date(:path=>"dateIssued", :attributes=>{:encoding=>'w3cdtf',:point=>'end'}, :index_as=>[])
104
112
  }
@@ -2,11 +2,12 @@ module Cul
2
2
  module Scv
3
3
  module Hydra
4
4
  module Solrizer
5
+ autoload :Extractor, "cul_scv_hydra/solrizer/extractor"
6
+ autoload :TerminologyBasedSolrizer, "cul_scv_hydra/solrizer/terminology_based_solrizer"
7
+ autoload :ValueMapper, "cul_scv_hydra/solrizer/value_mapper"
8
+ autoload :ScvModsFieldable, "cul_scv_hydra/solrizer/scv_mods_fieldable"
5
9
  end
6
10
  end
7
11
  end
8
12
  end
9
- require "cul_scv_hydra/solrizer/extractor"
10
- require "cul_scv_hydra/solrizer/field_mapper"
11
- require "cul_scv_hydra/solrizer/terminology_based_solrizer"
12
- require "cul_scv_hydra/solrizer/value_mapper"
13
+ require "cul_scv_hydra/solrizer/field_mapper"
@@ -1,23 +1,32 @@
1
1
  require 'solrizer'
2
2
  module Solrizer::DefaultDescriptors
3
+ def self.date_sortable
4
+ @date_sortable ||= Solrizer::Descriptor.new(:date, :stored, :indexed, converter: date_sortable_converter)
5
+ end
6
+
7
+ # Produces the field name 'all_text_teim'
3
8
  def self.textable
4
- @textable_type ||= TextableDescriptor.new(:text, :indexed, :multivalued)
9
+ @textable_type ||= TextableDescriptor.new(:text_en, :indexed, :multivalued)
5
10
  end
6
11
 
12
+ # Produces _sim suffix
7
13
  def self.project_facetable
8
14
  @project_facet_type ||= ProjectFacetDescriptor.new(:string, :indexed, :multivalued)
9
15
  end
10
16
 
17
+ # Produces _sim suffix and a value-mapping converter
11
18
  def self.marc_code_facetable
12
19
  @marc_code_facet_type ||= MarcCodeFacetDescriptor.new(:string, :indexed, :multivalued)
13
20
  end
14
21
 
22
+ # Produces _ssm suffix and a value-mapping converter
15
23
  def self.marc_code_displayable
16
24
  @marc_code_type ||= MarcCodeDisplayDescriptor.new(:string, :stored, :indexed, :multivalued)
17
25
  end
18
26
 
27
+ # Produces all_text_timv fieldname and a value-mapping converter
19
28
  def self.marc_code_textable
20
- @marc_code_map_text_type ||= MarcCodeTextableDescriptor.new(:text, :indexed, :multivalued)
29
+ @marc_code_map_text_type ||= MarcCodeTextableDescriptor.new(:text_en, :indexed, :multivalued)
21
30
  end
22
31
 
23
32
  def self.load_value_maps(config_path=nil)
@@ -43,52 +52,81 @@ module Solrizer::DefaultDescriptors
43
52
  @@value_maps ||= load_value_maps
44
53
  end
45
54
 
55
+ def self.date_sortable_converter
56
+ lambda do |type|
57
+ lambda do |val|
58
+ begin
59
+ d = val.length < 11 ? Date.new(*(val.split('-').collect {|s| s.to_i})) : Date.parse(val)
60
+ iso8601_date(d)
61
+ rescue ArgumentError
62
+ nil
63
+ end
64
+ end
65
+ end
66
+ end
67
+
68
+ module Normal
69
+ def normal!(value)
70
+ value.gsub!(/\s+/,' ')
71
+ value.strip!
72
+ true
73
+ end
74
+ end
46
75
 
47
76
  class TextableDescriptor < Solrizer::Descriptor
48
- def name_and_converter(field_name, field_type)
49
- ['all_text_timv']
77
+ def name_and_converter(field_name, args=nil)
78
+ super('all_text', args)
50
79
  end
51
80
  end
52
81
 
53
82
  class ProjectFacetDescriptor < Solrizer::Descriptor
83
+ include Normal
54
84
  def converter(field_type)
55
85
  map = Solrizer::DefaultDescriptors.value_maps[:project_to_facet] || {}
56
- lambda {|value| (map.has_key? value) ? map[value] : value}
86
+ lambda {|value| (normal!(value) and map.has_key? value) ? map[value] : value}
57
87
  end
58
88
  end
59
89
 
60
90
  class MarcCodeFacetDescriptor < Solrizer::Descriptor
91
+ include Normal
61
92
  def converter(field_type)
62
93
  map = Solrizer::DefaultDescriptors.value_maps[:marc_to_facet] || {}
63
- lambda {|value| (map.has_key? value) ? map[value] : value}
94
+ lambda {|value| (normal!(value) and map.has_key? value) ? map[value] : value}
64
95
  end
65
96
  end
66
97
 
67
98
  class MarcCodeDisplayDescriptor < Solrizer::Descriptor
99
+ include Normal
68
100
  def converter(field_type)
69
101
  map = Solrizer::DefaultDescriptors.value_maps[:marc_to_display] || {}
70
- lambda {|value| (map.has_key? value) ? map[value] : value}
71
- end
102
+ lambda {|value| (normal!(value) and map.has_key? value) ? map[value] : value}
103
+ end
72
104
  end
73
105
 
74
106
  class MarcCodeTextableDescriptor < Solrizer::Descriptor
75
- def name_and_converter(field_name, field_type)
76
- ['all_text_timv', converter(field_type)]
107
+ include Normal
108
+ def name_and_converter(field_name, args=nil)
109
+ super('all_text', args)
77
110
  end
78
111
  def converter(field_type)
79
112
  fmap = Solrizer::DefaultDescriptors.value_maps[:marc_to_facet] || {}
80
113
  dmap = Solrizer::DefaultDescriptors.value_maps[:marc_to_display] || {}
81
114
  lambda do |value|
82
- r = (fmap.has_key? value) ? [fmap[value]] : []
83
- r << dmap[value] if (dmap.has_key? value)
84
- r.join(' ')
115
+ if value.is_a? String
116
+ normal!(value)
117
+ r = (fmap.has_key? value) ? [fmap[value]] : []
118
+ r << dmap[value] if (dmap.has_key? value)
119
+ r.uniq!
120
+ r.join(' ')
121
+ else
122
+ value
123
+ end
85
124
  end
86
125
  end
87
126
  end
88
127
  class MarcCodeDisplayTextableDescriptor < MarcCodeDisplayDescriptor
89
- def name_and_converter(field_name, field_type)
90
- puts "MarcCodeDisplayTextableDescriptor"
91
- ['all_text_timv', converter(field_type)]
128
+ def name_and_converter(field_name, args=nil)
129
+ super('all_text', args)
92
130
  end
93
131
  end
94
132
  end
@@ -0,0 +1,162 @@
1
+ module Cul::Scv::Hydra::Solrizer
2
+ module ScvModsFieldable
3
+ extend ActiveSupport::Concern
4
+
5
+ MODS_NS = {'mods'=>'http://www.loc.gov/mods/v3'}
6
+
7
+ module ClassMethods
8
+ def value_mapper(maps=nil)
9
+ @value_mapper ||= ValueMapper.new(maps)
10
+ end
11
+
12
+ def map_field(field_key, map_key)
13
+ value_mapper.map_field(field_key, map_key)
14
+ end
15
+
16
+ def map_value(field_key, value_key)
17
+ value_mapper.map_value(field_key, value_key)
18
+ end
19
+
20
+ def maps_field?(field_key)
21
+ value_mapper.maps_field? field_key
22
+ end
23
+ end
24
+
25
+ def mods
26
+ ng_xml.xpath('/mods:mods', MODS_NS).first
27
+ end
28
+
29
+ def projects
30
+ mods.xpath("./mods:relatedItem[@type='host' and @displayLabel='Project']", MODS_NS).collect do |p_node|
31
+ ScvModsFieldable.normalize(main_title(p_node), true)
32
+ end
33
+ end
34
+
35
+ def collections
36
+ mods.xpath("./mods:relatedItem[@type='host' and @displayLabel='Collection']", MODS_NS).collect do |p_node|
37
+ ScvModsFieldable.normalize(main_title(p_node), true)
38
+ end
39
+ end
40
+
41
+ def sort_title(node=mods)
42
+ # include only the untyped [!@type] titleInfo, exclude noSort
43
+ base_text = ''
44
+ t = node.xpath('./mods:titleInfo[not(@type)]', MODS_NS).first
45
+ if t
46
+ t.children.each do |child|
47
+ base_text << child.text unless child.name == 'nonSort'
48
+ end
49
+ end
50
+ base_text = ScvModsFieldable.normalize(base_text, true)
51
+ base_text = nil if base_text.empty?
52
+ base_text
53
+ end
54
+
55
+ def main_title(node=mods)
56
+ # include only the untyped [!@type] titleInfo
57
+ t = node.xpath('./mods:titleInfo[not(@type)]', MODS_NS).first
58
+ if t
59
+ ScvModsFieldable.normalize(t.text)
60
+ else
61
+ nil
62
+ end
63
+ end
64
+
65
+ def titles(node=mods)
66
+ # all titles without descending into relatedItems
67
+ node.xpath('./mods:titleInfo', MODS_NS).collect do |t|
68
+ ScvModsFieldable.normalize(t.text)
69
+ end
70
+ end
71
+
72
+ def names(role_authority=nil, role=nil)
73
+ # get all the name nodes
74
+ # reject the ones that aren't type 'personal' or 'corporate'
75
+ # keep all child text except the role terms
76
+ xpath = "./mods:name[@type = 'personal' or @type = 'corporate']"
77
+ unless role_authority.nil?
78
+ xpath << "/mods:role/mods:roleTerm[@authority='#{role_authority.to_s}'"
79
+ unless role.nil?
80
+ xpath << " and normalize-space(text()) = '#{role.to_s.strip}'"
81
+ end
82
+ xpath << "]/ancestor::mods:name"
83
+ end
84
+ names = mods.xpath(xpath, MODS_NS).collect do |node|
85
+ base_text = node.xpath('./mods:namePart', MODS_NS).collect { |c| c.text }.join(' ')
86
+ ScvModsFieldable.normalize(base_text, true)
87
+ end
88
+ xpath = "./mods:subject" + xpath[1,xpath.length]
89
+ mods.xpath(xpath, MODS_NS).each do |node|
90
+ base_text = node.xpath('./mods:namePart', MODS_NS).collect { |c| c.text }.join(' ')
91
+ names << ScvModsFieldable.normalize(base_text, true)
92
+ end
93
+ names
94
+ end
95
+
96
+ def dates(node=mods)
97
+ # get all the dateIssued with keyDate = 'yes', but not point = 'end'
98
+ end
99
+
100
+ def formats(node=mods)
101
+ # get all the form values with authority != 'marcform'
102
+ node.xpath("./mods:physicalDescription/mods:form[@authority != 'marcform']", MODS_NS).collect do |n|
103
+ ScvModsFieldable.normalize(n.text)
104
+ end
105
+ end
106
+
107
+ def repositories(node=mods)
108
+ # get all the location/physicalLocation[@authority = 'marcorg']
109
+ node.xpath("./mods:location/mods:physicalLocation[@authority = 'marcorg']", MODS_NS).collect do |n|
110
+ ScvModsFieldable.normalize(n.text)
111
+ end
112
+ end
113
+
114
+ def shelf_locators(node=mods)
115
+ node.xpath("./mods:location/mods:shelfLocator", MODS_NS).collect do |n|
116
+ ScvModsFieldable.normalize(n.text, true)
117
+ end
118
+ end
119
+
120
+ def to_solr(solr_doc={})
121
+ solr_doc = (defined? super) ? super : solr_doc
122
+ solr_doc["title_si"] = sort_title
123
+ solr_doc["title_ssm"] = titles
124
+ solr_doc["lib_collection_sim"] = collections
125
+ solr_doc["lib_project_sim"] = projects
126
+ solr_doc["lib_name_sim"] = names
127
+ solr_doc["lib_name_ssm"] = solr_doc["lib_name_sim"]
128
+ solr_doc["lib_author_sim"] = names(:marcrelator, 'aut')
129
+ solr_doc["lib_recipient_sim"] = names(:marcrelator, 'rcp')
130
+ solr_doc["lib_format_sim"] = formats
131
+ solr_doc["lib_repo_sim"] = repositories
132
+ solr_doc["lib_shelf_sim"] = shelf_locators
133
+ solr_doc.each do |k, v|
134
+ if self.class.maps_field? k
135
+ solr_doc[k] = self.class.map_value(k, v)
136
+ end
137
+ end
138
+ solr_doc
139
+ end
140
+
141
+ def self.normalize(t, strip_punctuation=false)
142
+ # strip whitespace
143
+ n_t = t.dup.strip
144
+ # collapse intermediate whitespace
145
+ n_t.gsub!(/\s+/, ' ')
146
+ # pull off paired punctuation, and any leading punctuation
147
+ if strip_punctuation
148
+ n_t = n_t.sub(/^\((.*)\)$/, "\\1")
149
+ n_t = n_t.sub(/^\{(.*)\}$/, "\\1")
150
+ n_t = n_t.sub(/^\[(.*)\]$/, "\\1")
151
+ n_t = n_t.sub(/^"(.*)"$/, "\\1")
152
+ n_t = n_t.sub(/^'(.*)'$/, "\\1")
153
+ n_t = n_t.sub(/^<(.*)>$/, "\\1")
154
+ #n_t = n_t.sub(/^\p{Ps}(.*)\p{Pe}/u, "\\1")
155
+ n_t = n_t.sub(/^[[:punct:]]+/, '')
156
+ # this may have 'created' leading/trailing space, so strip
157
+ n_t.strip!
158
+ end
159
+ n_t
160
+ end
161
+ end
162
+ end
@@ -9,18 +9,6 @@ module Cul::Scv::Hydra::Solrizer::TerminologyBasedSolrizer
9
9
  # Module Methods
10
10
 
11
11
  module ClassMethods
12
- # Build a solr document from +doc+ based on its terminology
13
- # @param [OM::XML::Document] doc
14
- # @param [Hash] solr_doc (optional) solr_doc (values hash) to populate
15
- def solrize(doc, solr_doc=Hash.new, field_mapper = nil)
16
- unless doc.class.terminology.nil?
17
- doc.class.terminology.terms.each_pair do |term_name,term|
18
- doc.solrize_term(term, solr_doc, field_mapper) unless term.is_root_term?
19
- end
20
- end
21
-
22
- return solr_doc
23
- end
24
12
  # Populate a solr document with solr fields corresponding to the given xml node
25
13
  # Field names are generated using settings from the term in the +doc+'s terminology corresponding to +term_pointer+
26
14
  # @param [Nokogiri::XML::Node] node to solrize
@@ -31,7 +19,6 @@ module Cul::Scv::Hydra::Solrizer::TerminologyBasedSolrizer
31
19
  return solr_doc unless term.index_as && !term.index_as.empty?
32
20
  generic_field_name_base = OM::XML::Terminology.term_generic_name(*term_pointer)
33
21
  create_and_insert_terms(generic_field_name_base, node_value, term.index_as, solr_doc)
34
-
35
22
  if term_pointer.length > 1
36
23
  #hierarchical_field_name_base = OM::XML::Terminology.term_hierarchical_name(*term_pointer)
37
24
  #create_and_insert_terms(hierarchical_field_name_base, node_value, term.index_as, solr_doc)
@@ -21,10 +21,21 @@ class ValueMapper
21
21
  # Instance methods
22
22
 
23
23
  def initialize(value_maps=nil)
24
- @value_maps = value_maps || Cul::Scv::Hydra::Solrizer::ValueMapper.default_value_maps
24
+ @value_maps = (value_maps || Cul::Scv::Hydra::Solrizer::ValueMapper.default_value_maps).with_indifferent_access
25
+ @mapped_fields = {}.with_indifferent_access
25
26
  end
26
- def solr_value(map_key, value_key)
27
- return value_key unless @value_maps.has_key? map_key
27
+
28
+ def maps_field?(field_key)
29
+ @mapped_fields.has_key? field_key
30
+ end
31
+
32
+ def map_field(field_key, map_key)
33
+ @mapped_fields[field_key] = map_key
34
+ end
35
+
36
+ def map_value(field_key, value_key)
37
+ map_key = @mapped_fields[field_key]
38
+ return value_key unless @mapped_fields.has_key? field_key and @value_maps.has_key? map_key
28
39
  if value_key.is_a? Array
29
40
  value_key.collect{ |val| @value_maps[map_key].fetch(val, val) }
30
41
  else
@@ -1,7 +1,7 @@
1
1
  module Cul
2
2
  module Scv
3
3
  module Hydra
4
- VERSION = '0.8.0'
4
+ VERSION = '0.9.0'
5
5
  def self.version
6
6
  VERSION
7
7
  end
@@ -73,27 +73,27 @@ end
73
73
 
74
74
  namespace :cul_scv_hydra do
75
75
  namespace :cmodel do
76
- task :test => :environment do
76
+ task :test do #=> :environment do
77
77
  pid = ENV["PID"]
78
78
  puts content_for(pid)
79
79
  end
80
80
 
81
- task :load => :environment do
81
+ task :load do #=> :environment do
82
82
  pid = ENV["PID"]
83
83
  load_content(content_for(pid),pid)
84
84
  end
85
85
 
86
- task :purge => :environment do
86
+ task :purge do #=> :environment do
87
87
  pid = ENV["PID"]
88
88
  purge(pid)
89
89
  end
90
90
 
91
- task :reload => :environment do
91
+ task :reload do #=> :environment do
92
92
  pid = ENV["PID"]
93
93
  reload(pid)
94
94
  end
95
95
 
96
- task :reload_all => :environment do
96
+ task :reload_all do #=> :environment do
97
97
  pattern = ENV["PATTERN"]
98
98
  pattern = Regexp.compile(pattern) if pattern
99
99
  reload("ldpd:nullbind")
metadata CHANGED
@@ -1,18 +1,20 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cul_scv_hydra
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.9.0
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Benjamin Armintor
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2013-09-09 00:00:00.000000000 Z
12
+ date: 2014-02-21 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: blacklight
15
16
  requirement: !ruby/object:Gem::Requirement
17
+ none: false
16
18
  requirements:
17
19
  - - ! '>='
18
20
  - !ruby/object:Gem::Version
@@ -20,6 +22,7 @@ dependencies:
20
22
  type: :runtime
21
23
  prerelease: false
22
24
  version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
23
26
  requirements:
24
27
  - - ! '>='
25
28
  - !ruby/object:Gem::Version
@@ -27,34 +30,39 @@ dependencies:
27
30
  - !ruby/object:Gem::Dependency
28
31
  name: active-fedora
29
32
  requirement: !ruby/object:Gem::Requirement
33
+ none: false
30
34
  requirements:
31
35
  - - ~>
32
36
  - !ruby/object:Gem::Version
33
- version: 6.1.1
37
+ version: '6.1'
34
38
  type: :runtime
35
39
  prerelease: false
36
40
  version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
37
42
  requirements:
38
43
  - - ~>
39
44
  - !ruby/object:Gem::Version
40
- version: 6.1.1
45
+ version: '6.1'
41
46
  - !ruby/object:Gem::Dependency
42
47
  name: hydra-head
43
48
  requirement: !ruby/object:Gem::Requirement
49
+ none: false
44
50
  requirements:
45
51
  - - '='
46
52
  - !ruby/object:Gem::Version
47
- version: 6.2.2
53
+ version: 6.4.1
48
54
  type: :runtime
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
51
58
  requirements:
52
59
  - - '='
53
60
  - !ruby/object:Gem::Version
54
- version: 6.2.2
61
+ version: 6.4.1
55
62
  - !ruby/object:Gem::Dependency
56
63
  name: active_fedora_finders
57
64
  requirement: !ruby/object:Gem::Requirement
65
+ none: false
58
66
  requirements:
59
67
  - - ! '>='
60
68
  - !ruby/object:Gem::Version
@@ -62,6 +70,7 @@ dependencies:
62
70
  type: :runtime
63
71
  prerelease: false
64
72
  version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
65
74
  requirements:
66
75
  - - ! '>='
67
76
  - !ruby/object:Gem::Version
@@ -69,6 +78,7 @@ dependencies:
69
78
  - !ruby/object:Gem::Dependency
70
79
  name: active_fedora_relsint
71
80
  requirement: !ruby/object:Gem::Requirement
81
+ none: false
72
82
  requirements:
73
83
  - - ! '>='
74
84
  - !ruby/object:Gem::Version
@@ -76,6 +86,7 @@ dependencies:
76
86
  type: :runtime
77
87
  prerelease: false
78
88
  version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
79
90
  requirements:
80
91
  - - ! '>='
81
92
  - !ruby/object:Gem::Version
@@ -83,6 +94,7 @@ dependencies:
83
94
  - !ruby/object:Gem::Dependency
84
95
  name: cul_image_props
85
96
  requirement: !ruby/object:Gem::Requirement
97
+ none: false
86
98
  requirements:
87
99
  - - ! '>='
88
100
  - !ruby/object:Gem::Version
@@ -90,6 +102,23 @@ dependencies:
90
102
  type: :runtime
91
103
  prerelease: false
92
104
  version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ! '>='
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
110
+ - !ruby/object:Gem::Dependency
111
+ name: mods
112
+ requirement: !ruby/object:Gem::Requirement
113
+ none: false
114
+ requirements:
115
+ - - ! '>='
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
93
122
  requirements:
94
123
  - - ! '>='
95
124
  - !ruby/object:Gem::Version
@@ -97,62 +126,71 @@ dependencies:
97
126
  - !ruby/object:Gem::Dependency
98
127
  name: om
99
128
  requirement: !ruby/object:Gem::Requirement
129
+ none: false
100
130
  requirements:
101
- - - ~>
131
+ - - ! '>='
102
132
  - !ruby/object:Gem::Version
103
- version: 2.1.0
133
+ version: '0'
104
134
  type: :runtime
105
135
  prerelease: false
106
136
  version_requirements: !ruby/object:Gem::Requirement
137
+ none: false
107
138
  requirements:
108
- - - ~>
139
+ - - ! '>='
109
140
  - !ruby/object:Gem::Version
110
- version: 2.1.0
141
+ version: '0'
111
142
  - !ruby/object:Gem::Dependency
112
143
  name: solrizer
113
144
  requirement: !ruby/object:Gem::Requirement
145
+ none: false
114
146
  requirements:
115
147
  - - ~>
116
148
  - !ruby/object:Gem::Version
117
- version: 3.0.0
149
+ version: '3.0'
118
150
  type: :runtime
119
151
  prerelease: false
120
152
  version_requirements: !ruby/object:Gem::Requirement
153
+ none: false
121
154
  requirements:
122
155
  - - ~>
123
156
  - !ruby/object:Gem::Version
124
- version: 3.0.0
157
+ version: '3.0'
125
158
  - !ruby/object:Gem::Dependency
126
159
  name: rspec
127
160
  requirement: !ruby/object:Gem::Requirement
161
+ none: false
128
162
  requirements:
129
163
  - - ~>
130
164
  - !ruby/object:Gem::Version
131
- version: 2.10.0
165
+ version: '2.10'
132
166
  type: :development
133
167
  prerelease: false
134
168
  version_requirements: !ruby/object:Gem::Requirement
169
+ none: false
135
170
  requirements:
136
171
  - - ~>
137
172
  - !ruby/object:Gem::Version
138
- version: 2.10.0
173
+ version: '2.10'
139
174
  - !ruby/object:Gem::Dependency
140
175
  name: rspec-rails
141
176
  requirement: !ruby/object:Gem::Requirement
177
+ none: false
142
178
  requirements:
143
179
  - - ~>
144
180
  - !ruby/object:Gem::Version
145
- version: 2.10.0
181
+ version: '2.10'
146
182
  type: :development
147
183
  prerelease: false
148
184
  version_requirements: !ruby/object:Gem::Requirement
185
+ none: false
149
186
  requirements:
150
187
  - - ~>
151
188
  - !ruby/object:Gem::Version
152
- version: 2.10.0
189
+ version: '2.10'
153
190
  - !ruby/object:Gem::Dependency
154
191
  name: mocha
155
192
  requirement: !ruby/object:Gem::Requirement
193
+ none: false
156
194
  requirements:
157
195
  - - '='
158
196
  - !ruby/object:Gem::Version
@@ -160,6 +198,7 @@ dependencies:
160
198
  type: :development
161
199
  prerelease: false
162
200
  version_requirements: !ruby/object:Gem::Requirement
201
+ none: false
163
202
  requirements:
164
203
  - - '='
165
204
  - !ruby/object:Gem::Version
@@ -167,6 +206,7 @@ dependencies:
167
206
  - !ruby/object:Gem::Dependency
168
207
  name: equivalent-xml
169
208
  requirement: !ruby/object:Gem::Requirement
209
+ none: false
170
210
  requirements:
171
211
  - - ! '>='
172
212
  - !ruby/object:Gem::Version
@@ -174,6 +214,7 @@ dependencies:
174
214
  type: :development
175
215
  prerelease: false
176
216
  version_requirements: !ruby/object:Gem::Requirement
217
+ none: false
177
218
  requirements:
178
219
  - - ! '>='
179
220
  - !ruby/object:Gem::Version
@@ -181,6 +222,7 @@ dependencies:
181
222
  - !ruby/object:Gem::Dependency
182
223
  name: rbx-require-relative
183
224
  requirement: !ruby/object:Gem::Requirement
225
+ none: false
184
226
  requirements:
185
227
  - - ! '>='
186
228
  - !ruby/object:Gem::Version
@@ -188,6 +230,7 @@ dependencies:
188
230
  type: :development
189
231
  prerelease: false
190
232
  version_requirements: !ruby/object:Gem::Requirement
233
+ none: false
191
234
  requirements:
192
235
  - - ! '>='
193
236
  - !ruby/object:Gem::Version
@@ -202,7 +245,9 @@ files:
202
245
  - lib/cul_scv_hydra/access_controls_enforcement.rb
203
246
  - lib/cul_scv_hydra/active_fedora/model/aggregator.rb
204
247
  - lib/cul_scv_hydra/active_fedora/model/common.rb
248
+ - lib/cul_scv_hydra/active_fedora/model/nokogiri_datastreams.rb
205
249
  - lib/cul_scv_hydra/active_fedora/model/resource.rb
250
+ - lib/cul_scv_hydra/active_fedora/model/struct_metadata.rb
206
251
  - lib/cul_scv_hydra/active_fedora/model.rb
207
252
  - lib/cul_scv_hydra/active_fedora.rb
208
253
  - lib/cul_scv_hydra/controllers/aggregates.rb
@@ -230,6 +275,7 @@ files:
230
275
  - lib/cul_scv_hydra/om.rb
231
276
  - lib/cul_scv_hydra/solrizer/extractor.rb
232
277
  - lib/cul_scv_hydra/solrizer/field_mapper.rb
278
+ - lib/cul_scv_hydra/solrizer/scv_mods_fieldable.rb
233
279
  - lib/cul_scv_hydra/solrizer/terminology_based_solrizer.rb
234
280
  - lib/cul_scv_hydra/solrizer/value_mapper.rb
235
281
  - lib/cul_scv_hydra/solrizer.rb
@@ -268,25 +314,26 @@ files:
268
314
  - config/subs.yml
269
315
  homepage: https://github.com/cul/cul_scv_hydra
270
316
  licenses: []
271
- metadata: {}
272
317
  post_install_message:
273
318
  rdoc_options: []
274
319
  require_paths:
275
320
  - lib
276
321
  required_ruby_version: !ruby/object:Gem::Requirement
322
+ none: false
277
323
  requirements:
278
324
  - - ! '>='
279
325
  - !ruby/object:Gem::Version
280
326
  version: 1.9.3
281
327
  required_rubygems_version: !ruby/object:Gem::Requirement
328
+ none: false
282
329
  requirements:
283
330
  - - ! '>='
284
331
  - !ruby/object:Gem::Version
285
332
  version: '0'
286
333
  requirements: []
287
334
  rubyforge_project:
288
- rubygems_version: 2.0.7
335
+ rubygems_version: 1.8.24
289
336
  signing_key:
290
- specification_version: 4
337
+ specification_version: 3
291
338
  summary: ActiveFedora, OM, and Solrizer implementations for CUL Staff Collection Viewer
292
339
  test_files: []
checksums.yaml DELETED
@@ -1,15 +0,0 @@
1
- ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- YTI5YWY3ZWFjMWVhYjdjNjI4Mzc4MGRjYWNkNTg5MTk0MmNiZjY3Mg==
5
- data.tar.gz: !binary |-
6
- YzU5YzY4YjY3OWFjYWM5NzllOWRiNDU2ZThiYTk0ZTgwMjg4ZWE4MQ==
7
- !binary "U0hBNTEy":
8
- metadata.gz: !binary |-
9
- YWU1Y2U2ZGQ5Zjg1ZDlhNmUxNzFmNDBjYTdhZjlmNDdjYjQ1MjhjYjc2YzVj
10
- ZjBjYTcwMTY5NTViNTZiZTNhY2U3OTk1Yjc2YWFkODYxYTQyMzE4MjkwZDUz
11
- YzBkNWM4ZTA4ZWNmNjk5NDA3M2YyY2JlNjNmNzNmZjk5NTYwNTM=
12
- data.tar.gz: !binary |-
13
- ZTI1ZjY5ZDRmYzM0MWVhZDQ5MmVmNWQwZDVlZWVjODJmNTVjZDBmMzA3ZWQ2
14
- YTRhODNhYTI1Yjc5MmJkNGJmN2Y2OTBjOWM2NzRiM2FhODM1NzhjZjdkZTFi
15
- ZmNlNzA2ZWM0NTFjODRjYWYwYWViMWRlNTRlZGE3NTM0ZGJjZjA=