hydra-pbcore 2.1.0 → 2.2.0rc1

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.
@@ -1,6 +1,10 @@
1
1
  module HydraPbcore::Datastream::Deprecated
2
2
  class DigitalDocument < ActiveFedora::NokogiriDatastream
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
+
4
8
  include HydraPbcore::Methods
5
9
  include HydraPbcore::Templates
6
10
  include HydraPbcore::Conversions
@@ -13,7 +17,7 @@ class DigitalDocument < ActiveFedora::NokogiriDatastream
13
17
  xml.pbcoreDescriptionDocument("xmlns:xsi"=>"http://www.w3.org/2001/XMLSchema-instance",
14
18
  "xsi:schemaLocation"=>"http://www.pbcore.org/PBCore/PBCoreNamespace.html") {
15
19
 
16
- xml.pbcoreIdentifier(:source=>"Rock and Roll Hall of Fame and Museum", :annotation=>"PID")
20
+ xml.pbcoreIdentifier(:source=>self.institution, :annotation=>"PID")
17
21
  xml.pbcoreTitle(:titleType=>"Main")
18
22
  xml.pbcoreDescription(:descriptionType=>"Description",
19
23
  :descriptionTypeSource=>"pbcoreDescription/descriptionType",
@@ -1,6 +1,10 @@
1
1
  module HydraPbcore::Datastream::Deprecated
2
2
  class Document < ActiveFedora::NokogiriDatastream
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
+
4
8
  include HydraPbcore::Methods
5
9
  include HydraPbcore::Templates
6
10
  include HydraPbcore::Conversions
@@ -9,7 +13,7 @@ class Document < ActiveFedora::NokogiriDatastream
9
13
  t.root(:path=>"pbcoreDescriptionDocument")
10
14
 
11
15
  t.pbc_id(:path=>"pbcoreIdentifier",
12
- :attributes=>{ :source=>"Rock and Roll Hall of Fame and Museum", :annotation=>"PID" }
16
+ :attributes=>{ :source=>self.institution, :annotation=>"PID" }
13
17
  )
14
18
 
15
19
  t.title(:path=>"pbcoreTitle", :attributes=>{ :titleType=>"Main" }, :index_as => [:searchable, :displayable])
@@ -42,7 +46,7 @@ class Document < ActiveFedora::NokogiriDatastream
42
46
  :index_as => [:displayable]
43
47
  )
44
48
  t.rh_subject(:path=>"pbcoreSubject",
45
- :attributes=>{ :source=>"Rock and Roll Hall of Fame and Museum" },
49
+ :attributes=>{ :source=>self.institution },
46
50
  :index_as => [:displayable]
47
51
  )
48
52
 
@@ -113,7 +117,7 @@ class Document < ActiveFedora::NokogiriDatastream
113
117
  t.contributor(:path=>"pbcoreContributor") do
114
118
  t.name_(:path=>"contributor")
115
119
  t.role_(:path=>"contributorRole",
116
- :attributes=>{ :source=>"MARC relator terms" }
120
+ :attributes=>{ :source=>self.relator }
117
121
  )
118
122
  end
119
123
  t.contributor_name(:proxy=>[:contributor, :name], :index_as => [:searchable, :facetable])
@@ -135,7 +139,7 @@ class Document < ActiveFedora::NokogiriDatastream
135
139
  t.pbcoreInstantiation do
136
140
  t.instantiationIdentifier(:attributes=>{
137
141
  :annotation=>"Barcode",
138
- :source=>"Rock and Roll Hall of Fame and Museum"
142
+ :source=>self.institution
139
143
  })
140
144
  t.instantiationDate(:attributes=>{ :dateType=>"created" })
141
145
  t.instantiationPhysical(:attributes=>{ :source=>"PBCore instantiationPhysical" })
@@ -209,7 +213,7 @@ class Document < ActiveFedora::NokogiriDatastream
209
213
  xml.pbcoreDescriptionDocument("xmlns:xsi"=>"http://www.w3.org/2001/XMLSchema-instance",
210
214
  "xsi:schemaLocation"=>"http://www.pbcore.org/PBCore/PBCoreNamespace.html") {
211
215
 
212
- xml.pbcoreIdentifier(:source=>"Rock and Roll Hall of Fame and Museum", :annotation=>"PID")
216
+ xml.pbcoreIdentifier(:source=>self.institution, :annotation=>"PID")
213
217
  xml.pbcoreTitle(:titleType=>"Main")
214
218
  xml.pbcoreDescription(:descriptionType=>"Description",
215
219
  :descriptionTypeSource=>"pbcoreDescription/descriptionType",
@@ -247,7 +251,7 @@ class Document < ActiveFedora::NokogiriDatastream
247
251
  xml.pbcoreInstantiation {
248
252
 
249
253
  # Item details
250
- xml.instantiationIdentifier(:annotation=>"Barcode", :source=>"Rock and Roll Hall of Fame and Museum")
254
+ xml.instantiationIdentifier(:annotation=>"Barcode", :source=>self.institution)
251
255
  xml.instantiationDate(:dateType=>"created")
252
256
  xml.instantiationPhysical(:source=>"PBCore instantiationPhysical")
253
257
  xml.instantiationStandard
@@ -1,6 +1,9 @@
1
1
  module HydraPbcore::Datastream::Deprecated
2
2
  class Instantiation < ActiveFedora::NokogiriDatastream
3
3
 
4
+ class_attribute :institution
5
+ self.institution = "Rock and Roll Hall of Fame and Museum"
6
+
4
7
  include HydraPbcore::Methods
5
8
  include HydraPbcore::Templates
6
9
  include HydraPbcore::Conversions
@@ -14,7 +17,7 @@ class Instantiation < ActiveFedora::NokogiriDatastream
14
17
  t.instantiationIdentifier(
15
18
  :attributes=>{
16
19
  :annotation=>"Filename",
17
- :source=>"Rock and Roll Hall of Fame and Museum"
20
+ :source=>self.institution
18
21
  },
19
22
  :index_as => [:displayable]
20
23
  )
@@ -80,7 +83,7 @@ class Instantiation < ActiveFedora::NokogiriDatastream
80
83
  )
81
84
 
82
85
  t.instantiationRelation do
83
- t.instantiationRelationIdentifier(:attributes=>{ :source=>"Rock and Roll Hall of Fame and Museum" })
86
+ t.instantiationRelationIdentifier(:attributes=>{ :source=>self.institution })
84
87
  end
85
88
  # The file we're describing at the root of this document preceeds the file marked "next"
86
89
  t.next_inst(:ref => [:pbcoreInstantiation, :instantiationRelation],
@@ -199,13 +202,13 @@ class Instantiation < ActiveFedora::NokogiriDatastream
199
202
 
200
203
  # These fields are only added so that this document will be validated. However, they
201
204
  # shouldn't be used for anything else here because they're in the parent Fedora object
202
- xml.pbcoreIdentifier(:annotation=>"PID", :source=>"Rock and Roll Hall of Fame and Museum")
205
+ xml.pbcoreIdentifier(:annotation=>"PID", :source=>self.institution)
203
206
  xml.pbcoreTitle
204
207
  xml.pbcoreDescription
205
208
 
206
209
  xml.pbcoreInstantiation {
207
210
 
208
- xml.instantiationIdentifier(:annotation=>"Filename", :source=>"Rock and Roll Hall of Fame and Museum")
211
+ xml.instantiationIdentifier(:annotation=>"Filename", :source=>self.institution)
209
212
  xml.instantiationDate(:dateType=>"created")
210
213
  xml.instantiationDigital(:source=>"EBU file formats")
211
214
  xml.instantiationLocation
@@ -1,6 +1,10 @@
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
+
4
8
  include HydraPbcore::Methods
5
9
  include HydraPbcore::Templates
6
10
  include HydraPbcore::Conversions
@@ -9,7 +13,7 @@ class Document < ActiveFedora::OmDatastream
9
13
  t.root(:path=>"pbcoreDescriptionDocument")
10
14
 
11
15
  t.pbc_id(:path=>"pbcoreIdentifier",
12
- :attributes=>{ :source=>"Rock and Roll Hall of Fame and Museum", :annotation=>"PID" }
16
+ :attributes=>{ :source=>self.institution, :annotation=>"PID" }
13
17
  )
14
18
 
15
19
  t.title(:path=>"pbcoreTitle", :attributes=>{ :titleType=>"Main" }, :index_as => [:searchable, :displayable])
@@ -42,7 +46,7 @@ class Document < ActiveFedora::OmDatastream
42
46
  :index_as => [:displayable]
43
47
  )
44
48
  t.rh_subject(:path=>"pbcoreSubject",
45
- :attributes=>{ :source=>"Rock and Roll Hall of Fame and Museum" },
49
+ :attributes=>{ :source=>self.institution },
46
50
  :index_as => [:displayable]
47
51
  )
48
52
 
@@ -134,7 +138,7 @@ class Document < ActiveFedora::OmDatastream
134
138
  t.contributor(:path=>"pbcoreContributor") do
135
139
  t.name_(:path=>"contributor", :index_as => [:searchable, :facetable])
136
140
  t.role_(:path=>"contributorRole",
137
- :attributes=>{ :source=>"MARC relator terms" },
141
+ :attributes=>{ :source=>self.relator },
138
142
  :index_as => [:searchable, :displayable]
139
143
  )
140
144
  end
@@ -164,7 +168,7 @@ class Document < ActiveFedora::OmDatastream
164
168
  xml.pbcoreDescriptionDocument("xmlns:xsi"=>"http://www.w3.org/2001/XMLSchema-instance",
165
169
  "xsi:schemaLocation"=>"http://www.pbcore.org/PBCore/PBCoreNamespace.html") {
166
170
 
167
- xml.pbcoreIdentifier(:source=>"Rock and Roll Hall of Fame and Museum", :annotation=>"PID")
171
+ xml.pbcoreIdentifier(:source=>self.institution, :annotation=>"PID")
168
172
  xml.pbcoreTitle(:titleType=>"Main")
169
173
  xml.pbcoreDescription(:descriptionType=>"Description",
170
174
  :descriptionTypeSource=>"pbcoreDescription/descriptionType",
@@ -1,6 +1,10 @@
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
+
4
8
  include HydraPbcore::Methods
5
9
  include HydraPbcore::Templates
6
10
  include HydraPbcore::Conversions
@@ -13,7 +17,7 @@ class Instantiation < ActiveFedora::OmDatastream
13
17
  :path => "instantiationIdentifier",
14
18
  :attributes=>{
15
19
  :annotation=>"Filename",
16
- :source=>"Rock and Roll Hall of Fame and Museum"
20
+ :source=>self.institution
17
21
  },
18
22
  :index_as => [:displayable]
19
23
  )
@@ -21,7 +25,7 @@ class Instantiation < ActiveFedora::OmDatastream
21
25
  :path => "instantiationIdentifier",
22
26
  :attributes=>{
23
27
  :annotation=>"Barcode",
24
- :source=>"Rock and Roll Hall of Fame and Museum"
28
+ :source=>self.institution
25
29
  },
26
30
  :index_as => [:displayable]
27
31
  )
@@ -90,7 +94,7 @@ class Instantiation < ActiveFedora::OmDatastream
90
94
  )
91
95
 
92
96
  t.instantiationRelation do
93
- t.instantiationRelationIdentifier(:attributes=>{ :source=>"Rock and Roll Hall of Fame and Museum" })
97
+ t.instantiationRelationIdentifier(:attributes=>{ :source=>self.institution })
94
98
  end
95
99
  # The file we're describing at the root of this document preceeds the file marked "next"
96
100
  t.next_inst(:ref => [:pbcoreInstantiation, :instantiationRelation],
@@ -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=>"MARC relator terms")
24
+ xml.contributorRole(role, :source=>self.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=>"Rock and Roll Hall of Fame and Museum")
33
+ xml.instantiationRelationIdentifier(file, :source=>self.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=>"Rock and Roll Hall of Fame and Museum")
42
+ xml.instantiationRelationIdentifier(file, :source=>self.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=>"Rock and Roll Hall of Fame and Museum")
111
+ xml.instantiationIdentifier(:annotation=>"Filename", :source=>self.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=>"Rock and Roll Hall of Fame and Museum")
166
+ xml.instantiationIdentifier(:annotation=>"Barcode", :source=>self.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 "Rock and Roll Hall of Fame and Museum,\n2809 Woodland Ave.,\nCleveland, OH, 44115\n216-515-1956\nlibrary@rockhall.org"
171
+ xml.text self.address
172
172
  }
173
173
  xml.instantiationMediaType(:source=>"PBCore instantiationMediaType") {
174
174
  xml.text "Moving image"
@@ -1,3 +1,3 @@
1
1
  module HydraPbcore
2
- VERSION = "2.1.0"
2
+ VERSION = "2.2.0rc1"
3
3
  end
@@ -4,6 +4,11 @@ describe HydraPbcore::Templates do
4
4
 
5
5
  before :each do
6
6
  class TestClass
7
+
8
+ class_attribute :institution, :relator, :address
9
+ self.institution = "Rock and Roll Hall of Fame and Museum"
10
+ self.relator = "MARC relator terms"
11
+ self.address = "Rock and Roll Hall of Fame and Museum,\n2809 Woodland Ave.,\nCleveland, OH, 44115\n216-515-1956\nlibrary@rockhall.org"
7
12
 
8
13
  def self.define_template arg
9
14
  end
metadata CHANGED
@@ -1,8 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hydra-pbcore
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
5
- prerelease:
4
+ version: 2.2.0rc1
5
+ prerelease: 5
6
6
  platform: ruby
7
7
  authors:
8
8
  - Adam Wead
@@ -202,16 +202,13 @@ required_ruby_version: !ruby/object:Gem::Requirement
202
202
  version: '0'
203
203
  segments:
204
204
  - 0
205
- hash: 3521105165021581431
205
+ hash: 3789772575956433522
206
206
  required_rubygems_version: !ruby/object:Gem::Requirement
207
207
  none: false
208
208
  requirements:
209
- - - ! '>='
209
+ - - ! '>'
210
210
  - !ruby/object:Gem::Version
211
- version: '0'
212
- segments:
213
- - 0
214
- hash: 3521105165021581431
211
+ version: 1.3.1
215
212
  requirements: []
216
213
  rubyforge_project:
217
214
  rubygems_version: 1.8.24