hydra-pbcore 2.4.0 → 3.0.0.rc1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. checksums.yaml +15 -0
  2. data/.gitignore +1 -1
  3. data/Gemfile.lock +135 -0
  4. data/README.md +32 -25
  5. data/Rakefile +1 -1
  6. data/hydra-pbcore.gemspec +3 -1
  7. data/lib/hydra-pbcore.rb +19 -2
  8. data/lib/hydra_pbcore/datastream.rb +0 -1
  9. data/lib/hydra_pbcore/datastream/document.rb +6 -11
  10. data/lib/hydra_pbcore/datastream/instantiation.rb +5 -10
  11. data/lib/hydra_pbcore/methods.rb +0 -6
  12. data/lib/hydra_pbcore/templates.rb +6 -6
  13. data/lib/hydra_pbcore/version.rb +1 -1
  14. data/spec/config_spec.rb +88 -0
  15. data/spec/document_spec.rb +37 -17
  16. data/spec/fixtures/digital_instantiation_solr.xml +1009 -1009
  17. data/spec/fixtures/document_solr.xml +441 -430
  18. data/spec/fixtures/physical_instantiation_solr.xml +291 -282
  19. data/spec/instantiation_spec.rb +38 -6
  20. data/spec/spec_helper.rb +1 -0
  21. metadata +42 -87
  22. data/lib/hydra_pbcore/conversions.rb +0 -107
  23. data/lib/hydra_pbcore/datastream/deprecated.rb +0 -6
  24. data/lib/hydra_pbcore/datastream/deprecated/digital_document.rb +0 -105
  25. data/lib/hydra_pbcore/datastream/deprecated/document.rb +0 -332
  26. data/lib/hydra_pbcore/datastream/deprecated/instantiation.rb +0 -263
  27. data/lib/hydra_pbcore/mapper.rb +0 -50
  28. data/spec/deprecated/digital_document_spec.rb +0 -242
  29. data/spec/deprecated/document_spec.rb +0 -282
  30. data/spec/deprecated/instantiation_spec.rb +0 -214
  31. data/spec/fixtures/converted_digital_document_rrhof_1904.xml +0 -61
  32. data/spec/fixtures/converted_digital_document_rrhof_2405.xml +0 -54
  33. data/spec/fixtures/converted_document_rrhof_2439.xml +0 -19
  34. data/spec/fixtures/converted_document_rrhof_524.xml +0 -45
  35. data/spec/fixtures/converted_instantiation_rrhof_1184.xml +0 -39
  36. data/spec/fixtures/converted_rrhof_524.xml +0 -45
  37. data/spec/fixtures/converted_rrhof_524_instantiation.xml +0 -18
  38. data/spec/fixtures/deprecated/pbcore_digital_document_template.xml +0 -67
  39. data/spec/fixtures/deprecated/pbcore_document_template.xml +0 -90
  40. data/spec/fixtures/deprecated/pbcore_instantiation_template.xml +0 -62
  41. data/spec/fixtures/deprecated/pbcore_solr_digital_document_template.xml +0 -500
  42. data/spec/fixtures/deprecated/pbcore_solr_document_template.xml +0 -592
  43. data/spec/fixtures/deprecated/pbcore_solr_instantiation_template.xml +0 -784
  44. data/spec/fixtures/integration/digital_document_rrhof_1904.xml +0 -67
  45. data/spec/fixtures/integration/digital_document_rrhof_2405.xml +0 -66
  46. data/spec/fixtures/integration/document_rrhof_2439.xml +0 -54
  47. data/spec/fixtures/integration/document_rrhof_524.xml +0 -80
  48. data/spec/fixtures/integration/instantiation_rrhof_1184.xml +0 -44
  49. data/spec/integration/conversions_spec.rb +0 -76
  50. data/spec/mapper_spec.rb +0 -18
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ OTNhOTQ2MTY5MTMxMjc1YTJhYmEzMDc1M2RkMmU0NzlkOTVmODRlMg==
5
+ data.tar.gz: !binary |-
6
+ MzMwNjE5NjliMjc3YWQwZjViODIwNzk3MTQzMmJlYWZkNDRjMjM1Mg==
7
+ !binary "U0hBNTEy":
8
+ metadata.gz: !binary |-
9
+ Nzc5Y2I1ZGQ5OTdmMGI0MjA3ZDQzYjYzNzlhODU2Zjc1YmFlZWY1ZTJmNzYz
10
+ NmYyM2UzMmM0YmJjYTQ0ZGJkNmM0YTVjYzMwNmQxNzFjNzg2OWZjYjVlNTJl
11
+ ZjU0NzhiYmEyNzU4NDNlNzY5YzBjYWMwODA3ZjkzNWQ4NTY1Mjc=
12
+ data.tar.gz: !binary |-
13
+ YTNhZDI5YmVhMWUyMmE3N2U2ZmRjY2JmZDM5MzUxNGMwYzg2ZjRlNGI5YzQx
14
+ OWIwNzI1ZjAyNzU2OGZjOTdlMWJhZjU2YWY0YWY1MWY1YmI0NDVmY2M2NTZm
15
+ MTk1NDUzY2Y4YTdmYjE1YmIzMjg3ZTlmNTI4MzUzZDMyNjEyMzc=
data/.gitignore CHANGED
@@ -6,7 +6,6 @@
6
6
  .yardoc
