Sha256: 920804e571397dd3cb0953d080412027e3851aa867e244e860cd27567f964e2c
Contents?: true
Size: 845 Bytes
Versions: 33
Compression:
Stored size: 845 Bytes
Contents
module ActiveFedora module RDF # # Mixin for adding datastream persistence to an ActiveTriples::Resource # descendant so that it may be used to back an ActiveFedora::RDFDatastream. # # @see ActiveFedora::RDFDatastream.resource_class # @see ActiveFedora::RDF::ObjectResource # module Persistence extend ActiveSupport::Concern BASE_URI = 'info:fedora/' included do configure :base_uri => BASE_URI unless base_uri attr_accessor :datastream end # Overrides ActiveTriples::Resource def persist! return false unless datastream and datastream.respond_to? :save @persisted ||= datastream.save end # Overrides ActiveTriples::Resource def persisted? @persisted ||= (not datastream.new_record?) end end end end
Version data entries
33 entries across 33 versions & 1 rubygems