lib/stanford-mods/searchworks.rb in stanford-mods-0.0.3 vs lib/stanford-mods/searchworks.rb in stanford-mods-0.0.4
- old
+ new
@@ -5,16 +5,16 @@
module Mods
class Record < ::Mods::Record
# if it's coming from DOR, then it is available online
- def access_facet
+ def sw_access_facet
['Online']
end
# include langagues known to SearchWorks; try to error correct when possible (e.g. when ISO-639 disagrees with MARC standard)
- def language_facet
+ def sw_language_facet
result = []
@mods_ng_xml.language.each { |n|
# get languageTerm codes and add their translations to the result
n.code_term.each { |ct|
if ct.authority.match(/^iso639/)
@@ -46,10 +46,10 @@
if n.languageTerm.size == 0
result << n.text if SEARCHWORKS_LANGUAGES.has_value?(n.text)
end
}
result.uniq
- end
+ end # language_facet
- end
- end
-end
+ end # class Record
+ end # Module Mods
+end # Module Stanford