7
7
  .rvmrc
8
8
  .ruby-version
9
- Gemfile.lock
10
9
  InstalledFiles
11
10
  _yardoc
12
11
  bin
@@ -21,3 +20,4 @@ test/version_tmp
21
20
  tmp/*
22
21
  !tmp/.gitkeep
23
22
  *.sw[opn]
23
+ config/*
data/Gemfile.lock ADDED
@@ -0,0 +1,135 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ hydra-pbcore (3.0.0.rc1)
5
+ active-fedora
6
+ solrizer
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ active-fedora (6.4.3)
12
+ activesupport (>= 3.0.0)
13
+ deprecation
14
+ mediashelf-loggable
15
+ nom-xml (>= 0.5.1)
16
+ om (~> 3.0.0)
17
+ rdf
18
+ rdf-rdfxml (= 1.0.1)
19
+ rsolr
20
+ rubydora (~> 1.6, >= 1.6.5)
21
+ activemodel (4.0.0)
22
+ activesupport (= 4.0.0)
23
+ builder (~> 3.1.0)
24
+ activesupport (4.0.0)
25
+ i18n (~> 0.6, >= 0.6.4)
26
+ minitest (~> 4.2)
27
+ multi_json (~> 1.3)
28
+ thread_safe (~> 0.1)
29
+ tzinfo (~> 0.3.37)
30
+ addressable (2.3.5)
31
+ atomic (1.1.10)
32
+ builder (3.1.4)
33
+ coderay (1.0.9)
34
+ columnize (0.3.6)
35
+ daemons (1.1.9)
36
+ debugger (1.6.1)
37
+ columnize (>= 0.3.1)
38
+ debugger-linecache (~> 1.2.0)
39
+ debugger-ruby_core_source (~> 1.2.3)
40
+ debugger-linecache (1.2.0)
41
+ debugger-ruby_core_source (1.2.3)
42
+ deprecation (0.0.5)
43
+ activesupport
44
+ diff-lcs (1.2.4)
45
+ equivalent-xml (0.3.0)
46
+ nokogiri (>= 1.4.3)
47
+ fastercsv (1.5.5)
48
+ hooks (0.3.1)
49
+ i18n (0.6.4)
50
+ json (1.8.0)
51
+ mediashelf-loggable (0.4.9)
52
+ method_source (0.8.2)
53
+ mime-types (1.23)
54
+ mini_portile (0.5.1)
55
+ minitest (4.7.5)
56
+ multi_json (1.7.7)
57
+ nokogiri (1.6.0)
58
+ mini_portile (~> 0.5.0)
59
+ nom-xml (0.5.1)
60
+ activesupport
61
+ i18n
62
+ nokogiri
63
+ om (3.0.2)
64
+ activemodel
65
+ activesupport
66
+ deprecation
67
+ mediashelf-loggable
68
+ nokogiri (>= 1.4.2)
69
+ solrizer (~> 3.1.0)
70
+ pry (0.9.12.2)
71
+ coderay (~> 1.0.5)
72
+ method_source (~> 0.8)
73
+ slop (~> 3.4)
74
+ rake (10.1.0)
75
+ rdf (1.0.7)
76
+ addressable (>= 2.2)
77
+ rdf-rdfxml (1.0.1)
78
+ rdf (>= 1.0)
79
+ rdf-xsd (>= 1.0)
80
+ rdf-xsd (1.0.2.1)
81
+ nokogiri (>= 1.5.0)
82
+ rdf (>= 0.3.4)
83
+ rdoc (4.0.1)
84
+ json (~> 1.4)
85
+ redcarpet (3.0.0)
86
+ rest-client (1.6.7)
87
+ mime-types (>= 1.16)
88
+ rsolr (1.0.9)
89
+ builder (>= 2.1.2)
90
+ rspec (2.14.1)
91
+ rspec-core (~> 2.14.0)
92
+ rspec-expectations (~> 2.14.0)
93
+ rspec-mocks (~> 2.14.0)
94
+ rspec-core (2.14.3)
95
+ rspec-expectations (2.14.0)
96
+ diff-lcs (>= 1.1.3, < 2.0)
97
+ rspec-mocks (2.14.1)
98
+ rubydora (1.6.5)
99
+ activemodel
100
+ activesupport
101
+ deprecation
102
+ equivalent-xml
103
+ fastercsv
104
+ hooks (~> 0.3.0)
105
+ mime-types
106
+ nokogiri
107
+ rest-client
108
+ slop (3.4.6)
109
+ solrizer (3.1.1)
110
+ activesupport
111
+ daemons
112
+ mediashelf-loggable (~> 0.4.7)
113
+ nokogiri
114
+ stomp
115
+ xml-simple
116
+ stomp (1.2.10)
117
+ thread_safe (0.1.0)
118
+ atomic
119
+ tzinfo (0.3.37)
120
+ xml-simple (1.1.2)
121
+ yard (0.8.6.2)
122
+
123
+ PLATFORMS
124
+ ruby
125
+
126
+ DEPENDENCIES
127
+ debugger
128
+ equivalent-xml
129
+ hydra-pbcore!
130
+ pry
131
+ rake
132
+ rdoc
133
+ redcarpet
134
+ rspec
135
+ yard
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # HydraPbcore
2
2
 
3
- [![Build Status](https://travis-ci.org/curationexperts/hydra-pbcore.png)](https://travis-ci.org/curationexperts/hydra-pbcore)
3
+ [![Build Status](https://travis-ci.org/awead/hydra-pbcore.png)](https://travis-ci.org/awead/hydra-pbcore)
4
4
 
5
5
  A Hydra gem that offers PBCore datastream definitions using OM, as well as some other convenience
6
6
  methods such as inserting xml templates into existing documents and reordering your PBCore xml
@@ -31,39 +31,46 @@ Use this with your hydra head to define a datastream in Fedora that will contain
31
31
  end
32
32
 
33
33
  Your descMetadata datastream will now have all the pbcore terms defined in HydraPbcore::Datastream::Document.
34
- There are also two additional datastream definitions:
35
34
 
36
- * HydraPbcore::Datastream::DigitalDocument
37
- * HydraPbcore::Datastream::Instantiation
35
+ The HydraPbcore::Datastream::Instantiation datastream contains additional PBcore terms pertaining to
36
+ pbcoreInstantiation nodes. HydraPbcore supports an atomistic Fedora model where there are multiple
37
+ Fedora objects representing a single Pbcore document. This supports a use case where multiple video
38
+ files are represented as individual Fedora objects with the Instantiation datastream.
38
39
 
39
- DigitalDocument datastreams have the exact same terms as Document, except that there is no default physical
40
- pbcoreInstantiation. The Document datastreams comes with a single instantiation that represents a tape
41
- or other physical entity. DigitalDocument datastreams assume born-digital content and must have added
42
- instantiations. These instantiations are defined in the Instantiation datastream.
40
+ ### Atomistic Fedora Model
43
41
 
44
- ### Additional Methods
42
+ A parent pbcoreDocument object, with multiple instantiations, can be defined:
45
43
 
46
- HydraPbcore comes with a couple of additional features such as ordering your xml nodes so that your xml will
47
- validate against the PBCore XML v.2 schema. Additionally, there are several template methods that can be used
48
- to insert additional terms into your xml documents, such as contributors, publishers, as well as next and previous
49
- fields that specify which files come before and after one another in a multi-part born-digital video.
44
+ MyPbcoreDocument < ActiveFedora::Base
45
+ has_many :instantiations, :property => :is_part_of
46
+ has_metadata :name => "descMetadata", :type => HydraPbcore::Datastream::Document
47
+ end
50
48
 
51
- ### Dates
49
+ Then, a child pbcoreInstantiation object with one parent pbcoreDocument is:
52
50
 
53
- Date fields in solr have to be in ISO8601 format, as opposed to text fields which may contain dates, but are treated differently.
54
- The difference is with the former, solr is treating the value of the field as an actual date, and as such, it can do time-based
55
- querying. The latter, is just a string and solr would search it accordingly. Currently, two types of date fields are provided:
56
- "_dt" for single-valued date fields, and "_dts" for multi-valued date fields. Solr cannot sort on multi-valued date fields;
57
- otherwise, the two functionally identical. By indexing your date fields as:
51
+ MyPbcoreInstantiation < ActiveFedora::Base
52
+ belongs_to :parent, :property => :is_part_of, :class_name => "MyPbcoreDocument"
53
+ has_metadata :name => "descMetadata", :type => HydraPbcore::Datastream::Instantiation
54
+ end
58
55
 
59
- :index_as => [:displayable, :converted_date]
60
- :index_as => [:displayable, :converted_multi_date]
56
+ The objects can then be linked together using Fedora's RDF datastream via ActiveFedora's methods:
57
+
58
+ > doc = MyPbcoreDocument.new
59
+ > instantiation = MyPbcoreInstantiation.new
60
+ > doc.instantiations << instantiation
61
+
62
+ ### Additional Methods
61
63
 
62
- the content of your date fields will be converted to ISO8601 dates, and the original content will be preserved for display.
63
- So you could enter a date such as "2001" or "2004-10", and each will be stored for display as such, but will also be
64
- indexed as a date in Solr with the value "2001-01-01T00:00:00Z" and "2004-10-01T00:00:00Z"
64
+ Complete PBcore documents can be assembled with their related instantiations using some of HydraPbcore's
65
+ convenience methods, which will reorder all nodes so the resulting document can be validated
66
+ according to the PBCore XML v.2 schema:
65
67
 
66
- Note: these functions will likely change with the upgrade to Solrizer 3.0.
68
+ > doc = HydraPbcore::Datastream::Document.new
69
+ > instantiation1 = HydraPbcore::Datastream::Instantiation.new
70
+ > instantiation2 = HydraPbcore::Datastream::Instantiation.new
71
+ > pbcore = doc.to_pbcore_xml(instantiation1, instantiation2)
72
+ > pbcore.valid_pbcore?
73
+ => true
67
74
 
68
75
  ## Testing
69
76
 
data/Rakefile CHANGED
@@ -5,7 +5,7 @@ require 'rspec/core/rake_task'
5
5
  # Rake task for getting an irb session
6
6
  desc "Open an irb session preloaded with this library"
7
7
  task :console do
8
- sh "irb -rubygems -I lib -r hydra-pbcore.rb"
8
+ sh "bin/pry -rubygems -I lib -e \"require 'hydra-pbcore'\""
9
9
  end
10
10
 
11
11
  RSpec::Core::RakeTask.new(:spec)
data/hydra-pbcore.gemspec CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |gem|
18
18
 
19
19
  # Dependencies
20
20
  gem.add_dependency('active-fedora')
21
- gem.add_dependency('solrizer', '< 3.0.0')
21
+ gem.add_dependency('solrizer')
22
22
  gem.add_development_dependency('yard')
23
23
  gem.add_development_dependency('redcarpet')
24
24
  # For Development
@@ -26,4 +26,6 @@ Gem::Specification.new do |gem|
26
26
  gem.add_development_dependency 'rspec'
27
27
  gem.add_development_dependency 'rdoc'
28
28
  gem.add_development_dependency 'equivalent-xml'
29
+ gem.add_development_dependency 'debugger'
30
+ gem.add_development_dependency 'pry'
29
31
  end
data/lib/hydra-pbcore.rb CHANGED
@@ -3,6 +3,7 @@ require "nokogiri"
3
3
  require "solrizer"
4
4
  require "om"
5
5
  require "active-fedora"
6
+ require "yaml"
6
7
 
7
8
  module HydraPbcore
8
9
  extend ActiveSupport::Autoload
@@ -56,6 +57,24 @@ module HydraPbcore
56
57
  "instantiationExtension",
57
58
  ]
58
59
 
60
+ Config = {
61
+ "institution" => "Rock and Roll Hall of Fame and Museum",
62
+ "relator" => "MARC relator terms",
63
+ "address" => "Rock and Roll Hall of Fame and Museum,\n2809 Woodland Ave.,\nCleveland, OH, 44115\n216-515-1956\nlibrary@rockhall.org"
64
+ }
65
+
66
+ # load our config file
67
+ def self.config opts = {}
68
+ if File.exists? "config/pbcore.yml"
69
+ config = ::YAML::load(IO.read("config/pbcore.yml"))
70
+ Config.keys.collect { |k| config[k] = Config[k] if config[k].nil? }
71
+ else
72
+ logger.info "pbcore.yml file not found, using default values"
73
+ config = Config
74
+ end
75
+ return config
76
+ end
77
+
59
78
  def self.version
60
79
  HydraPbcore::VERSION
61
80
  end
@@ -74,9 +93,7 @@ module HydraPbcore
74
93
  xsd.validate(xml)
75
94
  end
76
95
 
77
- autoload :Mapper
78
96
  autoload :Methods
79
- autoload :Conversions
80
97
  autoload :Behaviors
81
98
  autoload :Templates
82
99
  autoload :Datastream
@@ -2,5 +2,4 @@ module HydraPbcore::Datastream
2
2
  extend ActiveSupport::Autoload
3
3
  autoload :Document
4
4
  autoload :Instantiation
5
- autoload :Deprecated
6
5
  end
@@ -1,22 +1,17 @@
1
1
  module HydraPbcore::Datastream
2
2
  class Document < ActiveFedora::OmDatastream
3
3
 
4
- class_attribute :institution, :relator
5
- self.institution = "Rock and Roll Hall of Fame and Museum"
6
- self.relator = "MARC relator terms"
7
-
8
4
  include HydraPbcore::Methods
9
5
  include HydraPbcore::Templates
10
- include HydraPbcore::Conversions
11
6
 
12
7
  set_terminology do |t|
13
8
  t.root(:path=>"pbcoreDescriptionDocument")
14
9
 
15
10
  t.pbc_id(:path=>"pbcoreIdentifier",
16
- :attributes=>{ :source=>self.institution, :annotation=>"PID" }
11
+ :attributes=>{ :source=>HydraPbcore.config["institution"], :annotation=>"PID" }
17
12
  )
18
13
 
19
- t.title(:path=>"pbcoreTitle", :attributes=>{ :titleType=>"Main" }, :index_as => [:searchable, :displayable])
14
+ t.title(:path=>"pbcoreTitle", :attributes=>{ :titleType=>"Main" }, :index_as => [:searchable, :displayable, :sortable])
20
15
  t.alternative_title(:path=>"pbcoreTitle", :attributes=>{ :titleType=>"Alternative" },
21
16
  :index_as => [:searchable, :displayable]
22
17
  )
@@ -46,7 +41,7 @@ class Document < ActiveFedora::OmDatastream
46
41
  :index_as => [:displayable]
47
42
  )
48
43
  t.rh_subject(:path=>"pbcoreSubject",
49
- :attributes=>{ :source=>self.institution },
44
+ :attributes=>{ :source=>HydraPbcore.config["institution"] },
50
45
  :index_as => [:displayable]
51
46
  )
52
47
 
@@ -120,7 +115,7 @@ class Document < ActiveFedora::OmDatastream
120
115
  )
121
116
  t.event_date(:path=>"pbcoreCoverage/coverage",
122
117
  :attributes => {:annotation=>"Event Date"},
123
- :index_as => [:not_searchable, :converted_multi_date, :displayable]
118
+ :index_as => [:dateable, :displayable]
124
119
  )
125
120
 
126
121
  # Creator names and roles
@@ -134,7 +129,7 @@ class Document < ActiveFedora::OmDatastream
134
129
  # Contributor names and roles
135
130
  t.contributor(:path=>"pbcoreContributor") do
136
131
  t.name_(:path=>"contributor")
137
- t.role_(:path=>"contributorRole", :attributes=>{ :source=>self.relator })
132
+ t.role_(:path=>"contributorRole", :attributes=>{ :source=>HydraPbcore.config["relator"] })
138
133
  end
139
134
  t.contributor_name(:ref=>[:contributor, :name], :index_as => [:searchable, :facetable])
140
135
  t.contributor_role(:ref=>[:contributor, :role], :index_as => [:searchable, :displayable])
@@ -162,7 +157,7 @@ class Document < ActiveFedora::OmDatastream
162
157
  xml.pbcoreDescriptionDocument("xmlns:xsi"=>"http://www.w3.org/2001/XMLSchema-instance",
163
158
  "xsi:schemaLocation"=>"http://www.pbcore.org/PBCore/PBCoreNamespace.html") {
164
159
 
165
- xml.pbcoreIdentifier(:source=>self.institution, :annotation=>"PID")
160
+ xml.pbcoreIdentifier(:source=>HydraPbcore.config["institution"], :annotation=>"PID")
166
161
  xml.pbcoreTitle(:titleType=>"Main")
167
162
  xml.pbcoreDescription(:descriptionType=>"Description",
168
163
  :descriptionTypeSource=>"pbcoreDescription/descriptionType",
@@ -1,13 +1,8 @@
1
1
  module HydraPbcore::Datastream
2
2
  class Instantiation < ActiveFedora::OmDatastream
3
3
 
4
- class_attribute :institution, :address
5
- self.institution = "Rock and Roll Hall of Fame and Museum"
6
- self.address = "Rock and Roll Hall of Fame and Museum,\n2809 Woodland Ave.,\nCleveland, OH, 44115\n216-515-1956\nlibrary@rockhall.org"
7
-
8
4
  include HydraPbcore::Methods
9
5
  include HydraPbcore::Templates
10
- include HydraPbcore::Conversions
11
6
 
12
7
  # Note: this is not a complete PBCore document, just an instantiation node
13
8
  set_terminology do |t|
@@ -17,7 +12,7 @@ class Instantiation < ActiveFedora::OmDatastream
17
12
  :path => "instantiationIdentifier",
18
13
  :attributes=>{
19
14
  :annotation=>"Filename",
20
- :source=>self.institution
15
+ :source=>HydraPbcore.config["institution"]
21
16
  },
22
17
  :index_as => [:displayable]
23
18
  )
@@ -25,12 +20,12 @@ class Instantiation < ActiveFedora::OmDatastream
25
20
  :path => "instantiationIdentifier",
26
21
  :attributes=>{
27
22
  :annotation=>"Barcode",
28
- :source=>self.institution
23
+ :source=>HydraPbcore.config["institution"]
29
24
  },
30
- :index_as => [:displayable]
25
+ :index_as => [:searchable, :displayable]
31
26
  )
32
27
  t.instantiationDate(:attributes=>{ :dateType=>"created" },
33
- :index_as => [:not_searchable, :converted_date, :displayable]
28
+ :index_as => [:dateable, :displayable]
34
29
  )
35
30
  t.instantiationDigital(:attributes=>{ :source=>"EBU file formats" },
36
31
  :index_as => [:searchable, :facetable]
@@ -94,7 +89,7 @@ class Instantiation < ActiveFedora::OmDatastream
94
89
  )
95
90
 
96
91
  t.instantiationRelation do
97
- t.instantiationRelationIdentifier(:attributes=>{ :source=>self.institution })
92
+ t.instantiationRelationIdentifier(:attributes=>{ :source=>HydraPbcore.config["institution"] })
98
93
  end
99
94
  # The file we're describing at the root of this document preceeds the file marked "next"
100
95
  t.next_inst(:ref => [:pbcoreInstantiation, :instantiationRelation],
@@ -73,10 +73,4 @@ module HydraPbcore::Methods
73
73
  end
74
74
  end
75
75
 
76
- # Overrides Solrizer::XML::TerminologyBasedSolrizer.to_solr to use our own mapper
77
- def to_solr(solr_doc = Hash.new)
78
- Solrizer.default_field_mapper = HydraPbcore::Mapper.new
79
- super(solr_doc)
80
- end
81
-
82
76
  end
@@ -21,7 +21,7 @@ module HydraPbcore::Templates
21
21
  define_template :contributor do |xml, author, role|
22
22
  xml.pbcoreContributor {
23
23
  xml.contributor(author)
24
- xml.contributorRole(role, :source=>self.relator)
24
+ xml.contributorRole(role, :source=>HydraPbcore.config["relator"])
25
25
  }
26
26
  end
27
27
 
@@ -30,7 +30,7 @@ module HydraPbcore::Templates
30
30
  xml.instantiationRelationType(:annotation=>"One of a multi-part instantiation") {
31
31
  xml.text "Follows in Sequence"
32
32
  }
33
- xml.instantiationRelationIdentifier(file, :source=>self.institution)
33
+ xml.instantiationRelationIdentifier(file, :source=>HydraPbcore.config["institution"])
34
34
  }
35
35
  end
36
36
 
@@ -39,7 +39,7 @@ module HydraPbcore::Templates
39
39
  xml.instantiationRelationType(:annotation=>"One of a multi-part instantiation") {
40
40
  xml.text "Precedes in Sequence"
41
41
  }
42
- xml.instantiationRelationIdentifier(file, :source=>self.institution)
42
+ xml.instantiationRelationIdentifier(file, :source=>HydraPbcore.config["institution"])
43
43
  }
44
44
  end
45
45
 
@@ -108,7 +108,7 @@ module HydraPbcore::Templates
108
108
 
109
109
  xml.pbcoreInstantiation {
110
110
 
111
- xml.instantiationIdentifier(:annotation=>"Filename", :source=>self.institution)
111
+ xml.instantiationIdentifier(:annotation=>"Filename", :source=>HydraPbcore.config["institution"])
112
112
  xml.instantiationDate(:dateType=>"created")
113
113
  xml.instantiationDigital(:source=>"EBU file formats")
114
114
  xml.instantiationLocation
@@ -163,12 +163,12 @@ module HydraPbcore::Templates
163
163
  xml.pbcoreInstantiation {
164
164
 
165
165
  # Item details
166
- xml.instantiationIdentifier(:annotation=>"Barcode", :source=>self.institution)
166
+ xml.instantiationIdentifier(:annotation=>"Barcode", :source=>HydraPbcore.config["institution"])
167
167
  xml.instantiationDate(:dateType=>"created")
168
168
  xml.instantiationPhysical(:source=>"PBCore instantiationPhysical")
169
169
  xml.instantiationStandard
170
170
  xml.instantiationLocation {
171
- xml.text self.address
171
+ xml.text HydraPbcore.config["address"]
172
172
  }
173
173
  xml.instantiationMediaType(:source=>"PBCore instantiationMediaType") {
174
174
  xml.text "Moving image"