module Ddr::Events::PreservationEventBehavior

Constants

EVENT_ID_TYPE
LINKING_OBJECT_ID_TYPE

Public Instance Methods

as_premis() click to toggle source
# File lib/ddr/events/preservation_event_behavior.rb, line 19
def as_premis
  Ddr::Metadata::PremisEvent.new.tap do |doc|
    doc.event_type = RDF::Vocab::PremisEventType.label_for(preservation_event_type)
    doc.event_id_type = EVENT_ID_TYPE
    doc.event_id_value = id
    doc.event_detail = summary
    doc.linking_object_id_type = LINKING_OBJECT_ID_TYPE
    doc.linking_object_id_value = pid
    doc.event_outcome = outcome
    doc.event_outcome_detail_note = detail
    doc.event_date_time = event_date_time_s
  end
end
preservation_event_type() click to toggle source
# File lib/ddr/events/preservation_event_behavior.rb, line 12
def preservation_event_type
  self.class.preservation_event_type
end
to_xml() click to toggle source
# File lib/ddr/events/preservation_event_behavior.rb, line 33
def to_xml
  as_premis.to_xml
end