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
82 83 84 85 86 87 88 89 |
# File 'lib/ddr/datastreams/fits_datastream.rb', line 82 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
95 96 97 98 99 |
# File 'lib/ddr/datastreams/fits_datastream.rb', line 95 def modified ng_xml .xpath("//fits:fileinfo/fits:lastmodified[@toolname != '#{EXIFTOOL}']", fits: FITS_XMLNS) .map(&:text) end |
#prefix ⇒ Object
91 92 93 |
# File 'lib/ddr/datastreams/fits_datastream.rb', line 91 def prefix "fits__" end |