Class: Dor::DescMetadataDS
- Inherits:
-
ActiveFedora::OmDatastream
- Object
- ActiveFedora::OmDatastream
- Dor::DescMetadataDS
- Defined in:
- lib/dor/datastreams/desc_metadata_ds.rb
Constant Summary collapse
- MODS_NS =
'http://www.loc.gov/mods/v3'
- MODS_HEADER_CONFIG =
{ 'xmlns' => MODS_NS, 'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance', version: '3.6', 'xsi:schemaLocation' => 'http://www.loc.gov/mods/v3 http://www.loc.gov/standards/mods/v3/mods-3-6.xsd' }.freeze
Class Method Summary collapse
Instance Method Summary collapse
- #mods_title ⇒ Object
- #mods_title=(val) ⇒ Object
-
#prefix ⇒ Object
maintain AF < 8 indexing behavior.
Class Method Details
.xml_template ⇒ Object
46 47 48 49 50 51 52 53 54 |
# File 'lib/dor/datastreams/desc_metadata_ds.rb', line 46 def self.xml_template Nokogiri::XML::Builder.new do |xml| xml.mods(MODS_HEADER_CONFIG) do xml.titleInfo do xml.title end end end.doc end |
Instance Method Details
#mods_title ⇒ Object
56 57 58 |
# File 'lib/dor/datastreams/desc_metadata_ds.rb', line 56 def mods_title term_values(:title_info, :main_title).first end |
#mods_title=(val) ⇒ Object
60 61 62 |
# File 'lib/dor/datastreams/desc_metadata_ds.rb', line 60 def mods_title=(val) update_values(%i[title_info main_title] => val) end |
#prefix ⇒ Object
maintain AF < 8 indexing behavior
65 66 67 |
# File 'lib/dor/datastreams/desc_metadata_ds.rb', line 65 def prefix '' end |