Class: Ddr::Datastreams::FitsDatastream
- Inherits:
-
ActiveFedora::OmDatastream
- Object
- ActiveFedora::OmDatastream
- Ddr::Datastreams::FitsDatastream
- Defined in:
- lib/ddr/datastreams/fits_datastream.rb
Constant Summary collapse
- FITS_XMLNS =
"http://hul.harvard.edu/ois/xml/ns/fits/fits_output".freeze
- FITS_SCHEMA =
"http://hul.harvard.edu/ois/xml/xsd/fits/fits_output.xsd".freeze
- EXIFTOOL =
"Exiftool"
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.xml_template ⇒ Object
68 69 70 71 72 73 74 75 |
# File 'lib/ddr/datastreams/fits_datastream.rb', line 68 def self.xml_template builder = Nokogiri::XML::Builder.new do |xml| xml.fits("xmlns"=>FITS_XMLNS, "xmlns:xsi"=>"http://www.w3.org/2001/XMLSchema-instance", "xsi:schemaLocation"=>"http://hul.harvard.edu/ois/xml/ns/fits/fits_output http://hul.harvard.edu/ois/xml/xsd/fits/fits_output.xsd") end builder.doc end |
Instance Method Details
#modified ⇒ Object
81 82 83 84 85 |
# File 'lib/ddr/datastreams/fits_datastream.rb', line 81 def modified ng_xml .xpath("//fits:fileinfo/fits:lastmodified[@toolname != '#{EXIFTOOL}']", fits: FITS_XMLNS) .map(&:text) end |
#prefix ⇒ Object
77 78 79 |
# File 'lib/ddr/datastreams/fits_datastream.rb', line 77 def prefix "fits__" end |