active-fedora 11.0.0.rc6 → 11.0.0.rc7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/active-fedora.gemspec +0 -3
  3. data/lib/active_fedora.rb +0 -10
  4. data/lib/active_fedora/associations/has_many_association.rb +1 -1
  5. data/lib/active_fedora/attributes.rb +1 -1
  6. data/lib/active_fedora/base.rb +3 -7
  7. data/lib/active_fedora/querying.rb +1 -1
  8. data/lib/active_fedora/rdf.rb +0 -1
  9. data/lib/active_fedora/version.rb +1 -1
  10. data/spec/integration/attached_files_spec.rb +14 -4
  11. data/spec/integration/file_spec.rb +22 -23
  12. data/spec/integration/versionable_spec.rb +0 -254
  13. data/spec/spec_helper.rb +0 -7
  14. data/spec/unit/attached_files_spec.rb +10 -7
  15. data/spec/unit/base_spec.rb +3 -1
  16. data/spec/unit/has_many_association_spec.rb +23 -8
  17. data/spec/unit/inheritance_spec.rb +11 -7
  18. data/spec/unit/model_classifier_spec.rb +1 -1
  19. data/spec/unit/rdf/indexing_service_spec.rb +9 -9
  20. data/spec/unit/solr_config_options_spec.rb +12 -15
  21. metadata +2 -67
  22. data/lib/active_fedora/datastreams.rb +0 -6
  23. data/lib/active_fedora/datastreams/nokogiri_datastreams.rb +0 -119
  24. data/lib/active_fedora/nom_datastream.rb +0 -73
  25. data/lib/active_fedora/om_datastream.rb +0 -118
  26. data/lib/active_fedora/qualified_dublin_core_datastream.rb +0 -158
  27. data/lib/active_fedora/rdf/datastream_indexing.rb +0 -49
  28. data/lib/active_fedora/rdf/ntriples_rdf_datastream.rb +0 -13
  29. data/lib/active_fedora/rdf/rdf_datastream.rb +0 -173
  30. data/lib/active_fedora/rdf/rdfxml_datastream.rb +0 -13
  31. data/spec/integration/complex_rdf_datastream_spec.rb +0 -227
  32. data/spec/integration/datastream_rdf_nested_attributes_spec.rb +0 -180
  33. data/spec/integration/ntriples_datastream_spec.rb +0 -215
  34. data/spec/integration/om_datastream_spec.rb +0 -78
  35. data/spec/samples/hydra-mods_article_datastream.rb +0 -515
  36. data/spec/samples/models/mods_article.rb +0 -9
  37. data/spec/samples/samples.rb +0 -2
  38. data/spec/unit/nom_datastream_spec.rb +0 -60
  39. data/spec/unit/ntriples_datastream_spec.rb +0 -167
  40. data/spec/unit/om_datastream_spec.rb +0 -294
  41. data/spec/unit/qualified_dublin_core_datastream_spec.rb +0 -119
  42. data/spec/unit/rdf_datastream_spec.rb +0 -84
  43. data/spec/unit/rdf_resource_datastream_spec.rb +0 -208
  44. data/spec/unit/rdfxml_datastream_spec.rb +0 -106
