class Ddr::Models::FitsXmlFile

Constants

EXIFTOOL
FITS_SCHEMA
FITS_XMLNS

Public Class Methods

xml_template() click to toggle source
# File lib/ddr/models/files/fits_xml_file.rb, line 70
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

Public Instance Methods

modified() click to toggle source
# File lib/ddr/models/files/fits_xml_file.rb, line 79
def modified
  ng_xml
    .xpath("//fits:fileinfo/fits:lastmodified[@toolname != '#{EXIFTOOL}']", fits: FITS_XMLNS)
    .map(&:text)
end