Sha256: c8b4ff7fe0dacf5c52f35092dc6ad8dc5d12a2b6e4457d218a7ae5f9a96869f9
Contents?: true
Size: 869 Bytes
Versions: 16
Compression:
Stored size: 869 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? :digital_object @persisted ||= datastream.digital_object.save end # Overrides ActiveTriples::Resource def persisted? @persisted ||= (not datastream.new?) end end end end
Version data entries
16 entries across 16 versions & 1 rubygems