@@ -1,78 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe ActiveFedora::OmDatastream do
4
- before(:all) do
5
- class ModsArticle2 < ActiveFedora::Base
6
- # Uses the Hydra MODS Article profile for tracking most of the descriptive metadata
7
- has_subresource "descMetadata", class_name: 'Hydra::ModsArticleDatastream'
8
- end
9
- end
10
-
11
- after(:all) do
12
- Object.send(:remove_const, :ModsArticle2)
13
- end
14
-
15
- let(:obj) { ModsArticle2.create.reload }
16
-
17
- after(:each) do
18
- obj.destroy
19
- end
20
-
21
- subject(:desc_metadata) { obj.descMetadata }
22
-
23
- describe "#changed?" do
24
- it "is not changed when no fields have been set" do
25
- expect(desc_metadata).to_not be_content_changed
26
- end
27
- it "is changed when a field has been set" do
28
- desc_metadata.title = 'Foobar'
29
- expect(desc_metadata).to be_content_changed
30
- end
31
- it "is not changed if the new xml matches the old xml" do
32
- desc_metadata.content = desc_metadata.content
33
- expect(desc_metadata).to_not be_content_changed
34
- end
35
-
36
- it "is changed if there are minor differences in whitespace" do
37
- desc_metadata.content = "<a><b>1</b></a>"
38
- obj.save
39
- expect(desc_metadata).to_not be_content_changed
40
- desc_metadata.content = "<a>\n<b>1</b>\n</a>"
41
- expect(desc_metadata).to be_content_changed
42
- end
43
- end
44
-
45
- describe "empty datastream content" do
46
- it "does not break when there is empty datastream content" do
47
- desc_metadata.content = ""
48
- obj.save
49
- end
50
- end
51
-
52
- describe '.update_values' do
53
- before do
54
- desc_metadata.content = File.read(fixture('mods_articles/mods_article1.xml'))
55
- obj.save
56
- obj.reload
57
- end
58
-
59
- it "is not dirty after .update_values is saved" do
60
- obj.descMetadata.update_values([{ name: 0 }, { role: 0 }, :text] => "Funder")
61
- expect(obj.descMetadata).to be_content_changed
62
- obj.save
63
- expect(obj.descMetadata).to_not be_content_changed
64
- expect(obj.descMetadata.term_values({ name: 0 }, { role: 0 }, :text)).to eq ["Funder"]
65
- end
66
- end
67
-
68
- describe ".to_solr" do
69
- before do
70
- desc_metadata.journal.issue.publication_date = Date.parse('2012-11-02')
71
- obj.save!
72
- obj.reload
73
- end
74
- it "solrizes terms with :type=>'date' to *_dt solr terms" do
75
- expect(obj.to_solr[ActiveFedora.index_field_mapper.solr_name('desc_metadata__journal_issue_publication_date', type: :date)]).to eq ['2012-11-02T00:00:00Z']
76
- end
77
- end
78
- end
@@ -1,515 +0,0 @@
1
- module Hydra
2
- # This is an example of a OmDatastream that defines an OM terminology for MODS xml
3
- # It focuses on the aspects of MODS that deal with descriptive metadata for published articles
4
- # This is not the hydra-head plugin version of this OM Terminology; See https://github.com/projecthydra/hydra-head/blob/master/lib/hydra/mods_article.rb
5
- #
6
- # Things to note about the OM Terminology defined here:
7
- #
8
- # * Uses :ref terms to repeat the structures of a mods:name with a different @type on the mods:name element
9
- # * Defines a term lang_code that maps to "languageTerm[@type=code]"
10
- # * Defines a variety of terms, date, last_name, first_name & terms_of_address, that all map to mods:namePart but use varying attributes to distinguish themselves
11
- # * Uses proxy terms to define familar terms like start_page and end_page that map to non-intuitive xml structures "extent[@unit=pages]/start" and "extent[@unit=pages]/end"
12
- # * Uses proxy terms, publication_url, peer_reviewed, and title, to allow convenient access to frequently used terms
13
- #
14
- # Things to note about the additional methods it defines:
15
- #
16
- # * Defines a series of templates, person_template, organization_template, etc. for generating a whole set of xml nodes to insert into the document (note: the new OM::TemplateRegistry provides an even better way to do this)
17
- # * Defines a custom method, insert_contributor, that uses the Terminology to manipulate xml documents in specialized ways
18
- # * Defines a series of relator_term Hashes that can then be used when generating views, etc. In this case, the Hashes are hard-coded into the Class. Ideally, they might be read from a configuration file or mixed into the class using a module
19
- class ModsArticleDatastream < ActiveFedora::OmDatastream
20
- set_terminology do |t|
21
- t.root(path: "mods", xmlns: "http://www.loc.gov/mods/v3", schema: "http://www.loc.gov/standards/mods/v3/mods-3-2.xsd")
22
-
23
- t.title_info(path: "titleInfo") {
24
- t.main_title(index_as: [:facetable], path: "title", label: "title")
25
- t.language(index_as: [:facetable], path: { attribute: "lang" })
26
- }
27
- t.language{
28
- t.lang_code(index_as: [:facetable], path: "languageTerm", attributes: { type: "code" })
29
- }
30
- t.abstract
31
- t.subject {
32
- t.topic(index_as: [:facetable])
33
- }
34
- t.topic_tag(proxy: [:subject, :topic])
35
- # t.topic_tag(:index_as=>[:facetable],:path=>"subject", :default_content_path=>"topic")
36
- # This is a mods:name. The underscore is purely to avoid namespace conflicts.
37
- t.name_(index_as: [:searchable]) {
38
- # this is a namepart
39
- t.namePart(type: :string, label: "generic name")
40
- # affiliations are great
41
- t.affiliation
42
- t.institution(path: "affiliation", index_as: [:facetable], label: "organization")
43
- t.displayForm
44
- t.role(ref: [:role])
45
- t.description(index_as: [:facetable])
46
- t.date(path: "namePart", attributes: { type: "date" })
47
- t.last_name(path: "namePart", attributes: { type: "family" })
48
- t.first_name(path: "namePart", attributes: { type: "given" }, label: "first name")
49
- t.terms_of_address(path: "namePart", attributes: { type: "termsOfAddress" })
50
- t.computing_id
51
- }
52
- # lookup :person, :first_name
53
- t.person(ref: :name, attributes: { type: "personal" }, index_as: [:facetable, :stored_searchable])
54
- t.department(proxy: [:person, :description], index_as: [:facetable])
55
- t.organization(ref: :name, attributes: { type: "corporate" }, index_as: [:facetable])
56
- t.conference(ref: :name, attributes: { type: "conference" }, index_as: [:facetable])
57
- t.role(index_as: [:stored_searchable]) {
58
- t.text(path: "roleTerm", attributes: { type: "text" }, index_as: [:stored_searchable])
59
- t.code(path: "roleTerm", attributes: { type: "code" })
60
- }
61
- t.journal(path: 'relatedItem', attributes: { type: "host" }) {
62
- t.title_info(index_as: [:facetable], ref: [:title_info])
63
- t.origin_info(path: "originInfo") {
64
- t.publisher
65
- t.date_issued(path: "dateIssued")
66
- t.issuance(index_as: [:facetable])
67
- }
68
- t.issn(path: "identifier", attributes: { type: "issn" })
69
- t.issue(path: "part") {
70
- t.volume(path: "detail", attributes: { type: "volume" }, default_content_path: "number")
71
- t.level(path: "detail", attributes: { type: "number" }, default_content_path: "number")
72
- t.extent
73
- t.pages(path: "extent", attributes: { unit: "pages" }) {
74
- t.start
75
- t.end
76
- }
77
- t.start_page(proxy: [:pages, :start])
78
- t.end_page(proxy: [:pages, :end])
79
- t.publication_date(path: "date", type: :date, index_as: [:stored_searchable])
80
- }
81
- }
82
- t.note
83
- t.location(path: "location") {
84
- t.url(path: "url")
85
- }
86
- t.publication_url(proxy: [:location, :url])
87
- t.peer_reviewed(proxy: [:journal, :origin_info, :issuance], index_as: [:facetable])
88
- t.title(proxy: [:title_info, :main_title])
89
- t.journal_title(proxy: [:journal, :title_info, :main_title])
90
- end
91
-
92
- # Generates an empty Mods Article (used when you call ModsArticle.new without passing in existing xml)
93
- def self.xml_template
94
- builder = Nokogiri::XML::Builder.new do |xml|
95
- xml.mods(:version => "3.3", "xmlns:xlink" => "http://www.w3.org/1999/xlink",
96
- "xmlns:xsi" => "http://www.w3.org/2001/XMLSchema-instance",
97
- "xmlns" => "http://www.loc.gov/mods/v3",
98
- "xsi:schemaLocation" => "http://www.loc.gov/mods/v3 http://www.loc.gov/standards/mods/v3/mods-3-3.xsd") {
99
- xml.titleInfo(lang: "") {
100
- xml.title
101
- }
102
- xml.name(type: "personal") {
103
- xml.namePart(type: "given")
104
- xml.namePart(type: "family")
105
- xml.affiliation
106
- xml.computing_id
107
- xml.description
108
- xml.role {
109
- xml.roleTerm("Author", authority: "marcrelator", type: "text")
110
- }
111
- }
112
- xml.typeOfResource
113
- xml.genre(authority: "marcgt")
114
- xml.language {
115
- xml.languageTerm(authority: "iso639-2b", type: "code")
116
- }
117
- xml.abstract
118
- xml.subject {
119
- xml.topic
120
- }
121
- xml.relatedItem(type: "host") {
122
- xml.titleInfo {
123
- xml.title
124
- }
125
- xml.identifier(type: "issn")
126
- xml.originInfo {
127
- xml.publisher
128
- xml.dateIssued
129
- xml.issuance
130
- }
131
- xml.part {
132
- xml.detail(type: "volume") {
133
- xml.number
134
- }
135
- xml.detail(type: "number") {
136
- xml.number
137
- }
138
- xml.extent(unit: "pages") {
139
- xml.start
140
- xml.end
141
- }
142
- xml.date
143
- }
144
- }
145
- xml.location {
146
- xml.url
147
- }
148
- }
149
- end
150
- builder.doc
151
- end
152
-
153
- def prefix(name)
154
- "#{name.underscore}__"
155
- end
156
-
157
- # Generates a new Person node
158
- def self.person_template
159
- builder = Nokogiri::XML::Builder.new do |xml|
160
- xml.name(type: "personal") {
161
- xml.namePart(type: "family")
162
- xml.namePart(type: "given")
163
- xml.affiliation
164
- xml.computing_id
165
- xml.description
166
- xml.role {
167
- xml.roleTerm("Author", type: "text")
168
- }
169
- }
170
- end
171
- builder.doc.root
172
- end
173
-
174
- def self.full_name_template
175
- builder = Nokogiri::XML::Builder.new do |xml|
176
- xml.full_name(type: "personal")
177
- end
178
- builder.doc.root
179
- end
180
-
181
- # Generates a new Organization node
182
- # Uses mods:name[@type="corporate"]
183
- def self.organization_template
184
- builder = Nokogiri::XML::Builder.new do |xml|
185
- xml.name(type: "corporate") {
186
- xml.namePart
187
- xml.role {
188
- xml.roleTerm(authority: "marcrelator", type: "text")
189
- }
190
- }
191
- end
192
- builder.doc.root
193
- end
194
-
195
- # Generates a new Conference node
196
- def self.conference_template
197
- builder = Nokogiri::XML::Builder.new do |xml|
198
- xml.name(type: "conference") {
199
- xml.namePart
200
- xml.role {
201
- xml.roleTerm(authority: "marcrelator", type: "text")
202
- }
203
- }
204
- end
205
- builder.doc.root
206
- end
207
-
208
- # Inserts a new contributor (mods:name) into the mods document
209
- # creates contributors of type :person, :organization, or :conference
210
- def insert_contributor(type, _opts = {})
211
- case type.to_sym
212
- when :person
213
- node = Hydra::ModsArticleDatastream.person_template
214
- nodeset = find_by_terms(:person)
215
- when :organization
216
- node = Hydra::ModsArticleDatastream.organization_template
217
- nodeset = find_by_terms(:organization)
218
- when :conference
219
- node = Hydra::ModsArticleDatastream.conference_template
220
- nodeset = find_by_terms(:conference)
221
- else
222
- ActiveFedora.logger.warn("#{type} is not a valid argument for Hydra::ModsArticleDatastream.insert_contributor")
223
- node = nil
224
- index = nil
225
- end
226
-
227
- unless nodeset.nil?
228
- if nodeset.empty?
229
- ng_xml.root.add_child(node)
230
- index = 0
231
- else
232
- nodeset.after(node)
233
- index = nodeset.length
234
- end
235
- self.dirty = true
236
- end
237
-
238
- [node, index]
239
- end
240
-
241
- # Remove the contributor entry identified by @contributor_type and @index
242
- def remove_contributor(contributor_type, index)
243
- find_by_terms(contributor_type.to_sym => index.to_i).first.remove
244
- self.dirty = true
245
- end
246
-
247
- def self.common_relator_terms
248
- { "aut" => "Author",
249
- "clb" => "Collaborator",
250
- "com" => "Compiler",
251
- "ctb" => "Contributor",
252
- "cre" => "Creator",
253
- "edt" => "Editor",
254
- "ill" => "Illustrator",
255
- "oth" => "Other",
256
- "trl" => "Translator" }
257
- end
258
-
259
- def self.person_relator_terms
260
- { "aut" => "Author",
261
- "clb" => "Collaborator",
262
- "com" => "Compiler",
263
- "cre" => "Creator",
264
- "ctb" => "Contributor",
265
- "edt" => "Editor",
266
- "ill" => "Illustrator",
267
- "res" => "Researcher",
268
- "rth" => "Research team head",
269
- "rtm" => "Research team member",
270
- "trl" => "Translator" }
271
- end
272
-
273
- def self.conference_relator_terms
274
- {
275
- "hst" => "Host"
276
- }
277
- end
278
-
279
- def self.organization_relator_terms
280
- {
281
- "fnd" => "Funder",
282
- "hst" => "Host"
283
- }
284
- end
285
-
286
- def self.dc_relator_terms
287
- { "acp" => "Art copyist",
288
- "act" => "Actor",
289
- "adp" => "Adapter",
290
- "aft" => "Author of afterword, colophon, etc.",
291
- "anl" => "Analyst",
292
- "anm" => "Animator",
293
- "ann" => "Annotator",
294
- "ant" => "Bibliographic antecedent",
295
- "app" => "Applicant",
296
- "aqt" => "Author in quotations or text abstracts",
297
- "arc" => "Architect",
298
- "ard" => "Artistic director ",
299
- "arr" => "Arranger",
300
- "art" => "Artist",
301
- "asg" => "Assignee",
302
- "asn" => "Associated name",
303
- "att" => "Attributed name",
304
- "auc" => "Auctioneer",
305
- "aud" => "Author of dialog",
306
- "aui" => "Author of introduction",
307
- "aus" => "Author of screenplay",
308
- "aut" => "Author",
309
- "bdd" => "Binding designer",
310
- "bjd" => "Bookjacket designer",
311
- "bkd" => "Book designer",
312
- "bkp" => "Book producer",
313
- "bnd" => "Binder",
314
- "bpd" => "Bookplate designer",
315
- "bsl" => "Bookseller",
316
- "ccp" => "Conceptor",
317
- "chr" => "Choreographer",
318
- "clb" => "Collaborator",
319
- "cli" => "Client",
320
- "cll" => "Calligrapher",
321
- "clt" => "Collotyper",
322
- "cmm" => "Commentator",
323
- "cmp" => "Composer",
324
- "cmt" => "Compositor",
325
- "cng" => "Cinematographer",
326
- "cnd" => "Conductor",
327
- "cns" => "Censor",
328
- "coe" => "Contestant -appellee",
329
- "col" => "Collector",
330
- "com" => "Compiler",
331
- "cos" => "Contestant",
332
- "cot" => "Contestant -appellant",
333
- "cov" => "Cover designer",
334
- "cpc" => "Copyright claimant",
335
- "cpe" => "Complainant-appellee",
336
- "cph" => "Copyright holder",
337
- "cpl" => "Complainant",
338
- "cpt" => "Complainant-appellant",
339
- "cre" => "Creator",
340
- "crp" => "Correspondent",
341
- "crr" => "Corrector",
342
- "csl" => "Consultant",
343
- "csp" => "Consultant to a project",
344
- "cst" => "Costume designer",
345
- "ctb" => "Contributor",
346
- "cte" => "Contestee-appellee",
347
- "ctg" => "Cartographer",
348
- "ctr" => "Contractor",
349
- "cts" => "Contestee",
350
- "ctt" => "Contestee-appellant",
351
- "cur" => "Curator",
352
- "cwt" => "Commentator for written text",
353
- "dfd" => "Defendant",
354
- "dfe" => "Defendant-appellee",
355
- "dft" => "Defendant-appellant",
356
- "dgg" => "Degree grantor",
357
- "dis" => "Dissertant",
358
- "dln" => "Delineator",
359
- "dnc" => "Dancer",
360
- "dnr" => "Donor",
361
- "dpc" => "Depicted",
362
- "dpt" => "Depositor",
363
- "drm" => "Draftsman",
364
- "drt" => "Director",
365
- "dsr" => "Designer",
366
- "dst" => "Distributor",
367
- "dtc" => "Data contributor ",
368
- "dte" => "Dedicatee",
369
- "dtm" => "Data manager ",
370
- "dto" => "Dedicator",
371
- "dub" => "Dubious author",
372
- "edt" => "Editor",
373
- "egr" => "Engraver",
374
- "elg" => "Electrician ",
375
- "elt" => "Electrotyper",
376
- "eng" => "Engineer",
377
- "etr" => "Etcher",
378
- "exp" => "Expert",
379
- "fac" => "Facsimilist",
380
- "fld" => "Field director ",
381
- "flm" => "Film editor",
382
- "fmo" => "Former owner",
383
- "fpy" => "First party",
384
- "fnd" => "Funder",
385
- "frg" => "Forger",
386
- "gis" => "Geographic information specialist ",
387
- "grt" => "Graphic technician",
388
- "hnr" => "Honoree",
389
- "hst" => "Host",
390
- "ill" => "Illustrator",
391
- "ilu" => "Illuminator",
392
- "ins" => "Inscriber",
393
- "inv" => "Inventor",
394
- "itr" => "Instrumentalist",
395
- "ive" => "Interviewee",
396
- "ivr" => "Interviewer",
397
- "lbr" => "Laboratory ",
398
- "lbt" => "Librettist",
399
- "ldr" => "Laboratory director ",
400
- "led" => "Lead",
401
- "lee" => "Libelee-appellee",
402
- "lel" => "Libelee",
403
- "len" => "Lender",
404
- "let" => "Libelee-appellant",
405
- "lgd" => "Lighting designer",
406
- "lie" => "Libelant-appellee",
407
- "lil" => "Libelant",
408
- "lit" => "Libelant-appellant",
409
- "lsa" => "Landscape architect",
410
- "lse" => "Licensee",
411
- "lso" => "Licensor",
412
- "ltg" => "Lithographer",
413
- "lyr" => "Lyricist",
414
- "mcp" => "Music copyist",
415
- "mfr" => "Manufacturer",
416
- "mdc" => "Metadata contact",
417
- "mod" => "Moderator",
418
- "mon" => "Monitor",
419
- "mrk" => "Markup editor",
420
- "msd" => "Musical director",
421
- "mte" => "Metal-engraver",
422
- "mus" => "Musician",
423
- "nrt" => "Narrator",
424
- "opn" => "Opponent",
425
- "org" => "Originator",
426
- "orm" => "Organizer of meeting",
427
- "oth" => "Other",
428
- "own" => "Owner",
429
- "pat" => "Patron",
430
- "pbd" => "Publishing director",
431
- "pbl" => "Publisher",
432
- "pdr" => "Project director",
433
- "pfr" => "Proofreader",
434
- "pht" => "Photographer",
435
- "plt" => "Platemaker",
436
- "pma" => "Permitting agency",
437
- "pmn" => "Production manager",
438
- "pop" => "Printer of plates",
439
- "ppm" => "Papermaker",
440
- "ppt" => "Puppeteer",
441
- "prc" => "Process contact",
442
- "prd" => "Production personnel",
443
- "prf" => "Performer",
444
- "prg" => "Programmer",
445
- "prm" => "Printmaker",
446
- "pro" => "Producer",
447
- "prt" => "Printer",
448
- "pta" => "Patent applicant",
449
- "pte" => "Plaintiff -appellee",
450
- "ptf" => "Plaintiff",
451
- "pth" => "Patent holder",
452
- "ptt" => "Plaintiff-appellant",
453
- "rbr" => "Rubricator",
454
- "rce" => "Recording engineer",
455
- "rcp" => "Recipient",
456
- "red" => "Redactor",
457
- "ren" => "Renderer",
458
- "res" => "Researcher",
459
- "rev" => "Reviewer",
460
- "rps" => "Repository",
461
- "rpt" => "Reporter",
462
- "rpy" => "Responsible party",
463
- "rse" => "Respondent-appellee",
464
- "rsg" => "Restager",
465
- "rsp" => "Respondent",
466
- "rst" => "Respondent-appellant",
467
- "rth" => "Research team head",
468
- "rtm" => "Research team member",
469
- "sad" => "Scientific advisor",
470
- "sce" => "Scenarist",
471
- "scl" => "Sculptor",
472
- "scr" => "Scribe",
473
- "sds" => "Sound designer",
474
- "sec" => "Secretary",
475
- "sgn" => "Signer",
476
- "sht" => "Supporting host",
477
- "sng" => "Singer",
478
- "spk" => "Speaker",
479
- "spn" => "Sponsor",
480
- "spy" => "Second party",
481
- "srv" => "Surveyor",
482
- "std" => "Set designer",
483
- "stl" => "Storyteller",
484
- "stm" => "Stage manager",
485
- "stn" => "Standards body",
486
- "str" => "Stereotyper",
487
- "tcd" => "Technical director",
488
- "tch" => "Teacher",
489
- "ths" => "Thesis advisor",
490
- "trc" => "Transcriber",
491
- "trl" => "Translator",
492
- "tyd" => "Type designer",
493
- "tyg" => "Typographer",
494
- "vdg" => "Videographer",
495
- "voc" => "Vocalist",
496
- "wam" => "Writer of accompanying material",
497
- "wdc" => "Woodcutter",
498
- "wde" => "Wood -engraver",
499
- "wit" => "Witness" }
500
- end
501
-
502
- def self.valid_child_types
503
- ["data", "supporting file", "profile", "lorem ipsum", "dolor"]
504
- end
505
-
506
- def to_solr(solr_doc = {}, opts = {})
507
- solr_doc = super
508
-
509
- ::Solrizer::Extractor.insert_solr_field_value(solr_doc, ActiveFedora.index_field_mapper.solr_name('object_type', :facetable), "Article")
510
- ::Solrizer::Extractor.insert_solr_field_value(solr_doc, ActiveFedora.index_field_mapper.solr_name('mods_journal_title_info', :facetable), "Unknown") if solr_doc["mods_journal_title_info_facet"].nil?
511
-
512
- solr_doc
513
- end
514
- end
515
- end