Sha256: a0458b0be8f41c3c9013ac813ac6de86425b537ce555d237ca153409a9181607

Contents?: true

Size: 628 Bytes

Versions: 2

Compression:

Stored size: 628 Bytes

Contents

module Dor
  module Rightsable
    extend ActiveSupport::Concern

    included do
      has_metadata :name => 'rightsMetadata', :type => Dor::RightsMetadataDS, :label => 'Rights metadata'
    end

    def build_rightsMetadata_datastream(ds)
      content_ds = self.admin_policy_object.datastreams['defaultObjectRights']
      ds.dsLabel = 'Rights Metadata'
      ds.ng_xml = content_ds.ng_xml.clone
      ds.content = ds.ng_xml.to_xml
    end

    def world_doc
      return Nokogiri::XML::Builder.new do |xml|
        xml.access(:type => 'read') {
          xml.machine { xml.world }
        }
      end.doc
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
dor-services-5.2.0 lib/dor/models/rightsable.rb
dor-services-5.1.1 lib/dor/models/rightsable.rb