Class: PennMARC::Citation

Inherits:
Helper
  • Object
show all
Defined in:
lib/pennmarc/helpers/citation.rb

Overview

Do Citation-y stuff

Constant Summary

Constants included from Util

Util::TRAILING_PUNCTUATIONS_PATTERNS

Class Method Summary collapse

Methods included from Util

#append_relator, #append_trailing, #datafield_and_linked_alternate, #field_defined?, #field_or_its_linked_alternate?, #join_and_squish, #join_subfields, #linked_alternate, #linked_alternate_not_6_or_8, #no_subfield_value_matches?, #prefixed_subject_and_alternate, #relator, #relator_join_separator, #relator_term_subfield, #remove_paren_value_from_subfield_i, #subfield_defined?, #subfield_in?, #subfield_not_in?, #subfield_undefined?, #subfield_value?, #subfield_value_in?, #subfield_value_not_in?, #subfield_values, #subfield_values_for, #substring_after, #substring_before, #translate_relator, #trim_punctuation, #trim_trailing, #trim_trailing!, #valid_subject_genre_source_code?

Class Method Details

.cite_as_show(record) ⇒ Array<String>

Field 524 is the Preferred Citation of Described Materials Note. It is the Format for the citation of the described materials that is preferred by the custodian. When multiple citation formats exist for the same item, each is recorded in a separate occurrence of field 524. The note is sometimes displayed and/or printed with an introductory phrase that is generated as a display constant based on the first indicator value. www.loc.gov/marc/bibliographic/bd524.html

Parameters:

  • record (MARC::Record)

Returns:

  • (Array<String>)

    array of citation of described materials note and any linked alternates



26
27
28
# File 'lib/pennmarc/helpers/citation.rb', line 26

def cite_as_show(record)
  datafield_and_linked_alternate(record, '524').uniq
end

.cited_in_show(record) ⇒ Array<String>

Field 510 contains Citations or references to published bibliographic descriptions, reviews, abstracts, or indexes of the content of the described item. Used to specify where an item has been cited or reviewed. Citations or references may be given in a brief form (i.e., using generally recognizable abbreviations, etc.). The actual text of a published description is not recorded in field 510 but rather in field 520 (Summary, Etc. Note). www.loc.gov/marc/bibliographic/bd510.html

Parameters:

  • record (MARC::Record)

Returns:

  • (Array<String>)

    array of citations and any linked alternates



15
16
17
# File 'lib/pennmarc/helpers/citation.rb', line 15

def cited_in_show(record)
  datafield_and_linked_alternate(record, '510').uniq
end