hydra-pbcore 3.0.1 → 3.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/lib/hydra_pbcore/datastream/document.rb +6 -6
- data/lib/hydra_pbcore/datastream/instantiation.rb +3 -3
- data/lib/hydra_pbcore/templates.rb +12 -6
- data/lib/hydra_pbcore/version.rb +1 -1
- data/spec/fixtures/digital_instantiation_solr.xml +36 -0
- data/spec/fixtures/document_solr.xml +48 -0
- data/spec/fixtures/physical_instantiation_solr.xml +36 -0
- data/spec/templates_spec.rb +40 -0
- metadata +3 -3
data/Gemfile.lock
CHANGED
@@ -26,7 +26,7 @@ class Document < ActiveFedora::OmDatastream
|
|
26
26
|
)
|
27
27
|
|
28
28
|
# This is only to display all subjects
|
29
|
-
t.subject(:path=>"pbcoreSubject", :index_as => [:facetable])
|
29
|
+
t.subject(:path=>"pbcoreSubject", :index_as => [:displayable, :facetable])
|
30
30
|
|
31
31
|
# Individual subject types defined for entry
|
32
32
|
t.lc_subject(:path=>"pbcoreSubject",
|
@@ -68,9 +68,9 @@ class Document < ActiveFedora::OmDatastream
|
|
68
68
|
)
|
69
69
|
|
70
70
|
# This is only to display all genres
|
71
|
-
t.genre(:path=>"pbcoreGenre", :index_as => [:facetable])
|
71
|
+
t.genre(:path=>"pbcoreGenre", :index_as => [:displayable, :facetable])
|
72
72
|
|
73
|
-
t.asset_type(:path=>"pbcoreAssetType", :index_as => [:searchable, :facetable])
|
73
|
+
t.asset_type(:path=>"pbcoreAssetType", :index_as => [:searchable, :displayable, :facetable])
|
74
74
|
|
75
75
|
# Individual genre types defined for entry
|
76
76
|
t.getty_genre(:path=>"pbcoreGenre",
|
@@ -126,7 +126,7 @@ class Document < ActiveFedora::OmDatastream
|
|
126
126
|
t.name_(:path=>"creator")
|
127
127
|
t.role_(:path=>"creatorRole", :attributes=>{ :source=>"PBCore creatorRole" })
|
128
128
|
end
|
129
|
-
t.creator_name(:ref=>[:creator, :name], :index_as => [:searchable, :facetable])
|
129
|
+
t.creator_name(:ref=>[:creator, :name], :index_as => [:searchable, :displayable, :facetable])
|
130
130
|
t.creator_role(:ref=>[:creator, :role], :index_as => [:searchable, :displayable])
|
131
131
|
|
132
132
|
# Contributor names and roles
|
@@ -134,7 +134,7 @@ class Document < ActiveFedora::OmDatastream
|
|
134
134
|
t.name_(:path=>"contributor")
|
135
135
|
t.role_(:path=>"contributorRole", :attributes=>{ :source=>HydraPbcore.config["relator"] })
|
136
136
|
end
|
137
|
-
t.contributor_name(:ref=>[:contributor, :name], :index_as => [:searchable, :facetable])
|
137
|
+
t.contributor_name(:ref=>[:contributor, :name], :index_as => [:searchable, :displayable, :facetable])
|
138
138
|
t.contributor_role(:ref=>[:contributor, :role], :index_as => [:searchable, :displayable])
|
139
139
|
|
140
140
|
# Publisher names and roles
|
@@ -142,7 +142,7 @@ class Document < ActiveFedora::OmDatastream
|
|
142
142
|
t.name_(:path=>"publisher")
|
143
143
|
t.role_(:path=>"publisherRole", :attributes=>{ :source=>"PBCore publisherRole" })
|
144
144
|
end
|
145
|
-
t.publisher_name(:ref=>[:publisher, :name], :index_as => [:searchable, :facetable])
|
145
|
+
t.publisher_name(:ref=>[:publisher, :name], :index_as => [:searchable, :displayable, :facetable])
|
146
146
|
t.publisher_role(:ref=>[:publisher, :role], :index_as => [:searchable, :displayable])
|
147
147
|
|
148
148
|
t.note(:path=>"pbcoreAnnotation", :atttributes=>{ :annotationType=>"Notes" }, :index_as => [:searchable, :displayable])
|
@@ -28,10 +28,10 @@ class Instantiation < ActiveFedora::OmDatastream
|
|
28
28
|
:index_as => [:dateable, :displayable]
|
29
29
|
)
|
30
30
|
t.instantiationDigital(:attributes=>{ :source=>"EBU file formats" },
|
31
|
-
:index_as => [:searchable, :facetable]
|
31
|
+
:index_as => [:searchable, :displayable, :facetable]
|
32
32
|
)
|
33
33
|
t.instantiationPhysical(:attributes=>{ :source=>"PBCore instantiationPhysical" },
|
34
|
-
:index_as => [:searchable, :facetable]
|
34
|
+
:index_as => [:searchable, :displayable, :facetable]
|
35
35
|
)
|
36
36
|
t.instantiationStandard(:index_as => [:displayable])
|
37
37
|
t.instantiationLocation(:index_as => [:displayable])
|
@@ -45,7 +45,7 @@ class Instantiation < ActiveFedora::OmDatastream
|
|
45
45
|
:index_as => [:displayable]
|
46
46
|
)
|
47
47
|
t.instantiationMediaType(:attributes=>{ :source=>"PBCore instantiationMediaType" },
|
48
|
-
:index_as => [:facetable]
|
48
|
+
:index_as => [:displayable, :facetable]
|
49
49
|
)
|
50
50
|
t.instantiationLanguage(
|
51
51
|
:attributes=>{
|
@@ -52,9 +52,9 @@ module HydraPbcore::Templates
|
|
52
52
|
}
|
53
53
|
end
|
54
54
|
|
55
|
-
define_template :event_date do |xml, date|
|
55
|
+
define_template :event_date do |xml, date, type="Event Date"|
|
56
56
|
xml.pbcoreCoverage {
|
57
|
-
xml.coverage(date, :annotation=>
|
57
|
+
xml.coverage(date, :annotation=>type)
|
58
58
|
xml.coverageType {
|
59
59
|
xml.text "Temporal"
|
60
60
|
}
|
@@ -91,12 +91,18 @@ module HydraPbcore::Templates
|
|
91
91
|
add_child_node(find_by_terms(:pbcoreInstantiation).first, :previous, file)
|
92
92
|
end
|
93
93
|
|
94
|
-
|
95
|
-
|
94
|
+
# Create a pbcoreCoverage node with related subnodes for a place.
|
95
|
+
# @param location the location to insert into the coverage node
|
96
|
+
# @param type (optional) the annotation for the coverage node
|
97
|
+
def insert_place(location, *type)
|
98
|
+
add_child_node(ng_xml.root, :event_place, location, *type)
|
96
99
|
end
|
97
100
|
|
98
|
-
|
99
|
-
|
101
|
+
# Create a pbcoreCoverage node with related subnodes for a date.
|
102
|
+
# @param date the date to insert into the coverage node
|
103
|
+
# @param type (optional) the annotation for the coverage node
|
104
|
+
def insert_date(date, *type)
|
105
|
+
add_child_node(ng_xml.root, :event_date, date, *type)
|
100
106
|
end
|
101
107
|
|
102
108
|
def insert_relation(value, annotation)
|
data/lib/hydra_pbcore/version.rb
CHANGED
@@ -21,12 +21,18 @@
|
|
21
21
|
<pbcoreInstantiation-instantiationDigital-teim type="array">
|
22
22
|
<pbcoreInstantiation-instantiationDigital-teim>file_format</pbcoreInstantiation-instantiationDigital-teim>
|
23
23
|
</pbcoreInstantiation-instantiationDigital-teim>
|
24
|
+
<pbcoreInstantiation-instantiationDigital-ssm type="array">
|
25
|
+
<pbcoreInstantiation-instantiationDigital-ssm>file_format</pbcoreInstantiation-instantiationDigital-ssm>
|
26
|
+
</pbcoreInstantiation-instantiationDigital-ssm>
|
24
27
|
<pbcoreInstantiation-instantiationDigital-sim type="array">
|
25
28
|
<pbcoreInstantiation-instantiationDigital-sim>file_format</pbcoreInstantiation-instantiationDigital-sim>
|
26
29
|
</pbcoreInstantiation-instantiationDigital-sim>
|
27
30
|
<pbcoreInstantiation-0-instantiationDigital-teim type="array">
|
28
31
|
<pbcoreInstantiation-0-instantiationDigital-teim>file_format</pbcoreInstantiation-0-instantiationDigital-teim>
|
29
32
|
</pbcoreInstantiation-0-instantiationDigital-teim>
|
33
|
+
<pbcoreInstantiation-0-instantiationDigital-ssm type="array">
|
34
|
+
<pbcoreInstantiation-0-instantiationDigital-ssm>file_format</pbcoreInstantiation-0-instantiationDigital-ssm>
|
35
|
+
</pbcoreInstantiation-0-instantiationDigital-ssm>
|
30
36
|
<pbcoreInstantiation-0-instantiationDigital-sim type="array">
|
31
37
|
<pbcoreInstantiation-0-instantiationDigital-sim>file_format</pbcoreInstantiation-0-instantiationDigital-sim>
|
32
38
|
</pbcoreInstantiation-0-instantiationDigital-sim>
|
@@ -60,9 +66,15 @@
|
|
60
66
|
<pbcoreInstantiation-0-instantiationColors-ssm type="array">
|
61
67
|
<pbcoreInstantiation-0-instantiationColors-ssm>colors</pbcoreInstantiation-0-instantiationColors-ssm>
|
62
68
|
</pbcoreInstantiation-0-instantiationColors-ssm>
|
69
|
+
<pbcoreInstantiation-instantiationMediaType-ssm type="array">
|
70
|
+
<pbcoreInstantiation-instantiationMediaType-ssm>media_type</pbcoreInstantiation-instantiationMediaType-ssm>
|
71
|
+
</pbcoreInstantiation-instantiationMediaType-ssm>
|
63
72
|
<pbcoreInstantiation-instantiationMediaType-sim type="array">
|
64
73
|
<pbcoreInstantiation-instantiationMediaType-sim>media_type</pbcoreInstantiation-instantiationMediaType-sim>
|
65
74
|
</pbcoreInstantiation-instantiationMediaType-sim>
|
75
|
+
<pbcoreInstantiation-0-instantiationMediaType-ssm type="array">
|
76
|
+
<pbcoreInstantiation-0-instantiationMediaType-ssm>media_type</pbcoreInstantiation-0-instantiationMediaType-ssm>
|
77
|
+
</pbcoreInstantiation-0-instantiationMediaType-ssm>
|
66
78
|
<pbcoreInstantiation-0-instantiationMediaType-sim type="array">
|
67
79
|
<pbcoreInstantiation-0-instantiationMediaType-sim>media_type</pbcoreInstantiation-0-instantiationMediaType-sim>
|
68
80
|
</pbcoreInstantiation-0-instantiationMediaType-sim>
|
@@ -386,21 +398,33 @@
|
|
386
398
|
<pbcoreInstantiation-0-generation-ssm type="array">
|
387
399
|
<pbcoreInstantiation-0-generation-ssm>generation</pbcoreInstantiation-0-generation-ssm>
|
388
400
|
</pbcoreInstantiation-0-generation-ssm>
|
401
|
+
<pbcoreInstantiation-media-type-ssm type="array">
|
402
|
+
<pbcoreInstantiation-media-type-ssm>media_type</pbcoreInstantiation-media-type-ssm>
|
403
|
+
</pbcoreInstantiation-media-type-ssm>
|
389
404
|
<pbcoreInstantiation-media-type-sim type="array">
|
390
405
|
<pbcoreInstantiation-media-type-sim>media_type</pbcoreInstantiation-media-type-sim>
|
391
406
|
</pbcoreInstantiation-media-type-sim>
|
407
|
+
<pbcoreInstantiation-0-media-type-ssm type="array">
|
408
|
+
<pbcoreInstantiation-0-media-type-ssm>media_type</pbcoreInstantiation-0-media-type-ssm>
|
409
|
+
</pbcoreInstantiation-0-media-type-ssm>
|
392
410
|
<pbcoreInstantiation-0-media-type-sim type="array">
|
393
411
|
<pbcoreInstantiation-0-media-type-sim>media_type</pbcoreInstantiation-0-media-type-sim>
|
394
412
|
</pbcoreInstantiation-0-media-type-sim>
|
395
413
|
<pbcoreInstantiation-file-format-teim type="array">
|
396
414
|
<pbcoreInstantiation-file-format-teim>file_format</pbcoreInstantiation-file-format-teim>
|
397
415
|
</pbcoreInstantiation-file-format-teim>
|
416
|
+
<pbcoreInstantiation-file-format-ssm type="array">
|
417
|
+
<pbcoreInstantiation-file-format-ssm>file_format</pbcoreInstantiation-file-format-ssm>
|
418
|
+
</pbcoreInstantiation-file-format-ssm>
|
398
419
|
<pbcoreInstantiation-file-format-sim type="array">
|
399
420
|
<pbcoreInstantiation-file-format-sim>file_format</pbcoreInstantiation-file-format-sim>
|
400
421
|
</pbcoreInstantiation-file-format-sim>
|
401
422
|
<pbcoreInstantiation-0-file-format-teim type="array">
|
402
423
|
<pbcoreInstantiation-0-file-format-teim>file_format</pbcoreInstantiation-0-file-format-teim>
|
403
424
|
</pbcoreInstantiation-0-file-format-teim>
|
425
|
+
<pbcoreInstantiation-0-file-format-ssm type="array">
|
426
|
+
<pbcoreInstantiation-0-file-format-ssm>file_format</pbcoreInstantiation-0-file-format-ssm>
|
427
|
+
</pbcoreInstantiation-0-file-format-ssm>
|
404
428
|
<pbcoreInstantiation-0-file-format-sim type="array">
|
405
429
|
<pbcoreInstantiation-0-file-format-sim>file_format</pbcoreInstantiation-0-file-format-sim>
|
406
430
|
</pbcoreInstantiation-0-file-format-sim>
|
@@ -620,6 +644,9 @@
|
|
620
644
|
<instantiationDigital-teim type="array">
|
621
645
|
<instantiationDigital-teim>file_format</instantiationDigital-teim>
|
622
646
|
</instantiationDigital-teim>
|
647
|
+
<instantiationDigital-ssm type="array">
|
648
|
+
<instantiationDigital-ssm>file_format</instantiationDigital-ssm>
|
649
|
+
</instantiationDigital-ssm>
|
623
650
|
<instantiationDigital-sim type="array">
|
624
651
|
<instantiationDigital-sim>file_format</instantiationDigital-sim>
|
625
652
|
</instantiationDigital-sim>
|
@@ -641,6 +668,9 @@
|
|
641
668
|
<instantiationColors-ssm type="array">
|
642
669
|
<instantiationColors-ssm>colors</instantiationColors-ssm>
|
643
670
|
</instantiationColors-ssm>
|
671
|
+
<instantiationMediaType-ssm type="array">
|
672
|
+
<instantiationMediaType-ssm>media_type</instantiationMediaType-ssm>
|
673
|
+
</instantiationMediaType-ssm>
|
644
674
|
<instantiationMediaType-sim type="array">
|
645
675
|
<instantiationMediaType-sim>media_type</instantiationMediaType-sim>
|
646
676
|
</instantiationMediaType-sim>
|
@@ -898,12 +928,18 @@
|
|
898
928
|
<generation-ssm type="array">
|
899
929
|
<generation-ssm>generation</generation-ssm>
|
900
930
|
</generation-ssm>
|
931
|
+
<media-type-ssm type="array">
|
932
|
+
<media-type-ssm>media_type</media-type-ssm>
|
933
|
+
</media-type-ssm>
|
901
934
|
<media-type-sim type="array">
|
902
935
|
<media-type-sim>media_type</media-type-sim>
|
903
936
|
</media-type-sim>
|
904
937
|
<file-format-teim type="array">
|
905
938
|
<file-format-teim>file_format</file-format-teim>
|
906
939
|
</file-format-teim>
|
940
|
+
<file-format-ssm type="array">
|
941
|
+
<file-format-ssm>file_format</file-format-ssm>
|
942
|
+
</file-format-ssm>
|
907
943
|
<file-format-sim type="array">
|
908
944
|
<file-format-sim>file_format</file-format-sim>
|
909
945
|
</file-format-sim>
|
@@ -110,11 +110,21 @@
|
|
110
110
|
<pbcoreDescriptionDocument-0-translation-ssm type="array">
|
111
111
|
<pbcoreDescriptionDocument-0-translation-ssm>inserted</pbcoreDescriptionDocument-0-translation-ssm>
|
112
112
|
</pbcoreDescriptionDocument-0-translation-ssm>
|
113
|
+
<pbcoreDescriptionDocument-subject-ssm type="array">
|
114
|
+
<pbcoreDescriptionDocument-subject-ssm>inserted</pbcoreDescriptionDocument-subject-ssm>
|
115
|
+
<pbcoreDescriptionDocument-subject-ssm>inserted</pbcoreDescriptionDocument-subject-ssm>
|
116
|
+
<pbcoreDescriptionDocument-subject-ssm>inserted</pbcoreDescriptionDocument-subject-ssm>
|
117
|
+
</pbcoreDescriptionDocument-subject-ssm>
|
113
118
|
<pbcoreDescriptionDocument-subject-sim type="array">
|
114
119
|
<pbcoreDescriptionDocument-subject-sim>inserted</pbcoreDescriptionDocument-subject-sim>
|
115
120
|
<pbcoreDescriptionDocument-subject-sim>inserted</pbcoreDescriptionDocument-subject-sim>
|
116
121
|
<pbcoreDescriptionDocument-subject-sim>inserted</pbcoreDescriptionDocument-subject-sim>
|
117
122
|
</pbcoreDescriptionDocument-subject-sim>
|
123
|
+
<pbcoreDescriptionDocument-0-subject-ssm type="array">
|
124
|
+
<pbcoreDescriptionDocument-0-subject-ssm>inserted</pbcoreDescriptionDocument-0-subject-ssm>
|
125
|
+
<pbcoreDescriptionDocument-0-subject-ssm>inserted</pbcoreDescriptionDocument-0-subject-ssm>
|
126
|
+
<pbcoreDescriptionDocument-0-subject-ssm>inserted</pbcoreDescriptionDocument-0-subject-ssm>
|
127
|
+
</pbcoreDescriptionDocument-0-subject-ssm>
|
118
128
|
<pbcoreDescriptionDocument-0-subject-sim type="array">
|
119
129
|
<pbcoreDescriptionDocument-0-subject-sim>inserted</pbcoreDescriptionDocument-0-subject-sim>
|
120
130
|
<pbcoreDescriptionDocument-0-subject-sim>inserted</pbcoreDescriptionDocument-0-subject-sim>
|
@@ -162,11 +172,21 @@
|
|
162
172
|
<pbcoreDescriptionDocument-0-contents-ssm type="array">
|
163
173
|
<pbcoreDescriptionDocument-0-contents-ssm>inserted</pbcoreDescriptionDocument-0-contents-ssm>
|
164
174
|
</pbcoreDescriptionDocument-0-contents-ssm>
|
175
|
+
<pbcoreDescriptionDocument-genre-ssm type="array">
|
176
|
+
<pbcoreDescriptionDocument-genre-ssm>inserted</pbcoreDescriptionDocument-genre-ssm>
|
177
|
+
<pbcoreDescriptionDocument-genre-ssm>inserted</pbcoreDescriptionDocument-genre-ssm>
|
178
|
+
<pbcoreDescriptionDocument-genre-ssm>inserted</pbcoreDescriptionDocument-genre-ssm>
|
179
|
+
</pbcoreDescriptionDocument-genre-ssm>
|
165
180
|
<pbcoreDescriptionDocument-genre-sim type="array">
|
166
181
|
<pbcoreDescriptionDocument-genre-sim>inserted</pbcoreDescriptionDocument-genre-sim>
|
167
182
|
<pbcoreDescriptionDocument-genre-sim>inserted</pbcoreDescriptionDocument-genre-sim>
|
168
183
|
<pbcoreDescriptionDocument-genre-sim>inserted</pbcoreDescriptionDocument-genre-sim>
|
169
184
|
</pbcoreDescriptionDocument-genre-sim>
|
185
|
+
<pbcoreDescriptionDocument-0-genre-ssm type="array">
|
186
|
+
<pbcoreDescriptionDocument-0-genre-ssm>inserted</pbcoreDescriptionDocument-0-genre-ssm>
|
187
|
+
<pbcoreDescriptionDocument-0-genre-ssm>inserted</pbcoreDescriptionDocument-0-genre-ssm>
|
188
|
+
<pbcoreDescriptionDocument-0-genre-ssm>inserted</pbcoreDescriptionDocument-0-genre-ssm>
|
189
|
+
</pbcoreDescriptionDocument-0-genre-ssm>
|
170
190
|
<pbcoreDescriptionDocument-0-genre-sim type="array">
|
171
191
|
<pbcoreDescriptionDocument-0-genre-sim>inserted</pbcoreDescriptionDocument-0-genre-sim>
|
172
192
|
<pbcoreDescriptionDocument-0-genre-sim>inserted</pbcoreDescriptionDocument-0-genre-sim>
|
@@ -175,12 +195,18 @@
|
|
175
195
|
<pbcoreDescriptionDocument-asset-type-teim type="array">
|
176
196
|
<pbcoreDescriptionDocument-asset-type-teim>Scene</pbcoreDescriptionDocument-asset-type-teim>
|
177
197
|
</pbcoreDescriptionDocument-asset-type-teim>
|
198
|
+
<pbcoreDescriptionDocument-asset-type-ssm type="array">
|
199
|
+
<pbcoreDescriptionDocument-asset-type-ssm>Scene</pbcoreDescriptionDocument-asset-type-ssm>
|
200
|
+
</pbcoreDescriptionDocument-asset-type-ssm>
|
178
201
|
<pbcoreDescriptionDocument-asset-type-sim type="array">
|
179
202
|
<pbcoreDescriptionDocument-asset-type-sim>Scene</pbcoreDescriptionDocument-asset-type-sim>
|
180
203
|
</pbcoreDescriptionDocument-asset-type-sim>
|
181
204
|
<pbcoreDescriptionDocument-0-asset-type-teim type="array">
|
182
205
|
<pbcoreDescriptionDocument-0-asset-type-teim>Scene</pbcoreDescriptionDocument-0-asset-type-teim>
|
183
206
|
</pbcoreDescriptionDocument-0-asset-type-teim>
|
207
|
+
<pbcoreDescriptionDocument-0-asset-type-ssm type="array">
|
208
|
+
<pbcoreDescriptionDocument-0-asset-type-ssm>Scene</pbcoreDescriptionDocument-0-asset-type-ssm>
|
209
|
+
</pbcoreDescriptionDocument-0-asset-type-ssm>
|
184
210
|
<pbcoreDescriptionDocument-0-asset-type-sim type="array">
|
185
211
|
<pbcoreDescriptionDocument-0-asset-type-sim>Scene</pbcoreDescriptionDocument-0-asset-type-sim>
|
186
212
|
</pbcoreDescriptionDocument-0-asset-type-sim>
|
@@ -297,6 +323,11 @@
|
|
297
323
|
<translation-ssm type="array">
|
298
324
|
<translation-ssm>inserted</translation-ssm>
|
299
325
|
</translation-ssm>
|
326
|
+
<subject-ssm type="array">
|
327
|
+
<subject-ssm>inserted</subject-ssm>
|
328
|
+
<subject-ssm>inserted</subject-ssm>
|
329
|
+
<subject-ssm>inserted</subject-ssm>
|
330
|
+
</subject-ssm>
|
300
331
|
<subject-sim type="array">
|
301
332
|
<subject-sim>inserted</subject-sim>
|
302
333
|
<subject-sim>inserted</subject-sim>
|
@@ -323,6 +354,11 @@
|
|
323
354
|
<contents-ssm type="array">
|
324
355
|
<contents-ssm>inserted</contents-ssm>
|
325
356
|
</contents-ssm>
|
357
|
+
<genre-ssm type="array">
|
358
|
+
<genre-ssm>inserted</genre-ssm>
|
359
|
+
<genre-ssm>inserted</genre-ssm>
|
360
|
+
<genre-ssm>inserted</genre-ssm>
|
361
|
+
</genre-ssm>
|
326
362
|
<genre-sim type="array">
|
327
363
|
<genre-sim>inserted</genre-sim>
|
328
364
|
<genre-sim>inserted</genre-sim>
|
@@ -331,6 +367,9 @@
|
|
331
367
|
<asset-type-teim type="array">
|
332
368
|
<asset-type-teim>Scene</asset-type-teim>
|
333
369
|
</asset-type-teim>
|
370
|
+
<asset-type-ssm type="array">
|
371
|
+
<asset-type-ssm>Scene</asset-type-ssm>
|
372
|
+
</asset-type-ssm>
|
334
373
|
<asset-type-sim type="array">
|
335
374
|
<asset-type-sim>Scene</asset-type-sim>
|
336
375
|
</asset-type-sim>
|
@@ -398,6 +437,11 @@
|
|
398
437
|
<contributor-name-teim>inserted</contributor-name-teim>
|
399
438
|
<contributor-name-teim></contributor-name-teim>
|
400
439
|
</contributor-name-teim>
|
440
|
+
<contributor-name-ssm type="array">
|
441
|
+
<contributor-name-ssm>inserted</contributor-name-ssm>
|
442
|
+
<contributor-name-ssm>inserted</contributor-name-ssm>
|
443
|
+
<contributor-name-ssm></contributor-name-ssm>
|
444
|
+
</contributor-name-ssm>
|
401
445
|
<contributor-name-sim type="array">
|
402
446
|
<contributor-name-sim>inserted</contributor-name-sim>
|
403
447
|
<contributor-name-sim>inserted</contributor-name-sim>
|
@@ -417,6 +461,10 @@
|
|
417
461
|
<publisher-name-teim>inserted</publisher-name-teim>
|
418
462
|
<publisher-name-teim>inserted</publisher-name-teim>
|
419
463
|
</publisher-name-teim>
|
464
|
+
<publisher-name-ssm type="array">
|
465
|
+
<publisher-name-ssm>inserted</publisher-name-ssm>
|
466
|
+
<publisher-name-ssm>inserted</publisher-name-ssm>
|
467
|
+
</publisher-name-ssm>
|
420
468
|
<publisher-name-sim type="array">
|
421
469
|
<publisher-name-sim>inserted</publisher-name-sim>
|
422
470
|
<publisher-name-sim>inserted</publisher-name-sim>
|
@@ -27,12 +27,18 @@
|
|
27
27
|
<pbcoreInstantiation-instantiationPhysical-teim type="array">
|
28
28
|
<pbcoreInstantiation-instantiationPhysical-teim>format</pbcoreInstantiation-instantiationPhysical-teim>
|
29
29
|
</pbcoreInstantiation-instantiationPhysical-teim>
|
30
|
+
<pbcoreInstantiation-instantiationPhysical-ssm type="array">
|
31
|
+
<pbcoreInstantiation-instantiationPhysical-ssm>format</pbcoreInstantiation-instantiationPhysical-ssm>
|
32
|
+
</pbcoreInstantiation-instantiationPhysical-ssm>
|
30
33
|
<pbcoreInstantiation-instantiationPhysical-sim type="array">
|
31
34
|
<pbcoreInstantiation-instantiationPhysical-sim>format</pbcoreInstantiation-instantiationPhysical-sim>
|
32
35
|
</pbcoreInstantiation-instantiationPhysical-sim>
|
33
36
|
<pbcoreInstantiation-0-instantiationPhysical-teim type="array">
|
34
37
|
<pbcoreInstantiation-0-instantiationPhysical-teim>format</pbcoreInstantiation-0-instantiationPhysical-teim>
|
35
38
|
</pbcoreInstantiation-0-instantiationPhysical-teim>
|
39
|
+
<pbcoreInstantiation-0-instantiationPhysical-ssm type="array">
|
40
|
+
<pbcoreInstantiation-0-instantiationPhysical-ssm>format</pbcoreInstantiation-0-instantiationPhysical-ssm>
|
41
|
+
</pbcoreInstantiation-0-instantiationPhysical-ssm>
|
36
42
|
<pbcoreInstantiation-0-instantiationPhysical-sim type="array">
|
37
43
|
<pbcoreInstantiation-0-instantiationPhysical-sim>format</pbcoreInstantiation-0-instantiationPhysical-sim>
|
38
44
|
</pbcoreInstantiation-0-instantiationPhysical-sim>
|
@@ -60,9 +66,15 @@
|
|
60
66
|
<pbcoreInstantiation-0-instantiationColors-ssm type="array">
|
61
67
|
<pbcoreInstantiation-0-instantiationColors-ssm>colors</pbcoreInstantiation-0-instantiationColors-ssm>
|
62
68
|
</pbcoreInstantiation-0-instantiationColors-ssm>
|
69
|
+
<pbcoreInstantiation-instantiationMediaType-ssm type="array">
|
70
|
+
<pbcoreInstantiation-instantiationMediaType-ssm>media_type</pbcoreInstantiation-instantiationMediaType-ssm>
|
71
|
+
</pbcoreInstantiation-instantiationMediaType-ssm>
|
63
72
|
<pbcoreInstantiation-instantiationMediaType-sim type="array">
|
64
73
|
<pbcoreInstantiation-instantiationMediaType-sim>media_type</pbcoreInstantiation-instantiationMediaType-sim>
|
65
74
|
</pbcoreInstantiation-instantiationMediaType-sim>
|
75
|
+
<pbcoreInstantiation-0-instantiationMediaType-ssm type="array">
|
76
|
+
<pbcoreInstantiation-0-instantiationMediaType-ssm>media_type</pbcoreInstantiation-0-instantiationMediaType-ssm>
|
77
|
+
</pbcoreInstantiation-0-instantiationMediaType-ssm>
|
66
78
|
<pbcoreInstantiation-0-instantiationMediaType-sim type="array">
|
67
79
|
<pbcoreInstantiation-0-instantiationMediaType-sim>media_type</pbcoreInstantiation-0-instantiationMediaType-sim>
|
68
80
|
</pbcoreInstantiation-0-instantiationMediaType-sim>
|
@@ -138,21 +150,33 @@
|
|
138
150
|
<pbcoreInstantiation-0-generation-ssm type="array">
|
139
151
|
<pbcoreInstantiation-0-generation-ssm>generation</pbcoreInstantiation-0-generation-ssm>
|
140
152
|
</pbcoreInstantiation-0-generation-ssm>
|
153
|
+
<pbcoreInstantiation-media-type-ssm type="array">
|
154
|
+
<pbcoreInstantiation-media-type-ssm>media_type</pbcoreInstantiation-media-type-ssm>
|
155
|
+
</pbcoreInstantiation-media-type-ssm>
|
141
156
|
<pbcoreInstantiation-media-type-sim type="array">
|
142
157
|
<pbcoreInstantiation-media-type-sim>media_type</pbcoreInstantiation-media-type-sim>
|
143
158
|
</pbcoreInstantiation-media-type-sim>
|
159
|
+
<pbcoreInstantiation-0-media-type-ssm type="array">
|
160
|
+
<pbcoreInstantiation-0-media-type-ssm>media_type</pbcoreInstantiation-0-media-type-ssm>
|
161
|
+
</pbcoreInstantiation-0-media-type-ssm>
|
144
162
|
<pbcoreInstantiation-0-media-type-sim type="array">
|
145
163
|
<pbcoreInstantiation-0-media-type-sim>media_type</pbcoreInstantiation-0-media-type-sim>
|
146
164
|
</pbcoreInstantiation-0-media-type-sim>
|
147
165
|
<pbcoreInstantiation-format-teim type="array">
|
148
166
|
<pbcoreInstantiation-format-teim>format</pbcoreInstantiation-format-teim>
|
149
167
|
</pbcoreInstantiation-format-teim>
|
168
|
+
<pbcoreInstantiation-format-ssm type="array">
|
169
|
+
<pbcoreInstantiation-format-ssm>format</pbcoreInstantiation-format-ssm>
|
170
|
+
</pbcoreInstantiation-format-ssm>
|
150
171
|
<pbcoreInstantiation-format-sim type="array">
|
151
172
|
<pbcoreInstantiation-format-sim>format</pbcoreInstantiation-format-sim>
|
152
173
|
</pbcoreInstantiation-format-sim>
|
153
174
|
<pbcoreInstantiation-0-format-teim type="array">
|
154
175
|
<pbcoreInstantiation-0-format-teim>format</pbcoreInstantiation-0-format-teim>
|
155
176
|
</pbcoreInstantiation-0-format-teim>
|
177
|
+
<pbcoreInstantiation-0-format-ssm type="array">
|
178
|
+
<pbcoreInstantiation-0-format-ssm>format</pbcoreInstantiation-0-format-ssm>
|
179
|
+
</pbcoreInstantiation-0-format-ssm>
|
156
180
|
<pbcoreInstantiation-0-format-sim type="array">
|
157
181
|
<pbcoreInstantiation-0-format-sim>format</pbcoreInstantiation-0-format-sim>
|
158
182
|
</pbcoreInstantiation-0-format-sim>
|
@@ -207,6 +231,9 @@
|
|
207
231
|
<instantiationPhysical-teim type="array">
|
208
232
|
<instantiationPhysical-teim>format</instantiationPhysical-teim>
|
209
233
|
</instantiationPhysical-teim>
|
234
|
+
<instantiationPhysical-ssm type="array">
|
235
|
+
<instantiationPhysical-ssm>format</instantiationPhysical-ssm>
|
236
|
+
</instantiationPhysical-ssm>
|
210
237
|
<instantiationPhysical-sim type="array">
|
211
238
|
<instantiationPhysical-sim>format</instantiationPhysical-sim>
|
212
239
|
</instantiationPhysical-sim>
|
@@ -222,6 +249,9 @@
|
|
222
249
|
<instantiationColors-ssm type="array">
|
223
250
|
<instantiationColors-ssm>colors</instantiationColors-ssm>
|
224
251
|
</instantiationColors-ssm>
|
252
|
+
<instantiationMediaType-ssm type="array">
|
253
|
+
<instantiationMediaType-ssm>media_type</instantiationMediaType-ssm>
|
254
|
+
</instantiationMediaType-ssm>
|
225
255
|
<instantiationMediaType-sim type="array">
|
226
256
|
<instantiationMediaType-sim>media_type</instantiationMediaType-sim>
|
227
257
|
</instantiationMediaType-sim>
|
@@ -264,12 +294,18 @@
|
|
264
294
|
<generation-ssm type="array">
|
265
295
|
<generation-ssm>generation</generation-ssm>
|
266
296
|
</generation-ssm>
|
297
|
+
<media-type-ssm type="array">
|
298
|
+
<media-type-ssm>media_type</media-type-ssm>
|
299
|
+
</media-type-ssm>
|
267
300
|
<media-type-sim type="array">
|
268
301
|
<media-type-sim>media_type</media-type-sim>
|
269
302
|
</media-type-sim>
|
270
303
|
<format-teim type="array">
|
271
304
|
<format-teim>format</format-teim>
|
272
305
|
</format-teim>
|
306
|
+
<format-ssm type="array">
|
307
|
+
<format-ssm>format</format-ssm>
|
308
|
+
</format-ssm>
|
273
309
|
<format-sim type="array">
|
274
310
|
<format-sim>format</format-sim>
|
275
311
|
</format-sim>
|
data/spec/templates_spec.rb
CHANGED
@@ -56,4 +56,44 @@ describe HydraPbcore::Templates do
|
|
56
56
|
end
|
57
57
|
end
|
58
58
|
|
59
|
+
describe "#event_date" do
|
60
|
+
it "should take a one arg constructor" do
|
61
|
+
subject.add_child_node(subject.ng_xml.root, :event_date, 'foo')
|
62
|
+
xml.xpath('//pbcoreCoverage/coverage[@annotation="Event Date"]').text.should == "foo"
|
63
|
+
xml.xpath('//pbcoreCoverage/coverageType').text.should == "Temporal"
|
64
|
+
end
|
65
|
+
it "should take a two arg constructor" do
|
66
|
+
subject.add_child_node(subject.ng_xml.root, :event_date, 'foo', 'bar')
|
67
|
+
xml.xpath('//pbcoreCoverage/coverage[@annotation="bar"]').text.should == "foo"
|
68
|
+
xml.xpath('//pbcoreCoverage/coverageType').text.should == "Temporal"
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
|
73
|
+
describe "#insert_place" do
|
74
|
+
it "should take a one arg constructor" do
|
75
|
+
subject.insert_place('foo')
|
76
|
+
xml.xpath('//pbcoreCoverage/coverage[@annotation="Event Place"]').text.should == "foo"
|
77
|
+
xml.xpath('//pbcoreCoverage/coverageType').text.should == "Spatial"
|
78
|
+
end
|
79
|
+
it "should take a two arg constructor" do
|
80
|
+
subject.insert_place('foo', 'bar')
|
81
|
+
xml.xpath('//pbcoreCoverage/coverage[@annotation="bar"]').text.should == "foo"
|
82
|
+
xml.xpath('//pbcoreCoverage/coverageType').text.should == "Spatial"
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
describe "#insert_date" do
|
87
|
+
it "should take a one arg constructor" do
|
88
|
+
subject.insert_date('foo')
|
89
|
+
xml.xpath('//pbcoreCoverage/coverage[@annotation="Event Date"]').text.should == "foo"
|
90
|
+
xml.xpath('//pbcoreCoverage/coverageType').text.should == "Temporal"
|
91
|
+
end
|
92
|
+
it "should take a two arg constructor" do
|
93
|
+
subject.insert_date('foo', 'bar')
|
94
|
+
xml.xpath('//pbcoreCoverage/coverage[@annotation="bar"]').text.should == "foo"
|
95
|
+
xml.xpath('//pbcoreCoverage/coverageType').text.should == "Temporal"
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
59
99
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hydra-pbcore
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -224,7 +224,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
224
224
|
version: '0'
|
225
225
|
segments:
|
226
226
|
- 0
|
227
|
-
hash:
|
227
|
+
hash: -3327218333988344874
|
228
228
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
229
229
|
none: false
|
230
230
|
requirements:
|
@@ -233,7 +233,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
233
233
|
version: '0'
|
234
234
|
segments:
|
235
235
|
- 0
|
236
|
-
hash:
|
236
|
+
hash: -3327218333988344874
|
237
237
|
requirements: []
|
238
238
|
rubyforge_project:
|
239
239
|
rubygems_version: 1.8.23
|